From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <pedro@palves.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v4] gdb/manual: Introduce location specs
Date: Fri, 27 May 2022 22:34:09 +0300 [thread overview]
Message-ID: <83k0a6n51q.fsf@gnu.org> (raw)
In-Reply-To: <dc405a11-36fb-4156-07c2-ecfcb82f52f0@palves.net> (message from Pedro Alves on Fri, 27 May 2022 20:17:21 +0100)
> Date: Fri, 27 May 2022 20:17:21 +0100
> Cc: gdb-patches@sourceware.org
> From: Pedro Alves <pedro@palves.net>
>
> >> You start with e.g., just one attribute, like "-function func". This
> >> makes GDB iterate over all the functions is knows about, finding the
> >> ones that are called "func". This matches "func(int)", "A::func()",
> >> "func(long)", etc. GDB collects the PC and source file and line number of
> >> those functions too along the wa. If you did "break -function func", then
> >> you end up with a breakpoint with multiple code locations, one
> >> for each function matched.
> >>
> >> Or you start with "a/file.c:100". This makes GDB iterate over all source
> >> files it knows about, and then for each that has a file name that ends
> >> with "a/file.c", like e.g., "src/program/a/file.c" and "somelib/a/file.c"
> >> it searches for line 100, collecting the PC and function name of the
> >> location. If you did "break a/file.c:100", you end up with a breakpoint with
> >> multiple locations, one per resolved location. If you did
> >> "list a/file.c:100", GDB lists the source for around each of the locations.
> >> Etc.
> >>
> >> Or you start with "*0x1000". Conceptually it's the same. GDB finds the code
> >> locations that match that, resolves that to a location with
> >> PC/function/source/line, and then the command does what it wants with it.
> >
> > Is this supposed to confirm my understanding, or to refute it? I
> > think it confirms it.
>
> I didn't understand what you meant by "attribute can be filled in
> more than one way", so I explained how it works. If you start with my example
> for "-function func" example from above, what does "attribute is filled in more
> than one way" mean in that example?
It means that each of the following attributes of code location can
have more than one value that satisfies the location spec:
. function prototype
. possibly file name
. line number
. code address
next prev parent reply other threads:[~2022-05-27 19:34 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 19:42 Pedro Alves
2022-05-27 14:16 ` Eli Zaretskii
2022-05-27 15:04 ` Pedro Alves
2022-05-27 15:52 ` Eli Zaretskii
2022-05-27 17:11 ` Pedro Alves
2022-05-27 17:31 ` Eli Zaretskii
2022-05-27 17:51 ` Pedro Alves
2022-05-27 18:23 ` Eli Zaretskii
2022-05-27 18:42 ` Pedro Alves
2022-05-27 18:50 ` Pedro Alves
2022-05-27 19:00 ` Eli Zaretskii
2022-05-27 19:30 ` Pedro Alves
2022-05-28 7:43 ` Eli Zaretskii
2022-05-30 14:38 ` Pedro Alves
2022-05-27 18:55 ` Eli Zaretskii
2022-05-27 19:05 ` Pedro Alves
2022-05-27 19:14 ` Eli Zaretskii
2022-05-27 19:17 ` Pedro Alves
2022-05-27 19:34 ` Eli Zaretskii [this message]
2022-05-27 19:38 ` Pedro Alves
2022-05-28 7:39 ` Eli Zaretskii
2022-05-30 14:44 ` [pushed v5] " Pedro Alves
2022-05-30 16:15 ` Eli Zaretskii
2022-05-31 11:05 ` [PATCH] Improve clear command's documentation Pedro Alves
2022-05-31 12:36 ` Eli Zaretskii
2022-05-31 13:04 ` Pedro Alves
2022-05-31 13:42 ` Eli Zaretskii
2022-05-31 14:47 ` Pedro Alves
2022-05-31 16:06 ` Eli Zaretskii
2022-05-31 11:13 ` [PATCH] Explicitly mention yet-unloaded shared libraries in location spec examples Pedro Alves
2022-05-31 11:47 ` Eli Zaretskii
2022-05-31 11:17 ` [pushed v5] gdb/manual: Introduce location specs Pedro Alves
2022-05-31 11:31 ` [PATCH] Improve break-range's documentation Pedro Alves
2022-05-31 11:55 ` Eli Zaretskii
2022-05-31 12:03 ` Pedro Alves
2022-05-31 12:09 ` Eli Zaretskii
2022-06-01 17:17 ` RTe: Location Specs (Was: [pushed v5] gdb/manual: Introduce location specs) Eli Zaretskii
2022-06-02 11:10 ` Pedro Alves
2022-06-02 11:49 ` Eli Zaretskii
2022-06-02 12:40 ` Pedro Alves
2022-06-02 12:56 ` Eli Zaretskii
2022-06-02 13:44 ` Pedro Alves
2022-06-02 16:37 ` 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=83k0a6n51q.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
/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).