public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* GDB Console Q
@ 2000-03-01 19:11 Braxton Thomason
  2000-03-02  9:05 ` Keith Seitz
  2000-03-02  9:53 ` James Ingham
  0 siblings, 2 replies; 7+ messages in thread
From: Braxton Thomason @ 2000-03-01 19:11 UTC (permalink / raw)
  To: insight

Has anyone had problems with the GDB console in Insight not displaying
anything after pressing the "Run" button in the GUI?  I am runing on AIX
4.3.2..

Wondering if I should follow it up, or forget it...

thanks,
brax.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDB Console Q
  2000-03-01 19:11 GDB Console Q Braxton Thomason
@ 2000-03-02  9:05 ` Keith Seitz
  2000-03-02  9:15   ` Braxton Thomason
  2000-03-02  9:53 ` James Ingham
  1 sibling, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2000-03-02  9:05 UTC (permalink / raw)
  To: Braxton Thomason; +Cc: insight

Braxton Thomason wrote:
> 
> Has anyone had problems with the GDB console in Insight not displaying
> anything after pressing the "Run" button in the GUI?  I am runing on AIX
> 4.3.2..
> 
> Wondering if I should follow it up, or forget it...

Ugh. This is a sad state of affairs... All console I/O for native
targets goes to the controlling xterminal where insight was launched. It
does NOT go to the console window. I had some code from Tom Tromey
(tromey@cygnus.com) that demonstrated how gdbtk/Insight could open a new
xterm for the child process, but I never got around to implementing it.
I kinda like the current behavior. (Whether that's because I really do
like it or because I am just used to it doing that is a mystery to me.
:-)

So, rest assured: what you are observing is "normal". (Now, if you don't
see your programs output in the xterm, that's another problem
altogether.)

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDB Console Q
  2000-03-02  9:05 ` Keith Seitz
@ 2000-03-02  9:15   ` Braxton Thomason
  2000-03-02  9:34     ` Keith Seitz
  0 siblings, 1 reply; 7+ messages in thread
From: Braxton Thomason @ 2000-03-02  9:15 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

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!!



?


thanks,
brax.


On Thu, 2 Mar 2000, Keith Seitz wrote:

> Braxton Thomason wrote:
> > 
> > Has anyone had problems with the GDB console in Insight not displaying
> > anything after pressing the "Run" button in the GUI?  I am runing on AIX
> > 4.3.2..
> > 
> > Wondering if I should follow it up, or forget it...
> 
> Ugh. This is a sad state of affairs... All console I/O for native
> targets goes to the controlling xterminal where insight was launched. It
> does NOT go to the console window. I had some code from Tom Tromey
> (tromey@cygnus.com) that demonstrated how gdbtk/Insight could open a new
> xterm for the child process, but I never got around to implementing it.
> I kinda like the current behavior. (Whether that's because I really do
> like it or because I am just used to it doing that is a mystery to me.
> :-)
> 
> So, rest assured: what you are observing is "normal". (Now, if you don't
> see your programs output in the xterm, that's another problem
> altogether.)
> 
> Keith
> -- 
> Why chat when you can Firetalk?
> Firetalk ID: Keith (10320)
> www.firetalk.com
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDB Console Q
  2000-03-02  9:15   ` Braxton Thomason
@ 2000-03-02  9:34     ` Keith Seitz
  0 siblings, 0 replies; 7+ messages in thread
From: Keith Seitz @ 2000-03-02  9:34 UTC (permalink / raw)
  To: Braxton Thomason; +Cc: insight

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDB Console Q
  2000-03-01 19:11 GDB Console Q Braxton Thomason
  2000-03-02  9:05 ` Keith Seitz
@ 2000-03-02  9:53 ` James Ingham
  2000-03-02 10:10   ` James Ingham
  1 sibling, 1 reply; 7+ messages in thread
From: James Ingham @ 2000-03-02  9:53 UTC (permalink / raw)
  To: Braxton Thomason; +Cc: insight

Braxton,

The GDB Console in Insight is not a exactly equivalent to the console
in command line gdb.  In particular, it does not intercept stdout &
stdin.  That is because we didn't want to have to write a full
terminal emulator in the Tk text widget.  Instead, program I/O still
goes to the console from which you launched gdb, which already knows
how to handle raw mode I/O, etc...  The Insight console is just used
for interactions with gdb.

Jim

 > Has anyone had problems with the GDB console in Insight not displaying
 > anything after pressing the "Run" button in the GUI?  I am runing on AIX
 > 4.3.2..
 > 
 > Wondering if I should follow it up, or forget it...
 > 
 > thanks,
 > brax.
 > 
 > 
 > 

-- 
++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
Jim Ingham                                              jingham@cygnus.com
Cygnus Solutions, a Red Hat Company                      

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDB Console Q
  2000-03-02  9:53 ` James Ingham
@ 2000-03-02 10:10   ` James Ingham
  2000-03-02 11:00     ` Braxton Thomason
  0 siblings, 1 reply; 7+ messages in thread
From: James Ingham @ 2000-03-02 10:10 UTC (permalink / raw)
  To: James Ingham; +Cc: Braxton Thomason, insight

Bad boy, read ALL mail before responding...

Anyway, Keith's explanation may be the ticket.  The way to test this
is to try running my little sanity proc, just do:

(gdb) tk gdb_restore_fputs

and if you get output again, then Keith is right, there was some error 
down in the guts of gdb.  The "tk" command just routes its arguments
to the Tcl interpreter hiding in Insight...

I have noticed a few of these in the variable subsystem, I stamped out
a few, but would not be suprised if more remain.  One thing you can
try is to set the environment variable

setenv GDBTK_DEBUG 2

Then when you next start up gdb, you will get a debug window that
spews out lots of output as gdb does its thing.  In here you may see
some suspicious output shortly before you lose output.  Cut & paste
that here, and it will give us a hand in figuring out what is going
on.

Jim


 > Braxton,
 > 
 > The GDB Console in Insight is not a exactly equivalent to the console
 > in command line gdb.  In particular, it does not intercept stdout &
 > stdin.  That is because we didn't want to have to write a full
 > terminal emulator in the Tk text widget.  Instead, program I/O still
 > goes to the console from which you launched gdb, which already knows
 > how to handle raw mode I/O, etc...  The Insight console is just used
 > for interactions with gdb.
 > 
 > Jim
 > 
 >  > Has anyone had problems with the GDB console in Insight not displaying
 >  > anything after pressing the "Run" button in the GUI?  I am runing on AIX
 >  > 4.3.2..
 >  > 
 >  > Wondering if I should follow it up, or forget it...
 >  > 
 >  > thanks,
 >  > brax.
 >  > 
 >  > 
 >  > 
 > 
 > -- 
 > ++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
 > Jim Ingham                                              jingham@cygnus.com
 > Cygnus Solutions, a Red Hat Company                      
 > 

-- 
++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
Jim Ingham                                              jingham@cygnus.com
Cygnus Solutions, a Red Hat Company                      

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDB Console Q
  2000-03-02 10:10   ` James Ingham
@ 2000-03-02 11:00     ` Braxton Thomason
  0 siblings, 0 replies; 7+ messages in thread
From: Braxton Thomason @ 2000-03-02 11:00 UTC (permalink / raw)
  To: James Ingham; +Cc: insight

Thanks guys!  The command "tk gdb_restore_fputs" did correct the problem,
however, I cannot seem to reproduce the error with the debug window
open... I will continue running the deubg window, and see what happens...

thanks,
brax.


On Thu, 2 Mar 2000, James Ingham wrote:

> Bad boy, read ALL mail before responding...
> 
> Anyway, Keith's explanation may be the ticket.  The way to test this
> is to try running my little sanity proc, just do:
> 
> (gdb) tk gdb_restore_fputs
> 
> and if you get output again, then Keith is right, there was some error 
> down in the guts of gdb.  The "tk" command just routes its arguments
> to the Tcl interpreter hiding in Insight...
> 
> I have noticed a few of these in the variable subsystem, I stamped out
> a few, but would not be suprised if more remain.  One thing you can
> try is to set the environment variable
> 
> setenv GDBTK_DEBUG 2
> 
> Then when you next start up gdb, you will get a debug window that
> spews out lots of output as gdb does its thing.  In here you may see
> some suspicious output shortly before you lose output.  Cut & paste
> that here, and it will give us a hand in figuring out what is going
> on.
> 
> Jim
> 
> 
>  > Braxton,
>  > 
>  > The GDB Console in Insight is not a exactly equivalent to the console
>  > in command line gdb.  In particular, it does not intercept stdout &
>  > stdin.  That is because we didn't want to have to write a full
>  > terminal emulator in the Tk text widget.  Instead, program I/O still
>  > goes to the console from which you launched gdb, which already knows
>  > how to handle raw mode I/O, etc...  The Insight console is just used
>  > for interactions with gdb.
>  > 
>  > Jim
>  > 
>  >  > Has anyone had problems with the GDB console in Insight not displaying
>  >  > anything after pressing the "Run" button in the GUI?  I am runing on AIX
>  >  > 4.3.2..
>  >  > 
>  >  > Wondering if I should follow it up, or forget it...
>  >  > 
>  >  > thanks,
>  >  > brax.
>  >  > 
>  >  > 
>  >  > 
>  > 
>  > -- 
>  > ++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
>  > Jim Ingham                                              jingham@cygnus.com
>  > Cygnus Solutions, a Red Hat Company                      
>  > 
> 
> -- 
> ++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
> Jim Ingham                                              jingham@cygnus.com
> Cygnus Solutions, a Red Hat Company                      
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-03-02 11:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-01 19:11 GDB Console Q Braxton Thomason
2000-03-02  9:05 ` Keith Seitz
2000-03-02  9:15   ` Braxton Thomason
2000-03-02  9:34     ` Keith Seitz
2000-03-02  9:53 ` James Ingham
2000-03-02 10:10   ` James Ingham
2000-03-02 11:00     ` Braxton Thomason

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).