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
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
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
Summary:
These changes include:
* Add eVariableInfoFormat argument for MIResponseFormVariableInfo{,2,3} and GetVariableInfo{,2} functions
* Fix -stack-list-locals and -stack-list-arguments: they ingored print-values
* Enable MiStackTestCase tests for -stack-list-xxx commands
All test pass on OS X.
Reviewers: abidh, clayborg
Reviewed By: abidh
Subscribers: lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D7462
llvm-svn: 228412
This patch fixes execution of CLI commands in MI mode. The CLI commands are
executed using "-interpreter-exec" command. The bug was in the
CMICmnLLDBDebugSessionInfo class which contained the following members:
SBProcess, SBTarget, SBDebugger and SBListener, but CLI commands don't affect
them and they aren't updated. Therefore some members can contain incorrect
(or obsolete) reference and it can cause an error. My patch removes these
members and uses getters that provides the updated instance every time it is used.
Patch from Ilia K ki.stfu@gmail.com. Approved by Greg.
llvm-svn: 227958
Include paths were switched to be user include paths, if this breaks the linux build we will need to fix the Makefiles/cmake stuff.
<rdar://problem/19198581>
llvm-svn: 226530
There was an error in ORing mask which is used for getting a list of variables.
Previously, these constants were unnamed, and possible it become the reason of this
bug. Also added test case for -stack-list-local and -stack-list_arguments.
Patch from Ilia K <ki.stfu@gmail.com>.
llvm-svn: 223674
- Can now load an executable directly as an argument.
- Fixes towards supporting local debugging.
- Fixes for stack-list-arguments, data-evaluate-expression, environment-cd, stack-list-locals, interpreter-exec.
- Fix breakpoint event handling.
- Support dynamic loading of libraries using the search paths provided by Eclipse.
llvm-svn: 215223
- Tested with Eclipse, likely to work with other GDB/MI compatible GUIs.
- Some but not all MI commands have been implemented. See MIReadme.txt for more info.
- Written from scratch, no GPL code, based on LLDB Public API.
- Built for Linux, Windows and OSX. Tested on Linux and Windows.
- GDB/MI Command Reference, https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html
llvm-svn: 208972