On Thu, Jan 31, 2013 at 07:49:36PM +0900, YAMAMOTO Takashi wrote:
> From: YAMAMOTO Takashi <[email protected]>
>
> execinfo for NetBSD and ubacktrace for uClibc.
> i don't know if the latter is relevant to Open vSwitch, though.
>
> Signed-off-by: YAMAMOTO Takashi <[email protected]>
I didn't know that backtrace() was more widely available than glibc.
Does this patch mean that NetBSD makes a backtrace function matching the
following description available via libbacktrace? (I can see from the
web that this is true for uclibc via libubacktrace.)
-- Function: int backtrace (void **BUFFER, int SIZE)
The `backtrace' function obtains a backtrace for the current
thread, as a list of pointers, and places the information into
BUFFER. The argument SIZE should be the number of `void *'
elements that will fit into BUFFER. The return value is the
actual number of entries of BUFFER that are obtained, and is at
most SIZE.
The pointers placed in BUFFER are actually return addresses
obtained by inspecting the stack, one return address per stack
frame.
Note that certain compiler optimizations may interfere with
obtaining a valid backtrace. Function inlining causes the inlined
function to not have a stack frame; tail call optimization
replaces one stack frame with another; frame pointer elimination
will stop `backtrace' from interpreting the stack contents
correctly.
Thanks,
Ben.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev