[Lldb-commits] [lldb] r192024 - Fix a few errors found when building lldb with newer versions of clang.
Jason Molenda
jmolenda at apple.com
Fri Oct 4 19:52:22 PDT 2013
Author: jmolenda
Date: Fri Oct 4 21:52:22 2013
New Revision: 192024
URL: http://llvm.org/viewvc/llvm-project?rev=192024&view=rev
Log:
Fix a few errors found when building lldb with newer versions of clang.
<rdar://problem/15148224>
Modified:
lldb/trunk/include/lldb/lldb-versioning.h
lldb/trunk/tools/debugserver/source/DNB.cpp
lldb/trunk/tools/debugserver/source/RNBRemote.cpp
Modified: lldb/trunk/include/lldb/lldb-versioning.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-versioning.h?rev=192024&r1=192023&r2=192024&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-versioning.h (original)
+++ lldb/trunk/include/lldb/lldb-versioning.h Fri Oct 4 21:52:22 2013
@@ -1604,4 +1604,4 @@
#define LLDB_API_DEPRECATED_IN_DOT_99
#endif // defined(LLDB_CHECK_API_VERSIONING) && defined(LLDB_API_MAJOR_VERSION_WANTED) && defined(LLDB_API_MINOR_VERSION_WANTED) && defined (LLDB_API_MAJOR_VERSION)
-#endif // LLDB_lldb_versioning_h_
\ No newline at end of file
+#endif // LLDB_lldb_versioning_h_
Modified: lldb/trunk/tools/debugserver/source/DNB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNB.cpp?rev=192024&r1=192023&r2=192024&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNB.cpp (original)
+++ lldb/trunk/tools/debugserver/source/DNB.cpp Fri Oct 4 21:52:22 2013
@@ -165,9 +165,10 @@ waitpid_thread (void *arg)
static bool
spawn_waitpid_thread (pid_t pid)
{
- pthread_t thread = THREAD_NULL;
- ::pthread_create (&thread, NULL, waitpid_thread, (void *)(intptr_t)pid);
- if (thread != THREAD_NULL)
+ pthread_t thread;
+ int ret = ::pthread_create (&thread, NULL, waitpid_thread, (void *)(intptr_t)pid);
+ // pthread_create returns 0 if successful
+ if (ret == 0)
{
::pthread_detach (thread);
return true;
Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=192024&r1=192023&r2=192024&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Fri Oct 4 21:52:22 2013
@@ -815,7 +815,7 @@ best_guess_cpu_type ()
(end of string). */
std::vector<uint8_t>
-decode_binary_data (const char *str, int len)
+decode_binary_data (const char *str, size_t len)
{
std::vector<uint8_t> bytes;
if (len == 0)
@@ -1253,7 +1253,7 @@ RNBRemote::HandlePacket_A (const char *p
return HandlePacket_ILLFORMED (__FILE__, __LINE__, p, "Null packet for 'A' pkt");
}
p++;
- if (p == '\0' || !isdigit (*p))
+ if (*p == '\0' || !isdigit (*p))
{
return HandlePacket_ILLFORMED (__FILE__, __LINE__, p, "arglen not specified on 'A' pkt");
}
More information about the lldb-commits
mailing list