Re: A issue about ptrace/SINGLESTEP on arm64

2017-10-17 Thread Will Deacon
On Tue, Oct 17, 2017 at 10:04:00AM +0800, chengjian (D) wrote: > On 2017/10/16 23:30, Will Deacon wrote: > >Can you jump the PC once the child appears to be "stuck"? > > > >IIRC, GDB has special heuristics to step through LDXR/STXR critical > >sections. > The function can be returned, But the numbe

Re: A issue about ptrace/SINGLESTEP on arm64

2017-10-16 Thread chengjian (D)
On 2017/10/16 23:30, Will Deacon wrote: Can you jump the PC once the child appears to be "stuck"? IIRC, GDB has special heuristics to step through LDXR/STXR critical sections. The function can be returned, But the number of instructions looks too much We use objdump to count the assembly code

Re: A issue about ptrace/SINGLESTEP on arm64

2017-10-16 Thread Will Deacon
On Mon, Oct 16, 2017 at 12:27:17PM +0800, chengjian (D) wrote: > Hi > I write demo use ptrace/SINGLESTEP to count the number of instructions > executed by the process > The parent process fork+exec a child process, and trace(SINGLESTEP) it, > > It works fine under the x86_64 architecture but has a

A issue about ptrace/SINGLESTEP on arm64

2017-10-15 Thread chengjian (D)
Hi I write demo use ptrace/SINGLESTEP to count the number of instructions executed by the process The parent process fork+exec a child process, and trace(SINGLESTEP) it, It works fine under the x86_64 architecture but has an exception under arm64. ```cpp //demo.c #include #include #include