From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1452 invoked by alias); 29 Oct 2002 15:45:54 -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 1358 invoked from network); 29 Oct 2002 15:45:52 -0000 Received: from unknown (HELO lizzard.sbs.de) (194.138.37.39) by sources.redhat.com with SMTP; 29 Oct 2002 15:45:52 -0000 Received: from mail.fth.sbs.de (mail.fth.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.11.6/8.11.6) with ESMTP id g9TFjlD07496 for ; Tue, 29 Oct 2002 16:45:51 +0100 (MET) Received: from nsprim.swb.siemens.de (nsprim.swb.siemens.de [141.73.80.3]) by mail.fth.sbs.de (8.11.6/8.11.6) with ESMTP id g9TFjkE16508 for ; Tue, 29 Oct 2002 16:45:47 +0100 (MET) Received: from fiji.swb.siemens.de (fiji.swb.siemens.de [141.73.80.26]) by nsprim.swb.siemens.de (8.9.1/8.9.1) with ESMTP id QAA12745 for ; Tue, 29 Oct 2002 16:45:46 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by fiji.swb.siemens.de (8.10.2+Sun/8.10.2) with SMTP id g9TFjkY22444; Tue, 29 Oct 2002 16:45:46 +0100 (MET) Message-Id: <200210291545.g9TFjkY22444@fiji.swb.siemens.de> Date: Tue, 29 Oct 2002 07:45:00 -0000 From: Ruppert Reply-To: Ruppert Subject: Unable to restore previously selected frame: Observations To: insight@sources.redhat.com Cc: ru@swb.siemens.de MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: NM3oyImI/KTqEaWKjVZ2NA== X-SW-Source: 2002-q4/txt/msg00056.txt.bz2 Hi, I apologize if this is a "known glitch" or if this is considered only a minor problem, but I think that I have made some observations which might be useful to somebody who cares about this kind of things: I am in the process of adapting insight 5.1 to a target monitor, and in doing this I have often encountered this popup window "Unable to restore previously selected frame". This happens quite often, but not always when I manually enter a function call in insight/gdb. Accidentally I noted that this happens _always_ after I looked for a variable value with the balloon evaluator in insight. The sequence - put the cursor on some variable name and wait for the balloon evaluator window which displays the value - manually enter some function call into the console window reliably results in this "Unable to restore..." popup. This does not happen when a variable is printed directly in the console window. To be sure that I did not inadvertedly mess up something I tried to do this on a plain vanilla Linux box (also with insight 5.1), and there I see the same behaviour. From this I conclude that this is a genuine insight (or probably gdb) issue. I poked around a bit with a debugger and found the following: - this is triggered in restore_selected_frame always by the value -1 in the variable "level". - this value gets there in the following way: - the balloon evaluator invokes varobj_create, and there select_frame is invoked with -1 given as level argument. - select_frame puts this in the global variable selected_frame_level - a manual function call results in the following: save_inferior_status record_selected_frame here the value of selected_frame_level is copied into inferior_status->selected_level ... function call ... restore_inferior_status restore_selected_frame here the value of selected_level is extracted from the inferior_status structure and find_relative_frame invoked. This leaves that "level" -1 intact, which leads to the warning because of the condition "level != 0". I think this explains the (or at least one) sequence of events which leads to this popup. I don't know much about the code in question, but could this be avoided by not noting the value -1 in the global variable selected_frame_level in function select_frame? "Real" level values are obviously always >= 0, and it may not be reasonable to note this "artificial" level value (-1 seems to mean "unknown level"). This may, after all, be considered only a cosmetic issue. But at least it is a bit annoying, and it results in a bogus warning, which may be taken for serious. Regards Dieter Ruppert RTS GmbH Schwieberdingen/Germany ru@swb.siemens.de