From d2bcb1639e1f8abde3210f170c28015b264a4bde Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Wed, 16 Dec 2015 01:25:10 +0000 Subject: [PATCH] mpers.awk: add support for DWARF version 2 format * mpers.awk: Handle DW_AT_data_member_location in DWARF v2 format. --- mpers.awk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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:]]*)/, \ -- 2.40.0