* tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
use frame architecture instead. Replace current_gdbarch uses. (tui_show_registers): Update call. (tui_get_register): Remove GDBARCH parameter; use frame architecture instead. (tui_show_register_group): Update call. (tui_check_register_values): Likewise. (tui_register_format): Remove GDBARCH parameter; use frame architecture instead. Replace current_gdbarch uses. (tui_get_register): Update call.
This commit is contained in:
parent
bd57a74827
commit
5eccfcc2d4
@ -1,3 +1,16 @@
|
||||
2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
|
||||
use frame architecture instead. Replace current_gdbarch uses.
|
||||
(tui_show_registers): Update call.
|
||||
(tui_get_register): Remove GDBARCH parameter; use frame architecture
|
||||
instead.
|
||||
(tui_show_register_group): Update call.
|
||||
(tui_check_register_values): Likewise.
|
||||
(tui_register_format): Remove GDBARCH parameter; use frame
|
||||
architecture instead. Replace current_gdbarch uses.
|
||||
(tui_get_register): Update call.
|
||||
|
||||
2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* gdbarch.sh (construct_inferior_arguments): Remove.
|
||||
|
@ -50,21 +50,17 @@ static void
|
||||
tui_display_register (struct tui_data_element *data,
|
||||
struct tui_gen_win_info *win_info);
|
||||
|
||||
static enum tui_status
|
||||
tui_show_register_group (struct gdbarch *gdbarch,
|
||||
struct reggroup *group,
|
||||
struct frame_info *frame,
|
||||
int refresh_values_only);
|
||||
static enum tui_status tui_show_register_group (struct reggroup *group,
|
||||
struct frame_info *frame,
|
||||
int refresh_values_only);
|
||||
|
||||
static enum tui_status tui_get_register (struct frame_info *frame,
|
||||
struct tui_data_element *data,
|
||||
int regnum, int *changedp);
|
||||
|
||||
static void tui_register_format (struct frame_info *,
|
||||
struct tui_data_element*, int);
|
||||
|
||||
static enum tui_status
|
||||
tui_get_register (struct gdbarch *gdbarch,
|
||||
struct frame_info *frame,
|
||||
struct tui_data_element *data,
|
||||
int regnum, int *changedp);
|
||||
static void tui_register_format (struct gdbarch *,
|
||||
struct frame_info *,
|
||||
struct tui_data_element*,
|
||||
int);
|
||||
static void tui_scroll_regs_forward_command (char *, int);
|
||||
static void tui_scroll_regs_backward_command (char *, int);
|
||||
|
||||
@ -174,8 +170,7 @@ tui_show_registers (struct reggroup *group)
|
||||
|
||||
if (target_has_registers && target_has_stack && target_has_memory)
|
||||
{
|
||||
ret = tui_show_register_group (current_gdbarch, group,
|
||||
get_current_frame (),
|
||||
ret = tui_show_register_group (group, get_current_frame (),
|
||||
group == display_info->current_group);
|
||||
}
|
||||
if (ret == TUI_FAILURE)
|
||||
@ -209,11 +204,11 @@ tui_show_registers (struct reggroup *group)
|
||||
refresh_values_only is TRUE. */
|
||||
|
||||
static enum tui_status
|
||||
tui_show_register_group (struct gdbarch *gdbarch,
|
||||
struct reggroup *group,
|
||||
tui_show_register_group (struct reggroup *group,
|
||||
struct frame_info *frame,
|
||||
int refresh_values_only)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
enum tui_status ret = TUI_FAILURE;
|
||||
int nr_regs;
|
||||
int allocated_here = FALSE;
|
||||
@ -230,8 +225,8 @@ tui_show_register_group (struct gdbarch *gdbarch,
|
||||
/* See how many registers must be displayed. */
|
||||
nr_regs = 0;
|
||||
for (regnum = 0;
|
||||
regnum < gdbarch_num_regs (current_gdbarch)
|
||||
+ gdbarch_num_pseudo_regs (current_gdbarch);
|
||||
regnum < gdbarch_num_regs (gdbarch)
|
||||
+ gdbarch_num_pseudo_regs (gdbarch);
|
||||
regnum++)
|
||||
{
|
||||
/* Must be in the group and have a name. */
|
||||
@ -269,8 +264,8 @@ tui_show_register_group (struct gdbarch *gdbarch,
|
||||
/* Now set the register names and values. */
|
||||
pos = 0;
|
||||
for (regnum = 0;
|
||||
regnum < gdbarch_num_regs (current_gdbarch)
|
||||
+ gdbarch_num_pseudo_regs (current_gdbarch);
|
||||
regnum < gdbarch_num_regs (gdbarch)
|
||||
+ gdbarch_num_pseudo_regs (gdbarch);
|
||||
regnum++)
|
||||
{
|
||||
struct tui_gen_win_info *data_item_win;
|
||||
@ -299,7 +294,7 @@ tui_show_register_group (struct gdbarch *gdbarch,
|
||||
if (data->value == (void*) NULL)
|
||||
data->value = (void*) xmalloc (MAX_REGISTER_SIZE);
|
||||
|
||||
tui_get_register (gdbarch, frame, data, regnum, 0);
|
||||
tui_get_register (frame, data, regnum, 0);
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
@ -522,7 +517,7 @@ tui_check_register_values (struct frame_info *frame)
|
||||
data_item_win_ptr->content[0])->which_element.data;
|
||||
was_hilighted = data->highlight;
|
||||
|
||||
tui_get_register (current_gdbarch, frame, data,
|
||||
tui_get_register (frame, data,
|
||||
data->item_no, &data->highlight);
|
||||
|
||||
if (data->highlight || was_hilighted)
|
||||
@ -666,11 +661,11 @@ tui_restore_gdbout (void *ui)
|
||||
/* Get the register from the frame and make a printable representation
|
||||
of it in the data element. */
|
||||
static void
|
||||
tui_register_format (struct gdbarch *gdbarch,
|
||||
struct frame_info *frame,
|
||||
tui_register_format (struct frame_info *frame,
|
||||
struct tui_data_element *data_element,
|
||||
int regnum)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
struct ui_file *stream;
|
||||
struct ui_file *old_stdout;
|
||||
const char *name;
|
||||
@ -696,7 +691,7 @@ tui_register_format (struct gdbarch *gdbarch,
|
||||
int len;
|
||||
struct value_print_options opts;
|
||||
|
||||
len = register_size (current_gdbarch, regnum);
|
||||
len = register_size (gdbarch, regnum);
|
||||
fprintf_filtered (stream, "%-14s ", name);
|
||||
get_frame_register (frame, regnum, buf);
|
||||
get_formatted_print_options (&opts, 'f');
|
||||
@ -704,7 +699,7 @@ tui_register_format (struct gdbarch *gdbarch,
|
||||
}
|
||||
else
|
||||
{
|
||||
gdbarch_print_registers_info (current_gdbarch, stream,
|
||||
gdbarch_print_registers_info (gdbarch, stream,
|
||||
frame, regnum, 1);
|
||||
}
|
||||
|
||||
@ -725,8 +720,7 @@ tui_register_format (struct gdbarch *gdbarch,
|
||||
display. When changep is set, check if the new register value has
|
||||
changed with respect to the previous call. */
|
||||
static enum tui_status
|
||||
tui_get_register (struct gdbarch *gdbarch,
|
||||
struct frame_info *frame,
|
||||
tui_get_register (struct frame_info *frame,
|
||||
struct tui_data_element *data,
|
||||
int regnum, int *changedp)
|
||||
{
|
||||
@ -741,6 +735,7 @@ tui_get_register (struct gdbarch *gdbarch,
|
||||
|
||||
if (changedp)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
int size = register_size (gdbarch, regnum);
|
||||
char *old = (char*) data->value;
|
||||
int i;
|
||||
@ -755,7 +750,7 @@ tui_get_register (struct gdbarch *gdbarch,
|
||||
|
||||
/* Reformat the data content if the value changed. */
|
||||
if (changedp == 0 || *changedp == TRUE)
|
||||
tui_register_format (gdbarch, frame, data, regnum);
|
||||
tui_register_format (frame, data, regnum);
|
||||
|
||||
ret = TUI_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user