From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23722 invoked by alias); 10 Oct 2006 18:28:43 -0000 Received: (qmail 23711 invoked by uid 22791); 10 Oct 2006 18:28:42 -0000 X-Spam-Status: No, hits=0.6 required=5.0 tests=AWL,BAYES_00,FORGED_RCVD_HELO,RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from c-24-5-197-144.hsd1.ca.comcast.net (HELO gateway.sf.frob.com) (24.5.197.144) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Oct 2006 18:28:37 +0000 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id 2A0DE357B; Tue, 10 Oct 2006 11:28:32 -0700 (PDT) Received: by magilla.sf.frob.com (Postfix, from userid 5281) id CA3B7180066; Tue, 10 Oct 2006 11:28:31 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: "Frank Ch. Eigler" Cc: Mike Mason , systemtap@sources.redhat.com Subject: Re: Problem with 32-bit negative return values In-Reply-To: Frank Ch. Eigler's message of Tuesday, 10 October 2006 13:51:59 -0400 <20061010175159.GH14473@redhat.com> X-Shopping-List: (1) Anxious polluters (2) Murderous bums (3) Flammable Gaelic hider picnics (4) Apathetic aspersions Message-Id: <20061010182831.CA3B7180066@magilla.sf.frob.com> Date: Tue, 10 Oct 2006 18:28:00 -0000 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q4/txt/msg00068.txt.bz2 > It could easily be a typing/sign-extension bug in the loc2c-related > code. Could you check the generated C code (-p3; look for the > _dwarf_tvar_get function)? All loc2c-generated fetches use unsigned types of the target object size, i.e. uint32_t here. loc2c just fetches the bits. Your general expression code that uses the fetched value should cast appropriately for the signedness and size you want to calculate with.