projects
/
platform
/
upstream
/
ninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7ff8aa
)
dump plan on error
author
Evan Martin
<martine@danga.com>
Sun, 14 Nov 2010 00:57:36 +0000
(16:57 -0800)
committer
Evan Martin
<martine@danga.com>
Sun, 14 Nov 2010 00:57:36 +0000
(16:57 -0800)
ninja.h
patch
|
blob
|
history
ninja_jumble.cc
patch
|
blob
|
history
diff --git
a/ninja.h
b/ninja.h
index 32cc9b1748e68924c9f21292f7104b9adebf40a2..e44d8b289605b39e8a295704385c854ea24eff31 100644
(file)
--- a/
ninja.h
+++ b/
ninja.h
@@
-160,6
+160,8
@@
struct Plan {
bool more_to_do() const { return !want_.empty(); }
+ void Dump();
+
private:
void NodeFinished(Node* node);
diff --git
a/ninja_jumble.cc
b/ninja_jumble.cc
index 31c68ea09b36c8b95d1eacea88eff01ffe6f66a7..dac97504045b204b3878f3088da126def551b1a0 100644
(file)
--- a/
ninja_jumble.cc
+++ b/
ninja_jumble.cc
@@
-413,6
+413,14
@@
void Plan::NodeFinished(Node* node) {
}
}
+void Plan::Dump() {
+ printf("pending: %d\n", want_.size());
+ for (set<Edge*>::iterator i = want_.begin(); i != want_.end(); ++i) {
+ (*i)->Dump();
+ }
+ printf("ready: %d\n", ready_.size());
+}
+
bool Shell::RunCommand(Edge* edge) {
string err;
string command = edge->EvaluateCommand();
@@
-485,6
+493,7
@@
bool Builder::Build(Shell* shell, string* err) {
if (plan_.more_to_do()) {
*err = "ran out of work";
+ plan_.Dump();
return false;
}