From: Yao Qi <qiyaoltc@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Yao Qi <qiyaoltc@gmail.com>,
gdb-patches@sourceware.org, Phil Muldoon <pmuldoon@redhat.com>
Subject: Re: [obv] compile-print.exp: xfail->kfail for '@' GDB array operator
Date: Fri, 05 Jun 2015 16:13:00 -0000 [thread overview]
Message-ID: <868ubynnfw.fsf@gmail.com> (raw)
In-Reply-To: <20150605124035.GA1995@host1.jankratochvil.net> (Jan Kratochvil's message of "Fri, 5 Jun 2015 14:40:35 +0200")
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 'compile print' should one day replace the standard 'print' command, like in
> LLDB. Otherwise 'compile print' makes no sense.
>
> Now we can argue whether the '@' GDB operator is useful or not but I think
> majority of GDB users considers it as useful.
'@' is useful in command print, and it is reasonable for me to replace
command print with 'compile print' one day, I agree on them. If gcc
doesn't accept '@', 'compile print' shouldn't as well, but 'print' can.
Command 'print' can be built on top of the 'compile print' stuff, with
extra functionality to transform '@' to a valid language form. Is it
possible?
Anyway, I suggest we consider support '@' when we really start
considering replace 'print' command with 'compile print' command. Once
we support '@' in 'compile print', we can't remove it. I am inclined to
postpone the decision to some time we really need it.
>> It will be really confusing if we add some other things (like '@' in this
>> case) which is out of the scope of the language.
>
> So why were these operators added to the GDB expression evaluator in the first
> place?
>
I don't know, but GDB expression (which supports '@') is not a language,
so it is flexible to add and remove operators. Commands 'compile XXX'
are different, because their input is source language, and IMO we
shouldn't add any extensions to the source language.
>
>> > - xfail "$test (gcc does not support '@')"
>> > + kfail compile/18489 "$test"
>>
>> I think xfail is correct as gcc doesn't support '@'.
>
> This does not match the original plan of the 'compile' project.
Where is the original plan?
https://sourceware.org/gdb/wiki/GCCCompileAndExecute is the only thing I
can find, but I don't see the anything about replacing command 'print' with
'compile print'.
--
Yao (齐尧)
next prev parent reply other threads:[~2015-06-05 16:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 19:38 Jan Kratochvil
2015-06-05 9:35 ` Yao Qi
2015-06-05 12:40 ` Jan Kratochvil
2015-06-05 15:19 ` Doug Evans
2015-06-05 15:26 ` Jan Kratochvil
2015-06-05 16:13 ` Yao Qi [this message]
2015-06-05 21:23 ` Jan Kratochvil
2015-06-05 13:24 ` Jan Kratochvil
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=868ubynnfw.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=pmuldoon@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