summaryrefslogtreecommitdiff
path: root/Src/Zle/complist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-05-14 00:07:41 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-05-14 00:07:41 +0000
commit506615ff94c7784e974f13034f04db87427b367e (patch)
treea7c196125a3ecab16fff2debffdfe98b295ef2b9 /Src/Zle/complist.c
parent9c0a19669b32bcbf153e2bfdf1a44b0fe0d4876c (diff)
downloadzsh-506615ff94c7784e974f13034f04db87427b367e.tar.gz
zsh-506615ff94c7784e974f13034f04db87427b367e.zip
29267: add -enable-zsh-debug and use for debugging completion matcher groups
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r--Src/Zle/complist.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 6d0da448c..fdca7a99f 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -1363,6 +1363,11 @@ compprintlist(int showall)
while (g) {
char **pp = g->ylist;
+#ifdef ZSH_HEAP_DEBUG
+ if (memory_validate(g->heap_id)) {
+ HEAP_ERROR(g->heap_id);
+ }
+#endif
if ((e = g->expls)) {
int l;
@@ -1952,6 +1957,11 @@ complistmatches(UNUSED(Hookdef dummy), Chdata dat)
Cmgroup oamatches = amatches;
amatches = dat->matches;
+#ifdef ZSH_HEAP_DEBUG
+ if (memory_validate(amatches->heap_id)) {
+ HEAP_ERROR(amatches->heap_id);
+ }
+#endif
noselect = 0;
@@ -2640,6 +2650,11 @@ domenuselect(Hookdef dummy, Chdata dat)
s->mlbeg = mlbeg;
memcpy(&(s->info), &minfo, sizeof(struct menuinfo));
s->amatches = amatches;
+#ifdef ZSH_HEAP_DEBUG
+ if (memory_validate(amatches->heap_id)) {
+ HEAP_ERROR(amatches->heap_id);
+ }
+#endif
s->pmatches = pmatches;
s->lastmatches = lastmatches;
s->lastlmatches = lastlmatches;
@@ -2835,6 +2850,11 @@ domenuselect(Hookdef dummy, Chdata dat)
if (lastmatches)
freematches(lastmatches, 0);
amatches = u->amatches;
+#ifdef ZSH_HEAP_DEBUG
+ if (memory_validate(amatches->heap_id)) {
+ HEAP_ERROR(amatches->heap_id);
+ }
+#endif
pmatches = u->pmatches;
lastmatches = u->lastmatches;
lastlmatches = u->lastlmatches;