AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  DBX loosing scope

    Posted Fri July 17, 2009 11:04 AM

    Originally posted by: SystemAdmin


    Hello,

    I am working on AIX Server version 5.3.0.0 and I am having a trouble debugging a code. I am debugging a test code copiled only with -g option.
    When I start debugging with DBX step by step start well as you can see in the log below, but as you can see in the second step it loose the scope.
    *stopped in main at line 2937 in file "test.c" ($t1)
    2937 char sProIni[4]="";
    (dbx) s
    stopped in unnamed block in iBorrarOrden at line 2939 in file "test.c" ($t1)
    2939 memset (szText, '\0', sizeof (szText));
    (dbx) s*

    Thing is that in first place the line 2938 is not debugged or is jumped, I do not know, and that line is:
    char szText30="";
    After, in the second step the line number 2939 is from main function and also the code that we saw is from main funcion but "unnamed block in iBorrarOrden" what appears, is not related with anything.

    After the second step you can not see the variables anymore becase dbx change the scope, also you can se the variables from iBorrarOrden.

    Anybody knows why dbx loose the scope, or how can I fix it?

    For more information I try different cases, using step by step, using a breakpoint after that line and let ir run, etc. It always lose the scope.

    Also I have the same error with many other codes, so I dont think is an error from this particular code. I think is a bug from DBX.

    Thanks in advance for your comments and help

    Sebastian
    #AIX-Forum