diff options
author | Jack Veenstra <veenstra@android.com> | 2009-04-28 11:33:55 -0700 |
---|---|---|
committer | Jack Veenstra <veenstra@android.com> | 2009-04-28 13:03:22 -0700 |
commit | d4d5b4f63a5760b2212166f539f906edda0bc4de (patch) | |
tree | 88cb58cad4dcb25b58e713480cad55e381f156b4 /emulator/qtools/trace_reader_base.h | |
parent | 432c8a90e76da862efb9a35aca3f5616dc9be0c9 (diff) | |
download | sdk-d4d5b4f63a5760b2212166f539f906edda0bc4de.zip sdk-d4d5b4f63a5760b2212166f539f906edda0bc4de.tar.gz sdk-d4d5b4f63a5760b2212166f539f906edda0bc4de.tar.bz2 |
Fix a memory deallocation error that was crashing q2dm.
Also fix a bunch of compile warnings by changing "char *" to "const char *".
Diffstat (limited to 'emulator/qtools/trace_reader_base.h')
-rw-r--r-- | emulator/qtools/trace_reader_base.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/emulator/qtools/trace_reader_base.h b/emulator/qtools/trace_reader_base.h index 281d085..416c3d1 100644 --- a/emulator/qtools/trace_reader_base.h +++ b/emulator/qtools/trace_reader_base.h @@ -83,7 +83,7 @@ class TraceReaderBase { friend class BBReader; - void Open(char *filename); + void Open(const char *filename); void Close(); void WriteHeader(TraceHeader *header); inline bool ReadBB(BBEvent *event); @@ -120,10 +120,10 @@ class TraceReaderBase { private: int FindNumInsns(uint64_t bb_num, uint64_t bb_start_time); - void ReadTraceHeader(FILE *fstream, char *filename, - char *tracename, TraceHeader *header); + void ReadTraceHeader(FILE *fstream, const char *filename, + const char *tracename, TraceHeader *header); PidEvent *FindMmapDexFileEvent(); - void ParseDexList(char *filename); + void ParseDexList(const char *filename); char *static_filename_; FILE *static_fstream_; @@ -159,7 +159,7 @@ class BBReader { public: explicit BBReader(TraceReaderBase *trace); ~BBReader(); - void Open(char *filename); + void Open(const char *filename); void Close(); bool ReadBB(BBEvent *event); @@ -193,7 +193,7 @@ class InsnReader { InsnReader(); ~InsnReader(); - void Open(char *filename); + void Open(const char *filename); void Close(); uint64_t ReadInsnTime(uint64_t min_time); @@ -209,7 +209,7 @@ class AddrReader { AddrReader(); ~AddrReader(); - bool Open(char *filename, char *suffix); + bool Open(const char *filename, const char *suffix); void Close(); bool ReadAddr(uint64_t *time, uint32_t *addr); @@ -225,7 +225,7 @@ class ExcReader { ExcReader(); ~ExcReader(); - void Open(char *filename); + void Open(const char *filename); void Close(); bool ReadExc(uint64_t *time, uint32_t *current_pc, uint64_t *recnum, uint32_t *target_pc, @@ -243,7 +243,7 @@ class PidReader { PidReader(); ~PidReader(); - void Open(char *filename); + void Open(const char *filename); void Close(); bool ReadPidEvent(struct PidEvent *event); void Dispose(struct PidEvent *event); @@ -258,7 +258,7 @@ class MethodReader { MethodReader(); ~MethodReader(); - bool Open(char *filename); + bool Open(const char *filename); void Close(); bool ReadMethod(MethodRec *method_record); |