Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: sami wagiaalla <swagiaal@redhat.com>
Cc: Ulrich Weigand <uweigand@de.ibm.com>, gdb-patches@sourceware.org
Subject: Re: [patch] smart pointer support
Date: Fri, 06 Aug 2010 22:20:00 -0000	[thread overview]
Message-ID: <m3hbj7qt7w.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4C5C7FAB.2090005@redhat.com> (sami wagiaalla's message of "Fri,	06 Aug 2010 17:33:31 -0400")

>>>>> "Sami" == sami wagiaalla <swagiaal@redhat.com> writes:

Sami> Great!.. Thanks for the pointers. I am not going to be working on that
Sami> bug right away, but I will add a pointer to this discussion in case
Sami> someone else picks it up by the time I get to it.

Thanks.

This is looking good.

Sami> +	      if (exp->language_defn->la_language == language_cplus)
Sami> +		{
Sami> +		  while (unop_user_defined_p(op, arg2))

Space before paren.

Also, I don't think the language_cplus check should be needed.
None of the other calls to unop_user_defined_p are gated that way.

Sami> +		      struct value *value = value_x_unop (arg2, op, noside);
Sami> +		      if (value)
Sami> +			arg2 = value;

This seems strange.  When can the result here be NULL?  And what does
that mean?  It seems like this either ought to be impossible, or it
should be an error of some kind.

Sami> +      if (exp->language_defn->la_language == language_cplus)
Sami> +	{
Sami> +	  while ((unop_user_defined_p(op, arg1)))
Sami> +	    {
Sami> +	      struct value *value = value_x_unop (arg1, op, noside);
Sami> +	      if (value)
Sami> +		arg1 = value;

Same notes as above :)

Sami> +++ b/gdb/testsuite/gdb.cp/smartp.cc

We haven't been super diligent about this -- but please put a GPL header
on this file.

Sami> +if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
Sami> +    untested "Couldn't compile test program"
Sami> +    return -1
Sami> +}
Sami> +
Sami> +# Get things started.
Sami> +
Sami> +gdb_exit
Sami> +gdb_start
Sami> +gdb_reinitialize_dir $srcdir/$subdir
Sami> +gdb_load ${binfile}

I think prepare_for_testing can be used here.

Tom


  reply	other threads:[~2010-08-06 22:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 15:58 sami wagiaalla
2010-07-23 23:37 ` Tom Tromey
2010-08-05 18:46   ` sami wagiaalla
2010-08-05 22:57     ` Ulrich Weigand
2010-08-06 16:23       ` sami wagiaalla
2010-08-06 16:48         ` Ulrich Weigand
2010-08-06 17:29           ` Tom Tromey
2010-08-08 15:01             ` Ulrich Weigand
2010-08-06 21:33           ` sami wagiaalla
2010-08-06 22:20             ` Tom Tromey [this message]
2010-08-09 15:59               ` sami wagiaalla
2010-08-09 17:35                 ` Tom Tromey
2010-08-09 18:04                   ` sami wagiaalla
2010-08-09 18:23                     ` Jan Kratochvil
2010-08-16 20:31                       ` sami wagiaalla
2010-08-16 20:59                         ` Pedro Alves
2010-08-17 16:16                           ` sami wagiaalla
2010-08-17 17:15                             ` Tom Tromey
2010-10-19 20:55                               ` sami wagiaalla

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=m3hbj7qt7w.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=swagiaal@redhat.com \
    --cc=uweigand@de.ibm.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