Weird "location" interpretation by dbx (and TotalView) - Aix

This is a discussion on Weird "location" interpretation by dbx (and TotalView) - Aix ; I am debugging an AIX 5.3 C program, which makes calls to DB2. Using DBX I get an ODD "resolution" of the location of where dbx has stopped... Here's an example: stopped in unnamed block in AddWaitDocToReqObj at line 32017 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Weird "location" interpretation by dbx (and TotalView)

  1. Weird "location" interpretation by dbx (and TotalView)

    I am debugging an AIX 5.3 C program, which makes calls to DB2.

    Using DBX I get an ODD "resolution" of the location of where dbx has
    stopped...
    Here's an example:
    stopped in unnamed block in AddWaitDocToReqObj at line 32017 in file
    "urm.c" ($t1)

    That's all well and good, but the function it is REALLY stopped in is
    NOT AddWaitDocToReqObj...
    ....The line number is, correct... as is the file name... but the
    function is not AddWaitDocToReqObj...(AddWaitDocToReqObj is a valid
    function in the file urm.c).

    So, I gave up on dbx, and tried TotalView (from Etnus)...
    ....with "similar" results.... It identified line 32017 as:
    wrapper_dms_db2_connect+0xffffffffffff7d08
    (note: wrapper_dms_db2_connect is a valid function in the file
    urm.c)....
    but get that "offset"... it appears to be a negative 64bit number....

    Does anyone have a clue as to what is happening...

    Thanks,
    -tony


  2. Re: Weird "location" interpretation by dbx (and TotalView)

    bennett.tony@con-way.com writes:

    > Does anyone have a clue as to what is happening...


    Sure: the debug info in your executable is screwed up, so both
    debuggers do as good a job as they can under the conditions.

    Why is it screwed up? Who knows: maybe a compiler bug, maybe a
    linker bug, maybe you corrupted objects after compiler produced
    them but before linker linked them.

    You can do "dump -tv exename" and see what debug info is there,
    but it is unlikely you'll be able to tell what is wrong with it.

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

  3. Re: Weird "location" interpretation by dbx (and TotalView)

    On May 18, 4:34 pm, Paul Pluzhnikov
    wrote:
    > bennett.t...@con-way.com writes:
    > > Does anyone have a clue as to what is happening...

    >
    > Sure: the debug info in your executable is screwed up, so both
    > debuggers do as good a job as they can under the conditions.
    >
    > Why is it screwed up? Who knows: maybe a compiler bug, maybe a
    > linker bug, maybe you corrupted objects after compiler produced
    > them but before linker linked them.
    >
    > You can do "dump -tv exename" and see what debug info is there,
    > but it is unlikely you'll be able to tell what is wrong with it.
    >
    > Cheers,
    > --
    > In order to understand recursion you must first understand recursion.
    > Remove /-nsp/ for email.


    Thanks for the response, Paul.

    I performed the "dump -tv" like you suggested...
    ....and you're right... I can't determine what is wrong...

    BTW, I am using IBM's "C for AIX" version (taken from lslpp )
    7.0.0.0 Compiler.

    Perhaps Gary Hook will chime in with suggestions on what to look for
    in the dump,
    of whether I should report this as a "problem" to IBM support.

    -tony


  4. Re: Weird "location" interpretation by dbx (and TotalView)

    bennett.tony@con-way.com writes:

    > I performed the "dump -tv" like you suggested...
    > ...and you're right... I can't determine what is wrong...
    >
    > BTW, I am using IBM's "C for AIX" version (taken from lslpp )
    > 7.0.0.0 Compiler.


    That compiler is outdated (current, I believe, is 8.0.X.Y).

    > Perhaps Gary Hook will chime in with suggestions on what to look for
    > in the dump,


    Actually, you probably want to look at "dump -lv" (I thought '-tv'
    dumped everything, but I was wrong).

    > of whether I should report this as a "problem" to IBM support.


    I don't know what their support policy for such a "minor" glitch
    would be. Also, they would be unlikely to be able to reproduce this
    problem without a test case.

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

+ Reply to Thread