X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fretrace_swizzle.cpp;h=fe0df21c9deceab0dffc8e281edc00d7b8379ce7;hb=53e366e711876c1b7636e861069cb934716aefe0;hp=a7e777d45cba26e8da0abe4a6bf92900a1db5162;hpb=610942b9efd69d50875d0076a0957be0b8fff174;p=apitrace diff --git a/retrace/retrace_swizzle.cpp b/retrace/retrace_swizzle.cpp index a7e777d..fe0df21 100644 --- a/retrace/retrace_swizzle.cpp +++ b/retrace/retrace_swizzle.cpp @@ -271,9 +271,18 @@ delObj(trace::Value &value) { } void * -toObjPointer(trace::Value &value) { +toObjPointer(trace::Call &call, trace::Value &value) { unsigned long long address = value.toUIntPtr(); - void *obj = address ? _obj_map[address] : NULL; + + void *obj; + if (address) { + obj = _obj_map[address]; + if (!obj) { + warning(call) << "unknown object 0x" << std::hex << address << std::dec << " call\n"; + } + } else { + obj = NULL; + } if (retrace::verbosity >= 2) { std::cout << std::hex << "obj 0x" << address << " <- 0x" << size_t(obj) << std::dec << "\n";