New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve comments through reboot #527

Open
AaronOpfer opened this Issue Dec 20, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@AaronOpfer
Contributor

AaronOpfer commented Dec 20, 2016

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.

@eteran

This comment has been minimized.

Show comment
Hide comment
@eteran

eteran Jan 4, 2017

Owner

The bookmark plugin now demonstrates storing this type of information, should be pretty easy to add some stuff for the QDisassemblyView

Owner

eteran commented Jan 4, 2017

The bookmark plugin now demonstrates storing this type of information, should be pretty easy to add some stuff for the QDisassemblyView

@RabidCicada

This comment has been minimized.

Show comment
Hide comment
@RabidCicada

RabidCicada Jul 6, 2017

I can take this on and see if I can get this in:)

RabidCicada commented Jul 6, 2017

I can take this on and see if I can get this in:)

@eteran

This comment has been minimized.

Show comment
Hide comment
@eteran

eteran Jul 10, 2017

Owner

@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.
Owner

eteran commented Jul 10, 2017

@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.

eteran added a commit that referenced this issue Oct 13, 2017

Merge pull request #612 from helvete003/master
SessionManager implemented with comment saving function #527
@AaronOpfer

This comment has been minimized.

Show comment
Hide comment
@AaronOpfer

AaronOpfer Nov 19, 2017

Contributor

So I just tested this and comment saving only works when ASLR is disabled. Seems like this needs a little more work.

Contributor

AaronOpfer commented Nov 19, 2017

So I just tested this and comment saving only works when ASLR is disabled. Seems like this needs a little more work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment