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

Unified Diff: gdb/testsuite/gdb.trace/tfile.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.trace/strace.exp ('k') | gdb/testsuite/gdb.trace/tfile.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.trace/tfile.c
diff --git a/gdb/testsuite/gdb.trace/tfile.c b/gdb/testsuite/gdb.trace/tfile.c
index 11c79d9b12a95010b8a7b9a85990b77497538353..3610086b52f0a0ea133cb64c382e49d645ecd8c4 100644
--- a/gdb/testsuite/gdb.trace/tfile.c
+++ b/gdb/testsuite/gdb.trace/tfile.c
@@ -1,3 +1,20 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2010-2013 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
/* This program does two things; it generates valid trace files, and
it can also be traced so as to test trace file creation from
GDB. */
@@ -13,12 +30,18 @@ char trbuf[1000];
char *trptr;
char *tfsizeptr;
+/* These globals are put in the trace buffer. */
+
int testglob = 31415;
int testglob2 = 271828;
+/* But these below are not. */
+
const int constglob = 10000;
+int nonconstglob = 14124;
+
int
start_trace_file (char *filename)
{
@@ -69,7 +92,7 @@ write_basic_trace_file (void)
int fd, int_x;
short short_x;
- fd = start_trace_file ("basic.tf");
+ fd = start_trace_file (TFILE_DIR "tfile-basic.tf");
/* The next part of the file consists of newline-separated lines
defining status, tracepoints, etc. The section is terminated by
@@ -154,7 +177,7 @@ write_error_trace_file (void)
int len = sizeof (made_up) - 1;
char *hex = alloca (len * 2 + 1);
- fd = start_trace_file ("error.tf");
+ fd = start_trace_file (TFILE_DIR "tfile-error.tf");
/* The next part of the file consists of newline-separated lines
defining status, tracepoints, etc. The section is terminated by
« no previous file with comments | « gdb/testsuite/gdb.trace/strace.exp ('k') | gdb/testsuite/gdb.trace/tfile.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698