This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sim/1295: abort() in h8300 simulator:


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]