This is the mail archive of the gdb-prs@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]

[Bug cli/21044] Text or color mark on current line in code listing


https://sourceware.org/bugzilla/show_bug.cgi?id=21044

--- Comment #2 from Yifei Zheng <hlfqdhj at 163 dot com> ---
(In reply to Pedro Alves from comment #1)
> In the TUI (try "tui enable"), we already highlight the current line.
> 
> For "list", I agree that'd be really nice.  (I've wanted it for a long
> while.)
> 
> lldb does that, and puts the arrow before the line numbers, which I think is
> more visible:
> 
>    102        printf(...)
> -> 103        int a = 1; // arrow?
>    104        return 0;
>    105    }
> 
> This shouldn't be hard to implement if someone wants to take a stab at it.
> 
> Note we already print the current instruction in the output of the
> "disassemble" command:
> 
>    0x00000000004009d3 <+12>:    mov    %rsi,-0x30(%rbp)
> => 0x00000000004009d7 <+16>:    mov    $0x400c62,%edi
>    0x00000000004009dc <+21>:    callq  0x400760 <objc_get_class@plt>
>    0x00000000004009e1 <+26>:    mov    %rax,%rbx
> 
> In the TUI, you'll notice that we also indicate which lines have
> breakpoints, with "b+".  That's something that I've wanted for "list" and
> "disassemble" too.

Really fast reply... Thanks for your tips.

I've never used "tui" before. I tried it just now and discovered it's quite
similar to "layout" command (or are they the same?)

And I totally agree with your idea putting arrow before line count.

Anyway thanks for viewing the bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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