From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20746 invoked by alias); 21 Jul 2004 20:30:02 -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 20724 invoked from network); 21 Jul 2004 20:30:00 -0000 Received: from unknown (HELO copland.kettenis.dyndns.org) (82.74.7.234) by sourceware.org with SMTP; 21 Jul 2004 20:30:00 -0000 Received: from copland.kettenis.dyndns.org (kettenis@localhost.kettenis.dyndns.org [127.0.0.1]) by copland.kettenis.dyndns.org (8.13.0/8.13.0) with ESMTP id i6LKTiuw027674; Wed, 21 Jul 2004 22:29:44 +0200 (CEST) Received: (from kettenis@localhost) by copland.kettenis.dyndns.org (8.13.0/8.13.0/Submit) id i6LKThsR022356; Wed, 21 Jul 2004 22:29:43 +0200 (CEST) Date: Wed, 21 Jul 2004 20:30:00 -0000 Message-Id: <200407212029.i6LKThsR022356@copland.kettenis.dyndns.org> From: Mark Kettenis To: hunt@redhat.com CC: gdb-patches@sources.redhat.com In-reply-to: <1090350684.3030.10.camel@dragon> (hunt@redhat.com) Subject: Re: [RFA] dwarf2-frame.c sign extension patch References: <1090350684.3030.10.camel@dragon> X-SW-Source: 2004-07/txt/msg00286.txt.bz2 From: "Martin M. Hunt" Date: Tue, 20 Jul 2004 12:11:25 -0700 This patch fixes some dwarf2 problems with sign-extension. 2004-07-20 Kevin Buettner and Martin Hunt * dwarf2-frame.c (execute_cfa_program): Fix typo in which the alignment was being added to the offset instead of multiplied. This is unrelated to the rest of the changes. Please make this a seperate commit. Consider that one pre-approved. (struct comp_unit): Add new field ``signed_addr_p''. (encoding_for_size): Add new parameter ``signed_addr_p''. Adjust all callers. Add code for handling signed encodings. (dwarf2_build_frame_info): Initialize ``unit.signed_addr_p''. These are all related, so there shouldn't be any blank lines between them. The formatting of your changes to encoding_for_size() is wrong. Please re-indent the exitsing return()-lines. Or perhaps it's better to use: return signed_addr_p ? DW_EH_PE_sdata4 : DW_EH_PE_udata4; (dwarf2_build_frame_info): Set unit.addr_size. Why is the old code wrong? The comment clearly says "from unit header" which is what the DWARF standard says (or at least implies). Theoretically it could change from compilation unit to compilation unit. So I think your change to replace it by TYPE_LENGTH(builtin_type_void_data_ptr) is wrong. Mark