From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32226 invoked by alias); 25 Jan 2005 10:15:06 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32121 invoked from network); 25 Jan 2005 10:14:56 -0000 Received: from unknown (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org with SMTP; 25 Jan 2005 10:14:56 -0000 Received: from farnswood.snap.net.nz (p74-tnt2.snap.net.nz [202.124.108.74]) by viper.snap.net.nz (Postfix) with ESMTP id A178B27BEE1 for ; Tue, 25 Jan 2005 23:14:54 +1300 (NZDT) Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 923E5628AB; Tue, 25 Jan 2005 10:08:40 +0000 (GMT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16886.6823.347734.738143@farnswood.snap.net.nz> Date: Tue, 25 Jan 2005 10:15:00 -0000 To: gdb-patches@sources.redhat.com Subject: [PATCH] interpreter_exec_cmd (interps.c) X-SW-Source: 2005-01/txt/msg00236.txt.bz2 GDB hangs if it receives the previously legitimate command server interpreter mi "-var-update *" GNU gdb 6.3.50.20050125-cvs Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) server interpreter mi "-var-update *" ^done,changelist=[] (gdb) error in command: "-var-update *". The patch below seems to fix it. I don't know what values reason takes as struct exception in exception.h has no commented description, so this patch is a bit of a guess and may not be the right fix. The bug is real, however. There seems to be a further bug, in that once GDB has reached the line in interps.c, error ("error in command: \"%s\".", prules[i]), ,presumably it shouldn't hang. Nick *** /home/nick/src/gdb/interps.c.~1.10.~ 2005-01-16 15:46:17.000000000 +1300 --- /home/nick/src/gdb/interps.c 2005-01-25 22:47:42.000000000 +1300 *************** *** 399,405 **** for (i = 1; i < nrules; i++) { struct exception e = interp_exec (interp_to_use, prules[i]); ! if (!e.reason) { interp_set (old_interp); interp_set_quiet (interp_to_use, old_quiet); --- 399,405 ---- for (i = 1; i < nrules; i++) { struct exception e = interp_exec (interp_to_use, prules[i]); ! if (e.reason) { interp_set (old_interp); interp_set_quiet (interp_to_use, old_quiet);