Re: GDB: etm traces decoding and breakpoints for arm targets

2020-11-03 Thread Mike Leach
Hi Zied, On Mon, 2 Nov 2020 at 15:52, Zied Guermazi wrote: > > hi > > Thanks Mike for your support, it was very helpful. > > to put everything together, on arm, gdb inserts a sw breakpoint by patching > the code with an undefined instruction ( see comments in arm-tdep.c > line7687) when a brea

Re: GDB: etm traces decoding and breakpoints for arm targets

2020-11-03 Thread Zied Guermazi
hi Thanks Mike for your support, it was very helpful. to put everything together, on arm, gdb inserts a sw breakpoint by patching the code with an undefined instruction ( see comments in  arm-tdep.c line7687) when a breakpoint is hit, an exception number 9 "Undefined Instruction exception" is

Re: GDB: etm traces decoding and breakpoints for arm targets

2020-11-02 Thread Omair Javaid
Hi Zied From what I understood from your description, you are looking for a way to mitigate the effects of BKPT instruction in trace data. Also the description you have about how software breakpoints work is correct. We write a trap (usually BKPT instruction or any variant of BKPT) to the breakpoi

GDB: etm traces decoding and breakpoints for arm targets

2020-11-02 Thread Zied Guermazi
hi, while testing the implementation in gdb of branch tracing on arm processors using etm, I faced the the situation where a breakpoint was set, was hit and then the execution of the program was continued.  While decoding generated traces,  I got the address of the breakpoint (0x400552) exec