I've just fixed the kernel-side of exmap, patch attached to
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495335
On the userland side, I've made debugging changes (attached) so that it
doesn't abort on startup. This makes it possible to see what the
program is supposed to do, and to check the kernel side is
working.
This isn't a fix, this is just commenting out the bits that get in
the way.
Steve
Thu Aug 28 04:36:26 BST 2008 Steve Cotton <[EMAIL PROTECTED]>
* #453852: BAD PATCH comment out a lot of early-return logic
Without working out what's actually going wrong, I've commented out a lot of
early-return statements. This makes it possible to see what the program is
supposed to do, and to check the kernel side is working.
diff -rN -u old-exmap-0.10/src/Exmap.cpp new-exmap-0.10/src/Exmap.cpp
--- old-exmap-0.10/src/Exmap.cpp 2008-08-28 15:33:31.000000000 +0100
+++ new-exmap-0.10/src/Exmap.cpp 2008-08-28 15:33:31.000000000 +0100
@@ -854,7 +854,7 @@
if (!_vma->get_pages_for_range(subrange, ppi_info)) {
warn << "sizes_for_mem_range: Can't get pages for range "
<< subrange->to_string() << "\n";
- return null_sizes;
+ //XXX return null_sizes;
}
std::list<Vma::PartialPageInfo>::iterator it;
@@ -894,7 +894,7 @@
if (sizes->val(Sizes::VM) != subrange->size()) {
warn << "Size mismatch: vm size " << sizes->val(Sizes::VM)
<< " range " << subrange->to_string() << "\n";
- return null_sizes;
+ //XXX return null_sizes;
}
return sizes;
@@ -1201,20 +1201,20 @@
for (it = fnames.begin(); it != fnames.end(); ++it) {
if (!calc_maps_for_file(*it)) {
warn << "calc_maps: failed to calc for " << *it << "\n";
- return false;
+ //XXX return false;
}
}
if (!add_holes()) {
warn << "calc_maps: failed to add hole maps\n";
- return false;
+ //XXX return false;
}
maps = Map::sort(_maps);
if (!sanity_check(maps)) {
warn << "calc_maps: sanity check failed\n";
- return false;
+ //XXX return false;
}