summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/doc/ChangeLog3
-rw-r--r--gdb/doc/gdb.texinfo22
-rw-r--r--gdb/source.c2
-rw-r--r--gdb/testsuite/ChangeLog3
-rw-r--r--gdb/testsuite/lib/gdb.exp2
6 files changed, 31 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a9d6a23f39b..99486033bbf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 363a3fcf87a..4d1fbb581f7 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -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'.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index bff763b6a7b..aa39d767530 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -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
diff --git a/gdb/source.c b/gdb/source.c
index ac743724058..c7c1ce2f5d2 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -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");
}
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2d02577bfe8..da681a6b34e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d9285e86945..8d666f936ef 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -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;