I'm trying to use the StackwalkerAPI in Dyninst 9.1.0, but I'm having
some trouble getting started. I'm trying the example code from the
manual, but it crashes when I call walkStack() on my Walker object. Does
anyone know, is there some initialization I need to perform before using
the example code from the manual? Specifically, I'm on Windows x86,
using this example code to (try to) walk its own process' stack:
 
std::vector<Frame> stackwalk;
string s;
 
Walker *walker=Walker::newWalker();
walker->walkStack(stackwalk);
 
for (unsigned i = 0; i < stackwalk.size (); i++) {
stackwalk[i].getName(s);
cout << "Found function" << s << endl;
}
 
As I mentioned, it crashes in the walkStack(). For anyone familiar with
the internals of Dyninst, I ask if I need to do some initialization
because the crash is in x86-swk.C, in LookupFuncStart::allocatesFrame(),
at the line:
 
result = proc->getLibraryTracker()->getLibraryAtAddr(addr, lib);
 
It crashes because the result of proc->getLibraryTracker() is NULL.
(Which means proc->library_tracker is NULL.) Am I not doing something
that is supposed to fill this in?
 
I actually used to be a developer on Dyninst and knew these kinds of
things, but I see it's changed a lot since I last worked on it! Thanks
for any information anyone can give me.
 
- Bryan Buck
 
_______________________________________________
Dyninst-api mailing list
[email protected]
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api

Reply via email to