Operating System - HP-UX
1833792 Members
2161 Online
110063 Solutions
New Discussion

Re: wdb debugging shared libraries

 
NeerajBhatia_1
Occasional Contributor

wdb debugging shared libraries

I am trying to step-in into a routine that is part of a shared library.

I found a note related to "privately mapping shared libraries" using

pxdb -s on executable-name

before debugging session.

It is not working for me.

Any help?

2 REPLIES 2
Rick Beldin
HPE Pro

Re: wdb debugging shared libraries

You don't mention what kinds of errors you are getting.

I generally use the pxdb command when I want to attach to a process that is already running. If I have built program A then I do a pxdb -s on A. I can then run A, and while it is running do: gdb A and gdb will attach that process and I can debug the shared libraries within that process.

Things that have kept me from doing this are:

- main programs not compiled -g
- shared libraries not compiled -g
- stripped libraries and binaries
- libraries that are shl_loaded'
Necessary questions: Why? What? How? When?
NeerajBhatia_1
Occasional Contributor

Re: wdb debugging shared libraries

Hi Rick,

There is no error. The debugger (wdb) does not allow me to step into the shared library routine. I've tried it with gdb with the same results.

My method was little different. I used

pxdb -s on executable-name

before using the debugger for the executable.

To my knowledge, the code is compiled with -g option and not stripped. I'd double-check today.

What do you mean by shl_loaded?

Thanks for your reply.

Neeraj