Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Gallium fails on master branch of julia #42

Closed
josefsachsconning opened this issue Feb 29, 2016 · 15 comments
Closed

Gallium fails on master branch of julia #42

josefsachsconning opened this issue Feb 29, 2016 · 15 comments

Comments

@josefsachsconning
Copy link
Collaborator

Is Gallium believed to work on the master branch of julia? I get the following.

julia> ARGS = ["3139"];

julia> include("/home/sachs/.julia/v0.5/Gallium/examples/call.jl")
In file included from :1:
/home/sachs/.julia/v0.5/Gallium/src/EventHandler.cpp:256:40: error: 'HandleBreakpointEvent' is a protected member of 'lldb_private::Debugger'
                                m_dbg->HandleBreakpointEvent (event_sp);
                                       ^
/home/sachs/src/julia-master-with-cxx/usr/bin/../include/lldb/Core/Debugger.h:395:5: note: declared protected here
    HandleBreakpointEvent (const lldb::EventSP &event_sp);
    ^
In file included from :1:
__cxxjl_10.cpp:7:18: error: unknown type name 'jl_value_t'
    JuliaStream (jl_value_t *io) :
                 ^
__cxxjl_10.cpp:32:5: error: unknown type name 'jl_value_t'
    jl_value_t *m_io;
    ^
julia: /home/sachs/src/julia-master-with-cxx/deps/srccache/llvm-3.7.1/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2884: const clang::ASTRecordLayout& clang::ASTContext::getASTRecordLayout(const clang::RecordDecl*) const: Assertion `!D->isInvalidDecl() && "Cannot get layout of invalid decl!"' failed.
zsh: abort (core dumped)  src/julia-master-with-cxx/usr/bin/julia```
@josefsachsconning
Copy link
Collaborator Author

At f95b88c, I get

ERROR: LoadError: LoadError: could not open file /home/sachs/.julia/v0.5/DIDebug/src/DIDebugLite.jl

@Keno
Copy link
Member

Keno commented Mar 6, 2016

Sorry! I pushed the missing files, but this code isn't quite ready yet. In particular, there's a couple of commits which are still in pull requests on julia master before this will work.

@ScottPJones
Copy link

Which PRs are required? (for those of us willing to play around with merging them together and building on our local platforms) (Dying to be able to use Gallium!)

@ViralBShah
Copy link
Contributor

I believe this works now.

@josefsachsconning
Copy link
Collaborator Author

It doesn't work for me, but I'm not sure whether it is supposed to work, since the README.md was replaced.

julia> ARGS = ["17359"];

julia> include(Pkg.dir("Gallium/examples/call.jl"))
WARNING: module Lexer should explicitly import √ from Base
ERROR: LoadError: UndefVarError: debugger not defined
 in include(::ASCIIString) at ./boot.jl:240
 in include_from_node1(::ASCIIString) at ./loading.jl:417
 in eval(::Module, ::Any) at ./boot.jl:243
while loading /home/sachs/.julia/v0.5/Gallium/examples/call.jl, in expression starting on line 4

@josefsachsconning
Copy link
Collaborator Author

The two examples in the README also do not work for me (the second with the same error reported by Viral in issue #53 )

julia> using Gallium
WARNING: module Lexer should explicitly import √ from Base

julia> include(Pkg.dir("Gallium/examples/testprograms/misc.jl"))
inaloop (generic function with 1 method)

julia> Gallium.breakpoint(sinthesin,Tuple{Int64})
Hooking.Hook(Ptr{Void} @0x00007ff71eb35000,UInt8[0x55,0x48,0x89,0xe5,0x53,0x50,0x48,0xbb,0xd0,0x7c,0x8e,0x15,0xf7,0x7f,0x00,0x00],Gallium.breakpoint_hit)

julia> inaloop(2)
ERROR: Object file is not any of MachO.MachOHandle{T<:IO}!
To force one object file use readmeta(io,T).
If the format you want is not listed, make sure
the appropriate pacakge is loaded before calling
this function.

 in error(::ASCIIString) at ./error.jl:21
 in readmeta(::Base.AbstractIOBuffer{Array{UInt8,1}}) at /home/sachs/.julia/v0.5/ObjFileBase/src/ObjFileBase.jl:288
 in (::Gallium.##5#6)(::Array{UInt8,1}) at /home/sachs/.julia/v0.5/Gallium/src/Gallium.jl:144
 in rec_backtrace(::Gallium.##5#6, ::Hooking.RegisterContext) at /home/sachs/.julia/v0.5/Hooking/src/backtraces.jl:54
 in stackwalk(::Hooking.RegisterContext) at /home/sachs/.julia/v0.5/Gallium/src/Gallium.jl:134
 in breakpoint_hit(::Hooking.Hook, ::Hooking.RegisterContext) at /home/sachs/.julia/v0.5/Gallium/src/Gallium.jl:224
 in _callback(::Ptr{Void}) at /home/sachs/.julia/v0.5/Hooking/src/Hooking.jl:129
 in callback(::Ptr{Void}) at /home/sachs/.julia/v0.5/Hooking/src/Hooking.jl:160
 in sinthesin(::Int64) at /home/sachs/.julia/v0.5/Gallium/examples/testprograms/misc.jl:0
 in eval(::Module, ::Any) at ./boot.jl:243

julia> @enter gcd(5, 20)
ERROR: UndefVarError: Builtin not defined
 in enter_call_expr(::Void, ::Expr) at /home/sachs/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:849
 in eval(::Module, ::Any) at ./boot.jl:243

@Keno
Copy link
Member

Keno commented Mar 19, 2016

For that error message, try Pkg.checkout("MachO"). For the second one, I need to update ASTInterpreter, since this recently changed on julia master.

@josefsachsconning
Copy link
Collaborator Author

I did Pkg.checkout("MachO") and I still get the same error.

@Keno
Copy link
Member

Keno commented Mar 19, 2016

Oh, hold on, you're not on OS X, I got confused. Try Pkg.checkout("ELF") and Pkg.checkout("DWARF"). I'm not sure what your current setup is, so I don't know which packages are outdated, but those would be my guess. If that doesn't work, please see if any of the other packages mentioned in the README are not updated. The installation process will get a lot simpler, once we tag these packages, but for now you need the master branch for a bunch of them.

@josefsachsconning
Copy link
Collaborator Author

After Pkg.checkout("ELF") and Pkg.checkout("DWARF"), the first example works for me.

@Keno
Copy link
Member

Keno commented Mar 19, 2016

Ok, great, you'll probably run into the same error as in the second example very soon while trying it out, I need to fix that first.

@josefsachsconning
Copy link
Collaborator Author

I gather that the old modes of operation in the September preview no longer work?
E.g., debugging is no longer performed from a separate julia debugger process?
Also, js, jp, jbt etc. are gone?
Is there any documentation available for the new version?
Maybe a replacement for your (Keno's) "Demo of Gallium.jl - the Julia debugger" YouTube video in the works?

@AndyGreenwell
Copy link
Collaborator

See https://github.com/Keno/ASTInterpreter.jl for various commands.

@Keno
Copy link
Member

Keno commented Mar 19, 2016

There'll be lots of documentation, etc. However, for now I'm focusing on getting the last couple of things I now are broken into working order before doing that polish. https://github.com/Keno/ASTInterpreter.jl does have a partial list of commands for the interpreter.

@ViralBShah
Copy link
Contributor

Can we link those docs in the Gallium README, since many people are likely to come to Gallium.jl for the debugger?

@Keno Keno closed this as completed Mar 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants