Hi!
I need help . Can you tell me how can I view the Machine Code of a certain C++ Source Code? I have tried typing [DEBUG filename.exe] in the command prompt but how can I view the declarations of the variables used ? Your replies would be highly appreciated =)
Thanks Hi!
I need help . Can you tell me how can I view the Machine Code of a certain C++ Source Code? I have tried typing [DEBUG filename.exe] in the command prompt but how can I view the declarations of the variables used ? Your replies would be highly appreciated =)
Thanks

Viewing the "machine code" is pretty much a silly idea. More likely you want to see the assembly code that corresponds to the machine code. In that case there are two easy ways depending on whether you have the C++ code available or not.

If you have the source code, simply compile it with whatever switch your compiler provides for assembly output. Most likely you'll get some easy to read assembly with the matching C++ source interspersed as comments so you have a better idea what's going on.

If you don't have the source code but you do have an executable, you can use a tool like OllyDbg that gives you detailed information on the runtime execution as well as a good disassembly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.