diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-07-30 23:31:14 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-07-30 23:31:14 +0000 |
commit | 6ea34847c6dbc33d13467be0453018c95f354f26 (patch) | |
tree | 85663dd5767a35bf4771d8d2f14bbfb97be0c2f4 /gdb/doc | |
parent | eec03ebb503f2fa9a2ab1344294333e800c19194 (diff) | |
download | gdb-6ea34847c6dbc33d13467be0453018c95f354f26.zip gdb-6ea34847c6dbc33d13467be0453018c95f354f26.tar.gz gdb-6ea34847c6dbc33d13467be0453018c95f354f26.tar.bz2 |
* stabs.texinfo (Procedures): Improve stuff on nested functions.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/stabs.texinfo | 39 |
2 files changed, 37 insertions, 6 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index a6cd43b..d1c214b 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +Fri Jul 30 18:26:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * stabs.texinfo (Procedures): Improve stuff on nested functions. + Thu Jul 29 15:10:58 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * remote.texi: (MIPS Remote) clearer doc for set/show timeout, diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo index 624be71..09083eb 100644 --- a/gdb/doc/stabs.texinfo +++ b/gdb/doc/stabs.texinfo @@ -528,12 +528,39 @@ type information. For any of the above symbol descriptors, after the symbol descriptor and the type information, there is optionally a comma, followed by the name of the procedure, followed by a comma, followed by a name specifying the -scope. The first name is local to the scope specified. I assume then -that the name of the symbol (before the @samp{:}), if specified, is some -sort of global name. I assume the name specifying the scope is the name -of a function specifying that scope. This feature is an AIX extension, -and this information is based on the manual; I haven't actually tried -it. +scope. The first name is local to the scope specified, and seems to be +redundant with the name of the symbol (before the @samp{:}). The name +specifying the scope is the name of a procedure specifying that scope. +This feature is used by @sc{gcc}, and presumably Pascal, Modula-2, etc., +compilers, for nested functions. + +If procedures are nested more than one level deep, only the immediately +containing scope is specified, for example: + +@example +int +foo (int x) +@{ + int bar (int y) + @{ + int baz (int z) + @{ + return x + y + z; + @} + return baz (x + 2 * y); + @} + return x + bar (3 * x); +@} +@end example + +@noindent +produces the stabs: + +@example +.stabs "baz:f1,baz,bar",36,0,0,_baz.15 # 36 == N_FUN +.stabs "bar:f1,bar,foo",36,0,0,_bar.12 +.stabs "foo:F1",36,0,0,_foo +@end example The stab representing a procedure is located immediately following the code of the procedure. This stab is in turn directly followed by a |