From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51276 invoked by alias); 28 Sep 2018 16:03:58 -0000 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 Received: (qmail 51001 invoked by uid 89); 28 Sep 2018 16:03:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=notwithstanding, Hx-languages-length:1431 X-HELO: jocasta.intra Received: from de.cellform.com (HELO jocasta.intra) (88.217.224.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Sep 2018 16:03:57 +0000 Received: from jocasta.intra (localhost [127.0.0.1]) by jocasta.intra (8.15.2/8.15.2/Debian-8) with ESMTPS id w8SG3keH018627 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Sep 2018 18:03:46 +0200 Received: (from john@localhost) by jocasta.intra (8.15.2/8.15.2/Submit) id w8SG3j3i018626; Fri, 28 Sep 2018 18:03:45 +0200 Date: Fri, 28 Sep 2018 16:03:00 -0000 From: John Darrington To: Simon Marchi Cc: John Darrington , Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 2/4] Add a dwarf unit type to represent 24 bit values. Message-ID: <20180928160345.lhshan3b7wwtviea@jocasta.intra> References: <20180829141845.26378-1-john@darrington.wattle.id.au> <20180829141845.26378-3-john@darrington.wattle.id.au> <878t4dvuyf.fsf@tromey.com> <20180926174157.mw5eocxlfmgliua7@jocasta.intra> <20180927054924.e5hgaw4dwdkjezv3@jocasta.intra> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-09/txt/msg00902.txt.bz2 On Thu, Sep 27, 2018 at 01:53:35PM -0400, Simon Marchi wrote: After a short discussion with John on IRC, what I understand is that the debug info he is dealing with encodes the 24-bit addresses on 32-bits, with the most significant byte equal to zero. Therefore that revised patch looks ok to me. I would just ask you to add a comment explaining that this "case" exists for producer XYZ on S12Z, which encodes 24 bit addresses on 32 bits. Maybe that in the future somebody will stumble on a producer that encodes 24 bit addresses on 24 bits. Having an explanation for why things are the way they are will help. When I look at the situation in more detail a number of things are apparent: 1. The dwarf .frame_debug CFI information does indeed code these values as 32 bits. 2. This would seem to contradict the dwarf 2.0 standard which says they are "addressing-unit sized values". 3. objdump expects these values to be 24 bits. 4. However readelf expects them to be 32 bits. 5. Notwithstanding the above, the produced dwarf which I have, contains lots of FDE entries, with lots of CFIs. However the contents of all CFIs are empty. Consequently it's of little use. Given the above, I think the best course of action is to do nothing, on this point. So I'll do without a dwarf unwinder until there's a producer which actually produces something useful. J'