aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-06-11 20:37:05 +0000
committerJim Blandy <jimb@codesourcery.com>2002-06-11 20:37:05 +0000
commit919d772c556e521f21902cfdf3ac67e3468fce12 (patch)
tree4265c076a6980721d71d6c5f92f2ac4476629c37 /gdb
parent6827a8f8fe10eb8f47681e3d8566a50e310faf29 (diff)
downloadgdb-919d772c556e521f21902cfdf3ac67e3468fce12.zip
gdb-919d772c556e521f21902cfdf3ac67e3468fce12.tar.gz
gdb-919d772c556e521f21902cfdf3ac67e3468fce12.tar.bz2
* gdb/source.c (source_info): Mention whether the symtab has
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.
Diffstat (limited to 'gdb')
-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 a9d6a23..9948603 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 363a3fc..4d1fbb5 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 bff763b..aa39d76 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 ac74372..c7c1ce2 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 2d02577..da681a6 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 d9285e8..8d666f9 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;