mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 16:05:56 +08:00
* 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.
This commit is contained in:
@ -1,3 +1,15 @@
|
|||||||
|
2007-10-12 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
|
* 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 <uweigand@de.ibm.com>
|
2007-10-12 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
* config/arm/nm-nbsdaout.h: Remove file.
|
* config/arm/nm-nbsdaout.h: Remove file.
|
||||||
|
@ -5483,33 +5483,7 @@ breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < sals->nelts; i++)
|
for (i = 0; i < sals->nelts; i++)
|
||||||
{
|
|
||||||
resolve_sal_pc (&sals->sals[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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1,2 +1 @@
|
|||||||
TDEPFILES= hppa-tdep.o
|
TDEPFILES= hppa-tdep.o
|
||||||
DEPRECATED_TM_FILE= tm-hppa.h
|
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
# Target: HP PA-RISC 2.0 running HPUX 11.00 in wide mode
|
# 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
|
TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o solib-som.o solib-pa64.o somread.o solib.o
|
||||||
DEPRECATED_TM_FILE= tm-hppa.h
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# Target: HP PA-RISC running hpux
|
# Target: HP PA-RISC running hpux
|
||||||
MT_CFLAGS = -DPA_SOM_ONLY=1
|
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
|
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
|
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
# Target: HP PA-RISC running Linux
|
# 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
|
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
|
|
||||||
|
@ -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 <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#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)
|
|
@ -68,10 +68,6 @@ const struct objfile_data *hppa_objfile_priv_data = NULL;
|
|||||||
#define UNWIND_ENTRY_SIZE 16
|
#define UNWIND_ENTRY_SIZE 16
|
||||||
#define STUB_UNWIND_ENTRY_SIZE 8
|
#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
|
/* Routines to extract various sized constants out of hppa
|
||||||
instructions. */
|
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
|
/* Return the GDB type object for the "standard" data type of data in
|
||||||
register REGNUM. */
|
register REGNUM. */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user