03:51
lopex has quit [Quit: Connection closed for inactivity]
13:10
<
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
13:10
<
edipofederle[m] >
I guess headius is off/busy, someone could help me with this thing? Thanks!
14:02
<
enebo[m] >
edipo.federle: I don't tend to step debug in MRI ever but method names tend to be called id
14:03
<
enebo[m] >
If there is a struct field with id then you can print that
14:12
nirvdrum has joined #jruby
15:32
<
edipofederle[m] >
enebo: yes, my my question how to get the 'real' name, for example: "foo" .
15:36
<
enebo[m] >
edipo.federle: if you have ID you can rb_id2sym(x)
15:37
<
edipofederle[m] >
enebo: let me check
15:37
<
enebo[m] >
all method names are guaranteed to have a symbol table entry
15:40
<
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
15:42
<
edipofederle[m] >
I will give on more try, lets see
15:43
<
enebo[m] >
def.called_id?
15:43
<
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
15:45
<
edipofederle[m] >
<enebo[m] "def.called_id?"> sorry, dont follow you.
15:45
<
enebo[m] >
m->def->called_id
15:46
<
edipofederle[m] >
ah, let me try
15:46
<
enebo[m] >
err maybe not
15:47
<
enebo[m] >
I am looking at rb_method_entry_t
15:48
<
enebo[m] >
heh me == method_entry
15:48
<
edipofederle[m] >
yes, I see a called_ID there
15:48
<
enebo[m] >
me->called_id
15:49
<
enebo[m] >
rb_id2sym(me->called_id)
15:49
<
enebo[m] >
rb_inspect that :)
15:50
<
enebo[m] >
I am just throwing stuff out
15:50
<
enebo[m] >
rb_inspect no doubt just returns a VALUE of the string but you can probably see it somehow
15:52
<
enebo[m] >
yep so in both cases you are just getting VALUE back
15:52
<
enebo[m] >
ok let's try a different way
15:52
<
enebo[m] >
lookup puts
15:52
<
edipofederle[m] >
(in the Ruby source, we have a .gdbinit file, looks like some helpers functions.. but I dont know)
15:53
<
edipofederle[m] >
<enebo[m] "lookup puts"> in the LLDB you mean?
15:53
<
enebo[m] >
no I meant the C impl of puts
15:54
<
edipofederle[m] >
ah, ok :)
15:54
<
enebo[m] >
bleh...that may be more complicated than I thought though
15:54
<
enebo[m] >
you need a reference to an IO
15:54
<
enebo[m] >
rb_io_puts in io.c
15:54
<
edipofederle[m] >
checking
15:55
<
enebo[m] >
that is this a complicated idea I think
15:55
<
enebo[m] >
perhaps understanding whatever unions on VALUE exist you can reference the field which points at the char * of either the symbol name
15:56
<
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
15:58
<
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
15:58
<
edipofederle[m] >
great, I will explore a bit more, and if you get some feedback from this person, please, let me know :)
15:59
<
edipofederle[m] >
thanks for now :)
15:59
<
enebo[m] >
edipo.federle: yeah no problems
17:22
lopex has joined #jruby
22:10
nirvdrum has quit [Ping timeout: 252 seconds]
22:11
nirvdrum has joined #jruby
22:21
nirvdrum has quit [Ping timeout: 268 seconds]