public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 1/2] Always show locations for breakpoints & show canonical location spec
Date: Thu, 26 May 2022 21:40:38 +0100	[thread overview]
Message-ID: <e851c1fd-f8a9-6179-db07-1e32d89130a4@palves.net> (raw)
In-Reply-To: <83k0a8nk5t.fsf@gnu.org>

On 2022-05-26 20:55, Eli Zaretskii wrote:
>> Date: Thu, 26 May 2022 20:29:50 +0100
>> Cc: gdb-patches@sourceware.org
>> From: Pedro Alves <pedro@palves.net>
>>
>> I documented all this in the Location Specifications section.  I'll send v4 in a bit.
>>
>> I did not go for "source locations", however.  I swear I am not trying to be
>> difficult...  The issue is that as I tried to describe things, "source location" read
>> awkwardly, and kind of a lie-ish.  Because, you can have usable resolved locations without
>> sources, even if they are incomplete.  It depends on command if they are usable.  Instead, I
>> noticed something.
>>
>> Here:
>>
>>   * List::                        Printing source lines
>>  -* Specify Location::            How to specify code locations
>>  +* Location Specifications::     How to specify code locations
>>                                                  ^^^^^^^^^^^^^^
>>
>> And note what the intro paragraph of that node currently says:
>>
>>   "Several GDB commands accept arguments that specify a location or locations of your program’s code."
>>
>> Clearly the arguments specify something, and that something is ... "locations of your program’s code."
>>
>> So I went with "code locations" instead.
> 
> I could agree with this, but note that you are contradicting yourself:
> "code" can and is sometimes interpreted as "machine code", and thus
> "code location" can be interpreted as "address", something you didn't
> want.  

I didn't want "address" specifically, because it is either incorrect or
misleading.  E.g., "info macro" doesn't work with addresses, but you had
suggested to say "address" for this one at some point.  I was also worried
with "addresses that match locspec", as it is sort of ambiguous with address
locations.  Breakpoints are set with the complete location coordinate, just
the address is not enough to identify the location properly, given inlining.
Explaining what "code location" means in the location specification chapter
and talking about locspecs resolved to addresses, works, but just plain
address doesn't.

> By contrast, "source location" is unequivocally a source-level
> concept, and reflects the fact that it refers to a certain line of
> source code in a certain file.  Moreover, it follows the example of
> that C++ page you yourself used as an argument.  Why now you deviate
> from all that is a mystery for me.

I pointed at the C++ page as an argument for the word "location", which
you so strongly wanted to replace by something else, like "place" or "address"
or some other unknown term.  I had never understood that you would be fine with
a qualifier on top of location.  I wish I had known earlier.  

It's great we managed to meet in the middle somewhere.

> 
> But if you don't care about all these inconsistencies, "code location"
> is fine with me, as it qualifies the overly-general "location" enough
> to solve the potential ambiguity, which was what bothered me.

Great, let's go with it.

> 
>> Anyhow, you'll see in v4 in a bit.
>>
>> I hope you will be happy with this one.
> 
> Thanks.

Looking forward for a review.

  reply	other threads:[~2022-05-26 20:40 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 21:55 [PATCH 0/2] info breakpoints improvements Pedro Alves
2022-05-19 21:55 ` [PATCH 1/2] Always show locations for breakpoints & show canonical location spec Pedro Alves
2022-05-20  6:45   ` Eli Zaretskii
2022-05-23 17:04     ` [PATCH v2 " Pedro Alves
2022-05-24 13:06       ` Eli Zaretskii
2022-05-25 19:32         ` Pedro Alves
2022-05-26 12:48           ` Eli Zaretskii
2022-05-26 14:04             ` Pedro Alves
2022-05-26 15:03               ` Eli Zaretskii
2022-05-26 15:10                 ` Pedro Alves
2022-05-26 15:33                   ` Eli Zaretskii
2022-05-26 19:29                 ` Pedro Alves
2022-05-26 19:55                   ` Eli Zaretskii
2022-05-26 20:40                     ` Pedro Alves [this message]
2023-04-10 15:07                   ` Andrew Burgess
2022-05-20  7:45   ` [PATCH " Metzger, Markus T
2022-05-23 17:05     ` Lancelot SIX
2022-05-19 21:55 ` [PATCH 2/2] Introduce "info breakpoints -hide-locations" Pedro Alves
2022-05-20  6:48   ` Eli Zaretskii
2022-05-20  5:57 ` [PATCH 0/2] info breakpoints improvements Eli Zaretskii
2022-05-23 17:06   ` Pedro Alves
2022-05-24 13:14     ` Eli Zaretskii
2022-05-24 13:45       ` Pedro Alves
2022-05-24  8:38 ` Luis Machado
2022-05-24 10:02   ` Pedro Alves
2022-05-24 13:20     ` Eli Zaretskii
2022-05-24 13:29       ` Pedro Alves
2022-05-24 13:43         ` Eli Zaretskii
2022-05-24 13:50           ` Pedro Alves
2022-05-24 14:03             ` Eli Zaretskii
2022-05-24 14:09               ` Pedro Alves
2022-05-24 14:25                 ` Eli Zaretskii
2022-05-24 14:33                   ` Pedro Alves
2022-05-24 14:11               ` Andreas Schwab
2022-05-24 14:17                 ` Pedro Alves
2022-05-24 19:49                   ` [PATCH] Show enabled locations with disabled breakpoint parent as "y-" (Re: [PATCH 0/2] info breakpoints improvements) Pedro Alves
2022-05-25 13:57                     ` Eli Zaretskii
2022-05-25 19:19                       ` Pedro Alves
2022-05-24 14:26                 ` [PATCH 0/2] info breakpoints improvements 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=e851c1fd-f8a9-6179-db07-1e32d89130a4@palves.net \
    --to=pedro@palves.net \
    --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).