From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: Watchpoints for emacs lisp. Date: Sat, 15 May 2010 14:43:40 +0200 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> <28567880.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 1273927454 25277 80.91.229.12 (15 May 2010 12:44:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 15 May 2010 12:44:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 15 14:44:11 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 1ODGis-000444-8H for ged-emacs-devel@m.gmane.org; Sat, 15 May 2010 14:44:06 +0200 Original-Received: from localhost ([127.0.0.1]:51884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODGir-0003dJ-Fe for ged-emacs-devel@m.gmane.org; Sat, 15 May 2010 08:44:05 -0400 Original-Received: from [140.186.70.92] (port=55001 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODGik-0003cq-6s for emacs-devel@gnu.org; Sat, 15 May 2010 08:43:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODGif-0004L9-PK for emacs-devel@gnu.org; Sat, 15 May 2010 08:43:58 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:58208) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODGif-0004K0-JT for emacs-devel@gnu.org; Sat, 15 May 2010 08:43:53 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1ODGic-0003yL-6Z for emacs-devel@gnu.org; Sat, 15 May 2010 14:43:50 +0200 Original-Received: from dial-178183.pool.broadband44.net ([212.46.178.183]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 May 2010 14:43:50 +0200 Original-Received: from eller.helmut by dial-178183.pool.broadband44.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 May 2010 14:43:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 29 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dial-178183.pool.broadband44.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:VOV808yQpLJM9fOrdvYmr1NbwfU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:124803 Archived-At: * alin.s [2010-05-15 13:56+0200] writes: > Suppose that we have the symbol > > X = ( 3 . ( 4 . some_cons ) ) > > and > > Y = some_cons. > > Suppose that I have set the watch bit on X, but not on Y. > > In these conditions, modifying Y will not stop into the watchpoint of X. > > That means that setting a watchpoint on a symbol X, should be a recursive > operation, id est, setting recursively a :watch: field for all the > cons-cells, symbols, strings, etc, which are present in X. > > That means that we need to insert a watch field in all lisp data > strucutures, not only n symbol, etc > > Is that algorithm right ? Can't you use the MMU for this? Protect the page(s) the watched object is on; in the SIGSEGV handler set the QUIT flag and store some info in a global place so that the debugger can figure out which object triggered the watchpoint. Helmut