[RFA]: Test for PR/1236
Andrew Cagney
cagney@gnu.org
Mon Nov 24 21:02:00 GMT 2003
> +#
> +# Break on multiply defined method (PR objc/1236)
> +#
> +set name "break on non-debuggable method"
> +send_gdb "break someMethod\n"
> +gdb_expect {
> + -re "\\\[0\\\] cancel.*\\\[1\\\] all.*\\\[2\\\]\[ \]+-.NonDebug someMethod.*\\\[3\\\]\[ \]+-.NonDebug2 someMethod.*" {
> + send_gdb "2\n"
> + exp_continue
> + }
> + -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+.*" { pass $name }
> + -re ".*$gdb_prompt $" { fail $name }
> + timeout { fail "$name (timeout)" }
> +}
David, Daniel, does exp_continue work with gdb_test_multiple?
Adam, if it does, it's a better alternative (as I learn't not two days
ago :-).
Anyway, use:
kfail gdb/1236 "$name"
for the known fail path. Otherwize, feel free to commit the more the
better :-)
Andrew
> Index: testsuite/gdb.objc/nondebug.m
> ===================================================================
> RCS file: testsuite/gdb.objc/nondebug.m
> diff -N testsuite/gdb.objc/nondebug.m
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ testsuite/gdb.objc/nondebug.m 14 Nov 2003 03:46:27 -0000
> @@ -0,0 +1,38 @@
> +#include <objc/Object.h>
> +
> +@interface NonDebug: Object
> +{
> +}
> +@end
> +@interface NonDebug2: Object
> +{
> +}
> +@end
> +
> +@implementation NonDebug
> +
> +- someMethod
> +{
> + printf("method someMethod\n");
> + return self;
> +}
> +
> +@end
> +@implementation NonDebug2
> +
> +- someMethod
> +{
> + printf("method2 someMethod\n");
> + return self;
> +}
> +
> +@end
> +
> +
> +int main (int argc, const char *argv[])
> +{
> + id obj;
> + obj = [NonDebug new];
> + [obj someMethod];
> + return 0;
> +}
More information about the Gdb-patches
mailing list