This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 0/1] Don't rewind PC for GHC generated frames


On Mon, Feb 12, 2018 at 2:14 PM, Bartosz Nitka <niteria@gmail.com> wrote:
> 2018-02-12 13:50 GMT+00:00 Yao Qi <qiyaoltc@gmail.com>:
>
>> 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 it.
> 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.

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]