Re: [DynInst_API:] SymtabAPI - dataUnknownType


Date: Tue, 20 Jan 2015 10:49:56 +0100
From: Fabian Mager <fabian.mager@xxxxxxxxxxxxxx>
Subject: Re: [DynInst_API:] SymtabAPI - dataUnknownType
The patch below solves the problem:

--- a/symtabAPI/src/dwarfWalker.C
+++ b/symtabAPI/src/dwarfWalker.C
@@ -331,7 +331,8 @@ bool DwarfWalker::parse_int(Dwarf_Die e, bool p) {
            break;
        case DW_TAG_const_type:
        case DW_TAG_packed_type:
-       case DW_TAG_volatile_type:
+       case DW_TAG_volatile_type:
+       case DW_TAG_restrict_type:
            ret = parseConstPackedVolatile();
            break;
        case DW_TAG_subroutine_type:
@@ -1928,6 +1929,9 @@ bool DwarfWalker::fixName(std::string &name, Type *type) {
    case DW_TAG_volatile_type:
        name = std::string("volatile ") + type->getName();
        break;
+   case DW_TAG_restrict_type:
+       name = std::string("restrict ") + type->getName();
+       break;
    default:
        return false;
}



Am 19.01.2015 um 19:17 schrieb Fabian Mager:
I tested different things and could track down the problem to following:

typedef int *restrict my_type;
void foo(my_type t) {...}

Using the getParams() function, the parameter t has size 0 (instead of pointer size). If I take away the typedef...

void foo(int *restrict t) {...}

...then the size will be 4 which is also not correct on my 64bit machine.
I assume this somehow relates to dwarfWalker.C not handling DW_TAG_restrict_type. I quickly tried to handle this tag the same way as DW_TAG_const_type but this didn't help.


Bill Williams <bill@xxxxxxxxxxx> schrieb am Tue Dec 16 2014 at 22:19:28:

    Do you mind sending over your mutatee (libpng and/or the program using
    it)? I can poke around with dwarfdump and our dwarf parser's debug
    output and see what's up here. Turnaround may be a bit slow,
    between the
    holidays and some other projects with fixed deadlines I've got going,
    but I'll do what I can.


[← Prev in Thread] Current Thread [Next in Thread→]