From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Watchpoints for emacs lisp. Date: Sat, 15 May 2010 13:48:52 -0400 Message-ID: References: <28512483.post@talk.nabble.com> <28523705.post@talk.nabble.com> <28567671.post@talk.nabble.com> <28567697.post@talk.nabble.com> <28567803.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1273945746 14119 80.91.229.12 (15 May 2010 17:49:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 15 May 2010 17:49:06 +0000 (UTC) Cc: Emacs-devel@gnu.org To: "alin.s" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 15 19:49:05 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ODLTy-0001X8-06 for ged-emacs-devel@m.gmane.org; Sat, 15 May 2010 19:49:03 +0200 Original-Received: from localhost ([127.0.0.1]:57329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODLTw-0002hW-BP for ged-emacs-devel@m.gmane.org; Sat, 15 May 2010 13:49:00 -0400 Original-Received: from [140.186.70.92] (port=45708 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODLTq-0002gs-Ig for Emacs-devel@gnu.org; Sat, 15 May 2010 13:48:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODLTp-0001oH-1C for Emacs-devel@gnu.org; Sat, 15 May 2010 13:48:54 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:15353 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODLTo-0001oC-TY for Emacs-devel@gnu.org; Sat, 15 May 2010 13:48:52 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAGt77ktMCrUO/2dsb2JhbACdf3K6NoUQBIwv X-IronPort-AV: E=Sophos;i="4.53,237,1272859200"; d="scan'208";a="64272338" Original-Received: from 76-10-181-14.dsl.teksavvy.com (HELO pastel.home) ([76.10.181.14]) by ironport2-out.pppoe.ca with ESMTP; 15 May 2010 13:48:52 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 341E88038; Sat, 15 May 2010 13:48:52 -0400 (EDT) In-Reply-To: <28567803.post@talk.nabble.com> (alin s.'s message of "Sat, 15 May 2010 04:44:18 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124810 Archived-At: > In GDB there are watchpoints to stop when changing the value, but there are > also watchpoints to stop when read/write. > It should be done here the same. I don't know about "should". There are different kinds of watchpoint you might be interested in, and there are different techniques you can use to implement a watchpoint feature. Depending on the technique you use, that restricts the kind of watchpoints you can support. Using a field on the `symbol' structure only allows you to catch modifications via setq/let (and friends). It's very limited, but has the advantage of being very simple, cheap, and lightweight to implement. If you want to be able to watch a random expression (which would be great, of course), then indeed you'll need something a lot more intrusive, such as a playing MMU tricks or adding extra checks at various places. Stefan