From: Doug Evans Date: Thu, 2 Oct 2014 20:07:40 +0000 (-0700) Subject: gdb.base/structs.c (main): Don't run forever. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d48ba5e8cff2938038cdb53aabff4ddc79ddc172;p=binutils-gdb.git gdb.base/structs.c (main): Don't run forever. gdb/testsuite/ChangeLog: * gdb.base/structs.c (main): Don't run forever. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 255e8563e35..fac6e076bdb 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-10-02 Doug Evans + + * gdb.base/structs.c (main): Don't run forever. + 2014-10-02 Pedro Alves * gdb.threads/manythreads.exp (interrupt_and_wait): New procedure. diff --git a/gdb/testsuite/gdb.base/structs.c b/gdb/testsuite/gdb.base/structs.c index 60772bb8d2b..d0b69a8aa5c 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();