- Upgrade to the FSF GDB gdb-7.0 branch and snapshot: 6.8.91.20090917

- archer-jankratochvil-fedora12 commit:
    16f3f01cc2cbc15283462eaabdfcde92cf42cdc6
- Drop the qsort_cmp workaround as resolved in FSF GDB now (BZ 515434).
This commit is contained in:
Jan Kratochvil 2009-09-17 12:15:42 +00:00
parent 806f8c893c
commit e93d3474d8
9 changed files with 613 additions and 4128 deletions

View File

@ -1 +1 @@
gdb-6.8.50.20090910.tar.bz2
gdb-6.8.91.20090917.tar.bz2

View File

@ -4,20 +4,20 @@
to install and uninstall.
* gstack.sh, gstack.1: New files.
Index: gdb-6.8.50.20090802/gdb/Makefile.in
Index: gdb-6.8.91.20090917/gdb/Makefile.in
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/Makefile.in 2009-08-03 09:50:57.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/Makefile.in 2009-08-03 11:09:49.000000000 +0200
@@ -947,7 +947,7 @@ gdb.z:gdb.1
# time it takes for make to check that all is up to date.
# install-only is intended to address that need.
install: all install-only
-install-only: $(CONFIG_INSTALL)
+install-only: install-gstack $(CONFIG_INSTALL)
--- gdb-6.8.91.20090917.orig/gdb/Makefile.in 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/Makefile.in 2009-09-17 12:47:38.000000000 +0200
@@ -989,7 +989,7 @@ install: all install-only
# The "install-only" target also installs the syscalls' XML files in
# the system.
-install-only: $(CONFIG_INSTALL) xml-syscall-install
+install-only: install-gstack $(CONFIG_INSTALL) xml-syscall-install
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
@@ -979,9 +979,26 @@ install-tui:
@@ -1021,9 +1021,26 @@ install-tui:
$(DESTDIR)$(man1dir) ; \
$(INSTALL_DATA) $(srcdir)/gdb.1 \
$(DESTDIR)$(man1dir)/$$transformed_name.1
@ -45,7 +45,7 @@ Index: gdb-6.8.50.20090802/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \
@@ -1003,6 +1020,17 @@ uninstall-tui:
@@ -1045,6 +1062,17 @@ uninstall-tui:
fi ; \
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
$(DESTDIR)$(man1dir)/$$transformed_name.1
@ -63,10 +63,10 @@ Index: gdb-6.8.50.20090802/gdb/Makefile.in
# The C++ name parser can be built standalone for testing.
test-cp-name-parser.o: cp-name-parser.c
Index: gdb-6.8.50.20090802/gdb/gstack.sh
Index: gdb-6.8.91.20090917/gdb/gstack.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/gstack.sh 2009-08-03 11:08:52.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/gstack.sh 2009-09-17 12:47:14.000000000 +0200
@@ -0,0 +1,48 @@
+#!/bin/sh
+

View File

@ -1,163 +0,0 @@
2005-09-27 Jeff Johnston <jjohnstn@redhat.com>
* libunwind-frame.c (libunwind_frame_cache): Save the current
stack pointer in the cache.
(libunwind_sigtramp_frame_this_id): New function.
(libunwind_sigtramp_frame_unwind): New unwinder.
(libunwind_sigtramp_frame_sniffer): Return
libunwind_sigtramp_frame_unwind address.
* libunwind-frame.h (libunwind_sigtramp_frame_this_id): New
prototype.
* ia64-tdep.c (ia64_libunwind_sigtramp_frame_this_id): Calculate
the base address using the current stack pointer plus a fixed
offset.
2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
2008-04-16 Yi Zhan <yi.zhan@intel.com>
Fix a compilation error on a typo.
Index: gdb-6.8.50.20090803/gdb/libunwind-frame.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/libunwind-frame.c 2009-01-03 06:57:52.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/libunwind-frame.c 2009-08-04 06:31:34.000000000 +0200
@@ -62,6 +62,7 @@ static unw_word_t (*unw_find_dyn_list_p)
struct libunwind_frame_cache
{
CORE_ADDR base;
+ CORE_ADDR sp;
CORE_ADDR func_addr;
unw_cursor_t cursor;
unw_addr_space_t as;
@@ -134,6 +135,7 @@ libunwind_frame_cache (struct frame_info
unw_accessors_t *acc;
unw_addr_space_t as;
unw_word_t fp;
+ unw_word_t sp;
unw_regnum_t uw_sp_regnum;
struct libunwind_frame_cache *cache;
struct libunwind_descr *descr;
@@ -175,14 +177,30 @@ libunwind_frame_cache (struct frame_info
: __LITTLE_ENDIAN);
unw_init_remote_p (&cache->cursor, as, this_frame);
+
+ /* For the base address, we have a small problem. The majority
+ of the time, we can get the stack pointer of the previous
+ frame to use as a frame pointer. In the case where we have
+ a signal trampoline, the stack may change due to a sigaltstack
+ being set up. In that case, the normal mechanism will give us
+ an address in the regular stack which is not at the end of the
+ sigaltstack as we want. To handle this, we record the stack
+ address so the caller may calculate a more correct base address
+ to use. */
+ uw_sp_regnum = descr->gdb2uw (gdbarch_sp_regnum (gdbarch));
+ ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &sp);
+ if (ret < 0)
+ {
+ unw_destroy_addr_space_p (as);
+ error (_("Can't get libunwind sp register."));
+ }
+
if (unw_step_p (&cache->cursor) < 0)
{
unw_destroy_addr_space_p (as);
return NULL;
}
- /* To get base address, get sp from previous frame. */
- uw_sp_regnum = descr->gdb2uw (gdbarch_sp_regnum (gdbarch));
ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &fp);
if (ret < 0)
{
@@ -190,6 +208,7 @@ libunwind_frame_cache (struct frame_info
error (_("Can't get libunwind sp register."));
}
+ cache->sp = (CORE_ADDR)sp;
cache->base = (CORE_ADDR)fp;
cache->as = as;
@@ -377,6 +396,31 @@ libunwind_search_unwind_table (void *as,
di, pi, need_unwind_info, args);
}
+void
+libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
+ void **this_cache,
+ struct frame_id *this_id)
+{
+ struct libunwind_frame_cache *cache =
+ libunwind_frame_cache (this_frame, this_cache);
+
+ /* Unlike a regular frame, we can't use the normal frame pointer
+ mechanism because a sigaltstack may have been used. Instead,
+ we return the current stack pointer for the caller to use
+ to calculate the base address. */
+ if (cache != NULL)
+ (*this_id) = frame_id_build (cache->sp, cache->func_addr);
+ else
+ (*this_id) = null_frame_id;
+}
+
+static const struct frame_unwind libunwind_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ libunwind_sigtramp_frame_this_id,
+ libunwind_frame_prev_register
+};
+
/* Verify if we are in a sigtramp frame and we can use libunwind to unwind. */
int
libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
Index: gdb-6.8.50.20090803/gdb/libunwind-frame.h
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/libunwind-frame.h 2009-01-03 06:57:52.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/libunwind-frame.h 2009-08-04 06:31:34.000000000 +0200
@@ -52,6 +52,9 @@ void libunwind_frame_set_descr (struct g
void libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache,
struct frame_id *this_id);
+void libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
+ void **this_cache,
+ struct frame_id *this_id);
struct value *libunwind_frame_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum);
void libunwind_frame_dealloc_cache (struct frame_info *self, void *cache);
Index: gdb-6.8.50.20090803/gdb/ia64-tdep.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/ia64-tdep.c 2009-08-04 06:30:45.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/ia64-tdep.c 2009-08-04 06:31:34.000000000 +0200
@@ -3023,7 +3023,7 @@ ia64_libunwind_sigtramp_frame_this_id (s
struct frame_id id;
CORE_ADDR prev_ip;
- libunwind_frame_this_id (this_frame, this_cache, &id);
+ libunwind_sigtramp_frame_this_id (this_frame, this_cache, &id);
if (frame_id_eq (id, null_frame_id))
{
(*this_id) = null_frame_id;
@@ -3035,8 +3035,14 @@ ia64_libunwind_sigtramp_frame_this_id (s
get_frame_register (this_frame, IA64_BSP_REGNUM, buf);
bsp = extract_unsigned_integer (buf, 8, byte_order);
- /* For a sigtramp frame, we don't make the check for previous ip being 0. */
- (*this_id) = frame_id_build_special (id.stack_addr, id.code_addr, bsp);
+ /* For a sigtramp frame, we don't make the check for previous ip being 0.
+ We also must calculate the frame pointer because libunwind will give
+ us back the current stack pointer instead of the frame pointer since
+ it cannot figure this out when in a sigaltstack. We make a basic
+ assumption of 16 (default size) + 8 bytes for sigcontext address.
+ FIXME: if libunwind were to export the frame pointer address, we
+ could eliminate the assumption and get the actual value. */
+ (*this_id) = frame_id_build_special (id.stack_addr + 24, id.code_addr, bsp);
if (gdbarch_debug >= 1)
fprintf_unfiltered (gdb_stdlog,

View File

@ -26,10 +26,10 @@
Fix scan_dyntag() for binaries provided by valgrind (BZ 460319).
Index: gdb-6.8.50.20090909/gdb/amd64-tdep.c
Index: gdb-6.8.91.20090917/gdb/amd64-tdep.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/amd64-tdep.c 2009-09-09 19:09:31.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/amd64-tdep.c 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/amd64-tdep.c 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/amd64-tdep.c 2009-09-17 12:50:07.000000000 +0200
@@ -36,6 +36,7 @@
#include "regcache.h"
#include "regset.h"
@ -138,10 +138,10 @@ Index: gdb-6.8.50.20090909/gdb/amd64-tdep.c
return pc;
}
Index: gdb-6.8.50.20090909/gdb/auxv.c
Index: gdb-6.8.91.20090917/gdb/auxv.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/auxv.c 2009-07-02 19:25:52.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/auxv.c 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/auxv.c 2009-07-02 19:25:52.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/auxv.c 2009-09-17 12:50:07.000000000 +0200
@@ -78,7 +78,7 @@ procfs_xfer_auxv (struct target_ops *ops
Return 1 if an entry was read into *TYPEP and *VALP. */
static int
@ -230,10 +230,10 @@ Index: gdb-6.8.50.20090909/gdb/auxv.c
break;
}
Index: gdb-6.8.50.20090909/gdb/auxv.h
Index: gdb-6.8.91.20090917/gdb/auxv.h
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/auxv.h 2009-06-07 21:07:08.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/auxv.h 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/auxv.h 2009-06-07 21:07:08.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/auxv.h 2009-09-17 12:50:07.000000000 +0200
@@ -31,14 +31,14 @@
Return 1 if an entry was read into *TYPEP and *VALP. */
extern int target_auxv_parse (struct target_ops *ops,
@ -251,11 +251,11 @@ Index: gdb-6.8.50.20090909/gdb/auxv.h
/* Print the contents of the target's AUXV on the specified file. */
extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
Index: gdb-6.8.50.20090909/gdb/dwarf2read.c
Index: gdb-6.8.91.20090917/gdb/dwarf2read.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/dwarf2read.c 2009-09-09 19:21:23.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/dwarf2read.c 2009-09-09 19:24:13.000000000 +0200
@@ -1719,7 +1719,7 @@ dwarf2_build_psymtabs (struct objfile *o
--- gdb-6.8.91.20090917.orig/gdb/dwarf2read.c 2009-09-17 12:49:20.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/dwarf2read.c 2009-09-17 12:50:07.000000000 +0200
@@ -1717,7 +1717,7 @@ dwarf2_build_psymtabs (struct objfile *o
dwarf2_read_section (objfile, &dwarf2_per_objfile->eh_frame);
dwarf2_read_section (objfile, &dwarf2_per_objfile->frame);
@ -264,10 +264,10 @@ Index: gdb-6.8.50.20090909/gdb/dwarf2read.c
|| (objfile->global_psymbols.size == 0
&& objfile->static_psymbols.size == 0))
{
Index: gdb-6.8.50.20090909/gdb/elfread.c
Index: gdb-6.8.91.20090917/gdb/elfread.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/elfread.c 2009-09-09 19:05:55.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/elfread.c 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/elfread.c 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/elfread.c 2009-09-17 12:50:07.000000000 +0200
@@ -681,7 +681,7 @@ elf_symfile_read (struct objfile *objfil
/* If we are reinitializing, or if we have never loaded syms yet,
set table to empty. MAINLINE is cleared so that *_read_psymtab
@ -277,11 +277,11 @@ Index: gdb-6.8.50.20090909/gdb/elfread.c
{
init_psymbol_list (objfile, 0);
mainline = 0;
Index: gdb-6.8.50.20090909/gdb/infrun.c
Index: gdb-6.8.91.20090917/gdb/infrun.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/infrun.c 2009-09-09 19:09:31.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/infrun.c 2009-09-09 19:24:13.000000000 +0200
@@ -3602,6 +3602,10 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (
--- gdb-6.8.91.20090917.orig/gdb/infrun.c 2009-09-17 12:48:50.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/infrun.c 2009-09-17 12:50:07.000000000 +0200
@@ -3659,6 +3659,10 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (
#endif
target_terminal_inferior ();
@ -292,13 +292,13 @@ Index: gdb-6.8.50.20090909/gdb/infrun.c
/* If requested, stop when the dynamic linker notifies
gdb of events. This allows the user to get control
and place breakpoints in initializer routines for
Index: gdb-6.8.50.20090909/gdb/objfiles.c
Index: gdb-6.8.91.20090917/gdb/objfiles.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/objfiles.c 2009-09-09 19:23:05.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/objfiles.c 2009-09-09 19:24:13.000000000 +0200
@@ -51,6 +51,9 @@
#include "arch-utils.h"
#include "exec.h"
--- gdb-6.8.91.20090917.orig/gdb/objfiles.c 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/objfiles.c 2009-09-17 12:50:20.000000000 +0200
@@ -53,6 +53,9 @@
#include "observer.h"
#include "complaints.h"
+#include "auxv.h"
+#include "elf/common.h"
@ -306,7 +306,7 @@ Index: gdb-6.8.50.20090909/gdb/objfiles.c
/* Prototypes for local functions */
static void objfile_alloc_data (struct objfile *objfile);
@@ -278,9 +281,17 @@ init_entry_point_info (struct objfile *o
@@ -280,9 +283,17 @@ init_entry_point_info (struct objfile *o
CORE_ADDR
entry_point_address (void)
{
@ -324,7 +324,7 @@ Index: gdb-6.8.50.20090909/gdb/objfiles.c
if (symfile_objfile == NULL)
return 0;
@@ -465,6 +476,9 @@ free_objfile (struct objfile *objfile)
@@ -467,6 +478,9 @@ free_objfile (struct objfile *objfile)
if (objfile == symfile_objfile)
symfile_objfile = NULL;
@ -334,10 +334,10 @@ Index: gdb-6.8.50.20090909/gdb/objfiles.c
/* Before the symbol table code was redone to make it easier to
selectively load and remove information particular to a specific
linkage unit, gdb used to do these things whenever the monolithic
Index: gdb-6.8.50.20090909/gdb/solib-svr4.c
Index: gdb-6.8.91.20090917/gdb/solib-svr4.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/solib-svr4.c 2009-09-09 19:09:35.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/solib-svr4.c 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/solib-svr4.c 2009-09-17 12:48:50.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/solib-svr4.c 2009-09-17 12:50:07.000000000 +0200
@@ -47,6 +47,7 @@
#include "exec.h"
#include "auxv.h"
@ -1000,10 +1000,10 @@ Index: gdb-6.8.50.20090909/gdb/solib-svr4.c
+ add_info ("linkmap", info_linkmap_command,
+ "Display the inferior's linkmap.");
}
Index: gdb-6.8.50.20090909/gdb/solib.c
Index: gdb-6.8.91.20090917/gdb/solib.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/solib.c 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/solib.c 2009-09-09 19:25:18.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/solib.c 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/solib.c 2009-09-17 12:50:07.000000000 +0200
@@ -82,6 +82,8 @@ set_solib_ops (struct gdbarch *gdbarch,
/* external data declarations */
@ -1140,10 +1140,10 @@ Index: gdb-6.8.50.20090909/gdb/solib.c
+ NULL, NULL,
+ &setdebuglist, &showdebuglist);
}
Index: gdb-6.8.50.20090909/gdb/solist.h
Index: gdb-6.8.91.20090917/gdb/solist.h
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/solist.h 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/solist.h 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/solist.h 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/solist.h 2009-09-17 12:50:07.000000000 +0200
@@ -61,6 +61,8 @@ struct so_list
bfd *abfd;
char symbols_loaded; /* flag: symbols read in yet? */
@ -1164,10 +1164,10 @@ Index: gdb-6.8.50.20090909/gdb/solist.h
+extern int debug_solib;
+
#endif
Index: gdb-6.8.50.20090909/gdb/symfile-mem.c
Index: gdb-6.8.91.20090917/gdb/symfile-mem.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/symfile-mem.c 2009-09-09 19:06:57.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/symfile-mem.c 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/symfile-mem.c 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/symfile-mem.c 2009-09-17 12:50:07.000000000 +0200
@@ -115,7 +115,7 @@ symbol_file_add_from_memory (struct bfd
++i;
}
@ -1177,10 +1177,10 @@ Index: gdb-6.8.50.20090909/gdb/symfile-mem.c
sai, OBJF_SHARED);
/* This might change our ideas about frames already looked at. */
Index: gdb-6.8.50.20090909/gdb/symfile.c
Index: gdb-6.8.91.20090917/gdb/symfile.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/symfile.c 2009-09-09 19:15:43.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/symfile.c 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/symfile.c 2009-09-17 12:48:50.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/symfile.c 2009-09-17 12:50:07.000000000 +0200
@@ -49,6 +49,7 @@
#include "readline/readline.h"
#include "gdb_assert.h"
@ -1250,7 +1250,7 @@ Index: gdb-6.8.50.20090909/gdb/symfile.c
&& (have_full_symbols () || have_partial_symbols ())
&& from_tty
&& (have_full_symbols () || have_partial_symbols ())
@@ -1162,6 +1168,9 @@ symbol_file_clear (int from_tty)
@@ -1163,6 +1169,9 @@ symbol_file_clear (int from_tty)
symfile_objfile->name)
: !query (_("Discard symbol table? "))))
error (_("Not confirmed."));
@ -1269,11 +1269,11 @@ Index: gdb-6.8.50.20090909/gdb/symfile.c
/* If the mtime has changed between the time we set new_modtime
and now, we *want* this to be out of date, so don't call stat
again now. */
Index: gdb-6.8.50.20090909/gdb/target.h
Index: gdb-6.8.91.20090917/gdb/target.h
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/target.h 2009-09-09 19:07:36.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/target.h 2009-09-09 19:24:13.000000000 +0200
@@ -528,7 +528,7 @@ struct target_ops
--- gdb-6.8.91.20090917.orig/gdb/target.h 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/target.h 2009-09-17 12:50:07.000000000 +0200
@@ -545,7 +545,7 @@ struct target_ops
Return -1 if there is insufficient buffer for a whole entry.
Return 1 if an entry was read into *TYPEP and *VALP. */
int (*to_auxv_parse) (struct target_ops *ops, gdb_byte **readptr,
@ -1282,10 +1282,10 @@ Index: gdb-6.8.50.20090909/gdb/target.h
/* Search SEARCH_SPACE_LEN bytes beginning at START_ADDR for the
sequence of bytes in PATTERN with length PATTERN_LEN.
Index: gdb-6.8.50.20090909/gdb/symfile.h
Index: gdb-6.8.91.20090917/gdb/symfile.h
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/symfile.h 2009-09-09 19:15:43.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/symfile.h 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/symfile.h 2009-09-17 12:48:50.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/symfile.h 2009-09-17 12:50:07.000000000 +0200
@@ -229,7 +229,13 @@ enum symfile_add_flags
SYMFILE_MAINLINE = 1 << 2,
@ -1301,10 +1301,10 @@ Index: gdb-6.8.50.20090909/gdb/symfile.h
};
extern void syms_from_objfile (struct objfile *,
Index: gdb-6.8.50.20090909/gdb/infcmd.c
Index: gdb-6.8.91.20090917/gdb/infcmd.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/infcmd.c 2009-09-09 19:20:33.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/infcmd.c 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/infcmd.c 2009-09-17 12:49:01.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/infcmd.c 2009-09-17 12:50:07.000000000 +0200
@@ -2308,6 +2308,9 @@ attach_command_post_wait (char *args, in
post_create_inferior (&current_target, from_tty);
@ -1315,10 +1315,10 @@ Index: gdb-6.8.50.20090909/gdb/infcmd.c
/* Install inferior's terminal modes. */
target_terminal_inferior ();
Index: gdb-6.8.50.20090909/gdb/linux-tdep.c
Index: gdb-6.8.91.20090917/gdb/linux-tdep.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/linux-tdep.c 2009-08-04 22:41:13.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/linux-tdep.c 2009-09-09 19:24:13.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/linux-tdep.c 2009-08-04 22:41:13.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/linux-tdep.c 2009-09-17 12:50:07.000000000 +0200
@@ -163,5 +163,7 @@ in this session.\n"));
void
_initialize_linux_tdep (void)

View File

@ -5,10 +5,10 @@ causing: FAIL: gdb.base/unwindonsignal.exp: unwindonsignal, stack unwound
resume() -> target_resume() move of clear_inline_frame_state() is for:
gdb.mi/mi-nsmoribund.exp
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-bt.c
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-bt.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/testsuite/gdb.opt/inline-bt.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-bt.c 2009-09-09 19:20:00.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-bt.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-bt.c 2009-09-17 12:49:01.000000000 +0200
@@ -13,10 +13,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -28,10 +28,10 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-bt.c
inline int func1(void)
{
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-cmds.c
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/testsuite/gdb.opt/inline-cmds.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-cmds.c 2009-09-09 19:20:00.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-cmds.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.c 2009-09-17 12:49:01.000000000 +0200
@@ -13,13 +13,19 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -54,10 +54,10 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-cmds.c
inline int func1(void)
{
bar ();
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-cmds.exp
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.exp
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-09-09 19:20:00.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-cmds.exp 2009-09-17 12:49:01.000000000 +0200
@@ -230,7 +230,7 @@ set line3 [gdb_get_line_number "set brea
gdb_breakpoint $line3
gdb_continue_to_breakpoint "consecutive func1"
@ -110,10 +110,10 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-cmds.exp
+gdb_test "info frame" "inlined into frame.*" "outer_inline2 inlined"
+gdb_test "fini" "" "up from outer_inline2"
+gdb_test "info frame" " in main \[^\n\]*\n source language.*" "main not inlined"
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-locals.c
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/testsuite/gdb.opt/inline-locals.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-locals.c 2009-09-09 19:20:00.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-locals.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.c 2009-09-17 12:49:01.000000000 +0200
@@ -13,11 +13,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@ -133,10 +133,10 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-locals.c
inline int func1(int arg1)
{
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-locals.exp
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.exp
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/testsuite/gdb.opt/inline-locals.exp 2009-06-30 17:50:27.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-locals.exp 2009-09-09 19:20:00.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-locals.exp 2009-06-30 17:50:27.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-locals.exp 2009-09-17 12:49:01.000000000 +0200
@@ -77,6 +77,9 @@ if { ! $no_frames } {
# Make sure that locals on the stack are found. This is an array to
@ -155,11 +155,11 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-locals.exp
+ setup_kfail *-*-* "gcc/debug.optimization"
+}
gdb_test "print array\[0\]" "\\\$$decimal = 184" "print local (3)"
Index: gdb-6.8.50.20090909/gdb/frame.c
Index: gdb-6.8.91.20090917/gdb/frame.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/frame.c 2009-09-09 19:06:46.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/frame.c 2009-09-09 19:20:00.000000000 +0200
@@ -276,7 +276,7 @@ fprint_frame (struct ui_file *file, stru
--- gdb-6.8.91.20090917.orig/gdb/frame.c 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/frame.c 2009-09-17 12:49:01.000000000 +0200
@@ -310,7 +310,7 @@ fprint_frame (struct ui_file *file, stru
static struct frame_info *
skip_inlined_frames (struct frame_info *frame)
{
@ -168,7 +168,7 @@ Index: gdb-6.8.50.20090909/gdb/frame.c
frame = get_prev_frame (frame);
return frame;
@@ -1715,6 +1715,7 @@ get_frame_address_in_block (struct frame
@@ -1778,6 +1778,7 @@ get_frame_address_in_block (struct frame
{
/* A draft address. */
CORE_ADDR pc = get_frame_pc (this_frame);
@ -176,7 +176,7 @@ Index: gdb-6.8.50.20090909/gdb/frame.c
struct frame_info *next_frame = this_frame->next;
@@ -1757,6 +1758,9 @@ get_frame_address_in_block (struct frame
@@ -1820,6 +1821,9 @@ get_frame_address_in_block (struct frame
while in an inlined function, then the code address of the
"calling" normal function should not be adjusted either. */
@ -186,7 +186,7 @@ Index: gdb-6.8.50.20090909/gdb/frame.c
while (get_frame_type (next_frame) == INLINE_FRAME)
next_frame = next_frame->next;
@@ -1788,7 +1792,7 @@ find_frame_sal (struct frame_info *frame
@@ -1851,7 +1855,7 @@ find_frame_sal (struct frame_info *frame
sym = inline_skipped_symbol (inferior_ptid);
init_sal (sal);
@ -195,19 +195,19 @@ Index: gdb-6.8.50.20090909/gdb/frame.c
{
sal->symtab = SYMBOL_SYMTAB (sym);
sal->line = SYMBOL_LINE (sym);
Index: gdb-6.8.50.20090909/gdb/breakpoint.c
Index: gdb-6.8.91.20090917/gdb/breakpoint.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/breakpoint.c 2009-09-09 19:19:46.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/breakpoint.c 2009-09-09 19:21:14.000000000 +0200
@@ -61,6 +61,7 @@
#include "valprint.h"
--- gdb-6.8.91.20090917.orig/gdb/breakpoint.c 2009-09-17 12:48:51.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/breakpoint.c 2009-09-17 12:49:12.000000000 +0200
@@ -62,6 +62,7 @@
#include "jit.h"
#include "xml-syscall.h"
#include "parser-defs.h"
+#include "inline-frame.h"
/* readline include files */
#include "readline/readline.h"
@@ -3217,10 +3218,24 @@ bpstat_check_breakpoint_conditions (bpst
@@ -3220,10 +3221,24 @@ bpstat_check_breakpoint_conditions (bpst
const struct bp_location *bl = bs->breakpoint_at;
struct breakpoint *b = bl->owner;
@ -236,7 +236,7 @@ Index: gdb-6.8.50.20090909/gdb/breakpoint.c
{
int value_is_zero = 0;
@@ -3380,6 +3395,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
@@ -3383,6 +3398,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
bs->print = 0;
}
bs->commands = copy_command_lines (bs->commands);
@ -249,7 +249,7 @@ Index: gdb-6.8.50.20090909/gdb/breakpoint.c
}
/* Print nothing for this entry if we dont stop or if we dont print. */
@@ -5278,9 +5299,9 @@ set_momentary_breakpoint (struct gdbarch
@@ -5572,9 +5593,9 @@ set_momentary_breakpoint (struct gdbarch
{
struct breakpoint *b;
@ -262,11 +262,11 @@ Index: gdb-6.8.50.20090909/gdb/breakpoint.c
b = set_raw_breakpoint (gdbarch, sal, type);
b->enable_state = bp_enabled;
Index: gdb-6.8.50.20090909/gdb/inline-frame.c
Index: gdb-6.8.91.20090917/gdb/inline-frame.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/inline-frame.c 2009-06-28 02:20:22.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/inline-frame.c 2009-09-09 19:20:00.000000000 +0200
@@ -195,6 +195,12 @@ inline_frame_sniffer (const struct frame
--- gdb-6.8.91.20090917.orig/gdb/inline-frame.c 2009-09-13 18:28:28.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/inline-frame.c 2009-09-17 12:49:01.000000000 +0200
@@ -199,6 +199,12 @@ inline_frame_sniffer (const struct frame
if (frame_block == NULL)
return 0;
@ -279,7 +279,7 @@ Index: gdb-6.8.50.20090909/gdb/inline-frame.c
/* Calculate DEPTH, the number of inlined functions at this
location. */
depth = 0;
@@ -204,6 +210,10 @@ inline_frame_sniffer (const struct frame
@@ -208,6 +214,10 @@ inline_frame_sniffer (const struct frame
if (block_inlined_p (cur_block))
depth++;
@ -290,7 +290,7 @@ Index: gdb-6.8.50.20090909/gdb/inline-frame.c
cur_block = BLOCK_SUPERBLOCK (cur_block);
}
@@ -287,7 +297,6 @@ skip_inline_frames (ptid_t ptid)
@@ -291,7 +301,6 @@ skip_inline_frames (ptid_t ptid)
{
CORE_ADDR this_pc;
struct block *frame_block, *cur_block;
@ -298,7 +298,7 @@ Index: gdb-6.8.50.20090909/gdb/inline-frame.c
int skip_count = 0;
struct inline_state *state;
@@ -308,10 +317,7 @@ skip_inline_frames (ptid_t ptid)
@@ -312,10 +321,7 @@ skip_inline_frames (ptid_t ptid)
of BLOCK_START. */
if (BLOCK_START (cur_block) == this_pc
|| block_starting_point_at (this_pc, cur_block))
@ -310,7 +310,7 @@ Index: gdb-6.8.50.20090909/gdb/inline-frame.c
else
break;
}
@@ -323,7 +329,6 @@ skip_inline_frames (ptid_t ptid)
@@ -327,7 +333,6 @@ skip_inline_frames (ptid_t ptid)
state = allocate_inline_frame_state (ptid);
state->skipped_frames = skip_count;
state->saved_pc = this_pc;
@ -318,7 +318,7 @@ Index: gdb-6.8.50.20090909/gdb/inline-frame.c
if (skip_count != 0)
reinit_frame_cache ();
@@ -341,6 +346,23 @@ step_into_inline_frame (ptid_t ptid)
@@ -345,6 +350,23 @@ step_into_inline_frame (ptid_t ptid)
reinit_frame_cache ();
}
@ -342,10 +342,10 @@ Index: gdb-6.8.50.20090909/gdb/inline-frame.c
/* Return the number of hidden functions inlined into the current
frame. */
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-markers.c
Index: gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-markers.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/testsuite/gdb.opt/inline-markers.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-markers.c 2009-09-09 19:20:00.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/testsuite/gdb.opt/inline-markers.c 2009-06-28 02:20:24.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/testsuite/gdb.opt/inline-markers.c 2009-09-17 12:49:01.000000000 +0200
@@ -15,11 +15,6 @@
extern int x, y;
@ -358,10 +358,10 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.opt/inline-markers.c
void marker(void)
{
x += y; /* set breakpoint 2 here */
Index: gdb-6.8.50.20090909/gdb/gdbthread.h
Index: gdb-6.8.91.20090917/gdb/gdbthread.h
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/gdbthread.h 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/gdbthread.h 2009-09-09 19:20:00.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/gdbthread.h 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/gdbthread.h 2009-09-17 12:49:01.000000000 +0200
@@ -191,6 +191,12 @@ struct thread_info
/* Private data used by the target vector implementation. */
@ -375,10 +375,10 @@ Index: gdb-6.8.50.20090909/gdb/gdbthread.h
};
/* Create an empty thread list, or empty the existing one. */
Index: gdb-6.8.50.20090909/gdb/infcmd.c
Index: gdb-6.8.91.20090917/gdb/infcmd.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/infcmd.c 2009-09-09 19:05:56.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/infcmd.c 2009-09-09 19:20:33.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/infcmd.c 2009-09-17 12:47:07.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/infcmd.c 2009-09-17 12:49:01.000000000 +0200
@@ -1434,11 +1434,11 @@ finish_command_continuation (void *arg)
struct type *value_type;
@ -518,11 +518,11 @@ Index: gdb-6.8.50.20090909/gdb/infcmd.c
}
Index: gdb-6.8.50.20090909/gdb/target.c
Index: gdb-6.8.91.20090917/gdb/target.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/target.c 2009-09-09 19:09:31.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/target.c 2009-09-09 19:21:00.000000000 +0200
@@ -2182,6 +2182,7 @@ target_resume (ptid_t ptid, int step, en
--- gdb-6.8.91.20090917.orig/gdb/target.c 2009-09-17 12:48:49.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/target.c 2009-09-17 12:49:01.000000000 +0200
@@ -2187,6 +2187,7 @@ target_resume (ptid_t ptid, int step, en
{
struct target_ops *t;
@ -530,10 +530,10 @@ Index: gdb-6.8.50.20090909/gdb/target.c
target_dcache_invalidate ();
for (t = current_target.beneath; t != NULL; t = t->beneath)
Index: gdb-6.8.50.20090909/gdb/inline-frame.h
Index: gdb-6.8.91.20090917/gdb/inline-frame.h
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/inline-frame.h 2009-06-28 02:20:22.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/inline-frame.h 2009-09-09 19:20:00.000000000 +0200
--- gdb-6.8.91.20090917.orig/gdb/inline-frame.h 2009-06-28 02:20:22.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/inline-frame.h 2009-09-17 12:49:01.000000000 +0200
@@ -43,6 +43,10 @@ void clear_inline_frame_state (ptid_t pt
void step_into_inline_frame (ptid_t ptid);
@ -545,11 +545,11 @@ Index: gdb-6.8.50.20090909/gdb/inline-frame.h
/* Return the number of hidden functions inlined into the current
frame. */
Index: gdb-6.8.50.20090909/gdb/dwarf2read.c
Index: gdb-6.8.91.20090917/gdb/dwarf2read.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/dwarf2read.c 2009-09-09 19:19:46.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/dwarf2read.c 2009-09-09 19:20:00.000000000 +0200
@@ -4130,6 +4130,7 @@ read_func_scope (struct die_info *die, s
--- gdb-6.8.91.20090917.orig/gdb/dwarf2read.c 2009-09-17 12:48:51.000000000 +0200
+++ gdb-6.8.91.20090917/gdb/dwarf2read.c 2009-09-17 12:49:01.000000000 +0200
@@ -4128,6 +4128,7 @@ read_func_scope (struct die_info *die, s
struct block *block;
unsigned die_children = 0;
int inlined_func = (die->tag == DW_TAG_inlined_subroutine);
@ -557,7 +557,7 @@ Index: gdb-6.8.50.20090909/gdb/dwarf2read.c
if (inlined_func)
{
@@ -4171,7 +4172,10 @@ read_func_scope (struct die_info *die, s
@@ -4169,7 +4170,10 @@ read_func_scope (struct die_info *die, s
add_to_cu_func_list (name, lowpc, highpc, cu);
new = push_context (0, lowpc);

File diff suppressed because it is too large Load Diff

View File

@ -1,229 +0,0 @@
Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.93
diff -p -u -r1.93 objfiles.c
--- ./gdb/objfiles.c 21 Aug 2009 17:57:17 -0000 1.93
+++ ./gdb/objfiles.c 26 Aug 2009 07:07:04 -0000
@@ -790,15 +790,9 @@ qsort_cmp (const void *a, const void *b)
const CORE_ADDR sect2_addr = obj_section_addr (sect2);
if (sect1_addr < sect2_addr)
- {
- gdb_assert (obj_section_endaddr (sect1) <= sect2_addr);
- return -1;
- }
+ return -1;
else if (sect1_addr > sect2_addr)
- {
- gdb_assert (sect1_addr >= obj_section_endaddr (sect2));
- return 1;
- }
+ return 1;
return 0;
}
@@ -823,12 +817,133 @@ preferred_obj_section (struct obj_sectio
return b;
}
+/* Return 1 if SECTION should be inserted into the section map.
+ We want to insert only non-overlay and non-TLS section. */
+
+static int
+insert_section_p (const struct bfd *abfd,
+ const struct bfd_section *section)
+{
+ const bfd_vma lma = bfd_section_lma (abfd, section);
+
+ if (lma != 0 && lma != bfd_section_vma (abfd, section)
+ && (bfd_get_file_flags (abfd) & BFD_IN_MEMORY) == 0)
+ /* This is an overlay section. IN_MEMORY check is needed to avoid
+ discarding sections from the "system supplied DSO" (aka vdso)
+ on Linux. */
+ return 0;
+ if ((bfd_get_section_flags (abfd, section) & SEC_THREAD_LOCAL) != 0)
+ /* This is a TLS section. */
+ return 0;
+
+ return 1;
+}
+
+/* Filter out overlapping sections where one section came from the real
+ objfile, and the other from a separate debuginfo file.
+ Return the size of table after redundant sections have been eliminated. */
+
+static int
+filter_debuginfo_sections (struct obj_section **map, int map_size)
+{
+ int i, j;
+
+ for (i = 0, j = 0; i < map_size - 1; i++)
+ {
+ struct obj_section *const sect1 = map[i];
+ struct obj_section *const sect2 = map[i + 1];
+ const struct objfile *const objfile1 = sect1->objfile;
+ const struct objfile *const objfile2 = sect2->objfile;
+ const CORE_ADDR sect1_addr = obj_section_addr (sect1);
+ const CORE_ADDR sect2_addr = obj_section_addr (sect2);
+
+ if (sect1_addr == sect2_addr
+ && (objfile1->separate_debug_objfile == objfile2
+ || objfile2->separate_debug_objfile == objfile1))
+ {
+ map[j++] = preferred_obj_section (sect1, sect2);
+ ++i;
+ }
+ else
+ map[j++] = sect1;
+ }
+
+ if (i < map_size)
+ map[j++] = map[i];
+
+ /* The map should not have shrunk to less than half the original size. */
+ gdb_assert (map_size / 2 <= j);
+
+ return j;
+}
+
+/* Filter out overlapping sections, issuing a warning if any are found.
+ Overlapping sections could really be overlay sections which we didn't
+ classify as such in insert_section_p, or we could be dealing with a
+ corrupt binary. */
+
+static int
+filter_overlapping_sections (struct obj_section **map, int map_size)
+{
+ int i, j;
+
+ for (i = 0, j = 0; i < map_size - 1; )
+ {
+ int k;
+
+ map[j++] = map[i];
+ for (k = i + 1; k < map_size; k++)
+ {
+ struct obj_section *const sect1 = map[i];
+ struct obj_section *const sect2 = map[k];
+ const CORE_ADDR sect1_addr = obj_section_addr (sect1);
+ const CORE_ADDR sect2_addr = obj_section_addr (sect2);
+ const CORE_ADDR sect1_endaddr = obj_section_endaddr (sect1);
+
+ gdb_assert (sect1_addr <= sect2_addr);
+
+ if (sect1_endaddr <= sect2_addr)
+ break;
+ else
+ {
+ /* We have an overlap. Report it. */
+
+ struct objfile *const objf1 = sect1->objfile;
+ struct objfile *const objf2 = sect2->objfile;
+
+ const struct bfd *const abfd1 = objf1->obfd;
+ const struct bfd *const abfd2 = objf2->obfd;
+
+ const struct bfd_section *const bfds1 = sect1->the_bfd_section;
+ const struct bfd_section *const bfds2 = sect2->the_bfd_section;
+
+ const CORE_ADDR sect2_endaddr = obj_section_endaddr (sect2);
+
+ struct gdbarch *const gdbarch = get_objfile_arch (objf1);
+
+ warning (_("Unexpected overlap between "
+ "section `%s' from `%s' [%s, %s) and "
+ "section `%s' from `%s' [%s, %s)"),
+ bfd_section_name (abfd1, bfds1), objf1->name,
+ paddress (gdbarch, sect1_addr),
+ paddress (gdbarch, sect1_endaddr),
+ bfd_section_name (abfd2, bfds2), objf2->name,
+ paddress (gdbarch, sect2_addr),
+ paddress (gdbarch, sect2_endaddr));
+ }
+ }
+ i = k;
+ }
+ return map_size;
+}
+
+
/* Update PMAP, PMAP_SIZE with non-TLS sections from all objfiles. */
static void
update_section_map (struct obj_section ***pmap, int *pmap_size)
{
- int map_size, i, j;
+ int alloc_size, map_size, i;
struct obj_section *s, **map;
struct objfile *objfile;
@@ -837,55 +952,27 @@ update_section_map (struct obj_section *
map = *pmap;
xfree (map);
-#define insert_p(objf, sec) \
- ((bfd_get_section_flags ((objf)->obfd, (sec)->the_bfd_section) \
- & SEC_THREAD_LOCAL) == 0)
-
- map_size = 0;
+ alloc_size = 0;
ALL_OBJSECTIONS (objfile, s)
- if (insert_p (objfile, s))
- map_size += 1;
+ if (insert_section_p (objfile->obfd, s->the_bfd_section))
+ alloc_size += 1;
- map = xmalloc (map_size * sizeof (*map));
+ map = xmalloc (alloc_size * sizeof (*map));
i = 0;
ALL_OBJSECTIONS (objfile, s)
- if (insert_p (objfile, s))
+ if (insert_section_p (objfile->obfd, s->the_bfd_section))
map[i++] = s;
-#undef insert_p
-
- qsort (map, map_size, sizeof (*map), qsort_cmp);
-
- /* With separate debuginfo files, we may have up to two (almost)
- identical copies of some obj_sections in the map.
- Filter out duplicates. */
- for (i = 0, j = 0; i < map_size; ++i)
- {
- struct obj_section *sect1 = map[i];
- struct obj_section *sect2 = (i + 1 < map_size) ? map[i + 1] : NULL;
-
- if (sect2 == NULL
- || obj_section_addr (sect1) != obj_section_addr (sect2))
- map[j++] = sect1;
- else
- {
- map[j++] = preferred_obj_section (sect1, sect2);
- ++i;
- }
- }
-
- if (j < map_size)
- {
- /* Some duplicates were eliminated.
- The new size shouldn't be less than half of the original. */
- gdb_assert (map_size / 2 <= j);
- map_size = j;
-
- map = xrealloc (map, map_size * sizeof (*map)); /* Trim excess space. */
- }
+ qsort (map, alloc_size, sizeof (*map), qsort_cmp);
+ map_size = filter_debuginfo_sections(map, alloc_size);
+ map_size = filter_overlapping_sections(map, map_size);
+
+ if (map_size < alloc_size)
+ /* Some sections were eliminated. Trim excess space. */
+ map = xrealloc (map, map_size * sizeof (*map));
else
- gdb_assert (j == map_size);
+ gdb_assert (alloc_size == map_size);
*pmap = map;
*pmap_size = map_size;

View File

@ -10,7 +10,7 @@ Name: gdb%{?_with_debug:-debug}
# Set version to contents of gdb/version.in.
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
Version: 6.8.50.20090910
Version: 6.8.91.20090917
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
@ -18,7 +18,7 @@ Release: 1%{?_with_upstream:.upstream}%{?dist}
License: GPLv3+
Group: Development/Debuggers
Source: ftp://sourceware.org/pub/gdb/snapshots/current/gdb-%{version}.tar.bz2
Source: ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL: http://gnu.org/software/gdb/
@ -149,9 +149,6 @@ Patch163: gdb-6.3-inheritancetest-20050726.patch
# Add readnever option
Patch164: gdb-6.3-readnever-20050907.patch
# Fix frame pointer for ia64 sigtramp frame
Patch166: gdb-6.3-ia64-sigtramp-fp-20050926.patch
# Fix ia64 gdb problem with user-specified SIGILL handling
Patch169: gdb-6.3-ia64-sigill-20051115.patch
@ -360,9 +357,6 @@ Patch360: gdb-6.8-bz457187-largefile-test.patch
# Fix compatibility of --with-system-readline and readline-6.0+.
Patch375: gdb-readline-6.0.patch
# Temporarily disable assertion checks crashing in qsort_cmp (BZ 515434).
Patch378: gdb-bz515434-qsort_cmp.patch
BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
Requires: readline
BuildRequires: readline-devel
@ -479,7 +473,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch162 -p1
%patch163 -p1
%patch164 -p1
%patch166 -p1
%patch169 -p1
%patch170 -p1
%patch176 -p1
@ -551,7 +544,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch352 -p1
%patch360 -p1
%patch375 -p1
%patch378 -p1
%patch124 -p1
find -name "*.orig" | xargs rm -f
@ -811,6 +803,7 @@ fi
%{python_sitelib}/gdb
%endif # 0%{!?_without_python:1}
%endif # 0%{!?_with_upstream:1}
%{_datadir}/gdb
%{_infodir}/annotate.info*
%{_infodir}/gdb.info*
%{_infodir}/gdbint.info*
@ -825,6 +818,11 @@ fi
%endif
%changelog
* Thu Sep 17 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.91.20090917-1
- Upgrade to the FSF GDB gdb-7.0 branch and snapshot: 6.8.91.20090917
- archer-jankratochvil-fedora12 commit: 16f3f01cc2cbc15283462eaabdfcde92cf42cdc6
- Drop the qsort_cmp workaround as resolved in FSF GDB now (BZ 515434).
* Thu Sep 10 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090910-1
- Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090910
- archer-jankratochvil-fedora12 commit: 941eb487a42933e442cb4d11344cda96ecb8a04d

View File

@ -1 +1 @@
476e005b8bb33c5c3b3f0b7bd93988bc gdb-6.8.50.20090910.tar.bz2
eaed9150b219c8ee56bb676e32a9d2a5 gdb-6.8.91.20090917.tar.bz2