From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11588 invoked by alias); 5 Mar 2014 16:58:19 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 11439 invoked by uid 89); 5 Mar 2014 16:58:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f179.google.com Received: from mail-lb0-f179.google.com (HELO mail-lb0-f179.google.com) (209.85.217.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 05 Mar 2014 16:58:16 +0000 Received: by mail-lb0-f179.google.com with SMTP id p9so874635lbv.24 for ; Wed, 05 Mar 2014 08:58:13 -0800 (PST) X-Received: by 10.112.156.71 with SMTP id wc7mr1897722lbb.56.1394038684016; Wed, 05 Mar 2014 08:58:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.64.225 with HTTP; Wed, 5 Mar 2014 08:57:43 -0800 (PST) In-Reply-To: <20140305151609.GP4860@adacore.com> References: <20140228163339.GC4860@adacore.com> <1393610228.3893.49.camel@cslin101.csunix.comp.leeds.ac.uk> <20140305151609.GP4860@adacore.com> From: Johan Tibell Date: Wed, 05 Mar 2014 16:58:00 -0000 Message-ID: Subject: Re: Making GDB recognize the Haskell DWARF source language ID To: Peter Wortmann Cc: gdb , Joel Brobecker Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00006.txt.bz2 On Wed, Mar 5, 2014 at 4:16 PM, Joel Brobecker wrote: >> Wile we're at it, here's another issue we are struggling with: >> >> #1 0x0000000000694330 in ?? () at rts/Updates.cmm:57 >> >> What happens here is that 694330 gets derived correctly as the address >> to return to, but GDB actually seems to attempt to look up 69432f (= the >> address right in front) for display name and line number information. >> That might make sense for most compiled languages, but for GHC code, the >> space in front of return code pointers is an info table (= data). Hence >> GDB gets moderately confused when it can't find any information on it. >> >> So far we essentially hack around this by applying a suitable "offset" >> to line data as well as unwind information. That's why we have a source >> code pointer, and the stack trace doesn't simply stop at that point. But >> that's a rather crude solution, so any ideas would be appreciated. > > I'm not really sure in this case. The model seems odd - are you > returning outside of the function's code / block range, or do you > have data in the middle of your function code? Perhaps a language > hook to provide flexibility in the offset... Peter, do you have an assembly example for a single function that includes both the function body and the data section that precedes it? -- Johan