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]

Re: [PATCH] utils.c: Revise a couple of internal_error() messages


 {
   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);
 }
BTW, another (easier/better?) way of resolving this is to convert the above into gdb_assert(). That way you pick up the function name for free (and in a maintainable way).

enjoy,
Andrew



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