[Lldb-commits] [lldb] Colorize output when searching for symbols in lldb (PR #69422)
José Lira Junior via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 6 17:50:55 PST 2023
junior-jl wrote:
Hi David! I'm working with @taalhaataahir0102 on this. I addressed some of your comments.
First, in the renamed `DumpName`, I tried using `llvm` Regex instead of `std`. It is passing the tests, so I hope it's okay. One question about it, do you think `Address` is the right class for this function?
While I was working in the test you recommended, I noticed the following: if I run `image lookup -r -s UNEXPECTED_PATTERN` through the '-o' flag, any command passed after that with another '-o' flag will not be executed, i.e.,
```
$ ./bin/lldb ~/bla.out -o 'image lookup -r -s maiasdfaklçdfklçasdf' -o 'process launch -m'
(lldb) target create "/home/jose/bla.out"
Current executable set to '/home/jose/bla.out' (x86_64).
(lldb) image lookup -r -s maiasdfaklçdfklçasdf
(lldb)
```
Here, `process launch -m` was not executed.
But if it is successfully executed, the next command will also be executed:
```
$ ./bin/lldb ~/bla.out -o 'image lookup -r -s mai' -o 'process launch -m'
(lldb) target create "/home/jose/bla.out"
Current executable set to '/home/jose/bla.out' (x86_64).
(lldb) image lookup -r -s mai
2 symbols match the regular expression 'mai' in /home/jose/bla.out:
Name: __libc_start_main at GLIBC_2.34
Value: 0x0000000000000000
Address: bla.out[0x0000000000001140] (bla.out.PT_LOAD[1]..text + 256)
Summary: bla.out`main at bla.c:2
(lldb) process launch -m
Process 221903 stopped
* thread #1, name = 'bla.out', stop reason = one-shot breakpoint 1
frame #0: 0x0000555555555140 bla.out`main at bla.c:2
1 int foo() { return 0; }
-> 2 int main() { return foo(); }
Process 221903 launched: '/home/jose/bla.out' (x86_64)
```
I did not test yet if this was caused by this PR's changes.
https://github.com/llvm/llvm-project/pull/69422
More information about the lldb-commits
mailing list