lopex has quit [Quit: Connection closed for inactivity]
<edipofederle[m]> > headius: Im debugging the `rb_export_method` C function, could you give me some tips on how to print the method name?, I would like to inspect it to see which method is currently begin handled
<edipofederle[m]> I guess headius is off/busy, someone could help me with this thing? Thanks!
<enebo[m]> edipo.federle: I don't tend to step debug in MRI ever but method names tend to be called id
<enebo[m]> If there is a struct field with id then you can print that
nirvdrum has joined #jruby
<edipofederle[m]> enebo: yes, my my question how to get the 'real' name, for example: "foo" .
<enebo[m]> edipo.federle: if you have ID you can rb_id2sym(x)
<edipofederle[m]> enebo: let me check
<enebo[m]> all method names are guaranteed to have a symbol table entry
<edipofederle[m]> <enebo[m] "all method names are guaranteed "> I see, I think this refer to the `rb_method_entry_t` in MRI side.. i guess
<edipofederle[m]> I will give on more try, lets see
<enebo[m]> def.called_id?
<enebo[m]> edipo.federle: one problem with MRI source is they hide so much behind macros I don't know what the actual struct fields are
<edipofederle[m]> <enebo[m] "def.called_id?"> sorry, dont follow you.
<enebo[m]> m->def->called_id
<edipofederle[m]> ah, let me try
<enebo[m]> err maybe not
<enebo[m]> I am looking at rb_method_entry_t
<enebo[m]> heh me == method_entry
<edipofederle[m]> yes, I see a called_ID there
<enebo[m]> me->called_id
<enebo[m]> rb_id2sym(me->called_id)
<enebo[m]> rb_inspect that :)
<enebo[m]> I am just throwing stuff out
<enebo[m]> rb_inspect no doubt just returns a VALUE of the string but you can probably see it somehow
<enebo[m]> yep so in both cases you are just getting VALUE back
<enebo[m]> ok let's try a different way
<enebo[m]> lookup puts
<edipofederle[m]> (in the Ruby source, we have a .gdbinit file, looks like some helpers functions.. but I dont know)
<edipofederle[m]> <enebo[m] "lookup puts"> in the LLDB you mean?
<enebo[m]> no I meant the C impl of puts
<edipofederle[m]> ah, ok :)
<enebo[m]> bleh...that may be more complicated than I thought though
<enebo[m]> you need a reference to an IO
<enebo[m]> rb_io_puts in io.c
<edipofederle[m]> checking
<enebo[m]> that is this a complicated idea I think
<enebo[m]> perhaps understanding whatever unions on VALUE exist you can reference the field which points at the char * of either the symbol name
<enebo[m]> but fwiw there are a lot of methods in Ruby and since I don't do LLDB/GDB stuff there may be a bunch of helper methods
<enebo[m]> I just asked someone I know who will know the answer to this but I am not sure if he will respond any time soon
<edipofederle[m]> great, I will explore a bit more, and if you get some feedback from this person, please, let me know :)
<edipofederle[m]> thanks for now :)
<enebo[m]> edipo.federle: yeah no problems
lopex has joined #jruby
nirvdrum has quit [Ping timeout: 252 seconds]
nirvdrum has joined #jruby
nirvdrum has quit [Ping timeout: 268 seconds]