zsh-workers
 help / color / mirror / code / Atom feed
* PATCH (?): Debug trap bug?
@ 2001-10-11 16:41 Bart Schaefer
  2001-10-11 17:21 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2001-10-11 16:41 UTC (permalink / raw)
  To: zsh-workers

Can anybody tell me how the code before this patch could be right, or why
this patch would be wrong?  If not, I'll commit it to both trunk and branch.

Index: Src/exec.c
===================================================================
--- Src/exec.c	2001/09/24 15:40:12	1.10
+++ Src/exec.c	2001/10/11 16:36:32
@@ -886,11 +886,18 @@
 	state->pc--;
 sublist_done:
 
-	cmdsp = csp;
 	noerrexit = oldnoerrexit;
 
-	if (sigtrapped[SIGDEBUG])
+	if (sigtrapped[SIGDEBUG]) {
+	    exiting = donetrap;
+	    ret = lastval;
 	    dotrap(SIGDEBUG);
+	    lastval = ret;
+	    donetrap = exiting;
+	    noerrexit = oldnoerrexit;
+	}
+
+	cmdsp = csp;
 
 	/* Check whether we are suppressing traps/errexit *
 	 * (typically in init scripts) and if we haven't  *

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH (?): Debug trap bug?
  2001-10-11 16:41 PATCH (?): Debug trap bug? Bart Schaefer
@ 2001-10-11 17:21 ` Peter Stephenson
  2001-10-13 20:06   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2001-10-11 17:21 UTC (permalink / raw)
  To: Zsh hackers list

Bart wrote:
> Can anybody tell me how the code before this patch could be right, or why
> this patch would be wrong?  If not, I'll commit it to both trunk and branch.

I would think all that save and restore stuff just got forgotten.  Debug
traps were pretty flakey for a long time, so probably the remaining
problems escaped notice.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH (?): Debug trap bug?
  2001-10-11 17:21 ` Peter Stephenson
@ 2001-10-13 20:06   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2001-10-13 20:06 UTC (permalink / raw)
  To: Zsh hackers list

On Oct 11,  6:21pm, Peter Stephenson wrote:
}
} Bart wrote:
} > Can anybody tell me how the code before this patch could be right,
} > or why this patch would be wrong? If not, I'll commit it to both
} > trunk and branch.
}
} I would think all that save and restore stuff just got forgotten.

Nobody else commented on this at all, so I've committed it.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-10-13 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-11 16:41 PATCH (?): Debug trap bug? Bart Schaefer
2001-10-11 17:21 ` Peter Stephenson
2001-10-13 20:06   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).