From: Sanimir Agovic <sanimir.agovic@intel.com>
authorPedro Alves <palves@redhat.com>
Tue, 12 Feb 2013 15:03:12 +0000 (15:03 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 12 Feb 2013 15:03:12 +0000 (15:03 +0000)
commit8a4ac37ef487aa7923a44e1ca4afef8fff828fb7
treea6188bbe743f0f959eb98ddfb29a8dfcd32544d1
parent57093f5e8089ca3de7cf3990454ab577a9cec06c
From: Sanimir Agovic <sanimir.agovic@intel.com>

null ptr check to prevent gdbserver from crashing

Evaluating a thread local storage variable in a remote scenario crashes
gdbserver if libthread-db could not be loaded.

2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>

gdbserver/
* thread-db.c (thread_db_get_tls_address):
NULL pointer check thread_db.

testsuite/
* gdb.server/no-thread-db.exp: New file.
* gdb.server/no-thread-db.c: New file.
* gdb.server/Makefile.in (EXECUTABLES): Add no-thread-db.
gdb/gdbserver/ChangeLog
gdb/gdbserver/thread-db.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.server/Makefile.in
gdb/testsuite/gdb.server/no-thread-db.c [new file with mode: 0644]
gdb/testsuite/gdb.server/no-thread-db.exp [new file with mode: 0644]