gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quickly interrupt GDB command (NOT the debugee)


From: Massimo Del Fedele
Subject: Quickly interrupt GDB command (NOT the debugee)
Date: Mon, 24 Feb 2014 09:14:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Hi,

I'm developing a multithreaded frontend for GBD; main thread is managing the gui
and some service threads are used to update data panes (local variables, stack 
traces, etc), to have
a responsive behaviour.
It's all working, but some GDB command take long time to execute (some 1-2 and 
more seconds), which
give lags when stepping into big projects.
I solved (partially) sending a SIGINT to GDB when I want to abort current 
command and give control
to main thread quickly.
The problem is that SIGINT don't interrupt current GDB command but just its 
output, which solves only
partially the lag problem.
Is it possible to have SIGINT interrupt current GDB command in real-time ?
To clarify, here an example :

1)-service thread is evaluating something like this:
this->objects.key.key.vector[0]
This takes something like 2 seconds to evaluate

2) from main thread I want to issue a STEP command. I send a ctrl-c to service 
thread, wait till it closes
(it does it after receiving (gdb) prompt... ) and then issue the step command.

Now the ctrl-c shortens just the output part of gdb command, but the 1-2 
seconds evaluation lag is still there.
What I'd like to have is an immediate abort of current GDB command after 
sending a SIGINT to it.

Ciao

Max




reply via email to

[Prev in Thread] Current Thread [Next in Thread]