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

error handling: report MI errors via vscode error notifications #101

Open
GitMensch opened this issue Feb 1, 2021 · 0 comments
Open

error handling: report MI errors via vscode error notifications #101

GitMensch opened this issue Feb 1, 2021 · 0 comments

Comments

@GitMensch
Copy link
Contributor

Seen today when trying to just do a quick debugging session and reporting to #24 but is a general topic:

There are sometimes MI error reportings, example:

(gdb)
GDB -> App: {"token":6,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
addBreakPoint
stdin: 7-exec-run
stdout: =thread-group-started,id="i1",pid="26564"
GDB -> App: {"outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-started","output":[["id","i1"],["pid","26564"]]}]}
stdout: =thread-created,id="1",group-id="i1"
GDB -> App: {"outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-created","output":[["id","1"],["group-id","i1"]]}]}
stdout: ~"[New Thread 26564.0x34a8]\n"
GDB -> App: {"outOfBandRecord":[{"isStream":true,"type":"console","content":"[New Thread 26564.0x34a8]\n"}]}
[New Thread 26564.0x34a8]
stdout: 7^running
*running,thread-id="all"
(gdb)
GDB -> App: {"token":7,"outOfBandRecord":[],"resultRecords":{"resultClass":"running","results":[]}}
GDB -> App: {"outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"running","output":[["thread-id","all"]]}]}
stdout: =thread-exited,id="1",group-id="i1"
GDB -> App: {"outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-exited","output":[["id","1"],["group-id","i1"]]}]}
stdout: =thread-group-exited,id="i1"
7^error,msg="During startup program exited with code 0xc0000135."
(gdb)
GDB -> App: {"outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-exited","output":[["id","i1"]]}]}
GDB -> App: {"token":7,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","During startup program exited with code 0xc0000135."]]}}
During startup program exited with code 0xc0000135.
getThreads
stdin: 8-thread-info
stdout: 8^done,threads=[]
(gdb)
GDB -> App: {"token":8,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[]]]}}

Expectation: in case of resultClass":"error": "do something" with theresults, in case of msg being set (without checking I guess it is always set) then execute window.showErrorMessage(results.msg);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant