summaryrefslogtreecommitdiff
path: root/src/helper/log.h
Commit message (Collapse)AuthorAgeFilesLines
* nit: more LOG_* \n fixesEric Wetzel2011-01-091-3/+0
| | | | | | | | | Remove extra \n from LOG_DEBUG, LOG_INFO, and LOG_WARNING messages Remove LOG_INFO_N LOG_INFO_N was only used once and had a \n at the end Change LOG_USER_N calls that end with \n to LOG_USER
* HELPER/LOG: review unused symbolsAntonio Borneo2010-04-101-8/+0
| | | | | | | | | Remove unused functions: - log_catch - log_rethrow - log_try Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* Clang buildfixesAlex Austin2010-01-291-1/+6
| | | | | | | | | Building with clang took a few very small changes. The change to helper/log.h is because clang doesn't like an expression where the result is unused. In helper/system.h, I just defined true and false since clang doesn't have them builtin. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* change #include "command.h" to <helper/command.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "command.h" the following form should be used. #include <helper/command.h> The exception is from .c files in the same directory.
* log: improve initializationZachary T Welch2009-11-251-1/+4
| | | | | | Removes redundant assignment of start_ms from log_register_commands(). Eliminates command_context parameter and return value. Adds Doxygen comment block for this API call.
* helper/log: improve API parameter typesZachary T Welch2009-11-161-4/+4
| | | | | | | Uses unsigned type to pass line numbers. Use uint64_t to pass sleep routines their milliseconds. Updates sleep routines to use this type and improve whitespace.
* command_context_t -> struct command_contextZachary T Welch2009-11-131-3/+3
| | | | Remove misleading typedef and redundant suffix from struct command_context.
* log_callback_t -> struct log_callbackZachary T Welch2009-11-131-4/+3
| | | | | Removes useless and confusing typedef for log callback structure. Types with _t should be suitable for passing by-value as arguments.
* log: improve log_callback_fn signatureZachary T Welch2009-11-111-1/+1
| | | | Use unsigned type for line number in log_callback_fn signature.
* src/helper: wrap and clean headers.Zachary T Welch2009-11-091-11/+14
| | | | | Remove all useless 'extern' keywords from function prototypes. Wraps long lines for readability.
* corrective fix for MinGW GNU C99 printf complianceRedirect 'Slash' NIL2009-10-191-3/+4
| | | | | | | | | | | | | | Compilation on cygwin, using gcc v3 with option -mno-cygwin, currently produces a large number of the following warnings: warning: `gnu_printf' is an unrecognized format function type These have been introduced with the recent MinGW GNU C99 printf compliance patch, as gnu_printf was only introduced with gcc v4.4 and is not recognized with earlier versions. The attached fix adds gcc version detection to the previous patch to avoid the problem.
* More MinGW C99 printf complianceRedirect 'Slash' NIL2009-10-171-2/+10
| | | | | | | | Passing "--std=gun99" is unfortunately not sufficient to make current MinGW compilers conform with respect to checking printf format strings. (The C runtime seems not to have problems.) Fix by using a "gnu_printf" format specifier not "printf".
* Try/catch scheme. Typed up the functionality and regression tested.oharboe2009-09-251-0/+9
| | | | | | Ready for discussion and tiny patches that tries out this scheme. git-svn-id: svn://svn.berlios.de/openocd/trunk@2755 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixesoharboe2009-07-171-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace at end of lines, step 2.zwelch2009-06-231-8/+8
| | | | | | | - Replace '\s*$' with ''. git-svn-id: svn://svn.berlios.de/openocd/trunk@2380 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace that occurs before ')'.zwelch2009-06-231-1/+1
| | | | | | | - Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace that occurs after '('.zwelch2009-06-231-1/+1
| | | | | | | - Replace '([ \t]*' with '('. git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '+' whitespacezwelch2009-06-231-1/+1
| | | | | | | | | | - 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
* Audit and remove redundant uses of replacements.h in the tree.zwelch2009-05-121-1/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1761 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Audit and eliminate redundant helper #include directives.zwelch2009-05-111-2/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1706 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - remove target specific variant and use target->variant memberntfreak2008-12-131-1/+1
| | | | | | | - 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
* Duane Ellis: addresses protocol problems with GDB.oharboe2008-10-111-0/+1
| | | | | | 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
* added busy sleep (for testing purposes)oharboe2008-10-091-0/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1033 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added myself to copyright on files i remember adding large contributions ↵ntfreak2008-09-201-1/+4
| | | | | | | | | 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
* added alive_sleep() function to let GDB alive packets be sentoharboe2008-08-191-0/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@938 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Duane Ellis: fix warningsoharboe2008-08-051-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@890 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* added yours sincerely for files where I feel that I've made non-trivial ↵oharboe2008-07-251-0/+3
| | | | | | contributions. git-svn-id: svn://svn.berlios.de/openocd/trunk@872 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* more error message cleanup. invalid args & syntax errors both now print ↵oharboe2008-07-241-2/+2
| | | | | | arguments of command. git-svn-id: svn://svn.berlios.de/openocd/trunk@870 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* 1. GDB will print cryptic error messages if it is not fed keep-alive packetsoharboe2008-07-181-0/+2
| | | | | | | | | | | | | | | | | | within the last 2000ms. To fix this, add keep_alive() if you are spending >1000ms in an algorithm thus holding up the server loop. target_call_timer_callbacks() invokes keep_alive(). 2. post_reset script is now executed at normal JTAG speed and not reset speed. 3. Resume is now synchronous again. Hopefully it will work this time. git-svn-id: svn://svn.berlios.de/openocd/trunk@826 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Pavel Chromy: fix logging syntax error + formatting & removing obsolete ↵oharboe2008-06-041-1/+1
| | | | | | comments. git-svn-id: svn://svn.berlios.de/openocd/trunk@702 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* This matters for embedded devices, but is probably not observably better for ↵oharboe2008-05-071-1/+1
| | | | | | PC hosted OpenOCD. git-svn-id: svn://svn.berlios.de/openocd/trunk@647 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - rename log functions to stop conflicts under win32 (wingdi)ntfreak2008-03-251-33/+32
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@523 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - LOG_SILENT can be used to silence the log(needed in upcoming patches)oharboe2008-03-101-0/+7
| | | | | | | - ERROR_FAIL - added to emphasize that information about what went wrong is contained in Error: log statements and not in a 32 bit return value. git-svn-id: svn://svn.berlios.de/openocd/trunk@481 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* alloc_printf and alloc_vprintfoharboe2008-03-071-1/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@465 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Summary: passing of variable argument list reduced, strings sent to logging ↵oharboe2008-02-291-30/+14
| | | | | | | | | 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
* fixed newline gaffe in OUTPUT()oharboe2008-02-281-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@382 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Pavel Chromy spotted duplicated newlines gaffe from yours sincerely.oharboe2008-02-281-0/+5
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@381 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Added TARGET_REQ_DEBUGCHAR target_request debugmsg. This oharboe2008-02-281-6/+15
| | | | | | | | | | | | 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-113/+113
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@347 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Pavel Chromyoharboe2008-02-251-99/+113
| | | | | | | | - 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
* - Added a "User:" debug level. These are messages that are intended for the ↵ntfreak2008-02-181-2/+15
| | | | | | | | | | | | | | 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
* - combine similar functions in telnet_server.cntfreak2008-02-171-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@301 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - cleanup and remove time() warningntfreak2008-02-161-2/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@299 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - added patch to Improving progress/error output for telnet & GDB monitormifi2008-02-131-20/+10
| | | | | | (thanks to Øyvind for the patch) git-svn-id: svn://svn.berlios.de/openocd/trunk@293 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - changed mingw host detection to *-mingw instead of *-*-mingw to work with ↵drath2007-08-101-0/+1
| | | | | | | | | i586-mingw32msvc-gcc - add replacements.h to log.h to make sure ERROR is undefined on windows git-svn-id: svn://svn.berlios.de/openocd/trunk@191 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fixed arm926 cp15 command bug (thanks to Vincent Palatin for this patch)drath2007-03-261-1/+2
| | | | | | | | - 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
* - prepare OpenOCD for branching, created ./trunk/drath2006-06-021-0/+96
git-svn-id: svn://svn.berlios.de/openocd/trunk@64 b42882b7-edfa-0310-969c-e2dbd0fdcd60