tags:

views:

47

answers:

1

I am having troubles using objdump in windows command prompt for a C program. I want to display the machine code of a specific function and lines. For example, in Linux I would enter:

objdump -D x.out | grep -A20 main.: 

What would the equivalent be in windows?

I am just digging into understanding machine code, so forgive me if my assumptions are incorrect or imprecise.

A: 

What would the equivalent be in windows?

Off the top of head, you just save the output into a file:

objdump -D x.out > x.out.dump

then open the file (x.out.dump) in the text editor of choice.

On Windows to peek into the object code I find myself mostly using GUI debuggers. Windows is not very command-line friendly environment. Otherwise, you might want to install the CygWin, start bash in terminal or the cmd.exe and use the grep as if you were under Linux.

Dummy00001
Thanks for the advise. I think I will try CygWin.
Elliott