diff options
author | Tom Tromey <tom@tromey.com> | 2022-07-25 14:06:35 -0300 |
---|---|---|
committer | Bruno Larsen <blarsen@redhat.com> | 2022-10-10 11:57:10 +0200 |
commit | bd2b40ac129b167f1a709589dee9c009a04a6e21 (patch) | |
tree | 675eb8430a923c94353eca0ec2e7b56cfc1eae37 /gdb/breakpoint.c | |
parent | ba380b3e5162e89c4c81a73f4fb9fcbbbbe75e24 (diff) | |
download | gdb-bd2b40ac129b167f1a709589dee9c009a04a6e21.zip gdb-bd2b40ac129b167f1a709589dee9c009a04a6e21.tar.gz gdb-bd2b40ac129b167f1a709589dee9c009a04a6e21.tar.bz2 |
Change GDB to use frame_info_ptr
This changes GDB to use frame_info_ptr instead of frame_info *
The substitution was done with multiple sequential `sed` commands:
sed 's/^struct frame_info;/class frame_info_ptr;/'
sed 's/struct frame_info \*/frame_info_ptr /g' - which left some
issues in a few files, that were manually fixed.
sed 's/\<frame_info \*/frame_info_ptr /g'
sed 's/frame_info_ptr $/frame_info_ptr/g' - used to remove whitespace
problems.
The changed files were then manually checked and some 'sed' changes
undone, some constructors and some gets were added, according to what
made sense, and what Tromey originally did
Co-Authored-By: Bruno Larsen <blarsen@redhat.com>
Approved-by: Tom Tomey <tom@tromey.com>
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 2eabdd6..e9aee63 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1944,7 +1944,7 @@ update_watchpoint (struct watchpoint *b, int reparse) within_current_scope = 1; else { - struct frame_info *fi = get_current_frame (); + frame_info_ptr fi = get_current_frame (); struct gdbarch *frame_arch = get_frame_arch (fi); CORE_ADDR frame_pc = get_frame_pc (fi); @@ -4971,7 +4971,7 @@ static wp_check_result watchpoint_check (bpstat *bs) { struct watchpoint *b; - struct frame_info *fr; + frame_info_ptr fr; int within_current_scope; /* BS is built from an existing struct breakpoint. */ @@ -4988,7 +4988,7 @@ watchpoint_check (bpstat *bs) within_current_scope = 1; else { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); struct gdbarch *frame_arch = get_frame_arch (frame); CORE_ADDR frame_pc = get_frame_pc (frame); @@ -5385,7 +5385,7 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread) select_frame (get_current_frame ()); else { - struct frame_info *frame; + frame_info_ptr frame; /* For local watchpoint expressions, which particular instance of a local is being watched matters, so we @@ -7482,9 +7482,9 @@ check_longjmp_breakpoint_for_call_dummy (struct thread_info *tp) original dummy frame, hence frame_id_inner can't be used. See the comments on frame_id_inner for more details. */ bool unwind_finished_unexpectedly = false; - for (struct frame_info *fi = get_current_frame (); fi != nullptr; ) + for (frame_info_ptr fi = get_current_frame (); fi != nullptr; ) { - struct frame_info *prev = get_prev_frame (fi); + frame_info_ptr prev = get_prev_frame (fi); if (prev == nullptr) { /* FI is the last stack frame. Why did this frame not @@ -10081,7 +10081,7 @@ watch_command_1 (const char *arg, int accessflag, int from_tty, if (*tok) error (_("Junk at end of command.")); - frame_info *wp_frame = block_innermost_frame (exp_valid_block); + frame_info_ptr wp_frame = block_innermost_frame (exp_valid_block); /* Save this because create_internal_breakpoint below invalidates 'wp_frame'. */ @@ -10472,7 +10472,7 @@ until_break_fsm::do_async_reply_reason () void until_break_command (const char *arg, int from_tty, int anywhere) { - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *frame_gdbarch; struct frame_id stack_frame_id; struct frame_id caller_frame_id; @@ -13526,7 +13526,7 @@ insert_single_step_breakpoints (struct gdbarch *gdbarch) if (!next_pcs.empty ()) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); const address_space *aspace = get_frame_address_space (frame); for (CORE_ADDR pc : next_pcs) |