sim: drop PARAMS

The PARAMS macro is no longer useful, so drop it from the sim includes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Michael Frysinger 2010-04-13 20:39:44 +00:00
parent 110429f3f1
commit 8c613014ff
3 changed files with 67 additions and 62 deletions

View File

@ -1,3 +1,8 @@
2010-04-13 Mike Frysinger <vapier@gentoo.org>
* callback.h: Strip PARAMS from prototypes.
* remote-sim.h: Likewise.
2010-04-13 Mike Frysinger <vapier@gentoo.org> 2010-04-13 Mike Frysinger <vapier@gentoo.org>
* remote-sim.h (sim_write): Add const to buf arg. * remote-sim.h (sim_write): Add const to buf arg.

View File

@ -72,59 +72,59 @@ typedef struct host_callback_struct host_callback;
struct host_callback_struct struct host_callback_struct
{ {
int (*close) PARAMS ((host_callback *,int)); int (*close) (host_callback *,int);
int (*get_errno) PARAMS ((host_callback *)); int (*get_errno) (host_callback *);
int (*isatty) PARAMS ((host_callback *, int)); int (*isatty) (host_callback *, int);
int (*lseek) PARAMS ((host_callback *, int, long , int)); int (*lseek) (host_callback *, int, long , int);
int (*open) PARAMS ((host_callback *, const char*, int mode)); int (*open) (host_callback *, const char*, int mode);
int (*read) PARAMS ((host_callback *,int, char *, int)); int (*read) (host_callback *,int, char *, int);
int (*read_stdin) PARAMS (( host_callback *, char *, int)); int (*read_stdin) ( host_callback *, char *, int);
int (*rename) PARAMS ((host_callback *, const char *, const char *)); int (*rename) (host_callback *, const char *, const char *);
int (*system) PARAMS ((host_callback *, const char *)); int (*system) (host_callback *, const char *);
long (*time) PARAMS ((host_callback *, long *)); long (*time) (host_callback *, long *);
int (*unlink) PARAMS ((host_callback *, const char *)); int (*unlink) (host_callback *, const char *);
int (*write) PARAMS ((host_callback *,int, const char *, int)); int (*write) (host_callback *,int, const char *, int);
int (*write_stdout) PARAMS ((host_callback *, const char *, int)); int (*write_stdout) (host_callback *, const char *, int);
void (*flush_stdout) PARAMS ((host_callback *)); void (*flush_stdout) (host_callback *);
int (*write_stderr) PARAMS ((host_callback *, const char *, int)); int (*write_stderr) (host_callback *, const char *, int);
void (*flush_stderr) PARAMS ((host_callback *)); void (*flush_stderr) (host_callback *);
int (*stat) PARAMS ((host_callback *, const char *, struct stat *)); int (*stat) (host_callback *, const char *, struct stat *);
int (*fstat) PARAMS ((host_callback *, int, struct stat *)); int (*fstat) (host_callback *, int, struct stat *);
int (*lstat) PARAMS ((host_callback *, const char *, struct stat *)); int (*lstat) (host_callback *, const char *, struct stat *);
int (*ftruncate) PARAMS ((host_callback *, int, long)); int (*ftruncate) (host_callback *, int, long);
int (*truncate) PARAMS ((host_callback *, const char *, long)); int (*truncate) (host_callback *, const char *, long);
int (*pipe) PARAMS ((host_callback *, int *)); int (*pipe) (host_callback *, int *);
/* Called by the framework when a read call has emptied a pipe buffer. */ /* Called by the framework when a read call has emptied a pipe buffer. */
void (*pipe_empty) PARAMS ((host_callback *, int read_fd, int write_fd)); void (*pipe_empty) (host_callback *, int read_fd, int write_fd);
/* Called by the framework when a write call makes a pipe buffer /* Called by the framework when a write call makes a pipe buffer
non-empty. */ non-empty. */
void (*pipe_nonempty) PARAMS ((host_callback *, int read_fd, int write_fd)); void (*pipe_nonempty) (host_callback *, int read_fd, int write_fd);
/* When present, call to the client to give it the oportunity to /* When present, call to the client to give it the oportunity to
poll any io devices for a request to quit (indicated by a nonzero poll any io devices for a request to quit (indicated by a nonzero
return value). */ return value). */
int (*poll_quit) PARAMS ((host_callback *)); int (*poll_quit) (host_callback *);
/* Used when the target has gone away, so we can close open /* Used when the target has gone away, so we can close open
handles and free memory etc etc. */ handles and free memory etc etc. */
int (*shutdown) PARAMS ((host_callback *)); int (*shutdown) (host_callback *);
int (*init) PARAMS ((host_callback *)); int (*init) (host_callback *);
/* depreciated, use vprintf_filtered - Talk to the user on a console. */ /* depreciated, use vprintf_filtered - Talk to the user on a console. */
void (*printf_filtered) PARAMS ((host_callback *, const char *, ...)); void (*printf_filtered) (host_callback *, const char *, ...);
/* Talk to the user on a console. */ /* Talk to the user on a console. */
void (*vprintf_filtered) PARAMS ((host_callback *, const char *, va_list)); void (*vprintf_filtered) (host_callback *, const char *, va_list);
/* Same as vprintf_filtered but to stderr. */ /* Same as vprintf_filtered but to stderr. */
void (*evprintf_filtered) PARAMS ((host_callback *, const char *, va_list)); void (*evprintf_filtered) (host_callback *, const char *, va_list);
/* Print an error message and "exit". /* Print an error message and "exit".
In the case of gdb "exiting" means doing a longjmp back to the main In the case of gdb "exiting" means doing a longjmp back to the main
command loop. */ command loop. */
void (*error) PARAMS ((host_callback *, const char *, ...)) void (*error) (host_callback *, const char *, ...)
#ifdef __GNUC__ #ifdef __GNUC__
__attribute__ ((__noreturn__)) __attribute__ ((__noreturn__))
#endif #endif
@ -260,12 +260,12 @@ typedef struct cb_syscall {
argument here. We mimic sim_{read,write} for now. Be careful to argument here. We mimic sim_{read,write} for now. Be careful to
test any changes with -Wall -Werror, mixed signed comparisons test any changes with -Wall -Werror, mixed signed comparisons
will get you. */ will get you. */
int (*read_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/, int (*read_mem) (host_callback * /*cb*/, struct cb_syscall * /*sc*/,
unsigned long /*taddr*/, char * /*buf*/, unsigned long /*taddr*/, char * /*buf*/,
int /*bytes*/)); int /*bytes*/);
int (*write_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/, int (*write_mem) (host_callback * /*cb*/, struct cb_syscall * /*sc*/,
unsigned long /*taddr*/, const char * /*buf*/, unsigned long /*taddr*/, const char * /*buf*/,
int /*bytes*/)); int /*bytes*/);
/* For sanity checking, should be last entry. */ /* For sanity checking, should be last entry. */
int magic; int magic;
@ -294,37 +294,37 @@ typedef enum {
} CB_RC; } CB_RC;
/* Read in target values for system call numbers, errno values, signals. */ /* Read in target values for system call numbers, errno values, signals. */
CB_RC cb_read_target_syscall_maps PARAMS ((host_callback *, const char *)); CB_RC cb_read_target_syscall_maps (host_callback *, const char *);
/* Translate target to host syscall function numbers. */ /* Translate target to host syscall function numbers. */
int cb_target_to_host_syscall PARAMS ((host_callback *, int)); int cb_target_to_host_syscall (host_callback *, int);
/* Translate host to target errno value. */ /* Translate host to target errno value. */
int cb_host_to_target_errno PARAMS ((host_callback *, int)); int cb_host_to_target_errno (host_callback *, int);
/* Translate target to host open flags. */ /* Translate target to host open flags. */
int cb_target_to_host_open PARAMS ((host_callback *, int)); int cb_target_to_host_open (host_callback *, int);
/* Translate target signal number to host. */ /* Translate target signal number to host. */
int cb_target_to_host_signal PARAMS ((host_callback *, int)); int cb_target_to_host_signal (host_callback *, int);
/* Translate host signal number to target. */ /* Translate host signal number to target. */
int cb_host_to_target_signal PARAMS ((host_callback *, int)); int cb_host_to_target_signal (host_callback *, int);
/* Translate host stat struct to target. /* Translate host stat struct to target.
If stat struct ptr is NULL, just compute target stat struct size. If stat struct ptr is NULL, just compute target stat struct size.
Result is size of target stat struct or 0 if error. */ Result is size of target stat struct or 0 if error. */
int cb_host_to_target_stat PARAMS ((host_callback *, const struct stat *, PTR)); int cb_host_to_target_stat (host_callback *, const struct stat *, PTR);
/* Translate a value to target endian. */ /* Translate a value to target endian. */
void cb_store_target_endian PARAMS ((host_callback *, char *, int, long)); void cb_store_target_endian (host_callback *, char *, int, long);
/* Tests for special fds. */ /* Tests for special fds. */
int cb_is_stdin PARAMS ((host_callback *, int)); int cb_is_stdin (host_callback *, int);
int cb_is_stdout PARAMS ((host_callback *, int)); int cb_is_stdout (host_callback *, int);
int cb_is_stderr PARAMS ((host_callback *, int)); int cb_is_stderr (host_callback *, int);
/* Perform a system call. */ /* Perform a system call. */
CB_RC cb_syscall PARAMS ((host_callback *, CB_SYSCALL *)); CB_RC cb_syscall (host_callback *, CB_SYSCALL *);
#endif #endif

View File

@ -104,7 +104,7 @@ struct bfd;
sim_create_inferior. FIXME: What should the state of the simulator sim_create_inferior. FIXME: What should the state of the simulator
be? */ be? */
SIM_DESC sim_open PARAMS ((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 **argv);
/* Destory a simulator instance. /* Destory a simulator instance.
@ -115,7 +115,7 @@ SIM_DESC sim_open PARAMS ((SIM_OPEN_KIND kind, struct host_callback_struct *call
and mmap'd areas. You cannot assume sim_kill has already been and mmap'd areas. You cannot assume sim_kill has already been
called. */ called. */
void sim_close PARAMS ((SIM_DESC sd, int quitting)); void sim_close (SIM_DESC sd, int quitting);
/* Load program PROG into the simulators memory. /* Load program PROG into the simulators memory.
@ -141,7 +141,7 @@ void sim_close PARAMS ((SIM_DESC sd, int quitting));
Such manipulation should probably (?) occure in Such manipulation should probably (?) occure in
sim_create_inferior. */ sim_create_inferior. */
SIM_RC sim_load PARAMS ((SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty)); SIM_RC sim_load (SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty);
/* Prepare to run the simulated program. /* Prepare to run the simulated program.
@ -161,21 +161,21 @@ SIM_RC sim_load PARAMS ((SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty
address space (according to the applicable ABI) and the program address space (according to the applicable ABI) and the program
counter and stack pointer set accordingly. */ counter and stack pointer set accordingly. */
SIM_RC sim_create_inferior PARAMS ((SIM_DESC sd, struct bfd *abfd, char **argv, char **env)); SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env);
/* Fetch LENGTH bytes of the simulated program's memory. Start fetch /* Fetch LENGTH bytes of the simulated program's memory. Start fetch
at virtual address MEM and store in BUF. Result is number of bytes at virtual address MEM and store in BUF. Result is number of bytes
read, or zero if error. */ read, or zero if error. */
int sim_read PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)); int sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length);
/* Store LENGTH bytes from BUF into the simulated program's /* Store LENGTH bytes from BUF into the simulated program's
memory. Store bytes starting at virtual address MEM. Result is memory. Store bytes starting at virtual address MEM. Result is
number of bytes write, or zero if error. */ number of bytes write, or zero if error. */
int sim_write PARAMS ((SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length)); int sim_write (SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length);
/* Fetch register REGNO storing its raw (target endian) value in the /* Fetch register REGNO storing its raw (target endian) value in the
@ -187,7 +187,7 @@ int sim_write PARAMS ((SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int
If LENGTH does not match the size of REGNO no data is transfered If LENGTH does not match the size of REGNO no data is transfered
(the actual register size is still returned). */ (the actual register size is still returned). */
int sim_fetch_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length)); 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. /* Store register REGNO from the raw (target endian) value in BUF.
@ -199,14 +199,14 @@ int sim_fetch_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int
If LENGTH does not match the size of REGNO no data is transfered If LENGTH does not match the size of REGNO no data is transfered
(the actual register size is still returned). */ (the actual register size is still returned). */
int sim_store_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length)); int sim_store_register (SIM_DESC sd, int regno, unsigned char *buf, int length);
/* Print whatever statistics the simulator has collected. /* Print whatever statistics the simulator has collected.
VERBOSE is currently unused and must always be zero. */ VERBOSE is currently unused and must always be zero. */
void sim_info PARAMS ((SIM_DESC sd, int verbose)); void sim_info (SIM_DESC sd, int verbose);
/* Run (or resume) the simulated program. /* Run (or resume) the simulated program.
@ -231,14 +231,14 @@ void sim_info PARAMS ((SIM_DESC sd, int verbose));
continued. A zero SIGRC value indicates that the program should continued. A zero SIGRC value indicates that the program should
continue as normal. */ continue as normal. */
void sim_resume PARAMS ((SIM_DESC sd, int step, int siggnal)); void sim_resume (SIM_DESC sd, int step, int siggnal);
/* Asynchronous request to stop the simulation. /* Asynchronous request to stop the simulation.
A nonzero return indicates that the simulator is able to handle A nonzero return indicates that the simulator is able to handle
the request */ the request */
int sim_stop PARAMS ((SIM_DESC sd)); int sim_stop (SIM_DESC sd);
/* Fetch the REASON why the program stopped. /* Fetch the REASON why the program stopped.
@ -265,14 +265,14 @@ int sim_stop PARAMS ((SIM_DESC sd));
enum sim_stop { sim_running, sim_polling, sim_exited, sim_stopped, sim_signalled }; enum sim_stop { sim_running, sim_polling, sim_exited, sim_stopped, sim_signalled };
void sim_stop_reason PARAMS ((SIM_DESC sd, enum sim_stop *reason, int *sigrc)); void sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc);
/* Passthru for other commands that the simulator might support. /* Passthru for other commands that the simulator might support.
Simulators should be prepared to deal with any combination of NULL Simulators should be prepared to deal with any combination of NULL
or empty CMD. */ or empty CMD. */
void sim_do_command PARAMS ((SIM_DESC sd, char *cmd)); void sim_do_command (SIM_DESC sd, char *cmd);
#ifdef __cplusplus #ifdef __cplusplus
} }