diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-11-21 12:44:41 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-11-21 12:44:41 +0000 |
commit | f6592d7c0ca5bd095e8b8826e0a29f62865e4d34 (patch) | |
tree | dece6ac61180b3e1cfa40bc43364fcd2c4bd31c2 /trace_parser.hpp | |
parent | 8badad037dd4c81a5d9c0e929a02ee4eddcc1a95 (diff) |
Make opaque pointers more consistent.
Diffstat (limited to 'trace_parser.hpp')
-rw-r--r-- | trace_parser.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/trace_parser.hpp b/trace_parser.hpp index 565ccaa..54796b5 100644 --- a/trace_parser.hpp +++ b/trace_parser.hpp @@ -111,6 +111,8 @@ public: int c; c = gzgetc(file); switch(c) { + case Trace::TYPE_NULL: + return new Null; case Trace::TYPE_FALSE: return new Bool(false); case Trace::TYPE_TRUE: @@ -135,8 +137,8 @@ public: return parse_blob(); case Trace::TYPE_POINTER: return parse_pointer(); - case Trace::TYPE_NULL: - return new Null; + case Trace::TYPE_OPAQUE: + return parse_opaque(); default: std::cerr << "error: unknown type " << c << "\n"; assert(0); @@ -235,6 +237,13 @@ done: return value; } + Value *parse_opaque() { + unsigned long long addr; + addr = read_uint(); + /* XXX */ + return new UInt(addr); + } + std::string read_string(void) { size_t len = read_uint(); char * buf = new char[len]; |