mpers.awk: add support for DWARF version 2 format

* mpers.awk: Handle DW_AT_data_member_location in DWARF v2 format.
This commit is contained in:
Дмитрий Левин 2015-12-16 01:25:10 +00:00
parent e67c8e44db
commit d2bcb1639e

View File

@ -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:]]*)/, \