pwndbg / pwndbg

Exploit Development and Reverse Engineering with GDB Made Easy
https://pwndbg.re/
MIT License
7.69k stars 893 forks source link

Dynamically scale context code lines based terminal height #2183

Open fidgetingbits opened 6 months ago

fidgetingbits commented 6 months ago

At the moment context output can be manually configured to show a certain number of code lines.

Output could be enhanced by adding an option to scale code lines dynamically given the height of the terminal. This should be still be optional behavior however.

This is a screenshot shared by a user on discord demonstrating the problem: ss.png

disconnect3d commented 4 months ago

This should be fairly easy to implement and I think is a nice feature.

peace-maker commented 2 months ago

I think it's worth it to grow other sections as well instead of only the disasm view? Maybe show more of the stack and sourcecode if debug symbols are available? That would require some weight or ratio though to control which section gets how much of the additional available vertical space. This feels like replicating the TUI tui new-layout layout code though.

Do you think other sections should grow too or just let the disasm section have all the space for now?

disconnect3d commented 2 months ago

Tbh I'm not sure; I think it makes sense to play with it and see how it works if we rescale all the sections.

Also not sure if we want this since we have layout tui now, but I also havent tested the TUI myself :D

peace-maker commented 2 months ago

You have to want to use the TUI since it's not perfect, so this is still nice to have in my opinion.

I think this only makes sense for sections that could show additional information or are truncated, but not for all like heap_tracker or regs which show a fixed size.