I have the callback set up correctly in btrace. My argument list contains a custom Enum object. I want to print something if the Enum object equals to a specific value. I am OK with either comparing the Enum object directly, or comparing the string representation of that Enum object with a constant string.
However, the str() function doesn't return me the string representation of this Enum object. It returs the path$class@hash.
How can I compare Enum object in btrace?
Thanks! Erben
Found the answer. The string representation of an Enum is stored in the "name" field of this Enum object. So use reflection to get the value of that "name" field from the object like this: