Re: Regarding shared library and GDB
- From: sunil <sunil.vvn@xxxxxxxxx>
- Date: Fri, 02 Nov 2007 04:14:55 -0700
On Sep 28, 12:16 pm, Andrei Voropaev <avo...@xxxxxxx> wrote:
On 2007-09-27, sunil <sunil....@xxxxxxxxx> wrote:
[...]On Sep 27, 11:03 am, sunil <sunil....@xxxxxxxxx> wrote:
Am interested to debug one shared library using GDB.This shared
libarry is used by a binary (for which i doesn't have the code).I am
yes I compiled the library properly.
My problem is unable to caught the library using gdb while application
executing the library.
Strange. Why can't you catch it? Start gdb with the program. Before
issuing "run" set break point in your library function. gdb will tell
you that it does not exist and ask if you want that to be a "pending"
break point. Answer "yes". Now issue "run" comman. When the library is
loaded, gdb will try to find the specified function in it and set the
break point for you there.
--
Minds, like parachutes, function best when open
Hi,
Thanks for your replies, Now am able to set the break point in my
library and facing a different problem.
I will explain my scenario one more time.
Am trying to debug a shared library which is built by me.Thsi one is
used by one application for which I doesn't have the code. I know when
this library will be called after starting the application(by giving a
call from the clien to that server my .so will be called) at the
samtime am not fully aware about the input parameters for the
application to start.(Generally this apllication will be called from
shell scripts).Thats the reason I am vebugging the running process by
taking the pid.
After starting the gdb using PID of that running process ,I can find
my library in the loaded shared library list.Even I can set the
breakpoint for the functions of my shared library. After calling my
shared library using the client the program,the gdb is able to stop
the execution at the break point. But the problem is even after
pressing the list or next command of gdb it is throwing the errors as
below
======================================
(gdb) b CCAAuthentication
Breakpoint 1 at 0xfcfe55f8
(gdb) b xauthn_initialize
Breakpoint 2 at 0xfcfe32a0
(gdb) c
Continuing.
[LWP 17 exited]
[LWP 16 exited]
[New LWP 517 ]
[New Thread 517 (LWP 517)]
[Switching to Thread 517 (LWP 517)]
Breakpoint 2, 0xfcfe32a0 in xauthn_initialize () from /idam/CDAS/
libcode/libxauthn.so
(gdb) ls
Undefined command: "ls". Try "help".
(gdb) l
1 ./libgcc2.c: No such file or directory.
in ./libgcc2.c
(gdb) n
Single stepping until exit from function xauthn_initialize,
which has no line number information.
0xfcfe61d8 in __1cNpdxauthn_init6FpnKpam_handle_iippkc_L_ () from /
idam/CDAS/libcode/libxauthn.so
(gdb)
Single stepping until exit from function
__1cNpdxauthn_init6FpnKpam_handle_iippkc_L_,
which has no line number information.
0xfcfe6138 in __1cRcheck_initialized6FpnKpam_handle_iippkc_L_ () from /
idam/CDAS/libcode/libxauthn.so
(gdb)
Single stepping until exit from function
__1cRcheck_initialized6FpnKpam_handle_iippkc_L_,
which has no line number information.
0xfcfe624c in pam_sm_authenticate () from /idam/CDAS/libcode/
libxauthn.so
(gdb)
===================================================
Even i set the path to my code using the DIR command of gdb.
If anybody knows about this error please let me know.
Regards
Sunil
.
- Follow-Ups:
- Re: Regarding shared library and GDB
- From: Andrei Voropaev
- Re: Regarding shared library and GDB
- From: Paul Pluzhnikov
- Re: Regarding shared library and GDB
- Next by Date: Re: Regarding shared library and GDB
- Next by thread: Re: Regarding shared library and GDB
- Index(es):
Relevant Pages
|
|