www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/09/01:52:55

Date: Thu, 8 Dec 94 19:36 MST
From: mat AT ardi DOT com (Mat Hostetter)
To: ANTHONY APPLEYARD <A DOT APPLEYARD AT fs1 DOT mt DOT umist DOT ac DOT uk>
Cc: DJGPP AT sun DOT soe DOT clarkson DOT edu
Subject: Re: A disassembler in djgpp?
References: <DEA4E50DC1 AT fs1 DOT mt DOT umist DOT ac DOT uk>

>>>>> "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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019