aboutsummaryrefslogtreecommitdiff
path: root/src/server
AgeCommit message (Collapse)Author
2009-12-03change #include "log.h" to <helper/log.h>Zachary T Welch
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.
2009-12-02stubs: buildfixDavid Brownell
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>
2009-12-02remove #if BUILD_HTTPDZachary T Welch
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.
2009-12-02remove #if logic for openocd_sleep_*ludeZachary T Welch
Adds server_stubs.c to hold these routines, using automake logic to ensure it gets included under the right conditions.
2009-11-30remove interp global variable!Zachary T Welch
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!
2009-11-30do not extern 'interp' from command.cZachary T Welch
Adds 'interp' field to command_context, chasing the few remaining references to the global variable outside of the command module.
2009-11-30move server_init() to openocd_main()Zachary T Welch
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'.
2009-11-30improve gdb_init() sequenceZachary T Welch
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).
2009-11-26fix typos in source filesUwe Hermann
Correct some spelling errors in source comments and printed output. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-25target: create and use target_name()David Brownell
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-25target: target_get_name() --> target_type_name()David Brownell
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-24httpd: use register_commands()Zachary T Welch
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.
2009-11-24server: use register_commandsZachary T Welch
Converts server directory to use new command registration paradigm.
2009-11-24use COMMAND_REGISTER macroZachary T Welch
Replaces direct calls to register_command() with a macro, to allow its parameters to be changed and callers updated in phases.
2009-11-24improve startup tcl scriptsZachary T Welch
Fix a couple of layering violations missed in the last round. Add missing comment headers.
2009-11-18use COMMAND_PARSE_ENABLE macro where appropriateZachary T Welch
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-18split startup.tcl file across modulesZachary T Welch
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.
2009-11-17command_handler: change 'cmd_ctx' to CMD_CTXZachary T Welch
Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
2009-11-17command_handler: change 'args' to CMD_ARGVZachary T Welch
This patch converts all instances of 'args' in COMMAND_HANDLER routines to use CMD_ARGV macro.
2009-11-17command_handler: change to 'argc' to CMD_ARGCZachary T Welch
This patch converts all instances of 'argc' in COMMAND_HANDLER routines to use CMD_ARGC.
2009-11-17target: simplify register get/set opsDavid Brownell
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-16rename CEIL as DIV_ROUND_UPZachary T Welch
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#include "target.h" less wildlyDavid Brownell
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-16target: don't implicitly include "breakpoint.h"David Brownell
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-14add openocd.h for top-level declarationsZachary T Welch
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.
2009-11-13command_context_t -> struct command_contextZachary T Welch
Remove misleading typedef and redundant suffix from struct command_context.
2009-11-13flash_bank_t -> struct flash_bankZachary T Welch
Remove misleading typedef and redundant suffix from struct flash_bank.
2009-11-13target_t -> struct targetZachary T Welch
Remove misleading typedef and redundant suffix from struct target.
2009-11-13reg_t -> struct regZachary T Welch
Remove misleading typedef and redundant suffix from struct reg.
2009-11-13image_t -> struct imageZachary T Welch
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-13reg_arch_type_t -> struct reg_arch_typeZachary T Welch
Remove misleading typedef and redundant suffix from struct reg_arch_type.
2009-11-13connection_t -> struct connectionZachary T Welch
Remove misleading typedef and redundant suffix from struct connection.
2009-11-13telnet_connection_t -> struct telnet_connectionZachary T Welch
Remove misleading typedef and redundant suffix from struct telnet_connection.
2009-11-13tcl_connection_t -> struct tcl_connectionZachary T Welch
Remove misleading typedef and redundant suffix from struct tcl_connection.
2009-11-13service_t -> struct serviceZachary T Welch
Remove misleading typedef and redundant suffix from struct service.
2009-11-13telnet_service_t -> struct telnet_serviceZachary T Welch
Remove misleading typedef and redundant suffix from struct telnet_service.
2009-11-13gdb_service_t -> struct gdb_serviceZachary T Welch
Remove misleading typedef and redundant suffix from struct gdb_service.
2009-11-13gdb_connection_t -> struct gdb_connectionZachary T Welch
Remove misleading typedef and redundant suffix from struct gdb_connection.
2009-11-13use CALL_COMMAND_HANDLER instead of direct callsZachary T Welch
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-13use COMMAND_HELPER for command helper functionsZachary T Welch
Define the numerous helpers that inherit command handler parameters using the COMMAND_HELPER macro.
2009-11-13use COMMAND_HANDLER macro to define all commandsZachary T Welch
2009-11-11log: improve log_callback_fn signatureZachary T Welch
Use unsigned type for line number in log_callback_fn signature.
2009-11-10httpd: fix warnings, more robust error handling, improved MIME handlingØyvind Harboe
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>
2009-11-09server: remove useless declarationsZachary T Welch
Remove server command declarations, make handler routines static.
2009-11-09src/{server,pld,svf,xsvf}: remove 'extern' keywordZachary T Welch
Removes 'extern' keyword from function declarations in header filess.
2009-11-05Update all server port command to use new helper.Zachary T Welch
2009-11-05Add server port command helper function.Zachary T Welch
2009-10-13Retired gdb_attach. gdb-detach event covers this functionality.Øyvind Harboe
2009-10-12If halt times out, stop GDB. Allows e.g. manual reset via monitor commands.Øyvind Harboe
2009-10-09Stop debug session if halt failsØyvind Harboe