From dc93922978c615b56cbaed06ac893b93dd94bebb Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 5 Nov 2012 19:36:38 +0000 Subject: [PATCH] PR python/14802: * gdb.texinfo (Functions In Python): Add example. --- gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdb.texinfo | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index a717c5ad174..50e9c8c12da 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-11-05 Tom Tromey + + PR python/14802: + * gdb.texinfo (Functions In Python): Add example. + 2012-11-03 Yao Qi * observer.texi (GDB Observers): Remove observer 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 -- 2.30.2