Allow TUI windows in Python
[deliverable/binutils-gdb.git] / include / gdb / remote-sim.h
index 9c204525b7525c74be147d77be1614877129ce2c..179120d69f90a31bee37ef9e3ac6dabf9ca044c0 100644 (file)
@@ -1,7 +1,6 @@
 /* This file defines the interface between the simulator and gdb.
 
-   Copyright 1993, 1994, 1996, 1997, 1998, 2000, 2002, 2007, 2008, 2009, 2010,
-   2011 Free Software Foundation, Inc.
+   Copyright (C) 1993-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -61,9 +60,10 @@ typedef enum {
 } SIM_RC;
 
 
-/* The bfd struct, as an opaque type.  */
+/* Some structs, as opaque types.  */
 
 struct bfd;
+struct host_callback_struct;
 
 
 /* Main simulator entry points.  */
@@ -104,7 +104,8 @@ struct bfd;
    sim_create_inferior.  FIXME: What should the state of the simulator
    be? */
 
-SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct bfd *abfd, char **argv);
+SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback,
+                  struct bfd *abfd, char * const *argv);
 
 
 /* Destory a simulator instance.
@@ -141,7 +142,7 @@ void sim_close (SIM_DESC sd, int quitting);
    Such manipulation should probably (?) occure in
    sim_create_inferior. */
 
-SIM_RC sim_load (SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty);
+SIM_RC sim_load (SIM_DESC sd, const char *prog, struct bfd *abfd, int from_tty);
 
 
 /* Prepare to run the simulated program.
@@ -161,7 +162,8 @@ SIM_RC sim_load (SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty);
    address space (according to the applicable ABI) and the program
    counter and stack pointer set accordingly. */
 
-SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env);
+SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
+                           char * const *argv, char * const *env);
 
 
 /* Fetch LENGTH bytes of the simulated program's memory.  Start fetch
@@ -191,13 +193,15 @@ int sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length);
 
 
 /* Store register REGNO from the raw (target endian) value in BUF.
-   Return the actual size of the register or zero if REGNO is not
-   applicable.
 
-   Legacy implementations ignore LENGTH and always return -1.
+   Return the actual size of the register, any size not equal to
+   LENGTH indicates the register was not updated correctly.
 
-   If LENGTH does not match the size of REGNO no data is transfered
-   (the actual register size is still returned). */
+   Return a LENGTH of -1 to indicate the register was not updated
+   and an error has occurred.
+
+   Return a LENGTH of 0 to indicate the register was not updated
+   but no error has occurred. */
 
 int sim_store_register (SIM_DESC sd, int regno, unsigned char *buf, int length);
 
@@ -257,7 +261,7 @@ int sim_stop (SIM_DESC sd);
    that information is not directly accessable via this interface.
 
    SIM_SIGNALLED: The program has been terminated by a signal. The
-   simulator has encountered target code that causes the the program
+   simulator has encountered target code that causes the program
    to exit with signal SIGRC.
 
    SIM_RUNNING, SIM_POLLING: The return of one of these values
@@ -272,7 +276,12 @@ void sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc);
    Simulators should be prepared to deal with any combination of NULL
    or empty CMD. */
 
-void sim_do_command (SIM_DESC sd, char *cmd);
+void sim_do_command (SIM_DESC sd, const char *cmd);
+
+/* Complete a command based on the available sim commands.  Returns an
+   array of possible matches.  */
+
+char **sim_complete_command (SIM_DESC sd, const char *text, const char *word);
 
 #ifdef __cplusplus
 }
This page took 0.0236690000000001 seconds and 4 git commands to generate.