Linux MIPS Architecture development
 help / color / mirror / Atom feed
* gdb disassemble bug
@ 2002-02-08 21:58 Florian Lohoff
  2002-02-08 22:10 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Lohoff @ 2002-02-08 21:58 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 721 bytes --]


Hi,
while debugging arcboot and some interesting crashes related to caching
etc i found a disassemble bug in gdb 

0x88166b58 <probe_scache+188>:	mtc0	zero,gp
0x88166b5c <probe_scache+192>:	nop
0x88166b60 <probe_scache+196>:	mtc0	zero,sp
0x88166b64 <probe_scache+200>:	nop

mtc0/mfc0 do not address cpu registers but CP0 registers. The decoding
as "gp" or "sp" is not correct. These are "TagLo" and "TagHi".

If somebody has an idea why the kernel crashes when writing to
TagHi - Speak up ... This only seems to happen sometimes not always.

Flo
-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
Nine nineth on september the 9th              Welcome to the new billenium

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb disassemble bug
  2002-02-08 21:58 gdb disassemble bug Florian Lohoff
@ 2002-02-08 22:10 ` Daniel Jacobowitz
  2002-02-08 22:18   ` Florian Lohoff
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-02-08 22:10 UTC (permalink / raw)
  To: Florian Lohoff; +Cc: linux-mips

On Fri, Feb 08, 2002 at 10:58:51PM +0100, Florian Lohoff wrote:
> 
> Hi,
> while debugging arcboot and some interesting crashes related to caching
> etc i found a disassemble bug in gdb 
> 
> 0x88166b58 <probe_scache+188>:	mtc0	zero,gp
> 0x88166b5c <probe_scache+192>:	nop
> 0x88166b60 <probe_scache+196>:	mtc0	zero,sp
> 0x88166b64 <probe_scache+200>:	nop
> 
> mtc0/mfc0 do not address cpu registers but CP0 registers. The decoding
> as "gp" or "sp" is not correct. These are "TagLo" and "TagHi".

  - what version of GDB?
  - does objdump do the same thing?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb disassemble bug
  2002-02-08 22:10 ` Daniel Jacobowitz
@ 2002-02-08 22:18   ` Florian Lohoff
  2002-02-08 22:31     ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Lohoff @ 2002-02-08 22:18 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: linux-mips

[-- Attachment #1: Type: text/plain, Size: 1618 bytes --]

On Fri, Feb 08, 2002 at 05:10:51PM -0500, Daniel Jacobowitz wrote:
> On Fri, Feb 08, 2002 at 10:58:51PM +0100, Florian Lohoff wrote:
> > 0x88166b58 <probe_scache+188>:	mtc0	zero,gp
> > 0x88166b5c <probe_scache+192>:	nop
> > 0x88166b60 <probe_scache+196>:	mtc0	zero,sp
> > 0x88166b64 <probe_scache+200>:	nop
> > 
> > mtc0/mfc0 do not address cpu registers but CP0 registers. The decoding
> > as "gp" or "sp" is not correct. These are "TagLo" and "TagHi".
> 
>   - what version of GDB?
>   - does objdump do the same thing?

reset:~# gdb --version
GNU gdb 5.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "mips-linux".
reset:~# dpkg -l gdb
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  gdb            5.1-1          The GNU Debugger


Objdump does seem to get this right:

88166b58:	4080e000 	mtc0	zero,$28
88166b60:	4080e800 	mtc0	zero,$29

Flo
-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
Nine nineth on september the 9th              Welcome to the new billenium

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gdb disassemble bug
  2002-02-08 22:18   ` Florian Lohoff
@ 2002-02-08 22:31     ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-02-08 22:31 UTC (permalink / raw)
  To: Florian Lohoff; +Cc: linux-mips

On Fri, Feb 08, 2002 at 11:18:49PM +0100, Florian Lohoff wrote:
> On Fri, Feb 08, 2002 at 05:10:51PM -0500, Daniel Jacobowitz wrote:
> > On Fri, Feb 08, 2002 at 10:58:51PM +0100, Florian Lohoff wrote:
> > > 0x88166b58 <probe_scache+188>:	mtc0	zero,gp
> > > 0x88166b5c <probe_scache+192>:	nop
> > > 0x88166b60 <probe_scache+196>:	mtc0	zero,sp
> > > 0x88166b64 <probe_scache+200>:	nop
> > > 
> > > mtc0/mfc0 do not address cpu registers but CP0 registers. The decoding
> > > as "gp" or "sp" is not correct. These are "TagLo" and "TagHi".
> > 
> >   - what version of GDB?
> >   - does objdump do the same thing?
> 
> reset:~# gdb --version
> GNU gdb 5.1
> Copyright 2001 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "mips-linux".
> reset:~# dpkg -l gdb
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
> ||/ Name           Version        Description
> +++-==============-==============-============================================
> ii  gdb            5.1-1          The GNU Debugger

OK.  You may want to try a CVS snapshot; I'm 99% certain that this was
fixed after gdb 5.1 branched.


-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-02-08 22:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-08 21:58 gdb disassemble bug Florian Lohoff
2002-02-08 22:10 ` Daniel Jacobowitz
2002-02-08 22:18   ` Florian Lohoff
2002-02-08 22:31     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox