15796c8dcSSimon Schubert /* Interface for common GDB/MI data
2*ef5ccd6cSJohn Marino Copyright (C) 2005-2013 Free Software Foundation, Inc.
35796c8dcSSimon Schubert
45796c8dcSSimon Schubert This file is part of GDB.
55796c8dcSSimon Schubert
65796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify
75796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by
85796c8dcSSimon Schubert the Free Software Foundation; either version 3 of the License, or
95796c8dcSSimon Schubert (at your option) any later version.
105796c8dcSSimon Schubert
115796c8dcSSimon Schubert This program is distributed in the hope that it will be useful,
125796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of
135796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
145796c8dcSSimon Schubert GNU General Public License for more details.
155796c8dcSSimon Schubert
165796c8dcSSimon Schubert You should have received a copy of the GNU General Public License
175796c8dcSSimon Schubert along with this program. If not, see <http://www.gnu.org/licenses/>. */
185796c8dcSSimon Schubert
195796c8dcSSimon Schubert #include "defs.h"
20a45ae5f8SJohn Marino #include "gdb_assert.h"
215796c8dcSSimon Schubert #include "mi-common.h"
225796c8dcSSimon Schubert
235796c8dcSSimon Schubert static const char * const async_reason_string_lookup[] =
245796c8dcSSimon Schubert {
255796c8dcSSimon Schubert "breakpoint-hit",
265796c8dcSSimon Schubert "watchpoint-trigger",
275796c8dcSSimon Schubert "read-watchpoint-trigger",
285796c8dcSSimon Schubert "access-watchpoint-trigger",
295796c8dcSSimon Schubert "function-finished",
305796c8dcSSimon Schubert "location-reached",
315796c8dcSSimon Schubert "watchpoint-scope",
325796c8dcSSimon Schubert "end-stepping-range",
335796c8dcSSimon Schubert "exited-signalled",
345796c8dcSSimon Schubert "exited",
355796c8dcSSimon Schubert "exited-normally",
365796c8dcSSimon Schubert "signal-received",
37a45ae5f8SJohn Marino "solib-event",
38a45ae5f8SJohn Marino "fork",
39a45ae5f8SJohn Marino "vfork",
40a45ae5f8SJohn Marino "syscall-entry",
41a45ae5f8SJohn Marino "syscall-return",
42a45ae5f8SJohn Marino "exec",
435796c8dcSSimon Schubert NULL
445796c8dcSSimon Schubert };
455796c8dcSSimon Schubert
46*ef5ccd6cSJohn Marino gdb_static_assert (ARRAY_SIZE (async_reason_string_lookup)
47*ef5ccd6cSJohn Marino == EXEC_ASYNC_LAST + 1);
48a45ae5f8SJohn Marino
495796c8dcSSimon Schubert const char *
async_reason_lookup(enum async_reply_reason reason)505796c8dcSSimon Schubert async_reason_lookup (enum async_reply_reason reason)
515796c8dcSSimon Schubert {
525796c8dcSSimon Schubert return async_reason_string_lookup[reason];
535796c8dcSSimon Schubert }
54