Commit 24c44d41 authored by Jan Kiszka's avatar Jan Kiszka
Browse files

cobalt/debug: Detect vDSO via absence of vm_file



VM_DENYWRITE was removed in 5.15, so we need a different criteria.
Absence of a file-backing seems to be a good one.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 9207083a
......@@ -249,13 +249,12 @@ void xndebug_trace_relax(int nr, unsigned long *backtrace,
continue;
/*
* Hack. Unlike DSOs, executables and interpreters
* (e.g. dynamic linkers) are protected against write
* attempts. Use this to determine when $pc should be
* fixed up by subtracting the mapping base address in
* the DSO case.
* DSOs are not file-backed. Use this to determine when $pc
* should be fixed up by subtracting the mapping base address
* in the DSO case.
*/
if (!(vma->vm_flags & VM_DENYWRITE))
file = vma->vm_file;
if (file == NULL)
pc -= vma->vm_start;
spot.backtrace[depth].pc = pc;
......@@ -265,7 +264,6 @@ void xndebug_trace_relax(int nr, unsigned long *backtrace,
* record the PC value, which may still give some hint
* downstream.
*/
file = vma->vm_file;
if (file == NULL)
goto next_frame;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment