* gdb/source.c (source_info): Mention whether the symtab has
authorJim Blandy <jimb@codesourcery.com>
Tue, 11 Jun 2002 20:37:05 +0000 (20:37 +0000)
committerJim Blandy <jimb@codesourcery.com>
Tue, 11 Jun 2002 20:37:05 +0000 (20:37 +0000)
information about preprocessor macros.

* gdb/testsuite/lib/gdb.exp (get_debug_format): Tolerate message
saying whether preprocessor macro information is present.

* gdb/doc/gdb.texinfo (Symbols): Update documentation for `info
source' command.

gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/source.c
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index a9d6a23..9948603 100644 (file)
@@ -1,5 +1,8 @@
 2002-06-11  Jim Blandy  <jimb@redhat.com>
 
+       * source.c (source_info): Mention whether the symtab has
+       information about preprocessor macros.
+
        Call the command `info macro', not `show macro'.
        * macrocmd.c (info_macro_command): Renamed from `show_macro_command'.
        Fix error message.
index 363a3fc..4d1fbb5 100644 (file)
@@ -1,5 +1,8 @@
 2002-06-11  Jim Blandy  <jimb@redhat.com>
 
+       * gdb.texinfo (Symbols): Update documentation for `info source'
+       command.
+
        * gdb.texinfo (Macros): Call the command `info macro', not
        `show macro'.
 
index bff763b..aa39d76 100644 (file)
@@ -9020,9 +9020,25 @@ collect}.
 
 @kindex info source
 @item info source
-Show the name of the current source file---that is, the source file for
-the function containing the current point of execution---and the language
-it was written in.
+Show information about the current source file---that is, the source file for
+the function containing the current point of execution:
+@itemize @bullet
+@item
+the name of the source file, and the directory containing it,
+@item
+the directory it was compiled in,
+@item
+its length, in lines,
+@item
+which programming language it is written in,
+@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
+whether the debugging information includes information about
+preprocessor macros.
+@end itemize
+
 
 @kindex info sources
 @item info sources
index ac74372..c7c1ce2 100644 (file)
@@ -500,6 +500,8 @@ source_info (char *ignore, int from_tty)
 
   printf_filtered ("Source language is %s.\n", language_str (s->language));
   printf_filtered ("Compiled with %s debugging format.\n", s->debugformat);
+  printf_filtered ("%s preprocessor macro info.\n",
+                   s->macro_table ? "Includes" : "Does not include");
 }
 \f
 
index 2d02577..da681a6 100644 (file)
@@ -1,5 +1,8 @@
 2002-06-11  Jim Blandy  <jimb@redhat.com>
 
+       * lib/gdb.exp (get_debug_format): Tolerate message saying whether
+       preprocessor macro information is present.
+
        * macscp.exp, macscp1.c, macscp2.h, macscp3.h, macscp4.h: New
        tests.
 
index d9285e8..8d666f9 100644 (file)
@@ -1440,7 +1440,7 @@ proc get_debug_format { } {
     set debug_format "unknown"
     send_gdb "info source\n"
     gdb_expect 10 {
-       -re "Compiled with (.*) debugging format.\r\n$gdb_prompt $" {
+       -re "Compiled with (.*) debugging format.\r\n.*$gdb_prompt $" {
            set debug_format $expect_out(1,string)
            verbose "debug format is $debug_format"
            return 1;