aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-04-24 21:00:00 +0930
committerAlan Modra <amodra@gmail.com>2023-04-24 21:00:00 +0930
commitea5c591c023544e40bb4967314a47d8e6a1e806d (patch)
tree84de9b355d6724ef927957d907e3ae2039c03190
parent5b720e50c7a3c125b7626c8bb64d7234fc7fb317 (diff)
downloadgdb-ea5c591c023544e40bb4967314a47d8e6a1e806d.zip
gdb-ea5c591c023544e40bb4967314a47d8e6a1e806d.tar.gz
gdb-ea5c591c023544e40bb4967314a47d8e6a1e806d.tar.bz2
Revert "x86: work around compiler diagnosing dangling pointer"
This reverts commit 983db9932a302f9e2ae1f1d4fd7c3149560bc269.
-rw-r--r--opcodes/i386-dis.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 1fe5428..01e5ba8 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -345,12 +345,6 @@ fetch_error (const instr_info *ins)
const struct dis_private *priv = ins->info->private_data;
const char *name = NULL;
- /* Our caller has put a pointer to a local variable in info->private_data
- and it is going to return right after this function has returned. Some
- compilers diagnose this as a dangling pointer. Zap the pointer here to
- avoid needing to do so on all involved return paths in the caller. */
- ins->info->private_data = NULL;
-
if (ins->codep <= priv->the_buffer)
return -1;