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
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to