summaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS26
1 files changed, 26 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 7c8a8f63de2..92bd5308d8f 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -23,6 +23,32 @@ set debug separate-debug-file
show debug separate-debug-file
Control the display of debug output about separate debug file search.
+* Safer/improved support for debugging with no debug info
+
+ GDB no longer assumes functions with no debug information
+ information return 'int'.
+
+ This means that GDB now refuses the call such functions unless you
+ tell it the function's type, by either casting the call to the
+ declared return type, or by casting the function to a function
+ pointer of the right type, and calling that:
+
+ (gdb) p getenv ("PATH")
+ 'getenv' has unknown return type; cast the call to its declared return type
+ (gdb) p (char *) getenv ("PATH")
+ $1 = 0x7fffffffe "/usr/local/bin:/"...
+ (gdb) p ((char * (*) (const char *)) getenv) ("PATH")
+ $2 = 0x7fffffffe "/usr/local/bin:/"...
+
+ Similarly, GDB no longer assumes that global variables with no debug
+ info have type 'int', and refuses to print the variable's value
+ unless you tell it the variable's type:
+
+ (gdb) p var
+ 'var' has unknown type; cast it to its declared type
+ (gdb) p (float) var
+ $3 = 3.14
+
*** Changes in GDB 8.0
* GDB now supports access to the PKU register on GNU/Linux. The register is