summaryrefslogtreecommitdiff
path: root/src/base/loader/hex_file.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-09-08 18:03:52 -0700
committerNathan Binkert <nate@binkert.org>2008-09-08 18:03:52 -0700
commit496d3f2789e53a0a394095f741e593491db0453d (patch)
tree471bff396bd82d5840c6ce7ddc8fa8294dc85273 /src/base/loader/hex_file.hh
parent30bc897613a1ee36ed887eb9da1579bd9828186e (diff)
downloadgem5-496d3f2789e53a0a394095f741e593491db0453d.tar.xz
style: This file hugely violated the M5 style.
Remove a bunch of unused cruft from the interface while we're at it
Diffstat (limited to 'src/base/loader/hex_file.hh')
-rwxr-xr-xsrc/base/loader/hex_file.hh35
1 files changed, 8 insertions, 27 deletions
diff --git a/src/base/loader/hex_file.hh b/src/base/loader/hex_file.hh
index 1dbfd034f..3c0a2d1b8 100755
--- a/src/base/loader/hex_file.hh
+++ b/src/base/loader/hex_file.hh
@@ -28,50 +28,31 @@
* Authors: Jaidev Patwardhan
*/
-#ifndef __HEX_FILE_HH__
-#define __HEX_FILE_HH__
+#ifndef __BASE_LOADER_HEX_FILE_HH__
+#define __BASE_LOADER_HEX_FILE_HH__
+#include <cstdio>
#include <limits>
#include <string>
#include "sim/host.hh" // for Addr
-#include <fstream>
class Port;
class HexFile
{
- public:
-
-
protected:
const std::string filename;
FILE *fp;
+ void parseLine(char *, Addr *, uint32_t *);
+
public:
- virtual ~HexFile();
HexFile(const std::string _filename);
+ virtual ~HexFile();
void close();
-
- bool loadSections(Port *memPort, Addr addrMask =
- std::numeric_limits<Addr>::max());
-
- protected:
-
- typedef struct {
- Addr MemAddr;
- uint32_t Data;
- } HexLine;
-
- Addr entry;
- Addr globalPtr;
-
- public:
- void parseLine(char *,Addr *,uint32_t *);
- Addr entryPoint() const { return entry; }
- Addr globalPointer() const { return globalPtr; }
-
+ bool loadSections(Port *memPort);
};
-#endif // __HEX_FILE_HH__
+#endif // __BASE_LOADER_HEX_FILE_HH__