This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 0/1] Don't rewind PC for GHC generated frames
- From: Bartosz Nitka <niteria at gmail dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Mon, 12 Feb 2018 14:14:28 +0000
- Subject: Re: [PATCH v3 0/1] Don't rewind PC for GHC generated frames
- Authentication-results: sourceware.org; auth=none
- References: <20180204000647.19188-1-niteria@gmail.com> <CAH=s-PPFSafb123n2shgwQciRXO8rgUqoOszXyvMNYfP9R4aVA@mail.gmail.com>
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.
> Maybe, GDB can use
> it in TUI mode, to blink on the right line and column, or GDB tells
> MI front ends the column number so they can highlight accordingly.
I'm not a regular user of TUI mode or other front ends, so this
wouldn't be the priority for me.
> 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...
The ability to break on line + column would also be welcome, but it's
not that important to me.
[1] https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/debug-info.html?highlight=dw_tag_ghc_src_note#dw-tag-ghc-src-note
[2] https://ghc.haskell.org/trac/ghc/wiki/DWARF#lldb