public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-jankratochvil-fedora14: Merge remote branch 'origin/archer-pmuldoon-next-over-throw2' into archer-jankratochvil-fedora14
@ 2010-07-11 18:35 jkratoch
0 siblings, 0 replies; only message in thread
From: jkratoch @ 2010-07-11 18:35 UTC (permalink / raw)
To: archer-commits
The branch, archer-jankratochvil-fedora14 has been updated
via fb624da4134d39abb16cf4d90507f8e12a88c19b (commit)
via 8655904ea38376adb108ee376d6c610822a74ddd (commit)
via 5e561b0b33715ab69eb8d39ee94769cf1aa2fbdd (commit)
via 638f5a8799ff52710c19f521ea93a472d20e8b70 (commit)
via 76e3774fa55a284a06c06e4e37866967ea7a159c (commit)
via edae2a660623661b07c8f028f71ea55d76963b65 (commit)
via 7c9305b75c64ccd001f9b089cb7784eafcbfa4f3 (commit)
via 6e7cf281d3691122b21981f3b4748daf779efd67 (commit)
via 61603267beb2b3840ef536f0340e65911199a093 (commit)
via 939a68c5580a05ae000d5bbf3bff74e673ce4556 (commit)
via 3bb624524eef44fd78d0a278e5565877964e9350 (commit)
via d2f3d271e1bd14db6d66c1ff521d94200b29a928 (commit)
via 0370cf7d63f2b81f60909b10e2229e37e2c24d6f (commit)
via 6e71dce52b9c702afd2debee7e51846bfd703ffc (commit)
via 76eb8aca2be42ab83a3f61f1089b304c184fc171 (commit)
via 6a5e91e5fad1b8e575f3127597fda514d2c1bc6b (commit)
via 6b1c425da60b73c7750a970b230182cbf369aa56 (commit)
via 16b6a32f73a0866442f1b78182fce9e11c23a909 (commit)
via f00bb58eca8bc3df62014754b5a783c030af8ce1 (commit)
via 66faed36593d9577859e9942388c4edcd1928e35 (commit)
via f435677142e149f7298f24769d5047a9cec54977 (commit)
via 2c87c38ef12af6c5ae05aa0fffdb553280333c29 (commit)
via 6f316690aaae8e0cbc09fe722a50c71292a9b8c0 (commit)
via f8ca03e0097ae49c66cf33a50e3247bccd3a4a33 (commit)
via f85e2073beea96706b330b571c47949bfcacbb86 (commit)
via 802214c97d1661ad337aad0d011dded44f0b5ddd (commit)
via b1caf90bc3d7962cf69dc58731da5b23794e48e0 (commit)
via 11d4e9ae12b8f0af69795094b06f94a73d416570 (commit)
via 8ee8053cd1289310eedfdb50714154101b95c8fd (commit)
via 57303b18fb693cb2d299f3ae922ce2ba15070dd1 (commit)
via d2b671b591a5eb721f8f923a425b7e1c557c2a00 (commit)
via d7e58fcbe0967f09883b314a2b414f265c41121a (commit)
via 5b63371fc09b5eba3ab4fe2767fb51e582bf6a62 (commit)
via 713d061b09ead71bcccc8503fbe49df3a821f33f (commit)
via 3e0eac201acd7fa34ac0af58c850ddc87935d9f9 (commit)
via d63a1d4d58f8d2a8eba1f82c313a6566519e0f91 (commit)
via 936261a359a3e4a92afbd5fe7827f80a1d914b63 (commit)
via 2255cf5050e51b9b2b1c09aa9ae0c1dd12e6fdd2 (commit)
via 16ffb41b7fc53b336b8a5a616bc5a9b1dbcd342d (commit)
via 2e6a55fcce3aaac63ecc5cfe0a8639fd9c06e267 (commit)
via 67f0af148874dfeb8113562513bf71c34e19b5d4 (commit)
via 98684f74e7fcd55e657d72eb9d4bab7ace38826a (commit)
via f3e15f22055f0b4e09072e2254f4a7f1eac26c16 (commit)
via 7726c14b2b55c88218cc622bd3629c05238ba648 (commit)
via f2a8e809b35e7aa093d29ab9ad8b15552d57b01f (commit)
via 6053a9b75038f27528732783e862ef5932d87a16 (commit)
via 78f4c05fac927cca37db8a76a40f3020a81876d7 (commit)
via 18e961c8da8b49c814654f780ec9ffe73fd68e71 (commit)
via 8575da573914b937fef515e0f4fc4977e69fd33d (commit)
via bb1f31faa9fde953805a79c92e62d5f78d4deb8b (commit)
via f3b002fc7b744d9be2395b48843742b96bb90c56 (commit)
via ede2f7596807e04c57aff324b6f747982dc1e646 (commit)
via f54a9f9a7fef3412659e5b966f9d7a37ae1804d3 (commit)
via ee987d2321d3b098fb398d4dd09db5ebf3fea559 (commit)
via 64d8501d00da59352c45b50a47ac76d98d8d6ff6 (commit)
via dcedc0df30b5cfcd9f24ddbb059f3cede7960c2d (commit)
via 4a3f8e3fbf71cb4369d985e6a98b0db10040ab36 (commit)
via e72053eae02ea34956478e1ff33e8f75c924de28 (commit)
via 8e77149ae18782dfcaf59cfa61f537706c60f2db (commit)
via 302ba51bb83ba461b5084cde82076eb69e7506f6 (commit)
via 7a10e7c1402eaa875fcba9a00905f15baf6c5b31 (commit)
via 2b35288411132b75fce60ccad3464bd073d52119 (commit)
via d7ce15806af59ca91e141c0f6769d200673137ee (commit)
via 94d3d657bead689cb0fe1a0e2f2bcf1fd15ebb30 (commit)
via 25e813a9a96f3731e4215c13e2d0a6d893db1d82 (commit)
via bc3a8d13b7ade13fc699742d4c430c7b572f2232 (commit)
via b00521f546f14585be56fa3195dd24ec803c9172 (commit)
via 212158d8f8e7877169dbed525b15160686312f60 (commit)
via 3373ea00b9c53adab587895d1e141b4274e1c95a (commit)
via 53082d4bffd1583084c10411a48cf3d7ce984557 (commit)
via 86e9f958459bc5ffcb273acfbbf0994322893004 (commit)
via ce806793aa438b4c32c03081d77647e0289f22d3 (commit)
via fbb5d088b624a54d05342135bbbc2c6ca4883b82 (commit)
via c813b82173576d0901b82cce3a7854d24e76cc43 (commit)
via 25ed0d357da32a8f9e95ddff130ff59a0caae83b (commit)
via ca310775e216d1c75c8da2f2fdbdd274ce36d402 (commit)
via 5adcde54c088d5ba957133330569afa65b8aea0d (commit)
via 028ca042bd428446ef47cd72451e5462ebddada2 (commit)
via 39737dfaea78edba89af8fc9fc3cb89c4fe56eba (commit)
via 4c8995f3acf475d9f63afd133bc019e0034f1c2c (commit)
via a5e6b5ece2292faf5fc6712d1f7bc20b26e0e444 (commit)
via 9784a199c6f322e993810adfb011db6437c50e37 (commit)
via a18b544afaa99ae26d3de6f74fd35f83090e0646 (commit)
via 000b2824aeac703bb39f41fca1dc37233dd69ca3 (commit)
via c3ec4d8d2ec0c1ce05f2537077a959b4b14b1f98 (commit)
via d4f4122a56c1b55128972da009e157a329b0da7c (commit)
via 91da8238770d28329797d6e7833ccaaaff28d803 (commit)
via b61ece60ffe63243cc680939956dc6468686204e (commit)
via 840d2c94dca8cf239e9e480c402c47b6a1bff704 (commit)
via 528466fbc13632104bd1227ffbfaaa5e6dc043a0 (commit)
via 2f6ba20293ecd4608a4cf726c149037c80875907 (commit)
via 37b5c31ccae82f7f9be290048c73c2e85f9fffc5 (commit)
via b97aedc0ebe8e565b86b700acea4e4dc9f4c6308 (commit)
via 67b33cc514c321ad5f1cc33f3cb56417c6c480ed (commit)
via ffce18a2200e8d10eab809847f0bb1b1ca503126 (commit)
via 530f480a0f973096a601505664ba3ee53bb26351 (commit)
via 39fa579549150c23cdd78658461afa6caea27257 (commit)
via a657fc151d11d96adbd059fb69d7d1f53cad2246 (commit)
via 791165df07fd22d381def1318954c389a606f81a (commit)
via 49924e3697112b49620dcbcfefef4787cb79922c (commit)
via 152906636649bdd04bf7a52483c3b21bb5edc81e (commit)
via 0f7e38dc2606612ecb326c1c31f52e355b8eee77 (commit)
via 9dc87bd7cc7c2974d470472ea29215d7cb13fb47 (commit)
via 99f7e0fb89f6cd81d6342da0bcc905f296c30003 (commit)
via e4ba56060c812b574652769ff1bd2b8ee689c6a3 (commit)
via d2236f7c0c3e8aa6d8b0ea987612f94b5f72a08b (commit)
via 2766fef61878727a8bfdd77677923aeaa04afd6c (commit)
via 4ddb019e8d35f210ab8a4e67a8546067f5348859 (commit)
via dc0454a506f11418a42c2c3d53f94fd4df369a12 (commit)
via b1b2661e0122883cc6479613c4799a5fa998f18c (commit)
from 0d90a916f5db8449d538bd370c690ddb3f6c52d0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit fb624da4134d39abb16cf4d90507f8e12a88c19b
Merge: 8655904ea38376adb108ee376d6c610822a74ddd 7c9305b75c64ccd001f9b089cb7784eafcbfa4f3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sun Jul 11 20:32:00 2010 +0200
Merge remote branch 'origin/archer-pmuldoon-next-over-throw2' into archer-jankratochvil-fedora14
Conflicts:
gdb/breakpoint.c
commit 8655904ea38376adb108ee376d6c610822a74ddd
Merge: 5e561b0b33715ab69eb8d39ee94769cf1aa2fbdd 76e3774fa55a284a06c06e4e37866967ea7a159c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sun Jul 11 20:30:55 2010 +0200
Merge remote branch 'origin/archer-jankratochvil-ifunc' into archer-jankratochvil-fedora14
commit 5e561b0b33715ab69eb8d39ee94769cf1aa2fbdd
Merge: 0d90a916f5db8449d538bd370c690ddb3f6c52d0 638f5a8799ff52710c19f521ea93a472d20e8b70
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sun Jul 11 20:28:25 2010 +0200
Merge remote branch 'origin/archer-jankratochvil-watchpoint3' into archer-jankratochvil-fedora14
-----------------------------------------------------------------------
Summary of changes:
gdb/amd64-linux-nat.c | 15 +
gdb/blockframe.c | 12 +-
gdb/breakpoint.c | 417 +++++++++++++++++---
gdb/breakpoint.h | 17 +
gdb/elfread.c | 255 ++++++++++++-
gdb/eval.c | 2 +
gdb/gdbthread.h | 10 +
gdb/gdbtypes.c | 16 +
gdb/gdbtypes.h | 14 +
gdb/i386-linux-nat.c | 16 +
gdb/i386-nat.c | 12 +
gdb/i386-nat.h | 5 +
gdb/infcall.c | 81 ++++-
gdb/infcmd.c | 34 ++-
gdb/inferior.h | 2 +
gdb/infrun.c | 197 +++++++++-
gdb/linux-nat.c | 35 ++
gdb/linux-tdep.c | 2 +
gdb/minsyms.c | 19 +-
gdb/parse.c | 23 +-
gdb/ppc-linux-nat.c | 19 +
gdb/solib-svr4.c | 3 +-
gdb/symmisc.c | 3 +
gdb/symtab.c | 2 +-
gdb/symtab.h | 23 +-
gdb/target.c | 20 +
gdb/target.h | 10 +
gdb/testsuite/gdb.base/gnu-ifunc-lib.c | 33 ++
gdb/testsuite/gdb.base/gnu-ifunc.c | 61 +++
gdb/testsuite/gdb.base/gnu-ifunc.exp | 110 +++++
gdb/testsuite/gdb.cp/gdb9593.cc | 180 +++++++++
gdb/testsuite/gdb.cp/gdb9593.exp | 182 +++++++++
gdb/testsuite/gdb.java/jnpe.exp | 74 ++++
gdb/testsuite/gdb.java/jnpe.java | 38 ++
.../gdb.threads/watchpoint-fork-forkoff.c | 175 ++++++++
gdb/testsuite/gdb.threads/watchpoint-fork-mt.c | 157 ++++++++
gdb/testsuite/gdb.threads/watchpoint-fork.c | 57 +++
gdb/testsuite/gdb.threads/watchpoint-fork.exp | 130 ++++++
gdb/thread.c | 16 +
39 files changed, 2382 insertions(+), 95 deletions(-)
create mode 100644 gdb/testsuite/gdb.base/gnu-ifunc-lib.c
create mode 100644 gdb/testsuite/gdb.base/gnu-ifunc.c
create mode 100644 gdb/testsuite/gdb.base/gnu-ifunc.exp
create mode 100644 gdb/testsuite/gdb.cp/gdb9593.cc
create mode 100644 gdb/testsuite/gdb.cp/gdb9593.exp
create mode 100644 gdb/testsuite/gdb.java/jnpe.exp
create mode 100644 gdb/testsuite/gdb.java/jnpe.java
create mode 100644 gdb/testsuite/gdb.threads/watchpoint-fork-forkoff.c
create mode 100644 gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
create mode 100644 gdb/testsuite/gdb.threads/watchpoint-fork.c
create mode 100644 gdb/testsuite/gdb.threads/watchpoint-fork.exp
First 500 lines of diff:
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index c0edc10..17d36b5 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -375,6 +375,20 @@ amd64_linux_dr_unset_status (unsigned long mask)
}
}
+/* See i386_dr_low_type.detach. Do not use wrappers amd64_linux_dr_set_control
+ or amd64_linux_dr_reset_addr as they would modify the register cache
+ (amd64_linux_dr). */
+
+static void
+amd64_linux_dr_detach (void)
+{
+ int regnum;
+
+ amd64_linux_dr_set (inferior_ptid, DR_CONTROL, 0);
+ amd64_linux_dr_unset_status (~0UL);
+ for (regnum = DR_FIRSTADDR; regnum <= DR_LASTADDR; regnum++)
+ amd64_linux_dr_set (inferior_ptid, regnum, 0);
+}
static void
amd64_linux_new_thread (ptid_t ptid)
@@ -796,6 +810,7 @@ _initialize_amd64_linux_nat (void)
i386_dr_low.reset_addr = amd64_linux_dr_reset_addr;
i386_dr_low.get_status = amd64_linux_dr_get_status;
i386_dr_low.unset_status = amd64_linux_dr_unset_status;
+ i386_dr_low.detach = amd64_linux_dr_detach;
i386_set_debug_register_length (8);
/* Override the GNU/Linux inferior startup hook. */
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 0348bf4..f01d0ee 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -38,6 +38,7 @@
#include "block.h"
#include "inline-frame.h"
#include "psymtab.h"
+#include "elf-bfd.h"
/* Return the innermost lexical block in execution
in a specified stack frame. The frame address is assumed valid.
@@ -159,6 +160,7 @@ static CORE_ADDR cache_pc_function_low = 0;
static CORE_ADDR cache_pc_function_high = 0;
static char *cache_pc_function_name = 0;
static struct obj_section *cache_pc_function_section = NULL;
+static int cache_pc_function_is_gnu_ifunc = 0;
/* Clear cache, e.g. when symbol table is discarded. */
@@ -169,6 +171,7 @@ clear_pc_function_cache (void)
cache_pc_function_high = 0;
cache_pc_function_name = (char *) 0;
cache_pc_function_section = NULL;
+ cache_pc_function_is_gnu_ifunc = 0;
}
/* Finds the "function" (text symbol) that is smaller than PC but
@@ -184,7 +187,7 @@ clear_pc_function_cache (void)
/* Backward compatibility, no section argument. */
-int
+enum find_pc_partial_function_type
find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address,
CORE_ADDR *endaddr)
{
@@ -236,6 +239,7 @@ find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address,
cache_pc_function_high = BLOCK_END (SYMBOL_BLOCK_VALUE (f));
cache_pc_function_name = SYMBOL_LINKAGE_NAME (f);
cache_pc_function_section = section;
+ cache_pc_function_is_gnu_ifunc = TYPE_GNU_IFUNC (SYMBOL_TYPE (f));
goto return_cached_value;
}
}
@@ -258,12 +262,13 @@ find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address,
*address = 0;
if (endaddr != NULL)
*endaddr = 0;
- return 0;
+ return FIND_PC_PARTIAL_FUNCTION_NOT_FOUND;
}
cache_pc_function_low = SYMBOL_VALUE_ADDRESS (msymbol);
cache_pc_function_name = SYMBOL_LINKAGE_NAME (msymbol);
cache_pc_function_section = section;
+ cache_pc_function_is_gnu_ifunc = MSYMBOL_TYPE (msymbol) == mst_text_gnu_ifunc;
/* If the minimal symbol has a size, use it for the cache.
Otherwise use the lesser of the next minimal symbol in the same
@@ -323,7 +328,8 @@ find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address,
*endaddr = cache_pc_function_high;
}
- return 1;
+ return cache_pc_function_is_gnu_ifunc ? FIND_PC_PARTIAL_FUNCTION_GNU_IFUNC
+ : FIND_PC_PARTIAL_FUNCTION_NORMAL;
}
/* Return the innermost stack frame executing inside of BLOCK,
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index d0fd9aa..52105b5 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -62,6 +62,7 @@
#include "jit.h"
#include "xml-syscall.h"
#include "parser-defs.h"
+#include "regcache.h"
/* readline include files */
#include "readline/readline.h"
@@ -92,6 +93,9 @@ static void map_breakpoint_numbers (char *, void (*) (struct breakpoint *,
static void ignore_command (char *, int);
+static void update_breakpoint_locations (struct breakpoint *b,
+ struct symtabs_and_lines sals);
+
static int breakpoint_re_set_one (void *);
static void clear_command (char *, int);
@@ -106,6 +110,9 @@ static void break_command_1 (char *, int, int);
static void mention (struct breakpoint *);
+static struct bp_location *add_location_to_breakpoint (struct breakpoint *b,
+ const struct symtab_and_line *sal);
+
/* This function is used in gdbtk sources and thus can not be made static. */
struct breakpoint *set_raw_breakpoint (struct gdbarch *gdbarch,
struct symtab_and_line,
@@ -230,6 +237,10 @@ static void disable_trace_command (char *, int);
static void trace_pass_command (char *, int);
+static void gnu_ifunc_resolver_stop (struct breakpoint *b);
+
+static void gnu_ifunc_resolver_return_stop (struct breakpoint *b);
+
/* Assuming we're creating a static tracepoint, does S look like a
static tracepoint marker spec ("-m MARKER_ID")? */
#define is_marker_spec(s) \
@@ -1252,6 +1263,22 @@ watchpoint_in_thread_scope (struct breakpoint *b)
&& !is_executing (inferior_ptid)));
}
+static void
+watchpoint_del_at_next_stop (struct breakpoint *b)
+{
+ gdb_assert (is_watchpoint (b));
+
+ if (b->related_breakpoint != b)
+ {
+ gdb_assert (b->related_breakpoint->type == bp_watchpoint_scope);
+ gdb_assert (b->related_breakpoint->related_breakpoint == b);
+ b->related_breakpoint->disposition = disp_del_at_next_stop;
+ b->related_breakpoint->related_breakpoint = b->related_breakpoint;
+ b->related_breakpoint = b;
+ }
+ b->disposition = disp_del_at_next_stop;
+}
+
/* Assuming that B is a watchpoint:
- Reparse watchpoint expression, if REPARSE is non-zero
- Evaluate expression and store the result in B->val
@@ -1307,6 +1334,8 @@ update_watchpoint (struct breakpoint *b, int reparse)
struct frame_id saved_frame_id;
int frame_saved;
+ gdb_assert (is_watchpoint (b));
+
/* 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. */
@@ -1510,13 +1539,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);
- if (b->related_breakpoint)
- {
- b->related_breakpoint->disposition = disp_del_at_next_stop;
- b->related_breakpoint->related_breakpoint = NULL;
- b->related_breakpoint= NULL;
- }
- b->disposition = disp_del_at_next_stop;
+ watchpoint_del_at_next_stop (b);
}
/* Restore the selected frame. */
@@ -2201,6 +2224,33 @@ create_std_terminate_master_breakpoint (const char *func_name)
do_cleanups (old_chain);
}
+/* Install a master breakpoint on the unwinder's debug hook. */
+
+void
+create_exception_master_breakpoint (void)
+{
+ struct objfile *objfile;
+
+ ALL_OBJFILES (objfile)
+ {
+ struct minimal_symbol *debug_hook;
+
+ debug_hook = lookup_minimal_symbol_text ("_Unwind_DebugHook", objfile);
+ if (debug_hook != NULL)
+ {
+ struct breakpoint *b;
+
+ b = create_internal_breakpoint (get_objfile_arch (objfile),
+ SYMBOL_VALUE_ADDRESS (debug_hook),
+ bp_exception_master);
+ b->addr_string = xstrdup ("_Unwind_DebugHook");
+ b->enable_state = bp_disabled;
+ }
+ }
+
+ update_global_location_list (1);
+}
+
void
update_breakpoints_after_exec (void)
{
@@ -2242,7 +2292,8 @@ update_breakpoints_after_exec (void)
/* Thread event breakpoints must be set anew after an exec(),
as must overlay event and longjmp master breakpoints. */
if (b->type == bp_thread_event || b->type == bp_overlay_event
- || b->type == bp_longjmp_master || b->type == bp_std_terminate_master)
+ || b->type == bp_longjmp_master || b->type == bp_std_terminate_master
+ || b->type == bp_exception_master)
{
delete_breakpoint (b);
continue;
@@ -2257,7 +2308,8 @@ update_breakpoints_after_exec (void)
/* Longjmp and longjmp-resume breakpoints are also meaningless
after an exec. */
- if (b->type == bp_longjmp || b->type == bp_longjmp_resume)
+ if (b->type == bp_longjmp || b->type == bp_longjmp_resume
+ || b->type == bp_exception || b->type == bp_exception_resume)
{
delete_breakpoint (b);
continue;
@@ -2319,6 +2371,7 @@ update_breakpoints_after_exec (void)
create_longjmp_master_breakpoint ("siglongjmp");
create_longjmp_master_breakpoint ("_siglongjmp");
create_std_terminate_master_breakpoint ("std::terminate()");
+ create_exception_master_breakpoint ();
}
int
@@ -2346,6 +2399,8 @@ detach_breakpoints (int pid)
/* Detach single-step breakpoints as well. */
detach_single_step_breakpoints ();
+ val |= target_detach_watchpoints ();
+
do_cleanups (old_chain);
return val;
}
@@ -2447,9 +2502,11 @@ remove_breakpoint_1 (struct bp_location *b, insertion_state_t is)
return val;
b->inserted = (is == mark_inserted);
}
- else if (b->loc_type == bp_loc_hardware_watchpoint)
+ /* bp_loc_hardware_watchpoint with mark_inserted is being handled by
+ target_detach_watchpoints. */
+ else if (b->loc_type == bp_loc_hardware_watchpoint && is == mark_uninserted)
{
- b->inserted = (is == mark_inserted);
+ b->inserted = 0;
val = target_remove_watchpoint (b->address, b->length,
b->watchpoint_type, b->owner->cond_exp);
@@ -3237,6 +3294,12 @@ print_it_typical (bpstat bs)
result = PRINT_NOTHING;
break;
+ case bp_exception_master:
+ /* These should never be enabled. */
+ printf_filtered (_("Exception Master Breakpoint: gdb should not stop!\n"));
+ result = PRINT_NOTHING;
+ break;
+
case bp_watchpoint:
case bp_hardware_watchpoint:
annotate_watchpoint (b->number);
@@ -3324,6 +3387,8 @@ print_it_typical (bpstat bs)
case bp_none:
case bp_longjmp:
case bp_longjmp_resume:
+ case bp_exception:
+ case bp_exception_resume:
case bp_step_resume:
case bp_watchpoint_scope:
case bp_call_dummy:
@@ -3331,6 +3396,8 @@ print_it_typical (bpstat bs)
case bp_tracepoint:
case bp_fast_tracepoint:
case bp_jit_event:
+ case bp_gnu_ifunc_resolver:
+ case bp_gnu_ifunc_resolver_return:
default:
result = PRINT_UNKNOWN;
break;
@@ -3549,6 +3616,8 @@ watchpoint_check (void *p)
gdb_assert (bs->breakpoint_at->owner != NULL);
b = bs->breakpoint_at->owner;
+ gdb_assert (is_watchpoint (b));
+
/* 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. */
@@ -3655,13 +3724,7 @@ watchpoint_check (void *p)
ui_out_text (uiout, " deleted because the program has left the block in\n\
which its expression is valid.\n");
- if (b->related_breakpoint)
- {
- b->related_breakpoint->disposition = disp_del_at_next_stop;
- b->related_breakpoint->related_breakpoint = NULL;
- b->related_breakpoint = NULL;
- }
- b->disposition = disp_del_at_next_stop;
+ watchpoint_del_at_next_stop (b);
return WP_DELETED;
}
@@ -3730,8 +3793,12 @@ bpstat_check_location (const struct bp_location *bl,
/* If BS refers to a watchpoint, determine if the watched values
has actually changed, and we should stop. If not, set BS->stop
- to 0. */
-static void
+ to 0.
+ Return 0 for watchpoints which could not be the cause of this trap.
+ In such case PRINT_IT will be print_it_noop and STOP will be 0.
+ Otherwise return 1 but in such case it is not guaranteed whether this
+ breakpoint did or did not trigger this trap. */
+static int
bpstat_check_watchpoint (bpstat bs)
{
const struct bp_location *bl;
@@ -3865,9 +3932,7 @@ bpstat_check_watchpoint (bpstat bs)
case 0:
/* Error from catch_errors. */
printf_filtered (_("Watchpoint %d deleted.\n"), b->number);
- if (b->related_breakpoint)
- b->related_breakpoint->disposition = disp_del_at_next_stop;
- b->disposition = disp_del_at_next_stop;
+ watchpoint_del_at_next_stop (b);
/* We've already printed what needs to be printed. */
bs->print_it = print_it_done;
break;
@@ -3881,8 +3946,10 @@ bpstat_check_watchpoint (bpstat bs)
anything for this watchpoint. */
bs->print_it = print_it_noop;
bs->stop = 0;
+ return 0;
}
}
+ return 1;
}
@@ -3914,7 +3981,7 @@ bpstat_check_breakpoint_conditions (bpstat bs, ptid_t ptid)
watchpoint as triggered so that we will handle the
out-of-scope event. We'll get to the watchpoint next
iteration. */
- if (b->type == bp_watchpoint_scope)
+ if (b->type == bp_watchpoint_scope && b->related_breakpoint != b)
b->related_breakpoint->watchpoint_triggered = watch_triggered_yes;
if (is_watchpoint (b))
@@ -4045,6 +4112,8 @@ bpstat_stop_status (struct address_space *aspace,
for (bl = b->loc; bl != NULL; bl = bl->next)
{
+ bpstat bs_prev = bs;
+
/* For hardware watchpoints, we look only at the first location.
The watchpoint_check function will work on the entire expression,
not the individual locations. For read watchpoints, the
@@ -4062,6 +4131,7 @@ bpstat_stop_status (struct address_space *aspace,
/* Come here if it's a watchpoint, or if the break address matches */
bs = bpstat_alloc (bl, bs); /* Alloc a bpstat to explain stop */
+ gdb_assert (bs_prev->next == bs);
/* Assume we stop. Should we find watchpoint that is not actually
triggered, or if condition of breakpoint is false, we'll reset
@@ -4069,13 +4139,23 @@ bpstat_stop_status (struct address_space *aspace,
bs->stop = 1;
bs->print = 1;
- bpstat_check_watchpoint (bs);
- if (!bs->stop)
- continue;
+ if (!bpstat_check_watchpoint (bs))
+ {
+ /* Ensure bpstat_explains_signal stays false if this BL could not be
+ the cause of this trap. */
+
+ gdb_assert (bs->print_it == print_it_noop);
+ gdb_assert (!bs->stop);
+ xfree (bs);
+ bs = bs_prev;
+ bs->next = NULL;
+ continue;
+ }
if (b->type == bp_thread_event || b->type == bp_overlay_event
|| b->type == bp_longjmp_master
- || b->type == bp_std_terminate_master)
+ || b->type == bp_std_terminate_master
+ || b->type == bp_exception_master)
/* We do not stop for these. */
bs->stop = 0;
else
@@ -4176,7 +4256,7 @@ handle_jit_event (void)
/* Decide what infrun needs to do with this bpstat. */
struct bpstat_what
-bpstat_what (bpstat bs)
+bpstat_what (bpstat bs_head)
{
struct bpstat_what retval;
/* We need to defer calling `solib_add', as adding new symbols
@@ -4184,11 +4264,13 @@ bpstat_what (bpstat bs)
and hence may clear unprocessed entries in the BS chain. */
int shlib_event = 0;
int jit_event = 0;
+ bpstat bs;
retval.main_action = BPSTAT_WHAT_KEEP_CHECKING;
retval.call_dummy = STOP_NONE;
+ retval.is_longjmp = 0;
- for (; bs != NULL; bs = bs->next)
+ for (bs = bs_head; bs != NULL; bs = bs->next)
{
/* Extract this BS's action. After processing each BS, we check
if its action overrides all we've seem so far. */
@@ -4242,10 +4324,15 @@ bpstat_what (bpstat bs)
}
break;
case bp_longjmp:
+ case bp_exception:
this_action = BPSTAT_WHAT_SET_LONGJMP_RESUME;
+ retval.is_longjmp = bs->breakpoint_at->owner->type == bp_longjmp;
break;
case bp_longjmp_resume:
+ case bp_exception_resume:
this_action = BPSTAT_WHAT_CLEAR_LONGJMP_RESUME;
+ retval.is_longjmp
+ = bs->breakpoint_at->owner->type == bp_longjmp_resume;
break;
case bp_step_resume:
if (bs->stop)
@@ -4261,6 +4348,7 @@ bpstat_what (bpstat bs)
case bp_overlay_event:
case bp_longjmp_master:
case bp_std_terminate_master:
+ case bp_exception_master:
this_action = BPSTAT_WHAT_SINGLE;
break;
case bp_catchpoint:
@@ -4313,6 +4401,20 @@ bpstat_what (bpstat bs)
out already. */
internal_error (__FILE__, __LINE__,
_("bpstat_what: tracepoint encountered"));
+ break;
+ case bp_gnu_ifunc_resolver:
+ /* Skip the current breakpoint but otherwise nothing happens. GDB is
+ inserting new bp_gnu_ifunc_resolver_return at this point but
+ bp_gnu_ifunc_resolver is being kept there as another
+ bp_gnu_ifunc_resolver_return may be inserted in the meantime. */
+ this_action = BPSTAT_WHAT_SINGLE;
+ break;
+ case bp_gnu_ifunc_resolver_return:
+ /* The whole bp_gnu_ifunc_resolver with its associated
+ bp_gnu_ifunc_resolver_return related_breakpoint's has been
+ resolved now, all these helper breakpoints are being removed and
+ new final bp_breakpoint is being put at the target location. */
+ break;
default:
internal_error (__FILE__, __LINE__,
_("bpstat_what: unhandled bptype %d"), (int) bptype);
@@ -4350,6 +4452,23 @@ bpstat_what (bpstat bs)
handle_jit_event ();
}
+ for (bs = bs_head; bs != NULL; bs = bs->next)
+ {
+ if (bs->breakpoint_at == NULL)
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-11 18:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-11 18:35 [SCM] archer-jankratochvil-fedora14: Merge remote branch 'origin/archer-pmuldoon-next-over-throw2' into archer-jankratochvil-fedora14 jkratoch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).