#
3c1736b1 |
| 19-Dec-2023 |
Thomas Huth <thuth@redhat.com> |
scripts/pretty_print_stacks.py: Silence warning from Python 3.12
Python 3.12 complains:
./scripts/pretty_print_stacks.py:41: SyntaxWarning: invalid escape sequence '\?' m = re.match(b'(.*) at
scripts/pretty_print_stacks.py: Silence warning from Python 3.12
Python 3.12 complains:
./scripts/pretty_print_stacks.py:41: SyntaxWarning: invalid escape sequence '\?' m = re.match(b'(.*) at (.*):(([0-9]+)|\?)([^:]*)', line)
Switch to a raw byte string to silence the problem.
Message-ID: <20231219153134.47323-1-thuth@redhat.com> Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
e526bc78 |
| 01-Jul-2023 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'arm/queue' into 'master'
arm/arm64: EFI support, arm64 backtrace support, PMU test improvements, and more
See merge request kvm-unit-tests/kvm-unit-tests!43
|
#
96875e96 |
| 28-Jun-2023 |
Andrew Jones <andrew.jones@linux.dev> |
runtime: Teach pretty-print-stacks about EFI debug info
When running a unit test built for EFI, pretty-print-stacks needs to look at ${kernel}.efi.debug, where ${kernel} comes from the 'file' field
runtime: Teach pretty-print-stacks about EFI debug info
When running a unit test built for EFI, pretty-print-stacks needs to look at ${kernel}.efi.debug, where ${kernel} comes from the 'file' field of unittests.cfg but has the .flat extension removed. Teach the pretty-print-stacks script to do that by ensuring ${kernel}.efi is passed to the script, giving it the ability to identify an EFI kernel and know where it is, i.e. any prepended path to the filename is maintained. To pass ${kernel}.efi we change run() to not needlessly convert ${kernel}.flat to $(basename $kernel .flat), but rather to ${kernel}.efi. The original change was needless because the EFI $RUNTIME_arch_run scripts already do a $(basename $kernel .efi) conversion.
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
02d8befe |
| 04-Apr-2023 |
Nina Schoetterl-Glausch <nsg@linux.ibm.com> |
pretty_print_stacks: modify relative path calculation
Don't assume we can get a relative path by cutting of certain prefixes, since this isn't guaranteed to work. Instead use a library function. Als
pretty_print_stacks: modify relative path calculation
Don't assume we can get a relative path by cutting of certain prefixes, since this isn't guaranteed to work. Instead use a library function. Also normalize paths in order to take care of symlinks.
Fixes: a9143a24 ("scripts: pretty print stack traces") Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230404185048.2824384-4-nsg@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
3ad01e61 |
| 04-Apr-2023 |
Nina Schoetterl-Glausch <nsg@linux.ibm.com> |
pretty_print_stacks: support unknown line numbers
Handle the case where addr2line cannot determine a line number. Skip printing lines for this frame in this case.
Fixes: a9143a24 ("scripts: pretty
pretty_print_stacks: support unknown line numbers
Handle the case where addr2line cannot determine a line number. Skip printing lines for this frame in this case.
Fixes: a9143a24 ("scripts: pretty print stack traces") Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230404185048.2824384-3-nsg@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
32e7ba06 |
| 04-Apr-2023 |
Nina Schoetterl-Glausch <nsg@linux.ibm.com> |
pretty_print_stacks: prevent invalid address arguments
If a return address is zero, the script will pass -1 to addr2line which it considers an invalid flag. Zero is an unlikely return address, but w
pretty_print_stacks: prevent invalid address arguments
If a return address is zero, the script will pass -1 to addr2line which it considers an invalid flag. Zero is an unlikely return address, but we might see it, for example because the backtrace is unreliable on s390x if there is an interrupt frame on the stack.
Fixes: a9143a24 ("scripts: pretty print stack traces") Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230404185048.2824384-2-nsg@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
19f71b8e |
| 21-Jan-2020 |
Paolo Bonzini <pbonzini@redhat.com> |
expect python3 in the path
Some systems that only have Python 3.x installed will not have a "python" binary in the path. Since pretty_print_stacks.py is a Python 3 program, we can use an appropriat
expect python3 in the path
Some systems that only have Python 3.x installed will not have a "python" binary in the path. Since pretty_print_stacks.py is a Python 3 program, we can use an appropriate shebang.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
8951e978 |
| 06-Nov-2018 |
Paolo Bonzini <pbonzini@redhat.com> |
pretty_print_stacks: port to Python 3
Recognize the line with a byte-based regex, then decode to Unicode when printing the backtrace.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-b
pretty_print_stacks: port to Python 3
Recognize the line with a byte-based regex, then decode to Unicode when printing the backtrace.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
#
e593c4fd |
| 19-Apr-2016 |
Andrew Jones <drjones@redhat.com> |
pretty_print_stacks: addr2line may need a cross prefix
Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Peter Feiner <pfeiner@google.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
|
#
e1f45419 |
| 19-Apr-2016 |
Andrew Jones <drjones@redhat.com> |
pretty_print_stacks: use elf file for the kernel
x86 doesn't seem to care, but other architectures do.
Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Peter Feiner <pfeiner@google.com
pretty_print_stacks: use elf file for the kernel
x86 doesn't seem to care, but other architectures do.
Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Peter Feiner <pfeiner@google.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
#
762f9cd8 |
| 19-Apr-2016 |
Andrew Jones <drjones@redhat.com> |
pretty_print_stacks: keep the 'STACK:' line
It's sometimes useful to have the addresses for searching in a disassembly. Anyway, there's no reason to drop it.
Signed-off-by: Andrew Jones <drjones@re
pretty_print_stacks: keep the 'STACK:' line
It's sometimes useful to have the addresses for searching in a disassembly. Anyway, there's no reason to drop it.
Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Peter Feiner <pfeiner@google.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
#
a9143a24 |
| 22-Mar-2016 |
Peter Feiner <pfeiner@google.com> |
scripts: pretty print stack traces
The script runs addresses through addr2line to get file names and line numbers. Also prints out source code lines if files are available. For example
0x004013f5:
scripts: pretty print stack traces
The script runs addresses through addr2line to get file names and line numbers. Also prints out source code lines if files are available. For example
0x004013f5: ac_test_exec at x86/access.c:818 } > ac_test_setup_pte(at, pool); r = ac_test_do_access(at); 0x004014dd: ac_test_run at x86/access.c:852 ++tests; > successes += ac_test_exec(&at, &pool); } while (ac_test_bump(&at)); 0x0040157d: main at x86/access.c:873 printf("starting test\n\n"); > r = ac_test_run(); return r ? 0 : 1; 0x0040028e: start64 at x86/cstart64.S:206 lea __argv(%rip), %rsi > call main mov %eax, %edi
Signed-off-by: Peter Feiner <pfeiner@google.com> Reviewed-By: Andrew Jones <drjones@redhat.com> Message-Id: <62a708253a7cef177856f6c044a9cf54910fdc12.1458689655.git.pfeiner@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|