public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: "Schimpe, Christina" <christina.schimpe@intel.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: "eliz@gnu.org" <eliz@gnu.org>, "simark@simark.ca" <simark@simark.ca>
Subject: RE: [PATCH v4 1/1] gdb, breakpoint: add breakpoint location debugging logs
Date: Wed, 07 Jun 2023 15:37:20 +0100	[thread overview]
Message-ID: <87h6rj1gpr.fsf@redhat.com> (raw)
In-Reply-To: <CY4PR11MB20054E4F5C97DB8A3D7B9D8CF953A@CY4PR11MB2005.namprd11.prod.outlook.com>

"Schimpe, Christina" <christina.schimpe@intel.com> writes:

> 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));

Yes.  For me a location would either be something like '1.1' or maybe
just '1' if (given context) it is obvious we're talking about breakpoint
#1, thus 1.1 would be implied.

Or a location could be an address within the inferior for where the
location has been placed -- which is what I would naturally assume if I
saw an address labelled as a location.

There's also a benefit for removing extra text that the debug message
have more chance of fitting on the terminal without wrapping too much!

Thanks,
Andrew

>
> 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


  reply	other threads:[~2023-06-07 14:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 16:33 [PATCH v4 0/1] Add " Christina Schimpe
2023-06-01 16:33 ` [PATCH v4 1/1] gdb, breakpoint: add " Christina Schimpe
2023-06-07  8:45   ` Andrew Burgess
2023-06-07 12:20     ` Schimpe, Christina
2023-06-07 14:37       ` Andrew Burgess [this message]
2023-06-07 12:38     ` Eli Zaretskii
2023-06-07 14:40       ` Andrew Burgess
2023-06-07 15:28         ` Schimpe, Christina
2023-06-07 15:32         ` Eli Zaretskii

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=87h6rj1gpr.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=christina.schimpe@intel.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /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).