Commit ea488177 authored by Jon Haslam's avatar Jon Haslam

fix map keying with 1 or 2 byte integers (#232)

parent 029717bf
......@@ -61,10 +61,15 @@ std::string MapKey::argument_value(BPFtrace &bpftrace,
case Type::integer:
switch (arg.size)
{
case 8:
return std::to_string(*(int64_t*)data);
case 1:
return std::to_string(*(int8_t*)data);
case 2:
return std::to_string(*(int16_t*)data);
case 4:
return std::to_string(*(int32_t*)data);
case 8:
return std::to_string(*(int64_t*)data);
break;
}
case Type::stack:
return bpftrace.get_stack(*(uint64_t*)data, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment