aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-10-12 16:13:20 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-10-12 16:13:20 +0000
commit62f6180c256958f8bae44944f3db2b13f897631b (patch)
tree18e70ab9035e94f79c41fd32a989dde1dc4defa1
parentee53e8729a3de34db1558b06f97437517b203b8c (diff)
downloadgdb-62f6180c256958f8bae44944f3db2b13f897631b.zip
gdb-62f6180c256958f8bae44944f3db2b13f897631b.tar.gz
gdb-62f6180c256958f8bae44944f3db2b13f897631b.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/Makefile.in3
-rw-r--r--gdb/alpha-mdebug-tdep.c14
-rw-r--r--gdb/config/alpha/alpha-linux.mt1
-rw-r--r--gdb/config/alpha/alpha-osf1.mt1
-rw-r--r--gdb/config/alpha/alpha.mt1
-rw-r--r--gdb/config/alpha/fbsd.mt1
-rw-r--r--gdb/config/alpha/tm-alpha.h27
-rw-r--r--gdb/mdebugread.c15
9 files changed, 28 insertions, 48 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b7fdcd5..ed2abe5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,18 @@
2007-10-12 Ulrich Weigand <uweigand@de.ibm.com>
+ * 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.
+
+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.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 3090558..5a51f4c 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1735,7 +1735,8 @@ alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \
$(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 --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
index ab2fb91..9c82ad1 100644
--- a/gdb/alpha-mdebug-tdep.c
+++ b/gdb/alpha-mdebug-tdep.c
@@ -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 --git a/gdb/config/alpha/alpha-linux.mt b/gdb/config/alpha/alpha-linux.mt
index 3fbee72..096c6c3 100644
--- a/gdb/config/alpha/alpha-linux.mt
+++ b/gdb/config/alpha/alpha-linux.mt
@@ -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 --git a/gdb/config/alpha/alpha-osf1.mt b/gdb/config/alpha/alpha-osf1.mt
index d8e227d..a1fe56d 100644
--- a/gdb/config/alpha/alpha-osf1.mt
+++ b/gdb/config/alpha/alpha-osf1.mt
@@ -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 --git a/gdb/config/alpha/alpha.mt b/gdb/config/alpha/alpha.mt
index 703f3fb..117f212 100644
--- a/gdb/config/alpha/alpha.mt
+++ b/gdb/config/alpha/alpha.mt
@@ -1,2 +1 @@
TDEPFILES= alpha-tdep.o
-DEPRECATED_TM_FILE= tm-alpha.h
diff --git a/gdb/config/alpha/fbsd.mt b/gdb/config/alpha/fbsd.mt
index 5b8a272..a1132b2 100644
--- a/gdb/config/alpha/fbsd.mt
+++ b/gdb/config/alpha/fbsd.mt
@@ -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 --git a/gdb/config/alpha/tm-alpha.h b/gdb/config/alpha/tm-alpha.h
deleted file mode 100644
index d764e00..0000000
--- a/gdb/config/alpha/tm-alpha.h
+++ /dev/null
@@ -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 <http://www.gnu.org/licenses/>. */
-
-#ifndef TM_ALPHA_H
-#define TM_ALPHA_H
-
-#define RA_REGNUM 26 /* XXXJRT needed by mdebugread.c */
-
-#endif /* TM_ALPHA_H */
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 897c596..c9cc260 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -1942,21 +1942,6 @@ parse_procedure (PDR *pr, struct symtab *search_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