2012/9/11 Marion Guthmuller <[email protected]>: > Hi, > > I'm currently using your library for the comparison of stacks at different > execution times of my program and I'd like to retrieve local variables and > compare their values. I didn't find information about that on your website, > is it possible with libunwind ?
Hi, as far as I can tell, there is no easy way to get the locals. If you're desperate, you could try to see how the compiler optimized your code, and for example if a local variable is kept in a register, you could read the value with unw_get_reg(). This would of course be extremely fragile. AFAIK gdb has reasonably good scripting capabilities, so you could look into those. Also, if you only want to see the values of function arguments, then that might be easier to do. You could look into these tools if you're interested: http://maemo.gitorious.org/maemo-tools/functracer http://maemo.gitorious.org/maemo-tools/sp-rtrace Tommi _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
