Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.dwarf2/pieces-optimized-out.S ('k') | gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c
diff --git a/gdb/testsuite/gdb.threads/corethreads.c b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c
similarity index 57%
copy from gdb/testsuite/gdb.threads/corethreads.c
copy to gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c
index e3c7c8c3bf70bbea79e099274254a40b542c6976..2bf9cf8e351a92e6b78081a3640927628e10a774 100644
--- a/gdb/testsuite/gdb.threads/corethreads.c
+++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c
@@ -1,4 +1,4 @@
-/* Copyright 2011-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -15,33 +15,33 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <pthread.h>
-#include <stdlib.h>
-#include <assert.h>
+/* This file is not actually compiled, the .S file is committed alongside
+ this file. The reason is that changes to the compiler might result
+ in different debug information being created, this could break the
+ test. */
-pthread_t thread0;
-pthread_t thread1;
-
-static void *
-start (void *arg)
+struct str
{
- assert (pthread_self () == thread1);
-
- abort ();
+ int a;
+ int b;
+ int c : 3;
+ int d : 3;
+};
+
+int __attribute__ ((noinline))
+foo (int arg)
+{
+ return arg;
}
int
-main (void)
+main ( void )
{
- int i;
-
- thread0 = pthread_self ();
+ struct str s = {5, 7, 1, 2};
+ int v;
- i = pthread_create (&thread1, NULL, start, NULL);
- assert (i == 0);
-
- i = pthread_join (thread1, NULL);
- assert (i == 0);
-
- return 0;
+ v = (s.a << 1);
+ v += foo (v);
+ return v + 5 + s.a;
}
+
« no previous file with comments | « gdb/testsuite/gdb.dwarf2/pieces-optimized-out.S ('k') | gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698