public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Signal 4 from h8300-hms-run
@ 2003-07-03 22:00 Kazu Hirata
  2003-07-03 23:09 ` Kazu Hirata
  2003-07-04  0:01 ` Michael Snyder
  0 siblings, 2 replies; 5+ messages in thread
From: Kazu Hirata @ 2003-07-03 22:00 UTC (permalink / raw)
  To: gdb; +Cc: msnyder, rsandifo, dvenkat

Hi,

While playing with the mainline of gdb, I noticed that h8300-hms-run
does not seem to simulate the following.

	.h8300h
	.section .rodata
	.align 2
.L9:
	.long	1234
	.align 1
	.global _main
_main:
	sub.l	er0,er0
	mov.l	@(.L9,er0),er0
	sub.l	er0,er0
	rts
	.end

The expected output is nothing, but h8300-hms-run says

  program stopped with signal 4.

If I change @(.L9,er0) to @.L9, I don't get the error any more.  I am
currently getting a lot of failures in gcc testsuite, and I am
wondering if they all come from the same reason.  I haven't figures
out how this happens or which patch is causing this.  The problem
occurs with or without

  http://sources.redhat.com/ml/gdb-patches/2003-07/msg00053.html

Kazu Hirata

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

* Re: Signal 4 from h8300-hms-run
  2003-07-03 22:00 Signal 4 from h8300-hms-run Kazu Hirata
@ 2003-07-03 23:09 ` Kazu Hirata
  2003-07-04  0:01 ` Michael Snyder
  1 sibling, 0 replies; 5+ messages in thread
From: Kazu Hirata @ 2003-07-03 23:09 UTC (permalink / raw)
  To: gdb; +Cc: msnyder, rsandifo, dvenkat

Hi,

> While playing with the mainline of gdb, I noticed that h8300-hms-run
> does not seem to simulate the following.

The problem is due to one of the following patch from Richard
Sandiford.  Probably the first one is related to this problem as it
touches "register + offset" addressing.

http://sources.redhat.com/ml/binutils-cvs/2003-06/msg00233.html
http://sources.redhat.com/ml/binutils-cvs/2003-06/msg00234.html

Kazu Hirata

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

* Re: Signal 4 from h8300-hms-run
  2003-07-03 22:00 Signal 4 from h8300-hms-run Kazu Hirata
  2003-07-03 23:09 ` Kazu Hirata
@ 2003-07-04  0:01 ` Michael Snyder
  2003-07-04  1:32   ` Kazu Hirata
  2003-07-04  2:14   ` Kazu Hirata
  1 sibling, 2 replies; 5+ messages in thread
From: Michael Snyder @ 2003-07-04  0:01 UTC (permalink / raw)
  To: Kazu Hirata; +Cc: gdb, rsandifo, dvenkat

Kazu Hirata wrote:
> Hi,
> 
> While playing with the mainline of gdb, I noticed that h8300-hms-run
> does not seem to simulate the following.
> 
> 	.h8300h
> 	.section .rodata
> 	.align 2
> .L9:
> 	.long	1234
> 	.align 1
> 	.global _main
> _main:
> 	sub.l	er0,er0
> 	mov.l	@(.L9,er0),er0
> 	sub.l	er0,er0
> 	rts
> 	.end
> 
> The expected output is nothing, but h8300-hms-run says
> 
>   program stopped with signal 4.
> 
> If I change @(.L9,er0) to @.L9, I don't get the error any more.  I am
> currently getting a lot of failures in gcc testsuite, and I am
> wondering if they all come from the same reason.  I haven't figures
> out how this happens or which patch is causing this.  The problem
> occurs with or without
> 
>   http://sources.redhat.com/ml/gdb-patches/2003-07/msg00053.html

Hmmm... There's a subtle difference between constants that are
allowed to be symbols, and constants that aren't.  But if it
assembles, it should run.

Can you check to see if the assembler output is correct?

Michael



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

* Re: Signal 4 from h8300-hms-run
  2003-07-04  0:01 ` Michael Snyder
@ 2003-07-04  1:32   ` Kazu Hirata
  2003-07-04  2:14   ` Kazu Hirata
  1 sibling, 0 replies; 5+ messages in thread
From: Kazu Hirata @ 2003-07-04  1:32 UTC (permalink / raw)
  To: msnyder; +Cc: gdb, rsandifo, dvenkat

Hi Michael,

> > While playing with the mainline of gdb, I noticed that h8300-hms-run
> > does not seem to simulate the following.
> > 
> > 	.h8300h
> > 	.section .rodata
> > 	.align 2
> > .L9:
> > 	.long	1234
> > 	.align 1
> > 	.global _main
> > _main:
> > 	sub.l	er0,er0
> > 	mov.l	@(.L9,er0),er0
> > 	sub.l	er0,er0
> > 	rts
> > 	.end
> > 
> > The expected output is nothing, but h8300-hms-run says
> > 
> >   program stopped with signal 4.
> > 
> > If I change @(.L9,er0) to @.L9, I don't get the error any more.  I am
> > currently getting a lot of failures in gcc testsuite, and I am
> > wondering if they all come from the same reason.  I haven't figures
> > out how this happens or which patch is causing this.  The problem
> > occurs with or without
> > 
> >   http://sources.redhat.com/ml/gdb-patches/2003-07/msg00053.html
> 
> Hmmm... There's a subtle difference between constants that are
> allowed to be symbols, and constants that aren't.  But if it
> assembles, it should run.
> 
> Can you check to see if the assembler output is correct?

OK.  I tried two versions of binutils, 2003-06-25 15:00GMT and
2003-06-25 16:00GMT.  They generate different output.  Specifically,
the former translates "mov.l @..." into "mov.w @(.L9,er0),er0",
whereas the latter correctly translates.  I confirmed that the binary
of the latter is correct.  Feeding this binary into gdb at "2003-06-25
16:00GMT" fails, so the issue seems to be on the simulator side.

Kazu Hirata

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

* Re: Signal 4 from h8300-hms-run
  2003-07-04  0:01 ` Michael Snyder
  2003-07-04  1:32   ` Kazu Hirata
@ 2003-07-04  2:14   ` Kazu Hirata
  1 sibling, 0 replies; 5+ messages in thread
From: Kazu Hirata @ 2003-07-04  2:14 UTC (permalink / raw)
  To: msnyder; +Cc: gdb, rsandifo, dvenkat

Hi Michael,

> > While playing with the mainline of gdb, I noticed that h8300-hms-run
> > does not seem to simulate the following.
> > 
> > 	.h8300h
> > 	.section .rodata
> > 	.align 2
> > .L9:
> > 	.long	1234
> > 	.align 1
> > 	.global _main
> > _main:
> > 	sub.l	er0,er0
> > 	mov.l	@(.L9,er0),er0
> > 	sub.l	er0,er0
> > 	rts
> > 	.end
> > 
> > The expected output is nothing, but h8300-hms-run says
> > 
> >   program stopped with signal 4.
> > 
> > If I change @(.L9,er0) to @.L9, I don't get the error any more.  I am
> > currently getting a lot of failures in gcc testsuite, and I am
> > wondering if they all come from the same reason.  I haven't figures
> > out how this happens or which patch is causing this.  The problem
> > occurs with or without
> > 
> >   http://sources.redhat.com/ml/gdb-patches/2003-07/msg00053.html
> 
> Hmmm... There's a subtle difference between constants that are
> allowed to be symbols, and constants that aren't.  But if it
> assembles, it should run.
> 
> Can you check to see if the assembler output is correct?

I just built latest mainline gdb again, and I noticed that the error
is now gone.  All this might be simply due to my oversight and/or
operator error.  I'll run gcc testsuite to see what happens.

Sorry for taking up your time.

Kazu Hirata

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

end of thread, other threads:[~2003-07-04  2:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03 22:00 Signal 4 from h8300-hms-run Kazu Hirata
2003-07-03 23:09 ` Kazu Hirata
2003-07-04  0:01 ` Michael Snyder
2003-07-04  1:32   ` Kazu Hirata
2003-07-04  2:14   ` Kazu Hirata

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).