From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12132 invoked by alias); 13 Jul 2008 05:34:53 -0000 Received: (qmail 12123 invoked by uid 22791); 13 Jul 2008 05:34:52 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 13 Jul 2008 05:34:25 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KHuE2-0005O1-Rc for gdb-patches@sources.redhat.com; Sun, 13 Jul 2008 05:34:22 +0000 Received: from 78.158.192.230 ([78.158.192.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Jul 2008 05:34:22 +0000 Received: from vladimir by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Jul 2008 05:34:22 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [MI non-stop 10/11] Skip varobj in running threads. Date: Sun, 13 Jul 2008 05:34:00 -0000 Message-ID: References: <200806282100.06214.vladimir@codesourcery.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart1337666.O0srn3f06M" Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 X-IsSubscribed: yes 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/msg00253.txt.bz2 --nextPart1337666.O0srn3f06M Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit Content-length: 289 Vladimir Prus wrote: > > If a variable object is bound to a specific thread, and we're doing > > -var-update * > > and varobj's thread is running, we cannot update varobj -- so we skip it. > Will commit when core non-stop is in. I've checked in the following revision. - Volodya --nextPart1337666.O0srn3f06M Content-Type: text/x-diff; name="commit.diff" Content-Transfer-Encoding: 8Bit Content-Disposition: attachment; filename="commit.diff" Content-length: 2832 Index: gdb/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.9558 diff -u -p -r1.9558 ChangeLog --- gdb/ChangeLog 13 Jul 2008 04:13:49 -0000 1.9558 +++ gdb/ChangeLog 13 Jul 2008 05:29:56 -0000 @@ -1,5 +1,12 @@ 2008-07-13 Vladimir Prus + Skip varobj in running threads. + * mi/mi-cmd-var.c (mi_cmd_var_update): If varobj's + thread is not stopped, skip the varobj. + * Makefile.in: Update dependencies. + +2008-07-13 Vladimir Prus + Enable all commands while inferiour is running * mi/mi-main.c (mi_cmd_execute): Don't check if inferiour is executing. Index: gdb/Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.1036 diff -u -p -r1.1036 Makefile.in --- gdb/Makefile.in 12 Jul 2008 22:16:34 -0000 1.1036 +++ gdb/Makefile.in 13 Jul 2008 05:29:58 -0000 @@ -3256,7 +3256,8 @@ mi-cmd-target.o: $(srcdir)/mi/mi-cmd-tar $(mi_getopt_h) $(remote_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-target.c mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \ - $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) $(mi_getopt_h) + $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) $(mi_getopt_h) \ + $(gdbthread_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \ $(gdb_string_h) Index: gdb/mi/mi-cmd-var.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-cmd-var.c,v retrieving revision 1.52 diff -u -p -r1.52 mi-cmd-var.c --- gdb/mi/mi-cmd-var.c 25 Jun 2008 15:15:42 -0000 1.52 +++ gdb/mi/mi-cmd-var.c 13 Jul 2008 05:30:17 -0000 @@ -29,6 +29,7 @@ #include #include "gdb_string.h" #include "mi-getopt.h" +#include "gdbthread.h" const char mi_no_values[] = "--no-values"; const char mi_simple_values[] = "--simple-values"; @@ -610,8 +611,21 @@ mi_cmd_var_update (char *command, char * cr = rootlist; while (*cr != NULL) { - if (*name == '*' || varobj_floating_p (*cr)) - varobj_update_one (*cr, print_values, 0 /* implicit */); + int thread_id = varobj_get_thread_id (*cr); + int thread_stopped = 0; + if (thread_id == -1 && is_stopped (inferior_ptid)) + thread_stopped = 1; + else + { + struct thread_info *tp = find_thread_id (thread_id); + if (tp) + thread_stopped = is_stopped (tp->ptid); + else + thread_stopped = 1; + } + if (thread_stopped) + if (*name == '*' || varobj_floating_p (*cr)) + varobj_update_one (*cr, print_values, 0 /* implicit */); cr++; } do_cleanups (cleanup); --nextPart1337666.O0srn3f06M--