-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
LLDB Adapterupsteam lldb issuesupsteam lldb issues
Description
Setup:
- Use the
helloworldfile in our test binaries: https://github.com/Vector35/debugger/blob/dev/test/binaries/Linux-x86_64/helloworld - Run
gdbserver 0.0.0.0:31337 -- ./helloworldon Linux- The gdbserver is the one that comes with Ubuntu 22.04 -- GNU gdbserver (Ubuntu 12.1-0ubuntu1~22.04) 12.1
- In Binary Ninja, connect to it via Menu -> Debugger -> Connect to remote process
- In the dialog that pops up, select gdb-server (which is the default), and put the IP address of the Linux system in it. Set the port to 31337
- Once connected, resume the target to let the program run to its entry point
- See the
ripis reported as0x555555555081while the entry point is at0x555555555080
This off-by-one will cause weird crashes when single stepping in the code, which users have been complaining but I am unable to reproduce -- because this is highly reliant on the specific instruction that is being executed. Now that I know the cause of this and become patient, I notice if I get to the main function in the helloworld, and single step a few times, the crash will happen -- the target will be killed due to a sigsegv.
This is probably an LLDB bug, since I can reproduce it using the lldb command line directly. Also, we all know debuggers do need to subtract one from the instruction pointer when a int3 breakpoint is hit -- I feel like LLDB and gdbserver do not reach an agreement on who should do it
Metadata
Metadata
Assignees
Labels
LLDB Adapterupsteam lldb issuesupsteam lldb issues
