public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* .gdbinit initialization and GUI...
@ 2000-07-09 13:48 Paul Breed
  2000-07-10  5:32 ` Keith Seitz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paul Breed @ 2000-07-09 13:48 UTC (permalink / raw)
  To: insight

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

I want to write a GDB script that
loads a specific symbol table and the connects to the 
(already running) target. I can easily do this with
GDB, but when the Insight GUI gets involved things
don't work like you expect.

How do I tell the GUI that GDB has already connected
to
the target so it won't try to connect again when I hit
the run button?

Also the GUI sometimes gets confused and puts up the
hourglass when it should not, is there any way to
reset this?

Paul (Please respond to Paul@Netburner.com) 

__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/

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

* Re: .gdbinit initialization and GUI...
  2000-07-09 13:48 .gdbinit initialization and GUI Paul Breed
@ 2000-07-10  5:32 ` Keith Seitz
       [not found] ` <4.2.0.58.20000710092726.0214de50@pop.netburner.com>
  2000-07-10 10:46 ` Jim Ingham
  2 siblings, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2000-07-10  5:32 UTC (permalink / raw)
  To: Paul; +Cc: insight

Paul Breed wrote:
> 
> I want to write a GDB script that
> loads a specific symbol table and the connects to the
> (already running) target. I can easily do this with
> GDB, but when the Insight GUI gets involved things
> don't work like you expect.
> 

I would expect some runtime differences when using a script. There are
still quite a few disconnects between the GUI and the "command line"...

> How do I tell the GUI that GDB has already connected
> to
> the target so it won't try to connect again when I hit
> the run button?

Simple. Using the target dialog, click the "more options" button to
reveal the hidden pane. The options here are the default actions taken
when the user presses the Run button. Simply turn off "Download" and
"Attach" and keep "Continue".

> Also the GUI sometimes gets confused and puts up the
> hourglass when it should not, is there any way to
> reset this?

If you have a console window open, you can enter the command "tk
gdbtk_idle". This will make the GUI "idle" (ready for user input).
Whenever the GUI is "busy" like this (and it shouldn't be), it means
that an error happened within the depths of gdb and GUI didn't check for
it/expect it. If you open a debug window, you might be able to find out
why this is happening and stop it altogether. (Set environment variable
"GDBTK_DEBUG" > 1 to open a debug window. Set it to 1 to allow it to be
opened via the "Windows" menu.)

Keith

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

* Re: .gdbinit initialization and GUI...
       [not found] ` <4.2.0.58.20000710092726.0214de50@pop.netburner.com>
@ 2000-07-10  6:34   ` Keith Seitz
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2000-07-10  6:34 UTC (permalink / raw)
  To: Paul Breed; +Cc: insight

Paul Breed wrote:
> 
> >
> >Simple. Using the target dialog, click the "more options" button to
> >reveal the hidden pane. The options here are the default actions taken
> >when the user presses the Run button. Simply turn off "Download" and
> >"Attach" and keep "Continue".
> This did not work.
> IT still brings up the target dialog when I hit run.
> Even though I've already connected to the target with the  script.

Doh! Yes, it will do that. This is another one of those GUI-command line
disconnect issues. We never did fix that properly...

On the other hand, now that I think about it, you don't really need to
put this sort of thing into a startup script -- the Insight GUI will
automatically attach, download, and start the program for you when you
press the Run button (depending on the settings in the Target Selection
Dialog). It will also remember these settings, so that the next time you
run the debugger, it will "do the right thing". Of course, when you
first the debugger, it will ALWAYS bring up the Target Dialog and ask
for your target, in case you intend to connect to a different target.
Are you trying to just bypass the dialog so that you never see it?

Keith

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

* Re: .gdbinit initialization and GUI...
  2000-07-09 13:48 .gdbinit initialization and GUI Paul Breed
  2000-07-10  5:32 ` Keith Seitz
       [not found] ` <4.2.0.58.20000710092726.0214de50@pop.netburner.com>
@ 2000-07-10 10:46 ` Jim Ingham
  2 siblings, 0 replies; 4+ messages in thread
From: Jim Ingham @ 2000-07-10 10:46 UTC (permalink / raw)
  To: Paul Breed, insight

Also sprach Paul Breed:

> I want to write a GDB script that
> loads a specific symbol table and the connects to the
> (already running) target. I can easily do this with
> GDB, but when the Insight GUI gets involved things
> don't work like you expect.
> 
> How do I tell the GUI that GDB has already connected
> to
> the target so it won't try to connect again when I hit
> the run button?

If you open the "File->target settings" dialog and open the "More Options"
panel you can set what "Run" means.  In your case, deselect the "Connect to
target" checkbutton.  If you close the dialog box, these settings will be
saved.

There is also a separate .gdbtkinit file that Insight uses.  If you find
yourself doing alot different for Insight, you might want to set this...

> 
> Also the GUI sometimes gets confused and puts up the
> hourglass when it should not, is there any way to
> reset this?

Leave the console window open & off to one side.  When the cursor gets
confused, type:

(gdb) tk gdbtk_idle

Another way to do this is to use something like TkCon or TkInspect, and
connect to gdb using send, and type the same command.  This works even if
you have forgotten to leave the console window open.

This should reset the cursor state, and bring the GUI back to life.
However, this may or may not bring all of Insight back to a sane state.  If
this is happening often, you should file a bug report on it.

Jim
-- 
Jim Ingham                                 jingham@apple.com
Apple Computer

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

end of thread, other threads:[~2000-07-10 10:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-09 13:48 .gdbinit initialization and GUI Paul Breed
2000-07-10  5:32 ` Keith Seitz
     [not found] ` <4.2.0.58.20000710092726.0214de50@pop.netburner.com>
2000-07-10  6:34   ` Keith Seitz
2000-07-10 10:46 ` Jim Ingham

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