Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* break points for shared libs
@ 2006-12-07 12:40 Anitha Boyapati
  2006-12-07 14:36 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Anitha Boyapati @ 2006-12-07 12:40 UTC (permalink / raw)
  To: gdb



Hi,


 I want to set breakpoints in shared lib sources while executing another 
 program.But the symbol is being overridden whenever I use 
 
 file test.so

 Please let me know if there is a way to set breakpoints in shared library 
 sources while debugging an application which uses this.
--------------------------------------------------------------------

warning: shared library handler failed to enable breakpoint

is the warning I got!

-- 
Regards,
Anitha B.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: break points for shared libs
  2006-12-07 12:40 break points for shared libs Anitha Boyapati
@ 2006-12-07 14:36 ` Daniel Jacobowitz
  2006-12-07 14:47   ` Anitha Boyapati
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-12-07 14:36 UTC (permalink / raw)
  To: Anitha Boyapati; +Cc: gdb

On Thu, Dec 07, 2006 at 05:34:29PM +0530, Anitha Boyapati wrote:
>  I want to set breakpoints in shared lib sources while executing another 
>  program.But the symbol is being overridden whenever I use 
>  
>  file test.so

Don't use file.  It needs to be automatic or it won't work at all.

> warning: shared library handler failed to enable breakpoint

This is the problem.  You didn't say what platform you're debugging,
how you're running GDB, or anything else - one of those is to blame.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: break points for shared libs
  2006-12-07 14:36 ` Daniel Jacobowitz
@ 2006-12-07 14:47   ` Anitha Boyapati
  2006-12-07 15:03     ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Anitha Boyapati @ 2006-12-07 14:47 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

On Thu, 7 Dec 2006, Daniel Jacobowitz wrote:

> On Thu, Dec 07, 2006 at 05:34:29PM +0530, Anitha Boyapati wrote:
> >  I want to set breakpoints in shared lib sources while executing another 
> >  program.But the symbol is being overridden whenever I use 
> >  
> >  file test.so
> 
> Don't use file.  It needs to be automatic or it won't work at all.
> 
> > warning: shared library handler failed to enable breakpoint
> 
> This is the problem.  You didn't say what platform you're debugging,
> how you're running GDB, or anything else - one of those is to blame.
 
 Sorry!
 gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
 This GDB was configured as "i386-redhat-linux-gnu".
 
 

> 
> 

-- 
Regards,
Anitha B,
Sankhya Technologies Private Limited.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: break points for shared libs
  2006-12-07 14:47   ` Anitha Boyapati
@ 2006-12-07 15:03     ` Daniel Jacobowitz
  2006-12-09  6:34       ` Anitha Boyapati
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-12-07 15:03 UTC (permalink / raw)
  To: Anitha Boyapati; +Cc: gdb

On Thu, Dec 07, 2006 at 07:40:03PM +0530, Anitha Boyapati wrote:
> On Thu, 7 Dec 2006, Daniel Jacobowitz wrote:
> 
> > On Thu, Dec 07, 2006 at 05:34:29PM +0530, Anitha Boyapati wrote:
> > >  I want to set breakpoints in shared lib sources while executing another 
> > >  program.But the symbol is being overridden whenever I use 
> > >  
> > >  file test.so
> > 
> > Don't use file.  It needs to be automatic or it won't work at all.
> > 
> > > warning: shared library handler failed to enable breakpoint
> > 
> > This is the problem.  You didn't say what platform you're debugging,
> > how you're running GDB, or anything else - one of those is to blame.
>  
>  Sorry!
>  gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
>  This GDB was configured as "i386-redhat-linux-gnu".

What system are you running GDB on?

How are you running GDB?

Please send a transcript of a session which demonstrates the warning.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: break points for shared libs
  2006-12-07 15:03     ` Daniel Jacobowitz
@ 2006-12-09  6:34       ` Anitha Boyapati
  2006-12-09 15:14         ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Anitha Boyapati @ 2006-12-09  6:34 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb


Hi,

On Thu, 7 Dec 2006, Daniel Jacobowitz wrote:

> On Thu, Dec 07, 2006 at 07:40:03PM +0530, Anitha Boyapati wrote:
> > On Thu, 7 Dec 2006, Daniel Jacobowitz wrote:
> > 
> > > On Thu, Dec 07, 2006 at 05:34:29PM +0530, Anitha Boyapati wrote:
> > > >  I want to set breakpoints in shared lib sources while executing another 
> > > >  program.But the symbol is being overridden whenever I use 
> > > >  
> > > >  file test.so
> > > 
> > > Don't use file.  It needs to be automatic or it won't work at all.
> > > 
> > > > warning: shared library handler failed to enable breakpoint
> > > 
> > > This is the problem.  You didn't say what platform you're debugging,
> > > how you're running GDB, or anything else - one of those is to blame.
> >  
> >  Sorry!
> >  gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
> >  This GDB was configured as "i386-redhat-linux-gnu".
> 
> What system are you running GDB on?
> 
> How are you running GDB?
> 
> Please send a transcript of a session which demonstrates the warning.
> 

 Here is the sequence :

------------------------------------------------------------
 (gdb) b child.cc:4
No symbol table is loaded.  Use the "file" command.
(gdb) file libmem.so
Reading symbols from libmem.so...done.
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) b child.cc:4
Breakpoint 1 at 0xdf8: file child.cc, line 4.
(gdb) run
Starting program: 
/root/libmem.so
Breakpoint 1 at 0x80000df8: file child.cc, line 4.
warning: shared library handler failed to enable breakpoint
-----------------------------------------------------------------

Actually my requirement is to make breakpoints work in a shared library
while debugging another application which uses the above shared library.

The child.cc is the source file for libmem.so
 (g++ -g -shared -o libmem.so child.cc)

Please let me know how can i do this.
  

 

-- 
Regards,
Anitha B,
Sankhya Technologies Private Limited.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: break points for shared libs
  2006-12-09  6:34       ` Anitha Boyapati
@ 2006-12-09 15:14         ` Daniel Jacobowitz
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-12-09 15:14 UTC (permalink / raw)
  To: Anitha Boyapati; +Cc: gdb

On Sat, Dec 09, 2006 at 11:26:11AM +0530, Anitha Boyapati wrote:
> Actually my requirement is to make breakpoints work in a shared library
> while debugging another application which uses the above shared library.
> 
> The child.cc is the source file for libmem.so
>  (g++ -g -shared -o libmem.so child.cc)
> 
> Please let me know how can i do this.

You should not have to do anything.  Don't mention the shared library
explicitly to GDB - it doesn't need that.  Just load the real
application that you want to debug and run it.  You should be able to
set a breakpoint in the shared library.

If you are using an old version of GDB, upgrade to the latest release.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-09 15:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-07 12:40 break points for shared libs Anitha Boyapati
2006-12-07 14:36 ` Daniel Jacobowitz
2006-12-07 14:47   ` Anitha Boyapati
2006-12-07 15:03     ` Daniel Jacobowitz
2006-12-09  6:34       ` Anitha Boyapati
2006-12-09 15:14         ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox