public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Project Archer <archer@sourceware.org>,
	Chris Moller <cmoller@redhat.com>,
	Keith Seitz <keiths@redhat.com>
Subject: Re: [Keith Seitz] Re: [tools-team] Status 2008-09-01
Date: Thu, 03 Sep 2009 19:19:00 -0000	[thread overview]
Message-ID: <m31vmnhm58.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20090902214348.GA32564@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Wed, 2 Sep 2009 23:43:48 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> Just this is due the wrong printing defaults:
Jan> (gdb) p obj->num_
Jan> There is no member or method named num_.
Jan> (gdb) set print object on 
Jan> (gdb) p obj->num_
Jan> $1 = 2

I'm really surprised that "set print object" affects this.

It seems to me that this should always follow the language rules, and
that "obj->num_" should therefore be an error.  (I used to hold the
opposite position for Java, funnily enough, but I have come around.)

Instead I would expect this to work:

(gdb) set print object on
(gdb) print *obj
$1 = ... # something of type special_int_math
(gdb) print $.num_
$2 = whatever


That is, I think "set print object on" ought to affect the type of the
resulting history variable -- but not the type of any intermediate
values in an expression.

Jan> One should change this (+some other related options in
Jan> `user_print_options') and in some way fix the testsuite regressions
Jan> afterwards by one of:

I agree, we should change this default.

Tom

  reply	other threads:[~2009-09-03 19:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 19:44 Tom Tromey
2009-09-02 21:44 ` Jan Kratochvil
2009-09-03 19:19   ` Tom Tromey [this message]
2009-09-23 14:08 Dragos Tatulea
2009-09-25 18:40 ` Tom Tromey
2009-09-25 19:39   ` Dragos Tatulea
2009-09-25 20:45     ` Tom Tromey

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=m31vmnhm58.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    --cc=cmoller@redhat.com \
    --cc=jan.kratochvil@redhat.com \
    --cc=keiths@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).