(hardware) watchpoints and actions

taylor, david david.taylor@emc.com
Wed Nov 11 18:01:00 GMT 2015

For instructions, GDB has breakpoints and tracepoints.  For data, GDB has
watchpoints.  It would be nice if there was a data equivalent of tracepoints.
There is processor support for a limited number of small locations to be watched.
The goal is to run at full speed until a watched location is accessed in some
prescribed manner.  At that time, like a tracepoint, execute some actions to
collect information and then continue at full speed.

It's sort of like a hardware watchpoint with actions attached.  For lack of a better
name, we call them 'data tracepoints'.

The current implementation is somewhat of a kludge and done without any GDB
modifications.  The GUI checks whether the address given for the tracepoint is a
code address or a data address.  For instructions, it does what it has always done,
for data, it does some kludges to avoid getting an error from GDB and also 'overloads'
some tracepoint fields.

I'd like for it to be a part of GDB and also to avoid the kludges.

Two questions immediately come to mind:

. what should the GDB user interface be?

. what should the remote protocol messages be?

Opinions?  Thoughts?

More information about the Gdb mailing list