summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/inifile.cc5
-rw-r--r--base/remote_gdb.hh2
-rw-r--r--base/statistics.cc2
3 files changed, 7 insertions, 2 deletions
diff --git a/base/inifile.cc b/base/inifile.cc
index 7fd2f5568..6baf22850 100644
--- a/base/inifile.cc
+++ b/base/inifile.cc
@@ -217,8 +217,11 @@ bool
IniFile::Section::add(const std::string &assignment)
{
string::size_type offset = assignment.find('=');
- if (offset == string::npos) // no '=' found
+ if (offset == string::npos) {
+ // no '=' found
+ cerr << "Can't parse .ini line " << assignment << endl;
return false;
+ }
// if "+=" rather than just "=" then append value
bool append = (assignment[offset-1] == '+');
diff --git a/base/remote_gdb.hh b/base/remote_gdb.hh
index d8e09909a..62fd52856 100644
--- a/base/remote_gdb.hh
+++ b/base/remote_gdb.hh
@@ -90,6 +90,8 @@ class RemoteGDB
RemoteGDB(System *system, ExecContext *context);
~RemoteGDB();
+ void replaceExecContext(ExecContext *xc) { context = xc; }
+
void attach(int fd);
void detach();
bool isattached();
diff --git a/base/statistics.cc b/base/statistics.cc
index 6593451c4..cde98d861 100644
--- a/base/statistics.cc
+++ b/base/statistics.cc
@@ -846,7 +846,7 @@ DistDisplay(ostream &stream, const string &name, const string &desc,
for (int i = 0; i < size; ++i) {
if (flags & nozero && vec[i] == 0.0 ||
flags & nonan && isnan(vec[i]))
- return;
+ continue;
_min = i * bucket_size + min;
_pdf = vec[i] / total * 100.0;