aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-cmd-var.c4
-rw-r--r--gdb/mi/mi-main.c14
-rw-r--r--gdb/mi/mi-symbol-cmds.c5
3 files changed, 14 insertions, 9 deletions
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index cad4117..64a36bf 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -128,8 +128,8 @@ mi_cmd_var_create (char *command, char **argv, int argc)
if (varobjdebug)
fprintf_unfiltered (gdb_stdlog,
- "Name=\"%s\", Frame=\"%s\" (0x%s), Expression=\"%s\"\n",
- name, frame, paddr (frameaddr), expr);
+ "Name=\"%s\", Frame=\"%s\" (%s), Expression=\"%s\"\n",
+ name, frame, hex_string (frameaddr), expr);
var = varobj_create (name, expr, frameaddr, var_type);
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index aa176f7..3d4281f 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -935,13 +935,15 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
error ("Unable to read memory.");
/* Output the header information. */
- ui_out_field_core_addr (uiout, "addr", addr);
+ ui_out_field_core_addr (uiout, "addr", gdbarch, addr);
ui_out_field_int (uiout, "nr-bytes", nr_bytes);
ui_out_field_int (uiout, "total-bytes", total_bytes);
- ui_out_field_core_addr (uiout, "next-row", addr + word_size * nr_cols);
- ui_out_field_core_addr (uiout, "prev-row", addr - word_size * nr_cols);
- ui_out_field_core_addr (uiout, "next-page", addr + total_bytes);
- ui_out_field_core_addr (uiout, "prev-page", addr - total_bytes);
+ ui_out_field_core_addr (uiout, "next-row",
+ gdbarch, addr + word_size * nr_cols);
+ ui_out_field_core_addr (uiout, "prev-row",
+ gdbarch, addr - word_size * nr_cols);
+ ui_out_field_core_addr (uiout, "next-page", gdbarch, addr + total_bytes);
+ ui_out_field_core_addr (uiout, "prev-page", gdbarch, addr - total_bytes);
/* Build the result as a two dimentional table. */
{
@@ -961,7 +963,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
struct value_print_options opts;
cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- ui_out_field_core_addr (uiout, "addr", addr + row_byte);
+ ui_out_field_core_addr (uiout, "addr", gdbarch, addr + row_byte);
/* ui_out_field_core_addr_symbolic (uiout, "saddr", addr + row_byte); */
cleanup_list_data = make_cleanup_ui_out_list_begin_end (uiout, "data");
get_formatted_print_options (&opts, word_format);
diff --git a/gdb/mi/mi-symbol-cmds.c b/gdb/mi/mi-symbol-cmds.c
index 6b28fe0..fc03894 100644
--- a/gdb/mi/mi-symbol-cmds.c
+++ b/gdb/mi/mi-symbol-cmds.c
@@ -19,6 +19,7 @@
#include "defs.h"
#include "mi-cmds.h"
#include "symtab.h"
+#include "objfiles.h"
#include "ui-out.h"
/* SYMBOL-LIST-LINES:
@@ -30,6 +31,7 @@
void
mi_cmd_symbol_list_lines (char *command, char **argv, int argc)
{
+ struct gdbarch *gdbarch;
char *filename;
struct symtab *s;
int i;
@@ -48,13 +50,14 @@ mi_cmd_symbol_list_lines (char *command, char **argv, int argc)
sorted by increasing values in the symbol table, so no need to
perform any other sorting. */
+ gdbarch = get_objfile_arch (s->objfile);
cleanup_stack = make_cleanup_ui_out_list_begin_end (uiout, "lines");
if (LINETABLE (s) != NULL && LINETABLE (s)->nitems > 0)
for (i = 0; i < LINETABLE (s)->nitems; i++)
{
cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- ui_out_field_core_addr (uiout, "pc", LINETABLE (s)->item[i].pc);
+ ui_out_field_core_addr (uiout, "pc", gdbarch, LINETABLE (s)->item[i].pc);
ui_out_field_int (uiout, "line", LINETABLE (s)->item[i].line);
do_cleanups (cleanup_tuple);
}