This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
sim/1295: abort() in h8300 simulator:
- From: uros at kss-loka dot si
- To: gdb-gnats at sources dot redhat dot com
- Date: 23 Jul 2003 07:23:18 -0000
- Subject: sim/1295: abort() in h8300 simulator:
- Reply-to: uros at kss-loka dot si
>Number: 1295
>Category: sim
>Synopsis: abort() in h8300 simulator:
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 23 07:28:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: uros@kss-loka.si
>Release: gdb-5.3
>Organization:
>Environment:
>Description:
in gdb/config/h8300/tm-h8300.h, NUM_REGS is #defined to 14, and gdbsim_fetch_register() calls sim_fetch register() functions with values from 0 .. 13.
In sim/h8300/compile.c, around line 1998, we have:
if (!h8300smode && rn >=EXR_REGNUM)
rn++;
which now increases rn from 13 to 14. And because there is no register witn index 14, abort() in sim_fetc_register() is triggered.
>How-To-Repeat:
>Fix:
change "abort();" in sim/h8300/compile.c, function sim_fetch_register(), line 2003 to "return 0;"
(Perhaps also the abort() in sim_store_register() should be changed to "return 0;" ?)
>Release-Note:
>Audit-Trail:
>Unformatted: