Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_local_vars() does not work on whole stack #2073

Closed
tmandys opened this issue Aug 18, 2017 · 1 comment
Closed

get_local_vars() does not work on whole stack #2073

tmandys opened this issue Aug 18, 2017 · 1 comment
Assignees
Milestone

Comments

@tmandys
Copy link
Contributor

@tmandys tmandys commented Aug 18, 2017

Seems that get_local_vars() does not work on whole stack but just in current Program or so (even is global procedure). When using in DebugUtil.qm I can see full stack in get_thread_call_stack() but get_local_vars() returns non-nothing values just for topmost items.

I proceeded with debugger so I'm able to demonstrate issue in unfriendly command line client.

Example:

qdbg> stack
processCommand: {cmd: "thread/stack", tid: 2}
command: ["thread", "stack"]
list: (6 elements)
  [0]=hash: (8 members)
    function : "get_thread_call_stack"
    line : 1503
    endline : 1503
    file : "/home/tma/work/qore/qore/qlib/DebugUtil.qm"
    source : <NOTHING>
    offset : 0
    typecode : 1
    type : "builtin"
  [1]=hash: (8 members)
    function : "DebugProgramControl::handleInterrupt"
    line : 1563
    endline : 1563
    file : "/home/tma/work/qore/qore/qlib/DebugUtil.qm"
    source : <NOTHING>
    offset : 0
    typecode : 0
    type : "user"
  [2]=hash: (8 members)
    function : "DebugProgramControl::onStep"
    line : 39
    endline : 39
    file : "test/qore/debug/test-debug-script.q"
    source : <NOTHING>
    offset : 0
    typecode : 0
    type : "user"
  [3]=hash: (8 members)
    function : "main"
    line : 39
    endline : 39
    file : "test/qore/debug/test-debug-script.q"
    source : <NOTHING>
    offset : 0
    typecode : 0
    type : "user"
  [4]=hash: (8 members)
    function : "Program::run"
    line : 120
    endline : 120
    file : "bin/qore-dbg"
    source : <NOTHING>
    offset : 0
    typecode : 1
    type : "builtin"
  [5]=hash: (8 members)
    function : "DebugWrapper::background operator"
    line : 120
    endline : 120
    file : "bin/qore-dbg"
    source : <NOTHING>
    offset : 0
    typecode : 2
    type : "new-thread"


keys get_local_vars(#)

  localvars0 : list: (15 elements)
    [0]="sd"
    [1]="ret"
    [2]="ctxCT"
    [3]="sendData1"
    [4]="ctx"
    [5]="tid"
    [6]="argv"
    [7]="self"
    [8]="except"
    [9]="refValue"
    [10]="refName"
    [11]="statementId"
    [12]="runState"
    [13]="pgm"
    [14]="func"
  localvars1 : list: (7 elements)
    [0]="argv"
    [1]="self"
    [2]="statementId"
    [3]="blockStatementId"
    [4]="pgm"
    [5]="rs"
    [6]="retCode"
  localvars2 : <EMPTY LIST>
  localvars3 : <EMPTY LIST>
  localvars4 : <EMPTY LIST>
  localvars5 : <EMPTY LIST>
  localvars6 : <EMPTY LIST>
  localvars7 : <EMPTY LIST>
  localvars8 : <EMPTY LIST>
  localvars9 : <EMPTY LIST>
  localvars10 : <EMPTY LIST>
@tmandys tmandys added bug c++ labels Aug 18, 2017
@tmandys tmandys added this to the 0.8.13 milestone Aug 18, 2017
@davidnich davidnich added the invisible label Aug 18, 2017
@davidnich
Copy link
Contributor

@davidnich davidnich commented Aug 18, 2017

invisible = unreleased functionality

davidnich added a commit that referenced this issue Aug 19, 2017
…LLOW_DEBUGGING is set
@omusil24 omusil24 added the fixed label Aug 21, 2017
@omusil24 omusil24 closed this Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.