gdb/mi/mi-common.c - gdb

Global variables defined

Functions defined

Source code

  1. /* Interface for common GDB/MI data
  2.    Copyright (C) 2005-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #include "defs.h"
  15. #include "mi-common.h"

  16. static const char * const async_reason_string_lookup[] =
  17. {
  18.   "breakpoint-hit",
  19.   "watchpoint-trigger",
  20.   "read-watchpoint-trigger",
  21.   "access-watchpoint-trigger",
  22.   "function-finished",
  23.   "location-reached",
  24.   "watchpoint-scope",
  25.   "end-stepping-range",
  26.   "exited-signalled",
  27.   "exited",
  28.   "exited-normally",
  29.   "signal-received",
  30.   "solib-event",
  31.   "fork",
  32.   "vfork",
  33.   "syscall-entry",
  34.   "syscall-return",
  35.   "exec",
  36.   NULL
  37. };

  38. gdb_static_assert (ARRAY_SIZE (async_reason_string_lookup)
  39.                    == EXEC_ASYNC_LAST + 1);

  40. const char *
  41. async_reason_lookup (enum async_reply_reason reason)
  42. {
  43.   return async_reason_string_lookup[reason];
  44. }