[M3devel] state of m3gdb on LINUXLIBC6?

Olaf Wagner wagner at elegosoft.com
Sat Mar 1 15:43:32 CET 2008


Quoting "Rodney M. Bates" <rodney.bates at wichita.edu>:
> Olaf Wagner wrote:
>> Quoting "Rodney M. Bates" <rodney.bates at wichita.edu>:
>>
>>> As for other platforms, I don't have any around, and I'm not aware  
>>>  of anybody
>>> trying it.
>>
>> It compiles without problems on FreeBSD 6.3 and works as long as
>> programs are linked with libthr.so (not with libpthread.so).
>
> Any more information on what the difference in these libraries is?

AFAIK, there are three different pthreads implementations on FreeBSD:
libc_r, libpthread, libthr. libc_r is completely user-level, while
pthread and thr use system level threads (with support and callbacks
from the system scheduler). In FreeBSD 6.3, pthread seems to be the
default, while in 7.0 (which has been released just a few days ago)
they have switched to thr as default. thr is a 1:1 mapping from user
to system level threads AFAIK.

I switched the CM3 thread default for FreeBSD from POSIX to Antony's
PTHREADS some months ago; I think we should go with the libthr as
default now (since this is what the FreeBSD folks do themselves).
(BTW. they promise dramatic performance increases in FreeBSD 7.0
wrt. concurrency.)

In FreeBSD, dynamic library mapping for threads can be switched
easily via /etc/libmap.conf.

>> I haven't used it much yet, and some things seemed to be strange;
>> thread stack switching or viewing didn't work at all.
>
> m3gdb needs work on threads.  I have never done anything on it.
> Unless Tony did some when he was working on it several years ago,
> I think it is pretty much as it came from SRC, and that was fairly
> primitive.  Plus, the new pthreads implementation is not supported.
> Once I glanced at the code and it looked immediately like what was
> there would not work at all.  This has been on my list a while.

If, as the others say, stock gdb has good support for pthreads,
then it is probably a FreeBSD specific problem. The BSD folks
often do customizations of the GNU tools on their own, that the
FSF does not accept / maintain. One would probably need to base
a m3gdb for FreeBSD on the FreeBSD gdb sources :-/

>> If you want to try anything on FreeBSD, let me know, I can provide
>> a remote login.
>
> Yes, that would be helpful.

I'm currently not at home, but I'll setup a login on my FreeBSD
system for you at the start of next week. I assume your ssh
key is already on birch.elegosoft.com (if not, just send it to me).

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list