aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-07-25 14:06:35 -0300
committerBruno Larsen <blarsen@redhat.com>2022-10-10 11:57:10 +0200
commitbd2b40ac129b167f1a709589dee9c009a04a6e21 (patch)
tree675eb8430a923c94353eca0ec2e7b56cfc1eae37 /gdb/i386-tdep.c
parentba380b3e5162e89c4c81a73f4fb9fcbbbbe75e24 (diff)
downloadgdb-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/i386-tdep.c')
-rw-r--r--gdb/i386-tdep.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index a2f0017..59d4d7b 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1965,7 +1965,7 @@ i386_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
/* This function is 64-bit safe. */
static CORE_ADDR
-i386_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+i386_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
{
gdb_byte buf[8];
@@ -1977,7 +1977,7 @@ i386_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
/* Normal frames. */
static void
-i386_frame_cache_1 (struct frame_info *this_frame,
+i386_frame_cache_1 (frame_info_ptr this_frame,
struct i386_frame_cache *cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2078,7 +2078,7 @@ i386_frame_cache_1 (struct frame_info *this_frame,
}
static struct i386_frame_cache *
-i386_frame_cache (struct frame_info *this_frame, void **this_cache)
+i386_frame_cache (frame_info_ptr this_frame, void **this_cache)
{
struct i386_frame_cache *cache;
@@ -2102,7 +2102,7 @@ i386_frame_cache (struct frame_info *this_frame, void **this_cache)
}
static void
-i386_frame_this_id (struct frame_info *this_frame, void **this_cache,
+i386_frame_this_id (frame_info_ptr this_frame, void **this_cache,
struct frame_id *this_id)
{
struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache);
@@ -2121,7 +2121,7 @@ i386_frame_this_id (struct frame_info *this_frame, void **this_cache,
}
static enum unwind_stop_reason
-i386_frame_unwind_stop_reason (struct frame_info *this_frame,
+i386_frame_unwind_stop_reason (frame_info_ptr this_frame,
void **this_cache)
{
struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache);
@@ -2137,7 +2137,7 @@ i386_frame_unwind_stop_reason (struct frame_info *this_frame,
}
static struct value *
-i386_frame_prev_register (struct frame_info *this_frame, void **this_cache,
+i386_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
int regnum)
{
struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache);
@@ -2236,7 +2236,7 @@ i386_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
static int
i386_epilogue_frame_sniffer (const struct frame_unwind *self,
- struct frame_info *this_frame,
+ frame_info_ptr this_frame,
void **this_prologue_cache)
{
if (frame_relative_level (this_frame) == 0)
@@ -2247,7 +2247,7 @@ i386_epilogue_frame_sniffer (const struct frame_unwind *self,
}
static struct i386_frame_cache *
-i386_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
+i386_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache)
{
struct i386_frame_cache *cache;
CORE_ADDR sp;
@@ -2282,7 +2282,7 @@ i386_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
}
static enum unwind_stop_reason
-i386_epilogue_frame_unwind_stop_reason (struct frame_info *this_frame,
+i386_epilogue_frame_unwind_stop_reason (frame_info_ptr this_frame,
void **this_cache)
{
struct i386_frame_cache *cache =
@@ -2295,7 +2295,7 @@ i386_epilogue_frame_unwind_stop_reason (struct frame_info *this_frame,
}
static void
-i386_epilogue_frame_this_id (struct frame_info *this_frame,
+i386_epilogue_frame_this_id (frame_info_ptr this_frame,
void **this_cache,
struct frame_id *this_id)
{
@@ -2309,7 +2309,7 @@ i386_epilogue_frame_this_id (struct frame_info *this_frame,
}
static struct value *
-i386_epilogue_frame_prev_register (struct frame_info *this_frame,
+i386_epilogue_frame_prev_register (frame_info_ptr this_frame,
void **this_cache, int regnum)
{
/* Make sure we've initialized the cache. */
@@ -2391,7 +2391,7 @@ i386_in_stack_tramp_p (CORE_ADDR pc)
static int
i386_stack_tramp_frame_sniffer (const struct frame_unwind *self,
- struct frame_info *this_frame,
+ frame_info_ptr this_frame,
void **this_cache)
{
if (frame_relative_level (this_frame) == 0)
@@ -2431,7 +2431,7 @@ i386_gen_return_address (struct gdbarch *gdbarch,
/* Signal trampolines. */
static struct i386_frame_cache *
-i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
+i386_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
@@ -2480,7 +2480,7 @@ i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
}
static enum unwind_stop_reason
-i386_sigtramp_frame_unwind_stop_reason (struct frame_info *this_frame,
+i386_sigtramp_frame_unwind_stop_reason (frame_info_ptr this_frame,
void **this_cache)
{
struct i386_frame_cache *cache =
@@ -2493,7 +2493,7 @@ i386_sigtramp_frame_unwind_stop_reason (struct frame_info *this_frame,
}
static void
-i386_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache,
+i386_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache,
struct frame_id *this_id)
{
struct i386_frame_cache *cache =
@@ -2509,7 +2509,7 @@ i386_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache,
}
static struct value *
-i386_sigtramp_frame_prev_register (struct frame_info *this_frame,
+i386_sigtramp_frame_prev_register (frame_info_ptr this_frame,
void **this_cache, int regnum)
{
/* Make sure we've initialized the cache. */
@@ -2520,7 +2520,7 @@ i386_sigtramp_frame_prev_register (struct frame_info *this_frame,
static int
i386_sigtramp_frame_sniffer (const struct frame_unwind *self,
- struct frame_info *this_frame,
+ frame_info_ptr this_frame,
void **this_prologue_cache)
{
gdbarch *arch = get_frame_arch (this_frame);
@@ -2562,7 +2562,7 @@ static const struct frame_unwind i386_sigtramp_frame_unwind =
static CORE_ADDR
-i386_frame_base_address (struct frame_info *this_frame, void **this_cache)
+i386_frame_base_address (frame_info_ptr this_frame, void **this_cache)
{
struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache);
@@ -2578,7 +2578,7 @@ static const struct frame_base i386_frame_base =
};
static struct frame_id
-i386_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
+i386_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
{
CORE_ADDR fp;
@@ -2605,7 +2605,7 @@ i386_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
success. */
static int
-i386_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
+i386_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
{
gdb_byte buf[4];
CORE_ADDR sp, jb_addr;
@@ -3827,7 +3827,7 @@ i386_convert_register_p (struct gdbarch *gdbarch,
return its contents in TO. */
static int
-i386_register_to_value (struct frame_info *frame, int regnum,
+i386_register_to_value (frame_info_ptr frame, int regnum,
struct type *type, gdb_byte *to,
int *optimizedp, int *unavailablep)
{
@@ -3867,7 +3867,7 @@ i386_register_to_value (struct frame_info *frame, int regnum,
REGNUM in frame FRAME. */
static void
-i386_value_to_register (struct frame_info *frame, int regnum,
+i386_value_to_register (frame_info_ptr frame, int regnum,
struct type *type, const gdb_byte *from)
{
int len = type->length ();
@@ -4019,7 +4019,7 @@ i386_iterate_over_regset_sections (struct gdbarch *gdbarch,
/* Stuff for WIN32 PE style DLL's but is pretty generic really. */
CORE_ADDR
-i386_pe_skip_trampoline_code (struct frame_info *frame,
+i386_pe_skip_trampoline_code (frame_info_ptr frame,
CORE_ADDR pc, char *name)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -4050,7 +4050,7 @@ i386_pe_skip_trampoline_code (struct frame_info *frame,
routine. */
int
-i386_sigtramp_p (struct frame_info *this_frame)
+i386_sigtramp_p (frame_info_ptr this_frame)
{
CORE_ADDR pc = get_frame_pc (this_frame);
const char *name;
@@ -4086,7 +4086,7 @@ i386_print_insn (bfd_vma pc, struct disassemble_info *info)
routine. */
static int
-i386_svr4_sigtramp_p (struct frame_info *this_frame)
+i386_svr4_sigtramp_p (frame_info_ptr this_frame)
{
CORE_ADDR pc = get_frame_pc (this_frame);
const char *name;
@@ -4101,7 +4101,7 @@ i386_svr4_sigtramp_p (struct frame_info *this_frame)
address of the associated sigcontext (ucontext) structure. */
static CORE_ADDR
-i386_svr4_sigcontext_addr (struct frame_info *this_frame)
+i386_svr4_sigcontext_addr (frame_info_ptr this_frame)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -4657,7 +4657,7 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
/* Get the ARGIth function argument for the current function. */
static CORE_ADDR
-i386_fetch_pointer_argument (struct frame_info *frame, int argi,
+i386_fetch_pointer_argument (frame_info_ptr frame, int argi,
struct type *type)
{
struct gdbarch *gdbarch = get_frame_arch (frame);