mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
Reorganized GDB tests - base
This commit is contained in:
35
gdb/testsuite/gdb.base/nodebug.c
Normal file
35
gdb/testsuite/gdb.base/nodebug.c
Normal file
@@ -0,0 +1,35 @@
|
||||
/* Test that things still (sort of) work when compiled without -g. */
|
||||
|
||||
int dataglobal = 3; /* Should go in global data */
|
||||
static int datalocal = 4; /* Should go in local data */
|
||||
int bssglobal; /* Should go in global bss */
|
||||
static int bsslocal; /* Should go in local bss */
|
||||
|
||||
int
|
||||
inner (x)
|
||||
int x;
|
||||
{
|
||||
return 2 * x;
|
||||
}
|
||||
|
||||
static int
|
||||
middle (x)
|
||||
int x;
|
||||
{
|
||||
return 2 * inner (x);
|
||||
}
|
||||
|
||||
int
|
||||
top (x)
|
||||
int x;
|
||||
{
|
||||
return 2 * middle (x);
|
||||
}
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
return top (argc);
|
||||
}
|
||||
Reference in New Issue
Block a user