1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Issues/iss091_w.htm
2024-04-01 10:24:07 +02:00

110 lines
7.1 KiB
HTML

<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
<HTML>
<HEAD>
<TITLE>CLHS: Issue DEBUGGER-HOOK-VS-BREAK Writeup</TITLE>
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
<LINK REL=TOP HREF="../Front/index.htm">
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
<LINK REL=PREV HREF="../Issues/iss090_w.htm">
<LINK REL=UP HREF="../Issues/iss091.htm">
<LINK REL=NEXT HREF="../Issues/iss092_w.htm">
</HEAD>
<BODY>
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="../Issues/iss090_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss091.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss092_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>Issue DEBUGGER-HOOK-VS-BREAK Writeup</H2>
<PRE><B>Issue:</B> DEBUGGER-HOOK-BREAK<P>
<B>Forum:</B> Editorial<P>
<B>References:</B> <A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> (pp432-433), <A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A> (Conditions, Rev18, p42)<P>
<B>Category:</B> CHANGE<P>
<B>Edit history:</B> 01-Mar-91, Version 1 by Pitman<P>
<B>Status:</B> For X3J13 consideration<P>
<P>
<B>Problem Description:<P>
</B><P>
According to v18 of the Conditions Proposal (p42), when <A REL=DEFINITION HREF="../Body/f_invoke.htm#invoke-debugger"><B>INVOKE-DEBUGGER</B></A> <P>
is executed, ``If the variable <A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A> is not <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A>, it will be <P>
funcalled ...''<P>
<P>
According to p432-433 of CLtL, when <A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> is called, ``A particular <P>
implementation may choose, according to its own style and needs, when<P>
<A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> is called to go into a debugger different from the one used for <P>
handling errors.''<P>
<P>
It isn't clear whether <A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> is affected by <A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A>, or whether<P>
it uses <A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A> to implement any use of an alternate debugger.<P>
<P>
<B>Proposal (DEBUGGER-HOOK-BREAK:CLARIFY):<P>
</B><P>
1. Define the debugger implemented by <A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> is not affected by<P>
the value of <A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A> upon entry.<P>
<P>
2. Define that <A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> binds the value of <A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A> to <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A>.<P>
<P>
<B>Test Case:<P>
</B><P>
(<A REL=DEFINITION HREF="../Body/s_block.htm#block"><B>BLOCK</B></A> FOO<P>
(<A REL=DEFINITION HREF="../Body/s_let_l.htm#let"><B>LET</B></A> ((<A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A> #'(<A REL=DEFINITION HREF="../Body/a_lambda.htm#lambda"><B>LAMBDA</B></A> (C D) (<A REL=DEFINITION HREF="../Body/s_ret_fr.htm#return-from"><B>RETURN-FROM</B></A> FOO <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A>))))<P>
(<A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A>)))<P>
<P>
enters a breakpoint rather than just returning <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A>.<P>
<P>
<B>Rationale:<P>
</B><P>
1. <A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A>'s primary role is to <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>provide</B></A> access to Lisp debugging.<P>
Anyone who wants to enter the debugger through <A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A><P>
can use <A REL=DEFINITION HREF="../Body/f_invoke.htm#invoke-debugger"><B>INVOKE-DEBUGGER</B></A>.<P>
<P>
2. <A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A> provides an application/end-user-oriented <P>
debugging interface, while <A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> provides a Lisp debugging<P>
interface. Since <A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> will generally lead to the typing <P>
of Lisp expressions rather than application-specific commands,<P>
it makes sense for the Lisp debugging environment to be visible<P>
here rather than the application debugging environment.<P>
<P>
<B>Current Practice:<P>
</B><P>
Symbolics Genera returns <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A> from the test case and would have to change.<P>
<P>
<B>Cost to Implementors:<P>
</B><P>
Very small. They just have to make <A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> bind <A REL=DEFINITION HREF="../Body/v_debugg.htm#STdebugger-hookST"><B>*DEBUGGER-HOOK*</B></A> to <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A><P>
before doing anything else.<P>
<P>
<B>Cost to Users:<P>
</B><P>
Probably none.<P>
<P>
<B>Cost of Non-Adoption:<P>
</B><P>
Users would not know what to expect when moving from implementation to<P>
implementation.<P>
<P>
<B>Benefits:<P>
</B><P>
Less ambiguity in the spec.<P>
<P>
<B>Aesthetics:<P>
</B><P>
Negligible.<P>
<P>
<B>Discussion:<P>
</B><P>
Pitman supports this proposal, but would consider any reasonable <P>
alternative which made the expected behavior explicit.<P>
</PRE>
<HR>
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
</BODY>
</HTML>