2009-08-06 Paul Pluzhnikov <ppluzhnikov@google.com>
[deliverable/binutils-gdb.git] / gdb / monitor.h
index 562c19e8dd2d7f80f55a2fca2e2731bf8cab6979..b9eac8a52f8cad13fe4f584fba7513115ee0123d 100644 (file)
@@ -1,12 +1,13 @@
 /* Definitions for remote debugging interface for ROM monitors.
-   Copyright 1990, 1991, 1992, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2007, 2008, 2009 Free Software Foundation, Inc.
    Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
 
    This file is part of GDB.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "serial.h"
+#ifndef MONITOR_H
+#define MONITOR_H
+
+struct target_waitstatus;
+struct serial;
 
 /* This structure describes the strings necessary to give small command
    sequences to the monitor, and parse the response.
@@ -95,10 +98,11 @@ struct monitor_ops
        GDB with the value of a register.  */
     char *dump_registers;      /* Command to dump all regs at once */
     char *register_pattern;    /* Pattern that picks out register from reg dump */
-    void (*supply_register) (char *name, int namelen, char *val, int vallen);
-    void (*load_routine) (serial_t desc, char *file,
+    void (*supply_register) (struct regcache *regcache, char *name,
+                            int namelen, char *val, int vallen);
+    void (*load_routine) (struct serial *desc, char *file,
                          int hashmark);        /* Download routine */
-    int (*dumpregs) (void);    /* routine to dump all registers */
+    int (*dumpregs) (struct regcache *);       /* Dump all registers */
     int (*continue_hook) (void);       /* Emit the continue command */
     int (*wait_filter) (char *buf,     /* Maybe contains registers */
                        int bufmax,
@@ -112,6 +116,9 @@ struct monitor_ops
     struct target_ops *target; /* target operations */
     int stopbits;              /* number of stop bits */
     char **regnames;           /* array of register names in ascii */
+                                /* deprecated: use regname instead */
+    const char *(*regname) (int index); 
+                                /* function for dynamic regname array */
     int num_breakpoints;       /* If set_break != NULL, number of supported
                                   breakpoints */
     int magic;                 /* Check value */
@@ -234,15 +241,20 @@ struct monitor_ops
 
 extern void monitor_open (char *args, struct monitor_ops *ops, int from_tty);
 extern void monitor_close (int quitting);
-extern char *monitor_supply_register (int regno, char *valstr);
+extern char *monitor_supply_register (struct regcache *regcache,
+                                     int regno, char *valstr);
 extern int monitor_expect (char *prompt, char *buf, int buflen);
 extern int monitor_expect_prompt (char *buf, int buflen);
-extern void monitor_printf (char *, ...) ATTR_FORMAT (printf, 1, 2);
-extern void
-monitor_printf_noecho (char *, ...)
-ATTR_FORMAT (printf, 1, 2);
+/* Note: The variable argument functions monitor_printf and
+   monitor_printf_noecho vararg do not take take standard format style
+   arguments.  Instead they take custom formats interpretered directly
+   by monitor_vsprintf.  */
+extern void monitor_printf (char *, ...);
+extern void monitor_printf_noecho (char *, ...);
 extern void monitor_write (char *buf, int buflen);
 extern int monitor_readchar (void);
 extern char *monitor_get_dev_name (void);
 extern void init_monitor_ops (struct target_ops *);
-extern int monitor_dump_reg_block (char *dump_cmd);
+extern int monitor_dump_reg_block (struct regcache *regcache, char *dump_cmd);
+
+#endif
This page took 0.042077 seconds and 4 git commands to generate.