Gallium.jl icon indicating copy to clipboard operation
Gallium.jl copied to clipboard

breakpoint in cfunction?

Open lobingera opened this issue 8 years ago • 0 comments

handling of cfunctions is not mentioned in the manual, so maybe i was overoptimistic, but still... (one working cfunction example in Cairo)

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+4923 (2016-06-23 21:09 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 26fec34* (2 days old master)
|__/                   |  x86_64-linux-gnu

julia> using Gallium

julia> using Cairo

julia> using Colors

julia> surf = CairoImageSurface(fill(RGB24(0), 10, 10));

julia> io = IOBuffer();

julia> Gallium.breakpoint(Cairo.write_to_stream_callback)
Locations (+: active, -: inactive, *: source):
 * Any matching method added to Cairo.#write_to_stream_callback
 * Any matching specialization of write_to_stream_callback(s, buf, len) at /home/lobi/.julia/v0.5/Cairo/src/Cairo.jl:90


julia> write_to_png(surf,io)
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
ERROR: InexactError()
 in fetch_cfi_val_value(::Gallium.LocalSession, ::Gallium.X86_64.BasicRegs, ::DWARF.CallFrameInfo.RegState, ::Gallium.RemotePtr{Void}) at /home/lobi/.julia/v0.5/Gallium/src/unwind.jl:212
 in fetch_cfi_value(::Gallium.LocalSession, ::Gallium.X86_64.BasicRegs, ::DWARF.CallFrameInfo.RegStates, ::UInt8, ::Gallium.RemotePtr{Void}) at /home/lobi/.julia/v0.5/Gallium/src/unwind.jl:231
 in #unwind_step#11(::Bool, ::Bool, ::Function, ::Gallium.LocalSession, ::Gallium.LazyJITModules, ::Gallium.X86_64.BasicRegs, ::Void) at /home/lobi/.julia/v0.5/Gallium/src/unwind.jl:264
 in (::Gallium.Unwinder.#kw##unwind_step)(::Array{Any,1}, ::Gallium.Unwinder.#unwind_step, ::Gallium.LocalSession, ::Gallium.LazyJITModules, ::Gallium.X86_64.BasicRegs, ::Void) at ./null:0
 in #rec_backtrace#47(::Bool, ::Function, ::Gallium.##55#57{Bool,Bool,Gallium.LocalSession,Gallium.LazyJITModules,Array{Any,1},Array{Any,1}}, ::Gallium.X86_64.BasicRegs, ::Gallium.LocalSession, ::Gallium.LazyJITModules, ::Bool, ::Void) at /home/lobi/.julia/v0.5/Gallium/src/Gallium.jl:270
 in (::Gallium.#kw##rec_backtrace)(::Array{Any,1}, ::Gallium.#rec_backtrace, ::Function, ::Gallium.X86_64.BasicRegs, ::Gallium.LocalSession, ::Gallium.LazyJITModules, ::Bool, ::Void) at ./null:0
 in rec_backtrace_hook(::Gallium.##55#57{Bool,Bool,Gallium.LocalSession,Gallium.LazyJITModules,Array{Any,1},Array{Any,1}}, ::Gallium.X86_64.BasicRegs, ::Gallium.LocalSession, ::Gallium.LazyJITModules, ::Bool) at /home/lobi/.julia/v0.5/Gallium/src/Gallium.jl:289
 in #stackwalk#54(::Bool, ::Bool, ::Bool, ::Bool, ::Function, ::Gallium.X86_64.BasicRegs, ::Gallium.LocalSession, ::Gallium.LazyJITModules) at /home/lobi/.julia/v0.5/Gallium/src/Gallium.jl:401
 in (::Gallium.#kw##stackwalk)(::Array{Any,1}, ::Gallium.#stackwalk, ::Gallium.X86_64.BasicRegs, ::Gallium.LocalSession, ::Gallium.LazyJITModules) at ./null:0
 in breakpoint_hit(::Gallium.Hooking.Hook, ::Gallium.X86_64.BasicRegs) at /home/lobi/.julia/v0.5/Gallium/src/Gallium.jl:590
 in _callback(::Ptr{Void}) at /home/lobi/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:272
 in callback(::Ptr{Void}) at /home/lobi/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:299
 in write_to_stream_callback(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Ptr{UInt8}, ::UInt32) at /home/lobi/.julia/v0.5/Cairo/src/Cairo.jl:0
 in write_to_png(::Cairo.CairoSurface{ColorTypes.RGB24}, ::Base.AbstractIOBuffer{Array{UInt8,1}}) at /home/lobi/.julia/v0.5/Cairo/src/Cairo.jl:326
 in eval(::Module, ::Any) at ./boot.jl:231
 in macro expansion at ./REPL.jl:92 [inlined]
 in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:46

lobingera avatar Jun 26 '16 10:06 lobingera