Skip to content

Improve stack pretty printing

Nina Schoetterl-Glausch kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 1 replyIn review

Changes in v2 from the cover letter

* Cc kvm list (get_maintainers.pl doesn't list it for the file)
* pick up Tested-by (thanks Thomas)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3pretty_print_stacks: prevent invalid address argumentsscripts/pretty_print_stacks.py+1 -10 replies
2/3pretty_print_stacks: support unknown line numbersscripts/pretty_print_stacks.py+14 -130 replies
3/3pretty_print_stacks: modify relative path calculationscripts/pretty_print_stacks.py+5 -30 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchThomas Huth
1/3T-b
2/3T-b
3/3T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [kvm-unit-tests PATCH v2 0/3] Improve stack pretty printing

I noticed some bugs/deficiencies in the pretty_print_stacks script. Namely, it doesn't cope with 0 addresses, which might occur on s390x when backtracing through a interrupt stack frame. Since an interrupt is not a function call, the calling convention doesn't apply and we cannot tell where the stack is.

Additionally, the script stops printing the stack if addr2line cannot determine the line number, instead of skipping the printing of the source.

Lastly, the file path determination was broken for me because I use git worktrees and there being symlinks in the paths.
The proposed change works for me and fixes the issue.
I HAVE NOT TESTED THIS ON OTHER PLATFORMS/OSes, so I don't know if the code is portable.

v1 -> v2
* Cc kvm list (get_maintainers.pl doesn't list it for the file)
* pick up Tested-by (thanks Thomas)

Nina Schoetterl-Glausch (3):
pretty_print_stacks: prevent invalid address arguments
pretty_print_stacks: support unknown line numbers
pretty_print_stacks: modify relative path calculation

 scripts/pretty_print_stacks.py | 35 ++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

base-commit: 5b5d27da2973b20ec29b18df4d749fb2190458af

Signature · 1 line
2.37.2