aboutsummaryrefslogtreecommitdiff
path: root/gdb/core.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-09-19 09:13:50 +0000
committerJohn Gilmore <gnu@cygnus>1991-09-19 09:13:50 +0000
commitec99961f8a0eb393382633688fa510985f7b9317 (patch)
tree4eed061a22f30d26b58e0c3a7855913fc12e2693 /gdb/core.c
parentbd099407658f0f5ebbfe8444d233f3e03ba088ef (diff)
downloadgdb-ec99961f8a0eb393382633688fa510985f7b9317.zip
gdb-ec99961f8a0eb393382633688fa510985f7b9317.tar.gz
gdb-ec99961f8a0eb393382633688fa510985f7b9317.tar.bz2
Output hex with local_hex_string for Modula-2 support.
Diffstat (limited to 'gdb/core.c')
-rw-r--r--gdb/core.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/gdb/core.c b/gdb/core.c
index b5895c5..b4f812a 100644
--- a/gdb/core.c
+++ b/gdb/core.c
@@ -281,17 +281,17 @@ core_files_info (t)
printf ("\tCore file `%s'.\n", bfd_get_filename(core_bfd));
- for (p = t->sections; p < t->sections_end; p++)
- if (p->bfd == core_bfd)
- printf("\tcore file from 0x%08x to 0x%08x is %s\n",
- p->addr, p->endaddr,
- bfd_section_name (p->bfd, p->sec_ptr));
- else {
- printf("\tshared lib from 0x%08x to 0x%08x is %s in %s\n",
- p->addr, p->endaddr,
- bfd_section_name (p->bfd, p->sec_ptr),
- bfd_get_filename (p->bfd));
+ for (p = t->sections; p < t->sections_end; p++) {
+ printf(p->bfd == core_bfd? "\tcore file ": "\tshared lib ");
+ printf("from %s", local_hex_string_custom (p->addr, "08"));
+ printf(" to %s", local_hex_string_custom (p->endaddr, "08"));
+ if (p->bfd != core_bfd) {
+ printf(" is %s in %s",
+ bfd_section_name (p->bfd, p->sec_ptr),
+ bfd_get_filename (p->bfd));
}
+ printf ("\n");
+ }
}
void
@@ -304,16 +304,16 @@ memory_error (status, memaddr)
{
/* Actually, address between memaddr and memaddr + len
was out of bounds. */
- error ("Cannot access memory at address 0x%x.", memaddr);
+ error ("Cannot access memory at address %s.", local_hex_string(memaddr));
}
else
{
if (status >= sys_nerr || status < 0)
- error ("Error accessing memory address 0x%x: unknown error (%d).",
- memaddr, status);
+ error ("Error accessing memory address %s: unknown error (%d).",
+ local_hex_string(memaddr), status);
else
- error ("Error accessing memory address 0x%x: %s.",
- memaddr, sys_errlist[status]);
+ error ("Error accessing memory address %s: %s.",
+ local_hex_string(memaddr), sys_errlist[status]);
}
}