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

Ctrl+c not working with remote targets #132

Open
jcorina opened this issue Jan 25, 2019 · 3 comments
Open

Ctrl+c not working with remote targets #132

jcorina opened this issue Jan 25, 2019 · 3 comments
Labels

Comments

@jcorina
Copy link

jcorina commented Jan 25, 2019

When trying to send a SIGINT via Ctrl+c, nothing happens.
If I end the program being debugged I get the following:

gdb-peda$ c
Continuing.
^C^C

^C
[Inferior 1 (process 17834) exited normally]
Python Exception <type 'exceptions.KeyboardInterrupt'> : 
Error while running hook_stop:
Could not convert arguments to Python string.

If I disable peda it works as expected. It also works fine in peda if the target is local.
GDB version is 8.2.1, though it was also happening on 8.1.0.

@longld longld added the bug label Jan 28, 2019
@Byzero512
Copy link

this just happend in gdb 8.2

@Byzero512
Copy link

Byzero512 commented May 16, 2019

When trying to send a SIGINT via Ctrl+c, nothing happens.
If I end the program being debugged I get the following:

gdb-peda$ c
Continuing.
^C^C

^C
[Inferior 1 (process 17834) exited normally]
Python Exception <type 'exceptions.KeyboardInterrupt'> : 
Error while running hook_stop:
Could not convert arguments to Python string.

If I disable peda it works as expected. It also works fine in peda if the target is local.
GDB version is 8.2.1, though it was also happening on 8.1.0.

you can comment the code between line-6112 to line-6118 in peda.py. (but i don't confirm what effect will caused by this change)

@Byzero512
Copy link

Byzero512 commented May 16, 2019

or change the code between line-6112 and line-6118 to

#handle SIGINT / Ctrl-C
def sigint_handler(event):
    # warning_msg("Got Ctrl+C / SIGINT!")
    gdb.execute("set logging off")
    peda.restore_user_command("all")
#     raise KeyboardInterrupt
# signal.signal(signal.SIGINT, sigint_handler)
gdb.events.stop.connect(sigint_handler)

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

No branches or pull requests

3 participants