From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4334 invoked by alias); 18 Apr 2002 22:43:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4327 invoked from network); 18 Apr 2002 22:43:11 -0000 Received: from unknown (HELO mms1.broadcom.com) (63.70.210.58) by sources.redhat.com with SMTP; 18 Apr 2002 22:43:11 -0000 Received: from 63.70.210.1 by mms1.broadcom.com with ESMTP (Broadcom MMS-1 SMTP Relay (MMS v4.7)); Thu, 18 Apr 2002 15:42:44 -0700 X-Server-Uuid: 1e1caf3a-b686-11d4-a6a3-00508bfc9ae5 Received: from dt-sj3-118.sj.broadcom.com (dt-sj3-118 [10.21.64.118]) by mail-sj1-5.sj.broadcom.com (8.12.2/8.12.2) with ESMTP id g3IMhA1S024096; Thu, 18 Apr 2002 15:43:10 -0700 (PDT) Received: (from cgd@localhost) by dt-sj3-118.sj.broadcom.com ( 8.9.1/SJ8.9.1) id PAA11640; Thu, 18 Apr 2002 15:43:09 -0700 (PDT) To: aoliva@redhat.com cc: gdb-patches@sources.redhat.com, fche@redhat.com, echristo@redhat.com Subject: Re: MIPS simulator initializes LSI pmon vector table with code References: From: cgd@broadcom.com Date: Thu, 18 Apr 2002 15:43:00 -0000 In-Reply-To: aoliva@redhat.com's message of "Thu, 18 Apr 2002 19:47:04 +0000 (UTC)" Message-ID: MIME-Version: 1.0 X-WSS-ID: 10A1946E390219-01-01 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00615.txt.bz2 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