Re: Regarding shared library and GDB
- From: Paul Pluzhnikov <ppluzhnikov-nsp@xxxxxxxxxxx>
- Date: Thu, 27 Sep 2007 08:05:46 -0700
sunil <sunil.vvn@xxxxxxxxx> writes:
On Sep 27, 1:25 pm, dan.odega...@xxxxxxxxx wrote:
Can i debug that library iusing GDB.
Yes.
My problem is unable to caught the library using gdb while application
executing the library.
You are not making much sense, and you are not explaining your
difficulty. After reading this:
http://catb.org/~esr/faqs/smart-questions.html
ask your question again, but explain exactly what you are doing
and what you observe gdb do (and what you expected it to do).
My guess is that the library is loaded dynamically into your app,
and so when you try to set breakpoint in it, the breakpoint is
never set (or never fires).
If so, there are several ways to deal with this.
Commands you'll want to try:
set stop-on-solib-events 1 # stop after every DSO load
info shared # see when your library is loaded.
# Once it is, you can set breakpoints in it.
Alternatively, if you are on x86, insert a breakpoint instruction
into the place in your library where you want gdb to stop:
__asm__ __volatile__ ("int3");
However, this will cause the app to die with 'Trace/breakpoint trap'
when run outside of gdb.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.
- References:
- Regarding shared library and GDB
- From: sunil
- Re: Regarding shared library and GDB
- From: dan . odegaard
- Re: Regarding shared library and GDB
- From: sunil
- Regarding shared library and GDB
- Prev by Date: Re: advice on how to detect time change
- Next by Date: Re: advice on how to detect time change
- Previous by thread: Re: Regarding shared library and GDB
- Next by thread: Re: Regarding shared library and GDB
- Index(es):
Relevant Pages
|