blob: e19da088daf11ca5059d7d05473d30206fcde29f [file] [log] [blame]
David Srbecky3b9d57a2015-04-10 00:22:14 +01001/*
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
17#ifndef ART_COMPILER_ELF_WRITER_DEBUG_H_
18#define ART_COMPILER_ELF_WRITER_DEBUG_H_
19
Tamas Berghammer86e42782016-01-05 14:29:02 +000020#include "base/macros.h"
21#include "base/mutex.h"
David Srbecky527c9c72015-04-17 21:14:10 +010022#include "dwarf/dwarf_constants.h"
Tamas Berghammer86e42782016-01-05 14:29:02 +000023#include "elf_builder.h"
Vladimir Marko10c13562015-11-25 14:33:36 +000024#include "utils/array_ref.h"
David Srbecky3b9d57a2015-04-10 00:22:14 +010025
26namespace art {
Tamas Berghammer86e42782016-01-05 14:29:02 +000027namespace mirror {
28class Class;
29}
David Srbecky3b9d57a2015-04-10 00:22:14 +010030namespace dwarf {
Tamas Berghammer86e42782016-01-05 14:29:02 +000031struct MethodDebugInfo;
David Srbecky3b9d57a2015-04-10 00:22:14 +010032
David Srbeckye0febdf2015-12-17 20:53:07 +000033template <typename ElfTypes>
34void WriteDebugInfo(ElfBuilder<ElfTypes>* builder,
35 const ArrayRef<const MethodDebugInfo>& method_infos,
36 CFIFormat cfi_format);
David Srbecky3b9d57a2015-04-10 00:22:14 +010037
David Srbecky5b1c2ca2016-01-25 17:32:41 +000038template <typename ElfTypes>
39void WriteMiniDebugInfo(ElfBuilder<ElfTypes>* builder,
40 const ArrayRef<const MethodDebugInfo>& method_infos);
41
Tamas Berghammer86e42782016-01-05 14:29:02 +000042ArrayRef<const uint8_t> WriteDebugElfFileForMethod(const dwarf::MethodDebugInfo& method_info);
43
Tamas Berghammerfffbee42016-01-15 13:09:34 +000044ArrayRef<const uint8_t> WriteDebugElfFileForClasses(const InstructionSet isa,
45 const ArrayRef<mirror::Class*>& types)
Tamas Berghammer86e42782016-01-05 14:29:02 +000046 SHARED_REQUIRES(Locks::mutator_lock_);
David Srbecky5cc349f2015-12-18 15:04:48 +000047
David Srbecky3b9d57a2015-04-10 00:22:14 +010048} // namespace dwarf
49} // namespace art
50
51#endif // ART_COMPILER_ELF_WRITER_DEBUG_H_