From d416eeec97f1a62875b49332e62cae67ebcb7e92 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 18 Jun 2005 13:12:04 +0000 Subject: [PATCH] (Backtrace): Document that free-standing environments do not need to have a `main' function. --- gdb/doc/ChangeLog | 2 ++ gdb/doc/gdb.texinfo | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index f30d5cd..93393b6 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -11,6 +11,8 @@ --with-sysroot. (Machine Code): Document possible problems with locations in shared libraries. + (Backtrace): Document that free-standing environments do not need + to have a `main' function. 2005-06-18 Nick Roberts diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index b9c6599..0dd2f55 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -4300,7 +4300,11 @@ you are interested in, or recompile without optimizations. @cindex startup code, and backtrace Most programs have a standard user entry point---a place where system libraries and startup code transition into user code. For C this is -@code{main}. When @value{GDBN} finds the entry function in a backtrace +@code{main}@footnote{ +Note that embedded programs (the so-called ``free-standing'' +environment) are not required to have a @code{main} function as the +entry point. They could even have multiple entry points.}. +When @value{GDBN} finds the entry function in a backtrace it will terminate the backtrace, to avoid tracing into highly system-specific (and generally uninteresting) code. -- 2.7.4