Created
September 26, 2016 10:17
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jdb -attach 8000 -sourcepath src/vm/jvm/runtime/:nqp/src/vm/jvm/runtime/:src/:nqp/src/:.:nqp/ | |
Set uncaught java.lang.Throwable | |
Set deferred uncaught java.lang.Throwable | |
Initializing jdb ... | |
VM Started: > No frames on the current call stack | |
main[1] stop in org.perl6.nqp.runtime.NativeCallOps:61 | |
Deferring breakpoint org.perl6.nqp.runtime.NativeCallOps:61. | |
It will be set after the class is loaded. | |
main[1] run | |
> Set deferred breakpoint org.perl6.nqp.runtime.NativeCallOps:61 | |
Breakpoint hit: "thread=main", org.perl6.nqp.runtime.NativeCallOps.build(), line=61 bci=0 | |
61 NativeCallBody call = getNativeCallBody(tc, target); | |
main[1] list | |
57 return 1L; | |
58 } | |
59 | |
60 public static long build(SixModelObject target, String libname, String symbol, String convention, SixModelObject arguments, SixModelObject returns, ThreadContext tc) { | |
61 => NativeCallBody call = getNativeCallBody(tc, target); | |
62 | |
63 try { | |
64 /* Load the library and locate the symbol. */ | |
65 /* TODO: Error handling! */ | |
66 NativeLibrary library = libname == null || libname.equals("") | |
main[1] locals | |
Method arguments: | |
target = instance of __P6opaque__77(id=4656) | |
libname = "/home/psch/rakudo/rakudo/lib19-function-pointers.so" | |
symbol = "ReturnFunctionPointer" | |
convention = "" | |
arguments = instance of org.perl6.nqp.sixmodel.reprs.VMArrayInstance(id=4660) | |
returns = instance of org.perl6.nqp.sixmodel.reprs.VMHashInstance(id=4661) | |
tc = instance of org.perl6.nqp.runtime.ThreadContext(id=4662) | |
Local variables: | |
# up to here is the original build() call, for the function that returns the func ptr | |
# the following i can only assume is the function that's in the pointer | |
main[1] cont | |
> | |
Breakpoint hit: "thread=main", org.perl6.nqp.runtime.NativeCallOps.build(), line=61 bci=0 | |
61 NativeCallBody call = getNativeCallBody(tc, target); | |
main[1] list | |
57 return 1L; | |
58 } | |
59 | |
60 public static long build(SixModelObject target, String libname, String symbol, String convention, SixModelObject arguments, SixModelObject returns, ThreadContext tc) { | |
61 => NativeCallBody call = getNativeCallBody(tc, target); | |
62 | |
63 try { | |
64 /* Load the library and locate the symbol. */ | |
65 /* TODO: Error handling! */ | |
66 NativeLibrary library = libname == null || libname.equals("") | |
main[1] locals | |
Method arguments: | |
target = instance of __P6opaque__77(id=4724) | |
libname = "" # and these here | |
symbol = "" # look at least a little | |
convention = "" # concerning | |
arguments = instance of org.perl6.nqp.sixmodel.reprs.VMArrayInstance(id=4726) | |
returns = instance of org.perl6.nqp.sixmodel.reprs.VMHashInstance(id=4727) | |
tc = instance of org.perl6.nqp.runtime.ThreadContext(id=4662) | |
Local variables: | |
main[1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment