This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: MIPS simulator initializes LSI pmon vector table with code
- From: cgd at broadcom dot com
- To: aoliva at redhat dot com
- Cc: gdb-patches at sources dot redhat dot com,fche at redhat dot com,echristo at redhat dot com
- Date: 18 Apr 2002 15:43:09 -0700
- Subject: Re: MIPS simulator initializes LSI pmon vector table with code
- References: <orlmbkre4n.fsf@free.redhat.lsd.ic.unicamp.br><mailpost.1019159224.1687@news-sj1-1>
At Thu, 18 Apr 2002 19:47:04 +0000 (UTC), "Alexandre Oliva" wrote:
> There's a chunk of memory in LSI pmon that is supposed to contain
> pointers to `system call' handlers.
What Andrew said, and...
Actually, your patch seems incorrect.
The code at 0xbfc00200, etc., _ARE_ supposed to be code; in MIPS
they're various exception entry points. If they are data which is
invalid code, the wrong thing will almost certainly happen.
I cannot believe that any monitor does what you describe (puts a table
of addresses here), as doing so (instead of putting vectors there)
would be fundamentally incompatible with the MIPS architecture.
> 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.
Please justify this further, preferably with a pointer to
code that is broken by the old behaviour or to documentation.
Otherwise, I think this should almost certainly be backed out...
cgd