diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-04 10:16:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-06 15:22:41 (GMT) |
commit | 329098a9a0e81e67bd760f53811cce582a3ebdcd (patch) | |
tree | 5f4550427bb65ae5410ececbc85f3e31d3c153db /Source | |
parent | 91158a3369e0f06600a9ada93222535d53361035 (diff) | |
download | CMake-329098a9a0e81e67bd760f53811cce582a3ebdcd.zip CMake-329098a9a0e81e67bd760f53811cce582a3ebdcd.tar.gz CMake-329098a9a0e81e67bd760f53811cce582a3ebdcd.tar.bz2 |
cmMakefile: Set the FilePath on the frame from the cmState.
To verify unit tests pass and for future bisecting.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8d02092..a65f6ba 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -276,11 +276,13 @@ void cmMakefile::IssueMessage(cmake::MessageType t, cmListFileBacktrace cmMakefile::GetBacktrace() const { cmListFileBacktrace backtrace(this->StateSnapshot); + cmState::Snapshot snp = this->StateSnapshot; for(std::vector<cmListFileContext const*>::const_reverse_iterator i = this->ContextStack.rbegin(); - i != this->ContextStack.rend(); ++i) + i != this->ContextStack.rend(); ++i, snp = snp.GetCallStackParent()) { cmListFileContext frame = *(*i); + frame.FilePath = snp.GetExecutionListFile(); backtrace.Append(frame); } return backtrace; @@ -292,11 +294,15 @@ cmMakefile::GetBacktrace(cmListFileContext const& lfc) const { cmListFileBacktrace backtrace(this->StateSnapshot); backtrace.Append(lfc); + cmState::Snapshot snp = this->StateSnapshot; + assert(snp.GetExecutionListFile() == lfc.FilePath); + snp = snp.GetCallStackParent(); for(std::vector<cmListFileContext const*>::const_reverse_iterator i = this->ContextStack.rbegin(); - i != this->ContextStack.rend(); ++i) + i != this->ContextStack.rend(); ++i, snp = snp.GetCallStackParent()) { cmListFileContext frame = *(*i); + frame.FilePath = snp.GetExecutionListFile(); backtrace.Append(frame); } return backtrace; |