edb-debugger
edb-debugger copied to clipboard
Preserve comments through reboot
Comments let a user place notes on some instructions which can be useful when debugging. They are not preserved through a reboot of edb or a restart of the debuggee which limits their usefulness. These should instead be saved.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The bookmark plugin now demonstrates storing this type of information, should be pretty easy to add some stuff for the QDisassemblyView
I can take this on and see if I can get this in:)
@RabidCicada So I think that the main thing we need to worry about here is comments in the disassembly view. Since this isn't a plugin, the hooks for save/restore sessions isn't auto-magical. The functions that you are likely interested in are found in src/Debugger.cpp:
void Debugger::save_session(const QString &session_file);
void Debugger::load_session(const QString &session_file);
Some notes:
- Best to store any addresses as hex strings, because 64-bit values round trip through JSON "numbers" are lossy for some values since JSON numbers are technically doubles for a fully conformant implementation.
- May be best to store the module ("region") base with the address, so we can (eventually) deal with ASLR on reloads.
So I just tested this and comment saving only works when ASLR is disabled. Seems like this needs a little more work.
@AaronOpfer definitely ASLR sensitive.
To deal with ASLR we'll need to start comments as region+offset instead of absolute addresses. Should be doable, and at the very least is easier to deal with than breakpoints.