(Calling): Expand and elaborate text. Add "print". Add the
authorEli Zaretskii <eliz@gnu.org>
Sat, 23 Oct 2004 14:34:54 +0000 (14:34 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 23 Oct 2004 14:34:54 +0000 (14:34 +0000)
description of problems with weak aliases.

gdb/doc/ChangeLog
gdb/doc/gdb.texinfo

index f92bbea45c44b3ff9ebe9b631feb114cee78d021..920ccb5f7b949cd5024d91a90209cbb8d953a2d7 100644 (file)
@@ -7,6 +7,8 @@
        shared libraries.
        (Starting): Fix whitespace; make "elaboration" stand out where it
        is first used, and add an index entry for the term.
+       (Calling): Expand and elaborate text.  Add "print".  Add the
+       description of problems with weak aliases.
 
 2004-10-12  Andrew Cagney  <cagney@gnu.org>
 
index 0909aa3620e41abfc1bef2d6d1670258877ff4d9..3d424951995441d7167d8b897c65fe491fc8f88c 100644 (file)
@@ -10048,18 +10048,35 @@ selected stack frame returns naturally.
 @node Calling
 @section Calling program functions
 
+@table @code
 @cindex calling functions
+@cindex inferior functions, calling
+@item print @var{expr}
+Evaluate the expression @var{expr} and displaying the resuling value.
+@var{expr} may include calls to functions in the program being
+debugged.
+
 @kindex call
-@table @code
 @item call @var{expr}
 Evaluate the expression @var{expr} without displaying @code{void}
 returned values.
-@end table
 
 You can use this variant of the @code{print} command if you want to
-execute a function from your program, but without cluttering the output
-with @code{void} returned values.  If the result is not void, it
-is printed and saved in the value history.
+execute a function from your program that does not return anything
+(a.k.a.@: @dfn{a void function}), but without cluttering the output
+with @code{void} returned values that @value{GDBN} will otherwise
+print.  If the result is not void, it is printed and saved in the
+value history.
+@end table
+
+@cindex weak alias functions
+Sometimes, a function you wish to call is actually a @dfn{weak alias}
+for another function.  In such case, @value{GDBN} might not pick up
+the type information, including the types of the function arguments,
+which causes @value{GDBN} to call the inferior function incorrectly.
+As a result, the called function will function erroneously and may
+even crash.  A solution to that is to use the name of the aliased
+function instead.
 
 @node Patching
 @section Patching programs
This page took 0.046284 seconds and 4 git commands to generate.