public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* where to put defines for exception numbers as encoded in ARM CoreSight ETM traces
@ 2021-03-19  0:23 Zied Guermazi
  2021-03-19  3:29 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Zied Guermazi @ 2021-03-19  0:23 UTC (permalink / raw)
  To: gdb

hi

in ETM traces (3.4 and above), exception encodings for non v7m 
processors (v7A, is done in a 4 bit field, defined in table 7.12 - 
(https://developer.arm.com/documentation/ihi0014/q/ETMv3-Signal-Protocol/Instruction-tracing/Branch-Packets?lang=en#BABIECBB 
<https://developer.arm.com/documentation/ihi0014/q/ETMv3-Signal-Protocol/Instruction-tracing/Branch-Packets?lang=en#BABIECBB>). 
This is not the same encoding as for exception vector.

This is needed for handling the implementation of breakpoints as an 
undefined instruction trap in GDB for ARMv7 while decoding ETM traces 
(branch tracing extension to use ARM CoreSight ETM)

what will be a good location for adding defines for this exception 
encoding? will it be fine to add them in arch/arm.h? shall I create a 
new header file for them? please advise.

Kind Regards

Zied Guermazi



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: where to put defines for exception numbers as encoded in ARM CoreSight ETM traces
  2021-03-19  0:23 where to put defines for exception numbers as encoded in ARM CoreSight ETM traces Zied Guermazi
@ 2021-03-19  3:29 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2021-03-19  3:29 UTC (permalink / raw)
  To: Zied Guermazi, gdb

> hi
> 
> in ETM traces (3.4 and above), exception encodings for non v7m processors (v7A, is done in a 4 bit field, defined in table 7.12 - (https://developer.arm.com/documentation/ihi0014/q/ETMv3-Signal-Protocol/Instruction-tracing/Branch-Packets?lang=en#BABIECBB <https://developer.arm.com/documentation/ihi0014/q/ETMv3-Signal-Protocol/Instruction-tracing/Branch-Packets?lang=en#BABIECBB>). This is not the same encoding as for exception vector.
> 
> This is needed for handling the implementation of breakpoints as an undefined instruction trap in GDB for ARMv7 while decoding ETM traces (branch tracing extension to use ARM CoreSight ETM)
> 
> what will be a good location for adding defines for this exception encoding? will it be fine to add them in arch/arm.h? shall I create a new header file for them? please advise.
> 
> Kind Regards
> 
> Zied Guermazi

Hi,

I don't know the specific details of this problem, but yes a file under
arch/ sounds fine.  These files contain definitions and helpers shared
between gdb and gdbserver (yes, even though it's under the gdb
directory).

Puting them in arm.h or in a new file are both fine.

Simon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-19  3:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19  0:23 where to put defines for exception numbers as encoded in ARM CoreSight ETM traces Zied Guermazi
2021-03-19  3:29 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).