blob: 736d230a990d196993dd3b349ccbe04f67e6e24f [file] [log] [blame]
David Sehr7629f602016-08-07 16:01:51 -07001/*
2 * Copyright (C) 2016 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 dexlayout utility.
17 *
18 * This is a tool to read dex files into an internal representation,
19 * reorganize the representation, and emit dex files with a better
20 * file layout.
21 */
22
23#ifndef ART_DEXLAYOUT_DEXLAYOUT_H_
24#define ART_DEXLAYOUT_DEXLAYOUT_H_
25
26#include <stdint.h>
27#include <stdio.h>
28
29namespace art {
30
31/* Supported output formats. */
32enum OutputFormat {
33 kOutputPlain = 0, // default
34 kOutputXml, // XML-style
35};
36
37/* Command-line options. */
38struct Options {
39 bool build_dex_ir_;
40 bool checksum_only_;
41 bool disassemble_;
42 bool exports_only_;
43 bool ignore_bad_checksum_;
Jeff Hao3ab96b42016-09-09 18:35:01 -070044 bool output_dex_files_;
David Sehr7629f602016-08-07 16:01:51 -070045 bool show_annotations_;
46 bool show_cfg_;
47 bool show_file_headers_;
48 bool show_section_headers_;
49 bool verbose_;
50 OutputFormat output_format_;
51 const char* output_file_name_;
52};
53
54/* Prototypes. */
55extern struct Options options_;
56extern FILE* out_file_;
57int ProcessFile(const char* file_name);
58
59} // namespace art
60
61#endif // ART_DEXLAYOUT_DEXLAYOUT_H_