This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/13878] c++ stl decomposition functions


http://sourceware.org/bugzilla/show_bug.cgi?id=13878

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jistone at redhat dot com

--- Comment #1 from Josh Stone <jistone at redhat dot com> 2012-03-20 16:33:40 UTC ---
(In reply to comment #0)
> This may in turn require @cast() to be able to take c++ templated types,
> as in 
> 
> function cpp_string(ptr) {
>   return @cast(ptr, "std::basic_string<char, std::char_traits<char>,
> std::allocator<char> >")->_M_dataplus->_M_p
> }
> 
> or even @cast("..., "std::string"), neither of which appear to work currently.

This should work already, thanks to bug 12136.  However, note that the default
module for a @cast without context is "kernel", which will normally have no
knowledge of std::string et al. :)

So the @cast will need a third argument, some module with debuginfo which
contains std::string.  Even better if we could use @cast header support, but
that currently only knows how to do kbuild or plain gcc.  (Bug 10055 comment 1
sort of mentions this, but we probably need a new bug for compiler options and
userspace languages other than C.)

Back on the $subject, I wonder whether stl types are fixed enough for us to
have general functions?  I'm thinking especially between --std versions, might
the layout of these objects vary?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]