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/jit.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/jit.c')
-rw-r--r-- | gdb/jit.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -930,7 +930,7 @@ struct jit_unwind_private std::unique_ptr<detached_regcache> regcache; /* The frame being unwound. */ - struct frame_info *this_frame; + frame_info_ptr this_frame; }; /* Sets the value of a particular register in this frame. */ @@ -991,7 +991,7 @@ jit_unwind_reg_get_impl (struct gdb_unwind_callbacks *cb, int regnum) saved register value. */ static void -jit_dealloc_cache (struct frame_info *this_frame, void *cache) +jit_dealloc_cache (frame_info *this_frame, void *cache) { struct jit_unwind_private *priv_data = (struct jit_unwind_private *) cache; delete priv_data; @@ -1007,7 +1007,7 @@ jit_dealloc_cache (struct frame_info *this_frame, void *cache) static int jit_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **cache) + frame_info_ptr this_frame, void **cache) { struct jit_unwind_private *priv_data; struct gdb_unwind_callbacks callbacks; @@ -1042,7 +1042,7 @@ jit_frame_sniffer (const struct frame_unwind *self, jit_debug_printf ("Could not unwind frame using JIT reader."); - jit_dealloc_cache (this_frame, *cache); + jit_dealloc_cache (this_frame.get (), *cache); *cache = NULL; return 0; @@ -1053,7 +1053,7 @@ jit_frame_sniffer (const struct frame_unwind *self, the loaded plugin. */ static void -jit_frame_this_id (struct frame_info *this_frame, void **cache, +jit_frame_this_id (frame_info_ptr this_frame, void **cache, struct frame_id *this_id) { struct jit_unwind_private priv; @@ -1082,7 +1082,7 @@ jit_frame_this_id (struct frame_info *this_frame, void **cache, the register from the cache. */ static struct value * -jit_frame_prev_register (struct frame_info *this_frame, void **cache, int reg) +jit_frame_prev_register (frame_info_ptr this_frame, void **cache, int reg) { struct jit_unwind_private *priv = (struct jit_unwind_private *) *cache; struct gdbarch *gdbarch; |