From 02a57714007416d2de4891766221290fb7011491 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Tue, 21 Sep 2004 21:06:37 +0000 Subject: [PATCH] 2004-09-21 Jason Molenda (jmolenda@apple.com) * gdb.texinfo (Paths and Names of the Source Files): Document the meaning of values in the 'desc' field of a SO stab. approval: http://sources.redhat.com/ml/gdb-patches/2004-09/msg00334.html --- gdb/doc/ChangeLog | 5 +++++ gdb/doc/stabs.texinfo | 30 +++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 67bcf526a2d..e67aa41f09c 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2004-09-21 Jason Molenda (jmolenda@apple.com) + + * gdb.texinfo (Paths and Names of the Source Files): Document the + meaning of values in the 'desc' field of a SO stab. + 2004-09-20 Daniel Jacobowitz * gdb.texinfo (Maintenance Commands): Document "maint set dwarf2 diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo index a00bc80a728..4b019d3fe55 100644 --- a/gdb/doc/stabs.texinfo +++ b/gdb/doc/stabs.texinfo @@ -422,9 +422,33 @@ file. This information is contained in a symbol of stab type value of the symbol is the start address of the portion of the text section corresponding to that file. -With the Sun Solaris2 compiler, the desc field contains a -source-language code. -@c Do the debuggers use it? What are the codes? -djm +Some compilers use the desc field to indicate the language of the +source file. Sun's compilers started this usage, and the first +constants are derived from their documentation. Languages added +by gcc/gdb start at 0x32 to avoid conflict with languages Sun may +add in the future. A desc field with a value 0 indicates that no +language has been specified via this mechanism. + +@table @asis +@item @code{N_SO_AS} (0x1) +Assembly language +@item @code{N_SO_C} (0x2) +K&R traditional C +@item @code{N_SO_ANSI_C} (0x3) +ANSI C +@item @code{N_SO_CC} (0x4) +C++ +@item @code{N_SO_FORTRAN} (0x5) +Fortran +@item @code{N_SO_PASCAL} (0x6) +Pascal +@item @code{N_SO_FORTRAN90} (0x7) +Fortran90 +@item @code{N_SO_OBJC} (0x32) +Objective-C +@item @code{N_SO_OBJCPLUS} (0x33) +Objective-C++ +@end table Some compilers (for example, GCC2 and SunOS4 @file{/bin/cc}) also include the directory in which the source was compiled, in a second -- 2.30.2