Is it possible to invert the stack view when debugging in radare2 such that higher addresses are at the top?
That's not currently possible. The closest you can get is using iteration (
@@), and printing the stack like this:
[0x10000b4a1]> pxw 16 @@=rsp rsp-16 rsp-32 rsp-48
(For more lines, you simply add additional
Unfortunately, this method has several disadvantages:
- If you need a variable amount of lines, that won't do. You can either use an external command to generate the elements (via
@@=``), or contribute to radare2's iterator code (located in
libr/core/cmd.c), which currently supports only positive direction (you'd need to add support for negative stepping).
- For certain hexdump formats (such as
px, which is the default format used in panels view), a header is added to the output, and when using an iterator, which results in multiple command executions, the header will appear over and over again.
- For some reason, this kind of iteration does not work in panels view.
I'd recommend opening a feature request (or implementing it and contributing to the project), to support reverse printing direction.