Re: gdb.objc/objcdecode.exp test error..

Joel Brobecker
2009-09-23T23:13:25Z

Matt,

> attached are new tests, and patches for the bug,

I'm only going to look at the testcase patch for now, since it appears
that the code patches are not ready yet (they fix your issues, but
at the price of breaking other things, right?). We can work on the
code patches separately (but, if you don't mind, summarize again what
the issues are all about, because i'm having a tough time going through
the scattered emails).

2009-03-05 Matt Rice <ratmice@gmail.com>

* gdb.objc/objcdecode.exp: Set the multiple symbols found behaviour
to ask for the original test. Add tests for the multiple symbols
found behaviour of all.

> +do_objc_tests

I know it's not your fault, but it's definitely a misleading name for
a routine that simple restarts the debugger... Would you mind renaming
it to something more meaningful? I noticed also that a couple of global
declarations are not referenced from that routine, and so can be
removed: objdir and gdb_prompt.

Thanks! :)

> +gdb_test "set multiple-symbols all after main" ""

Uh oh, looks like you merged the command being sent to GDB with
the description of the test :)

> +gdb_test_multiple "break multipleDef" $name \
> +{
> + -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*\r\nBreakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*\r\n$gdb_prompt $" { pass $name }
> + -re ".*$gdb_prompt $" { fail $name }
> +}

The following can be simplified into a simple call to gdb_test, no?
Also, please consider adding a call to setup_kfail if we expect
the test to fail with the current sources. This is true of most if not
all the tests that are you adding.

> +gdb_exit
> +do_objc_tests

The call to gdb_exit before do_objc_tests is unnecessary.

> +gdb_exit
> +return 0

I don't think that this is necessary. All scripts do a little bit of
cleanup before starting the meat of the testcase, so let's not do double
pollution...

--
Joel