This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]