From 46a1caf62e3a06c7d6e37e1c422262fdde193e2e Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mar 28 2011 18:06:31 +0000 Subject: Rebase to FSF GDB 7.2.50.20110328 (which is a 7.3 pre-release). Bundle %{libstdcxxpython}.tar.bz2 unconditionally - for rebulds on RHELs. --- diff --git a/.gitignore b/.gitignore index a5eda3f..b1da307 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /libstdc++-v3-python-r155978.tar.bz2 -/gdb-7.2.50.20110320.tar.bz2 +/gdb-7.2.50.20110328.tar.bz2 diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index 720bf21..8ce5f02 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -1,7 +1,7 @@ -Index: gdb-7.2.50.20110320/gdb/corelow.c +Index: gdb-7.2.50.20110328/gdb/corelow.c =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/corelow.c 2011-02-26 03:07:07.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/corelow.c 2011-03-20 15:19:52.000000000 +0100 +--- gdb-7.2.50.20110328.orig/gdb/corelow.c 2011-02-26 03:07:07.000000000 +0100 ++++ gdb-7.2.50.20110328/gdb/corelow.c 2011-03-28 18:41:20.000000000 +0200 @@ -47,6 +47,9 @@ #include "filenames.h" #include "progspace.h" @@ -90,11 +90,11 @@ Index: gdb-7.2.50.20110320/gdb/corelow.c + NULL, NULL, NULL, + &setlist, &showlist); } -Index: gdb-7.2.50.20110320/gdb/doc/gdb.texinfo +Index: gdb-7.2.50.20110328/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/doc/gdb.texinfo 2011-03-20 15:17:44.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/doc/gdb.texinfo 2011-03-20 15:19:52.000000000 +0100 -@@ -15343,6 +15343,27 @@ information files. +--- gdb-7.2.50.20110328.orig/gdb/doc/gdb.texinfo 2011-03-28 18:40:15.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/doc/gdb.texinfo 2011-03-28 18:41:20.000000000 +0200 +@@ -15346,6 +15346,27 @@ information files. @end table @@ -122,10 +122,10 @@ Index: gdb-7.2.50.20110320/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-7.2.50.20110320/gdb/solib-svr4.c +Index: gdb-7.2.50.20110328/gdb/solib-svr4.c =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/solib-svr4.c 2011-03-20 15:17:43.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/solib-svr4.c 2011-03-20 15:19:52.000000000 +0100 +--- gdb-7.2.50.20110328.orig/gdb/solib-svr4.c 2011-03-28 18:40:14.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/solib-svr4.c 2011-03-28 18:41:20.000000000 +0200 @@ -1179,9 +1179,49 @@ svr4_current_sos (void) safe_strerror (errcode)); else @@ -179,14 +179,14 @@ Index: gdb-7.2.50.20110320/gdb/solib-svr4.c } xfree (buffer); -Index: gdb-7.2.50.20110320/gdb/elfread.c +Index: gdb-7.2.50.20110328/gdb/elfread.c =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/elfread.c 2011-03-20 15:17:42.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/elfread.c 2011-03-20 15:22:34.000000000 +0100 +--- gdb-7.2.50.20110328.orig/gdb/elfread.c 2011-03-28 18:40:14.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/elfread.c 2011-03-28 18:45:39.000000000 +0200 @@ -45,6 +45,10 @@ + #include "regcache.h" #include "stap-probe.h" #include "arch-utils.h" - #include "gdbtypes.h" +#include "libbfd.h" +#include "gdbcore.h" +#include "gdbcmd.h" @@ -858,8 +858,8 @@ Index: gdb-7.2.50.20110320/gdb/elfread.c + 1); xfree (build_id); /* Prevent looping on a stripped .debug file. */ - if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0) -@@ -1209,7 +1784,7 @@ find_separate_debug_file_by_buildid (str + if (build_id_name != NULL +@@ -1210,7 +1785,7 @@ find_separate_debug_file_by_buildid (str xfree (build_id_name); } else if (build_id_name != NULL) @@ -868,7 +868,7 @@ Index: gdb-7.2.50.20110320/gdb/elfread.c } return NULL; } -@@ -1407,9 +1982,10 @@ elf_symfile_read (struct objfile *objfil +@@ -1408,9 +1983,10 @@ elf_symfile_read (struct objfile *objfil `.note.gnu.build-id'. */ else if (!objfile_has_partial_symbols (objfile)) { @@ -881,7 +881,7 @@ Index: gdb-7.2.50.20110320/gdb/elfread.c if (debugfile == NULL) debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1421,6 +1997,12 @@ elf_symfile_read (struct objfile *objfil +@@ -1422,6 +1998,12 @@ elf_symfile_read (struct objfile *objfil symbol_file_add_separate (abfd, symfile_flags, objfile); xfree (debugfile); } @@ -894,7 +894,7 @@ Index: gdb-7.2.50.20110320/gdb/elfread.c } } -@@ -1879,4 +2461,16 @@ _initialize_elfread (void) +@@ -1873,4 +2455,16 @@ _initialize_elfread (void) elf_objfile_gnu_ifunc_cache_data = register_objfile_data (); gnu_ifunc_fns_p = &elf_gnu_ifunc_fns; @@ -911,10 +911,10 @@ Index: gdb-7.2.50.20110320/gdb/elfread.c + + observer_attach_executable_changed (debug_print_executable_changed); } -Index: gdb-7.2.50.20110320/gdb/symfile.h +Index: gdb-7.2.50.20110328/gdb/symfile.h =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/symfile.h 2011-03-20 15:17:43.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/symfile.h 2011-03-20 15:19:52.000000000 +0100 +--- gdb-7.2.50.20110328.orig/gdb/symfile.h 2011-03-28 18:40:14.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/symfile.h 2011-03-28 18:41:20.000000000 +0200 @@ -611,6 +611,13 @@ void free_symfile_segment_data (struct s extern struct cleanup *increment_reading_symtab (void); @@ -929,11 +929,11 @@ Index: gdb-7.2.50.20110320/gdb/symfile.h /* From dwarf2read.c */ extern int dwarf2_has_info (struct objfile *); -Index: gdb-7.2.50.20110320/gdb/testsuite/lib/gdb.exp +Index: gdb-7.2.50.20110328/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/testsuite/lib/gdb.exp 2011-03-20 15:17:43.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/testsuite/lib/gdb.exp 2011-03-20 15:19:52.000000000 +0100 -@@ -1397,6 +1397,16 @@ proc default_gdb_start { } { +--- gdb-7.2.50.20110328.orig/gdb/testsuite/lib/gdb.exp 2011-03-28 18:40:14.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/testsuite/lib/gdb.exp 2011-03-28 18:41:20.000000000 +0200 +@@ -1381,6 +1381,16 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } } @@ -950,10 +950,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/lib/gdb.exp return 0; } -Index: gdb-7.2.50.20110320/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.2.50.20110328/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/testsuite/lib/mi-support.exp 2011-03-07 17:03:04.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/testsuite/lib/mi-support.exp 2011-03-20 15:19:52.000000000 +0100 +--- gdb-7.2.50.20110328.orig/gdb/testsuite/lib/mi-support.exp 2011-03-07 17:03:04.000000000 +0100 ++++ gdb-7.2.50.20110328/gdb/testsuite/lib/mi-support.exp 2011-03-28 18:41:20.000000000 +0200 @@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } { } } @@ -971,10 +971,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/lib/mi-support.exp detect_async -Index: gdb-7.2.50.20110320/gdb/objfiles.h +Index: gdb-7.2.50.20110328/gdb/objfiles.h =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/objfiles.h 2011-03-07 17:17:29.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/objfiles.h 2011-03-20 15:20:29.000000000 +0100 +--- gdb-7.2.50.20110328.orig/gdb/objfiles.h 2011-03-07 17:17:29.000000000 +0100 ++++ gdb-7.2.50.20110328/gdb/objfiles.h 2011-03-28 18:41:20.000000000 +0200 @@ -441,6 +441,10 @@ struct objfile #define OBJF_PSYMTABS_READ (1 << 4) diff --git a/gdb-ada-gdbarch-crash.patch b/gdb-ada-gdbarch-crash.patch deleted file mode 100644 index 561fce1..0000000 --- a/gdb-ada-gdbarch-crash.patch +++ /dev/null @@ -1,49 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2011-03/msg00946.html -Subject: [patch] ada: Fix rashes on gdbarch garbage - -Hi Joel, - -for gdb.ada/str_ref_cmp.exp on x86_64-fedora15-linux-gnu it turns: - -(gdb) print String_Var (1 .. 3) = "Hel" -ERROR: Process no longer exists -UNRESOLVED: gdb.ada/str_ref_cmp.exp: print String_Var (1 .. 3) = "Hel" --> -(gdb) print String_Var (1 .. 3) = "Hel" -$1 = false -(gdb) FAIL: gdb.ada/str_ref_cmp.exp: print String_Var (1 .. 3) = "Hel" - -GDB crashes the former way without this fix on: - gcc-gnat-4.6.0-0.14.fc15.x86_64 - gcc-gnat-4.5.1-4.fc14.x86_64 - -I cannot test FSF gcc <=4.5 myself as its Ada build errors out for me on: - uintp.adb:242:22: expect type "Hnum" defined at line 91 - -GDB PASSes on these GNATs even without this fix but that is not the point: - GNAT 4.7.0 20110320 (experimental) - GNAT 4.6.0 20110320 (prerelease) - -This is only a suggestion, I do not know much about the ada-* code. - - -Thanks, -Jan - - -gdb/ -2011-03-20 Jan Kratochvil - - * ada-lang.c (replace_operator_with_call): Copy also GDBARCH. - ---- a/gdb/ada-lang.c -+++ b/gdb/ada-lang.c -@@ -3661,6 +3661,7 @@ replace_operator_with_call (struct expression **expp, int pc, int nargs, - - newexp->nelts = exp->nelts + 7 - oplen; - newexp->language_defn = exp->language_defn; -+ newexp->gdbarch = exp->gdbarch; - memcpy (newexp->elts, exp->elts, EXP_ELEM_TO_BYTES (pc)); - memcpy (newexp->elts + pc + 7, exp->elts + pc + oplen, - EXP_ELEM_TO_BYTES (exp->nelts - pc - oplen)); - diff --git a/gdb-archer-pie-addons-keep-disabled.patch b/gdb-archer-pie-addons-keep-disabled.patch index 8d16e6a..50d94a3 100644 --- a/gdb-archer-pie-addons-keep-disabled.patch +++ b/gdb-archer-pie-addons-keep-disabled.patch @@ -1,8 +1,8 @@ -Index: gdb-7.2.50.20110320/gdb/breakpoint.c +Index: gdb-7.2.50.20110328/gdb/breakpoint.c =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/breakpoint.c 2011-03-20 15:17:42.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/breakpoint.c 2011-03-20 15:28:48.000000000 +0100 -@@ -10678,6 +10678,50 @@ update_breakpoint_locations (struct brea +--- gdb-7.2.50.20110328.orig/gdb/breakpoint.c 2011-03-28 18:40:14.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/breakpoint.c 2011-03-28 18:45:57.000000000 +0200 +@@ -10707,6 +10707,50 @@ update_breakpoint_locations (struct brea update_global_location_list (1); } @@ -53,22 +53,22 @@ Index: gdb-7.2.50.20110320/gdb/breakpoint.c /* Reset a breakpoint given it's struct breakpoint * BINT. The value we return ends up being the return value from catch_errors. Unused in this case. */ -Index: gdb-7.2.50.20110320/gdb/breakpoint.h +Index: gdb-7.2.50.20110328/gdb/breakpoint.h =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/breakpoint.h 2011-03-20 15:17:42.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/breakpoint.h 2011-03-20 15:29:33.000000000 +0100 -@@ -1210,4 +1210,7 @@ extern struct breakpoint *iterate_over_b +--- gdb-7.2.50.20110328.orig/gdb/breakpoint.h 2011-03-28 18:40:14.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/breakpoint.h 2011-03-28 18:46:07.000000000 +0200 +@@ -1219,4 +1219,7 @@ extern int user_breakpoint_p (struct bre - extern int user_breakpoint_p (struct breakpoint *); + extern void modify_semaphore (struct bp_location *location, int set); +extern void breakpoints_relocate (struct objfile *objfile, + struct section_offsets *delta); + #endif /* !defined (BREAKPOINT_H) */ -Index: gdb-7.2.50.20110320/gdb/objfiles.c +Index: gdb-7.2.50.20110328/gdb/objfiles.c =================================================================== ---- gdb-7.2.50.20110320.orig/gdb/objfiles.c 2011-03-20 15:17:42.000000000 +0100 -+++ gdb-7.2.50.20110320/gdb/objfiles.c 2011-03-20 15:29:05.000000000 +0100 +--- gdb-7.2.50.20110328.orig/gdb/objfiles.c 2011-03-28 18:40:14.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/objfiles.c 2011-03-28 18:45:57.000000000 +0200 @@ -851,6 +851,11 @@ objfile_relocate1 (struct objfile *objfi objfile->sf->sym_probe_fns->sym_relocate_probe (objfile, new_offsets, delta); diff --git a/gdb-archer.patch b/gdb-archer.patch index 4b4a6a6..a2dd1f8 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectArcher http://sourceware.org/gdb/wiki/ArcherBranchManagement GIT snapshot: -commit 6b2a0bf758263d22bf2b3bd2e02665cf0c24b0be +commit 16f35a2c55556970ed111419202305782a0f79ec branch `archer' - the merge of branches: archer-jankratochvil-vla @@ -10,8 +10,6 @@ archer-jankratochvil-watchpoint3 archer-jankratochvil-ifunc archer-tromey-python archer-sergiodj-stap -#TODO?:archer-tromey-optional-psymtab (cherry-picked from post-7.2 master) -#TODO?:archer-tromey-threaded-dwarf diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h @@ -144,7 +142,7 @@ index 489b1e9..c332b1b 100644 $(SHELL) config.status --recheck diff --git a/gdb/NEWS b/gdb/NEWS -index feebf61..279a1c9 100644 +index 2288497..6df9868 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -36,6 +36,10 @@ @@ -157,12 +155,12 @@ index feebf61..279a1c9 100644 + * Python scripting - ** Parameters can now be be sub-classed in Python, and in particular + ** The function gdb.Write now accepts an optional keyword 'stream'. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c -index ed51ab0..6851810 100644 +index 5728ac8..744d2fa 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c -@@ -11390,6 +11390,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp, +@@ -11391,6 +11391,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp, static int ada_operator_check (struct expression *exp, int pos, @@ -170,7 +168,7 @@ index ed51ab0..6851810 100644 int (*objfile_func) (struct objfile *objfile, void *data), void *data) { -@@ -11404,12 +11405,15 @@ ada_operator_check (struct expression *exp, int pos, +@@ -11405,12 +11406,15 @@ ada_operator_check (struct expression *exp, int pos, break; default: @@ -565,10 +563,10 @@ index 5bc5930..3b546a7 100644 if there is no such frame. If BLOCK is NULL, just return NULL. */ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c -index c55e5c0..1a71cf8 100644 +index dbd9588..d551ddd 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -62,6 +62,8 @@ +@@ -63,6 +63,8 @@ #include "jit.h" #include "xml-syscall.h" #include "parser-defs.h" @@ -577,7 +575,7 @@ index c55e5c0..1a71cf8 100644 #include "cli/cli-utils.h" /* readline include files */ -@@ -106,6 +108,9 @@ static void break_command_1 (char *, int, int); +@@ -107,6 +109,9 @@ static void break_command_1 (char *, int, int); static void mention (struct breakpoint *); @@ -587,7 +585,7 @@ index c55e5c0..1a71cf8 100644 /* This function is used in gdbtk sources and thus can not be made static. */ struct breakpoint *set_raw_breakpoint (struct gdbarch *gdbarch, -@@ -1158,6 +1163,25 @@ watchpoint_in_thread_scope (struct breakpoint *b) +@@ -1159,6 +1164,25 @@ watchpoint_in_thread_scope (struct breakpoint *b) && !is_executing (inferior_ptid))); } @@ -613,7 +611,7 @@ index c55e5c0..1a71cf8 100644 /* Assuming that B is a watchpoint: - Reparse watchpoint expression, if REPARSE is non-zero - Evaluate expression and store the result in B->val -@@ -1217,12 +1241,17 @@ update_watchpoint (struct breakpoint *b, int reparse) +@@ -1218,12 +1242,17 @@ update_watchpoint (struct breakpoint *b, int reparse) struct frame_id saved_frame_id; int frame_saved; @@ -631,7 +629,7 @@ index c55e5c0..1a71cf8 100644 if (b->disposition == disp_del_at_next_stop) return; -@@ -1452,13 +1481,7 @@ update_watchpoint (struct breakpoint *b, int reparse) +@@ -1453,13 +1482,7 @@ update_watchpoint (struct breakpoint *b, int reparse) Watchpoint %d deleted because the program has left the block\n\ in which its expression is valid.\n"), b->number); @@ -646,42 +644,57 @@ index c55e5c0..1a71cf8 100644 } /* Restore the selected frame. */ -@@ -1500,6 +1523,24 @@ should_be_inserted (struct bp_location *bl) +@@ -1501,6 +1524,40 @@ should_be_inserted (struct bp_location *bl) return 1; } -+/* Set or clear a SystemTap semaphore. ARCH is the target -+ architecture; ADDRESS is the address of the semaphore, and SETTING -+ is either zero or one. */ ++/* See the comment in breakpoint.h. */ + -+static void -+modify_semaphore (struct gdbarch *arch, CORE_ADDR address, int setting) ++void ++modify_semaphore (struct bp_location *loc, int set) +{ ++ struct gdbarch *arch = loc->gdbarch; + gdb_byte bytes[sizeof (LONGEST)]; + /* The ABI specifies "unsigned short". */ + struct type *type = builtin_type (arch)->builtin_unsigned_short; ++ CORE_ADDR address = loc->semaphore; ++ ULONGEST value; ++ ++ if (address == 0) ++ return; ++ ++ /* Swallow errors. */ ++ if (target_read_memory (address, bytes, TYPE_LENGTH (type)) != 0) ++ return; ++ ++ value = extract_unsigned_integer (bytes, TYPE_LENGTH (type), ++ gdbarch_byte_order (arch)); ++ /* Note that we explicitly don't worry about overflow or ++ underflow. */ ++ if (set) ++ ++value; ++ else ++ --value; + + store_unsigned_integer (bytes, TYPE_LENGTH (type), -+ gdbarch_byte_order (arch), setting); ++ gdbarch_byte_order (arch), value); + -+ /* Ignore errors. FIXME. */ + target_write_memory (address, bytes, TYPE_LENGTH (type)); +} + /* Insert a low-level "breakpoint" of some type. BL is the breakpoint location. Any error messages are printed to TMP_ERROR_STREAM; and DISABLED_BREAKS, and HW_BREAKPOINT_ERROR are used to report problems. -@@ -1595,6 +1636,9 @@ insert_bp_location (struct bp_location *bl, +@@ -1596,6 +1653,8 @@ insert_bp_location (struct bp_location *bl, else val = target_insert_breakpoint (bl->gdbarch, &bl->target_info); + -+ if (bl->semaphore != 0) -+ modify_semaphore (bl->gdbarch, bl->semaphore, 1); ++ modify_semaphore (bl, 1); } else { -@@ -1849,6 +1893,7 @@ insert_breakpoint_locations (void) +@@ -1850,6 +1909,7 @@ insert_breakpoint_locations (void) int val = 0; int disabled_breaks = 0; int hw_breakpoint_error = 0; @@ -689,7 +702,7 @@ index c55e5c0..1a71cf8 100644 struct ui_file *tmp_error_stream = mem_fileopen (); struct cleanup *cleanups = make_cleanup_ui_file_delete (tmp_error_stream); -@@ -1876,9 +1921,13 @@ insert_breakpoint_locations (void) +@@ -1877,9 +1937,13 @@ insert_breakpoint_locations (void) /* For targets that support global breakpoints, there's no need to select an inferior to insert breakpoint to. In fact, even if we aren't attached to any process yet, we should still @@ -705,7 +718,7 @@ index c55e5c0..1a71cf8 100644 continue; val = insert_bp_location (bl, tmp_error_stream, &disabled_breaks, -@@ -1902,13 +1951,19 @@ insert_breakpoint_locations (void) +@@ -1903,13 +1967,19 @@ insert_breakpoint_locations (void) if (bpt->disposition == disp_del_at_next_stop) continue; @@ -731,7 +744,7 @@ index c55e5c0..1a71cf8 100644 if (some_failed) { for (loc = bpt->loc; loc; loc = loc->next) -@@ -2090,15 +2145,24 @@ struct breakpoint_objfile_data +@@ -2091,15 +2161,24 @@ struct breakpoint_objfile_data /* Minimal symbol(s) for "longjmp", "siglongjmp", etc. (if any). */ struct minimal_symbol *longjmp_msym[NUM_LONGJMP_NAMES]; @@ -756,7 +769,7 @@ index c55e5c0..1a71cf8 100644 /* Minimal symbol not found sentinel. */ static struct minimal_symbol msym_not_found; -@@ -2206,6 +2270,29 @@ create_longjmp_master_breakpoint (void) +@@ -2207,6 +2286,29 @@ create_longjmp_master_breakpoint (void) bp_objfile_data = get_breakpoint_objfile_data (objfile); @@ -786,7 +799,7 @@ index c55e5c0..1a71cf8 100644 for (i = 0; i < NUM_LONGJMP_NAMES; i++) { struct breakpoint *b; -@@ -2314,6 +2401,31 @@ create_exception_master_breakpoint (void) +@@ -2315,6 +2417,31 @@ create_exception_master_breakpoint (void) bp_objfile_data = get_breakpoint_objfile_data (objfile); @@ -818,17 +831,16 @@ index c55e5c0..1a71cf8 100644 if (msym_not_found_p (bp_objfile_data->exception_msym)) continue; -@@ -2532,6 +2644,9 @@ remove_breakpoint_1 (struct bp_location *bl, insertion_state_t is) +@@ -2533,6 +2660,8 @@ remove_breakpoint_1 (struct bp_location *bl, insertion_state_t is) val = target_remove_hw_breakpoint (bl->gdbarch, &bl->target_info); else val = target_remove_breakpoint (bl->gdbarch, &bl->target_info); + -+ if (bl->semaphore != 0) -+ modify_semaphore (bl->gdbarch, bl->semaphore, 0); ++ modify_semaphore (bl, 0); } else { -@@ -3488,6 +3603,8 @@ print_it_typical (bpstat bs) +@@ -3489,6 +3618,8 @@ print_it_typical (bpstat bs) case bp_tracepoint: case bp_fast_tracepoint: case bp_jit_event: @@ -837,7 +849,7 @@ index c55e5c0..1a71cf8 100644 default: result = PRINT_UNKNOWN; break; -@@ -3713,6 +3830,8 @@ watchpoint_check (void *p) +@@ -3714,6 +3845,8 @@ watchpoint_check (void *p) gdb_assert (bs->breakpoint_at != NULL); b = bs->breakpoint_at; @@ -846,7 +858,7 @@ index c55e5c0..1a71cf8 100644 /* If this is a local watchpoint, we only want to check if the watchpoint frame is in scope if the current thread is the thread that was used to create the watchpoint. */ -@@ -3822,13 +3941,7 @@ watchpoint_check (void *p) +@@ -3823,13 +3956,7 @@ watchpoint_check (void *p) " deleted because the program has left the block in\n\ which its expression is valid.\n"); @@ -861,7 +873,7 @@ index c55e5c0..1a71cf8 100644 return WP_DELETED; } -@@ -4033,9 +4146,7 @@ bpstat_check_watchpoint (bpstat bs) +@@ -4034,9 +4161,7 @@ bpstat_check_watchpoint (bpstat bs) case 0: /* Error from catch_errors. */ printf_filtered (_("Watchpoint %d deleted.\n"), b->number); @@ -872,7 +884,7 @@ index c55e5c0..1a71cf8 100644 /* We've already printed what needs to be printed. */ bs->print_it = print_it_done; break; -@@ -4246,7 +4357,7 @@ bpstat_stop_status (struct address_space *aspace, +@@ -4247,7 +4372,7 @@ bpstat_stop_status (struct address_space *aspace, watchpoint as triggered so that we will handle the out-of-scope event. We'll get to the watchpoint next iteration. */ @@ -881,7 +893,7 @@ index c55e5c0..1a71cf8 100644 b->related_breakpoint->watchpoint_triggered = watch_triggered_yes; } } -@@ -4368,7 +4479,7 @@ handle_jit_event (void) +@@ -4369,7 +4494,7 @@ handle_jit_event (void) /* Decide what infrun needs to do with this bpstat. */ struct bpstat_what @@ -890,7 +902,7 @@ index c55e5c0..1a71cf8 100644 { struct bpstat_what retval; /* We need to defer calling `solib_add', as adding new symbols -@@ -4376,12 +4487,13 @@ bpstat_what (bpstat bs) +@@ -4377,12 +4502,13 @@ bpstat_what (bpstat bs) and hence may clear unprocessed entries in the BS chain. */ int shlib_event = 0; int jit_event = 0; @@ -905,7 +917,7 @@ index c55e5c0..1a71cf8 100644 { /* Extract this BS's action. After processing each BS, we check if its action overrides all we've seem so far. */ -@@ -4511,6 +4623,16 @@ bpstat_what (bpstat bs) +@@ -4512,6 +4638,16 @@ bpstat_what (bpstat bs) out already. */ internal_error (__FILE__, __LINE__, _("bpstat_what: tracepoint encountered")); @@ -922,7 +934,7 @@ index c55e5c0..1a71cf8 100644 default: internal_error (__FILE__, __LINE__, _("bpstat_what: unhandled bptype %d"), (int) bptype); -@@ -4519,6 +4641,9 @@ bpstat_what (bpstat bs) +@@ -4520,6 +4656,9 @@ bpstat_what (bpstat bs) retval.main_action = max (retval.main_action, this_action); } @@ -932,7 +944,7 @@ index c55e5c0..1a71cf8 100644 if (shlib_event) { if (debug_infrun) -@@ -4548,6 +4673,23 @@ bpstat_what (bpstat bs) +@@ -4549,6 +4688,23 @@ bpstat_what (bpstat bs) handle_jit_event (); } @@ -956,7 +968,7 @@ index c55e5c0..1a71cf8 100644 return retval; } -@@ -4703,6 +4845,8 @@ bptype_string (enum bptype type) +@@ -4706,6 +4862,8 @@ bptype_string (enum bptype type) {bp_fast_tracepoint, "fast tracepoint"}, {bp_static_tracepoint, "static tracepoint"}, {bp_jit_event, "jit events"}, @@ -965,7 +977,7 @@ index c55e5c0..1a71cf8 100644 }; if (((int) type >= (sizeof (bptypes) / sizeof (bptypes[0]))) -@@ -4837,6 +4981,8 @@ print_one_breakpoint_location (struct breakpoint *b, +@@ -4840,6 +4998,8 @@ print_one_breakpoint_location (struct breakpoint *b, case bp_fast_tracepoint: case bp_static_tracepoint: case bp_jit_event: @@ -974,7 +986,7 @@ index c55e5c0..1a71cf8 100644 if (opts.addressprint) { annotate_field (4); -@@ -5112,7 +5258,8 @@ user_settable_breakpoint (const struct breakpoint *b) +@@ -5115,7 +5275,8 @@ user_settable_breakpoint (const struct breakpoint *b) || b->type == bp_catchpoint || b->type == bp_hardware_breakpoint || is_tracepoint (b) @@ -984,7 +996,7 @@ index c55e5c0..1a71cf8 100644 } /* Return true if this breakpoint was set by the user, false if it is -@@ -5608,6 +5755,8 @@ allocate_bp_location (struct breakpoint *bpt) +@@ -5611,6 +5772,8 @@ allocate_bp_location (struct breakpoint *bpt) case bp_longjmp_master: case bp_std_terminate_master: case bp_exception_master: @@ -993,7 +1005,7 @@ index c55e5c0..1a71cf8 100644 loc->loc_type = bp_loc_software_breakpoint; break; case bp_hardware_breakpoint: -@@ -5697,6 +5846,7 @@ set_raw_breakpoint_without_location (struct gdbarch *gdbarch, +@@ -5700,6 +5863,7 @@ set_raw_breakpoint_without_location (struct gdbarch *gdbarch, b->ops = NULL; b->condition_not_parsed = 0; b->py_bp_object = NULL; @@ -1001,7 +1013,7 @@ index c55e5c0..1a71cf8 100644 /* Add this breakpoint to the end of the chain so that a list of breakpoints will come out in order of increasing numbers. */ -@@ -5713,9 +5863,12 @@ set_raw_breakpoint_without_location (struct gdbarch *gdbarch, +@@ -5716,9 +5880,12 @@ set_raw_breakpoint_without_location (struct gdbarch *gdbarch, return b; } @@ -1016,7 +1028,7 @@ index c55e5c0..1a71cf8 100644 { gdb_assert (loc->owner != NULL); -@@ -5723,8 +5876,33 @@ set_breakpoint_location_function (struct bp_location *loc) +@@ -5726,8 +5893,33 @@ set_breakpoint_location_function (struct bp_location *loc) || loc->owner->type == bp_hardware_breakpoint || is_tracepoint (loc->owner)) { @@ -1052,7 +1064,7 @@ index c55e5c0..1a71cf8 100644 if (loc->function_name) loc->function_name = xstrdup (loc->function_name); } -@@ -5787,6 +5965,7 @@ set_raw_breakpoint (struct gdbarch *gdbarch, +@@ -5790,6 +5982,7 @@ set_raw_breakpoint (struct gdbarch *gdbarch, b->loc->requested_address = sal.pc; b->loc->address = adjusted_address; b->loc->pspace = sal.pspace; @@ -1060,7 +1072,7 @@ index c55e5c0..1a71cf8 100644 /* Store the program space that was used to set the breakpoint, for breakpoint resetting. */ -@@ -5799,7 +5978,8 @@ set_raw_breakpoint (struct gdbarch *gdbarch, +@@ -5802,7 +5995,8 @@ set_raw_breakpoint (struct gdbarch *gdbarch, b->loc->section = sal.section; b->line_number = sal.line; @@ -1070,7 +1082,7 @@ index c55e5c0..1a71cf8 100644 breakpoints_changed (); -@@ -6916,13 +7096,14 @@ clone_momentary_breakpoint (struct breakpoint *orig) +@@ -6919,13 +7113,14 @@ clone_momentary_breakpoint (struct breakpoint *orig) copy = set_raw_breakpoint_without_location (orig->gdbarch, orig->type); copy->loc = allocate_bp_location (copy); @@ -1086,7 +1098,7 @@ index c55e5c0..1a71cf8 100644 if (orig->source_file == NULL) copy->source_file = NULL; -@@ -7016,6 +7197,7 @@ mention (struct breakpoint *b) +@@ -7019,6 +7214,7 @@ mention (struct breakpoint *b) do_cleanups (ui_out_chain); break; case bp_breakpoint: @@ -1094,7 +1106,7 @@ index c55e5c0..1a71cf8 100644 if (ui_out_is_mi_like_p (uiout)) { say_where = 0; -@@ -7026,6 +7208,8 @@ mention (struct breakpoint *b) +@@ -7029,6 +7225,8 @@ mention (struct breakpoint *b) else printf_filtered (_("Breakpoint")); printf_filtered (_(" %d"), b->number); @@ -1103,7 +1115,7 @@ index c55e5c0..1a71cf8 100644 say_where = 1; break; case bp_hardware_breakpoint: -@@ -7085,6 +7269,7 @@ mention (struct breakpoint *b) +@@ -7088,6 +7286,7 @@ mention (struct breakpoint *b) case bp_longjmp_master: case bp_std_terminate_master: case bp_exception_master: @@ -1111,7 +1123,7 @@ index c55e5c0..1a71cf8 100644 break; } -@@ -7142,10 +7327,12 @@ add_location_to_breakpoint (struct breakpoint *b, +@@ -7145,10 +7344,12 @@ add_location_to_breakpoint (struct breakpoint *b, loc->address = adjust_breakpoint_address (loc->gdbarch, loc->requested_address, b->type); loc->pspace = sal->pspace; @@ -1125,7 +1137,33 @@ index c55e5c0..1a71cf8 100644 return loc; } -@@ -8580,6 +8767,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty, +@@ -7493,6 +7694,16 @@ create_breakpoints_sal (struct gdbarch *gdbarch, + { + int i; + ++ if (canonical->pre_expanded) ++ { ++ create_breakpoint_sal (gdbarch, sals, canonical->canonical[0], ++ cond_string, type, disposition, ++ thread, task, ignore_count, ops, ++ from_tty, enabled, internal, ++ canonical->special_display); ++ return; ++ } ++ + for (i = 0; i < sals.nelts; ++i) + { + struct symtabs_and_lines expanded = +@@ -8018,7 +8229,7 @@ create_breakpoint (struct gdbarch *gdbarch, + mention (b); + } + +- if (sals.nelts > 1) ++ if (sals.nelts > 1 && !canonical.pre_expanded) + { + warning (_("Multiple breakpoints were set.\nUse the " + "\"delete\" command to delete unwanted breakpoints.")); +@@ -8586,6 +8797,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty, b = set_raw_breakpoint_without_location (NULL, bp_type); set_breakpoint_number (internal, b); b->thread = thread; @@ -1133,7 +1171,7 @@ index c55e5c0..1a71cf8 100644 b->disposition = disp_donttouch; b->exp = exp; b->exp_valid_block = exp_valid_block; -@@ -9742,6 +9930,9 @@ update_global_location_list (int should_insert) +@@ -9747,6 +9959,9 @@ update_global_location_list (int should_insert) int keep_in_target = 0; int removed = 0; @@ -1143,7 +1181,7 @@ index c55e5c0..1a71cf8 100644 /* Skip LOCP entries which will definitely never be needed. Stop either at or being the one matching OLD_LOC. */ while (locp < bp_location + bp_location_count -@@ -10058,12 +10249,20 @@ delete_breakpoint (struct breakpoint *bpt) +@@ -10063,12 +10278,20 @@ delete_breakpoint (struct breakpoint *bpt) /* At least avoid this stale reference until the reference counting of breakpoints gets resolved. */ @@ -1169,7 +1207,7 @@ index c55e5c0..1a71cf8 100644 } observer_notify_breakpoint_deleted (bpt->number); -@@ -10376,7 +10575,7 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal) +@@ -10381,7 +10604,7 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal) return sal; } @@ -1178,7 +1216,15 @@ index c55e5c0..1a71cf8 100644 update_breakpoint_locations (struct breakpoint *b, struct symtabs_and_lines sals) { -@@ -10508,6 +10707,7 @@ breakpoint_re_set_one (void *bint) +@@ -10501,6 +10724,7 @@ breakpoint_re_set_one (void *bint) + struct gdb_exception e; + struct cleanup *cleanups = make_cleanup (null_cleanup, NULL); + int marker_spec = 0; ++ int pre_expanded = 0; + + switch (b->type) + { +@@ -10513,6 +10737,7 @@ breakpoint_re_set_one (void *bint) case bp_tracepoint: case bp_fast_tracepoint: case bp_static_tracepoint: @@ -1186,7 +1232,56 @@ index c55e5c0..1a71cf8 100644 /* Do not attempt to re-set breakpoints disabled during startup. */ if (b->enable_state == bp_startup_disabled) return 0; -@@ -10678,6 +10878,7 @@ breakpoint_re_set_one (void *bint) +@@ -10547,8 +10772,25 @@ breakpoint_re_set_one (void *bint) + error (_("marker %s not found"), b->static_trace_marker_id); + } + else +- sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0, +- NULL, not_found_ptr); ++ { ++ struct linespec_result canonical; ++ ++ init_linespec_result (&canonical); ++ sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0, ++ &canonical, not_found_ptr); ++ ++ /* We don't need the contents. */ ++ if (canonical.canonical) ++ { ++ int i; ++ ++ for (i = 0; i < sals.nelts; ++i) ++ xfree (canonical.canonical[i]); ++ xfree (canonical.canonical); ++ } ++ ++ pre_expanded = canonical.pre_expanded; ++ } + } + if (e.reason < 0) + { +@@ -10581,7 +10823,7 @@ breakpoint_re_set_one (void *bint) + + if (!not_found) + { +- gdb_assert (sals.nelts == 1); ++ gdb_assert (pre_expanded || sals.nelts == 1); + + resolve_sal_pc (&sals.sals[0]); + if (b->condition_not_parsed && s && s[0]) +@@ -10602,7 +10844,10 @@ breakpoint_re_set_one (void *bint) + if (b->type == bp_static_tracepoint && !marker_spec) + sals.sals[0] = update_static_tracepoint (b, sals.sals[0]); + +- expanded = expand_line_sal_maybe (sals.sals[0]); ++ if (pre_expanded) ++ expanded = sals; ++ else ++ expanded = expand_line_sal_maybe (sals.sals[0]); + } + + make_cleanup (xfree, sals.sals); +@@ -10683,6 +10928,7 @@ breakpoint_re_set_one (void *bint) case bp_exception: case bp_exception_resume: case bp_jit_event: @@ -1194,7 +1289,7 @@ index c55e5c0..1a71cf8 100644 break; } -@@ -10844,11 +11045,25 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *, +@@ -10849,11 +11095,25 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *, ALL_BREAKPOINTS_SAFE (b, tmp) if (b->number == num) { @@ -1224,7 +1319,7 @@ index c55e5c0..1a71cf8 100644 break; } if (match == 0) -@@ -11979,6 +12194,24 @@ all_tracepoints (void) +@@ -11984,6 +12244,24 @@ all_tracepoints (void) return tp_vec; } @@ -1249,7 +1344,7 @@ index c55e5c0..1a71cf8 100644 /* This help string is used for the break, hbreak, tbreak and thbreak commands. It is defined as a macro to prevent duplication. -@@ -12598,4 +12831,7 @@ inferior in all-stop mode, gdb behaves as if always-inserted mode is off."), +@@ -12603,4 +12881,7 @@ inferior in all-stop mode, gdb behaves as if always-inserted mode is off."), automatic_hardware_breakpoints = 1; observer_attach_about_to_proceed (breakpoint_about_to_proceed); @@ -1258,7 +1353,7 @@ index c55e5c0..1a71cf8 100644 +#endif } diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h -index bd09713..587e3a1 100644 +index d5af928..c8a3161 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -149,6 +149,19 @@ enum bptype @@ -1293,7 +1388,7 @@ index bd09713..587e3a1 100644 char *function_name; /* Details of the placed breakpoint, when inserted. */ -@@ -888,6 +906,9 @@ extern int breakpoint_thread_match (struct address_space *, +@@ -890,6 +908,9 @@ extern int breakpoint_thread_match (struct address_space *, extern void until_break_command (char *, int, int); @@ -1303,11 +1398,23 @@ index bd09713..587e3a1 100644 extern void breakpoint_re_set (void); extern void breakpoint_re_set_thread (struct breakpoint *); +@@ -1191,4 +1212,11 @@ extern struct breakpoint *iterate_over_breakpoints (int (*) (struct breakpoint * + + extern int user_breakpoint_p (struct breakpoint *); + ++/* Set or clear a SystemTap semaphore. LOC is the location which may ++ hold a semaphore. SET is non-zero if the semaphore should be set, ++ or zero if the semaphore should be cleared. Semaphores act as ++ reference counters, so calls to this function must be paired. */ ++ ++extern void modify_semaphore (struct bp_location *location, int set); ++ + #endif /* !defined (BREAKPOINT_H) */ diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c -index c70fa4b..6bc3397 100644 +index 2e23dd7..aefc807 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c -@@ -626,9 +626,14 @@ c_type_print_varspec_suffix (struct type *type, +@@ -625,9 +625,14 @@ c_type_print_varspec_suffix (struct type *type, fprintf_filtered (stream, ")"); fprintf_filtered (stream, "["); @@ -1369,7 +1476,7 @@ index 11cf2e6..9a2a8f8 100644 FLAGS_TO_PASS = \ "prefix=$(prefix)" \ diff --git a/gdb/dbxread.c b/gdb/dbxread.c -index 8242cf8..b2db699 100644 +index 51ddd9d..a59ae10 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1,6 +1,6 @@ @@ -1380,7 +1487,7 @@ index 8242cf8..b2db699 100644 Free Software Foundation, Inc. This file is part of GDB. -@@ -3586,6 +3586,7 @@ static const struct sym_fns aout_sym_fns = +@@ -3587,6 +3587,7 @@ static const struct sym_fns aout_sym_fns = default_symfile_segments, /* Get segment information from a file. */ NULL, default_symfile_relocate, /* Relocate a debug section. */ @@ -1402,7 +1509,7 @@ index 9409dde..f0fa4c7 100644 extern char *xfullpath (const char *); diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo -index fcbbd6c..876749d 100644 +index e023058..bf54e9a 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -1177,6 +1177,16 @@ for remote debugging. @@ -1481,7 +1588,7 @@ index fcbbd6c..876749d 100644 @c @ifclear BARETARGET @node Error in Breakpoints @subsection ``Cannot insert breakpoints'' -@@ -6411,6 +6466,29 @@ specify the function unambiguously, e.g., if there are several +@@ -6414,6 +6469,29 @@ specify the function unambiguously, e.g., if there are several functions with identical names in different source files. @end table @@ -1511,7 +1618,7 @@ index fcbbd6c..876749d 100644 @end table -@@ -8497,6 +8575,10 @@ to match the format in which the data was printed. +@@ -8500,6 +8578,10 @@ to match the format in which the data was printed. The variable @code{$_exitcode} is automatically set to the exit code when the program being debugged terminates. @@ -1522,7 +1629,7 @@ index fcbbd6c..876749d 100644 @item $_sdata @vindex $_sdata@r{, inspect, convenience variable} The variable @code{$_sdata} contains extra collected static tracepoint -@@ -20689,8 +20771,6 @@ containing @code{end}. For example: +@@ -20692,8 +20774,6 @@ containing @code{end}. For example: @smallexample (@value{GDBP}) python @@ -1531,7 +1638,7 @@ index fcbbd6c..876749d 100644 >print 23 >end 23 -@@ -20703,6 +20783,14 @@ in a Python script. This can be controlled using @code{maint set +@@ -20706,6 +20786,14 @@ in a Python script. This can be controlled using @code{maint set python print-stack}: if @code{on}, the default, then Python stack printing is enabled; if @code{off}, then Python stack printing is disabled. @@ -1546,7 +1653,7 @@ index fcbbd6c..876749d 100644 @end table It is also possible to execute a Python script from the @value{GDBN} -@@ -20724,6 +20812,14 @@ and thus is always available. +@@ -20727,6 +20815,14 @@ and thus is always available. @cindex python api @cindex programming in python @@ -1707,12 +1814,12 @@ index d16c865..946ad95 100644 This observer is used for internal testing. Do not use. See testsuite/gdb.gdb/observer.exp. diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c -index 8d1810e..4a3e2f2 100644 +index 91fccf9..4cd5949 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c -@@ -905,6 +905,13 @@ execute_stack_op (struct dwarf_expr_context *ctx, - ctx->dwarf_call (ctx, result); - goto no_push; +@@ -912,6 +912,13 @@ execute_stack_op (struct dwarf_expr_context *ctx, + ctx->num_pieces = 0; + goto abort_expression; + case DW_OP_push_object_address: + if (ctx->get_object_address == NULL) @@ -1746,7 +1853,7 @@ index 78ff53f..c83f23d 100644 /* The current depth of dwarf expression recursion, via DW_OP_call*, DW_OP_fbreg, DW_OP_push_object_address, etc., and the maximum diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c -index 9fd8df0..cbfb6d6 100644 +index 4c13307..9b0e1ad 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -134,6 +134,9 @@ struct dwarf_expr_baton @@ -1779,7 +1886,7 @@ index 9fd8df0..cbfb6d6 100644 + gdb_assert (symbaton != NULL); + *start = symbaton->data; + *length = symbaton->size; -+ } + } + else if (SYMBOL_COMPUTED_OPS (framefunc) == &dwarf2_missing_funcs) + { + struct dwarf2_locexpr_baton *symbaton; @@ -1788,7 +1895,7 @@ index 9fd8df0..cbfb6d6 100644 + gdb_assert (symbaton == NULL); + *start = NULL; + *length = 0; /* unused */ - } ++ } + else + internal_error (__FILE__, __LINE__, + _("Unsupported SYMBOL_COMPUTED_OPS %p for \"%s\""), @@ -2048,7 +2155,7 @@ index 9fd8df0..cbfb6d6 100644 retval = allocate_value_lazy (type); VALUE_LVAL (retval) = lval_memory; if (in_stack_memory) -@@ -2850,11 +3011,51 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, +@@ -2855,11 +3016,51 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, dlbaton->per_cu); } @@ -2123,7 +2230,7 @@ index 96a490e..b0ebb06 100644 /* Compile a DWARF location expression to an agent expression. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index 810f66a..f8d20ac 100644 +index 0cc5ca0..b7feb09 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1211,6 +1211,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu, @@ -2798,13 +2905,13 @@ index 810f66a..f8d20ac 100644 initialized (if not already set). There are a few types where we should not be doing so, because the type-specific area is diff --git a/gdb/elfread.c b/gdb/elfread.c -index e638a36..c1893fe 100644 +index dacc6f0..f796851 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c -@@ -37,6 +37,14 @@ - #include "complaints.h" +@@ -38,6 +38,13 @@ #include "demangle.h" #include "psympriv.h" + #include "filenames.h" +#include "gdbtypes.h" +#include "value.h" +#include "infcall.h" @@ -2812,11 +2919,10 @@ index e638a36..c1893fe 100644 +#include "regcache.h" +#include "stap-probe.h" +#include "arch-utils.h" -+#include "gdbtypes.h" extern void _initialize_elfread (void); -@@ -55,8 +63,30 @@ struct elfinfo +@@ -56,8 +63,30 @@ struct elfinfo asection *mdebugsect; /* Section pointer for .mdebug section */ }; @@ -2847,7 +2953,7 @@ index e638a36..c1893fe 100644 /* Locate the segments in ABFD. */ static struct symfile_segment_data * -@@ -184,7 +214,8 @@ record_minimal_symbol (const char *name, int name_len, int copy_name, +@@ -185,7 +214,8 @@ record_minimal_symbol (const char *name, int name_len, int copy_name, { struct gdbarch *gdbarch = get_objfile_arch (objfile); @@ -2857,7 +2963,7 @@ index e638a36..c1893fe 100644 address = gdbarch_smash_text_address (gdbarch, address); return prim_record_minimal_symbol_full (name, name_len, copy_name, address, -@@ -393,7 +424,10 @@ elf_symtab_read (struct objfile *objfile, int type, +@@ -394,7 +424,10 @@ elf_symtab_read (struct objfile *objfile, int type, { if (sym->flags & (BSF_GLOBAL | BSF_WEAK)) { @@ -2869,7 +2975,7 @@ index e638a36..c1893fe 100644 } else if ((sym->name[0] == '.' && sym->name[1] == 'L') || ((sym->flags & BSF_LOCAL) -@@ -577,6 +611,467 @@ elf_symtab_read (struct objfile *objfile, int type, +@@ -578,6 +611,467 @@ elf_symtab_read (struct objfile *objfile, int type, do_cleanups (back_to); } @@ -3337,7 +3443,7 @@ index e638a36..c1893fe 100644 struct build_id { size_t size; -@@ -817,6 +1312,8 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags) +@@ -819,6 +1313,8 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags) bfd_errmsg (bfd_get_error ())); elf_symtab_read (objfile, ST_DYNAMIC, dynsymcount, dyn_symbol_table, 0); @@ -3346,7 +3452,7 @@ index e638a36..c1893fe 100644 } /* Add synthetic symbols - for instance, names for any PLT entries. */ -@@ -1071,7 +1568,243 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst) +@@ -1071,7 +1567,238 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst) complaint (&symfile_complaints, _("elf/stab section information missing for %s"), filename); } @@ -3444,11 +3550,6 @@ index e638a36..c1893fe 100644 + return base; +} + -+/* FIXME JUST FOR TESTING **/ -+static int -+elf_get_probe_argument_count (struct objfile *objfile, -+ const struct stap_probe *probe); -+ +static const struct stap_probe * +elf_get_probes (struct objfile *objfile, int *num_probes) +{ @@ -3590,7 +3691,7 @@ index e638a36..c1893fe 100644 /* Register that we are able to handle ELF object file formats. */ static const struct sym_fns elf_sym_fns = -@@ -1086,6 +1819,7 @@ static const struct sym_fns elf_sym_fns = +@@ -1086,6 +1813,7 @@ static const struct sym_fns elf_sym_fns = elf_symfile_segments, /* Get segment information from a file. */ NULL, default_symfile_relocate, /* Relocate a debug section. */ @@ -3598,7 +3699,7 @@ index e638a36..c1893fe 100644 &psym_functions }; -@@ -1104,6 +1838,7 @@ static const struct sym_fns elf_sym_fns_lazy_psyms = +@@ -1104,6 +1832,7 @@ static const struct sym_fns elf_sym_fns_lazy_psyms = elf_symfile_segments, /* Get segment information from a file. */ NULL, default_symfile_relocate, /* Relocate a debug section. */ @@ -3606,7 +3707,7 @@ index e638a36..c1893fe 100644 &psym_functions }; -@@ -1121,11 +1856,27 @@ static const struct sym_fns elf_sym_fns_gdb_index = +@@ -1121,11 +1850,27 @@ static const struct sym_fns elf_sym_fns_gdb_index = elf_symfile_segments, /* Get segment information from a file. */ NULL, default_symfile_relocate, /* Relocate a debug section. */ @@ -6606,7 +6707,7 @@ index 7cee7c8..751c9ef 100644 add_setshow_boolean_cmd ("observer", no_class, &observer_mode_1, _("\ diff --git a/gdb/linespec.c b/gdb/linespec.c -index 3959402..24bf534 100644 +index 70df3ca..af53f97 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -43,6 +43,7 @@ @@ -6617,7 +6718,7 @@ index 3959402..24bf534 100644 /* We share this one with symtab.c, but it is not exported widely. */ -@@ -756,6 +757,7 @@ keep_name_info (char *ptr) +@@ -762,6 +763,7 @@ keep_name_info (char *ptr) PC returned is 0. FILE:FUNCTION -- likewise, but prefer functions in that file. *EXPR -- line in which address EXPR appears. @@ -6625,16 +6726,31 @@ index 3959402..24bf534 100644 This may all be followed by an "if EXPR", which we ignore. -@@ -823,6 +825,9 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab, +@@ -837,6 +839,9 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab, if (**argptr == '*') return decode_indirect (argptr); + if (strncmp (*argptr, "probe:", 6) == 0) -+ return parse_stap_probe (argptr); ++ return parse_stap_probe (argptr, canonical, not_found_ptr); + is_quoted = (strchr (get_gdb_completer_quote_characters (), **argptr) != NULL); +diff --git a/gdb/linespec.h b/gdb/linespec.h +index d8d2ec9..458235c 100644 +--- a/gdb/linespec.h ++++ b/gdb/linespec.h +@@ -30,6 +30,10 @@ struct linespec_result + display mechanism would do the wrong thing. */ + int special_display; + ++ /* If non-zero, the linespec result should be considered to be a ++ "pre-expanded" multi-location linespec. */ ++ int pre_expanded; ++ + /* If non-NULL, an array of canonical names for returned + symtab_and_line objects. The array has as many elements as the + `nelts' field in the symtabs_and_line returned by decode_line_1. diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 732812d..03b3d19 100644 --- a/gdb/linux-nat.c @@ -6896,10 +7012,10 @@ index a401846..26dca8c 100644 varobj_update_one (var, print_values, 1 /* explicit */); diff --git a/gdb/minsyms.c b/gdb/minsyms.c -index 4ae7f27..97d425e 100644 +index 4551b07..b054e3f 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c -@@ -333,8 +333,9 @@ lookup_minimal_symbol_text (const char *name, struct objfile *objf) +@@ -334,8 +334,9 @@ lookup_minimal_symbol_text (const char *name, struct objfile *objf) msymbol = msymbol->hash_next) { if (strcmp (SYMBOL_LINKAGE_NAME (msymbol), name) == 0 && @@ -6911,7 +7027,7 @@ index 4ae7f27..97d425e 100644 { switch (MSYMBOL_TYPE (msymbol)) { -@@ -696,6 +697,69 @@ lookup_minimal_symbol_by_pc (CORE_ADDR pc) +@@ -697,6 +698,69 @@ lookup_minimal_symbol_by_pc (CORE_ADDR pc) return lookup_minimal_symbol_by_pc_section (pc, NULL); } @@ -6981,7 +7097,7 @@ index 4ae7f27..97d425e 100644 /* Find the minimal symbol named NAME, and return both the minsym struct and its objfile. This only checks the linkage name. Sets *OBJFILE_P and returns the minimal symbol, if it is found. If it -@@ -765,6 +829,7 @@ prim_record_minimal_symbol (const char *name, CORE_ADDR address, +@@ -766,6 +830,7 @@ prim_record_minimal_symbol (const char *name, CORE_ADDR address, switch (ms_type) { case mst_text: @@ -6989,7 +7105,7 @@ index 4ae7f27..97d425e 100644 case mst_file_text: case mst_solib_trampoline: section = SECT_OFF_TEXT (objfile); -@@ -1230,7 +1295,8 @@ find_solib_trampoline_target (struct frame_info *frame, CORE_ADDR pc) +@@ -1231,7 +1296,8 @@ find_solib_trampoline_target (struct frame_info *frame, CORE_ADDR pc) { ALL_MSYMBOLS (objfile, msymbol) { @@ -7440,10 +7556,10 @@ index 049cde8..f3d35ec 100644 return ret; diff --git a/gdb/printcmd.c b/gdb/printcmd.c -index 81360ad..8fa9a99 100644 +index f1ebb7e..e97d7f1 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c -@@ -977,6 +977,11 @@ print_command_1 (char *exp, int inspect, int voidprint) +@@ -975,6 +975,11 @@ print_command_1 (char *exp, int inspect, int voidprint) else val = access_value_history (0); @@ -7455,7 +7571,7 @@ index 81360ad..8fa9a99 100644 if (voidprint || (val && value_type (val) && TYPE_CODE (value_type (val)) != TYPE_CODE_VOID)) { -@@ -1478,6 +1483,24 @@ x_command (char *exp, int from_tty) +@@ -1476,6 +1481,24 @@ x_command (char *exp, int from_tty) set_internalvar (lookup_internalvar ("__"), last_examine_value); } } @@ -7480,7 +7596,7 @@ index 81360ad..8fa9a99 100644 /* Add an expression to the auto-display chain. -@@ -2872,4 +2895,8 @@ Show printing of source filename and line number with ."), NULL, +@@ -2870,4 +2893,8 @@ Show printing of source filename and line number with ."), NULL, add_com ("eval", no_class, eval_command, _("\ Convert \"printf format string\", arg1, arg2, arg3, ..., argn to\n\ a command line, and call it.")); @@ -8703,10 +8819,10 @@ index 0888b69..c3efd5b 100644 else diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c new file mode 100644 -index 0000000..eb2fb7f +index 0000000..e251bd3 --- /dev/null +++ b/gdb/stap-probe.c -@@ -0,0 +1,1939 @@ +@@ -0,0 +1,2031 @@ +/* Systemtap probe support for GDB. + + Copyright (C) 2011 Free Software Foundation, Inc. @@ -8742,6 +8858,7 @@ index 0000000..eb2fb7f +#include "user-regs.h" +#include "complaints.h" +#include "cli/cli-utils.h" ++#include "linespec.h" + +#include + @@ -8809,7 +8926,7 @@ index 0000000..eb2fb7f + struct agent_expr *aexpr; + + /* The value we are modifying (for agent expression). */ -+ struct axs_value *value; ++ struct axs_value *avalue; +}; + +/* This dummy variable is used when parsing a probe's argument fails. @@ -8823,12 +8940,20 @@ index 0000000..eb2fb7f + the left side of the expression, and PREC is the precedence of the + last operator identified before calling the function. */ + -+static struct value * -+stap_evaluate_probe_argument_2 (struct stap_evaluation_info *eval_info, -+ struct value *lhs, int prec); ++static struct value *stap_evaluate_probe_argument_2 ++ (struct stap_evaluation_info *eval_info, ++ struct value *lhs, int prec); + -+static struct value * -+stap_evaluate_conditionally (struct stap_evaluation_info *eval_info); ++/* This function is responsible for checking the necessary type of evaluation ++ depending on what is the next "thing" in the buffer. Valid values are: ++ ++ - Unary operators; ++ - Integer constants; ++ - Register displacement, indirection, and direct access; ++ - Parenthesized operand. */ ++ ++static struct value *stap_evaluate_conditionally ++ (struct stap_evaluation_info *eval_info); + +static void +stap_skip_whitespace_cond (char **s, int inside_paren) @@ -9350,6 +9475,9 @@ index 0000000..eb2fb7f + return ret; +} + ++/* Given the operator OPCODE, this function generates agent bytecode ++ for it. */ ++ +static void +stap_opcode_to_ax (struct stap_evaluation_info *eval_info, + enum exp_opcode opcode) @@ -9363,7 +9491,6 @@ index 0000000..eb2fb7f + break; + + case BINOP_DIV: -+ /* FIXME: Should we sign-extend the operands? */ + ax_simple (expr, aop_div_signed); + break; + @@ -9372,7 +9499,6 @@ index 0000000..eb2fb7f + break; + + case BINOP_LESS: -+ /* FIXME: Should we sign-extend the operands? */ + ax_simple (expr, aop_less_signed); + break; + @@ -9413,8 +9539,7 @@ index 0000000..eb2fb7f + break; + + case BINOP_LOGICAL_OR: -+ /* FIXME: ????? */ -+// ax_simple (expr, aop_ ++ error (_("Operator logical-or (`||') not supported yet.")); + break; + + case BINOP_BITWISE_AND: @@ -9422,7 +9547,7 @@ index 0000000..eb2fb7f + break; + + case BINOP_LOGICAL_AND: -+ /* FIXME: ???? */ ++ error (_("Operator logical-and (`&&') not supported yet.")); + break; + + case BINOP_BITWISE_XOR: @@ -9489,12 +9614,19 @@ index 0000000..eb2fb7f +#define REG_NAME_MAX_SIZE 20 + char regname[REG_NAME_MAX_SIZE + 1]; + int len, regnum, indirect_p = 0; -+ struct value *ret; ++ struct value *ret = NULL; + + /* The function which called us did not check if the expression + buffer was empty. */ + gdb_assert (s && *s); + ++ if (eval_info->compiling_p) ++ /* If we are compiling, we cannot return NULL because that would ++ lead to errors in future evaluations. That's why we just make ++ this dummy value, representing that the return value of this ++ function is not NULL. */ ++ ret = value_from_longest (builtin_type (gdbarch)->builtin_int, 0); ++ + /* Valid register name on x86 platforms are: + + [paren]%{a-z0-9}[paren] @@ -9535,7 +9667,7 @@ index 0000000..eb2fb7f + + len = s - start; + -+ if (*s == ')') ++ if (indirect_p && *s == ')') + ++s; + + if (len >= REG_NAME_MAX_SIZE) @@ -9560,7 +9692,7 @@ index 0000000..eb2fb7f + if (indirect_p) + { + struct type *t = NULL; -+ enum agent_op aop; ++ enum agent_op aop = aop_ref32; + + /* If the user has specified that the register must be indirected, + we should know what's the correct type to cast it before making @@ -9572,10 +9704,21 @@ index 0000000..eb2fb7f + { + case STAP_ARG_BITNESS_UNDEFINED: + if (eval_info->compiling_p) -+ aop = aop_ref32; ++ { ++ if (gdbarch_addr_bit (gdbarch) == 32) ++ aop = aop_ref32; ++ else ++ aop = aop_ref64; ++ } + else -+ t = lookup_pointer_type -+ (builtin_type (gdbarch)->builtin_unsigned_long); ++ { ++ if (gdbarch_addr_bit (gdbarch) == 32) ++ t = lookup_pointer_type ++ (builtin_type (gdbarch)->builtin_uint32); ++ else ++ t = lookup_pointer_type ++ (builtin_type (gdbarch)->builtin_uint64); ++ } + break; + + case STAP_ARG_BITNESS_32BIT_SIGNED: @@ -9621,7 +9764,6 @@ index 0000000..eb2fb7f + if (eval_info->compiling_p) + { + ax_const_l (eval_info->aexpr, value_as_long (displacement)); -+ /* FIXME: Is this correct? */ + ax_simple (eval_info->aexpr, aop_add); + } + else @@ -9629,7 +9771,14 @@ index 0000000..eb2fb7f + } + + if (eval_info->compiling_p) -+ ax_simple (eval_info->aexpr, aop); ++ { ++ if (trace_kludge) ++ { ++ gdb_assert (aop == aop_ref32 || aop == aop_ref64); ++ ax_trace_quick (eval_info->aexpr, aop == aop_ref32 ? 4 : 8); ++ } ++ ax_simple (eval_info->aexpr, aop); ++ } + else + { + ret = value_cast (t, ret); @@ -9641,7 +9790,7 @@ index 0000000..eb2fb7f + some modifications to it before. */ + eval_info->exp_buf = s; + -+ return eval_info->compiling_p ? (struct value *) 1 : ret; ++ return ret; +} + +/* This function tries to evaluate a single operand of the expression. @@ -9658,7 +9807,14 @@ index 0000000..eb2fb7f + struct gdbarch *gdbarch = eval_info->gdbarch; + struct frame_info *frame = eval_info->frame; + enum stap_arg_bitness bitness = eval_info->bitness; -+ struct value *res; ++ struct value *res = NULL; ++ ++ if (eval_info->compiling_p) ++ /* If we are compiling, we cannot return NULL because that would ++ lead to errors in future evaluations. That's why we just make ++ this dummy value, representing that the return value of this ++ function is not NULL. */ ++ res = value_from_longest (builtin_type (gdbarch)->builtin_int, 0); + + switch (*eval_info->exp_buf) + { @@ -9666,7 +9822,7 @@ index 0000000..eb2fb7f + { + char c = *eval_info->exp_buf; + -+ /* This is a binary operator (either `-' or `~'). ++ /* This is an unary operator (either `-' or `~'). + + If it is followed by a parenthesis, and this parenthesis + is NOT followed by a `%', then we are dealing with an expression @@ -9831,6 +9987,7 @@ index 0000000..eb2fb7f + { + /* Register access, with or without indirection. */ + res = stap_fetch_reg_value (eval_info, /*displacement=*/NULL); ++ eval_info->exp_buf = skip_spaces (eval_info->exp_buf); + } + break; + @@ -9841,17 +9998,9 @@ index 0000000..eb2fb7f + } + } + -+ return eval_info->compiling_p ? (struct value *) 1 : res; ++ return res; +} + -+/* This function is responsible for checking the necessary type of evaluation -+ depending on what is the next "thing" in the buffer. Valid values are: -+ -+ - Unary operators; -+ - Integer constants; -+ - Register displacement, indirection, and direct access; -+ - Parenthesized operand. */ -+ +static struct value * +stap_evaluate_conditionally (struct stap_evaluation_info *eval_info) +{ @@ -9879,6 +10028,7 @@ index 0000000..eb2fb7f + if (*eval_info->exp_buf != ')') + error (_("Missign close-paren on expression `%s'."), + eval_info->saved_expr); ++ + ++eval_info->exp_buf; + eval_info->exp_buf = skip_spaces (eval_info->exp_buf); + } @@ -10014,6 +10164,7 @@ index 0000000..eb2fb7f + /* We are not compiling to an agent expression. */ + eval_info.compiling_p = 0; + eval_info.aexpr = NULL; ++ eval_info.avalue = NULL; + + res = stap_evaluate_probe_argument_2 (&eval_info, + /*lhs=*/NULL, /*prec=*/0); @@ -10060,6 +10211,7 @@ index 0000000..eb2fb7f + int n) +{ + struct stap_evaluation_info eval_info; ++ struct gdbarch *gdbarch = expr->gdbarch; + char *s = (char *) probe->parsed_args->arg[n].arg_str; + + /* Filling necessary information for evaluation function. */ @@ -10071,6 +10223,42 @@ index 0000000..eb2fb7f + /* We are compiling to an agent expression. */ + eval_info.compiling_p = 1; + eval_info.aexpr = expr; ++ eval_info.avalue = value; ++ ++ /* We can always use this kind. */ ++ value->kind = axs_rvalue; ++ ++ /* Figuring out the correct type for this axs_value. */ ++ switch (eval_info.bitness) ++ { ++ case STAP_ARG_BITNESS_UNDEFINED: ++ if (gdbarch_addr_bit (gdbarch) == 32) ++ value->type = builtin_type (gdbarch)->builtin_uint32; ++ else ++ value->type = builtin_type (gdbarch)->builtin_uint64; ++ break; ++ ++ case STAP_ARG_BITNESS_32BIT_SIGNED: ++ value->type = builtin_type (gdbarch)->builtin_int32; ++ break; ++ ++ case STAP_ARG_BITNESS_32BIT_UNSIGNED: ++ value->type = builtin_type (gdbarch)->builtin_uint32; ++ break; ++ ++ case STAP_ARG_BITNESS_64BIT_SIGNED: ++ value->type = builtin_type (gdbarch)->builtin_int64; ++ break; ++ ++ case STAP_ARG_BITNESS_64BIT_UNSIGNED: ++ value->type = builtin_type (gdbarch)->builtin_uint64; ++ break; ++ ++ default: ++ internal_error (__FILE__, __LINE__, ++ _("Undefined bitness for probe.")); ++ break; ++ } + + stap_evaluate_probe_argument_2 (&eval_info, + /*lhs=*/NULL, /*prec=*/0); @@ -10389,9 +10577,11 @@ index 0000000..eb2fb7f +} + +struct symtabs_and_lines -+parse_stap_probe (char **argptr) ++parse_stap_probe (char **argptr, struct linespec_result *canonical, ++ int *not_found_ptr) +{ -+ char *arg = extract_arg (argptr); ++ char *full_arg = extract_arg (argptr); ++ char *arg = xstrdup (full_arg); + char *objfile_name = NULL, *provider = NULL, *name, *p; + struct cleanup *cleanup; + struct symtabs_and_lines result; @@ -10403,6 +10593,7 @@ index 0000000..eb2fb7f + /* The caller ensured that this starts with 'probe:'. */ + gdb_assert (arg && strncmp (arg, "probe:", 6) == 0); + cleanup = make_cleanup (xfree, arg); ++ make_cleanup (xfree, full_arg); + arg += 6; + + /* Extract each word from the argument, separated by ":"s. */ @@ -10441,6 +10632,9 @@ index 0000000..eb2fb7f + if (objfile_name && *objfile_name == '\0') + error (_("invalid objfile name")); + ++ if (canonical) ++ canonical->canonical = NULL; ++ + ALL_OBJFILES (objfile) + { + const struct stap_probe *probes; @@ -10477,15 +10671,32 @@ index 0000000..eb2fb7f + sal->section = find_pc_overlay (sal->pc); + sal->pspace = current_program_space; + sal->semaphore = probes[i].sem_addr; ++ ++ if (canonical) ++ { ++ canonical->canonical = xrealloc (canonical->canonical, ++ result.nelts * sizeof (char **)); ++ canonical->canonical[result.nelts - 1] = xstrdup (full_arg); ++ } + } + } + + if (result.nelts == 0) -+ throw_error (NOT_FOUND_ERROR, -+ _("No probe matching objfile=`%s', provider=`%s', name=`%s'"), -+ objfile_name ? objfile_name : _(""), -+ provider ? provider : _(""), -+ name); ++ { ++ if (not_found_ptr) ++ *not_found_ptr = 1; ++ throw_error (NOT_FOUND_ERROR, ++ _("No probe matching objfile=`%s', provider=`%s', name=`%s'"), ++ objfile_name ? objfile_name : _(""), ++ provider ? provider : _(""), ++ name); ++ } ++ ++ if (canonical) ++ { ++ canonical->special_display = 1; ++ canonical->pre_expanded = 1; ++ } + + do_cleanups (cleanup); + @@ -10596,9 +10807,6 @@ index 0000000..eb2fb7f + error (_("Invalid probe argument %d -- probe has %d arguments available"), + sel, n_probes); + -+ /* FIXME: this is temporary until AX translation is implemented. */ -+ if (!objfile->sf->sym_probe_fns->sym_compile_to_ax) -+ error (_("cannot translate `$_probe_arg%d' to bytecode"), sel); + objfile->sf->sym_probe_fns->sym_compile_to_ax (objfile, pc_probe, + expr, value, sel); +} @@ -10648,10 +10856,10 @@ index 0000000..eb2fb7f +} diff --git a/gdb/stap-probe.h b/gdb/stap-probe.h new file mode 100644 -index 0000000..3a7941f +index 0000000..d700b19 --- /dev/null +++ b/gdb/stap-probe.h -@@ -0,0 +1,110 @@ +@@ -0,0 +1,113 @@ +/* Systemtap probe support for GDB. + + Copyright (C) 2011 Free Software Foundation, Inc. @@ -10676,6 +10884,7 @@ index 0000000..3a7941f + +struct stap_args_info; +struct axs_value; ++struct linespec_result; + +struct stap_probe +{ @@ -10707,7 +10916,9 @@ index 0000000..3a7941f + returns a symtabs_and_lines object and updates *ARGPTR or throws an + error. */ + -+extern struct symtabs_and_lines parse_stap_probe (char **argptr); ++extern struct symtabs_and_lines parse_stap_probe (char **argptr, ++ struct linespec_result *canon, ++ int *not_found_ptr); + +/* Search OBJFILE for a probe with the given PROVIDER and NAME. If a + probe is found, return it. If no probe is found, return NULL. */ @@ -10843,10 +11054,10 @@ index a0151ea..752c46a 100644 reader. */ const struct quick_symbol_functions *qf; diff --git a/gdb/symmisc.c b/gdb/symmisc.c -index 4be8106..081b532 100644 +index 74e4941..66c2f05 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c -@@ -264,6 +264,9 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) +@@ -265,6 +265,9 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) case mst_text: ms_type = 'T'; break; @@ -10857,7 +11068,7 @@ index 4be8106..081b532 100644 ms_type = 'S'; break; diff --git a/gdb/symtab.c b/gdb/symtab.c -index 60bc585..734d312 100644 +index 3061f3c..0bcbbf7 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -770,6 +770,7 @@ init_sal (struct symtab_and_line *sal) @@ -12150,6 +12361,28 @@ index d8ee5c0..de4ba75 100644 + unsupported "$test (no GCC)" + } +} +diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp +index d58c519..abb1b05 100644 +--- a/gdb/testsuite/gdb.base/default.exp ++++ b/gdb/testsuite/gdb.base/default.exp +@@ -607,6 +607,17 @@ gdb_test_list_exact "show convenience" "show convenience" \ + {$_sdata = void} \ + {$_siginfo = void} \ + {$_thread = 0} \ ++ {$_probe_argc = } \ ++ {$_probe_arg0 = } \ ++ {$_probe_arg1 = } \ ++ {$_probe_arg2 = } \ ++ {$_probe_arg3 = } \ ++ {$_probe_arg4 = } \ ++ {$_probe_arg5 = } \ ++ {$_probe_arg6 = } \ ++ {$_probe_arg7 = } \ ++ {$_probe_arg8 = } \ ++ {$_probe_arg9 = } \ + } + + #test show directories diff --git a/gdb/testsuite/gdb.base/gnu-ifunc-lib.c b/gdb/testsuite/gdb.base/gnu-ifunc-lib.c new file mode 100644 index 0000000..dc6710e @@ -12543,7 +12776,7 @@ index 0000000..47e4b39 +} diff --git a/gdb/testsuite/gdb.base/stap-probe.exp b/gdb/testsuite/gdb.base/stap-probe.exp new file mode 100644 -index 0000000..bc3d40c +index 0000000..3fb7377 --- /dev/null +++ b/gdb/testsuite/gdb.base/stap-probe.exp @@ -0,0 +1,72 @@ @@ -12608,7 +12841,7 @@ index 0000000..bc3d40c + + # Set a breakpoint with multiple probe locations. + gdb_test "break probe:teste:two" \ -+ "Breakpoint .* at $hex.*Breakpoint .* at $hex.*" \ ++ "Breakpoint .* at $hex.*2 locations.*" \ + "set multi-location probe breakpoint$addendum" + + return 0 @@ -15546,8 +15779,220 @@ index 0000000..31f7656 + +extern void marker (void); +extern void forkoff (int nr); +diff --git a/gdb/testsuite/gdb.trace/stap-trace.c b/gdb/testsuite/gdb.trace/stap-trace.c +new file mode 100644 +index 0000000..27f317e +--- /dev/null ++++ b/gdb/testsuite/gdb.trace/stap-trace.c +@@ -0,0 +1,71 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2011 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#if USE_PROBES ++ ++#define _SDT_HAS_SEMAPHORES ++__extension__ unsigned short teste_user_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))); ++#define TEST teste_user_semaphore ++ ++__extension__ unsigned short teste_two_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))); ++#define TEST2 teste_two_semaphore ++ ++#else ++ ++#define TEST 1 ++#define TEST2 1 ++ ++#endif /* USE_PROBES */ ++ ++#include ++ ++/* We only support SystemTap and only the v3 form. */ ++#if _SDT_NOTE_TYPE != 3 ++#error "not using SystemTap v3 probes" ++#endif ++ ++void ++m1 (int x) ++{ ++ if (TEST2) ++ STAP_PROBE1 (teste, two, x); ++} ++ ++int ++f (int x) ++{ ++ if (TEST) ++ STAP_PROBE1(teste, user, x); ++ return x+5; ++} ++ ++void ++nothing (void) ++{ ++ int a = 1 + 1; ++ return; ++} ++ ++int ++main() ++{ ++ f (f (23)); ++ m1 (46); ++ nothing (); /* end-here */ ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.trace/stap-trace.exp b/gdb/testsuite/gdb.trace/stap-trace.exp +new file mode 100644 +index 0000000..189355f +--- /dev/null ++++ b/gdb/testsuite/gdb.trace/stap-trace.exp +@@ -0,0 +1,129 @@ ++# Copyright 2011 ++# Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++load_lib "trace-support.exp" ++ ++if $tracelevel then { ++ strace $tracelevel ++} ++ ++set testfile "stap-trace" ++set srcfile ${testfile}.c ++set executable $testfile ++set binfile $objdir/$subdir/$executable ++ ++set ws "\[\r\n\t \]+" ++set cr "\[\r\n\]+" ++ ++# Only x86 and x86_64 targets are supported for now. ++ ++if { ![istarget "x86_64-*"] && ![istarget "i?86-*"] } { ++ continue ++} ++ ++proc compile_stap_bin {{ arg "" }} { ++ global srcfile ++ global binfile ++ global srcdir ++ global subdir ++ ++ if { $arg != "" } { ++ set arg "additional_flags=$arg" ++ } ++ ++ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ ++ executable [concat $arg debug nowarnings]] != "" } { ++ untested "Could not compile ${srcfile}" ++ return -1 ++ } ++} ++ ++proc prepare_for_trace_test {} { ++ global executable ++ ++ clean_restart $executable ++ ++ if { ![runto_main] } { ++ perror "Could not run to `main'." ++ continue ++ } ++ ++ gdb_breakpoint [gdb_get_line_number "end-here"] ++} ++ ++proc run_trace_experiment { test_probe msg } { ++ global gdb_prompt ++ ++ set test "collect $msg: start trace experiment" ++ gdb_test_multiple "tstart" "$test" { ++ -re "^tstart\r\n$gdb_prompt $" { ++ pass "$test" ++ } ++ } ++ ++ gdb_test "continue" \ ++ "Continuing.*Breakpoint \[0-9\]+.*" \ ++ "collect $msg: run trace experiment" ++ gdb_test "tstop" \ ++ "\[\r\n\]+" \ ++ "collect $msg: stop trace experiment" ++ gdb_test "tfind start" \ ++ "#0 .*" \ ++ "collect $msg: tfind test frame" ++} ++ ++proc gdb_collect_probe_arg { msg probe val_arg0 } { ++ global gdb_prompt ++ global cr ++ ++ prepare_for_trace_test ++ ++ gdb_test "trace $probe" \ ++ "Tracepoint \[0-9\]+ at .*" \ ++ "collect $msg: set tracepoint" ++ gdb_trace_setactions "collect $msg: define actions" \ ++ "" \ ++ "collect \$_probe_arg0" "^$" ++ ++ # Begin the test. ++ run_trace_experiment $msg $probe ++ ++ gdb_test "print \$_probe_arg0" \ ++ "\\$\[0-9\]+ = $val_arg0$cr" \ ++ "collect $msg: collected probe arg0" ++} ++ ++compile_stap_bin "" ++ ++clean_restart $executable ++if { ![runto_main] } { ++ perror "Could not run to `main'." ++ continue ++} ++ ++if { ![gdb_target_supports_trace] } { ++ # Test cannot run on this target. ++ return 1; ++} ++ ++gdb_collect_probe_arg "probe args without semaphore" "probe:user" "23" ++gdb_exit ++ ++compile_stap_bin "-DUSE_PROBES" ++gdb_collect_probe_arg "probe args with semaphore" "probe:two" "46" ++ ++# Finished! ++gdb_test "tfind none" ".*" "" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp -index 6a2f1a2..c75a7f0 100644 +index a512527..654e3c9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -141,6 +141,11 @@ proc gdb_unload {} { @@ -15647,10 +16092,58 @@ index a25550f..87f0b41 100644 /* With multiple threads running while the one we're examining is stopped, the dcache can get stale without us being able to detect diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c -index 3ae35d0..e1d2e82 100644 +index 3ae35d0..d3cd593 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c -@@ -4497,7 +4497,8 @@ info_static_tracepoint_markers_command (char *arg, int from_tty) +@@ -1600,6 +1600,8 @@ start_tracing (void) + + for (ix = 0; VEC_iterate (breakpoint_p, tp_vec, ix, t); ix++) + { ++ struct bp_location *loc; ++ + if ((t->type == bp_fast_tracepoint + ? !may_insert_fast_tracepoints + : !may_insert_tracepoints)) +@@ -1608,6 +1610,9 @@ start_tracing (void) + t->number_on_target = 0; + target_download_tracepoint (t); + t->number_on_target = t->number; ++ ++ for (loc = t->loc; loc; loc = loc->next) ++ modify_semaphore (loc, 1); + } + VEC_free (breakpoint_p, tp_vec); + +@@ -1669,7 +1674,28 @@ trace_stop_command (char *args, int from_tty) + void + stop_tracing (void) + { ++ VEC(breakpoint_p) *tp_vec = NULL; ++ int ix; ++ struct breakpoint *t; ++ + target_trace_stop (); ++ ++ tp_vec = all_tracepoints (); ++ for (ix = 0; VEC_iterate (breakpoint_p, tp_vec, ix, t); ix++) ++ { ++ struct bp_location *loc; ++ ++ if ((t->type == bp_fast_tracepoint ++ ? !may_insert_fast_tracepoints ++ : !may_insert_tracepoints)) ++ continue; ++ ++ for (loc = t->loc; loc; loc = loc->next) ++ modify_semaphore (loc, 0); ++ } ++ ++ VEC_free (breakpoint_p, tp_vec); ++ + /* Should change in response to reply? */ + current_trace_status ()->running = 0; + } +@@ -4497,7 +4523,8 @@ info_static_tracepoint_markers_command (char *arg, int from_tty) available. */ static struct value * @@ -15660,7 +16153,7 @@ index 3ae35d0..e1d2e82 100644 { LONGEST size; gdb_byte *buf; -@@ -4676,6 +4677,13 @@ traceframe_available_memory (VEC(mem_range_s) **result, +@@ -4676,6 +4703,13 @@ traceframe_available_memory (VEC(mem_range_s) **result, return 0; } @@ -15674,7 +16167,7 @@ index 3ae35d0..e1d2e82 100644 /* module initialization */ void _initialize_tracepoint (void) -@@ -4686,7 +4694,7 @@ _initialize_tracepoint (void) +@@ -4686,7 +4720,7 @@ _initialize_tracepoint (void) value with a void typed value, and when we get here, gdbarch isn't initialized yet. At this point, we're quite sure there isn't another convenience variable of the same name. */ @@ -16037,7 +16530,7 @@ index 286ef9e..1fe58b1 100644 /* Read LEN bytes of target memory at address MEMADDR, placing the diff --git a/gdb/value.c b/gdb/value.c -index 2acb1df..abe774e 100644 +index 2acb1df..cf8dda0 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -43,6 +43,7 @@ @@ -16250,7 +16743,33 @@ index 2acb1df..abe774e 100644 break; case INTERNALVAR_VALUE: -@@ -3047,7 +3145,24 @@ value_from_history_ref (char *h, char **endp) +@@ -2080,14 +2178,22 @@ show_convenience (char *ignore, int from_tty) + get_user_print_options (&opts); + for (var = internalvars; var; var = var->next) + { ++ volatile struct gdb_exception e; ++ + if (!varseen) + { + varseen = 1; + } + printf_filtered (("$%s = "), var->name); +- value_print (value_of_internalvar (gdbarch, var), gdb_stdout, +- &opts); +- printf_filtered (("\n")); ++ ++ TRY_CATCH (e, RETURN_MASK_ERROR) ++ { ++ value_print (value_of_internalvar (gdbarch, var), gdb_stdout, ++ &opts); ++ printf_filtered (("\n")); ++ } ++ if (e.reason < 0) ++ printf_filtered (_("\n"), e.message); + } + if (!varseen) + printf_unfiltered (_("No debugger convenience variables now defined.\n" +@@ -3047,7 +3153,24 @@ value_from_history_ref (char *h, char **endp) struct value * coerce_ref (struct value *arg) { @@ -16276,7 +16795,7 @@ index 2acb1df..abe774e 100644 if (TYPE_CODE (value_type_arg_tmp) == TYPE_CODE_REF) arg = value_at_lazy (TYPE_TARGET_TYPE (value_type_arg_tmp), -@@ -3145,4 +3260,10 @@ VARIABLE is already initialized.")); +@@ -3145,4 +3268,10 @@ VARIABLE is already initialized.")); add_prefix_cmd ("function", no_class, function_command, _("\ Placeholder command for showing help on convenience functions."), &functionlist, "function ", 0, &cmdlist); diff --git a/gdb-rhel5-compat.patch b/gdb-rhel5-compat.patch index f269b39..7defddb 100644 --- a/gdb-rhel5-compat.patch +++ b/gdb-rhel5-compat.patch @@ -1,11 +1,11 @@ gdb/linux-nat.c: - Workaround RHEL-5 kernels for detaching SIGSTOPped processes (BZ 498595). -Index: gdb-7.2.50.20110104/gdb/elfread.c +Index: gdb-7.2.50.20110328/gdb/elfread.c =================================================================== ---- gdb-7.2.50.20110104.orig/gdb/elfread.c 2011-01-04 06:15:59.000000000 +0100 -+++ gdb-7.2.50.20110104/gdb/elfread.c 2011-01-04 06:17:54.000000000 +0100 -@@ -832,7 +832,7 @@ resolve_gnu_ifunc (const char *function_ +--- gdb-7.2.50.20110328.orig/gdb/elfread.c 2011-03-28 18:46:16.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/elfread.c 2011-03-28 18:48:19.000000000 +0200 +@@ -1083,7 +1083,7 @@ elf_gnu_ifunc_resolver_return_stop (stru #define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_FILENAMES 1 #define BUILD_ID_VERBOSE_BINARY_PARSE 2 @@ -14,9 +14,9 @@ Index: gdb-7.2.50.20110104/gdb/elfread.c static void show_build_id_verbose (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) -@@ -1920,8 +1920,10 @@ find_separate_debug_file_by_buildid (str - /* Prevent looping on a stripped .debug file. */ - if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0) +@@ -2173,8 +2173,10 @@ find_separate_debug_file_by_buildid (str + if (build_id_name != NULL + && filename_cmp (build_id_name, objfile->name) == 0) { +#if 0 /* RHEL-5 backward behavior compatibility. */ warning (_("\"%s\": separate debug info file has no debug info"), @@ -25,11 +25,11 @@ Index: gdb-7.2.50.20110104/gdb/elfread.c xfree (build_id_name); } else if (build_id_name != NULL) -Index: gdb-7.2.50.20110104/gdb/corelow.c +Index: gdb-7.2.50.20110328/gdb/corelow.c =================================================================== ---- gdb-7.2.50.20110104.orig/gdb/corelow.c 2011-01-04 06:15:57.000000000 +0100 -+++ gdb-7.2.50.20110104/gdb/corelow.c 2011-01-04 06:18:08.000000000 +0100 -@@ -280,7 +280,7 @@ add_to_thread_list (bfd *abfd, asection +--- gdb-7.2.50.20110328.orig/gdb/corelow.c 2011-03-28 18:46:16.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/corelow.c 2011-03-28 18:47:56.000000000 +0200 +@@ -282,7 +282,7 @@ add_to_thread_list (bfd *abfd, asection inferior_ptid = ptid; /* Yes, make it current. */ } @@ -38,11 +38,11 @@ Index: gdb-7.2.50.20110104/gdb/corelow.c static void build_id_locate_exec (int from_tty) -Index: gdb-7.2.50.20110104/gdb/linux-nat.c +Index: gdb-7.2.50.20110328/gdb/linux-nat.c =================================================================== ---- gdb-7.2.50.20110104.orig/gdb/linux-nat.c 2011-01-04 06:15:59.000000000 +0100 -+++ gdb-7.2.50.20110104/gdb/linux-nat.c 2011-01-04 06:17:54.000000000 +0100 -@@ -1762,8 +1762,22 @@ GPT: lwp %s had signal %s, but it is in +--- gdb-7.2.50.20110328.orig/gdb/linux-nat.c 2011-03-28 18:46:16.000000000 +0200 ++++ gdb-7.2.50.20110328/gdb/linux-nat.c 2011-03-28 18:47:56.000000000 +0200 +@@ -1774,8 +1774,22 @@ get_pending_status (struct lwp_info *lp, target_signal_to_string (signo)); } diff --git a/gdb-stap-warnings.patch b/gdb-stap-warnings.patch deleted file mode 100755 index 8e07e08..0000000 --- a/gdb-stap-warnings.patch +++ /dev/null @@ -1,59 +0,0 @@ -http://sourceware.org/ml/archer/2011-q1/msg00136.html -Subject: archer-sergiodj-stap -O2 -Wall warnings=errors - -Hi Sergio, - -with -O2 (+some -Wall or so options possibly - what applies for Fedora builds) -one gets: - -gcc-4.6.0-0.14.fc15.x86_64 -stap-probe.c: In function ‘stap_fetch_reg_value’: -stap-probe.c:923:12: error: ‘aop’ may be used uninitialized in this function [-Werror=uninitialized] -stap-probe.c:919:10: error: ‘ret’ may be used uninitialized in this function [-Werror=uninitialized] -stap-probe.c: In function ‘stap_evaluate_conditionally’: -stap-probe.c:1184:3: error: ‘res’ may be used uninitialized in this function [-Werror=uninitialized] - -The attached patch needs a review, I have only briefly checked it is not -completely bogus. - - -Thanks, -Jan - - ---- a/gdb/stap-probe.c -+++ b/gdb/stap-probe.c -@@ -780,7 +780,9 @@ stap_fetch_reg_value (struct stap_evaluation_info *eval_info, - #define REG_NAME_MAX_SIZE 20 - char regname[REG_NAME_MAX_SIZE + 1]; - int len, regnum, indirect_p = 0; -- struct value *ret; -+ /* GCC false warning: ‘ret’ may be used uninitialized in this function -+ */ -+ struct value *ret = NULL; - - /* The function which called us did not check if the expression - buffer was empty. */ -@@ -851,7 +853,9 @@ stap_fetch_reg_value (struct stap_evaluation_info *eval_info, - if (indirect_p) - { - struct type *t = NULL; -- enum agent_op aop; -+ /* GCC false warning: ‘aop’ may be used uninitialized in this function. -+ */ -+ enum agent_op aop = 0; - - /* If the user has specified that the register must be indirected, - we should know what's the correct type to cast it before making -@@ -949,7 +953,9 @@ stap_evaluate_single_operand (struct stap_evaluation_info *eval_info) - struct gdbarch *gdbarch = eval_info->gdbarch; - struct frame_info *frame = eval_info->frame; - enum stap_arg_bitness bitness = eval_info->bitness; -- struct value *res; -+ /* GCC false warning: ‘res’ may be used uninitialized in this function -+ */ -+ struct value *res = NULL; - - switch (*eval_info->exp_buf) - { - diff --git a/gdb.spec b/gdb.spec index fee9d75..54b2bb2 100644 --- a/gdb.spec +++ b/gdb.spec @@ -23,11 +23,11 @@ Name: gdb%{?_with_debug:-debug} # Set version to contents of gdb/version.in. # NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3 # and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch). -Version: 7.2.50.20110320 +Version: 7.2.50.20110328 # 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: 30%{?_with_upstream:.upstream}%{?dist} +Release: 31%{?_with_upstream:.upstream}%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain Group: Development/Debuggers @@ -92,11 +92,9 @@ Source3: gdb-gstack.man #=fedora Source4: gdbinit -%if 0%{?rhel:1} # libstdc++ pretty printers from GCC SVN HEAD (4.5 experimental). %define libstdcxxpython libstdc++-v3-python-r155978 -Source4: %{libstdcxxpython}.tar.bz2 -%endif # 0%{?rhel:1} +Source5: %{libstdcxxpython}.tar.bz2 # Work around out-of-date dejagnu that does not have KFAIL #=drop: That dejagnu is too old to be supported. @@ -558,12 +556,6 @@ Patch572: gdb-core-thread-internalerr-1of3.patch Patch573: gdb-core-thread-internalerr-2of3.patch Patch574: gdb-core-thread-internalerr-3of3.patch -# [stap] Fix -O2 warnings. -Patch576: gdb-stap-warnings.patch - -# Fix Ada support crash on uninitialized gdbarch. -Patch577: gdb-ada-gdbarch-crash.patch - BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa} Requires: readline%{?_isa} BuildRequires: readline-devel%{?_isa} @@ -706,7 +698,7 @@ This package provides INFO, HTML and PDF user manual for GDB. %if 0%{?rhel:1} # libstdc++ pretty printers. -tar xjf %{SOURCE4} +tar xjf %{SOURCE5} %endif # 0%{?rhel:1} # Files have `# ' statements breaking VPATH / find-debuginfo.sh . @@ -835,8 +827,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c %patch572 -p1 %patch573 -p1 %patch574 -p1 -%patch576 -p1 -%patch577 -p1 %patch390 -p1 %patch393 -p1 @@ -1262,6 +1252,10 @@ fi %{_infodir}/gdb.info* %changelog +* Mon Mar 28 2011 Jan Kratochvil - 7.2.50.20110328-31.fc15 +- Rebase to FSF GDB 7.2.50.20110328 (which is a 7.3 pre-release). +- Bundle %%{libstdcxxpython}.tar.bz2 unconditionally - for rebulds on RHELs. + * Sun Mar 20 2011 Jan Kratochvil - 7.2.50.20110320-30.fc15 - Fix threading internal error on corrupted memory (BZ 677654). - Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866). diff --git a/sources b/sources index fec21c3..e7f5ba7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 04e5c4b1b9e633422cc48990fe61958d libstdc++-v3-python-r155978.tar.bz2 -cc48d62b23b53816eb9639a8e9504d47 gdb-7.2.50.20110320.tar.bz2 +b590e0c12a506011ef2c27f677aa69f7 gdb-7.2.50.20110328.tar.bz2