From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10044 invoked by alias); 15 Apr 2002 16:06:40 -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 10027 invoked from network); 15 Apr 2002 16:06:38 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 15 Apr 2002 16:06:38 -0000 Received: from localhost.redhat.com (romulus.sfbay.redhat.com [172.16.27.251]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id JAA15747 for ; Mon, 15 Apr 2002 09:06:37 -0700 (PDT) Received: by localhost.redhat.com (Postfix, from userid 469) id 60BA911438; Mon, 15 Apr 2002 12:06:17 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15546.64121.241444.671211@localhost.redhat.com> Date: Mon, 15 Apr 2002 09:06:00 -0000 To: gdb-patches@sources.redhat.com Subject: [RFA] sim/ppc: stopgap for AltiVec X-SW-Source: 2002-04/txt/msg00535.txt.bz2 psim AltiVec support has not been committed yet, being still in copyright limbo. In the meantime, gdb will try to fetch/store AltiVec registers and the simulator will error out. This happens for all the powerpc-*sim targets. As a stopgap, how about this patch? Elena 2002-04-15 Elena Zannoni * sim_calls.c (sim_fetch_register, sim_store_register): Return -1 for AltiVec registers as a temporary stopgap. Index: sim_calls.c =================================================================== RCS file: /cvs/src/src/sim/ppc/sim_calls.c,v retrieving revision 1.3 diff -u -p -r1.3 sim_calls.c --- sim_calls.c 15 Dec 2001 05:08:44 -0000 1.3 +++ sim_calls.c 15 Apr 2002 16:04:51 -0000 @@ -194,7 +194,11 @@ sim_fetch_register (SIM_DESC sd, int reg But there are loops that just walk through the entire list of names and try to get everything. */ regname = gdbarch_register_name (current_gdbarch, regno); - if (! regname || regname[0] == '\0') + /* FIXME: ezannoni 2002/04/15 Remove the 'vr' and 'vscr' check + once AltiVec support is committed. */ + if (! regname || regname[0] == '\0' + || (regname[0] == 'v' && regname[1] == 'r') + || (strcmp (regname, "vscr") == 0)) return -1; TRACE(trace_gdb, ("sim_fetch_register(regno=%d(%s), buf=0x%lx)\n", @@ -215,7 +219,11 @@ sim_store_register (SIM_DESC sd, int reg /* See comments in sim_fetch_register, above. */ regname = gdbarch_register_name (current_gdbarch, regno); - if (! regname || regname[0] == '\0') + /* FIXME: ezannoni 2002/04/15 Remove the 'vr' and 'vscr' check + once AltiVec support is committed. */ + if (! regname || regname[0] == '\0' + || (regname[0] == 'v' && regname[1] == 'r') + || (strcmp (regname, "vscr") == 0)) return -1; TRACE(trace_gdb, ("sim_store_register(regno=%d(%s), buf=0x%lx)\n",