I have a following function and I want to stop for debugging inside of it depending on content of variable arguments passed to it.
int
my_fprintf (const char *format, ...)
{
va_list arg_list;
...
va_start (arg_list, format);
result = vfprintf (stream, indent_str, arg_list);
va_end (arg_list);
...
return result;
}
What I want is to put a breakpoint in it to stop if the call is my_fprintf ("%s", "hello")
for example (so breakpoint condition would be as close as possible to a <smth> == "hello"
).
Is it possible to do that?
Updates:
- Debugger is gdb.
- I know how to set conditional breakpoints, I want to know, that the condition should be in this case.