This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Signal 4 from h8300-hms-run
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: msnyder at redhat dot com
- Cc: gdb at sources dot redhat dot com, rsandifo at redhat dot com, dvenkat at noida dot hcltech dot com
- Date: Thu, 03 Jul 2003 21:32:02 -0400 (EDT)
- Subject: Re: Signal 4 from h8300-hms-run
- References: <20030703.175942.48518372.kazu@cs.umass.edu><3F04C3DC.4050002@redhat.com>
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