lebr0nli/GEP

multi-line command hangs GDB

YalandHong opened this issue · 1 comments

When you input a multi-line GDB command (e.g. while), GEP hangs and CPU usage increases to 100%.

image

In normal GDB, the result should be:
image

It may not be a serious problem since I don't use multi-line commands very often. But it indeed hangs and crashes GDB.

Hello, and thank you for reporting the bug!

I've implemented some initial support for multi-line commands in pull request #20. That patch should address this issue, but it's important to note that it may not be perfect.
Some cases might be challenging to support due to limitations in GDB's API. For instance, we currently can't display correct indentation for nested if/while statements. (Edit: Hopefully, the bug with nested multi-line commands has been resolved in the latest commit.)

Could you kindly verify if the patch is working for you?
(To apply the patch, you can wget -O /path/to/your/original/gdbinit-gep.py https://raw.githubusercontent.com/lebr0nli/GEP/support-multi-line-commands/gdbinit-gep.py)

Additionally, I'd like to mention that I've recently updated GEP to utilize a virtual environment (venv) to accommodate the latest version of pwndbg. If you haven't done so already, you might need to use the latest installation script to reinstall GEP before applying this patch.