public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <kseitz@firetalk.com>
To: Braxton Thomason <brax@ieeecs.ece.utexas.edu>
Cc: insight@sourceware.cygnus.com
Subject: Re: GDB Console Q
Date: Thu, 02 Mar 2000 09:34:00 -0000	[thread overview]
Message-ID: <38BEA619.187D94EF@firetalk.com> (raw)
In-Reply-To: <Pine.LNX.3.96.1000302111154.22030B-100000@ieeecs.ece.utexas.edu>

Braxton Thomason wrote:
> 
> Actually, that was not quite the problem.  I didnt make myself clear,
> sorry. :)  The _real_ problem is this:
> 
> (gdb) n
> 6: currentStage->mName.mName.dat = 0x20004398 "Execute"
> (gdb)
> 
> and so on is the "normal" behavior, and I get the output on my xterm.
> Thats fine.  The problem arises sometimes when I press run in the GUI, I
> get this behavior from my GDB console:
> 
> (gdd) n
> (gdb) print foo
> (gdb) info breakpoints
> (gdb) info display
> (gdb) display foo
> (gdb) //ARG!!!!! NOThING!!

Ugh. You mean _that_ problem. :-( This can happen in gdbtk because, as
you may or may not know, there is no API for things like GUIs in gdb. As
a result, we had to resort to all sorts of heinous little hacks to get
information out of gdb -- like the values of variables.

The problem you see is a result of something like this. Deep down, gdbtk
is re-routing all calls to *printf_(un)formatted to the console window
(via fput_unfiltered_hook). Some of gdbtk's subsystems (the variable
code, in particular) temporarily reset the fputs_unfiltered_hook so that
it can capture the output of some command. It is supposed to reset it
back to the previous value, but if an error occurs, it is possible that
this reset fails to happen. Your culprit is almost certainly the
variable code.

I believe that Jim threw something in as a safeguard against this not
too far in the past:

1999-08-27  James Ingham  <jingham@leda.cygnus.com>

        * gdbtk-cmds.c [snip]
        (gdb_restore_fputs): New function, restore the gdbtk_fputs hook,
        in case somebody supressed it, and then errored out before they
        got a chance to put it back.

Are you using a relatively recent version?

Keith
-- 
Why chat when you can Firetalk?
Firetalk ID: Keith (10320)
www.firetalk.com

  reply	other threads:[~2000-03-02  9:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-01 19:11 Braxton Thomason
2000-03-02  9:05 ` Keith Seitz
2000-03-02  9:15   ` Braxton Thomason
2000-03-02  9:34     ` Keith Seitz [this message]
2000-03-02  9:53 ` James Ingham
2000-03-02 10:10   ` James Ingham
2000-03-02 11:00     ` Braxton Thomason

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=38BEA619.187D94EF@firetalk.com \
    --to=kseitz@firetalk.com \
    --cc=brax@ieeecs.ece.utexas.edu \
    --cc=insight@sourceware.cygnus.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).