[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] FreeBSD port
From: |
Konstantin Belousov |
Subject: |
Re: [Libunwind-devel] FreeBSD port |
Date: |
Sat, 3 Apr 2010 23:54:14 +0300 |
User-agent: |
Mutt/1.4.2.3i |
On Sat, Apr 03, 2010 at 01:08:54PM -0700, Arun Sharma wrote:
> On Wed, Mar 31, 2010 at 11:06:53PM +0300, Konstantin Belousov wrote:
> > >
> > > I haven't looked at the rest of the changes in more detail - but nothing
> > > jumped out at me. It might be easier to maintain the library if we break
> > > the
> > > files with largish #ifdef linux/freebsd into separate files.
> > Sure. Would you structure the main trunk as you find appropriate, and
> > them I add freebsd bits in the place ? Or do you want me to do
> > the separation ?
>
> Sure - I'll give it a shot.
>
> >
> > >
> > > I'll do another pass over it hopefully in the next couple of days.
> > Looking forward for the review, thanks.
>
> * configure.in
>
> AC_CHECK_DECLS: Is there is a simpler solution to the problem?
We can assume that presence of one of PTRACE_* or PT_* symbol
implies presence of all others, as example. I did this that way
to possibly aid in portability to other BSD variants/Mac OS X,
that could define only part of the PT_* symbols.
Or, we can define autoconf macro to simplify configure.in.
>
> * os-freebsd.c
>
> Could you please indent it similar to the rest of the library?
Hopefully, done right.
>
> * _UPT_find_proc_info.c
>
> Are these portability changes or required for correctness?
The changes are very preliminary unfinished attempt to handle
the issue of FreeBSD linker creating .eh_frame_hdr in the format
not expected by libunwind. The
if (hdr->table_enc != (DW_EH_PE_datarel | DW_EH_PE_sdata4))
path is taken, and I tried to make #if 0 section at least compile.
This is not finished.
I noted the issue in the my first announcement email.
>
> * make check
>
> - two tests didn't compile for me on FreeBSD 8
> - rs-race.c - missing prototype for backtrace(). Install execinfo port
> made it go away. Perhaps this needs an autoconf check?
The backtrace() is required by many tests,
pooma% grep -l backtrace tests/*.c | wc -l ~/build/bsd/libunwind/libunwind
9
I think the best would be to require libexecinfo on freebsd for test
run. It will be noted in documentation, but no check is needed.
What is your opinion ?
> - Gtest-dyn1.c: FreeBSD doesn't like malloc.h
Fixed by checking for malloc.h. On the other hand, is malloc.h needed
there at all ?
>
> - Gtest-exc.c fails with
>
> Program received signal SIGILL, Illegal instruction.
> _Ux86_64_setcontext () at x86_64/setcontext.S:70
> 70 sysenter
> Current language: auto; currently asm
>
> (gdb) bt
> #0 _Ux86_64_setcontext () at x86_64/setcontext.S:70
> #1 0x00007fffffffe4b0 in ?? ()
> #2 0x000000080076b182 in _ULx86_64_local_resume (as=Variable "as" is not
> available.
> ) at Gresume.c:84
> #3 0x000000080076b139 in _ULx86_64_resume (cursor=0x7fffffffe0b0) at
> Gresume.c:140
> #4 0x0000000000400a90 in raise_exception () at Gtest-exc.c:72
> #5 0x0000000000400ae9 in b (n=3) at Gtest-exc.c:128
>
> The libc on my system seems to be using "syscall" rather than the "sysenter"
> instruction.
This should be already fixed.
I also changed the longjmp() implementation to handle the jmpbuf
content on FreeBSD, making longjmp working on amd64 (but not siglongjmp).
>
> More after I've refactored the code a bit in preparation for pulling the
> code.
make check still does not succeed, but it is too early anyway.
Please update to freebsd 22b1726 to get the changes.
Thanks for you attention to the port.
pgpoVJKOpKZwg.pgp
Description: PGP signature
- Re: [Libunwind-devel] FreeBSD port, Arun Sharma, 2010/04/03
- Re: [Libunwind-devel] FreeBSD port,
Konstantin Belousov <=
- Re: [Libunwind-devel] FreeBSD port, Arun Sharma, 2010/04/03
- Re: [Libunwind-devel] FreeBSD port, Konstantin Belousov, 2010/04/04
- Re: [Libunwind-devel] FreeBSD port, Arun Sharma, 2010/04/04
- Re: [Libunwind-devel] FreeBSD port, Konstantin Belousov, 2010/04/05
- Re: [Libunwind-devel] FreeBSD port, Arun Sharma, 2010/04/05
- Re: [Libunwind-devel] FreeBSD port, Arun Sharma, 2010/04/05
- Re: [Libunwind-devel] FreeBSD port, Konstantin Belousov, 2010/04/05
- Re: [Libunwind-devel] FreeBSD port, Arun Sharma, 2010/04/07
- Re: [Libunwind-devel] FreeBSD port, Konstantin Belousov, 2010/04/11
- Re: [Libunwind-devel] FreeBSD port, Arun Sharma, 2010/04/11