Commit 2cf1e13e authored by Brice Videau's avatar Brice Videau
Browse files

Parameterized member separator.

parent 4533d776
......@@ -88,7 +88,7 @@ event_lambda = lambda { |c, dir|
meta_field["type"] = params[LTTng.expression(*lttng)]["type"]
rescue #must be a struct member
pname = LTTng.expression(*lttng).match(/(\w+) != NULL/)[1]
m = meta_structs[pname][fname.gsub(/\A#{pname}\./,"")]
m = meta_structs[pname][fname.gsub(/\A#{pname}#{MEMBER_SEPARATOR}/,"")]
meta_field["name"] = m.name
meta_field["type"] = m.type
meta_field["pointer"] = m.pointer? if m.pointer?
......
require 'nokogiri'
require 'yaml'
MEMBER_SEPARATOR = "__"
GENERATE_ENUMS_TRACEPOINTS = false
HOST_PROFILE = true
......@@ -210,7 +212,7 @@ end
class Member < Declaration
def initialize(command, member, prefix, dir = :start)
super(member)
name = "#{prefix}.#{@name}"
name = "#{prefix}#{MEMBER_SEPARATOR}#{@name}"
expr = "#{prefix} != NULL ? #{prefix}->#{@name} : 0"
@dir = dir
@lttng_type = ["ctf_integer_hex", "intptr_t", name, "(intptr_t)(#{expr})"] if pointer?
......
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