[PATCH 1/2] Define macros for renaming xmalloc and xcalloc
Masatake YAMATO
yamato at redhat.com
Mon Dec 25 13:04:48 UTC 2017
Hi,
I have NO intent to hurry you but IF you miss follow
two patches, could you look at them?
* [PATCH 1/2] Define macros for renaming xmalloc and xcalloc
* [PATCH 2/2] Unwind: demangle symbol names
Rewgards,
Masatake YAMATO
On Mon, 18 Dec 2017 13:24:54 +0900, Masatake YAMATO <yamato at redhat.com> wrote:
> I'm planning to link strace with libiberty for mangling C++
> symbol appearted in stack trace enabled with -k option.
>
> Both the names, xmalloc and xcalloc, are already used in the
> library. They are conflicts the functions having the same
> names in strace. Newly introduced macors(strace_calloc and
> strace_malloc) rename the names defined in strace side for
> avoiding the confliction.
>
> * xmalloc.h (strace_calloc, strace_malloc): New macros.
>
> Signed-off-by: Masatake YAMATO <yamato at redhat.com>
> ---
> xmalloc.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/xmalloc.h b/xmalloc.h
> index d1feeb91..89234e20 100644
> --- a/xmalloc.h
> +++ b/xmalloc.h
> @@ -36,6 +36,8 @@
> #include <stddef.h>
> #include "gcc_compat.h"
>
> +#define xcalloc strace_calloc
> +#define xmalloc strace_malloc
> void *xcalloc(size_t nmemb, size_t size)
> ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1, 2));
> void *xmalloc(size_t size) ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1));
> --
> 2.14.3
>
More information about the Strace-devel
mailing list