diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-10-11 21:36:26 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-10-11 21:36:26 +0000 |
commit | cfc353b10d9a29b63a82451fe3b6a84e7d10eb37 (patch) | |
tree | 5a5d5ae8a8cc98129bc7a90b553e96342a3d60da /gdb/testsuite/gdb.cp/infcall-dlopen.cc | |
parent | ac897c20f06ac2e7747d63b963abecd1bdb81368 (diff) | |
download | binutils-gdb-cfc353b10d9a29b63a82451fe3b6a84e7d10eb37.tar.gz |
gdb/testsuite/
* gdb.cp/infcall-dlopen.cc (openlib): Support NULL FILENAME.
(main): Make openlib dummy call.
Diffstat (limited to 'gdb/testsuite/gdb.cp/infcall-dlopen.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/infcall-dlopen.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/infcall-dlopen.cc b/gdb/testsuite/gdb.cp/infcall-dlopen.cc index 1e389e6d673..7fb204c3406 100644 --- a/gdb/testsuite/gdb.cp/infcall-dlopen.cc +++ b/gdb/testsuite/gdb.cp/infcall-dlopen.cc @@ -23,6 +23,9 @@ openlib (const char *filename) { void *h = dlopen (filename, RTLD_LAZY); + if (filename == NULL) + return 0; + if (h == NULL) return 0; if (dlclose (h) != 0) @@ -33,5 +36,8 @@ openlib (const char *filename) int main (void) { + /* Dummy call to get the function always compiled in. */ + openlib (NULL); + return 0; } |