Skip to contentSkip to conversation

Disassemble in GDB

DISCUSSION Bill 3 participants 3 messages Jun 1, 2008

lore
Share & tools
lore

Bill

author
#0 lore raw

I wrote a simple hello world in c. how can i disassemble main() with gdb?

Cheers, Bill

#2 lore raw
In reply to Bill
Quoted 2 lines · Bill

I wrote a simple hello world in c. how can i disassemble main() with gdb?

"disassemble main"

Use the "-g" switch when you compile it. (note the effect of the "-O" switch, while you're at it)

Best,
Frank