Search code examples
c++clinuxgdbdecompiling

Is there any way to retrieve back the source code from unstripped binary in Linux?


I was working on some C++ source code, unexpectedly I deleted the source code. But still I have my unstripped binary. Is there any way that I can retrieve my source code from the unstripped binary.

I can use ARM gdb but binary is cross compiled one so I cannot run the binary in my host machine. Also gdb not present for target.


Solution

  • No. Even an "unstripped" binary only has debugging information, but not the source code -- the debugger still takes that from the actual source file.

    Learn using a revision control system such as git. If you put that on an external site such as github, you also have a great offsite backup...