Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] utils.c: Revise a couple of internal_error() messages
@ 2002-07-27 23:26 Kevin Buettner
  2002-07-29  8:56 ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2002-07-27 23:26 UTC (permalink / raw)
  To: gdb-patches

I've just committed the patch below.

In some work that I've been doing recently, I was seeing one of these
internal errors.  Unfortunately, the message string was identical for
both host_pointer_to_address() and address_to_host_pointer(), making
it difficult to tell which function was responsible.  I've changed the
messages to indicate the actual function responsible for the internal
error.  (I suspect that one of these functions was originally named
core_addr_to_void_ptr, but got renamed somewhere along the way without
a change to the error message.)

	* utils.c (host_pointer_to_address, address_to_host_pointer):
	Change internal_error() message to indicate function responsible
	for the error.
 
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.73
diff -u -p -r1.73 utils.c
--- utils.c	24 Jul 2002 17:58:46 -0000	1.73
+++ utils.c	27 Jul 2002 01:59:47 -0000
@@ -2464,7 +2464,7 @@ host_pointer_to_address (void *ptr)
 {
   if (sizeof (ptr) != TYPE_LENGTH (builtin_type_void_data_ptr))
     internal_error (__FILE__, __LINE__,
-		    "core_addr_to_void_ptr: bad cast");
+		    "host_pointer_to_address: bad cast");
   return POINTER_TO_ADDRESS (builtin_type_void_data_ptr, &ptr);
 }
 
@@ -2474,7 +2474,7 @@ address_to_host_pointer (CORE_ADDR addr)
   void *ptr;
   if (sizeof (ptr) != TYPE_LENGTH (builtin_type_void_data_ptr))
     internal_error (__FILE__, __LINE__,
-		    "core_addr_to_void_ptr: bad cast");
+		    "address_to_host_pointer: bad cast");
   ADDRESS_TO_POINTER (builtin_type_void_data_ptr, &ptr, addr);
   return ptr;
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-07-31 17:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-27 23:26 [PATCH] utils.c: Revise a couple of internal_error() messages Kevin Buettner
2002-07-29  8:56 ` Andrew Cagney
2002-07-31 10:25   ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox