From: Fernando Nasser <fnasser@redhat.com>
To: gdb@sources.redhat.com
Subject: RFC: ui_out type?
Date: Mon, 30 Sep 2002 14:39:00 -0000 [thread overview]
Message-ID: <3D98C484.4030500@redhat.com> (raw)
The old assembler code would print:
0x8048153 <foostatic>: push %ebp
0x8048154 <foostatic+1>: mov %esp,%ebp
The new one prints:
0x08048153 <foostatic+0>: push %ebp
0x08048154 <foostatic+1>: mov %esp,%ebp
Note the "+0" in <foostatic+0>
This is because the output code is shared between the CLI and MI output and the
MI output version 1 is always expecting the "offset" keyword, even if it is zero
(based on the current MI tests).
Sometimes it is necessary to test if the uiout object is of a certain class. In
this case I would like to test if it is of the "cli" type and do not generate
the offset when it is zero. Some other types it will be necessary to check if
the object is of the "mi" type, because we will need to test which version of
the MI we are generating output for.
I have filled the gdb/774 asking for a function like that.
I am currently stuck with the disassembler unification because I either break a
CLI test by having the "+0" in there (looks ugly, also), or I break some MI
tests by not having the 'offset="0"' there.
Note: The MI output keywords are supposed to be optional, so not having an
offset keyword in the output would be fine (meaning that it is a zero offset).
But the current v1 tests, which have power of spec, currently look for it
explicitly. We should remove this from the v2 tests for the cases the offset is
zero, I believe.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
next reply other threads:[~2002-09-30 21:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-30 14:39 Fernando Nasser [this message]
2002-09-30 14:59 ` Daniel Jacobowitz
[not found] <1033503424.916.ezmlm@sources.redhat.com>
2002-10-01 13:39 ` Jim Ingham
2002-10-01 13:47 ` 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=3D98C484.4030500@redhat.com \
--to=fnasser@redhat.com \
--cc=gdb@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