Update to reflect dwarf library changes

This commit is contained in:
Joe Hendrix 2016-11-29 18:47:28 -08:00
parent 7b568edc0c
commit 82d9527b5b
No known key found for this signature in database
GPG Key ID: 00F67DE32381DB9F

View File

@ -136,14 +136,8 @@ lookupDIE m k =
resolveDieIDAttribute :: Map DieID v -> DW_ATVAL -> Parser v
resolveDieIDAttribute m v = lookupDIE m =<< attributeAsDieID v
maybeToEither :: String -> Maybe a -> Parser a
maybeToEither _ (Just r) = pure r
maybeToEither msg Nothing = fail msg
attributeAsLang :: DW_ATVAL -> Parser DW_LANG
attributeAsLang v = do
u <- attributeAsUInt v
maybeToEither "Could not parse lang" (get_dw_lang u)
attributeAsLang v = DW_LANG <$> attributeAsUInt v
parseGet :: BS.ByteString -> Get a -> Parser a
parseGet bs m =