From: Daniel Jacobowitz <drow@false.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: GDB List <gdb@sources.redhat.com>
Subject: Re: MI problem
Date: Thu, 17 Nov 2005 04:20:00 -0000 [thread overview]
Message-ID: <20051117042008.GE3513@nevyn.them.org> (raw)
In-Reply-To: <4378DDB4.3020702@st.com>
On Mon, Nov 14, 2005 at 06:55:48PM +0000, Andrew STUBBS wrote:
> Hi all,
>
> When I run GDB with -i=mi1 I get a segmentation fault while running the
> 'load' command. (-i=mi2 works fine.)
>
> The fault occurs in ui_file_put() due to 'file' having no useful value.
> This value is taken from uiout.data->buffer (MI version of data).
>
> I have traced the 'source' of this rogue data to cli_interpreter_exec()
> which passes cli_uiout to safe_execute_command() which calls
> exceptions_state_mc_init() which changes the global uiout.
>
> The MI seems to be calling the CLI to interpret the 'load' command, but
> the CLI then clashes with the MI I/O routines causing the fault, in this
> case under generic_load().
>
> Here is a backtrace from where the uiout gets switched:
The interesting question isn't where it gets switched, but where we're
expecting the wrong contents. If we're accessing uiout.data->buffer
then we must have reached mi_out_put. So where from, and how did we
get there without switching the global uiout back to MI's?
mi_cmd_interpreter_exec ought to be doing that on the way out.
--
Daniel Jacobowitz
CodeSourcery, LLC
prev parent reply other threads:[~2005-11-17 4:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-14 18:58 Andrew STUBBS
2005-11-17 4:20 ` Daniel Jacobowitz [this message]
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=20051117042008.GE3513@nevyn.them.org \
--to=drow@false.org \
--cc=andrew.stubbs@st.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).