[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-03-02 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. Excellent, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119963/new/ https://reviews.llvm.org/D119963 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://li

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-03-02 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added a comment. In D119963#3355563 , @jingham wrote: > In D119963#3355501 , @zequanwu > wrote: > >> Address comments > > This sort of thing is hard to check in the option groups w/o blowing out the > n

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-03-02 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. In D119963#3355501 , @zequanwu wrote: > Address comments This sort of thing is hard to check in the option groups w/o blowing out the number of groups you need to have. The way to check after all the option parsing is done that

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-03-02 Thread Zequan Wu via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG15983c28aa81: [LLDB] Dump valid ranges of variables (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119963/new/ https://reviews.llvm.o

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-03-02 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added inline comments. Comment at: lldb/source/Commands/Options.td:962 +"\\x01">, GroupRange<1, 6>, Desc<"Dump valid ranges of variables (must be " +"used in conjunction with --verbose">; def target_modules_lookup_verbose : Option<"verbose", "v">,

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-03-02 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 412532. zequanwu marked 3 inline comments as done. zequanwu added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119963/new/ https://reviews.llvm.org/D119963 Files: lldb/include/l

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-03-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. Herald added a project: All. Yeah, just a couple little things in the comments. Otherwise this looks good. Comment at: lldb/include/lldb/Core/Address.h:242 +uint32_t addr_byte_size = UINT32_MAX, +bool all_ranges = false) const;

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-03-01 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. Looks good, I'm sorry this took so long. Jim, do you have anything to add? Comment at: lldb/source/Symbol/Variable.cpp:439-440 +bool Variable::DumpLocations(Stream *s, const

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-28 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 411898. zequanwu marked 2 inline comments as done. zequanwu added a comment. Remove unnecessary `location_list_base_addr` parameter from `GetDescription()` as it doesn't do filtering when dumping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-25 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 411446. zequanwu marked 5 inline comments as done. zequanwu added a comment. update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119963/new/ https://reviews.llvm.org/D119963 Files: lldb/include/lldb/Core/

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-25 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Core/Address.cpp:739 - s->PutCString(", location = "); - var_sp->DumpLocationForAddress(s, *this); - s->PutCString(", decl = "); zequanwu wrote: > labath wrote: > > This

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-24 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added inline comments. Comment at: lldb/source/Core/Address.cpp:739 - s->PutCString(", location = "); - var_sp->DumpLocationForAddress(s, *this); - s->PutCString(", decl = "); labath wrote: > This place was the only

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-24 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 411203. zequanwu marked an inline comment as done. zequanwu added a comment. Update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119963/new/ https://reviews.llvm.org/D119963 Files: lldb/include/lldb/Core/

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-24 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Core/Address.cpp:739 - s->PutCString(", location = "); - var_sp->DumpLocationForAddress(s, *this); - s->PutCString(", decl = "); This place was the only caller of Variabl

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-23 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s:28-29 # CHECK: Variable{{.*}}, name = "x0", {{.*}}, scope = parameter, location = # CHECK-NEXT: [0x, 0x0001): DW_OP_reg5 RDI # CHECK-NEXT: [0x

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-23 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 410882. zequanwu marked 3 inline comments as done. zequanwu added a comment. - Remove short option. `-show-variable-ranges` prints all ranges. If not given, only print single range. - Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-23 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I'm not sure about `ModuleLookupShowRange::Single` option. It feels like it just complicates things. Did anyone request that? FWIW, I don't think that dumping a /single/ range is particularly verbose, so I could imagine even doing that by default. I think it should be s

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-22 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s:28-29 # CHECK: Variable{{.*}}, name = "x0", {{.*}}, scope = parameter, location = # CHECK-NEXT: [0x, 0x0001): DW_OP_reg5 RDI # CHECK-NEXT: [0x

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-22 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 410679. zequanwu added a comment. - Use `-show-variable-ranges/-R single/all` to dump single addres range that contains the querying address or all address ranges. It seeme like I can't use non-printable character like `\\x01` to omit short option when it t

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s:28-29 # CHECK: Variable{{.*}}, name = "x0", {{.*}}, scope = parameter, location = # CHECK-NEXT: [0x, 0x0001): DW_OP_reg5 RDI # CHECK-NEXT: [0x00

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-18 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s:28-29 # CHECK: Variable{{.*}}, name = "x0", {{.*}}, scope = parameter, location = # CHECK-NEXT: [0x, 0x0001): DW_OP_reg5 RDI # CHECK-NEXT: [0x

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-18 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D119963#3329973 , @jingham wrote: > There was a question on the dev list a while ago about to print out all the > valid ranges of a variable. That's a useful bit of info if you're trying to > figure out where you could break

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added a comment. > It is a little awkward to put it in "image lookup -va" however, and odder to > have it be part of the printing of an Address. It seems more like something > you should ask a function? When you look up a function, using `image lookup -n main`, it

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s:28-29 # CHECK: Variable{{.*}}, name = "x0", {{.*}}, scope = parameter, location = # CHECK-NEXT: [0x, 0x0001): DW_OP_reg5 RDI # CHECK-NEXT: [0x00

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s:16 +# CHECK-LABEL: image lookup -v -a 0 -R +# CHECK: Variable: {{.*}}, name = "x0", type = "int", location = DW_OP_reg5 RDI, decl = , valid ranges = +# CHECK: Variable: {{.*}}, name = "x

Re: [Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Jim Ingham via lldb-commits
There was a question on the dev list a while ago about to print out all the valid ranges of a variable. That's a useful bit of info if you're trying to figure out where you could break to actually see or change a variable's value in an optimized function. I think that's the motivation for the

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I suppose one could ask the question whether this should be printing the entire set range of ranges, or just the one Comment at: lldb/source/Commands/Options.td:960 "target modules.">; + def target_modules_lookup_variables_ranges : Option<"show-va

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-16 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 409440. zequanwu added a comment. Herald added a subscriber: dang. Add `-show-variables-ranges`/`-R` flag to enable it with `-v`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119963/new/ https://reviews.llvm.

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-16 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. In D119963#3327472 , @zequanwu wrote: > In D119963#3327139 , @jingham wrote: > >> It's really useful to be able to see these variable ranges, so the feature >> seems good to me, but I thi

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-16 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added a comment. In D119963#3327139 , @jingham wrote: > It's really useful to be able to see these variable ranges, so the feature > seems good to me, but I think the valid range output should be governed by > another flag, like --show-variable

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-16 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. I think the valid range output should be governed by another flag, like --show-variable-ranges. In optimized code, there can be a whole lot of ranges for each variable, so this could get really noisy and make the whole output hard to look at. Repository: rG LLVM Gi

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-16 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu created this revision. zequanwu added a reviewer: labath. zequanwu requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. This allows `image lookup -a ... -v` to print variables only if the given address is covered by the valid ranges of