LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Concerning free software, programming, and whatever else I find interesting. Also the blog for my Web site, frigidcode.com.
Old

See source code intermixed with assembly

Posted 01-16-2012 at 04:25 AM by hydraMax (Bits and Pixels)

Maybe everybody else already knows this, but I thought it was pretty neat anyway:

If you compile some C code with -g option (to include debugging symbols), you can then use objdump on the binary, with the -S switch, to get source code intermixed with assembly. For example, here is a snippet from one of my binaries:

Code:
int main() {
  401163:       55                      push   %rbp
  401164:       48 89 e5                mov    %rsp,%rbp
  401167:
...
Member
Posted in Uncategorized
Views 616 Comments 0 hydraMax is offline

  



All times are GMT -5. The time now is 11:38 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration