From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7751 invoked by alias); 11 Dec 2001 08:50:16 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 7730 invoked from network); 11 Dec 2001 08:50:12 -0000 Date: Thu, 11 Oct 2001 12:21:00 -0000 From: Ian Roxborough To: insight@sources.redhat.com Subject: [Patch] Prefs error... Message-Id: <20011211004611.10d0f058.irox@redhat.com> Organization: Red Hat Inc. X-Mailer: Sylpheed version 0.6.5 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2001-q4/txt/msg00113.txt.bz2 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 * 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] From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Roxborough To: insight@sources.redhat.com Subject: [Patch] Prefs error... Date: Tue, 11 Dec 2001 00:50:00 -0000 Message-ID: <20011211004611.10d0f058.irox@redhat.com> X-SW-Source: 2001-q4/msg00414.html Message-ID: <20011211005000.FuMQFHivADJSa0EZ0gHk83RlK181j3uifjyccYyE9q4@z> 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 * 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]