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


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


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