From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87357 invoked by alias); 12 Feb 2018 14:42:48 -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 87339 invoked by uid 89); 12 Feb 2018 14:42:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=invented, Hx-languages-length:2040 X-HELO: mail-qk0-f170.google.com Received: from mail-qk0-f170.google.com (HELO mail-qk0-f170.google.com) (209.85.220.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Feb 2018 14:42:46 +0000 Received: by mail-qk0-f170.google.com with SMTP id x127so18590590qkb.12 for ; Mon, 12 Feb 2018 06:42:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=y5c2JXCSRG9nWc9UCa5jKlbgYiQHFF9uQcBc+UcK7CY=; b=O+rPPh91bKoCQ+0dTsL3PX5TRhq7tjyRKcW1zHwEUC8bS/s8gs8IqjByw5mVJ1sxr6 g0JYkvtRbafn37v3+qjMbcJkQyF2rKx35Sl4SLiVWn3K5lhTp7DTZuE4RdWPodw2DFeK xnwK6lUfWD83V862cphHeeKiFzojnyMupjz3qOM+iZJyAcP0c3NmKA6NhsCz9dbsPmOV Jva+gQO5tsKMW/JUKSIdkHLPcSeBuc3sF7Dg9dLXyh76heCnUYwAlppCeEhymXNE8V0L mDTUXyyN1sB9zkSuqWh+ZTrH94e80nchh0sO87UU4COZvrbbdlT7WFNgjbWySXTDs92G sgZg== X-Gm-Message-State: APf1xPBUFi58Y2VD88Y+rJvd/Y6jXKAwsJBEsRbOAKjdMh4J88PNmbJC /49JqHNGGRZ95wgMiFXzOewLSk7oY2DzE3CT7RV/xQ== X-Google-Smtp-Source: AH8x2249fBPEZbGrgRvjyTnG+KQkAY9NV48GvUfHYKcDNJZu+4jZth8eOylyD2dRdLWndB0ouhOIcWUh9jpibLRhmYQ= X-Received: by 10.55.88.68 with SMTP id m65mr17923271qkb.186.1518446565287; Mon, 12 Feb 2018 06:42:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.153.232 with HTTP; Mon, 12 Feb 2018 06:42:44 -0800 (PST) In-Reply-To: References: <20180204000647.19188-1-niteria@gmail.com> From: Yao Qi Date: Mon, 12 Feb 2018 14:42:00 -0000 Message-ID: Subject: Re: [PATCH v3 0/1] Don't rewind PC for GHC generated frames To: Bartosz Nitka Cc: GDB Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00170.txt.bz2 On Mon, Feb 12, 2018 at 2:14 PM, Bartosz Nitka wrote: > 2018-02-12 13:50 GMT+00:00 Yao Qi : > >> If what you meant is DW_LNS_set_column, then, other compilers >> also generates it, and GDB doesn't use it. > > I'm not familiar with DW_LNS_set_column, perhaps GHC can be made to use i= t. > The current encoding is described in [1]. Based on my experimentation [2]= lldb > seems to understand it. Note > LineEntry: [0x00000000004056f7-0x0000000000405720): > /data/users/bnitka/tmp/fib.hs:3:9 > there. The second number (9) is the column number. GHC is completely new to me, so I don't understand the reason DW_TAG_ghc_src_note was added to describe line/column. To me, it is .debug_line's responsibility. > >> What do you want to add to GDB? > > Using the example from the summary. Currently gdb shows: > > (gdb) bt > #0 Main_zdwfib_info () at fib.hs:3 > #1 Main_zdwfib_info () at fib.hs:4 > #2 Main_zdwfib_info () at fib.hs:4 > #3 Main_zdwfib_info () at fib.hs:4 > > I'd like it to show something like: > > (gdb) bt > #0 Main_zdwfib_info () at fib.hs:3:9 > #1 Main_zdwfib_info () at fib.hs:4:20 > #2 Main_zdwfib_info () at fib.hs:4:20 > #3 Main_zdwfib_info () at fib.hs:4:20 > > Similarly, currently when you do: > > (gdb) info line *f1_info > Line 4 of "fib.hs" starts at address... > > I'd like to get: > > Line 4, column 20 of "fib.hs" starts at address... > Yes, they are good improvements to GDB, IMO. FAOD, it is good to me that we can show and use column information in GDB. If the column information is from DW_LNS_set_column, that is absolutely fine to me, because DW_LNS_set_column is in standard dwarf spec. However, if column information is from DW_TAG_ghc_src_note, we want to support it, it should be discussed as "Haskell/GHC support in GDB". It is great if you can describe the reason that DW_TAG_ghc_src_note was invented rather than using existing dwarf line program to describe line/column information. --=20 Yao (=E9=BD=90=E5=B0=A7)