From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22553 invoked by alias); 10 Oct 2002 22:09:00 -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 22546 invoked from network); 10 Oct 2002 22:08:59 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 10 Oct 2002 22:08:59 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g9ALn1X09398 for ; Thu, 10 Oct 2002 17:49:01 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9AM8wf03938 for ; Thu, 10 Oct 2002 18:08:58 -0400 Received: from localhost.localdomain (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9AM8wa29609 for ; Thu, 10 Oct 2002 18:08:58 -0400 From: "Martin M. Hunt" Organization: Red Hat Inc To: gdb-patches@sources.redhat.com Subject: [RFA] string_to_core_addr fix Date: Thu, 10 Oct 2002 15:09:00 -0000 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_YGDS26HNKQM501PP0Y9R" Message-Id: <200210101507.46548.hunt@redhat.com> X-SW-Source: 2002-10/txt/msg00225.txt.bz2 --------------Boundary-00=_YGDS26HNKQM501PP0Y9R Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-length: 357 This is necessary for 64-bit targets where sometimes 32-bit values must be sign-extended to 64-bits. 2002-10-10 Martin M. Hunt * utils.c (string_to_core_addr): After turning string into a number, convert to a CORE_ADDR using POINTER_TO_ADDRESS which will do necessary sign-extension, etc. -- Martin Hunt GDB Engineer Red Hat, Inc. --------------Boundary-00=_YGDS26HNKQM501PP0Y9R Content-Type: text/x-diff; charset="us-ascii"; name="p" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p" Content-length: 486 Index: utils.c =================================================================== RCS file: /cvs/src/src/gdb/utils.c,v retrieving revision 1.80 diff -u -p -r1.80 utils.c --- utils.c 20 Sep 2002 00:24:01 -0000 1.80 +++ utils.c 10 Oct 2002 22:06:50 -0000 @@ -2649,7 +2649,7 @@ string_to_core_addr (const char *my_stri internal_error (__FILE__, __LINE__, "invalid decimal"); } } - return addr; + return POINTER_TO_ADDRESS (builtin_type_void_data_ptr, &addr); } char * --------------Boundary-00=_YGDS26HNKQM501PP0Y9R--