From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15583 invoked by alias); 17 Feb 2010 20:10:37 -0000 Received: (qmail 15575 invoked by uid 22791); 17 Feb 2010 20:10:37 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,NO_DNS_FOR_FROM X-Spam-Check-By: sourceware.org Received: from mga07.intel.com (HELO azsmga101.ch.intel.com) (143.182.124.22) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Feb 2010 20:10:33 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 17 Feb 2010 12:10:32 -0800 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.107]) by azsmga001.ch.intel.com with ESMTP; 17 Feb 2010 12:10:32 -0800 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 955E6812344; Wed, 17 Feb 2010 12:10:31 -0800 (PST) Date: Wed, 17 Feb 2010 20:10:00 -0000 From: "H.J. Lu" To: GDB Subject: PATCH: PR shlibs/11293: gdb is broken on Linux/i386 Message-ID: <20100217201031.GA24995@lucon.org> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00439.txt.bz2 Hi, ULONGEST is 64bit on Linux/i386. We should check CORE_ADDR instead of ULONGEST for address size. OK to install? Thanks. H.J. -- 2010-02-17 H.J. Lu PR shlibs/11293 * solib-svr4.c (enable_break): Check size of CORE_ADDR instead of ULONGEST for address size. diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index b3b9e00..f4fccb2 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1459,7 +1459,7 @@ enable_break (struct svr4_info *info, int from_tty) invalid addresses like 0x101234567 for 32bit inferiors on 64bit GDB. */ - if (addr_bit < (sizeof (ULONGEST) * HOST_CHAR_BIT)) + if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT)) { CORE_ADDR space_size = (ULONGEST) 1 << addr_bit; CORE_ADDR tmp_entry_point = exec_entry_point (tmp_bfd,