diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-03-28 12:34:05 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-03-28 12:34:05 -0400 |
commit | 5e5189b38b0b1b788d32190361961d18e4456ae6 (patch) | |
tree | d388205113589bf73857efc6ef997bc8c39e112b /runtime/loc2c-runtime.h | |
parent | bf6c85c35a749ca8cc6bea20a7774d063c218938 (diff) | |
parent | 1e00cfb1b6caa8b8ac343fac8e3d08f2d6a5d785 (diff) | |
download | systemtap-steved-5e5189b38b0b1b788d32190361961d18e4456ae6.tar.gz systemtap-steved-5e5189b38b0b1b788d32190361961d18e4456ae6.tar.xz systemtap-steved-5e5189b38b0b1b788d32190361961d18e4456ae6.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
* 'master' of git://sources.redhat.com/git/systemtap: (24 commits)
2008-03-27 Frank Ch. Eigler <fche@elastic.org>
2008-03-27 Frank Ch. Eigler <fche@elastic.org>
2008-03-26 Frank Ch. Eigler <fche@elastic.org>
Revert "dummy commit"
dummy commit
* clarify utility of epilogue-type probe aliases in documentation
2008-03-23 Frank Ch. Eigler <fche@elastic.org>
2008-03-23 Frank Ch. Eigler <fche@elastic.org>
2008-03-21 Eugene Teo <eugeneteo@kernel.sg>
spelling fixes
2008-03-20 Frank Ch. Eigler <fche@elastic.org>
* clarify $variables available in .return probes
2008-03-20 Frank Ch. Eigler <fche@elastic.org>
2008-03-17 Eugene Teo <eteo@redhat.com>
* systemtap.base/maxactive.exp, probefunc.exp: Standardize pass msg.
2008-03-14 Masami Hiramatsu <mhiramat@redhat.com>
2008-03-13 Frank Ch. Eigler <fche@elastic.org>
* release prep: 0.6.2 version bump
2008-03-12 Dave Brolley <brolley@redhat.com>
2008-03-11 Will Cohen <wcohen@redhat.com>
...
Diffstat (limited to 'runtime/loc2c-runtime.h')
-rw-r--r-- | runtime/loc2c-runtime.h | 22 |
1 files changed, 20 insertions, 2 deletions
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); \ }) |