JDevlieghere wrote:

> @JDevlieghere I know we discussed this in the past and it made sense to me, 
> but I'm right now failing to connect the dots. Why couldn't the same 
> single-line interface be used to print nested events something like this?
> 
> ```
> Evaluating expression > Type Checking > Importing "vector<int>" > Finding 
> "begin" in Foo.o
> ```

Shadowing happens with _unrelated_ events. The problem is that you don't want 
to show something like this:

```
Evaluating expression > Type Checking > Some unrelated background operation > 
Importing "vector<int>"
```

Or let's say you're doing some work in parallel:

```
Doing some work on thread 1 > Doing some work on thread 2 > Some nested work on 
thread 2 > Some nested work on thread 1
```

For a single event, you can update it, as we do for importing the Swift 
modules. For your example, today you can show something like this:

```
Evaluating expression: Type Checking
Evaluating expression: Importing "vector<int>"
Evaluating expression: Finding "begin" in Foo.o 
```

Compared to your approach, you lose out on the additional context that's not 
part of the title/category before the colon. On the other hand, that's how we 
aggregate events in the progress manager.

If we want to support nested _related_ events, I think that wouldn't be too 
hard. An event could have a parent event ID and LLDB could append events that 
belong to the currently displayed event. But we'd still shadow _unrelated_ 
events. 

https://github.com/llvm/llvm-project/pull/91452
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to