zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: functrace [was Re: funcstack and backtraces]
Date: Sun, 17 Sep 2006 15:39:54 -0700	[thread overview]
Message-ID: <060917153954.ZM32752@torch.brasslantern.com> (raw)
In-Reply-To: <20060917191418.GA22898@scowler.net>

On Sep 17,  3:14pm, Clint Adams wrote:
}
} This is buggy when either FUNCTIONARGZERO is unset, int is larger than
} 64-bits, or... I forget.

 ... lineno is greater than MAXINT?

} Furthermore, I am told that function_name:function_lineno is useless

Nonsense.

} and that it should be filename:file_lineno in all cases.

So for functions defined at the command line you're supposed to output
"stdin" and the number of input lines since the interpreter started?

I'd say whoever is telling you this stuff is not thinking clearly.  In
several cases it's not even possible to know the filename.

In any event:

schaefer<502> (foo() { print $functrace } ; foo )
zsh: segmentation fault (core dumped)  (; foo () { ... }; foo; )

#0  0x001e3de6 in strcpy () from /lib/tls/libc.so.6
#1  0x080aa616 in dupstring (
    s=0xb7d96590 "Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:"...)
    at ../../zsh-4.0/Src/string.c:40
#2  0x080ac028 in strcatsub (d=0xbff08010, pb=0xb7d96578 "", pe=0xb7d96578 "", 
    src=0xb7d96590 "Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:Src/zsh:"..., l=9, 
    s=0xb7d96582 "", glbsub=0, copied=0) at ../../zsh-4.0/Src/subst.c:564
#3  0x080b1857 in paramsubst (l=0xb7d96548, n=0xb7d96560, str=0xbff081a8, 
    qt=0, ssub=0) at ../../zsh-4.0/Src/subst.c:3154
#4  0x080ab18b in stringsubst (list=0xb7d96548, node=0xb7d96560, ssub=0, 
    asssub=0) at ../../zsh-4.0/Src/subst.c:156
#5  0x080aabdc in prefork (list=0xb7d96548, flags=0)
    at ../../zsh-4.0/Src/subst.c:91
#6  0x08063052 in execcmd (state=0xbff08650, input=0, output=0, how=18, 
    last1=2) at ../../zsh-4.0/Src/exec.c:1963
#7  0x080616ce in execpline2 (state=0xbff08650, pcode=67, how=18, input=0, 
    output=0, last1=0) at ../../zsh-4.0/Src/exec.c:1301
#8  0x08060bd2 in execpline (state=0xbff08650, slcode=4098, how=18, last1=0)
    at ../../zsh-4.0/Src/exec.c:1087
#9  0x08060576 in execlist (state=0xbff08650, dont_change_job=1, exiting=0)
    at ../../zsh-4.0/Src/exec.c:893
#10 0x08060285 in execode (p=0x8d82728, dont_change_job=1, exiting=0)
    at ../../zsh-4.0/Src/exec.c:793
#11 0x08067e3f in runshfunc (prog=0x8d82728, wrap=0x0, name=0xb7d96538 "foo")
    at ../../zsh-4.0/Src/exec.c:3915
#12 0x08067bea in doshfunc (name=0x8d78020 "foo", prog=0x8d82728, 
    doshargs=0xb7d96508, flags=0, noreturnval=0)
    at ../../zsh-4.0/Src/exec.c:3824
#13 0x08067511 in execshfunc (shf=0x8daf8e8, args=0xb7d96508)
    at ../../zsh-4.0/Src/exec.c:3612
#14 0x0806501d in execcmd (state=0xbff08e50, input=0, output=0, how=18, 
    last1=1) at ../../zsh-4.0/Src/exec.c:2583
#15 0x080616ce in execpline2 (state=0xbff08e50, pcode=195, how=18, input=0, 
    output=0, last1=1) at ../../zsh-4.0/Src/exec.c:1301
#16 0x08060bd2 in execpline (state=0xbff08e50, slcode=3074, how=18, last1=1)
    at ../../zsh-4.0/Src/exec.c:1087
#17 0x08060576 in execlist (state=0xbff08e50, dont_change_job=0, exiting=1)
    at ../../zsh-4.0/Src/exec.c:893
#18 0x080653e2 in execcmd (state=0xbff08e50, input=0, output=0, how=18, 
    last1=2) at ../../zsh-4.0/Src/exec.c:2666
#19 0x080616ce in execpline2 (state=0xbff08e50, pcode=195, how=18, input=0, 
    output=0, last1=0) at ../../zsh-4.0/Src/exec.c:1301
#20 0x08060bd2 in execpline (state=0xbff08e50, slcode=24578, how=18, last1=0)
    at ../../zsh-4.0/Src/exec.c:1087
#21 0x08060576 in execlist (state=0xbff08e50, dont_change_job=0, exiting=0)
    at ../../zsh-4.0/Src/exec.c:893
#22 0x08060285 in execode (p=0xb7d96420, dont_change_job=0, exiting=0)
    at ../../zsh-4.0/Src/exec.c:793
#23 0x08077866 in loop (toplevel=1, justonce=0) at ../../zsh-4.0/Src/init.c:167
#24 0x0807a46a in zsh_main (argc=1, argv=0xbff08f94)
    at ../../zsh-4.0/Src/init.c:1332
#25 0x0804c2ae in main (argc=1, argv=0xbff08f94) at ../../zsh-4.0/Src/main.c:93


  reply	other threads:[~2006-09-17 22:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-01 19:10 funcstack and backtraces Clint Adams
2006-09-04 21:26 ` Bart Schaefer
2006-09-04 23:15   ` Clint Adams
2006-09-17 19:14   ` PATCH: functrace [was Re: funcstack and backtraces] Clint Adams
2006-09-17 22:39     ` Bart Schaefer [this message]
2006-09-18  3:37       ` Clint Adams
2006-09-18  5:57         ` Bart Schaefer
2006-09-18 11:07           ` Clint Adams
2006-09-18 15:16             ` Bart Schaefer
2006-09-17 22:52     ` Bart Schaefer
2006-09-17 23:38       ` Clint Adams
2006-09-18  2:20         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=060917153954.ZM32752@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).