- Upgrade to the upstream gdb-6.8 prerelease.

- Cleanup the leftover `.orig' files during %prep.
- Add expat-devel check by the configure script (for the other-arch
    builds).
- `--with testsuite' now also BuildRequires: fpc
- Backport fix of a segfault + PIE regression since 6.7.1 on PIE
    executables.
- Update the printed GDB version string to be Fedora specific.
This commit is contained in:
Jan Kratochvil 2008-03-03 16:13:47 +00:00
commit 25ff8a1663
34 changed files with 4017 additions and 11545 deletions

View file

@ -10,11 +10,19 @@
* solib-svr4.c (svr4_current_sos): Fix segfault on NULL EXEC_BFD.
Index: gdb-6.7.1/gdb/dwarf2read.c
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
2008-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to gdb-6.7.50.20080227.
Index: gdb-6.7.50.20080227/gdb/dwarf2read.c
===================================================================
--- gdb-6.7.1.orig/gdb/dwarf2read.c 2007-11-02 15:24:10.000000000 +0100
+++ gdb-6.7.1/gdb/dwarf2read.c 2007-11-02 15:24:19.000000000 +0100
@@ -1226,7 +1226,7 @@ dwarf2_build_psymtabs (struct objfile *o
--- gdb-6.7.50.20080227.orig/gdb/dwarf2read.c 2008-02-27 08:57:20.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/dwarf2read.c 2008-02-27 08:57:31.000000000 +0100
@@ -1217,7 +1217,7 @@ dwarf2_build_psymtabs (struct objfile *o
else
dwarf2_per_objfile->loc_buffer = NULL;
@ -23,10 +31,10 @@ Index: gdb-6.7.1/gdb/dwarf2read.c
|| (objfile->global_psymbols.size == 0
&& objfile->static_psymbols.size == 0))
{
Index: gdb-6.7.1/gdb/auxv.c
Index: gdb-6.7.50.20080227/gdb/auxv.c
===================================================================
--- gdb-6.7.1.orig/gdb/auxv.c 2007-08-23 20:08:26.000000000 +0200
+++ gdb-6.7.1/gdb/auxv.c 2007-11-02 15:24:19.000000000 +0100
--- gdb-6.7.50.20080227.orig/gdb/auxv.c 2008-01-16 17:27:37.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/auxv.c 2008-02-27 08:57:31.000000000 +0100
@@ -80,7 +80,7 @@ procfs_xfer_auxv (struct target_ops *ops
Return 1 if an entry was read into *TYPEP and *VALP. */
int
@ -89,7 +97,7 @@ Index: gdb-6.7.1/gdb/auxv.c
{
#define TAG(tag, text, kind) \
case tag: name = #tag; description = text; flavor = kind; break
@@ -211,7 +213,7 @@ fprint_target_auxv (struct ui_file *file
@@ -213,7 +215,7 @@ fprint_target_auxv (struct ui_file *file
}
fprintf_filtered (file, "%-4s %-20s %-30s ",
@ -98,10 +106,10 @@ Index: gdb-6.7.1/gdb/auxv.c
switch (flavor)
{
case dec:
Index: gdb-6.7.1/gdb/auxv.h
Index: gdb-6.7.50.20080227/gdb/auxv.h
===================================================================
--- gdb-6.7.1.orig/gdb/auxv.h 2007-08-23 20:08:26.000000000 +0200
+++ gdb-6.7.1/gdb/auxv.h 2007-11-02 15:24:19.000000000 +0100
--- gdb-6.7.50.20080227.orig/gdb/auxv.h 2008-01-01 23:53:09.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/auxv.h 2008-02-27 08:57:31.000000000 +0100
@@ -35,14 +35,14 @@ struct target_ops; /* Forward declarati
Return 1 if an entry was read into *TYPEP and *VALP. */
extern int target_auxv_parse (struct target_ops *ops,
@ -119,11 +127,11 @@ Index: gdb-6.7.1/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.7.1/gdb/breakpoint.h
Index: gdb-6.7.50.20080227/gdb/breakpoint.h
===================================================================
--- gdb-6.7.1.orig/gdb/breakpoint.h 2007-11-02 15:22:24.000000000 +0100
+++ gdb-6.7.1/gdb/breakpoint.h 2007-11-02 15:24:59.000000000 +0100
@@ -150,6 +150,7 @@ enum enable_state
--- gdb-6.7.50.20080227.orig/gdb/breakpoint.h 2008-02-01 17:24:46.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/breakpoint.h 2008-02-27 08:57:31.000000000 +0100
@@ -144,6 +144,7 @@ enum enable_state
automatically enabled and reset when the call
"lands" (either completes, or stops at another
eventpoint). */
@ -131,7 +139,7 @@ Index: gdb-6.7.1/gdb/breakpoint.h
bp_permanent /* There is a breakpoint instruction hard-wired into
the target's code. Don't try to write another
breakpoint instruction on top of it, or restore
@@ -826,6 +827,10 @@ extern void remove_thread_event_breakpoi
@@ -823,6 +824,10 @@ extern void remove_thread_event_breakpoi
extern void disable_breakpoints_in_shlibs (void);
@ -139,13 +147,13 @@ Index: gdb-6.7.1/gdb/breakpoint.h
+
+extern void re_enable_breakpoints_at_startup (void);
+
extern void create_solib_load_event_breakpoint (char *, int, char *, char *);
/* This function returns TRUE if ep is a catchpoint. */
extern int ep_is_catchpoint (struct breakpoint *);
extern void create_solib_unload_event_breakpoint (char *, int,
Index: gdb-6.7.1/gdb/symfile-mem.c
Index: gdb-6.7.50.20080227/gdb/symfile-mem.c
===================================================================
--- gdb-6.7.1.orig/gdb/symfile-mem.c 2007-08-23 20:08:39.000000000 +0200
+++ gdb-6.7.1/gdb/symfile-mem.c 2007-11-02 15:24:19.000000000 +0100
--- gdb-6.7.50.20080227.orig/gdb/symfile-mem.c 2008-01-01 23:53:13.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/symfile-mem.c 2008-02-27 08:57:31.000000000 +0100
@@ -108,7 +108,7 @@ symbol_file_add_from_memory (struct bfd
}
@ -155,11 +163,11 @@ Index: gdb-6.7.1/gdb/symfile-mem.c
/* This might change our ideas about frames already looked at. */
reinit_frame_cache ();
Index: gdb-6.7.1/gdb/infrun.c
Index: gdb-6.7.50.20080227/gdb/infrun.c
===================================================================
--- gdb-6.7.1.orig/gdb/infrun.c 2007-11-02 15:21:57.000000000 +0100
+++ gdb-6.7.1/gdb/infrun.c 2007-11-02 15:24:19.000000000 +0100
@@ -2298,6 +2298,11 @@ process_event_stop_test:
--- gdb-6.7.50.20080227.orig/gdb/infrun.c 2008-02-27 08:57:20.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/infrun.c 2008-02-27 08:57:31.000000000 +0100
@@ -2277,6 +2277,11 @@ process_event_stop_test:
#endif
target_terminal_inferior ();
@ -171,13 +179,13 @@ Index: gdb-6.7.1/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.7.1/gdb/objfiles.c
Index: gdb-6.7.50.20080227/gdb/objfiles.c
===================================================================
--- gdb-6.7.1.orig/gdb/objfiles.c 2007-08-23 20:08:36.000000000 +0200
+++ gdb-6.7.1/gdb/objfiles.c 2007-11-02 15:24:19.000000000 +0100
@@ -48,6 +48,9 @@
#include "dictionary.h"
--- gdb-6.7.50.20080227.orig/gdb/objfiles.c 2008-01-01 23:53:12.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/objfiles.c 2008-02-27 08:57:31.000000000 +0100
@@ -49,6 +49,9 @@
#include "source.h"
#include "addrmap.h"
+#include "auxv.h"
+#include "elf/common.h"
@ -185,7 +193,7 @@ Index: gdb-6.7.1/gdb/objfiles.c
/* Prototypes for local functions */
static void objfile_alloc_data (struct objfile *objfile);
@@ -259,7 +262,19 @@ init_entry_point_info (struct objfile *o
@@ -260,7 +263,19 @@ init_entry_point_info (struct objfile *o
CORE_ADDR
entry_point_address (void)
{
@ -206,10 +214,10 @@ Index: gdb-6.7.1/gdb/objfiles.c
}
/* Create the terminating entry of OBJFILE's minimal symbol table.
Index: gdb-6.7.1/gdb/solib-svr4.c
Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
===================================================================
--- gdb-6.7.1.orig/gdb/solib-svr4.c 2007-11-02 15:21:46.000000000 +0100
+++ gdb-6.7.1/gdb/solib-svr4.c 2007-11-02 15:24:19.000000000 +0100
--- gdb-6.7.50.20080227.orig/gdb/solib-svr4.c 2008-02-27 08:57:19.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/solib-svr4.c 2008-02-27 08:59:06.000000000 +0100
@@ -31,6 +31,8 @@
#include "gdbcore.h"
#include "target.h"
@ -219,7 +227,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
#include "gdb_assert.h"
@@ -249,7 +251,9 @@ static char *debug_loader_name;
@@ -246,7 +248,9 @@ static char *debug_loader_name;
/* Local function prototypes */
@ -229,7 +237,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
@@ -352,10 +356,12 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
@@ -349,10 +353,12 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
int arch_size, step, sect_size;
long dyn_tag;
CORE_ADDR dyn_ptr, dyn_addr;
@ -242,7 +250,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
if (abfd == NULL)
return 0;
@@ -363,19 +369,74 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
@@ -360,19 +366,74 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
if (arch_size == -1)
return 0;
@ -319,7 +327,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
/* Iterate over BUF and scan for DYNTAG. If found, set PTR and return. */
step = (arch_size == 32) ? sizeof (Elf32_External_Dyn)
@@ -408,9 +469,43 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
@@ -405,9 +466,43 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
CORE_ADDR ptr_addr;
ptr_addr = dyn_addr + (buf - bufstart) + arch_size / 8;
@ -365,7 +373,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
*ptr = dyn_ptr;
}
return 1;
@@ -547,6 +642,10 @@ solib_svr4_r_map (void)
@@ -544,6 +639,10 @@ solib_svr4_r_map (void)
{
struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
@ -376,41 +384,40 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
return read_memory_typed_address (debug_base + lmo->r_map_offset,
builtin_type_void_data_ptr);
}
@@ -704,6 +803,11 @@ svr4_current_sos (void)
@@ -713,6 +812,11 @@ svr4_current_sos (void)
struct so_list *head = 0;
struct so_list **link_ptr = &head;
CORE_ADDR ldsomap = 0;
+ const char *filename = exec_bfd ? exec_bfd->filename : "<none>";
+
+ if (debug_solib)
+ fprintf_unfiltered (gdb_stdlog,
+ "svr4_current_sos: exec_bfd %s\n", filename);
+
/* Make sure we've looked up the inferior's dynamic linker's base
structure. */
/* Always locate the debug struct, in case it has moved. */
debug_base = 0;
@@ -721,10 +825,19 @@ svr4_current_sos (void)
/* If we can't find the dynamic linker's base structure, this
must not be a dynamically linked executable. Hmm. */
if (! debug_base)
@@ -713,11 +817,20 @@ svr4_current_sos (void)
/* If we can't find the dynamic linker's base structure, this
must not be a dynamically linked executable. Hmm. */
if (! debug_base)
- return svr4_default_sos ();
+ {
+ if (debug_solib)
+ fprintf_unfiltered (gdb_stdlog,
+ "svr4_current_sos: no DT_DEBUG found in %s -- return now\n",
+ filename);
+ return svr4_default_sos ();
+ }
}
- return svr4_default_sos ();
+ {
+ if (debug_solib)
+ fprintf_unfiltered (gdb_stdlog,
+ "svr4_current_sos: no DT_DEBUG found in %s -- return now\n",
+ filename);
+ return svr4_default_sos ();
+ }
/* Walk the inferior's link map list, and build our list of
`struct so_list' nodes. */
+ if (debug_solib)
+ fprintf_unfiltered (gdb_stdlog,
+ "svr4_current_sos: walk link map in %s\n", filename);
+ "svr4_current_sos: walk link map in %s\n", filename);
lm = solib_svr4_r_map ();
while (lm)
@@ -733,23 +847,103 @@ svr4_current_sos (void)
@@ -740,23 +853,103 @@ svr4_current_sos (void)
new->lm_info->lm = xzalloc (lmo->link_map_size);
make_cleanup (xfree, new->lm_info->lm);
@ -516,7 +523,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
target_read_string (LM_NAME (new), &buffer,
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
if (errcode != 0)
@@ -757,23 +951,35 @@ svr4_current_sos (void)
@@ -764,23 +957,35 @@ svr4_current_sos (void)
safe_strerror (errcode));
else
{
@ -568,7 +575,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
}
/* On Solaris, the dynamic linker is not in the normal list of
@@ -789,6 +995,9 @@ svr4_current_sos (void)
@@ -796,6 +1001,9 @@ svr4_current_sos (void)
if (head == NULL)
return svr4_default_sos ();
@ -578,7 +585,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
return head;
}
@@ -868,7 +1079,7 @@ svr4_fetch_objfile_link_map (struct objf
@@ -875,7 +1083,7 @@ svr4_fetch_objfile_link_map (struct objf
/* On some systems, the only way to recognize the link map entry for
the main executable file is by looking at its name. Return
non-zero iff SONAME matches one of the known main executable names. */
@ -587,7 +594,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
static int
match_main (char *soname)
{
@@ -882,6 +1093,7 @@ match_main (char *soname)
@@ -889,6 +1097,7 @@ match_main (char *soname)
return (0);
}
@ -595,7 +602,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
/* Return 1 if PC lies in the dynamic symbol resolution code of the
SVR4 run time loader. */
@@ -979,6 +1191,11 @@ enable_break (void)
@@ -1040,6 +1249,11 @@ enable_break (void)
/* Find the .interp section; if not found, warn the user and drop
into the old breakpoint at symbol code. */
interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
@ -607,7 +614,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
if (interp_sect)
{
unsigned int interp_sect_size;
@@ -1018,6 +1235,9 @@ enable_break (void)
@@ -1074,6 +1288,9 @@ enable_break (void)
if (tmp_fd >= 0)
tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
@ -617,7 +624,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
if (tmp_bfd == NULL)
goto bkpt_at_symbol;
@@ -1115,6 +1335,9 @@ enable_break (void)
@@ -1180,6 +1397,9 @@ enable_break (void)
if (sym_addr != 0)
{
create_solib_event_breakpoint (load_addr + sym_addr);
@ -627,7 +634,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
return 1;
}
@@ -1375,6 +1598,8 @@ svr4_solib_create_inferior_hook (void)
@@ -1440,6 +1660,8 @@ svr4_solib_create_inferior_hook (void)
while (stop_signal != TARGET_SIGNAL_TRAP);
stop_soon = NO_STOP_QUIETLY;
#endif /* defined(_SCO_DS) */
@ -636,7 +643,7 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
}
static void
@@ -1551,6 +1776,75 @@ svr4_lp64_fetch_link_map_offsets (void)
@@ -1620,6 +1842,75 @@ svr4_lp64_fetch_link_map_offsets (void)
return lmp;
}
@ -712,20 +719,19 @@ Index: gdb-6.7.1/gdb/solib-svr4.c
struct target_so_ops svr4_so_ops;
@@ -1592,4 +1886,8 @@ _initialize_svr4_solib (void)
/* FIXME: Don't do this here. *_gdbarch_init() should set so_ops. */
current_target_so_ops = &svr4_so_ops;
@@ -1678,4 +1969,7 @@ _initialize_svr4_solib (void)
svr4_so_ops.in_dynsym_resolve_code = svr4_in_dynsym_resolve_code;
svr4_so_ops.lookup_lib_global_symbol = elf_lookup_lib_symbol;
svr4_so_ops.same = svr4_same;
+
+ add_info ("linkmap", info_linkmap_command,
+ "Display the inferior's linkmap.");
+
+ "Display the inferior's linkmap.");
}
Index: gdb-6.7.1/gdb/varobj.c
Index: gdb-6.7.50.20080227/gdb/varobj.c
===================================================================
--- gdb-6.7.1.orig/gdb/varobj.c 2007-08-31 21:01:17.000000000 +0200
+++ gdb-6.7.1/gdb/varobj.c 2007-11-02 15:24:19.000000000 +0100
@@ -1116,6 +1116,62 @@ install_new_value (struct varobj *var, s
--- gdb-6.7.50.20080227.orig/gdb/varobj.c 2008-02-04 08:49:04.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/varobj.c 2008-02-27 08:57:31.000000000 +0100
@@ -1078,6 +1078,62 @@ install_new_value (struct varobj *var, s
return changed;
}
@ -788,10 +794,10 @@ Index: gdb-6.7.1/gdb/varobj.c
/* Update the values for a variable and its children. This is a
two-pronged attack. First, re-parse the value for the root's
expression to see if it's changed. Then go all the way
Index: gdb-6.7.1/gdb/solist.h
Index: gdb-6.7.50.20080227/gdb/solist.h
===================================================================
--- gdb-6.7.1.orig/gdb/solist.h 2007-08-23 20:08:38.000000000 +0200
+++ gdb-6.7.1/gdb/solist.h 2007-11-02 15:24:19.000000000 +0100
--- gdb-6.7.50.20080227.orig/gdb/solist.h 2008-01-07 16:19:58.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/solist.h 2008-02-27 08:57:31.000000000 +0100
@@ -61,6 +61,8 @@ struct so_list
bfd *abfd;
char symbols_loaded; /* flag: symbols read in yet? */
@ -801,7 +807,7 @@ Index: gdb-6.7.1/gdb/solist.h
struct objfile *objfile; /* objfile for loaded lib */
struct section_table *sections;
struct section_table *sections_end;
@@ -123,9 +125,15 @@ void free_so (struct so_list *so);
@@ -127,9 +129,15 @@ void free_so (struct so_list *so);
/* Return address of first so_list entry in master shared object list. */
struct so_list *master_so_list (void);
@ -817,28 +823,28 @@ Index: gdb-6.7.1/gdb/solist.h
/* FIXME: gdbarch needs to control this variable */
extern struct target_so_ops *current_target_so_ops;
@@ -143,4 +151,6 @@ struct symbol *solib_global_lookup (cons
@@ -140,4 +148,6 @@ struct symbol *solib_global_lookup (cons
const domain_enum domain,
struct symtab **symtab);
+/* Controls the printing of debugging output. */
+extern int debug_solib;
#endif
Index: gdb-6.7.1/gdb/varobj.h
Index: gdb-6.7.50.20080227/gdb/varobj.h
===================================================================
--- gdb-6.7.1.orig/gdb/varobj.h 2007-08-31 20:52:05.000000000 +0200
+++ gdb-6.7.1/gdb/varobj.h 2007-11-02 15:24:19.000000000 +0100
@@ -114,4 +114,6 @@ extern int varobj_update (struct varobj
--- gdb-6.7.50.20080227.orig/gdb/varobj.h 2008-01-30 08:17:31.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/varobj.h 2008-02-27 08:57:31.000000000 +0100
@@ -122,4 +122,6 @@ extern void varobj_invalidate (void);
extern void varobj_invalidate (void);
extern int varobj_editable_p (struct varobj *var);
+extern void varobj_refresh(void);
+
#endif /* VAROBJ_H */
Index: gdb-6.7.1/gdb/symfile.c
Index: gdb-6.7.50.20080227/gdb/symfile.c
===================================================================
--- gdb-6.7.1.orig/gdb/symfile.c 2007-09-24 23:48:05.000000000 +0200
+++ gdb-6.7.1/gdb/symfile.c 2007-11-02 15:24:19.000000000 +0100
--- gdb-6.7.50.20080227.orig/gdb/symfile.c 2008-01-29 23:47:20.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/symfile.c 2008-02-27 08:57:31.000000000 +0100
@@ -47,6 +47,7 @@
#include "readline/readline.h"
#include "gdb_assert.h"
@ -847,7 +853,7 @@ Index: gdb-6.7.1/gdb/symfile.c
#include "observer.h"
#include "exec.h"
#include "parser-defs.h"
@@ -779,7 +780,7 @@ syms_from_objfile (struct objfile *objfi
@@ -778,7 +779,7 @@ syms_from_objfile (struct objfile *objfi
/* Now either addrs or offsets is non-zero. */
@ -856,7 +862,7 @@ Index: gdb-6.7.1/gdb/symfile.c
{
/* We will modify the main symbol table, make sure that all its users
will be cleaned up if an error occurs during symbol reading. */
@@ -807,7 +808,7 @@ syms_from_objfile (struct objfile *objfi
@@ -806,7 +807,7 @@ syms_from_objfile (struct objfile *objfi
We no longer warn if the lowest section is not a text segment (as
happens for the PA64 port. */
@ -865,7 +871,7 @@ Index: gdb-6.7.1/gdb/symfile.c
{
asection *lower_sect;
asection *sect;
@@ -976,17 +977,21 @@ new_symfile_objfile (struct objfile *obj
@@ -975,17 +976,21 @@ new_symfile_objfile (struct objfile *obj
/* If this is the main symbol file we have to clean up all users of the
old main symbol file. Otherwise it is sufficient to fixup all the
breakpoints that may have been redefined by this symbol file. */
@ -889,7 +895,7 @@ Index: gdb-6.7.1/gdb/symfile.c
/* We're done reading the symbol file; finish off complaints. */
clear_complaints (&symfile_complaints, 0, verbo);
@@ -1029,7 +1034,7 @@ symbol_file_add_with_addrs_or_offsets (b
@@ -1028,7 +1033,7 @@ symbol_file_add_with_addrs_or_offsets (b
interactively wiping out any existing symbols. */
if ((have_full_symbols () || have_partial_symbols ())
@ -898,7 +904,7 @@ Index: gdb-6.7.1/gdb/symfile.c
&& from_tty
&& !query ("Load new symbol table from \"%s\"? ", name))
error (_("Not confirmed."));
@@ -1213,6 +1218,10 @@ symbol_file_clear (int from_tty)
@@ -1212,6 +1217,10 @@ symbol_file_clear (int from_tty)
symfile_objfile->name)
: !query (_("Discard symbol table? "))))
error (_("Not confirmed."));
@ -909,7 +915,7 @@ Index: gdb-6.7.1/gdb/symfile.c
free_all_objfiles ();
/* solib descriptors may have handles to objfiles. Since their
@@ -2470,6 +2479,8 @@ reread_symbols (void)
@@ -2466,6 +2475,8 @@ reread_symbols (void)
/* Discard cleanups as symbol reading was successful. */
discard_cleanups (old_cleanups);
@ -918,7 +924,7 @@ Index: gdb-6.7.1/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. */
@@ -2837,6 +2848,7 @@ clear_symtab_users (void)
@@ -2834,6 +2845,7 @@ clear_symtab_users (void)
breakpoint_re_set ();
set_default_breakpoint (0, 0, 0, 0);
clear_pc_function_cache ();
@ -926,101 +932,20 @@ Index: gdb-6.7.1/gdb/symfile.c
observer_notify_new_objfile (NULL);
/* Clear globals which might have pointed into a removed objfile.
Index: gdb-6.7.1/gdb/breakpoint.c
Index: gdb-6.7.50.20080227/gdb/breakpoint.c
===================================================================
--- gdb-6.7.1.orig/gdb/breakpoint.c 2007-11-02 15:24:10.000000000 +0100
+++ gdb-6.7.1/gdb/breakpoint.c 2007-11-02 15:26:50.000000000 +0100
@@ -847,15 +847,15 @@ insert_watchpoints_for_new_thread (ptid_
struct value *v = b->owner->val_chain;
--- gdb-6.7.50.20080227.orig/gdb/breakpoint.c 2008-02-27 08:57:20.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/breakpoint.c 2008-02-27 08:57:31.000000000 +0100
@@ -923,7 +923,7 @@ update_watchpoint (struct breakpoint *b,
value_release_to_mark (mark);
/* Look at each value on the value chain. */
- for (; v; v = v->next)
+ for (; v; v = value_next (v))
{
/* If it's a memory location, and GDB actually needed
its contents to evaluate the expression, then we
must watch it. */
if (VALUE_LVAL (v) == lval_memory
- && ! VALUE_LAZY (v))
+ && ! value_lazy (v))
{
- struct type *vtype = check_typedef (VALUE_TYPE (v));
+ struct type *vtype = check_typedef (value_type (v));
/* We only watch structs and arrays if user asked
for it explicitly, never if they just happen to
@@ -867,8 +867,8 @@ insert_watchpoints_for_new_thread (ptid_
CORE_ADDR addr;
int len, type;
- addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
- len = TYPE_LENGTH (VALUE_TYPE (v));
+ addr = VALUE_ADDRESS (v) + value_offset (v);
+ len = TYPE_LENGTH (value_type (v));
type = hw_write;
if (b->owner->type == bp_read_watchpoint)
type = hw_read;
@@ -2767,12 +2767,12 @@ mark_triggered_watchpoints (CORE_ADDR st
|| b->type == bp_read_watchpoint
|| b->type == bp_access_watchpoint)
{
- for (v = b->val_chain; v; v = v->next)
+ for (v = b->val_chain; v; v = value_next (v))
{
if (VALUE_LVAL (v) == lval_memory
- && ! VALUE_LAZY (v))
+ && ! value_lazy (v))
{
- struct type *vtype = check_typedef (VALUE_TYPE (v));
+ struct type *vtype = check_typedef (value_type (v));
if (v == b->val_chain
|| (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
@@ -2780,11 +2780,11 @@ mark_triggered_watchpoints (CORE_ADDR st
{
CORE_ADDR vaddr;
- vaddr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
+ vaddr = VALUE_ADDRESS (v) + value_offset (v);
/* Exact match not required. Within range is
sufficient. */
if (addr >= vaddr &&
- addr < vaddr + TYPE_LENGTH (VALUE_TYPE (v)))
+ addr < vaddr + TYPE_LENGTH (value_type (v)))
b->watchpoint_triggered = 1;
}
}
@@ -2957,12 +2957,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
bs->stop = 0;
continue;
}
- for (v = b->val_chain; v; v = v->next)
+ for (v = b->val_chain; v; v = value_next (v))
{
if (VALUE_LVAL (v) == lval_memory
- && ! VALUE_LAZY (v))
+ && ! value_lazy (v))
{
- struct type *vtype = check_typedef (VALUE_TYPE (v));
+ struct type *vtype = check_typedef (value_type (v));
if (v == b->val_chain
|| (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
@@ -2970,11 +2970,11 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
{
CORE_ADDR vaddr;
- vaddr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
+ vaddr = VALUE_ADDRESS (v) + value_offset (v);
/* Exact match not required. Within range is
sufficient. */
if (addr >= vaddr &&
- addr < vaddr + TYPE_LENGTH (VALUE_TYPE (v)))
+ addr < vaddr + TYPE_LENGTH (value_type (v)))
must_check_value = 1;
}
}
@@ -4118,7 +4118,8 @@ describe_other_breakpoints (CORE_ADDR pc
/* Look at each value on the value chain. */
- for (; v; v = next)
+ for (; v; v = value_next (v))
{
/* If it's a memory location, and GDB actually needed
its contents to evaluate the expression, then we
@@ -3882,7 +3882,8 @@ describe_other_breakpoints (CORE_ADDR pc
printf_filtered (" (thread %d)", b->thread);
printf_filtered ("%s%s ",
((b->enable_state == bp_disabled ||
@ -1030,7 +955,7 @@ Index: gdb-6.7.1/gdb/breakpoint.c
? " (disabled)"
: b->enable_state == bp_permanent
? " (permanent)"
@@ -4773,6 +4774,62 @@ disable_breakpoints_in_unloaded_shlib (s
@@ -4534,6 +4535,62 @@ disable_breakpoints_in_unloaded_shlib (s
}
}
@ -1091,13 +1016,13 @@ Index: gdb-6.7.1/gdb/breakpoint.c
+
+
static void
solib_load_unload_1 (char *hookname, int tempflag, char *dll_pathname,
char *cond_string, enum bptype bp_kind)
Index: gdb-6.7.1/gdb/solib.c
create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
enum bptype bp_kind)
Index: gdb-6.7.50.20080227/gdb/solib.c
===================================================================
--- gdb-6.7.1.orig/gdb/solib.c 2007-08-23 20:08:38.000000000 +0200
+++ gdb-6.7.1/gdb/solib.c 2007-11-02 15:24:19.000000000 +0100
@@ -78,6 +78,8 @@ set_solib_ops (struct gdbarch *gdbarch,
--- gdb-6.7.50.20080227.orig/gdb/solib.c 2008-01-07 16:19:58.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/solib.c 2008-02-27 08:57:31.000000000 +0100
@@ -79,6 +79,8 @@ set_solib_ops (struct gdbarch *gdbarch,
/* external data declarations */
@ -1106,7 +1031,7 @@ Index: gdb-6.7.1/gdb/solib.c
/* FIXME: gdbarch needs to control this variable, or else every
configuration needs to call set_solib_ops. */
struct target_so_ops *current_target_so_ops;
@@ -105,6 +107,8 @@ The search path for loading non-absolute
@@ -102,6 +104,8 @@ The search path for loading non-absolute
value);
}
@ -1115,7 +1040,7 @@ Index: gdb-6.7.1/gdb/solib.c
/*
GLOBAL FUNCTION
@@ -394,7 +398,6 @@ free_so (struct so_list *so)
@@ -391,7 +395,6 @@ free_so (struct so_list *so)
xfree (so);
}
@ -1123,7 +1048,7 @@ Index: gdb-6.7.1/gdb/solib.c
/* Return address of first so_list entry in master shared object list. */
struct so_list *
master_so_list (void)
@@ -402,7 +405,6 @@ master_so_list (void)
@@ -399,7 +402,6 @@ master_so_list (void)
return so_list_head;
}
@ -1131,7 +1056,7 @@ Index: gdb-6.7.1/gdb/solib.c
/* A small stub to get us past the arg-passing pinhole of catch_errors. */
static int
@@ -414,15 +416,40 @@ symbol_add_stub (void *arg)
@@ -411,15 +413,40 @@ symbol_add_stub (void *arg)
/* Have we already loaded this shared object? */
ALL_OBJFILES (so->objfile)
{
@ -1175,18 +1100,18 @@ Index: gdb-6.7.1/gdb/solib.c
free_section_addr_info (sap);
return (1);
@@ -550,6 +577,10 @@ update_solib_list (int from_tty, struct
the inferior's current list. */
while (i)
{
+ if (debug_solib)
+ fprintf_unfiltered (gdb_stdlog,
+ "update_solib_list: compare gdb:%s and inferior:%s\n",
+ gdb->so_original_name, i->so_original_name);
if (! strcmp (gdb->so_original_name, i->so_original_name))
break;
@@ -603,28 +634,7 @@ update_solib_list (int from_tty, struct
@@ -545,6 +572,10 @@ update_solib_list (int from_tty, struct
}
else
{
+ if (debug_solib)
+ fprintf_unfiltered (gdb_stdlog,
+ "update_solib_list: compare gdb:%s and inferior:%s\n",
+ gdb->so_original_name, i->so_original_name);
if (! strcmp (gdb->so_original_name, i->so_original_name))
break;
}
@@ -599,28 +630,7 @@ update_solib_list (int from_tty, struct
/* Fill in the rest of each of the `struct so_list' nodes. */
for (i = inferior; i; i = i->next)
{
@ -1216,7 +1141,7 @@ Index: gdb-6.7.1/gdb/solib.c
/* Notify any observer that the shared object has been
loaded now that we've added it to GDB's tables. */
@@ -720,6 +730,41 @@ solib_add (char *pattern, int from_tty,
@@ -716,6 +726,41 @@ solib_add (char *pattern, int from_tty,
}
}
@ -1258,7 +1183,7 @@ Index: gdb-6.7.1/gdb/solib.c
/*
@@ -1045,4 +1090,12 @@ This takes precedence over the environme
@@ -1035,4 +1080,12 @@ This takes precedence over the environme
reload_shared_libraries,
show_solib_search_path,
&setlist, &showlist);
@ -1271,11 +1196,11 @@ Index: gdb-6.7.1/gdb/solib.c
+ NULL, NULL,
+ &setdebuglist, &showdebuglist);
}
Index: gdb-6.7.1/gdb/elfread.c
Index: gdb-6.7.50.20080227/gdb/elfread.c
===================================================================
--- gdb-6.7.1.orig/gdb/elfread.c 2007-08-23 20:08:28.000000000 +0200
+++ gdb-6.7.1/gdb/elfread.c 2007-11-02 15:24:19.000000000 +0100
@@ -611,7 +611,7 @@ elf_symfile_read (struct objfile *objfil
--- gdb-6.7.50.20080227.orig/gdb/elfread.c 2008-01-01 23:53:09.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/elfread.c 2008-02-27 08:57:31.000000000 +0100
@@ -644,7 +644,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
functions do not all also re-initialize the psymbol table. */
@ -1284,11 +1209,11 @@ Index: gdb-6.7.1/gdb/elfread.c
{
init_psymbol_list (objfile, 0);
mainline = 0;
Index: gdb-6.7.1/gdb/Makefile.in
Index: gdb-6.7.50.20080227/gdb/Makefile.in
===================================================================
--- gdb-6.7.1.orig/gdb/Makefile.in 2007-11-02 15:24:10.000000000 +0100
+++ gdb-6.7.1/gdb/Makefile.in 2007-11-02 15:24:19.000000000 +0100
@@ -1819,7 +1819,7 @@ amd64-tdep.o: amd64-tdep.c $(defs_h) $(a
--- gdb-6.7.50.20080227.orig/gdb/Makefile.in 2008-02-27 08:57:20.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/Makefile.in 2008-02-27 08:57:31.000000000 +0100
@@ -1914,7 +1914,7 @@ amd64-tdep.o: amd64-tdep.c $(defs_h) $(a
$(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
$(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \
$(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \
@ -1297,10 +1222,10 @@ Index: gdb-6.7.1/gdb/Makefile.in
annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
$(gdbtypes_h) $(breakpoint_h)
arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \
Index: gdb-6.7.1/gdb/amd64-tdep.c
Index: gdb-6.7.50.20080227/gdb/amd64-tdep.c
===================================================================
--- gdb-6.7.1.orig/gdb/amd64-tdep.c 2007-11-02 15:21:46.000000000 +0100
+++ gdb-6.7.1/gdb/amd64-tdep.c 2007-11-02 15:24:19.000000000 +0100
--- gdb-6.7.50.20080227.orig/gdb/amd64-tdep.c 2008-02-27 08:57:19.000000000 +0100
+++ gdb-6.7.50.20080227/gdb/amd64-tdep.c 2008-02-27 08:57:31.000000000 +0100
@@ -36,6 +36,7 @@
#include "symfile.h"
#include "dwarf2-frame.h"
@ -1309,7 +1234,7 @@ Index: gdb-6.7.1/gdb/amd64-tdep.c
#include "amd64-tdep.h"
#include "i387-tdep.h"
@@ -734,16 +735,28 @@ amd64_alloc_frame_cache (void)
@@ -731,16 +732,28 @@ amd64_alloc_frame_cache (void)
Any function that doesn't start with this sequence will be assumed
to have no prologue and thus no valid frame pointer in %rbp. */
@ -1342,7 +1267,7 @@ Index: gdb-6.7.1/gdb/amd64-tdep.c
op = read_memory_unsigned_integer (pc, 1);
@@ -756,18 +769,57 @@ amd64_analyze_prologue (CORE_ADDR pc, CO
@@ -753,18 +766,57 @@ amd64_analyze_prologue (CORE_ADDR pc, CO
/* If that's all, return now. */
if (current_pc <= pc + 1)