public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [Patch] Prefs error...
@ 2001-10-11 12:21 Ian Roxborough
  2001-12-11  0:50 ` Ian Roxborough
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Roxborough @ 2001-10-11 12:21 UTC (permalink / raw)
  To: insight


Hi,

I came across this problem with the prefs.
Keith has approved this fix offline.

How to reproduce:

The problem occurs when running Insight for the
second time when connecting to a remote board via
a serial line.

Steps:
1- Delete your ~/.gdbtk file.
2- Launch Insight.
3- Load the program to debug (file menu -> "Open...")
4- Click on the "blue man" and the target selection
   dialog should appear.
5- Set your target selection settings (serial port, etc.)
   and click on the OK button.
6- Everything should work fine.
7- Exit Insight.
8- Launch Insight again.
9- Load the program again.
10- Click on the blue man and you should see the error
    dialog.

The "default-hostname" preference is PREF_defined in the
target settings dialog's initialization code.  If this code
isn't called then when these preference are accessed they
will cause an error.

The patch fixes the problem by using "pref getd" which
will define non-existant preference rather than popup
an error dialog.

Ian.

ChangeLog:
2001-12-10  Ian Roxborough  <irox@redhat.com>

        * library/interface.tcl (set_target_name): Call "pref getd"
        instead of "pref get" to avoid undefined preference error
        message for default-hostname.

Index: library/interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.34
diff -r1.34 interface.tcl
1042c1042
< 	set hostname [pref get gdb/load/default-hostname]
---
> 	set hostname [pref getd gdb/load/default-hostname]

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

* [Patch] Prefs error...
  2001-10-11 12:21 [Patch] Prefs error Ian Roxborough
@ 2001-12-11  0:50 ` Ian Roxborough
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Roxborough @ 2001-12-11  0:50 UTC (permalink / raw)
  To: insight

Hi,

I came across this problem with the prefs.
Keith has approved this fix offline.

How to reproduce:

The problem occurs when running Insight for the
second time when connecting to a remote board via
a serial line.

Steps:
1- Delete your ~/.gdbtk file.
2- Launch Insight.
3- Load the program to debug (file menu -> "Open...")
4- Click on the "blue man" and the target selection
   dialog should appear.
5- Set your target selection settings (serial port, etc.)
   and click on the OK button.
6- Everything should work fine.
7- Exit Insight.
8- Launch Insight again.
9- Load the program again.
10- Click on the blue man and you should see the error
    dialog.

The "default-hostname" preference is PREF_defined in the
target settings dialog's initialization code.  If this code
isn't called then when these preference are accessed they
will cause an error.

The patch fixes the problem by using "pref getd" which
will define non-existant preference rather than popup
an error dialog.

Ian.

ChangeLog:
2001-12-10  Ian Roxborough  <irox@redhat.com>

        * library/interface.tcl (set_target_name): Call "pref getd"
        instead of "pref get" to avoid undefined preference error
        message for default-hostname.

Index: library/interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.34
diff -r1.34 interface.tcl
1042c1042
< 	set hostname [pref get gdb/load/default-hostname]
---
> 	set hostname [pref getd gdb/load/default-hostname]

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

end of thread, other threads:[~2001-12-11  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-11 12:21 [Patch] Prefs error Ian Roxborough
2001-12-11  0:50 ` Ian Roxborough

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