]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add argument compilation documentation.
authorPhil Muldoon <pmuldoon@redhat.com>
Tue, 21 Feb 2017 21:32:56 +0000 (13:32 -0800)
committerKeith Seitz <keiths@redhat.com>
Tue, 21 Feb 2017 21:32:56 +0000 (13:32 -0800)
This expands on the already existing comments and gives a more thorough explanation of the source of the arguments used in the final argument string.

gdb/compile/compile.c

index fb4e6d9b42cc0575f8b4f6d424ece486ad3aa46f..8d57cc980848383fc0e18d351a9c9f7aa6505cfe 100644 (file)
@@ -399,9 +399,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 compiler-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,