From: Tristan Gingold <gingold@adacore.com>
To: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: RFA: display an error message if libunwind-XX cannot be load
Date: Wed, 01 Feb 2012 14:06:00 -0000 [thread overview]
Message-ID: <01BDAEC2-6805-4E7B-A0E6-5D728B0158DA@adacore.com> (raw)
Hi,
no message was reported if libunwind cannot be loaded, which serially impairs debugging. Hence this patchlet to fill the gap.
The message is not highly user friendly (it appears before the banner), but this is not unlike sol-thread.c
I haven't handle the case where a symbol couldn't be resolved, but in practice this happens less frequently.
Ok for trunk ?
Manually tested only.
Tristan.
2012-02-01 Tristan Gingold <gingold@adacore.com>
* libunwind-frame.c (libunwind_load): Display message if dlopen failed.
diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c
index 53ce1e2..360a28e 100644
--- a/gdb/libunwind-frame.c
+++ b/gdb/libunwind-frame.c
@@ -509,7 +509,11 @@ libunwind_load (void)
handle = dlopen (LIBUNWIND_SO, RTLD_NOW);
if (handle == NULL)
- return 0;
+ {
+ fprintf_unfiltered (gdb_stderr, "\
+[GDB failed to load %s: %s]\n", LIBUNWIND_SO, dlerror ());
+ return 0;
+ }
/* Initialize pointers to the dynamic library functions we will use. */
next reply other threads:[~2012-02-01 14:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 14:06 Tristan Gingold [this message]
2012-02-01 15:33 ` Tom Tromey
2012-02-01 16:24 ` Tristan Gingold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01BDAEC2-6805-4E7B-A0E6-5D728B0158DA@adacore.com \
--to=gingold@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox