From: Dmitry V. Levin Date: Wed, 16 Dec 2015 01:25:10 +0000 (+0000) Subject: mpers.awk: add support for DWARF version 2 format X-Git-Tag: v4.11~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2bcb1639e1f8abde3210f170c28015b264a4bde;p=strace mpers.awk: add support for DWARF version 2 format * mpers.awk: Handle DW_AT_data_member_location in DWARF v2 format. --- diff --git a/mpers.awk b/mpers.awk index ca8f6fd7..e45d8fb9 100644 --- a/mpers.awk +++ b/mpers.awk @@ -158,8 +158,9 @@ BEGIN { } } /^DW_AT_data_member_location/ { - match($0, /[[:digit:]]+/, temparray) - array[idx]["location"] = temparray[0] + if (!match($0, /\(DW_OP_plus_uconst:[[:space:]]+([[:digit:]]+)\)/, temparray)) + match($0, /([[:digit:]]+)/, temparray) + array[idx]["location"] = temparray[1] } /^DW_AT_name/ { match($0, /:[[:space:]]+([[:alpha:]_][[:alnum:]_[:space:]]*)/, \