[Lldb-commits] [lldb] r262816 - Move SBLanguageRuntime.cpp from the lldb-core group to the LLDB
Author: jmolenda Date: Mon Mar 7 02:04:49 2016 New Revision: 262816 URL: http://llvm.org/viewvc/llvm-project?rev=262816&view=rev Log: Move SBLanguageRuntime.cpp from the lldb-core group to the LLDB group to fix a build time issue. Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=262816&r1=262815&r2=262816&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Mar 7 02:04:49 2016 @@ -815,6 +815,7 @@ 94E829CA152D33C1006F96A3 /* lldb-server in Resources */ = {isa = PBXBuildFile; fileRef = 26DC6A101337FE6900FF7998 /* lldb-server */; }; 94F48F251A01C687005C0EC6 /* StringPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94F48F241A01C687005C0EC6 /* StringPrinter.cpp */; }; 94FA3DE01405D50400833217 /* ValueObjectConstResultChild.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94FA3DDF1405D50300833217 /* ValueObjectConstResultChild.cpp */; }; + 964381701C8D6B8200023D59 /* SBLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F76C1AF18FC700751A6E /* SBLanguageRuntime.cpp */; }; 964463EC1A330C0500154ED8 /* CompactUnwindInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 964463EB1A330C0500154ED8 /* CompactUnwindInfo.cpp */; }; 966C6B7918E6A56A0093F5EC /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 966C6B7818E6A56A0093F5EC /* libz.dylib */; }; 966C6B7A18E6A56A0093F5EC /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 966C6B7818E6A56A0093F5EC /* libz.dylib */; }; @@ -864,7 +865,6 @@ AF1FA88A1A60A69500272AFC /* RegisterNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF1FA8891A60A69500272AFC /* RegisterNumber.cpp */; }; AF20F7661AF18F8500751A6E /* ABISysV_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F7641AF18F8500751A6E /* ABISysV_arm.cpp */; }; AF20F76A1AF18F9000751A6E /* ABISysV_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F7681AF18F9000751A6E /* ABISysV_arm64.cpp */; }; - AF20F76D1AF18FC700751A6E /* SBLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F76C1AF18FC700751A6E /* SBLanguageRuntime.cpp */; }; AF20F7701AF1902900751A6E /* RegisterContextLinux_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F76E1AF1902900751A6E /* RegisterContextLinux_arm64.cpp */; }; AF23B4DB19009C66003E2A58 /* FreeBSDSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp */; }; AF254E31170CCC33007AE5C9 /* PlatformDarwinKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF254E2F170CCC33007AE5C9 /* PlatformDarwinKernel.cpp */; }; @@ -6396,6 +6396,7 @@ 26DE205F1161901B00A093E2 /* SBCompileUnit.cpp in Sources */, AF0EBBE9185940FB0059E52F /* SBQueueItem.cpp in Sources */, AF0EBBE8185940FB0059E52F /* SBQueue.cpp in Sources */, + 964381701C8D6B8200023D59 /* SBLanguageRuntime.cpp in Sources */, 26DE20611161902700A093E2 /* SBBlock.cpp in Sources */, 26DE20631161904200A093E2 /* SBLineEntry.cpp in Sources */, 26DE20651161904E00A093E2 /* SBSymbol.cpp in Sources */, @@ -6455,7 +6456,6 @@ 255EFF741AFABA720069F277 /* LockFileBase.cpp in Sources */, 945261C21B9A11FC00BF138D /* LibCxxList.cpp in Sources */, 2689000313353DB600698AC0 /* BreakpointResolverFileLine.cpp in Sources */, - AF20F76D1AF18FC700751A6E /* SBLanguageRuntime.cpp in Sources */, 26474CA818D0CB070073DEBA /* RegisterContextFreeBSD_i386.cpp in Sources */, 449ACC98197DEA0B008D175E /* FastDemangle.cpp in Sources */, 2689000513353DB600698AC0 /* BreakpointResolverName.cpp in Sources */, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r262819 - [LLDB][MIPS] Fix TestDisassembleBreakpoint
Author: mohit.bhakkad Date: Mon Mar 7 03:12:49 2016 New Revision: 262819 URL: http://llvm.org/viewvc/llvm-project?rev=262819&view=rev Log: [LLDB][MIPS] Fix TestDisassembleBreakpoint Patch by Nitesh Jain Reviewers: clayborg, jaydeep. Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D17597 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=262819&r1=262818&r2=262819&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py Mon Mar 7 03:12:49 2016 @@ -42,7 +42,7 @@ class DisassemblyTestCase(TestBase): instructions = [' add ', ' ldr ', ' str '] elif re.match("mips" , arch): breakpoint_opcodes = ["break"] -instructions = ['lw', 'sw', 'jr'] +instructions = ['lw', 'sw'] else: # TODO please add your arch here self.fail('unimplemented for arch = "{arch}"'.format(arch=self.getArchitecture())) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17597: [LLDB][MIPS] Fix TestDisassembleBreakpoint
This revision was automatically updated to reflect the committed changes. Closed by commit rL262819: [LLDB][MIPS] Fix TestDisassembleBreakpoint (authored by mohit.bhakkad). Changed prior to commit: http://reviews.llvm.org/D17597?vs=49021&id=49936#toc Repository: rL LLVM http://reviews.llvm.org/D17597 Files: lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py @@ -42,7 +42,7 @@ instructions = [' add ', ' ldr ', ' str '] elif re.match("mips" , arch): breakpoint_opcodes = ["break"] -instructions = ['lw', 'sw', 'jr'] +instructions = ['lw', 'sw'] else: # TODO please add your arch here self.fail('unimplemented for arch = "{arch}"'.format(arch=self.getArchitecture())) Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py @@ -42,7 +42,7 @@ instructions = [' add ', ' ldr ', ' str '] elif re.match("mips" , arch): breakpoint_opcodes = ["break"] -instructions = ['lw', 'sw', 'jr'] +instructions = ['lw', 'sw'] else: # TODO please add your arch here self.fail('unimplemented for arch = "{arch}"'.format(arch=self.getArchitecture())) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
cameron314 added a comment. I don't want to be pushy, but is there a chance of this patch being accepted soon? It does depend on http://reviews.llvm.org/D17549 in LLVM which is also still pending, but that one's at least very a simple patch adding the support functions that this one uses. http://reviews.llvm.org/D17107 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
Sorry slipped under my radar, I'll look again today On Mon, Mar 7, 2016 at 7:50 AM Cameron wrote: > cameron314 added a comment. > > I don't want to be pushy, but is there a chance of this patch being > accepted soon? > It does depend on http://reviews.llvm.org/D17549 in LLVM which is also > still pending, but that one's at least very a simple patch adding the > support functions that this one uses. > > > http://reviews.llvm.org/D17107 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
zturner added a subscriber: zturner. zturner added a comment. Sorry slipped under my radar, I'll look again today http://reviews.llvm.org/D17107 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
cameron314 added a comment. No worries, thanks for taking a look! http://reviews.llvm.org/D17107 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17719: Track expression language from one place in ClangExpressionParser
ldrumm added a comment. Hi all If there are no objections, I'd like to commit this. Is this in an acceptable state? Best Luke http://reviews.llvm.org/D17719 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
zturner added a comment. Can you rebase against tip of trunk? I want to apply and run the test suite with the patch applied, but I'm getting a lot of errors. After uploading a new rebased patch, can you also respond with the revision you rebased against so I can make sure I'm at the same place. Comment at: lldb/trunk/source/Host/common/File.cpp:330 @@ +329,3 @@ +} +::_wsopen_s(&m_descriptor, wpath.c_str(), oflag, _SH_DENYWR, mode); +#else Any particular reason you're using `_SH_DENYWR` instead of `_SH_DENYNO`? No matter what we do we will always have subtle differences in semantics, but `_SH_DENYNO` is closer to posix semantics. http://reviews.llvm.org/D17107 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
cameron314 added a comment. Absolutely, I'm rebasing now. This is unfortunately the type of patch that rots really quickly ;-) I did run `check-lldb` locally at one point, with no major differences before and after the patch. But I recently discovered the version of Python I'd compiled had accidentally been compiled with VS2008, and since the tip's changed anyway, it's absolutely worth running them again. This was the day before the instructions to use VS21015 with Python 3 were posted, haha. Comment at: lldb/trunk/source/Host/common/File.cpp:330 @@ +329,3 @@ +} +::_wsopen_s(&m_descriptor, wpath.c_str(), oflag, _SH_DENYWR, mode); +#else zturner wrote: > Any particular reason you're using `_SH_DENYWR` instead of `_SH_DENYNO`? No > matter what we do we will always have subtle differences in semantics, but > `_SH_DENYNO` is closer to posix semantics. No particular reason other than I find `_SH_DENYWR` a reasonable default. It generally doesn't hurt to let others read the file while it's being written, and that's sometimes crucial (e.g. for log files which are written to incrementally and only closed at the very end). I can change it if you prefer. http://reviews.llvm.org/D17107 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
zturner added inline comments. Comment at: lldb/trunk/source/Host/common/File.cpp:330 @@ +329,3 @@ +} +::_wsopen_s(&m_descriptor, wpath.c_str(), oflag, _SH_DENYWR, mode); +#else cameron314 wrote: > zturner wrote: > > Any particular reason you're using `_SH_DENYWR` instead of `_SH_DENYNO`? > > No matter what we do we will always have subtle differences in semantics, > > but `_SH_DENYNO` is closer to posix semantics. > No particular reason other than I find `_SH_DENYWR` a reasonable default. It > generally doesn't hurt to let others read the file while it's being written, > and that's sometimes crucial (e.g. for log files which are written to > incrementally and only closed at the very end). I can change it if you prefer. I like deny write in principle as well, but I kind of do prefer to change it if for no other reason than it matches the semantics on Posix more closely. We've had sharing access denied errors in the past on Windows that we traced back to sharing violations, and it's easier if all platforms just use the same semantics. http://reviews.llvm.org/D17107 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
cameron314 added inline comments. Comment at: lldb/trunk/source/Host/common/File.cpp:330 @@ +329,3 @@ +} +::_wsopen_s(&m_descriptor, wpath.c_str(), oflag, _SH_DENYWR, mode); +#else zturner wrote: > cameron314 wrote: > > zturner wrote: > > > Any particular reason you're using `_SH_DENYWR` instead of `_SH_DENYNO`? > > > No matter what we do we will always have subtle differences in semantics, > > > but `_SH_DENYNO` is closer to posix semantics. > > No particular reason other than I find `_SH_DENYWR` a reasonable default. > > It generally doesn't hurt to let others read the file while it's being > > written, and that's sometimes crucial (e.g. for log files which are written > > to incrementally and only closed at the very end). I can change it if you > > prefer. > I like deny write in principle as well, but I kind of do prefer to change it > if for no other reason than it matches the semantics on Posix more closely. > We've had sharing access denied errors in the past on Windows that we traced > back to sharing violations, and it's easier if all platforms just use the > same semantics. OK, I'll change it for the next patch. http://reviews.llvm.org/D17107 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
cameron314 updated this revision to Diff 49986. cameron314 added a comment. Sorry for the delay, I wanted to make sure LLDB compiled without warnings after I rebased the patch. It applies cleanly on the tip as of this writing, and is based on http://reviews.llvm.org/rL262819. http://reviews.llvm.org/D17107 Files: lldb/trunk/cmake/modules/LLDBConfig.cmake lldb/trunk/include/lldb/Host/FileSystem.h lldb/trunk/include/lldb/Host/posix/HostInfoPosix.h lldb/trunk/include/lldb/Host/windows/HostInfoWindows.h lldb/trunk/packages/Python/lldbsuite/test/dotest.py lldb/trunk/source/Commands/CommandCompletions.cpp lldb/trunk/source/Core/ConnectionSharedMemory.cpp lldb/trunk/source/Core/Disassembler.cpp lldb/trunk/source/Host/common/File.cpp lldb/trunk/source/Host/common/FileSpec.cpp lldb/trunk/source/Host/posix/FileSystem.cpp lldb/trunk/source/Host/posix/HostInfoPosix.cpp lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp lldb/trunk/source/Host/windows/FileSystem.cpp lldb/trunk/source/Host/windows/Host.cpp lldb/trunk/source/Host/windows/HostInfoWindows.cpp lldb/trunk/source/Host/windows/HostProcessWindows.cpp lldb/trunk/source/Host/windows/PipeWindows.cpp lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp lldb/trunk/source/Host/windows/Windows.cpp lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.cpp lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp lldb/trunk/source/Target/ProcessLaunchInfo.cpp lldb/trunk/tools/driver/Driver.cpp lldb/trunk/tools/driver/Platform.h lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp lldb/trunk/tools/lldb-mi/MIUtilFileStd.cpp lldb/trunk/tools/lldb-mi/Platform.h Index: lldb/trunk/tools/lldb-mi/Platform.h === --- lldb/trunk/tools/lldb-mi/Platform.h +++ lldb/trunk/tools/lldb-mi/Platform.h @@ -60,7 +60,7 @@ typedef long pid_t; #define STDIN_FILENO 0 -#define PATH_MAX MAX_PATH +#define PATH_MAX 32768 #define snprintf _snprintf extern int ioctl(int d, int request, ...); Index: lldb/trunk/tools/lldb-mi/MIUtilFileStd.cpp === --- lldb/trunk/tools/lldb-mi/MIUtilFileStd.cpp +++ lldb/trunk/tools/lldb-mi/MIUtilFileStd.cpp @@ -17,6 +17,8 @@ #include "MIUtilFileStd.h" #include "MICmnResources.h" +#include "llvm/Support/ConvertUTF.h" + //++ // Details: CMIUtilFileStd constructor. // Type:Method. @@ -82,7 +84,14 @@ m_pFileHandle = ::fopen(vFileNamePath.c_str(), "wb"); #else // Open a file with exclusive write and shared read permissions -m_pFileHandle = ::_fsopen(vFileNamePath.c_str(), "wb", _SH_DENYWR); +std::wstring path; +if (llvm::ConvertUTF8toWide(vFileNamePath.c_str(), path)) +m_pFileHandle = ::_wfsopen(path.c_str(), L"wb", _SH_DENYWR); +else +{ +errno = EINVAL; +m_pFileHandle = nullptr; +} #endif // !defined( _MSC_VER ) if (m_pFileHandle == nullptr) @@ -222,7 +231,14 @@ return false; FILE *pTmp = nullptr; +#ifdef _WIN32 +std::wstring path; +if (!llvm::ConvertUTF8toWide(vFileNamePath.c_str(), path)) +return false; +pTmp = ::_wfopen(path.c_str(), L"wb"); +#else pTmp = ::fopen(vFileNamePath.c_str(), "wb"); +#endif if (pTmp != nullptr) { ::fclose(pTmp); Index: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp === --- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp +++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp @@ -27,6 +27,7 @@ #include "MICmnMIValueTuple.h" #include "MICmdData.h" #include "MICmnLLDBUtilSBValue.h" +#include "Platform.h" //++ // Details: CMICmnLLDBDebugSessionInfo constructor. @@ -614,7 +615,7 @@ { lldb::SBFrame &rFrame = const_cast(vrFrame); -static char pBuffer[MAX_PATH]; +static char pBuffer[PATH_MAX]; const MIuint nBytes = rFrame.GetLineEntry().GetFileSpec().GetPath(&pBuffer[0], sizeof(pBuffer)); MIunused(nBytes); CMIUtilString strResolvedPath(&pBuffer[0]); Index: lldb/trunk/tools/driver/Platform.h === --- lldb/trunk/tools/driver/Platform.h +++ lldb/trunk/tools/driver/Platform.h @@ -81,7 +81,7 @@ typedef long pid_t; #define snprintf _snprintf extern sighandler_t signal( int sig, sighandler_t ); -#define PATH_MAX MAX_PATH +#define PATH_MAX 32768 #endif #define STDIN_FILENO 0 Index: lldb/trunk/tools/driver/Driver.cpp =
[Lldb-commits] [lldb] r262900 - Change the way command aliases are stored. Go from a model where a map holds the alias -> underlying command binding and another map holds the alias -> options, to a mo
Author: enrico Date: Mon Mar 7 20:49:15 2016 New Revision: 262900 URL: http://llvm.org/viewvc/llvm-project?rev=262900&view=rev Log: Change the way command aliases are stored. Go from a model where a map holds the alias -> underlying command binding and another map holds the alias -> options, to a model where one single map holds the alias -> (all useful data) combination Right now, obviously, this is just the pair of (CommandObjectSP,OptionArgVectorSP), so NFC This is step one of a larger - and tricky - refactoring which will turn command aliases into interesting objects instead of passive storage that the command interpreter does smart things to This refactoring, in turn, will allow us to do interesting things with aliases, such as intelligent and customizable help Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/include/lldb/Interpreter/CommandObject.h lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Commands/CommandObjectMultiword.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Interpreter/CommandObject.cpp Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=262900&r1=262899&r2=262900&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Mon Mar 7 20:49:15 2016 @@ -200,8 +200,14 @@ class CommandInterpreter : public IOHandlerDelegate { public: -typedef std::map OptionArgMap; - +struct CommandAlias +{ +lldb::CommandObjectSP m_underlying_command_sp; +OptionArgVectorSP m_option_args_sp; +}; + +typedef std::map CommandAliasMap; + enum { eBroadcastBitThreadShouldExit = (1 << 0), @@ -279,7 +285,8 @@ public: void AddAlias (const char *alias_name, - lldb::CommandObjectSP& command_obj_sp); + lldb::CommandObjectSP& command_obj_sp, + OptionArgVectorSP args_sp); // Remove a command if it is removable (python or regex command) bool @@ -308,13 +315,6 @@ public: const char *options_args, OptionArgVectorSP &option_arg_vector_sp); -void -RemoveAliasOptions (const char *alias_name); - -void -AddOrReplaceAliasOptions (const char *alias_name, - OptionArgVectorSP &option_arg_vector_sp); - CommandObject * BuildAliasResult (const char *alias_name, std::string &raw_input_string, @@ -533,8 +533,9 @@ public: bool GetSynchronous (); +template size_t -FindLongestCommandWord (CommandObject::CommandMap &dict); +FindLongestCommandWord (std::map &dict); void FindCommandsForApropos (const char *word, @@ -700,9 +701,8 @@ private: bool m_skip_lldbinit_files; bool m_skip_app_init_files; CommandObject::CommandMap m_command_dict; // Stores basic built-in commands (they cannot be deleted, removed or overwritten). -CommandObject::CommandMap m_alias_dict; // Stores user aliases/abbreviations for commands +CommandAliasMap m_alias_dict; // Stores user aliases/abbreviations for commands CommandObject::CommandMap m_user_dict; // Stores user-defined commands -OptionArgMap m_alias_options; // Stores any options (with or without arguments) that go with any alias. CommandHistory m_command_history; std::string m_repeat_command; // Stores the command that will be executed for an empty command string. lldb::ScriptInterpreterSP m_script_interpreter_sp; Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=262900&r1=262899&r2=262900&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Mon Mar 7 20:49:15 2016 @@ -28,6 +28,49 @@ namespace lldb_private { +// This function really deals with CommandObjectLists, but we didn't make a +// CommandObjectList class, so I'm sticking it here. But we really should have +// such a class. Anyway, it looks up the commands in the map that match the partial +// string cmd_str, inserts the matches into matches, and returns the number added. + +template +int +AddNamesMatchingPartialString (std::map &in_map, const char *cmd_str, StringList &matches) +{ +class CommandDictCommandPartialMatch +{ +public: +CommandDictCommandPartialMatch (const char *match_str) +{ +m_match_str = match_str; +
[Lldb-commits] [lldb] r262901 - Move ProcessAliasOptionsArgs to be a static on CommandAlias; it wasn't using any instance data on the CommandInterpreter anyway
Author: enrico Date: Mon Mar 7 21:00:27 2016 New Revision: 262901 URL: http://llvm.org/viewvc/llvm-project?rev=262901&view=rev Log: Move ProcessAliasOptionsArgs to be a static on CommandAlias; it wasn't using any instance data on the CommandInterpreter anyway This small step removes one piece of alias machinery from the CommandInterpreter into the CommandAlias Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=262901&r1=262900&r2=262901&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Mon Mar 7 21:00:27 2016 @@ -204,6 +204,11 @@ public: { lldb::CommandObjectSP m_underlying_command_sp; OptionArgVectorSP m_option_args_sp; + +static bool +ProcessAliasOptionsArgs (lldb::CommandObjectSP &cmd_obj_sp, + const char *options_args, + OptionArgVectorSP &option_arg_vector_sp); }; typedef std::map CommandAliasMap; @@ -310,11 +315,6 @@ public: OptionArgVectorSP GetAliasOptions (const char *alias_name); -bool -ProcessAliasOptionsArgs (lldb::CommandObjectSP &cmd_obj_sp, - const char *options_args, - OptionArgVectorSP &option_arg_vector_sp); - CommandObject * BuildAliasResult (const char *alias_name, std::string &raw_input_string, Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=262901&r1=262900&r2=262901&view=diff == --- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Mon Mar 7 21:00:27 2016 @@ -620,11 +620,10 @@ protected: // Verify & handle any options/arguments passed to the alias command OptionArgVectorSP option_arg_vector_sp = OptionArgVectorSP (new OptionArgVector); -OptionArgVector *option_arg_vector = option_arg_vector_sp.get(); - + CommandObjectSP cmd_obj_sp = m_interpreter.GetCommandSPExact (cmd_obj.GetCommandName(), false); -if (!m_interpreter.ProcessAliasOptionsArgs (cmd_obj_sp, raw_command_string.c_str(), option_arg_vector_sp)) +if (!CommandInterpreter::CommandAlias::ProcessAliasOptionsArgs (cmd_obj_sp, raw_command_string.c_str(), option_arg_vector_sp)) { result.AppendError ("Unable to create requested alias.\n"); result.SetStatus (eReturnStatusFailed); @@ -688,7 +687,6 @@ protected: CommandObject *cmd_obj = command_obj_sp.get(); CommandObject *sub_cmd_obj = nullptr; OptionArgVectorSP option_arg_vector_sp = OptionArgVectorSP (new OptionArgVector); - OptionArgVector *option_arg_vector = option_arg_vector_sp.get(); while (cmd_obj->IsMultiwordObject() && args.GetArgumentCount() > 0) { @@ -726,7 +724,7 @@ protected: std::string args_string; args.GetCommandString (args_string); -if (!m_interpreter.ProcessAliasOptionsArgs (tmp_sp, args_string.c_str(), option_arg_vector_sp)) +if (!CommandInterpreter::CommandAlias::ProcessAliasOptionsArgs (tmp_sp, args_string.c_str(), option_arg_vector_sp)) { result.AppendError ("Unable to create requested alias.\n"); result.SetStatus (eReturnStatusFailed); Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=262901&r1=262900&r2=262901&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Mar 7 21:00:27 2016 @@ -97,6 +97,59 @@ enum eSpaceReplPrompts = 3 }; +bool +CommandInterpreter::CommandAlias::ProcessAliasOptionsArgs (lldb::CommandObjectSP &cmd_obj_sp, + const char *options_args, + OptionArgVectorSP &option_arg_vector_sp) +{ +bool success = true; +OptionArgVecto
[Lldb-commits] [lldb] r262904 - Unbreak linux build broken by r262901
Author: jmolenda Date: Mon Mar 7 21:24:13 2016 New Revision: 262904 URL: http://llvm.org/viewvc/llvm-project?rev=262904&view=rev Log: Unbreak linux build broken by r262901 Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=262904&r1=262903&r2=262904&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Mar 7 21:24:13 2016 @@ -429,7 +429,7 @@ CommandInterpreter::Initialize () shell_option.append("--shell="); shell_option.append(HostInfo::GetDefaultShell().GetPath()); shell_option.append(" --"); -ProcessAliasOptionsArgs (cmd_obj_sp, shell_option.c_str(), alias_arguments_vector_sp); +CommandAlias::ProcessAliasOptionsArgs (cmd_obj_sp, shell_option.c_str(), alias_arguments_vector_sp); #endif #endif AddAlias ("r", cmd_obj_sp, alias_arguments_vector_sp); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r262905 - Attempt to fix the Ubuntu buildbot by making FindLongestCommandWord a free template function in lldb_private
Author: enrico Date: Mon Mar 7 21:48:41 2016 New Revision: 262905 URL: http://llvm.org/viewvc/llvm-project?rev=262905&view=rev Log: Attempt to fix the Ubuntu buildbot by making FindLongestCommandWord a free template function in lldb_private Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/include/lldb/Interpreter/CommandObject.h lldb/trunk/source/Commands/CommandObjectMultiword.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=262905&r1=262904&r2=262905&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Mon Mar 7 21:48:41 2016 @@ -533,10 +533,6 @@ public: bool GetSynchronous (); -template -size_t -FindLongestCommandWord (std::map &dict); - void FindCommandsForApropos (const char *word, StringList &commands_found, Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=262905&r1=262904&r2=262905&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Mon Mar 7 21:48:41 2016 @@ -70,7 +70,23 @@ AddNamesMatchingPartialString (std::map< } return number_added; } + +template +size_t +FindLongestCommandWord (std::map &dict) +{ +auto end = dict.end(); +size_t max_len = 0; +for (auto pos = dict.begin(); pos != end; ++pos) +{ +size_t len = pos->first.size(); +if (max_len < len) +max_len = len; +} +return max_len; +} + class CommandObject { public: Modified: lldb/trunk/source/Commands/CommandObjectMultiword.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMultiword.cpp?rev=262905&r1=262904&r2=262905&view=diff == --- lldb/trunk/source/Commands/CommandObjectMultiword.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectMultiword.cpp Mon Mar 7 21:48:41 2016 @@ -181,7 +181,7 @@ CommandObjectMultiword::GenerateHelpText output_stream.PutCString ("The following subcommands are supported:\n\n"); CommandMap::iterator pos; -uint32_t max_len = m_interpreter.FindLongestCommandWord (m_subcommand_dict); +uint32_t max_len = FindLongestCommandWord (m_subcommand_dict); if (max_len) max_len += 4; // Indent the output by 4 spaces. Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=262905&r1=262904&r2=262905&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Mar 7 21:48:41 2016 @@ -1200,22 +1200,6 @@ CommandInterpreter::GetAliasHelp (const help_string.Printf ("'"); } -template -size_t -CommandInterpreter::FindLongestCommandWord (std::map &dict) -{ -auto end = dict.end(); -size_t max_len = 0; - -for (auto pos = dict.begin(); pos != end; ++pos) -{ -size_t len = pos->first.size(); -if (max_len < len) -max_len = len; -} -return max_len; -} - void CommandInterpreter::GetHelp (CommandReturnObject &result, uint32_t cmd_types) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r262909 - Turn GetAliasOptions() into GetAlias()
Author: enrico Date: Mon Mar 7 21:56:12 2016 New Revision: 262909 URL: http://llvm.org/viewvc/llvm-project?rev=262909&view=rev Log: Turn GetAliasOptions() into GetAlias() Eventually, there will be more things that CommandAlias contains, and I don't want accessors for each of them on the CommandIntepreter Eventually, we also won't pass around copies of CommandAlias, but that's for a later patch Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=262909&r1=262908&r2=262909&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Mon Mar 7 21:56:12 2016 @@ -202,13 +202,27 @@ class CommandInterpreter : public: struct CommandAlias { -lldb::CommandObjectSP m_underlying_command_sp; -OptionArgVectorSP m_option_args_sp; +lldb::CommandObjectSP m_underlying_command_sp = nullptr; +OptionArgVectorSP m_option_args_sp = nullptr; + +CommandAlias (lldb::CommandObjectSP cmd_sp = nullptr, + OptionArgVectorSP args_sp = nullptr); static bool ProcessAliasOptionsArgs (lldb::CommandObjectSP &cmd_obj_sp, const char *options_args, OptionArgVectorSP &option_arg_vector_sp); + +bool +IsValid () +{ +return m_underlying_command_sp && m_option_args_sp; +} + +explicit operator bool () +{ +return IsValid(); +} }; typedef std::map CommandAliasMap; @@ -312,8 +326,8 @@ public: m_user_dict.clear(); } -OptionArgVectorSP -GetAliasOptions (const char *alias_name); +CommandAlias +GetAlias (const char *alias_name); CommandObject * BuildAliasResult (const char *alias_name, Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=262909&r1=262908&r2=262909&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Mar 7 21:56:12 2016 @@ -97,6 +97,13 @@ enum eSpaceReplPrompts = 3 }; +CommandInterpreter::CommandAlias::CommandAlias (lldb::CommandObjectSP cmd_sp, +OptionArgVectorSP args_sp) : +m_underlying_command_sp(cmd_sp), +m_option_args_sp(args_sp) +{ +} + bool CommandInterpreter::CommandAlias::ProcessAliasOptionsArgs (lldb::CommandObjectSP &cmd_obj_sp, const char *options_args, @@ -1170,7 +1177,7 @@ void CommandInterpreter::GetAliasHelp (const char *alias_name, const char *command_name, StreamString &help_string) { help_string.Printf ("'%s", command_name); -OptionArgVectorSP option_arg_vector_sp = GetAliasOptions (alias_name); +OptionArgVectorSP option_arg_vector_sp = GetAlias(alias_name).m_option_args_sp; if (option_arg_vector_sp) { @@ -1456,7 +1463,7 @@ CommandInterpreter::BuildAliasResult (co cmd_args.Unshift (alias_name); result_str.Printf ("%s", alias_cmd_obj->GetCommandName ()); -OptionArgVectorSP option_arg_vector_sp = GetAliasOptions (alias_name); +OptionArgVectorSP option_arg_vector_sp = GetAlias(alias_name).m_option_args_sp; if (option_arg_vector_sp.get()) { @@ -2083,8 +2090,8 @@ CommandInterpreter::Confirm (const char return confirm->GetResponse(); } -OptionArgVectorSP -CommandInterpreter::GetAliasOptions (const char *alias_name) +CommandInterpreter::CommandAlias +CommandInterpreter::GetAlias (const char *alias_name) { OptionArgVectorSP ret_val; @@ -2092,9 +2099,9 @@ CommandInterpreter::GetAliasOptions (con auto pos = m_alias_dict.find(alias); if (pos != m_alias_dict.end()) -ret_val = pos->second.m_option_args_sp; +return pos->second; -return ret_val; +return CommandInterpreter::CommandAlias(); } bool @@ -2128,7 +2135,7 @@ CommandInterpreter::BuildAliasCommandArg std::string &raw_input_string, CommandReturnObject &result) { -OptionArgVectorSP option_arg_vector_sp = GetAliasOptions (alias_name); +OptionArgVectorSP option_arg_vector_sp = GetAlias(alias_name).m_option_args_sp; bool wants_raw_input = alias_cmd_obj->WantsRawCommandString();
[Lldb-commits] [lldb] r262912 - A few more improvements on the way to the command alias refactoring
Author: enrico Date: Mon Mar 7 23:37:15 2016 New Revision: 262912 URL: http://llvm.org/viewvc/llvm-project?rev=262912&view=rev Log: A few more improvements on the way to the command alias refactoring - move alias help generation to CommandAlias, out of CommandInterpreter - make alias creation use argument strings instead of OptionArgVectorSP; the former is a more reasonable currency than the latter - remove m_is_alias from CommandObject, it wasn't actually being used Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/include/lldb/Interpreter/CommandObject.h lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Commands/CommandObjectHelp.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Interpreter/CommandObject.cpp Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=262912&r1=262911&r2=262912&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Mon Mar 7 23:37:15 2016 @@ -208,6 +208,9 @@ public: CommandAlias (lldb::CommandObjectSP cmd_sp = nullptr, OptionArgVectorSP args_sp = nullptr); +void +GetAliasHelp (StreamString &help_string); + static bool ProcessAliasOptionsArgs (lldb::CommandObjectSP &cmd_obj_sp, const char *options_args, @@ -302,11 +305,11 @@ public: bool UserCommandExists (const char *cmd); -void -AddAlias (const char *alias_name, +bool +AddAlias (const char *alias_name, lldb::CommandObjectSP& command_obj_sp, - OptionArgVectorSP args_sp); - + const char *args_string = nullptr); + // Remove a command if it is removable (python or regex command) bool RemoveCommand (const char *cmd); @@ -436,7 +439,6 @@ public: void GetAliasHelp (const char *alias_name, - const char *command_name, StreamString &help_string); void Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=262912&r1=262911&r2=262912&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Mon Mar 7 23:37:15 2016 @@ -190,12 +190,6 @@ public: virtual bool IsRemovable () const { return false; } -bool -IsAlias () { return m_is_alias; } - -void -SetIsAlias (bool value) { m_is_alias = value; } - virtual bool IsMultiwordObject () { return false; } @@ -527,7 +521,6 @@ protected: std::string m_cmd_help_short; std::string m_cmd_help_long; std::string m_cmd_syntax; -bool m_is_alias; Flags m_flags; std::vector m_arguments; lldb::CommandOverrideCallback m_deprecated_command_override_callback; Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=262912&r1=262911&r2=262912&view=diff == --- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Mon Mar 7 23:37:15 2016 @@ -621,33 +621,31 @@ protected: OptionArgVectorSP option_arg_vector_sp = OptionArgVectorSP (new OptionArgVector); -CommandObjectSP cmd_obj_sp = m_interpreter.GetCommandSPExact (cmd_obj.GetCommandName(), false); - -if (!CommandInterpreter::CommandAlias::ProcessAliasOptionsArgs (cmd_obj_sp, raw_command_string.c_str(), option_arg_vector_sp)) -{ -result.AppendError ("Unable to create requested alias.\n"); -result.SetStatus (eReturnStatusFailed); -return false; -} - -// Create the alias -if (m_interpreter.AliasExists (alias_command.c_str()) -|| m_interpreter.UserCommandExists (alias_command.c_str())) -{ -result.AppendWarningWithFormat ("Overwriting existing definition for '%s'.\n", -alias_command.c_str()); -} - -if (cmd_obj_sp) +if (CommandObjectSP cmd_obj_sp = m_interpreter.GetCommandSPExact (cmd_obj.GetCommandName(), false)) { -m_interpreter.AddAlias (alias_command.c_str(), cmd_obj_sp, option_arg_vector_sp); -r
[Lldb-commits] [lldb] r262913 - Use .c_str() here to unbreak the Linux build
Author: enrico Date: Mon Mar 7 23:57:52 2016 New Revision: 262913 URL: http://llvm.org/viewvc/llvm-project?rev=262913&view=rev Log: Use .c_str() here to unbreak the Linux build Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=262913&r1=262912&r2=262913&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Mar 7 23:57:52 2016 @@ -461,7 +461,7 @@ CommandInterpreter::Initialize () AddAlias ("run", cmd_obj_sp, "--shell-expand-args true --"); #else StreamString defaultshell; -defaultshell.Printf("--shell=%s --", HostInfo::GetDefaultShell().GetPath()); +defaultshell.Printf("--shell=%s --", HostInfo::GetDefaultShell().GetPath().c_str()); AddAlias ("r", cmd_obj_sp, defaultshell.GetData()); AddAlias ("run", cmd_obj_sp, defaultshell.GetData()); #endif ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r262914 - This is actually a FileSpec, so use .GetCString() instead
Author: enrico Date: Mon Mar 7 23:59:47 2016 New Revision: 262914 URL: http://llvm.org/viewvc/llvm-project?rev=262914&view=rev Log: This is actually a FileSpec, so use .GetCString() instead Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=262914&r1=262913&r2=262914&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Mar 7 23:59:47 2016 @@ -461,7 +461,7 @@ CommandInterpreter::Initialize () AddAlias ("run", cmd_obj_sp, "--shell-expand-args true --"); #else StreamString defaultshell; -defaultshell.Printf("--shell=%s --", HostInfo::GetDefaultShell().GetPath().c_str()); +defaultshell.Printf("--shell=%s --", HostInfo::GetDefaultShell().GetPath().GetCString()); AddAlias ("r", cmd_obj_sp, defaultshell.GetData()); AddAlias ("run", cmd_obj_sp, defaultshell.GetData()); #endif ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits