libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] WIP patch: configurable cache size


From: Arun Sharma
Subject: Re: [Libunwind-devel] WIP patch: configurable cache size
Date: Mon, 22 Dec 2014 22:27:52 +0530

On Thu, Dec 11, 2014 at 6:28 PM, Milian Wolff <address@hidden> wrote:
>
> What I still don't understand though, is how we could actually share this
> code. I mean, in x86_64/Gtrace.c there's a bunch of code, which is
> semantically "equivalent" to what I added to dwarf/Gparser.c now, but the
> actual types are different. Both represent per-thread/global caches, but one
> uses dwarf_rs_cache and the other unw_trace_cache_t... As I said before, in
> C++ it would be trivial to share this code, but how does one do this in C?
> Macros? Functions that take void*, callbacks, etc.? Or is it OK for me to
> leave this as-is and someone more experienced with C merges the common code
> base?

Probably best to leave the Gtrace.c code as-is. If you're really
motivated to share code, using void * + callbacks seems better than
macros.

 -Arun



reply via email to

[Prev in Thread] Current Thread [Next in Thread]