This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Prefs error...



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]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]