Skip to content

How to send Ctrl+C (SIGINT) to gdbserver? #186

Open

Description

@DeadRabbits307

Is it possible to send a Ctrl+C (SIGINT) to the gdbserver?

As far as I know using Native Debug simultaneously conntecting to the gdbserver for example in the TERMINAL using

(gdb) target extended-remote xx.xx.xx.xx:2345

to send a signal SIGINT is not possible, is it?

See https://stackoverflow.com/questions/55045070/pass-sigint-while-pressing-ctrlc-on-using-debugger-in-vscode

Activity

  1. WebFreak001 commented on Jul 20, 2019

    @WebFreak001
    Owner
  2. 4a-42 commented on Sep 30, 2019

    @4a-42

    I have a similar issue. I tried your suggestion and typed "signal SIGTRAP" in the console, and I got the following error:

    Cannot execute this command while the selected thread is running. (from interpreter-exec console "signal SIGTRAP")
    Cannot execute this command while the selected thread is running.

    edit:
    Follow-up

    after more messing around, here's what I've found that doesn't work:

    • The play button (sometimes?)
    • The pause button
    • The step back button
    • The restart button?
    • The reverse button

    Here's what works:

    • The play button
    • The step over button
    • The step into button
    • The step out button
    • breakpoints
    • Watches window
    • Variables window

    The play button seems to work, except when I get in a weird state where the "play" button appears instead of the pause button even though the program is currently running. The reason I can enter this weird state is because the pause button doesn't pause my program.

    As a side note, I believe the reason the "restart" button doesn't work is because of my gdb server, and not due to a problem with the vscode extension.

    I have found that typing "interrupt" in the vscode debug console performs the equivalent of pressing ctrl+c in gdb.

    Is there a way to remap what the gui buttons do? If I could remap the "pause" button to do the equivalent of typing "interrupt" in the debug console, it would streamline my debugging experience a lot.

  3. bustij commented on Oct 7, 2019

    @bustij

    This issue is possibly related microsoft/MIEngine#844

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions