Is it available to define a class or struct in user-defined-commands of GDB?

128 Views Asked by At

In a user-defined commands of GDB, is it possible to define a struct? If not, any workaround?

e.g.

define myFunc
   # something like this
   typedef struct {
     int32_t f1;
     int32_t f2;
     ...
   } MyObj;
end

If use "typedef struct" in GDB, it would give below prompt:

Undefined command: "typedef". Try "help".
0

There are 0 best solutions below