aboutsummaryrefslogtreecommitdiffstats
path: root/symbol.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-07-01 10:05:03 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-07-01 10:05:03 +0300
commit72645295eec48c30ed6a9b9f8bf21b9f53995524 (patch)
tree4dd74b5c99098c91714da87d14b3e0715428249b /symbol.c
parent82024c4ac22e50de3b0ad36d8aa81c52e7b4c9ae (diff)
downloadegawk-72645295eec48c30ed6a9b9f8bf21b9f53995524.tar.gz
egawk-72645295eec48c30ed6a9b9f8bf21b9f53995524.tar.bz2
egawk-72645295eec48c30ed6a9b9f8bf21b9f53995524.zip
Add FUNCTAB and SYMTAB to variables dumped with -d.
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/symbol.c b/symbol.c
index 8533fad6..fe7e3753 100644
--- a/symbol.c
+++ b/symbol.c
@@ -409,7 +409,8 @@ get_symbols(SYMBOL_TYPE what, bool sort)
max = the_table->table_size * 2;
list = assoc_list(the_table, "@unsorted", ASORTI);
- emalloc(table, NODE **, (var_count + 1) * sizeof(NODE *), "get_symbols");
+ /* add three: one for FUNCTAB, one for SYMTAB, and one for a final NULL */
+ emalloc(table, NODE **, (var_count + 1 + 1 + 1) * sizeof(NODE *), "get_symbols");
for (i = count = 0; i < max; i += 2) {
r = list[i+1];
@@ -417,6 +418,9 @@ get_symbols(SYMBOL_TYPE what, bool sort)
continue;
table[count++] = r;
}
+
+ table[count++] = func_table;
+ table[count++] = symbol_table;
}
efree(list);