User`s guide
58
Chapter 5: Examining and Changing Data
int foo:: bar(int x)
{
return n + x;
}
foo::foo(int x)
{
n = x;
}
int square(int x)
{
return x*x;
}
main()
{
foo a;
foo b = 11;
int x = a.bar();
int y = b.bar(x) + square(x);
printf("y = %d\n", y);
}
If you enter:
(dbx) stop in foo::foo
dbx stops execution in the constructor for the variable b;dbx may stop in the
constructor for the variable a (the ability to stop in an inline function may not
yet be fully implemented).
If you enter:
(dbx) stop in foo::bar
dbx stops execution both when a.bar is called and when b.bar is called,
because dbx is unable to distinguish between the overloaded functions.
To stop in square, enter:
(dbx) stop in ::square
To stop in printf (a C function), enter:
(dbx) stop in printf