This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/9 v7] Introduce show_debug_regs
- From: Pedro Alves <palves at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Doug Evans <dje at google dot com>
- Date: Wed, 10 Sep 2014 11:09:43 +0100
- Subject: Re: [PATCH 1/9 v7] Introduce show_debug_regs
- Authentication-results: sourceware.org; auth=none
- References: <1409320299-6812-1-git-send-email-gbenson at redhat dot com> <1409320299-6812-2-git-send-email-gbenson at redhat dot com>
On 08/29/2014 02:51 PM, Gary Benson wrote:
> - if (debug_hw_points)
> + if (show_debug_regs)
> fprintf_unfiltered
> (gdb_stdlog,
> "insert_hw_breakpoint on entry (addr=0x%08lx, len=%d))\n",
> @@ -1208,7 +1204,7 @@ aarch64_linux_insert_hw_breakpoint (struct target_ops *self,
>
> ret = aarch64_handle_breakpoint (type, addr, len, 1 /* is_insert */);
>
> - if (debug_hw_points > 1)
> + if (show_debug_regs)
> {
Please mention this change (and others like it, afaics, only in the
Aarch64 port) in the commit log. This is changing behavior, but we're
left with no clue on whether it was investigated and decided the change
is desirable. The previous intention seems to
be to only show the debug output if a higher verbosity level was shown.
Like e.g., "maint set show-debug-regs 2". But, Aarch64's
"maint set show-debug-regs" command is registered as a boolean command,
so there is actually no way currently AFAICS for debug_hw_points to
end up '> 1'. So that was actually dead code, and this change makes it
undead. That is fine with me, and this is just debug code, and we can
always remove it if it ends up too verbose. Doug was also OK with the
patch, so go ahead and push with the commit log adjusted.
Thanks,
Pedro Alves