This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Teach "info breakpoints" to show the address of a -location watchpoint
- From: Pedro Alves <palves at redhat dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>, gdb-patches at sourceware dot org
- Date: Tue, 29 Mar 2016 20:40:45 +0100
- Subject: Re: [PATCH] Teach "info breakpoints" to show the address of a -location watchpoint
- Authentication-results: sourceware.org; auth=none
- References: <1459013683-30018-1-git-send-email-patrick at parcs dot ath dot cx>
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