Re: ups on FreeBSD 8.X

Bakul Shah <[email protected]> Mon, 27 Sep 2010 14:35:35 -0700
Newsgroups gmane.comp.debugging.ups.user
Message-ID <[email protected]>
On Fri, 24 Sep 2010 13:34:20 +1000 Callum Gibson <[email protected]>  wrote:
> On 24Sep10 13:24, Bakul Shah wrote:
> }> I actually think the way to go is to fix up the dwarf support.
> }
> }This seems like a promising direction....
> 
> Actually, I've discovered this is the issue. configure can't really handle
> the OS have libelf as well as ups. Although it's intending to build with
> the internal verson, it actually compiles libdwarf and/or ups with the
> system headers and uses the internal one for the other. In some important
> respects these are quite incompatible:
> 
> FreeBSD				internal version
> =======				================
> typedef enum {			typedef enum {
> 	ELF_C_NULL = 0,			ELF_C_NULL = 0,
>         ELF_C_CLR,			ELF_C_READ,
>         ELF_C_FDDONE,			ELF_C_WRITE,
>         ELF_C_FDREAD,			ELF_C_CLR,
>         ELF_C_RDWR,			ELF_C_SET,
>         ELF_C_READ,			ELF_C_FDDONE,
>         ELF_C_SET,			ELF_C_FDREAD,
>         ELF_C_WRITE,			ELF_C_RDWR,
>         ELF_C_NUM			ELF_C_NUM
> } Elf_Cmd;			} Elf_Cmd;
> 
> So I now need to decide whether to hack ups to use the system libdwarf/libelf
> entirely, hack ups and it's internal libdwarf to use the system libelf
> consistently, or hack it to use all the internal versions consistently.

The system libelf is likely to be more correct.

I brought up my machine over the weekend. No new changes
since your last patches. So yes, I am interested in your
uarea changes. Would be nice if all your freebsd changes can
be checked in. If that is not possible, perhaps we can set up
a mercurial repo somewhere.

The linux version compiles with the system provided libelf
(with --enable-dwarf) and allowed me to debug some 32bit
binaries (but gets confused about shared libs for others).
Threads seem to confuse it too.  We really need atleast a
basic test suite.

Must say though that it doesn't feel as great as I remember
it to be :-)