Alright! Thanks for all the help. I was able to track down the problem and have some changes for marshal.c that I need to get back to the repository. There were some assumptions about the sizes of types that were broken by going to 64-bit .
I don't know the procedures on this project. Do I need to include tests for the fix? I am familiar with testunit but I haven't used rspec yet. Where and how would I include tests if I write them? What documentation is normal for the trouble ticket? How do I get the changes into the repository? Anything else I need to know? Thanks, Jeff H. On Aug 11, 2010, at 6:49 PM, Laurent Sansonetti wrote: > Also, when debugging MacRuby it is better to use the version of libmacruby in > the build directory, because the installer strips symbols during > installation. From the build directory: > > DYLD_LIBRARY_PATH=. gdb --args ./macruby ... > > Also, the whole project is compiled with heavy optimizations which makes the > debugging of certain things harder (inline functions, optimized variables, > etc.). Sometimes it is better to debug a version of MacRuby with no > optimization. You can build one using: > > rake optz_level=0 macruby > > HTH, > Laurent > > On Aug 11, 2010, at 3:28 PM, Thibault Martin-Lagardette wrote: > >> Hi, >> >> Good to know you're motivated to get into hacking MacRuby :D >> >> `rb_marshal_load` is an "API", supposed to be used by extensions for example. >> If you look in `marshal.c`, you'll see that the "load" method is defined by >> `marshal_load` (without the rb_ prefix): >> rb_objc_define_method(*(VALUE *)rb_mMarshal, "load", marshal_load, >> -1); >> >> This means that when a ruby code calls Marshal.load, it will call this >> method. >> To sum things up, I think you just need to set a breakpoint to marshal_load, >> not rb_marshal_load :D >> >> Let us know how things work out! >> -- >> Thibault Martin-Lagardette >> >> >> >> On Aug 11, 2010, at 13:33, Jeff Hemmelgarn wrote: >> >>> Hello, >>> >>> First I want to thank everyone involved in the project for their efforts in >>> bringing MacRuby to us. I love being able to use GCD with ruby! I have >>> been on vacation for a week and finally feel like touching a computer again >>> so I thought I would look into doing some MacRuby development. >>> >>> Since I have no experience with llvm and almost none with ObjectiveC, I >>> decided to pick a low-priority, narrow focus bug to look into. That should >>> allow me to get used to the environment without going too far into the >>> weeds. I pretty much randomly chose #502 Marshalling large integers returns >>> wrong value. >>> >>> I have downloaded and built both llvm and the latest code from the git >>> mirror. >>> >>> I have been trying to reproduce the problem with macirb under gdb. I have >>> some experience with gdb but I am getting confused trying to set a >>> breakpoint in the Marshal package load function. It looks like MacRuby is >>> bypassing the globally visible function rb_marshal_load and using >>> rb_objc_define_method to export a pointer to the file local function >>> marshal_load. >>> >>> The basics of the question is, how do I set a breakpoint in gdb for this >>> function? Is this problem a result of using llvm? Will I end up needing >>> to set a generic breakpoint in a dispatch routine with a condition looking >>> for the selector for the load function? >>> >>> Thank you in advance for any help! >>> >>> Jeff Hemmelgarn >>> _______________________________________________ >>> MacRuby-devel mailing list >>> MacRuby-devel@lists.macosforge.org >>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >> >> _______________________________________________ >> MacRuby-devel mailing list >> MacRuby-devel@lists.macosforge.org >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > _______________________________________________ > MacRuby-devel mailing list > MacRuby-devel@lists.macosforge.org > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel