This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Michael, Incorporated your comments. Thanks ----- manjo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Cognito ergo sum + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ On Fri, 27 Aug 2004, Michael Snyder wrote: > Manoj Iyer wrote: > > I have attached two modified versions of my new thread testcase. > > > > - version 1 > > incorporates Michael Chastain's suggestions and it includes > > the step and backtrace tests from the thread fucntion. > > > > -version 2 > > incorporates Michael Snyder suggestion to remove the step and backtrace > > tests from the testcase. > > > > Please let me know which one you like and any other comments or changes. > > ChangeLog is pasted at the begning of the patch. > > Version 2 is OK as is, if you're tired of messing with it. > You didn't have to remove the backtrace, though, if you'd > like to keep that. > > Also, > > > +# > > +# > > +# continue to tf() breakpoint #2 > > +# > > +gdb_test_multiple "continue\n" "continue to thread fucntion breakpoint #2" { > > + -re ".*Breakpoint 2.*tf.* at .*tbug.* .*\r\n.*$gdb_prompt $" { > > + pass "continue to tf"; > > + } > > + -re ".*$gdb_prompt $" { > > + fail "continue to tf"; > > + return 1; > > + } > > +} > > I think this could be simplified to: > gdb_test "continue" \ > "Breakpoint 2.*tf.* at .*tbug.*" \ > "continue to tf" > > Similarly, your backtrace test could be as simple as: > gdb_test "backtrace" \ > "#0 .*tf .*at .*tbug.*" \ > "backtrace from thread function" > > I don't think you can predict what will be on any > higher frames, but you could test the current frame > and make sure backtrace didn't just die or show you > the wrong thread. > > > > + > > + > > +# > > +# delete all breakpoints > > +# > > +send_gdb "delete\n" > > +gdb_expect { > > + -re "Delete all breakpoint.*$gdb_prompt $" { > > + send_gdb "y\n" > > For this, all you need is the existing procedure call: > > delete_breakpoints > > > >
Attachment:
gdb.newtest.version3.patch
Description: GDB thread testcase
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |