Commit Graph

560 Commits

Author SHA1 Message Date
Spencer Oliver ff1108ad38 telnet: add telnet history support
adapted from Yoshinori Sato's patch:
2f07f4600a

Change-Id: I084b86d316b0aa6e9593f007c024961dbda805e9
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1310
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-04-21 07:28:32 +00:00
Evan Hunter 0875e64ddb gdb server: Fix buffer overrun - sprintf appends a terminating null to the data which was overrunning the supplied buffer.
Fixes regression introduced in commit 07dcd5648d

Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Change-Id: Iec64233c0da5a044fb984c4b1803309cb636efe9
Reviewed-on: http://openocd.zylin.com/1312
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-04-02 15:05:44 +00:00
Spencer Oliver 07dcd5648d gdb: use stdio functions to convert parameters
This reduces the number of gdb conversion routines we have to maintain.

Change-Id: Ia43d6cac86cbe4f76fe0875b9d9c16ac340296db
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1128
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-03-07 21:11:44 +00:00
Spencer Oliver 3d62c3df6d gdbserver: use common hexify/unhexify routines
Change-Id: I9989b625666e9c60ec9867cf6f4d94f41c998c3f
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1105
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2013-02-26 20:49:49 +00:00
Spencer Oliver 0466ee7e4a gdb: fix correct shutdown when using pipes
50d5441e2a commit added a regression when
using pipes with GDB, OpenOCD would appear to hang when exiting GDB.

This fixes that behaviour so we shutdown correctly.

Change-Id: I9b337c2bdd41b1966de1c7631118257afcbfa6bd
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/993
Tested-by: jenkins
2012-12-24 11:00:52 +00:00
Sergey Borshch fc302a0252 fix memory leaks
if add_connection() fails, memory allocated in copy_command_context() is lost.

Signed-off-by: Sergey Borshch <sb-sf@users.sourceforge.net>
Change-Id: I91a2757f29612038031eb8953100faa3b850d3a6
Reviewed-on: http://openocd.zylin.com/836
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-10-31 10:24:08 +00:00
Spencer Oliver 538a86c339 gdb: use strncmp rather than strstr
All the packets received will be at start of the packet buffer, so use
more efficient strncmp.

Change-Id: Ib9c45d8f53425367006b1f880c1bde27f03a6cf9
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/932
Tested-by: jenkins
Reviewed-by: Matthias Blaicher <matthias@blaicher.com>
Reviewed-by: Peter Stuge <peter@stuge.se>
2012-10-28 01:40:21 +00:00
Spencer Oliver 4a5dc0988a Revert "gdb_server : 'R' command replied by OK"
This reverts commit 1e7e594452.

For some reason the above commit added a reply to the restart command - this is
not required as per the gdb docs.

Newer versions of gdb (7.0 and above) will complain about this reply.

Change-Id: Ieeae3dcf44d798a91dfc6f7348da982c2ce1be31
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/910
Tested-by: jenkins
Reviewed-by: Joel Bodenmann <joel@unormal.org>
2012-10-24 12:01:22 +00:00
Spencer Oliver 98a41bca6e gdb: fix extended-remote restart
Seems versions of gdb > 6.8 require an W stop reply after receiving a
kill packet.

Without this we receive the following error from gdb:
gdb/thread.c:72: internal-error: inferior_thread: Assertion `tp' failed.

Change-Id: I86765a321f0429c9b517fe13ded0ee2dbd4b2f87
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/911
Tested-by: jenkins
Reviewed-by: Joel Bodenmann <joel@unormal.org>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-10-17 18:21:53 +00:00
Spencer Oliver eaed9db414 gdbserver: code cleanup
Change-Id: Iab2966be8dd145f33f41902e2d55afe03d0f5856
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/857
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-10-02 11:39:45 +00:00
Spencer Oliver 210ff60284 server: warn if user changes server port after init
So the user can view the current port number these cmds were changed to COMMAND_ANY.
However this means that the user can also attempt to change the port number after init,
even though this is not supported. Issue a warning that this is not supported.

Change-Id: I3d20dcd81277e7d994240a8e314f27672ff760c4
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/788
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-08-29 06:42:52 +00:00
Spencer Oliver 60a932b368 build: fix memory leaks
Fix the memory leaks found by clang-3.1

Change-Id: Iaae68627ef599c324c9c9ee5737c22e92512862d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/775
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-08-24 16:49:56 +00:00
Spencer Oliver 40801d21ff telnet: cleanup comments
seems comments were mangled during the last cleanup.

Change-Id: If759f62032705c7baffd3973e9717eb7e8a5d17c
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/752
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-07-30 06:52:44 +00:00
Vandra Akos 445a54a669 Jim_GetResult was called twice
Removed the superflous call to Jim_GetResult,
as we are reading in the result to a variable
anyways in the next instruction.

Change-Id: Idc96400737dc15e28304e97bcea79fa6c7a88ae1
Signed-off-by: Vandra Akos <axos88@gmail.com>
Reviewed-on: http://openocd.zylin.com/661
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-05-25 12:11:57 +00:00
Spencer Oliver bb3793c9a4 target: remove legacy target events
These events have been deprecated for a number of years, update any
remaining scripts to the new events.

Change-Id: Ic31ff388545ac8b3a500045699ca92c541b13f12
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/634
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Reviewed-by: Bill Traynor <wmat@alphatroop.com>
2012-05-21 16:19:28 +00:00
Mathias K b0cab3d809 gdb_server: Simple close the connection and not exit openocd.
This patch let openocd running and only close the gdb connection
on error.

Change-Id: Ifb88e16834b51207cc4c82210eab904ed8d30b71
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/523
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-19 17:11:48 +00:00
Mathias K 0ba480d924 gdb_server: Fix wrong index/length compare.
This patch fix the compare for the list size and the register index.

Change-Id: I36d5e078f57d2a9f7823cfdf0d537762e00f6929
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/516
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-19 17:09:13 +00:00
Mathias K 4a29a4a86d gdb_server: sanity check the gdb register size
This patch checks the received register length with the local
configured register length and disconnect on a length missmatch.

Change-Id: I6b112c6b55a9ffb4526f582a384ffa91dc8b792f
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/517
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-14 20:57:21 +00:00
Øyvind Harboe 39650e2273 ecosboard: delete bit-rotted eCos code
Change-Id: Iff7943eb9da3f41dcc45492acd0f36cf63b3497f
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/503
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: jenkins
2012-03-13 19:11:11 +00:00
Spencer Oliver b48d1f6637 build: cleanup src/server directory
Change-Id: I6410df28c5999f5cbee2d3bcaa02469a29ea4c15
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/412
Tested-by: jenkins
2012-02-06 10:47:01 +00:00
Spencer Oliver 0c2f8b6eb8 cmd: add missing usage vars
we should have caught them all - hopefully.

Change-Id: I35435317fccaf5ad0216244d69f76db6857bb582
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/381
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-18 21:45:02 +00:00
Michel JAOUEN 885341a2db rtos : receive reset info
Change-Id: I03c64f50eed9bec43303bf47ac1f226a0e8dbd53
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/346
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15 22:14:10 +00:00
Michel JAOUEN ebac7c963a rtos : smp support
Change-Id: I583cddf5e62ed77f108786a085569ab8699ad50d
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/344
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15 22:11:48 +00:00
Michel JAOUEN ca173ff4d4 rtos : remove unused parameter
Change-Id: I98c9f28a0085bd4713b694181ab544777091eac6
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-on: http://openocd.zylin.com/341
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15 22:07:24 +00:00
Øyvind Harboe 3cbed17e18 rtos: fix bug in error handling
checking for != ERROR_FAIL is broken.

Change-Id: Id7085afac653bb9c38d08928227a9ea402d8e6e9
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/351
Tested-by: jenkins
Reviewed-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-09 08:58:24 +00:00
Øyvind Harboe 4668bd264c retire ERROR_INVALID_ARGUMENTS and replace with ERROR_COMMAND_SYNTAX_ERROR
Change-Id: I6dee51e1fab1944085391f274a343cdb9014c7a4
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/300
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-04 17:13:46 +00:00
Spencer Oliver 3500109fc7 gdb_server: use strndup to allocate debug messages
Lets be consistent and use strndup to allocate the debug buffer.

Change-Id: I535ad270ebfeae6e09d28372ab3749c822971223
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/245
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-12-02 12:26:04 +00:00
James Zhao 4f4acc3669 Fix compile error when _DEBUG_GDB_IO_ is set
Compile error is encountered when _DEBUG_GDB_IO_ is set,
due to duplicate variables.
Fixed by renaming the variable.

Change-Id: I729c06e317fdb899142c9ceaf543b7f580088807
Signed-off-by: James Zhao <jamzhao@gmail.com>
Reviewed-on: http://openocd.zylin.com/243
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-12-01 06:12:00 +00:00
Philip Nye e5e2408680 gdb: Potential rounding error in reg_packet_size gdb_get_registers_packet
The calculation for reg_packet_size in gdb_get_registers_packet() could
generate a wrong result in the case of multiple registers whose size is
not a multiple of 8.

The current calculation sums the sizes for all registers then rounds the result
up to the next multiple of 8.

Instead it should round each register size up individually and sum the results for all registers.

Change-Id: Idfb5e5eeee0e69a6889dbe9769c0bf17feacb63b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/200
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-17 23:10:59 +00:00
Philip Nye 950f240519 gdb: fix multi core gdb issue
gdb_memory_map() correctly calculates the target specific number of flash banks, but then uses the total number (all targets) instead of the target specific number to construct its GDB response, causing a crash.

Change-Id: I3f8639b3e90303a59753ebe140ce4fff96fd5db0
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/199
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-17 23:01:30 +00:00
Øyvind Harboe bab6db1fd9 gdb_server: assert to avoid malloc(0)
Change-Id: I6ae3e007f4aa768f8bc64de78351750138f12e53
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/135
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-11-03 11:16:16 +00:00
Antonio Borneo 8e8ff02b74 SERVER: fix clang warning
The fix is inline with the Linux coding style that forbids
assignment in if condition

Change-Id: I0b9d0b419d9c8b7a8c755e048d5faf72d1658ba2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/87
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 15:17:09 +00:00
Øyvind Harboe a093f82bb7 server: remove warning due to dead assignment
Change-Id: Idb08aef0c11b3fae92286e8fcea61ab09ab09e74
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/44
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
2011-10-22 06:18:52 +00:00
Øyvind Harboe ea295bd694 target: DCC / target message backoff algorithm
by immediately polling again when we have received a message from
the target instead of waiting 100ms, we can hope for much better
performance. More than 100x? :-)

Change-Id: Ieaf0c6c8b6e5addc482895670ffbf9a743e07a29
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/27
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-17 12:32:11 +00:00
Jie Zhang 8d7ddde5f1 remove target argument from gdb packet handling functions 2011-08-24 17:41:35 +02:00
Freddie Chopin f6315d5e5b Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - trivial fixes 2011-06-04 09:35:13 +02:00
Jie Zhang ee124401a2 Get register value if it's invalid in cache. 2011-05-18 18:52:20 +02:00
Michel Jaouen 1e7e594452 gdb_server : 'R' command replied by OK 2011-04-28 12:22:39 +02:00
Michel Jaouen b778b36f29 smp : infra for smp minimum support 2011-04-28 12:22:10 +02:00
Broadcom Corporation (Evan Hunter) b69119668e RTOS Thread awareness support wip
- works on Cortex-M3 with ThreadX and FreeRTOS

Compared to original patch a few nits were fixed:

- remove stricmp usage
- unsigned compare fix
- printf formatting fixes
- fixed a bug with overrunning a memory buffer allocated with malloc.
2011-04-15 08:24:18 +02:00
Uwe Hermann 33a17fd359 Fix a bunch of typos.
Fix a bunch of typos.

Most are in code comments, so nothing should break. UNKOWN_COMMAND and
CMD_UNKOWN are not used elsewhere, so correcting the spelling should
also not break anything.
2011-03-17 07:25:25 +01:00
Øyvind Harboe 4f9a9b8eba warnings: use more 'const' for char *
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-12-29 22:07:39 +01:00
Øyvind Harboe 07dcb5af12 server: remove error value from LOG_INFO
the error values is not part of the interface to the user,
so they should never be printed in LOG_INFO or LOG_USER.

Printing them in LOG_DEBUG() rarely makes much sense but
is OK.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-12-21 14:09:00 +01:00
Spencer Oliver 838cd58e24 build: add common.mk
Rather than specifying common makefile variables move
them all to a common.mk.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-11-18 14:05:56 +00:00
Øyvind Harboe fdae51287c httpd: retire this server
this never panned out and there are enough mistakes in
the code that probably nobody used this.

Use the tcl server and implement a standalone http
app instead works fine.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-15 09:18:21 +01:00
Øyvind Harboe 6287c23b32 gdb: fix occasional crash when flash probe failed
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-15 09:14:05 +01:00
Øyvind Harboe c62fb3fa81 gdb: improve error message when gdb connect fails
gdb connect can fail when the flash has not been probed.

During gdb connect, the flash layout is reported, but this
can not be automatically detected for a target that is
powered up and OpenOCD supports connecting to gdb server
even if the target is powered down.

The solution is to turn of the gdb_memory_map feature.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-11 08:51:49 +01:00
Spencer Oliver 6229e438dd build: remove warn_unused_result errors
Remove any build errors for strtol when building release
version of openocd.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-10-05 16:29:37 +01:00
Spencer Oliver 7e4cf8db58 gdbserver: fix gdb_port memory leak
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-10-04 20:35:33 +01:00
Spencer Oliver 45de3b1fbe server: fix server pipe windows support
commit 50d5441e2a caused
native windows build to fail.

Firstly this patch fixes the build issue, but it also disables support
for named pipes under Windows. Windows does not support posix named
pipes.
A cross-platfom access layer will need creating before support can be
enabled again.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-10-04 20:34:47 +01:00
Øyvind Harboe 96a56ba086 pipes: add documentation for pipes
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>
2010-10-01 10:26:10 +02:00
Øyvind Harboe 50d5441e2a server: add support for pipes
-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>
2010-10-01 10:26:08 +02:00
Øyvind Harboe 6c137a2fc0 server: specify port as a string
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>
2010-10-01 10:21:33 +02:00
Øyvind Harboe cb2dba2c12 server: read/write now goes through connection fn's
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>
2010-10-01 10:21:33 +02:00
Øyvind Harboe 5a41435e45 server: split file descriptors in in/out fd's
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>
2010-10-01 10:21:33 +02:00
Øyvind Harboe a60a57d8ed server: rely on ctrl-c to stop openocd
there was special support to support pressing 'x' to quit
openocd. ctrl-c is sufficient. The main server loop is already
complicated enough.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-10-01 10:21:33 +02:00
Øyvind Harboe 9f26aff39c gdb: fix blank line at top
snuck in at some point...

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-26 18:02:23 +02:00
Øyvind Harboe 6000411ddd tcl_server: switch to ctrl-z
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>
2010-09-20 20:45:48 +02:00
sb-sf 3099858c68 gdbserver: incorrect memory map for multiple targets (bug #24)
The gdb server incorrectly reports the memory map if we have
multiple targets with multiple flash banks.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-05 14:16:15 +01:00
Oyvind Harboe 8a2808681e gdb-server: fix -Wshadow warning
This warning was only reproducable with
Cygwin.

Cygwin now builds without warnings for the basic
case.

Signed-off-by: Oyvind Harboe <oyvind.harboe@zylin.com>
2010-06-17 15:41:07 +02:00
Øyvind Harboe 818120d409 gdb: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-16 08:58:40 +02:00
Øyvind Harboe 5104d56e5c gdb: clean up error handling in step/continue
if step/continue fails, then the error should be
reported to the calling fn.

The calling fn decides if the connection has to be
aborted or if packet processing can continue.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-16 08:57:49 +02:00
Øyvind Harboe 3e51d893ed -Wshadow fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-14 22:12:04 +02:00
Øyvind Harboe 54f3f8e4c1 gdb-server: fix error reporting bugs
GDB and OpenOCD has two different error number
spaces and no mapping exists between them.

If a specific error number is to be reported
to GDB then this has to be done at the calling
site, rather than as a generic routine that
tries to map "retval" to GDB error number speak.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-08 10:37:03 +02:00
Spencer Oliver 3ecc191b36 gdbserver: gdb cmds returning failure on success
The gdb_memory_map cmd for example fell through and returned
ERROR_COMMAND_SYNTAX_ERROR on success - behaviour is now as expected.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-05-17 10:17:58 +01:00
Jun Ma 9597dcefaa missing pointer's declaration when enable macro -D_DEBUG_GDB_IO_.
reproducable when "./configure --enable-maintainer-mode CFLAGS=-D_DEBUG_GDB_IO_"

Signed-off-by: Jun Ma <sync.jma@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-14 15:08:29 +02:00
Spencer Oliver f32492c74f server: incorrectly display socket port number
c->sin.sin_port does not contain a valid port number so just use
service->port as this is always correct.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-05-06 22:51:20 +01:00
Øyvind Harboe 82ea640830 gdb: connect will now fail if flash autoprobe fails
This stops GDB from launching with an empty memory map,
making gdb load w/flashing fail for no obvious reason.

The error message points in the direction of the gdb-attach
event that can be set up to issue a halt or "reset init"
which will put GDB in a well defined stated upon attach
and thus have a robust flash autoprobe.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05 15:24:24 +02:00
Matthias Bode 31b050108a Fixed bug in tcl-server
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
2010-05-05 15:24:24 +02:00
Antonio Borneo 4af724df23 telnet_server: review unused symbols
Remove unused function

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-03-25 07:44:59 +01:00
Antonio Borneo ec28c674af telnet_server: review scope of functions
Add "static" qualifier to private functions.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-03-25 07:44:55 +01:00
Antonio Borneo 1cda3e64e4 server: review unused symbols
Remove unused function

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-03-24 07:44:28 +01:00
Antonio Borneo 9f1d9499ce server: review scope of functions and data
Add "static" qualifier to private functions and data.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-03-24 07:44:18 +01:00
Øyvind Harboe 051e2c99ab gdb_server: improved gdb load performance
by ack'ing memory writes immediately and reporting either
at next memory write or stepi/continue time. GDB will then
send off a new packet that is ready by the time the previous
packet has been written to target memory.

On faster adapters this can be as much as 10% improvement.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-17 07:40:00 +01:00
Øyvind Harboe f68dff6690 telnet: fix strage blank spaces at beginning of telnet lines
Sometimes we saw two strange blank spaces at the beginning
of the telnet lines.

progress
  ogress
>

This patch fixes this problem:

progress
progress
>

The code changes are *reasonably* clean, but perhaps it could be
made a bit more elegant, but I didn't want to change things after
I finished diagnosis/testing & submitting the patch.

The problem was that logging can send the text and the newline
separately in two different requests and the telnet code would
incorrectly remove the prompt from the end of a line.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-31 15:06:02 +01:00
Øyvind Harboe 1350b6aad0 gdb_server: handle stepi/continue packet while target is running with more grace
Rather than issuing a halt and then stepi/resume, just
wait for target to halt.

Issue a sterner warning via gdb console that any gdb
register changes will be ignored in this case.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-21 15:57:30 +01:00
David Brownell 6f2b88448f gdb_server: correctly report flash sector sizes
Report each region of same-size sectors separately, instead of
incorrectly reporting that every sector has the same size.

This is a longstanding bug on NOR flash chips with non-uniform
sector sizes.  It was largely hidden by other bugs in flash
handling.  When some of those were recently fixed, this one was
exposed as a regression on str710.

[oyvind.harboe@zylin.com: update the loop to behave on str7 ]

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-20 10:43:32 -08:00
David Brownell 44aaba3d08 gdb_server -- subroutinize memory map logic
Put the memory map logic into its own subroutine.
This will make it a bit easier to package bugfixes,
and simplifies the query packet handling.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-19 23:32:54 -08:00
David Brownell bf1e9a83c8 gdb_server -- symbol cleanup
Make most methods static; net minor object code shrink.
Likewise various data symbols; no net change.
Shrink some overlong lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-19 23:30:36 -08:00
Spencer Oliver e2d3266ff1 GDB: change gdb_breakpoint_override to COMMAND_ANY
- enable gdb_breakpoint_override to be used within config script.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-14 09:35:33 +00:00
David Brownell 73566405b6 NOR: add optional "flash erase_address" sector padding
Add a NOR flash mechanism where erase_address ranges can be padded
out to sector boundaries, triggering a diagnostic:

  > flash erase_address 0x0001f980 16
  address range 0x0001f980 .. 0x0001f98f is not sector-aligned
  Command handler execution failed
  in procedure 'flash' called at file "command.c", line 647
  called at file "command.c", line 361
  >

  > flash erase_address pad 0x0001f980 16
  Adding extra erase range, 0x0001f800 to 0x0001f97f
  Adding extra erase range, 0x0001f990 to 0x0001fbff
  erased address 0x0001f980 (length 16) in 0.095975s (0.163 kb/s)
  >

This addresses what would otherwise be something of a functional
regression.  An earlier version of the interface had a dangerous
problem:  it would silently erase data outside the range it was
told to erase.  Fixing that bug turned up some folk who relied on
that unsafe behavior.  (The classic problem with interface bugs!)
Now they can get that behavior again.  If they really need it,
just specify "pad".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-13 23:33:25 -08:00
Øyvind Harboe 3e33393078 gdbserver: fix typo that broke read/write watchpoint
It looks like a bugfix from normal breakpoints was not
copied over.

Do not use clever mathematics and assumptions to convert from
GDB enum for break/watchpoints to OpenOCD enum.

Drop connection upon unknown breakpoint type, this code path
was not really considered by the previous code I think.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-13 12:00:02 +01:00
David Brownell 8c730aaee2 Doxygen file comments
Add file comments to a few files.  Make the GDB server use
more conventional (pointer-free) hex digit conversion.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-11 00:16:57 -08:00
Øyvind Harboe 88907cc7f9 shutdown: more graceful shutdown
Shutdown is not an error condition, do not return error
from main.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-11 08:13:17 +01:00
David Brownell fc9a2d0e6f src/server: usage/help/doc updates
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>
2010-01-09 00:55:41 -08:00
Øyvind Harboe 95f86e8e05 gdb: fix regression in gdb_port command
The gdb_port command can be invoked during normal execution
to report the port used for gdb, whereas it was listed as
CONFIG stage only, which caused an error when excuting
it to return the reported error.

Also in line with the grander goal of making more commands
available during all "modes" (perhaps retiring config mode),
there is no particular reason to limit gdb_port to the
config stage.

Regression was introduced in:

b3bf1d12b2 aka
v0.4.0-rc1-32-gb3bf1d1

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-05 15:28:23 +01:00
David Brownell b3bf1d12b2 streamline and document helptext mode displays
Most commands are usable only at runtime; so don't bother saying
that, it's noise.  Moreover, tokens like EXEC are cryptic.  Be
more clear: highlight only the commands which may (also) be used
during the config stage, thus matching the docs more closely.
There are

 - Configuration commands (per documentation)
 - And also some commands that valid at *any* time.

Update the docs to note that "help" now shows this mode info.

This also highlighted a few mistakes in command configuration,
mostly commands listed as "valid at any time" which shouldn't
have been.  This just fixes ones I noted when sanity testing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-02 15:52:35 -08:00
Antonio Borneo 7c5acf8660 whitespace cleanup, mostly for docs
Remove useless space/tab at end of lines.
Remove spaces in indentation and replace with tab.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-30 11:51:29 -08:00
David Brownell 08a890e4aa cygwin 1.7 build fixes
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>
2009-12-26 10:19:19 -08:00
Øyvind Harboe 74ce435d97 server: server loop will exhaust data inputs before sleeping
By exhausting data on input, the performance will be more
consistent + the code more clearly distinguishes between
polling and processing. A test showed gdb packet load
performance go from ~1550kByte/s to 1650kBytes/s + being
more stable.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-16 08:09:35 +01:00
Spencer Oliver 08589462ad server: add server_preinit which is called before config file is parsed.
This fixes the issue under native win32 of the socket interface not being
enabled (via WSAStartup) before init is called from a script.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2009-12-11 10:26:15 +00:00
Øyvind Harboe 97996214f5 gdb_server: use more local variables in inner loop of fetching packetstiny refactoring to allow optimisation of inner loops
Some profiling information for arm7 16MHz GDB load operation shows
gdb_get_packet_inner() near the very top.

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  Ts/call  Ts/call  name
 52.91      2.27     2.27                             embeddedice_write_dcc
 11.89      2.78     0.51                             gdb_get_packet_inner
  8.86      3.16     0.38                             memcpy
  3.26      3.30     0.14                             idle_thread_main(unsigned int)
  3.03      3.43     0.13                             cyg_in_cksum

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-11 09:17:23 +01:00
Øyvind Harboe 1c42606aea gdb_server: make struct gdb_connection private
it is only used inside gdb_server.c

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-11 09:17:23 +01:00
Øyvind Harboe eb1bc657ae build: add build/src to include path
This allows including generated include files.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-08 10:16:10 +01:00
Zachary T Welch f3e6f584f1 remove flash.h from tree
Remove the now vestigial <flash/flash.h> header from the tree,
replacing a few references with <flash/nor/core.h>
2009-12-04 16:56:24 -08:00
Zachary T Welch d9dc604a4d remove target.h from flash.h
The flash.h header does not require the target.h header file, but
its implementation source files do.  Move it to flash/nor/imp.h.
2009-12-04 16:56:23 -08:00
Zachary T Welch 23f07d08e3 fix regressions with GDB port numbers
Use a separate variable for iterating GDB service port numbers than
the one set by the user.  Restores the behavior of returning the
original port number and only incrementing the port used on success.
2009-12-03 05:28:51 -08:00
Zachary T Welch 822c06d9e3 remove tertiary include paths
With all #include directives converted, we only need to have the
top-level src/ directory in the search path.
2009-12-03 04:24:50 -08:00
Zachary T Welch c538a830cd change #include "server.h" to <server/server.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "server.h"

the following form should be used.

	#include <server/server.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:49 -08:00
Zachary T Welch 2b2d5ec1e3 change #include "flash.h" to <flash/flash.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "flash.h"

the following form should be used.

	#include <flash/flash.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:42 -08:00
Zachary T Welch 5a94612148 change #include "target_request.h" to <target/target_request.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "target_request.h"

the following form should be used.

	#include <target/target_request.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:42 -08:00
Zachary T Welch c6dd6a576d change #include "target.h" to <target/target.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "target.h"

the following form should be used.

	#include <target/target.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:42 -08:00
Zachary T Welch fa43bdff54 change #include "register.h" to <target/register.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "register.h"

the following form should be used.

	#include <target/register.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:41 -08:00
Zachary T Welch 7da02a8330 change #include "image.h" to <target/image.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "image.h"

the following form should be used.

	#include <target/image.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:41 -08:00
Zachary T Welch 26e4fac57e change #include "breakpoints.h" to <target/breakpoints.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "breakpoints.h"

the following form should be used.

	#include <target/breakpoints.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:41 -08:00
Zachary T Welch cb4a475f6c change #include "jtag.h" to <jtag/jtag.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "jtag.h"

the following form should be used.

	#include <jtag/jtag.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:33 -08:00
Zachary T Welch c79cca04be change #include "log.h" to <helper/log.h>
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-03 04:22:52 -08:00
David Brownell a79b76d893 stubs: buildfix
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-02 15:24:14 -08:00
Zachary T Welch 6ec526e706 remove #if BUILD_HTTPD
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-02 13:26:26 -08:00
Zachary T Welch 34654359a9 remove #if logic for openocd_sleep_*lude
Adds server_stubs.c to hold these routines, using automake logic to
ensure it gets included under the right conditions.
2009-12-02 13:26:26 -08:00
Zachary T Welch 8fc5a9a5e9 remove interp global variable!
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-30 16:29:34 -08:00
Zachary T Welch 7b2906de24 do not extern 'interp' from command.c
Adds 'interp' field to command_context, chasing the few remaining
references to the global variable outside of the command module.
2009-11-30 16:29:34 -08:00
Zachary T Welch 64653b0bbb move server_init() to openocd_main()
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-30 16:29:24 -08:00
Zachary T Welch ec6c1962c2 improve gdb_init() sequence
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-30 16:29:24 -08:00
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 8f5ff3ddcf httpd: use register_commands()
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-24 21:37:37 -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 47cb10217a improve startup tcl scripts
Fix a couple of layering violations missed in the last round.
Add missing comment headers.
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 cb7dbc1af4 split startup.tcl file across modules
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-18 07:21:42 -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 4088b1e622 add openocd.h for top-level declarations
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-14 07:29:16 -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 f7cd2aa0ef telnet_connection_t -> struct telnet_connection
Remove misleading typedef and redundant suffix from struct telnet_connection.
2009-11-13 11:58:08 -08:00
Zachary T Welch f2cbaba3cc tcl_connection_t -> struct tcl_connection
Remove misleading typedef and redundant suffix from struct tcl_connection.
2009-11-13 11:58:08 -08:00
Zachary T Welch 8775a0f663 service_t -> struct service
Remove misleading typedef and redundant suffix from struct service.
2009-11-13 11:58:08 -08:00
Zachary T Welch e01a0be576 telnet_service_t -> struct telnet_service
Remove misleading typedef and redundant suffix from struct telnet_service.
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 63a26b421b use COMMAND_HELPER for command helper functions
Define the numerous helpers that inherit command handler parameters
using the COMMAND_HELPER macro.
2009-11-13 10:51:45 -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
Øyvind Harboe 031591ead5 httpd: fix warnings, more robust error handling, improved MIME handling
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-10 08:50:06 +01: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 994a63c3fe src/{server,pld,svf,xsvf}: remove 'extern' keyword
Removes 'extern' keyword from function declarations in header filess.
2009-11-09 09:44:33 -08:00
Zachary T Welch 2b78a4e82b Update all server port command to use new helper. 2009-11-05 18:03:19 -08:00
Zachary T Welch ae5732b9e4 Add server port command helper function. 2009-11-05 18:03:18 -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 f4fce92f28 handle single threading
git-svn-id: svn://svn.berlios.de/openocd/trunk@2771 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-29 14:24:02 +00:00
oharboe 9bdbffb8cc httpd smoketest info
git-svn-id: svn://svn.berlios.de/openocd/trunk@2769 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-29 13:46:26 +00: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 388e94d5c1 fix bug when using 32 instead of 64 bit value in callback, caught by -Wall
git-svn-id: svn://svn.berlios.de/openocd/trunk@2711 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-15 14:20:37 +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 bf5f21e39a Steve Grubb <sgrubb@redhat.com> fix various and sundry leaks
git-svn-id: svn://svn.berlios.de/openocd/trunk@2606 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-24 07:53:46 +00:00
oharboe 8b73ec8d64 Florian Boor <florian.boor@kernelconcepts.de> fixes a segfault executing commands from the web interface using the
"Run Command" tab.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2601 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-21 06:22:01 +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 c97caebccd Remove whitespace at end of lines, step 2.
- Replace '\s*$' with ''.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2380 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:50:08 +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
zwelch 5e98c71436 - Fixes '-=' whitespace
- Replace '\(\w\)\(-=\)(' with '\1 \2 ('.
- Replace '\(\w\)\(-=\)\(\w\)' with '\1 \2 \3'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2362 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:37:56 +00:00
zwelch 95d2a23724 - Replace 'for(' with 'for ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2360 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:37:21 +00:00
zwelch 9af5e445b7 - Replace 'switch(' with 'switch ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2359 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:36:56 +00:00
zwelch 50c086ffb9 - Replace 'while(' with 'while ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2358 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:36:11 +00:00
zwelch e43979e702 - Replace 'if(' with 'if ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2357 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23 22:35:09 +00:00
duane 7e07b9abf1 C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2298 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-21 03:01:21 +00:00
zwelch 86e4324f1b Finish transforming 'u32' to 'uint32_t'.
- Replace '\([^_]\)u32' with '\1uint32_t'.
- Replace '^u32' with 'uint32_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2281 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:11:11 +00:00
zwelch c18947b947 Transform 'u8' to 'uint8_t'
- Replace '\([^_]\)u8' with '\1uint8_t'.
- Replace '^u8' with 'uint8_t'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2276 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18 07:07:12 +00:00
zwelch ed5b5b834e Fix compilation for Ubuntu 9.04 on x86-64 when using --enable-httpd.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2262 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-17 06:10:10 +00:00
zwelch 4f4592539d David Brownell <david-b@pacbell.net>:
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
2009-06-13 08:38:57 +00:00
zwelch 00228aa839 Fix make maintainer-clean for out-of-tree builds.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2172 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09 10:28:16 +00:00
zwelch 0de78ed02c Add target_get_name wrapper:
- replaces all accesses to target->type->name.
- add documentation in target_s to warn not to access field directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1966 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:31:27 +00:00
zwelch 17fa4de854 Add target_step wrapper:
- replaces all calls to target->type->step.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1965 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:31:11 +00:00
zwelch df4cf0615f Add target_get_gdb_reg_list wrapper:
- replaces all calls to target->type->get_gdb_reg_list.
- add documentation in target_s to warn not to invoke callback directly.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1964 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-31 11:30:59 +00:00
kc8apf 35d8b2bf77 Author: Nicolas Pitre <nico@cam.org>
- Silence errors about keep_alive() not being called frequently enough unless
	a gdb session is active or debugging is enabled


git-svn-id: svn://svn.berlios.de/openocd/trunk@1933 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-27 20:30:17 +00:00
zwelch dd86b54e6e Update build system to find moved scripts -- Step 3 of 2:
- Update references from using PKGLIBDIR to PKGDATADIR.
- Update built-in script search paths to reflect new install location:
  - $(pkgdatadir)       =>   $(pktdatadir)/site
  - $(pkglibdir)        =>   $(pktdatadir)/scripts
- Update installed location of httpd files:
  - $(pkglibdir)/httpd   =>   $(pkgdatadir)/httpd


git-svn-id: svn://svn.berlios.de/openocd/trunk@1920 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-27 07:49:58 +00:00
zwelch 5ecae346cc David Brownell <david-b@pacbell.net>:
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
2009-05-24 21:08:42 +00:00
zwelch 233ab439c7 Include files required to rebuild the HTTP web pages in distribution.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1773 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-13 10:14:40 +00:00
zwelch f5e028bc46 Remove duplicate definition of encode in httpd.tcl.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1749 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 22:37:52 +00:00
zwelch 164cb6d04e Audit and eliminate redundant #include directives from src/server.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1709 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 04:22:15 +00:00
zwelch 490e271290 Remove redundant sys/types.h #include directives (now in types.h).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1700 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-11 02:27:16 +00:00
zwelch 647e61cc6d Extend autotools build to create shared library libopenocd with libtool:
- Add libtoolize step too bootstrap script; creates ltmain.sh script.
- Add AC_PROG_LIBTOOL to configure.in to add libtool support to build.
- Change Makefile.am library rules from static (_a) to libtool (_la).
- Install libopenocd.{la,so,a} in $(libdir); update openocd link rules.
- Extend MAINTAINERCLEANFILES in top-level Makefile.am to remove ltmain.sh.


git-svn-id: svn://svn.berlios.de/openocd/trunk@1695 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-10 22:03:57 +00:00
zwelch d209029ca8 Fix warnings in httpd.c; builds with libmicrohttpd-0.4.1.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1659 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-08 04:49:27 +00:00
zwelch 66add57aa5 Update autotools scripts to require automake 1.6. The configure.in script
already required autoconf 2.59 (circa 2006), so there is no reason to
support versions of automake older than 1.6 (circa 2002).

The first part of this patch upgrades the configure.in script:

     1. Use current calling conventions for the AC_INIT and
        AM_INIT_AUTOMAKE macros, bringing their usage up-to-date with
        the version of autoconf already specified by AC_PREREQ.
     2. Add AC_CONFIG_SRCDIR macro, required by new version of AC_INIT.
     3. Automatically enable all of automake's warnings except Makefile
        portability (which OpenOCD violates by using GNU make's $(wildcard)).
        [[ While automake has its own -Werror option, I did not enabled it
        due to existing warnings. ]]
     4. Add the missing AM_PROG_C_O check, required by the build rules for
        openocd.o in src/Makefile.am.
     5. Adjust version number to show progress toward the next release.
     6. Include a bug reporting e-mail address to direct users to this list.

This patch makes the following adjustments to the Makefile.am files:

     1. Update AUTOMAKE_OPTIONS to require automake version 1.6
     2. Rewrite all deprecated INCLUDES assignments as AM_CPPFLAGS
     3. Clean-up all AM_CPPFLAGS declarations to be patch-friendly.
     4. Remove vestigial references to $(all_includes)
     5. Remove erroneous references to @CPPFLAGS@ (only use AM_CPPFLAGS)
     6. Remove unused -I and -D directives in helper/, flash/, target/


git-svn-id: svn://svn.berlios.de/openocd/trunk@1591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-05-02 22:35:02 +00:00
zwelch 1de959ca1c Remove redundant declarations to allow building with -Wredundant-decls.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1560 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-29 01:43:01 +00:00
oharboe adbe3ac817 eol-style native
git-svn-id: svn://svn.berlios.de/openocd/trunk@1549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-28 06:28:39 +00:00
oharboe a247833a5a Michael Bruck <mbruck@digenius.de> signed/unsigned incompatibility warning
git-svn-id: svn://svn.berlios.de/openocd/trunk@1511 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-22 17:36:00 +00:00
ntfreak dcdf71c21b - fix signed/unsigned build errors under win32. Thanks Zach Welch <zw@superlucidity.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1489 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-21 09:02:42 +00:00
oharboe 40580e2d71 Zach Welch <zw@superlucidity.net> fix -Werror warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@1472 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-04-19 20:51:16 +00:00
oharboe 9f2a76e7b6 Hiroshi Ito <ito@mlb.co.jp> typos
git-svn-id: svn://svn.berlios.de/openocd/trunk@1417 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-03-18 11:59:31 +00:00
oharboe b7593457bc Holger Schurig <hs4233@mail.mn-solutions.de> fix warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@1375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-02-18 07:39:20 +00:00
oharboe 2136238908 zy1000 1.49 snapshot
git-svn-id: svn://svn.berlios.de/openocd/trunk@1374 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-02-17 11:54:30 +00:00
kc8apf 93180753be Fix 'make maintainer-clean' courtesy of Zach Welch <zw@superlucidity.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1345 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-20 03:55:38 +00:00
kc8apf 8f111ee313 Fix distcheck failure
git-svn-id: svn://svn.berlios.de/openocd/trunk@1329 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-16 07:31:55 +00:00
ntfreak ab87627c5c - add gdb pipe support to native win32 (--pipe option)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1294 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-01-01 16:06:46 +00:00
ntfreak ec7a984b42 - add missing svn props from r1270 commit
- change mime-type for png files to image/png

git-svn-id: svn://svn.berlios.de/openocd/trunk@1273 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-23 12:52:14 +00:00
oharboe fb86d0e76d httpd wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1272 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-23 08:52:02 +00:00
oharboe 6e1184dcff httpd wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1271 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-22 15:24:35 +00:00
oharboe e7485b930a httpd wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1269 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-22 15:10:18 +00:00
oharboe 6d3c1cd972 httpd wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1268 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-22 15:02:09 +00:00
oharboe ee94947ffe cygwin fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1266 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-22 10:28:11 +00:00
ntfreak 9d1f95e01a - fix rlink build under native win32 (mingw)
- remove rlink build warnings
- add usb_set_configuration to rlink_init, win32 requires this
- add win32 ETIMEDOUT define

git-svn-id: svn://svn.berlios.de/openocd/trunk@1260 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-19 13:58:15 +00:00
oharboe bb56339761 houskeeping
git-svn-id: svn://svn.berlios.de/openocd/trunk@1255 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-17 13:39:40 +00:00
oharboe ff2cb7714f fixed gaffe in post handling
git-svn-id: svn://svn.berlios.de/openocd/trunk@1254 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-17 12:50:07 +00:00
oharboe 0fc19255c3 work in progress to hook up libmicrohttpd + tcl integration
git-svn-id: svn://svn.berlios.de/openocd/trunk@1251 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-16 22:20:10 +00:00
oharboe 2a781c0346 allow setting/reading gdb_port at any time
git-svn-id: svn://svn.berlios.de/openocd/trunk@1247 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-16 10:55:08 +00:00
ntfreak 47d0449347 - add ability for openocd to communicate to gdb using pipes (stdin/stdout).
- 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
2008-12-15 09:43:26 +00:00
ntfreak 0cba0d4df3 - remove target specific variant and use target->variant member
- fix build warning in cortex_m3
- code cleanup - remove trailing lf and convert c++ comments

git-svn-id: svn://svn.berlios.de/openocd/trunk@1238 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-12-13 12:44:39 +00:00
ntfreak b7d80ac0ab - fix issue with gdb_target_to_reg missing second byte
git-svn-id: svn://svn.berlios.de/openocd/trunk@1180 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-20 12:01:46 +00:00
oharboe 6c15861bd8 big endian fix for GDB. Probably fixes a memory corruption(not reported) as well.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1174 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-18 19:26:07 +00:00
oharboe 0bbe570882 minor cleanup
git-svn-id: svn://svn.berlios.de/openocd/trunk@1149 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-10 08:33:03 +00:00
oharboe 71c7306885 fix telnet async messages. retired telnet_async command - no user serviceable parts inside.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1135 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-11-05 08:48:50 +00:00
oharboe c2120ba28a Added telnet_async command to enable/disable asynchronous
messages.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1117 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-31 13:40:02 +00:00
oharboe fdb7a1705d gdb_report_data_abort now ignores all target read errors, including address space wraps. Hopefully works around problems in 6.8
git-svn-id: svn://svn.berlios.de/openocd/trunk@1099 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-24 07:18:13 +00:00
oharboe bf45445b5b produce syntax error
git-svn-id: svn://svn.berlios.de/openocd/trunk@1090 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-22 13:45:46 +00:00
oharboe ed9c257551 Laurentiu Cocanu - more help text
git-svn-id: svn://svn.berlios.de/openocd/trunk@1087 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-22 09:30:33 +00:00
ntfreak d58229e73b - remove build warnings
- add missing svn props

git-svn-id: svn://svn.berlios.de/openocd/trunk@1062 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-14 20:58:28 +00:00
oharboe 2de5a007d1 Laurentiu Cocanu - more error handling fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1059 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-14 13:14:52 +00:00
oharboe 0689815716 Duane Ellis: addresses protocol problems with GDB.
https://lists.berlios.de/pipermail/openocd-development/2008-October/003326.html

git-svn-id: svn://svn.berlios.de/openocd/trunk@1039 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-11 06:13:21 +00:00
oharboe 7fd9ba22ba Centralize error handling for buggy register handling
git-svn-id: svn://svn.berlios.de/openocd/trunk@1019 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-10-06 12:09:27 +00:00
oharboe f9a3c36cf2 fix noise in gdb console when single stepping. Remove printing of log before processing halted event.
git-svn-id: svn://svn.berlios.de/openocd/trunk@994 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-24 09:43:31 +00:00
oharboe 7442b26d45 fixed false positives for keep_alive() not being invoked.
git-svn-id: svn://svn.berlios.de/openocd/trunk@993 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-24 08:42:13 +00:00
ntfreak 68c598e88d - added myself to copyright on files i remember adding large contributions for over the years
- cleaned up headers to match rest of code
- added missing svn props for previously added files

git-svn-id: svn://svn.berlios.de/openocd/trunk@987 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-20 10:50:53 +00:00
oharboe ef1cfb2394 Duane Ellis: "target as an [tcl] object" feature.
git-svn-id: svn://svn.berlios.de/openocd/trunk@975 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-09-01 07:20:21 +00:00
oharboe f5507d8929 do not check checksums in noack case
git-svn-id: svn://svn.berlios.de/openocd/trunk@969 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-26 11:29:59 +00:00
oharboe 8d73c2a9b0 duan ellis target tcl work in progress
converts a number of 'simple string lookup tables' into NVP tables.
  These NVP tables will be used by various commands coming in the next patch.


git-svn-id: svn://svn.berlios.de/openocd/trunk@962 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-24 18:20:49 +00:00
ntfreak a7144a759c - clear any existing breakpoints/watchpoints when restarting in gdb extended remote mode
git-svn-id: svn://svn.berlios.de/openocd/trunk@960 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-23 18:47:42 +00:00
ntfreak 9f6857ae0b - add support for new gdb QStartNoAckMode, which disables sending of ack's between remote packets
git-svn-id: svn://svn.berlios.de/openocd/trunk@959 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-22 19:58:19 +00:00