By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,116 Members | 1,509 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,116 IT Pros & Developers. It's quick & easy.

Recover source from binary with debug symbols

P: 16
I was wondering, if I have a binary which was compiled with debug symbols, to what extent am I able to recover the source code of the various source files? And how? Usually crashing the program on purpose by passing bad pointers to the arguments allows me to view quite a lot of the source code in that specific section via gdb, but maybe there is a nicer way?
Oct 31 '10 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 9,197
If you can crash a program on purpose, it suggests that the program needs error handling code installed.

The program should detect the bad pointer, write to a log file all necessary data, location, date time, user name, etc and then gracefully terminate.

The analyst, who has the code, looks in the log file to see what happened.

There are decompilers around but you lose the the variable names, function names, comments, etc. What you get is code that is not readable but compiles.
Nov 3 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.