microsoft / microsoft/MIEngine

User sees an error when detaching from a currently running process

Open
#520 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
859
Forks
233
Avg merge
1d 6h
Merged PRs (30d)
3

Description

When debugging using gdbserver on a remote host MIEngine does not wait for the interrupt to finish before issuing the -target-detach. I have seen the same behavior on "Stop Debugging".

17: (8886412) <-1014-exec-interrupt
17: (8886420) ->1014^done
17: (8886420) ->(gdb)
17: (8886420) 1014: elapsed time 9
17: (8886421) <-1015-target-detach
17: (8886431) ->1015^error,msg="Cannot execute this command while the target is running.\nUse the "interrupt" command to stop the target\nand then try again."
17: (8886431) ->(gdb)
17: (8886431) 1015: elapsed time 10
17: (8886724) ->=thread-created,id="2",group-id="i1"
17: (8886725) ->"[New Thread 706]\n"
17: (8886725) ->
"\nProgram received signal "
[New Thread 706]

Program received signal 17: (8886725) ->"SIGINT, Interrupt.\n"
SIGINT, Interrupt.
17: (8886770) ->
"0xb6f06250 in ?? ()\n"
0xb6f06250 in ?? ()
17: (8886770) ->*stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",frame={addr="0xb6f06250",func="??",args=[]},thread-id="1",stopped-threads="all",core="0"
17: (8886770) <-1016-thread-info
17: (8887826) ->1016^done,threads=[{id="2",target-id="Thread 706",frame={level="0",addr="0xb6f03998",func="??",args=[]},state="stopped",core="0"},{id="1",target-id="Thread 699",frame={level="0",addr="0xb6f06250",func="??",args=[]},state="stopped",core="0"}],current-thread-id="1"
17: (8887826) ->(gdb)

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

No source files or tests are named. Start by tracing MIEngine handling of -exec-interrupt followed by -target-detach, including the Stop Debugging path, then reproduce against a remote gdbserver. Done means detaching waits until the interrupt completes and no longer reports that the target is running.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.