From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/2] new tracepoint downloaded MI notification.
Date: Sat, 29 Sep 2012 14:13:00 -0000 [thread overview]
Message-ID: <506701EC.7040703@codesourcery.com> (raw)
In-Reply-To: <5065E292.4000606@redhat.com>
On 09/29/2012 01:46 AM, Pedro Alves wrote:
>> Took me a second to recall, but the reason the address is
>> >necessary is multi-location tracepoints -- a tracepoint on the
>> >target is identified by the { number, address } tuple. We don't
>> >send over the location's sub number (like 1.1, 1.2, etc.).
>> >
>> >Should we mention this somewhere (other than at the tracepoint
>> >packets description), so frontend people don't wonder whether they
>> >can ignore the address field, and why aren't the other fields of
>> >the tracepoint (like spec string) included?
> And I guess the related question is, are frontends interested
> in { number, address }, which is target side detail, or on
> { number, location number }, which is how other breakpoints are
> presented to the frontend? I would think the latter?
From the frontend's point of view, {number, location number} is better,
and the schema "number.location_number" has been used in
"=breakpoint-modified" notification. However, if we want to use
{number, location number} here, we have to guarantee that the location
number is an attribute of bp_location, because:
Nowadays, location number is generated by incrementing a counter during
iterating a list of bp_location of breakpoint (in
breakpoint.c:print_one_breakpoint), so I am wondering that the
bp_location object may have the different number, if the list of
bp_locations of a breakpoint is removed due to some reasons. Looks
bp_location list of breakpoint is *not* removed except in
breakpoint_program_space_exit, after examine the source code.
For example,
Originally we have a tracepoint of 3 locations,
4 tracepoint keep y <MULTIPLE>
collect $eip^M
4.1 y 0x0804859c in func4 inf 1
4.2 y 0xb7ffc480 in func4 inf 2
4.3 y 0xb7ffc488 in func4 inf 1
due to some reason, bp_location on address 0xb7ffc480 is removed (for
example, inferior 2 is removed), and original bp_location 4.3 becomes 4.2.
In short, if we can make location number persistent (unchanged for a
given bp_location object), then {number, location number} is fine,
otherwise, I'd prefer {number, address}.
--
Yao
next prev parent reply other threads:[~2012-09-29 14:13 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-28 0:49 [RFC 0/2] Two new MI notifications Yao Qi
2012-09-28 0:49 ` [PATCH 1/2] new memory-changed MI notification Yao Qi
2012-09-28 7:36 ` Eli Zaretskii
2012-09-28 7:58 ` Yao Qi
2012-09-28 8:25 ` Eli Zaretskii
2012-09-28 17:17 ` Tom Tromey
2012-09-29 1:18 ` Yao Qi
2012-10-09 7:44 ` Yao Qi
2012-10-15 17:58 ` dje
2012-10-15 19:07 ` Tom Tromey
2012-10-16 7:12 ` Yao Qi
2012-10-15 19:03 ` Tom Tromey
2012-09-28 0:49 ` [PATCH 2/2] new tracepoint downloaded " Yao Qi
2012-09-28 7:37 ` Eli Zaretskii
2012-09-28 17:44 ` Pedro Alves
2012-09-28 17:44 ` Pedro Alves
2012-09-28 17:47 ` Pedro Alves
2012-09-29 14:13 ` Yao Qi [this message]
2012-10-09 8:12 ` Yao Qi
2012-10-31 17:59 ` Pedro Alves
2012-10-31 19:20 ` Doug Evans
2012-11-01 0:34 ` Yao Qi
2012-11-02 15:46 ` Pedro Alves
2012-11-02 15:50 ` Pedro Alves
2012-10-18 1:16 ` Yao Qi
2012-10-18 1:28 ` Yao Qi
2012-10-30 7:07 ` [ping]: " Yao Qi
2012-10-30 17:22 ` Eli Zaretskii
2012-10-18 4:43 ` Eli Zaretskii
2012-10-18 19:54 ` Tom Tromey
2012-09-28 18:27 ` Tom Tromey
2012-09-28 18:29 ` Tom Tromey
2012-10-15 18:03 ` dje
2012-10-31 18:03 ` Pedro Alves
2012-10-31 19:10 ` Marc Khouzam
2012-11-01 0:22 ` Yao Qi
2012-11-22 18:33 ` Pedro Alves
2012-11-29 15:47 ` Yao Qi
2012-11-29 16:00 ` Pedro Alves
2012-11-29 19:34 ` Marc Khouzam
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=506701EC.7040703@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/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