RE: [PATCH v4 1/1] gdb, breakpoint: add breakpoint location debugging logs

Schimpe, Christina via Gdb-patches
2023-06-07T12:20:42Z

Hi Andrew,

Thanks a lot for your review.
I only have one small question, else I agree with all of your feedback.

> > +
> > +static std::string
> > +breakpoint_location_address_str (const bp_location* bl) {
> > + std::string str = string_printf ("Breakpoint %d, location (%s) at address %s",
> > + bl->owner->number,
> > + host_address_to_string (bl),
> > + paddress (bl->gdbarch, bl->address));
>
> I can't help but think using 'location' in this string is a bad idea, 'location' already
> has a meaning for GDB breakpoints. How about just dropping the work
> 'location'?

Just to be sure that I understand correctly - do you suggest dropping the word 'location' in string_printf as follows:

static std::string
breakpoint_location_address_str (const bp_location* bl) {
std::string str = string_printf ("Breakpoint %d (%s) at address %s",
bl->owner->number,
host_address_to_string (bl),
paddress (bl->gdbarch, bl->address));

This would be fine for me.

Best Regards,
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