aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-11-22 00:23:13 +0000
committerTom Tromey <tromey@redhat.com>2001-11-22 00:23:13 +0000
commit552c04a7423afb694bd4948e8896b3c4cc4be816 (patch)
treed8dc2eb4aa8f8fcaafcd69d55584e295a99541f3 /gdb/gdbarch.h
parentaa26fa3a7e8aaec115e103eaf2108e7023e658c2 (diff)
downloadgdb-552c04a7423afb694bd4948e8896b3c4cc4be816.zip
gdb-552c04a7423afb694bd4948e8896b3c4cc4be816.tar.gz
gdb-552c04a7423afb694bd4948e8896b3c4cc4be816.tar.bz2
Fix for PR gdb/209, PR gdb/156:
* gdbarch.c, gdbarch.h: Rebuilt. * gdbarch.sh: Added `construct_inferior_arguments'. * cli/cli-decode.h (cmd_list_element): Added pre_show_hook. Typo fix. * cli/cli-setshow.c (do_setshow_command): Call the pre_show_hook. * infcmd.c (_initialize_infcmd): Set sfunc on `set args' command. (inferior_argc, inferior_argv): New globals. (notice_args_set): New function. (set_inferior_args): Clear inferior_argc and inferior_argv. (set_inferior_args_vector): New function. (get_inferior_args): Handle inferior argument vector. (run_command): Use get_inferior_args(). (notice_args_read): New function. (_initialize_infcmd): Don't call set_inferior_args. * command.h: Typo fix. (cmd_list_element): Added pre_show_hook. * main.c (captured_main): Added --args option. (print_gdb_help): Document --args. * inferior.h (construct_inferior_arguments): Declare. (set_inferior_args_vector): Likewise. * fork-child.c (construct_inferior_arguments): New function.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index c639476..52fb9d7 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2113,6 +2113,19 @@ typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, COR
extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr);
extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p);
+/* Given a vector of command-line arguments, return a newly allocated
+ string which, when passed to the create_inferior function, will be
+ parsed (on Unix systems, by the shell) to yield the same vector.
+ This function should call error() if the argument vector is not
+ representable for this target or if this target does not support
+ command-line arguments.
+ ARGC is the number of elements in the vector.
+ ARGV is an array of strings, one per argument. */
+
+typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv);
+extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv);
+extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);