diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/ChangeLog | 19 | ||||
-rw-r--r-- | runtime/autoconf-tsc-khz.c | 2 | ||||
-rw-r--r-- | runtime/autoconf-unregister-kprobes.c | 4 | ||||
-rw-r--r-- | runtime/loc2c-runtime.h | 22 | ||||
-rw-r--r-- | runtime/vsprintf.c | 4 |
5 files changed, 46 insertions, 5 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 497b9d5b..b52ddf7b 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,22 @@ +2008-03-17 Eugene Teo <eteo@redhat.com> + + PR 5947 + * autoconf-tsc-khz.c: Remove "&& defined(__i386__)" to make the test + more pessimistic. + +2008-03-14 Masami Hiramatsu <mhiramat@redhat.com> + + PR 3542 + * autoconf-unregister-kprobes.c : New file. + +2008-03-10 Dave Brolley <brolley@redhat.com> + + 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 Martin Hunt <hunt@redhat.com> * sym.h (_stp_module): Add text_size, lock, and unwind data diff --git a/runtime/autoconf-tsc-khz.c b/runtime/autoconf-tsc-khz.c index 6c3f453e..f60bf6d0 100644 --- a/runtime/autoconf-tsc-khz.c +++ b/runtime/autoconf-tsc-khz.c @@ -1,7 +1,7 @@ #include <linux/version.h> #include <asm/tsc.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) && defined(__i386__) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) #error "tsc_khz is not exported" #endif unsigned int *ptsc = &tsc_khz; diff --git a/runtime/autoconf-unregister-kprobes.c b/runtime/autoconf-unregister-kprobes.c new file mode 100644 index 00000000..793891da --- /dev/null +++ b/runtime/autoconf-unregister-kprobes.c @@ -0,0 +1,4 @@ +#include <linux/kprobes.h> + +void * x = (void *)unregister_kprobes; +void * y = (void *)unregister_kretprobes; diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h index 4674e399..7ea1b1e4 100644 --- a/runtime/loc2c-runtime.h +++ b/runtime/loc2c-runtime.h @@ -623,8 +623,26 @@ for (_len = (maxbytes), _addr = (uintptr_t)(addr); \ _len > 1 && (_c = deref (1, _addr)) != '\0'; \ --_len, ++_addr) \ - *_d++ = _c; \ - *_d = '\0'; \ + if (_d) \ + *_d++ = _c; \ + if (_d) \ + *_d = '\0'; \ + (dst); \ + }) + +#define deref_buffer(dst, addr, numbytes) \ + ({ \ + uintptr_t _addr; \ + size_t _len; \ + unsigned char _c; \ + char *_d = (dst); \ + for (_len = (numbytes), _addr = (uintptr_t)(addr); \ + _len >= 1; \ + --_len, ++_addr) { \ + _c = deref (1, _addr); \ + if (_d) \ + *_d++ = _c; \ + } \ (dst); \ }) diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index f8283e5c..0bf625a5 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -180,7 +180,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) else if (*fmt == '*') { ++fmt; /* it's the next argument */ - field_width = va_arg(args, int64_t); + field_width = va_arg(args, int); if (field_width < 0) { field_width = -field_width; flags |= STP_LEFT; @@ -196,7 +196,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) else if (*fmt == '*') { ++fmt; /* it's the next argument */ - precision = va_arg(args, int64_t); + precision = va_arg(args, int); } if (precision < 0) precision = 0; |