This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: breaking on open(2) on linux


On Monday 14 April 2008 01:38:03 Daniel Jacobowitz wrote:
> On Sun, Apr 13, 2008 at 08:55:55PM +1200, Nick Roberts wrote:
> > Do you mean multiple breakpoint locations?  With 6.8.50.20080411-cvs I just get
> > one address: the one in libpthread.so.
> 
> Indeed it does not seem to work:
> 
> #12 0x0000000000000000 in ?? ()
> (gdb) i func ^open$
> All functions matching regular expression "^open$":
> 
> Non-debugging symbols:
> 0x00002aaaaaabea70  open
> 0x00002aaaadc21a50  open
> 0x00002aaaadc21a50  open
> (gdb) b open
> Breakpoint 2 at 0x2aaaadc21a50
> (gdb) i breakpoints
> Num     Type           Disp Enb Address            What
> 1       breakpoint     del  y   <PENDING>          main
> 2       breakpoint     keep y   0x00002aaaadc21a50 <open>
> 
> Vladimir, can you see any reason this wouldn't work with multiple
> minimal symbols?  Maybe the multiple location support is entirely
> in the partial/full symbol and line number based breakpoint support?

The multiple location support only works if there line number information
for all locations.

We discussed this (maybe internally) -- the really right solution would
require modifying the symbol table interfacecs to allow to return several
symbols for a single name. It's hard.

- Volodya


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]