summaryrefslogtreecommitdiffstats
path: root/gdb/mi/mi-main.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2002-10-22 17:53:42 +0000
committerKeith Seitz <keiths@redhat.com>2002-10-22 17:53:42 +0000
commit99615eb88f4394f240d5cc8807b5c15db91cc754 (patch)
tree8ca92b45dfe458ec185ae51965c493d6892aa171 /gdb/mi/mi-main.c
parent7ed1d3463ed9ab59cb3f7e2e454d0e214b743c85 (diff)
downloadppe42-binutils-99615eb88f4394f240d5cc8807b5c15db91cc754.tar.gz
ppe42-binutils-99615eb88f4394f240d5cc8807b5c15db91cc754.zip
* mi-main.c (mi_cmd_thread_select): Only return MI_CMD_CAUGHT_ERROR
when we really did catch an error(). If we got GDB_RC_FAIL, return MI_CMD_ERROR instead.
Diffstat (limited to 'gdb/mi/mi-main.c')
-rw-r--r--gdb/mi/mi-main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 41775922de..a866042fdc 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -240,8 +240,12 @@ mi_cmd_thread_select (char *command, char **argv, int argc)
else
rc = gdb_thread_select (uiout, argv[0]);
- if (rc == GDB_RC_FAIL)
+ /* RC is enum gdb_rc if it is successful (>=0)
+ enum return_reason if not (<0). */
+ if ((int) rc < 0 && (enum return_reason) rc == RETURN_ERROR)
return MI_CMD_CAUGHT_ERROR;
+ else if ((int) rc >= 0 && rc == GDB_RC_FAIL)
+ return MI_CMD_ERROR;
else
return MI_CMD_DONE;
}
OpenPOWER on IntegriCloud