From ee53e8729a3de34db1558b06f97437517b203b8c Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 12 Oct 2007 16:11:12 +0000 Subject: [PATCH] * breakpoint.c (breakpoint_sals_to_pc): Do not check for DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE. * config/pa/tm-hppa.h: Delete file. * config/pa/hppa64.mt: Do not set DEPRECATED_TM_FILE. * config/pa/hppahpux.mt: Likewise. * config/pa/hppa.mt: Likewise. * config/pa/linux.mt: Likewise. * hppa-tdep.c (hppa_pc_requires_run_before_use): Delete. --- gdb/ChangeLog | 12 ++++++++++++ gdb/breakpoint.c | 28 +--------------------------- gdb/config/pa/hppa.mt | 1 - gdb/config/pa/hppa64.mt | 1 - gdb/config/pa/hppahpux.mt | 1 - gdb/config/pa/linux.mt | 1 - gdb/config/pa/tm-hppa.h | 27 --------------------------- gdb/hppa-tdep.c | 32 -------------------------------- 8 files changed, 13 insertions(+), 90 deletions(-) delete mode 100644 gdb/config/pa/tm-hppa.h diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3aea2f7..b7fdcd5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,17 @@ 2007-10-12 Ulrich Weigand + * breakpoint.c (breakpoint_sals_to_pc): Do not check for + DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE. + + * config/pa/tm-hppa.h: Delete file. + * config/pa/hppa64.mt: Do not set DEPRECATED_TM_FILE. + * config/pa/hppahpux.mt: Likewise. + * config/pa/hppa.mt: Likewise. + * config/pa/linux.mt: Likewise. + * hppa-tdep.c (hppa_pc_requires_run_before_use): Delete. + +2007-10-12 Ulrich Weigand + * config/arm/nm-nbsdaout.h: Remove file. * config/nm-nbsdaout.h: Likewise. * config/nm-nbsd.h: Likewise. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index ba56edb..8f2cbad 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5483,33 +5483,7 @@ breakpoint_sals_to_pc (struct symtabs_and_lines *sals, { int i; for (i = 0; i < sals->nelts; i++) - { - resolve_sal_pc (&sals->sals[i]); - - /* It's possible for the PC to be nonzero, but still an illegal - value on some targets. - - For example, on HP-UX if you start gdb, and before running the - inferior you try to set a breakpoint on a shared library function - "foo" where the inferior doesn't call "foo" directly but does - pass its address to another function call, then we do find a - minimal symbol for the "foo", but it's address is invalid. - (Appears to be an index into a table that the loader sets up - when the inferior is run.) - - Give the target a chance to bless sals.sals[i].pc before we - try to make a breakpoint for it. */ -#ifdef DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE - if (DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc)) - { - if (address == NULL) - error (_("Cannot break without a running program.")); - else - error (_("Cannot break on %s without a running program."), - address); - } -#endif - } + resolve_sal_pc (&sals->sals[i]); } static void diff --git a/gdb/config/pa/hppa.mt b/gdb/config/pa/hppa.mt index 5ba51fa..eb78924 100644 --- a/gdb/config/pa/hppa.mt +++ b/gdb/config/pa/hppa.mt @@ -1,2 +1 @@ TDEPFILES= hppa-tdep.o -DEPRECATED_TM_FILE= tm-hppa.h diff --git a/gdb/config/pa/hppa64.mt b/gdb/config/pa/hppa64.mt index 85a64b1..5d2f609 100644 --- a/gdb/config/pa/hppa64.mt +++ b/gdb/config/pa/hppa64.mt @@ -1,3 +1,2 @@ # Target: HP PA-RISC 2.0 running HPUX 11.00 in wide mode TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o solib-som.o solib-pa64.o somread.o solib.o -DEPRECATED_TM_FILE= tm-hppa.h diff --git a/gdb/config/pa/hppahpux.mt b/gdb/config/pa/hppahpux.mt index fc9d2d7e..46a6816 100644 --- a/gdb/config/pa/hppahpux.mt +++ b/gdb/config/pa/hppahpux.mt @@ -1,4 +1,3 @@ # Target: HP PA-RISC running hpux MT_CFLAGS = -DPA_SOM_ONLY=1 TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o corelow.o somread.o solib-som.o solib-pa64.o solib.o -DEPRECATED_TM_FILE= tm-hppa.h diff --git a/gdb/config/pa/linux.mt b/gdb/config/pa/linux.mt index e286e1b..2e114c7 100644 --- a/gdb/config/pa/linux.mt +++ b/gdb/config/pa/linux.mt @@ -1,3 +1,2 @@ # Target: HP PA-RISC running Linux TDEPFILES= hppa-tdep.o hppa-linux-tdep.o glibc-tdep.o solib.o solib-svr4.o symfile-mem.o -DEPRECATED_TM_FILE=tm-hppa.h diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h deleted file mode 100644 index 6e3b395..0000000 --- a/gdb/config/pa/tm-hppa.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Parameters for execution on any Hewlett-Packard PA-RISC machine. - - Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc. - - Contributed by the Center for Software Science at the - University of Utah (pa-gdb-bugs@cs.utah.edu). - - 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 . */ - -#include "regcache.h" - -extern int hppa_pc_requires_run_before_use (CORE_ADDR pc); -#define DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc) diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index f3cff64..5c0da34 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -68,10 +68,6 @@ const struct objfile_data *hppa_objfile_priv_data = NULL; #define UNWIND_ENTRY_SIZE 16 #define STUB_UNWIND_ENTRY_SIZE 8 -/* FIXME: brobecker 2002-11-07: We will likely be able to make the - following functions static, once we hppa is partially multiarched. */ -int hppa_pc_requires_run_before_use (CORE_ADDR pc); - /* Routines to extract various sized constants out of hppa instructions. */ @@ -2612,34 +2608,6 @@ unwind_command (char *exp, int from_tty) } } -int -hppa_pc_requires_run_before_use (CORE_ADDR pc) -{ - /* Sometimes we may pluck out a minimal symbol that has a negative address. - - An example of this occurs when an a.out is linked against a foo.sl. - The foo.sl defines a global bar(), and the a.out declares a signature - for bar(). However, the a.out doesn't directly call bar(), but passes - its address in another call. - - If you have this scenario and attempt to "break bar" before running, - gdb will find a minimal symbol for bar() in the a.out. But that - symbol's address will be negative. What this appears to denote is - an index backwards from the base of the procedure linkage table (PLT) - into the data linkage table (DLT), the end of which is contiguous - with the start of the PLT. This is clearly not a valid address for - us to set a breakpoint on. - - Note that one must be careful in how one checks for a negative address. - 0xc0000000 is a legitimate address of something in a shared text - segment, for example. Since I don't know what the possible range - is of these "really, truly negative" addresses that come from the - minimal symbols, I'm resorting to the gross hack of checking the - top byte of the address for all 1's. Sigh. */ - - return (!target_has_stack && (pc & 0xFF000000) == 0xFF000000); -} - /* Return the GDB type object for the "standard" data type of data in register REGNUM. */ -- 2.7.4