Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* MIPS 64 bit addressing query
@ 2007-08-06  0:57 Vinod pandarinathan
  2007-08-06  1:20 ` David Daney
  2007-08-06  1:51 ` Daniel Jacobowitz
  0 siblings, 2 replies; 11+ messages in thread
From: Vinod pandarinathan @ 2007-08-06  0:57 UTC (permalink / raw)
  To: gdb

Hi Experts,


I found that gdb6.4.1 is sign extending the
PC before comparing it to the breakpoint address[bpt->address].

Sign extension happens in mips-tdep.c

/* MIPS believes that the PC has a sign extended value.  Perhaps the
   all registers should be sign extended for simplicity? */

static CORE_ADDR
mips_read_pc (ptid_t ptid)
{
  return read_signed_register_pid (mips_regnum (current_gdbarch)->pc, ptid);
}
The target suspends at the breakpoint, but the debugger is not able to
identify the associated breakpoint as [unsigned value is compared to a
64 bit sign extended value].

We are using MIPS 3 ISA and since breakpoint is set at an address
where the 32nd bit is set to 1 the 64 bit sign extended values does
not compare with the unsigned
break point address.

Can you please explain how we can fix the problem? Should I sign
extend the break point address too ?


Thanks
Vinod.


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

end of thread, other threads:[~2007-08-14 22:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-06  0:57 MIPS 64 bit addressing query Vinod pandarinathan
2007-08-06  1:20 ` David Daney
2007-08-06  1:51 ` Daniel Jacobowitz
2007-08-06 18:24   ` Vinod pandarinathan
2007-08-06 18:36     ` Daniel Jacobowitz
2007-08-06 18:37     ` Paul Koning
2007-08-14 20:20       ` Vinod pandarinathan
2007-08-14 20:32         ` Daniel Jacobowitz
2007-08-14 21:52           ` Vinod pandarinathan
2007-08-14 21:59             ` Daniel Jacobowitz
2007-08-14 22:38               ` Vinod pandarinathan

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