From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24074 invoked by alias); 27 Jul 2002 02:08:06 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24067 invoked from network); 27 Jul 2002 02:08:06 -0000 Received: from unknown (HELO potter.sfbay.redhat.com) (205.180.83.107) by sources.redhat.com with SMTP; 27 Jul 2002 02:08:06 -0000 Received: from romulus.sfbay.redhat.com (IDENT:NAnQ1gObzTikywwGMJufgrYO0TzHKbBI@romulus.sfbay.redhat.com [172.16.27.251]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g6R28HQ07459 for ; Fri, 26 Jul 2002 19:08:17 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g6R283m21103 for gdb-patches@sources.redhat.com; Fri, 26 Jul 2002 19:08:03 -0700 Date: Sat, 27 Jul 2002 23:26:00 -0000 From: Kevin Buettner Message-Id: <1020727020803.ZM21102@localhost.localdomain> To: gdb-patches@sources.redhat.com Subject: [PATCH] utils.c: Revise a couple of internal_error() messages MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-07/txt/msg00545.txt.bz2 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; }