[Bug tapsets/23738] c++ string access tapset

wcohen at redhat dot com sourceware-bugzilla@sourceware.org
Mon Oct 15 18:31:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=23738

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
There are differences between f28 and rhel7, so needed something like the
following on rhel7 for the code to work.

  // Dig through C++ string private fields to find the systemtap script name
  cmdline_script = @cast(session, "struct
systemtap_session")->cmdline_script->_M_dataplus->_M_p
  if (strlen(user_string2(cmdline_script, "<unavailable>"))){
    script = "<cmdline_script>"
  } else {
    script_file = @cast(session, "struct
systemtap_session")->script_file->_M_dataplus->_M_p
    script = user_string2(script_file, "<unavailable>")
  }

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Systemtap mailing list