(Calling): Expand and elaborate text. Add "print". Add the
description of problems with weak aliases.
This commit is contained in:
parent
f018e82f92
commit
f856860472
|
@ -7,6 +7,8 @@
|
||||||
shared libraries.
|
shared libraries.
|
||||||
(Starting): Fix whitespace; make "elaboration" stand out where it
|
(Starting): Fix whitespace; make "elaboration" stand out where it
|
||||||
is first used, and add an index entry for the term.
|
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>
|
2004-10-12 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -10048,18 +10048,35 @@ selected stack frame returns naturally.
|
||||||
@node Calling
|
@node Calling
|
||||||
@section Calling program functions
|
@section Calling program functions
|
||||||
|
|
||||||
@cindex calling functions
|
|
||||||
@kindex call
|
|
||||||
@table @code
|
@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
|
||||||
@item call @var{expr}
|
@item call @var{expr}
|
||||||
Evaluate the expression @var{expr} without displaying @code{void}
|
Evaluate the expression @var{expr} without displaying @code{void}
|
||||||
returned values.
|
returned values.
|
||||||
@end table
|
|
||||||
|
|
||||||
You can use this variant of the @code{print} command if you want to
|
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
|
execute a function from your program that does not return anything
|
||||||
with @code{void} returned values. If the result is not void, it
|
(a.k.a.@: @dfn{a void function}), but without cluttering the output
|
||||||
is printed and saved in the value history.
|
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
|
@node Patching
|
||||||
@section Patching programs
|
@section Patching programs
|
||||||
|
|
Loading…
Reference in New Issue