| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[lldb] correct inconsistent order of messages on process launch (#73173) Fixes [#68035](https://github.com/llvm/llvm-project/issues/68035), where an inconsistency in the order of "Process launched" and "Process stopped" messages occurs during process launch. The fix involves adjusting the message output sequence in CommandObjectProcessLaunch::DoExecute within source/Commands/CommandObjectProcess.cpp. This ensures "Process launched" consistently precedes "Process stopped" when executing commands with the '-o' flag, i.e., non-interactive mode. Upon implementing this change, two tests failed: lldb/test/Shell/Breakpoint/jit-loader_jitlink_elf.test and lldb/test/Shell/Breakpoint/jit-loader_rtdyld_elf.test. These failures were expected as they relied on the previous, now-corrected message order. Updating these tests to align with the new message sequence is part of this PR's scope. | 2 年前 | |
Relax test | 3 年前 | |
[Feature][Open Source Collaboration Task] Tool Log Display Optimization Co-authored-by: Nice_try<nicetryzzw@163.com> # message auto-generated for no-merge-commit merge: !167 merge master into master [Feature][开源共建任务]工具打印日志展示优化 Created-by: Nice_try Commit-by: Nice_try Merged-by: ascend-robot Description: 关联issue: https://gitcode.com/Ascend/msdebug/issues/59 ### 1. 修改描述 - **修改原因:** msdebug 工具命中 device 的断点后,可以使用 ascend info cores 命令查看每个 AI Core 的 PC、core_type、stop reason 等信息。但 PC 地址难以直观理解,用户更关心每个核停在源码的哪个位置。虽然切换核后也能展示代码行,但在不切核前就大概知道哪些核停的位置,能提升调试效率。 - **修改方案:** 1. 复用已有的 GetLineEntryForPC(Target*, uint64_t pc, LineInfo&) 函数,将每个 CoreInfo 的 PC 地址解析为源码文件名和行号;若解析失败则显示 "NA"。 2. 复用已有的 PrettyPrintTable(headers, rows, focus_row, strm) 函数替代手动拼接格式化,实现: - 遍历所有表头和数据行,**动态计算每列最大宽度** - **列间隔 1 个空格**,**全部右对齐** - 焦点行自动显示 * 标记 3. 表头新增 Filename、Line 两列,数据行填充解析结果或 "NA"。 - **修改内容:** | 文件 | 变更 | |------|------| | lldb/source/Commands/CommandObjectAscend.cpp | CommandObjectAscendInfoAicores::DoExecute 重写:改用手动拼接为 PrettyPrintTable 动态表格渲染,新增 GetLineEntryForPC 解析 PC → Filename/Line | | 7 个 command-ascend-info.test | CHECK 匹配模式从固定间距改为 {{ +}} 正则,数据行末尾增加 {{ +}}NA{{ +}}NA 匹配 Filename/Line | | 6 个中英文文档 .md | 所有 ascend info cores 示例输出完整补齐 Filename/Line 数据行(14 处) | - [ ] **涉及代码双合**(贴上另一个PR链接): ---- ### 2. 功能验证 - [ ] **功能自验截图**(请确保不体现个人信息)  - [x] **冒烟是否通过** ---- ### 3. 代码检视 - **要求:** - 合入功能代码大于 200 行,需要sig会议申报代码检视议题,并在PR中标注会议。 - committer评估是否需要在sig会议进行代码检视。 - 参与检视的committer人员名单与检视时间。 - 大于 1000 行代码原则上不允许合入,需进行备案。 - [ ] **是否经过代码检视** - [ ] **是否具备UT测试用例看护** - [ ] **是否需要在sig会议中进行代码检视** - **检视committer人员名单与检视时间:** ---- ### 4. 资料修改自检 - **资料修改:** ---- See merge request: Ascend/msdebug!167 | 26 天前 | |
[lldb] Rename lldb-vscode to lldb-dap (#69264) Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit: s/VSCODE/DAP/ s/VSCode/DAP/ s/vscode/dap/ s/g_vsc/g_dap/ Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/ | 2 年前 | |
[lldb] Copy log files into diagnostic directory This patch copies over log files to the diagnostic directory. The caveat here is that this only works for logs that are redirected to a file. The implementation piggybacks of the mapping kept by the debugger. The advantage is that it's free until you generate the diagnostics, at which point you only pay the price of copying over the file. Differential revision: https://reviews.llvm.org/D135631 | 3 年前 | |
[lldb] Remove -d(ebug) mode from the lldb driver (#83330) The -d(ebug) option broke 5 years ago when I migrated the driver to libOption. Since then, we were never check if the option is set. We were incorrectly toggling the internal variable (m_debug_mode) based on OPT_no_use_colors instead. Given that the functionality doesn't seem particularly useful and nobody noticed it has been broken for 5 years, I'm just removing the flag. | 2 年前 | |
[LLDB] Clean up after command fails CommandObject::CheckRequirements() requires m_exe_ctx being cleaned up. Differential Revision: https://reviews.llvm.org/D132397 | 3 年前 | |
[lldb] fix step in AArch64 trampoline (#90783) Detects AArch64 trampolines in order to be able to step in a function through a trampoline on AArch64. --------- Co-authored-by: Vincent Belliard <v-bulle@github.com> | 2 年前 | |
Reland "[lldb][ObjC] Don't query objective-c runtime for decls in C++ contexts" This relands https://github.com/llvm/llvm-project/pull/95963. It had to be reverted because the TestEarlyProcessLaunch.py test was failing on the incremental macOS bots. The test failed because it was relying on expression log output from the ObjC introspection routines (but was the expression was called from a C++ context). The relanded patch simply ensures that the test runs the expressions as ObjC expressions. When LLDB isn't able to find a clang::Decl in response to a FindExternalVisibleDeclsByName, it will fall-back to looking into the Objective-C runtime for that decl. This ends up doing a lot of work which isn't necessary when we're debugging a C++ program. This patch makes the ObjC lookup conditional on the language that the ExpressionParser deduced (which can be explicitly set using the expr --language option or is set implicitly if we're stopped in an ObjC frame or a C++ frame without debug-info). rdar://96236519 | 2 年前 | |
[lldb] Print message after loading 'crashlog' command Previously, importing crashlog resulted in a message being printed. The message was about other commands (those in heap.py), not crashlog. The changes in D117237 made it so that the heap.py messages were printed only when importing lldb.macosx.heap, not when importing lldb.macosx.crashlog. Some users may see no output and think crashlog wasn't successfully loaded. This ensures users see that crashlog is loaded. rdar://88283132 Differential Revision: https://reviews.llvm.org/D119155 | 4 年前 | |
Adapt TestCustomShell and TestMultipleDebuggers to run under ASAN In situations where only LLDB is ASANified, a false positive occurs unless ASAN_OPTIONS=detect_container_overflow=0 is set in the environment. Differential Revision: https://reviews.llvm.org/D143772 | 3 年前 | |
[lldb] Print an error for unsupported combinations of log options Print an error for unsupported combinations of log handlers and log options. Only the stream log handler takes a file and only the circular and stream handler take a buffer size. This cannot be dealt with through option groups because the option combinations depend on the requested handler. Differential revision: https://reviews.llvm.org/D143623 | 3 年前 | |
[LLDB][Minidump] Merge executable module's architecture into target's architecture. This allows minidump process ABI to match the PE/COFF file ABI. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D137873 | 3 年前 | |
[lldb] Fix a bug for PT_TLS segments getting loaded when they shouldn't. (#98432) PT_LOAD and PT_TLS segments are top level sections in the ObjectFileELF section list. The two segments can often have the same program header p_vaddr and p_paddr values and this can cause section load list issues in LLDB if we load the PT_TLS segments. What happens is the SectionLoadList::m_addr_to_sect, when a library is loaded, will first map one of the sections named "PT_LOAD[0]" with the load address that matches the p_vaddr entry from the program header. Then the "PT_TLS[0]" would come along and try to load this section at the same address. This would cause the "PT_LOAD[0]" section to be unloaded as the SectionLoadList::m_addr_to_sect would replace the value for the matching p_vaddr with the last section to be seen. The sizes of the PT_TLS and PT_LOAD that have the same p_vaddr value don't need to have the same byte size, so this could cause lookups to fail for an addresses in the "PT_LOAD[0]" section or any of its children if the offset is greater than the offset size of the PT_TLS segment. It could also cause us to incorrectly attribute addresses from the "PT_LOAD[0]" to the "PT_TLS[0]" segment when doing lookups for offset that are less than the size of the PT_TLS segment. This fix stops us from loading PT_TLS segments in the section load lists and will prevent the bugs that resulted from this. No addresses the the DWARF refer to TLS data with a "file address" in any way. They all have TLS DWARF location expressions to locate these variables. We also don't have any support for having actual thread specific sections and having those sections resolve to something different for each thread, so there currently is no point in loading thread specific sections. Both the ObjectFileMachO and ObjectFileCOFF both ignore thread specific sections at the moment, so this brings the ObjectFileELF to parity with those plug-ins. I added a test into an existing test to verify that things work as expected. Prior to this fix with a real binary, the output of "target dump section-load-list" would look like this for the old LLDB: // (lldb) target dump section-load-list // addr = 0x0000000000000000, section = 0x55d46ab8c510: 0xfffffffffffffffd container [0x0000000000000000-0x0000000000000628) r-- 0x00000000 0x00000628 0x00000000 a.out.PT_LOAD[0] // addr = 0x0000000000001000, section = 0x55d46ab8b0c0: 0xfffffffffffffffc container [0x0000000000001000-0x0000000000001185) r-x 0x00001000 0x00000185 0x00000000 a.out.PT_LOAD[1] // addr = 0x0000000000002000, section = 0x55d46ac040f0: 0xfffffffffffffffb container [0x0000000000002000-0x00000000000020cc) r-- 0x00002000 0x000000cc 0x00000000 a.out.PT_LOAD[2] // addr = 0x0000000000003db0, section = 0x55d46ab7cef0: 0xfffffffffffffff6 container [0x0000000000003db0-0x0000000000003db4) r-- 0x00002db0 0x00000000 0x00000000 a.out.PT_TLS[0] And this for the fixed LLDB: // (lldb) target dump section-load-list // addr = 0x0000000000000000, section = 0x105f0a9a8: 0xfffffffffffffffd container [0x0000000000000000-0x0000000000000628) r-- 0x00000000 0x00000628 0x00000000 a.out.PT_LOAD[0] // addr = 0x0000000000001000, section = 0x105f0adb8: 0xfffffffffffffffc container [0x0000000000001000-0x0000000000001185) r-x 0x00001000 0x00000185 0x00000000 a.out.PT_LOAD[1] // addr = 0x0000000000002000, section = 0x105f0af48: 0xfffffffffffffffb container [0x0000000000002000-0x00000000000020cc) r-- 0x00002000 0x000000cc 0x00000000 a.out.PT_LOAD[2] // addr = 0x0000000000003db0, section = 0x105f0b078: 0xfffffffffffffffa container [0x0000000000003db0-0x0000000000004028) rw- 0x00002db0 0x00000274 0x00000000 a.out.PT_LOAD[3] We can see that previously the "PT_LOAD[3]" segment would be removed from the section load list, and after the fix it remains and there is on PT_TLS in the loaded sections. | 2 年前 | |
[lldb] Suppress unsupported language warning for assembly (#95871) The following warning is technically correct, but pretty much useless, since there aren't any frame variables that we'd expect the debugger to understand. > This version of LLDB has no plugin for the language "assembler". > Inspection of frame variables will be limited. This message is useful in the general case but should be suppressed for the "assembler" case. rdar://92745462 | 2 年前 | |
[NFC][Py Reformat] Reformat python files in lldb This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with black (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460 | 3 年前 | |
[lldb] Check if language is supported before creating a REPL instance Currently, we'll try to instantiate a ClangREPL for every known language. The plugin manager already knows what languages it supports, so rely on that to only instantiate a REPL when we know the requested language is supported. rdar://86439474 Differential revision: https://reviews.llvm.org/D115698 | 4 年前 | |
[lldb] Disable verbose_trap.test on Windows (#99323) verbose_trap.test, added in #80368, fails on some Windows bots. See https://lab.llvm.org/buildbot/#/builders/141/builds/808. | 2 年前 | |
[lldb][AArch64] Add register field enum information (#96887) This enables XML output for enums and adds enums for 2 fields on AArch64 Linux: * mte_ctrl.tcf, which controls how tag faults are delivered. * fpcr.rmode, which sets the rounding mode for floating point operations. The other one we could do is cpsr.btype, but it is not clear what would be useful here so I'm not including it in this change. | 2 年前 | |
Revert "[lldb/crashlog] Make interactive mode the new default" (#96263) Reverts llvm/llvm-project#94575 since introduces test failure: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/6166/ | 2 年前 | |
[lldb][Format] Fix missing inlined function names in frame formatting. (#78494) This fixes missing inlined function names when formatting frame and the Block in SymbolContext is a lexical block (e.g. DW_TAG_lexical_block in Dwarf). | 2 年前 | |
[lldb][AArch64] Re-enable clone follow tests on AArch64 Linux Fixes #49243 By unknown means, these have been fixed since the UNSUPPORTED was added. | 2 年前 | |
[lldb] Fix crash when adding members to an "incomplete" type (#102116) This fixes a regression caused by delayed type definition searching (#96755 and friends): If we end up adding a member (e.g. a typedef) to a type that we've already attempted to complete (and failed), the resulting AST would end up inconsistent (we would start to "forcibly" complete it, but never finish it), and importing it into an expression AST would crash. This patch fixes this by detecting the situation and finishing the definition as well. (cherry picked from commit 57cd1000c9c93fd0e64352cfbc9fbbe5b8a8fcef) | 1 年前 | |
[lldb] Fix 'FileCheck' spelling on symtab regex tests | 3 年前 | |
[lldb/test] Fix target-label.test on Fuchsia This shell test also checks some SBAPI functionalities and thus requires python support. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> | 3 年前 | |
Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (#92503) …unction (#91321)" This reapplies fd1bd53ba5a06f344698a55578f6a5d79c457e30, which was reverted due to a test failure on aarch64/windows. The failure was caused by a combination of several factors: - clang targeting aarch64-windows (unlike msvc, and unlike clang targeting other aarch64 platforms) defaults to -fomit-frame-pointers - lldb's code for looking up register values for <same> unwind rules is recursive - the test binary creates a very long chain of fp-less function frames (it manages to fit about 22k frames before it blows its stack) Together, these things have caused lldb to recreate the same deep recursion when unwinding through this, and blow its own stack as well. Since lldb frames are larger, about 4k frames like this was sufficient to trigger the stack overflow. This version of the patch works around this problem by increasing the frame size of the test binary, thereby causing it to blow its stack sooner. This doesn't fix the issue -- the same problem can occur with a real binary -- but it's not very likely, as it requires an infinite recursion in a simple (so it doesn't use the frame pointer) function with a very small frame (so you can fit a lot of them on the stack). A more principled fix would be to make lldb's lookup code non-recursive, but I believe that's out of scope for this patch. The original patch description follows: A leaf function may not store the link register to stack, but we it can still end up being a non-zero frame if it gets interrupted by a signal. Currently, we were unable to unwind past this function because we could not read the link register value. To make this work, this patch: - changes the function-entry unwind plan to include the fp|lr = <same> rules. This in turn necessitated an adjustment in the generic instruction emulation logic to ensure that lr=[sp-X] can override the <same> rule. - allows the <same> rule for pc and lr in all m_all_registers_available frames (and not just frame zero). The test verifies that we can unwind in a situation like this, and that the backtrace matches the one we computed before getting a signal. | 2 年前 | |
Revert "Collecting more logging to debug CI bots" This reverts commit cf2533e75ec4360da460bb577e0a4e64f2d8997f. | 2 年前 | |
[lldb] Use packaging module instead of pkg_resources (#93712) Use the packaging [1] module for parsing version numbers, instead of pkg_resources which is distributed with setuptools. I recently switched over to using the latter, knowing it was deprecated (in favor of the packaging module) because it comes with Python out of the box. Newer versions of setuptools have removed pkg_resources so we have to use packaging. [1] https://pypi.org/project/packaging/ | 2 年前 | |
[LLDB] Only run lldb-server Shell tests if it gets built It's easy enough to disable the lldb-server build. The lldb-server unit tests already have logic to disable them if we don't build, so this just makes it even. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D135825 | 3 年前 | |
[test] Add a .clang-format file for the shell test. The API tests have a .clang-format file that disables formatting altogether. While this is needed for some tests, it also leads to inconsistency between test files. The shell tests suffer from a similar problem: a test with a source-file extension (.c, .cpp) will get formatted, potentially breaking up lines and leading to invalid RUN commands. Rather than completely disabling formatting here, I propose to not enforce a line limit instead. That way tests will be consistent, but you can still have long run commands (as is not uncommon in LLVM either) and use breakpoints with patters that extend beyond 80 cols. Differential revision: https://reviews.llvm.org/D69058 llvm-svn: 375172 | 6 年前 | |
[lldb] Revise IDE folder structure (#89748) Update the folder titles for targets in the monorepository that have not seen taken care of for some time. These are the folders that targets are organized in Visual Studio and XCode ( set_property(TARGET <target> PROPERTY FOLDER "<title>")) when using the respective CMake's IDE generator. * Ensure that every target is in a folder * Use a folder hierarchy with each LLVM subproject as a top-level folder * Use consistent folder names between subprojects * When using target-creating functions from AddLLVM.cmake, automatically deduce the folder. This reduces the number of set_property/set_target_property, but are still necessary when add_custom_target, add_executable, add_library, etc. are used. A LLVM_SUBPROJECT_TITLE definition is used for that in each subproject's root CMakeLists.txt. | 2 年前 | |
Revert "[lldb] Assert filecache and live memory match on debug under a setting" This reverts commit 77e9d10f0fbfe04a14e6ce61753376dd78e0c2f0. This change broke the Windows LLDB bot: https://lab.llvm.org/buildbot/#/builders/83/builds/8784/steps/7/logs/stdio | 4 年前 | |
[lldb] fix(lldb/**.py): fix comparison to None (#94017) from PEP8 (https://peps.python.org/pep-0008/#programming-recommendations): > Comparisons to singletons like None should always be done with is or is not, never the equality operators. Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> | 2 年前 | |
[lldb][lit] Guard MallocNanoZone envvar in shell tests (#88824) Previously the MallocNanoZone envvar would be set to 0 on Darwin for the LLDB shell tests, but this should guarded behind ASan being enabled as opposed to simply running the test suite behind Darwin. This required that the LLVM_USE_SANITIZER option be added as an attribute to the lit config for shell tests. | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 3 年前 | ||
| 26 天前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 |