Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Adam Fedor <fedor@doc.com>,
	David Carlton <carlton@math.stanford.edu>,
	Daniel Jacobowitz <drow@mvista.com>
Cc: "gdb-patches@sources.redhat.com" <gdb-patches@sources.redhat.com>
Subject: Re: [RFA]: Test for PR/1236
Date: Mon, 24 Nov 2003 21:02:00 -0000	[thread overview]
Message-ID: <3FC271F0.9000706@gnu.org> (raw)
In-Reply-To: <1069643885.20972.18.camel@localhost.localdomain>


> +#
> +# 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;
> +}



  reply	other threads:[~2003-11-24 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-24  3:18 Adam Fedor
2003-11-24 21:02 ` Andrew Cagney [this message]
2003-11-24 21:04   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FC271F0.9000706@gnu.org \
    --to=cagney@gnu.org \
    --cc=carlton@math.stanford.edu \
    --cc=drow@mvista.com \
    --cc=fedor@doc.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox