JuliaDebug / JuliaDebug/Debugger.jl

sl (step into last call in line) is unreliable

Open
#423 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
514
Forks
50
Avg merge
9d 9h
Merged PRs (30d)
1

Description

I'm not sure how to make a "MWE" but here is a run-through of the problem: If I run sl on the following it works fine:

[1/1] \(A, B) at /Users/solver/.julia/packages/QuasiArrays/B65Uq/src/matmul.jl:34
>34  @inline \(A::AbstractQuasiArray, B::AbstractQuasiArray) = ldiv(A,B)

  A::Fourier{Float64} = Fourier{Float64}()  (arg)
  B::QuasiArrays.BroadcastQuasiVector{…} = <cos.(Inclusion(DomainSets.RealNumb...>  (arg)

→ ldiv(Fourier{Float64}(), cos.(Inclusion(DomainSets.RealNumbers())))

1|debug> sl

But the following is equivalent to so instead of stepping into the materialize call:

[1/3] ldiv(A, B; kwds) at /Users/solver/.julia/packages/ArrayLayouts/RCHQ8/src/ldiv.jl:98
>98  @inline ldiv(A, B; kwds...) = materialize(Ldiv(A,B); kwds...)

  A::Fourier{Float64} = Fourier{Float64}()  (arg)
  B::QuasiArrays.BroadcastQuasiVector{…} = <cos.(Inclusion(DomainSets.RealNumb...>  (arg)
  kwds::Base.Pairs{…} = Base.Pairs{Symbol, Union{}, Nothing, @NamedTuple{}}()  (arg)

→ (ArrayLayouts.Ldiv)(Fourier{Float64}(), cos.(Inclusion(DomainSets.RealNumbers())))
1|debug> sl

Thus it steps out and produces the following:

[1/1] \(A, B) at /Users/solver/.julia/packages/QuasiArrays/B65Uq/src/matmul.jl:34
>34  @inline \(A::AbstractQuasiArray, B::AbstractQuasiArray) = ldiv(A,B)

  A::Fourier{Float64} = Fourier{Float64}()  (arg)
  B::QuasiArrays.BroadcastQuasiVector{…} = <cos.(Inclusion(DomainSets.RealNumb...>  (arg)

→ <return [-7.16273e-18, 1.08148e-18, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with the shown Julia calls and the debugger commands sl and so, starting from the calls at matmul.jl:34 and ldiv.jl:98. Trace how sl handles the materialize call and compare it with stepping out; done means sl reliably enters the last call in the line instead of behaving like so.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.