[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -146,6 +133,9 @@ class TypeSystem : public PluginInterface, virtual CompilerDeclContext GetCompilerDeclContextForType(const CompilerType &type); + virtual std::vector + DeclContextGetCompilerContext(void *opaque_decl_ctx); clayborg wrote: I would rat

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -122,6 +106,9 @@ class TypeSystem : public PluginInterface, virtual CompilerType DeclGetFunctionArgumentType(void *opaque_decl, size_t arg_idx); + virtual std::vector + DeclGetCompilerContext(void *opaque_decl); ---

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -1446,23 +1446,23 @@ void SymbolFilePDB::AddSymbols(lldb_private::Symtab &symtab) { symtab.Finalize(); } -void SymbolFilePDB::FindTypes( -lldb_private::ConstString name, const CompilerDeclContext &parent_decl_ctx, -uint32_t max_matches, -llvm::DenseSet &searc

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -12,33 +12,32 @@ class UniqueTypesTestCase4(TestBase): def do_test(self, debug_flags): """Test that we display the correct template instantiation.""" self.build(dictionary=debug_flags) +exe = self.getBuildArtifact("a.out") +print(exe)

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -12,33 +12,32 @@ class UniqueTypesTestCase4(TestBase): def do_test(self, debug_flags): """Test that we display the correct template instantiation.""" self.build(dictionary=debug_flags) +exe = self.getBuildArtifact("a.out") +print(exe)

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -64,6 +64,125 @@ bool lldb_private::contextMatches(llvm::ArrayRef context_chain, return true; } +static CompilerContextKind ConvertTypeClass(lldb::TypeClass type_class) { + if (type_class == eTypeClassAny) +return CompilerContextKind::AnyType; + uint16_t result = 0

[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -2225,7 +2225,8 @@ void ObjectFileMachO::ParseSymtab(Symtab &symtab) { const char *file_name = file.GetFilename().AsCString(""); LLDB_SCOPED_TIMERF("ObjectFileMachO::ParseSymtab () module = %s", file_name); LLDB_LOG(log, "Parsing symbol table for {0}", file_name); - P

[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)

2023-12-11 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/69516 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -2225,7 +2225,8 @@ void ObjectFileMachO::ParseSymtab(Symtab &symtab) { const char *file_name = file.GetFilename().AsCString(""); LLDB_SCOPED_TIMERF("ObjectFileMachO::ParseSymtab () module = %s", file_name); LLDB_LOG(log, "Parsing symbol table for {0}", file_name); - P

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-11 Thread Greg Clayton via lldb-commits
clayborg wrote: > @clayborg , I actually insist on aborting on failure for this feature. You > mention: > > > It would be nice if the RunLLDBCommands function could take an extra bool > > &fatal_error that clients could check after running when needed to decide > > what to do if this is set t

[Lldb-commits] [lldb] [lldb-dap] Emit declarations along with variables (PR #74865)

2023-12-11 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/74865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Emit declarations along with variables (PR #74865)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -1165,6 +1188,24 @@ llvm::json::Value CreateVariable(lldb::SBValue v, int64_t variablesReference, const char *evaluateName = evaluateStream.GetData(); if (evaluateName && evaluateName[0]) EmplaceSafeString(object, "evaluateName", std::string(evaluateName)); + + if

[Lldb-commits] [lldb] [lldb-dap] Emit declarations along with variables (PR #74865)

2023-12-11 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Might be good idea to only add "declaration" if and only if we have both a file and line at least? https://github.com/llvm/llvm-project/pull/74865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https:/

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Greg Clayton via lldb-commits
clayborg wrote: > BTW, lets prefix the commit with `[lldb]` before merging Do we need to fix this in the commit message when I squash? Or do I just update the title of this PR? https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailing

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-11 Thread Greg Clayton via lldb-commits
clayborg wrote: > > > Sorry, it's been a while since I last reviewed this and I must admit I > > > forgot about this in the mean time. The only thing I'd like to check > > > before we can land this is to hear from @Michael137 who has been actively > > > working on FindTypes performance recentl

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-11 Thread Greg Clayton via lldb-commits
clayborg wrote: > > "error: one of your required 'attachCommands' failed, check the debug > > console for details" > > This is a key thing that I didn't consider in the beginning. I'm going to > update this patch to only support `?`, and then I'll make another one for > `!`, because I need to

[Lldb-commits] [lldb] [lldb-dap] Emit declarations along with variables (PR #74865)

2023-12-11 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: I am ok with this patch. I would just like to document what key/value pairs are extensions because the spec description in the comment was directly from the DAP Protocol website and it would be nice to let people know what are extensions. https://github.

[Lldb-commits] [lldb] [lldb-dap] Emit declarations along with variables (PR #74865)

2023-12-11 Thread Greg Clayton via lldb-commits
@@ -1101,6 +1101,29 @@ std::string CreateUniqueVariableNameForDisplay(lldb::SBValue v, // can use this optional information to present the // children in a paged UI and fetch them in chunks." // } +// "declaration": { +//

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-12 Thread Greg Clayton via lldb-commits
clayborg wrote: > Given that Michael is okay with it, too, let's land this! I am testing on linux and windows to make sure everything is working and I will land this soon! https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-12 Thread Greg Clayton via lldb-commits
@@ -33,18 +39,59 @@ void RunLLDBCommands(llvm::StringRef prefix, const char *error = result.GetError(); strm << error; } + }; + + lldb::SBCommandInterpreter interp = g_dap.debugger.GetCommandInterpreter(); + for (llvm::StringRef command : commands) { +lld

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. Just one variable rename and inline the `print_result` and this is good to go. https://github.com/llvm/llvm-project/pull/74808 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-12 Thread Greg Clayton via lldb-commits
@@ -33,18 +39,59 @@ void RunLLDBCommands(llvm::StringRef prefix, const char *error = result.GetError(); strm << error; } + }; + + lldb::SBCommandInterpreter interp = g_dap.debugger.GetCommandInterpreter(); + for (llvm::StringRef command : commands) { +lld

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/74808 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-12 Thread Greg Clayton via lldb-commits
clayborg wrote: Never mind, ran `git fetch upstream && git rebase upstream/main` and it fixed everything... https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix buildbots after PR 74786 (PR #75272)

2023-12-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/75272 Fix unexpected pass after https://github.com/llvm/llvm-project/pull/74786. >From 5646faa2b21fe01f8a379beda1ca77190c0df1f1 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 12 Dec 2023 18:16:04 -0800 Subjec

[Lldb-commits] [lldb] [lldb] Fix buildbots after PR 74786 (PR #75272)

2023-12-12 Thread Greg Clayton via lldb-commits
clayborg wrote: This test now passes after the new type lookup stuff went in due to improved lookups! https://github.com/llvm/llvm-project/pull/75272 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-12 Thread Greg Clayton via lldb-commits
clayborg wrote: Buildbots are failing due to an unexpeted pass! https://github.com/llvm/llvm-project/pull/75272 https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[Lldb-commits] [lldb] [lldb-dap] Emit more structured info along with variables (PR #75244)

2023-12-12 Thread Greg Clayton via lldb-commits
@@ -1103,28 +1116,52 @@ std::string CreateUniqueVariableNameForDisplay(lldb::SBValue v, // can use this optional information to present the // children in a paged UI and fetch them in chunks." // } +// +// +// // Unofficial e

[Lldb-commits] [lldb] [lldb] Fix buildbots after PR 74786 (PR #75272)

2023-12-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/75272 >From 5646faa2b21fe01f8a379beda1ca77190c0df1f1 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 12 Dec 2023 18:16:04 -0800 Subject: [PATCH 1/2] [lldb] Fix buildbots after PR 74786 Fix unexpected pass afte

[Lldb-commits] [lldb] [lldb] Fix buildbots after PR 74786 (PR #75272)

2023-12-12 Thread Greg Clayton via lldb-commits
clayborg wrote: Also fixed the `SymbolFilePDBTests` unit test code. I can't compile windows code, if anyone on windows can help try to build the `SymbolFilePDBTests` cmake target and then run the resulting binary to see if it passes that would really help. The perf win for this patch is quite

[Lldb-commits] [lldb] Fix lldb-dap pickProcess command for selecting process for debugger attachment (PR #75342)

2023-12-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. This looks good to me for now. We can coordinate on adding a native TypeScript layer after this, but no need to hold this up if this work! https://github.com/llvm/llvm-project/pull/75342 ___ lldb

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-13 Thread Greg Clayton via lldb-commits
clayborg wrote: > I merged your fix and a few follow ups to get it all to compile. Now we have > 2 failures on Windows: > https://lab.llvm.org/buildbot/#/builders/219/builds/7554/steps/6/logs/stdio > > ``` > Failed Tests (2): > lldb-api :: lang/cpp/unique-types4/TestUniqueTypes4.py > lldb-

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-13 Thread Greg Clayton via lldb-commits
clayborg wrote: Debugging the SymbolFilePDBTests function would be the easiest way to reproduce and if the `TestMaxMatches` gets fixed, it might fix the other failing python test. https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits maili

[Lldb-commits] [lldb] Fix a crash from character type confusion interaction with libedit (PR #75388)

2023-12-13 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Looks good to me https://github.com/llvm/llvm-project/pull/75388 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-13 Thread Greg Clayton via lldb-commits
clayborg wrote: > @clayborg Do you by any chance happen to already have a version of this patch > that applies cleanly to apple/llvm-project stable/20230725? If not > @Michael137 might try to backport it. I do not, only what is in top of tree. Totally worth backporting this though. I was able

[Lldb-commits] [lldb] [lldb][NFCI] Remove unused parameter from BreakpointResolver*::CreateFromStructuredData (PR #75374)

2023-12-13 Thread Greg Clayton via lldb-commits
clayborg wrote: I would make sure with @jimingham that this isn't used for "breakpoints read" or "breakpoints write"? What were these added for? https://github.com/llvm/llvm-project/pull/75374 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] Fix a crash from character type confusion interaction with libedit (PR #75388)

2023-12-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/75388 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Just fix an init as suggested and this is good to go. https://github.com/llvm/llvm-project/pull/74808 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/74808 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -434,20 +434,54 @@ ExpressionContext DAP::DetectExpressionContext(lldb::SBFrame &frame, return ExpressionContext::Variable; } -void DAP::RunLLDBCommands(llvm::StringRef prefix, - const std::vector &commands) { - SendOutput(OutputType::Console, -

[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -11,40 +11,81 @@ namespace lldb_dap { -void RunLLDBCommands(llvm::StringRef prefix, +bool RunLLDBCommands(llvm::StringRef prefix, const llvm::ArrayRef &commands, - llvm::raw_ostream &strm) { + llvm::raw_ostream

[Lldb-commits] [lldb] [lldb-dap] Emit more structured info along with variables (PR #75244)

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -1133,63 +1175,64 @@ llvm::json::Value CreateVariable(lldb::SBValue v, int64_t variablesReference, int64_t varID, bool format_hex, bool is_name_duplicated, std::optional custo

[Lldb-commits] [lldb] [lldb-dap] Emit more structured info along with variables (PR #75244)

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -153,10 +153,18 @@ def do_test_scopes_variables_setVariable_evaluate( buffer_children = make_buffer_verify_dict(0, 32) verify_locals = { "argc": { -"equals": {"type": "int", "value": "1"}, -"declaration": { -

[Lldb-commits] [lldb] [lldb-dap] Create a typescript extension for lldb-dap (PR #75515)

2023-12-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/75515 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Create a typescript extension for lldb-dap (PR #75515)

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,5 @@ +out +node_modules +.vscode-test +*.vsix +!.vscode clayborg wrote: Can we just create a `vscode` folder (no leading `.`) and remove this file? Why do we need `out` and `node_modlues` to be added to this? Does `npm` create temp files here for som

[Lldb-commits] [lldb] [lldb-dap] Create a typescript extension for lldb-dap (PR #75515)

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,21 @@ +import * as vscode from 'vscode'; clayborg wrote: Wanted to mention again that maybe we make a directory that contains the needed typescript sources that will be in the exact format needed for installing an extension? So if we have `lldb/tools

[Lldb-commits] [lldb] [lldb-dap] Create a typescript extension for lldb-dap (PR #75515)

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -27,58 +31,43 @@ get a full featured debugger with a well defined protocol. # Installation for Visual Studio Code -Installing the plug-in involves creating a directory in any location outside of -`~/.vscode/extensions`. For example, `~/vscode-lldb` is a valid one. You'll

[Lldb-commits] [lldb] [lldb-dap] Create a typescript extension for lldb-dap (PR #75515)

2023-12-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: My suggestions would be: - don't move any C++ files, just leave them where they are - make a directory that can be copied into `~/.vscode/extensions` as is so that creating the extension doesn't involve grabbing files from many locations - `git move` any fi

[Lldb-commits] [lldb] Add option to pass thread ID to thread select command (PR #73596)

2023-12-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/73596 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-14 Thread Greg Clayton via lldb-commits
clayborg wrote: > > If we need to expected fail the python test on window until we can look > > into it, I would vote to do this. > > As it happens, I'm using the buildbot machine to reproduce this. So it's not > doing any more builds for now. I'll put in workarounds if I don't find the > iss

[Lldb-commits] [lldb] [lldb-dap] Emit more structured info along with variables (PR #75244)

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -165,7 +173,14 @@ def do_test_scopes_variables_setVariable_evaluate( "hasVariablesReference": True, }, "pt": { -"equals": {"type": "PointType"}, +"equals": { +"type": "PointType", +

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-14 Thread Greg Clayton via lldb-commits
clayborg wrote: So regarding: ``` lldb-unit :: SymbolFile/PDB/./SymbolFilePDBTests.exe/SymbolFilePDBTests/TestMaxMatches ``` This test was testing the wrong thing. From the looks of `SymbolFilePDBTests::TestMaxMatches(...)` I thought it was finding multiple matches when we didn't ask for a lim

[Lldb-commits] [lldb] Trying to fix windows buildbots after #74786 (PR #75566)

2023-12-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/75566 This patch fixes the SymbolFilePDBTests::TestMaxMatches(...) by making it test what it was testing before, see comments in the test case for details. It also disables TestUniqueTypes4.py for now until we can de

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2023-12-14 Thread Greg Clayton via lldb-commits
clayborg wrote: @DavidSpickett I created a new PR to fix the buildbots: https://github.com/llvm/llvm-project/pull/75566 This disables the TestUniqueTypes4.py on windows, and fixes the test in `lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp` to test what it was testing before. https://g

[Lldb-commits] [lldb] Add settings and code that limits the number of progress events. (PR #75769)

2023-12-17 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/75769 Currently in LLDB if clients listen for Debugger::eBroadcastBitProgress events, this can cause too many progress events to get sent to clients which makes the feature a bit less useful that originally planned.

[Lldb-commits] [lldb] [lldb][PDB] Update max matches test for type queries (PR #75813)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Thanks for fixing properly! https://github.com/llvm/llvm-project/pull/75813 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Remove unused FileSPec::IsResolved() functionality. (PR #75840)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/75840 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1992,71 +1999,67 @@ void ValueObject::GetExpressionPath(Stream &s, } ValueObjectSP ValueObject::GetValueForExpressionPath( -llvm::StringRef expression, ExpressionPathScanEndReason *reason_to_stop, -ExpressionPathEndResultType *final_value_type, +llvm::StringRef

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. simple formatting changes and this is good to go https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -2727,39 +2730,48 @@ ValueObjectSP ValueObject::AddressOf(Status &error) { const bool scalar_is_load_address = false; addr_t addr = GetAddressOf(scalar_is_load_address, &address_type); error.Clear(); - if (addr != LLDB_INVALID_ADDRESS && address_type != eAddressTypeHo

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [DRAFT] Add support for inline DWARF source files. (PR #75880)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -235,6 +236,51 @@ ParseSupportFilesFromPrologue(const lldb::ModuleSP &module, for (size_t idx = first_file_idx; idx <= last_file_idx; ++idx) { std::string remapped_file; if (auto file_path = GetFileByIndex(prologue, idx, compile_dir, style)) { + auto entry = p

[Lldb-commits] [lldb] [lldb][DWARF] Search for symbols in all external modules (PR #75927)

2023-12-19 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/75927 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARF] Search for symbols in all external modules (PR #75927)

2023-12-19 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/75927 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARF] Search for symbols in all external modules (PR #75927)

2023-12-19 Thread Greg Clayton via lldb-commits
@@ -175,7 +175,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromClangModule(const SymbolContext &sc, *sc.comp_unit, results.GetSearchedSymbolFiles(), [&](Module &module) { module.FindTypes(query, results); pcm_type_sp = results.GetTypeMap().FirstType()

[Lldb-commits] [lldb] [lldb][Type] Add TypeQuery::SetLanguages API (PR #75926)

2023-12-19 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/75926 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] In-progress — All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-19 Thread Greg Clayton via lldb-commits
clayborg wrote: > > ### Goal > > Every `ValueObjectSP` will have an actual value and will never be equal to > > `nullptr`. > > I would like to learn more about the goal. It seems like the existing code > will result in widespread use of `optional>`. Is the > plan to reduce these cases to a sm

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-02 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Can this be tested? https://github.com/llvm/llvm-project/pull/76766 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2024-01-02 Thread Greg Clayton via lldb-commits
clayborg wrote: > absl::cord_internal::RefcountAndFlags::Flags::kNumFlags I have a small repro case from the code pointer you gave. I will look into this and report back what I find. Are you guys using the expression parser in your pretty printer? As Michael pointed out, you can get the enum

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2024-01-02 Thread Greg Clayton via lldb-commits
clayborg wrote: I am also not saying this patch hasn't made this issue happen more often, so I will check out my APIs to see how they are being called from the expression parser. https://github.com/llvm/llvm-project/pull/74786 ___ lldb-commits mailin

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-02 Thread Greg Clayton via lldb-commits
clayborg wrote: > > Can this be tested? > > I took a look at existing tests, but I'm not sure how to best test this. I > think we would need to create a breakpoint in a module by address and make > sure the resolver correctly serializes the name (in `statistics dump` or > otherwise). Does tha

[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

2024-01-02 Thread Greg Clayton via lldb-commits
clayborg wrote: So I traced down why things used to work and why they don't work now. The issue is we are being too accurate with our type lookups now. For my reduced example I had this code: ``` struct A { struct B { static int f; }; }; ``` What would happen when you type "p A::B::f" w

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/76766 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
@@ -49,6 +49,37 @@ def test_scripted_extra_args(self): self.setup_targets_and_cleanup() self.do_check_extra_args() +def test_resolver_serialization(self): +"""Test that breakpoint resolvers contain the expected information""" +self.build() +

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. One quick fix suggested, but looks good. https://github.com/llvm/llvm-project/pull/76766 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
@@ -49,6 +49,37 @@ def test_scripted_extra_args(self): self.setup_targets_and_cleanup() self.do_check_extra_args() +def test_resolver_serialization(self): +"""Test that breakpoint resolvers contain the expected information""" +self.build() +

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
@@ -49,6 +49,37 @@ def test_scripted_extra_args(self): self.setup_targets_and_cleanup() self.do_check_extra_args() +def test_resolver_serialization(self): +"""Test that breakpoint resolvers contain the expected information""" +self.build() +

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
@@ -49,6 +49,37 @@ def test_scripted_extra_args(self): self.setup_targets_and_cleanup() self.do_check_extra_args() +def test_resolver_serialization(self): +"""Test that breakpoint resolvers contain the expected information""" +self.build() +

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
@@ -49,6 +49,37 @@ def test_scripted_extra_args(self): self.setup_targets_and_cleanup() self.do_check_extra_args() +def test_resolver_serialization(self): +"""Test that breakpoint resolvers contain the expected information""" +self.build() +

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
@@ -49,6 +49,37 @@ def test_scripted_extra_args(self): self.setup_targets_and_cleanup() self.do_check_extra_args() +def test_resolver_serialization(self): +"""Test that breakpoint resolvers contain the expected information""" +self.build() +

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Looks good! https://github.com/llvm/llvm-project/pull/76766 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Resolve nested types when parsing structures (PR #66879)

2024-01-03 Thread Greg Clayton via lldb-commits
clayborg wrote: I recently ran into this issue when looking at new failures in: https://github.com/llvm/llvm-project/pull/74786#issuecomment-1874921872 And this was referred to in bug report: https://github.com/llvm/llvm-project/issues/53904 After looking at the code, I believe we do need to

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Resolve nested types when parsing structures (PR #66879)

2024-01-03 Thread Greg Clayton via lldb-commits
clayborg wrote: So while you were able to work around issues with the expression parser with #68705, I do believe a modified version of this patch is needed. https://github.com/llvm/llvm-project/pull/66879 ___ lldb-commits mailing list lldb-commits@li

[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

2024-01-03 Thread Greg Clayton via lldb-commits
clayborg wrote: > ``` > == > ERROR: test_resolver_serialization > (TestBreakpointSerialization.BreakpointSerialization) >Test that breakpoint resolvers contain the expected information > -

[Lldb-commits] [lldb] [lldb][DWARFIndex][nfc] Factor out fully qualified name query (PR #76977)

2024-01-04 Thread Greg Clayton via lldb-commits
clayborg wrote: LGTM https://github.com/llvm/llvm-project/pull/76977 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-04 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/77029 The LLDB expression parser relies on using the external AST source support in LLDB. This allows us to find a class at the root namespace level, but it wouldn't allow us to find nested classes all of the time. W

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Resolve nested types when parsing structures (PR #66879)

2024-01-04 Thread Greg Clayton via lldb-commits
clayborg wrote: https://github.com/llvm/llvm-project/pull/77029 is a slightly modified version of this patch where it parses the types after the struct/union/class is created. https://github.com/llvm/llvm-project/pull/66879 ___ lldb-commits mailing li

[Lldb-commits] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-04 Thread Greg Clayton via lldb-commits
clayborg wrote: This patch was in response to this issue: https://github.com/llvm/llvm-project/pull/74786#issuecomment-1874921872 And is related to https://github.com/llvm/llvm-project/pull/66879, but does things a bit differently. https://github.com/llvm/llvm-project/pull/77029 _

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-04 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/77029 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

2024-01-04 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks fine to me. Can we add a test? https://github.com/llvm/llvm-project/pull/77026 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-05 Thread Greg Clayton via lldb-commits
@@ -2260,7 +2269,7 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die, // Disable external storage for this type so we don't get anymore // clang::ExternalASTSource queries for this type. - m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), f

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-05 Thread Greg Clayton via lldb-commits
@@ -3106,10 +3115,39 @@ void DWARFASTParserClang::ParseSingleMember( std::make_pair(field_decl, field_bit_offset)); } +static bool IsTypeTag(dw_tag_t tag) { + switch (tag) { +case DW_TAG_typedef: +case DW_TAG_base_type: +case DW_TAG_pointer_type: +case D

[Lldb-commits] [lldb] [lldb] Fix expressions that involve nested structs/classes/unions. (PR #77029)

2024-01-05 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/77029 >From ceb740dcce0ac870b1ef145d41670385a1d24f1c Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 4 Jan 2024 16:17:44 -0800 Subject: [PATCH 1/3] Fix expressions that involve nested structs/classes/unions.

<    15   16   17   18   19   20   21   22   23   24   >