This is the mail archive of the gdb-patches@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: [PATCH 0/2] Support the new PPC476 processor


> From: Thiago Jung Bauermann <bauerman@br.ibm.com>
> Date: Wed, 30 Dec 2009 01:12:13 -0200
> Cc: luisgpm@linux.vnet.ibm.com, tyrlik@us.ibm.com
> 
> > >     - Available GDB commands: [r|a]watch <variable> (rwatch/awatch/watch)
> > > or [r|a]watch <variable> if <variable> == <4-bytes unsigned constant>
> > >
> > >     - Usage example: awatch i / rwatch *0xbffff8e8 / watch i if i == 28
> > 
> > Will GDB decide automatically whether to use hardware-accelerated
> > conditions or the current implementation, whereby an unconditional
> > hardware watchpoint is set, and when it breaks, GDB itself evaluates
> > the condition?  I think this should be done automatically.
> 
> Yes, GDB will use hardware-accelerated conditions automatically, when 
> available on the target.

That's good to hear, thanks.

> watch-range addr, +len

What would be the use-case for watching a range of addresses that is
not an integral multiple of a variable's size?

> > >     - Available GDB commands: hbreak-range <address1>:<address2 |
> > > +<unsigned int length>> where <address1> <= <address2> / hbreak-range
> > > <line number start>:<line number end>
> > >
> > >     - Usage example: hbreak-range 0x10000658,0x10000660 / hbreak-range
> > > 0x10000658,+8 / hbreak-range 20,30
> > 
> > Again, what are the use-cases where such breakpoints would be useful?
>  
> They don't seem to be useful for C-level debugging, but can be for assembly-
> level debugging. For instance, if you have a block of code that has more than 
> one entrypoint and therefore you don't know where it will get jumped into, you 
> can put a ranged breakpoint to cover the entire block.

Thanks for the explanations.  I think we should emulate this on
architectures that don't have this in hardware (it doesn't sound
hard).


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