From: Alexandre Oliva <aoliva@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: MIPS simulator initializes LSI pmon vector table with code
Date: Thu, 18 Apr 2002 12:46:00 -0000 [thread overview]
Message-ID: <orlmbkre4n.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
[-- Attachment #1: Type: text/plain, Size: 518 bytes --]
There's a chunk of memory in LSI pmon that is supposed to contain
pointers to `system call' handlers. However, sim_open() will
clobber the valid addresses it stores in this table with code bare
code (as opposed to pointers to code) that was meant to catch invalid
accesses. This is obviously wrong. I'm checking this in, since Frank
Ch. Eigler and Eric Christopher agreed it was a reasonable thing to
do. I'll leave the complete fix for someone who has a real
understanding of what was supposed to be done there.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sim-mips-no-code-in-vtable.patch --]
[-- Type: text/x-patch, Size: 1083 bytes --]
Index: sim/mips/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* interp.c (sim_open): Disable chunk of code that wrote code in
vector table entries.
Index: sim/mips/interp.c
===================================================================
RCS file: /cvs/src/src/sim/mips/interp.c,v
retrieving revision 1.9
diff -u -p -r1.9 interp.c
--- sim/mips/interp.c 20 Mar 2002 01:35:13 -0000 1.9
+++ sim/mips/interp.c 18 Apr 2002 19:41:48 -0000
@@ -698,10 +698,14 @@ sim_open (kind, cb, abfd, argv)
sim_write (sd, 0x80000000, (char *) halt, sizeof (halt));
sim_write (sd, 0x80000180, (char *) halt, sizeof (halt));
sim_write (sd, 0x80000200, (char *) halt, sizeof (halt));
+#if 0
+ /* This is wrong. We're not supposed to write code to the
+ vector tables, but rather pointers to code. */
/* XXX: Write here unconditionally? */
sim_write (sd, 0xBFC00200, (char *) halt, sizeof (halt));
sim_write (sd, 0xBFC00380, (char *) halt, sizeof (halt));
sim_write (sd, 0xBFC00400, (char *) halt, sizeof (halt));
+#endif
}
}
[-- Attachment #3: Type: text/plain, Size: 289 bytes --]
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
next reply other threads:[~2002-04-18 19:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-18 12:46 Alexandre Oliva [this message]
2002-04-18 13:44 ` Andrew Cagney
2002-04-19 14:00 ` Alexandre Oliva
[not found] ` <mailpost.1019159224.1687@news-sj1-1>
2002-04-18 15:43 ` cgd
[not found] ` <1019238909.1702.35.camel@ghostwheel.cygnus.com>
[not found] ` <yov54ri7pnbe.fsf@broadcom.com>
2002-04-19 11:36 ` Eric Christopher
2002-04-19 12:06 ` cgd
2002-04-19 12:48 ` Eric Christopher
2002-04-19 14:07 ` Alexandre Oliva
2002-04-19 15:32 ` cgd
2002-04-22 12:09 ` Alexandre Oliva
2002-04-22 12:30 ` cgd
2002-04-23 18:24 ` Alexandre Oliva
[not found] ` <mailpost.1019611460.15770@news-sj1-1>
2002-04-24 11:19 ` cgd
2002-04-20 9:43 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=orlmbkre4n.fsf@free.redhat.lsd.ic.unicamp.br \
--to=aoliva@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox