summaryrefslogtreecommitdiff
path: root/src/server/tcl_server.c
Commit message (Collapse)AuthorAgeFilesLines
* pipes: add documentation for pipesØyvind Harboe2010-10-011-1/+1
| | | | | | | | | Stick with the name "gdb_port" even if this command can be used for other things(disable, named pipes, anonymous stdin/out pipe). "port" is correct for probably more than 90% of use cases, if not more. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* server: add support for pipesØyvind Harboe2010-10-011-1/+1
| | | | | | | -p/--pipe is now deprecated. Use '-c "gdb_port pipe;log_output openocd.log"' instead. Warning logged. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* server: specify port as a stringØyvind Harboe2010-10-011-8/+6
| | | | | | | | | This will allow switching to using named pipes. Split this out as a seperate commit to make changes easier to follow. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* server: read/write now goes through connection fn'sØyvind Harboe2010-10-011-2/+2
| | | | | | | | | | | depending on whether the connection is over a socket or pipe, the read is done differently. pipes can return -1 when writing 0 bytes, make 0 byte writes a successful no-op. 0 byte writes falls out naturally of tcl server code. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* server: split file descriptors in in/out fd'sØyvind Harboe2010-10-011-0/+1
| | | | | | | pipes have different fd's for in/out. This makes the code more orthogonal and prepares for adding pipes. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* tcl_server: switch to ctrl-zØyvind Harboe2010-09-201-11/+11
| | | | | | | | | | | | | | by using ctrl-z instead of line end, multi-line tcl scripts can be handled. Testing: send ctrl-z a couple of times to make telnet enter the mode where it sends ctrl-z unencoded. Programs that talk to the tcl_server can send ctrl-z to indicate end of tcl-let to be executed without having to worry about telnet protocols. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Fixed bug in tcl-serverMatthias Bode2010-05-051-3/+3
| | | | | | | | No segmentationfault when sending commands to tcl-server. modified: src/server/server.c modified: src/server/tcl_server.c modified: src/server/tcl_server.h
* src/server: usage/help/doc updatesDavid Brownell2010-01-091-4/+5
| | | | | | | | | | | | | | | Make "usage" messages use the same EBNF as the User's Guide; no angle brackets. Improve and correct various helptexts. Specifically for the port commands, clarify that the number is optional, and omitting it causes the current number to be displayed. Don't use "&function"; a function's name is its address. Remove a couple instances of pointless whitespace; shrink a few overlong lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* cygwin 1.7 build fixesDavid Brownell2009-12-261-1/+1
| | | | | | | | | | | It's less accepting of signed char ... insisting that e.g. tolower() not receive one as a parameter. It's probably good to phase out such usage, given the number of bugs that lurk in the vicinity (assumptions that char is unsigned), so fix these even though such usage is actually legal. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* do not extern 'interp' from command.cZachary T Welch2009-11-301-2/+5
| | | | | Adds 'interp' field to command_context, chasing the few remaining references to the global variable outside of the command module.
* server: use register_commandsZachary T Welch2009-11-241-4/+13
| | | | Converts server directory to use new command registration paradigm.
* use COMMAND_REGISTER macroZachary T Welch2009-11-241-1/+1
| | | | | Replaces direct calls to register_command() with a macro, to allow its parameters to be changed and callers updated in phases.
* command_context_t -> struct command_contextZachary T Welch2009-11-131-1/+1
| | | | Remove misleading typedef and redundant suffix from struct command_context.
* connection_t -> struct connectionZachary T Welch2009-11-131-8/+8
| | | | Remove misleading typedef and redundant suffix from struct connection.
* tcl_connection_t -> struct tcl_connectionZachary T Welch2009-11-131-7/+7
| | | | Remove misleading typedef and redundant suffix from struct tcl_connection.
* use CALL_COMMAND_HANDLER instead of direct callsZachary T Welch2009-11-131-1/+1
| | | | | | 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_HANDLER macro to define all commandsZachary T Welch2009-11-131-2/+1
|
* server: remove useless declarationsZachary T Welch2009-11-091-9/+8
| | | | Remove server command declarations, make handler routines static.
* Update all server port command to use new helper.Zachary T Welch2009-11-051-5/+3
|
* Remove whitespace at end of lines, step 2.zwelch2009-06-231-1/+1
| | | | | | | - Replace '\s*$' with ''. git-svn-id: svn://svn.berlios.de/openocd/trunk@2380 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-131-3/+3
| | | | | | | | | | | OpenOCD doesn't actually *need* to be keeping all TCP ports active ... creating security issues in some network configs. Instead, let config file specify e.g. "tcl_port 0" (or gdb_port, telnet_port) to disable that particular remote access method. git-svn-id: svn://svn.berlios.de/openocd/trunk@2240 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Make startup for the various server ports be quiet, unless debugging is active: don't emit needless scarey messages. Update the relevant documentation and its references: - For these port commands ... cover the default values; convert to @deffn syntax; include their use outside of the configuration stage; and alphabetize. Similar updates to the rest of that small chapter: - Highlight that there even *IS* a configuration stage, after which some command functionality is no longer available. - For GDB commands ... convert to @deffn syntax; alphabetize; include a missing command (!); add missing helptext (!) for one non-missing command; update relevant cross-references and index entries. git-svn-id: svn://svn.berlios.de/openocd/trunk@1909 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Audit and eliminate redundant #include directives from src/server.zwelch2009-05-111-9/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1709 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove redundant declarations to allow building with -Wredundant-decls.zwelch2009-04-291-1/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1560 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - add ability for openocd to communicate to gdb using pipes (stdin/stdout).ntfreak2008-12-151-1/+1
| | | | | | - this is enabled by new command line option option --pipe. git-svn-id: svn://svn.berlios.de/openocd/trunk@1242 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Laurentiu Cocanu - more help textoharboe2008-10-221-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1087 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Duane Ellis: "target as an [tcl] object" feature.oharboe2008-09-011-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@975 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fix incorrectly registered function openocd_array2memntfreak2008-07-181-107/+105
| | | | | | | | | - removed unused variables - reformatted lpc288x.[ch] - fixed helper/Makefile.am dependencies - add correct svn props to added files git-svn-id: svn://svn.berlios.de/openocd/trunk@829 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Charles Hardin <ckhardin@gmail.com> move jim into helperoharboe2008-07-171-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@822 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fixed build issues with win32ntfreak2008-07-061-200/+200
| | | | | | | - fixed build warnings for last commit - set svn props for last commit git-svn-id: svn://svn.berlios.de/openocd/trunk@760 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* moving Tcl stuff around slightly.oharboe2008-07-061-4/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@759 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* fix a few compilation problems.oharboe2008-07-061-0/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@758 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Charles Hardin <ckhardin@gmail.com> - Tcl Serveroharboe2008-07-061-0/+200
git-svn-id: svn://svn.berlios.de/openocd/trunk@757 b42882b7-edfa-0310-969c-e2dbd0fdcd60