summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/loader/raw_object.cc9
-rw-r--r--src/base/remote_gdb.cc2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/base/loader/raw_object.cc b/src/base/loader/raw_object.cc
index 79ddb81fe..1faf33426 100644
--- a/src/base/loader/raw_object.cc
+++ b/src/base/loader/raw_object.cc
@@ -29,6 +29,7 @@
*/
#include "base/loader/raw_object.hh"
+#include "base/loader/symtab.hh"
#include "base/trace.hh"
ObjectFile *
@@ -62,11 +63,19 @@ RawObject::RawObject(const std::string &_filename, int _fd, size_t _len,
bool
RawObject::loadGlobalSymbols(SymbolTable *symtab)
{
+ int fnameStart = filename.rfind('/',filename.size()) + 1;
+ int extStart = filename.rfind('.',filename.size());
+ symtab->insert(text.baseAddr, filename.substr(fnameStart,
+ extStart-fnameStart) + "_start");
return true;
}
bool
RawObject::loadLocalSymbols(SymbolTable *symtab)
{
+ int fnameStart = filename.rfind('/',filename.size()) + 1;
+ int extStart = filename.rfind('.',filename.size());
+ symtab->insert(text.baseAddr, filename.substr(fnameStart,
+ extStart-fnameStart) + "_start");
return true;
}
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index 55fb97ce9..59a9b87d5 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -421,7 +421,7 @@ BaseRemoteGDB::recv(char *bp, int maxlen)
putbyte(bp[0]);
putbyte(bp[1]);
len -= 3;
- bcopy(bp + 3, bp, len);
+ memcpy(bp, bp+3, len);
}
break;
}