mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 18:41:27 +00:00
gdb: make some breakpoint methods use this
Some implementations of breakpoint::check_status and
breakpoint::print_it do this:
struct breakpoint *b = bs->breakpoint_at;
bs->breakpoint_at is always the same as `this` (we can get convinced by
looking at the call sites of check_status and print_it), so it would
just be clearer to access fields through `this` instead.
Change-Id: Ic542a64fcd88e31ae2aad6feff1da278c7086891
Reviewed-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
@@ -190,7 +190,6 @@ enum print_stop_action
|
||||
syscall_catchpoint::print_it (const bpstat *bs) const
|
||||
{
|
||||
struct ui_out *uiout = current_uiout;
|
||||
struct breakpoint *b = bs->breakpoint_at;
|
||||
/* These are needed because we want to know in which state a
|
||||
syscall is. It can be in the TARGET_WAITKIND_SYSCALL_ENTRY
|
||||
or TARGET_WAITKIND_SYSCALL_RETURN, and depending on it we
|
||||
@@ -202,10 +201,10 @@ syscall_catchpoint::print_it (const bpstat *bs) const
|
||||
|
||||
get_syscall_by_number (gdbarch, last.syscall_number (), &s);
|
||||
|
||||
annotate_catchpoint (b->number);
|
||||
annotate_catchpoint (this->number);
|
||||
maybe_print_thread_hit_breakpoint (uiout);
|
||||
|
||||
if (b->disposition == disp_del)
|
||||
if (this->disposition == disp_del)
|
||||
uiout->text ("Temporary catchpoint ");
|
||||
else
|
||||
uiout->text ("Catchpoint ");
|
||||
@@ -215,7 +214,7 @@ syscall_catchpoint::print_it (const bpstat *bs) const
|
||||
async_reason_lookup (last.kind () == TARGET_WAITKIND_SYSCALL_ENTRY
|
||||
? EXEC_ASYNC_SYSCALL_ENTRY
|
||||
: EXEC_ASYNC_SYSCALL_RETURN));
|
||||
uiout->field_string ("disp", bpdisp_text (b->disposition));
|
||||
uiout->field_string ("disp", bpdisp_text (this->disposition));
|
||||
}
|
||||
print_num_locno (bs, uiout);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user