aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
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/mi
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/mi')
-rw-r--r--gdb/mi/mi-cmd-stack.c22
-rw-r--r--gdb/mi/mi-main.c10
2 files changed, 16 insertions, 16 deletions
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 8acb9cd..7340b4c 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -44,7 +44,7 @@ enum what_to_list { locals, arguments, all };
static void list_args_or_locals (const frame_print_options &fp_opts,
enum what_to_list what,
enum print_values values,
- struct frame_info *fi,
+ frame_info_ptr fi,
int skip_unavailable);
/* True if we want to allow Python-based frame filters. */
@@ -61,7 +61,7 @@ mi_cmd_enable_frame_filters (const char *command, char **argv, int argc)
/* Like apply_ext_lang_frame_filter, but take a print_values */
static enum ext_lang_bt_status
-mi_apply_ext_lang_frame_filter (struct frame_info *frame,
+mi_apply_ext_lang_frame_filter (frame_info_ptr frame,
frame_filter_flags flags,
enum print_values print_values,
struct ui_out *out,
@@ -87,7 +87,7 @@ mi_cmd_stack_list_frames (const char *command, char **argv, int argc)
int frame_low;
int frame_high;
int i;
- struct frame_info *fi;
+ frame_info_ptr fi;
enum ext_lang_bt_status result = EXT_LANG_BT_ERROR;
int raw_arg = 0;
int oind = 0;
@@ -189,7 +189,7 @@ mi_cmd_stack_info_depth (const char *command, char **argv, int argc)
{
int frame_high;
int i;
- struct frame_info *fi;
+ frame_info_ptr fi;
if (argc > 1)
error (_("-stack-info-depth: Usage: [MAX_DEPTH]"));
@@ -216,7 +216,7 @@ mi_cmd_stack_info_depth (const char *command, char **argv, int argc)
void
mi_cmd_stack_list_locals (const char *command, char **argv, int argc)
{
- struct frame_info *frame;
+ frame_info_ptr frame;
int raw_arg = 0;
enum ext_lang_bt_status result = EXT_LANG_BT_ERROR;
enum print_values print_value;
@@ -295,7 +295,7 @@ mi_cmd_stack_list_args (const char *command, char **argv, int argc)
int frame_low;
int frame_high;
int i;
- struct frame_info *fi;
+ frame_info_ptr fi;
enum print_values print_values;
struct ui_out *uiout = current_uiout;
int raw_arg = 0;
@@ -408,7 +408,7 @@ mi_cmd_stack_list_args (const char *command, char **argv, int argc)
void
mi_cmd_stack_list_variables (const char *command, char **argv, int argc)
{
- struct frame_info *frame;
+ frame_info_ptr frame;
int raw_arg = 0;
enum ext_lang_bt_status result = EXT_LANG_BT_ERROR;
enum print_values print_value;
@@ -566,7 +566,7 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
static void
list_args_or_locals (const frame_print_options &fp_opts,
enum what_to_list what, enum print_values values,
- struct frame_info *fi, int skip_unavailable)
+ frame_info_ptr fi, int skip_unavailable)
{
const struct block *block;
struct symbol *sym;
@@ -692,7 +692,7 @@ list_args_or_locals (const frame_print_options &fp_opts,
manual, this feature is supported here purely for backward
compatibility. */
-static struct frame_info *
+static frame_info_ptr
parse_frame_specification (const char *frame_exp)
{
gdb_assert (frame_exp != NULL);
@@ -706,7 +706,7 @@ parse_frame_specification (const char *frame_exp)
struct value *arg = parse_and_eval (frame_exp);
/* Assume ARG is an integer, and try using that to select a frame. */
- struct frame_info *fid;
+ frame_info_ptr fid;
int level = value_as_long (arg);
fid = find_relative_frame (get_current_frame (), &level);
@@ -731,7 +731,7 @@ parse_frame_specification (const char *frame_exp)
{
if (id == get_frame_id (fid))
{
- struct frame_info *prev_frame;
+ frame_info_ptr prev_frame;
while (1)
{
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 6d8e510..3db7a50 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -95,7 +95,7 @@ static void mi_execute_async_cli_command (const char *cli_command,
char **argv, int argc);
static bool register_changed_p (int regnum, readonly_detached_regcache *,
readonly_detached_regcache *);
-static void output_register (struct frame_info *, int regnum, int format,
+static void output_register (frame_info_ptr , int regnum, int format,
int skip_unavailable);
/* Controls whether the frontend wants MI in async mode. */
@@ -1004,7 +1004,7 @@ void
mi_cmd_data_list_register_values (const char *command, char **argv, int argc)
{
struct ui_out *uiout = current_uiout;
- struct frame_info *frame;
+ frame_info_ptr frame;
struct gdbarch *gdbarch;
int regnum, numregs, format;
int i;
@@ -1089,7 +1089,7 @@ mi_cmd_data_list_register_values (const char *command, char **argv, int argc)
unavailable. */
static void
-output_register (struct frame_info *frame, int regnum, int format,
+output_register (frame_info_ptr frame, int regnum, int format,
int skip_unavailable)
{
struct ui_out *uiout = current_uiout;
@@ -2077,7 +2077,7 @@ mi_cmd_execute (struct mi_parse *parse)
gdb::optional<scoped_restore_selected_frame> frame_saver;
if (parse->frame != -1)
{
- struct frame_info *fid;
+ frame_info_ptr fid;
int frame = parse->frame;
fid = find_relative_frame (get_current_frame (), &frame);
@@ -2612,7 +2612,7 @@ mi_cmd_trace_frame_collected (const char *command, char **argv, int argc)
the trace frame info, but instead consult the register cache for
register availability. */
{
- struct frame_info *frame;
+ frame_info_ptr frame;
struct gdbarch *gdbarch;
int regnum;
int numregs;