From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7604 invoked by alias); 21 Jul 2003 22:57:59 -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 7594 invoked from network); 21 Jul 2003 22:57:54 -0000 Received: from unknown (HELO oberon.asicdesigners.com) (12.98.126.212) by sources.redhat.com with SMTP; 21 Jul 2003 22:57:54 -0000 Received: from oberon.asicdesigners.com (localhost.asicdesigners.com [127.0.0.1]) by oberon.asicdesigners.com (8.12.9/8.12.9) with ESMTP id h6LMvk4w021187; Mon, 21 Jul 2003 15:57:46 -0700 (PDT) (envelope-from steve@oberon.asicdesigners.com) Received: (from steve@localhost) by oberon.asicdesigners.com (8.12.9/8.12.9/Submit) id h6LMvkcA021186; Mon, 21 Jul 2003 15:57:46 -0700 (PDT) Message-Id: <200307212257.h6LMvkcA021186@oberon.asicdesigners.com> From: steve@asicdesigners.com (Steve Watt) Date: Mon, 21 Jul 2003 22:57:00 -0000 In-Reply-To: Andrew Cagney "Re: [patch rfc] Add NUM_REGS pseudo regs to MIPS" (Jul 21, 18:07) To: Andrew Cagney , Steve Watt Subject: Re: [patch rfc] Add NUM_REGS pseudo regs to MIPS Cc: gdb-patches@sources.redhat.com X-SW-Source: 2003-07/txt/msg00383.txt.bz2 On Jul 21, 18:07, Andrew Cagney wrote: } Subject: Re: [patch rfc] Add NUM_REGS pseudo regs to MIPS } } > (top-gdb) info stack } > #0 internal_error (file=0x824e580 "../../combined/gdb/mips-tdep.c", line=5671, } > string=0x824e555 "%s: Assertion `%s' failed.") at ../../combined/gdb/utils.c:807 } > #1 0x080dd45c in mips_register_sim_regno (regnum=90) } > at ../../combined/gdb/mips-tdep.c:5671 } > #2 0x080cb037 in gdbarch_register_sim_regno (gdbarch=0x83179d8, reg_nr=90) } > at ../../combined/gdb/gdbarch.c:3983 } > #3 0x08127e0f in gdbsim_fetch_register (regno=90) at ../../combined/gdb/remote-sim.c:299 } > #4 0x08094450 in legacy_read_register_gen (regnum=90, } > myaddr=0xbffff0f0 "Ððÿ¿Øy1\b\030ñÿ¿\020\227\f\bØy1\bZ") } > at ../../combined/gdb/regcache.c:730 } > #5 0x0809453e in regcache_raw_read (regcache=0x8323000, regnum=90, buf=0xbffff0f0) } > at ../../combined/gdb/regcache.c:748 } > #6 0x0809499a in regcache_cooked_read (regcache=0x8323000, regnum=90, buf=0xbffff0f0) } > at ../../combined/gdb/regcache.c:838 } } It went wrong here. It tests (regnum < ->nr_raw_registers), but for } legacy targets NR_RAW_REGISTERS == NUM_REGS + NUM_PSEUDO_REGS :-( } } The correct fix is to just delete a heap of code, however ... } } From regcache.c: } } > if ((!gdbarch_pseudo_register_read_p (gdbarch) } > && !gdbarch_pseudo_register_write_p (gdbarch) } > && !gdbarch_register_type_p (gdbarch)) } > || REGISTER_BYTE_P () || REGISTER_RAW_SIZE_P ()) } > { } > descr->legacy_p = 1; } > init_legacy_regcache_descr (gdbarch, descr); } > return descr; } > } } } can you try removing the two || ... clauses I added 2003-07-03? } } I think my change may have fixed some legacy code but broke others :-( Well, that fixes it. That's my favorite kind of bug fix, but also my favorite (not!) kind of repercussion. At least I've got a toy I can play with again! Thanks for the help, and good luck on the Right Fix. Let me know if there's something more you want checked. Steve -- Steve Watt KD6GGD PP-ASEL-IA Email at home: steve@watt.com Chelsio Communications http://www.chelsio.com/ work: steve@chelsio.com 510 N. Pastoria Ave Voice: +1 408 962 3627 Sunnyvale, CA, USA, 94085 Fax: +1 408 730 2580