Mail Archives: djgpp/1994/12/09/01:52:55
>>>>> "ANTHONY" == ANTHONY APPLEYARD <A DOT APPLEYARD AT fs1 DOT mt DOT umist DOT ac DOT uk> writes:
ANTHONY> In djgpp I found a file called
ANTHONY> C:\DJGPP\SRC\GAS-2.3\OPCODES\DISASSEM.C . Is it part of a
ANTHONY> machine code - to - assembler language disassambler or
ANTHONY> decompiler built into the Gnu Assembler? If so, how do I
ANTHONY> call and use it?
I believe this code is used by gdb. If you want to disassemble
executables you built with djgpp, you can run gdb in batch mode and
have it run a "disassemble" command on the executable. I've written a
program that uses gdb as the engine to disassemble some 68k-based
apps; it's not very hard.
If you want to disassemble arbitrary 32-bit binary images, you can
write a little program to generate a ".s" file containing a "_main"
symbol, a few random assembler directives, and a bunch of .long
directives specifying the bytes for the code of interest. Assemble
it, link it, and run gdb on it as described above. It's easy enough
to automate the process.
-Mat
- Raw text -