[Lldb-commits] [PATCH] D75070: [lldb] Color the line marker

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 24 14:47:58 PST 2020


JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.


================
Comment at: lldb/source/Core/Debugger.cpp:443
+  const uint32_t idx = ePropertyStopShowLineMarkerAnsiPrefix;
+  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx, "");
+}
----------------
clayborg wrote:
> do we have a setting to control how the current line marked? Right now do we hard code it to "->"?
> 
> When I stop I see:
> 
> ```
> (lldb) b main
> Breakpoint 1: where = a.out`main + 20 at main.cpp:5:14, address = 0x0000000100000fa4
> (lldb) r
> Process 1635 launched: '/Users/gclayton/Documents/src/args/a.out' (x86_64)
> Process 1635 stopped
> * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
>     frame #0: 0x0000000100000fa4 a.out`main(argc=1, argv=0x00007ffeefbff7d0) at main.cpp:5:14
>    2   	  return 2*i;
>    3   	}
>    4   	int main(int argc, const char **argv) {
> -> 5   		int i = foo(argc);
>    6   		return 0;
>    7   	}
>    8   	
> ```
> 
> Can we make this setting default to "-> " so that the user can change how the current line is marked above and beyond using a color or ansi code?
It's probably doable but I'm not sure if it's worth it:
 
 - This is consistent with the column marker where it doesn't made sense to change the marker because it's just source code. 
 - Either we need to enforce that the marker is <2 characters or we need to dynamically format everything based on the width, which is complicated by the escape codes. 
 - You can't change the current PC marker either.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75070/new/

https://reviews.llvm.org/D75070





More information about the lldb-commits mailing list