diff options
author | Kevin Buettner <kevinb@redhat.com> | 2000-03-21 23:01:49 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2000-03-21 23:01:49 +0000 |
commit | b9593231040a8f205ba9c28181e67540a592ff44 (patch) | |
tree | cf40340f49c5f585e842388b24da893ee1e69a8d /gdb/testsuite/gdb.base/pointers.c | |
parent | 62557bbcee534198d6ff23d66d912ba256c94def (diff) | |
download | gdb-b9593231040a8f205ba9c28181e67540a592ff44.zip gdb-b9593231040a8f205ba9c28181e67540a592ff44.tar.gz gdb-b9593231040a8f205ba9c28181e67540a592ff44.tar.bz2 |
Test suite change for AIX 4.3.
Diffstat (limited to 'gdb/testsuite/gdb.base/pointers.c')
-rw-r--r-- | gdb/testsuite/gdb.base/pointers.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/gdb/testsuite/gdb.base/pointers.c b/gdb/testsuite/gdb.base/pointers.c index a6f0062..7a41552 100644 --- a/gdb/testsuite/gdb.base/pointers.c +++ b/gdb/testsuite/gdb.base/pointers.c @@ -71,36 +71,29 @@ float ** ptr_to_ptr_to_float; int y; +/* Do nothing function used for forcing some of the above variables to + be referenced by the program source. If the variables are not + referenced, some linkers will remove the symbol from the symbol + table making it impossible to refer to the variable in gdb. */ +void usevar (void *var) {} + int main () { - void dummy(); - int more_code(); - - /* Ensure that malloc is a pointer type; avoid use of "void" and any include files. */ - /* extern char *malloc();*/ - - /* void *malloc(size_t);*/ - - - + void dummy(); + int more_code(); + #ifdef usestubs set_debug_traps(); breakpoint(); #endif dummy(); -/* v_int_pointer2 = &v_int_pointer; - v_unsigned_int_pointer = &v_int; - - y = (v_unsigned_int_pointer == v_double_pointer); - - x = v_unsigned_int_pointer * v_double_pointer; - - v_unsigned_int_pointer = v_double_pointer; - - v_unsigned_int_pointer = v_unsigned_int;*/ more_code (); + usevar (&v_int_pointer2); + usevar (&rptr); + usevar (&y); + return 0; } |