Operating System - HP-UX
1841460 Members
2749 Online
110181 Solutions
New Discussion

Problem debugging with gdb

 
Maribeth Romeo
Frequent Advisor

Problem debugging with gdb

When I try to run gdb against my program on an HP-UX 11.00 (32 bit) compiled with gcc 3.4.2, I always get the error, "Debugging dynamic executables loaded via the hpux8 dld.sl is not supported." My multi-threaded program is crashing with a memory fault, and the core file yields nothing for me. Any ideas? Thanks.
6 REPLIES 6
Mike Stroyan
Honored Contributor

Re: Problem debugging with gdb

I suspect you have the wrong gdb.
Download wdb from http://www.hp.com/go/wdb
and then use /opt/langtools/bin/gdb.
Maribeth Romeo
Frequent Advisor

Re: Problem debugging with gdb

I have the version that came with gcc 3.4.2. Why would that be the incorrect version?
ranganath ramachandra
Esteemed Contributor

Re: Problem debugging with gdb

this can happen even with new gdb if your program is corrupting the dynamic loader's data (this ,or the reason for this, may also be the reason for the crash).

if you could run your application from within gdb and reach upto some point such as main before crashing, at that point you could set a watchpoint on *__dld_list ("watch *(int *)__dld_list") and see who is writing to that address. that may give you a hint about where a possible bad pointer access is happening.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

ranganath ramachandra
Esteemed Contributor

Re: Problem debugging with gdb

i think you will also need a watchpoint on __dld_list, set using the command "watch __dld_list".


 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Maribeth Romeo
Frequent Advisor

Re: Problem debugging with gdb

When I try to do this I get the message, "Hardware watchpoint 2: {} 1090556040." This doesn't seem correct. When I run my program, it never stops there.
ranganath ramachandra
Esteemed Contributor

Re: Problem debugging with gdb

sorry, no more clues. perhaps you should contact the response center.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo