| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[lldb] Display breakpoint locations using display name (#90297) Adds a show_function_display_name parameter to SymbolContext::DumpStopContext. This parameter defaults to false, but BreakpointLocation::GetDescription sets it to true. This is NFC in mainline lldb, and will be used to modify how Swift breakpoint locations are printed. | 2 年前 | |
| 2 年前 | ||
| 2 年前 | ||
[lldb] Replace default bodies of special member functions with = default; Replace default bodies of special member functions with = default; $ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-equals-default' -fix , https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html Differential revision: https://reviews.llvm.org/D104041 | 5 年前 | |
Re-land "[lldb] Expose a const iterator for SymbolContextList" Re-lands 04aa943be8ed5c03092e2a90112ac638360ec253 with modifications to fix tests. I originally reverted this because it caused a test to fail on Linux. The problem was that I inverted a condition on accident. | 3 年前 | |
added all modifications made for msdebug | 7 个月前 | |
added all modifications made for msdebug | 7 个月前 | |
Revert "[lldb] Properly protect the Communication class with reader/writer lock" This reverts commit 5d16957207ce1bd1a2091f3677e176012009c59a. | 2 年前 | |
[lldb] Fix term-width setting (#82736) I noticed that the term-width setting would always report its default value (80) despite the driver correctly setting the value with SBDebugger::SetTerminalWidth. (lldb) settings show term-width term-width (int) = 80 The issue is that the setting was defined as a SInt64 instead of a UInt64 while the getter returned an unsigned value. There's no reason the terminal width should be a signed value. My best guess it that it was using SInt64 because UInt64 didn't support min and max values. I fixed that and correct the type and now lldb reports the correct terminal width: (lldb) settings show term-width term-width (unsigned) = 189 rdar://123488999 | 2 年前 | |
[lldb] Fix duplicate word typos; NFC Those fixes were taken from https://reviews.llvm.org/D137338 | 2 年前 | |
SBDebugger: Add new APIs AddDestroyCallback and RemoveDestroyCallback (#89868) # Motivation Individual callers of SBDebugger::SetDestroyCallback() might think that they have registered their callback and expect it to be called when the debugger is destroyed. In reality, only the last caller survives, and all previous callers are forgotten, which might be a surprise to them. Worse, if this is called in a race condition, which callback survives is less predictable, which may case confusing behavior elsewhere. # This PR Allows multiple destroy callbacks to be registered and all called when the debugger is destroyed. **EDIT**: Adds two new APIs: AddDestroyCallback() and ClearDestroyCallback(). SetDestroyCallback() will first clear then add the given callback. Tests are added for the new APIs. ## Tests bin/llvm-lit -sv ../external/llvm-project/lldb/test/API/python_api/debugger/TestDebuggerAPI.py ## (out-dated, see comments below) Semantic change to SetDestroyCallback() ~~Currently, the method overwrites the old callback with the new one. With this PR, it will NOT overwrite. Instead, it will hold on to both. Both callbacks get called during destroy.~~ ~~**Risk**: Although the documentation of SetDestroyCallback() (see [C++](https://lldb.llvm.org/cpp_reference/classlldb_1_1SBDebugger.html#afa1649d9453a376b5c95888b5a0cb4ec) and [python](https://lldb.llvm.org/python_api/lldb.SBDebugger.html#lldb.SBDebugger.SetDestroyCallback)) doesn't really specify the behavior, there is a risk: if existing call sites rely on the "overwrite" behavior, they will be surprised because now the old callback will get called. But as the above said, the current behavior of "overwrite" itself might be unintended, so I don't anticipate users to rely on this behavior. In short, this risk might be less of a problem if we correct it sooner rather than later (which is what this PR is trying to do).~~ ## (out-dated, see comments below) Implementation ~~The implementation holds a std::vector<std::pair<callback, baton>>. When SetDestroyCallback() is called, callbacks and batons are appended to the std::vector. When destroy event happen, the (callback, baton) pairs are invoked FIFO. Finally, the std::vector is cleared.~~ # (out-dated, see comments below) Alternatives considered ~~Instead of changing SetDestroyCallback(), a new method AddDestroyCallback() can be added, which use the same std::vector<std::pair<>> implementation. Together with ClearDestroyCallback() (see below), they will replace and deprecate SetDestroyCallback(). Meanwhile, in order to be backward compatible, SetDestroyCallback() need to be updated to clear the std::vector and then add the new callback. Pros: The end state is semantically more correct. Cons: More steps to take; potentially maintaining an "incorrect" behavior (of "overwrite").~~ ~~A new method ClearDestroyCallback() can be added. Might be unnecessary at this point, because workflows which need to set then clear callbacks may exist but shouldn't be too common at least for now. Such method can be added later when needed.~~ ~~The std::vector may bring slight performance drawback if its implementation doesn't handle small size efficiently. However, even if that's the case, this path should be very cold (only used during init and destroy). Such performance drawback should be negligible.~~ ~~A different implementation was also considered. Instead of using std::vector, the current m_destroy_callback field can be kept unchanged. When SetDestroyCallback() is called, a lambda function can be stored into m_destroy_callback. This lambda function will first call the old callback, then the new one. This way, std::vector is avoided. However, this implementation is more complex, thus less readable, with not much perf to gain.~~ --------- Co-authored-by: Roy Shi <royshi@meta.com> | 2 年前 | |
[lldb] Create a single Severity enum in lldb-enumerations (#90917) We have 3 different enums all expressing severity (info, warning, error). Remove all uses with a new Severity enum in lldb-enumerations.h. | 2 年前 | |
[lldb] Move and clean-up the Declaration class (NFC) This patch moves the Declaration class from the Symbol library to the Core library. This will allow to use it in a more generic fashion and aims to lower the dependency cycles when it comes to the linking. The patch also does some cleaning up by making column information permanent and removing the LLDB_ENABLE_DECLARATION_COLUMNS directives. Differential revision: https://reviews.llvm.org/D101556 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> | 5 年前 | |
[lldb][nfc] Remove unused member Disassembler::m_base_addr (#89289) This member variable is completely unused. I also don't think it makes a ton of sense since (1) The "base address" can be obtained from the first Instruction in its InstructionList, and (2) InstructionLists may not be a series of contiguous instructions (even though they are most of the time). | 2 年前 | |
added all modifications made for msdebug | 7 个月前 | |
Reland "[lldb] Parse and display register field enums" (#97258)" (#97270) This reverts commit d9e659c538516036e40330b6a98160cbda4ff100. I could not reproduce the Mac OS ASAN failure locally but I narrowed it down to the test test_many_fields_same_enum. This test shares an enum between x0, which is 64 bit, and cpsr, which is 32 bit. My theory is that when it does register read x0, an enum type is created where the undlerying enumerators are 64 bit, matching the register size. Then it does register read cpsr which used the cached enum type, but this register is 32 bit. This caused lldb to try to read an 8 byte value out of a 4 byte allocation: READ of size 8 at 0x60200014b874 thread T0 <...> =>0x60200014b800: fa fa fd fa fa fa fd fa fa fa fd fa fa fa[04]fa To fix this I've added the register's size in bytes to the constructed enum type's name. This means that x0 uses: __lldb_register_fields_enum_some_enum_8 And cpsr uses: __lldb_register_fields_enum_some_enum_4 If any other registers use this enum and are read, they will use the cached type as long as their size matches, otherwise we make a new type. | 2 年前 | |
Convert ValueObject::Dump() to return llvm::Error() (NFCish) This change by itself has no measurable effect on the LLDB testsuite. I'm making it in preparation for threading through more errors in the Swift language plugin. | 2 年前 | |
[lldb] progressive progress reporting for darwin kernel/firmware (#98845) When doing firmware/kernel debugging, it is frequent that binaries and debug info need to be retrieved / downloaded, and the lack of progress reports made for a poor experience, with lldb seemingly hung while downloading things over the network. This PR adds progress reports to the critical sites for these use cases. | 2 年前 | |
[lldb] Sink StreamFile into lldbHost StreamFile subclasses Stream (from lldbUtility) and is backed by a File (from lldbHost). It does not depend on anything from lldbCore or any of its sibling libraries, so I think it makes sense for this to live in lldbHost instead. Differential Revision: https://reviews.llvm.org/D157460 | 2 年前 | |
[lldb] Move Core/FileSpecList -> Utility/FileSpecList (NFC) There's no reason for FileSpecList to live in lldb/Core while FileSpec lives in lldb/Utility. Move FileSpecList next to FileSpec. | 3 年前 | |
added all modifications made for msdebug | 7 个月前 | |
[lldb] Use std::optional instead of llvm::Optional (NFC) This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to clean up the "using" declarations, #include "llvm/ADT/Optional.h", etc. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 | 3 年前 | |
[lldb] Simplify color logic in (IOHandler)Editline (NFC) This patch simplifies the color handling logic in Editline and IOHandlerEditline: - Remove the m_color_prompts property from Editline and use the prompt ANSI prefix and suffix as the single source of truth. This avoids having to redraw the prompt unnecessarily, for example when colors are enabled but the prompt prefix and suffix are empty. - Rename m_color_prompts to just m_color in IOHandlerEditline and use it to ensure consistency between colored prompts and colored auto-suggestions. Some IOHandler explicitly turn off colors (such as IOHandlerConfirm) and it doesn't really make sense to have one or the other. | 2 年前 | |
| 2 年前 | ||
| 2 年前 | ||
[lldb] Revive shell test after updating UnwindTable (#86770) In commit 2f63718f8567413a1c596bda803663eb58d6da5a Author: Jason Molenda <jmolenda@apple.com> Date: Tue Mar 26 09:07:15 2024 -0700 [lldb] Don't clear a Module's UnwindTable when adding a SymbolFile (#86603) I stopped clearing a Module's UnwindTable when we add a SymbolFile to avoid the memory management problems with adding a symbol file asynchronously while the UnwindTable is being accessed on another thread. This broke the target-symbols-add-unwind.test shell test on Linux which removes the DWARF debub_frame section from a binary, loads it, then loads the unstripped binary with the DWARF debug_frame section and checks that the UnwindPlans for a function include debug_frame. I originally decided that I was willing to sacrifice the possiblity of additional unwind sources from a symbol file because we rely on assembly emulation so heavily, they're rarely critical. But there are targets where we we don't have emluation and rely on things like DWARF debug_frame a lot more, so this probably wasn't a good choice. This patch adds a new UnwindTable::Update method which looks for any new sources of unwind information and adds it to the UnwindTable, and calls that after a new SymbolFile has been added to a Module. | 2 年前 | |
[lldb] Replace default bodies of special member functions with = default; Replace default bodies of special member functions with = default; $ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-equals-default' -fix , https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html Differential revision: https://reviews.llvm.org/D104041 | 5 年前 | |
[lldb] Expand background symbol download (#80890) LLDB has a setting (symbols.enable-background-lookup) that calls dsymForUUID on a background thread for images as they appear in the current backtrace. Originally, the laziness of only looking up symbols for images in the backtrace only existed to bring the number of dsymForUUID calls down to a manageable number. Users have requesting the same functionality but blocking. This gives them the same user experience as enabling dsymForUUID globally, but without the massive upfront cost of having to download all the images, the majority of which they'll likely not need. This patch renames the setting to have a more generic name (symbols.auto-download) and changes its values from a boolean to an enum. Users can now specify "off", "background" and "foreground". The default remains "off" although I'll probably change that in the near future. | 2 年前 | |
Use llvm::byteswap instead of ByteSwap_{16,32,64} (NFC) | 3 年前 | |
[LLDB][SaveCore] Add SBSaveCoreOptions Object, and SBProcess::SaveCore() overload (#98403) This PR adds SBSaveCoreOptions, which is a container class for options when LLDB is taking coredumps. For this first iteration this container just keeps parity with the extant API of file, style, plugin. In the future this options object can be extended to allow users to take a subset of their core dumps. | 2 年前 | |
[lldb][enums] Remove broadcast bits from debugger (#91618) Removes the debugger broadcast bits from Debugger.h and instead uses the enum from lldb-enumerations.h and adds the eBroadcastSymbolChange bit to the enum in lldb-enumerations.h. This fixes a bug wherein the incorrect broadcast bit could be referenced due both of these enums previously existing and being out-of-sync with each other. | 2 年前 | |
[lldb] Use StringRef::{starts,ends}_with (NFC) This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with. | 2 年前 | |
[lldb] Change interface of StructuredData::Array::GetItemAtIndexAsString (#71613) This patch changes the interface of StructuredData::Array::GetItemAtIndexAsString to return a std::optional<llvm::StringRef> instead of taking an out parameter. More generally, this commit serves as proposal that we change all of the sibling APIs (GetItemAtIndexAs) to do the same thing. The reason this isn't one giant patch is because it is rather unwieldy changing just one of these, so if this is approved, I will do all of the other ones as individual follow-ups. | 2 年前 | |
added all modifications made for msdebug | 7 个月前 | |
[lldb] Add missing StringExtras.h includes In preparation for removing the #include "llvm/ADT/StringExtras.h" from the header to source file of llvm/Support/Error.h, first add in all the missing includes that were previously included transitively through this header. This is fixing all files missed in b0abd4893fa1, 39d8e6e22cd1, and a11efd49266f. Differential Revision: https://reviews.llvm.org/D154775 | 3 年前 | |
| 2 年前 | ||
[lldb] Print diagnostic prefixes (error, warning) in color Print diagnostic prefixes (error, warning) in their respective colors when colors are enabled. | 4 年前 | |
[lldb][nfc] Move broadcaster class strings away from ConstString (#89690) These are hardcoded strings that are already present in the data section of the binary, no need to immediately place them in the ConstString StringPools. Lots of code still calls GetBroadcasterClass and places the return value into a ConstString. Changing that would be a good follow-up. Additionally, calls to these functions are still wrapped in ConstStrings at the SBAPI layer. This is because we must guarantee the lifetime of all strings handed out publicly. | 2 年前 | |
[lldb][NFC] Move some ctors and tors to cpp files (#67165) This prevents undefined vtable errors when linking these libraries from out-of-tree. I'm facing this issue as I work on my new language plugin. | 2 年前 | |
added all modifications made for msdebug | 7 个月前 | |
[bugfix] 修复host侧的uint8_t指针变量会展示乱码的问题 & 增加超时等待时间 Co-authored-by: wiyr0<wangyixian3@huawei.com> # message auto-generated for no-merge-commit merge: !176 merge fix_var into master [bugfix] 修复host侧的uint8_t指针变量会展示乱码的问题 & 增加超时等待时间 Created-by: wiyr0 Commit-by: wiyr0 Merged-by: ascend-robot Description: ### 1. 修改描述 - **修改原因:** 原生lldb打印host uint8_t* 的变量时,会认为是char* 指针,从而打印成字符串,有概率显示成乱码。大算子传输的速度慢,会导致kernel.o还没到client侧算子下发了,从而断点不生效。 - **修改方案:** 1. 展示不展示uint8_t* 指向的内容;2. 增加超时到30s - **修改内容:** 1. 去掉只对device上的uint8_t* 的限制; 2.修改连接的超时字段 - [ ] **涉及代码双合**(贴上另一个PR链接): ---- ### 2. 功能验证 - [x] **功能自验截图**(请确保不体现个人信息)  - [x] **冒烟是否通过**  ---- ### 3. 代码检视 - **要求:** - 合入功能代码大于 200 行,需要sig会议申报代码检视议题,并在PR中标注会议。 - committer评估是否需要在sig会议进行代码检视。 - 参与检视的committer人员名单与检视时间。 - 大于 1000 行代码原则上不允许合入,需进行备案。 - [x] **是否经过代码检视** - [ ] **是否具备UT测试用例看护** - [ ] **是否需要在sig会议中进行代码检视** - **检视committer人员名单与检视时间:** ---- ### 4. 资料修改自检 - **资料修改:** ---- See merge request: Ascend/msdebug!176 | 1 个月前 | |
Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (#84219) Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected This is an NFC change that does not yet add any error handling or change any code to return any errors. This is the second big change in the patch series started with https://github.com/llvm/llvm-project/pull/83501 A follow-up PR will wire up error handling. | 2 年前 | |
added all modifications made for msdebug | 7 个月前 | |
[lldb] Split ValueObject::CreateChildAtIndex into two functions (#94455) The the function is doing two fairly different things, depending on how it is called. While this allows for some code reuse, it also makes it hard to override it correctly. Possibly for this reason ValueObjectSynthetic overerides GetChildAtIndex instead, which forces it to reimplement some of its functionality, most notably caching of generated children. Splitting this up makes it easier to move the caching to a common place (and hopefully makes the code easier to follow in general). | 2 年前 | |
[lldb] Split ValueObject::CreateChildAtIndex into two functions (#94455) The the function is doing two fairly different things, depending on how it is called. While this allows for some code reuse, it also makes it hard to override it correctly. Possibly for this reason ValueObjectSynthetic overerides GetChildAtIndex instead, which forces it to reimplement some of its functionality, most notably caching of generated children. Splitting this up makes it easier to move the caching to a common place (and hopefully makes the code easier to follow in general). | 2 年前 | |
[lldb] Split ValueObject::CreateChildAtIndex into two functions (#94455) The the function is doing two fairly different things, depending on how it is called. While this allows for some code reuse, it also makes it hard to override it correctly. Possibly for this reason ValueObjectSynthetic overerides GetChildAtIndex instead, which forces it to reimplement some of its functionality, most notably caching of generated children. Splitting this up makes it easier to move the caching to a common place (and hopefully makes the code easier to follow in general). | 2 年前 | |
[lldb] Split ValueObject::CreateChildAtIndex into two functions (#94455) The the function is doing two fairly different things, depending on how it is called. While this allows for some code reuse, it also makes it hard to override it correctly. Possibly for this reason ValueObjectSynthetic overerides GetChildAtIndex instead, which forces it to reimplement some of its functionality, most notably caching of generated children. Splitting this up makes it easier to move the caching to a common place (and hopefully makes the code easier to follow in general). | 2 年前 | |
Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (#84219) Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected This is an NFC change that does not yet add any error handling or change any code to return any errors. This is the second big change in the patch series started with https://github.com/llvm/llvm-project/pull/83501 A follow-up PR will wire up error handling. | 2 年前 | |
[lldb] Delete the SharingPtr class Summary: The only use of this class was to implement the SharedCluster of ValueObjects. However, the same functionality can be implemented using a regular std::shared_ptr, and its little-known "sub-object pointer" feature, where the pointer can point to one thing, but actually delete something else when it goes out of scope. This patch reimplements SharedCluster using this feature -- SharedClusterPointer::GetObject now returns a std::shared_pointer which points to the ValueObject, but actually owns the whole cluster. The only change I needed to make here is that now the SharedCluster object needs to be created before the root ValueObject. This means that all private ValueObject constructors get a ClusterManager argument, and their static Create functions do the create-a-manager-and-pass-it-to-value-object dance. Reviewers: teemperor, JDevlieghere, jingham Subscribers: mgorny, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74153 | 6 年前 | |
Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (#84219) Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected This is an NFC change that does not yet add any error handling or change any code to return any errors. This is the second big change in the patch series started with https://github.com/llvm/llvm-project/pull/83501 A follow-up PR will wire up error handling. | 2 年前 | |
[lldb] Split ValueObject::CreateChildAtIndex into two functions (#94455) The the function is doing two fairly different things, depending on how it is called. While this allows for some code reuse, it also makes it hard to override it correctly. Possibly for this reason ValueObjectSynthetic overerides GetChildAtIndex instead, which forces it to reimplement some of its functionality, most notably caching of generated children. Splitting this up makes it easier to move the caching to a common place (and hopefully makes the code easier to follow in general). | 2 年前 | |
Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (#84219) Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected This is an NFC change that does not yet add any error handling or change any code to return any errors. This is the second big change in the patch series started with https://github.com/llvm/llvm-project/pull/83501 A follow-up PR will wire up error handling. | 2 年前 | |
[lldb][NFC] Rename the second ValueObjectManager to ValueObjectUpdater and remove the dead code ValueObject.h contains the ValueObject::ValueObjectManager type which is just a typedef for the ClusterManager that takes care of the whole ValueObject memory management. However, there is also ValueObjectManager defined in the same header which is only used in the curses UI implementation and consists mostly of dead and completely untested code. This code been around since a while (it was added in 2016 as 8369b28da0750129ababae357bea98940800a0e0), so I think we shouldn't just revert the whole patch. Instead this patch just moves the class to its own header that it isn't just hiding in the ValueObject header and renames it to ValueObjectUpdater that it at least has a unique name (which I hope also slightly better reflects the purpose of this class). I also deleted all the dead code branches and functions. Reviewed By: #lldb, mib, JDevlieghere Differential Revision: https://reviews.llvm.org/D97287 | 5 年前 | |
[lldb] Split ValueObject::CreateChildAtIndex into two functions (#94455) The the function is doing two fairly different things, depending on how it is called. While this allows for some code reuse, it also makes it hard to override it correctly. Possibly for this reason ValueObjectSynthetic overerides GetChildAtIndex instead, which forces it to reimplement some of its functionality, most notably caching of generated children. Splitting this up makes it easier to move the caching to a common place (and hopefully makes the code easier to follow in general). | 2 年前 | |
[lldb] Return an llvm::Expected from DWARFExpression::Evaluate (NFCI) (#94420) Change the signature of DWARFExpression::Evaluate and DWARFExpressionList::Evaluate to return an llvm::Expected instead of a boolean. This eliminates the Status output parameter and generally improves error handling. | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 7 个月前 | ||
| 7 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 7 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 7 个月前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 7 个月前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 7 个月前 | ||
| 1 个月前 | ||
| 2 年前 | ||
| 7 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 2 年前 |