diff options
author | Doug Evans <dje@google.com> | 2014-10-02 13:07:40 -0700 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-10-02 13:07:40 -0700 |
commit | d48ba5e8cff2938038cdb53aabff4ddc79ddc172 (patch) | |
tree | 319c7e1d0a09250282f61f417f39c6632f999655 /gdb/testsuite/gdb.base/structs.c | |
parent | 2278c276a887b12b85ae30d63c446bf45a3bfd9f (diff) | |
download | binutils-d48ba5e8cff2938038cdb53aabff4ddc79ddc172.zip binutils-d48ba5e8cff2938038cdb53aabff4ddc79ddc172.tar.gz binutils-d48ba5e8cff2938038cdb53aabff4ddc79ddc172.tar.bz2 |
gdb.base/structs.c (main): Don't run forever.
gdb/testsuite/ChangeLog:
* gdb.base/structs.c (main): Don't run forever.
Diffstat (limited to 'gdb/testsuite/gdb.base/structs.c')
-rw-r--r-- | gdb/testsuite/gdb.base/structs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.base/structs.c b/gdb/testsuite/gdb.base/structs.c index 60772bb..d0b69a8 100644 --- a/gdb/testsuite/gdb.base/structs.c +++ b/gdb/testsuite/gdb.base/structs.c @@ -425,12 +425,14 @@ int main() Fun17(foo17); Fun18(foo18); - /* An infinite loop that first clears all the variables and then + /* An (almost-)infinite loop that first clears all the variables and then calls each function. This "hack" is to make testing random functions easier - "advance funN" is guaranteed to have always - been preceded by a global variable clearing zed call. */ + been preceded by a global variable clearing zed call. + We don't let this run forever in case gdb crashes while testing, + we don't want to be left eating all cpu on the user's system. */ - while (1) + for (i = 0; i < 1000000; ++i) { zed (); L1 = fun1(); |