[Lldb-commits] [PATCH] D15437: Read macro info from .debug_macro section and use it for expression evaluation.
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 11 15:41:03 PST 2015
clayborg added a comment.
One area of concern is if you are not tracking file, how can you get the right defines for a given source file line? If you have:
main.c:
#include <foo.h>
#define FOO printf
int main ()
{
return 0; // Stop here and run: FOO("hello world\n")
}
#undef FOO
But in foo.h you have:
#define FOO puts
// nothing
// nothing
// nothing
// nothing
#undef FOO
Do you currently correctly have the following in your macros if stopped at the return statement in main?
#define FOO puts <<< from foo.h
#undef FOO <<< from foo.h
#define FOO print <<< from main.c
Both foo definitions will be on line 1, and we will be stopped on line 5 of main.c, but if we don't know that the entries from foo.h come from foo.h we might accidentally include these statements?
http://reviews.llvm.org/D15437
More information about the lldb-commits
mailing list