+2015-01-30 Doug Evans <dje@google.com>
+
+ * NEWS: "info source" command now display producer string if present.
+ * source.c (source_info): Print producer string if present.
+
2015-01-30 Simon Marchi <simon.marchi@ericsson.com>
* varobj.c (varobj_delete): Fix comment.
*** Changes since GDB 7.9
+* The "info source" command now displays the producer string if it was
+ present in the debug info. This typically includes the compiler version
+ and may include things like its command line arguments.
+
* Python Scripting
** gdb.Objfile objects have a new attribute "username",
+2015-01-30 Doug Evans <dje@google.com>
+
+ * gdb.texinfo (Symbols) <info source>: Output now contains producer
+ string if present.
+
2015-01-27 Doug Evans <dje@google.com>
* python.texi (Objfiles In Python): Document Objfile.username.
@item
which programming language it is written in,
@item
+if the debug information provides it, the program that compiled the file
+(which may include, e.g., the compiler version and command line arguments),
+@item
whether the executable includes debugging information for that file, and
if so, what format the information is in (e.g., STABS, Dwarf 2, etc.), and
@item
source_info (char *ignore, int from_tty)
{
struct symtab *s = current_source_symtab;
+ struct compunit_symtab *cust;
if (!s)
{
printf_filtered (_("No current source file.\n"));
return;
}
+
+ cust = SYMTAB_COMPUNIT (s);
printf_filtered (_("Current source file is %s\n"), s->filename);
if (SYMTAB_DIRNAME (s) != NULL)
printf_filtered (_("Compilation directory is %s\n"), SYMTAB_DIRNAME (s));
s->nlines == 1 ? "" : "s");
printf_filtered (_("Source language is %s.\n"), language_str (s->language));
+ printf_filtered (_("Producer is %s.\n"),
+ COMPUNIT_PRODUCER (cust) != NULL
+ ? COMPUNIT_PRODUCER (cust) : _("unknown"));
printf_filtered (_("Compiled with %s debugging format.\n"),
- COMPUNIT_DEBUGFORMAT (SYMTAB_COMPUNIT (s)));
+ COMPUNIT_DEBUGFORMAT (cust));
printf_filtered (_("%s preprocessor macro info.\n"),
- COMPUNIT_MACRO_TABLE (SYMTAB_COMPUNIT (s)) != NULL
+ COMPUNIT_MACRO_TABLE (cust) != NULL
? "Includes" : "Does not include");
}
\f