aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-07-01 12:02:37 -0600
committerTom Tromey <tromey@adacore.com>2019-07-15 09:28:59 -0600
commitca8d69beb1024316af8dec571584437d613f40d2 (patch)
tree489c8f821a6055053b61c6c21e122b013c0b6f30
parent3719fd55b6f89662653d50d33bb267c5f21127a5 (diff)
downloadgdb-ca8d69beb1024316af8dec571584437d613f40d2.zip
gdb-ca8d69beb1024316af8dec571584437d613f40d2.tar.gz
gdb-ca8d69beb1024316af8dec571584437d613f40d2.tar.bz2
Use field_core_addr in more places
This changes a few spots that use field_fmt to use field_core_addr instead. gdb/ChangeLog 2019-07-15 Tom Tromey <tromey@adacore.com> * target.c (flash_erase_command): Use field_core_addr. * symfile.c (generic_load): Use field_core_addr. * sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault): Use field_core_addr. * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Use field_core_addr.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/i386-linux-tdep.c6
-rw-r--r--gdb/sparc64-linux-tdep.c6
-rw-r--r--gdb/symfile.c2
-rw-r--r--gdb/target.c2
5 files changed, 17 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d79d89f..c8d0c6a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2019-07-15 Tom Tromey <tromey@adacore.com>
+
+ * target.c (flash_erase_command): Use field_core_addr.
+ * symfile.c (generic_load): Use field_core_addr.
+ * sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault):
+ Use field_core_addr.
+ * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Use
+ field_core_addr.
+
2019-07-12 Andrew Burgess <andrew.burgess@embecosm.com>
* dwarf2loc.c (dwarf2_evaluate_property): Sign extend property
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index d0d339d..760d000 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -432,13 +432,13 @@ i386_linux_handle_segmentation_fault (struct gdbarch *gdbarch,
uiout->field_string ("sigcode-meaning", _("Lower bound violation"));
uiout->text (_(" while accessing address "));
- uiout->field_fmt ("bound-access", "%s", paddress (gdbarch, access));
+ uiout->field_core_addr ("bound-access", gdbarch, access);
uiout->text (_("\nBounds: [lower = "));
- uiout->field_fmt ("lower-bound", "%s", paddress (gdbarch, lower_bound));
+ uiout->field_core_addr ("lower-bound", gdbarch, lower_bound);
uiout->text (_(", upper = "));
- uiout->field_fmt ("upper-bound", "%s", paddress (gdbarch, upper_bound));
+ uiout->field_core_addr ("upper-bound", gdbarch, upper_bound);
uiout->text (_("]"));
}
diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c
index 158db97..563d21e 100644
--- a/gdb/sparc64-linux-tdep.c
+++ b/gdb/sparc64-linux-tdep.c
@@ -150,19 +150,19 @@ sparc64_linux_handle_segmentation_fault (struct gdbarch *gdbarch,
uiout->text ("\n");
uiout->field_string ("sigcode-meaning", _("ADI disabled"));
uiout->text (_(" while accessing address "));
- uiout->field_fmt ("bound-access", "%s", paddress (gdbarch, addr));
+ uiout->field_core_addr ("bound-access", gdbarch, addr);
break;
case SEGV_ADIDERR: /* disrupting mismatch */
uiout->text ("\n");
uiout->field_string ("sigcode-meaning", _("ADI deferred mismatch"));
uiout->text (_(" while accessing address "));
- uiout->field_fmt ("bound-access", "%s", paddress (gdbarch, addr));
+ uiout->field_core_addr ("bound-access", gdbarch, addr);
break;
case SEGV_ADIPERR: /* precise mismatch */
uiout->text ("\n");
uiout->field_string ("sigcode-meaning", _("ADI precise mismatch"));
uiout->text (_(" while accessing address "));
- uiout->field_fmt ("bound-access", "%s", paddress (gdbarch, addr));
+ uiout->field_core_addr ("bound-access", gdbarch, addr);
break;
default:
break;
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 13a07e4..caa0e79 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2095,7 +2095,7 @@ generic_load (const char *args, int from_tty)
CORE_ADDR entry = bfd_get_start_address (loadfile_bfd.get ());
entry = gdbarch_addr_bits_remove (target_gdbarch (), entry);
uiout->text ("Start address ");
- uiout->field_fmt ("address", "%s", paddress (target_gdbarch (), entry));
+ uiout->field_core_addr ("address", target_gdbarch (), entry);
uiout->text (", load size ");
uiout->field_fmt ("load-size", "%lu", total_progress.data_count);
uiout->text ("\n");
diff --git a/gdb/target.c b/gdb/target.c
index de3706d..b3cfc53 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -3793,7 +3793,7 @@ flash_erase_command (const char *cmd, int from_tty)
ui_out_emit_tuple tuple_emitter (current_uiout, "erased-regions");
current_uiout->message (_("Erasing flash memory region at address "));
- current_uiout->field_fmt ("address", "%s", paddress (gdbarch, m.lo));
+ current_uiout->field_core_addr ("address", gdbarch, m.lo);
current_uiout->message (", size = ");
current_uiout->field_fmt ("size", "%s", hex_string (m.hi - m.lo));
current_uiout->message ("\n");