disassembling code on system V

Joel Clark joel at intelisc.UUCP
Thu Feb 18 02:32:05 AEST 1988


In article <5740018 at hpfcdc.HP.COM> stroyan at hpfcdc.HP.COM (Mike Stroyan) writes:
>>I want to disassemble some library code on a Sys V.2 system to get an idea how
>>it executes.  But how do I just say:
>>
>>	disassemble from Address A to Address B, and if you understand the symbols,
>>print them out too.
>>
>>Any magic sequence of commands in adb or sdb?  Or try something else?  
>
>You can disassemble with adb by typing "<symbol>?i" or "<address>?i".
>It will take an instruction count before "i", but I don't know any way
>to specify an address range rather than a number of instructions.  A
>simple way to use this as a disassembler is to make a command file
>containing "0?i" followed by a few thousand blank lines, then executing
>"adb a.out < command_file > backlist".  The many blank lines will repeat
>the single "?i" command, which works better than a large count because
>it labels every instruction with a symbolic address.  
>
>Mike Stroyan, [hplabs!]hpfcla!stroyan

In `adb` displaying addresses can be achieved with "symbol,200?ia" or 
"address,200?ia".   This will print 200 lines of disassembly with addresses 
starting at symbol.  The '?' means to display from the text (code) section, 
any address not found in the text section will display "Text address not found" 
messages.  In `sdb` this would be done by "symbol?200i" or "address:?200i". 



More information about the Comp.unix.questions mailing list