aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-options.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-01 23:04:01 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-01 23:06:54 -0400
commite4821e2f5fd281eb6b88b642fa9beaf9c3a35070 (patch)
tree6712b6adcbdad468b86475eee0fe315440b57fbc /sim/common/sim-options.c
parent328e805b5a7d4f27552a1062e25a89477bd89009 (diff)
downloadgdb-e4821e2f5fd281eb6b88b642fa9beaf9c3a35070.zip
gdb-e4821e2f5fd281eb6b88b642fa9beaf9c3a35070.tar.gz
gdb-e4821e2f5fd281eb6b88b642fa9beaf9c3a35070.tar.bz2
sim: options: fix --help output
The hash table rewrite broke --help output due to subtle behavior: calling dup_arg_p(NULL) will create & clear the table, not just create it. The --help output relies on this to clear the table before it shows things.
Diffstat (limited to 'sim/common/sim-options.c')
-rw-r--r--sim/common/sim-options.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index a6da8ec..1522cac 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -437,6 +437,7 @@ dup_arg_p (const char *arg)
arg_table = htab_create_alloc (10, htab_hash_string,
compare_strings, NULL,
xcalloc, free);
+ htab_empty (arg_table);
return 0;
}