diff options
author | Doug Evans <xdje42@gmail.com> | 2013-11-13 23:35:18 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2013-11-13 23:35:18 -0800 |
commit | 6c1b0f7b1df8bf3aeade04a7bfa44ca5fd0a824c (patch) | |
tree | 832b4e6de0258e912ba3b550fdd0d1972f13a73a /gdb/breakpoint.c | |
parent | ec2af0ee47f19c8163989e45632c3cb2a2adbbc6 (diff) | |
download | gdb-6c1b0f7b1df8bf3aeade04a7bfa44ca5fd0a824c.zip gdb-6c1b0f7b1df8bf3aeade04a7bfa44ca5fd0a824c.tar.gz gdb-6c1b0f7b1df8bf3aeade04a7bfa44ca5fd0a824c.tar.bz2 |
* breakpoint.c (bpstat_check_breakpoint_conditions): For thread
specific breakpoints, don't evaluate breakpoint condition if
different thread.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index f0b496d..5bfed9d 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5134,6 +5134,14 @@ bpstat_check_breakpoint_conditions (bpstat bs, ptid_t ptid) return; } + /* If this is a thread-specific breakpoint, don't waste cpu evaluating the + condition if this isn't the specified thread. */ + if (b->thread != -1 && b->thread != thread_id) + { + bs->stop = 0; + return; + } + /* Evaluate Python breakpoints that have a "stop" method implemented. */ if (b->py_bp_object) bs->stop = gdbpy_should_stop (b->py_bp_object); @@ -5217,10 +5225,6 @@ bpstat_check_breakpoint_conditions (bpstat bs, ptid_t ptid) { bs->stop = 0; } - else if (b->thread != -1 && b->thread != thread_id) - { - bs->stop = 0; - } else if (b->ignore_count > 0) { b->ignore_count--; |