Linux KVM/arm64 development list
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH 0/6] arm64: improve debuggability
@ 2023-06-17  1:49 Nadav Amit
  2023-06-17  1:49 ` [kvm-unit-tests PATCH 1/6] arm: keep efi debug information in a separate file Nadav Amit
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Nadav Amit @ 2023-06-17  1:49 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kvmarm, kvmarm, kvm, Nikos Nikoleris, Nadav Amit

From: Nadav Amit <namit@vmware.com>

My recent experience in debugging ARM64 tests on EFI was not as fun as I
expected it to be.

There were several reasons for that besides the questionable definition
of "fun":

1. ARM64 is not compiled with frame pointers and there is no stack
   unwinder when the stack is dumped.

2. Building an EFI drops the debug information.

3. The addresses that are printed on dump_stack() and the use of GDB
   are hard because taking code relocation into account is non trivial.

The patches help both ARM64 and EFI for this matter. The image address
is printed when EFI is used to allow the use of GDB. Symbols are emitted
into a separate debug file. The frame pointer is included and special
entry is added upon an exception to allow backtracing across
exceptions.

Nadav Amit (6):
  arm: keep efi debug information in a separate file
  lib/stack: print base addresses on efi
  arm64: enable frame pointer and support stack unwinding
  arm64: stack: update trace stack on exception
  efi: Print address of image
  arm64: dump stack on bad exception

 arm/Makefile.arm        |  3 ---
 arm/Makefile.arm64      |  1 +
 arm/Makefile.common     |  8 ++++++-
 arm/cstart64.S          | 13 ++++++++++
 lib/arm64/asm-offsets.c |  3 ++-
 lib/arm64/asm/stack.h   |  3 +++
 lib/arm64/processor.c   |  1 +
 lib/arm64/stack.c       | 53 +++++++++++++++++++++++++++++++++++++++++
 lib/efi.c               |  3 +++
 lib/stack.c             | 31 ++++++++++++++++++++++--
 10 files changed, 112 insertions(+), 7 deletions(-)
 create mode 100644 lib/arm64/stack.c

-- 
2.34.1


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

end of thread, other threads:[~2023-06-26  5:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-17  1:49 [kvm-unit-tests PATCH 0/6] arm64: improve debuggability Nadav Amit
2023-06-17  1:49 ` [kvm-unit-tests PATCH 1/6] arm: keep efi debug information in a separate file Nadav Amit
2023-06-24 10:12   ` Andrew Jones
2023-06-24 10:31   ` Andrew Jones
2023-06-25 19:21     ` Nadav Amit
2023-06-17  1:49 ` [kvm-unit-tests PATCH 2/6] lib/stack: print base addresses on efi Nadav Amit
2023-06-24 10:13   ` Andrew Jones
2023-06-25 19:23     ` Nadav Amit
2023-06-17  1:49 ` [kvm-unit-tests PATCH 3/6] arm64: enable frame pointer and support stack unwinding Nadav Amit
2023-06-24 10:13   ` Andrew Jones
2023-06-25 19:22     ` Nadav Amit
2023-06-26  5:42       ` Andrew Jones
2023-06-17  1:49 ` [kvm-unit-tests PATCH 4/6] arm64: stack: update trace stack on exception Nadav Amit
2023-06-24 10:18   ` Andrew Jones
2023-06-17  1:49 ` [kvm-unit-tests PATCH 5/6] efi: Print address of image Nadav Amit
2023-06-17  1:49 ` [kvm-unit-tests PATCH 6/6] arm64: dump stack on bad exception Nadav Amit
2023-06-17  1:52   ` Nadav Amit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox