summaryrefslogtreecommitdiff
path: root/src/helper/command.c
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-06-12 16:49:49 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-06-12 16:49:49 +0000
commitb9628accd6da0aef6a9fc03efb96e05afab99c99 (patch)
tree91006cc62c3ca10641efbe41a6829ed16671cf10 /src/helper/command.c
parent335f667d4433e8ca3a57e813fd128b78d8b364d2 (diff)
downloadopenocd+libswd-b9628accd6da0aef6a9fc03efb96e05afab99c99.tar.gz
openocd+libswd-b9628accd6da0aef6a9fc03efb96e05afab99c99.tar.bz2
openocd+libswd-b9628accd6da0aef6a9fc03efb96e05afab99c99.tar.xz
openocd+libswd-b9628accd6da0aef6a9fc03efb96e05afab99c99.zip
- the 'help' command now takes an optional argument to display help only on a certain command (thanks to Andrew Dyer for this enhancement)
- OpenOCD now includes the ability to diassemble instructions on its own (only ARM for now, Thumb might follow). The command is "armv4_5 disassemble <address> <count> ['thumb']" (thumb is currently unsupported). I've compared the produced disassembly against GDB/GNU Objdump output, and it seems to be correct, but there may still be some bugs left. git-svn-id: svn://svn.berlios.de/openocd/trunk@68 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/command.c')
-rw-r--r--src/helper/command.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index 00d4b356..9fc78422 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -443,6 +443,15 @@ int command_print_help(command_context_t* context, char* name, char** args, int
for (c = context->commands; c; c = c->next)
{
+ if (argc == 1)
+ {
+ if (strncasecmp(c->name, args[0], c->unique_len))
+ continue;
+
+ if (strncasecmp(c->name, args[0], strlen(args[0])))
+ continue;
+ }
+
command_print_help_line(context, c, 0);
}