Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* H8300 - Addition of Pseudo registers has broken displaying of CCR and EXR registers
@ 2003-12-01 13:06 Dhananjay R. Deshpande
  2003-12-01 16:03 ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Dhananjay R. Deshpande @ 2003-12-01 13:06 UTC (permalink / raw)
  To: gdb

Hi,

With the addition of Pseudo registers, "info reg" command doesn't show correct values of CCR and EXR registers. If you set these registers from GDB ( set $ccr = 0x55 )then it shows correct value but when the register is modified by instruction it always shows "0". This fails both with SIM and remote target ( stub )

Regards,
Dhananjay


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

* Re: H8300 - Addition of Pseudo registers has broken displaying of CCR and EXR registers
  2003-12-01 13:06 H8300 - Addition of Pseudo registers has broken displaying of CCR and EXR registers Dhananjay R. Deshpande
@ 2003-12-01 16:03 ` Andrew Cagney
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2003-12-01 16:03 UTC (permalink / raw)
  To: Dhananjay R. Deshpande; +Cc: gdb

> Hi,
> 
> With the addition of Pseudo registers, "info reg" command doesn't show correct values of CCR and EXR registers. If you set these registers from GDB ( set $ccr = 0x55 )then it shows correct value but when the register is modified by instruction it always shows "0". This fails both with SIM and remote target ( stub )

Sounds like it is never fetched, or being fetched from the wrong place 
:-(  What does "maint print raw-registers" (which dumps the raw state of 
the register cache) display?   Are you seeing calls to the simulator for 
that register?

A testsuite/gdb.arch/ testcase is going to help here.  Especially to 
ensure that it doesn't break again.

enjoy,
Andrew



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

* RE: H8300 - Addition of Pseudo registers has broken displaying of CCR and EXR registers
@ 2003-12-02 13:10 Dhananjay R. Deshpande
  0 siblings, 0 replies; 3+ messages in thread
From: Dhananjay R. Deshpande @ 2003-12-02 13:10 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb

Hi Andrew,

> -----Original Message-----
> From: Andrew Cagney [mailto:cagney@gnu.org]

> Sounds like it is never fetched, or being fetched from the 
> wrong place 
> :-(  

I think this is because difference in raw and pseudo register size. 
The pseudo registers are of one byte and due to big endian we are getting 
wrong byte.

>What does "maint print raw-registers" (which dumps the 
> raw state of 
> the register cache) display?  

It display <cooked> for CCR and print cooked-registers displays zero.

> Are you seeing calls to the 
> simulator for 
> that register?

Yes.

> 
> A testsuite/gdb.arch/ testcase is going to help here.  Especially to 
> ensure that it doesn't break again.

I will try but its going to take some time to understand the test framework.
Here is the C code which can be used for testing - 

int main()
{
	asm("mov #0x55, r0l");
	asm("ldc r0l, ccr");
	asm("stc ccr, r1l");
}

Regards,
Dhananjay


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

end of thread, other threads:[~2003-12-02 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-01 13:06 H8300 - Addition of Pseudo registers has broken displaying of CCR and EXR registers Dhananjay R. Deshpande
2003-12-01 16:03 ` Andrew Cagney
2003-12-02 13:10 Dhananjay R. Deshpande

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