diff options
author | qiyao <qiyao> | 2012-11-30 14:35:49 +0000 |
---|---|---|
committer | qiyao <qiyao> | 2012-11-30 14:35:49 +0000 |
commit | 6abf9dd803ec3edf2cab12f97ac51367d692f083 (patch) | |
tree | d695071c79e0763cfcdbe564763b479fff00abc8 /gdb/infcmd.c | |
parent | bc53aa3990b78fb4dca922592f5a358898a63a0c (diff) | |
download | gdb-6abf9dd803ec3edf2cab12f97ac51367d692f083.tar.gz |
gdb/
2012-11-30 Yao Qi <yao@codesourcery.com>
* infrun.c (error_is_running, ensure_not_running): Move them
to ...
* infcmd.c (error_is_running, ensure_not_running): ... here.
Make them 'static'.
* inferior.h: Remove declarations of error_is_running and
ensure_not_running.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 7a08e31eda2..db9b9b59efb 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -708,6 +708,24 @@ ensure_not_tfind_mode (void) error (_("Cannot execute this command while looking at trace frames.")); } +/* Throw an error indicating the current thread is running. */ + +static void +error_is_running (void) +{ + error (_("Cannot execute this command while " + "the selected thread is running.")); +} + +/* Calls error_is_running if the current thread is running. */ + +static void +ensure_not_running (void) +{ + if (is_running (inferior_ptid)) + error_is_running (); +} + void continue_1 (int all_threads) { |