summaryrefslogtreecommitdiff
path: root/gdb/doc/gdb.texinfo
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-11-05 19:36:38 +0000
committerTom Tromey <tromey@redhat.com>2012-11-05 19:36:38 +0000
commitdc93922978c615b56cbaed06ac893b93dd94bebb (patch)
treea388396e81eaabde6b77fa791b8572f334e55a86 /gdb/doc/gdb.texinfo
parent68c9da300bc7b0d1245111a0e29471f721fa490d (diff)
downloadbinutils-gdb-dc93922978c615b56cbaed06ac893b93dd94bebb.tar.gz
PR python/14802:
* gdb.texinfo (Functions In Python): Add example.
Diffstat (limited to 'gdb/doc/gdb.texinfo')
-rw-r--r--gdb/doc/gdb.texinfo7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 21db4752bc7..c2c77454a1c 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -24715,6 +24715,13 @@ registration of the function with @value{GDBN}. Depending on how the
Python code is read into @value{GDBN}, you may need to import the
@code{gdb} module explicitly.
+Now you can use the function in an expression:
+
+@smallexample
+(gdb) print $greet("Bob")
+$1 = "Hello, Bob!"
+@end smallexample
+
@node Progspaces In Python
@subsubsection Program Spaces In Python