This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi, I got a test machine, a SparcEngine AXi (sun4u2) with Solaris 2.7 Beta rev. 50. I sucessfully (probably) compiled gcc v. 2.8.1 on it, with some arm twisting. Although I have not run test-suite on it yet, it seems to work fine, so far. However, when I tried to compile gdb v.4.17 on it, a few of the header files clashes due to the resturcturing of Solaris 2.7's /usr/include/sys/*.h. I solved those problems but pthreads presents a major problem. Since this OS is a Beta, you may not be interested in what the problems are. They may just go away in the official release of Solaris 2.7. But I don't think your implementation which conforms to Answerbook2 is quite portable and 2.7 is correcting that problem, with a growing pain. So, I think you may have to deal with this problem when the official release does come out. Here is why: In sol-thread.c, you have provided implementation for functions like ps_pdread(), ps_pdwrite() and pals. I suppose you intended to override the default implementation of solaris pthread libarary. Or maybe it was not provided and you are implementing it??? I don't know, I have another machine w/ Solaris 2.4 instead of Solaris 2.6. Since you included <proc_service.h>, I guess you are overriding it. But, the signature clash is non-trivial to correct. In these functions, one of the arguments "int size" (in your implementaiton) is declared as "size_t size" in Solaris 2.7 Beta. These functions, in turns, calls rw_common() and passes the "int size" along, which in turns calls a function table, target_ops. Unfortunately, rw_common() and target_ops both uses "int size" which is smaller than 64bit Solaris's size_t (typedef ulong_t size_t). Solaris 2.7Beta does allow installation of 32-bit addressing scheme instead of 64-bit addressing, but that's a pain. The target_ops function table, I suppose, is used by other platforms as well, which makes it almost impossible for me to do any trivial modification and expect that it will run just fine. I did managed to compile it by modifing these ps_pdread() & pals functions to conform to Solaris 2.7 Beta's signature, compiled gdb-4.17 through without compile-error, and, of course, expect it to fail on pthreads. It did! All tests on pthreds failed. However, since this is a "Beta" version of true 64-bit Solaris, the thing should do these weird stuff, but at least it doesn't do any MS beta quality, like Win98 Beta which wiped several of my friends' harddrives. In the man page, it states exactly as proc_service.h says "size_t size", but in AnswerBook2, it states "int size." In the spirit of POSIX, shouldn't that be size_t, avoiding any hard-wired data type like int? Anyway, these might not be the only problems the pthreads failed. Jonah Tsai