I'd like to know how I can save/restore comments or possibly other metadata during a debugging session.

I know how to save this data when running radare without the -d flag but I often need to debug the binary and would like a way to save at least the comments I made during this.

I know about the Ps Po commands but this is what radare2 tells me

[0x7ff33eba18a0]> Ps xxx
radare2 does not support projects on debugged bins.
Cannot save project.

I am using version:

> r2 -v
radare2 5.6.8 0 @ linux-x86-64 git.
commit: 5.6.8 build: 2022-06-22__12:33:33

Any help or other way of achieving this is also welcome.

1 Answer 1


Projects has been disabled in debugger mode because not all metadata is rebased when aslr is involved which may result on confusing analysis/comments information. If you disable aslr, or your target is always loading in the same place you can do a couple of things:

  • Ps saving@e:cfg.debug=false

or just save the comments into a file:

  • CC* > comments.r2

you can reload the script with the . comments.r2 or starting the session with r2 -i comments.r2 ... to get the comment lines loaded into the session.

Same goes for all the analysis information. if you append * to any command you get the output in r2 commands script.

  • Can aslr be disabled on a per-binary basis? I think gdb can do it but i am not sure.
    – Gordon Zar
    Jul 1, 2022 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.