aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>2019-04-23 23:43:24 +0200
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>2019-04-27 13:12:42 +0200
commit136afab8c7d8a8a91dbf38e79be4f9dc4125d552 (patch)
tree2d6f40d947a3fa3a627cf6b7d0b360f4174d10de /gdb/NEWS
parenta45328b93bdd5399da8a9e56817e445cc2068edd (diff)
downloadgdb-136afab8c7d8a8a91dbf38e79be4f9dc4125d552.zip
gdb-136afab8c7d8a8a91dbf38e79be4f9dc4125d552.tar.gz
gdb-136afab8c7d8a8a91dbf38e79be4f9dc4125d552.tar.bz2
Implement show | set may-call-functions [on|off]
Inferior function calls are powerful but might lead to undesired results such as crashes when calling nested functions (frequently used in particular in Ada). This implements a GDB setting to disable calling inferior functions. Note: the idea is that if/when the 'slash command' patch is pushed, that this setting can be changed e.g. by using the shortcut /c. This is version 2 of the patch. It handles all the received comments, mostly replace 'can-call' by 'may-call', and avoid using 'inferior function call' in factor of 'calling function in the program'. 2019-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be> gdb/ChangeLog * NEWS: Mention the new set|show may-call-functions. * infcall.c (may_call_functions_p): New variable. (show_may_call_functions_p): New function. (call_function_by_hand_dummy): Throws an error if not may-call-functions. (_initialize_infcall): Call add_setshow_boolean_cmd for may-call-functions. gdb/testsuite/ChangeLog * gdb.base/callexit.exp: Test may-call-functions off. gdb/doc/ChangeLog * gdb.texinfo (Calling): Document the new set|show may-call-functions.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 5309a8f..42b04e9 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -27,6 +27,18 @@
'array_indexes', 'symbols', 'unions', 'deref_refs', 'actual_objects',
'static_members', 'max_elements', 'repeat_threshold', and 'format'.
+* New commands
+
+set may-call-functions [on|off]
+show may-call-functions
+ This controls whether GDB will attempt to call functions in
+ the program, such as with expressions in the print command. It
+ defaults to on. Calling functions in the program being debugged
+ can have undesired side effects. It is now possible to forbid
+ such function calls. If function calls are forbidden, GDB will throw
+ an error when a command (such as print expression) calls a function
+ in the program.
+
*** Changes in GDB 8.3
* GDB and GDBserver now support access to additional registers on