aboutsummaryrefslogtreecommitdiff
path: root/gdbserver
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-08-16 08:18:18 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-08-17 06:19:49 -0700
commit4eb629d50d449a079d3f5e22f26f45855939164f (patch)
tree93aa176fdbad7be7c07f73e1293bd98245117253 /gdbserver
parentc9fed6655f49320086869e5e73d787971f0268d2 (diff)
downloadgdb-4eb629d50d449a079d3f5e22f26f45855939164f.zip
gdb-4eb629d50d449a079d3f5e22f26f45855939164f.tar.gz
gdb-4eb629d50d449a079d3f5e22f26f45855939164f.tar.bz2
gdbserver: Check r_version < 1 for Linux debugger interface
Update gdbserver to check r_version < 1 instead of r_version != 1 so that r_version can be bumped for a new field in the glibc debugger interface to support multiple namespaces. Since so far, the gdbserver only reads fields defined for r_version == 1, it is compatible with r_version >= 1. All future glibc debugger interface changes will be backward compatible. If there is ever the need for backward incompatible change to the glibc debugger interface, a new DT_XXX element will be provided to access the new incompatible interface. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=11839
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/linux-low.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 5c6191d..fc7a995 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6845,7 +6845,7 @@ linux_process_target::qxfer_libraries_svr4 (const char *annex,
if (linux_read_memory (priv->r_debug + lmo->r_version_offset,
(unsigned char *) &r_version,
sizeof (r_version)) != 0
- || r_version != 1)
+ || r_version < 1)
{
warning ("unexpected r_debug version %d", r_version);
}