[PATCH] Teach "info breakpoints" to show the address of a -location watchpoint

Pedro Alves palves@redhat.com
Tue Mar 29 19:40:00 GMT 2016


On 03/26/2016 05:34 PM, Patrick Palka wrote:
> Currently the "info breakpoints" command leaves empty the Address column
> corresponding to a -location watchpoint, even though there is an address
> internally tied to this watchpoint.  Instead of printing nothing, this
> patch makes the type and the computed address of the -location
> watchpoint get printed.  Conviently the exp_string_reparse already has a
> pretty-printed string that contains this information.
> 
> The new output of "info breakpoints" looks something like:
> 
> Num     Type           Disp Enb Address            What
> 2       hw watchpoint  keep y   (tree_code *) 0x00007ffff7ff4990 -location decl.base.code
> 

Hmm, isn't this going to look more awkward the longer the type name is?
Do we include C++ namespaces in there as well?  Usually, the column
that has variable width is the last one.

If you're looking for the width of the watched range, a shorter alternative
would be to not print the type, but instead use ADDR:LEN notation, like:

Num     Type           Disp Enb Address            What
2       hw watchpoint  keep y   0x00007ffff7ff4990:4 -location decl.base.code

WDYT?

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list