Re: [PATCH 0/7] Support tracepoints and software breakpoints on ARM aarch32-linux in GDBServer.

Yao Qi
2015-09-14T10:33:49Z

Antoine Tremblay <antoine.tremblay@ericsson.com> writes:

Hi Antoine,
Thanks for the work!

> This patch series adds support for tracepoints and software breakpoints on ARM
> aarch32 on linux.

Term "aarch32" is only used on armv8, means 32-bit execution state.
What your patches do is to add software single step and tracepoint point
for ARM (ARMv7 and pre-ARMv7). Don't need to say "aarch32".

Your patch series include too much things, and we need to split them,

>
> Some background :
>
> Some specific issues for ARM aarch32 make it difficult for GDBServer to enable
> these features namely : it has no hardware single step support and the
> breakpoint data and size depends on the current instruction set used, thumb,
> thumb2 or arm.
>
> So GDBServer needs to know how to set a breakpoint of different size based on
> the current instruction and registers and it needs to be able to do software
> single stepping.

The first part can be teaching GDBserver to choose the right breakpiont
instruction (of different size and encoding) based on the address.
Then, the second part can be teaching GDBserver to do software single stepping.

>
> This patchset teaches this to GDBServer and enables support for tracepoints and
> software breakpoints.

Support tracepoint on ARM (with software single step in GDBserver side)
can be the third part.

>
> The patchset :
>
> This patchset applies over :
> https://sourceware.org/ml/gdb-patches/2015-09/msg00004.html
> to avoid an immediate conflict...

I'll push it in, if there are no regressions on x86 and aarch64.

>
> This patchset was tested on Ubuntu 14.04 on ARMv7 and x86 no regressions found.

How do you test them on ARMv7? I assume you tested your patches against
gdbserver, but did you test them against compile options -marm and
-mthumb respectively? I do it in this way,

$ make check RUNTESTFLAGS='--target_board=YOUR_BOARD\{-marm,-mthumb\}'

YOUR_BOARD can be unix, native-gdbserver or whatever you are using.
Sometime, I also pass -march=armv4t to exercise thumb-1 instructions,
but I don't know whether your gcc has such multi-lib or not.

--
Yao (齐尧)