LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03: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 1107 Comments 0 hydraMax is offline

  



All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration