Update get_args documentation
authorPhil Muldoon <pmuldoon@redhat.com>
Tue, 27 Feb 2018 20:21:23 +0000 (12:21 -0800)
committerKeith Seitz <keiths@redhat.com>
Tue, 27 Feb 2018 20:53:41 +0000 (12:53 -0800)
This patch adds argument compilation documentation, expanding on the
already existing comments, giving a more thorough explanation of
the source of the arguments used in the final argument string.

gdb/ChangeLog:

* compile/compile.c (get_args): Add additional comments
explaining function.

gdb/ChangeLog
gdb/compile/compile.c

index 33fbaac63b0ba24227c61d1ed89929fdc4c9f675..9b899e54d32e884d2ea02f3f9eb3c82b17b962f1 100644 (file)
@@ -1,3 +1,8 @@
+2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
+
+       * compile/compile.c (get_args): Add additional comments
+       explaining function.
+
 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
            Tom Tromey  <tom@tromey.com>
 
index 82e63d895f5342c63481754170d746e138ee693a..70c4570de7d467d960b64f26d07b9ffd13530ef6 100644 (file)
@@ -393,9 +393,25 @@ filter_args (int *argcp, char **argv)
   *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,
This page took 0.028498 seconds and 4 git commands to generate.