Commit Graph

179 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
oharboe
e762857203 typo spotted by spen. gdb_breakpoint_override not tested yet.
git-svn-id: svn://svn.berlios.de/openocd/trunk@919 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-14 13:42:56 +00:00
oharboe
ba315ca440 added global gdb breakpoint override configuration command
git-svn-id: svn://svn.berlios.de/openocd/trunk@914 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-13 20:42:07 +00:00
oharboe
a71ca65c53 Clear all dangling breakpoints upon GDB connection.
git-svn-id: svn://svn.berlios.de/openocd/trunk@912 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-13 15:05:15 +00:00
oharboe
b38f2bb60e return halted signal if step/continue fails
git-svn-id: svn://svn.berlios.de/openocd/trunk@910 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-13 12:21:57 +00:00
oharboe
f370d70670 Duane Ellis: fix warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@890 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-08-05 12:27:18 +00:00
oharboe
526fe3d83e added yours sincerely for files where I feel that I've made non-trivial contributions.
git-svn-id: svn://svn.berlios.de/openocd/trunk@872 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-25 06:54:17 +00:00
oharboe
06d501a192 wait 500ms for target to halt upon connect.
git-svn-id: svn://svn.berlios.de/openocd/trunk@865 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-24 06:07:55 +00:00
ntfreak
1c92ff6a04 - comment about dummy ack '+' char from gdb
git-svn-id: svn://svn.berlios.de/openocd/trunk@864 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-23 22:24:02 +00:00
oharboe
a332b4e8c4 fix <memory> is missing upon gdb connect warning when no flash is defined for target.
git-svn-id: svn://svn.berlios.de/openocd/trunk@861 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-23 19:03:16 +00:00
oharboe
d0f32d0ed5 restart is a per-target action
git-svn-id: svn://svn.berlios.de/openocd/trunk@853 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-21 18:24:43 +00:00
oharboe
fa33b32903 Allows config scripts to override handling of 'R'(restart) GDB packet.
git-svn-id: svn://svn.berlios.de/openocd/trunk@852 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-21 18:06:36 +00:00
oharboe
dfbb9f3e89 - jtag_khz/speed are now single parameter only. These are used
from pre/post_reset event scripts. Adding the second parameter was
a mistake seen in retrospect. this gives precise control in post_reset
for *when* the post reset speed is set. The pre_reset event was
added *after* the second parameter to jtag_khz/speed
- the target implementations no longer gets involved in the reset mode
scheme. Either they reset a target into a halted mode or not.
target_process_reset()
detects if the reset halt failed or not.
- tcl target event names are now target_N_name.  Mainly internal
at this early stage, but best to get the naming right now.
- added hardcoded reset modes from gdb_server.c. I don't know precisely what
these defaults should be or if it should be made configurable. Perhaps some
hardcoded defaults will do for now and it can be made configurable later.
- bugfix in cortex_m3.c for reset_run_and_xxx?
- issue syntax error upon obsolete argument in target command instead of
printing message that will surely drown in the log

git-svn-id: svn://svn.berlios.de/openocd/trunk@849 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-21 15:59:41 +00:00
ntfreak
46b3e72528 - fix pre_resume script not being called
git-svn-id: svn://svn.berlios.de/openocd/trunk@771 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-08 10:49:58 +00:00
oharboe
dc796a2091 src/helper/configuration.h
- Log output handlers now get a "const char *line"
	- Added "const" to parameter.

src/helper/command.c
src/helper/command.h
	- New function:  'command_output_text()'
	- Log output handlers now get a "const char *line"
 
src/helper/options.c
	- Log output handlers now get a "const char *line"

src/server/telnet_server.c
	- DO not transmit NULL bytes via TELNET.
	- Log output handlers now get a "const char *line"
	
src/server/gdb_server.c
	- Log output handlers now get a "const char *line"
	
	*** THIS INCLUDES PORTIONS OF A PATCH FROM Oyvind sent 
	previously to the mailing list for TCL users try

src/target/target.c
	*** THIS INCLUDES PORTIONS OF A PATCH FROM Oyvind sent 
	previously to the mailing list for TCL users try
	
src/target/target.h
	*** THIS INCLUDES PORTIONS OF A PATCH FROM Oyvind sent 
	previously to the mailing list for TCL users try

src/openocd.c
    - **MAJOR** Work: New TCL/Jim function: mem2array
	- **MAJOR** Work: Redirect Tcl/Jim stdio output to remote users.
	- Previously: TCL output did not go to GDB.
	- Previously: TCL output did not go to TELNET
	- Previously: TCL output only goes to control console.
	- This fixes that problem.
	+ Created callbacks:
		+openocd_jim_fwrite()	
		+openocd_jim_fread()
		+openocd_jim_vfprintf()
		+openocd_jim_fflush()
		+openocd_jim_fgets()

src/Makefile.am
	- New TCL files.
	- Future note: This should be more automated.  As the list of
	  'tcl' files grows maintaning this list will suck.

src/Jim.c
	- ** THIS INCLUDES A PREVIOUS PATCH I SENT EARLIER **
	- that impliments many [format] specifies JIM did not support.
	- Jim_FormatString() - **MAJOR** work.
	- Previously only supported "%s" "%d" and "%c"
	- And what support existed had bugs.
	- NEW: *MANY* formating parameters are now supported.
	- TODO: The "precision" specifier is not supported.

	** NEW ** This patch.
	
	- Jim_StringToWide() test if no conversion occured.
	- Jim_StringToIndex() test if no conversion occured.
	- Jim_StringToDouble() test if no conversion occured.

	** NEW ** This Patch. Major Work.
	- Previously output from JIM did not get sent to GDB
	- Ditto: Output to Telnet session.
	- Above items are now fixed - By introducing callbacks
	  new function pointers in the "interp" structure.

	- Helpers that call the callbacks.
	
	- New function: Jim_fprintf()
	- New function: Jim_vfprintf()
	- New function: Jim_fwrite()
	- New function: Jim_fread()
	- New function: Jim_fflush()
	- New function: Jim_fgets()

	By default: the output is to STDIO as previous.
	The "openocd.c" - redirects the output as needed.
	
	- Jim_Panic() - Send panic to both STDERR and the interps
	specified STDERR output as a 2nd choice.

	- Now JIM's "stdin/stdout/stderr" paramters are "void *"
	and are no longer "FILE *".

src/Jim.h
	- **MAJOR**
	-  New JIM STDIO callbacks in the "interp" structure.
	-  change: "stdin/stdout/stderr" are now "void *" cookies.
	-  New JIM stdio helper functions.



git-svn-id: svn://svn.berlios.de/openocd/trunk@755 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-07-06 19:17:43 +00:00
oharboe
ee793f0fcb This matters for embedded devices, but is probably not observably better for PC hosted OpenOCD.
git-svn-id: svn://svn.berlios.de/openocd/trunk@647 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-07 14:25:34 +00:00
oharboe
ac1bd155c2 Edgar Grimberg found tiny memory leak
git-svn-id: svn://svn.berlios.de/openocd/trunk@644 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-05-06 13:05:17 +00:00
oharboe
3ce7afc0da regions outside flash are now read/write nocache by default. GDB 6.8 would mark non-flash areas as inacessible by default.
git-svn-id: svn://svn.berlios.de/openocd/trunk@607 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-23 08:07:39 +00:00
oharboe
fcf3b943d8 Enabled auto erase, gdb memory map and gdb flash programming by default.
git-svn-id: svn://svn.berlios.de/openocd/trunk@591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-18 07:33:03 +00:00
oharboe
f62ba35507 More robust handling of unknown target state for step/continue packet.
git-svn-id: svn://svn.berlios.de/openocd/trunk@573 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-13 13:29:33 +00:00
oharboe
c4a2fdbc39 Reset wip. Just adding hooks. This is just to reduce the size of the actual change, no change in behaviour.
git-svn-id: svn://svn.berlios.de/openocd/trunk@565 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-11 14:06:42 +00:00
oharboe
0d4f8fc824 Spen fixed various issues w.r.t. setting up the sockets for optimal performance.
git-svn-id: svn://svn.berlios.de/openocd/trunk@545 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-04-07 17:29:21 +00:00
ntfreak
d47e1b8f36 - rename log functions to stop conflicts under win32 (wingdi)
git-svn-id: svn://svn.berlios.de/openocd/trunk@523 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-25 15:45:17 +00:00
ntfreak
a96f96d1f0 - gdb server was incorrectly sending null terminator on qXfer:features:read: packet
- armv7m now sends correct gdb register packet

git-svn-id: svn://svn.berlios.de/openocd/trunk@522 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-22 14:19:46 +00:00
oharboe
7de7bc80fc - adds two speeds to jtag_speed. reset and post reset speed. Default
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
2008-03-13 10:14:41 +00:00
oharboe
703dc714c8 - fixed a problem with big endian XScale and GDB register packets.
- 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
2008-03-10 14:14:15 +00:00
oharboe
0424155dfc - Fixed various error handling when looking for memory leaks
- 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
2008-03-10 12:11:07 +00:00
oharboe
c78b4fe426 - Improves error handling upon GDB connect
- 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
2008-03-07 21:49:16 +00:00
oharboe
652a5b18b4 Pavel Chromy: performance tweak of gdb_put_packet_inner() removing malloc and avoiding memcpy of larger blocks of data,
git-svn-id: svn://svn.berlios.de/openocd/trunk@453 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-06 12:04:27 +00:00
oharboe
6d95014674 * fixed malloc corruption in target->debug_reason
* 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
2008-03-05 10:28:32 +00:00
oharboe
8404dc3657 Bogus error message in GDB removed
git-svn-id: svn://svn.berlios.de/openocd/trunk@443 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-04 21:12:01 +00:00
oharboe
f955b90d28 Fixed GDB timeout crash - regression introduced back when log_add/remove_callback was added.
git-svn-id: svn://svn.berlios.de/openocd/trunk@442 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-04 13:13:55 +00:00
oharboe
82eda37fe3 log_remove_callback
git-svn-id: svn://svn.berlios.de/openocd/trunk@412 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-03-01 14:36:13 +00:00
oharboe
3a3fc30014 - clean up target output strings a bit
- 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
2008-02-29 11:31:49 +00:00
oharboe
67e0aea258 Summary: passing of variable argument list reduced, strings sent to logging 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
2008-02-29 11:16:38 +00:00
ntfreak
9e5a6679ca - added svn props
- 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
2008-02-28 10:07:54 +00:00
oharboe
0689e3dd67 - Added TARGET_REQ_DEBUGCHAR target_request debugmsg. This
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
2008-02-28 08:11:18 +00:00
drath
3d6bcf0792 - convert all files to unix line-ending
git-svn-id: svn://svn.berlios.de/openocd/trunk@347 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 17:48:04 +00:00
oharboe
7f1944a478 Pavel Chromy
- 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
2008-02-25 17:32:53 +00:00
oharboe
bcb0124b15 dos2unix fix.
git-svn-id: svn://svn.berlios.de/openocd/trunk@339 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-25 08:01:21 +00:00
oharboe
815c3b3533 - "flash write_binary" is now "flash write_bank" to clarify the focus of the
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
2008-02-25 07:32:52 +00:00
drath
885ae471ad - fixes possible crash when GDB connection is closed while target is running 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
2008-02-24 12:30:45 +00:00
ntfreak
95df797b2e - add search paths via new arg -s (-search). Thanks Ted Roth
- updated docs for new command

git-svn-id: svn://svn.berlios.de/openocd/trunk@312 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2008-02-19 20:04:57 +00:00
drath
48709fba0b - ignore data aborts during gdb memory read packets by default, and return 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
2008-02-18 17:59:06 +00:00