* Disassembly difference
@ 2000-08-03 2:42 Gerwyn Davies
2000-08-08 17:04 ` Andrew Cagney
0 siblings, 1 reply; 2+ messages in thread
From: Gerwyn Davies @ 2000-08-03 2:42 UTC (permalink / raw)
To: GDB
Hello,
I'm experiencing a difference in opinion between the disassembly produced by
objdump and that produced by GDB. As these two traces show. Can anyone offer
an explanation.
GDB TRACE:
This GDB was configured as "--host=i586-pc-cygwin32 --target=mips-tx39-elf".
(gdb) target remote com1
Remote debugging using com1
0xbfc09fbc in ?? ()
(gdb) load led.rom
Loading section .text, size 0xe34 lma 0xa0008000
Loading section .ctors, size 0x8 lma 0xa0020e34
Loading section .dtors, size 0x8 lma 0xa0020e3c
Loading section .data, size 0x720 lma 0xa0008e34
Loading section .sdata, size 0x1c lma 0xa0009554
Start address 0xa0020000 , load size 5504
Transfer rate: 1693 bits/sec.
(gdb) disas 0xa0020000 0xa0020030
Dump of assembler code from 0xa0020000 to 0xa0020030:
0xa0020000: nop
0xa0020004: sllv $zero,$zero,$zero
0xa0020008: 0x2010000
0xa002000c: lb $zero,512($a0)
0xa0020010: nop
0xa0020014: nop
0xa0020018: sll $zero,$s0,0x0
0xa002001c: 0x1
0xa0020020: 0x10a001
0xa0020024: nop
0xa0020028: sll $zero,$zero,0x8
0xa002002c: nop
End of assembler dump.
OBJDUMP TRACE:
00000000a0020000 <_start>:
a0020000: 00000000 nop
00000000a0020004 <zerobss>:
a0020004: 3c02a004 lui $v0,0xa004
a0020008: 2442073c addiu $v0,$v0,1852
a002000c: 3c03a004 lui $v1,0xa004
a0020010: 24630850 addiu $v1,$v1,2128
a0020014: ac400000 sw $zero,0($v0)
a0020018: 24420004 addiu $v0,$v0,4
a002001c: 0062082b sltu $at,$v1,$v0
a0020020: 1020fffc beqz $at,a0020014 <zerobss+0x10>
...
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Disassembly difference
2000-08-03 2:42 Disassembly difference Gerwyn Davies
@ 2000-08-08 17:04 ` Andrew Cagney
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2000-08-08 17:04 UTC (permalink / raw)
To: Gerwyn Davies; +Cc: GDB
Gerwyn Davies wrote:
>
> Hello,
>
> I'm experiencing a difference in opinion between the disassembly produced by
> objdump and that produced by GDB. As these two traces show. Can anyone offer
> an explanation.
GDB would be using a different dissassembler to objdump - most likely it
is selecting the default mips3 (?) dissassembler where as objdump will
have selected the tx39 variant. Look for how tm_print_insn is being
(incorrectly?) set.
Andrew
>
> GDB TRACE:
> This GDB was configured as "--host=i586-pc-cygwin32 --target=mips-tx39-elf".
> (gdb) target remote com1
> Remote debugging using com1
> 0xbfc09fbc in ?? ()
> (gdb) load led.rom
> Loading section .text, size 0xe34 lma 0xa0008000
> Loading section .ctors, size 0x8 lma 0xa0020e34
> Loading section .dtors, size 0x8 lma 0xa0020e3c
> Loading section .data, size 0x720 lma 0xa0008e34
> Loading section .sdata, size 0x1c lma 0xa0009554
> Start address 0xa0020000 , load size 5504
> Transfer rate: 1693 bits/sec.
> (gdb) disas 0xa0020000 0xa0020030
> Dump of assembler code from 0xa0020000 to 0xa0020030:
> 0xa0020000: nop
> 0xa0020004: sllv $zero,$zero,$zero
> 0xa0020008: 0x2010000
> 0xa002000c: lb $zero,512($a0)
> 0xa0020010: nop
> 0xa0020014: nop
> 0xa0020018: sll $zero,$s0,0x0
> 0xa002001c: 0x1
> 0xa0020020: 0x10a001
> 0xa0020024: nop
> 0xa0020028: sll $zero,$zero,0x8
> 0xa002002c: nop
> End of assembler dump.
>
> OBJDUMP TRACE:
> 00000000a0020000 <_start>:
> a0020000: 00000000 nop
>
> 00000000a0020004 <zerobss>:
> a0020004: 3c02a004 lui $v0,0xa004
> a0020008: 2442073c addiu $v0,$v0,1852
> a002000c: 3c03a004 lui $v1,0xa004
> a0020010: 24630850 addiu $v1,$v1,2128
> a0020014: ac400000 sw $zero,0($v0)
> a0020018: 24420004 addiu $v0,$v0,4
> a002001c: 0062082b sltu $at,$v1,$v0
> a0020020: 1020fffc beqz $at,a0020014 <zerobss+0x10>
> ...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-08-08 17:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-03 2:42 Disassembly difference Gerwyn Davies
2000-08-08 17:04 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).