From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5863 invoked by alias); 5 Oct 2007 18:04:03 -0000 Received: (qmail 5545 invoked by uid 22791); 5 Oct 2007 18:03:58 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 Oct 2007 18:03:53 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.13.8/8.13.8) with ESMTP id l95I3nxU313412 for ; Fri, 5 Oct 2007 18:03:49 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l95I3nJW1818666 for ; Fri, 5 Oct 2007 20:03:49 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l95I3neb027697 for ; Fri, 5 Oct 2007 20:03:49 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l95I3n1v027694 for ; Fri, 5 Oct 2007 20:03:49 +0200 Message-Id: <200710051803.l95I3n1v027694@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 5 Oct 2007 20:03:49 +0200 Subject: [rfc/rft] Remove tm-alpha.h header file To: gdb-patches@sourceware.org Date: Fri, 05 Oct 2007 18:04:00 -0000 From: "Ulrich Weigand" X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00065.txt.bz2 Hello, this gets rid of the tm-alpha.h file. The only remaining define is RA_REGNUM, which is used in mdebugread.c in special-case fix-up code for incorrect procedure descriptors for the setjmp function. To eliminate that dependency, this patch moves that fix-up code from mdebugread.c to the call site in alpha-mdebug-tdep.c. Note that alpha is currently the only user of those procedure descriptors anyway. Tested only to the extent to make sure everything still compiles; if anyone with access to an Alpha machine could run a regression test, I'd appreciate it! Bye, Ulrich ChangeLog: * alpha-mdebug-tdep.c: Include "gdb_string.h". (find_proc_desc): Add fix-up code for setjmp procedure descriptor. * mdebugread.c (parse_procedure): Remove setjmp fix-up code. * Makefile.in (alpha-mdebug-tdep.o): Update dependencies. * config/alpha/alpha.mt (DEPRECATED_TM_FILE): Remove. * config/alpha/alpha-linux.mt (DEPRECATED_TM_FILE): Remove. * config/alpha/alpha-osf1.mt (DEPRECATED_TM_FILE): Remove. * config/alpha/fbsd.mt (DEPRECATED_TM_FILE): Remove. * config/alpha/tm-alpha.h: Remove file. diff -urNp gdb-orig/gdb/alpha-mdebug-tdep.c gdb-head/gdb/alpha-mdebug-tdep.c --- gdb-orig/gdb/alpha-mdebug-tdep.c 2007-10-05 18:19:27.303186513 +0200 +++ gdb-head/gdb/alpha-mdebug-tdep.c 2007-10-05 18:21:59.726353624 +0200 @@ -25,6 +25,7 @@ #include "gdbcore.h" #include "block.h" #include "gdb_assert.h" +#include "gdb_string.h" #include "alpha-tdep.h" #include "mdebugread.h" @@ -95,11 +96,12 @@ find_proc_desc (CORE_ADDR pc) struct block *b = block_for_pc (pc); struct mdebug_extra_func_info *proc_desc = NULL; struct symbol *sym = NULL; + char *sh_name = NULL; if (b) { CORE_ADDR startaddr; - find_pc_partial_function (pc, NULL, &startaddr, NULL); + find_pc_partial_function (pc, &sh_name, &startaddr, NULL); if (startaddr > BLOCK_START (b)) /* This is the "pathological" case referred to in a comment in @@ -114,6 +116,16 @@ find_proc_desc (CORE_ADDR pc) { proc_desc = (struct mdebug_extra_func_info *) SYMBOL_VALUE (sym); + /* Correct incorrect setjmp procedure descriptor from the library + to make backtrace through setjmp work. */ + if (proc_desc->pdr.pcreg == 0 + && strcmp (sh_name, "setjmp") == 0) + { + proc_desc->pdr.pcreg = ALPHA_RA_REGNUM; + proc_desc->pdr.regmask = 0x80000000; + proc_desc->pdr.regoffset = -4; + } + /* If we never found a PDR for this function in symbol reading, then examine prologues to find the information. */ if (proc_desc->pdr.framereg == -1) diff -urNp gdb-orig/gdb/config/alpha/alpha-linux.mt gdb-head/gdb/config/alpha/alpha-linux.mt --- gdb-orig/gdb/config/alpha/alpha-linux.mt 2007-10-05 18:19:27.308185793 +0200 +++ gdb-head/gdb/config/alpha/alpha-linux.mt 2007-10-05 18:21:59.731352904 +0200 @@ -1,4 +1,3 @@ # Target: Little-endian Alpha TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alpha-linux-tdep.o \ solib.o solib-svr4.o solib-legacy.o -DEPRECATED_TM_FILE= tm-alpha.h diff -urNp gdb-orig/gdb/config/alpha/alpha.mt gdb-head/gdb/config/alpha/alpha.mt --- gdb-orig/gdb/config/alpha/alpha.mt 2007-10-05 18:19:27.311185361 +0200 +++ gdb-head/gdb/config/alpha/alpha.mt 2007-10-05 18:21:59.734352471 +0200 @@ -1,2 +1 @@ TDEPFILES= alpha-tdep.o -DEPRECATED_TM_FILE= tm-alpha.h diff -urNp gdb-orig/gdb/config/alpha/alpha-osf1.mt gdb-head/gdb/config/alpha/alpha-osf1.mt --- gdb-orig/gdb/config/alpha/alpha-osf1.mt 2007-10-05 18:19:27.315184784 +0200 +++ gdb-head/gdb/config/alpha/alpha-osf1.mt 2007-10-05 18:21:59.738351895 +0200 @@ -1,3 +1,2 @@ # Target: Little-endian Alpha TDEPFILES= alpha-tdep.o alpha-osf1-tdep.o alpha-mdebug-tdep.o -DEPRECATED_TM_FILE= tm-alpha.h diff -urNp gdb-orig/gdb/config/alpha/fbsd.mt gdb-head/gdb/config/alpha/fbsd.mt --- gdb-orig/gdb/config/alpha/fbsd.mt 2007-10-05 18:19:27.319184208 +0200 +++ gdb-head/gdb/config/alpha/fbsd.mt 2007-10-05 18:21:59.742351318 +0200 @@ -1,4 +1,3 @@ # Target: FreeBSD/alpha TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o alphafbsd-tdep.o \ corelow.o solib.o solib-svr4.o -DEPRECATED_TM_FILE= tm-alpha.h diff -urNp gdb-orig/gdb/config/alpha/tm-alpha.h gdb-head/gdb/config/alpha/tm-alpha.h --- gdb-orig/gdb/config/alpha/tm-alpha.h 2007-10-05 18:19:27.322183775 +0200 +++ gdb-head/gdb/config/alpha/tm-alpha.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -/* Definitions to make GDB run on an Alpha box under OSF1. This is - also used by the Alpha GNU/Linux target. - - Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2004, 2007 - Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef TM_ALPHA_H -#define TM_ALPHA_H - -#define RA_REGNUM 26 /* XXXJRT needed by mdebugread.c */ - -#endif /* TM_ALPHA_H */ diff -urNp gdb-orig/gdb/Makefile.in gdb-head/gdb/Makefile.in --- gdb-orig/gdb/Makefile.in 2007-10-02 18:37:02.000000000 +0200 +++ gdb-head/gdb/Makefile.in 2007-10-05 18:20:47.721828859 +0200 @@ -1735,7 +1735,8 @@ alpha-linux-tdep.o: alpha-linux-tdep.c $ $(regcache_h) $(alpha_tdep_h) alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \ $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \ - $(block_h) $(gdb_assert_h) $(alpha_tdep_h) $(mdebugread_h) + $(block_h) $(gdb_assert_h) $(gdb_string_h) $(alpha_tdep_h) \ + $(mdebugread_h) alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ $(gdbcore_h) $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h) alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ diff -urNp gdb-orig/gdb/mdebugread.c gdb-head/gdb/mdebugread.c --- gdb-orig/gdb/mdebugread.c 2007-10-05 18:19:27.337181614 +0200 +++ gdb-head/gdb/mdebugread.c 2007-10-05 18:21:59.768347572 +0200 @@ -1942,21 +1942,6 @@ parse_procedure (PDR *pr, struct symtab To work around these problems, we replace e->pdr.adr with the start address of the function. */ e->pdr.adr = BLOCK_START (b); - - /* Correct incorrect setjmp procedure descriptor from the library - to make backtrace through setjmp work. */ - if (e->pdr.pcreg == 0 - && strcmp (sh_name, "setjmp") == 0) - { - complaint (&symfile_complaints, _("fixing bad setjmp PDR from libc")); -#ifdef RA_REGNUM - e->pdr.pcreg = RA_REGNUM; -#else - e->pdr.pcreg = 0; -#endif - e->pdr.regmask = 0x80000000; - e->pdr.regoffset = -4; - } } /* It would be reasonable that functions that have been compiled -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com