aboutsummaryrefslogtreecommitdiff
path: root/src/monkey/gdbmi_error.c
blob: abb20f61e8264ac989dd35a49b00be3d3f013a9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**[txh]********************************************************************

  Copyright (c) 2004 by Salvador E. Tropea.
  Covered by the GPL license.

  Module: Error.
  Comment:
  Translates error numbers into messages.
  
***************************************************************************/

#include "gdbmi.h"

static
const char *error_strs[]=
{
 "Ok",
 "Out of memory",
 "Pipe creation",
 "Fork failed",
 "GDB not running",
 "Parser failed",
 "Unknown asyn response",
 "Unknown result response",
 "Error from gdb",
 "Time out in gdb response",
 "GDB suddenly died",
 "Can't execute X terminal",
 "Failed to create temporal",
 "Can't execute the debugger"
};

const char *mi_get_error_str()
{
 if (mi_error<0 || mi_error>MI_LAST_ERROR)
    return "Unknown";
 return error_strs[mi_error];
}