summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Interpreter/Args.cpp17
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp3
2 files changed, 12 insertions, 8 deletions
diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp
index bc9c32a3e04..2ffb8235430 100644
--- a/lldb/source/Interpreter/Args.cpp
+++ b/lldb/source/Interpreter/Args.cpp
@@ -848,6 +848,7 @@ Args::StringToBoolean (const char *s, bool fail_value, bool *success_ptr)
bool
Args::StringToBoolean(llvm::StringRef ref, bool fail_value, bool *success_ptr)
{
+ ref = ref.trim();
if (ref.equals_lower("false") ||
ref.equals_lower("off") ||
ref.equals_lower("no") ||
@@ -1125,14 +1126,14 @@ Args::StringToGenericRegister(llvm::StringRef s)
.Case("fp", LLDB_REGNUM_GENERIC_FP)
.Cases("ra", "lr", LLDB_REGNUM_GENERIC_RA)
.Case("flags", LLDB_REGNUM_GENERIC_FLAGS)
- .Case("arg1\0", LLDB_REGNUM_GENERIC_ARG1)
- .Case("arg2\0", LLDB_REGNUM_GENERIC_ARG2)
- .Case("arg3\0", LLDB_REGNUM_GENERIC_ARG3)
- .Case("arg4\0", LLDB_REGNUM_GENERIC_ARG4)
- .Case("arg5\0", LLDB_REGNUM_GENERIC_ARG5)
- .Case("arg6\0", LLDB_REGNUM_GENERIC_ARG6)
- .Case("arg7\0", LLDB_REGNUM_GENERIC_ARG7)
- .Case("arg8\0", LLDB_REGNUM_GENERIC_ARG8)
+ .Case("arg1", LLDB_REGNUM_GENERIC_ARG1)
+ .Case("arg2", LLDB_REGNUM_GENERIC_ARG2)
+ .Case("arg3", LLDB_REGNUM_GENERIC_ARG3)
+ .Case("arg4", LLDB_REGNUM_GENERIC_ARG4)
+ .Case("arg5", LLDB_REGNUM_GENERIC_ARG5)
+ .Case("arg6", LLDB_REGNUM_GENERIC_ARG6)
+ .Case("arg7", LLDB_REGNUM_GENERIC_ARG7)
+ .Case("arg8", LLDB_REGNUM_GENERIC_ARG8)
.Default(LLDB_INVALID_REGNUM);
return result;
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index ebeba059f36..8cfe331ee16 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1814,7 +1814,10 @@ GDBRemoteCommunicationClient::GetWatchpointSupportInfo (uint32_t &num)
while (response.GetNameColonValue(name, value))
{
if (name.equals("num"))
+ {
value.getAsInteger(0, m_num_supported_hardware_watchpoints);
+ num = m_num_supported_hardware_watchpoints;
+ }
}
}
else
OpenPOWER on IntegriCloud