On Thu, Dec 11, 2014 at 6:28 PM, Milian Wolff <[email protected]> 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 _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
