From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2548 invoked by alias); 9 Dec 2001 04:41:58 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 2441 invoked from network); 9 Dec 2001 04:40:39 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 9 Dec 2001 04:40:39 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16CvlL-0003PR-00; Sat, 08 Dec 2001 23:40:27 -0500 Date: Sat, 08 Dec 2001 20:41:00 -0000 From: Daniel Jacobowitz To: ac131313@cygnus.com, gdb@sources.redhat.com Subject: Regcache changes broke MIPS Message-ID: <20011208234027.A12988@nevyn.them.org> Mail-Followup-To: ac131313@cygnus.com, gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i X-SW-Source: 2001-12/txt/msg00101.txt.bz2 A native MIPS/Linux GDB no longer starts. The segfault is: #0 0x004aab34 in mips_register_raw_size (reg_nr=268436760) at ../../src-gdblinks/gdb/mips-tdep.c:424 #1 0x005407a4 in build_regcache () at ../../src-gdblinks/gdb/regcache.c:789 #2 0x005407f4 in _initialize_regcache () at ../../src-gdblinks/gdb/regcache.c:803 #3 0x00526fcc in initialize_all_files () at init.c:94 #4 0x005197d0 in gdb_init (argv0=0x7fff7e00 "/opt/src/binutils/obj-src-mipshost/gdb/testsuite/../gdb") at ../../src-gdblinks/gdb/top.c:2070 #5 0x00431a04 in captured_main (data=0x10000518) at ../../src-gdblinks/gdb/main.c:483 #6 0x005151c0 in do_catch_errors (uiout=0x10000518, data=0x720d58) at ../../src-gdblinks/gdb/top.c:491 #7 0x00515000 in catcher (func=0x51518c , func_uiout=0x100021a0, func_args=0x7fff7c90, func_val=0x7fff7c9c, func_caught=0x7fff7c98, errstring=0x70eadc "", mask=6) at ../../src-gdblinks/gdb/top.c:423 #8 0x00515254 in catch_errors (func=0x100021a0 , func_args=0x98, errstring=0xa746e69
, mask=1685217640) at ../../src-gdblinks/gdb/top.c:503 #9 0x004329ac in main (argc=4396696, argv=0x7fff7cc0) at ../../src-gdblinks/gdb/main.c:725 at: 419 mips_register_raw_size (int reg_nr) 420 { 421 if (mips64_transfers_32bit_regs_p) 422 return REGISTER_VIRTUAL_SIZE (reg_nr); 423 else if (reg_nr >= FP0_REGNUM && reg_nr < FP0_REGNUM + 32 424 && FP_REGISTER_DOUBLE) 425 /* For MIPS_ABI_N32 (for example) we need 8 byte floating point 426 registers. */ 427 return 8; 428 else I assume that this is because the target has not been initialized yet: #if GDB_MULTI_ARCH #undef FP_REGISTER_DOUBLE #define FP_REGISTER_DOUBLE (gdbarch_tdep (current_gdbarch)->mips_fp_register_double) #endif You can't use multi-arched macros from _initialize_regcache, I think. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer