Hi all Here's a PoC of a tool I scratched together today to extract symbolic values for enums and macros from arbitrary executables into a form that 'stap' can use. I scripted gdb to dump the info and generate a .c file that I then compile and supply to stap as an additional input. But I intend to change it to directly generate a tapset soon; indirection via the .c file is entirely unnecessary, and it's useless for non-kernel runtimes. I'll switch to tapset .stpm generation soon. I'm not super happy with the result. The biggest issue is that gdb's Python API appears to lack a way to set up a scope within which expressions should be evaluated. You can do some limited scoping of symbol lookups, but not macros. You have to actually run the target program and break at relevant locations, which is a hassle that makes the whole thing less useful. It can also only dump macros if the target executable was built with -ggdb3 which is uncommon. Anyway, flawed or not, here's the first draft. Example dumps some symbols from a postgres executable. -- Craig Ringer http://www.2ndQuadrant.com/ 2ndQuadrant - PostgreSQL Solutions for the Enterprise