From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2543 invoked by alias); 2 Nov 2009 01:32:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27333 Received: (qmail 5524 invoked from network); 2 Nov 2009 01:32:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.219.207 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=l49oeG4I2saW6w+D7OmoULHTDdepP5eqDLElDbP5W+0=; b=YekHZ8wXYHoNV1WJkztEI+LtRRPy2n3wGaAiBnc2C0T4aTX5C1TU3RlctFYE9pO4AG WnNucrN+LrWMEIn8BiBTcI2ugij2FCerau3h3uuQw67g6RHy8l+lV6mfifMl7OS+cWsC Ww3VLL3HkR0ylExv/qFw94iPK9eCw2Ow5UzUg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=P+mnwcvbm89TZBrz3YkpkCJfjDlK2ivXrCLAyuMzVr0w3anZq9AEnLhYMANd3l+O4K dGukphlJBd3Z9ZUuWuLX0EB0N6qZDJ8uS8lVdfpeSNPuUSxucN8FNtTrkWfojokQIgSy kqZgwogFvagBJOBOX2mM3dQuEVMgR+mpkLyME= MIME-Version: 1.0 In-Reply-To: <237967ef0911011657n54279c54ja8fce16a1861ff4f@mail.gmail.com> References: <237967ef0911011312u307ecf19kbabf9fecf867cec1@mail.gmail.com> <200911012220.nA1MKgjM005270@pws-pc.ntlworld.com> <237967ef0911011657n54279c54ja8fce16a1861ff4f@mail.gmail.com> Date: Mon, 2 Nov 2009 02:26:54 +0100 Message-ID: <237967ef0911011726q7550593ax30bc61f1a736e725@mail.gmail.com> Subject: Re: zsh eats 100% CPU with completion in / From: Mikael Magnusson To: Peter Stephenson Cc: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 2009/11/2 Mikael Magnusson : > 2009/11/1 Peter Stephenson : >> Mikael Magnusson wrote: >>> I did the break after typing ./ and before pressing tab. >> >> Nothing leapt out of that. "tokstr" seems to be coming back as "." and >> then the "." gets removed, as far as I can see, but looking at it out of >> context I might be wrong. >> >> Might be worth checking zlemetacs as well as zlemetaline and zlemetall >> on entry to get_comp_string() in case they're already wrong, otherwise >> it's probably down in the bowels of gettok() where it puts together the >> string it's returning. I suspect a counting error---one of the myriad >> substractions to correct for all the things that need fixing on the way >> through the position calculations is wrong. > > Before I actually have to start thinking and looking at the code, does > this tell you anything? In the working trace, I didn't do the cd .. > (this is from break zshlex) > I tried breaking on gettok but it appears my modules don't have debug > symbols, I might get back in a while if anything interesting shows up there. Well, I obviously have no idea what I'm doing now, first I just tried breaking on gettok, but it went on and on forever, then i started doing s 100 and it still took a good while until we came to the infinite loop. Then I tried the new reversible debugging thing in gdb 7, breaked on zshlex, then continued backward to gettok, and stepped forward from there. I'm not exactly sure if I went far enough though. (gdb) target record (gdb) break zle_tricky.c:1248 Breakpoint 1 at 0x6faf8088: file zle_tricky.c, line 1248. (gdb) c Continuing. Breakpoint 1, get_comp_string () at zle_tricky.c:1248 1248 for (tt1 = tt; *tt1; tt1++) { (gdb) print tt1 $1 = 0x0 (gdb) print tt $2 = 0x6fc05778 "." (gdb) rs 1247 char *tt1, *e = tt + zlemetacs - wb; (gdb) 1246 if (isset(RCQUOTES) && tt) { (gdb) dupstring (s=0x6fc05758 ".") at string.c:42 42 } (gdb) 41 return t; (gdb) 40 strcpy(t, s); (gdb) zhalloc (size=8) at mem.c:417 417 } (gdb) 376 return ret; (gdb) 375 unqueue_signals(); (gdb) 374 ret = arena(h) + n - size; (gdb) 373 h->used = n; (gdb) 370 if (ARENA_SIZEOF(h) >= (n = size + h->used)) { (gdb) 368 ? fheap : heaps); (gdb) 359 queue_signals(); (gdb) 357 size = (size + H_ISIZE - 1) & ~(H_ISIZE - 1); (gdb) dupstring (s=0x6fc05758 ".") at string.c:39 39 t = (char *) zhalloc(strlen((char *)s) + 1); (gdb) 37 if (!s) (gdb) get_comp_string () at zle_tricky.c:1244 1244 tt = tokstr ? dupstring(tokstr) : NULL; (gdb) 1242 if (!zleparse && !tt0) { (gdb) print tokstr $3 = 0x6fc05758 "." (gdb) print tt0 $4 = 0 (gdb) rs 1239 if (i != redirpos) (gdb) ztrdup (s=0x6fc05758 ".") at string.c:55 55 } (gdb) 54 return t; (gdb) 53 strcpy(t, s); (gdb) zalloc (size=2) at mem.c:590 590 } (gdb) 589 return ptr; (gdb) 587 unqueue_signals(); (gdb) 583 if (!(ptr = (void *) malloc(size))) { (gdb) 582 queue_signals(); (gdb) 580 if (!size) (gdb) ztrdup (s=0x6fc05758 ".") at string.c:52 52 t = (char *)zalloc(strlen((char *)s) + 1); (gdb) 50 if (!s) (gdb) get_comp_string () at zle_tricky.c:1237 1237 cmdstr = ztrdup(tokstr); (gdb) print cmdstr $5 = 0x0 (gdb) print tokstr $6 = 0x6fc05758 "." (gdb) rs zsfree (p=0x0) at mem.c:1509 1509 } (gdb) s get_comp_string () at zle_tricky.c:1237 1237 cmdstr = ztrdup(tokstr); (gdb) ztrdup (s=0x6fc05758 ".") at string.c:50 50 if (!s) (gdb) print cmdstr $7 = 0x0 (gdb) print tokstr $8 = 0x6fc05758 "." (gdb) rs get_comp_string () at zle_tricky.c:1237 1237 cmdstr = ztrdup(tokstr); (gdb) zsfree (p=0x0) at mem.c:1509 1509 } (gdb) 1507 if (p) (gdb) get_comp_string () at zle_tricky.c:1236 1236 zsfree(cmdstr); (gdb) 1235 ins = (tok == REPEAT ? 2 : (tok != STRING)); (gdb) print cmdstr $9 = 0x0 (gdb) rs 1231 if (lincmd && (tok == STRING || tok == FOR || tok == FOREACH || (gdb) 1210 if ((ins && (tok == DOLOOP || tok == SEPER)) || (gdb) 1208 if (tok == ENDINPUT) (gdb) 1204 if (tok == DINPAR) (gdb) 1193 if (inredir && IS_REDIROP(tok)) { (gdb) 1187 else if (tok == OUTPAR) { (gdb) 1185 } else if (tok == INPAR) (gdb) 1181 if (tok == ENVARRAY) { (gdb) 1179 } else if (tok == ENVSTRING) (gdb) 1166 if (tok == LEXERR) { (gdb) ctxtlex () at lex.c:451 451 } (gdb) 447 } else if (inredir) { (gdb) 443 if (IS_REDIROP(tok) || tok == FOR || tok == FOREACH || tok == SELECT) { (gdb) 442 infor = tok == FOR ? 2 : 0; (gdb) 441 if (tok != DINPAR) (gdb) 438 incmdpos = 0; (gdb) help rs Step program backward until it reaches the beginning of another source line. Argument N means do this N times (or till program stops for another reason). (gdb) help rc Continue program being debugged but run it in reverse. If proceeding from breakpoint, a number N may be used as an argument, which means to set the ignore count of that breakpoint to N - 1 (so that the breakpoint won't break until the Nth time it is reached). (gdb) break gettok Breakpoint 2 at 0x808f3fa: file lex.c, line 673. (gdb) rc Continuing. Breakpoint 2, gettok () at lex.c:673 673 int peekfd = -1, peek; (gdb) s 676 tokstr = NULL; (gdb) 677 while (iblank(c = hgetc()) && !lexstop); (gdb) ingetc () at input.c:185 185 if (lexstop) (gdb) 188 if (inbufleft) { (gdb) 189 inbufleft--; (gdb) 190 inbufct--; (gdb) 191 if (itok(lastc = STOUC(*inbufptr++))) (gdb) print inbufptr $10 = 0x6fc05750 "./x " (gdb) s 193 if (((inbufflags & INP_LINENO) || !strin) && lastc == '\n') (gdb) print lastc $11 = 46 (gdb) s 195 return lastc; (gdb) 216 } (gdb) 217 } (gdb) gettok () at lex.c:678 678 toklineno = lineno; (gdb) 679 if (lexstop) (gdb) 681 isfirstln = 0; (gdb) 682 wordbeg = inbufct - (qbang && c == bangchar); (gdb) 683 hwbegin(-1-(qbang && c == bangchar)); (gdb) nohw (c=-1) at hist.c:812 812 } (gdb) gettok () at lex.c:685 685 if (dbparens) { (gdb) 703 } else if (idigit(c)) { /* handle 1< foo */ (gdb) 727 if (c == hashchar && !nocomments && (gdb) 750 switch (lexact1[STOUC(c)]) { (gdb) 929 return gettokstr(c, 0); (gdb) print c $12 = 46 (gdb) s gettokstr (c=46, sub=0) at lex.c:949 949 int bct = 0, pct = 0, brct = 0, fdpar = 0; (gdb) 950 int intpos = 1, in_brace_param = 0; (gdb) 951 int peek, inquote, unmatched = 0; (gdb) 956 peek = STRING; (gdb) 957 if (!sub) { (gdb) 958 len = 0; (gdb) 959 bptr = tokstr = (char *) hcalloc(bsiz = 32); (gdb) hcalloc (size=32) at mem.c:567 567 ptr = zhalloc(size); (gdb) zhalloc (size=32) at mem.c:357 357 size = (size + H_ISIZE - 1) & ~(H_ISIZE - 1); (gdb) 359 queue_signals(); (gdb) 368 ? fheap : heaps); (gdb) 370 if (ARENA_SIZEOF(h) >= (n = size + h->used)) { (gdb) 373 h->used = n; (gdb) 374 ret = arena(h) + n - size; (gdb) 375 unqueue_signals(); (gdb) 376 return ret; (gdb) 417 } (gdb) hcalloc (size=32) at mem.c:568 568 memset(ptr, 0, size); (gdb) 569 return ptr; (gdb) 570 } (gdb) gettokstr (c=46, sub=0) at lex.c:964 964 int inbl = inblank(c); (gdb) 966 if (fdpar && !inbl && c != ')') (gdb) 969 if (inbl && !in_brace_param && !pct) (gdb) 972 act = lexact2[STOUC(c)]; (gdb) 973 c = lextok2[STOUC(c)]; (gdb) bt full #0 gettokstr (c=46, sub=0) at lex.c:973 act = 18 e = 1103274760 inbl = 0 bct = 0 pct = 0 brct = 0 fdpar = 0 intpos = 1 in_brace_param = 0 peek = 34 inquote = 0 unmatched = 0 #1 0x0808fd9e in gettok () at lex.c:929 c = 46 d = 5 peekfd = -1 peek = 2005139576 #2 0x0808ec98 in zshlex () at lex.c:364 No locals. #3 0x0808ee5e in ctxtlex () at lex.c:408 oldpos = 0 #4 0x6faf7b84 in get_comp_string () at zle_tricky.c:1164 t0 = 1 tt0 = 0 i = 0 j = 0 k = 0 cp = 0 rd = 0 sl = 2005139972 ---Type to continue, or q to quit--- ocs = 2005139960 ins = 0 oins = 0 ia = 0 parct = 0 varq = 0 ona = 0 qsub = 0 zlemetacs_qsub = 0 redirpos = 0 s = 0x0 tmp = 0x821f0a0 "./" p = 0x80f8728 "" tt = 0x0 rdop = "\000\000\000\000\004\000\000\000\000P\300o@W\300o\247\360!\b" linptr = 0x6fc05748 "./x" u = 0x821f0a2 "" #5 0x6faf6574 in docomplete (lst=4) at zle_tricky.c:659 s = 0x778404b8 "\350\004\204wV\017\256o9\002\024\b" ol = 0x0 olst = 4 chl = 0 ne = 0 ocs = 2 ret = 0 dat = {137335288, 1873838068} active = 1 #6 0x6faf5a17 in expandorcomplete (args=0x6fb0bd40) at zle_tricky.c:315 ret = 2005140840 #7 0x6faf55ba in completecall (args=0x6fb0bd40) at zle_tricky.c:208 No locals. ---Type to continue, or q to quit--- #8 0x6fae5148 in execzlefunc (func=0x6fb09d28, args=0x6fb0bd40, set_bindk=0) at zle_main.c:1312 atcurhist = 1 wflags = 134 r = 0 ret = 0 remetafy = 0 w = 0x81499f0 save_bindk = 0x6fb09d28 #9 0x6fae45b3 in zlecore () at zle_main.c:1050 No locals. #10 0x6fae4ce5 in zleread (lp=0x80efb44, rp=0x80efacc, flags=7, context=0) at zle_main.c:1213 s = 0x0 old_errno = 3 tmout = 0 initthingy = 0x0 #11 0x6fae6e33 in zle_main_entry (cmd=1, ap=0x778406c4 "") at zle_main.c:1866 lp = 0x80efb44 rp = 0x80efacc flags = 7 context = 0 #12 0x08086faa in zleentry (cmd=1) at init.c:1304 ret = 0x0 ap = 0x778406b4 "D\373\016\b\314\372\016\b\a" #13 0x0808786d in inputline () at input.c:278 flags = 7 ingetcline = 0x0 ingetcpmptl = 0x80efb44 ingetcpmptr = 0x80efacc context = 0 #14 0x080876dc in ingetc () at input.c:214 ---Type to continue, or q to quit--- lastc = 1102191123 #15 0x0807d865 in ihgetc () at hist.c:263 c = 3 #16 0x0808f412 in gettok () at lex.c:677 c = 0 d = 0 peekfd = -1 peek = 0 #17 0x0808ec98 in zshlex () at lex.c:364 No locals. #18 0x080aa9d8 in parse_event () at parse.c:451 No locals. #19 0x080844d9 in loop (toplevel=1, justonce=0) at init.c:132 prog = 0x6fc05ab0 err = 50 non_empty = 1 #20 0x08087323 in zsh_main (argc=1, argv=0x77840934) at init.c:1454 t = 0x77840938 t0 = 158 #21 0x080553d6 in main (argc=Cannot access memory at address 0x0 ) at ./main.c:93 No locals. (gdb) s 975 switch (act) { (gdb) 1353 add(c); (gdb) add (c=46) at lex.c:535 535 *bptr++ = c; (gdb) 536 if (bsiz == ++len) { (gdb) 555 } (gdb) gettokstr (c=46, sub=0) at lex.c:1354 1354 c = hgetc(); (gdb) ingetc () at input.c:185 185 if (lexstop) (gdb) 188 if (inbufleft) { (gdb) 189 inbufleft--; (gdb) 190 inbufct--; (gdb) 191 if (itok(lastc = STOUC(*inbufptr++))) (gdb) 193 if (((inbufflags & INP_LINENO) || !strin) && lastc == '\n') (gdb) 195 return lastc; (gdb) 216 } (gdb) 217 } (gdb) gettokstr (c=47, sub=0) at lex.c:1355 1355 if (intpos) (gdb) 1356 intpos--; (gdb) 1357 if (lexstop) (gdb) 964 int inbl = inblank(c); (gdb) 966 if (fdpar && !inbl && c != ')') (gdb) 969 if (inbl && !in_brace_param && !pct) (gdb) 972 act = lexact2[STOUC(c)]; (gdb) 973 c = lextok2[STOUC(c)]; (gdb) 975 switch (act) { (gdb) 1353 add(c); (gdb) add (c=0) at lex.c:535 535 *bptr++ = c; (gdb) 536 if (bsiz == ++len) { (gdb) 555 } (gdb) gettokstr (c=0, sub=0) at lex.c:1354 1354 c = hgetc(); (gdb) ingetc () at input.c:185 185 if (lexstop) (gdb) 188 if (inbufleft) { (gdb) 189 inbufleft--; (gdb) 190 inbufct--; (gdb) 191 if (itok(lastc = STOUC(*inbufptr++))) (gdb) print inbufptr $13 = 0x6fc05752 "x " (gdb) s 193 if (((inbufflags & INP_LINENO) || !strin) && lastc == '\n') (gdb) 195 return lastc; (gdb) 216 } (gdb) 217 } (gdb) gettokstr (c=120, sub=0) at lex.c:1355 1355 if (intpos) (gdb) 1357 if (lexstop) (gdb) 964 int inbl = inblank(c); (gdb) 966 if (fdpar && !inbl && c != ')') (gdb) 969 if (inbl && !in_brace_param && !pct) (gdb) 972 act = lexact2[STOUC(c)]; (gdb) 973 c = lextok2[STOUC(c)]; (gdb) 975 switch (act) { (gdb) 1353 add(c); (gdb) add (c=120) at lex.c:535 535 *bptr++ = c; (gdb) 536 if (bsiz == ++len) { (gdb) print bptr $14 = 0x6fc0575b "" (gdb) s 555 } (gdb) gettokstr (c=120, sub=0) at lex.c:1354 1354 c = hgetc(); (gdb) ingetc () at input.c:185 185 if (lexstop) (gdb) 188 if (inbufleft) { (gdb) 189 inbufleft--; (gdb) 190 inbufct--; (gdb) 191 if (itok(lastc = STOUC(*inbufptr++))) (gdb) 193 if (((inbufflags & INP_LINENO) || !strin) && lastc == '\n') (gdb) print inbufptr $15 = 0x6fc05754 "" (gdb) s 195 return lastc; (gdb) 216 } (gdb) 217 } (gdb) gettokstr (c=32, sub=0) at lex.c:1355 1355 if (intpos) (gdb) 1357 if (lexstop) (gdb) 964 int inbl = inblank(c); (gdb) 966 if (fdpar && !inbl && c != ')') (gdb) 969 if (inbl && !in_brace_param && !pct) (gdb) 970 act = LX2_BREAK; (gdb) 975 switch (act) { (gdb) 977 if (!in_brace_param && !sub) (gdb) 1361 hungetc(c); (gdb) inungetc (c=32) at input.c:358 358 if (!lexstop) { (gdb) 359 if (inbufptr != inbuf) { (gdb) 368 inbufptr--; (gdb) 369 inbufct++; (gdb) 370 inbufleft++; (gdb) 371 if (((inbufflags & INP_LINENO) || !strin) && c == '\n') (gdb) 395 if (inbufptr == inbufpush && inbufflags & INP_ALCONT) { (gdb) 410 } (gdb) gettokstr (c=32, sub=0) at lex.c:1362 1362 if (unmatched) (gdb) 1364 if (in_brace_param) { (gdb) 1368 } else if (unset(IGNOREBRACES) && !sub && len > 1 && (gdb) 1376 *bptr = '\0'; (gdb) 1378 return peek; (gdb) print peek $16 = 34 (gdb) s 1379 } (gdb) gettok () at lex.c:930 930 } (gdb) zshlex () at lex.c:365 365 while (tok != ENDINPUT && exalias()); (gdb) exalias () at lex.c:1716 1716 hwend(); (gdb) nohwe () at hist.c:817 817 } (gdb) exalias () at lex.c:1717 1717 if (interact && isset(SHINSTDIN) && !strin && !incasepat && (gdb) 1722 if (!tokstr) { (gdb) 1727 VARARR(char, copy, (strlen(tokstr) + 1)); (gdb) 1729 if (has_token(tokstr)) { (gdb) has_token (s=0x6fc05758 ".") at utils.c:1785 1785 if(itok(*s++)) (gdb) 1784 while(*s) (gdb) 1787 return 0; (gdb) 1788 } (gdb) exalias () at lex.c:1736 1736 zshlextext = tokstr; (gdb) 1738 if (zleparse && !(inbufflags & INP_ALIAS)) { (gdb) 1739 int zp = zleparse; (gdb) 1741 gotword(); (gdb) gotword () at lex.c:1700 1700 we = zlemetall + 1 - inbufct + (addedx == 2 ? 1 : 0); (gdb) 1701 if (zlemetacs <= we) { (gdb) 1702 wb = zlemetall - wordbeg + addedx; (gdb) 1703 zleparse = 0; (gdb) 1705 } (gdb) exalias () at lex.c:1742 1742 if (zp == 1 && !zleparse) { (gdb) 1743 if (zshlextext == copy) (gdb) 1745 return 0; (gdb) 1799 } (gdb) zshlex () at lex.c:366 366 nocorrect &= 1; (gdb) 367 if (tok == NEWLIN || tok == ENDINPUT) { (gdb) 394 if (tok != NEWLIN) (gdb) 395 isnewlin = 0; (gdb) 398 if (tok == SEMI || tok == NEWLIN) (gdb) 400 } (gdb) ctxtlex () at lex.c:409 409 switch (tok) { (gdb) 438 incmdpos = 0; (gdb) 441 if (tok != DINPAR) (gdb) 442 infor = tok == FOR ? 2 : 0; (gdb) 443 if (IS_REDIROP(tok) || tok == FOR || tok == FOREACH || tok == SELECT) { (gdb) 447 } else if (inredir) { (gdb) 451 } (gdb) get_comp_string () at zle_tricky.c:1166 1166 if (tok == LEXERR) { (gdb) 1179 } else if (tok == ENVSTRING) (gdb) 1181 if (tok == ENVARRAY) { (gdb) 1185 } else if (tok == INPAR) (gdb) 1187 else if (tok == OUTPAR) { (gdb) 1193 if (inredir && IS_REDIROP(tok)) { (gdb) 1204 if (tok == DINPAR) (gdb) 1208 if (tok == ENDINPUT) (gdb) 1210 if ((ins && (tok == DOLOOP || tok == SEPER)) || (gdb) 1231 if (lincmd && (tok == STRING || tok == FOR || tok == FOREACH || (gdb) 1235 ins = (tok == REPEAT ? 2 : (tok != STRING)); (gdb) 1236 zsfree(cmdstr); (gdb) zsfree (p=0x0) at mem.c:1507 1507 if (p) (gdb) 1509 } (gdb) get_comp_string () at zle_tricky.c:1237 1237 cmdstr = ztrdup(tokstr); (gdb) ztrdup (s=0x6fc05758 ".") at string.c:50 50 if (!s) (gdb) 52 t = (char *)zalloc(strlen((char *)s) + 1); (gdb) zalloc (size=2) at mem.c:580 580 if (!size) (gdb) 582 queue_signals(); (gdb) 583 if (!(ptr = (void *) malloc(size))) { (gdb) 587 unqueue_signals(); (gdb) 589 return ptr; (gdb) 590 } (gdb) ztrdup (s=0x6fc05758 ".") at string.c:53 53 strcpy(t, s); (gdb) bt full #0 ztrdup (s=0x6fc05758 ".") at string.c:53 t = 0x818e950 "\270x/\bSEARCH" #1 0x6faf7fbd in get_comp_string () at zle_tricky.c:1237 t0 = 1 tt0 = 0 i = 0 j = 0 k = 0 cp = 0 rd = 0 sl = 2005139972 ocs = 2005139960 ins = 0 oins = 0 ia = 0 parct = 0 varq = 0 ona = 0 qsub = 0 zlemetacs_qsub = 0 redirpos = 0 s = 0x0 tmp = 0x821f0a0 "./" p = 0x80f8728 "" tt = 0x0 rdop = "\000\000\000\000\004\000\000\000\000P\300o@W\300o\247\360!\b" linptr = 0x6fc05748 "./x" u = 0x821f0a2 "" #2 0x6faf6574 in docomplete (lst=4) at zle_tricky.c:659 s = 0x778404b8 "\350\004\204wV\017\256o9\002\024\b" ol = 0x0 ---Type to continue, or q to quit--- olst = 4 chl = 0 ne = 0 ocs = 2 ret = 0 dat = {137335288, 1873838068} active = 1 #3 0x6faf5a17 in expandorcomplete (args=0x6fb0bd40) at zle_tricky.c:315 ret = 2005140840 #4 0x6faf55ba in completecall (args=0x6fb0bd40) at zle_tricky.c:208 No locals. #5 0x6fae5148 in execzlefunc (func=0x6fb09d28, args=0x6fb0bd40, set_bindk=0) at zle_main.c:1312 atcurhist = 1 wflags = 134 r = 0 ret = 0 remetafy = 0 w = 0x81499f0 save_bindk = 0x6fb09d28 #6 0x6fae45b3 in zlecore () at zle_main.c:1050 No locals. #7 0x6fae4ce5 in zleread (lp=0x80efb44, rp=0x80efacc, flags=7, context=0) at zle_main.c:1213 s = 0x0 old_errno = 3 tmout = 0 initthingy = 0x0 #8 0x6fae6e33 in zle_main_entry (cmd=1, ap=0x778406c4 "") at zle_main.c:1866 lp = 0x80efb44 rp = 0x80efacc flags = 7 ---Type to continue, or q to quit--- context = 0 #9 0x08086faa in zleentry (cmd=1) at init.c:1304 ret = 0x0 ap = 0x778406b4 "D\373\016\b\314\372\016\b\a" #10 0x0808786d in inputline () at input.c:278 flags = 7 ingetcline = 0x0 ingetcpmptl = 0x80efb44 ingetcpmptr = 0x80efacc context = 0 #11 0x080876dc in ingetc () at input.c:214 lastc = 1102191123 #12 0x0807d865 in ihgetc () at hist.c:263 c = 3 #13 0x0808f412 in gettok () at lex.c:677 c = 0 d = 0 peekfd = -1 peek = 0 #14 0x0808ec98 in zshlex () at lex.c:364 No locals. #15 0x080aa9d8 in parse_event () at parse.c:451 No locals. #16 0x080844d9 in loop (toplevel=1, justonce=0) at init.c:132 prog = 0x6fc05ab0 err = 50 non_empty = 1 #17 0x08087323 in zsh_main (argc=1, argv=0x77840934) at init.c:1454 t = 0x77840938 t0 = 158 #18 0x080553d6 in main (argc=0, argv=0x0) at ./main.c:93 ---Type to continue, or q to quit--- No locals. (gdb) s 54 return t; (gdb) 55 } (gdb) get_comp_string () at zle_tricky.c:1239 1239 if (i != redirpos) (gdb) 1242 if (!zleparse && !tt0) { (gdb) 1244 tt = tokstr ? dupstring(tokstr) : NULL; (gdb) dupstring (s=0x6fc05758 ".") at string.c:37 37 if (!s) (gdb) 39 t = (char *) zhalloc(strlen((char *)s) + 1); (gdb) zhalloc (size=2) at mem.c:357 357 size = (size + H_ISIZE - 1) & ~(H_ISIZE - 1); (gdb) 359 queue_signals(); (gdb) 368 ? fheap : heaps); (gdb) 370 if (ARENA_SIZEOF(h) >= (n = size + h->used)) { (gdb) 373 h->used = n; (gdb) 374 ret = arena(h) + n - size; (gdb) 375 unqueue_signals(); (gdb) 376 return ret; (gdb) 417 } (gdb) dupstring (s=0x6fc05758 ".") at string.c:40 40 strcpy(t, s); (gdb) 41 return t; (gdb) 42 } (gdb) get_comp_string () at zle_tricky.c:1246 1246 if (isset(RCQUOTES) && tt) { (gdb) 1247 char *tt1, *e = tt + zlemetacs - wb; No more reverse-execution history. get_comp_string () at zle_tricky.c:1248 1248 for (tt1 = tt; *tt1; tt1++) { (gdb) print tt $17 = 0x6fc05778 "." (gdb) c Continuing. Breakpoint 2, gettok () at lex.c:673 At this point I got a bit tired of it though, I might try more tomorrow. -- Mikael Magnusson