From: Andrew STUBBS <andrew.stubbs@st.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: MI problem
Date: Fri, 18 Nov 2005 17:33:00 -0000 [thread overview]
Message-ID: <437DFE96.9050606@st.com> (raw)
In-Reply-To: <20051118155426.GB9846@nevyn.them.org>
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
> How about we commit this without the current_interp_named_p change for
> now? Normally we'd need to use a cleanup to save and restore uiout,
> but nothing here can throw exceptions AFAICT, so we're OK with the way
> you've done it.
OK, I'm happy to do that.
Am I OK to commit the attached to both branches?
Andrew
[-- Attachment #2: mi-load-crash.patch --]
[-- Type: text/plain, Size: 1270 bytes --]
2005-11-18 Andrew Stubbs <andrew.stubbs@st.com>
* mi/mi-main.c (mi_load_progress): Ensure the use of the correct mi
uiout for the duration of the function.
Index: src/gdb/mi/mi-main.c
===================================================================
--- src.orig/gdb/mi/mi-main.c 2005-11-17 19:47:42.000000000 +0000
+++ src/gdb/mi/mi-main.c 2005-11-18 16:16:38.000000000 +0000
@@ -1365,9 +1365,18 @@ mi_load_progress (const char *section_na
static struct timeval last_update;
static char *previous_sect_name = NULL;
int new_section;
+ struct ui_out *saved_uiout;
- if (!current_interp_named_p (INTERP_MI)
- && !current_interp_named_p (INTERP_MI1))
+ /* This function is called through deprecated_show_load_progress
+ which means uiout may not be correct. Fix it for the duration
+ of this function. */
+ saved_uiout = uiout;
+
+ 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;
update_threshold.tv_sec = 0;
@@ -1424,6 +1433,9 @@ mi_load_progress (const char *section_na
fputs_unfiltered ("\n", raw_stdout);
gdb_flush (raw_stdout);
}
+
+ xfree (uiout);
+ uiout = saved_uiout;
}
void
next prev parent reply other threads:[~2005-11-18 16:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4378DDB4.3020702@st.com>
[not found] ` <20051117042008.GE3513@nevyn.them.org>
2005-11-17 19:53 ` Andrew STUBBS
2005-11-18 17:12 ` Daniel Jacobowitz
2005-11-18 17:33 ` Andrew STUBBS [this message]
2005-11-18 18:19 ` Daniel Jacobowitz
2005-11-18 19:21 ` Andrew STUBBS
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=437DFE96.9050606@st.com \
--to=andrew.stubbs@st.com \
--cc=drow@false.org \
--cc=gdb-patches@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