Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] Anonymous functions cause funcfiletrace to produce function-relative line numbers
- X-seq: zsh-workers 42109
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [BUG] Anonymous functions cause funcfiletrace to produce function-relative line numbers
- Date: Mon, 11 Dec 2017 10:12:38 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20171211101242euoutp01bd26b42079d0c61bf09b2dec0316d1c5~-Nc7o3Vu_1283612836euoutp01R
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1512987162; bh=jbCEBksgO93w3N04lOwwbpxeV5Egkb7kPOwogVy20Mw=; h=Date:From:To:Subject:In-reply-to:References:From; b=D8XTdCePM6tCXXHJo3K2reA6S64EwkGUm+d+2Xp9TZUGPnkckcBDDhb+rFhaKz3/X 9xIK7ELJyyDLUZYRv3iIcubRgcFASWTPrfShjrA7UvXnqrLRUlTw7cOPwK5zMcFBaJ J+dwwzWafDby6gnj4luAQiGcvreIlzW6nMeaw98c=
- In-reply-to: <20171211094116.48e29012@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <CGME20171210232854epcas2p2f9d4f0ac2ad31feb5a54d61da49e7140@epcas2p2.samsung.com> <E7CE1AD5-1169-46C2-9776-1C9B9BDEEB9B@dana.is> <20171211094116.48e29012@pwslap01u.europe.root.pri>
On Mon, 11 Dec 2017 09:41:16 +0000
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> Perhaps...?
Oops, try this instead.
diff --git a/Src/exec.c b/Src/exec.c
index fc6d02d..24d3c7e 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -5669,11 +5669,13 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
funcsave->fstack.caller = funcstack ? funcstack->name :
dupstring(funcsave->argv0 ? funcsave->argv0 : argzero);
funcsave->fstack.lineno = lineno;
+ funcsave->fstack.flineno = shfunc->lineno;
+ if (funcstack)
+ funcsave->fstack.flineno += funcstack->flineno;
funcsave->fstack.prev = funcstack;
funcsave->fstack.tp = FS_FUNC;
funcstack = &funcsave->fstack;
- funcsave->fstack.flineno = shfunc->lineno;
funcsave->fstack.filename = getshfuncfile(shfunc);
prog = shfunc->funcdef;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author