aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2012-12-15 01:37:03 +0000
committerYao Qi <yao@codesourcery.com>2012-12-15 01:37:03 +0000
commit7ed2c99418de132572bdb39e8b4ffe31321b0db9 (patch)
tree4f39f3ed1cb0b40e794b95f773a5bf9518e2e42a /gdb
parent2a77e2ab1828db0bfd0c28d5e2a38715a19dc9ad (diff)
downloadgdb-7ed2c99418de132572bdb39e8b4ffe31321b0db9.zip
gdb-7ed2c99418de132572bdb39e8b4ffe31321b0db9.tar.gz
gdb-7ed2c99418de132572bdb39e8b4ffe31321b0db9.tar.bz2
gdb/
2012-12-15 Yao Qi <yao@codesourcery.com> * breakpoint.c (download_tracepoint_locations): Iterate over ALL_TRACEPOINTS first and then iterate over locations of each tracepoint.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/breakpoint.c33
2 files changed, 23 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 07119af..b2013f4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2012-12-15 Yao Qi <yao@codesourcery.com>
+
+ * breakpoint.c (download_tracepoint_locations): Iterate over
+ ALL_TRACEPOINTS first and then iterate over locations of
+ each tracepoint.
+
2012-12-14 Pierre Muller <muller@sourceware.org>
Pedro Alves <palves@redhat.com>
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 2fe8f14..59aac72 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -12081,7 +12081,7 @@ bp_location_target_extensions_update (void)
static void
download_tracepoint_locations (void)
{
- struct bp_location *bl, **blp_tmp;
+ struct breakpoint *b;
struct cleanup *old_chain;
if (!target_can_download_tracepoint ())
@@ -12089,31 +12089,32 @@ download_tracepoint_locations (void)
old_chain = save_current_space_and_thread ();
- ALL_BP_LOCATIONS (bl, blp_tmp)
+ ALL_TRACEPOINTS (b)
{
+ struct bp_location *bl;
struct tracepoint *t;
- if (!is_tracepoint (bl->owner))
- continue;
-
- if ((bl->owner->type == bp_fast_tracepoint
+ if ((b->type == bp_fast_tracepoint
? !may_insert_fast_tracepoints
: !may_insert_tracepoints))
continue;
- /* In tracepoint, locations are _never_ duplicated, so
- should_be_inserted is equivalent to
- unduplicated_should_be_inserted. */
- if (!should_be_inserted (bl) || bl->inserted)
- continue;
+ for (bl = b->loc; bl; bl = bl->next)
+ {
+ /* In tracepoint, locations are _never_ duplicated, so
+ should_be_inserted is equivalent to
+ unduplicated_should_be_inserted. */
+ if (!should_be_inserted (bl) || bl->inserted)
+ continue;
- switch_to_program_space_and_thread (bl->pspace);
+ switch_to_program_space_and_thread (bl->pspace);
- target_download_tracepoint (bl);
+ target_download_tracepoint (bl);
- bl->inserted = 1;
- t = (struct tracepoint *) bl->owner;
- t->number_on_target = bl->owner->number;
+ bl->inserted = 1;
+ }
+ t = (struct tracepoint *) b;
+ t->number_on_target = b->number;
}
do_cleanups (old_chain);