From a9ec4d55c329a398123b282e32f583ba39ee16e2 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Tue, 19 Nov 2024 13:35:48 +0000 Subject: [PATCH] Fix DWARF parser treating catch blocks as unconditional Signed-off-by: Jonathan Coates --- src/libdwarf/src/eh.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libdwarf/src/eh.rs b/src/libdwarf/src/eh.rs index e9b2358..aa79e7d 100644 --- a/src/libdwarf/src/eh.rs +++ b/src/libdwarf/src/eh.rs @@ -85,10 +85,7 @@ unsafe fn get_ttype_entry( encoding | DW_EH_PE_pcrel, ttype_base, ) - .map(|v| match v { - ttype_base => None, - ttype_entry => Some(ttype_entry as *const u8), - }) + .map(|v| (v != ttype_base).then(|| v as *const u8)) } pub unsafe fn find_eh_action(