* [PATCH v3 0/1] Add breakpoint location debugging logs
@ 2023-03-27 9:12 Christina Schimpe
2023-03-27 9:12 ` [PATCH v3 1/1] gdb, breakpoint: add " Christina Schimpe
0 siblings, 1 reply; 6+ messages in thread
From: Christina Schimpe @ 2023-03-27 9:12 UTC (permalink / raw)
To: gdb-patches; +Cc: eliz, blarsen, simark
Hi all,
this is my v3 for the patch "gdb, breakpoint: add breakpoint location debugging
logs", which addresses the feedback of Simon.
The documentation part has been approved by Eli.
V2 of this patch can be found here:
https://sourceware.org/pipermail/gdb-patches/2023-March/197899.html
Changes since V2:
* Comments
* Logging output
Regards,
Christina
Mihails Strasuns (1):
gdb, breakpoint: add breakpoint location debugging logs
gdb/NEWS | 4 +++
gdb/breakpoint.c | 73 +++++++++++++++++++++++++++++++++++++++++++++
gdb/doc/gdb.texinfo | 8 +++++
3 files changed, 85 insertions(+)
--
2.25.1
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/1] gdb, breakpoint: add breakpoint location debugging logs
2023-03-27 9:12 [PATCH v3 0/1] Add breakpoint location debugging logs Christina Schimpe
@ 2023-03-27 9:12 ` Christina Schimpe
2023-03-27 14:10 ` Andrew Burgess
2023-03-27 14:47 ` Simon Marchi
0 siblings, 2 replies; 6+ messages in thread
From: Christina Schimpe @ 2023-03-27 9:12 UTC (permalink / raw)
To: gdb-patches; +Cc: eliz, blarsen, simark, Christina Schimpe
From: Mihails Strasuns <mihails.strasuns@intel.com>
Add new commands:
set debug breakpoints on|off
show debug breakpoints
This patch introduces new debugging information that prints
breakpoint location insertion and removal flow.
The debug output looks like:
~~~
(gdb) set debug breakpoints on
(gdb) disassemble main
Dump of assembler code for function main:
0x0000555555555129 <+0>: endbr64
0x000055555555512d <+4>: push %rbp
0x000055555555512e <+5>: mov %rsp,%rbp
=> 0x0000555555555131 <+8>: mov $0x0,%eax
0x0000555555555136 <+13>: pop %rbp
0x0000555555555137 <+14>: ret
End of assembler dump.
(gdb) break *0x0000555555555137
Breakpoint 2 at 0x555555555137: file main.c, line 4.
[breakpoints] update_global_location_list: insert_mode = UGLL_MAY_INSERT
(gdb) c
Continuing.
[breakpoints] update_global_location_list: insert_mode = UGLL_INSERT
[breakpoints] insert_bp_location: bp_location (0x55d3881c1e20) at address 0x555555555137 in main at main.c:4
[breakpoints] insert_bp_location: bp_location (0x55d38827d670) at address 0x7ffff7fd37b5
[breakpoints] insert_bp_location: bp_location (0x55d388295880) at address 0x7ffff7fe509e
[breakpoints] insert_bp_location: bp_location (0x55d388295e00) at address 0x7ffff7fe63f4
[breakpoints] remove_breakpoint_1: bp_location (0x55d3881c1e20) due to regular remove at address 0x555555555137 in main at main.c:4
[breakpoints] remove_breakpoint_1: bp_location (0x55d38827d670) due to regular remove at address 0x7ffff7fd37b5
[breakpoints] remove_breakpoint_1: bp_location (0x55d388295880) due to regular remove at address 0x7ffff7fe509e
[breakpoints] remove_breakpoint_1: bp_location (0x55d388295e00) due to regular remove at address 0x7ffff7fe63f4
Breakpoint 2, 0x0000555555555137 in main () at main.c:4
4 }
~~~
Co-Authored-By: Christina Schimpe <christina.schimpe@intel.com>
---
gdb/NEWS | 4 +++
gdb/breakpoint.c | 73 +++++++++++++++++++++++++++++++++++++++++++++
gdb/doc/gdb.texinfo | 8 +++++
3 files changed, 85 insertions(+)
diff --git a/gdb/NEWS b/gdb/NEWS
index cc262f1f8a6..f413cd5aeb4 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,10 @@
*** Changes since GDB 13
+* set debug breakpoints on|off
+ show debug breakpoints
+ Print additional debug messages about breakpoint insertion and removal.
+
* Removed targets and native configurations
GDB no longer supports AIX 4.x, AIX 5.x and AIX 6.x. The minimum supported
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 7228acfd8fe..8db810fd465 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -163,6 +163,8 @@ static bool bl_address_is_meaningful (bp_location *loc);
static int find_loc_num_by_location (const bp_location *loc);
+static std::string breakpoint_location_to_buffer (bp_location *bl);
+
/* update_global_location_list's modes of operation wrt to whether to
insert locations now. */
enum ugll_insert_mode
@@ -198,6 +200,24 @@ enum ugll_insert_mode
UGLL_INSERT
};
+/* Return a textual version of INSERT_MODE. */
+
+static const char *
+ugll_insert_mode_text (ugll_insert_mode insert_mode)
+{
+ switch (insert_mode)
+ {
+ case UGLL_DONT_INSERT:
+ return "UGLL_DONT_INSERT";
+ case UGLL_MAY_INSERT:
+ return "UGLL_MAY_INSERT";
+ case UGLL_INSERT:
+ return "UGLL_INSERT";
+ }
+
+ gdb_assert_not_reached ("must handle all enum values");
+}
+
static void update_global_location_list (enum ugll_insert_mode);
static void update_global_location_list_nothrow (enum ugll_insert_mode);
@@ -508,6 +528,22 @@ show_always_inserted_mode (struct ui_file *file, int from_tty,
value);
}
+/* True if breakpoints debug output is enabled. */
+static bool debug_breakpoints = false;
+
+/* Print a "breakpoints" debug statement. */
+#define breakpoint_debug_printf(fmt, ...) \
+ debug_prefixed_printf_cond (debug_breakpoints, "breakpoints", fmt, \
+ ##__VA_ARGS__)
+
+/* "show debug breakpoints" implementation. */
+static void
+show_debug_breakpoints (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ gdb_printf (file, _("Breakpoint location debugging is %s.\n"), value);
+}
+
/* See breakpoint.h. */
int
@@ -2710,6 +2746,11 @@ insert_bp_location (struct bp_location *bl,
if (!should_be_inserted (bl) || (bl->inserted && !bl->needs_update))
return 0;
+ breakpoint_debug_printf ("bp_location (%s) at address %s %s",
+ host_address_to_string (bl),
+ paddress (bl->gdbarch, bl->address),
+ breakpoint_location_to_buffer (bl).c_str ());
+
/* Note we don't initialize bl->target_info, as that wipes out
the breakpoint location's shadow_contents if the breakpoint
is still inserted at that location. This in turn breaks
@@ -3264,6 +3305,8 @@ remove_breakpoints_inf (inferior *inf)
{
int val;
+ breakpoint_debug_printf ("inf->num = %d", inf->num);
+
for (bp_location *bl : all_bp_locations ())
{
if (bl->pspace != inf->pspace)
@@ -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"),
+ paddress (bl->gdbarch, bl->address),
+ breakpoint_location_to_buffer (bl).c_str ());
+
int val;
/* BL is never in moribund_locations by our callers. */
@@ -6210,6 +6260,17 @@ print_breakpoint_location (const breakpoint *b,
}
}
+/* Return the output of the print_breakpoint_location BL as a string. */
+static std::string
+breakpoint_location_to_buffer (bp_location *bl)
+{
+ string_file stb;
+ current_uiout->redirect (&stb);
+ print_breakpoint_location (bl->owner, bl);
+ current_uiout->redirect (nullptr);
+ return stb.string ();
+}
+
static const char *
bptype_string (enum bptype type)
{
@@ -11147,6 +11208,9 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
/* Last breakpoint location program space that was marked for update. */
int last_pspace_num = -1;
+ breakpoint_debug_printf ("insert_mode = %s",
+ ugll_insert_mode_text (insert_mode));
+
/* Used in the duplicates detection below. When iterating over all
bp_locations, points to the first bp_location of a given address.
Breakpoints and watchpoints of different types are never
@@ -14880,6 +14944,15 @@ when execution stops."),
&breakpoint_set_cmdlist,
&breakpoint_show_cmdlist);
+ add_setshow_boolean_cmd ("breakpoints", class_maintenance,
+ &debug_breakpoints, _("\
+Set breakpoint location debugging."), _("\
+Show breakpoint location debugging."), _("\
+When non-zero, breakpoint location specific debugging is enabled."),
+ NULL,
+ show_debug_breakpoints,
+ &setdebuglist, &showdebuglist);
+
add_setshow_enum_cmd ("condition-evaluation", class_breakpoint,
condition_evaluation_enums,
&condition_evaluation_mode_1, _("\
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 6c811b8be2e..04e77350da1 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -28315,6 +28315,14 @@ debugging info.
Turn on or off debugging messages for built-in XML parsers.
@item show debug xml
Displays the current state of XML debugging messages.
+
+@item set debug breakpoints
+@cindex breakpoint debugging info
+Turns on or off display of @value{GDBN} debugging info for breakpoint insertion
+and removal. The default is off.
+@item show debug breakpoints
+Displays the current state of displaying @value{GDBN} debugging info for
+breakpoint insertion and removal.
@end table
@node Other Misc Settings
--
2.25.1
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/1] gdb, breakpoint: add breakpoint location debugging logs
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
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Burgess @ 2023-03-27 14:10 UTC (permalink / raw)
To: Christina Schimpe via Gdb-patches, gdb-patches
Cc: eliz, blarsen, simark, Christina Schimpe
Christina Schimpe via Gdb-patches <gdb-patches@sourceware.org> writes:
> From: Mihails Strasuns <mihails.strasuns@intel.com>
>
> Add new commands:
>
> set debug breakpoints on|off
> show debug breakpoints
>
> This patch introduces new debugging information that prints
> breakpoint location insertion and removal flow.
>
> The debug output looks like:
> ~~~
> (gdb) set debug breakpoints on
> (gdb) disassemble main
> Dump of assembler code for function main:
> 0x0000555555555129 <+0>: endbr64
> 0x000055555555512d <+4>: push %rbp
> 0x000055555555512e <+5>: mov %rsp,%rbp
> => 0x0000555555555131 <+8>: mov $0x0,%eax
> 0x0000555555555136 <+13>: pop %rbp
> 0x0000555555555137 <+14>: ret
> End of assembler dump.
> (gdb) break *0x0000555555555137
> Breakpoint 2 at 0x555555555137: file main.c, line 4.
> [breakpoints] update_global_location_list: insert_mode = UGLL_MAY_INSERT
> (gdb) c
> Continuing.
> [breakpoints] update_global_location_list: insert_mode = UGLL_INSERT
> [breakpoints] insert_bp_location: bp_location (0x55d3881c1e20) at address 0x555555555137 in main at main.c:4
> [breakpoints] insert_bp_location: bp_location (0x55d38827d670) at address 0x7ffff7fd37b5
> [breakpoints] insert_bp_location: bp_location (0x55d388295880) at address 0x7ffff7fe509e
> [breakpoints] insert_bp_location: bp_location (0x55d388295e00) at address 0x7ffff7fe63f4
> [breakpoints] remove_breakpoint_1: bp_location (0x55d3881c1e20) due to regular remove at address 0x555555555137 in main at main.c:4
> [breakpoints] remove_breakpoint_1: bp_location (0x55d38827d670) due to regular remove at address 0x7ffff7fd37b5
> [breakpoints] remove_breakpoint_1: bp_location (0x55d388295880) due to regular remove at address 0x7ffff7fe509e
> [breakpoints] remove_breakpoint_1: bp_location (0x55d388295e00) due to regular remove at address 0x7ffff7fe63f4
>
> Breakpoint 2, 0x0000555555555137 in main () at main.c:4
> 4 }
> ~~~
>
> Co-Authored-By: Christina Schimpe <christina.schimpe@intel.com>
> ---
> gdb/NEWS | 4 +++
> gdb/breakpoint.c | 73 +++++++++++++++++++++++++++++++++++++++++++++
> gdb/doc/gdb.texinfo | 8 +++++
> 3 files changed, 85 insertions(+)
>
> diff --git a/gdb/NEWS b/gdb/NEWS
> index cc262f1f8a6..f413cd5aeb4 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -3,6 +3,10 @@
>
> *** Changes since GDB 13
>
> +* set debug breakpoints on|off
> + show debug breakpoints
> + Print additional debug messages about breakpoint insertion and removal.
> +
> * Removed targets and native configurations
>
> GDB no longer supports AIX 4.x, AIX 5.x and AIX 6.x. The minimum supported
> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index 7228acfd8fe..8db810fd465 100644
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -163,6 +163,8 @@ static bool bl_address_is_meaningful (bp_location *loc);
>
> static int find_loc_num_by_location (const bp_location *loc);
>
> +static std::string breakpoint_location_to_buffer (bp_location *bl);
> +
> /* update_global_location_list's modes of operation wrt to whether to
> insert locations now. */
> enum ugll_insert_mode
> @@ -198,6 +200,24 @@ enum ugll_insert_mode
> UGLL_INSERT
> };
>
> +/* Return a textual version of INSERT_MODE. */
> +
> +static const char *
> +ugll_insert_mode_text (ugll_insert_mode insert_mode)
> +{
> + switch (insert_mode)
> + {
> + case UGLL_DONT_INSERT:
> + return "UGLL_DONT_INSERT";
> + case UGLL_MAY_INSERT:
> + return "UGLL_MAY_INSERT";
> + case UGLL_INSERT:
> + return "UGLL_INSERT";
> + }
> +
> + gdb_assert_not_reached ("must handle all enum values");
> +}
> +
> static void update_global_location_list (enum ugll_insert_mode);
>
> static void update_global_location_list_nothrow (enum ugll_insert_mode);
> @@ -508,6 +528,22 @@ show_always_inserted_mode (struct ui_file *file, int from_tty,
> value);
> }
>
> +/* True if breakpoints debug output is enabled. */
> +static bool debug_breakpoints = false;
> +
> +/* Print a "breakpoints" debug statement. */
> +#define breakpoint_debug_printf(fmt, ...) \
> + debug_prefixed_printf_cond (debug_breakpoints, "breakpoints", fmt, \
> + ##__VA_ARGS__)
> +
> +/* "show debug breakpoints" implementation. */
> +static void
> +show_debug_breakpoints (struct ui_file *file, int from_tty,
> + struct cmd_list_element *c, const char *value)
> +{
> + gdb_printf (file, _("Breakpoint location debugging is %s.\n"), value);
> +}
> +
> /* See breakpoint.h. */
>
> int
> @@ -2710,6 +2746,11 @@ insert_bp_location (struct bp_location *bl,
> if (!should_be_inserted (bl) || (bl->inserted && !bl->needs_update))
> return 0;
>
> + breakpoint_debug_printf ("bp_location (%s) at address %s %s",
> + host_address_to_string (bl),
> + paddress (bl->gdbarch, bl->address),
> + breakpoint_location_to_buffer (bl).c_str ());
Here, and again later on, I think it might be nice to include the actual
number of the owning breakpoint, something like:
"Breakpoint %d, location (%s) at address %s ...."
this might make it easier to identify which breakpoint is being worked
on?
I wonder if it's worth having a small helper function to create this
whole thing in a std::string as it might be used in many breakpoint
related debug lines?
> +
> /* Note we don't initialize bl->target_info, as that wipes out
> the breakpoint location's shadow_contents if the breakpoint
> is still inserted at that location. This in turn breaks
> @@ -3264,6 +3305,8 @@ remove_breakpoints_inf (inferior *inf)
> {
> int val;
>
> + breakpoint_debug_printf ("inf->num = %d", inf->num);
> +
> for (bp_location *bl : all_bp_locations ())
> {
> if (bl->pspace != inf->pspace)
> @@ -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"),
> + paddress (bl->gdbarch, bl->address),
> + breakpoint_location_to_buffer (bl).c_str ());
> +
> int val;
>
> /* BL is never in moribund_locations by our callers. */
> @@ -6210,6 +6260,17 @@ print_breakpoint_location (const breakpoint *b,
> }
> }
>
> +/* Return the output of the print_breakpoint_location BL as a string. */
> +static std::string
> +breakpoint_location_to_buffer (bp_location *bl)
> +{
> + string_file stb;
> + current_uiout->redirect (&stb);
> + print_breakpoint_location (bl->owner, bl);
> + current_uiout->redirect (nullptr);
> + return stb.string ();
> +}
I think this would be better implemented as a "to_string" method on the
bp_location class.
Also, instead of calling ui_out::redirect directly, you should be using
ui_out_redirect_pop. See save_breakpoints for an example of this in
use.
> +
> static const char *
> bptype_string (enum bptype type)
> {
> @@ -11147,6 +11208,9 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
> /* Last breakpoint location program space that was marked for update. */
> int last_pspace_num = -1;
>
> + breakpoint_debug_printf ("insert_mode = %s",
> + ugll_insert_mode_text (insert_mode));
> +
> /* Used in the duplicates detection below. When iterating over all
> bp_locations, points to the first bp_location of a given address.
> Breakpoints and watchpoints of different types are never
> @@ -14880,6 +14944,15 @@ when execution stops."),
> &breakpoint_set_cmdlist,
> &breakpoint_show_cmdlist);
>
> + add_setshow_boolean_cmd ("breakpoints", class_maintenance,
> + &debug_breakpoints, _("\
> +Set breakpoint location debugging."), _("\
> +Show breakpoint location debugging."), _("\
> +When non-zero, breakpoint location specific debugging is enabled."),
s/non-zero/on/.
Thanks,
Andrew
> + NULL,
> + show_debug_breakpoints,
> + &setdebuglist, &showdebuglist);
> +
> add_setshow_enum_cmd ("condition-evaluation", class_breakpoint,
> condition_evaluation_enums,
> &condition_evaluation_mode_1, _("\
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index 6c811b8be2e..04e77350da1 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -28315,6 +28315,14 @@ debugging info.
> Turn on or off debugging messages for built-in XML parsers.
> @item show debug xml
> Displays the current state of XML debugging messages.
> +
> +@item set debug breakpoints
> +@cindex breakpoint debugging info
> +Turns on or off display of @value{GDBN} debugging info for breakpoint insertion
> +and removal. The default is off.
> +@item show debug breakpoints
> +Displays the current state of displaying @value{GDBN} debugging info for
> +breakpoint insertion and removal.
> @end table
>
> @node Other Misc Settings
> --
> 2.25.1
>
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
> Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/1] gdb, breakpoint: add breakpoint location debugging logs
2023-03-27 9:12 ` [PATCH v3 1/1] gdb, breakpoint: add " Christina Schimpe
2023-03-27 14:10 ` Andrew Burgess
@ 2023-03-27 14:47 ` Simon Marchi
2023-06-01 13:11 ` Schimpe, Christina
1 sibling, 1 reply; 6+ messages in thread
From: Simon Marchi @ 2023-03-27 14:47 UTC (permalink / raw)
To: Christina Schimpe, gdb-patches; +Cc: eliz, blarsen
> @@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v3 1/1] gdb, breakpoint: add breakpoint location debugging logs
2023-03-27 14:10 ` Andrew Burgess
@ 2023-06-01 13:05 ` Schimpe, Christina
0 siblings, 0 replies; 6+ messages in thread
From: Schimpe, Christina @ 2023-06-01 13:05 UTC (permalink / raw)
To: Andrew Burgess, Christina Schimpe via Gdb-patches, gdb-patches
Cc: eliz, blarsen, simark
Hi Andrew,
thanks a lot for your review and I am sorry for getting back to this so late.
I agree with all of your feedback and will post a v4 soon.
Christina
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v3 1/1] gdb, breakpoint: add breakpoint location debugging logs
2023-03-27 14:47 ` Simon Marchi
@ 2023-06-01 13:11 ` Schimpe, Christina
0 siblings, 0 replies; 6+ messages in thread
From: Schimpe, Christina @ 2023-06-01 13:11 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: eliz, blarsen
Hi Simon,
Thanks a lot for your review.
> 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.
Your comments make sense to me, I will post a v4 soon.
Christina
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-01 13:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 9:12 [PATCH v3 0/1] Add breakpoint location debugging logs 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
2023-06-01 13:11 ` Schimpe, Christina
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).