+2000-07-02 Kevin Buettner <kevinb@redhat.com>
+
+ * generic/gdbtk-cmds.c, generic/gdbtk-hooks.c,
+ generic/gdbtk-variable.c, generic/gdbtk-varobj.c,
+ generic/gdbtk-wrapper.c, generic/gdbtk-wrapper.h,
+ generic/gdbtk.c, generic/gdbtk.h: Eliminate use of PARAMS from
+ declarations in these files.
+
2000-04-17 Jonathan Larmour <jlarmour@redhat.co.uk>
* ChangeLog-gdbtk: Renamed to ChangeLog
#include "annotate.h"
#include <sys/time.h>
-static void setup_architecture_data PARAMS ((void));
+static void setup_architecture_data (void);
static int tracepoint_exists (char *args);
/* This structure filled in call_wrapper and passed to
*/
int disassemble_from_exec = -1;
-extern int gdb_variable_init PARAMS ((Tcl_Interp * interp));
+extern int gdb_variable_init (Tcl_Interp * interp);
/*
* Declarations for routines exported from this file
*/
int Gdbtk_Init (Tcl_Interp * interp);
-int call_wrapper PARAMS ((ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]));
+int call_wrapper (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
/*
* Declarations for routines used only in this file.
*/
-static int compare_lines PARAMS ((const PTR, const PTR));
-static int comp_files PARAMS ((const void *, const void *));
-static int gdb_actions_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_changed_register_list PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_clear_file PARAMS ((ClientData, Tcl_Interp * interp, int,
- Tcl_Obj * CONST[]));
-static int gdb_cmd PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_confirm_quit PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_disassemble PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_eval PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_fetch_registers PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_find_file_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_force_quit PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static struct symtab *full_lookup_symtab PARAMS ((char *file));
-static int gdb_get_args_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_get_breakpoint_info PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_get_breakpoint_list PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_get_file_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_get_function_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_get_line_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_get_locals_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_get_mem PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_get_trace_frame_num PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_get_tracepoint_list PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_get_vars_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_immediate_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_listfiles PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_listfuncs PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_loadfile PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_load_disassembly PARAMS ((ClientData clientData, Tcl_Interp
- *interp,
- int objc, Tcl_Obj *CONST objv[]));
-static int gdb_load_info PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_loc PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_path_conv PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_prompt_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_regnames PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_restore_fputs PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_search PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_set_bp PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_set_bp_addr PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_find_bp_at_line PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_find_bp_at_addr PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdb_stop PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_target_has_execution_command PARAMS ((ClientData,
- Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_trace_status PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
-static int gdb_tracepoint_exists_command PARAMS ((ClientData, Tcl_Interp *,
- int,
- Tcl_Obj * CONST objv[]));
-static int gdb_get_tracepoint_info PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST objv[]));
-static int gdbtk_dis_asm_read_memory PARAMS ((bfd_vma, bfd_byte *, unsigned int,
- disassemble_info *));
-static void gdbtk_load_source PARAMS ((ClientData clientData,
- struct symtab *symtab,
- int start_line, int end_line));
-static CORE_ADDR gdbtk_load_asm PARAMS ((ClientData clientData, CORE_ADDR pc,
- struct disassemble_info *di));
-static void gdbtk_print_source PARAMS ((ClientData clientData,
- struct symtab *symtab,
- int start_line, int end_line));
-static CORE_ADDR gdbtk_print_asm PARAMS ((ClientData clientData, CORE_ADDR pc,
- struct disassemble_info *di));
-static int gdb_disassemble_driver PARAMS ((CORE_ADDR low, CORE_ADDR high,
- int mixed_source_and_assembly,
- ClientData clientData,
- void (*print_source_fn) (ClientData, struct
- symtab *, int, int),
- CORE_ADDR (*print_asm_fn) (ClientData,
- CORE_ADDR,
- struct disassemble_info *)));
-static int get_pc_register PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST []));
-static int gdb_stack PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST []));
-static int gdb_selected_frame PARAMS ((ClientData clientData,
- Tcl_Interp *interp, int argc,
- Tcl_Obj *CONST objv[]));
-static int gdb_selected_block PARAMS ((ClientData clientData,
- Tcl_Interp *interp, int argc,
- Tcl_Obj *CONST objv[]));
-static int gdb_get_blocks PARAMS ((ClientData clientData,
- Tcl_Interp *interp, int objc,
- Tcl_Obj *CONST objv[]));
-static int gdb_block_vars PARAMS ((ClientData clientData,
- Tcl_Interp *interp, int objc,
- Tcl_Obj *CONST objv[]));
-char * get_prompt PARAMS ((void));
-static void get_register PARAMS ((int, void *));
-static void get_register_name PARAMS ((int, void *));
-static int map_arg_registers PARAMS ((int, Tcl_Obj * CONST[],
- void (*)(int, void *), void *));
-static int perror_with_name_wrapper PARAMS ((PTR args));
-static void register_changed_p PARAMS ((int, void *));
+static int compare_lines (const PTR, const PTR);
+static int comp_files (const void *, const void *);
+static int gdb_actions_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_changed_register_list (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
+static int gdb_clear_file (ClientData, Tcl_Interp * interp, int,
+ Tcl_Obj * CONST[]);
+static int gdb_cmd (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_confirm_quit (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
+static int gdb_disassemble (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_eval (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_fetch_registers (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
+static int gdb_find_file_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_force_quit (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static struct symtab *full_lookup_symtab (char *file);
+static int gdb_get_args_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_get_breakpoint_info (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
+static int gdb_get_breakpoint_list (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
+static int gdb_get_file_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_get_function_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_get_line_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_get_locals_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_get_mem (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_get_trace_frame_num (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_get_tracepoint_list (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_get_vars_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_immediate_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
+static int gdb_listfiles (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_listfuncs (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_loadfile (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_load_disassembly (ClientData clientData, Tcl_Interp
+ * interp, int objc, Tcl_Obj * CONST objv[]);
+static int gdb_load_info (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_loc (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_path_conv (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_prompt_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_regnames (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_restore_fputs (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
+static int gdb_search (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST objv[]);
+static int gdb_set_bp (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST objv[]);
+static int gdb_set_bp_addr (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_find_bp_at_line (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_find_bp_at_addr (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdb_stop (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_target_has_execution_command (ClientData,
+ Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
+static int gdb_trace_status (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
+static int gdb_tracepoint_exists_command (ClientData, Tcl_Interp *,
+ int, Tcl_Obj * CONST objv[]);
+static int gdb_get_tracepoint_info (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST objv[]);
+static int gdbtk_dis_asm_read_memory (bfd_vma, bfd_byte *, unsigned int,
+ disassemble_info *);
+static void gdbtk_load_source (ClientData clientData,
+ struct symtab *symtab,
+ int start_line, int end_line);
+static CORE_ADDR gdbtk_load_asm (ClientData clientData, CORE_ADDR pc,
+ struct disassemble_info *di);
+static void gdbtk_print_source (ClientData clientData,
+ struct symtab *symtab,
+ int start_line, int end_line);
+static CORE_ADDR gdbtk_print_asm (ClientData clientData, CORE_ADDR pc,
+ struct disassemble_info *di);
+static int gdb_disassemble_driver (CORE_ADDR low, CORE_ADDR high,
+ int mixed_source_and_assembly,
+ ClientData clientData,
+ void (*print_source_fn) (ClientData, struct
+ symtab *, int,
+ int),
+ CORE_ADDR (*print_asm_fn) (ClientData,
+ CORE_ADDR,
+ struct
+ disassemble_info
+ *));
+static int get_pc_register (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_stack (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+static int gdb_selected_frame (ClientData clientData,
+ Tcl_Interp * interp, int argc,
+ Tcl_Obj * CONST objv[]);
+static int gdb_selected_block (ClientData clientData,
+ Tcl_Interp * interp, int argc,
+ Tcl_Obj * CONST objv[]);
+static int gdb_get_blocks (ClientData clientData,
+ Tcl_Interp * interp, int objc,
+ Tcl_Obj * CONST objv[]);
+static int gdb_block_vars (ClientData clientData,
+ Tcl_Interp * interp, int objc,
+ Tcl_Obj * CONST objv[]);
+char *get_prompt (void);
+static void get_register (int, void *);
+static void get_register_name (int, void *);
+static int map_arg_registers (int, Tcl_Obj * CONST[],
+ void (*)(int, void *), void *);
+static int perror_with_name_wrapper (PTR args);
+static void register_changed_p (int, void *);
static int wrapped_call (PTR opaque_args);
-static void get_frame_name PARAMS ((Tcl_Interp * interp, Tcl_Obj * list,
- struct frame_info * fi));
-char *pc_function_name PARAMS ((CORE_ADDR pc));
+static void get_frame_name (Tcl_Interp * interp, Tcl_Obj * list,
+ struct frame_info *fi);
+char *pc_function_name (CORE_ADDR pc);
\f
/* Gdbtk_Init
extern void (*selected_frame_level_changed_hook) PARAMS ((int));
extern int (*ui_loop_hook) PARAMS ((int));
-static void gdbtk_create_tracepoint PARAMS ((struct tracepoint *));
-static void gdbtk_delete_tracepoint PARAMS ((struct tracepoint *));
-static void gdbtk_modify_tracepoint PARAMS ((struct tracepoint *));
-static void gdbtk_trace_find PARAMS ((char *arg, int from_tty));
-static void gdbtk_trace_start_stop PARAMS ((int, int));
-static void gdbtk_create_breakpoint PARAMS ((struct breakpoint *));
-static void gdbtk_delete_breakpoint PARAMS ((struct breakpoint *));
-static void gdbtk_modify_breakpoint PARAMS ((struct breakpoint *));
-static void gdbtk_attach PARAMS ((void));
-static void gdbtk_detach PARAMS ((void));
-static void gdbtk_file_changed PARAMS ((char *));
-static void gdbtk_exec_file_display PARAMS ((char *));
-static void tk_command_loop PARAMS ((void));
-static void gdbtk_call_command PARAMS ((struct cmd_list_element *, char *, int));
-static int gdbtk_wait PARAMS ((int, struct target_waitstatus *));
-int x_event PARAMS ((int));
-static int gdbtk_query PARAMS ((const char *, va_list));
-static void gdbtk_warning PARAMS ((const char *, va_list));
-static char *gdbtk_readline PARAMS ((char *));
+static void gdbtk_create_tracepoint (struct tracepoint *);
+static void gdbtk_delete_tracepoint (struct tracepoint *);
+static void gdbtk_modify_tracepoint (struct tracepoint *);
+static void gdbtk_trace_find (char *arg, int from_tty);
+static void gdbtk_trace_start_stop (int, int);
+static void gdbtk_create_breakpoint (struct breakpoint *);
+static void gdbtk_delete_breakpoint (struct breakpoint *);
+static void gdbtk_modify_breakpoint (struct breakpoint *);
+static void gdbtk_attach (void);
+static void gdbtk_detach (void);
+static void gdbtk_file_changed (char *);
+static void gdbtk_exec_file_display (char *);
+static void tk_command_loop (void);
+static void gdbtk_call_command (struct cmd_list_element *, char *, int);
+static int gdbtk_wait (int, struct target_waitstatus *);
+int x_event (int);
+static int gdbtk_query (const char *, va_list);
+static void gdbtk_warning (const char *, va_list);
+static char *gdbtk_readline (char *);
static void gdbtk_readline_begin (char *format,...);
-static void gdbtk_readline_end PARAMS ((void));
-static void gdbtk_pre_add_symbol PARAMS ((char *));
-static void gdbtk_print_frame_info PARAMS ((struct symtab *, int, int, int));
-static void gdbtk_post_add_symbol PARAMS ((void));
-static void gdbtk_register_changed PARAMS ((int regno));
-static void gdbtk_memory_changed PARAMS ((CORE_ADDR addr, int len));
-static void tracepoint_notify PARAMS ((struct tracepoint *, const char *));
-static void gdbtk_selected_frame_changed PARAMS ((int));
-static void gdbtk_context_change PARAMS ((int));
-static void gdbtk_error_begin PARAMS ((void));
+static void gdbtk_readline_end (void);
+static void gdbtk_pre_add_symbol (char *);
+static void gdbtk_print_frame_info (struct symtab *, int, int, int);
+static void gdbtk_post_add_symbol (void);
+static void gdbtk_register_changed (int regno);
+static void gdbtk_memory_changed (CORE_ADDR addr, int len);
+static void tracepoint_notify (struct tracepoint *, const char *);
+static void gdbtk_selected_frame_changed (int);
+static void gdbtk_context_change (int);
+static void gdbtk_error_begin (void);
static void report_error (void);
static void gdbtk_annotate_signal (void);
static void gdbtk_set_hook (struct cmd_list_element *cmdblk);
void gdbtk_fputs (const char *, struct ui_file *);
static int gdbtk_load_hash (const char *, unsigned long);
-static void breakpoint_notify PARAMS ((struct breakpoint *, const char *));
+static void breakpoint_notify (struct breakpoint *, const char *);
/*
* gdbtk_add_hooks - add all the hooks to gdb. This will get called by the
* Public functions defined in this file
*/
-int gdb_variable_init PARAMS ((Tcl_Interp *));
+int gdb_variable_init (Tcl_Interp *);
/*
* Private functions defined in this file
/* Entries into this file */
-static int gdb_variable_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST[]));
+static int gdb_variable_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
-static int variable_obj_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST[]));
+static int variable_obj_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
/* Variable object subcommands */
-static int variable_create PARAMS ((Tcl_Interp *, int, Tcl_Obj *CONST[]));
+static int variable_create (Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static void variable_delete PARAMS ((Tcl_Interp *, gdb_variable *));
+static void variable_delete (Tcl_Interp *, gdb_variable *);
-static Tcl_Obj *variable_children PARAMS ((Tcl_Interp *, gdb_variable *));
+static Tcl_Obj *variable_children (Tcl_Interp *, gdb_variable *);
-static int variable_format PARAMS ((Tcl_Interp *, int, Tcl_Obj *CONST[],
- gdb_variable *));
+static int variable_format (Tcl_Interp *, int, Tcl_Obj * CONST[],
+ gdb_variable *);
-static int variable_type PARAMS ((Tcl_Interp *, int, Tcl_Obj *CONST[],
- gdb_variable *));
+static int variable_type (Tcl_Interp *, int, Tcl_Obj * CONST[],
+ gdb_variable *);
-static int variable_value PARAMS ((Tcl_Interp *, int, Tcl_Obj *CONST[],
- gdb_variable *));
+static int variable_value (Tcl_Interp *, int, Tcl_Obj * CONST[],
+ gdb_variable *);
-static int variable_editable PARAMS ((gdb_variable *));
+static int variable_editable (gdb_variable *);
-static int my_value_of_variable PARAMS ((gdb_variable *var, Tcl_Obj **obj));
+static int my_value_of_variable (gdb_variable * var, Tcl_Obj ** obj);
-static Tcl_Obj *variable_update PARAMS ((Tcl_Interp *interp, gdb_variable *var));
+static Tcl_Obj *variable_update (Tcl_Interp * interp, gdb_variable * var);
/* Helper functions for the above subcommands. */
-static gdb_variable *create_variable PARAMS ((char *name, CORE_ADDR frame));
+static gdb_variable *create_variable (char *name, CORE_ADDR frame);
-static void delete_children PARAMS ((Tcl_Interp *, gdb_variable *, int));
+static void delete_children (Tcl_Interp *, gdb_variable *, int);
-static void install_variable PARAMS ((Tcl_Interp *, char *, gdb_variable *));
+static void install_variable (Tcl_Interp *, char *, gdb_variable *);
-static void uninstall_variable PARAMS ((Tcl_Interp *, gdb_variable *));
+static void uninstall_variable (Tcl_Interp *, gdb_variable *);
-static gdb_variable *child_exists PARAMS ((gdb_variable *, char *));
+static gdb_variable *child_exists (gdb_variable *, char *);
-static gdb_variable *create_child PARAMS ((Tcl_Interp *, gdb_variable *,
- int, char *));
-static char *name_of_child PARAMS ((gdb_variable *, int));
+static gdb_variable *create_child (Tcl_Interp *, gdb_variable *, int, char *);
+static char *name_of_child (gdb_variable *, int);
-static int number_of_children PARAMS ((gdb_variable *));
+static int number_of_children (gdb_variable *);
-static enum display_format variable_default_display PARAMS ((gdb_variable *));
+static enum display_format variable_default_display (gdb_variable *);
-static void save_child_in_parent PARAMS ((gdb_variable *, gdb_variable *));
+static void save_child_in_parent (gdb_variable *, gdb_variable *);
-static void remove_child_from_parent PARAMS ((gdb_variable *, gdb_variable *));
+static void remove_child_from_parent (gdb_variable *, gdb_variable *);
/* Utility routines */
-static struct type *get_type PARAMS ((gdb_variable *var));
+static struct type *get_type (gdb_variable * var);
-static struct type *get_type_deref PARAMS ((gdb_variable *var));
+static struct type *get_type_deref (gdb_variable * var);
-static struct type *get_target_type PARAMS ((struct type *));
+static struct type *get_target_type (struct type *);
-static Tcl_Obj *get_call_output PARAMS ((void));
+static Tcl_Obj *get_call_output (void);
-static void clear_gdb_output PARAMS ((void));
+static void clear_gdb_output (void);
-static int call_gdb_type_print PARAMS ((value_ptr));
+static int call_gdb_type_print (value_ptr);
-static int call_gdb_val_print PARAMS ((value_ptr, int));
+static int call_gdb_val_print (value_ptr, int);
static void variable_fputs (const char *, struct ui_file *);
static void null_fputs (const char *, struct ui_file *);
-static int my_value_equal PARAMS ((gdb_variable *, value_ptr));
+static int my_value_equal (gdb_variable *, value_ptr);
-static void vpush PARAMS ((struct vstack **pstack, gdb_variable *var));
+static void vpush (struct vstack **pstack, gdb_variable * var);
-static gdb_variable *vpop PARAMS ((struct vstack **pstack));
+static gdb_variable *vpop (struct vstack **pstack);
/* Language-specific routines. */
-static value_ptr value_of_child PARAMS ((gdb_variable *parent, int index));
+static value_ptr value_of_child (gdb_variable * parent, int index);
-static value_ptr value_of_root PARAMS ((gdb_variable *var));
+static value_ptr value_of_root (gdb_variable * var);
-static struct type *type_of_child PARAMS ((gdb_variable *var));
+static struct type *type_of_child (gdb_variable * var);
-static int type_changeable PARAMS ((gdb_variable *var));
+static int type_changeable (gdb_variable * var);
-static int c_number_of_children PARAMS ((gdb_variable *var));
+static int c_number_of_children (gdb_variable * var);
-static char *c_name_of_child PARAMS ((gdb_variable *parent, int index));
+static char *c_name_of_child (gdb_variable * parent, int index);
-static value_ptr c_value_of_root PARAMS ((gdb_variable *var));
+static value_ptr c_value_of_root (gdb_variable * var);
-static value_ptr c_value_of_child PARAMS ((gdb_variable *parent, int index));
+static value_ptr c_value_of_child (gdb_variable * parent, int index);
-static struct type *c_type_of_child PARAMS ((gdb_variable *parent, int index));
+static struct type *c_type_of_child (gdb_variable * parent, int index);
-static int c_variable_editable PARAMS ((gdb_variable *var));
+static int c_variable_editable (gdb_variable * var);
-static int c_value_of_variable PARAMS ((gdb_variable *var, Tcl_Obj **obj));
+static int c_value_of_variable (gdb_variable * var, Tcl_Obj ** obj);
-static int cplus_number_of_children PARAMS ((gdb_variable *var));
+static int cplus_number_of_children (gdb_variable * var);
-static void cplus_class_num_children PARAMS ((struct type *type, int children[3]));
+static void cplus_class_num_children (struct type *type, int children[3]);
-static char *cplus_name_of_child PARAMS ((gdb_variable *parent, int index));
+static char *cplus_name_of_child (gdb_variable * parent, int index);
-static value_ptr cplus_value_of_root PARAMS ((gdb_variable *var));
+static value_ptr cplus_value_of_root (gdb_variable * var);
-static value_ptr cplus_value_of_child PARAMS ((gdb_variable *parent, int index));
+static value_ptr cplus_value_of_child (gdb_variable * parent, int index);
-static struct type *cplus_type_of_child PARAMS ((gdb_variable *parent, int index));
+static struct type *cplus_type_of_child (gdb_variable * parent, int index);
-static int cplus_variable_editable PARAMS ((gdb_variable *var));
+static int cplus_variable_editable (gdb_variable * var);
-static int cplus_value_of_variable PARAMS ((gdb_variable *var, Tcl_Obj **obj));
+static int cplus_value_of_variable (gdb_variable * var, Tcl_Obj ** obj);
-static int java_number_of_children PARAMS ((gdb_variable *var));
+static int java_number_of_children (gdb_variable * var);
-static char *java_name_of_child PARAMS ((gdb_variable *parent, int index));
+static char *java_name_of_child (gdb_variable * parent, int index);
-static value_ptr java_value_of_root PARAMS ((gdb_variable *var));
+static value_ptr java_value_of_root (gdb_variable * var);
-static value_ptr java_value_of_child PARAMS ((gdb_variable *parent, int index));
+static value_ptr java_value_of_child (gdb_variable * parent, int index);
-static struct type *java_type_of_child PARAMS ((gdb_variable *parent, int index));
+static struct type *java_type_of_child (gdb_variable * parent, int index);
-static int java_variable_editable PARAMS ((gdb_variable *var));
+static int java_variable_editable (gdb_variable * var);
-static int java_value_of_variable PARAMS ((gdb_variable *var, Tcl_Obj **obj));
+static int java_value_of_variable (gdb_variable * var, Tcl_Obj ** obj);
-static enum vlanguage variable_language PARAMS ((gdb_variable *var));
+static enum vlanguage variable_language (gdb_variable * var);
-static gdb_variable *new_variable PARAMS ((void));
+static gdb_variable *new_variable (void);
static gdb_variable *new_root_variable (void);
-static void free_variable PARAMS ((gdb_variable *var));
+static void free_variable (gdb_variable * var);
/* String representations of gdb's format codes */
char *format_string[] = {"natural", "binary", "decimal", "hexadecimal", "octal"};
* Public functions defined in this file
*/
-int gdb_variable_init PARAMS ((Tcl_Interp *));
+int gdb_variable_init (Tcl_Interp *);
/*
* Private functions defined in this file
/* Entries into this file */
-static int gdb_variable_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
+static int gdb_variable_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
-static int variable_obj_command PARAMS ((ClientData, Tcl_Interp *, int,
- Tcl_Obj * CONST[]));
+static int variable_obj_command (ClientData, Tcl_Interp *, int,
+ Tcl_Obj * CONST[]);
/* Variable object subcommands */
-static int variable_create PARAMS ((Tcl_Interp *, int, Tcl_Obj * CONST[]));
+static int variable_create (Tcl_Interp *, int, Tcl_Obj * CONST[]);
-static void variable_delete PARAMS ((Tcl_Interp *, struct varobj *, int));
+static void variable_delete (Tcl_Interp *, struct varobj *, int);
-static Tcl_Obj *variable_children PARAMS ((Tcl_Interp *, struct varobj *));
+static Tcl_Obj *variable_children (Tcl_Interp *, struct varobj *);
-static int variable_format PARAMS ((Tcl_Interp *, int, Tcl_Obj * CONST[],
- struct varobj *));
+static int variable_format (Tcl_Interp *, int, Tcl_Obj * CONST[],
+ struct varobj *);
-static int variable_type PARAMS ((Tcl_Interp *, int, Tcl_Obj * CONST[],
- struct varobj *));
+static int variable_type (Tcl_Interp *, int, Tcl_Obj * CONST[],
+ struct varobj *);
-static int variable_value PARAMS ((Tcl_Interp *, int, Tcl_Obj * CONST[],
- struct varobj *));
+static int variable_value (Tcl_Interp *, int, Tcl_Obj * CONST[],
+ struct varobj *);
-static Tcl_Obj *variable_update PARAMS ((Tcl_Interp * interp, struct varobj * var));
+static Tcl_Obj *variable_update (Tcl_Interp * interp, struct varobj *var);
/* Helper functions for the above subcommands. */
-static void install_variable PARAMS ((Tcl_Interp *, char *, struct varobj *));
+static void install_variable (Tcl_Interp *, char *, struct varobj *);
-static void uninstall_variable PARAMS ((Tcl_Interp *, char *));
+static void uninstall_variable (Tcl_Interp *, char *);
/* String representations of gdb's format codes */
char *format_string[] =
* Wrapper functions exported to the world
*/
-gdb_result GDB_value_fetch_lazy PARAMS ((value_ptr));
+gdb_result GDB_value_fetch_lazy (value_ptr);
-gdb_result GDB_evaluate_expression PARAMS ((struct expression *, value_ptr *));
+gdb_result GDB_evaluate_expression (struct expression *, value_ptr *);
-gdb_result GDB_type_print PARAMS ((value_ptr, char *, struct ui_file *, int));
+gdb_result GDB_type_print (value_ptr, char *, struct ui_file *, int);
-gdb_result GDB_val_print PARAMS ((struct type * type, char *valaddr,
- CORE_ADDR address, struct ui_file * stream,
- int format, int deref_ref, int recurse,
- enum val_prettyprint pretty));
+gdb_result GDB_val_print (struct type *type, char *valaddr,
+ CORE_ADDR address, struct ui_file *stream,
+ int format, int deref_ref, int recurse,
+ enum val_prettyprint pretty);
-gdb_result GDB_select_frame PARAMS ((struct frame_info *, int));
+gdb_result GDB_select_frame (struct frame_info *, int);
-gdb_result GDB_value_equal PARAMS ((value_ptr, value_ptr, int *));
+gdb_result GDB_value_equal (value_ptr, value_ptr, int *);
-gdb_result GDB_parse_exp_1 PARAMS ((char **stringptr, struct block * block, int comma,
- struct expression ** result));
+gdb_result GDB_parse_exp_1 (char **stringptr, struct block *block, int comma,
+ struct expression **result);
-gdb_result GDB_evaluate_type PARAMS ((struct expression * exp, value_ptr * result));
+gdb_result GDB_evaluate_type (struct expression *exp, value_ptr * result);
-gdb_result GDB_block_for_pc PARAMS ((CORE_ADDR pc, struct block ** result));
+gdb_result GDB_block_for_pc (CORE_ADDR pc, struct block **result);
-gdb_result GDB_block_innermost_frame PARAMS ((struct block * block,
- struct frame_info ** result));
+gdb_result GDB_block_innermost_frame (struct block *block,
+ struct frame_info **result);
-gdb_result GDB_reinit_frame_cache PARAMS ((void));
+gdb_result GDB_reinit_frame_cache (void);
-gdb_result GDB_find_frame_addr_in_frame_chain PARAMS ((CORE_ADDR addr,
- struct frame_info ** result));
+gdb_result GDB_find_frame_addr_in_frame_chain (CORE_ADDR addr,
+ struct frame_info **result);
-gdb_result GDB_value_ind PARAMS ((value_ptr val, value_ptr * rval));
+gdb_result GDB_value_ind (value_ptr val, value_ptr * rval);
-gdb_result GDB_value_slice PARAMS ((value_ptr val, int low, int num,
- value_ptr * rval));
+gdb_result GDB_value_slice (value_ptr val, int low, int num,
+ value_ptr * rval);
-gdb_result GDB_value_coerce_array PARAMS ((value_ptr val, value_ptr * rval));
+gdb_result GDB_value_coerce_array (value_ptr val, value_ptr * rval);
-gdb_result GDB_value_struct_elt PARAMS ((value_ptr * argp, value_ptr * args,
- char *name, int *static_memfunc,
- char *err, value_ptr * rval));
+gdb_result GDB_value_struct_elt (value_ptr * argp, value_ptr * args,
+ char *name, int *static_memfunc,
+ char *err, value_ptr * rval);
-gdb_result GDB_value_cast PARAMS ((struct type * type, value_ptr val, value_ptr * rval));
+gdb_result GDB_value_cast (struct type *type, value_ptr val,
+ value_ptr * rval);
-gdb_result GDB_get_frame_block PARAMS ((struct frame_info * fi, struct block ** rval));
+gdb_result GDB_get_frame_block (struct frame_info *fi, struct block **rval);
-gdb_result GDB_get_prev_frame PARAMS ((struct frame_info *fi,
- struct frame_info **result));
+gdb_result GDB_get_prev_frame (struct frame_info *fi,
+ struct frame_info **result);
-gdb_result GDB_get_next_frame PARAMS ((struct frame_info *fi,
- struct frame_info **result));
+gdb_result GDB_get_next_frame (struct frame_info *fi,
+ struct frame_info **result);
-gdb_result GDB_find_relative_frame PARAMS ((struct frame_info *fi,
- int *start,
- struct frame_info **result));
+gdb_result GDB_find_relative_frame (struct frame_info *fi,
+ int *start, struct frame_info **result);
-gdb_result GDB_get_current_frame PARAMS ((struct frame_info **result));
+gdb_result GDB_get_current_frame (struct frame_info **result);
/*
* Private functions for this file
*/
-static gdb_result call_wrapped_function PARAMS ((catch_errors_ftype *,
- struct gdb_wrapper_arguments *));
+static gdb_result call_wrapped_function (catch_errors_ftype *,
+ struct gdb_wrapper_arguments *);
-static int wrap_type_print PARAMS ((char *));
+static int wrap_type_print (char *);
-static int wrap_evaluate_expression PARAMS ((char *));
+static int wrap_evaluate_expression (char *);
-static int wrap_value_fetch_lazy PARAMS ((char *));
+static int wrap_value_fetch_lazy (char *);
-static int wrap_val_print PARAMS ((char *));
+static int wrap_val_print (char *);
-static int wrap_select_frame PARAMS ((char *));
+static int wrap_select_frame (char *);
-static int wrap_value_equal PARAMS ((char *));
+static int wrap_value_equal (char *);
-static int wrap_parse_exp_1 PARAMS ((char *opaque_arg));
+static int wrap_parse_exp_1 (char *opaque_arg);
-static int wrap_evaluate_type PARAMS ((char *opaque_arg));
+static int wrap_evaluate_type (char *opaque_arg);
-static int wrap_block_for_pc PARAMS ((char *opaque_arg));
+static int wrap_block_for_pc (char *opaque_arg);
-static int wrap_block_innermost_frame PARAMS ((char *opaque_arg));
+static int wrap_block_innermost_frame (char *opaque_arg);
-static int wrap_reinit_frame_cache PARAMS ((char *opaque_arg));
+static int wrap_reinit_frame_cache (char *opaque_arg);
-static int wrap_find_frame_addr_in_frame_chain PARAMS ((char *opaque_arg));
+static int wrap_find_frame_addr_in_frame_chain (char *opaque_arg);
-static int wrap_value_ind PARAMS ((char *opaque_arg));
+static int wrap_value_ind (char *opaque_arg);
-static int wrap_value_slice PARAMS ((char *opaque_arg));
+static int wrap_value_slice (char *opaque_arg);
-static int wrap_value_coerce_array PARAMS ((char *opaque_arg));
+static int wrap_value_coerce_array (char *opaque_arg);
-static int wrap_value_struct_elt PARAMS ((char *opaque_arg));
+static int wrap_value_struct_elt (char *opaque_arg);
-static int wrap_value_cast PARAMS ((char *opaque_arg));
+static int wrap_value_cast (char *opaque_arg);
-static int wrap_get_frame_block PARAMS ((char *opaque_arg));
+static int wrap_get_frame_block (char *opaque_arg);
-static int wrap_get_prev_frame PARAMS ((char *opaque_arg));
+static int wrap_get_prev_frame (char *opaque_arg);
-static int wrap_get_next_frame PARAMS ((char *opaque_arg));
+static int wrap_get_next_frame (char *opaque_arg);
-static int wrap_find_relative_frame PARAMS ((char *opaque_arg));
+static int wrap_find_relative_frame (char *opaque_arg);
-static int wrap_get_current_frame PARAMS ((char *opaque_arg));
+static int wrap_get_current_frame (char *opaque_arg);
\f
static gdb_result
call_wrapped_function (fn, arg)
/* This list of functions which have been wrapped. Please keep this list
in alphabetical order, using "GDB_" to prefix the actual name of the
function. */
-extern gdb_result GDB_evaluate_expression PARAMS ((struct expression *expr, value_ptr *val));
-extern gdb_result GDB_select_frame PARAMS ((struct frame_info *fi, int level));
-extern gdb_result GDB_type_print PARAMS ((value_ptr val, char *varstring,
- struct ui_file *stream, int show));
-extern gdb_result GDB_val_print PARAMS ((struct type *type, char *valaddr,
- CORE_ADDR address, struct ui_file *stream,
- int format, int deref_ref, int recurse,
- enum val_prettyprint pretty));
-extern gdb_result GDB_value_fetch_lazy PARAMS ((value_ptr value));
-extern gdb_result GDB_value_equal PARAMS ((value_ptr val1, value_ptr val2, int *result));
-extern gdb_result GDB_parse_exp_1 PARAMS ((char **stringptr, struct block *block, int comma,
- struct expression **result));
-extern gdb_result GDB_evaluate_type PARAMS ((struct expression *exp, value_ptr *result));
-extern gdb_result GDB_block_for_pc PARAMS ((CORE_ADDR pc, struct block **result));
-extern gdb_result GDB_block_innermost_frame PARAMS ((struct block *block,
- struct frame_info **result));
-extern gdb_result GDB_reinit_frame_cache PARAMS ((void));
-extern gdb_result GDB_find_frame_addr_in_frame_chain PARAMS ((CORE_ADDR addr,
- struct frame_info **result));
-extern gdb_result GDB_value_ind PARAMS ((value_ptr val, value_ptr *rval));
-extern gdb_result GDB_value_slice PARAMS ((value_ptr val, int low, int num,
- value_ptr *rval));
-extern gdb_result GDB_value_coerce_array PARAMS ((value_ptr val, value_ptr *rval));
-extern gdb_result GDB_value_struct_elt PARAMS ((value_ptr *argp, value_ptr *args,
- char *name, int *static_memfunc,
- char *err, value_ptr *rval));
-extern gdb_result GDB_value_cast PARAMS ((struct type *type, value_ptr val,
- value_ptr *rval));
-gdb_result GDB_get_frame_block PARAMS ((struct frame_info *fi, struct block **rval));
-extern gdb_result GDB_get_prev_frame PARAMS ((struct frame_info *fi,
- struct frame_info **result));
-extern gdb_result GDB_get_next_frame PARAMS ((struct frame_info *fi,
- struct frame_info **result));
-extern gdb_result GDB_find_relative_frame PARAMS ((struct frame_info *fi,
- int *start,
- struct frame_info **result));
-extern gdb_result GDB_get_current_frame PARAMS ((struct frame_info **result));
+extern gdb_result GDB_evaluate_expression (struct expression *expr,
+ value_ptr * val);
+extern gdb_result GDB_select_frame (struct frame_info *fi, int level);
+extern gdb_result GDB_type_print (value_ptr val, char *varstring,
+ struct ui_file *stream, int show);
+extern gdb_result GDB_val_print (struct type *type, char *valaddr,
+ CORE_ADDR address, struct ui_file *stream,
+ int format, int deref_ref, int recurse,
+ enum val_prettyprint pretty);
+extern gdb_result GDB_value_fetch_lazy (value_ptr value);
+extern gdb_result GDB_value_equal (value_ptr val1, value_ptr val2,
+ int *result);
+extern gdb_result GDB_parse_exp_1 (char **stringptr, struct block *block,
+ int comma, struct expression **result);
+extern gdb_result GDB_evaluate_type (struct expression *exp,
+ value_ptr * result);
+extern gdb_result GDB_block_for_pc (CORE_ADDR pc, struct block **result);
+extern gdb_result GDB_block_innermost_frame (struct block *block,
+ struct frame_info **result);
+extern gdb_result GDB_reinit_frame_cache (void);
+extern gdb_result GDB_find_frame_addr_in_frame_chain (CORE_ADDR addr,
+ struct frame_info
+ **result);
+extern gdb_result GDB_value_ind (value_ptr val, value_ptr * rval);
+extern gdb_result GDB_value_slice (value_ptr val, int low, int num,
+ value_ptr * rval);
+extern gdb_result GDB_value_coerce_array (value_ptr val, value_ptr * rval);
+extern gdb_result GDB_value_struct_elt (value_ptr * argp, value_ptr * args,
+ char *name, int *static_memfunc,
+ char *err, value_ptr * rval);
+extern gdb_result GDB_value_cast (struct type *type, value_ptr val,
+ value_ptr * rval);
+gdb_result GDB_get_frame_block (struct frame_info *fi, struct block **rval);
+extern gdb_result GDB_get_prev_frame (struct frame_info *fi,
+ struct frame_info **result);
+extern gdb_result GDB_get_next_frame (struct frame_info *fi,
+ struct frame_info **result);
+extern gdb_result GDB_find_relative_frame (struct frame_info *fi,
+ int *start,
+ struct frame_info **result);
+extern gdb_result GDB_get_current_frame (struct frame_info **result);
#endif /* GDBTK_WRAPPER_H */
static struct sigaction act1, act2;
static struct itimerval it_on, it_off;
-static void x_event_wrapper PARAMS ((int));
+static void x_event_wrapper (int);
static void
x_event_wrapper (signo)
int signo;
char *external_editor_command = "tk_dialog .warn-external \\\n\
\"No command is specified.\nUse --tclcommand <tcl/file> or --external-editor <cmd> to specify a new command\" 0 Ok";
-extern int Tktable_Init PARAMS ((Tcl_Interp * interp));
+extern int Tktable_Init (Tcl_Interp * interp);
-static void gdbtk_init PARAMS ((char *));
+static void gdbtk_init (char *);
-void gdbtk_interactive PARAMS ((void));
+void gdbtk_interactive (void);
static void cleanup_init (void *ignore);
-static void tk_command PARAMS ((char *, int));
+static void tk_command (char *, int);
-static int target_should_use_timer PARAMS ((struct target_ops * t));
+static int target_should_use_timer (struct target_ops *t);
-int target_is_native PARAMS ((struct target_ops *t));
+int target_is_native (struct target_ops *t);
-int gdbtk_test PARAMS ((char *));
+int gdbtk_test (char *);
/* Handle for TCL interpreter */
Tcl_Interp *gdbtk_interp = NULL;
*/
extern int Gdbtk_Init (Tcl_Interp * interp);
-extern void gdbtk_stop_timer PARAMS ((void));
-extern void gdbtk_start_timer PARAMS ((void));
-extern void gdbtk_ignorable_warning PARAMS ((const char *, const char *));
-extern void gdbtk_interactive PARAMS ((void));
-extern int x_event PARAMS ((int));
-extern int gdbtk_two_elem_cmd PARAMS ((char *, char *));
-extern int call_wrapper PARAMS ((ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]));
-extern int target_is_native PARAMS ((struct target_ops *t));
+extern void gdbtk_stop_timer (void);
+extern void gdbtk_start_timer (void);
+extern void gdbtk_ignorable_warning (const char *, const char *);
+extern void gdbtk_interactive (void);
+extern int x_event (int);
+extern int gdbtk_two_elem_cmd (char *, char *);
+extern int call_wrapper (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
+extern int target_is_native (struct target_ops *t);
extern void gdbtk_fputs (const char *, struct ui_file *);
#ifdef _WIN32