]> sourceware.org Git - systemtap.git/commitdiff
tracepoints: Support reading enum parameters
authorJosh Stone <jistone@redhat.com>
Tue, 11 Oct 2011 22:04:13 +0000 (15:04 -0700)
committerJosh Stone <jistone@redhat.com>
Wed, 12 Oct 2011 00:18:32 +0000 (17:18 -0700)
* tapsets.cxx (resolve_tracepoint_arg_type): Treat enum like any other
  numeric base type, simply casted to int64_t.
  (tracepoint_derived_probe::build_args): Log parameter availability.

tapsets.cxx

index 9fb629d0310bc13ccf36dfb3306bf5b755797f1b..30791f7a0f7ab64702083514030bc4c4472e2051 100644 (file)
@@ -8660,6 +8660,7 @@ resolve_tracepoint_arg_type(tracepoint_arg& arg)
       return (dwarf_attr_die(&arg.type_die, DW_AT_type, &arg.type_die)
               && resolve_tracepoint_arg_type(arg));
     case DW_TAG_base_type:
+    case DW_TAG_enumeration_type:
       // base types will simply be treated as script longs
       arg.isptr = false;
       return true;
@@ -8719,8 +8720,9 @@ tracepoint_derived_probe::build_args(dwflpp&, Dwarf_Die& func_die)
           tparg.usable = resolve_tracepoint_arg_type(tparg);
           args.push_back(tparg);
           if (sess.verbose > 4)
-            clog << _F("found parameter for tracepoint '%s': type:'%s' name:'%s'",
-                       tracepoint_name.c_str(), tparg.c_type.c_str(), tparg.name.c_str()) << endl;
+            clog << _F("found parameter for tracepoint '%s': type:'%s' name:'%s' %s",
+                       tracepoint_name.c_str(), tparg.c_type.c_str(), tparg.name.c_str(),
+                       tparg.usable ? "ok" : "unavailable") << endl;
         }
     while (dwarf_siblingof(&arg, &arg) == 0);
 }
This page took 0.037344 seconds and 5 git commands to generate.