diff options
Diffstat (limited to 'tools/idevicedebug.c')
-rw-r--r-- | tools/idevicedebug.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/idevicedebug.c b/tools/idevicedebug.c index 27eaa4e..c596213 100644 --- a/tools/idevicedebug.c +++ b/tools/idevicedebug.c | |||
@@ -130,6 +130,8 @@ static debugserver_error_t debugserver_client_handle_response(debugserver_client | |||
130 | } else if (r[0] == 'T') { | 130 | } else if (r[0] == 'T') { |
131 | /* thread stopped information */ | 131 | /* thread stopped information */ |
132 | log_debug("Thread stopped. Details:\n%s", r + 1); | 132 | log_debug("Thread stopped. Details:\n%s", r + 1); |
133 | /* "Thread stopped" seems to happen when assert() fails. Use bash convention where signals cause an exit status of 128 + signal */ | ||
134 | *exit_status = 128 + SIGABRT; | ||
133 | /* Break out of the loop. */ | 135 | /* Break out of the loop. */ |
134 | dres = DEBUGSERVER_E_UNKNOWN_ERROR; | 136 | dres = DEBUGSERVER_E_UNKNOWN_ERROR; |
135 | } else if (r[0] == 'E') { | 137 | } else if (r[0] == 'E') { |
@@ -487,6 +489,10 @@ int main(int argc, char *argv[]) | |||
487 | log_debug("response: %s", response); | 489 | log_debug("response: %s", response); |
488 | if (strncmp(response, "OK", 2)) { | 490 | if (strncmp(response, "OK", 2)) { |
489 | dres = debugserver_client_handle_response(debugserver_client, &response, &res); | 491 | dres = debugserver_client_handle_response(debugserver_client, &response, &res); |
492 | if (dres != DEBUGSERVER_E_SUCCESS) { | ||
493 | debug_info("failed to process response; error %d; %s", dres, response); | ||
494 | break; | ||
495 | } | ||
490 | } | 496 | } |
491 | } | 497 | } |
492 | if (res >= 0) { | 498 | if (res >= 0) { |
@@ -511,7 +517,9 @@ int main(int argc, char *argv[]) | |||
511 | response = NULL; | 517 | response = NULL; |
512 | } | 518 | } |
513 | 519 | ||
514 | res = (dres == DEBUGSERVER_E_SUCCESS) ? 0: -1; | 520 | if (res < 0) { |
521 | res = (dres == DEBUGSERVER_E_SUCCESS) ? 0: -1; | ||
522 | } | ||
515 | break; | 523 | break; |
516 | } | 524 | } |
517 | 525 | ||