Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [LLDB] Remove lldb-mi | Jonas Devlieghere | 2019-07-18 | 1 | -1883/+0 |
| | | | | | | | | | | | | | | As discussed on the mailing list [1], this patch removes the lldb-mi tool and its tests from the LLDB repository. We moved lldb-mi into a separate repository on GitHub [2] for downstream users or maintainers to build and package. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-July/015103.html [2] https://github.com/lldb-tools/lldb-mi Differential revision: https://reviews.llvm.org/D64255 llvm-svn: 366465 | ||||
* | Fix 'warning: format specifies type 'int' but the argument has type 'MIuint' ↵ | Alexandre Ganea | 2019-05-28 | 1 | -1/+1 |
| | | | | | | (aka 'unsigned long long') [-Wformat]' with Clang 8.0 llvm-svn: 361861 | ||||
* | [NFC] Remove ASCII lines from comments | Jonas Devlieghere | 2019-04-10 | 1 | -38/+0 |
| | | | | | | | | | | | | | | | | | | | | | | | A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135 | ||||
* | Update the file headers across all of the LLVM projects in the monorepo | Chandler Carruth | 2019-01-19 | 1 | -4/+3 |
| | | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | ||||
* | Simplify Boolean expressions | Jonas Devlieghere | 2018-12-15 | 1 | -2/+2 |
| | | | | | | | | | | | This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command: run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD Differential revision: https://reviews.llvm.org/D55584 llvm-svn: 349215 | ||||
* | Remove comments after header includes. | Jonas Devlieghere | 2018-11-11 | 1 | -3/+3 |
| | | | | | | | | | | This patch removes the comments following the header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. Differential revision: https://reviews.llvm.org/D54385 llvm-svn: 346625 | ||||
* | [lldb-mi] Re-implement MI HandleProcessEventStateSuspended. | Alexander Polyakov | 2018-08-07 | 1 | -9/+11 |
| | | | | | | | | | | | | | | Summary: Now this function uses SB API instead of HandleCommand. Reviewers: aprantl, clayborg, labath Reviewed By: aprantl Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D49632 llvm-svn: 339160 | ||||
* | Replace an accidentally added "break" with an LLVM_FALLTHROUGH. | Adrian Prantl | 2017-12-19 | 1 | -1/+1 |
| | | | | | | Thanks to Greg Clayton for catchting this! llvm-svn: 321123 | ||||
* | Fix a couple of warnings (NFC) | Adrian Prantl | 2017-12-19 | 1 | -0/+2 |
| | | | | llvm-svn: 321120 | ||||
* | Remove default case from switch. | Ted Woodward | 2017-10-11 | 1 | -2/+4 |
| | | | | | | Add case to handle new event lldb::eBreakpointEventTypeAutoContinueChanged. llvm-svn: 315496 | ||||
* | [lldb-mi] Fix a thinko in my previous commit. | Davide Italiano | 2017-09-30 | 1 | -1/+1 |
| | | | | | | Hopefully this should unbreak the Android buildbot. llvm-svn: 314606 | ||||
* | [lldb-mi] Add a default case to placate GCC with -Werror. | Davide Italiano | 2017-09-30 | 1 | -0/+2 |
| | | | | llvm-svn: 314604 | ||||
* | iwyu fixes on lldbUtility. | Zachary Turner | 2017-04-06 | 1 | -0/+2 |
| | | | | | | | | | | | | | This patch makes adjustments to header file includes in lldbUtility based on recommendations by the iwyu tool (include-what-you-use). The goal here is to make sure that all files include the exact set of headers which are needed for that file only, to eliminate cases of dead includes (e.g. someone deleted some code but forgot to delete the header includes that that code necessitated), and to eliminate the case where header includes are picked up transitively. llvm-svn: 299676 | ||||
* | *** This commit represents a complete reformatting of the LLDB source code | Kate Stone | 2016-09-06 | 1 | -1415/+1491 |
| | | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751 | ||||
* | Add StructuredData plugin type; showcase with new DarwinLog feature | Todd Fiala | 2016-08-19 | 1 | -0/+3 |
| | | | | | | | | | | | | Take 2, with missing cmake line fixed. Build tested on Ubuntu 14.04 with clang-3.6. See docs/structured_data/StructuredDataPlugins.md for details. differential review: https://reviews.llvm.org/D22976 reviewers: clayborg, jingham llvm-svn: 279202 | ||||
* | Revert "Add StructuredData plugin type; showcase with new DarwinLog feature" | Todd Fiala | 2016-08-19 | 1 | -3/+0 |
| | | | | | | This reverts commit 1d885845d1451e7b232f53fba2e36be67aadabd8. llvm-svn: 279200 | ||||
* | Add StructuredData plugin type; showcase with new DarwinLog feature | Todd Fiala | 2016-08-19 | 1 | -0/+3 |
| | | | | | | | | | See docs/structured_data/StructuredDataPlugins.md for details. differential review: https://reviews.llvm.org/D22976 reviewers: clayborg, jingham llvm-svn: 279198 | ||||
* | Added a break statement that was needed. Caught by clang's unannotated case ↵ | Greg Clayton | 2016-03-18 | 1 | -1/+2 |
| | | | | | | fall through warning. llvm-svn: 263830 | ||||
* | Allow to construct CMIUtilString using std::string directly + cleanup ↵ | Ilia K | 2015-09-25 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMIUtilString (MI) Summary: Allow to construct CMIUtilString using std::string directly + cleanup CMIUtilString (MI) This patch cleans up lldb-mi code, and serves to simplify the following case: ``` std::string strGoodbye = "!Hello"; CMIUtilString strHello(strGoodbye.substr(1).c_str()); ``` With CMIUtilString(std::string) we can omit .c_str(): ``` std::string strGoodbye = "!Hello"; CMIUtilString strHello(strGoodbye.substr(1)); ``` Also, it removes 2 ctors because they aren't needed: # CMIUtilString::CMIUtilString(const char *const *vpData) # CMIUtilString::CMIUtilString(const char *vpData, size_t nLen) and cleans up CMIUtilString::operator=(const std::string &vrRhs). Reviewers: brucem, abidh Subscribers: lldb-commits, brucem, abidh Differential Revision: http://reviews.llvm.org/D13158 llvm-svn: 248566 | ||||
* | [lldb-mi] Add (gdb) prompt after =breakpoint-modified and =breakpoint-created. | Dawn Perchik | 2015-08-19 | 1 | -1/+4 |
| | | | | | | | | Reviewed by: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12113 llvm-svn: 245488 | ||||
* | Add size field to library load event (MI) | Ilia K | 2015-08-11 | 1 | -5/+12 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: (This revision supersedes the abandon: http://reviews.llvm.org/D9716) Size field is used to let the debugger attribute an address to a specific library when symbols are not available. For example: OpenGLESApp4.app!Cube_draw() Line 74 C OpenGLESApp4.app!-[GameViewController glkView:drawInRect:](GameViewController * self, SEL _cmd, GLKView * view, CGRect rect) Line 89 C++ GLKit!<redacted> QuartzCore!<redacted> QuartzCore!<redacted> QuartzCore!<redacted> QuartzCore!<redacted> QuartzCore!<redacted> UIKit!<redacted> UIKit!<redacted> UIKit!<redacted> UIKit!<redacted> FrontBoardServices!<redacted> CoreFoundation!<redacted> Patch from paulmay@microsoft.com Reviewers: ChuckR, abidh, ki.stfu Subscribers: greggm, lldb-commits Differential Revision: http://reviews.llvm.org/D11574 llvm-svn: 244573 | ||||
* | [lldb-mi] Use empty arg lists instead of (void). | Bruce Mitchener | 2015-08-04 | 1 | -13/+13 |
| | | | | | | | | | | | | Summary: This brings the code more in line with the usual LLDB style. NFC. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11746 llvm-svn: 243967 | ||||
* | [lldb-mi] Remove unused bool results. | Bruce Mitchener | 2015-07-22 | 1 | -66/+59 |
| | | | | | | | | | | | | | | | Summary: Many methods, in particular various 'Add' methods didn't have any actual failure scenarios that were being emitted. This meant that a lot of surrounding code could be simplified. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11412 llvm-svn: 242911 | ||||
* | [lldb-mi] Correct file names in first line comments. | Bruce Mitchener | 2015-07-21 | 1 | -1/+1 |
| | | | | llvm-svn: 242781 | ||||
* | [lldb-mi] Fix typos | Bruce Mitchener | 2015-07-07 | 1 | -3/+3 |
| | | | | llvm-svn: 241585 | ||||
* | Remove typedefs for MIchar, MIschar, MIuchar. | Bruce Mitchener | 2015-07-03 | 1 | -9/+9 |
| | | | | | | | | | | | | | | | | Summary: This is a start on bringing lldb-mi more in line with the typical LLDB coding style. This just removes the usage of the typedefs and doesn't yet clean up any logic or other issues. (This is to keep the review simple.) Reviewers: abidh, ki.stfu, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10917 llvm-svn: 241349 | ||||
* | Don't print =breakpoint-created if BP info was emitted in the result record (MI) | Ilia K | 2015-05-19 | 1 | -6/+17 |
| | | | | llvm-svn: 237676 | ||||
* | Fix a reason of *stopped notifications due to SIGINT/SIGSTOP signals (MI) | Ilia K | 2015-05-15 | 1 | -29/+64 |
| | | | | | | | | | | | | | # Add SBProcess::GetInterruptedFromEvent # Add vrEvent arg in CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateStopped and CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal # Refactor CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal ## Clean up and fix typos ## Remove vwrbShouldBrk arg # Fix MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_{local,remote} to expect SIGSTOP instead of SIGINT llvm-svn: 237426 | ||||
* | Refactor lldb-mi's prompt | Ilia K | 2015-05-13 | 1 | -10/+10 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes/cleans code around of (gdb) prompt: # Add CMICmnStreamStdout::WritePrompt # Clean up CMICmnStreamStdout::TextToStdout (don't lock the m_mutex twice because it will be locked in CMICmnStreamStdout::WritePriv) # Remove unused CMICmnStreamStdin::m_bShowPrompt field # Refactor CMICmnLLDBDebuggerHandleEvents to use CMICmnStreamStdout::WritePrompt instead of TextToStdout("(gdb)") # Refactor CMIDriver to use CMICmnStreamStdout::WritePrompt instead of ``` if (bOk && m_rStdin.GetEnablePrompt()) bOk = m_rStdOut.WriteMIResponse(m_rStdin.GetPrompt()); ``` Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh Reviewed By: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D9737 llvm-svn: 237248 | ||||
* | Fix =breakpoint-created event after creation of BP (MI) | Ilia K | 2015-05-08 | 1 | -17/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | For example: was: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",times="0",original-location="main"} (gdb) =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",times="0",original-location="main"} ``` now: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",times="0",original-location="main"} (gdb) =breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",times="0",original-location="main"} ``` llvm-svn: 236837 | ||||
* | Print process's output line by line (MI) | Ilia K | 2015-05-08 | 1 | -18/+55 |
| | | | | | | | | | | | | | | | | | | | | | For example: was: ``` @"'\r\n` - it's \\ni=1\r\nj=2\r\nx=3\r\ny=4\r\nargc: /Users/IliaK/p/hello\r\nargc: (null)\r\n" ``` now: ``` @"'\r\n" @"` - it's \\ni=1\r\n" @"j=2\r\n" @"x=3\r\n" @"y=4\r\n" @"argc: /Users/IliaK/p/hello\r\n" @"argc: (null)\r\n" ``` llvm-svn: 236824 | ||||
* | Rework =shlibs-added/=shlibs-removed | Ilia K | 2015-04-30 | 1 | -67/+71 |
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch includes the following: * Rename =shlibs-added/=shlibs-removed to standard =library-loaded/=library-unloaded * Remove redundant fields * Add extra symbols-loaded/symbols-path and loaded_addr fields * Rename CMICmnMIOutOfBandRecord::eOutOfBand_TargetModulesLoaded/eOutOfBand_TargetModulesUnloaded to CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded/eOutOfBand_TargetModuleUnloaded Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: jasonmolenda, jingham, abidh Reviewed By: abidh Subscribers: lldb-commits, jingham, jasonmolenda, abidh Differential Revision: http://reviews.llvm.org/D9280 llvm-svn: 236225 | ||||
* | Clean CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateSuspended (MI) | Ilia K | 2015-04-25 | 1 | -6/+4 |
| | | | | | | | Don't call the lldb::SBProcess::GetRestartedFromEvent twice while handling the CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateSuspended. llvm-svn: 235812 | ||||
* | Fix CMICmnLLDBDebuggerHandleEvents::GetProcessStdout/GetProcessStderr to use ↵ | Ilia K | 2015-04-24 | 1 | -4/+6 |
| | | | | | | stream-record (MI) llvm-svn: 235711 | ||||
* | Generate an event when a pending breakpoint binds | Ilia K | 2015-04-09 | 1 | -0/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This checkin sends an MI event when a module is loaded that causes a pending breakpoint to bind to it's real address in the target. This allows breakpoints to be set before the process is launched, and the target address of the BP to be discovered when the module loads, prior to the breakpoint being hit. Patch from chuckr@microsoft.com Test Plan: I ran the check-lldb target with and without this patch and saw no change. I am unsure of how to write an MI specific test for this because the new event is buried in module load events. Here is an example (the new event is in bold): ``` (gdb) -file-exec-and-symbols a.out ^done (gdb) =shlibs-added,shlib-info=[num="1",name="a.out",dyld-addr="-",reason="dyld",path="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out",loaded_addr="-",dsym-objpath="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out.dSYM/Contents/Resources/DWARF/a.out"] -break-insert -f main.cpp:15 ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="main",file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15",pending=["main.cpp:15"],times="0",original-location="main.cpp:15"} (gdb) =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="main",file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15",pending=["main.cpp:15"],times="0",original-location="main.cpp:15"} -exec-run ^running =thread-group-started,id="i1",pid="75620" (gdb) =thread-created,id="1",group-id="i1" =thread-selected,id="1" (gdb) =shlibs-added,shlib-info=[num="2",name="dyld",dyld-addr="0x7fff5fc00000",reason="dyld",path="/usr/lib/dyld",loaded_addr="0x7fff5fc00000"] (gdb) =shlibs-added,shlib-info=[num="3",name="dyld",dyld-addr="0x7fff5fc00000",reason="dyld",path="/usr/lib/dyld",loaded_addr="0x7fff5fc00000"] (gdb) *running,thread-id="all" (gdb) (gdb) =shlibs-added,shlib-info=[num="4",name="libc++.1.dylib",dyld-addr="0x7fff85dd0000",reason="dyld",path="/usr/lib/libc++.1.dylib",loaded_addr="0x7fff85dd0000"] (gdb) =shlibs-added,shlib-info=[num="5",name="libSystem.B.dylib",dyld-addr="0x7fff851ab000",reason="dyld",path="/usr/lib/libSystem.B.dylib",loaded_addr="0x7fff851ab000"] (gdb) =shlibs-added,shlib-info=[num="6",name="libc++abi.dylib",dyld-addr="0x7fff81be8000",reason="dyld",path="/usr/lib/libc++abi.dylib",loaded_addr="0x7fff81be8000"] (gdb) =shlibs-added,shlib-info=[num="7",name="libcache.dylib",dyld-addr="0x7fff8b975000",reason="dyld",path="/usr/lib/system/libcache.dylib",loaded_addr="0x7fff8b975000"] (gdb) =shlibs-added,shlib-info=[num="8",name="libcommonCrypto.dylib",dyld-addr="0x7fff85d14000",reason="dyld",path="/usr/lib/system/libcommonCrypto.dylib",loaded_addr="0x7fff85d14000"] (gdb) =shlibs-added,shlib-info=[num="9",name="libcompiler_rt.dylib",dyld-addr="0x7fff86154000",reason="dyld",path="/usr/lib/system/libcompiler_rt.dylib",loaded_addr="0x7fff86154000"] (gdb) =shlibs-added,shlib-info=[num="10",name="libcopyfile.dylib",dyld-addr="0x7fff81ac7000",reason="dyld",path="/usr/lib/system/libcopyfile.dylib",loaded_addr="0x7fff81ac7000"] (gdb) =shlibs-added,shlib-info=[num="11",name="libcorecrypto.dylib",dyld-addr="0x7fff87d5d000",reason="dyld",path="/usr/lib/system/libcorecrypto.dylib",loaded_addr="0x7fff87d5d000"] (gdb) =shlibs-added,shlib-info=[num="12",name="libdispatch.dylib",dyld-addr="0x7fff8ea8c000",reason="dyld",path="/usr/lib/system/libdispatch.dylib",loaded_addr="0x7fff8ea8c000"] (gdb) =shlibs-added,shlib-info=[num="13",name="libdyld.dylib",dyld-addr="0x7fff89087000",reason="dyld",path="/usr/lib/system/libdyld.dylib",loaded_addr="0x7fff89087000"] (gdb) =shlibs-added,shlib-info=[num="14",name="libkeymgr.dylib",dyld-addr="0x7fff8e818000",reason="dyld",path="/usr/lib/system/libkeymgr.dylib",loaded_addr="0x7fff8e818000"] (gdb) =shlibs-added,shlib-info=[num="15",name="liblaunch.dylib",dyld-addr="0x7fff84936000",reason="dyld",path="/usr/lib/system/liblaunch.dylib",loaded_addr="0x7fff84936000"] (gdb) =shlibs-added,shlib-info=[num="16",name="libmacho.dylib",dyld-addr="0x7fff8534e000",reason="dyld",path="/usr/lib/system/libmacho.dylib",loaded_addr="0x7fff8534e000"] (gdb) =shlibs-added,shlib-info=[num="17",name="libquarantine.dylib",dyld-addr="0x7fff90f97000",reason="dyld",path="/usr/lib/system/libquarantine.dylib",loaded_addr="0x7fff90f97000"] (gdb) =shlibs-added,shlib-info=[num="18",name="libremovefile.dylib",dyld-addr="0x7fff8ccb5000",reason="dyld",path="/usr/lib/system/libremovefile.dylib",loaded_addr="0x7fff8ccb5000"] (gdb) =shlibs-added,shlib-info=[num="19",name="libsystem_asl.dylib",dyld-addr="0x7fff8df67000",reason="dyld",path="/usr/lib/system/libsystem_asl.dylib",loaded_addr="0x7fff8df67000"] (gdb) =shlibs-added,shlib-info=[num="20",name="libsystem_blocks.dylib",dyld-addr="0x7fff8621c000",reason="dyld",path="/usr/lib/system/libsystem_blocks.dylib",loaded_addr="0x7fff8621c000"] (gdb) =shlibs-added,shlib-info=[num="21",name="libsystem_c.dylib",dyld-addr="0x7fff83c0f000",reason="dyld",path="/usr/lib/system/libsystem_c.dylib",loaded_addr="0x7fff83c0f000"] (gdb) =shlibs-added,shlib-info=[num="22",name="libsystem_configuration.dylib",dyld-addr="0x7fff8fd71000",reason="dyld",path="/usr/lib/system/libsystem_configuration.dylib",loaded_addr="0x7fff8fd71000"] (gdb) =shlibs-added,shlib-info=[num="23",name="libsystem_coreservices.dylib",dyld-addr="0x7fff8a028000",reason="dyld",path="/usr/lib/system/libsystem_coreservices.dylib",loaded_addr="0x7fff8a028000"] (gdb) =shlibs-added,shlib-info=[num="24",name="libsystem_coretls.dylib",dyld-addr="0x7fff90996000",reason="dyld",path="/usr/lib/system/libsystem_coretls.dylib",loaded_addr="0x7fff90996000"] (gdb) =shlibs-added,shlib-info=[num="25",name="libsystem_dnssd.dylib",dyld-addr="0x7fff8b71f000",reason="dyld",path="/usr/lib/system/libsystem_dnssd.dylib",loaded_addr="0x7fff8b71f000"] (gdb) =shlibs-added,shlib-info=[num="26",name="libsystem_info.dylib",dyld-addr="0x7fff8b9f2000",reason="dyld",path="/usr/lib/system/libsystem_info.dylib",loaded_addr="0x7fff8b9f2000"] (gdb) =shlibs-added,shlib-info=[num="27",name="libsystem_kernel.dylib",dyld-addr="0x7fff81ad0000",reason="dyld",path="/usr/lib/system/libsystem_kernel.dylib",loaded_addr="0x7fff81ad0000"] (gdb) =shlibs-added,shlib-info=[num="28",name="libsystem_m.dylib",dyld-addr="0x7fff84953000",reason="dyld",path="/usr/lib/system/libsystem_m.dylib",loaded_addr="0x7fff84953000"] (gdb) =shlibs-added,shlib-info=[num="29",name="libsystem_malloc.dylib",dyld-addr="0x7fff887bd000",reason="dyld",path="/usr/lib/system/libsystem_malloc.dylib",loaded_addr="0x7fff887bd000"] (gdb) =shlibs-added,shlib-info=[num="30",name="libsystem_network.dylib",dyld-addr="0x7fff88304000",reason="dyld",path="/usr/lib/system/libsystem_network.dylib",loaded_addr="0x7fff88304000"] (gdb) =shlibs-added,shlib-info=[num="31",name="libsystem_networkextension.dylib",dyld-addr="0x7fff82085000",reason="dyld",path="/usr/lib/system/libsystem_networkextension.dylib",loaded_addr="0x7fff82085000"] (gdb) =shlibs-added,shlib-info=[num="32",name="libsystem_notify.dylib",dyld-addr="0x7fff8eb69000",reason="dyld",path="/usr/lib/system/libsystem_notify.dylib",loaded_addr="0x7fff8eb69000"] (gdb) =shlibs-added,shlib-info=[num="33",name="libsystem_platform.dylib",dyld-addr="0x7fff89ac7000",reason="dyld",path="/usr/lib/system/libsystem_platform.dylib",loaded_addr="0x7fff89ac7000"] (gdb) =shlibs-added,shlib-info=[num="34",name="libsystem_pthread.dylib",dyld-addr="0x7fff83ff8000",reason="dyld",path="/usr/lib/system/libsystem_pthread.dylib",loaded_addr="0x7fff83ff8000"] (gdb) =shlibs-added,shlib-info=[num="35",name="libsystem_sandbox.dylib",dyld-addr="0x7fff89084000",reason="dyld",path="/usr/lib/system/libsystem_sandbox.dylib",loaded_addr="0x7fff89084000"] (gdb) =shlibs-added,shlib-info=[num="36",name="libsystem_secinit.dylib",dyld-addr="0x7fff8e816000",reason="dyld",path="/usr/lib/system/libsystem_secinit.dylib",loaded_addr="0x7fff8e816000"] (gdb) =shlibs-added,shlib-info=[num="37",name="libsystem_stats.dylib",dyld-addr="0x7fff89eaf000",reason="dyld",path="/usr/lib/system/libsystem_stats.dylib",loaded_addr="0x7fff89eaf000"] (gdb) =shlibs-added,shlib-info=[num="38",name="libsystem_trace.dylib",dyld-addr="0x7fff8ead4000",reason="dyld",path="/usr/lib/system/libsystem_trace.dylib",loaded_addr="0x7fff8ead4000"] (gdb) =shlibs-added,shlib-info=[num="39",name="libunc.dylib",dyld-addr="0x7fff8ab27000",reason="dyld",path="/usr/lib/system/libunc.dylib",loaded_addr="0x7fff8ab27000"] (gdb) =shlibs-added,shlib-info=[num="40",name="libunwind.dylib",dyld-addr="0x7fff85cf3000",reason="dyld",path="/usr/lib/system/libunwind.dylib",loaded_addr="0x7fff85cf3000"] (gdb) =shlibs-added,shlib-info=[num="41",name="libxpc.dylib",dyld-addr="0x7fff88896000",reason="dyld",path="/usr/lib/system/libxpc.dylib",loaded_addr="0x7fff88896000"] (gdb) =shlibs-added,shlib-info=[num="42",name="libobjc.A.dylib",dyld-addr="0x7fff84f13000",reason="dyld",path="/usr/lib/libobjc.A.dylib",loaded_addr="0x7fff84f13000"] (gdb) =shlibs-added,shlib-info=[num="43",name="libauto.dylib",dyld-addr="0x7fff85d89000",reason="dyld",path="/usr/lib/libauto.dylib",loaded_addr="0x7fff85d89000"] (gdb) =shlibs-added,shlib-info=[num="44",name="libDiagnosticMessagesClient.dylib",dyld-addr="0x7fff822e1000",reason="dyld",path="/usr/lib/libDiagnosticMessagesClient.dylib",loaded_addr="0x7fff822e1000"] ``` =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000f4d",func="main",file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15",pending=["main.cpp:15"],times="0",original-location="main.cpp:15"} ``` (gdb) =shlibs-added,shlib-info=[num="45",name="a.out",dyld-addr="0x100000000",reason="dyld",path="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out",loaded_addr="0x100000000",dsym-objpath="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out.dSYM/Contents/Resources/DWARF/a.out"] =shlibs-added,shlib-info=[num="46",name="libc++.1.dylib",dyld-addr="0x7fff85dd0000",reason="dyld",path="/usr/lib/libc++.1.dylib",loaded_addr="0x7fff85dd0000"] =shlibs-added,shlib-info=[num="47",name="libSystem.B.dylib",dyld-addr="0x7fff851ab000",reason="dyld",path="/usr/lib/libSystem.B.dylib",loaded_addr="0x7fff851ab000"] =shlibs-added,shlib-info=[num="48",name="libc++abi.dylib",dyld-addr="0x7fff81be8000",reason="dyld",path="/usr/lib/libc++abi.dylib",loaded_addr="0x7fff81be8000"] =shlibs-added,shlib-info=[num="49",name="libcache.dylib",dyld-addr="0x7fff8b975000",reason="dyld",path="/usr/lib/system/libcache.dylib",loaded_addr="0x7fff8b975000"] =shlibs-added,shlib-info=[num="50",name="libcommonCrypto.dylib",dyld-addr="0x7fff85d14000",reason="dyld",path="/usr/lib/system/libcommonCrypto.dylib",loaded_addr="0x7fff85d14000"] =shlibs-added,shlib-info=[num="51",name="libcompiler_rt.dylib",dyld-addr="0x7fff86154000",reason="dyld",path="/usr/lib/system/libcompiler_rt.dylib",loaded_addr="0x7fff86154000"] =shlibs-added,shlib-info=[num="52",name="libcopyfile.dylib",dyld-addr="0x7fff81ac7000",reason="dyld",path="/usr/lib/system/libcopyfile.dylib",loaded_addr="0x7fff81ac7000"] =shlibs-added,shlib-info=[num="53",name="libcorecrypto.dylib",dyld-addr="0x7fff87d5d000",reason="dyld",path="/usr/lib/system/libcorecrypto.dylib",loaded_addr="0x7fff87d5d000"] =shlibs-added,shlib-info=[num="54",name="libdispatch.dylib",dyld-addr="0x7fff8ea8c000",reason="dyld",path="/usr/lib/system/libdispatch.dylib",loaded_addr="0x7fff8ea8c000"] =shlibs-added,shlib-info=[num="55",name="libdyld.dylib",dyld-addr="0x7fff89087000",reason="dyld",path="/usr/lib/system/libdyld.dylib",loaded_addr="0x7fff89087000"] =shlibs-added,shlib-info=[num="56",name="libkeymgr.dylib",dyld-addr="0x7fff8e818000",reason="dyld",path="/usr/lib/system/libkeymgr.dylib",loaded_addr="0x7fff8e818000"] =shlibs-added,shlib-info=[num="57",name="liblaunch.dylib",dyld-addr="0x7fff84936000",reason="dyld",path="/usr/lib/system/liblaunch.dylib",loaded_addr="0x7fff84936000"] =shlibs-added,shlib-info=[num="58",name="libmacho.dylib",dyld-addr="0x7fff8534e000",reason="dyld",path="/usr/lib/system/libmacho.dylib",loaded_addr="0x7fff8534e000"] =shlibs-added,shlib-info=[num="59",name="libquarantine.dylib",dyld-addr="0x7fff90f97000",reason="dyld",path="/usr/lib/system/libquarantine.dylib",loaded_addr="0x7fff90f97000"] =shlibs-added,shlib-info=[num="60",name="libremovefile.dylib",dyld-addr="0x7fff8ccb5000",reason="dyld",path="/usr/lib/system/libremovefile.dylib",loaded_addr="0x7fff8ccb5000"] =shlibs-added,shlib-info=[num="61",name="libsystem_asl.dylib",dyld-addr="0x7fff8df67000",reason="dyld",path="/usr/lib/system/libsystem_asl.dylib",loaded_addr="0x7fff8df67000"] =shlibs-added,shlib-info=[num="62",name="libsystem_blocks.dylib",dyld-addr="0x7fff8621c000",reason="dyld",path="/usr/lib/system/libsystem_blocks.dylib",loaded_addr="0x7fff8621c000"] =shlibs-added,shlib-info=[num="63",name="libsystem_c.dylib",dyld-addr="0x7fff83c0f000",reason="dyld",path="/usr/lib/system/libsystem_c.dylib",loaded_addr="0x7fff83c0f000"] =shlibs-added,shlib-info=[num="64",name="libsystem_configuration.dylib",dyld-addr="0x7fff8fd71000",reason="dyld",path="/usr/lib/system/libsystem_configuration.dylib",loaded_addr="0x7fff8fd71000"] =shlibs-added,shlib-info=[num="65",name="libsystem_coreservices.dylib",dyld-addr="0x7fff8a028000",reason="dyld",path="/usr/lib/system/libsystem_coreservices.dylib",loaded_addr="0x7fff8a028000"] =shlibs-added,shlib-info=[num="66",name="libsystem_coretls.dylib",dyld-addr="0x7fff90996000",reason="dyld",path="/usr/lib/system/libsystem_coretls.dylib",loaded_addr="0x7fff90996000"] =shlibs-added,shlib-info=[num="67",name="libsystem_dnssd.dylib",dyld-addr="0x7fff8b71f000",reason="dyld",path="/usr/lib/system/libsystem_dnssd.dylib",loaded_addr="0x7fff8b71f000"] =shlibs-added,shlib-info=[num="68",name="libsystem_info.dylib",dyld-addr="0x7fff8b9f2000",reason="dyld",path="/usr/lib/system/libsystem_info.dylib",loaded_addr="0x7fff8b9f2000"] =shlibs-added,shlib-info=[num="69",name="libsystem_kernel.dylib",dyld-addr="0x7fff81ad0000",reason="dyld",path="/usr/lib/system/libsystem_kernel.dylib",loaded_addr="0x7fff81ad0000"] =shlibs-added,shlib-info=[num="70",name="libsystem_m.dylib",dyld-addr="0x7fff84953000",reason="dyld",path="/usr/lib/system/libsystem_m.dylib",loaded_addr="0x7fff84953000"] =shlibs-added,shlib-info=[num="71",name="libsystem_malloc.dylib",dyld-addr="0x7fff887bd000",reason="dyld",path="/usr/lib/system/libsystem_malloc.dylib",loaded_addr="0x7fff887bd000"] =shlibs-added,shlib-info=[num="72",name="libsystem_network.dylib",dyld-addr="0x7fff88304000",reason="dyld",path="/usr/lib/system/libsystem_network.dylib",loaded_addr="0x7fff88304000"] =shlibs-added,shlib-info=[num="73",name="libsystem_networkextension.dylib",dyld-addr="0x7fff82085000",reason="dyld",path="/usr/lib/system/libsystem_networkextension.dylib",loaded_addr="0x7fff82085000"] =shlibs-added,shlib-info=[num="74",name="libsystem_notify.dylib",dyld-addr="0x7fff8eb69000",reason="dyld",path="/usr/lib/system/libsystem_notify.dylib",loaded_addr="0x7fff8eb69000"] =shlibs-added,shlib-info=[num="75",name="libsystem_platform.dylib",dyld-addr="0x7fff89ac7000",reason="dyld",path="/usr/lib/system/libsystem_platform.dylib",loaded_addr="0x7fff89ac7000"] =shlibs-added,shlib-info=[num="76",name="libsystem_pthread.dylib",dyld-addr="0x7fff83ff8000",reason="dyld",path="/usr/lib/system/libsystem_pthread.dylib",loaded_addr="0x7fff83ff8000"] =shlibs-added,shlib-info=[num="77",name="libsystem_sandbox.dylib",dyld-addr="0x7fff89084000",reason="dyld",path="/usr/lib/system/libsystem_sandbox.dylib",loaded_addr="0x7fff89084000"] =shlibs-added,shlib-info=[num="78",name="libsystem_secinit.dylib",dyld-addr="0x7fff8e816000",reason="dyld",path="/usr/lib/system/libsystem_secinit.dylib",loaded_addr="0x7fff8e816000"] =shlibs-added,shlib-info=[num="79",name="libsystem_stats.dylib",dyld-addr="0x7fff89eaf000",reason="dyld",path="/usr/lib/system/libsystem_stats.dylib",loaded_addr="0x7fff89eaf000"] =shlibs-added,shlib-info=[num="80",name="libsystem_trace.dylib",dyld-addr="0x7fff8ead4000",reason="dyld",path="/usr/lib/system/libsystem_trace.dylib",loaded_addr="0x7fff8ead4000"] =shlibs-added,shlib-info=[num="81",name="libunc.dylib",dyld-addr="0x7fff8ab27000",reason="dyld",path="/usr/lib/system/libunc.dylib",loaded_addr="0x7fff8ab27000"] =shlibs-added,shlib-info=[num="82",name="libunwind.dylib",dyld-addr="0x7fff85cf3000",reason="dyld",path="/usr/lib/system/libunwind.dylib",loaded_addr="0x7fff85cf3000"] =shlibs-added,shlib-info=[num="83",name="libxpc.dylib",dyld-addr="0x7fff88896000",reason="dyld",path="/usr/lib/system/libxpc.dylib",loaded_addr="0x7fff88896000"] =shlibs-added,shlib-info=[num="84",name="libobjc.A.dylib",dyld-addr="0x7fff84f13000",reason="dyld",path="/usr/lib/libobjc.A.dylib",loaded_addr="0x7fff84f13000"] =shlibs-added,shlib-info=[num="85",name="libauto.dylib",dyld-addr="0x7fff85d89000",reason="dyld",path="/usr/lib/libauto.dylib",loaded_addr="0x7fff85d89000"] =shlibs-added,shlib-info=[num="86",name="libDiagnosticMessagesClient.dylib",dyld-addr="0x7fff822e1000",reason="dyld",path="/usr/lib/libDiagnosticMessagesClient.dylib",loaded_addr="0x7fff822e1000"] (gdb) *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x0000000100000f4d",func="main",args=[{name="argc",value="1"},{name="argv",value="0x00007fff5fbffed8"}],file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15"},thread-id="1",stopped-threads="all" (gdb) ``` Reviewers: abidh, clayborg, ChuckR, jingham Subscribers: ki.stfu, paulmaybee, lldb-commits Differential Revision: http://reviews.llvm.org/D8847 llvm-svn: 234483 | ||||
* | Refactor ↵ | Ilia K | 2015-04-09 | 1 | -36/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMICmnLLDBDebuggerHandleEvents/CMICmnLLDBDebugSessionInfo/CMICmnLLDBDebugSessionInfoVarObj (MI) Summary: This patch includes the following changes: # Refactor GetVariableInfo/GetValueStringFormatted/GetValue to use the same code (MI) Also it expands the variable value format for strings (aka char*): was: ``` ^done,name="v4",numchild="1",value="0x0000000100000f56",type="const char *",thread-id="1",has_more="0" ``` now: ``` ^done,name="v4",numchild="1",value="0x0000000100000f56 \"ab\"",type="const char *",thread-id="1",has_more="0" ``` # Expand the variable value format for arrays (according to GDB) For example: was: ``` ^done,name="v3",numchild="2",value="{...}",type="char [2]",thread-id="1",has_more="0" ``` now: ``` ^done,name="v3",numchild="2",value="[2]",type="char [2]",thread-id="1",has_more="0" ``` # Rename MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry_default to test_lldbmi_gdb_show_process_stopatentry (MI) # Fix a comment in MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry (MI) # Refactor CMICmnLLDBUtilSBValue ## Add CMICmnLLDBUtilSBValue::IsPointerType/IsArrayType ## Refactor CMICmnLLDBUtilSBValue::GetValue ## Fix CMICmnLLDBUtilSBValue::IsChildCharType to ignore a number of childs ## Rename CMICmnLLDBUtilSBValue::IsChildCharType to IsFirstChildCharType ## Fix CMICmnLLDBUtilSBValue::GetValueCString to accept char[] # Minor changes in CMICmnLLDBUtilSBValue::GetValue # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo family functions (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo2 ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept args # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Add vArgInfo arg to CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo ## Move CMICmnLLDBDebugSessionInfo::GetFrameInfo/MIResponseFormFrameInfo to private namespace # Refactor CMICmnLLDBDebugSessionInfo::GetThreadFrames family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::GetThreadFrames2 ## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept vnMaxDepth # Fix vnMaxDepth arg name in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Merge CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo functions into one # Don't modify fnName in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo3 ## Improve -CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept vnMaxDepth # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo2 ## Add CMICmnLLDBDebugSessionInfo::ThreadInfoFormat_e enum to specify thread format ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept veThreadInfoFormat ## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo (not needed because veThreadInfoFormat was added) # Move CMICmnLLDBDebugSessionInfo::GetThreadFrames to private namespace (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (MI) ## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e enum to specify frame format ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept veFrameInfoFormat ## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (not needed because veFrameInfoFormat was added) # Remove duplicated level field in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) # Refactor CMICmnLLDBUtilSBValue::GetValue (MI) ## Add CMICmnLLDBUtilSBValue::GetSimpleValue ## Use CMICmnLLDBUtilSBValue::GetSimpleValue in GetVlaue # Fix CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) ## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e::eFrameInfoFormat_AllArgumentsInSimpleForm which is used to get stack-args in simple form (i.e. show {...} for composite types). It can be done by calling MIResponseFormVariableInfo with vnMaxDepth=0. ## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept veFrameInfoFormat ## Remove vnMaxDepth from CMICmnLLDBDebugSessionInfo::GetThreadFrames (we should use veFrameInfoFormat instead) # Refactor CMICmnLLDBUtilSBValue::GetValue to expand composite types (MI) ## Add CMICmnLLDBUtilSBValue::GetCompositeValue to expand composite types ## Add CMICmnLLDBUtilSBValue::m_pComposite to avoid multiple {...} in the code ## Improve CMICmnLLDBUtilSBValue::GetValue to accept vbExpandAggregates option (default=false) ## Clean up CMICmnLLDBDebugSessionInfo::GetVariableInfo to use CMICmnLLDBUtilSBValue::GetValue ## Remove the wrapping into {} in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo ## Fix MiStackTestCase.test_lldbmi_stack_list_locals test to expect result without superfluous space ' ' around the '{' or '}' brackets: was: ``` {name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = { var_d = 30 }} ``` now: ``` {name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = {var_d = 30}} ``` ## Fix vwrValue arg name in CMICmnLLDBUtilSBValue::GetSimpleValue (was vrValue) # Refactor CMICmnLLDBDebugSessionInfo::GetVariableInfo (MI) ## Remove vnMaxDepth/vbIsChildValue/vnDepth args in CMICmnLLDBDebugSessionInfo::GetVariableInfo ## Improve CMICmnLLDBDebugSessionInfo::GetVariableInfo to accept vwrStrValue ## Remove vwrMiValueList arg in CMICmnLLDBDebugSessionInfo::GetVariableInfo (we should use vwrStrValue instead) ## Fix CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo to Escape values was: ``` {name="p",value="0x0000000000000000 """} ``` now: ``` {name="p",value="0x0000000000000000 \"\""} ``` # Refactor CMICmnLLDBUtilSBValue ## Improve CMICmnLLDBUtilSBValue::GetValue to handle PrintExpandAggregates ## Improve CMICmnLLDBUtilSBValue::GetSimpleValue to handle vbHandleArrayType (use it to specify that array should be represented as simple type, i.e. value="[2]") # Add spacing between fields in CMICmnLLDBUtilSBValue::GetCompositeValue (MI) For example: was: ``` ^done,name="var3",numchild="3",value="{i = 3,inner = {l = 3},complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0" ``` now: ``` ^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0" ``` # Fix spacing in MiStackTestCase.test_lldbmi_stack_list_locals test (MI) Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D8913 llvm-svn: 234476 | ||||
* | Use std::vector::iterator in ↵ | Ilia K | 2015-03-26 | 1 | -2/+2 |
| | | | | | | CMICmnLLDBDebuggerHandleEvents::ChkForStateChanges to fix build on Linux after r233260 (MI) llvm-svn: 233265 | ||||
* | Use std::vector::const_iterator and std::vector::cbegin/cend in ↵ | Ilia K | 2015-03-26 | 1 | -3/+3 |
| | | | | | | CMICmnLLDBDebuggerHandleEvents::ChkForStateChanges (MI) llvm-svn: 233260 | ||||
* | Fix =thread-exited message (MI) | Ilia K | 2015-03-26 | 1 | -37/+23 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch includes: # Fix invalid thread id in =thread-exited message # Remove invalid threads from cache All tests pass on OS X. Test Plan: now ``` =thread-exited,id="3",group-id="i1" =thread-exited,id="4",group-id="i1" =thread-exited,id="5",group-id="i1" ``` was ``` =thread-exited,id="4294967295",group-id="i1" =thread-exited,id="4294967295",group-id="i1" ... =thread-exited,id="4294967295",group-id="i1" =thread-exited,id="4294967295",group-id="i1" ``` Reviewers: abidh Reviewed By: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D8603 llvm-svn: 233256 | ||||
* | Fix handling of CommandInterpreter's events in lldb-mi | Ilia K | 2015-03-21 | 1 | -0/+10 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously lldb-mi contains a stub for that but it didn't work and all CommanInterpreter's events were ignored. This commit adds a handling of CommandInterpreter's events in lldb-mi. Steps: # Fix CMICmnLLDBDebugger::InitSBListener # Add SBCommandInterpreter::EventIsCommandInterpreterEvent # Exit on lldb::SBCommandInterpreter::eBroadcastBitQuitCommandReceived All tests pass on OS X. In further we can remove "quit" hack in lldb-mi. Test Plan: # Create start_script file: ``` target create ~/p/hello b main r quit ``` # Run lldb-mi --interpreter # Execute start_script file by following command: ``` -interpreter-exec console "command source start_script" ``` Log: ``` $ bin/lldb-mi --interpreter (gdb) -interpreter-exec console "command source start_script" Executing commands in '/Users/IliaK/p/llvm/build_ninja/start_script'. (lldb) target create ~/p/hello Current executable set to '~/p/hello' (x86_64). (lldb) b main Breakpoint 1: where = hello`main + 29 at hello.cpp:12, address = 0x0000000100000e2d (lldb) r Process 1582 launched: '/Users/IliaK/p/hello' (x86_64) (lldb) quit ^done (gdb) =thread-created,id="1",group-id="i1" =thread-selected,id="1" (gdb) =shlibs-added,shlib-info=[num="1",name="hello",dyld-addr="-",reason="dyld",path="/Users/IliaK/p/hello",loaded_addr="-",dsym-objpath="/Users/IliaK/p/hello.dSYM/Contents/Resources/DWARF/hello"] ... =shlibs-added,shlib-info=[num="132",name="libDiagnosticMessagesClient.dylib",dyld-addr="0x7fff91705000",reason="dyld",path="/usr/lib/libDiagnosticMessagesClient.dylib",loaded_addr="0x7fff91705000"] (gdb) *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x100000e2d",func="main",args=[{name="argc",value="1"},{name="argv",value="0x00007fff5fbffc88"}],file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="12"},thread-id="1",stopped-threads="all" (gdb)<press Enter> MI: Program exited OK ``` Reviewers: abidh, clayborg Reviewed By: abidh Subscribers: jingham, lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8382 llvm-svn: 232891 | ||||
* | expose 64 bit addresses through MI | Ilia K | 2015-03-19 | 1 | -6/+6 |
| | | | | | | | | | | | | | | | | | Summary: This changes all reporting of addresses from lldb-mi to be 64 bit capable. There could have been cases where a 64 bit address was getting truncated to 32 bit format. Patch from chuckr@microsoft.com Reviewers: abidh, ChuckR Reviewed By: abidh Subscribers: paulmaybee, ki.stfu, zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D8238 llvm-svn: 232736 | ||||
* | Remove redundant comments from lldb-mi source files. | Hafiz Abid Qadeer | 2015-03-16 | 1 | -12/+0 |
| | | | | | | | Most of lldb-mi files have comments about environement, copyright etc which were neither needed nor uptodate. This commit removes those comments. llvm-svn: 232396 | ||||
* | Check that RestartedFromEvent flag before processing the state changed event. | Hafiz Abid Qadeer | 2015-03-16 | 1 | -0/+2 |
| | | | | | | | | | | Not checking for this flags caused lldb-mi to issue stop notification when target has started running again. It also tried to get stack when target was running and this caused randon failure. Approved in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-March/006953.html llvm-svn: 232370 | ||||
* | Fix PATH_MAX definition after remarks in r231917 (MI) | Ilia K | 2015-03-12 | 1 | -2/+1 |
| | | | | llvm-svn: 232008 | ||||
* | Fix build on Windows (PATH_MAX was undefined) after r231858 | Ilia K | 2015-03-11 | 1 | -1/+2 |
| | | | | llvm-svn: 231917 | ||||
* | Add =shlibs-added/=shlibs-removed notifications (MI) | Ilia K | 2015-03-10 | 1 | -0/+169 |
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds =shlibs-added/=shlibs-removed notifications in lldb-mi. In more detail: # Add Target::ModulesDidLoad/ModulesDidUnload notifications # Improve Target::TargetEventData: ## Refactoring ## Move it back to include/lldb/Target/Target.h ## Add Target::{GetModuleListFromEvent,GetModuleList}; Add Target::m_module_list # Add SBModule::{GetSymbolVendorMainFileSpec,GetObjectFileHeaderAddress} # Add SBTarget::{EventIsTaretEvent,GetTargetFromEvent,GetNumModulesFromEvent,GetModuleAtIndexFromEvent} All tests pass on OS X. Reviewers: abidh, zturner, jingham, clayborg Reviewed By: clayborg Subscribers: jingham, zturner, lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8201 llvm-svn: 231858 | ||||
* | Fix process's output to stdout/stderr (MI) | Ilia K | 2015-02-26 | 1 | -75/+25 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: * Add CMIUtilString::Escape/Unescape methods (MI) * Fix process's output to stdout/stderr (MI): lldb-mi escapes process's output to show it in the following format: ``` ~"..." ``` But previously not all characters were escaped by CMICmnLLDBDebuggerHandleEvents::ConvertPrintfCtrlCodeToString and output of ``` printf("'\n` - it's \\n\x12\"\\\"") ``` looked like: ``` ~"'\r\n` - it's \n"\"" ``` This patch fixes it by using CMIUtilString::Escape method and now it looks like: ``` ~"'\r\n` - it's \\n\x12\"\\\"" ``` Reviewers: abidh, emaste, clayborg Reviewed By: clayborg Subscribers: zturner, lldb-commits, emaste, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7858 llvm-svn: 230652 | ||||
* | Fix usage of shared_ptr for array which may cause a undefined behaviour (use ↵ | Ilia K | 2015-02-26 | 1 | -3/+3 |
| | | | | | | unique_ptr instead) llvm-svn: 230630 | ||||
* | Add -exec-abort command (MI); Don't exit on eStateExited | Ilia K | 2015-02-24 | 1 | -10/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add -exec-abort command + test. Also, I had fixed an error, when lldb-mi exits on eStateExited. With current patch we can re-run target: ``` -file-exec-and-symbols hello ^done -exec-run ^running *stopped,reason="breakpoint-hit"... -exec-abort ^done *stopped,reason="exited-normally"... <- program exits -exec-run <- run again ^running *stopped,reason="breakpoint-hit"... ``` All tests pass on OS X. Reviewers: zturner, emaste, abidh, clayborg Reviewed By: abidh, clayborg Subscribers: lldb-commits, emaste, zturner, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7794 llvm-svn: 230321 | ||||
* | Fix a problem where lldb-mi would not stop the debuggee after ↵ | Hafiz Abid Qadeer | 2015-02-23 | 1 | -89/+118 |
| | | | | | | | | | | | | | | | | | | | | | | | | -exec-interrupt command. Summary: This revision fixes a problem where lldb-mi would not stop the execution after exec-interrupt call. On Linux, SIGSTOP is used to stop the debuggee process. LLDB stopped the debuggee alright. But when lldb-mi received the notification of stopping with reason as SIGSTOP, it would resume the process. This was heppening in CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal. This function aslo used hard coded numbers for signal istead of symbolic names. This revision changes code to treat SIGSTOP reason as SIGINT. Also used symbolic names for signals instead of numbers. Reviewers: ki.stfu, clayborg Reviewed By: ki.stfu, clayborg Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D7783 llvm-svn: 230237 |