rpms/gdb/devel gdb-6.3-pie-20050110.patch, 1.4, 1.5 gdb-6.3-test-pie-20050107.patch, 1.3, 1.4 gdb-6.3-threaded-watchpoints-20041213.patch, 1.7, 1.8 gdb-6.7.1-upstream.patch, 1.1, 1.2 gdb.spec, 1.256, 1.257 gdb-6.3-bz193763-object-name-completion.patch, 1.3, NONE gdb-6.3-constructor-20041216.patch, 1.2, NONE gdb-6.3-ctorline-20050120.patch, 1.6, NONE gdb-6.3-dtorfix-20050121.patch, 1.4, NONE gdb-6.3-linespec-20041213.patch, 1.5, NONE gdb-6.3-test-dtorfix-20050121.patch, 1.6, NONE gdb-6.3-xfree-20050922.patch, 1.1, NONE gdb-6.5-bz200048-find_line_pc-segv.patch, 1.2, NONE
Jan Kratochvil (jkratoch)
fedora-extras-commits at redhat.com
Sat Nov 3 19:10:35 UTC 2007
Author: jkratoch
Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6220
Modified Files:
gdb-6.3-pie-20050110.patch gdb-6.3-test-pie-20050107.patch
gdb-6.3-threaded-watchpoints-20041213.patch
gdb-6.7.1-upstream.patch gdb.spec
Removed Files:
gdb-6.3-bz193763-object-name-completion.patch
gdb-6.3-constructor-20041216.patch
gdb-6.3-ctorline-20050120.patch gdb-6.3-dtorfix-20050121.patch
gdb-6.3-linespec-20041213.patch
gdb-6.3-test-dtorfix-20050121.patch
gdb-6.3-xfree-20050922.patch
gdb-6.5-bz200048-find_line_pc-segv.patch
Log Message:
* Sat Nov 3 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.7.1-2
- Backport `Breakpoints at multiple locations' patch primarily for C++.
gdb-6.3-pie-20050110.patch:
Index: gdb-6.3-pie-20050110.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-pie-20050110.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- gdb-6.3-pie-20050110.patch 1 Nov 2007 20:24:20 -0000 1.4
+++ gdb-6.3-pie-20050110.patch 3 Nov 2007 19:10:29 -0000 1.5
@@ -1,7 +1,15 @@
-Index: gdb-6.7/gdb/dwarf2read.c
+2007-11-02 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ Port to GDB-6.7.1.
+
+2007-11-02 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ Port to post-GDB-6.7.1 multi-PC breakpoints.
+
+Index: gdb-6.7.1/gdb/dwarf2read.c
===================================================================
---- gdb-6.7.orig/gdb/dwarf2read.c 2007-10-13 05:27:15.000000000 +0200
-+++ gdb-6.7/gdb/dwarf2read.c 2007-10-13 05:29:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/dwarf2read.c 2007-11-02 15:24:10.000000000 +0100
++++ gdb-6.7.1/gdb/dwarf2read.c 2007-11-02 15:24:19.000000000 +0100
@@ -1226,7 +1226,7 @@ dwarf2_build_psymtabs (struct objfile *o
else
dwarf2_per_objfile->loc_buffer = NULL;
@@ -11,10 +19,10 @@
|| (objfile->global_psymbols.size == 0
&& objfile->static_psymbols.size == 0))
{
-Index: gdb-6.7/gdb/auxv.c
+Index: gdb-6.7.1/gdb/auxv.c
===================================================================
---- gdb-6.7.orig/gdb/auxv.c 2007-08-23 20:08:26.000000000 +0200
-+++ gdb-6.7/gdb/auxv.c 2007-10-13 05:29:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/auxv.c 2007-08-23 20:08:26.000000000 +0200
++++ gdb-6.7.1/gdb/auxv.c 2007-11-02 15:24:19.000000000 +0100
@@ -80,7 +80,7 @@ procfs_xfer_auxv (struct target_ops *ops
Return 1 if an entry was read into *TYPEP and *VALP. */
int
@@ -86,10 +94,10 @@
switch (flavor)
{
case dec:
-Index: gdb-6.7/gdb/auxv.h
+Index: gdb-6.7.1/gdb/auxv.h
===================================================================
---- gdb-6.7.orig/gdb/auxv.h 2007-08-23 20:08:26.000000000 +0200
-+++ gdb-6.7/gdb/auxv.h 2007-10-13 05:29:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/auxv.h 2007-08-23 20:08:26.000000000 +0200
++++ gdb-6.7.1/gdb/auxv.h 2007-11-02 15:24:19.000000000 +0100
@@ -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,
@@ -107,11 +115,11 @@
/* 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/gdb/breakpoint.h
+Index: gdb-6.7.1/gdb/breakpoint.h
===================================================================
---- gdb-6.7.orig/gdb/breakpoint.h 2007-10-13 05:09:50.000000000 +0200
-+++ gdb-6.7/gdb/breakpoint.h 2007-10-13 05:29:58.000000000 +0200
-@@ -153,6 +153,7 @@ enum enable_state
+--- gdb-6.7.1.orig/gdb/breakpoint.h 2007-11-02 15:22:24.000000000 +0100
++++ gdb-6.7.1/gdb/breakpoint.h 2007-11-02 15:24:59.000000000 +0100
+@@ -150,6 +150,7 @@ enum enable_state
automatically enabled and reset when the call
"lands" (either completes, or stops at another
eventpoint). */
@@ -119,23 +127,21 @@
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
-@@ -807,8 +808,12 @@ extern void remove_thread_event_breakpoi
+@@ -826,6 +827,10 @@ extern void remove_thread_event_breakpoi
extern void disable_breakpoints_in_shlibs (void);
+extern void disable_breakpoints_at_startup (int silent);
+
- extern void re_enable_breakpoints_in_shlibs (void);
-
-+void re_enable_breakpoints_at_startup (void);
++extern void re_enable_breakpoints_at_startup (void);
+
extern void create_solib_load_event_breakpoint (char *, int, char *, char *);
extern void create_solib_unload_event_breakpoint (char *, int,
-Index: gdb-6.7/gdb/symfile-mem.c
+Index: gdb-6.7.1/gdb/symfile-mem.c
===================================================================
---- gdb-6.7.orig/gdb/symfile-mem.c 2007-08-23 20:08:39.000000000 +0200
-+++ gdb-6.7/gdb/symfile-mem.c 2007-10-13 05:29:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/symfile-mem.c 2007-08-23 20:08:39.000000000 +0200
++++ gdb-6.7.1/gdb/symfile-mem.c 2007-11-02 15:24:19.000000000 +0100
@@ -108,7 +108,7 @@ symbol_file_add_from_memory (struct bfd
}
@@ -145,13 +151,13 @@
/* This might change our ideas about frames already looked at. */
reinit_frame_cache ();
-Index: gdb-6.7/gdb/infrun.c
+Index: gdb-6.7.1/gdb/infrun.c
===================================================================
---- gdb-6.7.orig/gdb/infrun.c 2007-10-13 05:09:50.000000000 +0200
-+++ gdb-6.7/gdb/infrun.c 2007-10-13 05:29:58.000000000 +0200
-@@ -2305,6 +2305,11 @@ process_event_stop_test:
- code segments in shared libraries might be mapped in now. */
- re_enable_breakpoints_in_shlibs ();
+--- gdb-6.7.1.orig/gdb/infrun.c 2007-11-02 15:21:57.000000000 +0100
++++ gdb-6.7.1/gdb/infrun.c 2007-11-02 15:24:19.000000000 +0100
+@@ -2298,6 +2298,11 @@ process_event_stop_test:
+ #endif
+ target_terminal_inferior ();
+ /* For PIE executables, we dont really know where the
+ breakpoints are going to be until we start up the
@@ -161,10 +167,10 @@
/* 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/gdb/objfiles.c
+Index: gdb-6.7.1/gdb/objfiles.c
===================================================================
---- gdb-6.7.orig/gdb/objfiles.c 2007-08-23 20:08:36.000000000 +0200
-+++ gdb-6.7/gdb/objfiles.c 2007-10-13 05:29:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/objfiles.c 2007-08-23 20:08:36.000000000 +0200
++++ gdb-6.7.1/gdb/objfiles.c 2007-11-02 15:24:19.000000000 +0100
@@ -48,6 +48,9 @@
#include "dictionary.h"
#include "source.h"
@@ -196,10 +202,10 @@
}
/* Create the terminating entry of OBJFILE's minimal symbol table.
-Index: gdb-6.7/gdb/solib-svr4.c
+Index: gdb-6.7.1/gdb/solib-svr4.c
===================================================================
---- gdb-6.7.orig/gdb/solib-svr4.c 2007-10-12 22:34:03.000000000 +0200
-+++ gdb-6.7/gdb/solib-svr4.c 2007-10-14 23:04:45.000000000 +0200
+--- gdb-6.7.1.orig/gdb/solib-svr4.c 2007-11-02 15:21:46.000000000 +0100
++++ gdb-6.7.1/gdb/solib-svr4.c 2007-11-02 15:24:19.000000000 +0100
@@ -31,6 +31,8 @@
#include "gdbcore.h"
#include "target.h"
@@ -355,7 +361,7 @@
*ptr = dyn_ptr;
}
return 1;
-@@ -547,6 +638,10 @@ solib_svr4_r_map (void)
+@@ -547,6 +642,10 @@ solib_svr4_r_map (void)
{
struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
@@ -366,7 +372,7 @@
return read_memory_typed_address (debug_base + lmo->r_map_offset,
builtin_type_void_data_ptr);
}
-@@ -704,6 +799,11 @@ svr4_current_sos (void)
+@@ -704,6 +803,11 @@ svr4_current_sos (void)
struct so_list **link_ptr = &head;
CORE_ADDR ldsomap = 0;
@@ -378,7 +384,7 @@
/* Make sure we've looked up the inferior's dynamic linker's base
structure. */
if (! debug_base)
-@@ -713,11 +813,21 @@ svr4_current_sos (void)
+@@ -713,11 +817,21 @@ svr4_current_sos (void)
/* If we can't find the dynamic linker's base structure, this
must not be a dynamically linked executable. Hmm. */
if (! debug_base)
@@ -401,7 +407,7 @@
lm = solib_svr4_r_map ();
while (lm)
-@@ -733,23 +843,103 @@ svr4_current_sos (void)
+@@ -733,23 +847,103 @@ svr4_current_sos (void)
new->lm_info->lm = xzalloc (lmo->link_map_size);
make_cleanup (xfree, new->lm_info->lm);
@@ -506,7 +512,7 @@
target_read_string (LM_NAME (new), &buffer,
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
if (errcode != 0)
-@@ -757,23 +947,35 @@ svr4_current_sos (void)
+@@ -757,23 +951,35 @@ svr4_current_sos (void)
safe_strerror (errcode));
else
{
@@ -558,7 +564,7 @@
}
/* On Solaris, the dynamic linker is not in the normal list of
-@@ -789,6 +991,11 @@ svr4_current_sos (void)
+@@ -789,6 +995,11 @@ svr4_current_sos (void)
if (head == NULL)
return svr4_default_sos ();
@@ -570,7 +576,7 @@
return head;
}
-@@ -868,7 +1075,7 @@ svr4_fetch_objfile_link_map (struct objf
+@@ -868,7 +1079,7 @@ svr4_fetch_objfile_link_map (struct objf
/* On some systems, the only way to recognize the link map entry for
the main executable file is by looking at its name. Return
non-zero iff SONAME matches one of the known main executable names. */
@@ -579,7 +585,7 @@
static int
match_main (char *soname)
{
-@@ -882,6 +1089,7 @@ match_main (char *soname)
+@@ -882,6 +1093,7 @@ match_main (char *soname)
return (0);
}
@@ -587,7 +593,7 @@
/* Return 1 if PC lies in the dynamic symbol resolution code of the
SVR4 run time loader. */
-@@ -979,6 +1187,11 @@ enable_break (void)
+@@ -979,6 +1191,11 @@ enable_break (void)
/* Find the .interp section; if not found, warn the user and drop
into the old breakpoint at symbol code. */
interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
@@ -599,7 +605,7 @@
if (interp_sect)
{
unsigned int interp_sect_size;
-@@ -1018,6 +1231,9 @@ enable_break (void)
+@@ -1018,6 +1235,9 @@ enable_break (void)
if (tmp_fd >= 0)
tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
@@ -609,7 +615,7 @@
if (tmp_bfd == NULL)
goto bkpt_at_symbol;
-@@ -1115,6 +1331,9 @@ enable_break (void)
+@@ -1115,6 +1335,9 @@ enable_break (void)
if (sym_addr != 0)
{
create_solib_event_breakpoint (load_addr + sym_addr);
@@ -619,7 +625,7 @@
return 1;
}
-@@ -1375,6 +1594,8 @@ svr4_solib_create_inferior_hook (void)
+@@ -1375,6 +1598,8 @@ svr4_solib_create_inferior_hook (void)
while (stop_signal != TARGET_SIGNAL_TRAP);
stop_soon = NO_STOP_QUIETLY;
#endif /* defined(_SCO_DS) */
@@ -628,7 +634,7 @@
}
static void
-@@ -1551,6 +1772,75 @@ svr4_lp64_fetch_link_map_offsets (void)
+@@ -1551,6 +1776,75 @@ svr4_lp64_fetch_link_map_offsets (void)
return lmp;
}
@@ -704,7 +710,7 @@
struct target_so_ops svr4_so_ops;
-@@ -1592,4 +1882,8 @@ _initialize_svr4_solib (void)
+@@ -1592,4 +1886,8 @@ _initialize_svr4_solib (void)
/* FIXME: Don't do this here. *_gdbarch_init() should set so_ops. */
current_target_so_ops = &svr4_so_ops;
@@ -713,10 +719,10 @@
+ "Display the inferior's linkmap.");
+
}
-Index: gdb-6.7/gdb/varobj.c
+Index: gdb-6.7.1/gdb/varobj.c
===================================================================
---- gdb-6.7.orig/gdb/varobj.c 2007-08-31 21:01:17.000000000 +0200
-+++ gdb-6.7/gdb/varobj.c 2007-10-13 05:29:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/varobj.c 2007-08-31 21:01:17.000000000 +0200
++++ gdb-6.7.1/gdb/varobj.c 2007-11-02 15:24:19.000000000 +0100
@@ -1116,6 +1116,62 @@ install_new_value (struct varobj *var, s
return changed;
}
@@ -780,10 +786,10 @@
/* 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/gdb/solist.h
+Index: gdb-6.7.1/gdb/solist.h
===================================================================
---- gdb-6.7.orig/gdb/solist.h 2007-08-23 20:08:38.000000000 +0200
-+++ gdb-6.7/gdb/solist.h 2007-10-13 05:29:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/solist.h 2007-08-23 20:08:38.000000000 +0200
++++ gdb-6.7.1/gdb/solist.h 2007-11-02 15:24:19.000000000 +0100
@@ -61,6 +61,8 @@ struct so_list
bfd *abfd;
char symbols_loaded; /* flag: symbols read in yet? */
@@ -816,10 +822,10 @@
+/* Controls the printing of debugging output. */
+extern int debug_solib;
#endif
-Index: gdb-6.7/gdb/varobj.h
+Index: gdb-6.7.1/gdb/varobj.h
===================================================================
---- gdb-6.7.orig/gdb/varobj.h 2007-08-31 20:52:05.000000000 +0200
-+++ gdb-6.7/gdb/varobj.h 2007-10-13 05:29:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/varobj.h 2007-08-31 20:52:05.000000000 +0200
++++ gdb-6.7.1/gdb/varobj.h 2007-11-02 15:24:19.000000000 +0100
@@ -114,4 +114,6 @@ extern int varobj_update (struct varobj
extern void varobj_invalidate (void);
@@ -827,10 +833,10 @@
+extern void varobj_refresh(void);
+
#endif /* VAROBJ_H */
-Index: gdb-6.7/gdb/symfile.c
+Index: gdb-6.7.1/gdb/symfile.c
===================================================================
---- gdb-6.7.orig/gdb/symfile.c 2007-09-24 23:48:05.000000000 +0200
-+++ gdb-6.7/gdb/symfile.c 2007-10-13 05:32:14.000000000 +0200
+--- gdb-6.7.1.orig/gdb/symfile.c 2007-09-24 23:48:05.000000000 +0200
++++ gdb-6.7.1/gdb/symfile.c 2007-11-02 15:24:19.000000000 +0100
@@ -47,6 +47,7 @@
#include "readline/readline.h"
#include "gdb_assert.h"
@@ -918,11 +924,11 @@
observer_notify_new_objfile (NULL);
/* Clear globals which might have pointed into a removed objfile.
-Index: gdb-6.7/gdb/breakpoint.c
+Index: gdb-6.7.1/gdb/breakpoint.c
===================================================================
---- gdb-6.7.orig/gdb/breakpoint.c 2007-10-13 05:27:15.000000000 +0200
-+++ gdb-6.7/gdb/breakpoint.c 2007-10-13 05:29:58.000000000 +0200
-@@ -840,15 +840,15 @@ insert_watchpoints_for_new_thread (ptid_
+--- gdb-6.7.1.orig/gdb/breakpoint.c 2007-11-02 15:24:10.000000000 +0100
++++ gdb-6.7.1/gdb/breakpoint.c 2007-11-02 15:26:50.000000000 +0100
+@@ -847,15 +847,15 @@ insert_watchpoints_for_new_thread (ptid_
struct value *v = b->owner->val_chain;
/* Look at each value on the value chain. */
@@ -941,7 +947,7 @@
/* We only watch structs and arrays if user asked
for it explicitly, never if they just happen to
-@@ -860,8 +860,8 @@ insert_watchpoints_for_new_thread (ptid_
+@@ -867,8 +867,8 @@ insert_watchpoints_for_new_thread (ptid_
CORE_ADDR addr;
int len, type;
@@ -952,7 +958,7 @@
type = hw_write;
if (b->owner->type == bp_read_watchpoint)
type = hw_read;
-@@ -2749,12 +2749,12 @@ mark_triggered_watchpoints (CORE_ADDR st
+@@ -2767,12 +2767,12 @@ mark_triggered_watchpoints (CORE_ADDR st
|| b->type == bp_read_watchpoint
|| b->type == bp_access_watchpoint)
{
@@ -968,7 +974,7 @@
if (v == b->val_chain
|| (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
-@@ -2762,11 +2762,11 @@ mark_triggered_watchpoints (CORE_ADDR st
+@@ -2780,11 +2780,11 @@ mark_triggered_watchpoints (CORE_ADDR st
{
CORE_ADDR vaddr;
@@ -982,7 +988,7 @@
b->watchpoint_triggered = 1;
}
}
-@@ -2936,12 +2936,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+@@ -2957,12 +2957,12 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
bs->stop = 0;
continue;
}
@@ -998,7 +1004,7 @@
if (v == b->val_chain
|| (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
-@@ -2949,11 +2949,11 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+@@ -2970,11 +2970,11 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
{
CORE_ADDR vaddr;
@@ -1012,15 +1018,17 @@
must_check_value = 1;
}
}
-@@ -3996,6 +3996,7 @@ describe_other_breakpoints (CORE_ADDR pc
- printf_filtered ("%s%s ",
- ((b->enable_state == bp_disabled ||
- b->enable_state == bp_shlib_disabled ||
-+ b->enable_state == bp_startup_disabled ||
- b->enable_state == bp_call_disabled)
- ? " (disabled)"
- : b->enable_state == bp_permanent
-@@ -4669,6 +4670,62 @@ re_enable_breakpoints_in_shlibs (void)
+@@ -4118,7 +4118,8 @@ describe_other_breakpoints (CORE_ADDR pc
+ printf_filtered (" (thread %d)", b->thread);
+ printf_filtered ("%s%s ",
+ ((b->enable_state == bp_disabled ||
+- b->enable_state == bp_call_disabled)
++ b->enable_state == bp_call_disabled ||
++ b->enable_state == bp_startup_disabled)
+ ? " (disabled)"
+ : b->enable_state == bp_permanent
+ ? " (permanent)"
+@@ -4773,6 +4774,62 @@ disable_breakpoints_in_unloaded_shlib (s
}
}
@@ -1083,28 +1091,10 @@
static void
solib_load_unload_1 (char *hookname, int tempflag, char *dll_pathname,
char *cond_string, enum bptype bp_kind)
-@@ -7084,6 +7141,7 @@ delete_breakpoint (struct breakpoint *bp
- && !b->loc->duplicate
- && b->enable_state != bp_disabled
- && b->enable_state != bp_shlib_disabled
-+ && b->enable_state != bp_startup_disabled
- && !b->pending
- && b->enable_state != bp_call_disabled)
- {
-@@ -7308,7 +7366,8 @@ breakpoint_re_set_one (void *bint)
- break;
-
- save_enable = b->enable_state;
-- if (b->enable_state != bp_shlib_disabled)
-+ if (b->enable_state != bp_shlib_disabled
-+ || b->enable_state != bp_shlib_disabled)
- b->enable_state = bp_disabled;
- else
- /* If resetting a shlib-disabled breakpoint, we don't want to
-Index: gdb-6.7/gdb/solib.c
+Index: gdb-6.7.1/gdb/solib.c
===================================================================
---- gdb-6.7.orig/gdb/solib.c 2007-08-23 20:08:38.000000000 +0200
-+++ gdb-6.7/gdb/solib.c 2007-10-13 05:32:46.000000000 +0200
+--- gdb-6.7.1.orig/gdb/solib.c 2007-08-23 20:08:38.000000000 +0200
++++ gdb-6.7.1/gdb/solib.c 2007-11-02 15:24:19.000000000 +0100
@@ -78,6 +78,8 @@ set_solib_ops (struct gdbarch *gdbarch,
/* external data declarations */
@@ -1279,10 +1269,10 @@
+ NULL, NULL,
+ &setdebuglist, &showdebuglist);
}
-Index: gdb-6.7/gdb/elfread.c
+Index: gdb-6.7.1/gdb/elfread.c
===================================================================
---- gdb-6.7.orig/gdb/elfread.c 2007-08-23 20:08:28.000000000 +0200
-+++ gdb-6.7/gdb/elfread.c 2007-10-13 05:29:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/elfread.c 2007-08-23 20:08:28.000000000 +0200
++++ gdb-6.7.1/gdb/elfread.c 2007-11-02 15:24:19.000000000 +0100
@@ -611,7 +611,7 @@ elf_symfile_read (struct objfile *objfil
/* If we are reinitializing, or if we have never loaded syms yet,
set table to empty. MAINLINE is cleared so that *_read_psymtab
@@ -1292,15 +1282,11 @@
{
init_psymbol_list (objfile, 0);
mainline = 0;
-
-2007-10-31 Jan Kratochvil <jan.kratochvil at redhat.com>
-
- Port to GDB-6.7 - workaround too early breakpoint address analysis.
-
-diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7-orig/gdb/Makefile.in gdb-6.7-patched/gdb/Makefile.in
---- gdb-6.7-orig/gdb/Makefile.in 2007-10-31 12:50:10.000000000 +0100
-+++ gdb-6.7-patched/gdb/Makefile.in 2007-10-31 00:38:11.000000000 +0100
-@@ -1824,7 +1824,7 @@ amd64-tdep.o: amd64-tdep.c $(defs_h) $(a
+Index: gdb-6.7.1/gdb/Makefile.in
+===================================================================
+--- gdb-6.7.1.orig/gdb/Makefile.in 2007-11-02 15:24:10.000000000 +0100
++++ gdb-6.7.1/gdb/Makefile.in 2007-11-02 15:24:19.000000000 +0100
+@@ -1819,7 +1819,7 @@ amd64-tdep.o: amd64-tdep.c $(defs_h) $(a
$(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) \
@@ -1309,9 +1295,10 @@
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) \
-diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7-orig/gdb/amd64-tdep.c gdb-6.7-patched/gdb/amd64-tdep.c
---- gdb-6.7-orig/gdb/amd64-tdep.c 2007-10-31 12:50:09.000000000 +0100
-+++ gdb-6.7-patched/gdb/amd64-tdep.c 2007-10-31 00:46:13.000000000 +0100
+Index: gdb-6.7.1/gdb/amd64-tdep.c
+===================================================================
+--- gdb-6.7.1.orig/gdb/amd64-tdep.c 2007-11-02 15:21:46.000000000 +0100
++++ gdb-6.7.1/gdb/amd64-tdep.c 2007-11-02 15:24:19.000000000 +0100
@@ -36,6 +36,7 @@
#include "symfile.h"
#include "dwarf2-frame.h"
gdb-6.3-test-pie-20050107.patch:
Index: gdb-6.3-test-pie-20050107.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-test-pie-20050107.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.3-test-pie-20050107.patch 1 Nov 2007 20:24:20 -0000 1.3
+++ gdb-6.3-test-pie-20050107.patch 3 Nov 2007 19:10:29 -0000 1.4
@@ -2,6 +2,10 @@
Port to GDB-6.7.
+2007-11-02 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ Port to post-GDB-6.7.1 multi-PC breakpoints.
+
Index: gdb-6.7/gdb/testsuite/configure.ac
===================================================================
--- gdb-6.7.orig/gdb/testsuite/configure.ac 2007-08-23 19:58:44.000000000 +0200
@@ -1059,7 +1063,7 @@
+set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
+
+gdb_test "info break" \
-+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
++ "Num\[\t \]+Type\[\t \]+Disp\[\t \]+Enb\[\t \]+Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile1:($bp_location8|$bp_location9).*
+\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:$bp_location7.*
@@ -1189,7 +1193,7 @@
+#
+# check to see what breakpoints are set (temporary this time)
+#
-+gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
++gdb_test "info break" "Num\[\t \]+Type.*Disp\[\t \]+Enb\[\t \]+Address.*What.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:$bp_location7.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location1.*\[\r\n\]
gdb-6.3-threaded-watchpoints-20041213.patch:
Index: gdb-6.3-threaded-watchpoints-20041213.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-threaded-watchpoints-20041213.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gdb-6.3-threaded-watchpoints-20041213.patch 1 Nov 2007 20:24:20 -0000 1.7
+++ gdb-6.3-threaded-watchpoints-20041213.patch 3 Nov 2007 19:10:29 -0000 1.8
@@ -32,10 +32,14 @@
Port to GDB-6.7.
-Index: gdb-6.7/gdb/doc/observer.texi
+2007-11-02 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ Port to post-GDB-6.7.1 multi-PC breakpoints.
+
+Index: gdb-6.7.1/gdb/doc/observer.texi
===================================================================
---- gdb-6.7.orig/gdb/doc/observer.texi 2007-05-11 21:55:20.000000000 +0200
-+++ gdb-6.7/gdb/doc/observer.texi 2007-10-13 04:51:21.000000000 +0200
+--- gdb-6.7.1.orig/gdb/doc/observer.texi 2007-05-11 21:55:20.000000000 +0200
++++ gdb-6.7.1/gdb/doc/observer.texi 2007-11-02 15:21:57.000000000 +0100
@@ -129,3 +129,12 @@ Called with @var{objfile} equal to @code
previously loaded symbol table data has now been invalidated.
@end deftypefun
@@ -49,11 +53,11 @@
+A low-level SIGTRAP has been discovered. This notification can be used to save
+additional state necessary if the trap is deferred for later handling.
+ at end deftypefun
-Index: gdb-6.7/gdb/infrun.c
+Index: gdb-6.7.1/gdb/infrun.c
===================================================================
---- gdb-6.7.orig/gdb/infrun.c 2007-10-12 22:35:58.000000000 +0200
-+++ gdb-6.7/gdb/infrun.c 2007-10-13 04:50:11.000000000 +0200
-@@ -1784,9 +1784,19 @@ handle_inferior_event (struct execution_
+--- gdb-6.7.1.orig/gdb/infrun.c 2007-11-02 15:21:46.000000000 +0100
++++ gdb-6.7.1/gdb/infrun.c 2007-11-02 15:21:57.000000000 +0100
+@@ -1781,9 +1781,19 @@ handle_inferior_event (struct execution_
single step over a watchpoint without disabling the watchpoint. */
if (HAVE_STEPPABLE_WATCHPOINT && STOPPED_BY_WATCHPOINT (ecs->ws))
{
@@ -74,7 +78,7 @@
prepare_to_wait (ecs);
return;
}
-@@ -1797,6 +1807,8 @@ handle_inferior_event (struct execution_
+@@ -1794,6 +1804,8 @@ handle_inferior_event (struct execution_
if (gdbarch_have_nonsteppable_watchpoint (current_gdbarch)
&& STOPPED_BY_WATCHPOINT (ecs->ws))
{
@@ -83,7 +87,7 @@
/* At this point, we are stopped at an instruction which has
attempted to write to a piece of memory under control of
a watchpoint. The instruction hasn't actually executed
-@@ -1804,15 +1816,12 @@ handle_inferior_event (struct execution_
+@@ -1801,15 +1813,12 @@ handle_inferior_event (struct execution_
now, we would get the old value, and therefore no change
would seem to have occurred.
@@ -105,7 +109,7 @@
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: STOPPED_BY_WATCHPOINT\n");
-@@ -1883,6 +1892,41 @@ handle_inferior_event (struct execution_
+@@ -1880,6 +1889,41 @@ handle_inferior_event (struct execution_
}
}
@@ -147,7 +151,7 @@
/* Look at the cause of the stop, and decide what to do.
The alternatives are:
1) break; to really stop and return to the debugger,
-@@ -1935,6 +1979,8 @@ handle_inferior_event (struct execution_
+@@ -1932,6 +1976,8 @@ handle_inferior_event (struct execution_
See more comments in inferior.h. */
if (stop_soon == STOP_QUIETLY_NO_SIGSTOP)
{
@@ -156,11 +160,11 @@
stop_stepping (ecs);
if (stop_signal == TARGET_SIGNAL_STOP)
stop_signal = TARGET_SIGNAL_0;
-Index: gdb-6.7/gdb/breakpoint.c
+Index: gdb-6.7.1/gdb/breakpoint.c
===================================================================
---- gdb-6.7.orig/gdb/breakpoint.c 2007-08-30 00:07:47.000000000 +0200
-+++ gdb-6.7/gdb/breakpoint.c 2007-10-13 04:50:11.000000000 +0200
-@@ -806,6 +806,90 @@ insert_catchpoint (struct ui_out *uo, vo
+--- gdb-6.7.1.orig/gdb/breakpoint.c 2007-11-02 15:21:45.000000000 +0100
++++ gdb-6.7.1/gdb/breakpoint.c 2007-11-02 15:23:04.000000000 +0100
+@@ -813,6 +813,90 @@ insert_catchpoint (struct ui_out *uo, vo
}
}
@@ -251,7 +255,7 @@
/* Helper routine: free the value chain for a breakpoint (watchpoint). */
static void
-@@ -1294,6 +1378,7 @@ remove_breakpoints (void)
+@@ -1301,6 +1385,7 @@ remove_breakpoints (void)
{
struct bp_location *b;
int val;
@@ -259,7 +263,7 @@
ALL_BP_LOCATIONS (b)
{
-@@ -1301,10 +1386,10 @@ remove_breakpoints (void)
+@@ -1308,10 +1393,10 @@ remove_breakpoints (void)
{
val = remove_breakpoint (b, mark_uninserted);
if (val != 0)
@@ -272,7 +276,7 @@
}
int
-@@ -2187,8 +2272,13 @@ print_it_typical (bpstat bs)
+@@ -2200,8 +2285,13 @@ print_it_typical (bpstat bs)
break;
case bp_thread_event:
@@ -288,7 +292,7 @@
printf_filtered (_("Thread Event Breakpoint: gdb should not stop!\n"));
return PRINT_NOTHING;
break;
-@@ -2636,6 +2726,54 @@ which its expression is valid.\n");
+@@ -2654,6 +2744,54 @@ which its expression is valid.\n");
}
}
@@ -343,7 +347,7 @@
/* Get a bpstat associated with having just stopped at address
BP_ADDR in thread PTID. STOPPED_BY_WATCHPOINT is 1 if the
target thinks we stopped due to a hardware watchpoint, 0 if we
-@@ -2766,82 +2904,61 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+@@ -2787,82 +2925,61 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
bs->stop = 1;
bs->print = 1;
@@ -471,7 +475,7 @@
{
char *message = xstrprintf ("Error evaluating expression for watchpoint %d\n",
b->number);
-@@ -2870,6 +2987,15 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+@@ -2891,6 +3008,15 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
break;
case WP_VALUE_NOT_CHANGED:
/* Stop. */
@@ -487,7 +491,7 @@
++(b->hit_count);
break;
default:
-@@ -2885,7 +3011,7 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
+@@ -2906,7 +3032,7 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
break;
}
}
@@ -496,22 +500,22 @@
{
/* This is a case where some watchpoint(s) triggered,
but not at the address of this watchpoint (FOUND
-@@ -4186,6 +4312,7 @@ set_raw_breakpoint (struct symtab_and_li
+@@ -4292,6 +4418,7 @@ set_raw_breakpoint_without_location (enu
b->exec_pathname = NULL;
b->ops = NULL;
- b->pending = 0;
+ b->condition_not_parsed = 0;
+ b->watchpoint_triggered = 0;
/* Add this breakpoint to the end of the chain
so that a list of breakpoints will come out in order
-Index: gdb-6.7/gdb/breakpoint.h
+Index: gdb-6.7.1/gdb/breakpoint.h
===================================================================
---- gdb-6.7.orig/gdb/breakpoint.h 2007-08-23 20:08:26.000000000 +0200
-+++ gdb-6.7/gdb/breakpoint.h 2007-10-13 04:50:11.000000000 +0200
-@@ -420,6 +420,11 @@ struct breakpoint
-
- /* Is breakpoint pending on shlib loads? */
- int pending;
+--- gdb-6.7.1.orig/gdb/breakpoint.h 2007-11-02 15:21:45.000000000 +0100
++++ gdb-6.7.1/gdb/breakpoint.h 2007-11-02 15:22:24.000000000 +0100
+@@ -439,6 +439,11 @@ struct breakpoint
+ no location initially so had no context to parse
+ the condition in. */
+ int condition_not_parsed;
+
+ /* Has a watchpoint been triggered? This is only used for
+ non-continuable watchpoints which trigger prior to the data
@@ -520,7 +524,7 @@
};
/* The following stuff is an abstract data type "bpstat" ("breakpoint
-@@ -688,6 +693,14 @@ extern void tbreak_command (char *, int)
+@@ -707,6 +712,14 @@ extern void tbreak_command (char *, int)
extern int insert_breakpoints (void);
@@ -535,10 +539,10 @@
extern int remove_breakpoints (void);
/* This function can be used to physically insert eventpoints from the
-Index: gdb-6.7/gdb/linux-nat.c
+Index: gdb-6.7.1/gdb/linux-nat.c
===================================================================
---- gdb-6.7.orig/gdb/linux-nat.c 2007-10-12 22:35:58.000000000 +0200
-+++ gdb-6.7/gdb/linux-nat.c 2007-10-13 04:50:11.000000000 +0200
+--- gdb-6.7.1.orig/gdb/linux-nat.c 2007-11-02 15:21:46.000000000 +0100
++++ gdb-6.7.1/gdb/linux-nat.c 2007-11-02 15:21:57.000000000 +0100
@@ -34,6 +34,7 @@
#include "gdbthread.h"
#include "gdbcmd.h"
@@ -586,10 +590,10 @@
/* Handle GNU/Linux's extended waitstatus for trace events. */
if (WIFSTOPPED (status) && WSTOPSIG (status) == SIGTRAP && status >> 16 != 0)
{
-Index: gdb-6.7/gdb/linux-nat.h
+Index: gdb-6.7.1/gdb/linux-nat.h
===================================================================
---- gdb-6.7.orig/gdb/linux-nat.h 2007-10-12 22:35:58.000000000 +0200
-+++ gdb-6.7/gdb/linux-nat.h 2007-10-13 04:50:11.000000000 +0200
+--- gdb-6.7.1.orig/gdb/linux-nat.h 2007-11-02 15:21:46.000000000 +0100
++++ gdb-6.7.1/gdb/linux-nat.h 2007-11-02 15:21:57.000000000 +0100
@@ -61,6 +61,18 @@ struct lwp_info
/* Next LWP in list. */
@@ -609,10 +613,10 @@
};
/* Attempt to initialize libthread_db. */
-Index: gdb-6.7/gdb/Makefile.in
+Index: gdb-6.7.1/gdb/Makefile.in
===================================================================
---- gdb-6.7.orig/gdb/Makefile.in 2007-09-05 02:14:02.000000000 +0200
-+++ gdb-6.7/gdb/Makefile.in 2007-10-13 04:50:53.000000000 +0200
+--- gdb-6.7.1.orig/gdb/Makefile.in 2007-09-05 02:14:02.000000000 +0200
++++ gdb-6.7.1/gdb/Makefile.in 2007-11-02 15:21:57.000000000 +0100
@@ -2160,7 +2160,7 @@ i387-tdep.o: i387-tdep.c $(defs_h) $(dou
$(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h)
ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \
@@ -631,10 +635,10 @@
s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \
$(floatformat_h) $(regcache_h) $(trad_frame_h) $(frame_base_h) \
-Index: gdb-6.7/gdb/linux-thread-db.c
+Index: gdb-6.7.1/gdb/linux-thread-db.c
===================================================================
---- gdb-6.7.orig/gdb/linux-thread-db.c 2007-08-23 20:08:35.000000000 +0200
-+++ gdb-6.7/gdb/linux-thread-db.c 2007-10-13 04:53:59.000000000 +0200
+--- gdb-6.7.1.orig/gdb/linux-thread-db.c 2007-08-23 20:08:35.000000000 +0200
++++ gdb-6.7.1/gdb/linux-thread-db.c 2007-11-02 15:21:57.000000000 +0100
@@ -34,6 +34,7 @@
#include "target.h"
#include "regcache.h"
@@ -685,10 +689,10 @@
/* Check for a thread event. */
check_event (ptid);
-Index: gdb-6.7/gdb/i386-linux-nat.c
+Index: gdb-6.7.1/gdb/i386-linux-nat.c
===================================================================
---- gdb-6.7.orig/gdb/i386-linux-nat.c 2007-08-23 20:08:34.000000000 +0200
-+++ gdb-6.7/gdb/i386-linux-nat.c 2007-10-13 04:50:11.000000000 +0200
+--- gdb-6.7.1.orig/gdb/i386-linux-nat.c 2007-08-23 20:08:34.000000000 +0200
++++ gdb-6.7.1/gdb/i386-linux-nat.c 2007-11-02 15:21:57.000000000 +0100
@@ -585,10 +585,9 @@ i386_linux_dr_get (int regnum)
int tid;
unsigned long value;
@@ -717,10 +721,10 @@
errno = 0;
ptrace (PTRACE_POKEUSER, tid,
-Index: gdb-6.7/gdb/ia64-linux-nat.c
+Index: gdb-6.7.1/gdb/ia64-linux-nat.c
===================================================================
---- gdb-6.7.orig/gdb/ia64-linux-nat.c 2007-08-23 20:08:35.000000000 +0200
-+++ gdb-6.7/gdb/ia64-linux-nat.c 2007-10-13 05:07:58.000000000 +0200
+--- gdb-6.7.1.orig/gdb/ia64-linux-nat.c 2007-08-23 20:08:35.000000000 +0200
++++ gdb-6.7.1/gdb/ia64-linux-nat.c 2007-11-02 15:21:57.000000000 +0100
@@ -27,6 +27,7 @@
#include "regcache.h"
#include "ia64-tdep.h"
@@ -912,10 +916,10 @@
+ observer_attach_linux_new_thread (ia64_linux_new_thread);
+ observer_attach_sigtrap (ia64_linux_save_sigtrap_info);
}
-Index: gdb-6.7/gdb/amd64-linux-nat.c
+Index: gdb-6.7.1/gdb/amd64-linux-nat.c
===================================================================
---- gdb-6.7.orig/gdb/amd64-linux-nat.c 2007-08-23 20:08:26.000000000 +0200
-+++ gdb-6.7/gdb/amd64-linux-nat.c 2007-10-13 04:50:11.000000000 +0200
+--- gdb-6.7.1.orig/gdb/amd64-linux-nat.c 2007-08-23 20:08:26.000000000 +0200
++++ gdb-6.7.1/gdb/amd64-linux-nat.c 2007-11-02 15:21:57.000000000 +0100
@@ -240,10 +240,9 @@ amd64_linux_dr_get (int regnum)
int tid;
unsigned long value;
@@ -944,10 +948,10 @@
errno = 0;
ptrace (PT_WRITE_U, tid, offsetof (struct user, u_debugreg[regnum]), value);
-Index: gdb-6.7/gdb/s390-nat.c
+Index: gdb-6.7.1/gdb/s390-nat.c
===================================================================
---- gdb-6.7.orig/gdb/s390-nat.c 2007-08-23 20:08:37.000000000 +0200
-+++ gdb-6.7/gdb/s390-nat.c 2007-10-13 04:50:11.000000000 +0200
+--- gdb-6.7.1.orig/gdb/s390-nat.c 2007-08-23 20:08:37.000000000 +0200
++++ gdb-6.7.1/gdb/s390-nat.c 2007-11-02 15:21:57.000000000 +0100
@@ -27,6 +27,7 @@
#include "linux-nat.h"
gdb-6.7.1-upstream.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 gdb-6.7.1-upstream.patch
Index: gdb-6.7.1-upstream.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.7.1-upstream.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.7.1-upstream.patch 1 Nov 2007 22:28:37 -0000 1.1
+++ gdb-6.7.1-upstream.patch 3 Nov 2007 19:10:29 -0000 1.2
@@ -66,3 +66,5087 @@
{ "stfqu", OP(61), OP_MASK, POWER2, { FRS, D, RA } },
{ "stfdp", OP(61), OP_MASK, POWER6, { FRT, D, RA0 } },
+
+
+
+2007-09-22 Vladimir Prus <vladimir at codesourcery.com>
+
+ Associate bp_stat with bp_location, not breakpoint.
+ * breakpoint.h (breakpoint_at): Change type
+ to bp_location*.
+ * breakpoint.c (bpstat_alloc): Take bp_location,
+ not breakpoint.
+ (bpstat_find_breakpoint): Look at bpstat's location's
+ owner, not at bpstat->breakpoint_at.
+ (bpstat_find_step_resume_breakpoint): Likewise.
+ (bpstat_num): Likewise.
+ (print_it_typical): Likewise.
+ (print_bp_stop_message): Likewise.
+ (watchpoint_check): Likewise.
+ (bpstat_what): Likewise.
+ (bpstat_get_triggered_catchpoints): Likewise.
+ (breakpoint_auto_delete): Likewise.
+ (delete_breakpoint): Likewise.
+ (bpstat_stop_status): Pass location, not breakpoint,
+ to bpstat_alloc. Look at bpstat's location's
+ owner, not at bpstat->breakpoint_at.
+
+===================================================================
+RCS file: /cvs/src/src/gdb/breakpoint.c,v
+retrieving revision 1.263
+retrieving revision 1.264
+diff -u -r1.263 -r1.264
+--- src/gdb/breakpoint.c 2007/08/29 22:07:47 1.263
++++ src/gdb/breakpoint.c 2007/09/22 17:49:40 1.264
+@@ -109,7 +109,7 @@
+
+ static void breakpoint_1 (int, int);
+
+-static bpstat bpstat_alloc (struct breakpoint *, bpstat);
++static bpstat bpstat_alloc (struct bp_location *, bpstat);
+
+ static int breakpoint_cond_eval (void *);
+
+@@ -1968,7 +1968,7 @@
+
+ for (; bsp != NULL; bsp = bsp->next)
+ {
+- if (bsp->breakpoint_at == breakpoint)
++ if (bsp->breakpoint_at && bsp->breakpoint_at->owner == breakpoint)
+ return bsp;
+ }
+ return NULL;
+@@ -1994,10 +1994,10 @@
+ for (; bsp != NULL; bsp = bsp->next)
+ {
+ if ((bsp->breakpoint_at != NULL) &&
+- (bsp->breakpoint_at->type == bp_step_resume) &&
+- (bsp->breakpoint_at->thread == current_thread ||
+- bsp->breakpoint_at->thread == -1))
+- return bsp->breakpoint_at;
++ (bsp->breakpoint_at->owner->type == bp_step_resume) &&
++ (bsp->breakpoint_at->owner->thread == current_thread ||
++ bsp->breakpoint_at->owner->thread == -1))
++ return bsp->breakpoint_at->owner;
+ }
+
+ internal_error (__FILE__, __LINE__, _("No step_resume breakpoint found."));
+@@ -2021,7 +2021,11 @@
+ if ((*bsp) == NULL)
+ return 0; /* No more breakpoint values */
+
+- b = (*bsp)->breakpoint_at;
++ /* We assume we'll never have several bpstats that
++ correspond to a single breakpoint -- otherwise,
++ this function might return the same number more
++ than once and this will look ugly. */
++ b = (*bsp)->breakpoint_at ? (*bsp)->breakpoint_at->owner : NULL;
+ *bsp = (*bsp)->next;
+ if (b == NULL)
+ return -1; /* breakpoint that's been deleted since */
+@@ -2152,6 +2156,7 @@
+ print_it_typical (bpstat bs)
+ {
+ struct cleanup *old_chain, *ui_out_chain;
++ struct breakpoint *b;
+ struct ui_stream *stb;
+ stb = ui_out_stream_new (uiout);
+ old_chain = make_cleanup_ui_out_stream_delete (stb);
+@@ -2159,21 +2164,22 @@
+ which has since been deleted. */
+ if (bs->breakpoint_at == NULL)
+ return PRINT_UNKNOWN;
++ b = bs->breakpoint_at->owner;
+
+- switch (bs->breakpoint_at->type)
++ switch (b->type)
+ {
+ case bp_breakpoint:
+ case bp_hardware_breakpoint:
+- if (bs->breakpoint_at->loc->address != bs->breakpoint_at->loc->requested_address)
+- breakpoint_adjustment_warning (bs->breakpoint_at->loc->requested_address,
+- bs->breakpoint_at->loc->address,
+- bs->breakpoint_at->number, 1);
+- annotate_breakpoint (bs->breakpoint_at->number);
++ if (b->loc->address != b->loc->requested_address)
++ breakpoint_adjustment_warning (b->loc->requested_address,
++ b->loc->address,
++ b->number, 1);
++ annotate_breakpoint (b->number);
+ ui_out_text (uiout, "\nBreakpoint ");
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "reason",
+ async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
+- ui_out_field_int (uiout, "bkptno", bs->breakpoint_at->number);
++ ui_out_field_int (uiout, "bkptno", b->number);
+ ui_out_text (uiout, ", ");
+ return PRINT_SRC_AND_LOC;
+ break;
+@@ -2200,42 +2206,42 @@
+ break;
+
+ case bp_catch_load:
+- annotate_catchpoint (bs->breakpoint_at->number);
++ annotate_catchpoint (b->number);
+ printf_filtered (_("\nCatchpoint %d (loaded %s), "),
+- bs->breakpoint_at->number,
+- bs->breakpoint_at->triggered_dll_pathname);
++ b->number,
++ b->triggered_dll_pathname);
+ return PRINT_SRC_AND_LOC;
+ break;
+
+ case bp_catch_unload:
+- annotate_catchpoint (bs->breakpoint_at->number);
++ annotate_catchpoint (b->number);
+ printf_filtered (_("\nCatchpoint %d (unloaded %s), "),
+- bs->breakpoint_at->number,
+- bs->breakpoint_at->triggered_dll_pathname);
++ b->number,
++ b->triggered_dll_pathname);
+ return PRINT_SRC_AND_LOC;
+ break;
+
+ case bp_catch_fork:
+- annotate_catchpoint (bs->breakpoint_at->number);
++ annotate_catchpoint (b->number);
+ printf_filtered (_("\nCatchpoint %d (forked process %d), "),
+- bs->breakpoint_at->number,
+- bs->breakpoint_at->forked_inferior_pid);
++ b->number,
++ b->forked_inferior_pid);
+ return PRINT_SRC_AND_LOC;
+ break;
+
+ case bp_catch_vfork:
+- annotate_catchpoint (bs->breakpoint_at->number);
++ annotate_catchpoint (b->number);
+ printf_filtered (_("\nCatchpoint %d (vforked process %d), "),
+- bs->breakpoint_at->number,
+- bs->breakpoint_at->forked_inferior_pid);
++ b->number,
++ b->forked_inferior_pid);
+ return PRINT_SRC_AND_LOC;
+ break;
+
+ case bp_catch_exec:
+- annotate_catchpoint (bs->breakpoint_at->number);
++ annotate_catchpoint (b->number);
+ printf_filtered (_("\nCatchpoint %d (exec'd %s), "),
+- bs->breakpoint_at->number,
+- bs->breakpoint_at->exec_pathname);
++ b->number,
++ b->exec_pathname);
+ return PRINT_SRC_AND_LOC;
+ break;
+
+@@ -2243,9 +2249,9 @@
+ if (current_exception_event &&
+ (CURRENT_EXCEPTION_KIND == EX_EVENT_CATCH))
+ {
+- annotate_catchpoint (bs->breakpoint_at->number);
++ annotate_catchpoint (b->number);
+ printf_filtered (_("\nCatchpoint %d (exception caught), "),
+- bs->breakpoint_at->number);
++ b->number);
+ if (CURRENT_EXCEPTION_THROW_PC && CURRENT_EXCEPTION_THROW_LINE)
+ printf_filtered (_("throw location %s:%d, "),
+ CURRENT_EXCEPTION_THROW_FILE,
+@@ -2274,9 +2280,9 @@
+ if (current_exception_event &&
[...4696 lines suppressed...]
+retrieving revision 1.239
+retrieving revision 1.240
+diff -u -r1.239 -r1.240
+--- src/gdb/NEWS 2007/09/17 19:30:05 1.239
++++ src/gdb/NEWS 2007/09/28 06:24:20 1.240
+@@ -3,6 +3,13 @@
+
+ *** Changes since GDB 6.7
+
++* Pending breakpoints no longer change their number when their address
++ is resolved.
++
++* GDB now supports breakpoints with multiple locations,
++ including breakpoints on C++ constructors, inside C++ templates,
++ and in inlined functions.
++
+ *** Changes in GDB 6.6
+
+ * Resolved 101 resource leaks, null pointer dereferences, etc. in gdb,
+
+2007-09-28 Vladimir Prus <vladimir at codesourcery.com>
+
+ * gdb.texinfo (Setting Breakpoints): Revise
+ documentation for pending breakpoints. Document
+ breakpoints with multiple locations.
+
+===================================================================
+RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
+retrieving revision 1.432
+retrieving revision 1.433
+diff -u -r1.432 -r1.433
+--- src/gdb/doc/gdb.texinfo 2007/09/16 14:59:30 1.432
++++ src/gdb/doc/gdb.texinfo 2007/09/28 06:24:20 1.433
+@@ -2991,11 +2991,17 @@
+ Whether the breakpoint is marked to be disabled or deleted when hit.
+ @item Enabled or Disabled
+ Enabled breakpoints are marked with @samp{y}. @samp{n} marks breakpoints
+-that are not enabled.
++that are not enabled. An optional @samp{(p)} suffix marks pending
++breakpoints --- breakpoints for which address is either not yet
++resolved, pending load of a shared library, or for which address was
++in a shared library that was since unloaded. Such breakpoint won't
++fire until a shared library that has the symbol or line referred by
++breakpoint is loaded. See below for details.
+ @item Address
+-Where the breakpoint is in your program, as a memory address. If the
+-breakpoint is pending (see below for details) on a future load of a shared library, the address
+-will be listed as @samp{<PENDING>}.
++Where the breakpoint is in your program, as a memory address. For a
++pending breakpoint whose address is not yet known, this field will
++contain @samp{<PENDING>}. A breakpoint with several locations will
++have @samp{<MULTIPLE>} in this field --- see below for details.
+ @item What
+ Where the breakpoint is in the source for your program, as a file and
+ line number. For a pending breakpoint, the original string passed to
+@@ -3032,23 +3038,83 @@
+ the breakpoints are conditional, this is even useful
+ (@pxref{Conditions, ,Break Conditions}).
+
+- at cindex pending breakpoints
+-If a specified breakpoint location cannot be found, it may be due to the fact
+-that the location is in a shared library that is yet to be loaded. In such
+-a case, you may want @value{GDBN} to create a special breakpoint (known as
+-a @dfn{pending breakpoint}) that
+-attempts to resolve itself in the future when an appropriate shared library
+-gets loaded.
+-
+-Pending breakpoints are useful to set at the start of your
+- at value{GDBN} session for locations that you know will be dynamically loaded
+-later by the program being debugged. When shared libraries are loaded,
+-a check is made to see if the load resolves any pending breakpoint locations.
+-If a pending breakpoint location gets resolved,
+-a regular breakpoint is created and the original pending breakpoint is removed.
++It is possible that a breakpoint correspond to several locations
++in your program. Examples of this situation are:
++
++ at itemize @bullet
++
++ at item
++For a C at t{++} constructor, the @value{NGCC} compiler generates several
++instances of the function body, used in different cases.
+
+- at value{GDBN} provides some additional commands for controlling pending
+-breakpoint support:
++ at item
++For a C at t{++} template function, a given line in the function can
++correspond to any number of instantiations.
++
++ at item
++For an inlined function, a given source line can correspond to
++several places where that function is inlined.
++
++ at end itemize
++
++In all those cases, @value{GDBN} will insert a breakpoint at all
++the relevant locations.
++
++A breakpoint with multiple locations is displayed in the
++breakpoint table using several rows --- one header row, followed
++by one row for each breakpoint location. The header row
++has @samp{<MULTIPLE>} in the address column. The rows for
++individual locations contain the actual addresses for locations,
++and say what functions those locations are in. The number
++column for a location has number in the format
++ at var{breakpoint-number}. at var{location-number}.
++
++For example:
++ at smallexample
++Num Type Disp Enb Address What
++1 breakpoint keep y <MULTIPLE>
++ stop only if i==1
++ breakpoint already hit 1 time
++1.1 y 0x080486a2 in void foo<int>() at t.cc:8
++1.2 y 0x080486ca in void foo<double>() at t.cc:8
++ at end smallexample
++
++Each location can be individually enabled or disabled by passing
++ at var{breakpoint-number}. at var{location-number} as argument to the
++ at code{enable} and @code{disable} commands.
++
++ at cindex pending breakpoints
++It's quite common to have a breakpoint inside a shared library.
++The shared library may be loaded and unloaded explicitly,
++and possibly repeatedly, as the program is executed. To support
++this use case, @value{GDBN} updates breakpoint locations whenever
++any shared library is loaded or unloaded. Typically, you would
++set a breakpoint in a shared library at the beginning of your
++debugging session, when the library is not loaded, and when the
++symbols from the library are not available. When you try to set
++breakpoint, @value{GDBN} will ask you if you want to set
++a so called @dfn{pending breakpoint} --- breakpoint whose address
++is not yet resolved.
++
++After the program is run, whenever a new shared library is loaded,
++ at value{GDBN} reevaluates all the breakpoints. When a newly loaded
++shared library contains the symbol or line referred to by some
++pending breakpoint, that breakpoint is resolved and becomes an
++ordinary breakpoint. When a library is unloaded, all breakpoints
++that refer to its symbols or source lines become pending again.
++
++This logic works for breakpoints with multiple locations, too. For
++example, if you have a breakpoint in a C at t{++} template function, and
++a newly loaded shared library has an instantiation of that template,
++a new location is added to the list of locations for the breakpoint.
++
++Except for having unresolved address, pending breakpoints do not
++differ from regular breakpoints. You can set conditions or commands,
++enable and disable them and perform other breakpoint operations.
++
++ at value{GDBN} provides some additional commands for controlling what
++happens when the @samp{break} command cannot resolve breakpoint
++address specification to an address:
+
+ @kindex set breakpoint pending
+ @kindex show breakpoint pending
+@@ -3070,19 +3136,9 @@
+ Show the current behavior setting for creating pending breakpoints.
+ @end table
+
+- at cindex operations allowed on pending breakpoints
+-Normal breakpoint operations apply to pending breakpoints as well. You may
+-specify a condition for a pending breakpoint and/or commands to run when the
+-breakpoint is reached. You can also enable or disable
+-the pending breakpoint. When you specify a condition for a pending breakpoint,
+-the parsing of the condition will be deferred until the point where the
+-pending breakpoint location is resolved. Disabling a pending breakpoint
+-tells @value{GDBN} to not attempt to resolve the breakpoint on any subsequent
+-shared library load. When a pending breakpoint is re-enabled,
+- at value{GDBN} checks to see if the location is already resolved.
+-This is done because any number of shared library loads could have
+-occurred since the time the breakpoint was disabled and one or more
+-of these loads could resolve the location.
++The settings above only affect the @code{break} command and its
++variants. Once breakpoint is set, it will be automatically updated
++as shared libraries are loaded and unloaded.
+
+ @cindex automatic hardware breakpoints
+ For some targets, @value{GDBN} can automatically decide if hardware or
+
+2007-10-08 Pierre Muller <muller at ics.u-strasbg.fr>
+
+ * breakpoint.c (print_one_breakpoint_location): ARI fix:
+ Replace asprintf by xstrprintf.
+
+===================================================================
+RCS file: /cvs/src/src/gdb/breakpoint.c,v
+retrieving revision 1.271
+retrieving revision 1.272
+diff -u -r1.271 -r1.272
+--- src/gdb/breakpoint.c 2007/10/01 00:17:57 1.271
++++ src/gdb/breakpoint.c 2007/10/08 15:23:42 1.272
+@@ -3526,7 +3526,7 @@
+ if (part_of_multiple)
+ {
+ char *formatted;
+- asprintf (&formatted, "%d.%d", b->number, loc_number);
++ formatted = xstrprintf ("%d.%d", b->number, loc_number);
+ ui_out_field_string (uiout, "number", formatted);
+ xfree (formatted);
+ }
Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -r1.256 -r1.257
--- gdb.spec 1 Nov 2007 22:28:37 -0000 1.256
+++ gdb.spec 3 Nov 2007 19:10:29 -0000 1.257
@@ -11,7 +11,7 @@
Version: 6.7.1
# The release always contains a leading reserved number, start it at 1.
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPL
Group: Development/Debuggers
@@ -85,12 +85,6 @@
# Threaded watchpoint support
Patch113: gdb-6.3-threaded-watchpoints-20041213.patch
-# Fix to expose multiple constructors to end-user
-Patch115: gdb-6.3-constructor-20041216.patch
-
-# Fix to display base constructors from list and breakpoint commands
-Patch116: gdb-6.3-linespec-20041213.patch
-
# Continue removing breakpoints even when failure occurs.
Patch117: gdb-6.3-removebp-20041130.patch
@@ -114,13 +108,6 @@
# Fix for non-threaded watchpoints.
Patch128: gdb-6.3-nonthreaded-wp-20050117.patch
-# Add PPC .symbols to min-symtable.
-Patch130: gdb-6.3-ctorline-20050120.patch
-
-# Fix to support multiple destructors just like multiple constructors
-Patch133: gdb-6.3-test-dtorfix-20050121.patch
-Patch134: gdb-6.3-dtorfix-20050121.patch
-
# Fix to support executable moving
Patch136: gdb-6.3-test-movedir-20050125.patch
@@ -180,9 +167,6 @@
# Add readnever option
Patch164: gdb-6.3-readnever-20050907.patch
-# Remove extraneous xfree
-Patch165: gdb-6.3-xfree-20050922.patch
-
# Fix frame pointer for ia64 sigtramp frame
Patch166: gdb-6.3-ia64-sigtramp-fp-20050926.patch
@@ -206,12 +190,6 @@
# ia32el.
Patch179: gdb-6.3-ia32el-fix-waitpid-20060615.patch
-# Bugfix segv on the source display by ^X 1 (fixes Patch130, BZ 200048).
-Patch181: gdb-6.5-bz200048-find_line_pc-segv.patch
-
-# Bugfix object names completion (fixes Patch116, BZ 193763).
-Patch185: gdb-6.3-bz193763-object-name-completion.patch
-
# Testcase for corrupted or missing location list information (BZ 196439).
Patch187: gdb-6.5-bz196439-valgrind-memcheck-compat-test.patch
@@ -385,6 +363,7 @@
# Apply patches defined above.
+%patch232 -p1
%patch0 -p1
%patch1 -p1
%patch2 -p1
@@ -399,8 +378,6 @@
%patch111 -p1
%patch112 -p1
%patch113 -p1
-%patch115 -p1
-%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
@@ -409,9 +386,6 @@
%patch124 -p1
%patch125 -p1
%patch128 -p1
-%patch130 -p1
-%patch133 -p1
-%patch134 -p1
%patch136 -p1
%patch139 -p1
%patch140 -p1
@@ -432,7 +406,6 @@
%patch162 -p1
%patch163 -p1
%patch164 -p1
-%patch165 -p1
%patch166 -p1
%patch169 -p1
%patch170 -p1
@@ -440,8 +413,6 @@
%patch177 -p1
%patch178 -p1
%patch179 -p1
-%patch181 -p1
-%patch185 -p1
%patch187 -p1
%patch188 -p1
%patch190 -p1
@@ -462,7 +433,6 @@
%patch225 -p1
%patch229 -p1
%patch231 -p1
-%patch232 -p1
%patch234 -p1
%patch235 -p1
%patch236 -p1
@@ -642,6 +612,9 @@
# don't include the files in include, they are part of binutils
%changelog
+* Sat Nov 3 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.7.1-2
+- Backport `Breakpoints at multiple locations' patch primarily for C++.
+
* Thu Nov 1 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.7.1-1
- Upgrade to GDB 6.7.1. Drop redundant patches, forward-port remaining ones.
--- gdb-6.3-bz193763-object-name-completion.patch DELETED ---
--- gdb-6.3-constructor-20041216.patch DELETED ---
--- gdb-6.3-ctorline-20050120.patch DELETED ---
--- gdb-6.3-dtorfix-20050121.patch DELETED ---
--- gdb-6.3-linespec-20041213.patch DELETED ---
--- gdb-6.3-test-dtorfix-20050121.patch DELETED ---
--- gdb-6.3-xfree-20050922.patch DELETED ---
--- gdb-6.5-bz200048-find_line_pc-segv.patch DELETED ---
More information about the scm-commits
mailing list