pgosar / ChatGDB

Harness the power of ChatGPT inside the GDB or LLDB debugger!
MIT License
901 stars 31 forks source link

Undefined command error #5

Closed wilmer-suarez closed 1 year ago

wilmer-suarez commented 1 year ago

Any way around this? I'm running arm-none-eabi-gdb

.../.gdbinit:1: Error in sourced command file:
/opt/homebrew/lib/python3.11/site-packages/chatgdb/core.py:3: Error in sourced command file:
Undefined command: "from".
pgosar commented 1 year ago

I think what happened is that the response to your input was an undefined command in GDB?

Generally, this issue happens when the GPT model hallucinates commands, which happens occasionally (in my testing, it's quite rare). There is unfortunately no way of stopping that from happening.

wilmer-suarez commented 1 year ago

This happens during GDBs initialization actually, before inputting any command: Screenshot 2023-04-09 at 1 09 34 PM

This is what's in my .gdbinit file: Screenshot 2023-04-09 at 1 12 10 PM

pgosar commented 1 year ago

After doing some research, I think the issue may have something to do with your arm-none-eabi-gdb not being compiled with python support. There should not be an issue with the script.

wilmer-suarez commented 1 year ago

Yeah, that seems to be the case. If I can figure out a way to get past that I will post here. Thank you

pgosar commented 1 year ago

I came across this, you might find it helpful. https://gist.github.com/JayKickliter/8004bafaf3d365dc8fe23843fae15c67

Let me know if it works.