Prism 6.0 provides limited support for debugging C++ programs.
With few limitations, you can use Prism to debug C++ programs containing the features described in this section.
You can simply type print member to print a data member when in a class method.
You can set breakpoints using the stop in command with functions having either C or C++ linkage (mangled) names.
You can use the Prism stop in, func and list commands with methods of a class.
(prism) stop in class_name::method_name (prism) func class_name::method_name (prism) list class_name::method_name
Prism supports assignment to class member variables.
You can use the Prism whatis and print commands with variables of class type and template classes.
Prism recognizes the this identifier in C++ methods. Its value also appears in stack back-traces.
Prism allows you to set breakpoints in overloaded method names. A list pops up, from which you can select the correct method.
Prism allows you to set breakpoints in template functions. A list pops up, from which you can select the correct function.
Prism's identifier syntax recognizes the C++ scope operator, ::. For example:
(prism) whereis dummy variable: `symbol.x`symbol.cc`Symbol::print:71`dummy
With significant limitations, you can use Prism to debug C++ programs containing the features described in this section.
Prism recognizes casting a class pointer to the class of a base type only for single inheritance relationships. For example, Prism recognizes the following cast syntax when printing variable P:
(prism) print (struct class_name *) P (prism) print (class class_name *) P (prism) print (class_name *) P
You can print static class members when the current scope is a class method. You cannot print static class members when not in class scope. For example, the following command will fail if you issue it outside of the scope of class_name:
(prism) print class_name::var_name
You cannot use a method name that has some forms of non-C identifier syntax to set a breakpoint. For example, this fails with a syntax error:
(prism) stop in class_name::operator+
You must instead use stop at line syntax. These method names are correctly identified in a stack trace, however.
You cannot use Prism to debug C++ programs containing the features described in this section.
Using Prism 6.0, you cannot set a breakpoint in an inlined method that is used in multiple source files. Only one of the several debuggable copies of the inlined function gets the breakpoint.
Prism does not support calling C++ methods, using any syntax.
Prism does not support printing variables of type reference, such as int &xref. Also, variables of type reference appear as (unknown type) in stack traces.