top
products_top_active company_top_inactive right_margin_top
zero_bugs_logo

Calling Functions

The debugger has a built-in C/C++ expression interpreter that can be used to invoke functions defined inside the debugged program.

From the menu bar, select Tools -> Evaluate. The Evaluate dialog pops up; type the name of the function, with its parameters, then hit the Evaluate button.

When invoking a method on an object from within another method of the same object, you must prefix the method with this->.Static methods must be fully-qualified, as in MyClass::some_method()

Note: Some functions such as constructors and user-defined conversion operators may be called behind the scenes when static_cast or C-style cast expressions are evaluated.

Note: The C calling convention is the only one supported at this time. (Parameters are pushed onto the stack starting from the right-most, and the caller is responsible for cleaning up the stack after the function returns).

Other limitations of the expression evaluator:

  • functions that are inlined or optimized out cannot be called
  • variables that are optimized out cannot be used in expressions
  • the comma (,) operator is not supported
  • the types used in an expression must exist in the debuggee
  • types, variables and functions in a shared library that is not loaded into memory may not be available
  • true and false are not recognized; use 1 and 0 instead. This is on purpose, for backwards compatibility with C programs
  • Note: If a function invoked from the debugger causes a signal (such as SIGSEGV) to be raised inside the debugged program, the debugger will do its best to restore the CPU registers and rewind the stack; however, side-effects such as modifications of the memory, or I/O operations cannot be undone.


    intro documentation_stroke features sshots credits right_bottom

    Home | Top | Up | Previous | Next | Community