From: Alan Hayward <Alan.Hayward@arm.com>
To: Luis Machado <luis.machado@linaro.org>
Cc: "gdb-patches\\@sourceware.org" <gdb-patches@sourceware.org>,
nd <nd@arm.com>
Subject: Re: [PING] [PATCH] Harden gdb.base/step-over-syscall.exp
Date: Wed, 22 Jan 2020 17:06:00 -0000 [thread overview]
Message-ID: <A4C970EF-1B01-4434-88F9-66F54D59282D@arm.com> (raw)
In-Reply-To: <870ad1a6-c679-56c3-ea31-a7df80a048ce@linaro.org>
> On 22 Jan 2020, at 15:20, Luis Machado <luis.machado@linaro.org> wrote:
>
> On 1/22/20 11:26 AM, Alan Hayward wrote:
>>> On 22 Jan 2020, at 13:30, Luis Machado <luis.machado@linaro.org> wrote:
>>>
>>> ping?
>>>
>>> https://sourceware.org/ml/gdb-patches/2020-01/msg00432.html
>>>
>>> On 1/15/20 5:36 PM, Luis Machado wrote:
>>>>
>>>> +
>>>> + set pc_after_stepi [get_hexadecimal_valueof "\$pc" "0" \
>>>> + "pc after stepi with x command"]
>>>> +
>>>> + if {$next_insn_addr != $pc_after_stepi} {
>>>> + fail "pc after stepi matches insn addr after syscall"
>>>> + }
>>>> +
>>>> return [list $syscall_insn_addr [get_hexadecimal_valueof "\$pc" \
>>>> "0" "pc after stepi"]]
>> Minor nit. In the return, you could just use $next_insn_addr instead of
>> calling get_hexadecimal_valueof again. >
>
> Do you mean $pc_after_stepi as opposed to $next_insn_addr? $pc_after_stepi is what we get from the $pc register. $next_insn_addr is what we get from using the X command.
Yes, $pc_after_stepi :)
>
>>>> }
>>>> @@ -156,8 +192,13 @@ proc step_over_syscall { syscall } {
>>>> }
>>>> }
>>>> - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, .*" \
>>>> - "continue to syscall insn $syscall"
>>>> + # Check if the syscall breakpoint is at the syscall instruction
>>>> + # address. If so, no need to continue, otherwise we will run the
>>>> + # inferior to completion.
>>>> + if {$syscall_insn_addr != [get_hexadecimal_valueof "\$pc" "0"]} {
>>>> + gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, .*" \
>>>> + "continue to syscall insn $syscall"
>>>> + }
>>>> gdb_test_no_output "set displaced-stepping $displaced"
next prev parent reply other threads:[~2020-01-22 16:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 21:09 Luis Machado
2020-01-22 13:39 ` [PING] " Luis Machado
2020-01-22 14:45 ` Alan Hayward
2020-01-22 15:49 ` Luis Machado
2020-01-22 17:06 ` Alan Hayward [this message]
[not found] ` <66fc6535-755d-ffae-627b-fd8925294fb6@simark.ca>
2020-01-22 17:48 ` Luis Machado
2020-01-24 16:37 ` [PATCH,v2] " Luis Machado
2020-01-24 17:35 ` Simon Marchi
2020-01-27 18:48 ` [PATCH v3] " Luis Machado
2020-01-27 19:02 ` Simon Marchi
2020-01-27 21:25 ` Luis Machado
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=A4C970EF-1B01-4434-88F9-66F54D59282D@arm.com \
--to=alan.hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado@linaro.org \
--cc=nd@arm.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