Commit 5c904dac authored by Brice Videau's avatar Brice Videau
Browse files

Use dot to separate struct from members.

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