| Index: gdb/testsuite/gdb.perf/backtrace.c
|
| diff --git a/gdb/testsuite/gdb.base/frame-args.c b/gdb/testsuite/gdb.perf/backtrace.c
|
| similarity index 67%
|
| copy from gdb/testsuite/gdb.base/frame-args.c
|
| copy to gdb/testsuite/gdb.perf/backtrace.c
|
| index bfcc7c3f3f648978e6151ab3d9c9c4de37109efe..958a23f199048168a93ff2e623b0722f94555743 100644
|
| --- a/gdb/testsuite/gdb.base/frame-args.c
|
| +++ b/gdb/testsuite/gdb.perf/backtrace.c
|
| @@ -1,6 +1,6 @@
|
| /* This testcase is part of GDB, the GNU debugger.
|
|
|
| - Copyright 2007-2012 Free Software Foundation, Inc.
|
| + Copyright (C) 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
|
| @@ -17,40 +17,38 @@
|
|
|
| struct s
|
| {
|
| - int a;
|
| - int b;
|
| + int a[256];
|
| + char c[256];
|
| };
|
|
|
| -union u
|
| -{
|
| - int a;
|
| - float b;
|
| -};
|
| -
|
| -enum color { red, green, blue };
|
| -
|
| static void
|
| -break_me (void)
|
| +fun2 (void)
|
| {
|
| +
|
| }
|
|
|
| static void
|
| -call_me (int i, float f, struct s s, struct s *ss, union u u, enum color e)
|
| +fun1 (int i, int j, long k, struct s ss)
|
| {
|
| - break_me ();
|
| + /* Allocate local variables on stack. */
|
| + struct s s1;
|
| +
|
| + if (i < BACKTRACE_DEPTH)
|
| + fun1 (i + 1, j + 2, k - 1, ss);
|
| + else
|
| + {
|
| + int ii;
|
| +
|
| + for (ii = 0; ii < 10; ii++)
|
| + fun2 ();
|
| + }
|
| }
|
|
|
| int
|
| main (void)
|
| {
|
| - struct s s;
|
| - union u u;
|
| -
|
| - s.a = 3;
|
| - s.b = 5;
|
| - u.a = 7;
|
| -
|
| - call_me (3, 5.0, s, &s, u, green);
|
| + struct s ss;
|
|
|
| + fun1 (0, 0, 200, ss);
|
| return 0;
|
| }
|
|
|