From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdbarch software_single_step returns VEC (CORE_ADDR) *
Date: Mon, 02 May 2016 10:21:00 -0000 [thread overview]
Message-ID: <c490cbf9-55cf-de5f-797c-922b1090cdb0@redhat.com> (raw)
In-Reply-To: <86d1p8eajb.fsf@gmail.com>
On 04/29/2016 03:48 PM, Yao Qi wrote:
>
>> > So when setting a single-step breakpoint, we'd get the "kind"
>> > from the current mode, and when setting breakpoints from
>> > user-input, we'd get it from the symbols tables / mapping symbols.
> This means we need this to get the "kind" from the current mode,
>
> /* Return the breakpoint kind for this target based on the current
> processor state (e.g. the current instruction mode on ARM) and the
> PC. The PCPTR is adjusted to the real memory location in case a flag
> (e.g., the Thumb bit on ARM) is present in the PC. */
> int (*breakpoint_kind_from_current_state) (CORE_ADDR *pcptr);
Hmm, not sure, maybe. From the perspective of syncing design with
gdbserver, it makes sense. On gdbserver, I think that's only used for advancing
past a permanent breakpoint. On gdb side, we use
gdbarch_skip_permanent_breakpoint, which I think no arch overrides currently,
so it always ends up in default_skip_permanent_breakpoint -> gdbarch_breakpoint_from_pc.
(Looks like we could eliminate gdbarch_skip_permanent_breakpoint.)
We could also say we should keep gdb's permanent breakpoint skipping's
logic of determining which breakpoint instruction to skip in sync with
bp_loc_is_permanent -> program_breakpoint_here_p -> gdbarch_breakpoint_from_pc,
though in this case looking at the current mode doesn't make sense.
>
> and also need to pass breakpoint location to to_insert_breakpoint to get
> the type of breakpoint we are inserting, right?
I was thinking we'd have all we need in bp_target_info->placed_size,
but of course I may be missing something.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-05-02 10:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 14:10 [PATCH 0/2] " Yao Qi
2016-03-23 14:10 ` [PATCH 1/2] " Yao Qi
2016-03-23 17:25 ` Pedro Alves
2016-03-30 14:14 ` Yao Qi
2016-04-27 15:19 ` Pedro Alves
2016-04-29 14:48 ` Yao Qi
2016-05-02 10:21 ` Pedro Alves [this message]
2016-03-23 14:10 ` [PATCH 2/2] Remove gdbarch method displaced_step_hw_singlestep Yao Qi
2016-03-23 17:26 ` Pedro Alves
2016-05-09 11:05 ` Yao Qi
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=c490cbf9-55cf-de5f-797c-922b1090cdb0@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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