* Re: [PATCH] tests: vdsosyms call dwfl_linux_proc_attach.
@ 2014-12-03 13:08 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2014-12-03 13:08 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
On Thu, 2014-11-27 at 23:21 +0100, Mark Wielaard wrote:
> Older kernels won't let us get at the vdso otherwise.
> [...]
> +2014-11-27 Mark Wielaard <mjw@redhat.com>
> +
> + * vdsosyms.c (main): Call dwfl_linux_proc_attach.
I pushed this to master now.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] tests: vdsosyms call dwfl_linux_proc_attach.
@ 2014-11-27 22:21 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2014-11-27 22:21 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]
Older kernels won't let us get at the vdso otherwise.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
tests/ChangeLog | 4 ++++
tests/vdsosyms.c | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 909a61e..87a453d 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2014-11-27 Mark Wielaard <mjw@redhat.com>
+
+ * vdsosyms.c (main): Call dwfl_linux_proc_attach.
+
2014-11-21 Mark Wielaard <mjw@redhat.com>
* run-readelf-A.sh: New test.
diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c
index 831caf4..d04f36a 100644
--- a/tests/vdsosyms.c
+++ b/tests/vdsosyms.c
@@ -89,6 +89,13 @@ main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))
else if (result > 0)
error (2, result, "dwfl_linux_proc_report");
+ /* Also explicitly attach for older kernels (cannot read vdso otherwise). */
+ result = dwfl_linux_proc_attach (dwfl, pid, false);
+ if (result < 0)
+ error (2, 0, "dwfl_linux_proc_attach: %s", dwfl_errmsg (-1));
+ else if (result > 0)
+ error (2, result, "dwfl_linux_proc_attach");
+
if (dwfl_report_end (dwfl, NULL, NULL) != 0)
error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1));
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-03 13:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-03 13:08 [PATCH] tests: vdsosyms call dwfl_linux_proc_attach Mark Wielaard
-- strict thread matches above, loose matches on Subject: below --
2014-11-27 22:21 Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).