#include "valprint.h"
#include "common/gdb_optional.h"
#include "common/gdb_unlinker.h"
+#include "common/pathstuff.h"
\f
eval_compile_command (NULL, arg, scope, NULL);
else
{
- command_line_up l = get_command_line (compile_control, "");
+ counted_command_line l = get_command_line (compile_control, "");
l->control_u.compile.scope = scope;
execute_control_command_untraced (l.get ());
eval_compile_command (NULL, arg, scope, &fmt);
else
{
- command_line_up l = get_command_line (compile_control, "");
+ counted_command_line l = get_command_line (compile_control, "");
l->control_u.compile.scope = scope;
l->control_u.compile.scope_data = &fmt;
*destv = NULL;
}
-/* Produce final vector of GCC compilation options. First element is target
- size ("-m64", "-m32" etc.), optionally followed by DW_AT_producer options
- and then compile-args string GDB variable. */
+/* Produce final vector of GCC compilation options.
+
+ The first element of the combined argument vector are arguments
+ relating to the target size ("-m64", "-m32" etc.). These are
+ sourced from the inferior's architecture.
+
+ The second element of the combined argument vector are arguments
+ stored in the inferior DW_AT_producer section. If these are stored
+ in the inferior (there is no guarantee that they are), they are
+ added to the vector.
+
+ The third element of the combined argument vector are argument
+ supplied by the language implementation provided by
+ compile-{lang}-support. These contain language specific arguments.
+
+ The final element of the combined argument vector are arguments
+ supplied by the "set compile-args" command. These are always
+ appended last so as to override any of the arguments automatically
+ generated above. */
static void
get_args (const struct compile_instance *compiler, struct gdbarch *gdbarch,
{
struct command_line *iter;
- for (iter = cmd->body_list[0]; iter; iter = iter->next)
+ for (iter = cmd->body_list_0.get (); iter; iter = iter->next)
{
input_buf.puts (iter->line);
input_buf.puts ("\n");