I have something analogous to the following code snippets:
// file alpha.c
void function_A()
{
int i;
#include "code.h"
}
and
//file beta.c
void function_B()
{
int i;
#include "code.h"
}
and
// file code.h
for(i = 1;i < 10;i++)
{
// do some stuff
if (very_rare_event)
{
// do something else
}
}
Yes, I am fully aware that its breaking all sorts of coding practices, but that's another story (its all part of a very large, very complex, very old system and its not going to be changed any time soon).
My question is this: Is it possible to set a breakpoint within code.h at the "// do something else" point, in a way that you can specify whether it is the instance of being included from alpha.c or beta.c? And if so, how?