From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10725 invoked by alias); 30 Oct 2002 04:13:18 -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 10709 invoked from network); 30 Oct 2002 04:13:17 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 30 Oct 2002 04:13:17 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 186l9r-0006xM-00 for ; Tue, 29 Oct 2002 23:12:47 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 186kEr-0008QS-00 for ; Tue, 29 Oct 2002 23:13:53 -0500 Date: Tue, 29 Oct 2002 20:13:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: PATCH: Fix mips-linux native Message-ID: <20021030041353.GA32309@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2002-10/txt/msg00583.txt.bz2 Scratch one off my TODO list. Should this be taken care of at a higher level? And if read_register_bytes is at the appropriate level to handle it, then there's a similar check missing in write_register_bytes. read_register_bytes won't read from a register with no REGISTER_NAME, but write_register_bytes will happily write them anyway. Committed to get my port moving again. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2002-10-29 Daniel Jacobowitz * mips-linux-nat.c (mips_linux_cannot_fetch_register): Don't fetch registers without a name. (mips_linux_cannot_store_register): Don't store registers without a name. Index: mips-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/mips-linux-nat.c,v retrieving revision 1.3 diff -u -p -r1.3 mips-linux-nat.c --- mips-linux-nat.c 17 Sep 2002 23:26:01 -0000 1.3 +++ mips-linux-nat.c 30 Oct 2002 04:07:15 -0000 @@ -29,6 +29,8 @@ int mips_linux_cannot_fetch_register (int regno) { + if (REGISTER_NAME (regno)[0] == 0) + return 1; if (regno == PS_REGNUM) return 1; else if (regno == ZERO_REGNUM) @@ -40,6 +42,8 @@ mips_linux_cannot_fetch_register (int re int mips_linux_cannot_store_register (int regno) { + if (REGISTER_NAME (regno)[0] == 0) + return 1; if (regno == PS_REGNUM) return 1; else if (regno == ZERO_REGNUM)