This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: remote dwarf info using libunwind


Alexandre Oliva wrote:
On Sep 4, 2006, Wu Zhou <woodzltc@cn.ibm.com> wrote:

I am not sure too why we didn't use libunwind-ptrace.a directly
before.  One reason might be that it is not really a part of libunwind
API.  But my point is, as long as it is general enough, why can't we
make it part of libunwind API?

What do you mean, not part of the libunwind API? It's certainly not part of the run-time-for-local-process-unwinding API, but it definitely is part of the documented API of libunwind.

Below is a segment of comment from libunwind-ptrace.h:


/* Helper routines which make it easy to use libunwind via ptrace().
   They're available only if UNW_REMOTE_ONLY is _not_ defined and they
   aren't really part of the libunwind API.  They are implemented in a
   archive library called libunwind-ptrace.a.  */

It seems that libunwind developers are not sure how they expect these routines to be used.

+lib::unwind::StackTraceCreator::unwind_destroy (unwargs *args)

This should be unwind_finish, I guess.

Yes, sorry. I failed to refresh the patch file after renaming the method. I'm not sure whether I missed any other change, so here's the patch generated out of what I actually tested.

Good. I had a test with your patch. TestStackBackTrace works ok with this patch. Here are the output:


./TestRunner frysk.rt.tests.TestStackBacktrace
Running testBacktrace(frysk.rt.tests.TestStackBacktrace) ...Frame 1
        File: ../../frysk-clean/frysk-core/frysk/pkglibexecdir/funit-rt-looper.c
        Func: baz
        Line: 69
        Col: 0
        Addr: 134514264
Frame 2
        File: ../../frysk-clean/frysk-core/frysk/pkglibexecdir/funit-rt-looper.c
        Func: bar
        Line: 72
        Col: 0
        Addr: 134514286
Frame 3
        File: ../../frysk-clean/frysk-core/frysk/pkglibexecdir/funit-rt-looper.c
        Func: foo
        Line: 53
        Col: 0
        Addr: 134514315
Frame 4
        File: null
        Func: main
        Line: 0
        Col: 0
        Addr: 134514973
Frame 5
        File: null
        Func:
        Line: 0
        Col: 0
        Addr: 12773156
Frame 6
        File: null
        Func:
        Line: 0
        Col: 0
        Addr: 134514081
PASS

Time: 0.274

OK (1 test)

Regards
- Wu Zhou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]