[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape character for LLDB commands (PR #69238)

2023-10-16 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. With "lldb-vscode" (which might be "lldb-dap" soon) being a native DAP plug-in, I believe this means we can't set settings in the IDE itself if we are not a typescript DAP plug-in. How would anyone specify this extra option w

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape character for LLDB commands (PR #69238)

2023-10-16 Thread Greg Clayton via lldb-commits
clayborg wrote: > @clayborg , good point, I'll move it to launch and attach settings. Can you check real quick if any native plug-ins can have and or access global settings from the VS Code GUI? That would be the best way for all of these. Maybe there is a combination mode where we have some t

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape character for LLDB commands (PR #69238)

2023-10-16 Thread Greg Clayton via lldb-commits
clayborg wrote: Mainly asking since you just started adding things that fall into the "we need global plug-in settings for lldb-vscode" recently and it will be good to make sure we are doing things right from a VS code perspective. It would be nice to not have all of our settings in our launch

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape character for LLDB commands (PR #69238)

2023-10-16 Thread Greg Clayton via lldb-commits
clayborg wrote: > > Can you check real quick if any native plug-ins can have and or access > > global settings from the VS Code GUI? That would be the best way for all of > > these. Maybe there is a combination mode where we have some typescript in > > our extension, but still have a native DA

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape character for LLDB commands (PR #69238)

2023-10-16 Thread Greg Clayton via lldb-commits
clayborg wrote: > @clayborg , I've updated this patch using launch and attach settings, which > might be fine following what've been doing so far. Even though I agree that > it'd be nice to read the GUI global configs, I think that all settings should > be also configurable via launch and atta

[Lldb-commits] [lldb] Detect against invalid variant index for LibStdC++ std::variant data formatters (PR #69253)

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

[Lldb-commits] [lldb] Detect against invalid variant index for LibStdC++ std::variant data formatters (PR #69253)

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

[Lldb-commits] [lldb] Detect against invalid variant index for LibStdC++ std::variant data formatters (PR #69253)

2023-10-16 Thread Greg Clayton via lldb-commits
@@ -914,6 +914,11 @@ def get_variant_npos_value(index_byte_size): if index == npos_value: return " No Value" +# Invalid index can happen when the variant is not initialized yet. +template_arg_count = data_obj.GetType().GetNumberOfTemplateArguments() +if

[Lldb-commits] [lldb] [LLDB][NFC] Create a namespace for the DWARF plugin (PR #68150)

2023-10-16 Thread Greg Clayton via lldb-commits
clayborg wrote: I still think we should have a "lldb_private" namespace for generic code that uses the internal virtual plug-in APIs. It would be nice to have the "lldb_plugins" namespace for plugins and the DWARF plug-in would go into "lldb_plugins::dwarf". Right now if we export "lldb_privat

[Lldb-commits] [lldb] [LLDB][NFC] Create a namespace for the DWARF plugin (PR #68150)

2023-10-16 Thread Greg Clayton via lldb-commits
clayborg wrote: But if everyone else prefers the current state of this patch, I am fine with it. https://github.com/llvm/llvm-project/pull/68150 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/l

[Lldb-commits] [lldb] [LLDB][NFC] Create a namespace for the DWARF plugin (PR #68150)

2023-10-16 Thread Greg Clayton via lldb-commits
clayborg wrote: And if we ever make external plug-ins, they wouldn't be expected to use either the "lldb_private::plugins" or "lldb_plugins" namespaces as those are solely for built in stuff. https://github.com/llvm/llvm-project/pull/68150 ___ lldb-

[Lldb-commits] [lldb] [lldb][lldb-vscode] Add example configuration for connecting to a remote gdbserver (PR #68866)

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

[Lldb-commits] [lldb] [LLDB][NFC] Create a namespace for the DWARF plugin (PR #68150)

2023-10-16 Thread Greg Clayton via lldb-commits
clayborg wrote: Sounds good, I am ok since everyone else is ok with this. Thanks for the comments. https://github.com/llvm/llvm-project/pull/68150 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[Lldb-commits] [lldb] [lldb] Scalar::GetValue() should take a Stream by reference (PR #69231)

2023-10-17 Thread Greg Clayton via lldb-commits
clayborg wrote: There are probably a lot of functions that could be converted from a "Stream *" to "Stream &". https://github.com/llvm/llvm-project/pull/69231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[Lldb-commits] [lldb] Detect against invalid variant index for LibStdC++ std::variant data formatters (PR #69253)

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

[Lldb-commits] [lldb] [lldb][NFCI] Remove duplicated code in DWARFParser (PR #69531)

2023-10-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Please manually verify all cases are handled in the DWARFFormValue::SkipValue() function to ensure we are not losing functionality. LGTM. https://github.com/llvm/llvm-project/pull/69531 ___ lldb-

[Lldb-commits] [lldb] [lldb][NFCI] Remove duplicated code in DWARFParser (PR #69531)

2023-10-18 Thread Greg Clayton via lldb-commits
@@ -73,137 +69,18 @@ bool DWARFDebugInfoEntry::Extract(const DWARFDataExtractor &data, m_tag = abbrevDecl->getTag(); m_has_children = abbrevDecl->hasChildren(); // Skip all data in the .debug_info or .debug_types for the attributes - dw_form_t form; for (const auto &

[Lldb-commits] [lldb] Add `SBModule.SetLocateDwoCallback` (PR #69517)

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

[Lldb-commits] [lldb] Add `SBModule.SetLocateDwoCallback` (PR #69517)

2023-10-18 Thread Greg Clayton via lldb-commits
@@ -139,6 +139,13 @@ typedef void (*SBDebuggerDestroyCallback)(lldb::user_id_t debugger_id, typedef SBError (*SBPlatformLocateModuleCallback)( void *baton, const SBModuleSpec &module_spec, SBFileSpec &module_file_spec, SBFileSpec &symbol_file_spec); + +typedef SBError

[Lldb-commits] [lldb] Add `SBModule.SetLocateDwoCallback` (PR #69517)

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

[Lldb-commits] [lldb] Add `SBModule.SetLocateDwoCallback` (PR #69517)

2023-10-18 Thread Greg Clayton via lldb-commits
@@ -475,6 +484,8 @@ class SymbolFile : public PluginInterface { private: SymbolFile(const SymbolFile &) = delete; const SymbolFile &operator=(const SymbolFile &) = delete; + + static LocateDwoCallback LOCATE_DWO_CALLBACK; clayborg wrote: static variable a

[Lldb-commits] [lldb] Add `SBModule.SetLocateDwoCallback` (PR #69517)

2023-10-18 Thread Greg Clayton via lldb-commits
@@ -296,6 +296,20 @@ class LLDB_API SBModule { /// Remove any global modules which are no longer needed. static void GarbageCollectAllocatedModules(); + /// Set a callback which is called to find separate DWARF DWO debug info + /// files. + /// + /// This is useful whe

[Lldb-commits] [lldb] Add `SBModule.SetLocateDwoCallback` (PR #69517)

2023-10-18 Thread Greg Clayton via lldb-commits
@@ -1742,20 +1742,37 @@ SymbolFileDWARF::GetDwoSymbolFileForCompileUnit( if (std::shared_ptr dwp_sp = GetDwpSymbolFile()) return dwp_sp; - FileSpec dwo_file(dwo_name); - FileSystem::Instance().Resolve(dwo_file); - bool found = false; + const char *comp_dir = + c

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape prefix for LLDB commands (PR #69238)

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

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape prefix for LLDB commands (PR #69238)

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

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape prefix for LLDB commands (PR #69238)

2023-10-18 Thread Greg Clayton via lldb-commits
@@ -52,12 +52,17 @@ llvm::StringRef GetAsString(const llvm::json::Value &value); /// \param[in] key /// The key to use when extracting the value /// +/// \param[in] defaultValue +/// The default value to return if the key is not present +/// /// \return /// A llvm

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape prefix for LLDB commands (PR #69238)

2023-10-18 Thread Greg Clayton via lldb-commits
@@ -418,7 +419,9 @@ ExpressionContext VSCode::DetectExpressionContext(lldb::SBFrame &frame, if (!auto_repl_mode_collision_warning) { llvm::errs() << "Variable expression '" << text << "' is hiding an lldb command, prefix an expression "

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. I am not sure about always showing the signed or unsigned value by default. Enum values by default get displayed as the string value if we can find it. If you want to see the value as signed or unsigned you can change the displ

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: To clarify a bit: each value (SBValue in our public API, and ValueObject in our private API) has the ability to supply a value string and a summary string. The value string can depend on what the current format is set to. For an enum value, the format defaults to `lldb::eFormat

[Lldb-commits] [lldb] [lldb] On POSIX, check for duplicate interpreter modules without loading them (PR #69932)

2023-10-23 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. LGTM. I have seen multiple VSDO libraries being loaded sometimes too, but it doesn't use this path in the code, so this fix should work for ld.so https://github.com/llvm/llvm-project/pull/69932 _

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -175,3 +175,35 @@ std::string RegisterFlags::AsTable(uint32_t max_width) const { return table; } + +void RegisterFlags::ToXML(StreamString &strm) const { + // Example XML: + // + // + // + strm.Indent(); + strm << ""; + for (const Field &field : m_fields) { +

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -3113,6 +3119,10 @@ GDBRemoteCommunicationServerLLGS::BuildTargetXml() { if (!format.empty()) response << "format=\"" << format << "\" "; +if (reg_info->flags_type) { + response << "type=\"" << reg_info->flags_type->GetID() << "\" "; +} --

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -10,6 +10,7 @@ #define LLDB_TARGET_REGISTERFLAGS_H #include "lldb/Utility/Log.h" +#include "lldb/Utility/StreamString.h" clayborg wrote: We can just forward declare StreamString, and possibly remove Log.h above as well if we want to. https://github.com/l

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: > Making sure I'm following along properly. For context, this is the debug > experience I'm most used to: > ![Capture](https://user-images.githubusercontent.com/4587626/277433029-e45937dc-9b78-4a3d-9321-1fa99a35daa8.PNG) > > It sounds like you're saying we shouldn't change the

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: What IDE are you using for the screenshot above? The issue you might run into is that IDE might only be showing the value string and not the summary string. XCode and Visual Studio code will show the value if there is one _and_ the summary if there is one. If there is no value

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: If we have a "Foo *", the value will show up as the pointer value _and_ the summary for the Pointee (if `Foo` has a summary provider, it will show a summary for it along with the pointer. If we have a "Foo", then there will be no value for the struct/class instance and it will

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: Another thing other IDEs do is show something like "{...}" as the value for a struct/union/class. This is what Visual Studio used to do. https://github.com/llvm/llvm-project/pull/69815 ___ lldb-commits mailing list lldb-commits@lists.l

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-23 Thread Greg Clayton via lldb-commits
clayborg wrote: I agree with what Jim said as well. I would rather see the IDEs add the ability to change the format for the values like Xcode can so that people can see their values as needed. The summary here isn't a perfect option for this because if you switch the format to `lldb::eFormatD

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -34,7 +34,7 @@ struct CompilerContext { } bool operator!=(const CompilerContext &rhs) const { return !(*this == rhs); } - void Dump() const; + void Dump(Stream *s) const; clayborg wrote: I think Alex Langford is trying to get rid of functions that ta

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -373,47 +373,49 @@ std::vector DWARFDIE::GetDeclContextDIEs() const { return result; } -void DWARFDIE::GetDeclContext( -llvm::SmallVectorImpl &context) const { +std::vector DWARFDIE::GetDeclContext() const { + std::vector context; const dw_tag_t tag = Tag(); i

[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

2023-10-23 Thread Greg Clayton via lldb-commits
@@ -64,49 +64,51 @@ bool lldb_private::contextMatches(llvm::ArrayRef context_chain, return true; } -void CompilerContext::Dump() const { +void CompilerContext::Dump(Stream *s) const { clayborg wrote: "Stream &s" https://github.com/llvm/llvm-project/pull/6

[Lldb-commits] [lldb] [lldb-vscode] Allow specifying a custom escape prefix for LLDB commands (PR #69238)

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

[Lldb-commits] [lldb] [Reland] Detect against invalid variant index for LibStdC++ std::variant data formatters (PR #69614)

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

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-24 Thread Greg Clayton via lldb-commits
clayborg wrote: Is there a way to have Visual Studio change the display format of the enum values? I currently like the way that enum values are displayed without any changes where we try to show the enum value as an integer because I can change the format if that is needed, or use the comma

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

2023-10-24 Thread Greg Clayton via lldb-commits
@@ -9,10 +9,16 @@ #ifndef LLDB_TARGET_REGISTERFLAGS_H #define LLDB_TARGET_REGISTERFLAGS_H -#include "lldb/Utility/Log.h" +#include +#include +#include +#include clayborg wrote: Not needed in this header, move to .cpp if needed there? https://github.com/l

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

2023-10-24 Thread Greg Clayton via lldb-commits
@@ -9,10 +9,16 @@ #ifndef LLDB_TARGET_REGISTERFLAGS_H #define LLDB_TARGET_REGISTERFLAGS_H -#include "lldb/Utility/Log.h" +#include clayborg wrote: Not needed in this header, move to .cpp if needed there? https://github.com/llvm/llvm-project/pull/69951 _

[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

2023-10-24 Thread Greg Clayton via lldb-commits
clayborg wrote: > > Is there a way to have Visual Studio change the display format of the enum > > values? > > Sort of. You can specify you want to view values in hex and then you'll get > `EK_ParenAggInitMember (0x0015)` instead of `EK_ParenAggInitMember (21)`, > but that all the more fo

[Lldb-commits] [lldb] Improve debug names index fetching global variables performance (PR #70231)

2023-10-25 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Looks good, just rename the "has_match_cu" to "cu_matches" and this is good to go. https://github.com/llvm/llvm-project/pull/70231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https:

[Lldb-commits] [lldb] Improve debug names index fetching global variables performance (PR #70231)

2023-10-25 Thread Greg Clayton via lldb-commits
@@ -130,6 +130,17 @@ void DebugNamesDWARFIndex::GetGlobalVariables( uint64_t cu_offset = cu.GetOffset(); bool found_entry_for_cu = false; for (const DebugNames::NameIndex &ni: *m_debug_names_up) { +// Check if this name index contains an entry for the given CU. +b

[Lldb-commits] [lldb] Improve debug names index fetching global variables performance (PR #70231)

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

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

2023-10-25 Thread Greg Clayton via lldb-commits
@@ -9,10 +9,16 @@ #ifndef LLDB_TARGET_REGISTERFLAGS_H #define LLDB_TARGET_REGISTERFLAGS_H -#include "lldb/Utility/Log.h" +#include +#include +#include +#include clayborg wrote: Sorry, I hadn't expanded the full file to see being used in code that didn't

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

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

[Lldb-commits] [lldb] [lldb][lldb-server] Enable sending RegisterFlags as XML (PR #69951)

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

[Lldb-commits] [lldb] [LLDB][NFC] Remove DWARFASTParserClang as friend from SymbolFileDWARF (PR #70157)

2023-10-25 Thread Greg Clayton via lldb-commits
@@ -325,15 +323,46 @@ class SymbolFileDWARF : public SymbolFileCommon { m_file_index = file_index; } -protected: typedef llvm::DenseMap DIEToTypePtr; - typedef llvm::DenseMap - DIEToVariableSP; + + virtual DIEToTypePtr &GetDIEToType() { return m_die_to_type; }

[Lldb-commits] [lldb] [LLDB][NFC] Remove DWARFASTParserClang as friend from SymbolFileDWARF (PR #70157)

2023-10-25 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: We might want to rename anything that says "ClangType*" to be "CompilerType*". This is still left over from when we didn't think we would ever have the TypeSystem stuff. See some inline comments for examples. Since we are refactoring a bit and making thin

[Lldb-commits] [lldb] [LLDB][NFC] Remove DWARFASTParserClang as friend from SymbolFileDWARF (PR #70157)

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

[Lldb-commits] [lldb] [lldb][test] Add FindGlobalVariables tests for C++ inline static data members (PR #70641)

2023-10-30 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. This will be great to get it (this PR and the related one). The tests LGTM. https://github.com/llvm/llvm-project/pull/70641 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.

[Lldb-commits] [lldb] [lldb/Target] Delay image loading after corefile process creation (PR #70351)

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

[Lldb-commits] [lldb] [lldb/Target] Delay image loading after corefile process creation (PR #70351)

2023-10-30 Thread Greg Clayton via lldb-commits
@@ -614,6 +614,8 @@ class Process : public std::enable_shared_from_this, return error; } + virtual void DidLoadCore() {} clayborg wrote: We could avoid adding the DidLoadCore and re-use the existing Process DidAttach: ``` class Process { ... virtual

[Lldb-commits] [lldb] [lldb/Target] Delay image loading after corefile process creation (PR #70351)

2023-10-30 Thread Greg Clayton via lldb-commits
@@ -2668,7 +2655,23 @@ Status Process::LoadCore() { StateAsCString(state)); error.SetErrorString( "Did not get stopped event after loading the core file."); +} else { + DidLoadCore(); clayborg wrote: Call `DidAttach(...

[Lldb-commits] [lldb] [lldb/Target] Delay image loading after corefile process creation (PR #70351)

2023-10-30 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks good, just a question if we want to use the existing Process::DidAttach() instead of adding a new Process::DidLoadCore() https://github.com/llvm/llvm-project/pull/70351 ___ lldb-commits mailing list lldb-co

[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

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

[Lldb-commits] [lldb] [lldb/Target] Delay image loading after corefile process creation (PR #70351)

2023-10-30 Thread Greg Clayton via lldb-commits
@@ -614,6 +614,8 @@ class Process : public std::enable_shared_from_this, return error; } + virtual void DidLoadCore() {} clayborg wrote: Yeah, I checked and none of the core file plug-ins currently override the DidAttach() (mach-o, ELF or minidump).

[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

2023-10-31 Thread Greg Clayton via lldb-commits
clayborg wrote: How do we find out why something was reverted? I didn't get any emails and this got reverted. Is there a new workflow to find out this info when using github? https://github.com/llvm/llvm-project/pull/67599 ___ lldb-commits mailing lis

[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

2023-10-31 Thread Greg Clayton via lldb-commits
clayborg wrote: @DanielCChen see above https://github.com/llvm/llvm-project/pull/67599 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

2023-10-31 Thread Greg Clayton via lldb-commits
clayborg wrote: > You should never revert a commit without saying why in your revert-commit > message. I just synced with top of tree and it seems to still be there?? https://github.com/llvm/llvm-project/pull/67599 ___ lldb-commits mailing list lldb-

[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

2023-10-31 Thread Greg Clayton via lldb-commits
clayborg wrote: Maybe this was only reverted in his branch? https://github.com/llvm/llvm-project/pull/67599 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

2023-10-31 Thread Greg Clayton via lldb-commits
clayborg wrote: Phew! Still getting. used to this new workflow. Thanks for the confirmation https://github.com/llvm/llvm-project/pull/67599 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-c

[Lldb-commits] [lldb] [lldb/Target] Delay image loading after corefile process creation (PR #70351)

2023-10-31 Thread Greg Clayton via lldb-commits
@@ -614,6 +614,8 @@ class Process : public std::enable_shared_from_this, return error; } + virtual void DidLoadCore() {} clayborg wrote: I think it makes sense in the process plug-in landscape. We are attaching to a core file image from a process plu

[Lldb-commits] [clang] [lldb] [clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (PR #70639)

2023-10-31 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: One question I have here: where will the DW_TAG_variable get emitted for these `constexpr`? For actual static member variables we emit a single DW_TAG_variable in the file that declares the global variable, but for `constexpr` we won't be able to do this

[Lldb-commits] [lldb] [clang] [clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (PR #70639)

2023-10-31 Thread Greg Clayton via lldb-commits
clayborg wrote: > Few minor issues, but looks good to me. (you metnioned somewhere an lldb > issue I think with this patch when the value is removed from the static > member declaration inside the class? If that's a problem - probably hold off > on committing this until lldb's been fixed so th

[Lldb-commits] [lldb] [lldb/Target] Delay image loading after corefile process creation (PR #70351)

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

[Lldb-commits] [clang] [lldb] [clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (PR #70639)

2023-10-31 Thread Greg Clayton via lldb-commits
clayborg wrote: > > > Few minor issues, but looks good to me. (you metnioned somewhere an lldb > > > issue I think with this patch when the value is removed from the static > > > member declaration inside the class? If that's a problem - probably hold > > > off on committing this until lldb's

[Lldb-commits] [lldb] [clang] [clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (PR #70639)

2023-11-01 Thread Greg Clayton via lldb-commits
clayborg wrote: > > The DWARFASTParserClang.cpp will try to create the class from the DWARF for > > the class definition. You will need to find the DW_TAG_variable when we are > > creating the static field if there is no DW_AT_const_value in the > > DW_TAG_member. But we also need to support t

[Lldb-commits] [lldb] Add the ability to get a C++ vtable ValueObject from another ValueObj… (PR #67599)

2023-11-01 Thread Greg Clayton via lldb-commits
clayborg wrote: > Sorry about the noise. All the reverts are in a private branch on my fork > repo. I didn't know it would broadcast to all the people who worked on the > reverted commits. My apologies. No worries! I am getting used to the new github workflow. I will watch the revert messages

[Lldb-commits] [lldb] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-01 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: I would like to see a new setting added to lldb that should be the default way to enable the debuginfod support. Just adding something to `lldb/source/Target/TargetProperties.td` like: ``` def DebuginfodURLs: Property<"debuginfod-urls", "Args">, Defa

[Lldb-commits] [lldb] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

2023-11-01 Thread Greg Clayton via lldb-commits
clayborg wrote: > I would like to see a new setting added to lldb that should be the default > way to enable the debuginfod support. Just adding something to > `lldb/source/Target/TargetProperties.td` like: > > ``` > def DebuginfodURLs: Property<"debuginfod-urls", "Args">, > DefaultStrin

[Lldb-commits] [lldb] [llvm] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

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

[Lldb-commits] [lldb] Add the ability to define a Python based command that uses CommandObjectParsed (PR #70734)

2023-11-01 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: I like this idea. Since python is so dynamic, I wonder if we can just add extra metadata to the standard "argparse" objects so that users can just write their stuff in the most pythonic way possible using `import argparse` and then adding some extra metad

[Lldb-commits] [lldb] Add the ability to define a Python based command that uses CommandObjectParsed (PR #70734)

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

[Lldb-commits] [lldb] Add the ability to define a Python based command that uses CommandObjectParsed (PR #70734)

2023-11-01 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,315 @@ +""" +This module implements a couple of utility classes to make writing +lldb parsed commands more Pythonic. +The way to use it is to make a class for you command that inherits from ParsedCommandBase. clayborg wrote: s/class for you command/cl

[Lldb-commits] [lldb] [lldb][split-dwarf] implement GetSeparateDebugInfo for SymbolFileOnDemand (PR #71230)

2023-11-03 Thread Greg Clayton via lldb-commits
@@ -130,3 +130,29 @@ def test_dwos_not_loaded_table_output(self): "0x[a-zA-Z0-9]{16}\s+E\s+.*foo\.dwo", ], ) + +@skipIfRemote +@skipIfDarwin +@skipIfWindows clayborg wrote: The standard clang won't emit .dwo file

[Lldb-commits] [lldb] [lldb][test] TestVTableValue.py: skip test for older versions of clang (PR #71372)

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

[Lldb-commits] [lldb] [lldb] Replace some register handling asserts with lldbassert (PR #71175)

2023-11-06 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. These asserts are testing that the static representation of register contexts is ok and building and testing with asserts enabled should flush out any issues. `lldbassert()` is perfect for this since it is enabled for debug builds while t

[Lldb-commits] [lldb] [LLDB] Don't forcefully initialize the process trace plugin (PR #71455)

2023-11-06 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. There is no LLDB_PLUGIN_DEFINE() macro in ProcessTrace.cpp, so that is why it was being manually initialized. But this plugin in a problem in that if it's ProcessTrace::CreateInstance(...) is called, it will always return a valid Process

[Lldb-commits] [lldb] [lldb] Print a warning on checksum mismatch (PR #71459)

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

[Lldb-commits] [lldb] [lldb] Print a warning on checksum mismatch (PR #71459)

2023-11-06 Thread Greg Clayton via lldb-commits
@@ -443,6 +455,9 @@ class FileSpec { /// The unique'd filename path. ConstString m_filename; + /// The optional MD5 checksum of the file. + Checksum m_checksum; + clayborg wrote: This will increase the byte size of every FileSpec object by 16 bytes whic

[Lldb-commits] [lldb] [lldb] Print a warning on checksum mismatch (PR #71459)

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

[Lldb-commits] [lldb] [lldb] Print a warning on checksum mismatch (PR #71459)

2023-11-06 Thread Greg Clayton via lldb-commits
@@ -443,6 +455,9 @@ class FileSpec { /// The unique'd filename path. ConstString m_filename; + /// The optional MD5 checksum of the file. + Checksum m_checksum; + clayborg wrote: The DWARF 5 line table should have a file list where can we easily compute

[Lldb-commits] [lldb] [lldb] Read Checksum from DWARF line tables (PR #71458)

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

[Lldb-commits] [lldb] [lldb] Read Checksum from DWARF line tables (PR #71458)

2023-11-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. I would love to see if we can do this without increasing the size of FileSpec objects. Can we have the DWARF line tables store a FileSpec + checksum and do its warning without making every file object contain a checksum object

[Lldb-commits] [lldb] [lldb] Read Checksum from DWARF line tables (PR #71458)

2023-11-07 Thread Greg Clayton via lldb-commits
@@ -443,6 +455,9 @@ class FileSpec { /// The unique'd filename path. ConstString m_filename; + /// The optional MD5 checksum of the file. + Checksum m_checksum; + clayborg wrote: We are increasing the size of all FileSpec objects by 16 bytes here. Is. i

[Lldb-commits] [lldb] [lldb] Add Checksum to FileSpec (PR #71457)

2023-11-07 Thread Greg Clayton via lldb-commits
clayborg wrote: So I debugged lldb with lldb and adding a counter into the FileSpec constructor and came up a max of 721833 files after trying to set a breakpoint in Driver.cpp, so that storage is about 16.5MB which isn't too bad. This goes up to 27.5MB with the FileSpec being 40 bytes, so not

[Lldb-commits] [lldb] [lldb][split-dwarf] implement GetSeparateDebugInfo for SymbolFileOnDemand (PR #71230)

2023-11-07 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Looks good to me. FYI: here is how you might be able to try cross compiling by editing the Makefile and removing the `@skipIf*`. The compile command for cross compiling looks like: ``` clang++ -target x86_64-pc-linux-elf -g -gsplit-dwarf -c main.cpp ``` Y

[Lldb-commits] [lldb] [lldb] Add Checksum to FileSpec (PR #71457)

2023-11-07 Thread Greg Clayton via lldb-commits
clayborg wrote: > > So I debugged lldb with lldb and adding a counter into the FileSpec > > constructor and came up a max of 721833 files after trying to set a > > breakpoint in Driver.cpp, so that storage is about 16.5MB which isn't too > > bad. This goes up to 27.5MB with the FileSpec being

[Lldb-commits] [lldb] Improve VSCode DAP logpoint value summary (PR #71723)

2023-11-08 Thread Greg Clayton via lldb-commits
@@ -295,9 +295,11 @@ bool BreakpointBase::BreakpointHitCallback( frame.GetValueForVariablePath(expr, lldb::eDynamicDontRunTarget); if (value.GetError().Fail()) value = frame.EvaluateExpression(expr); - const char *expr_val = value.GetValue(); -

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/71772 Prior to this patch, each core file plugin (ObjectFileMachO.cpp and ObjectFileMinindump.cpp) would calculate the address ranges to save in different ways. This patch adds a new function to Process.h/.cpp: ```

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -704,7 +705,37 @@ class Process : public std::enable_shared_from_this, /// is not supported by the plugin, error otherwise. virtual llvm::Expected SaveCore(llvm::StringRef outfile); + struct CoreFileMemoryRange { +llvm::AddressRange range; /// The address rang

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -6252,3 +6243,188 @@ Status Process::WriteMemoryTags(lldb::addr_t addr, size_t len, return DoWriteMemoryTags(addr, len, tag_manager->GetAllocationTagType(), *packed_tags); } + +// Create a CoreFileMemoryRange from a MemoryRegionInfo +static Proc

[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

2023-11-09 Thread Greg Clayton via lldb-commits
@@ -6252,3 +6243,188 @@ Status Process::WriteMemoryTags(lldb::addr_t addr, size_t len, return DoWriteMemoryTags(addr, len, tag_manager->GetAllocationTagType(), *packed_tags); } + +// Create a CoreFileMemoryRange from a MemoryRegionInfo +static Proc

<    23   24   25   26   27   28   29   30   31   32   >