diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2017-11-20 13:27:29 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2017-11-23 10:44:47 +0000 |
commit | 58cc1cb66c1a96ffba4a314edb2c5b4e8b235d5b (patch) | |
tree | ed00c90ab564c54ae4f09a4acbc5f3ffa65b9e71 /dexdump | |
parent | 65e0432cdaf3ee170045b21943c24eae5d6a0357 (diff) | |
download | art-58cc1cb66c1a96ffba4a314edb2c5b4e8b235d5b.tar.gz art-58cc1cb66c1a96ffba4a314edb2c5b4e8b235d5b.tar.bz2 art-58cc1cb66c1a96ffba4a314edb2c5b4e8b235d5b.zip |
Pass the debug_info_offset explicitly.
In order to use debug_info_offset for encoding implementation details,
rewrite all indirect users of it to fetch it before calling DexFile
methods.
This allows keeping the DexFile interface clean of runtime
considerations.
Test: test.py
Change-Id: I4591e0039b5f822f4409aae411071ecbe97082b1
Diffstat (limited to 'dexdump')
-rw-r--r-- | dexdump/dexdump.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dexdump/dexdump.cc b/dexdump/dexdump.cc index 84ccaa03ab..a7af193f0a 100644 --- a/dexdump/dexdump.cc +++ b/dexdump/dexdump.cc @@ -1202,9 +1202,11 @@ static void dumpCode(const DexFile* pDexFile, u4 idx, u4 flags, // Positions and locals table in the debug info. bool is_static = (flags & kAccStatic) != 0; fprintf(gOutFile, " positions : \n"); - pDexFile->DecodeDebugPositionInfo(pCode, dumpPositionsCb, nullptr); + uint32_t debug_info_offset = pDexFile->GetDebugInfoOffset(pCode); + pDexFile->DecodeDebugPositionInfo(pCode, debug_info_offset, dumpPositionsCb, nullptr); fprintf(gOutFile, " locals : \n"); - pDexFile->DecodeDebugLocalInfo(pCode, is_static, idx, dumpLocalsCb, nullptr); + pDexFile->DecodeDebugLocalInfo( + pCode, debug_info_offset, is_static, idx, dumpLocalsCb, nullptr); } /* |