* gdb.base/miscexprs.c (main): Add usage of preprocessor
symbol `STORAGE' to allow to choose the storage class of the local datastructures. * gdb.base/miscexprs.exp: Handle setting a `-DSTORAGE=...' compiler directive.
This commit is contained in:
parent
b433d00bbc
commit
aaa68313b8
3 changed files with 26 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2001-10-31 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
|
* gdb.base/miscexprs.c (main): Add usage of preprocessor
|
||||||
|
symbol `STORAGE' to allow to choose the storage class of
|
||||||
|
the local datastructures.
|
||||||
|
* gdb.base/miscexprs.exp: Handle setting a `-DSTORAGE=...'
|
||||||
|
compiler directive.
|
||||||
|
|
||||||
2001-10-30 Michael Snyder <msnyder@redhat.com>
|
2001-10-30 Michael Snyder <msnyder@redhat.com>
|
||||||
|
|
||||||
* gdb.base/jump.exp: Allow it to run for all targets.
|
* gdb.base/jump.exp: Allow it to run for all targets.
|
||||||
|
|
|
@ -7,27 +7,27 @@ marker1 ()
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
struct {
|
STORAGE struct {
|
||||||
char c[100];
|
char c[100];
|
||||||
} cbig;
|
} cbig;
|
||||||
|
|
||||||
struct {
|
STORAGE struct {
|
||||||
int i[800];
|
int i[800];
|
||||||
} ibig;
|
} ibig;
|
||||||
|
|
||||||
struct {
|
STORAGE struct {
|
||||||
long l[900];
|
long l[900];
|
||||||
} lbig;
|
} lbig;
|
||||||
|
|
||||||
struct {
|
STORAGE struct {
|
||||||
float f[200];
|
float f[200];
|
||||||
} fbig;
|
} fbig;
|
||||||
|
|
||||||
struct {
|
STORAGE struct {
|
||||||
double d[300];
|
double d[300];
|
||||||
} dbig;
|
} dbig;
|
||||||
|
|
||||||
struct {
|
STORAGE struct {
|
||||||
short s[400];
|
short s[400];
|
||||||
} sbig;
|
} sbig;
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,17 @@ if $tracelevel then {
|
||||||
strace $tracelevel
|
strace $tracelevel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# By default, the datastructures are allocated on the stack. For targets
|
||||||
|
# with very small stack, that will not work. In that case, just set
|
||||||
|
# storage to `-DSTORAGE=static' which changes the datastructures to be
|
||||||
|
# allocated in data segment.
|
||||||
|
set storage "-DSTORAGE="
|
||||||
|
if [target_info exists gdb,small_stack_section] {
|
||||||
|
set storage "-DSTORAGE=static"
|
||||||
|
}
|
||||||
|
|
||||||
|
set additional_flags "additional_flags=-w ${storage}"
|
||||||
|
|
||||||
#
|
#
|
||||||
# test running programs
|
# test running programs
|
||||||
#
|
#
|
||||||
|
@ -40,7 +51,7 @@ set testfile "miscexprs"
|
||||||
set srcfile ${testfile}.c
|
set srcfile ${testfile}.c
|
||||||
set binfile ${objdir}/${subdir}/${testfile}
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
|
|
||||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ${additional_flags}]] != "" } {
|
||||||
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue