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: RFA: implement "watch -location"


On 11/08/10 23:04, Tom Tromey wrote:
> This patch steals an idea from Apple's gdb fork, namely "watch -location".
> I wrote this from scratch but in the end it looks pretty similar to what
> they did.
> 
> In my experience, I generally don't want gdb's scope-tracking logic for
> watchpoint expressions.  Instead, I'm usually just interested in some
> bit of memory.  I find myself typing this a lot:
> 
> print &expr
> watch *$
> 
> This patch adds an option to "watch" to let me do this more directly.
> (FWIW, this is a frequently-asked question on #gdb.)
> 
> I did not add an MI option for this (something Apple did do).
> It didn't seem necessary to me.
> 
> I also didn't add Python API for this.  I'm on the fence about whether
> it is needed.


Nice patch!

I guess we could get around it by massaging the data in Python before
passing it as an expression to the Breakpoint API.  It would be nice,
however, to maintain parity with the command line.  I'm on the fence
too, but if you don't implement it I probably will (eventually).

Cheers,

Phil



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