elia has quit [Quit: (IRC Client: textualapp.com)]
elia has joined #rubinius
elia has quit [Client Quit]
nirvdrum has quit [Ping timeout: 245 seconds]
Bwild has joined #rubinius
likestoplay has joined #rubinius
<likestoplay> anyone around?
<likestoplay> have a few questions about a compiled rbc file i have that for some reason isn't being loaded, but seems to be valid.
<likestoplay> anyone around?
<brixen> likestoplay: what's up?
aghost has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aghost has joined #rubinius
<likestoplay> brixen: i trying to dump memory from a process im debugging
<likestoplay> but i only have the compiled file
<likestoplay> is there a way to send it a breakpoint manually?
<brixen> likestoplay: dump memory how?
<likestoplay> basically, its waiitng on me to input some data
<likestoplay> and then its going to compare it to something in memory
<likestoplay> i want to see what it wants to compare it to
<brixen> the debugger shouldn't care if you loaded from .rbc or from .rb files
<brixen> rbx -Xdebug <etc>
<likestoplay> well, so i dont have info about what the name of the class is or anything to set a breakpoint
<brixen> of course you do, that's all in the .rbc fil
<brixen> *file
<brixen> also, you can load the .rbc file into Ruby objects and inspect them
<likestoplay> wait, what?
<likestoplay> can you give me an example?
<brixen> possibly
<brixen> I have to go in a sec
<brixen> put 'class A; def m; 1; end; end' in a .rb file and run rbx compile -o test.rbc test.rb
<likestoplay> right i got that...
<likestoplay> but how do i load it so i can inspect the rbc file?
<brixen> then load that file using the method I just linked
<brixen> this is just Ruby code
<brixen> Rubinius::ToolSets::Runtime::CompiledFile.load File.open(path_to_rbc_file)
<brixen> sorry, gotta go
<brixen> likestoplay: did you get it working?
<likestoplay> no, hang on, ill show you what error it threw
<likestoplay> rbx-2.5.2 :002 > cf = Rubinius::ToolSets::Runtime::CompiledFile.load(File.open('./trie_harder.rbc'))
<likestoplay> => #<CodeTools::CompiledFile:0x47d0 @version=25 @signature=846485516860436671 @magic="!RBIX" @stream=#<File:0x47d4 path=./trie_harder.rbc> @data=nil>
<likestoplay> rbx-2.5.2 :003 > cf.body
<likestoplay> TypeError: Tried to use non-reference value 0x1 as type Tuple (77)
<likestoplay> from /Users/angelirizarry/.rvm/rubies/rbx-2.5.2/runtime/gems/rubinius-compiler-2.3.1/lib/rubinius/compiler/compiled_file.rbc:191:in `unmarshal_data'
<likestoplay> from /Users/angelirizarry/.rvm/rubies/rbx-2.5.2/runtime/gems/rubinius-compiler-2.3.1/lib/rubinius/compiler/compiled_file.rbc:92:in `unmarshal'
<likestoplay> from /Users/angelirizarry/.rvm/rubies/rbx-2.5.2/runtime/gems/rubinius-compiler-2.3.1/lib/rubinius/compiler/compiled_file.rbc:69:in `body'
<likestoplay> from (irb):3
<likestoplay> from kernel/common/block_environment.rb:53:in `call_on_instance'
<likestoplay> from kernel/common/eval.rb:176:in `eval'
<likestoplay> from kernel/common/kernel.rb:510:in `loop'
<likestoplay> from kernel/bootstrap/proc.rb:20:in `call'
<brixen> likestoplay: use a gist
<brixen> likestoplay: or hop on Gitter https://gitter.im/rubinius/rubinius
<likestoplay> whichever you prefer
<brixen> likestoplay: drat, looks like the load code is out of sync with the dump code
<brixen> we don't use it to load compiled code, so it bitrots sometimes
<likestoplay> hm?
<likestoplay> ah
<brixen> it's not hard to fix
<brixen> go look at the marshal code and fix the unmarshal code
<brixen> they should be exact mirrors
<brixen> alternatively, you can read the .rbc file directly :)
<brixen> it's a \n delimited format
<brixen> with tags
angelirizarry has joined #rubinius
<likestoplay> tried reading it directly, that was hard :P
<likestoplay> wheres the marshal / unmarshal code?
angelirizarry_ has joined #rubinius
angelirizarry__ has joined #rubinius
angelirizarry___ has joined #rubinius
havenwood has joined #rubinius
<likestoplay> brixen: would it help if i sent over the code?
<brixen> likestoplay: the (un)marshal code is in the file I linked you
<brixen> CompiledFile
<brixen> why don't you just run the Ruby code?
<brixen> with the debugger
<likestoplay> so i can
<likestoplay> but what this is doing is taking input from me
<likestoplay> and then unmarshalling a data structure out of a .dump file
<likestoplay> and traversing it (its a trie)
<likestoplay> and comparing my input somehow
<likestoplay> i want to know how
<likestoplay> so a decompile or similar would be awesome haha
<brixen> hm, well, like I said, you could fix unmarshal
<likestoplay> how do you know its out of sync?
<likestoplay> and/or what do i compare it to?
<likestoplay> where is its equivalent Marshal?
yipdw has quit [Remote host closed the connection]
<brixen> likestoplay: it's all in the file I linked you
yipdw has joined #rubinius
yipdw has joined #rubinius
aghost has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aghost has joined #rubinius
havenwood has quit [Ping timeout: 256 seconds]
aghost has left #rubinius [#rubinius]
pwh has quit []
pwh has joined #rubinius
meh` has quit [Ping timeout: 265 seconds]
Caius has quit [Ping timeout: 276 seconds]
Caius has joined #rubinius
angelirizarry has quit [Quit: Leaving...]
angelirizarry___ is now known as angelirizarry
pwh has quit []
angelirizarry__ has quit [Quit: Connection closed for inactivity]
angelirizarry_ has quit [Quit: Connection closed for inactivity]
angelirizarry has quit [Quit: Connection closed for inactivity]
amclain has quit [Quit: Leaving]
max96at|off is now known as max96at
benlovell has joined #rubinius
benlovell has quit [Ping timeout: 264 seconds]
Bwild has quit [Quit: leaving]
benlovell has joined #rubinius
havenwood has joined #rubinius
pwh has joined #rubinius
benlovell has quit [Ping timeout: 245 seconds]
benlovell has joined #rubinius
cremes has quit [Quit: cremes]
aghost has joined #rubinius
benlovell has quit [Ping timeout: 244 seconds]
benlovell has joined #rubinius
|jemc| has joined #rubinius
cremes has joined #rubinius
`fox` has left #rubinius [#rubinius]
benlovell has quit [Ping timeout: 240 seconds]
aghost has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has quit [Ping timeout: 264 seconds]
havenn has joined #rubinius
benlovell has joined #rubinius
meh` has joined #rubinius
amclain has joined #rubinius
kfpratt has joined #rubinius
kfpratt has quit [Remote host closed the connection]
kfpratt has joined #rubinius
kfpratt has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 250 seconds]
pwh has quit []
pwh has joined #rubinius
max96at is now known as max96at|off
djinni has quit [Ping timeout: 245 seconds]
nirvdrum has joined #rubinius
djinni has joined #rubinius
pwh has quit [Ping timeout: 245 seconds]
febuiles has joined #rubinius
febuiles has joined #rubinius
pwh has joined #rubinius
pwh has quit [Client Quit]
Bwild has joined #rubinius
havenwood has joined #rubinius
havenn has quit [Ping timeout: 246 seconds]
febuiles has quit [Read error: Connection reset by peer]
febuiles has joined #rubinius
febuiles has quit [Changing host]
febuiles has joined #rubinius
havenwood has quit [Remote host closed the connection]
meh` has quit [Ping timeout: 252 seconds]