gdb/gdbserver/tdesc.h - gdb

Data types defined

Macros defined

Source code

  1. /* Target description definitions for remote server for GDB.
  2.    Copyright (C) 2012-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. #ifndef TDESC_H
  15. #define TDESC_H

  16. struct reg;

  17. /* A target description.  */

  18. struct target_desc
  19. {
  20.   /* An array of NUM_REGISTERS elements of register definitions that
  21.      describe the inferior's register set.  */
  22.   struct reg *reg_defs;

  23.   /* The number of registers in inferior's register set (and thus in
  24.      the regcache).  */
  25.   int num_registers;

  26.   /* The register cache size, in bytes.  */
  27.   int registers_size;

  28.   /* An array of register names.  These are the "expedite" registers:
  29.      registers whose values are sent along with stop replies.  */
  30.   const char **expedite_regs;

  31.   /* Defines what to return when looking for the "target.xml" file in
  32.      response to qXfer:features:read.  Its contents can either be
  33.      verbatim XML code (prefixed with a '@') or else the name of the
  34.      actual XML file to be used in place of "target.xml".  */
  35.   const char *xmltarget;
  36. };

  37. /* Copy target description SRC to DEST.  */

  38. void copy_target_description (struct target_desc *dest,
  39.                               const struct target_desc *src);

  40. /* Initialize TDESC.  */

  41. void init_target_desc (struct target_desc *tdesc);

  42. /* Return the current inferior's target description.  Never returns
  43.    NULL.  */

  44. const struct target_desc *current_target_desc (void);

  45. #endif /* TDESC_H */