- Remove the kernel VDSO workaround (`no loadable ...') (kernel BZ 312011).
Wed Apr 23 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-4 - Backport fix on various forms of threads tracking across exec() (BZ 442765). - Testsuite: Include more biarch libraries on %%{multilib_64_archs}. - Disable the build-id warnings for the testsuite run as they cause some FAILs. - Fix PIE support for 32bit inferiors on 64bit debugger. - Fix trashing memory on one ada/gnat testcase. - Make the testsuite results on ada more stable.
This commit is contained in:
parent
36df512154
commit
193a9401d2
@ -1,38 +0,0 @@
|
||||
2004-12-16 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* linux-thread-db.c (clear_lwpip_callback): Removed.
|
||||
(thread_db_resume): Do not iterate and call
|
||||
clear_lwp_callback.
|
||||
|
||||
--- gdb-6.3/gdb/linux-thread-db.c.fix Thu Dec 16 16:32:13 2004
|
||||
+++ gdb-6.3/gdb/linux-thread-db.c Thu Dec 16 16:32:30 2004
|
||||
@@ -822,19 +822,6 @@ thread_db_detach (char *args, int from_t
|
||||
target_beneath->to_detach (args, from_tty);
|
||||
}
|
||||
|
||||
-static int
|
||||
-clear_lwpid_callback (struct thread_info *thread, void *dummy)
|
||||
-{
|
||||
- /* If we know that our thread implementation is 1-to-1, we could save
|
||||
- a certain amount of information; it's not clear how much, so we
|
||||
- are always conservative. */
|
||||
-
|
||||
- thread->private->th_valid = 0;
|
||||
- thread->private->ti_valid = 0;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static void
|
||||
thread_db_resume (ptid_t ptid, int step, enum target_signal signo)
|
||||
{
|
||||
@@ -845,9 +832,6 @@ thread_db_resume (ptid_t ptid, int step,
|
||||
else if (is_thread (ptid))
|
||||
ptid = lwp_from_thread (ptid);
|
||||
|
||||
- /* Clear cached data which may not be valid after the resume. */
|
||||
- iterate_over_threads (clear_lwpid_callback, NULL);
|
||||
-
|
||||
target_beneath->to_resume (ptid, step, signo);
|
||||
|
||||
do_cleanups (old_chain);
|
@ -18,11 +18,11 @@
|
||||
|
||||
Port to gdb-6.7.50.20080227.
|
||||
|
||||
Index: gdb-6.7.50.20080227/gdb/dwarf2read.c
|
||||
Index: gdb-6.8/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/dwarf2read.c 2008-04-19 21:38:32.000000000 +0200
|
||||
+++ gdb-6.8/gdb/dwarf2read.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -1221,7 +1221,7 @@ dwarf2_build_psymtabs (struct objfile *o
|
||||
else
|
||||
dwarf2_per_objfile->loc_buffer = NULL;
|
||||
|
||||
@ -31,10 +31,10 @@ Index: gdb-6.7.50.20080227/gdb/dwarf2read.c
|
||||
|| (objfile->global_psymbols.size == 0
|
||||
&& objfile->static_psymbols.size == 0))
|
||||
{
|
||||
Index: gdb-6.7.50.20080227/gdb/auxv.c
|
||||
Index: gdb-6.8/gdb/auxv.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/auxv.c 2008-01-16 17:27:37.000000000 +0100
|
||||
+++ gdb-6.8/gdb/auxv.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -80,7 +80,7 @@ procfs_xfer_auxv (struct target_ops *ops
|
||||
Return 1 if an entry was read into *TYPEP and *VALP. */
|
||||
int
|
||||
@ -106,10 +106,10 @@ Index: gdb-6.7.50.20080227/gdb/auxv.c
|
||||
switch (flavor)
|
||||
{
|
||||
case dec:
|
||||
Index: gdb-6.7.50.20080227/gdb/auxv.h
|
||||
Index: gdb-6.8/gdb/auxv.h
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/auxv.h 2008-01-01 23:53:09.000000000 +0100
|
||||
+++ gdb-6.8/gdb/auxv.h 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -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,
|
||||
@ -127,10 +127,10 @@ Index: gdb-6.7.50.20080227/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.50.20080227/gdb/breakpoint.h
|
||||
Index: gdb-6.8/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/breakpoint.h 2008-04-19 21:38:33.000000000 +0200
|
||||
+++ gdb-6.8/gdb/breakpoint.h 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -144,6 +144,7 @@ enum enable_state
|
||||
automatically enabled and reset when the call
|
||||
"lands" (either completes, or stops at another
|
||||
@ -139,7 +139,7 @@ Index: gdb-6.7.50.20080227/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
|
||||
@@ -823,6 +824,10 @@ extern void remove_thread_event_breakpoi
|
||||
@@ -828,6 +829,10 @@ extern void remove_thread_event_breakpoi
|
||||
|
||||
extern void disable_breakpoints_in_shlibs (void);
|
||||
|
||||
@ -150,11 +150,11 @@ Index: gdb-6.7.50.20080227/gdb/breakpoint.h
|
||||
/* This function returns TRUE if ep is a catchpoint. */
|
||||
extern int ep_is_catchpoint (struct breakpoint *);
|
||||
|
||||
Index: gdb-6.7.50.20080227/gdb/symfile-mem.c
|
||||
Index: gdb-6.8/gdb/symfile-mem.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/symfile-mem.c 2008-04-19 21:38:27.000000000 +0200
|
||||
+++ gdb-6.8/gdb/symfile-mem.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -116,7 +116,7 @@ symbol_file_add_from_memory (struct bfd
|
||||
}
|
||||
|
||||
objf = symbol_file_add_from_bfd (nbfd, from_tty,
|
||||
@ -163,10 +163,10 @@ Index: gdb-6.7.50.20080227/gdb/symfile-mem.c
|
||||
|
||||
/* This might change our ideas about frames already looked at. */
|
||||
reinit_frame_cache ();
|
||||
Index: gdb-6.7.50.20080227/gdb/infrun.c
|
||||
Index: gdb-6.8/gdb/infrun.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/infrun.c 2008-04-19 21:38:29.000000000 +0200
|
||||
+++ gdb-6.8/gdb/infrun.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -2277,6 +2277,11 @@ process_event_stop_test:
|
||||
#endif
|
||||
target_terminal_inferior ();
|
||||
@ -179,10 +179,10 @@ Index: gdb-6.7.50.20080227/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.50.20080227/gdb/objfiles.c
|
||||
Index: gdb-6.8/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/objfiles.c 2008-01-01 23:53:12.000000000 +0100
|
||||
+++ gdb-6.8/gdb/objfiles.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -49,6 +49,9 @@
|
||||
#include "source.h"
|
||||
#include "addrmap.h"
|
||||
@ -214,10 +214,10 @@ Index: gdb-6.7.50.20080227/gdb/objfiles.c
|
||||
}
|
||||
|
||||
/* Create the terminating entry of OBJFILE's minimal symbol table.
|
||||
Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
Index: gdb-6.8/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/solib-svr4.c 2008-04-19 21:38:30.000000000 +0200
|
||||
+++ gdb-6.8/gdb/solib-svr4.c 2008-04-19 21:34:42.000000000 +0200
|
||||
@@ -31,6 +31,8 @@
|
||||
#include "gdbcore.h"
|
||||
#include "target.h"
|
||||
@ -523,14 +523,83 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
target_read_string (LM_NAME (new), &buffer,
|
||||
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
|
||||
if (errcode != 0)
|
||||
@@ -764,23 +957,35 @@ svr4_current_sos (void)
|
||||
@@ -764,47 +957,60 @@ svr4_current_sos (void)
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
{
|
||||
- strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
- strcpy (new->so_original_name, new->so_name);
|
||||
- }
|
||||
- struct build_id *build_id;
|
||||
+ if (debug_solib)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "svr4_current_sos: LM_NAME is <%s>\n",
|
||||
+ buffer);
|
||||
+ /* The name could be empty, in which case it is the
|
||||
+ system supplied DSO. */
|
||||
+ if (strcmp (buffer, "") == 0)
|
||||
+ free_so (new);
|
||||
+ else
|
||||
+ {
|
||||
+ struct build_id *build_id;
|
||||
|
||||
- strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
- new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
- /* May get overwritten below. */
|
||||
- strcpy (new->so_name, new->so_original_name);
|
||||
+ strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ /* May get overwritten below. */
|
||||
+ strcpy (new->so_name, new->so_original_name);
|
||||
|
||||
- build_id = build_id_addr_get (LM_DYNAMIC_FROM_LINK_MAP (new));
|
||||
- if (build_id != NULL)
|
||||
- {
|
||||
- char *name, *build_id_filename;
|
||||
+ build_id = build_id_addr_get (LM_DYNAMIC_FROM_LINK_MAP (new));
|
||||
+ if (build_id != NULL)
|
||||
+ {
|
||||
+ char *name, *build_id_filename;
|
||||
+
|
||||
+ /* Missing the build-id matching separate debug info file
|
||||
+ would be handled while SO_NAME gets loaded. */
|
||||
+ name = build_id_to_filename (build_id, &build_id_filename, 0);
|
||||
+ if (name != NULL)
|
||||
+ {
|
||||
+ strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ xfree (name);
|
||||
+ }
|
||||
+ else
|
||||
+ debug_print_missing (new->so_name, build_id_filename);
|
||||
+
|
||||
+ xfree (build_id_filename);
|
||||
+ xfree (build_id);
|
||||
+ }
|
||||
|
||||
- /* Missing the build-id matching separate debug info file
|
||||
- would be handled while SO_NAME gets loaded. */
|
||||
- name = build_id_to_filename (build_id, &build_id_filename, 0);
|
||||
- if (name != NULL)
|
||||
+ if (debug_solib)
|
||||
{
|
||||
- strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
- xfree (name);
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "svr4_current_sos: Processing DSO: %s\n",
|
||||
+ new->so_name);
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "svr4_current_sos: first link entry %d\n",
|
||||
+ IGNORE_FIRST_LINK_MAP_ENTRY (new));
|
||||
}
|
||||
- else
|
||||
- debug_print_missing (new->so_name, build_id_filename);
|
||||
|
||||
- xfree (build_id_filename);
|
||||
- xfree (build_id);
|
||||
+ new->next = 0;
|
||||
+ *link_ptr = new;
|
||||
+ link_ptr = &new->next;
|
||||
}
|
||||
}
|
||||
- xfree (buffer);
|
||||
-
|
||||
- /* If this entry has no name, or its name matches the name
|
||||
@ -543,39 +612,12 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
- new->next = 0;
|
||||
- *link_ptr = new;
|
||||
- link_ptr = &new->next;
|
||||
+ if (debug_solib)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "svr4_current_sos: LM_NAME is <%s>\n",
|
||||
+ buffer);
|
||||
+ /* The name could be empty, in which case it is the
|
||||
+ system supplied DSO. */
|
||||
+ if (strcmp (buffer, "") == 0)
|
||||
+ free_so (new);
|
||||
+ else
|
||||
+ {
|
||||
+ strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ strcpy (new->so_original_name, new->so_name);
|
||||
+ if (debug_solib)
|
||||
+ {
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "svr4_current_sos: Processing DSO: %s\n",
|
||||
+ new->so_name);
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "svr4_current_sos: first link entry %d\n",
|
||||
+ IGNORE_FIRST_LINK_MAP_ENTRY (new));
|
||||
+ }
|
||||
+
|
||||
+ new->next = 0;
|
||||
+ *link_ptr = new;
|
||||
+ link_ptr = &new->next;
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
+ xfree (buffer);
|
||||
}
|
||||
|
||||
/* On Solaris, the dynamic linker is not in the normal list of
|
||||
@@ -796,6 +1001,9 @@ svr4_current_sos (void)
|
||||
@@ -820,6 +1026,9 @@ svr4_current_sos (void)
|
||||
if (head == NULL)
|
||||
return svr4_default_sos ();
|
||||
|
||||
@ -585,7 +627,7 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
return head;
|
||||
}
|
||||
|
||||
@@ -875,7 +1083,7 @@ svr4_fetch_objfile_link_map (struct objf
|
||||
@@ -921,7 +1130,7 @@ for (resolve = 0; resolve <= 1; resolve+
|
||||
/* 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. */
|
||||
@ -594,7 +636,7 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
static int
|
||||
match_main (char *soname)
|
||||
{
|
||||
@@ -889,6 +1097,7 @@ match_main (char *soname)
|
||||
@@ -935,6 +1144,7 @@ match_main (char *soname)
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -602,7 +644,7 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
|
||||
/* Return 1 if PC lies in the dynamic symbol resolution code of the
|
||||
SVR4 run time loader. */
|
||||
@@ -1040,6 +1249,11 @@ enable_break (void)
|
||||
@@ -1086,11 +1296,17 @@ 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");
|
||||
@ -614,7 +656,28 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
if (interp_sect)
|
||||
{
|
||||
unsigned int interp_sect_size;
|
||||
@@ -1074,6 +1288,9 @@ enable_break (void)
|
||||
char *buf;
|
||||
CORE_ADDR load_addr = 0;
|
||||
+ CORE_ADDR load_addr_mask = -1L;
|
||||
int load_addr_found = 0;
|
||||
int loader_found_in_list = 0;
|
||||
struct so_list *so;
|
||||
@@ -1098,6 +1314,14 @@ enable_break (void)
|
||||
struct target_ops *tmp_bfd_target;
|
||||
int tmp_fd = -1;
|
||||
char *tmp_pathname = NULL;
|
||||
+ int arch_size;
|
||||
+
|
||||
+ /* For 32bit inferiors with 64bit GDB we may get LOAD_ADDR at 0xff......
|
||||
+ and thus overflowing its addition to the address while CORE_ADDR is
|
||||
+ 64bit producing 0x1........ address invalid across GDB. */
|
||||
+ arch_size = bfd_get_arch_size (exec_bfd);
|
||||
+ if (arch_size > 0 && arch_size < sizeof (1UL) * 8)
|
||||
+ load_addr_mask = (1UL << arch_size) - 1;
|
||||
|
||||
/* Read the contents of the .interp section into a local buffer;
|
||||
the contents specify the dynamic linker this program uses. */
|
||||
@@ -1120,6 +1344,9 @@ enable_break (void)
|
||||
if (tmp_fd >= 0)
|
||||
tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
|
||||
|
||||
@ -624,17 +687,41 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
if (tmp_bfd == NULL)
|
||||
goto bkpt_at_symbol;
|
||||
|
||||
@@ -1180,6 +1397,9 @@ enable_break (void)
|
||||
@@ -1181,16 +1408,16 @@ enable_break (void)
|
||||
interp_sect = bfd_get_section_by_name (tmp_bfd, ".text");
|
||||
if (interp_sect)
|
||||
{
|
||||
- interp_text_sect_low =
|
||||
- bfd_section_vma (tmp_bfd, interp_sect) + load_addr;
|
||||
+ interp_text_sect_low = (bfd_section_vma (tmp_bfd, interp_sect)
|
||||
+ + load_addr) & load_addr_mask;
|
||||
interp_text_sect_high =
|
||||
interp_text_sect_low + bfd_section_size (tmp_bfd, interp_sect);
|
||||
}
|
||||
interp_sect = bfd_get_section_by_name (tmp_bfd, ".plt");
|
||||
if (interp_sect)
|
||||
{
|
||||
- interp_plt_sect_low =
|
||||
- bfd_section_vma (tmp_bfd, interp_sect) + load_addr;
|
||||
+ interp_plt_sect_low = (bfd_section_vma (tmp_bfd, interp_sect)
|
||||
+ + load_addr) & load_addr_mask;
|
||||
interp_plt_sect_high =
|
||||
interp_plt_sect_low + bfd_section_size (tmp_bfd, interp_sect);
|
||||
}
|
||||
@@ -1225,7 +1452,11 @@ enable_break (void)
|
||||
|
||||
if (sym_addr != 0)
|
||||
{
|
||||
create_solib_event_breakpoint (load_addr + sym_addr);
|
||||
- create_solib_event_breakpoint (load_addr + sym_addr);
|
||||
+ create_solib_event_breakpoint ((load_addr + sym_addr)
|
||||
+ & load_addr_mask);
|
||||
+ if (debug_solib)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "enable_break: solib bp set\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1440,6 +1660,8 @@ svr4_solib_create_inferior_hook (void)
|
||||
@@ -1486,6 +1717,8 @@ svr4_solib_create_inferior_hook (void)
|
||||
while (stop_signal != TARGET_SIGNAL_TRAP);
|
||||
stop_soon = NO_STOP_QUIETLY;
|
||||
#endif /* defined(_SCO_DS) */
|
||||
@ -643,7 +730,7 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1620,6 +1842,75 @@ svr4_lp64_fetch_link_map_offsets (void)
|
||||
@@ -1666,6 +1899,75 @@ svr4_lp64_fetch_link_map_offsets (void)
|
||||
|
||||
return lmp;
|
||||
}
|
||||
@ -719,7 +806,7 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
|
||||
|
||||
struct target_so_ops svr4_so_ops;
|
||||
@@ -1678,4 +1969,7 @@ _initialize_svr4_solib (void)
|
||||
@@ -1724,4 +2026,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;
|
||||
@ -727,11 +814,11 @@ Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
+ add_info ("linkmap", info_linkmap_command,
|
||||
+ "Display the inferior's linkmap.");
|
||||
}
|
||||
Index: gdb-6.7.50.20080227/gdb/varobj.c
|
||||
Index: gdb-6.8/gdb/varobj.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/varobj.c 2008-04-19 21:38:27.000000000 +0200
|
||||
+++ gdb-6.8/gdb/varobj.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -1075,6 +1075,62 @@ install_new_value (struct varobj *var, s
|
||||
return changed;
|
||||
}
|
||||
|
||||
@ -794,10 +881,10 @@ Index: gdb-6.7.50.20080227/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.50.20080227/gdb/solist.h
|
||||
Index: gdb-6.8/gdb/solist.h
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/solist.h 2008-01-07 16:19:58.000000000 +0100
|
||||
+++ gdb-6.8/gdb/solist.h 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -61,6 +61,8 @@ struct so_list
|
||||
bfd *abfd;
|
||||
char symbols_loaded; /* flag: symbols read in yet? */
|
||||
@ -830,10 +917,10 @@ Index: gdb-6.7.50.20080227/gdb/solist.h
|
||||
+/* Controls the printing of debugging output. */
|
||||
+extern int debug_solib;
|
||||
#endif
|
||||
Index: gdb-6.7.50.20080227/gdb/varobj.h
|
||||
Index: gdb-6.8/gdb/varobj.h
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/varobj.h 2008-01-30 08:17:31.000000000 +0100
|
||||
+++ gdb-6.8/gdb/varobj.h 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -122,4 +122,6 @@ extern void varobj_invalidate (void);
|
||||
|
||||
extern int varobj_editable_p (struct varobj *var);
|
||||
@ -841,10 +928,10 @@ Index: gdb-6.7.50.20080227/gdb/varobj.h
|
||||
+extern void varobj_refresh(void);
|
||||
+
|
||||
#endif /* VAROBJ_H */
|
||||
Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
Index: gdb-6.8/gdb/symfile.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/symfile.c 2008-04-19 21:38:32.000000000 +0200
|
||||
+++ gdb-6.8/gdb/symfile.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "readline/readline.h"
|
||||
#include "gdb_assert.h"
|
||||
@ -853,7 +940,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
#include "observer.h"
|
||||
#include "exec.h"
|
||||
#include "parser-defs.h"
|
||||
@@ -778,7 +779,7 @@ syms_from_objfile (struct objfile *objfi
|
||||
@@ -815,7 +816,7 @@ syms_from_objfile (struct objfile *objfi
|
||||
|
||||
/* Now either addrs or offsets is non-zero. */
|
||||
|
||||
@ -862,16 +949,16 @@ Index: gdb-6.7.50.20080227/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. */
|
||||
@@ -806,7 +807,7 @@ syms_from_objfile (struct objfile *objfi
|
||||
@@ -843,7 +844,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. */
|
||||
- if (!mainline && addrs && addrs->other[0].name)
|
||||
+ if (/*!mainline &&*/ addrs && addrs->other[0].name)
|
||||
{
|
||||
asection *lower_sect;
|
||||
asection *sect;
|
||||
@@ -975,17 +976,21 @@ new_symfile_objfile (struct objfile *obj
|
||||
CORE_ADDR lower_offset = 0; /* Shut up the GCC warning. */
|
||||
@@ -1002,17 +1003,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. */
|
||||
@ -895,7 +982,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
|
||||
/* We're done reading the symbol file; finish off complaints. */
|
||||
clear_complaints (&symfile_complaints, 0, verbo);
|
||||
@@ -1028,7 +1033,7 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
@@ -1055,7 +1060,7 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||
interactively wiping out any existing symbols. */
|
||||
|
||||
if ((have_full_symbols () || have_partial_symbols ())
|
||||
@ -904,7 +991,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
&& from_tty
|
||||
&& !query ("Load new symbol table from \"%s\"? ", name))
|
||||
error (_("Not confirmed."));
|
||||
@@ -1212,6 +1217,10 @@ symbol_file_clear (int from_tty)
|
||||
@@ -1241,6 +1246,10 @@ symbol_file_clear (int from_tty)
|
||||
symfile_objfile->name)
|
||||
: !query (_("Discard symbol table? "))))
|
||||
error (_("Not confirmed."));
|
||||
@ -915,7 +1002,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
free_all_objfiles ();
|
||||
|
||||
/* solib descriptors may have handles to objfiles. Since their
|
||||
@@ -2466,6 +2475,8 @@ reread_symbols (void)
|
||||
@@ -3330,6 +3339,8 @@ reread_symbols (void)
|
||||
/* Discard cleanups as symbol reading was successful. */
|
||||
discard_cleanups (old_cleanups);
|
||||
|
||||
@ -924,7 +1011,7 @@ Index: gdb-6.7.50.20080227/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. */
|
||||
@@ -2834,6 +2845,7 @@ clear_symtab_users (void)
|
||||
@@ -3698,6 +3709,7 @@ clear_symtab_users (void)
|
||||
breakpoint_re_set ();
|
||||
set_default_breakpoint (0, 0, 0, 0);
|
||||
clear_pc_function_cache ();
|
||||
@ -932,20 +1019,20 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
observer_notify_new_objfile (NULL);
|
||||
|
||||
/* Clear globals which might have pointed into a removed objfile.
|
||||
Index: gdb-6.7.50.20080227/gdb/breakpoint.c
|
||||
Index: gdb-6.8/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- 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);
|
||||
--- gdb-6.8.orig/gdb/breakpoint.c 2008-04-19 21:38:33.000000000 +0200
|
||||
+++ gdb-6.8/gdb/breakpoint.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -973,7 +973,7 @@ update_watchpoint (struct breakpoint *b,
|
||||
}
|
||||
|
||||
/* Look at each value on the value chain. */
|
||||
- for (; v; v = next)
|
||||
+ for (; v; v = value_next (v))
|
||||
- for (v = val_chain; v; v = next)
|
||||
+ for (v = val_chain; 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
|
||||
@@ -3946,7 +3946,8 @@ describe_other_breakpoints (CORE_ADDR pc
|
||||
printf_filtered (" (thread %d)", b->thread);
|
||||
printf_filtered ("%s%s ",
|
||||
((b->enable_state == bp_disabled ||
|
||||
@ -955,7 +1042,7 @@ Index: gdb-6.7.50.20080227/gdb/breakpoint.c
|
||||
? " (disabled)"
|
||||
: b->enable_state == bp_permanent
|
||||
? " (permanent)"
|
||||
@@ -4534,6 +4535,62 @@ disable_breakpoints_in_unloaded_shlib (s
|
||||
@@ -4598,6 +4599,62 @@ disable_breakpoints_in_unloaded_shlib (s
|
||||
}
|
||||
}
|
||||
|
||||
@ -1018,10 +1105,10 @@ Index: gdb-6.7.50.20080227/gdb/breakpoint.c
|
||||
static void
|
||||
create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
|
||||
enum bptype bp_kind)
|
||||
Index: gdb-6.7.50.20080227/gdb/solib.c
|
||||
Index: gdb-6.8/gdb/solib.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/solib.c 2008-01-07 16:19:58.000000000 +0100
|
||||
+++ gdb-6.8/gdb/solib.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -79,6 +79,8 @@ set_solib_ops (struct gdbarch *gdbarch,
|
||||
|
||||
/* external data declarations */
|
||||
@ -1066,14 +1153,14 @@ Index: gdb-6.7.50.20080227/gdb/solib.c
|
||||
+ && !so->main)
|
||||
return 1;
|
||||
+ /* Found an already loaded main executable. This could happen in
|
||||
+ two circumstances.
|
||||
+ two circumstances.
|
||||
+ First case: the main file has already been read in
|
||||
+ as the first thing that gdb does at startup, and the file
|
||||
+ hasn't been relocated properly yet. Therefor we need to read
|
||||
+ it in with the proper section info.
|
||||
+ Second case: it has been read in with the correct relocation,
|
||||
+ and therefore we need to skip it. */
|
||||
+ if (strcmp (so->objfile->name, so->so_name) == 0
|
||||
+ if (strcmp (so->objfile->name, so->so_name) == 0
|
||||
+ && so->main
|
||||
+ && so->main_relocated)
|
||||
+ return 1;
|
||||
@ -1196,10 +1283,10 @@ Index: gdb-6.7.50.20080227/gdb/solib.c
|
||||
+ NULL, NULL,
|
||||
+ &setdebuglist, &showdebuglist);
|
||||
}
|
||||
Index: gdb-6.7.50.20080227/gdb/elfread.c
|
||||
Index: gdb-6.8/gdb/elfread.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/elfread.c 2008-01-01 23:53:09.000000000 +0100
|
||||
+++ gdb-6.8/gdb/elfread.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -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
|
||||
@ -1209,11 +1296,11 @@ Index: gdb-6.7.50.20080227/gdb/elfread.c
|
||||
{
|
||||
init_psymbol_list (objfile, 0);
|
||||
mainline = 0;
|
||||
Index: gdb-6.7.50.20080227/gdb/Makefile.in
|
||||
Index: gdb-6.8/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/Makefile.in 2008-04-19 21:38:32.000000000 +0200
|
||||
+++ gdb-6.8/gdb/Makefile.in 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -1920,7 +1920,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) \
|
||||
@ -1222,10 +1309,10 @@ Index: gdb-6.7.50.20080227/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.50.20080227/gdb/amd64-tdep.c
|
||||
Index: gdb-6.8/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- gdb-6.8.orig/gdb/amd64-tdep.c 2008-04-19 21:38:28.000000000 +0200
|
||||
+++ gdb-6.8/gdb/amd64-tdep.c 2008-04-19 21:38:33.000000000 +0200
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "symfile.h"
|
||||
#include "dwarf2-frame.h"
|
||||
|
@ -1,80 +0,0 @@
|
||||
2007-09-23 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New variables
|
||||
X_SHDR_SHSTRTAB and I_SHDR_SHSTRTAB. Fixed the CONTENTS_SIZE trimming
|
||||
check for its aligned size between the last segment and still before
|
||||
the section header end. Added variables check to cover also the
|
||||
section header string table.
|
||||
|
||||
--- ./bfd/elfcode.h 14 Aug 2007 08:04:47 -0000 1.86
|
||||
+++ ./bfd/elfcode.h 23 Sep 2007 14:24:39 -0000
|
||||
@@ -1628,6 +1628,8 @@ NAME(_bfd_elf,bfd_from_remote_memory)
|
||||
Elf_Internal_Ehdr i_ehdr; /* Elf file header, internal form */
|
||||
Elf_External_Phdr *x_phdrs;
|
||||
Elf_Internal_Phdr *i_phdrs, *last_phdr;
|
||||
+ Elf_External_Shdr *x_shdr_shstrtab;
|
||||
+ Elf_Internal_Shdr *i_shdr_shstrtab;
|
||||
bfd *nbfd;
|
||||
struct bfd_in_memory *bim;
|
||||
int contents_size;
|
||||
@@ -1746,19 +1748,49 @@ NAME(_bfd_elf,bfd_from_remote_memory)
|
||||
|
||||
/* Trim the last segment so we don't bother with zeros in the last page
|
||||
that are off the end of the file. However, if the extra bit in that
|
||||
- page includes the section headers, keep them. */
|
||||
- if ((bfd_vma) contents_size > last_phdr->p_offset + last_phdr->p_filesz
|
||||
- && (bfd_vma) contents_size >= (i_ehdr.e_shoff
|
||||
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
|
||||
- {
|
||||
- contents_size = last_phdr->p_offset + last_phdr->p_filesz;
|
||||
- if ((bfd_vma) contents_size < (i_ehdr.e_shoff
|
||||
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
|
||||
- contents_size = i_ehdr.e_shoff + i_ehdr.e_shnum * i_ehdr.e_shentsize;
|
||||
- }
|
||||
- else
|
||||
+ page includes the section headers os the section header string table,
|
||||
+ keep them. */
|
||||
+ if ((bfd_vma) contents_size > last_phdr->p_offset + last_phdr->p_filesz)
|
||||
contents_size = last_phdr->p_offset + last_phdr->p_filesz;
|
||||
|
||||
+ if ((bfd_vma) contents_size < i_ehdr.e_shoff
|
||||
+ + i_ehdr.e_shnum * i_ehdr.e_shentsize)
|
||||
+ contents_size = i_ehdr.e_shoff + i_ehdr.e_shnum * i_ehdr.e_shentsize;
|
||||
+
|
||||
+ /* Section header string table is usually before the section headers
|
||||
+ so this check is here has usually no effect. */
|
||||
+ if (i_ehdr.e_shstrndx < i_ehdr.e_shnum)
|
||||
+ {
|
||||
+ x_shdr_shstrtab = bfd_malloc (sizeof *x_shdr_shstrtab
|
||||
+ + sizeof *i_shdr_shstrtab);
|
||||
+ if (x_shdr_shstrtab == NULL)
|
||||
+ {
|
||||
+ free (x_phdrs);
|
||||
+ bfd_set_error (bfd_error_no_memory);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ err = target_read_memory (ehdr_vma + i_ehdr.e_shoff
|
||||
+ + i_ehdr.e_shstrndx * sizeof *x_shdr_shstrtab,
|
||||
+ (bfd_byte *) x_shdr_shstrtab,
|
||||
+ sizeof *x_shdr_shstrtab);
|
||||
+ if (err)
|
||||
+ {
|
||||
+ free (x_shdr_shstrtab);
|
||||
+ free (x_phdrs);
|
||||
+ bfd_set_error (bfd_error_system_call);
|
||||
+ errno = err;
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ i_shdr_shstrtab = (Elf_Internal_Shdr *) &x_shdr_shstrtab[1];
|
||||
+ elf_swap_shdr_in (templ, x_shdr_shstrtab, i_shdr_shstrtab);
|
||||
+
|
||||
+ if ((bfd_vma) contents_size < i_shdr_shstrtab->sh_offset
|
||||
+ + i_shdr_shstrtab->sh_size)
|
||||
+ contents_size = i_shdr_shstrtab->sh_offset + i_shdr_shstrtab->sh_size;
|
||||
+
|
||||
+ free (x_shdr_shstrtab);
|
||||
+ }
|
||||
+
|
||||
/* Now we know the size of the whole image we want read in. */
|
||||
contents = bfd_zmalloc (contents_size);
|
||||
if (contents == NULL)
|
@ -32,11 +32,15 @@
|
||||
|
||||
Fix -I for non-standard rpm includes in `$(includedir)/rpm'.
|
||||
|
||||
Index: gdb-6.7.50.20080227/gdb/Makefile.in
|
||||
2008-04-19 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Disable the warnings for the testsuite not expecting them.
|
||||
|
||||
Index: gdb-6.8/gdb/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/Makefile.in 2008-03-10 00:48:52.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/Makefile.in 2008-03-10 00:48:53.000000000 +0100
|
||||
@@ -340,7 +340,7 @@
|
||||
--- gdb-6.8.orig/gdb/Makefile.in 2008-04-19 20:48:13.000000000 +0200
|
||||
+++ gdb-6.8/gdb/Makefile.in 2008-04-19 20:48:21.000000000 +0200
|
||||
@@ -340,7 +340,7 @@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
|
||||
# your system doesn't have fcntl.h in /usr/include (which is where it
|
||||
# should be according to Posix).
|
||||
DEFS = @DEFS@
|
||||
@ -92,10 +96,10 @@ Index: gdb-6.7.50.20080227/gdb/Makefile.in
|
||||
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c
|
||||
tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(target_h) \
|
||||
$(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(tui_h) \
|
||||
Index: gdb-6.7.50.20080227/gdb/corelow.c
|
||||
Index: gdb-6.8/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/corelow.c 2008-02-09 14:45:33.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/corelow.c 2008-03-10 00:49:19.000000000 +0100
|
||||
--- gdb-6.8.orig/gdb/corelow.c 2008-04-19 20:47:17.000000000 +0200
|
||||
+++ gdb-6.8/gdb/corelow.c 2008-04-19 20:48:21.000000000 +0200
|
||||
@@ -45,6 +45,10 @@
|
||||
#include "exceptions.h"
|
||||
#include "solib.h"
|
||||
@ -192,10 +196,10 @@ Index: gdb-6.7.50.20080227/gdb/corelow.c
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
Index: gdb-6.7.50.20080227/gdb/doc/gdb.texinfo
|
||||
Index: gdb-6.8/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/doc/gdb.texinfo 2008-03-10 00:48:52.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/doc/gdb.texinfo 2008-03-10 00:49:42.000000000 +0100
|
||||
--- gdb-6.8.orig/gdb/doc/gdb.texinfo 2008-04-19 20:48:13.000000000 +0200
|
||||
+++ gdb-6.8/gdb/doc/gdb.texinfo 2008-04-19 20:48:21.000000000 +0200
|
||||
@@ -12208,6 +12208,27 @@ information files.
|
||||
|
||||
@end table
|
||||
@ -224,10 +228,10 @@ Index: gdb-6.7.50.20080227/gdb/doc/gdb.texinfo
|
||||
@cindex @code{.gnu_debuglink} sections
|
||||
@cindex debug link sections
|
||||
A debug link is a special section of the executable file named
|
||||
Index: gdb-6.7.50.20080227/gdb/event-top.c
|
||||
Index: gdb-6.8/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/event-top.c 2008-01-01 23:53:09.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/event-top.c 2008-03-10 00:48:53.000000000 +0100
|
||||
--- gdb-6.8.orig/gdb/event-top.c 2008-04-19 20:47:17.000000000 +0200
|
||||
+++ gdb-6.8/gdb/event-top.c 2008-04-19 20:48:21.000000000 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <signal.h>
|
||||
#include "exceptions.h"
|
||||
@ -254,53 +258,52 @@ Index: gdb-6.7.50.20080227/gdb/event-top.c
|
||||
/* Each interpreter has its own rules on displaying the command
|
||||
prompt. */
|
||||
if (!current_interp_display_prompt_p ())
|
||||
Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
||||
Index: gdb-6.8/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/solib-svr4.c 2008-03-10 00:48:51.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/solib-svr4.c 2008-03-10 00:48:53.000000000 +0100
|
||||
@@ -967,9 +967,34 @@ svr4_current_sos (void)
|
||||
free_so (new);
|
||||
else
|
||||
{
|
||||
- strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
- strcpy (new->so_original_name, new->so_name);
|
||||
+ struct build_id *build_id;
|
||||
--- gdb-6.8.orig/gdb/solib-svr4.c 2008-04-19 20:48:12.000000000 +0200
|
||||
+++ gdb-6.8/gdb/solib-svr4.c 2008-04-19 20:49:50.000000000 +0200
|
||||
@@ -764,9 +764,33 @@ svr4_current_sos (void)
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
{
|
||||
- strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
- strcpy (new->so_original_name, new->so_name);
|
||||
+ struct build_id *build_id;
|
||||
+
|
||||
+ strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ /* May get overwritten below. */
|
||||
+ strcpy (new->so_name, new->so_original_name);
|
||||
+ strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ /* May get overwritten below. */
|
||||
+ strcpy (new->so_name, new->so_original_name);
|
||||
+
|
||||
+ build_id = build_id_addr_get (LM_DYNAMIC_FROM_LINK_MAP (new));
|
||||
+ if (build_id != NULL)
|
||||
+ build_id = build_id_addr_get (LM_DYNAMIC_FROM_LINK_MAP (new));
|
||||
+ if (build_id != NULL)
|
||||
+ {
|
||||
+ char *name, *build_id_filename;
|
||||
+
|
||||
+ /* Missing the build-id matching separate debug info file
|
||||
+ would be handled while SO_NAME gets loaded. */
|
||||
+ name = build_id_to_filename (build_id, &build_id_filename, 0);
|
||||
+ if (name != NULL)
|
||||
+ {
|
||||
+ char *name, *build_id_filename;
|
||||
+
|
||||
+ /* Missing the build-id matching separate debug info file
|
||||
+ would be handled while SO_NAME gets loaded. */
|
||||
+ name = build_id_to_filename (build_id, &build_id_filename, 0);
|
||||
+ if (name != NULL)
|
||||
+ {
|
||||
+ strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ xfree (name);
|
||||
+ }
|
||||
+ else
|
||||
+ debug_print_missing (new->so_name, build_id_filename);
|
||||
+
|
||||
+ xfree (build_id_filename);
|
||||
+ xfree (build_id);
|
||||
+ strncpy (new->so_name, name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
+ new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
+ xfree (name);
|
||||
+ }
|
||||
+ else
|
||||
+ debug_print_missing (new->so_name, build_id_filename);
|
||||
+
|
||||
if (debug_solib)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
+ xfree (build_id_filename);
|
||||
+ xfree (build_id);
|
||||
+ }
|
||||
}
|
||||
xfree (buffer);
|
||||
|
||||
Index: gdb-6.8/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/symfile.c 2008-03-10 00:48:51.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/symfile.c 2008-03-10 00:49:33.000000000 +0100
|
||||
@@ -54,6 +54,9 @@
|
||||
--- gdb-6.8.orig/gdb/symfile.c 2008-04-19 20:48:12.000000000 +0200
|
||||
+++ gdb-6.8/gdb/symfile.c 2008-04-19 20:48:21.000000000 +0200
|
||||
@@ -53,6 +53,9 @@
|
||||
#include "varobj.h"
|
||||
#include "elf-bfd.h"
|
||||
#include "solib.h"
|
||||
@ -310,7 +313,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
@@ -62,6 +65,7 @@
|
||||
@@ -61,6 +64,7 @@
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
@ -318,7 +321,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
|
||||
|
||||
int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num);
|
||||
@@ -1235,16 +1239,65 @@ symbol_file_clear (int from_tty)
|
||||
@@ -1226,16 +1230,65 @@ symbol_file_clear (int from_tty)
|
||||
printf_unfiltered (_("No symbol file now.\n"));
|
||||
}
|
||||
|
||||
@ -386,7 +389,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
{
|
||||
struct build_id *retval;
|
||||
|
||||
@@ -1260,6 +1313,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
@@ -1251,6 +1304,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -735,7 +738,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
|
||||
|
||||
static int
|
||||
@@ -1274,7 +1669,7 @@ build_id_verify (const char *filename, s
|
||||
@@ -1265,7 +1660,7 @@ build_id_verify (const char *filename, s
|
||||
if (abfd == NULL)
|
||||
return 0;
|
||||
|
||||
@ -744,7 +747,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
|
||||
if (found == NULL)
|
||||
warning (_("File \"%s\" has no build-id, file skipped"), filename);
|
||||
@@ -1290,8 +1685,9 @@ build_id_verify (const char *filename, s
|
||||
@@ -1281,8 +1676,9 @@ build_id_verify (const char *filename, s
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -756,7 +759,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
{
|
||||
char *link, *s, *retval = NULL;
|
||||
gdb_byte *data = build_id->data;
|
||||
@@ -1299,7 +1695,9 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1290,7 +1686,9 @@ build_id_to_debug_filename (struct build
|
||||
|
||||
/* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
|
||||
link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
|
||||
@ -767,7 +770,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
s = link + sprintf (link, "%s/.build-id/", debug_file_directory);
|
||||
if (size > 0)
|
||||
{
|
||||
@@ -1310,12 +1708,14 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1301,12 +1699,14 @@ build_id_to_debug_filename (struct build
|
||||
*s++ = '/';
|
||||
while (size-- > 0)
|
||||
s += sprintf (s, "%02x", (unsigned) *data++);
|
||||
@ -784,7 +787,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
|
||||
if (retval != NULL && !build_id_verify (retval, build_id))
|
||||
{
|
||||
@@ -1323,9 +1723,433 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1314,9 +1714,433 @@ build_id_to_debug_filename (struct build
|
||||
retval = NULL;
|
||||
}
|
||||
|
||||
@ -1218,7 +1221,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
static char *
|
||||
get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
|
||||
{
|
||||
@@ -1411,32 +2235,36 @@ static char *
|
||||
@@ -1402,32 +2226,36 @@ static char *
|
||||
find_separate_debug_file (struct objfile *objfile)
|
||||
{
|
||||
asection *sect;
|
||||
@ -1264,7 +1267,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
}
|
||||
|
||||
basename = get_debug_link_info (objfile, &crc32);
|
||||
@@ -1444,7 +2272,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1435,7 +2263,7 @@ find_separate_debug_file (struct objfile
|
||||
if (basename == NULL)
|
||||
/* There's no separate debug info, hence there's no way we could
|
||||
load it => no warning. */
|
||||
@ -1273,7 +1276,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
|
||||
dir = xstrdup (objfile->name);
|
||||
|
||||
@@ -1460,23 +2288,19 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1451,23 +2279,19 @@ find_separate_debug_file (struct objfile
|
||||
gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
|
||||
dir[i+1] = '\0';
|
||||
|
||||
@ -1304,7 +1307,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
|
||||
/* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */
|
||||
strcpy (debugfile, dir);
|
||||
@@ -1485,11 +2309,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1476,11 +2300,7 @@ find_separate_debug_file (struct objfile
|
||||
strcat (debugfile, basename);
|
||||
|
||||
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
||||
@ -1317,7 +1320,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
|
||||
/* Then try in the global debugfile directory. */
|
||||
strcpy (debugfile, debug_file_directory);
|
||||
@@ -1498,11 +2318,7 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1489,11 +2309,7 @@ find_separate_debug_file (struct objfile
|
||||
strcat (debugfile, basename);
|
||||
|
||||
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
||||
@ -1330,7 +1333,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
|
||||
/* If the file is in the sysroot, try using its base path in the
|
||||
global debugfile directory. */
|
||||
@@ -1517,20 +2333,18 @@ find_separate_debug_file (struct objfile
|
||||
@@ -1508,20 +2324,18 @@ find_separate_debug_file (struct objfile
|
||||
strcat (debugfile, basename);
|
||||
|
||||
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
||||
@ -1359,7 +1362,7 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
}
|
||||
|
||||
|
||||
@@ -4220,4 +5034,16 @@ the global debug-file directory prepende
|
||||
@@ -4208,4 +5022,16 @@ the global debug-file directory prepende
|
||||
NULL,
|
||||
show_debug_file_directory,
|
||||
&setlist, &showlist);
|
||||
@ -1376,10 +1379,10 @@ Index: gdb-6.7.50.20080227/gdb/symfile.c
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
}
|
||||
Index: gdb-6.7.50.20080227/gdb/symfile.h
|
||||
Index: gdb-6.8/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/symfile.h 2008-02-03 23:13:29.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/symfile.h 2008-03-10 00:48:53.000000000 +0100
|
||||
--- gdb-6.8.orig/gdb/symfile.h 2008-04-19 20:47:17.000000000 +0200
|
||||
+++ gdb-6.8/gdb/symfile.h 2008-04-19 20:48:21.000000000 +0200
|
||||
@@ -358,6 +358,14 @@ extern int symfile_map_offsets_to_segmen
|
||||
struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
|
||||
void free_symfile_segment_data (struct symfile_segment_data *data);
|
||||
@ -1395,10 +1398,10 @@ Index: gdb-6.7.50.20080227/gdb/symfile.h
|
||||
/* From dwarf2read.c */
|
||||
|
||||
extern int dwarf2_has_info (struct objfile *);
|
||||
Index: gdb-6.7.50.20080227/gdb/tui/tui-interp.c
|
||||
Index: gdb-6.8/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-6.7.50.20080227.orig/gdb/tui/tui-interp.c 2008-01-01 23:53:22.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227/gdb/tui/tui-interp.c 2008-03-10 00:48:53.000000000 +0100
|
||||
--- gdb-6.8.orig/gdb/tui/tui-interp.c 2008-04-19 20:47:17.000000000 +0200
|
||||
+++ gdb-6.8/gdb/tui/tui-interp.c 2008-04-19 20:48:21.000000000 +0200
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-io.h"
|
||||
@ -1416,3 +1419,24 @@ Index: gdb-6.7.50.20080227/gdb/tui/tui-interp.c
|
||||
/* Tell readline what the prompt to display is and what function
|
||||
it will need to call after a whole line is read. This also
|
||||
displays the first prompt. */
|
||||
Index: gdb-6.8/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/testsuite/lib/gdb.exp 2008-04-19 20:48:11.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/lib/gdb.exp 2008-04-19 20:48:21.000000000 +0200
|
||||
@@ -1199,6 +1199,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
+ # Turn off the missing RPMs warnings as the testsuite does not expect it.
|
||||
+ send_gdb "set build-id-verbose 0\n"
|
||||
+ gdb_expect 10 {
|
||||
+ -re "$gdb_prompt $" {
|
||||
+ verbose "Disabled the missing debug infos warnings." 2
|
||||
+ }
|
||||
+ timeout {
|
||||
+ warning "Could not disable the missing debug infos warnings.."
|
||||
+ }
|
||||
+ }
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -112,11 +112,3 @@ Index: gdb-6.7/gdb/symfile.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1174,7 +1196,6 @@ symbol_file_add_from_bfd (bfd *abfd, int
|
||||
mainline, flags);
|
||||
}
|
||||
|
||||
-
|
||||
/* Process a symbol file, as either the main file or as a dynamically
|
||||
loaded file. See symbol_file_add_with_addrs_or_offsets's comments
|
||||
for details. */
|
||||
|
@ -88,3 +88,59 @@
|
||||
|
||||
set timeout $oldtimeout
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
2008-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* ada-lang.c (get_selections): Variable PROMPT made non-const and
|
||||
initialized with a trailing space now. Use PROMPT_ARG of
|
||||
COMMAND_LINE_INPUT instead of printing it ourselves.
|
||||
|
||||
--- ./gdb/ada-lang.c 6 Apr 2008 08:56:36 -0000 1.137
|
||||
+++ ./gdb/ada-lang.c 21 Apr 2008 13:33:42 -0000
|
||||
@@ -3424,18 +3424,15 @@ get_selections (int *choices, int n_choi
|
||||
int is_all_choice, char *annotation_suffix)
|
||||
{
|
||||
char *args;
|
||||
- const char *prompt;
|
||||
+ char *prompt;
|
||||
int n_chosen;
|
||||
int first_choice = is_all_choice ? 2 : 1;
|
||||
|
||||
prompt = getenv ("PS2");
|
||||
if (prompt == NULL)
|
||||
- prompt = ">";
|
||||
+ prompt = "> ";
|
||||
|
||||
- printf_unfiltered (("%s "), prompt);
|
||||
- gdb_flush (gdb_stdout);
|
||||
-
|
||||
- args = command_line_input ((char *) NULL, 0, annotation_suffix);
|
||||
+ args = command_line_input (prompt, 0, annotation_suffix);
|
||||
|
||||
if (args == NULL)
|
||||
error_no_arg (_("one or more choice numbers"));
|
||||
|
||||
|
||||
|
||||
2008-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Workaround GCC PR ada/35998.
|
||||
* ada-lang.c (to_fixed_record_type): Error out on invalid length of the
|
||||
type TYPE0.
|
||||
|
||||
--- ./gdb/ada-lang.c 6 Apr 2008 08:56:36 -0000 1.137
|
||||
+++ ./gdb/ada-lang.c 20 Apr 2008 21:47:05 -0000
|
||||
@@ -7313,6 +7313,11 @@ to_fixed_record_type (struct type *type0
|
||||
{
|
||||
struct type *templ_type;
|
||||
|
||||
+ /* GCC PR ada/35998 workaround. */
|
||||
+ if (TYPE_LENGTH (type0) == 0xffffffff)
|
||||
+ error (_("Type %s has invalid length -1, check your GCC"),
|
||||
+ TYPE_NAME (type0));
|
||||
+
|
||||
if (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE)
|
||||
return type0;
|
||||
|
||||
|
173
gdb-6.8-bz442765-threaded-exec-test.patch
Normal file
173
gdb-6.8-bz442765-threaded-exec-test.patch
Normal file
@ -0,0 +1,173 @@
|
||||
Test various forms of threads tracking across exec(2).
|
||||
|
||||
diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.c gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
--- gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.c 2008-04-16 17:05:19.000000000 -0400
|
||||
+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.c 2008-04-16 14:43:50.000000000 -0400
|
||||
@@ -18,21 +18,95 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <stddef.h>
|
||||
-#include <pthread.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
+#include <stdio.h>
|
||||
|
||||
+#ifdef THREADS
|
||||
+
|
||||
+# include <pthread.h>
|
||||
|
||||
static void *
|
||||
threader (void *arg)
|
||||
{
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
+#endif
|
||||
+
|
||||
int
|
||||
-main (void)
|
||||
+main (int argc, char **argv)
|
||||
{
|
||||
+ char *exec_nothreads, *exec_threads, *cmd;
|
||||
+ int phase;
|
||||
+ char phase_s[8];
|
||||
+
|
||||
+ setbuf (stdout, NULL);
|
||||
+
|
||||
+ if (argc != 4)
|
||||
+ {
|
||||
+ fprintf (stderr, "%s <non-threaded> <threaded> <phase>\n", argv[0]);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+#ifdef THREADS
|
||||
+ puts ("THREADS: Y");
|
||||
+#else
|
||||
+ puts ("THREADS: N");
|
||||
+#endif
|
||||
+ exec_nothreads = argv[1];
|
||||
+ printf ("exec_nothreads: %s\n", exec_nothreads);
|
||||
+ exec_threads = argv[2];
|
||||
+ printf ("exec_threads: %s\n", exec_threads);
|
||||
+ phase = atoi (argv[3]);
|
||||
+ printf ("phase: %d\n", phase);
|
||||
+
|
||||
+ /* Phases: threading
|
||||
+ 0: N -> N
|
||||
+ 1: N -> Y
|
||||
+ 2: Y -> Y
|
||||
+ 3: Y -> N
|
||||
+ 4: N -> exit */
|
||||
+
|
||||
+ cmd = NULL;
|
||||
+
|
||||
+#ifndef THREADS
|
||||
+ switch (phase)
|
||||
+ {
|
||||
+ case 0:
|
||||
+ cmd = exec_nothreads;
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ cmd = exec_threads;
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0],
|
||||
+ phase);
|
||||
+ return 1;
|
||||
+ case 3:
|
||||
+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0],
|
||||
+ phase);
|
||||
+ return 1;
|
||||
+ case 4:
|
||||
+ return 0;
|
||||
+ default:
|
||||
+ assert (0);
|
||||
+ }
|
||||
+#else /* THREADS */
|
||||
+ switch (phase)
|
||||
+ {
|
||||
+ case 0:
|
||||
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
|
||||
+ argv[0], phase);
|
||||
+ return 1;
|
||||
+ case 1:
|
||||
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
|
||||
+ argv[0], phase);
|
||||
+ return 1;
|
||||
+ case 2:
|
||||
+ cmd = exec_threads;
|
||||
+ {
|
||||
pthread_t t1;
|
||||
int i;
|
||||
|
||||
@@ -40,7 +114,34 @@ main (void)
|
||||
assert (i == 0);
|
||||
i = pthread_join (t1, NULL);
|
||||
assert (i == 0);
|
||||
+ }
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ cmd = exec_nothreads;
|
||||
+ {
|
||||
+ pthread_t t1;
|
||||
+ int i;
|
||||
+
|
||||
+ i = pthread_create (&t1, NULL, threader, (void *) NULL);
|
||||
+ assert (i == 0);
|
||||
+ i = pthread_join (t1, NULL);
|
||||
+ assert (i == 0);
|
||||
+ }
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
|
||||
+ argv[0], phase);
|
||||
+ return 1;
|
||||
+ default:
|
||||
+ assert (0);
|
||||
+ }
|
||||
+#endif /* THREADS */
|
||||
+
|
||||
+ assert (cmd != NULL);
|
||||
+
|
||||
+ phase++;
|
||||
+ snprintf (phase_s, sizeof phase_s, "%d", phase);
|
||||
|
||||
- execl ("/bin/true", "/bin/true", NULL);
|
||||
- abort ();
|
||||
+ execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL);
|
||||
+ assert (0);
|
||||
}
|
||||
diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.exp gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
--- gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.exp 2008-04-16 17:05:19.000000000 -0400
|
||||
+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.exp 2008-04-16 14:42:49.000000000 -0400
|
||||
@@ -20,9 +20,14 @@
|
||||
|
||||
set testfile threaded-exec
|
||||
set srcfile ${testfile}.c
|
||||
-set binfile ${objdir}/${subdir}/${testfile}
|
||||
+set binfile_nothreads ${objdir}/${subdir}/${testfile}N
|
||||
+set binfile_threads ${objdir}/${subdir}/${testfile}Y
|
||||
|
||||
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
|
||||
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_nothreads}" executable {additional_flags=-UTHREADS}] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile_threads}" executable {additional_flags=-DTHREADS}] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -30,9 +35,9 @@ gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
-gdb_load ${binfile}
|
||||
+gdb_load ${binfile_nothreads}
|
||||
|
||||
-gdb_run_cmd
|
||||
+gdb_run_cmd ${binfile_nothreads} ${binfile_threads} 0
|
||||
|
||||
gdb_test_multiple {} "Program exited" {
|
||||
-re "\r\nProgram exited normally.\r\n$gdb_prompt $" {
|
@ -18,3 +18,763 @@ diff -u -r1.172 -r1.173
|
||||
rN < 256 && imm == 0)
|
||||
{
|
||||
/* mov rN, rM where rM is an input register */
|
||||
|
||||
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=442765
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2008-03/msg00281.html
|
||||
http://sourceware.org/ml/gdb-cvs/2008-03/msg00114.html
|
||||
|
||||
2008-03-21 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* gdbthread.h (add_thread_with_info): New.
|
||||
* linux-thread-db.c: Add some documentation.
|
||||
(GET_LWP, GET_PID, GET_THREAD, is_lwp, is_thread, BUILD_LWP): Delete.
|
||||
(struct private_thread_info): Remove th_valid and ti_valid.
|
||||
Replace ti with tid.
|
||||
(thread_get_info_callback): Do not add TID to the new ptid. Do
|
||||
not cache th or ti.
|
||||
(thread_db_map_id2thr, lwp_from_thread): Delete functions.
|
||||
(thread_from_lwp): Assert that the LWP is set. Do not add TID to the
|
||||
new PTID.
|
||||
(attach_thread): Handle an already-existing thread. Use
|
||||
add_thread_with_info. Cache the th and tid.
|
||||
(detach_thread): Verify that private was set. Remove verbose
|
||||
argument and printing. Update caller.
|
||||
(thread_db_detach): Do not adjust inferior_ptid.
|
||||
(clear_lwpid_callback, thread_db_resume, thread_db_kill): Delete.
|
||||
(check_event, find_new_threads_callback): Do not add TID to the new PTID.
|
||||
(thread_db_wait): Do not use lwp_from_thread.
|
||||
(thread_db_pid_to_str): Use the cached TID.
|
||||
(thread_db_extra_thread_info): Check that private is set.
|
||||
(same_ptid_callback): Delete.
|
||||
(thread_db_get_thread_local_address): Do not use it or check
|
||||
is_thread. Check that private is set. Assume that the thread
|
||||
handle is already cached.
|
||||
(init_thread_db_ops): Remove to_resume and to_kill.
|
||||
* thread.c (add_thread_with_info): New.
|
||||
(add_thread): Use it.
|
||||
* linux-nat.c (find_thread_from_lwp): Delete.
|
||||
(exit_lwp): Do not use it. Check print_thread_events. Print before
|
||||
deleting the thread.
|
||||
(GET_PID, GET_LWP, BUILD_LWP, is_lwp): Move to...
|
||||
* linux-nat.h (GET_PID, GET_LWP, BUILD_LWP, is_lwp): ...here.
|
||||
* inf-ttrace.c (inf_ttrace_wait): Use print_thread_events and
|
||||
printf_unfiltered for thread exits.
|
||||
* procfs.c (procfs_wait): Likewise.
|
||||
|
||||
2008-03-21 Pedro Alves <pedro@codesourcery.com>
|
||||
|
||||
* gdb.threads/fork-child-threads.exp: Test next over fork.
|
||||
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/gdbthread.h,v
|
||||
retrieving revision 1.20
|
||||
retrieving revision 1.21
|
||||
diff -u -r1.20 -r1.21
|
||||
--- src/gdb/gdbthread.h 2008/03/15 13:53:25 1.20
|
||||
+++ src/gdb/gdbthread.h 2008/03/21 15:44:53 1.21
|
||||
@@ -81,6 +81,10 @@
|
||||
about new thread. */
|
||||
extern struct thread_info *add_thread_silent (ptid_t ptid);
|
||||
|
||||
+/* Same as add_thread, and sets the private info. */
|
||||
+extern struct thread_info *add_thread_with_info (ptid_t ptid,
|
||||
+ struct private_thread_info *);
|
||||
+
|
||||
/* Delete an existing thread list entry. */
|
||||
extern void delete_thread (ptid_t);
|
||||
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/inf-ttrace.c,v
|
||||
retrieving revision 1.27
|
||||
retrieving revision 1.28
|
||||
diff -u -r1.27 -r1.28
|
||||
--- src/gdb/inf-ttrace.c 2008/01/29 21:11:24 1.27
|
||||
+++ src/gdb/inf-ttrace.c 2008/03/21 15:44:53 1.28
|
||||
@@ -964,7 +964,8 @@
|
||||
break;
|
||||
|
||||
case TTEVT_LWP_EXIT:
|
||||
- printf_filtered(_("[%s exited]\n"), target_pid_to_str (ptid));
|
||||
+ if (print_thread_events)
|
||||
+ printf_unfiltered (_("[%s exited]\n"), target_pid_to_str (ptid));
|
||||
ti = find_thread_pid (ptid);
|
||||
gdb_assert (ti != NULL);
|
||||
((struct inf_ttrace_private_thread_info *)ti->private)->dying = 1;
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/linux-nat.c,v
|
||||
retrieving revision 1.76
|
||||
retrieving revision 1.77
|
||||
diff -u -r1.76 -r1.77
|
||||
--- src/gdb/linux-nat.c 2008/03/17 14:54:07 1.76
|
||||
+++ src/gdb/linux-nat.c 2008/03/21 15:44:53 1.77
|
||||
@@ -588,11 +588,6 @@
|
||||
static int num_lwps;
|
||||
|
||||
|
||||
-#define GET_LWP(ptid) ptid_get_lwp (ptid)
|
||||
-#define GET_PID(ptid) ptid_get_pid (ptid)
|
||||
-#define is_lwp(ptid) (GET_LWP (ptid) != 0)
|
||||
-#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0)
|
||||
-
|
||||
/* If the last reported event was a SIGTRAP, this variable is set to
|
||||
the process id of the LWP/thread that got it. */
|
||||
ptid_t trap_ptid;
|
||||
@@ -813,20 +808,6 @@
|
||||
p = &(*p)->next;
|
||||
}
|
||||
|
||||
-/* Callback for iterate_over_threads that finds a thread corresponding
|
||||
- to the given LWP. */
|
||||
-
|
||||
-static int
|
||||
-find_thread_from_lwp (struct thread_info *thr, void *dummy)
|
||||
-{
|
||||
- ptid_t *ptid_p = dummy;
|
||||
-
|
||||
- if (GET_LWP (thr->ptid) && GET_LWP (thr->ptid) == GET_LWP (*ptid_p))
|
||||
- return 1;
|
||||
- else
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
/* Handle the exit of a single thread LP. */
|
||||
|
||||
static void
|
||||
@@ -834,32 +815,14 @@
|
||||
{
|
||||
if (in_thread_list (lp->ptid))
|
||||
{
|
||||
+ if (print_thread_events)
|
||||
+ printf_unfiltered (_("[%s exited]\n"), target_pid_to_str (lp->ptid));
|
||||
+
|
||||
/* Core GDB cannot deal with us deleting the current thread. */
|
||||
if (!ptid_equal (lp->ptid, inferior_ptid))
|
||||
delete_thread (lp->ptid);
|
||||
else
|
||||
record_dead_thread (lp->ptid);
|
||||
- printf_unfiltered (_("[%s exited]\n"),
|
||||
- target_pid_to_str (lp->ptid));
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* Even if LP->PTID is not in the global GDB thread list, the
|
||||
- LWP may be - with an additional thread ID. We don't need
|
||||
- to print anything in this case; thread_db is in use and
|
||||
- already took care of that. But it didn't delete the thread
|
||||
- in order to handle zombies correctly. */
|
||||
-
|
||||
- struct thread_info *thr;
|
||||
-
|
||||
- thr = iterate_over_threads (find_thread_from_lwp, &lp->ptid);
|
||||
- if (thr)
|
||||
- {
|
||||
- if (!ptid_equal (thr->ptid, inferior_ptid))
|
||||
- delete_thread (thr->ptid);
|
||||
- else
|
||||
- record_dead_thread (thr->ptid);
|
||||
- }
|
||||
}
|
||||
|
||||
delete_lwp (lp->ptid);
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/linux-nat.h,v
|
||||
retrieving revision 1.22
|
||||
retrieving revision 1.23
|
||||
diff -u -r1.22 -r1.23
|
||||
--- src/gdb/linux-nat.h 2008/01/23 11:26:28 1.22
|
||||
+++ src/gdb/linux-nat.h 2008/03/21 15:44:53 1.23
|
||||
@@ -83,6 +83,11 @@
|
||||
(LP) != NULL; \
|
||||
(LP) = (LP)->next, (PTID) = (LP) ? (LP)->ptid : (PTID))
|
||||
|
||||
+#define GET_LWP(ptid) ptid_get_lwp (ptid)
|
||||
+#define GET_PID(ptid) ptid_get_pid (ptid)
|
||||
+#define is_lwp(ptid) (GET_LWP (ptid) != 0)
|
||||
+#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0)
|
||||
+
|
||||
/* Attempt to initialize libthread_db. */
|
||||
void check_for_thread_db (void);
|
||||
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/linux-thread-db.c,v
|
||||
retrieving revision 1.37
|
||||
retrieving revision 1.38
|
||||
diff -u -r1.37 -r1.38
|
||||
--- src/gdb/linux-thread-db.c 2008/01/23 11:26:28 1.37
|
||||
+++ src/gdb/linux-thread-db.c 2008/03/21 15:44:53 1.38
|
||||
@@ -48,6 +48,32 @@
|
||||
#define LIBTHREAD_DB_SO "libthread_db.so.1"
|
||||
#endif
|
||||
|
||||
+/* GNU/Linux libthread_db support.
|
||||
+
|
||||
+ libthread_db is a library, provided along with libpthread.so, which
|
||||
+ exposes the internals of the thread library to a debugger. It
|
||||
+ allows GDB to find existing threads, new threads as they are
|
||||
+ created, thread IDs (usually, the result of pthread_self), and
|
||||
+ thread-local variables.
|
||||
+
|
||||
+ The libthread_db interface originates on Solaris, where it is
|
||||
+ both more powerful and more complicated. This implementation
|
||||
+ only works for LinuxThreads and NPTL, the two glibc threading
|
||||
+ libraries. It assumes that each thread is permanently assigned
|
||||
+ to a single light-weight process (LWP).
|
||||
+
|
||||
+ libthread_db-specific information is stored in the "private" field
|
||||
+ of struct thread_info. When the field is NULL we do not yet have
|
||||
+ information about the new thread; this could be temporary (created,
|
||||
+ but the thread library's data structures do not reflect it yet)
|
||||
+ or permanent (created using clone instead of pthread_create).
|
||||
+
|
||||
+ Process IDs managed by linux-thread-db.c match those used by
|
||||
+ linux-nat.c: a common PID for all processes, an LWP ID for each
|
||||
+ thread, and no TID. We save the TID in private. Keeping it out
|
||||
+ of the ptid_t prevents thread IDs changing when libpthread is
|
||||
+ loaded or unloaded. */
|
||||
+
|
||||
/* If we're running on GNU/Linux, we must explicitly attach to any new
|
||||
threads. */
|
||||
|
||||
@@ -119,19 +145,7 @@
|
||||
static void thread_db_find_new_threads (void);
|
||||
static void attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
|
||||
const td_thrinfo_t *ti_p);
|
||||
-static void detach_thread (ptid_t ptid, int verbose);
|
||||
-
|
||||
-
|
||||
-/* Building process ids. */
|
||||
-
|
||||
-#define GET_PID(ptid) ptid_get_pid (ptid)
|
||||
-#define GET_LWP(ptid) ptid_get_lwp (ptid)
|
||||
-#define GET_THREAD(ptid) ptid_get_tid (ptid)
|
||||
-
|
||||
-#define is_lwp(ptid) (GET_LWP (ptid) != 0)
|
||||
-#define is_thread(ptid) (GET_THREAD (ptid) != 0)
|
||||
-
|
||||
-#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0)
|
||||
+static void detach_thread (ptid_t ptid);
|
||||
|
||||
|
||||
/* Use "struct private_thread_info" to cache thread state. This is
|
||||
@@ -143,11 +157,8 @@
|
||||
unsigned int dying:1;
|
||||
|
||||
/* Cached thread state. */
|
||||
- unsigned int th_valid:1;
|
||||
- unsigned int ti_valid:1;
|
||||
-
|
||||
td_thrhandle_t th;
|
||||
- td_thrinfo_t ti;
|
||||
+ thread_t tid;
|
||||
};
|
||||
|
||||
|
||||
@@ -257,7 +268,7 @@
|
||||
thread_db_err_str (err));
|
||||
|
||||
/* Fill the cache. */
|
||||
- thread_ptid = ptid_build (GET_PID (inferior_ptid), ti.ti_lid, ti.ti_tid);
|
||||
+ thread_ptid = ptid_build (GET_PID (inferior_ptid), ti.ti_lid, 0);
|
||||
thread_info = find_thread_pid (thread_ptid);
|
||||
|
||||
/* In the case of a zombie thread, don't continue. We don't want to
|
||||
@@ -266,13 +277,6 @@
|
||||
{
|
||||
if (infop != NULL)
|
||||
*(struct thread_info **) infop = thread_info;
|
||||
- if (thread_info != NULL)
|
||||
- {
|
||||
- memcpy (&thread_info->private->th, thp, sizeof (*thp));
|
||||
- thread_info->private->th_valid = 1;
|
||||
- memcpy (&thread_info->private->ti, &ti, sizeof (ti));
|
||||
- thread_info->private->ti_valid = 1;
|
||||
- }
|
||||
return TD_THR_ZOMBIE;
|
||||
}
|
||||
|
||||
@@ -284,39 +288,11 @@
|
||||
gdb_assert (thread_info != NULL);
|
||||
}
|
||||
|
||||
- memcpy (&thread_info->private->th, thp, sizeof (*thp));
|
||||
- thread_info->private->th_valid = 1;
|
||||
- memcpy (&thread_info->private->ti, &ti, sizeof (ti));
|
||||
- thread_info->private->ti_valid = 1;
|
||||
-
|
||||
if (infop != NULL)
|
||||
*(struct thread_info **) infop = thread_info;
|
||||
|
||||
return 0;
|
||||
}
|
||||
-
|
||||
-/* Accessor functions for the thread_db information, with caching. */
|
||||
-
|
||||
-static void
|
||||
-thread_db_map_id2thr (struct thread_info *thread_info, int fatal)
|
||||
-{
|
||||
- td_err_e err;
|
||||
-
|
||||
- if (thread_info->private->th_valid)
|
||||
- return;
|
||||
-
|
||||
- err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (thread_info->ptid),
|
||||
- &thread_info->private->th);
|
||||
- if (err != TD_OK)
|
||||
- {
|
||||
- if (fatal)
|
||||
- error (_("Cannot find thread %ld: %s"),
|
||||
- (long) GET_THREAD (thread_info->ptid),
|
||||
- thread_db_err_str (err));
|
||||
- }
|
||||
- else
|
||||
- thread_info->private->th_valid = 1;
|
||||
-}
|
||||
|
||||
/* Convert between user-level thread ids and LWP ids. */
|
||||
|
||||
@@ -328,10 +304,9 @@
|
||||
struct thread_info *thread_info;
|
||||
ptid_t thread_ptid;
|
||||
|
||||
- if (GET_LWP (ptid) == 0)
|
||||
- ptid = BUILD_LWP (GET_PID (ptid), GET_PID (ptid));
|
||||
-
|
||||
- gdb_assert (is_lwp (ptid));
|
||||
+ /* This ptid comes from linux-nat.c, which should always fill in the
|
||||
+ LWP. */
|
||||
+ gdb_assert (GET_LWP (ptid) != 0);
|
||||
|
||||
err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid), &th);
|
||||
if (err != TD_OK)
|
||||
@@ -352,16 +327,8 @@
|
||||
&& thread_info == NULL)
|
||||
return pid_to_ptid (-1);
|
||||
|
||||
- gdb_assert (thread_info && thread_info->private->ti_valid);
|
||||
-
|
||||
- return ptid_build (GET_PID (ptid), GET_LWP (ptid),
|
||||
- thread_info->private->ti.ti_tid);
|
||||
-}
|
||||
-
|
||||
-static ptid_t
|
||||
-lwp_from_thread (ptid_t ptid)
|
||||
-{
|
||||
- return BUILD_LWP (GET_LWP (ptid), GET_PID (ptid));
|
||||
+ gdb_assert (ptid_get_tid (ptid) == 0);
|
||||
+ return ptid;
|
||||
}
|
||||
|
||||
|
||||
@@ -672,7 +639,8 @@
|
||||
attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
|
||||
const td_thrinfo_t *ti_p)
|
||||
{
|
||||
- struct thread_info *tp;
|
||||
+ struct private_thread_info *private;
|
||||
+ struct thread_info *tp = NULL;
|
||||
td_err_e err;
|
||||
|
||||
/* If we're being called after a TD_CREATE event, we may already
|
||||
@@ -690,10 +658,21 @@
|
||||
tp = find_thread_pid (ptid);
|
||||
gdb_assert (tp != NULL);
|
||||
|
||||
- if (!tp->private->dying)
|
||||
- return;
|
||||
+ /* If tp->private is NULL, then GDB is already attached to this
|
||||
+ thread, but we do not know anything about it. We can learn
|
||||
+ about it here. This can only happen if we have some other
|
||||
+ way besides libthread_db to notice new threads (i.e.
|
||||
+ PTRACE_EVENT_CLONE); assume the same mechanism notices thread
|
||||
+ exit, so this can not be a stale thread recreated with the
|
||||
+ same ID. */
|
||||
+ if (tp->private != NULL)
|
||||
+ {
|
||||
+ if (!tp->private->dying)
|
||||
+ return;
|
||||
|
||||
- delete_thread (ptid);
|
||||
+ delete_thread (ptid);
|
||||
+ tp = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
check_thread_signals ();
|
||||
@@ -702,13 +681,28 @@
|
||||
return; /* A zombie thread -- do not attach. */
|
||||
|
||||
/* Under GNU/Linux, we have to attach to each and every thread. */
|
||||
- if (lin_lwp_attach_lwp (BUILD_LWP (ti_p->ti_lid, GET_PID (ptid))) < 0)
|
||||
+ if (tp == NULL
|
||||
+ && lin_lwp_attach_lwp (BUILD_LWP (ti_p->ti_lid, GET_PID (ptid))) < 0)
|
||||
return;
|
||||
|
||||
+ /* Construct the thread's private data. */
|
||||
+ private = xmalloc (sizeof (struct private_thread_info));
|
||||
+ memset (private, 0, sizeof (struct private_thread_info));
|
||||
+
|
||||
+ /* A thread ID of zero may mean the thread library has not initialized
|
||||
+ yet. But we shouldn't even get here if that's the case. FIXME:
|
||||
+ if we change GDB to always have at least one thread in the thread
|
||||
+ list this will have to go somewhere else; maybe private == NULL
|
||||
+ until the thread_db target claims it. */
|
||||
+ gdb_assert (ti_p->ti_tid != 0);
|
||||
+ private->th = *th_p;
|
||||
+ private->tid = ti_p->ti_tid;
|
||||
+
|
||||
/* Add the thread to GDB's thread list. */
|
||||
- tp = add_thread (ptid);
|
||||
- tp->private = xmalloc (sizeof (struct private_thread_info));
|
||||
- memset (tp->private, 0, sizeof (struct private_thread_info));
|
||||
+ if (tp == NULL)
|
||||
+ tp = add_thread_with_info (ptid, private);
|
||||
+ else
|
||||
+ tp->private = private;
|
||||
|
||||
/* Enable thread event reporting for this thread. */
|
||||
err = td_thr_event_enable_p (th_p, 1);
|
||||
@@ -718,22 +712,20 @@
|
||||
}
|
||||
|
||||
static void
|
||||
-detach_thread (ptid_t ptid, int verbose)
|
||||
+detach_thread (ptid_t ptid)
|
||||
{
|
||||
struct thread_info *thread_info;
|
||||
|
||||
- if (verbose)
|
||||
- printf_unfiltered (_("[%s exited]\n"), target_pid_to_str (ptid));
|
||||
-
|
||||
/* Don't delete the thread now, because it still reports as active
|
||||
until it has executed a few instructions after the event
|
||||
breakpoint - if we deleted it now, "info threads" would cause us
|
||||
to re-attach to it. Just mark it as having had a TD_DEATH
|
||||
event. This means that we won't delete it from our thread list
|
||||
until we notice that it's dead (via prune_threads), or until
|
||||
- something re-uses its thread ID. */
|
||||
+ something re-uses its thread ID. We'll report the thread exit
|
||||
+ when the underlying LWP dies. */
|
||||
thread_info = find_thread_pid (ptid);
|
||||
- gdb_assert (thread_info != NULL);
|
||||
+ gdb_assert (thread_info != NULL && thread_info->private != NULL);
|
||||
thread_info->private->dying = 1;
|
||||
}
|
||||
|
||||
@@ -742,47 +734,12 @@
|
||||
{
|
||||
disable_thread_event_reporting ();
|
||||
|
||||
- /* There's no need to save & restore inferior_ptid here, since the
|
||||
- inferior is not supposed to survive this function call. */
|
||||
- inferior_ptid = lwp_from_thread (inferior_ptid);
|
||||
-
|
||||
target_beneath->to_detach (args, from_tty);
|
||||
|
||||
/* Should this be done by detach_command? */
|
||||
target_mourn_inferior ();
|
||||
}
|
||||
|
||||
-static int
|
||||
-clear_lwpid_callback (struct thread_info *thread, void *dummy)
|
||||
-{
|
||||
- /* If we know that our thread implementation is 1-to-1, we could save
|
||||
- a certain amount of information; it's not clear how much, so we
|
||||
- are always conservative. */
|
||||
-
|
||||
- thread->private->th_valid = 0;
|
||||
- thread->private->ti_valid = 0;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-thread_db_resume (ptid_t ptid, int step, enum target_signal signo)
|
||||
-{
|
||||
- struct cleanup *old_chain = save_inferior_ptid ();
|
||||
-
|
||||
- if (GET_PID (ptid) == -1)
|
||||
- inferior_ptid = lwp_from_thread (inferior_ptid);
|
||||
- else if (is_thread (ptid))
|
||||
- ptid = lwp_from_thread (ptid);
|
||||
-
|
||||
- /* Clear cached data which may not be valid after the resume. */
|
||||
- iterate_over_threads (clear_lwpid_callback, NULL);
|
||||
-
|
||||
- target_beneath->to_resume (ptid, step, signo);
|
||||
-
|
||||
- do_cleanups (old_chain);
|
||||
-}
|
||||
-
|
||||
/* Check if PID is currently stopped at the location of a thread event
|
||||
breakpoint location. If it is, read the event message and act upon
|
||||
the event. */
|
||||
@@ -833,7 +790,7 @@
|
||||
if (err != TD_OK)
|
||||
error (_("Cannot get thread info: %s"), thread_db_err_str (err));
|
||||
|
||||
- ptid = ptid_build (GET_PID (ptid), ti.ti_lid, ti.ti_tid);
|
||||
+ ptid = ptid_build (GET_PID (ptid), ti.ti_lid, 0);
|
||||
|
||||
switch (msg.event)
|
||||
{
|
||||
@@ -849,7 +806,7 @@
|
||||
if (!in_thread_list (ptid))
|
||||
error (_("Spurious thread death event."));
|
||||
|
||||
- detach_thread (ptid, print_thread_events);
|
||||
+ detach_thread (ptid);
|
||||
|
||||
break;
|
||||
|
||||
@@ -865,9 +822,6 @@
|
||||
{
|
||||
extern ptid_t trap_ptid;
|
||||
|
||||
- if (GET_PID (ptid) != -1 && is_thread (ptid))
|
||||
- ptid = lwp_from_thread (ptid);
|
||||
-
|
||||
ptid = target_beneath->to_wait (ptid, ourstatus);
|
||||
|
||||
if (ourstatus->kind == TARGET_WAITKIND_EXITED
|
||||
@@ -913,15 +867,6 @@
|
||||
}
|
||||
|
||||
static void
|
||||
-thread_db_kill (void)
|
||||
-{
|
||||
- /* There's no need to save & restore inferior_ptid here, since the
|
||||
- inferior isn't supposed to survive this function call. */
|
||||
- inferior_ptid = lwp_from_thread (inferior_ptid);
|
||||
- target_beneath->to_kill ();
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
thread_db_mourn_inferior (void)
|
||||
{
|
||||
/* Forget about the child's process ID. We shouldn't need it
|
||||
@@ -954,7 +899,7 @@
|
||||
if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE)
|
||||
return 0; /* A zombie -- ignore. */
|
||||
|
||||
- ptid = ptid_build (GET_PID (inferior_ptid), ti.ti_lid, ti.ti_tid);
|
||||
+ ptid = ptid_build (GET_PID (inferior_ptid), ti.ti_lid, 0);
|
||||
|
||||
if (ti.ti_tid == 0)
|
||||
{
|
||||
@@ -994,18 +939,17 @@
|
||||
static char *
|
||||
thread_db_pid_to_str (ptid_t ptid)
|
||||
{
|
||||
- if (is_thread (ptid))
|
||||
+ struct thread_info *thread_info = find_thread_pid (ptid);
|
||||
+
|
||||
+ if (thread_info != NULL && thread_info->private != NULL)
|
||||
{
|
||||
static char buf[64];
|
||||
- struct thread_info *thread_info;
|
||||
+ thread_t tid;
|
||||
|
||||
+ tid = thread_info->private->tid;
|
||||
thread_info = find_thread_pid (ptid);
|
||||
- if (thread_info == NULL)
|
||||
- snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld) (Missing)",
|
||||
- GET_THREAD (ptid), GET_LWP (ptid));
|
||||
- else
|
||||
- snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)",
|
||||
- GET_THREAD (ptid), GET_LWP (ptid));
|
||||
+ snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)",
|
||||
+ tid, GET_LWP (ptid));
|
||||
|
||||
return buf;
|
||||
}
|
||||
@@ -1022,22 +966,15 @@
|
||||
static char *
|
||||
thread_db_extra_thread_info (struct thread_info *info)
|
||||
{
|
||||
+ if (info->private == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
if (info->private->dying)
|
||||
return "Exiting";
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-/* Return 1 if this thread has the same LWP as the passed PTID. */
|
||||
-
|
||||
-static int
|
||||
-same_ptid_callback (struct thread_info *thread, void *arg)
|
||||
-{
|
||||
- ptid_t *ptid_p = arg;
|
||||
-
|
||||
- return GET_LWP (thread->ptid) == GET_LWP (*ptid_p);
|
||||
-}
|
||||
-
|
||||
/* Get the address of the thread local variable in load module LM which
|
||||
is stored at OFFSET within the thread local storage for thread PTID. */
|
||||
|
||||
@@ -1046,26 +983,19 @@
|
||||
CORE_ADDR lm,
|
||||
CORE_ADDR offset)
|
||||
{
|
||||
+ struct thread_info *thread_info;
|
||||
+
|
||||
/* If we have not discovered any threads yet, check now. */
|
||||
- if (!is_thread (ptid) && !have_threads ())
|
||||
+ if (!have_threads ())
|
||||
thread_db_find_new_threads ();
|
||||
|
||||
- /* Try to find a matching thread if we still have the LWP ID instead
|
||||
- of the thread ID. */
|
||||
- if (!is_thread (ptid))
|
||||
- {
|
||||
- struct thread_info *thread;
|
||||
-
|
||||
- thread = iterate_over_threads (same_ptid_callback, &ptid);
|
||||
- if (thread != NULL)
|
||||
- ptid = thread->ptid;
|
||||
- }
|
||||
+ /* Find the matching thread. */
|
||||
+ thread_info = find_thread_pid (ptid);
|
||||
|
||||
- if (is_thread (ptid))
|
||||
+ if (thread_info != NULL && thread_info->private != NULL)
|
||||
{
|
||||
td_err_e err;
|
||||
void *address;
|
||||
- struct thread_info *thread_info;
|
||||
|
||||
/* glibc doesn't provide the needed interface. */
|
||||
if (!td_thr_tls_get_addr_p)
|
||||
@@ -1075,11 +1005,6 @@
|
||||
/* Caller should have verified that lm != 0. */
|
||||
gdb_assert (lm != 0);
|
||||
|
||||
- /* Get info about the thread. */
|
||||
- thread_info = find_thread_pid (ptid);
|
||||
- gdb_assert (thread_info);
|
||||
- thread_db_map_id2thr (thread_info, 1);
|
||||
-
|
||||
/* Finally, get the address of the variable. */
|
||||
err = td_thr_tls_get_addr_p (&thread_info->private->th,
|
||||
(void *)(size_t) lm,
|
||||
@@ -1122,9 +1047,7 @@
|
||||
thread_db_ops.to_longname = "multi-threaded child process.";
|
||||
thread_db_ops.to_doc = "Threads and pthreads support.";
|
||||
thread_db_ops.to_detach = thread_db_detach;
|
||||
- thread_db_ops.to_resume = thread_db_resume;
|
||||
thread_db_ops.to_wait = thread_db_wait;
|
||||
- thread_db_ops.to_kill = thread_db_kill;
|
||||
thread_db_ops.to_mourn_inferior = thread_db_mourn_inferior;
|
||||
thread_db_ops.to_find_new_threads = thread_db_find_new_threads;
|
||||
thread_db_ops.to_pid_to_str = thread_db_pid_to_str;
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/procfs.c,v
|
||||
retrieving revision 1.86
|
||||
retrieving revision 1.87
|
||||
diff -u -r1.86 -r1.87
|
||||
--- src/gdb/procfs.c 2008/03/12 20:00:21 1.86
|
||||
+++ src/gdb/procfs.c 2008/03/21 15:44:53 1.87
|
||||
@@ -4034,8 +4034,9 @@
|
||||
case PR_SYSENTRY:
|
||||
if (syscall_is_lwp_exit (pi, what))
|
||||
{
|
||||
- printf_filtered (_("[%s exited]\n"),
|
||||
- target_pid_to_str (retval));
|
||||
+ if (print_thread_events)
|
||||
+ printf_unfiltered (_("[%s exited]\n"),
|
||||
+ target_pid_to_str (retval));
|
||||
delete_thread (retval);
|
||||
status->kind = TARGET_WAITKIND_SPURIOUS;
|
||||
return retval;
|
||||
@@ -4165,8 +4166,9 @@
|
||||
}
|
||||
else if (syscall_is_lwp_exit (pi, what))
|
||||
{
|
||||
- printf_filtered (_("[%s exited]\n"),
|
||||
- target_pid_to_str (retval));
|
||||
+ if (print_thread_events)
|
||||
+ printf_unfiltered (_("[%s exited]\n"),
|
||||
+ target_pid_to_str (retval));
|
||||
delete_thread (retval);
|
||||
status->kind = TARGET_WAITKIND_SPURIOUS;
|
||||
return retval;
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/thread.c,v
|
||||
retrieving revision 1.63
|
||||
retrieving revision 1.64
|
||||
diff -u -r1.63 -r1.64
|
||||
--- src/gdb/thread.c 2008/03/17 18:41:29 1.63
|
||||
+++ src/gdb/thread.c 2008/03/21 15:44:53 1.64
|
||||
@@ -132,10 +132,12 @@
|
||||
}
|
||||
|
||||
struct thread_info *
|
||||
-add_thread (ptid_t ptid)
|
||||
+add_thread_with_info (ptid_t ptid, struct private_thread_info *private)
|
||||
{
|
||||
struct thread_info *result = add_thread_silent (ptid);
|
||||
|
||||
+ result->private = private;
|
||||
+
|
||||
if (print_thread_events)
|
||||
printf_unfiltered (_("[New %s]\n"), target_pid_to_str (ptid));
|
||||
|
||||
@@ -144,6 +146,12 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
+struct thread_info *
|
||||
+add_thread (ptid_t ptid)
|
||||
+{
|
||||
+ return add_thread_with_info (ptid, NULL);
|
||||
+}
|
||||
+
|
||||
void
|
||||
delete_thread (ptid_t ptid)
|
||||
{
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/fork-child-threads.exp,v
|
||||
retrieving revision 1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -r1.1 -r1.2
|
||||
--- src/gdb/testsuite/gdb.threads/fork-child-threads.exp 2008/01/02 13:36:38 1.1
|
||||
+++ src/gdb/testsuite/gdb.threads/fork-child-threads.exp 2008/03/21 15:44:53 1.2
|
||||
@@ -38,6 +38,10 @@
|
||||
|
||||
gdb_test "set follow-fork-mode child"
|
||||
gdb_breakpoint "start"
|
||||
+
|
||||
+# Make sure we can step over fork without losing our breakpoint.
|
||||
+gdb_test "next" ".*pthread_create \\(&thread, NULL, start, NULL\\);.*" "next over fork"
|
||||
+
|
||||
gdb_test "continue" "Breakpoint 2, start.*" "get to the spawned thread"
|
||||
|
||||
# Wrong:
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2008-04/msg00238.html
|
||||
http://sourceware.org/ml/gdb-cvs/2008-04/msg00068.html
|
||||
|
||||
2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* linux-thread-db.c (have_threads_callback): Check thread->private.
|
||||
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/gdb/linux-thread-db.c,v
|
||||
retrieving revision 1.40
|
||||
retrieving revision 1.41
|
||||
diff -u -r1.40 -r1.41
|
||||
--- src/gdb/linux-thread-db.c 2008/03/25 12:26:21 1.40
|
||||
+++ src/gdb/linux-thread-db.c 2008/04/14 14:02:23 1.41
|
||||
@@ -235,7 +235,7 @@
|
||||
static int
|
||||
have_threads_callback (struct thread_info *thread, void *dummy)
|
||||
{
|
||||
- return 1;
|
||||
+ return thread->private != NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -31,9 +31,10 @@ It fixes the regression since GDB-6.7.1rh on x86_64 -m64 -fPIE/-pie:
|
||||
-PASS: gdb.base/watchpoint.exp: run to marker1 in test_simple_watchpoint
|
||||
+FAIL: gdb.base/watchpoint.exp: run to marker1 in test_simple_watchpoint
|
||||
|
||||
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/NEWS gdb-6.7.50.20080227-dynwatch/gdb/NEWS
|
||||
--- gdb-6.7.50.20080227-orig/gdb/NEWS 2008-03-03 08:42:11.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227-dynwatch/gdb/NEWS 2008-03-03 08:38:18.000000000 +0100
|
||||
Index: gdb-6.8/gdb/NEWS
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/NEWS 2008-04-19 20:48:13.000000000 +0200
|
||||
+++ gdb-6.8/gdb/NEWS 2008-04-19 20:50:24.000000000 +0200
|
||||
@@ -1,6 +1,9 @@
|
||||
What has changed in GDB?
|
||||
(Organized release by release)
|
||||
@ -44,9 +45,10 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/NEWS gdb
|
||||
*** Changes in GDB 6.8
|
||||
|
||||
* New native configurations
|
||||
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/breakpoint.c gdb-6.7.50.20080227-dynwatch/gdb/breakpoint.c
|
||||
--- gdb-6.7.50.20080227-orig/gdb/breakpoint.c 2008-03-03 08:42:10.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227-dynwatch/gdb/breakpoint.c 2008-03-03 08:37:33.000000000 +0100
|
||||
Index: gdb-6.8/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/breakpoint.c 2008-04-19 20:48:11.000000000 +0200
|
||||
+++ gdb-6.8/gdb/breakpoint.c 2008-04-19 20:51:49.000000000 +0200
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "memattr.h"
|
||||
#include "ada-lang.h"
|
||||
@ -177,8 +179,8 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/breakpoi
|
||||
+ }
|
||||
|
||||
/* Look at each value on the value chain. */
|
||||
- for (; v; v = value_next (v))
|
||||
+ for (v = val_chain; v; v = value_next (v))
|
||||
- for (; v; v = next)
|
||||
+ for (v = val_chain; v; v = next)
|
||||
{
|
||||
/* If it's a memory location, and GDB actually needed
|
||||
its contents to evaluate the expression, then we
|
||||
@ -332,7 +334,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/breakpoi
|
||||
/* We will stop here */
|
||||
return WP_VALUE_CHANGED;
|
||||
}
|
||||
@@ -5780,10 +5844,9 @@ watch_command_1 (char *arg, int accessfl
|
||||
@@ -5723,10 +5787,9 @@ watch_command_1 (char *arg, int accessfl
|
||||
exp_end = arg;
|
||||
exp_valid_block = innermost_block;
|
||||
mark = value_mark ();
|
||||
@ -346,7 +348,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/breakpoi
|
||||
|
||||
tok = arg;
|
||||
while (*tok == ' ' || *tok == '\t')
|
||||
@@ -5872,6 +5935,7 @@ watch_command_1 (char *arg, int accessfl
|
||||
@@ -5815,6 +5878,7 @@ watch_command_1 (char *arg, int accessfl
|
||||
b->exp_valid_block = exp_valid_block;
|
||||
b->exp_string = savestring (exp_start, exp_end - exp_start);
|
||||
b->val = val;
|
||||
@ -354,7 +356,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/breakpoi
|
||||
b->loc->cond = cond;
|
||||
if (cond_start)
|
||||
b->cond_string = savestring (cond_start, cond_end - cond_start);
|
||||
@@ -7755,11 +7819,11 @@ is valid is not currently in scope.\n"),
|
||||
@@ -7698,11 +7762,11 @@ is valid is not currently in scope.\n"),
|
||||
if (bpt->val)
|
||||
value_free (bpt->val);
|
||||
mark = value_mark ();
|
||||
@ -371,10 +373,11 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/breakpoi
|
||||
if (bpt->type == bp_hardware_watchpoint ||
|
||||
bpt->type == bp_read_watchpoint ||
|
||||
bpt->type == bp_access_watchpoint)
|
||||
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/breakpoint.h gdb-6.7.50.20080227-dynwatch/gdb/breakpoint.h
|
||||
--- gdb-6.7.50.20080227-orig/gdb/breakpoint.h 2008-03-03 08:42:10.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227-dynwatch/gdb/breakpoint.h 2008-03-03 08:34:20.000000000 +0100
|
||||
@@ -392,8 +392,13 @@ struct breakpoint
|
||||
Index: gdb-6.8/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/breakpoint.h 2008-04-19 20:47:23.000000000 +0200
|
||||
+++ gdb-6.8/gdb/breakpoint.h 2008-04-19 20:50:24.000000000 +0200
|
||||
@@ -391,8 +391,13 @@ struct breakpoint
|
||||
/* The largest block within which it is valid, or NULL if it is
|
||||
valid anywhere (e.g. consists just of global symbols). */
|
||||
struct block *exp_valid_block;
|
||||
@ -389,9 +392,10 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/breakpoi
|
||||
|
||||
/* Holds the address of the related watchpoint_scope breakpoint
|
||||
when using watchpoints on local variables (might the concept
|
||||
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/testsuite/gdb.base/watchpoint.c gdb-6.7.50.20080227-dynwatch/gdb/testsuite/gdb.base/watchpoint.c
|
||||
--- gdb-6.7.50.20080227-orig/gdb/testsuite/gdb.base/watchpoint.c 2003-03-17 20:51:58.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227-dynwatch/gdb/testsuite/gdb.base/watchpoint.c 2008-03-03 08:34:20.000000000 +0100
|
||||
Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/testsuite/gdb.base/watchpoint.c 2008-04-19 20:47:16.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint.c 2008-04-19 20:50:24.000000000 +0200
|
||||
@@ -39,6 +39,8 @@ struct foo struct1, struct2, *ptr1, *ptr
|
||||
|
||||
int doread = 0;
|
||||
@ -424,9 +428,10 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/testsuit
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/testsuite/gdb.base/watchpoint.exp gdb-6.7.50.20080227-dynwatch/gdb/testsuite/gdb.base/watchpoint.exp
|
||||
--- gdb-6.7.50.20080227-orig/gdb/testsuite/gdb.base/watchpoint.exp 2008-01-01 23:53:19.000000000 +0100
|
||||
+++ gdb-6.7.50.20080227-dynwatch/gdb/testsuite/gdb.base/watchpoint.exp 2008-03-03 08:34:20.000000000 +0100
|
||||
Index: gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.orig/gdb/testsuite/gdb.base/watchpoint.exp 2008-04-19 20:47:16.000000000 +0200
|
||||
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint.exp 2008-04-19 20:52:11.000000000 +0200
|
||||
@@ -645,6 +645,30 @@ proc test_watchpoint_and_breakpoint {} {
|
||||
}
|
||||
}
|
||||
@ -454,7 +459,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.50.20080227-orig/gdb/testsuit
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
|
40
gdb.spec
40
gdb.spec
@ -13,7 +13,7 @@ Version: 6.8
|
||||
|
||||
# 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.
|
||||
Release: 3%{?_with_upstream:.upstream}%{?dist}
|
||||
Release: 5%{?_with_upstream:.upstream}%{?dist}
|
||||
|
||||
License: GPL
|
||||
Group: Development/Debuggers
|
||||
@ -93,9 +93,6 @@ Patch117: gdb-6.3-removebp-20041130.patch
|
||||
# --readnever option.
|
||||
Patch118: gdb-6.3-gstack-20050411.patch
|
||||
|
||||
# Fix for caching thread lwps for linux
|
||||
Patch119: gdb-6.3-lwp-cache-20041216.patch
|
||||
|
||||
# Fix to ensure types are visible
|
||||
Patch120: gdb-6.3-type-fix-20041213.patch
|
||||
|
||||
@ -291,9 +288,6 @@ Patch266: gdb-6.6-bz247354-leader-exit-test.patch
|
||||
# New locating of the matching binaries from the pure core file (build-id).
|
||||
Patch274: gdb-6.6-buildid-locate.patch
|
||||
|
||||
# Fixed the kernel 8KB VDSO loading (producing `no loadable sections found').
|
||||
Patch276: gdb-6.6-bfd-vdso8k.patch
|
||||
|
||||
# Fixed the kernel i386-on-x86_64 VDSO loading (producing `Lowest section in').
|
||||
Patch277: gdb-6.6-vdso-i386-on-amd64-warning.patch
|
||||
|
||||
@ -352,6 +346,9 @@ Patch311: gdb-6.3-focus-cmd-prev-test.patch
|
||||
# Test crash on a sw watchpoint condition getting out of the scope.
|
||||
Patch314: gdb-6.3-watchpoint-cond-gone-test.patch
|
||||
|
||||
# Test various forms of threads tracking across exec() (BZ 442765).
|
||||
Patch315: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||
|
||||
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
|
||||
BuildRequires: flex bison sharutils expat-devel
|
||||
Requires: readline
|
||||
@ -363,15 +360,22 @@ BuildRequires: rpm-devel
|
||||
%if 0%{?_with_testsuite:1}
|
||||
# gcc-objc++ is not covered by the GDB testsuite.
|
||||
BuildRequires: gcc gcc-c++ gcc-gfortran gcc-java gcc-objc fpc
|
||||
# Ensure the devel libraries are installed for both multilib arches.
|
||||
%define multilib_64_archs sparc64 ppc64 s390x x86_64
|
||||
# Copied from gcc-4.1.2-32
|
||||
%ifarch %{ix86} x86_64 ia64 ppc alpha
|
||||
BuildRequires: gcc-gnat
|
||||
%endif
|
||||
%define multilib_64_archs sparc64 ppc64 s390x x86_64
|
||||
%ifarch %{multilib_64_archs} sparc ppc
|
||||
# Ensure glibc{,-devel} is installed for both multilib arches
|
||||
BuildRequires: %{_exec_prefix}/lib64/libgnat-4.3.so %{_exec_prefix}/lib/libgnat-4.3.so
|
||||
%endif
|
||||
%endif
|
||||
%ifarch %{multilib_64_archs} sparc ppc
|
||||
BuildRequires: /lib/libc.so.6 %{_exec_prefix}/lib/libc.so /lib64/libc.so.6 %{_exec_prefix}/lib64/libc.so
|
||||
BuildRequires: /lib/libgcc_s.so.1 /lib64/libgcc_s.so.1
|
||||
BuildRequires: %{_exec_prefix}/lib/libstdc++.so.6 %{_exec_prefix}/lib64/libstdc++.so.6
|
||||
BuildRequires: %{_exec_prefix}/lib64/libgcj.so.9 %{_exec_prefix}/lib/libgcj.so.9
|
||||
# for gcc-java:
|
||||
BuildRequires: %{_exec_prefix}/lib64/libz.so %{_exec_prefix}/lib/libz.so
|
||||
%endif
|
||||
%endif
|
||||
|
||||
@ -432,9 +436,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch112 -p1
|
||||
%patch117 -p1
|
||||
%patch118 -p1
|
||||
%patch119 -p1
|
||||
%patch120 -p1
|
||||
%patch124 -p1
|
||||
%patch125 -p1
|
||||
%patch128 -p1
|
||||
%patch136 -p1
|
||||
@ -499,7 +501,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch266 -p1
|
||||
%patch274 -p1
|
||||
%patch275 -p1
|
||||
%patch276 -p1
|
||||
%patch277 -p1
|
||||
%patch280 -p1
|
||||
%patch282 -p1
|
||||
@ -519,6 +520,8 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch309 -p1
|
||||
%patch311 -p1
|
||||
%patch314 -p1
|
||||
%patch315 -p1
|
||||
%patch124 -p1
|
||||
|
||||
find -name "*.orig" | xargs rm -f
|
||||
! find -name "*.rej" # Should not happen.
|
||||
@ -761,6 +764,17 @@ fi
|
||||
%{_mandir}/*/gdbserver.1*
|
||||
|
||||
%changelog
|
||||
* Sun Apr 27 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-5
|
||||
- Remove the kernel VDSO workaround (`no loadable ...') (kernel BZ 312011).
|
||||
|
||||
* Wed Apr 23 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-4
|
||||
- Backport fix on various forms of threads tracking across exec() (BZ 442765).
|
||||
- Testsuite: Include more biarch libraries on %%{multilib_64_archs}.
|
||||
- Disable the build-id warnings for the testsuite run as they cause some FAILs.
|
||||
- Fix PIE support for 32bit inferiors on 64bit debugger.
|
||||
- Fix trashing memory on one ada/gnat testcase.
|
||||
- Make the testsuite results on ada more stable.
|
||||
|
||||
* Wed Apr 16 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-3
|
||||
- Fix ia64 compilation errors (Yi Zhan, BZ 442684).
|
||||
- Fix build on non-standard rpm-devel includes (Robert Scheck, BZ 442449).
|
||||
|
Loading…
Reference in New Issue
Block a user