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

Unified Diff: gdb/testsuite/gdb.reverse/solib-reverse.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.reverse/solib-precsave.exp ('k') | gdb/testsuite/gdb.reverse/solib-reverse.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.reverse/solib-reverse.c
diff --git a/gdb/testsuite/gdb.reverse/solib-reverse.c b/gdb/testsuite/gdb.reverse/solib-reverse.c
index de924e012f2d3cad47bddb2b66aa1f8508fb8373..dd6627ce3be5a4bef76d18bd256004ab561624c6 100644
--- a/gdb/testsuite/gdb.reverse/solib-reverse.c
+++ b/gdb/testsuite/gdb.reverse/solib-reverse.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2012 Free Software Foundation, Inc.
+ Copyright 2009-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
@@ -15,28 +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/>. */
-/* Test reverse debugging of shared libraries. */
+/* Test reverse debugging of shared libraries.
-#include <stdio.h>
+ N.B. Do not call system routines here, we don't want to have to deal with
+ whether or not there is debug info present for them. */
-/* Shared library function */
-extern int shr2(int);
+#include "shr.h"
int main ()
{
char* cptr = "String 1";
int b[2] = {5,8};
+ /* Call these functions once before we start testing so that they get
+ resolved by the dynamic loader. If the system has debug info for
+ the dynamic loader installed, reverse-stepping for the first call
+ will otherwise stop in the dynamic loader, which is not what we want. */
+ shr1 ("");
+ shr2 (0);
+
b[0] = shr2(12); /* begin part two */
b[1] = shr2(17); /* middle part two */
b[0] = 6; b[1] = 9; /* generic statement, end part two */
- printf ("message 1\n"); /* printf one */
- printf ("message 2\n"); /* printf two */
- printf ("message 3\n"); /* printf three */
- sleep (0); /* sleep one */
- sleep (0); /* sleep two */
- sleep (0); /* sleep three */
+
+ shr1 ("message 1\n"); /* shr1 one */
+ shr1 ("message 2\n"); /* shr1 two */
+ shr1 ("message 3\n"); /* shr1 three */
return 0; /* end part one */
} /* end of main */
« no previous file with comments | « gdb/testsuite/gdb.reverse/solib-precsave.exp ('k') | gdb/testsuite/gdb.reverse/solib-reverse.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698