RFC: Moving disassembler_command to cli land and using newer disassembler code

Fernando Nasser fnasser@redhat.com
Mon Sep 30 14:52:00 GMT 2002


As soon as I can solve the small output differences between what is printed by 
the old code and what the new one prints I will be doing the following code 
migration, removing one more cli command from the library and making it use the 
disassembler code in disasm.c.

This will allow us to have an option to have disassembler in mixed source and 
assembler mode in the CLI as well.  But that is for when I come back.

The differences in the output are the "+0" in symbolic addresses (which I've 
mentioned in a separate message) and the leading zeros in the numeric addresses 
(see printouts below).  The old code used print_address_numeric() and the new 
code uses ui_out_field_core_addr().  W.r.t. this leading zero(s), I am not sure 
if we should print it or not (I can just update the test file).RFC:

Output with old code:
disassem foostatic
Dump of assembler code for function foostatic:
0x8048153 <foostatic>:  push   %ebp
0x8048154 <foostatic+1>:        mov    %esp,%ebp
0x8048156 <foostatic+3>:        pop    %ebp
0x8048157 <foostatic+4>:        ret
End of assembler dump.
(gdb) PASS: gdb.asm/asm-source.exp: look at static function

Output with new code:
disassem foostatic^M
Dump of assembler code for function foostatic:^M
0x08048153 <foostatic+0>:       push   %ebp^M
0x08048154 <foostatic+1>:       mov    %esp,%ebp^M
0x08048156 <foostatic+3>:       pop    %ebp^M
0x08048157 <foostatic+4>:       ret    ^M
End of assembler dump.^M
(gdb) FAIL: gdb.asm/asm-source.exp: look at static function




-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DISASM3.PATCH
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020930/68b1bd13/attachment.ksh>


More information about the Gdb-patches mailing list