summaryrefslogtreecommitdiffstats
path: root/runtime/vsprintf.c
Commit message (Collapse)AuthorAgeFilesLines
* Use clamping to more easily normalize input valuesJosh Stone2010-02-161-6/+6
| | | | | | The kernel has min/max/clamp macros to make range comparisons easier. Clamp is a newer invention, but we can define it for older kernels in terms of min and max.
* Cleanup and better original transport support.David Smith2009-05-261-3/+1
| | | | | | | | | | * runtime/print.h: Moved _stp_reserve_bytes() prototype here. * runtime/vsprintf.c (_stp_vsnprintf): Includes print.h to get _stp_reserve_bytes() prototype. * runtime/transport/transport.c (_stp_remove_root_dir): Better cleanup for STP_TRANSPORT_VERSION == 1. (_stp_transport_fs_close): Ditto.
* Added error checking and other updates.David Smith2009-05-221-0/+2
| | | | | | | | | | | | | | | | | | * runtime/vsprintf.c: Added transport.h inclusion for STP_BUFFER_SIZE definition. * runtime/transport/debugfs.c (_stp_register_ctl_channel_fs): Added error checking. * runtime/transport/transport.c (_stp_get_root_dir): Ditto. (_stp_transport_fs_init): Added original transport support and error checking. * runtime/transport/relay_v2.c (__stp_relay_create_buf_file_callback): Added error checking. (_stp_transport_data_fs_init): Ditto. * runtime/transport/ring_buffer.c (_stp_transport_data_fs_init): Ditto. * runtime/transport/utt.c: Removed unused file. * runtime/transport/utt.h: Ditto.
* PR10099: Extend %M directive to support hexdumping large buffersWenji Huang2009-04-261-12/+19
| | | | | | | | | | This patch will make %M directive dump the variable width buffer in hex format instead of returning uint64_t number as before. * runtime/vsprintf.c: Modify %M directive. * stap.1.in: Update description. * testsuite/systemtap.printf/memory1.stp: Add test case.
* PR7072: use _stp_reserve_bytes for printf bufferKent Sebastian2009-04-171-7/+348
|
* Use 'static' as much as possibleJosh Stone2009-01-281-1/+1
| | | | | | | | | | This change just inserts 'static' on runtime, tapset, and generated C functions and globals, so the compiler can do a better job of optimizing. My tests with small scripts show ~10% reduction in compile time and ~20% reduction in module size. Larger scripts may show less benefit, but I expect purely positive results.
* Removed left over remnant from previous implementationElliott Baron2008-12-191-3/+0
|
* Better implementation for %MElliott Baron2008-12-191-10/+17
|
* First attempt at printf kernel memory hex dumpElliott Baron2008-12-191-1/+6
|
* Removed an unused variable left from printf %n (PR7051)Kent Sebastian2008-12-051-2/+1
|
* PR7051: Remove broken printf %n directive supportroot2008-12-051-40/+6
|
* PR5648: Fix memcpy's endianess issue.Masami Hiramatsu2008-05-071-3/+9
|
* PR5648: Fix unaligned access warning on ia64.Shaohua Li2008-04-301-3/+3
|
* 2008-03-10 Dave Brolley <brolley@redhat.com>brolley2008-03-101-2/+2
| | | | | | | | PR5189 * vsprintf.c (_stp_vsnprintf): Arguments for dynamic width and precision are of type 'int' again. * loc2c-runtime.h (deref_string): Copy the data only if dst is not NULL. (deref_buffer): New macro.
* 2008-02-27 Dave Brolley <brolley@redhat.com>brolley2008-02-271-11/+67
| | | | | | | PR5189 * vsprintf.c (_stp_vsnprintf): Extract arguments of type int64_t for dynamic width and precision. Implement width and precision correctly for the %b format specifier. Implement the %m specifier.
* 2007-10-17 Martin Hunt <hunt@redhat.com>hunt2007-10-171-23/+0
| | | | | PR5000 * vsprintf.c: Remove _stp_endian.
* 2007-05-15 Martin Hunt <hunt@redhat.com>hunt2007-05-161-0/+1
| | | | | * vsprintf.c: Add comment about %p. * regs.c, stack*.c, sym.c: Fix %p calls.
* 2007-01-31 Martin Hunt <hunt@redhat.com>hunt2007-01-311-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * string.c (_stp_string_init): Deleted. (_stp_sprintf): Deleted. (_stp_vsprintf): Deleted. (_stp_string_cat_cstr): Deleted. (_stp_string_cat_string): Deleted. (_stp_string_cat_char): Deleted. (_stp_string_ptr): Deleted. (_stp_string_cat): Deleted. (_stp_snprintf): Moved from vsprintf.c. (_stp_vscnprintf): Moved from vsprintf.c. * string.h (STP_STRING_SIZE): Deleted. (STP_NUM_STRINGS): Deleted. Remove all references to type "String". * vsprintf.c (_stp_vscnprintf): Moved to string.c. (_stp_snprintf): Moved to string.c * sym.c (_stp_symbol_sprint): Replaced with _stp_symbol_print, which writes to the print buffer. (_stp_symbol_sprint_basic): Replaced with _stp_symbol_snprint. * runtime.h: Include io.c. * stat-common.c: Use new _stp_print* functions. * stat.c: Ditto. * regs.c: Renamed to regs-ia64.c. * current.c: Renamed regs.c. * regs-ia64.c: New file (renamed from regs.c). * stack.c (_stp_stack_sprint): Renamed _stp_stack_print and now just prints to the print buffer. Calls __stp_stack_print instead of __stp_stack_sprint. (_stp_stack_snprint): New function. Calls _stp_stack_print and then copies the print buffer into a string. (_stp_stack_printj): Deleted. (_stp_ustack_sprint): Deleted. * stack-*.c: Rewritten to print instead of writing to strings. Uses new _stp_print* functions. * print.c (_stp_printf): Create new function instead of macro. (_stp_print): Ditto. (_stp_print_char): New function. * map.c: Use _stp_print() and _stp_print_char() instead of _stp_print_cstr(). * io.c (_stp_vlog): Use _stp_print() instead of _stp_string_cat_cstr(). * copy.c (_stp_string_from_user): Deleted.
* 2006-07-20 Martin Hunt <hunt@redhat.com>hunt2006-07-211-5/+8
| | | | * vsprintf.c (_stp_vsnprintf): %p format fixes.
* 2006-05-25 Martin Hunt <hunt@redhat.com>hunt2006-05-251-1/+17
| | | | | * vsprintf.c (_stp_vsnprintf): Change %p to work like libc and automatically insert "0x" before the pointer.
* %0s support to print null-terminated stringguanglei2006-05-091-0/+5
|
* 2006-04-28 Martin Hunt <hunt@redhat.com>hunt2006-04-281-1/+1
| | | | * vsprintf.c (_stp_vsnprintf): Fix argument size for %p.
* 2006-04-17 Martin Hunt <hunt@redhat.com>hunt2006-04-171-27/+50
| | | | | | * vsprintf.c (_stp_vsnprintf): Fix endian before writing binary. (_stp_endian): New variable to control endianess.
* 2006-04-10 Martin Hunt <hunt@redhat.com>hunt2006-04-111-0/+11
| | | | * vsprintf.c (_stp_snprintf): New function.
* 2006-04-09 Martin Hunt <hunt@redhat.com>hunt2006-04-101-0/+389
* print.c (_stp_print_flush): Send 'len" bytes instead of 'len+1', which included terminating 0. * string.c (_stp_sprintf): Call _stp_vsnprintf() instead of vsnprintf(). (_stp_vsprintf): Ditto. * vsprintf.c: New file.