blob: 7226ca0fc9be50238c10316c7d798557ed0affb4 [file] [log] [blame]
Aart Bik69ae54a2015-07-01 14:52:26 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * Header file of the dexdump utility.
17 *
18 * This is a re-implementation of the original dexdump utility that was
19 * based on Dalvik functions in libdex into a new dexdump that is now
20 * based on Art functions in libart instead. The output is identical to
21 * the original for correct DEX files. Error messages may differ, however.
22 * Also, ODEX files are no longer supported.
23 */
24
25#ifndef ART_DEXDUMP_DEXDUMP_H_
26#define ART_DEXDUMP_DEXDUMP_H_
27
28#include <stdint.h>
29#include <stdio.h>
30
31namespace art {
32
33/* Supported output formats. */
34enum OutputFormat {
35 OUTPUT_PLAIN = 0, // default
36 OUTPUT_XML, // XML-style
37};
38
39/* Command-line options. */
40struct Options {
41 bool checksumOnly;
42 bool disassemble;
43 bool exportsOnly;
44 bool ignoreBadChecksum;
Nicolas Geoffrayc1d8caa2018-02-27 10:15:14 +000045 bool disableVerifier;
Aart Bikdce50862016-06-10 16:04:03 -070046 bool showAnnotations;
47 bool showCfg;
Aart Bik69ae54a2015-07-01 14:52:26 -070048 bool showFileHeaders;
49 bool showSectionHeaders;
Ian Zerny19df0e92022-02-02 16:51:02 +010050 bool showDebugInfo;
Aart Bik69ae54a2015-07-01 14:52:26 -070051 bool verbose;
Aart Bik69ae54a2015-07-01 14:52:26 -070052 OutputFormat outputFormat;
53 const char* outputFileName;
Aart Bik69ae54a2015-07-01 14:52:26 -070054};
55
56/* Prototypes. */
57extern struct Options gOptions;
58extern FILE* gOutFile;
59int processFile(const char* fileName);
60
61} // namespace art
62
63#endif // ART_DEXDUMP_DEXDUMP_H_