Commit Graph

161 Commits

Author SHA1 Message Date
Uwe Hermann 1240ae459f fix typos in source files
Correct some spelling errors in source comments and printed output.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-26 10:11:26 -08:00
David Brownell 2653b80307 target: create and use target_name()
Several of the sites now using target_type_name() really
ought to be using an instance-specific name.  Create a
function called target_name(), accessing the instance's
own (command) name.

Use it in several places that really should be displaying
instance-specific names.  Also in several places which
were already doing so, but which had no wrapper to call.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-25 16:38:08 -08:00
David Brownell b715a81f5b target: target_get_name() --> target_type_name()
There are two names that may matter on a per-target basis.
One is a per-instance name (for example, "at91sam7s.cpu").
The other is the name of its type (for example, "arm7tdmi"),
which is shared among multiple targets.

Currently target_get_name() returns the type name, which is
misleading and is rarely appropriate for target diagnostics.
Rename that as target_type_name().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-25 16:38:08 -08:00
Zachary T Welch b4c4b5f71e server: use register_commands
Converts server directory to use new command registration paradigm.
2009-11-24 21:37:32 -08:00
Zachary T Welch 833e7f5248 use COMMAND_REGISTER macro
Replaces direct calls to register_command() with a macro, to allow
its parameters to be changed and callers updated in phases.
2009-11-24 21:37:29 -08:00
Zachary T Welch 410fab9ea8 use COMMAND_PARSE_ENABLE macro where appropriate
Updates all command parsing of simple "enable" and "disable" arguments.
A few case in the tree use a tri-state or extended arguments, which
cannot use this simple macro.

Simlifies the xscale icache/dcache command handler logic.
2009-11-18 15:51:07 -08:00
Zachary T Welch 2861877b32 command_handler: change 'cmd_ctx' to CMD_CTX
Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
2009-11-17 11:40:06 -08:00
Zachary T Welch 23402315ce command_handler: change 'args' to CMD_ARGV
This patch converts all instances of 'args' in COMMAND_HANDLER routines
to use CMD_ARGV macro.
2009-11-17 11:38:07 -08:00
Zachary T Welch 7bf1a86e47 command_handler: change to 'argc' to CMD_ARGC
This patch converts all instances of 'argc' in COMMAND_HANDLER routines
to use CMD_ARGC.
2009-11-17 11:38:06 -08:00
David Brownell f4788652e4 target: simplify register get/set ops
No need to indirect from registered integers to pointers.
Just stash the pointers directly in the register struct,
and don't even bother registering.

This is a small code shrink, speeds register access just
a smidgeon, and gets rid of another rude exit() path.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-17 09:06:45 -08:00
Zachary T Welch a94748ec6d rename CEIL as DIV_ROUND_UP
Improves the name of this macro, moves it to types.h, and adds a block
of Doxygen comments to describe what it does.
2009-11-16 09:58:11 -08:00
David Brownell b695cb7522 #include "target.h" less wildly
Don't include "target.h" from more headers than necessary.  This
avoids needless interdependencies and duplicated include paths.

Don't needlessly include it in source files, either.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16 00:35:24 -08:00
David Brownell aa7c449600 target: don't implicitly include "breakpoint.h"
Most files in the tree seem to have ended up including this,
and *quite* needlessly ... only code implementing or using
breakpoints actually needs these declarations.

So take it out of the header files which included it, and put
it in files which use it ... reduce needless interdependencies.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16 00:34:57 -08:00
Zachary T Welch 98723c4ecd command_context_t -> struct command_context
Remove misleading typedef and redundant suffix from struct command_context.
2009-11-13 13:25:47 -08:00
Zachary T Welch 96b62996d2 flash_bank_t -> struct flash_bank
Remove misleading typedef and redundant suffix from struct flash_bank.
2009-11-13 11:58:14 -08:00
Zachary T Welch 0f1163e823 target_t -> struct target
Remove misleading typedef and redundant suffix from struct target.
2009-11-13 11:58:14 -08:00
Zachary T Welch d0dee7ccaf reg_t -> struct reg
Remove misleading typedef and redundant suffix from struct reg.
2009-11-13 11:58:13 -08:00
Zachary T Welch dfecfd5fd4 image_t -> struct image
Remove misleading typedef and redundant suffix from struct image.

Also removes the typedef from enum image_type, as it is used in
image.h only.
2009-11-13 11:58:13 -08:00
Zachary T Welch c2b5d8a6fa reg_arch_type_t -> struct reg_arch_type
Remove misleading typedef and redundant suffix from struct reg_arch_type.
2009-11-13 11:58:12 -08:00
Zachary T Welch 38d826cec1 connection_t -> struct connection
Remove misleading typedef and redundant suffix from struct connection.
2009-11-13 11:58:08 -08:00
Zachary T Welch 45a165a432 gdb_service_t -> struct gdb_service
Remove misleading typedef and redundant suffix from struct gdb_service.
2009-11-13 11:58:08 -08:00
Zachary T Welch 53bfd73591 gdb_connection_t -> struct gdb_connection
Remove misleading typedef and redundant suffix from struct gdb_connection.
2009-11-13 11:58:08 -08:00
Zachary T Welch 5b6df55a1e use CALL_COMMAND_HANDLER instead of direct calls
By using CALL_COMMAND_HANDLER, parameters can be reordered, added, or
even removed in inherited signatures, without requiring revisiting
all of the various call sites.
2009-11-13 10:51:46 -08:00
Zachary T Welch cfc4d5c6b7 use COMMAND_HANDLER macro to define all commands 2009-11-13 10:51:45 -08:00
Zachary T Welch 6a2e83c017 log: improve log_callback_fn signature
Use unsigned type for line number in log_callback_fn signature.
2009-11-11 05:40:48 -08:00
Zachary T Welch 23d88e5774 server: remove useless declarations
Remove server command declarations, make handler routines static.
2009-11-09 21:39:46 -08:00
Zachary T Welch 2b78a4e82b Update all server port command to use new helper. 2009-11-05 18:03:19 -08:00
Øyvind Harboe 79bf27da71 Retired gdb_attach. gdb-detach event covers this functionality. 2009-10-13 13:44:15 +02:00
Øyvind Harboe c8d935ab7c If halt times out, stop GDB. Allows e.g. manual reset via monitor commands. 2009-10-12 09:27:27 +02:00
Øyvind Harboe c3428f5b7a Stop debug session if halt fails 2009-10-09 10:31:40 +02:00
Øyvind Harboe f525f2ef0d Stop GDB when polling fails, srst assert or powerdropout is detected 2009-10-08 14:53:25 +02:00
oharboe 37755ffdb6 When attaching GDB to OpenOCD, the target state is no longer affected.
Added gdb_sync feature that allows GDB to sync up to target state.
Issue "monitor gdb_sync" and the next stepi, will return immediately
with updated register values to GDB.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2754 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-24 06:34:23 +00:00
dbrownell 86a7d813a1 Remove annoying end-of-line whitespace from most src/*
files; omitted src/httpd


git-svn-id: svn://svn.berlios.de/openocd/trunk@2742 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-21 18:40:55 +00:00
oharboe d879faa3cb David Brownell <david-b@pacbell.net> start phasing out integers as target IDs
git-svn-id: svn://svn.berlios.de/openocd/trunk@2650 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-30 17:30:14 +00:00
oharboe 5a824c934f Fix NPE in GDB_EVENT_END as logforwarding was not disabled early enough
git-svn-id: svn://svn.berlios.de/openocd/trunk@2570 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-27 18:56:43 +00:00
oharboe 8b994145b8 Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-17 19:54:25 +00:00
oharboe d68096dcf2 typo in comment
git-svn-id: svn://svn.berlios.de/openocd/trunk@2496 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-08 10:25:23 +00:00
duane 261e04466d A bit more log detail about connections comming and going
git-svn-id: svn://svn.berlios.de/openocd/trunk@2410 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-28 02:54:19 +00:00
ntfreak 374f6c8b70 - fix issue when using gdb_port cmd
- bug introduced in r2240

git-svn-id: svn://svn.berlios.de/openocd/trunk@2403 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-25 15:11:57 +00:00
zwelch c493543fc9 - Replace '){' with ') {'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2378 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:49:06 +00:00
zwelch dc575dc5bf Remove whitespace that occurs before ')'.
- Replace '[ \t]*[)]' with ')'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:47:42 +00:00
zwelch f90d8fa45f Remove whitespace that occurs after '('.
- Replace '([ \t]*' with '('.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:46:23 +00:00
zwelch 6d1d58a1fc - Fixes '[<>]' whitespace
- Replace ')\([<>]\)(' with ') \1 ('.
- Replace ')\([<>]\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\([<>]\)(' with '\1 \2 ('.
- Replace '\(\w\)\([<>]\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:45:47 +00:00
zwelch 8959de9f67 - Fixes '+' whitespace
- Replace ')\(+\)(' with ') \1 ('.
- Replace ')\(+\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(+\)(' with '\1 \2 ('.
- Replace '\(\w\)\(+\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:44:17 +00:00
zwelch 84df52f9ea - Fixes '=' whitespace
- Replace ')\(=\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(=\)(' with '\1 \2 ('.
- Replace '\(\w\)\(=\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:42:54 +00:00
zwelch 3813fda44a - Fixes '==' whitespace
- Replace ')\(==\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(==\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:42:03 +00:00
zwelch aea6815462 - Fixes '<<' whitespace
- Replace ')\(<<\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(<<\)(' with '\1 \2 ('.
- Replace '\(\w\)\(<<\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2370 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:41:13 +00:00
zwelch 128a733428 - Fixes '&&' whitespace
- Replace ')\(&&\)(' with ') \1 ('.
- Replace '\(\w\)\(&&\)(' with '\1 \2 ('.
- Replace '\(\w\)\(&&\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2366 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:39:47 +00:00
zwelch d61714f4d5 - Fixes '[+]=' whitespace
- Replace '\(\w\)\([+]=\)(' with '\1 \2 ('.
- Replace '\(\w\)\([+]=\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2364 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:39:18 +00:00
zwelch 53d605e12c - Fixes '!=' whitespace
- Replace ')\(!=\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(!=\)(' with '\1 \2 ('.
- Replace '\(\w\)\(!=\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:38:12 +00:00