summaryrefslogtreecommitdiff
path: root/src/server/gdb_server.c
Commit message (Collapse)AuthorAgeFilesLines
* This matters for embedded devices, but is probably not observably better for ↵oharboe2008-05-071-1/+4
| | | | | | PC hosted OpenOCD. git-svn-id: svn://svn.berlios.de/openocd/trunk@647 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Edgar Grimberg found tiny memory leakoharboe2008-05-061-0/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@644 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* regions outside flash are now read/write nocache by default. GDB 6.8 would ↵oharboe2008-04-231-4/+59
| | | | | | mark non-flash areas as inacessible by default. git-svn-id: svn://svn.berlios.de/openocd/trunk@607 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Enabled auto erase, gdb memory map and gdb flash programming by default.oharboe2008-04-181-2/+4
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* More robust handling of unknown target state for step/continue packet.oharboe2008-04-131-6/+18
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@573 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Reset wip. Just adding hooks. This is just to reduce the size of the actual ↵oharboe2008-04-111-5/+5
| | | | | | change, no change in behaviour. git-svn-id: svn://svn.berlios.de/openocd/trunk@565 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Spen fixed various issues w.r.t. setting up the sockets for optimal performance.oharboe2008-04-071-4/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@545 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - rename log functions to stop conflicts under win32 (wingdi)ntfreak2008-03-251-67/+67
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@523 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - gdb server was incorrectly sending null terminator on qXfer:features:read: ↵ntfreak2008-03-221-1/+1
| | | | | | | | packet - armv7m now sends correct gdb register packet git-svn-id: svn://svn.berlios.de/openocd/trunk@522 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - adds two speeds to jtag_speed. reset and post reset speed. Defaultoharboe2008-03-131-2/+2
| | | | | | | | | | is post reset = reset speed. - removed infinite loop's and exit()'s upon poor arm7/9 communication - cleaned up error messages a bit. Push ERROR() up into fn's that fail and can say something meaningful about what failed. git-svn-id: svn://svn.berlios.de/openocd/trunk@511 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fixed a problem with big endian XScale and GDB register packets.oharboe2008-03-101-27/+6
| | | | | | | | | - hmm..... did I screw up? Was XScale and not gdb_server busted here? My thinking was that OpenOCD has a canonical internal representation of registers that match GDB's expectations git-svn-id: svn://svn.berlios.de/openocd/trunk@484 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixed various error handling when looking for memory leaksoharboe2008-03-101-19/+16
| | | | | | | | | | | | | - Fixed memory leak in gdb_server.c - pushed "Error:" statements up into fn's that know something about what went wrong - load_image now fails if target_write_memory() fails - only issue an asynchronous halt() upon connect of GDB. Synchronous halt/reset doesn't really work as what's required to initialize the target might involve a special monitor sequence for the target in question - syntax error handling improved(fewer exit()'s) git-svn-id: svn://svn.berlios.de/openocd/trunk@482 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Improves error handling upon GDB connectoharboe2008-03-071-2/+9
| | | | | | | | | | | | | | | | | | - switch to synchronous halt during connect. This fixes the bug where poll() was not invoked between halt() and servicing the 'g' register packet - halt() no longer returns error code when target is already halted, just logs a warning. Only the halt() implementation can say anything meaningful about why a halt() failed, so error messages are pushed up to halt() - fixed soft_reset_halt infinite loop bug in arm7_9_common.c. The rest of the implementations are still busted. - by using USER() instead of command_print() the log gets the source + line #. Nice. - no longer invoke exit() if soft_reset_halt fails. A reset can often fix the problem. git-svn-id: svn://svn.berlios.de/openocd/trunk@475 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Pavel Chromy: performance tweak of gdb_put_packet_inner() removing malloc ↵oharboe2008-03-061-36/+32
| | | | | | and avoiding memcpy of larger blocks of data, git-svn-id: svn://svn.berlios.de/openocd/trunk@453 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* * fixed malloc corruption in target->debug_reasonoharboe2008-03-051-111/+120
| | | | | | | | | | | | | | | * GDB remote server will now remain online even if the target is in a funny state, e.g. if it requires a reset, it is running while GDB is not in the continue or step packet, e.g. via monitor resume/halt commands in GDB script. * Added some _DEBUG_GDB_IO_ debug tools * Fixed a couple of GDB server lockups, e.g. when O packets detect a severed connection * added ACK upon connection (send +). * added keep-alive messages to reset so GDB protocol remains happy. * fixed crash when timing out connection to GDB git-svn-id: svn://svn.berlios.de/openocd/trunk@445 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Bogus error message in GDB removedoharboe2008-03-041-3/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@443 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fixed GDB timeout crash - regression introduced back when ↵oharboe2008-03-041-1/+1
| | | | | | log_add/remove_callback was added. git-svn-id: svn://svn.berlios.de/openocd/trunk@442 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* log_remove_callbackoharboe2008-03-011-0/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@412 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - clean up target output strings a bitoharboe2008-02-291-1/+1
| | | | | | | | | - open_file_from_path() now uses logging feature - open_file_from_path() no longer uses paths for anything but "r" mode. Fixes bug waiting to happen. git-svn-id: svn://svn.berlios.de/openocd/trunk@389 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Summary: passing of variable argument list reduced, strings sent to logging ↵oharboe2008-02-291-11/+7
| | | | | | | | | are now formatted just once - more efficient. As a result, ugly string malloc+strcpy are not needed anymore. git-svn-id: svn://svn.berlios.de/openocd/trunk@386 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added svn propsntfreak2008-02-281-116/+116
| | | | | | - fixed mixed line endings on flash.c, log.c, gdb_server.c git-svn-id: svn://svn.berlios.de/openocd/trunk@371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Added TARGET_REQ_DEBUGCHAR target_request debugmsg. This oharboe2008-02-281-7/+6
| | | | | | | | | | | | provides a better impeadance match for debug output char fn's, e.g. eCos. - Line endings are now added at the caller site of command_print*(). command_print() still adds a line ending - echo of commands in scripts are now available via debug_level instead of forced echo - Added a USER_SAMELINE() for printing without a lineend. git-svn-id: svn://svn.berlios.de/openocd/trunk@364 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - convert all files to unix line-endingdrath2008-02-251-2107/+2107
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@347 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Pavel Chromyoharboe2008-02-251-2107/+2107
| | | | | | | | - multiple log listeners - added OUTPUT() to replace printf - fix formatting git-svn-id: svn://svn.berlios.de/openocd/trunk@346 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* dos2unix fix.oharboe2008-02-251-2107/+2107
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@339 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - "flash write_binary" is now "flash write_bank" to clarify the focus of theoharboe2008-02-251-2114/+2107
| | | | | | | | | | | | | | | | | | | | | | | | command and reduce confusion with "flash write_image". - retired deprecated "flash erase" & "flash write". - added flash_driver_protect/write/erase() that are wafer thin frontend functions to low level driver functions. They implement checks that were inconsistently handled by the drivers, e.g. check for target halted was done in a spotty fashion. - use return ERROR_COMMAND_SYNTAX_ERROR to print out syntax of command instead of having lots of inlined replicas of the command line syntax(some of which were wrong). - use logging instead of dubious translation of error values to human understandable explanations of why things failed. The lower levels log the precise reason and the higher levels can ammend context as the error propagates up the call stack. - simplified flash API slightly with logging instead of allocating and returning information that the caller then has to translate into print statements. git-svn-id: svn://svn.berlios.de/openocd/trunk@337 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fixes possible crash when GDB connection is closed while target is running ↵drath2008-02-241-0/+1
| | | | | | | | | due to log callback sending messages to connection which does not exist anymore (thanks to Pavel Chromy for this patch) git-svn-id: svn://svn.berlios.de/openocd/trunk@325 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - add search paths via new arg -s (-search). Thanks Ted Rothntfreak2008-02-191-1/+2
| | | | | | - updated docs for new command git-svn-id: svn://svn.berlios.de/openocd/trunk@312 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - ignore data aborts during gdb memory read packets by default, and return ↵drath2008-02-181-10/+37
| | | | | | | | | | | | 0x0 instead - add configuration option "gdb_report_data_abort <enable|disable> to enable reporting of data aborts during gdb memory read packets - thanks to Øyvind Harboe for identifying the problem with GDB and data aborts - fix some warnings in gdb_server.c git-svn-id: svn://svn.berlios.de/openocd/trunk@307 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Added a "User:" debug level. These are messages that are intended for the ↵ntfreak2008-02-181-78/+9
| | | | | | | | | | | | | | user and are part of normal operation. - Faster DEBUG/INFO() when they are disabled - target_read/write_buffer() now uses 16 and 32 bit access for single word aligned requests. Other requests are serviced as quickly as possible. - *much* faster read/write GDB packets, removing timeout problems. - GDB read/write packets w/single word aligned 32/16 bit access now use 32/16 bit word access. - working area can now be changed on the fly. Provides a way to move working area about as MMU is enabled/disabled. - cleaned up error messages for verify_image. Thanks Øyvind Harboe git-svn-id: svn://svn.berlios.de/openocd/trunk@302 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - solve lots of problems with stuck GDB connections, making it impossible to ↵ntfreak2008-02-161-98/+180
| | | | | | | | | | | | | | | | connect to GDB, handle timeout of acknowledgement, etc. - "monitor halt/resume" now works correctly - "monitor sleep 10000" no longer makes the GDB protocol lock up. There is an error message and the protocol recovers nicely afterwards. - it's now possible to connect to a target which needs a reset before halt works. - handle failed memory access more gracefully. Connection is now closed instead of OpenOCD quitting. - *much* improved handling of 2 second timeout on memory read packets. Especially important w/mouseover evaluation of variables in Eclipse. - fixed memory leak upon failed memory packet reply. - 'O' packets w/progress info is no longer sent out randomly. - faster packet reply code. - Thanks to Øyvind Harboe for this patch git-svn-id: svn://svn.berlios.de/openocd/trunk@300 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added patch to Improving progress/error output for telnet & GDB monitormifi2008-02-131-7/+58
| | | | | | (thanks to Øyvind for the patch) git-svn-id: svn://svn.berlios.de/openocd/trunk@293 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added autoprobe functionalitymifi2008-01-271-1/+22
| | | | | | | - corrected blocksize handling from GDB "info mem" command (thanks to Øyvind and Spen for these patches) git-svn-id: svn://svn.berlios.de/openocd/trunk@278 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fix gdb packet retransmission omissionntfreak2008-01-101-1/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@253 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - _DEBUG_GDB_IO_ was left on by mistakentfreak2008-01-101-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@252 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added faster gdb packet handling (thanks to oyvind harboe for the patch)ntfreak2008-01-101-10/+74
| | | | | | - code reformat git-svn-id: svn://svn.berlios.de/openocd/trunk@251 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - rename flash_init and flash_erase to flash_init_drivers and ↵ntfreak2008-01-091-33/+49
| | | | | | | | | | flash_erase_address_range - stops conflicts with redboot. Thanks Øyvind Harboe - gdb connection not dropped if we fail to allocate memory in query packets git-svn-id: svn://svn.berlios.de/openocd/trunk@249 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added gdb flash fixes patch mifi2008-01-071-9/+18
| | | | | | | | | | https://lists.berlios.de/pipermail/openocd-development/2007-December/000548.html - added synthesize in_check_mask/value and error handler patch https://lists.berlios.de/pipermail/openocd-development/2008-January/000554.html (thanks to oyvind harboe for these patches) git-svn-id: svn://svn.berlios.de/openocd/trunk@248 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - add support for extended gdb packet R (restart), requires gdb to be ↵ntfreak2007-12-291-0/+13
| | | | | | started with target extended-remote git-svn-id: svn://svn.berlios.de/openocd/trunk@247 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - minimum autoconf 2.59 is now required and verified - due to issues with ↵ntfreak2007-12-291-12/+318
| | | | | | | | | | | | | | | | | | | | AS_HELP_STRING - native win32 now handles WSAECONNRESET - no longer exits openocd - qCRC packet now works correctly under cygwin (gdb compare-sections command) - removed __USE_GNU define from gdbserver.c - gdb qSupported packet is now handled, with this we are able to tell gdb packet size, memory map of target - added new target script gdb_program_config - called before gdb flash programming - new gdb server command gdb_memory_map (enable|disable> - default is disable - new gdb server command gdb_flash_program (enable|disable> - default is disable - gdb flash programming supported - vFlash packets - image_elf_read_section now does not clear any remaining data, this was causing the gdb checksum to fail with certain files - reformat of usbprog.c - memory leak in command_print fixed - updated texi doc to include new commands - added gdb programming section to docs git-svn-id: svn://svn.berlios.de/openocd/trunk@246 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - removed flash write_image - binary compare function has been moved to ↵ntfreak2007-12-201-1/+1
| | | | | | | | | verify_image command - minor code reformat and cleanup - updated docs to include new commands git-svn-id: svn://svn.berlios.de/openocd/trunk@243 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added patch for new flash functionality like:mifi2007-12-181-1/+6
| | | | | | | | | | flash verify_image and flash erase_address. - added patch for new parport_write_on_exit command. Even this patch will fix some memory leaks. (thanks too oyvind and Spen for these patches) git-svn-id: svn://svn.berlios.de/openocd/trunk@240 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - reset_run now works as expected on cortex-m3ntfreak2007-11-211-1/+1
| | | | | | | | | - str9xpec erase status checked on option byte programming - stm32x flash driver now supports sector protection - surplus exit removed from flash.c - openocd.texi documentation added git-svn-id: svn://svn.berlios.de/openocd/trunk@212 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - add verify_image commandntfreak2007-10-221-3/+45
| | | | | | - add support for gdb qCRC packet (compare-sections command) git-svn-id: svn://svn.berlios.de/openocd/trunk@210 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - cleaned up str7, str9 and stm32 flash driversntfreak2007-10-081-4/+69
| | | | | | | | | | | - str7 flash driver now checks correct busy bits depending on device - str9 flash driver now disables ITCM order as per st programming manual - added str7 disable_jtag command - added gdb_detach command - updated arm966e cp15 support - fix crash on mingw build when enabling target_request debugmsgs git-svn-id: svn://svn.berlios.de/openocd/trunk@209 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - flash autoerase <on|off> cmd added, default is off - flash banks are ↵ntfreak2007-10-011-1/+1
| | | | | | | | | | | calculated and erased prior to write (flash write_image only) - corrected array overrun in armv7m.c - corrected breakpoint memory allocation bug - image read now uses fgets, vastly improves reading of large files - improved hex file reading, support for Linear Address Record added git-svn-id: svn://svn.berlios.de/openocd/trunk@208 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fixed several bugs in flash writing code (thanks to Pavel Chromy)drath2007-08-161-9/+9
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@196 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - renamed M5960 USB JTAG to "flyswatter"drath2007-08-101-108/+244
| | | | | | | | | | | | | | | | | | | | - make ep93xx and at91rm9200 bitbang JTAG interfaces dependant on ARM host (thanks to Vincent Palatin) - various whitespace fixes - removed various warnings - add support for Debian GNU/kFreeBSD (thanks to Uwe Hermann) - fix OpenOCD compilation for various platforms (thanks to Uwe Hermann and Vincent Palatin) - switched order of JTAG chain examination and validation (examine first, then multiple validation tries even if examination failed) - added target_request subsystem to handle requests from the target (debug messages and tracepoints implemented, future enhancements might include semihosting, all ARM7/9 only for now) - added support for GDB vFlashXXX packets (thanks to Pavel Chromy) - added support for receiving data via ARM7/9 DCC - reworked flash writing. the 'flash write' command is now deprecated and replaced by 'flash write_binary' (old syntax and behaviour) and 'flash write_image' (write image files (bin, hex, elf, s19) to a target). - added support for AMD/ST/SST 29F400B non-cfi flashes git-svn-id: svn://svn.berlios.de/openocd/trunk@190 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - reformat src/jtag/bitq.c (thanks to Pavel Chromy)drath2007-07-251-52/+20
| | | | | | | | | | | - fix multiple reads from FT2232 into same buffer location (thanks to Magnus Lundin) - retry JTAG chain validation (thanks to Magnus Lundin) - reworked GDB packet input handling (thanks to Pavel Chromy) - output error message when setting a watchpoint failed - removed duplicate out-of-bounds check in at91sam7.c (thanks to Pavel Chromy) git-svn-id: svn://svn.berlios.de/openocd/trunk@181 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fixed arm926 cp15 command bug (thanks to Vincent Palatin for this patch)drath2007-03-261-8/+8
| | | | | | | | - fixed compiler warnings throughout the code (thanks to Vincent Palatin for this patch) - added support for accessing ETB (embedded trace buffer) registers git-svn-id: svn://svn.berlios.de/openocd/trunk@134 b42882b7-edfa-0310-969c-e2dbd0fdcd60