From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5044 invoked by alias); 21 Mar 2008 09:11:42 -0000 Received: (qmail 5034 invoked by uid 22791); 21 Mar 2008 09:11:41 -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; Fri, 21 Mar 2008 09:11:19 +0000 Received: (qmail 5459 invoked from network); 21 Mar 2008 09:11:17 -0000 Received: from unknown (HELO 172.16.unknown.plus.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 21 Mar 2008 09:11:17 -0000 From: Vladimir Prus To: gdb@sources.redhat.com Subject: Re: MI non-stop mode spec Date: Fri, 21 Mar 2008 11:52:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) References: <200803190016.02072.vladimir@codesourcery.com> In-Reply-To: <200803190016.02072.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803211211.18538.vladimir@codesourcery.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00189.txt.bz2 On Wednesday 19 March 2008 00:16:01 Vladimir Prus wrote: > MI commands changes > ------------------- > > (**) There are two new options that a number of MI commands may > take: > > --thread > > option specifies the id of the thread the command should operate > on. > > --global > > specifies that the command should operate on no thread, but on > global data. This option is necessary to distinguish the case > where the frontend has forgot to specify --thread, assuming that the > current thread will be used, from the case when frontend explicitly > wants to execute a command in global scope. This clarify of > intention is particularly important when the "current thread" is > running. It seems like I have over-engineered this one. The --global option was meant so that we can evaluate expressions while the target is running, but: - Generally, we cannot access target memory when all threads are running - GDB is full with assumptions that we have current thread and current frame, so even if target can access memory when all threads is running, gdb will still try to grab selected frame, and that will try to grab target's register, and that will result in error. So, I'd like to remove the --global option. This means that the --thread option must be used to specify which thread to operate on, and that thread must be stopped. In fact, a mechanism to evaluate expression in an arbitrary scope (including global scope) might be actually good. Now, implementing variable tooltips via MI is impossible, as we cannot evaluate an expression in a given scope (defined by source line). However, that appears to be orthogonal issue to the non-stop mode. - Volodya