openocd/src/helper
Zachary T Welch 77aa7ca8d6 fix regression causing duplicated output
The command refactoring caused subcommand handlers to produce duplicate
output when run.  The problem was introduced by failing to ensure all
such invocations went through a top-level "catcher" script, prefixing
the command name with the 'ocd_' prefix and consuming its results.

The fix is to ensure such a top-level "catcher" script gets created
for each top-level command, regardless of whether it has a handler.
Indeed, this patch removes all command registrations for sub-commands,
which would not have worked in the new registration scheme anyway.

For now, dispatch of subcommands continues to be handled by the new
'unknown' command handler, which gets fixed here to strip the 'ocd_'
prefix if searching for the top-level command name fails initially.
Some Jim commands may be registered with this prefix, and that situation
seems to require the current fallback approach.  Otherwise, that prefix
could be stripped unconditionally and the logic made a little simpler.
The same problem must be handled by the 'help' command handler too,
so its lookup process works as intended.

Overall, the command dispatching remains more complicated than desired,
but this patch fixes the immediate regressions.
2009-11-27 14:30:26 -08:00
..
bin2char.c bin2char: for win32 set stdin/stdout to binary mode 2009-10-30 11:59:57 +00:00
binarybuffer.c rename CEIL as DIV_ROUND_UP 2009-11-16 09:58:11 -08:00
binarybuffer.h binarybuffer: regression fix 2009-11-16 14:50:07 -08:00
command.c fix regression causing duplicated output 2009-11-27 14:30:26 -08:00
command.h add jim_handler to command_registration 2009-11-24 21:37:37 -08:00
configuration.c embedded: reduce stack usage 2009-11-22 13:38:42 +01:00
configuration.h improve constness of open_file_from_path 2009-11-16 15:47:08 -08:00
fileio.c fileio: improve API types 2009-11-16 15:47:09 -08:00
fileio.h fileio: improve API types 2009-11-16 15:47:09 -08:00
ioutil.c add jim_handler to command_registration 2009-11-24 21:37:37 -08:00
jim-eventloop.c Sync with official Jim Tcl repository. 2009-10-19 15:16:42 +02:00
jim-eventloop.h Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes 2009-07-17 19:54:25 +00:00
jim.c Sync with official Jim Tcl repository. 2009-10-19 15:16:42 +02:00
jim.h Sync with official Jim Tcl repository. 2009-10-19 15:16:42 +02:00
log.c support OPENOCD_DEBUG_LEVEL environment setting 2009-11-25 10:29:06 -08:00
log.h log: improve initialization 2009-11-25 10:29:06 -08:00
Makefile.am split startup.tcl file across modules 2009-11-18 07:21:42 -08:00
membuf.c Switch to strotk() grr.... 2009-06-27 16:44:35 +00:00
membuf.h Add missing copyright header and fix @page direction in membuf.h. 2009-07-01 19:55:39 +00:00
options.c support for scripts in $HOME/.openocd 2009-11-24 08:57:02 +01:00
replacements.c safer conversion to HANDLER on MinGW-W64 2009-10-17 22:18:38 -07:00
replacements.h src/helper: wrap and clean headers. 2009-11-09 09:44:33 -08:00
startup.tcl improve usage and help command output 2009-11-24 21:37:37 -08:00
system.h remove hacks no longer required to build OpenOCD w/eCos 2009-06-05 06:43:09 +00:00
time_support.c time_support: improve use of types 2009-11-11 05:40:48 -08:00
time_support.h time_support: improve use of types 2009-11-11 05:40:48 -08:00
types.h "types.h" doxygen fix 2009-11-16 10:42:01 -08:00