Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Avi Kivity
On 08/29/2016 09:00 PM, Nadav Har'El wrote: On Mon, Aug 29, 2016 at 8:12 PM, Avi Kivity > wrote: On 08/29/2016 08:10 PM, Benoît Canet wrote: On Mon, Aug 29, 2016 at 7:08 PM, Avi Kivity >

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Nadav Har'El
On Mon, Aug 29, 2016 at 8:12 PM, Avi Kivity wrote: > > > On 08/29/2016 08:10 PM, Benoît Canet wrote: > > > > On Mon, Aug 29, 2016 at 7:08 PM, Avi Kivity wrote: > >> diff --git a/arch/x64/entry.S b/arch/x64/entry.S >> >>> index e265a30..e3be0bc 100644 >>>

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Benoît Canet
Ah sorry he does it with rflag and r11 On Mon, Aug 29, 2016 at 7:10 PM, Benoît Canet wrote: > > > On Mon, Aug 29, 2016 at 7:08 PM, Avi Kivity wrote: > >> >> >> On 08/29/2016 07:49 PM, Nadav Har'El wrote: >> >>> GDB uses DWARF CFI

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Avi Kivity
On 08/29/2016 07:49 PM, Nadav Har'El wrote: GDB uses DWARF CFI meta-instructions to know how to backtrace through function call frames, and which registers get saved where. This patch fixes the CFI instructions in the syscall_entry() assembly code. After this patch, if we are in system call

Re: [PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Benoît Canet
On Mon, Aug 29, 2016 at 7:08 PM, Avi Kivity wrote: > > > On 08/29/2016 07:49 PM, Nadav Har'El wrote: > >> GDB uses DWARF CFI meta-instructions to know how to backtrace through >> function call frames, and which registers get saved where. >> >> This patch fixes the CFI

[PATCH] syscall: fix CFI information for debugging with GDB

2016-08-29 Thread Nadav Har'El
GDB uses DWARF CFI meta-instructions to know how to backtrace through function call frames, and which registers get saved where. This patch fixes the CFI instructions in the syscall_entry() assembly code. After this patch, if we are in system call code we can backtrack through the syscall_entry()