summaryrefslogtreecommitdiff
path: root/src/server
Commit message (Collapse)AuthorAgeFilesLines
...
* change #include "log.h" to <helper/log.h>Zachary T Welch2009-12-032-2/+2
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "log.h" the following form should be used. #include <helper/log.h> The exception is from .c files in the same directory.
* stubs: buildfixDavid Brownell2009-12-021-0/+1
| | | | | | | | | | | | | | The new stubs for httpd and ioutil gave errors like: ioutil_stubs.c: In function ‘ioutil_init’: ioutil_stubs.c:27: error: implicit declaration of function ‘LOG_DEBUG’ ioutil_stubs.c:28: error: ‘ERROR_OK’ undeclared (first use in this function) ioutil_stubs.c:28: error: (Each undeclared identifier is reported only once ioutil_stubs.c:28: error: for each function it appears in.) Fix. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* remove #if BUILD_HTTPDZachary T Welch2009-12-022-0/+33
| | | | | | | | | | | Add httpd_stubs.c to provide no-op implementations of httpd_start() and httpd_stop(). Allows these routines to be called unconditionally and ensures the libocdserver ABI remains unchanged regardless of whether this feature was built-in or not. Prints a DEBUG message when the stub implementation is included.
* remove #if logic for openocd_sleep_*ludeZachary T Welch2009-12-023-0/+45
| | | | | Adds server_stubs.c to hold these routines, using automake logic to ensure it gets included under the right conditions.
* remove interp global variable!Zachary T Welch2009-11-301-1/+1
| | | | | | | Finish removing references to the 'interp' global variable from the command module, encapsulating all reference via command_context. Eliminates use of the global entirely, so it can be removed. Hurrah!
* do not extern 'interp' from command.cZachary T Welch2009-11-305-13/+20
| | | | | Adds 'interp' field to command_context, chasing the few remaining references to the global variable outside of the command module.
* move server_init() to openocd_main()Zachary T Welch2009-11-301-1/+15
| | | | | | | | | Moves the telnet and TCL server startup to server_init(), moving their respective command registration in to server_register_commands(). Adds proper error checking for these particular startup processes. Moves the core server startup to openocd_main(), improving related error checking and preparing to defer 'init'.
* improve gdb_init() sequenceZachary T Welch2009-11-302-34/+48
| | | | | | | | | | | | Rework gdb_init to create flexible APIs (gdb_target_add_{one,all}) and static helper (gdb_target_start) for starting GDB services. Eliminates duplicated code and provides general mechanisms for adding GDB services. The 'init' command is updated to call the new API, and later patches can decouple its policy of adding all targets therein. Provides the new capability to use both piped and TCP servers when multiple targets are defined. The first target fills the pipe, and others will be started on TCP ports (unless disabled, i.e. gdb_port=0).
* fix typos in source filesUwe Hermann2009-11-263-8/+8
| | | | | | Correct some spelling errors in source comments and printed output. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
* target: create and use target_name()David Brownell2009-11-251-5/+5
| | | | | | | | | | | | | 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>
* target: target_get_name() --> target_type_name()David Brownell2009-11-251-2/+2
| | | | | | | | | | | | | 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>
* httpd: use register_commands()Zachary T Welch2009-11-243-15/+49
| | | | | | | Updates httpd_start() to use register_commands() for 'readform' and 'writeform' commands. Adds server/httpd.h to export the new signatures for this function (and httpd_stop), which allows removing the obsoleted declarations inside openocd.c.
* server: use register_commandsZachary T Welch2009-11-244-45/+95
| | | | Converts server directory to use new command registration paradigm.
* use COMMAND_REGISTER macroZachary T Welch2009-11-244-10/+10
| | | | | Replaces direct calls to register_command() with a macro, to allow its parameters to be changed and callers updated in phases.
* improve startup tcl scriptsZachary T Welch2009-11-241-0/+2
| | | | | Fix a couple of layering violations missed in the last round. Add missing comment headers.
* use COMMAND_PARSE_ENABLE macro where appropriateZachary T Welch2009-11-181-42/+3
| | | | | | | | 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.
* split startup.tcl file across modulesZachary T Welch2009-11-182-0/+9
| | | | | | | Moves definitions for each layer into their own file, eliminating layering violations in the built-in TCL code. Updates src/Makefile.am rules to include all files in the final startup.tcl input file, and others Makefile.am rules to distribute the new files in our packages.
* command_handler: change 'cmd_ctx' to CMD_CTXZachary T Welch2009-11-172-2/+2
| | | | Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
* command_handler: change 'args' to CMD_ARGVZachary T Welch2009-11-173-15/+15
| | | | | This patch converts all instances of 'args' in COMMAND_HANDLER routines to use CMD_ARGV macro.
* command_handler: change to 'argc' to CMD_ARGCZachary T Welch2009-11-172-7/+7
| | | | | This patch converts all instances of 'argc' in COMMAND_HANDLER routines to use CMD_ARGC.
* target: simplify register get/set opsDavid Brownell2009-11-171-9/+2
| | | | | | | | | | | 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>
* rename CEIL as DIV_ROUND_UPZachary T Welch2009-11-161-11/+11
| | | | | Improves the name of this macro, moves it to types.h, and adds a block of Doxygen comments to describe what it does.
* #include "target.h" less wildlyDavid Brownell2009-11-162-3/+1
| | | | | | | | | 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>
* target: don't implicitly include "breakpoint.h"David Brownell2009-11-161-0/+1
| | | | | | | | | | | 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>
* add openocd.h for top-level declarationsZachary T Welch2009-11-142-3/+2
| | | | | | | Create src/openocd.h to hold declarations previously made internally by src/main.c and src/server/server.c. This ensures all functions are verified to be in-sync at compile time (rather than at link), making it easier to track down bugs.
* command_context_t -> struct command_contextZachary T Welch2009-11-138-16/+16
| | | | Remove misleading typedef and redundant suffix from struct command_context.
* flash_bank_t -> struct flash_bankZachary T Welch2009-11-131-7/+7
| | | | Remove misleading typedef and redundant suffix from struct flash_bank.
* target_t -> struct targetZachary T Welch2009-11-132-22/+22
| | | | Remove misleading typedef and redundant suffix from struct target.
* reg_t -> struct regZachary T Welch2009-11-131-6/+6
| | | | Remove misleading typedef and redundant suffix from struct reg.
* image_t -> struct imageZachary T Welch2009-11-132-3/+3
| | | | | | | 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.
* reg_arch_type_t -> struct reg_arch_typeZachary T Welch2009-11-131-2/+2
| | | | Remove misleading typedef and redundant suffix from struct reg_arch_type.
* connection_t -> struct connectionZachary T Welch2009-11-135-67/+67
| | | | Remove misleading typedef and redundant suffix from struct connection.
* telnet_connection_t -> struct telnet_connectionZachary T Welch2009-11-132-10/+10
| | | | Remove misleading typedef and redundant suffix from struct telnet_connection.
* tcl_connection_t -> struct tcl_connectionZachary T Welch2009-11-131-7/+7
| | | | Remove misleading typedef and redundant suffix from struct tcl_connection.
* service_t -> struct serviceZachary T Welch2009-11-132-14/+14
| | | | Remove misleading typedef and redundant suffix from struct service.
* telnet_service_t -> struct telnet_serviceZachary T Welch2009-11-132-4/+4
| | | | Remove misleading typedef and redundant suffix from struct telnet_service.
* gdb_service_t -> struct gdb_serviceZachary T Welch2009-11-132-10/+10
| | | | Remove misleading typedef and redundant suffix from struct gdb_service.
* gdb_connection_t -> struct gdb_connectionZachary T Welch2009-11-132-21/+21
| | | | Remove misleading typedef and redundant suffix from struct gdb_connection.
* use CALL_COMMAND_HANDLER instead of direct callsZachary T Welch2009-11-133-3/+3
| | | | | | 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.
* use COMMAND_HELPER for command helper functionsZachary T Welch2009-11-132-4/+11
| | | | | Define the numerous helpers that inherit command handler parameters using the COMMAND_HELPER macro.
* use COMMAND_HANDLER macro to define all commandsZachary T Welch2009-11-134-14/+10
|
* log: improve log_callback_fn signatureZachary T Welch2009-11-112-3/+3
| | | | Use unsigned type for line number in log_callback_fn signature.
* httpd: fix warnings, more robust error handling, improved MIME handlingØyvind Harboe2009-11-101-6/+9
| | | | | | | | The httpd is work in progress... No mime type set by default. Let the browser guess. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* server: remove useless declarationsZachary T Welch2009-11-094-52/+64
| | | | Remove server command declarations, make handler routines static.
* src/{server,pld,svf,xsvf}: remove 'extern' keywordZachary T Welch2009-11-094-11/+17
| | | | Removes 'extern' keyword from function declarations in header filess.
* Update all server port command to use new helper.Zachary T Welch2009-11-053-23/+5
|
* Add server port command helper function.Zachary T Welch2009-11-052-0/+23
|
* Retired gdb_attach. gdb-detach event covers this functionality.Øyvind Harboe2009-10-131-66/+3
|
* If halt times out, stop GDB. Allows e.g. manual reset via monitor commands.Øyvind Harboe2009-10-121-1/+4
|
* Stop debug session if halt failsØyvind Harboe2009-10-091-1/+6
|