Commit Graph

1105 Commits

Author SHA1 Message Date
Bruce Mitchener b5c891908d Add more autotools/gmake NetBSD glue
Summary: This diff approaches building the project natively on NetBSD with the autoconf/gmake framework.

Patch by Kamil Rytarowski. Thanks!

Reviewers: emaste, clayborg

Subscribers: tberghammer, joerg, brucem, lldb-commits

Differential Revision: http://reviews.llvm.org/D14531

llvm-svn: 253153
2015-11-15 02:00:09 +00:00
Bruce Mitchener d31113f0b9 Add more NetBSD platform glue for lldb
Summary:
These changes are still incomplete, but  we are almost there.

Changes:
- CMake and gmake code
- SWIG code
- minor code additions

Reviewers: emaste, joerg

Subscribers: youri, akat1, brucem, lldb-commits, joerg

Differential Revision: http://reviews.llvm.org/D14042

llvm-svn: 252403
2015-11-07 15:31:54 +00:00
Jason Molenda 943a42f924 Add support for one API used to detect if a process
is running under System Integrity Protection on 
Mac OS X 10.11.  The rootless_allows_task_for_pid() spi
(see debugserver RNBRemote.cpp) is the final SPI that
is used for this - should add support for that too at
some point.

llvm-svn: 252228
2015-11-05 23:04:57 +00:00
Ramkumar Ramachandra d5fa22620b Squelch a silly warning regarding an extra 'default' in 'case'
Let the editor also clean up whitespace for that file.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13816

llvm-svn: 251979
2015-11-03 21:29:52 +00:00
Hafiz Abid Qadeer c10e82087b Handle the options and parameters separator in every MI command
Summary:
As per the following link, the "--" separator can appear between the options
and parameters of any MI command. Previously this separator was only
handled by the `-data-disassemble` MI command. I have moved the relevant
code into `CMICmdBase` so that any MI command can handle the
aforementioned separator.

https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Input-Syntax.html#GDB_002fMI-Input-Syntax

Reviewers: ki.stfu

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D14197

llvm-svn: 251793
2015-11-02 11:43:40 +00:00
Eugene Zelenko adb5b1dfc2 Fix Clang-tidy modernize-use-override warnings in include/lldb/Expression, source/Expression and tools/lldb-mi; other minor fixes.
llvm-svn: 251730
2015-10-31 00:43:59 +00:00
Hafiz Abid Qadeer 8c6fd6e70a Remove 2 lines missed in earlier commit (r251636).
llvm-svn: 251704
2015-10-30 16:20:40 +00:00
Hafiz Abid Qadeer d122fd8d06 Better handle the arguments common to all MI commands.
Summary:
I observed that eclipse was passing --thread-group for many other commands
then we are currently handling. Looking at the MI documentation, the
following link states that each MI command accept the --thread and
--frame option. Looking at the GDB implementation, it seems that apart
from these 2, --thread-group is also handled the same way.

https://sourceware.org/gdb/onlinedocs/gdb/Context-management.html#Context-management

So instead of handling those arguments in every comamnds, I have moved
them into the base class and removed them from elsewhere. Now any command
can use these arguments. The patch seems big but most of the changes are
mechanical.

Reviewers: ki.stfu

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D14177

llvm-svn: 251636
2015-10-29 16:30:47 +00:00
Todd Fiala 15c0fbaae1 Rename argdumper to lldb-argdumper
http://reviews.llvm.org/D14169

llvm-svn: 251616
2015-10-29 05:07:12 +00:00
Jason Molenda a26a1eff93 Xcode suggested enabling a "no common blocks" warning
(whatever that is) and wanted to clean up some duplicated
entries in the project files.  

llvm-svn: 251586
2015-10-29 00:21:14 +00:00
Oleksiy Vyalov 1485712648 Make lldb-gdbserver to take explicit socket scheme as command line argument.
http://reviews.llvm.org/D14126

llvm-svn: 251547
2015-10-28 19:49:50 +00:00
Oleksiy Vyalov db4d9865b4 Add Socket::Create factory method which uses socket protocol to find an appropriate implementation class.
http://reviews.llvm.org/D14085

llvm-svn: 251417
2015-10-27 17:32:01 +00:00
Jason Molenda e376c40308 Remove some unnecessary macosx.internal SDK settings in
the debugserver xcode project file.

llvm-svn: 251221
2015-10-25 06:51:37 +00:00
Dawn Perchik b5d425ecfb [lldb-mi] Fix expansion of anonymous structures and unions
A variable of type:
    struct S {
       union {
           int            i1;
           unsigned u1;
       };
       union {
           int            i2;
           unsigned u2;
       };
    };
had been impossible to evaluate in lldb-mi, because MI assigns '??' as the
variable name to each of the unnamed unions after "-var-list-children" command.
Also '??' incorrectly goes to 'exp' field which is treated by IDE as a
structure field name and is displayed in watch window.

The patch fixes this returning empty string as type name for unnamed union and
assigning $N to variable name, where N is the field number in the parent entity.

Patch from evgeny.leviant@gmail.com
Reviewed by: clayborg, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13947

llvm-svn: 251176
2015-10-24 02:01:28 +00:00
Dawn Perchik e3f250dbda [debugserver] Fix OSX build for older XCode versions after r251091.
This fixes the OSX build for XCode versions older than 7 by skipping
references to LC_VERSION_MIN_TVOS and LC_VERSION_MIN_WATCHOS if
TARGET_OS_TV or TARGET_OS_WATCH aren't defined.

Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D14036

llvm-svn: 251172
2015-10-24 01:31:12 +00:00
Dawn Perchik 51ac8a0e17 [debugserver] Fix indentation in RNBRemote.cpp.
llvm-svn: 251169
2015-10-24 01:24:00 +00:00
Bruce Mitchener 284350e540 [lldb-mi] Fix unused variable warning.
llvm-svn: 251166
2015-10-24 00:30:18 +00:00
Bruce Mitchener 64f74da568 Add initial CMake glue for the NetBSD platform
Summary:
These changes aren't everything what is needed for the CMake target, but it's significantly approaching it.

These changes shouldn't effect the build process on other platforms.

Patch by Kamil Rytarowski, thanks!

Reviewers: joerg, brucem

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13711

llvm-svn: 251164
2015-10-24 00:27:04 +00:00
Aidan Dodds 45dc04bb83 Fix the build when building with LLDB_DISABLE_PYTHON.
llvm-svn: 251104
2015-10-23 10:27:16 +00:00
Jason Molenda b9d5459d5a Remove some tabs that snuck into debugserver-entitlements.plist, etc.
llvm-svn: 251092
2015-10-23 02:54:21 +00:00
Jason Molenda c611a74059 Upstreaming the apple internal changes that accumulated during the
previous release.  Most of the diffs are duplication in the xcode
project file caused by adding a "debugserver-mini" target.  Jim
Ingham added support for a new SPI needed to request app launches
on iOS.  Greg Clayton added code to indicate the platform of the
binary (macosx, ios, watchos, tvos) based on Mach-O load commands.
Jason Molenda added code so debugserver will identify when it is
running on a tvos/watchos device to lldb.

llvm-svn: 251091
2015-10-23 02:49:51 +00:00
Dawn Perchik b91779eb28 [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)
Previously, lldb did not use type summaries for simple types with no children
(like function pointers).  This patch enables MI to use lldb type summaries for
evaluation of all types of objects, so MI own formatters are no longer needed.

Patch from evgeny.leviant@gmail.com
Reviewed by: abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13799

llvm-svn: 251082
2015-10-23 00:23:53 +00:00
Dawn Perchik bf568a6b8f [cmake] Fix cmake build on OSX after r250335 for older versions of cmake
Reviewed by: sas
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13995

llvm-svn: 251073
2015-10-22 22:48:52 +00:00
Oleksiy Vyalov 9dfde98d27 Fix lldb-server - write null terminating symbol along with port number.
llvm-svn: 250953
2015-10-21 21:58:22 +00:00
Oleksiy Vyalov 9fe526c2e7 Add domain socket support to gdb-remote protocol and lldb-server.
http://reviews.llvm.org/D13881

llvm-svn: 250933
2015-10-21 19:34:26 +00:00
Sean Callanan 3e7e915dca Added support for the "--repl" argument to LLDB.
This makes LLDB launch and create a REPL, specifying no target so that the REPL
can create one for itself.  Also added the "--repl-language" option, which
specifies the language to use.  Plumbed the relevant arguments and errors
through the REPL creation mechanism.

llvm-svn: 250773
2015-10-20 00:23:46 +00:00
Keno Fischer f23c0c405e Revert r248047 and fix the problem properly
In r248047, I attempted to fix a build breakage introduced by using
llvm's regex support from lldb-mi. However, my approach was flawed
when LLVM and lldb are dynamically linked, in which case two copies
of LLVMSupport would end up in memory, causing crashes on lldb start up.
Instead, use LINK_COMPONENTS to make sure lldb-mi has access to the
LLVMSupport symbols without causing duplication in the dynamic library
case.

llvm-svn: 250751
2015-10-19 22:59:16 +00:00
Oleksiy Vyalov e98628cecb Split Socket class into Tcp/Udp/DomainSocket subclasses.
http://reviews.llvm.org/D13754

llvm-svn: 250474
2015-10-15 23:54:09 +00:00
Aidan Dodds 438a4aa8f6 Superficial fix for the windows build when building with LLDB_DISABLE_PYTHON. The definition of lldb::SBTypeSummary and some methods of lldb::SBValue are hidden via a LLDB_DISABLE_PYTHON check, causing an compilation fail because of their use here.
llvm-svn: 250391
2015-10-15 11:42:20 +00:00
Stephane Sezer 86388ae768 Fix codesign command with cmake.
Summary:
Looks like having a space in the Xcode path triggers this bug. We need
to use cmake -E env FOO=bar [COMMAND] to set the environment instead.

I am using cmake 3.3.1 and ninja 1.6.0 and I get this:

    [2681/2756] Linking CXX executable bin/debugserver
    FAILED: : && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -std=c++11 -fcolor-diagnostics -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-deprecated-register -Wno-vla-extension  -fno-exceptions -fno-rtti -Wno-gnu-zero-variadic-macro-arguments -Wno-zero-length-array -Wno-extended-offsetof -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names -stdlib=libc++ -Wl,-sectcreate,__TEXT,__info_plist,/Users/sas/Source/llvm/tools/lldb/tools/debugserver/source/../resources/lldb-debugserver-Info.plist tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/HasAVX.s.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/CFBundle.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/CFData.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/CFString.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/Genealogy.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachException.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachProcess.mm.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachTask.mm.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachThread.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachThreadList.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachVMMemory.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachVMRegion.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/mach_excServer.c.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/mach_excUser.c.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/debugserver_vers.c.o  -o bin/debugserver  lib/liblldbDebugserverCommon.a lib/liblldbUtility.a lib/liblldbDebugserverMacOSX_I386.a lib/liblldbDebugserverMacOSX_X86_64.a -framework Cocoa -Wl,-rpath,@executable_path/../lib && cd /Users/sas/Source/llvm/build/bin && "CODESIGN_ALLOCATE=/Applications/Xcode 6.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate" codesign --force --sign lldb_codesign debugserver
    /bin/sh: CODESIGN_ALLOCATE=/Applications/Xcode 6.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate: No such file or directory
    [2681/2756] Building CXX object tools/lldb/source/Target/CMakeFiles/lldbTarget.dir/Target.cpp.o
    ninja: build stopped: subcommand failed.

Reviewers: clayborg, dawn, brucem, tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13742

llvm-svn: 250335
2015-10-14 22:25:43 +00:00
Bruce Mitchener 26c6e64159 [debugserver,cmake] Add DEPENDS to custom commands.
Summary:
Add dependencies to the custom commands so that they get
re-executed as needed.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13580

llvm-svn: 249860
2015-10-09 17:51:19 +00:00
Bruce Mitchener 6ec5d61bda Fix handling of LLDB_VERS_GENERATED_FILE.
Summary:
This is Darwin only.

The symbol defined by ${LLDB_VERS_GENERATED_FILE} is used by
source/lldb.cpp, so anything that uses lldb.cpp (which is in
lldbBase) should also have the generated symbol. This means
that the entire process can be centralized within source/CMakeLists.txt
where lldbBase is constructed.

Additionally, the custom command should have dependencies on the
project file as well as the generation script so that if either
changes, the version file is correctly re-generated and everything
is re-linked appropriately.

* cmake/LLDBDependencies.cmake: Remove everything related to
  the generated version file from here.

* source/CMakeLists.txt: On Darwin, add the generated version
  file to the sources that make up lldbBase.  Also, create a
  custom target and make lldbBase depend on it to re-generate
  the generated file as needed.

* source/API/CMakeLists.txt: Don't need to build the generated
  version file here or use it to control linking against swig_wrapper.

* tools/lldb-server/CMakeLists.txt: Likewise.

Reviewers: dawn, sas, clayborg, zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13552

llvm-svn: 249806
2015-10-09 03:40:55 +00:00
Dawn Perchik b751bfb9bd [cmake] Fix cmake build on OSX after r249434.
Reviewed by: zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13535

llvm-svn: 249684
2015-10-08 12:35:21 +00:00
Dawn Perchik 74b8f4cbdf [lldb-mi] Fix evaluation of strings containing characters from non-ascii range
If a string contained characters outside the ASCII range, lldb-mi would
print them as hexadecimal codes.  This patch fixes this behaviour by
converting to UTF-8 instead, by having lldb-mi use registered type
summary providers, when they are available.  This patch also fixes
incorrect evaluation of some composite types, like std::string, by
having them use a type registered type summary provider.

Based on patch from evgeny.leviant@gmail.com
Reviewed by: ki.stfu, granata.enrico, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13058

llvm-svn: 249597
2015-10-07 19:55:33 +00:00
Dawn Perchik 8587212085 [lldb-mi] Add support for StopAtEntry in MI via "-exec-run --start".
This patch adds a --start option to the lldb-mi -exec-run command for
getting process stopped at entry point after launch.  It is equivelent
to the -s option in the lldb command line interpreter:
    process launch -s
and is therefore not supported on all hosts and/or targets.  To check
if the --start option is supported, see if the corresponding feature
"exec-run-start-option" is in the list of options reported by the lldb-mi
"-list-features" command.

Patch from engineer.developer@gmail.com (Kirill Lapshin)
Reviewed by: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12977

llvm-svn: 249072
2015-10-01 21:15:43 +00:00
Bruce Mitchener c32c277b84 Include platform agnostic <HostGetOpt.h> in the place of <getopt.h>
Summary: Problem caught on NetBSD with missing getopt_long_only(3).

Change by Kamil Rytarowski <n54@gmx.com>

Reviewers: joerg, brucem

Subscribers: brucem, lldb-commits

Differential Revision: http://reviews.llvm.org/D12748

llvm-svn: 248990
2015-10-01 07:45:58 +00:00
Dawn Perchik a556fe8ec3 [lldb-mi] Fix assignment operator in CMIUtilString
Fix assignment operator in CMIUtilString to not crash the debugger if it
is passed a NULL pointer, which can happen in code like the following:

    SBValue val;
    CMIUtilString s;
    //...
    s = val.GetSummary();

Patch from evgeny.leviant@gmail.com
Reviewed by: clayborg, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13094

llvm-svn: 248597
2015-09-25 18:08:45 +00:00
Ilia K b2b0170c0e Allow to construct CMIUtilString using std::string directly + cleanup 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
2015-09-25 08:28:58 +00:00
Daniel Sanders e688a008cf [lldb-mi] Fix unresolved reference to llvm_regcomp and llvm_regfree.
Subscribers: krytarowski, labath, lldb-commits

Differential Revision: http://reviews.llvm.org/D13027

llvm-svn: 248251
2015-09-22 09:08:44 +00:00
Bruce Mitchener adb99821bc Fix typos.
Summary: Another round of minor typo fixes.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13026

llvm-svn: 248243
2015-09-22 05:07:56 +00:00
Daniel Sanders 7d8e7bd7b5 [lldb-server] No need to add pthread twice.
Summary:
Following on from r247991:
pthread is in LLDB_SYSTEM_LIBS so there's no need to explicitly add it to the link.

Reviewers: labath

Subscribers: lldb-commits, labath, krytarowski

Differential Revision: http://reviews.llvm.org/D12964

llvm-svn: 248177
2015-09-21 17:23:22 +00:00
Pavel Labath ded4e756b2 Fix link failures when BUILD_SHARED_LIBS=ON.
patch by Daniel Sanders.

Reviewers: labath, krytarowski

Subscribers: krytarowski, labath, lldb-commits

Differential Revision: http://reviews.llvm.org/D12900

llvm-svn: 247991
2015-09-18 14:22:45 +00:00
Bruce Mitchener 40889cd75a [cmake] Build lldb-server on Darwin, set dep on FreeBSD.
Summary:
This switches the decision as to whether or not to lldb-server should
be built to check the same flag that was added that controls whether
or not it is added as a dependency to the 'lldb' target.

It also sets that flag on FreeBSD to maintain parity with the existing
build configuration / situation on FreeBSD.

Reviewers: labath, emaste, tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12925

llvm-svn: 247913
2015-09-17 18:35:33 +00:00
Dawn Perchik b01310008f [lldb-mi] Fix the handling of files in -data-info-line and -symbol-list-lines.
This fixes -data-info-line and -symbol-list-lines to parse the filename
and line correctly when line entries don't have the optional column
number and the filename contains a Windows drive letter. It also fixes
-symbol-list-lines when code from header files is generated.

Reviewed by: abidh, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12115

llvm-svn: 247899
2015-09-17 16:22:30 +00:00
Todd Fiala 509300d94c cmake fixes for lldb target.
ninja lldb now does the following:
* forces the python post-build step to fire, which sets up the python lldb module properly.
* on Darwin and Linux, requires the lldb-server target to be built.
* on Darwin, requires the debugserver target to be built.

See http://reviews.llvm.org/D12899 for details.

llvm-svn: 247810
2015-09-16 15:34:06 +00:00
Jason Molenda 9878e3b4b5 A partner to the cleanup in r247741, change the variables names in
debugserver to match.  "gcc" is now "ehframe" and "gdb" is now
"debugserver".  Because this is debugserver, what we call the Process
Plugin register numbers up in lldb are the debugserver register
numbers down here - they are the register numbers that debugserver
will use to refer to these registers over the gdb-remote protocol.

debugserver was already reporting the registers with the key
"ehframe"; this change is just cleaning up the internal variable
names to match.

llvm-svn: 247751
2015-09-15 23:49:57 +00:00
Jason Molenda 63bd0db071 Clean up register naming conventions inside lldb.
"gcc" register numbers are now correctly referred to as "ehframe"
register numbers.  In almost all cases, ehframe and dwarf register
numbers are identical (the one exception is i386 darwin where ehframe
regnums were incorrect).

The old "gdb" register numbers, which I incorrectly thought were
stabs register numbers, are now referred to as "Process Plugin"
register numbers.  This is the register numbering scheme that the
remote process controller stub (lldb-server, gdbserver, core file
support, kdp server, remote jtag devices, etc) uses to refer to the
registers.  The process plugin register numbers may not be contiguous
- there are remote jtag devices that have gaps in their register
numbering schemes.

I removed all of the enums for "gdb" register numbers that we had
in lldb - these were meaningless - and I put LLDB_INVALID_REGNUM
in all of the register tables for the Process Plugin regnum slot.

This change is almost entirely mechnical; the one actual change in
here is to ProcessGDBRemote.cpp's ParseRegisters() which parses the
qXfer:features:read:target.xml response.  As it parses register
definitions from the xml, it will assign sequential numbers as the
eRegisterKindLLDB numbers (the lldb register numberings must be
sequential, without any gaps) and if the xml file specifies register
numbers, those will be used as the eRegisterKindProcessPlugin
register numbers (and those may have gaps).  A J-Link jtag device's
target.xml does contain a gap in register numbers, and it only 
specifies the register numbers for the registers after that gap.
The device supports many different ARM boards and probably selects
different part of its register file as appropriate.

http://reviews.llvm.org/D12791
<rdar://problem/22623262> 

llvm-svn: 247741
2015-09-15 23:20:34 +00:00
Bruce Mitchener 7dd8c12d84 [lldb-mi] Clean up CMICmdArgSet usage.
Summary:
CMICmdArgSet stores a vector of non-const pointers to the arguments
that it is validating. It owns them and is responsible for deleting
them.

We don't need to pass a const reference to the argument to
CMICmdArgSet::Add and then take the address and const_cast it
when we can just pass the argument pointer in directly.

This lets us remove some noise at every call site for CMICmdArgSet::Add
and then clean up a couple of bits inside CMICmdArgSet to remove
const_casts.

Reviewers: abidh, ki.stfu, domipheus

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12878

llvm-svn: 247677
2015-09-15 12:00:08 +00:00
Bruce Mitchener 3be88564e9 [lldb-mi] Simplify CMICmnLLDBDebugSessionInfo::Shutdown.
Summary:
* SharedDataDestroy couldn't fail, so no need to return a status.
* No need for status, so can remove error message. The error message
  wasn't displayed or used anywhere anyway.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12879

llvm-svn: 247673
2015-09-15 10:36:08 +00:00
Bruce Mitchener 13ce0fd140 [lldb-mi] No need to call Format with no varargs.
Summary:
There's no need to call CMIUtilString::Format
with a string and no args.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12796

llvm-svn: 247403
2015-09-11 11:17:30 +00:00