[Lldb-commits] [lldb] r199426 - Fix bug in Linux remote dynamic loader setup and fix test.
Todd Fiala
tfiala at google.com
Thu Jan 16 13:22:11 PST 2014
Author: tfiala
Date: Thu Jan 16 15:22:11 2014
New Revision: 199426
URL: http://llvm.org/viewvc/llvm-project?rev=199426&view=rev
Log:
Fix bug in Linux remote dynamic loader setup and fix test.
Part 1 changes PlatformLinux::CreateInstance to always create with
is_host=false; that method is only used as the plug-in creator method
associated with the remote-linux platform plugin, and should therefore
always be remote.
Part 1 patch by Steve Pucci.
Part 2: fix a test break on linux.
In test/functionalities/thread/thread_specific_break, when using gcc,
either C99 mode would need to be enabled, or the code would need to
change. I changed a couple loop variable definitions to conform
to pre-C99 to simplify testing the fix. The second issue was
the necessity to include -lpthread as a linker option in the Makefile.
Any issues with that part are due to me (Todd Fiala).
Modified:
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/test/functionalities/thread/thread_specific_break/Makefile
lldb/trunk/test/functionalities/thread/thread_specific_break/main.c
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=199426&r1=199425&r2=199426&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Thu Jan 16 15:22:11 2014
@@ -85,7 +85,7 @@ PlatformLinux::CreateInstance (bool forc
}
}
if (create)
- return new PlatformLinux(true);
+ return new PlatformLinux(false);
return NULL;
}
Modified: lldb/trunk/test/functionalities/thread/thread_specific_break/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/thread_specific_break/Makefile?rev=199426&r1=199425&r2=199426&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/thread_specific_break/Makefile (original)
+++ lldb/trunk/test/functionalities/thread/thread_specific_break/Makefile Thu Jan 16 15:22:11 2014
@@ -1,5 +1,6 @@
LEVEL = ../../../make
C_SOURCES := main.c
+LD_EXTRAS := -lpthread
include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/test/functionalities/thread/thread_specific_break/main.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/thread_specific_break/main.c?rev=199426&r1=199425&r2=199426&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/thread_specific_break/main.c (original)
+++ lldb/trunk/test/functionalities/thread/thread_specific_break/main.c Thu Jan 16 15:22:11 2014
@@ -24,14 +24,15 @@ main ()
pthread_t threads[10];
int thread_value = 0;
+ int i;
- for (int i = 0; i < 10; i++)
+ for (i = 0; i < 10; i++)
{
thread_value += 1;
pthread_create (&threads[i], NULL, &thread_function, &thread_value);
}
- for (int i = 0; i < 10; i++)
+ for (i = 0; i < 10; i++)
pthread_join (threads[i], NULL);
return 0;
More information about the lldb-commits
mailing list