Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] [DSF-GDB] Pending breakpoint support

On Thursday 26 August 2010 23:28:07 Marc Khouzam wrote:

> > -----Original Message-----
> > From: cdt-dev-bounces@xxxxxxxxxxx 
> > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Mikhail Khodjaiants
> > Sent: Friday, August 20, 2010 2:50 PM
> > To: cdt-dev@xxxxxxxxxxx
> > Subject: Re: [cdt-dev] [DSF-GDB] Pending breakpoint support
> > 
> > 
> >   On 20/08/2010 2:37 PM, Marc Khouzam wrote:
> > >> -----Original Message-----
> > >> From: cdt-dev-bounces@xxxxxxxxxxx
> > >> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Alena Laskavaia
> > >> Sent: Friday, August 20, 2010 2:32 PM
> > >> To: CDT General developers list.
> > >> Subject: Re: [cdt-dev] [DSF-GDB] Pending breakpoint support
> > >>
> > >> How this is intended to work in DSF. I.e. if user has to 
> > debug shared
> > >> lirbary (i.e. put breakpoint in it),
> > >> how to do it right now?
> > > I think the user would need to set the breakpoint in the library
> > > _after_ is has been loaded.
> > >
> > > I think the first step would be to fix
> > > http://bugs.eclipse.org/309704 DSF-GDB lacks ability to 
> > stop on load library events
> > >
> > > then the user could easily set the bp after the lib is loaded.
> > > I have already attached the fix to the bug, if someone can 
> > confirm it works ok,
> > > I'll commit it.
> > >
> > > Thanks
> > >
> > > Marc
> > >
> > 
> > Marc,
> > 
> > Vladimir and I are currently working on this issue. The idea 
> > is to add 
> > new breakpoint notifications to GDB. All breakpoints will be set as 
> > pending. When a breakpoint is installed on target GDB will fire a 
> > notification which will allow us to change the breakpoint's 
> > marker. It's 
> > a work in progress on early stages.
> 
> FYI, I just saw that with GDB 6.7 there is such a CLI notification.
> It no longer appears with 6.8.
> 
> > gdb.6.7 a.out
> GNU gdb 6.7
> (gdb)  b mydll.c:2
> No source file named mydll.c.
> Make breakpoint pending on future shared library load? (y or [n]) y
> Breakpoint 1 (mydll.c:2) pending.
> (gdb) r
> Starting program: /local/lmckhou/testing/a.out 
> Breakpoint 2 at 0xb7f4f48f: file mydll.c, line 2.
> Pending breakpoint "mydll.c:2" resolved       <-------------------------

In 6.7, a breakpoint can either have 0 associated addresses (=pending breakpoint)
or 1 (non-pending breakpoint) and the above message is printed when a breakpoint
switches from 0 to 1 location. In 6.8, a breakpoint can have arbitrary number
of associated addresses; there's no notification when the number of locations
changes.

I have a patch that adds MI notification for this case, Mikhail is about to
look into adding DSF support for it. 

On a related note -- is CDT/DSF capable of represending breakpoints with
multiple locations?

Thanks,

-- 
Vladimir Prus
CodeSourcery
vladimir@xxxxxxxxxxxxxxxx
(650) 331-3385 x722


Back to the top