diff options
author | Gary Benson <gary@redhat.com> | 2011-10-12 15:43:49 +0000 |
---|---|---|
committer | Gary Benson <gary@redhat.com> | 2011-10-12 15:43:49 +0000 |
commit | 0574c78f39bf3ceccbd57bcd1b2973b683e8dd06 (patch) | |
tree | 04a74ddde9da91b87888422e69c59a8cf4bcf97c /gdb/breakpoint.c | |
parent | ecf8e7f5f6a88a2c180bca7d013f622e46d2b8ec (diff) | |
download | gdb-0574c78f39bf3ceccbd57bcd1b2973b683e8dd06.zip gdb-0574c78f39bf3ceccbd57bcd1b2973b683e8dd06.tar.gz gdb-0574c78f39bf3ceccbd57bcd1b2973b683e8dd06.tar.bz2 |
2011-10-12 Gary Benson <gbenson@redhat.com>
* breakpoint.h (pc_at_non_inline_function): Declare.
* breakpoint.c (is_non_inline_function,
pc_at_non_inline_function): New functions.
* infrun.c (handle_inferior_event): Don't call skip_inline_frames
if the stop is at a location where functions cannot be inlined.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 08ff69b..ba1b08f 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -13325,6 +13325,45 @@ iterate_over_breakpoints (int (*callback) (struct breakpoint *, void *), return NULL; } +/* Zero if any of the breakpoint's locations could be a location where + functions have been inlined, nonzero otherwise. */ + +static int +is_non_inline_function (struct breakpoint *b) +{ + /* The shared library event breakpoint is set on the address of a + non-inline function. */ + if (b->type == bp_shlib_event) + return 1; + + return 0; +} + +/* Nonzero if the specified PC cannot be a location where functions + have been inlined. */ + +int +pc_at_non_inline_function (struct address_space *aspace, CORE_ADDR pc) +{ + struct breakpoint *b; + struct bp_location *bl; + + ALL_BREAKPOINTS (b) + { + if (!is_non_inline_function (b)) + continue; + + for (bl = b->loc; bl != NULL; bl = bl->next) + { + if (!bl->shlib_disabled + && bpstat_check_location (bl, aspace, pc)) + return 1; + } + } + + return 0; +} + void initialize_breakpoint_ops (void) { |