diff options
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/common/print-utils.c | 2 | ||||
-rw-r--r-- | gdb/common/print-utils.h | 6 | ||||
-rw-r--r-- | gdb/utils.c | 2 | ||||
-rw-r--r-- | gdb/utils.h | 6 |
5 files changed, 23 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d7266e5..0936194 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2015-10-27 Pedro Alves <palves@redhat.com> + * common/print-utils.c (host_address_to_string): Rename to ... + (host_address_to_string_1): ... this. + * common/print-utils.h (host_address_to_string): Reimplement as + wrapper around host_address_to_string_1. + * utils.c (gdb_print_host_address): Rename to ... + (gdb_print_host_address_1): ... this. + * utils.h (gdb_print_host_address): Reimplement as wrapper macro + around host_address_to_string_1. + +2015-10-27 Pedro Alves <palves@redhat.com> + * alpha-tdep.c (alpha_read_insn): Always pass TARGET_XFER_E_IO to memory_error. Rename local 'status' to 'res'. * c-lang.c (c_get_string): Always pass TARGET_XFER_E_IO to diff --git a/gdb/common/print-utils.c b/gdb/common/print-utils.c index 1c1a5c1..7eba07d 100644 --- a/gdb/common/print-utils.c +++ b/gdb/common/print-utils.c @@ -316,7 +316,7 @@ core_addr_to_string_nz (const CORE_ADDR addr) /* See print-utils.h. */ const char * -host_address_to_string (const void *addr) +host_address_to_string_1 (const void *addr) { char *str = get_cell (); diff --git a/gdb/common/print-utils.h b/gdb/common/print-utils.h index 8d16966..49bc09a 100644 --- a/gdb/common/print-utils.h +++ b/gdb/common/print-utils.h @@ -65,6 +65,10 @@ extern const char *core_addr_to_string (const CORE_ADDR addr); extern const char *core_addr_to_string_nz (const CORE_ADDR addr); -extern const char *host_address_to_string (const void *addr); +extern const char *host_address_to_string_1 (const void *addr); + +/* Wrapper that avoids adding a pointless cast to all callers. */ +#define host_address_to_string(ADDR) \ + host_address_to_string_1 ((const void *) (ADDR)) #endif /* COMMON_CELLS_H */ diff --git a/gdb/utils.c b/gdb/utils.c index afeff12..255aee8 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1104,7 +1104,7 @@ print_spaces (int n, struct ui_file *file) /* Print a host address. */ void -gdb_print_host_address (const void *addr, struct ui_file *stream) +gdb_print_host_address_1 (const void *addr, struct ui_file *stream) { fprintf_filtered (stream, "%s", host_address_to_string (addr)); } diff --git a/gdb/utils.h b/gdb/utils.h index 995a1cf..e1f3827 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -246,7 +246,11 @@ extern void fputstrn_unfiltered (const char *str, int n, int quotr, extern int filtered_printing_initialized (void); /* Display the host ADDR on STREAM formatted as ``0x%x''. */ -extern void gdb_print_host_address (const void *addr, struct ui_file *stream); +extern void gdb_print_host_address_1 (const void *addr, struct ui_file *stream); + +/* Wrapper that avoids adding a pointless cast to all callers. */ +#define gdb_print_host_address(ADDR, STREAM) \ + gdb_print_host_address_1 ((const void *) ADDR, STREAM) /* Convert CORE_ADDR to string in platform-specific manner. This is usually formatted similar to 0x%lx. */ |