cmMakefile: Set the FilePath on the frame from the cmState.
To verify unit tests pass and for future bisecting.
This commit is contained in:
parent
91158a3369
commit
329098a9a0
|
@ -276,11 +276,13 @@ void cmMakefile::IssueMessage(cmake::MessageType t,
|
||||||
cmListFileBacktrace cmMakefile::GetBacktrace() const
|
cmListFileBacktrace cmMakefile::GetBacktrace() const
|
||||||
{
|
{
|
||||||
cmListFileBacktrace backtrace(this->StateSnapshot);
|
cmListFileBacktrace backtrace(this->StateSnapshot);
|
||||||
|
cmState::Snapshot snp = this->StateSnapshot;
|
||||||
for(std::vector<cmListFileContext const*>::const_reverse_iterator
|
for(std::vector<cmListFileContext const*>::const_reverse_iterator
|
||||||
i = this->ContextStack.rbegin();
|
i = this->ContextStack.rbegin();
|
||||||
i != this->ContextStack.rend(); ++i)
|
i != this->ContextStack.rend(); ++i, snp = snp.GetCallStackParent())
|
||||||
{
|
{
|
||||||
cmListFileContext frame = *(*i);
|
cmListFileContext frame = *(*i);
|
||||||
|
frame.FilePath = snp.GetExecutionListFile();
|
||||||
backtrace.Append(frame);
|
backtrace.Append(frame);
|
||||||
}
|
}
|
||||||
return backtrace;
|
return backtrace;
|
||||||
|
@ -292,11 +294,15 @@ cmMakefile::GetBacktrace(cmListFileContext const& lfc) const
|
||||||
{
|
{
|
||||||
cmListFileBacktrace backtrace(this->StateSnapshot);
|
cmListFileBacktrace backtrace(this->StateSnapshot);
|
||||||
backtrace.Append(lfc);
|
backtrace.Append(lfc);
|
||||||
|
cmState::Snapshot snp = this->StateSnapshot;
|
||||||
|
assert(snp.GetExecutionListFile() == lfc.FilePath);
|
||||||
|
snp = snp.GetCallStackParent();
|
||||||
for(std::vector<cmListFileContext const*>::const_reverse_iterator
|
for(std::vector<cmListFileContext const*>::const_reverse_iterator
|
||||||
i = this->ContextStack.rbegin();
|
i = this->ContextStack.rbegin();
|
||||||
i != this->ContextStack.rend(); ++i)
|
i != this->ContextStack.rend(); ++i, snp = snp.GetCallStackParent())
|
||||||
{
|
{
|
||||||
cmListFileContext frame = *(*i);
|
cmListFileContext frame = *(*i);
|
||||||
|
frame.FilePath = snp.GetExecutionListFile();
|
||||||
backtrace.Append(frame);
|
backtrace.Append(frame);
|
||||||
}
|
}
|
||||||
return backtrace;
|
return backtrace;
|
||||||
|
|
Loading…
Reference in New Issue