[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    Re:  HPUX-DEVTOOLS: gdb: leak check by interrupting debugged
From:       Dennis Handly <dhandly () cup ! hp ! com>
Date:       2005-09-08 21:42:03
Message-ID: 200509082142.OAA22526 () hpcll183 ! cup ! hp ! com
[Download RAW message or body]

>From: "Banibrata Dutta" <dutta@india.hp.com>
>Is there some other way to interrupt the debugging to get leaks (other than
>the breakpoint method).

After you hit control C, you could put a breakpoint somewhere in your
stack trace.  Or you could put a breakpoint in malloc.

>From: "Veygel, Mario" <mario.veygel@hp.com>
>Try an "si" before "info leaks". Then the signal is delivered to the
>process. This worked for me after I interrupted the process running in
>gdb with CTRL-C.

That seems like it would work.

>From: "Banibrata Dutta" <dutta@india.hp.com>
>Doing an "si" before "info leaks" doesn't seem to work for me, at least with
>this program.  It may have something to do with the breakpoint though.

Then my solution above may not work either?

>From: "Srikanth Sankaran" <srikanth.sankaran@hp.com>
>	It is very likely that in this run, with the given set of inputs,
>the chosen function my_func is never reached. 

Possibly.  Is Dutta's process making progress?
Try continuing and hitting Control C then trace.

>From: "Banibrata Dutta" <dutta@india.hp.com>
>[bani] BTW, this is a mixed language program. C & C++. The main binary
>is predominantly C++ though. So when I set the breakpoint I use it's
>mangled name to set the breakpoint. I used "nm -pxA <lib> | grep <func>"
>to get it's mangled name.

You can use "info func foo.*bar" to look up regular expressions.

[bani] Yes the shared lib has been loaded (i know because of some traces).

You can also know by using "info shared".
And can use "catch load" to stop when loaded.
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic