summaryrefslogtreecommitdiffstats
path: root/lldb/test
diff options
context:
space:
mode:
authorTodd Fiala <tfiala@google.com>2014-01-16 21:22:11 +0000
committerTodd Fiala <tfiala@google.com>2014-01-16 21:22:11 +0000
commita475693947498ff605781f9e66f2128bc19eb3a9 (patch)
tree009e678f4fbf74cdc2abe3a914a305eb17cc12dd /lldb/test
parent4557a156e382fdd829a390ee9b41a1db7a8d6f9f (diff)
downloadbcm5719-llvm-a475693947498ff605781f9e66f2128bc19eb3a9.tar.gz
bcm5719-llvm-a475693947498ff605781f9e66f2128bc19eb3a9.zip
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). llvm-svn: 199426
Diffstat (limited to 'lldb/test')
-rw-r--r--lldb/test/functionalities/thread/thread_specific_break/Makefile1
-rw-r--r--lldb/test/functionalities/thread/thread_specific_break/main.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/lldb/test/functionalities/thread/thread_specific_break/Makefile b/lldb/test/functionalities/thread/thread_specific_break/Makefile
index b09a579159d..332ca7c619c 100644
--- a/lldb/test/functionalities/thread/thread_specific_break/Makefile
+++ b/lldb/test/functionalities/thread/thread_specific_break/Makefile
@@ -1,5 +1,6 @@
LEVEL = ../../../make
C_SOURCES := main.c
+LD_EXTRAS := -lpthread
include $(LEVEL)/Makefile.rules
diff --git a/lldb/test/functionalities/thread/thread_specific_break/main.c b/lldb/test/functionalities/thread/thread_specific_break/main.c
index ea1bb7e60a6..2123a3121c9 100644
--- a/lldb/test/functionalities/thread/thread_specific_break/main.c
+++ b/lldb/test/functionalities/thread/thread_specific_break/main.c
@@ -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;
OpenPOWER on IntegriCloud