aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo19
2 files changed, 23 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 849deb8..10bb579 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2015-05-16 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.texinfo (Compiling and Injecting Code): Add compile print.
+
2015-05-12 Don Breazeal <donb@codesourcery.com>
* gdb.texinfo (Forks): Note that fork debugging is
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index cb9cd35..1665372 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -17221,6 +17221,25 @@ compile file /home/user/example.c
@end smallexample
@end table
+@table @code
+@item compile print @var{expr}
+@itemx compile print /@var{f} @var{expr}
+Compile and execute @var{expr} with the compiler language found as the
+current language in @value{GDBN} (@pxref{Languages}). By default the
+value of @var{expr} is printed in a format appropriate to its data type;
+you can choose a different format by specifying @samp{/@var{f}}, where
+@var{f} is a letter specifying the format; see @ref{Output Formats,,Output
+Formats}.
+
+@item compile print
+@itemx compile print /@var{f}
+@cindex reprint the last value
+Alternatively you can enter the expression (source code producing it) as
+multiple lines of text. To enter this mode, invoke the @samp{compile print}
+command without any text following the command. This will start the
+multiple-line editor.
+@end table
+
@noindent
The process of compiling and injecting the code can be inspected using: