sivachandra added a comment.

The spec says that, for a given compile unit, the macro entries in the debug 
info will be in the order in which the compiler processes them. Hence, at line 
5 in your example, all these are relevant:

  #define FOO puts <<< from foo.h
  #undef FOO <<< from foo.h
  #define FOO print <<< from main.c

I have actually verified that it works as expected; FOO resolves to printf and 
not puts at line 5.

You have tickled one aspect that I have ignored though. What if one is stopped 
in an inlined function/method defined in an included file? I think taking care 
of this is a fairly straightforward change over what I now have. I will need to 
bring back the line index in DebugMacroEntry and use it. Will send an update 
soon.


http://reviews.llvm.org/D15437



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to