From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8292 invoked by alias); 13 Jul 2008 03:54:57 -0000 Received: (qmail 8284 invoked by uid 22791); 13 Jul 2008 03:54:56 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 13 Jul 2008 03:54:39 +0000 Received: (qmail 13361 invoked from network); 13 Jul 2008 03:54:37 -0000 Received: from unknown (HELO 172.16.unknown.plus.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 13 Jul 2008 03:54:37 -0000 From: Vladimir Prus To: "Ulrich Weigand" Subject: Re: [MI non-stop 04/11] Implement --thread and --frame. Date: Sun, 13 Jul 2008 03:54:00 -0000 User-Agent: KMail/1.9.9 Cc: gdb-patches@sources.redhat.com References: <200807122014.m6CKEgkP016422@d12av02.megacenter.de.ibm.com> In-Reply-To: <200807122014.m6CKEgkP016422@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_mxXeIZPyUnyLT9x" Message-Id: <200807130754.14849.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00246.txt.bz2 --Boundary-00=_mxXeIZPyUnyLT9x Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 592 On Sunday 13 July 2008 00:14:42 Ulrich Weigand wrote: > Vladimir Prus wrote: > > > mi_cmd_execute (struct mi_parse *parse) > > { > > struct cleanup *cleanup = make_cleanup (null_cleanup, NULL); > > + char *thread_str; > > + char *frame_str; > > + int thread; > > + int i; > > [snip] > > > + error (_("Invalid frame id: %s"), frame_str); > > This variable is used uninitialized, which breaks the -Werror > build for me. > > (Also, it seems the other local variables introduced by this > patch are never used ...) Apologies. I've checked in the attached to fix this. - Volodya --Boundary-00=_mxXeIZPyUnyLT9x Content-Type: text/x-diff; charset="iso-8859-1"; name="commit.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="commit.diff" Content-length: 1340 Index: gdb/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.9550 diff -u -p -r1.9550 ChangeLog --- gdb/ChangeLog 12 Jul 2008 17:10:59 -0000 1.9550 +++ gdb/ChangeLog 13 Jul 2008 03:51:22 -0000 @@ -1,3 +1,8 @@ +2008-07-13 Vladimir Prus + + * mi/mi-main.c (mi_cmd_execute): Remove unused variable. + Fix printing of frame, when frame is wrong. + 2008-07-12 Vladimir Prus Implement -exec-continue/-exec-interrupt --all. Index: gdb/mi/mi-main.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-main.c,v retrieving revision 1.126 diff -u -p -r1.126 mi-main.c --- gdb/mi/mi-main.c 12 Jul 2008 17:10:59 -0000 1.126 +++ gdb/mi/mi-main.c 13 Jul 2008 03:51:22 -0000 @@ -1068,9 +1068,6 @@ static void mi_cmd_execute (struct mi_parse *parse) { struct cleanup *cleanup; - char *thread_str; - char *frame_str; - int thread; int i; free_all_values (); @@ -1101,7 +1098,7 @@ mi_cmd_execute (struct mi_parse *parse) /* find_relative_frame was successful */ select_frame (fid); else - error (_("Invalid frame id: %s"), frame_str); + error (_("Invalid frame id: %d"), frame); } if (parse->cmd->argv_func != NULL) --Boundary-00=_mxXeIZPyUnyLT9x--