aboutsummaryrefslogtreecommitdiff
path: root/src/server
AgeCommit message (Collapse)Author
2014-03-17gdb_server: do not copy feature names for tdesc generationPaul Fertser
We always have feature names defined by string literals and the standard guarantees static storage duration for them. Hence, there's no need duplicating and then freeing them. Valgrind-tested. Change-Id: I1b77f966c548e3694141c63bd8680735f0f47505 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2028 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-03-07gdb_server: Fix segfault in (and rewrite) decode_xfer_readAndreas Fritiofson
Introduced by 537b06a81 (free non-malloced memory). Rewrite to use standard C string routines and make returning annex optional since it's not currently used. Change-Id: Idf3698a482dfeff7fa5ea1660fd89122eb80b68d Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2023 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-03-04gdbserver: fix duplicate declarationSpencer Oliver
commit da0d1e37 did not merge correctly, causing the build to fail. Change-Id: I3f525054bb38b7ee29bf27309bb2e6a5bb8329c7 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2020 Tested-by: jenkins
2014-03-04gdb_server: fix memory leaks in users of get_reg_features_list()Christian Eggers
v4: - changed first line of commit message v3: - added extra LOG_ERROR() message v2: - Added missing "goto error" - free also the on extra element of features[] In contrast to target_get_gdb_reg_list(), the list returned by get_reg_features_list() consists of items which are itself malloc'ed. --> Free the list items prior freeing the list itself. Additionally: - gdb_generate_target_description(): o Do error handling similar as gdb_get_target_description_chunk() does. - gdb_get_target_description_chunk() o **features must be initialised prior an "goto error" can happen Change-Id: Iad07824618c51084e0aa0499ee6fc96198b320f0 Signed-off-by: Christian Eggers <ceggers@gmx.de> Reviewed-on: http://openocd.zylin.com/1917 Tested-by: jenkins Reviewed-by: Trevor Woerner <trevor.woerner@linaro.org> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-03-04Constify received GDB packetChristian Eggers
v2: - Split work into separate patches The received packet will not be altered in any of the processing functions. Some it can be made "const". Change-Id: I7bb410224cf6daa74a6c494624176ccb9ae638ac Signed-off-by: Christian Eggers <ceggers@gmx.de> Reviewed-on: http://openocd.zylin.com/1919 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-03-04gdb_server: Don't modify "buf" argument in decode_xfer_read()Christian Eggers
Make a temporary copy of argument "buf" before modifying it. This requires also returning annex as copy of "buf". This change is necessary in order to make packet[] "const". Change-Id: I41eddc2edba1a88384aa7f5591fe50f6ee6a135c Signed-off-by: Christian Eggers <ceggers@gmx.de> --- Changelog: v4: - Initialize annex to NULL v3: - Return "annex" as copy instead of removing it. Reviewed-on: http://openocd.zylin.com/1924 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-03-04Remove unneeded zero termination of received packetChristian Eggers
v2: removed curly braces around single statement if-block packet[] has already been zero terminated in gdb_input_inner() This change is necessary in order to make packet[] "const". Change-Id: I978bbe52d151a63574db77fb747f596da256d377 Signed-off-by: Christian Eggers <ceggers@gmx.de> Reviewed-on: http://openocd.zylin.com/1922 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-02-06gdb_server: Fix confusing warning when entering noack modeAnton Kolesov
Comment in gdb_server code mistakenly attributed constant warnings about unexpected acknowledgement to the ACK packet sent by GDB when establishing connection. However that is not the case, OpenOCD gdb_server is handling this packet correctly without an warnings. This warning instead was caused by the ACK packet which GDB sends right after going into noack mode. Because OpenOCD gdb_server is already in noack mode at this state, it emits warning about it. This is a documented GDB behaviour (https://sourceware.org/gdb/onlinedocs/gdb/Packet-Acknowledgment.html) so there is no reason to scare users with warnings in this case. This patch basically introduces two-level noack mode: after receiving QStartNoAckMode gdb_server will set noack_mode to 1, then it will receive this last ACK packet, but instead of printing a warning, noack_mode will be increased to 2. Should there be any other ACK packets after that, they will be properly reported by warning. All other code that relies on noack_mode checks it for "!= 0", so there will be no difference if it is 1 or 2. Change-Id: I0e9c57fd93293bfe010390db2f3f161528b11d86 Signed-off-by: Anton Kolesov <anton.kolesov@synopsys.com> Reviewed-on: http://openocd.zylin.com/1895 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-02-04server/gdb_server: fix uninitialised variable warningPaul Fertser
Caught (breaks build) with clang 3.3. Change-Id: I5978fe34e82122f62e3d587bcdc45ad12f5e55ca Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1877 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-20gdb_server: check for invalid read memory requestsPaul Fertser
This prevents invalid free(NULL) (that crashes OpenOCD on desktop distros). With radare2 it's now a bit more useful, memory access works if I seek to the correct address, can't test further as it apparently lacks thumb2 support. Change-Id: I6ec32d09fd52dab53ba765d7f7519baa1f55d973 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1853 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-15Conform to C99 integer types format specifiersHsiangkai Wang
Review and modify to conform to C99 integer types format specifiers. Use arm-none-eabi toolchain to build successfully. Change-Id: If855072a8f88886809309155ac6d031dcfcbc4b2 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Signed-off-by: Hsiangkai <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1794 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-08Allow "tcl_port" to be run after config to simply display the port.Robert P. J. Day
To be consistent with gdb_port and telnet_port, allow tcl_port to be run to display the configured port number, while still not allowing the user to change it after configuration. Change-Id: Ibe6aedb3bd447f2985e42dd8246358481a047dd6 Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Reviewed-on: http://openocd.zylin.com/1857 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-17fix flash bank auto_probe() fail with multiple targetsSergey A. Borshch
get_flash_bank_by_addr() iterates through all flash banks trying to auto_probe() every bank, even if bank can belongs to target other than requested, and this other target can be in non-halted state, which leads to error message and operation abort. Same situation in gdb_new_connection() and gdb_memory_map(): get_flash_bank_by_num() tries to auto_probe() requested bank, so first get bank by get_flash_bank_by_num_noprobe(), check if it belongs to current connection's target and skip get_flash_bank_by_num() (actually autoprobing) if not. Change-Id: I48b3f93dddcd9283394f14ad2de3248397c75ab3 Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Reviewed-on: http://openocd.zylin.com/1813 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-12-01NULL check before dereferencingLuca BRUNO
Check reg_list[i]->feature for NULL pointers before checking feature->name in order to avoid NULL access. Change-Id: If20401a6c5aa5e1e29f0fcf9bb95585b49658832 Signed-off-by: Luca BRUNO <lucab@debian.org> Reviewed-on: http://openocd.zylin.com/1809 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se> Reviewed-by: Jens Bauer <jens@gpio.dk>
2013-10-31Clean up const usage to avoid excessive castingAndreas Fritiofson
Don't use const on pointers that hold heap allocated data, because that means functions that free them must cast away the const. Do use const on pointer parameters or fields that needn't be modified. Remove pointer casts that are no longer needed after fixing the constness. Change-Id: I5d206f5019982fd1950bc6d6d07b6062dc24e886 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1668 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-03gdb_server: Further cleanup of target desc functionsAndreas Fritiofson
Fix use of uninitialized pointer passed to xml_printf, caught by valgrind. Make sure a failed gdb_generate_target_description frees all allocated memory and avoids touching its out argument. Plug memory leak and check allocation in handle_gdb_save_tdesc_command. Change-Id: I30e20f6760a6215b1b4496304acdf47347eed829 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1645 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Franck Jullien <franck.jullien@gmail.com>
2013-09-21gdb: cleanup gdb target description supportSpencer Oliver
Make sure we free any memory used for gdb_save_tdesc. Change-Id: Ia226f6134318c8c6b0ac4fa20fe70a570a08d80d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1619 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-09-21gdb: enable target description support by defaultSpencer Oliver
This enables gdb target description support by default, it will check that this is supported by the active target. Change-Id: Iea5a5b94c5e373af30dacb780020b79536caa1e3 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1618 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-09-21gdb: add default description reg typesSpencer Oliver
Add support for the default gdb register description type "int" and "float". When this is given to gdb it will use the bitsize to determine the reg size. Change-Id: Iaeed594d1feece54044128eae1baff9858bdcae0 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1622 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-09-13gdb_server: Do not set gdb_con->sync to true for new connectionsAnton Kolesov
In GDB connected to OpenOCD there is a command "monitor gdb_sync" which makes next stepi command to be ignored while GDB still will get an updated target state. This command sets gdb_connection->sync field to true to notify that stepi should be ignored. This field is set to true for all new connection and is set to false after first "continue" command. However if first resume command is stepi/nexti then it will be ignored and result will confuse GDB client, it will report that target received signal SIGINT. This patch sets this field to false for new connections, thus stepi/nexti will work properly when it is a first resume command. Change-Id: I7c9ebd69c3dc35f3e316041aa99f4e9d3425c0b6 Signed-off-by: Anton Kolesov <akolesov@synopsys.com> Reviewed-on: http://openocd.zylin.com/1587 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-08-29gdb server: do not free tdesc_filename earlySpencer Oliver
Issue caught by clang. Change-Id: I4fb331574512140b36e56b3b7ab7e8bdad5e013d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1554 Tested-by: jenkins
2013-08-07gdb_server: check target before executing event callbackHsiangkai Wang
As debugging multi-targets, every target has its own gdb connection. If there are two connections, gdb_target_callback_event_handler will be registered twice. Everytime event occurs, the registered callback will be executed twice. If both targets are running, as user issues ctrl-c in one gdb client, both connections will send "stop reply" to GDB clients even TARGET_EVENT_GDB_HALT is caused by one of them. The commit fix above problem as debugging multi-targets. Change-Id: I1e12d4846927d7dcf1e3bb9aeb1affabc80df813 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1501 Tested-by: jenkins Reviewed-by: Sergey Borshch <sb-sf@users.sourceforge.net> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07gdb_server: add target_debug_reason for program exit detectionHsiangkai Wang
Currently, there is no way to notify gdb that program has exited. Add new target_debug_reason called DBG_REASON_EXIT to notify gdb the condition has occured. If the debug reason is DBG_REASON_EXIT, gdb_server will send 'W' packet to tell gdb the process has exited. Change-Id: I7a371da292716a3e6ac4cc2c31b009a651fe047a Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1242 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07gdb_server: support File-I/O Remote Protocol ExtensionHsiangkai Wang
The File I/O remote protocol extension allows the target to use the host's file system and console I/O to perform various system calls. To use the function, targets need to prepare two callback functions: * get_gdb_finish_info: to get file I/O parameters from target * gdb_fileio_end: pass file I/O response to target As target is halted, gdb_server will try to get file-I/O information from target through target_get_gdb_fileio_info(). If the callback function returns ERROR_OK, gdb_server will initiate a file-I/O request to gdb. After gdb finishes system call, gdb will pass response of the system call to target through target_gdb_fileio_end() and continue to run(continue or step). To implement the function, I add a new data structure in struct target, called struct gdb_fileio_info, to record file I/O name and parameters. Details refer to GDB manual "File-I/O Remote Protocol Extension" Change-Id: I7f4d45e7c9e967b6d898dc79ba01d86bc46315d3 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1102 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07gdb server: new feature, add stop reason in stop reply packet for gdbHsiangkai Wang
In GDB remote serial protocol, the stop reply packet could contain more detail stop reason. The currently defined stop reasons are listed below. * watch * rwatch * awatch * library * replaylog This commit adds stop reason, watch/rwatch/awatch, in stop reply packet for just hit watchpoint. As manual indicates, at most one stop reason should be present. The function needs target to implement new hook, hit_watchpoint. The hook will fill the hit watchpoint in second parameter. The information will assist gdb to locate the watchpoint. If no such information, gdb needs to scan all watchpoints by itself. Refer to GDB Manual, D.3 Stop Reply Packets Change-Id: I1f70a1a9cc772e88e641b6171f1a009629a43bd1 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1092 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07gdb_server: support gdb target descriptionHsiangkai Wang
* Add a parameter in .get_gdb_reg_list() to return different register lists as generating target description. * Modify STRUCT REG to let gdb generate target description according to register information. The modified structure of register is struct reg { const char *name; uint32_t number; /* for regnum="num" */ struct reg_feature *feature; /* for register group feature name */ bool caller_save; /* for save-restore="yes|no" */ void *value; bool dirty; bool valid; bool exist; uint32_t size; struct reg_data_type *reg_data_type; /* for type="type" */ const char *group; /* for group="general|float|vector" */ void *arch_info; const struct reg_arch_type *type; }; Change-Id: I2096b67adf94518ba0b8b23d8c6a9f64ad7932b8 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1382 Tested-by: jenkins Reviewed-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-06-05update files to correct FSF addressSpencer Oliver
Change-Id: I429f7fd51f77b0e7c86d7a7f110ca31afd76c173 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1426 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2013-05-08telnet_server: support C-p, C-n for moving through historyPaul Fertser
This modifies telnet server to allow using common readline combinations to move up/down history, without the need to touch cursor keys. Change-Id: Ib659075883e91794b44f391f7c29bbdfdd679d10 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1376 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-05-06gdb_server: remove target_handle_event from gdb event callbackHsiangkai Wang
In target_call_event_callbacks(), it will execute 1. target_handle_event (use Jim_EvalObj() to evaluate event statements in config files) 2. call user registered callbacks Before calling user registered callbacks, target_handle_event has been executed. So, there is no need to call target_handle_event() in gdb event callback. It will execute event statements in config files twice. Change-Id: I84629e324fa3eb909907badf2319b4138ba89f07 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1372 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-04-28gdb server: Fix bug. Parse 'M' packet error.Hsiangkai Wang
The format of 'M' packet is 'M addr,length:XX...'. The data follows ':' immediately. No need to '+2' to SEPARATOR in unhexify(), because SEPARATOR points to data correctly. Change-Id: I15b5758b540816cc727752e7bf68cd45e623f603 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1360 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-04-21telnet: add telnet history supportSpencer Oliver
adapted from Yoshinori Sato's patch: https://github.com/ysat0/openocd/commit/2f07f4600a0da8206612d78c159bbe1171aa41c2 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-02gdb server: Fix buffer overrun - sprintf appends a terminating null to the ↵Evan Hunter
data which was overrunning the supplied buffer. Fixes regression introduced in commit 07dcd5648d146d38f9ffa619f0737587e592d0b6 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-03-07gdb: use stdio functions to convert parametersSpencer Oliver
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-02-26gdbserver: use common hexify/unhexify routinesSpencer Oliver
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>
2012-12-24gdb: fix correct shutdown when using pipesSpencer Oliver
50d5441e2a615fb2c44b41a777e4373901f7a2e6 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-10-31fix memory leaksSergey Borshch
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-28gdb: use strncmp rather than strstrSpencer Oliver
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-24Revert "gdb_server : 'R' command replied by OK"Spencer Oliver
This reverts commit 1e7e59445287c3389b52903a7cacdb5635248f32. 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-17gdb: fix extended-remote restartSpencer Oliver
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-02gdbserver: code cleanupSpencer Oliver
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-08-29server: warn if user changes server port after initSpencer Oliver
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-24build: fix memory leaksSpencer Oliver
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-07-30telnet: cleanup commentsSpencer Oliver
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-05-25Jim_GetResult was called twiceVandra Akos
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-21target: remove legacy target eventsSpencer Oliver
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-03-19gdb_server: Simple close the connection and not exit openocd.Mathias K
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-19gdb_server: Fix wrong index/length compare.Mathias K
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-14gdb_server: sanity check the gdb register sizeMathias K
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-13ecosboard: delete bit-rotted eCos codeØyvind Harboe
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-02-06build: cleanup src/server directorySpencer Oliver
Change-Id: I6410df28c5999f5cbee2d3bcaa02469a29ea4c15 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/412 Tested-by: jenkins