diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-05-14 14:35:48 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-05-14 14:35:48 -0400 |
commit | 0fe2b97c7b967d833b5588dbf1ef763bb4440ed3 (patch) | |
tree | fcce9345c9ebacb7d5bc1f510f155bfdcea08dc4 /runtime/vsprintf.c | |
parent | a007b4068d20af2d4488d54bf3ef2edbf47f2f06 (diff) | |
parent | c3799d720b60bd74a60de4addcd0d77a90f7842a (diff) | |
download | systemtap-steved-0fe2b97c7b967d833b5588dbf1ef763bb4440ed3.tar.gz systemtap-steved-0fe2b97c7b967d833b5588dbf1ef763bb4440ed3.tar.xz systemtap-steved-0fe2b97c7b967d833b5588dbf1ef763bb4440ed3.zip |
Merge commit 'origin/master' into pr6429-comp-unwindsyms
* commit 'origin/master':
PR 5955 - Accept ; terminated globals
Factored returnval() out of returnstr(), for use in dwarfless probing.
Converted more aliases to use arg numbers instead of names. In particular,
Revert "PR6487: extend blacklist with relay/timer subsystem"
Add syscalls_by_pid.meta, syscalls_by_proc.meta,
PR6487: extend blacklist with relay/timer subsystem
Adjust iotime.meta description.
* iotime.meta: New.
Fix for PR 6500.
Update ChangeLog
* sleeptime.meta, wait4time.meta: New.
systemtap.examples futexes.meta change futex.stp to futexes.stp.
In ioblock.stp ioblock.end set bytes_done depending on kernel version.
PR6492: make listing mode warning-free
PR5648: Fix unaligned access warning in stp_print_flush on ia64
PR5648: Fix memcpy's endianess issue.
futexes.meta, nettop.meta, pf2.meta: New.
Clean up output.
Diffstat (limited to 'runtime/vsprintf.c')
-rw-r--r-- | runtime/vsprintf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index dcaa1bc3..4ffcf72e 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -248,6 +248,11 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) ++str; } } +#ifdef __ia64__ + if ((str + precision - 1) <= end) + memcpy(str, &num, precision); //to prevent unaligned access + str += precision; +#else switch(precision) { case 1: if(str <= end) @@ -256,21 +261,22 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) break; case 2: if((str + 1) <= end) - memcpy(str, &num, 2); + *(int16_t *)str = (int16_t)num; str+=2; break; case 4: if((str + 3) <= end) - memcpy(str, &num, 4); + *(int32_t *)str = num; str+=4; break; default: // "%.8b" by default case 8: if((str + 7) <= end) - memcpy(str, &num, 8); + *(int64_t *)str = num; str+=8; break; } +#endif while (len < field_width--) { if (str <= end) *str = '\0'; |