aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-09-04 20:21:16 +0100
committerPedro Alves <palves@redhat.com>2017-09-04 20:21:16 +0100
commitd69cf9b2076d63bad3842bc6406a679598851727 (patch)
tree4d5ef1b609bb91c7d17f28aa2f637e6cae582e11 /gdb/NEWS
parent3693fdb3c8ec14bd8ecb4ebb39e4384b330a2999 (diff)
downloadgdb-d69cf9b2076d63bad3842bc6406a679598851727.zip
gdb-d69cf9b2076d63bad3842bc6406a679598851727.tar.gz
gdb-d69cf9b2076d63bad3842bc6406a679598851727.tar.bz2
Document "no debug info debugging" improvements
Here's the documentation bits for all the improvements done in previous commits. Note that the original "weak alias functions" paragraph ends up disappearing, because this patch, which I'm considering kind of part of this series, makes the alias case Just Work: https://sourceware.org/ml/gdb-patches/2017-07/msg00018.html gdb/ChangeLog: 2017-09-04 Pedro Alves <palves@redhat.com> * NEWS (Safer support for debugging with no debug info): New. gdb/doc/ChangeLog: 2017-09-04 Pedro Alves <palves@redhat.com> * gdb.texinfo (Variables) <Program Variables>: Document inspecting no-debug-info variables. (Symbols) <Examining the Symbol Table>: Document inspecting no-debug-info types. (Calling) <Calling functions with no debug info>: New subsection, documenting calling no-debug-info functions. (Non-debug DLL Symbols) <Working with Minimal Symbols>: Update.
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 fda3064..b7b01c9 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -66,6 +66,32 @@ show debug separate-debug-file
* TUI Single-Key mode now supports two new shortcut keys: `i' for stepi and
`o' for nexti.
+* Safer/improved support for debugging with no debug info
+
+ GDB no longer assumes functions with no debug information return
+ 'int'.
+
+ This means that GDB now refuses to 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