From: Simon Marchi <simark@simark.ca>
To: Christina Schimpe <christina.schimpe@intel.com>,
gdb-patches@sourceware.org
Cc: eliz@gnu.org, blarsen@redhat.com
Subject: Re: [PATCH v3 1/1] gdb, breakpoint: add breakpoint location debugging logs
Date: Mon, 27 Mar 2023 10:47:13 -0400 [thread overview]
Message-ID: <a3cd9915-afa6-f073-7f42-f270d6ba0a41@simark.ca> (raw)
In-Reply-To: <20230327091235.521536-2-christina.schimpe@intel.com>
> @@ -3908,6 +3951,13 @@ detach_breakpoints (ptid_t ptid)
> static int
> remove_breakpoint_1 (struct bp_location *bl, enum remove_bp_reason reason)
> {
> + breakpoint_debug_printf ("bp_location (%s) due to %s at address %s %s",
> + host_address_to_string (bl),
> + (reason == REMOVE_BREAKPOINT
> + ? "regular remove" : "detach"),
Another little nit: for consistency, let's add a remove_bp_reason_str
function to convert an enum remove_bp_reason to a string (same as you
did for ugll_insert_mode). This way we'll get an assertion failure if
we add a new enumerator and for got to handle it in the switch.
And for all functions of this kind, I would be tempted to use
DIAGNOSTIC_ERROR_SWITCH, like we have in the target_waitkind_str), so
that compilers that support it can warn if we miss an enumerator in the
switch.
Simon
next prev parent reply other threads:[~2023-03-27 14:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 9:12 [PATCH v3 0/1] Add " Christina Schimpe
2023-03-27 9:12 ` [PATCH v3 1/1] gdb, breakpoint: add " Christina Schimpe
2023-03-27 14:10 ` Andrew Burgess
2023-06-01 13:05 ` Schimpe, Christina
2023-03-27 14:47 ` Simon Marchi [this message]
2023-06-01 13:11 ` Schimpe, Christina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a3cd9915-afa6-f073-7f42-f270d6ba0a41@simark.ca \
--to=simark@simark.ca \
--cc=blarsen@redhat.com \
--cc=christina.schimpe@intel.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).