Re: Is there single step debugging support being added to aarch64-linux?

Prafull Suryawanshi <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAJgVtDW7qi4Zfz_ELnk25THoJpfPf_im=rpv8nv9-ZqqcQmXRw@mail.gmail.com>
I debugged this one and found that when compared to gdb-arm,
gdb-aarch64 behaves little different.
Before even invoking software-single-step operations, gdb-arm invokes
Z0 packet before getting registers.
But gdb-aarch64 does not do it. It sets the Z0 after reading registers.
So in case gdb-arm, the Z0 is set to next pc value.
But for gdb-aarch64 it sets the Z0 at current pc only.

Below is logs when enabled remote_debug option.
for gdb-arm
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=1, current
thread [Thread 2229] at 0xc01b2ddc
Sending packet: $Z0,c01b2de0,4#67...Ack


For gdb-aarch64,
infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=1, current
thread [Thread 3462] at 0xffffffc00021014c

On Mon, Jun 15, 2015 at 6:21 PM, Yao Qi <[email protected]> wrote:
> Prafull Suryawanshi <[email protected]> writes:
>
>> I am not sure why hw stepper not works here (might be limitation of hw
>> I am using).
>
> You'd better to check whether hw single step doesn't work in your case.
>
>> That is may be the infrun loops as it never gets stop signal. (the
>> output I earlier pasted).
>> Is it ok to provide patch for software single step like arm here?
>
> We only implement software single step on the targets don't have
> hardware single step capability, like arm.
>
>> (I am preparing one. It will have simulate aarch64 instruction set and
>> implement aarch64 version of functions of
>> arm_linux_software_single_step, arm_insert_single_step_breakpoint and
>> arm_get_next_pc.)
>
> Before you start it, better to get the reason why hw single step doesn't
> work on aarch64.
>
> --
> Yao (齐尧)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.