diff options
author | Keith Seitz <keiths@redhat.com> | 2012-07-18 19:30:20 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2012-07-18 19:30:20 +0000 |
commit | ed1d1739a1e3efdf177aaaee0c096a27a10e6284 (patch) | |
tree | 889bb98a00bfc7869be9a141e352c03e2e9e0c70 | |
parent | eab402dfcc7dc809c501ab4ebfe9feba17355b4d (diff) | |
download | gdb-ed1d1739a1e3efdf177aaaee0c096a27a10e6284.zip gdb-ed1d1739a1e3efdf177aaaee0c096a27a10e6284.tar.gz gdb-ed1d1739a1e3efdf177aaaee0c096a27a10e6284.tar.bz2 |
* breakpoint.c (find_condition_and_thread): Initialize
TASK and REST.
(create_breakpiont): find_condition_and_thread will now
initialize COND_STRING, THREAD, and REST (and TASK).
(addr_string_to_sals): Likewise.
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/breakpoint.c | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0f15a84..b77ae35 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2012-07-18 Keith Seitz <keiths@redhat.com> + + * breakpoint.c (find_condition_and_thread): Initialize + TASK and REST. + (create_breakpiont): find_condition_and_thread will now + initialize COND_STRING, THREAD, and REST (and TASK). + (addr_string_to_sals): Likewise. + 2012-07-18 Pedro Alves <palves@redhat.com> * infrun.c (handle_inferior_event) <TARGET_WAITKIND_NO_HISTORY>: diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 6b9faf3..665a18d 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9245,6 +9245,9 @@ find_condition_and_thread (char *tok, CORE_ADDR pc, { *cond_string = NULL; *thread = -1; + *task = 0; + *rest = NULL; + while (tok && *tok) { char *end_tok; @@ -9495,9 +9498,7 @@ create_breakpoint (struct gdbarch *gdbarch, from thread number, so parsing in context of first sal is OK. When setting the breakpoint we'll re-parse it in context of each sal. */ - cond_string = NULL; - thread = -1; - rest = NULL; + find_condition_and_thread (arg, lsal->sals.sals[0].pc, &cond_string, &thread, &task, &rest); if (cond_string) @@ -14009,10 +14010,8 @@ addr_string_to_sals (struct breakpoint *b, char *addr_string, int *found) resolve_sal_pc (&sals.sals[i]); if (b->condition_not_parsed && s && s[0]) { - char *cond_string = 0; - int thread = -1; - int task = 0; - char *extra_string = NULL; + char *cond_string, *extra_string; + int thread, task; find_condition_and_thread (s, sals.sals[0].pc, &cond_string, &thread, &task, |