microsoft / microsoft/MIEngine

Can't interupt the target process after attach on Linux+GDB

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

Nobody has claimed this yet.

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

Description

After attaching to a process on Linux+GDB (Ubuntu 7.7.1-0ubuntu5~14.04.2), we don't have a way of breaking into the target process.

The result of this bug is that we can't get into break state to set breakpoints, or any of the other tasks we might want. So only breakpoints set before start debugging will work.

The only way I found that we could work around this is to -

  1. Configure gdb to stop on SIGINT using: handle SIGINT stop
  2. Using kill from the shell to interrupt the target:
    kill -TRAP

Some of the things I tried:

  1. Enabling target-async before the attach. I tried both on the command line and before issuing the command.
  2. Sending Ctrl-C. My debuggee has signal handlers installed, which could be the problem, but I couldn't get this to work.

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

Start by reproducing the attach workflow on Linux with GDB, using the issue's SIGINT and SIGTRAP workarounds as comparison points. Trace the MIEngine attach and interrupt handling, then verify that an attached target can enter break state and accept breakpoints without shell intervention.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, linux
Domain
devtools, operating-systems
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.