diff options
| author | Mark Wielaard <[email protected]> | 2023-03-04 21:55:56 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2023-03-05 13:15:53 +0100 |
| commit | a7f65495258933eaf361e82eb325c9d826b455d5 (patch) | |
| tree | ca93a74e1712fe4d10bd1bf326980bdfb8f42e78 /tests/backtrace.c | |
| parent | a9834d7df68afde4ee44ee8fef888cf7e799171a (diff) | |
tests: skip '(null)' symname frames in backtrace tests
Some setups might have some frames for unknown (null) functions
in the thread backtrace. Skip these frames instead of failing
immediately.
* tests/backtrace.c (callback_verify): Check and skip nulls_seen.
https://sourceware.org/bugzilla/show_bug.cgi?id=29176
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests/backtrace.c')
| -rw-r--r-- | tests/backtrace.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/backtrace.c b/tests/backtrace.c index afc12fb9..55555301 100644 --- a/tests/backtrace.c +++ b/tests/backtrace.c @@ -90,6 +90,14 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, return; } Dwfl_Module *mod; + /* Skip frames for which there isn't a function name. */ + static int nulls_seen = 0; + if (symname == NULL) + { + nulls_seen++; + return; + } + frameno -= nulls_seen; /* See case 4. Special case to help out simple frame pointer unwinders. */ static bool duplicate_sigusr2 = false; if (duplicate_sigusr2) |
