diff options
author | Tom Tromey <tom@tromey.com> | 2022-04-30 07:49:11 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-05-06 12:03:34 -0600 |
commit | 04d0163c3ff280a2ec7d4e06594da750ef8f96d5 (patch) | |
tree | 51e6f870b108c69276fa5e4823f248b7925f9921 /gdb/breakpoint.c | |
parent | dd9cd55e990bcc9f8448cac38d242d53974b3604 (diff) | |
download | gdb-04d0163c3ff280a2ec7d4e06594da750ef8f96d5.zip gdb-04d0163c3ff280a2ec7d4e06594da750ef8f96d5.tar.gz gdb-04d0163c3ff280a2ec7d4e06594da750ef8f96d5.tar.bz2 |
Change print_recreate_thread to a method
This changes print_recreate_thread to be a method on breakpoint. This
function is only used as a helper by print_recreate methods, so I
thought this transformation made sense.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 7241b7b..3a2d37e 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9335,7 +9335,7 @@ ranged_breakpoint::print_recreate (struct ui_file *fp) gdb_printf (fp, "break-range %s, %s", event_location_to_string (location.get ()), event_location_to_string (location_range_end.get ())); - print_recreate_thread (this, fp); + print_recreate_thread (fp); } /* Find the address where the end of the breakpoint range should be @@ -9739,7 +9739,7 @@ watchpoint::print_recreate (struct ui_file *fp) } gdb_printf (fp, " %s", exp_string.get ()); - print_recreate_thread (this, fp); + print_recreate_thread (fp); } /* Implement the "explains_signal" method for watchpoints. */ @@ -9927,7 +9927,7 @@ masked_watchpoint::print_recreate (struct ui_file *fp) gdb_printf (fp, " %s mask 0x%s", exp_string.get (), phex (hw_wp_mask, sizeof (CORE_ADDR))); - print_recreate_thread (this, fp); + print_recreate_thread (fp); } /* Tell whether the given watchpoint is a masked hardware watchpoint. */ @@ -11807,7 +11807,7 @@ ordinary_breakpoint::print_recreate (struct ui_file *fp) if (loc == NULL && extra_string != NULL) gdb_printf (fp, " %s", extra_string.get ()); - print_recreate_thread (this, fp); + print_recreate_thread (fp); } std::vector<symtab_and_line> @@ -12055,7 +12055,7 @@ tracepoint::print_recreate (struct ui_file *fp) _("unhandled tracepoint type %d"), (int) type); gdb_printf (fp, " %s", event_location_to_string (location.get ())); - print_recreate_thread (this, fp); + print_recreate_thread (fp); if (pass_count) gdb_printf (fp, " passcount %d\n", pass_count); @@ -12112,7 +12112,7 @@ dprintf_breakpoint::print_recreate (struct ui_file *fp) gdb_printf (fp, "dprintf %s,%s", event_location_to_string (location.get ()), extra_string.get ()); - print_recreate_thread (this, fp); + print_recreate_thread (fp); } /* Implement the "after_condition_true" method for dprintf. @@ -14044,13 +14044,13 @@ get_tracepoint_by_number (const char **arg, } void -print_recreate_thread (struct breakpoint *b, struct ui_file *fp) +breakpoint::print_recreate_thread (struct ui_file *fp) const { - if (b->thread != -1) - gdb_printf (fp, " thread %d", b->thread); + if (thread != -1) + gdb_printf (fp, " thread %d", thread); - if (b->task != 0) - gdb_printf (fp, " task %d", b->task); + if (task != 0) + gdb_printf (fp, " task %d", task); gdb_printf (fp, "\n"); } |