This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Make gdb_print_host_addr() pointer const
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 09 Apr 2003 22:19:15 -0400
- Subject: [commit] Make gdb_print_host_addr() pointer const
Hello,
I've committed the attached. Found GCC complained when I tried to pass
in a pointer to something constant.
Andrew
2003-04-09 Andrew Cagney <cagney at redhat dot com>
* defs.h (gdb_print_host_address): Make "addr" parameter a
pointer constant.
* utils.c (gdb_print_host_address): Update.
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.117
diff -u -r1.117 defs.h
--- defs.h 21 Mar 2003 10:07:17 -0000 1.117
+++ defs.h 10 Apr 2003 02:17:10 -0000
@@ -479,7 +479,7 @@
extern void fputstrn_unfiltered (const char *str, int n, int quotr, struct ui_file * stream);
/* Display the host ADDR on STREAM formatted as ``0x%x''. */
-extern void gdb_print_host_address (void *addr, struct ui_file *stream);
+extern void gdb_print_host_address (const void *addr, struct ui_file *stream);
/* Convert a CORE_ADDR into a HEX string. paddr() is like %08lx.
paddr_nz() is like %lx. paddr_u() is like %lu. paddr_width() is
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.99
diff -u -r1.99 utils.c
--- utils.c 2 Apr 2003 03:02:46 -0000 1.99
+++ utils.c 10 Apr 2003 02:17:14 -0000
@@ -1261,7 +1261,7 @@
/* Print a host address. */
void
-gdb_print_host_address (void *addr, struct ui_file *stream)
+gdb_print_host_address (const void *addr, struct ui_file *stream)
{
/* We could use the %p conversion specifier to fprintf if we had any