From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: The new "pp" command in gud is no longer so dangerous... Date: Thu, 10 Nov 2005 09:36:31 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1131619833 3351 80.91.229.2 (10 Nov 2005 10:50:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 10 Nov 2005 10:50:33 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 10 11:50:25 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ea9yn-0004EJ-Kk for ged-emacs-devel@m.gmane.org; Thu, 10 Nov 2005 11:48:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ea9wO-0001oK-Lg for ged-emacs-devel@m.gmane.org; Thu, 10 Nov 2005 05:46:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ea7w7-0000hu-N2 for emacs-devel@gnu.org; Thu, 10 Nov 2005 03:37:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ea7w6-0000hZ-58 for emacs-devel@gnu.org; Thu, 10 Nov 2005 03:37:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ea7w3-0000hT-Oc for emacs-devel@gnu.org; Thu, 10 Nov 2005 03:37:31 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ea7w1-0000QT-Ql; Thu, 10 Nov 2005 03:37:30 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepc.post.tele.dk (Postfix) with SMTP id E36F82628AC; Thu, 10 Nov 2005 09:37:27 +0100 (CET) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Thu, 10 Nov 2005 00:44:56 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:45669 Archived-At: "Richard M. Stallman" writes: > There is now a new function valid_lisp_object_p that checks this. > Unfortunately, I only know how to make it work if GC_MARK_STACK != 0. > So it simply returns "undeterminable" if GC_MARK_STACK == 0, and > consequently safe_debug_print refuses to print any values. > If anybody has ideas how to improve this, pls. tell me (or fix it). > > It would be better to handle that case by treating all values > as ok, rather than treating all values as bad. > At least that would work as well as the old code. Well, there is no "old code" in this case. Nick just added the [pp] button to the tool-bar, and the first time I tried it, the cursor as (accidentally) on a non-Lisp object, and I crashed the inferior emacs without any warning. I changed "pp" to call safe_debug_print as my experience shows that it is also too easy to call it with non-Lisp objects. However, you can still use the good-ole "pr" command, as it calls the old debug_print which will print whatever you pass it (or die trying). -- Kim F. Storm http://www.cua.dk