| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[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 | 1 个月前 | |
[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 年前 | |
[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 年前 | |
Reland "[lldb] Set return status to failed when adding a command error" This reverts commit ac031c8db2ce454a9b08f23192ce698e8bde4447. SB API usage has been corrected. | 5 年前 | |
Reland "[lldb] Set return status to failed when adding a command error" This reverts commit ac031c8db2ce454a9b08f23192ce698e8bde4447. SB API usage has been corrected. | 5 年前 | |
[lldb/Commands] Make column available through _regexp-break Update _regexp-break to interpret main.c:8:21 as: breakpoint set --line 8 --column 21 Differential revision: https://reviews.llvm.org/D73314 | 6 年前 | |
[lldb] Add syntax color highlighting for disassembly Add support for syntax color highlighting disassembly in LLDB. This patch relies on 77d1032516e7, which introduces support for syntax highlighting in MC. Currently only AArch64 and X86 have color support, but other interested backends can adopt WithColor in their respective MCInstPrinter. Differential revision: https://reviews.llvm.org/D159164 | 2 年前 | |
[AArch64] move extension information into tablgen (#90987) Generate TargetParser extension information from tablegen. This includes FMV extension information. FMV only extensions are represented by a separate tablegen class. Use MArchName/ArchKindEnumSpelling to avoid renamings. Cases where there is simply a case difference are handled by consistently uppercasing the AEK_ name in the emitted code. Remove some Extensions which were not needed. These had AEK entries but were never actually used for anything. They are not present in Extensions[] data. | 2 年前 | |
[lldb] XFAIL command-disassemble-mixed.c on Windows Either clang-cl has different assembly output or we're not mapping source to assembly properly on Windows. We (Linaro) will find out which. https://lab.llvm.org/buildbot/#/builders/219/builds/4195 | 3 年前 | |
[lldb] Don't write to source directory in test | 3 年前 | |
[lldb] Fix flakiness in command-disassemble-process.yaml (2/2) I split up the test so we could stop redirecting stderr to stdout but I forgot to include that part in the previous commit. | 4 年前 | |
Refine error msgs from CommandObject & Disassemble Make it clearer for end users why a command cannot be used when a process is not stopped, etc. Differential Revision: https://reviews.llvm.org/D120594 | 4 年前 | |
[lldb][test] Disable image lookup colour test on Mac OS I think it can work there but we need to correct the CHECK lines. command-image-lookup-color.test:34:11: error: CHECK7: expected string not found in input ^ https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/10880/testReport/ I don't have a way to see the full output. | 2 年前 | |
Fix "image lookup --address" Summary results for inline functions. Inline callstacks were being incorrectly displayed in the results of "image lookup --address". The deepest frame wasn't displaying the line table line entry, it was always showing the inline information's call file and line on the previous frame. This is now fixed and has tests to make sure it doesn't regress. Differential Revision: https://reviews.llvm.org/D98761 | 5 年前 | |
[lldb][NFC] Update syntax description for language cplusplus demangle Also added some tests because this is completely untested. rdar://107780577 Differential Revision: https://reviews.llvm.org/D147841 | 3 年前 | |
[lldb] add stop-at-user-entry option to process launch (#67019) ## Description This pull request adds a new stop-at-user-entry option to LLDB process launch command, allowing users to launch a process and pause execution at the entry point of the program (for C-based languages, main function). ## Motivation This option provides a convenient way to begin debugging a program by launching it and breaking at the desired entry point. ## Changes Made - Added stop-at-user-entry option to Options.td and the corresponding case in CommandOptionsProcessLaunch.cpp (short option is 'm') - Implemented GetUserEntryPointName method in the Language plugins available at the moment. - Declared the CreateBreakpointAtUserEntry method in the Target API. - Create Shell test for the command command-process-launch-user-entry.test. ## Usage process launch --stop-at-user-entry or process launch -m launches the process and pauses execution at the entry point of the program. | 2 年前 | |
Re-land "[test] Split LLDB tests into API, Shell & Unit" The original patch got reverted because it broke check-lldb on a clean build. This fixes that. llvm-svn: 374201 | 6 年前 | |
Re-land "[test] Split LLDB tests into API, Shell & Unit" The original patch got reverted because it broke check-lldb on a clean build. This fixes that. llvm-svn: 374201 | 6 年前 | |
Switch the "command script add" interactive input to use the new command form. We're suggesting people use the form of the command that takes an exe_ctx - it is both more convenient and more correct - since you should not be using GetSelected{Target, Process, etc.} in commands. | 3 年前 | |
[lldb/lit] Introduce %clang_host substitutions Summary: This patch addresses an ambiguity in how our existing tests invoke the compiler. Roughly two thirds of our current "shell" tests invoke the compiler to build the executables for the host. However, there is also a significant number of tests which don't build a host binary (because they don't need to run it) and instead they hardcode a certain target. We also have code which adds a bunch of default arguments to the %clang substitutions. However, most of these arguments only really make sense for the host compilation. So far, this has worked mostly ok, because the arguments we were adding were not conflicting with the target-hardcoding tests (though they did provoke an occasional "argument unused" warning). However, this started to break down when we wanted to use target-hardcoding clang-cl tests (D69031) because clang-cl has a substantially different command line, and it was getting very confused by some of the arguments we were adding on non-windows hosts. This patch avoid this problem by creating separate %clang(xx,_cl)_host substutitions, which are specifically meant to be used for compiling host binaries. All funny host-specific options are moved there. To ensure that the regular %clang substitutions are not used for compiling host binaries (skipping the extra arguments) I employ a little hac^H^H^Htrick -- I add an invalid --target argument to the %clang substitution, which means that one has to use an explicit --target in order for the compilation to succeed. Reviewers: JDevlieghere, aprantl, mstorsjo, espindola Subscribers: emaste, arichardson, MaskRay, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69619 | 6 年前 | |
[lldb][test] Replace use of p with expression in Shell tests (NFC) In Shell tests, replace use of the p alias with the expression command. To avoid conflating tests of the alias with tests of the expression command, this patch canonicalizes to the use expression. See also D141539 which made the same change to API tests. Differential Revision: https://reviews.llvm.org/D146230 | 3 年前 | |
[lldb] Reduce chances of spurious failures in some build setups The test may fail when running from a directory that contains the string used in CHECK-NOT. We observe flakiness rate of around 3/100000. Increasing the length helps reducing the rate of failures. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D148099 | 3 年前 | |
Revert "Revert "Add the ability to write target stop-hooks using the ScriptInterpreter."" This reverts commit f775fe59640a2e837ad059a8f40e26989d4f9831. I fixed a return type error in the original patch that was causing a test failure. Also added a REQUIRES: python to the shell test so we'll skip this for people who build lldb w/o Python. Also added another test for the error printing. | 5 年前 | |
[lldb] Second attempt at fixing command-target-create-resolve-exe.test on the buildbot | 4 年前 | |
[lldb] Fix section printing to always align. (#98521) Section IDs are 64 bit and if a section ID was over 4GB, then the tabular output of the "target modules dump sections" command would not align to the column headers. Also if the section type's name was too long, the output wouldn't algin. This patch fixes this issue. Old output looked like: (lldb) image dump sections a.out Sections for '/tmp/a.out' (arm): SectID Type File Address Perm File Off. File Size Flags Section Name ---------- ---------------- --------------------------------------- ---- ---------- ---------- ---------- ---------------------------- 0xffffffffffffffff container [0x0000000000001000-0x0000000000001010) rw- 0x00000074 0x00000010 0x00000000 a.out.PT_LOAD[0] 0x00000001 data [0x0000000000001000-0x0000000000001010) rw- 0x00000074 0x00000010 0x00000003 a.out.PT_LOAD[0]..data 0xfffffffffffffffe container [0x0000000000001000-0x0000000000001010) rw- 0x00000084 0x00000000 0x00000000 a.out.PT_TLS[0] 0x00000002 zero-fill [0x0000000000001000-0x0000000000001010) rw- 0x00000084 0x00000000 0x00000403 a.out.PT_TLS[0]..tbss 0x00000003 regular --- 0x00000084 0x00000001 0x00000000 a.out..strtab 0x00000004 regular --- 0x00000085 0x0000001f 0x00000000 a.out..shstrtab New output looks like: (lldb) image dump sections a.out Sections for '/tmp/a.out' (arm): SectID Type File Address Perm File Off. File Size Flags Section Name ------------------ ---------------------- --------------------------------------- ---- ---------- ---------- ---------- ---------------------------- 0xffffffffffffffff container [0x0000000000001000-0x0000000000001010) rw- 0x00000074 0x00000010 0x00000000 a.out.PT_LOAD[0] 0x0000000000000001 data [0x0000000000001000-0x0000000000001010) rw- 0x00000074 0x00000010 0x00000003 a.out.PT_LOAD[0]..data 0xfffffffffffffffe container [0x0000000000001000-0x0000000000001010) rw- 0x00000084 0x00000000 0x00000000 a.out.PT_TLS[0] 0x0000000000000002 zero-fill [0x0000000000001000-0x0000000000001010) rw- 0x00000084 0x00000000 0x00000403 a.out.PT_TLS[0]..tbss 0x0000000000000003 regular --- 0x00000084 0x00000001 0x00000000 a.out..strtab 0x0000000000000004 regular --- 0x00000085 0x0000001f 0x00000000 a.out..shstrtab | 2 年前 | |
[LLDB] Add missing newline to "image lookup" output When using --name, due to a missing newline, multiple symbol results were not correctly printed: (lldb) image lookup -r -n "As<.*" 2 matches found in <...>/tbi_lisp: Address: tbi_lisp<...> Summary: tbi_lisp<...> at Symbol.cpp:75 Address: tbi_lisp<...> Summary: tbi_lisp<...> at Symbol.cpp:82 It should be: (lldb) image lookup -r -n "As<.*" 2 matches found in /home/david.spickett/tbi_lisp/tbi_lisp: Address: tbi_lisp<...> Summary: tbi_lisp<...> at Symbol.cpp:75 Address: tbi_lisp<...> Summary: tbi_lisp<...> at Symbol.cpp:82 With Address/Summary on separate lines. Reviewed By: clayborg, labath Differential Revision: https://reviews.llvm.org/D143564 | 3 年前 | |
[lldb] Fix thread backtrace --count (#83602) The help output for thread backtrace specifies that you can pass -1 to --count to display all the frames. -c <count> ( --count <count> ) How many frames to display (-1 for all) However, that doesn't work: (lldb) thread backtrace --count -1 error: invalid integer value for option 'c' The problem is that we store the option value as an unsigned and the code to parse the string correctly rejects it. There's two ways to fix this: 1. Make m_count a signed value so that it accepts negative values and appease the parser. The function that prints the frames takes an unsigned so a negative value will just become a really large positive value, which is what the current implementation relies on. 2. Keep m_count unsigned and instead use 0 the magic value to show all frames. I don't really see a point in not showing any frames at all, plus that's already broken (error: error displaying backtrace for thread: "0x0001"). This patch implements (2) and at the same time improve the error reporting so that we print the invalid value when we cannot parse it. rdar://123881767 | 2 年前 | |
[lldb] Make sure we don't drop asynchronous output when sourcing files Summary: If a command from a sourced file produces asynchronous output, this output often does not make its way to the user. This happens because the asynchronous output machinery relies on the iohandler stack to ensure the output does not interfere with the things the iohandler is doing. However, if this happens near the end of the command stream then by the time the asynchronous output is produced we may already have already started tearing down the sourcing session. Specifically, we may already pop the relevant iohandler, leaving the stack empty. This patch makes sure this kind of output gets printed by adding a fallback to IOHandlerStack::PrintAsync to print the output directly if the stack is empty. This is safe because if we have no iohandlers then there is nothing to synchronize. Reviewers: JDevlieghere, clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D75454 | 6 年前 | |
[lldb] Require native for command-thread-siginfo.test command-thread-siginfo.test employs a subject with a call to wait, and thus requires system-linux. However, it's possible to target non-Linux platforms despite operating on Linux hosts. So, have it require native too. Reviewed By: mgorny, labath Differential Revision: https://reviews.llvm.org/D121487 | 4 年前 | |
[lldb/test] Fix command-disassemble-mixed.c Add it to lit.local.cfg so that it's actually run, and change it to (properly) use the %clang_host substitution. | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 3 年前 |