From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6915 invoked by alias); 28 Sep 2006 22:42:49 -0000 Received: (qmail 6906 invoked by uid 22791); 28 Sep 2006 22:42:49 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 28 Sep 2006 22:42:47 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GT4ab-0005ty-1t; Thu, 28 Sep 2006 18:42:45 -0400 Date: Thu, 28 Sep 2006 22:42:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org, Mark Kettenis Subject: dwarf2-frame vs set_loc Message-ID: <20060928224245.GA21955@nevyn.them.org> Mail-Followup-To: gdb@sourceware.org, Mark Kettenis MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00185.txt.bz2 Hi Mark, I can't work out a way to fix this in the time I've got this evening, so I just wanted to record it, and send a copy your way in case you're interested in fixing it; you're more familiar with dwarf2-frame.c and the formats it handles than I am. GCC was temporarily changed to use DW_CFA_set_loc at the start of FDEs. I believe that change has now been backed out again; it was wrong (and partly my fault). But Debian happened to pick up a snapshot containing that patch and it caused a couple of GDB test failures. At least one, anyway, I'm not sure if the other two had the same cause. This is on x86_64. I tracked the problem down to use of dwarf2_read_address. As far as I can tell, what we really need is to use read_encoded_value for this. But, that wants a "struct comp_unit" (misleading name? It's really not DW_TAG_compile_unit related at all, it's the whole object). And we don't have one any more by the time we're in execute_cfa_program, so that's where I gave up. Anyway, there's an 'R' augmentation specifying the encoding, which happens to use only four bytes for pointers and not the eight that dwarf2_read_address is expecting, and so we decide the first instruction of the FDE is way out in the middle of nowhere. Backtraces break. -- Daniel Jacobowitz CodeSourcery