aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-05-28 20:37:29 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-05-28 20:37:29 +0000
commit0c5bf5a97d48620c93deb4dbc65da9cd94c2ef8f (patch)
tree4dc9f6b851b28ab42bc2c8f9abd1839002c11e55 /gdb/gdbserver/linux-low.c
parent7bfd842d05042bfa697b1ded0c8f9bf3e58171fe (diff)
downloadgdb-0c5bf5a97d48620c93deb4dbc65da9cd94c2ef8f.zip
gdb-0c5bf5a97d48620c93deb4dbc65da9cd94c2ef8f.tar.gz
gdb-0c5bf5a97d48620c93deb4dbc65da9cd94c2ef8f.tar.bz2
gdb/
* solib-svr4.c (svr4_current_sos): New comment on svr4_current_sos_via_xfer_libraries fall back. gdb/gdbserver/ * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1. gdb/testsuite/ * gdb.server/solib-list-lib.c: New file. * gdb.server/solib-list-main.c: New file. * gdb.server/solib-list.exp: New file.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r--gdb/gdbserver/linux-low.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index e1ea64a..c015a61 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -5651,7 +5651,13 @@ linux_qxfer_libraries_svr4 (const char *annex, unsigned char *readbuf,
if (priv->r_debug == 0)
priv->r_debug = get_r_debug (pid, is_elf64);
- if (priv->r_debug == (CORE_ADDR) -1 || priv->r_debug == 0)
+ /* We failed to find DT_DEBUG. Such situation will not change for this
+ inferior - do not retry it. Report it to GDB as E01, see for the reasons
+ at the GDB solib-svr4.c side. */
+ if (priv->r_debug == (CORE_ADDR) -1)
+ return -1;
+
+ if (priv->r_debug == 0)
{
document = xstrdup ("<library-list-svr4 version=\"1.0\"/>\n");
}