[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The new "pp" command in gud is no longer so dangerous...

From: Kim F. Storm
Subject: Re: The new "pp" command in gud is no longer so dangerous...
Date: Thu, 10 Nov 2005 09:36:31 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Richard M. Stallman" <address@hidden> 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 <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]