00:00
elia has quit [Quit: (IRC Client: textualapp.com)]
00:01
elia has joined #rubinius
00:02
elia has quit [Client Quit]
00:10
nirvdrum has quit [Ping timeout: 245 seconds]
00:27
Bwild has joined #rubinius
01:03
likestoplay has joined #rubinius
01:03
<
likestoplay >
anyone around?
01:04
<
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.
01:18
<
likestoplay >
anyone around?
01:27
<
brixen >
likestoplay: what's up?
01:30
aghost has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
01:35
aghost has joined #rubinius
01:51
<
likestoplay >
brixen: i trying to dump memory from a process im debugging
01:51
<
likestoplay >
but i only have the compiled file
01:51
<
likestoplay >
is there a way to send it a breakpoint manually?
01:52
<
brixen >
likestoplay: dump memory how?
01:52
<
likestoplay >
basically, its waiitng on me to input some data
01:52
<
likestoplay >
and then its going to compare it to something in memory
01:52
<
likestoplay >
i want to see what it wants to compare it to
01:52
<
brixen >
the debugger shouldn't care if you loaded from .rbc or from .rb files
01:52
<
brixen >
rbx -Xdebug <etc>
01:52
<
likestoplay >
well, so i dont have info about what the name of the class is or anything to set a breakpoint
01:53
<
brixen >
of course you do, that's all in the .rbc fil
01:54
<
brixen >
also, you can load the .rbc file into Ruby objects and inspect them
01:55
<
likestoplay >
wait, what?
01:55
<
likestoplay >
can you give me an example?
01:55
<
brixen >
I have to go in a sec
01:56
<
brixen >
put 'class A; def m; 1; end; end' in a .rb file and run rbx compile -o test.rbc test.rb
01:57
<
likestoplay >
right i got that...
01:57
<
likestoplay >
but how do i load it so i can inspect the rbc file?
01:57
<
brixen >
then load that file using the method I just linked
01:57
<
brixen >
this is just Ruby code
01:58
<
brixen >
Rubinius::ToolSets::Runtime::CompiledFile.load File.open(path_to_rbc_file)
01:58
<
brixen >
sorry, gotta go
02:45
<
brixen >
likestoplay: did you get it working?
02:45
<
likestoplay >
no, hang on, ill show you what error it threw
02:47
<
likestoplay >
rbx-2.5.2 :002 > cf = Rubinius::ToolSets::Runtime::CompiledFile.load(File.open('./trie_harder.rbc'))
02:47
<
likestoplay >
=> #<CodeTools::CompiledFile:0x47d0 @version=25 @signature=846485516860436671 @magic="!RBIX" @stream=#<File:0x47d4 path=./trie_harder.rbc> @data=nil>
02:47
<
likestoplay >
rbx-2.5.2 :003 > cf.body
02:47
<
likestoplay >
TypeError: Tried to use non-reference value 0x1 as type Tuple (77)
02:47
<
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'
02:47
<
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'
02:47
<
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'
02:47
<
likestoplay >
from (irb):3
02:47
<
likestoplay >
from kernel/common/block_environment.rb:53:in `call_on_instance'
02:47
<
likestoplay >
from kernel/common/eval.rb:176:in `eval'
02:47
<
likestoplay >
from kernel/common/kernel.rb:510:in `loop'
02:47
<
likestoplay >
from kernel/bootstrap/proc.rb:20:in `call'
02:48
<
brixen >
likestoplay: use a gist
02:48
<
likestoplay >
whichever you prefer
02:49
<
brixen >
likestoplay: drat, looks like the load code is out of sync with the dump code
02:50
<
brixen >
we don't use it to load compiled code, so it bitrots sometimes
02:50
<
brixen >
it's not hard to fix
02:50
<
brixen >
go look at the marshal code and fix the unmarshal code
02:50
<
brixen >
they should be exact mirrors
02:51
<
brixen >
alternatively, you can read the .rbc file directly :)
02:51
<
brixen >
it's a \n delimited format
02:52
angelirizarry has joined #rubinius
02:53
<
likestoplay >
tried reading it directly, that was hard :P
02:53
<
likestoplay >
wheres the marshal / unmarshal code?
02:54
angelirizarry_ has joined #rubinius
02:54
angelirizarry__ has joined #rubinius
02:54
angelirizarry___ has joined #rubinius
03:05
havenwood has joined #rubinius
03:10
<
likestoplay >
brixen: would it help if i sent over the code?
03:10
<
brixen >
likestoplay: the (un)marshal code is in the file I linked you
03:11
<
brixen >
CompiledFile
03:11
<
brixen >
why don't you just run the Ruby code?
03:11
<
brixen >
with the debugger
03:11
<
likestoplay >
so i can
03:12
<
likestoplay >
but what this is doing is taking input from me
03:12
<
likestoplay >
and then unmarshalling a data structure out of a .dump file
03:12
<
likestoplay >
and traversing it (its a trie)
03:12
<
likestoplay >
and comparing my input somehow
03:12
<
likestoplay >
i want to know how
03:12
<
likestoplay >
so a decompile or similar would be awesome haha
03:13
<
brixen >
hm, well, like I said, you could fix unmarshal
03:14
<
likestoplay >
how do you know its out of sync?
03:14
<
likestoplay >
and/or what do i compare it to?
03:15
<
likestoplay >
where is its equivalent Marshal?
03:26
yipdw has quit [Remote host closed the connection]
03:27
<
brixen >
likestoplay: it's all in the file I linked you
04:01
yipdw has joined #rubinius
04:01
yipdw has joined #rubinius
04:14
aghost has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
04:31
aghost has joined #rubinius
04:35
havenwood has quit [Ping timeout: 256 seconds]
04:36
aghost has left #rubinius [#rubinius]
04:39
pwh has joined #rubinius
05:30
meh` has quit [Ping timeout: 265 seconds]
05:44
Caius has quit [Ping timeout: 276 seconds]
05:49
Caius has joined #rubinius
06:04
angelirizarry has quit [Quit: Leaving...]
06:04
angelirizarry___ is now known as angelirizarry
06:38
angelirizarry__ has quit [Quit: Connection closed for inactivity]
06:38
angelirizarry_ has quit [Quit: Connection closed for inactivity]
06:38
angelirizarry has quit [Quit: Connection closed for inactivity]
07:50
amclain has quit [Quit: Leaving]
08:48
max96at|off is now known as max96at
09:41
benlovell has joined #rubinius
09:55
benlovell has quit [Ping timeout: 264 seconds]
11:42
Bwild has quit [Quit: leaving]
12:45
benlovell has joined #rubinius
14:54
havenwood has joined #rubinius
15:11
pwh has joined #rubinius
15:15
benlovell has quit [Ping timeout: 245 seconds]
15:22
benlovell has joined #rubinius
15:47
cremes has quit [Quit: cremes]
15:59
aghost has joined #rubinius
16:05
benlovell has quit [Ping timeout: 244 seconds]
16:08
benlovell has joined #rubinius
16:09
|jemc| has joined #rubinius
16:56
cremes has joined #rubinius
17:08
`fox` has left #rubinius [#rubinius]
17:14
benlovell has quit [Ping timeout: 240 seconds]
17:19
havenwood has quit [Ping timeout: 264 seconds]
17:19
havenn has joined #rubinius
17:32
benlovell has joined #rubinius
17:48
meh` has joined #rubinius
18:00
amclain has joined #rubinius
18:10
kfpratt has joined #rubinius
18:54
kfpratt has quit [Remote host closed the connection]
19:02
kfpratt has joined #rubinius
19:28
kfpratt has quit [Remote host closed the connection]
19:32
benlovell has quit [Ping timeout: 250 seconds]
20:13
pwh has joined #rubinius
21:02
max96at is now known as max96at|off
21:09
djinni has quit [Ping timeout: 245 seconds]
21:13
nirvdrum has joined #rubinius
21:17
djinni has joined #rubinius
21:24
pwh has quit [Ping timeout: 245 seconds]
21:34
febuiles has joined #rubinius
21:34
febuiles has joined #rubinius
21:37
pwh has joined #rubinius
21:37
pwh has quit [Client Quit]
21:57
Bwild has joined #rubinius
22:31
havenwood has joined #rubinius
22:35
havenn has quit [Ping timeout: 246 seconds]
22:40
febuiles has quit [Read error: Connection reset by peer]
22:40
febuiles has joined #rubinius
22:40
febuiles has quit [Changing host]
22:40
febuiles has joined #rubinius
23:57
havenwood has quit [Remote host closed the connection]
23:58
meh` has quit [Ping timeout: 252 seconds]