[Lldb-commits] [PATCH] D52572: Replace pointer to C-array of PropertyDefinition with llvm::ArrayRef

2018-09-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: tatyana-krasnukha. zturner added a comment. It would be nice if You could replace the logic that iterates these arrays. We no longer need to terminate on a sentinel nullptr entry and can now use range based for loop Repository: rLLDB LLDB https://reviews.llvm.org/D

[Lldb-commits] [PATCH] D52572: Replace pointer to C-array of PropertyDefinition with llvm::ArrayRef

2018-09-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. You might be right, I’m on mobile so hard for me to review. I saw a bunch of nullptr so assumed it was still using sentinel values for iterating. If not, ignore my suggestion Repository: rLLDB LLDB https://reviews.llvm.org/D52572 ___

[Lldb-commits] [PATCH] D52572: Replace pointer to C-array of PropertyDefinition with llvm::ArrayRef

2018-09-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. No, separate revision is fine. Thanks! Repository: rLLDB LLDB https://reviews.llvm.org/D52572 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D52618: [Windows] A basic implementation of memory allocations in a debuggee process

2018-09-27 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: aleksandr.urakov. zturner added a comment. It requires a lot of work (nobody has started porting it). lldb-server exists on other platforms but it basically needs a full port to Windows. It doesn’t use the same process plugin, but it would instead use a different plugin

[Lldb-commits] [PATCH] D52468: [PDB] Treat `char`, `signed char` and `unsigned char` as three different types

2018-09-27 Thread Zachary Turner via Phabricator via lldb-commits
zturner accepted this revision. zturner added a comment. Can you change the description of the patch before submitting it? It's hard to understand why the change does what the description says it does, because the description mentions 3 types of chars but the patch only handles 1. I would jus

[Lldb-commits] [PATCH] D52627: [lldb] Start a new line for the next output if there are no symbols in the current symtab

2018-09-27 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. Couple of options: 1. Can you give an example of before/after output? 2. Is the `size_t` change related? 3. Can you use -U99 in the future when generating patches? Repository: rLLDB LLDB https://reviews.llvm.org/D52627 _

[Lldb-commits] [PATCH] D52627: [lldb] Start a new line for the next output if there are no symbols in the current symtab

2018-09-27 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. s/options/comments/ Repository: rLLDB LLDB https://reviews.llvm.org/D52627 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D52626: [lldb] Remove an assertion in RichManglingContext::GetBufferRef() hit when debugging a native x86 Windows process

2018-09-27 Thread Zachary Turner via Phabricator via lldb-commits
zturner accepted this revision. zturner added a comment. This revision is now accepted and ready to land. BTW, I wrote a demangler for Windows ABI that should be 100% complete modulo bugs and can generate an AST that RichManglingContext should use. So it would be interesting if someone decided

[Lldb-commits] [PATCH] D52618: [Windows] A basic implementation of memory allocations in a debuggee process

2018-09-28 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. I think it’s fine. Eventually when you are ready to support remote debugging hopefully we can convert it over to using lldb-server https://reviews.llvm.org/D52618 ___ lldb-commits mailing list lldb-commits@lists.llvm.org htt

[Lldb-commits] [PATCH] D52618: [Windows] A basic implementation of memory allocations in a debuggee process

2018-10-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. One idea would be to define some lit substitutions like %debuginfo. It’s true you can produce a gcc style command line that will be equivalent to a clang-cl invocation but it won’t be easy. eg you’ll needing to pass -fms-compatibility as well as various -I for includes. I

[Lldb-commits] [PATCH] D52618: [Windows] A basic implementation of memory allocations in a debuggee process

2018-10-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D52618#1251076, @stella.stamenova wrote: > In https://reviews.llvm.org/D52618#1250909, @zturner wrote: > > > One idea would be to define some lit substitutions like %debuginfo. It’s > > true you can produce a gcc style command line that will b

[Lldb-commits] [PATCH] D52618: [Windows] A basic implementation of memory allocations in a debuggee process

2018-10-02 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D52618#1252372, @labath wrote: > In https://reviews.llvm.org/D52618#1250909, @zturner wrote: > > > One idea would be to define some lit substitutions like %debuginfo. It’s > > true you can produce a gcc style command line that will be equivale

[Lldb-commits] [PATCH] D53086: [PDB] Fix flaky `variables-locations.test` after PR38857

2018-10-10 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. > By the way, what do you think, how can we make LLDB support aligned stacks? > As far as I know, similar alignment problems are reproducible on non-Windows > too. When you see VFRAME, you need to look in FPO data. As you might have guessed, VFRAME only occurs in X86.

[Lldb-commits] [PATCH] D53086: [PDB] Fix flaky `variables-locations.test` after PR38857

2018-10-10 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. You didn't include it here, but I notice the test file just writes `clang-cl /Zi`. Should we be passing `-m32` or `-m64`? Currently, the test just runs with whatever architecture happens to be set via the VS command prompt. The behavior here is different on x86 and x

[Lldb-commits] [PATCH] D53090: [ProcessWindows] Fix a bug that causes lldb to freeze

2018-10-10 Thread Zachary Turner via Phabricator via lldb-commits
zturner accepted this revision. zturner added a comment. This revision is now accepted and ready to land. Nice find, thanks Repository: rLLDB LLDB https://reviews.llvm.org/D53090 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://li

[Lldb-commits] [PATCH] D53094: [pecoff] Implement ObjectFilePECOFF::GetDependedModules()

2018-10-10 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. If you plan to invest in more substantial changes in `ObjectFilePECOFF`, it might worth considering a complete re-write in terms of `llvm::object::coff`. It has pretty comprehensive support for the PE/COFF spec, so it's just a matter of implementing `ObjectFilePECOFF`

[Lldb-commits] [PATCH] D53166: [lldbsuite] Fix the filecheck functionality to work with Python 3

2018-10-11 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: packages/Python/lldbsuite/test/lldbtest.py:2230-2233 +# In Python 2, communicate sends byte strings. In Python 3, communicate sends bytes. +# If we got a string (and not a byte string), encode it before sending. +

[Lldb-commits] [PATCH] D50478: Add support for artificial tail call frames

2018-10-11 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: vsk. zturner added a comment. See the other email thread. The bots have been broken since September, all of them complain about missing FileCheck executable Repository: rLLDB LLDB https://reviews.llvm.org/D50478 ___ l

[Lldb-commits] [PATCH] D50478: Add support for artificial tail call frames

2018-10-11 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: aprantl. zturner added a comment. https://reviews.llvm.org/D53002 Is the thread I'm referring to. Repository: rLLDB LLDB https://reviews.llvm.org/D50478 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http:/

[Lldb-commits] [PATCH] D53175: [dotest] Make a missing FileCheck binary a warning, not an error

2018-10-11 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: vsk. zturner added a comment. Why is FileCheck missing in the first place? https://reviews.llvm.org/D53175 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-comm

[Lldb-commits] [PATCH] D53086: [PDB] Fix flaky `variables-locations.test` after PR38857

2018-10-11 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53086#1261697, @aleksandr.urakov wrote: > Thanks a lot for so detailed answer, it helps! > > So we need to parse a FPO program and to convert it in a DWARF expression > too. The problem here (in the DIA case) is that I don't know how to retri

[Lldb-commits] [PATCH] D53086: [PDB] Fix flaky `variables-locations.test` after PR38857

2018-10-11 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53086#1263001, @zturner wrote: > In https://reviews.llvm.org/D53086#1261697, @aleksandr.urakov wrote: > > > Thanks a lot for so detailed answer, it helps! > > > > So we need to parse a FPO program and to convert it in a DWARF expression > > t

[Lldb-commits] [PATCH] D52461: [PDB] Introduce `PDBNameParser`

2018-10-15 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D52461#1265335, @aleksandr.urakov wrote: > Hello! > > I just have tried to patch `CPlusPlusNameParser` in the way to support MSVC > demangled names, but there is a problem. `CPlusPlusNameParser` splits an > incoming name in tokens with `clang

[Lldb-commits] [PATCH] D53402: [SymbolFileNativePDB] Fix missing linkage to DebugInfoCodeView

2018-10-18 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: mgorny. zturner added a comment. Lgtm Repository: rLLDB LLDB https://reviews.llvm.org/D53402 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D53506: [ClangASTContext] Extract VTable pointers from C++ objects

2018-10-22 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. > PDB has no enough info to restore VBase offsets properly, so we have to read > real VTable instead. What's missing that you're unable to restore the VBase offset properly? Repository: rLLDB LLDB https://reviews.llvm.org/D53506 __

[Lldb-commits] [PATCH] D53506: [ClangASTContext] Extract VTable pointers from C++ objects

2018-10-22 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53506#1270919, @aleksandr.urakov wrote: > In https://reviews.llvm.org/D53506#1270893, @zturner wrote: > > > What's missing that you're unable to restore the VBase offset properly? > > > If I understand correctly, in the PDB there is only info

[Lldb-commits] [PATCH] D53511: [NativePDB] Support type lookup by name

2018-10-22 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: labath, lemo, aleksandr.urakov, stella.stamenova, asmith. Herald added subscribers: arphaman, mgorny. This is the minimal set of functionality necessary to support type lookup by name in the native PDB plugin. For the purposes of testing I

[Lldb-commits] [PATCH] D53368: [Symbol] Search symbols with name and type in a symbol file

2018-10-22 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: aleksandr.urakov. zturner added a comment. To answer your question, PE/COFF executable symbol tables are basically empty Repository: rLLDB LLDB https://reviews.llvm.org/D53368 ___ lldb-commits mailing list lldb-commits

[Lldb-commits] [PATCH] D53511: [NativePDB] Support type lookup by name

2018-10-22 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: lldb/lit/SymbolFile/NativePDB/tag-types.cpp:87 +// Test single inheritance. +class Derived : public Class { +public: lemo wrote: > - at least one virtual function + override? > - at least one method returning void? The r

[Lldb-commits] [PATCH] D53511: [NativePDB] Support type lookup by name

2018-10-23 Thread Zachary Turner via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB345047: [NativePDB] Add basic support for tag types to the native pdb plugin. (authored by zturner, committed by ). Herald added subscribers: teemperor, abidh. Changed prior to commit: https://review

[Lldb-commits] [PATCH] D53590: Refactor SetBaseClassesForType and DeleteBaseClasses to be more C++'y

2018-10-23 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: labath, davide, clayborg. Herald added a subscriber: JDevlieghere. [NFC] Refactor SetBaseClasses and DeleteBaseClasses. We currently had a 2-step process where we had to call SetBaseClassesForType and DeleteBaseClasses. Every single

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-23 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: clayborg, jingham, labath. Herald added subscribers: atanasyan, JDevlieghere, sdardis. When we get the `resolve_scope` parameter from the SB API, it's a `uint32_t`. We then pass it through all of LLDB this way, as a uint32. This is unfort

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-23 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53597#1273087, @jingham wrote: > It would be great not to have to use comments to express what these values > mean. OTOH, having to put in static casts whenever you want to or values > together would be a pain, so if there's no way to do it

[Lldb-commits] [PATCH] D53590: Refactor SetBaseClassesForType and DeleteBaseClasses to be more C++'y

2018-10-23 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:3273-3274 + is_virtual, is_base_of_class); + if (!result) +break; + If the result is a `nullptr`, then there is no base

[Lldb-commits] [PATCH] D53590: Refactor SetBaseClassesForType and DeleteBaseClasses to be more C++'y

2018-10-23 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:3273-3274 + is_virtual, is_base_of_class); + if (!result) +break; + zturner wrote: > If the result is a `nullptr`, then

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-23 Thread Zachary Turner via Phabricator via lldb-commits
zturner updated this revision to Diff 170737. zturner added a comment. Remove the reference to `llvm/ADT/BitmaskEnu.h` and define the operators ourselves. Also, removed a few casts that got left in. https://reviews.llvm.org/D53597 Files: lldb/include/lldb/Core/Address.h lldb/include/lldb/

[Lldb-commits] [PATCH] D53616: Don't type-erase the FunctionNameType or TypeClass enums

2018-10-23 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: davide, jingham, clayborg. Herald added a subscriber: JDevlieghere. This is a followup to https://reviews.llvm.org/D53597, with 2 more enums. Assuming that patch is good, I see no reason why this wasn't isn't good as well, but I'm throwing

[Lldb-commits] [PATCH] D53094: [pecoff] Implement ObjectFilePECOFF::GetDependedModules()

2018-10-23 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53094#1273556, @asmith wrote: > I think this addresses all the previous comments. Still didn't get a clear answer if the mutex being used needs to be recursive. If it doesn't, perhaps `std::mutex` can be used instead of `std::recursive_mu

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-24 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: clayborg, labath, jingham. Herald added subscribers: JDevlieghere, aprantl. Previously the Module would parse a type name into scope and base name during a lookup and only give the SymbolFile plugin the base name, then it would filter the r

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-24 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. Note that AFAICT, native PDB plugin is now the only plugin where you can do `type lookup -- NS::Struct::Local` and have it return instantly. On the regular PDB plugin it doesn't work at all (returns no results). On the DWARF plugin, I haven't tested, but it will eithe

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-24 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. Hi Greg, any thoughts on this? https://reviews.llvm.org/D53597 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-24 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53662#1275238, @jingham wrote: > I worry that your patch changes the behavior when you add the type_class > explicitly in the lookup (i.e. look up "struct Struct" not "Struct". That > should work... > > Note, this doesn't currently work in

[Lldb-commits] [PATCH] D53532: [FileSpec] Add VFS support to FileSpec convenience methods.

2018-10-24 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: JDevlieghere. zturner added a comment. It seems like FileSpec was moved out of Utility and into Host. I’m not a fan of this change, because it took a lot of effort to get it into Utility, which helped break a lot of bad dependencies. Can we invert this dependency and mo

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner updated this revision to Diff 171134. zturner added a comment. Fixed issues pointed out by @jingham and added some test coverage for this. https://reviews.llvm.org/D53662 Files: lldb/include/lldb/Core/Module.h lldb/include/lldb/Symbol/SymbolFile.h lldb/include/lldb/Symbol/SymbolVe

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53597#1276086, @clayborg wrote: > As long as Swig is happy and the ABI doesn't change I am ok with this. Will > we see the variables better when debugging? Or is this solely so the > SymbolContextItem type doesn't disappear from the debug in

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53597#1276110, @zturner wrote: > In https://reviews.llvm.org/D53597#1276086, @clayborg wrote: > > > As long as Swig is happy and the ABI doesn't change I am ok with this. Will > > we see the variables better when debugging? Or is this solely

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53597#1276145, @jingham wrote: > So far as I can tell, this patch will make lookup of exact types faster for > PDB, but because of the way DWARF debug_names tables are constructed, I don't > think there's any way we can do the same thing for

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: jingham. zturner added a comment. I guess the question is, How is that hash and the bucket computed? If it's based on the full name, then you should be able to get fast exact lookup. If it's based on the based name, then it will indeed be slow. https://reviews.llvm.o

[Lldb-commits] [PATCH] D53532: [FileSpec] Add VFS support to FileSpec convenience methods.

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. I envision `FileSpec` as being more of a `PathSpec`. It should be able manipulate paths as strings and nothing more. There is indeed some logic that still remains that resolves paths, but it manages to do this using LLVM's file system APIs and the only reason it's sti

[Lldb-commits] [PATCH] D53532: [FileSpec] Add VFS support to FileSpec convenience methods.

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53532#1276463, @JDevlieghere wrote: > Thanks for the feedback! I totally agree it's a good solution and it was one > of the things I considered. It didn't make it to the top of the list because > it is very intrusive and changes the semantic

[Lldb-commits] [PATCH] D53590: Refactor SetBaseClassesForType and DeleteBaseClasses to be more C++'y

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB345312: [NFC] Refactor SetBaseClasses and DeleteBaseClasses. (authored by zturner, committed by ). Changed prior to co

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB345313: Don't type-erase the SymbolContextItem enumeration. (authored by zturner, committed by ). Herald added a subscr

[Lldb-commits] [PATCH] D53597: Don't type-erase the SymbolContextItem enum

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL345313: Don't type-erase the SymbolContextItem enumeration. (authored by zturner, committed by ). Herald added subscribers

[Lldb-commits] [PATCH] D53616: Don't type-erase the FunctionNameType or TypeClass enums

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL345314: Don't type-erase the FunctionNameType or TypeClass enums. (authored by zturner, committed by ). Herald added a sub

[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: lemo, aleksandr.urakov, stella.stamenova. LLDB has the ability to display global variables, even without a running process, via the `target variable` command. This is because global variables are linker initialized, so their values are emb

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53662#1276253, @jingham wrote: > So the current approach relies on the ability to sniff the name to determine > the context in which the user intends to find it. It does (and always did) > use the presence of an initial "::" to tell whether

[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. which generic SymbolFile test do you mean? The lit ones are the only ones that are set up to run in this particular manner (run lines, check lines, etc), and currently we don't have a way to run different / multiple command line invocations. I came up with this test i

[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53731#1276633, @jingham wrote: > Well, what's really going on is that I'm not familiar enough with lit to know > that it doesn't have the ability to run different commands to produce the > input file... But as you guessed, my point is that

[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added reviewers: vsk, labath. zturner added a comment. In https://reviews.llvm.org/D53731#1276660, @jingham wrote: > Could you also use Vedant's new FileCheck dotest test class? That should > allow you to write the tests exactly as you are, but use the dotest mechanism > to build and r

[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53731#1276743, @vsk wrote: > In https://reviews.llvm.org/D53731#1276732, @zturner wrote: > > > In https://reviews.llvm.org/D53731#1276660, @jingham wrote: > > > > > Could you also use Vedant's new FileCheck dotest test class? That should > >

[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables

2018-10-25 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53731#1276818, @jingham wrote: > dotest tests don't require a process. Presumably dotest knows how to build > windows targeted PDB debug flavor files (to go along with dwarf/dsym/etc.). > So it would be straightforward to make a test that

[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables

2018-10-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: lldb/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h:46 + // due to the debug magic at the beginning of the stream. + uint64_t global : 1; // True if this is from the globals stream. + uint64_t modi : 16; // For

[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables

2018-10-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp:913 + + uint32_t section_idx = section - 1; + if (section_idx >= section_list->GetSize()) zturner wrote: > lemo wrote: > > comment explaining the - 1 ? >

[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables

2018-10-26 Thread Zachary Turner via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345373: [NativePDB] Add the ability to dump dump global variables. (authored by zturner, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D53731

[Lldb-commits] [PATCH] D53749: [PDB] Fix `SymbolFilePDBTests` after r345313

2018-10-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: aleksandr.urakov. zturner added a comment. Ahh, I meant to remind you, because I noticed this when I was looking through the SymbolFilePDB code recently. I think the LLVM guideline is not to use so much auto. The generally accepted rule is that we can use for the resu

[Lldb-commits] [PATCH] D53749: [PDB] Fix `SymbolFilePDBTests` after r345313

2018-10-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. For trivial changes it's ok to submit without review. This is true for cleanup and trivial refactor, but especially for build break like this one., and even more so if you consider yourself code owner in the corresponding code area. Repository: rLLDB LLDB https://rev

[Lldb-commits] [PATCH] D53753: [Windows] Define generic arguments registers for Windows x64

2018-10-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: aleksandr.urakov. zturner added a comment. Lgtm Repository: rLLDB LLDB https://reviews.llvm.org/D53753 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commi

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: clayborg. zturner added a comment. Ok, that reasoning makes sense, I’ll see what i can do https://reviews.llvm.org/D53662 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[Lldb-commits] [PATCH] D53788: [FileSystem] Remove GetByteSize() from FileSpec

2018-10-26 Thread Zachary Turner via Phabricator via lldb-commits
zturner accepted this revision. zturner added a comment. I always wondered if we actually even need methods like this in `FileSystem` given that they already exist in `llvm::sys::fs`. Is it possible to just call the llvm methods directly, or is it still helpful to call the ones in `FileSystem`

[Lldb-commits] [PATCH] D52618: [Windows] A basic implementation of memory allocations in a debuggee process

2018-10-28 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. Is this still blocked on anything? https://reviews.llvm.org/D52618 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D52618: [Windows] A basic implementation of memory allocations in a debuggee process

2018-10-29 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. I think we should try as hard as possible to have just one way of writing these tests. So if we know there are going to be two different use cases, one where we have mutually exclusive variants (e.g. run a process on OSX, Linux, Windows), and platform agnostic variants

[Lldb-commits] [PATCH] D53822: [NativePDB] Add tests for dumping global variables of class type

2018-10-29 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: lemo, aleksandr.urakov. Previous patches added support for dumpign global variables of builtin types, so this patch does the same for class types. For the most part, everything just worked, there was only one minor bug fix needed, which wa

[Lldb-commits] [PATCH] D53788: [FileSystem] Remove GetByteSize() from FileSpec

2018-10-29 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53788#1279096, @shafik wrote: > Are we refactoring in the right place? Why not just refactor > `FileSpec::GetByteSize()` why is `FileSpec` the wrong place? There was another review thread where we discussed this just the other day. Basica

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-29 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. So I started looking into this, and things get tricky. If we're doing a lookup by fully qualified name, I would expect there to never be more than one match, but LLDB doesn't seem to hold this same assumption. For example, in `ItaniumABILanguageRuntime::GetTypeInfoFro

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-29 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53662#1279738, @jingham wrote: > Exact matches aren't a C++ specific thing. An exact match is useful for > mixed C/C++ since you might want to say Foo and not Bar::Foo. IIRC a couple > of the places where exact was dialed up explicitly in

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-29 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53662#1279761, @jingham wrote: > That depends on the definition of "fully qualified name". If you can ensure > that it means "name of C++ class" - or other ODR enforcing type system, then > you could make that assumption. In C you are free

[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

2018-10-29 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D53662#1279777, @jingham wrote: > Yes, that usage is exactly the sort of use I was talking about. When we get > an ObjC object and want to find its dynamic type, we read the type name by > following the object's ISA pointer to the Class obje

[Lldb-commits] [PATCH] D53822: [NativePDB] Add tests for dumping global variables of class type

2018-10-30 Thread Zachary Turner via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345629: [NativePDB] Add support for dumping global variables of class type. (authored by zturner, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.o

[Lldb-commits] [PATCH] D52461: [PDB] Introduce `MSVCUndecoratedNameParser`

2018-10-30 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D52461#1280527, @aleksandr.urakov wrote: > Update the diff according to the discussion, making it possible to parse MSVC > demangled names by `CPlusPlusLanguage`. The old PDB plugin still uses > `MSVCUndecoratedNameParser` directly because: >

[Lldb-commits] [PATCH] D53951: [NativePDB] Get LLDB types from PDB function types

2018-10-31 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: aleksandr.urakov, lemo. This adds basic support for getting function signature types into LLDB's type system, including into clang's AST. There are a few edge cases which are not correctly handled, mostly dealing with nested classes,

[Lldb-commits] [PATCH] D53951: [NativePDB] Get LLDB types from PDB function types

2018-11-01 Thread Zachary Turner via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345848: [NativePDB] Get LLDB types from PDB function types. (authored by zturner, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D53951?vs=172

[Lldb-commits] [PATCH] D53989: Fix formatting of wchar, char16, and char32

2018-11-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added a reviewer: jingham. char16, char32, and wchar_t were previously broken. If you had a simple variable like `wchar_t x = L'1'` and wrote `p x` LLDB would output `(wchar_t) x = 1\0`. This is because it was using `eFormatChar` with a size of 2. What w

[Lldb-commits] [PATCH] D53989: Fix formatting of wchar, char16, and char32

2018-11-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. No, but thanks for the pointer. Interestingly, it worked for me on my home machine but not on my work machine, and I'm not sure what the difference between the two is. Clearly the test in lang/cpp/wchar_t is making it into `lldb_private::formatters::WCharSummaryProvid

[Lldb-commits] [PATCH] D53989: Fix formatting of wchar, char16, and char32

2018-11-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. Update: It's because There was a problem with my `PYTHONPATH` and python was getting disabled at CMake configure time. So I was effectively running with `LLDB_DISABLE_PYTHON`. So basically it's only broke on the `LLDB_DISABLE_PYTHON` codepath. https://reviews.llvm.o

[Lldb-commits] [PATCH] D53989: Fix formatting of wchar, char16, and char32

2018-11-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. Side question, should we just kill the `LLDB_DISABLE_PYTHON=0` codepath? It can be a headache to get LLDB linking with Python (particularly on Windows), but it would be nice to be able to delete all the preprocessor stuff. https://reviews.llvm.org/D53989 __

[Lldb-commits] [PATCH] D54009: Refactor LLDB lit configuration files

2018-11-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: stella.stamenova, labath, beanz, davide. Herald added subscribers: jfb, delcypher, mgorny, ki.stfu. A year or so ago, I re-wrote most of the lit infrastructure in LLVM so that it wasn't so boilerplate-y. I added lots of common helper type s

[Lldb-commits] [PATCH] D54009: Refactor LLDB lit configuration files

2018-11-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D54009#1284827, @stella.stamenova wrote: > Looks good. The formatting in lit.cfg.py is a bit messy (indentations, > especially), but as long as the tests pass, this is an improvement :). Thanks! Is there something like clang-format for Pytho

[Lldb-commits] [PATCH] D54031: [NativePDB] Make tests work on x86 too

2018-11-02 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: aleksandr.urakov. zturner added a comment. Lgtm Repository: rLLDB LLDB https://reviews.llvm.org/D54031 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commi

[Lldb-commits] [PATCH] D54009: Refactor LLDB lit configuration files

2018-11-02 Thread Zachary Turner via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB346008: Refactor the lit configuration files (authored by zturner, committed by ). Herald added subscribers: teemperor, abidh. Changed prior to commit: https://reviews.llvm.org/D54009?vs=172254&id=17

[Lldb-commits] [PATCH] D54003: Refactor ClangASTContext::AddEnumerationValueToEnumerationType() to remove redundant parameter which can be calculated from other parameter

2018-11-02 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. This function is called in `SymbolFile/NativePDB` as well. https://reviews.llvm.org/D54003 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D54053: [NativePDB] Add the ability to create clang record decls from mangled names.

2018-11-02 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: aleksandr.urakov, labath, lemo. Herald added subscribers: erik.pilkington, mgorny. Previously we were not able to accurately represent tag record types with clang record decls. The primary reason for this is that for type information PDB o

[Lldb-commits] [PATCH] D54009: Refactor LLDB lit configuration files

2018-11-02 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: stella.stamenova. zturner added a comment. Fix incoming, sorry about that. Repository: rLLDB LLDB https://reviews.llvm.org/D54009 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[Lldb-commits] [PATCH] D54053: [NativePDB] Add the ability to create clang record decls from mangled names.

2018-11-02 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D54053#1286272, @lemo wrote: > nice! AFAIU this is just the "default" access of the class. I should probably investigate why it's needed in the first place, since it can be deduced from the tag type. https://reviews.llvm.org/D54053 __

[Lldb-commits] [PATCH] D54053: [NativePDB] Add the ability to create clang record decls from mangled names.

2018-11-03 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. I actually found some issues with this, or at least some potential issues which I'm not sure are actual issues. But I'm adding some new functionality to LLDB to help me confirm whether these are real issues or not, and worst case scenario it will open up some new testi

[Lldb-commits] [PATCH] D54072: Add a command to dump a module's clang ast.

2018-11-03 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: vsk, davide, labath, jingham, aleksandr.urakov, clayborg. Herald added subscribers: JDevlieghere, aprantl. This can be useful when diagnosing AST related problems. For example, I had a bug where I was accidentally creating a record type mu

[Lldb-commits] [PATCH] D54072: Add a command to dump a module's clang ast.

2018-11-03 Thread Zachary Turner via Phabricator via lldb-commits
zturner updated this revision to Diff 172510. zturner added a comment. clang dumps to stderr. Only use color if stderr supports this (e.g. if it's not redirected to a file). https://reviews.llvm.org/D54072 Files: lldb/include/lldb/Symbol/SymbolFile.h lldb/source/Commands/CommandObjectTarg

[Lldb-commits] [PATCH] D54053: [NativePDB] Add the ability to create clang record decls from mangled names.

2018-11-03 Thread Zachary Turner via Phabricator via lldb-commits
zturner updated this revision to Diff 172511. zturner added a comment. I just added a new test which dumps the clang AST and makes sure no bogus records get introduced. Since this is already LGTM'ed I'm assuming this is good to go, but since it now depends on https://reviews.llvm.org/D54072, I

[Lldb-commits] [PATCH] D54053: [NativePDB] Add the ability to create clang record decls from mangled names.

2018-11-03 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. Bleh, I think I found a problem with this approach. Since we assume everything is a namespace, it can lead to ambiguities. I think we need to actually consult the debug info while parsing components of the mangled name. For example, suppose you have this code: nam

[Lldb-commits] [PATCH] D54072: Add a command to dump a module's clang ast.

2018-11-04 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: vsk. zturner added a comment. Unfortunately then color output is impossible. Where else would the output be expected to go? https://reviews.llvm.org/D54072 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://

[Lldb-commits] [PATCH] D54072: Add a command to dump a module's clang ast.

2018-11-04 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: davide. zturner added a comment. Ok so probably this commands output will not go to a log file when logging is enabled? I can’t think of any other side effects. Given that the immediate use case for this is interactive investigation and testing, the first of which is h

  1   2   3   4   5   6   7   8   >