Well, lately I have been having a go at a simple client/server app on a Solaris 10 machine. So far, it hasn't been fun. Now I have been reading how picky Solaris can be with memory alignment, and I even wrote a few test programs to see how they can fail (purposly mis-aligning a struct ).
However, for the server I am writing, when ever I try to compile it using -g to include debugging symbols gdb crashes with a bus error. Now I know it says gdb was configured on Solaris 2.8 (below), but it seemed to be working with other simple apps I was debugging.
So here is what I am seeing:
Now, before I go posting tons of code, I am wondering if there is a more general solution. I am using all the normal network functions and structs just as I did a year ago when I did beejs nework programming guide. I am going to copy his program directly and see if I can debug that.Code:jaws% gcc -Wall -g -lnsl -lsocket -lresolv DataPassServer.c -o dps jaws% gdb dps GNU gdb 6.0 Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.8"...Bus Error
I know lots of people run into memory alignment issues on Solaris, but I guess my question is, why does gdb die with a bus error when it trys to load my program with the included debug symbols? I haven't progressed far with the program for this reason.
At this point, I can run the program (with both debugging symbols included and excluded) and it seems to run fine. However it only binds and then listens on a port, so its quite simplistic. If anyone has anything that can get me on the right path it would be greatly appreciated.
Forgot to mention, this is a SunBlade 150 with a 650mhz Sparc



LinkBack URL
About LinkBacks



