From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb@sources.redhat.com
Subject: RE: mi_load_progress question
Date: Wed, 12 Jul 2006 09:33:00 -0000 [thread overview]
Message-ID: <17588.49586.825386.426144@kahikatea.snap.net.nz> (raw)
In-Reply-To: <200607121239.07906.vladimir@codesourcery.com>
Vladimir Prus writes:
>
> Hi,
> I see some strange logic in the mi_load_progress function (file mi/mi-main.c).
> That function is responsible for printing progress report when downloading
> program to target, and the code in question is:
>
> if (current_interp_named_p (INTERP_MI))
> uiout = mi_out_new (2);
> else if (current_interp_named_p (INTERP_MI1))
> uiout = mi_out_new (1);
> else
> return;
>
> When I run gdb with "--i=mi2", this code exists with "return", producing to
> progress information. Is this desired behaviour?
Looking through the change history, other values didn't exist when the original
code was written. So I guess it's not desired behaviour.
if (current_interp_named_p (INTERP_MI1))
uiout = mi_out_new (1);
else if (current_interp_named_p (INTERP_MI)
|| current_interp_named_p (INTERP_MI2))
uiout = mi_out_new (2);
else if (current_interp_named_p (INTERP_MI3))
uiout = mi_out_new (3);
else
return;
would work (until new MI levels are introduced!). It would be best to generalise
this and similar code to make it future proof.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2006-07-12 9:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-12 8:39 Vladimir Prus
2006-07-12 9:33 ` Nick Roberts [this message]
2006-07-12 14:04 ` Daniel Jacobowitz
2006-07-12 17:34 ` Jim Ingham
2006-07-13 6:47 ` Nick Roberts
2006-07-13 13:03 ` Daniel Jacobowitz
2006-07-13 22:45 ` Nick Roberts
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=17588.49586.825386.426144@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=gdb@sources.redhat.com \
--cc=vladimir@codesourcery.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