From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] utils.c: Revise a couple of internal_error() messages
Date: Sat, 27 Jul 2002 23:26:00 -0000 [thread overview]
Message-ID: <1020727020803.ZM21102@localhost.localdomain> (raw)
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;
}
next reply other threads:[~2002-07-27 2:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-27 23:26 Kevin Buettner [this message]
2002-07-29 8:56 ` Andrew Cagney
2002-07-31 10:25 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1020727020803.ZM21102@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox