blob: 91da00f97a893217821afdad24cd3891da828a1c [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,
Tamas Berghammer86e42782016-01-05 14:29:02 +000035 bool write_loaded_runtime_types,
David Srbeckye0febdf2015-12-17 20:53:07 +000036 const ArrayRef<const MethodDebugInfo>& method_infos,
37 CFIFormat cfi_format);
David Srbecky3b9d57a2015-04-10 00:22:14 +010038
Tamas Berghammer86e42782016-01-05 14:29:02 +000039ArrayRef<const uint8_t> WriteDebugElfFileForMethod(const dwarf::MethodDebugInfo& method_info);
40
41ArrayRef<const uint8_t> WriteDebugElfFileForClass(const InstructionSet isa, mirror::Class* type)
42 SHARED_REQUIRES(Locks::mutator_lock_);
David Srbecky5cc349f2015-12-18 15:04:48 +000043
David Srbecky3b9d57a2015-04-10 00:22:14 +010044} // namespace dwarf
45} // namespace art
46
47#endif // ART_COMPILER_ELF_WRITER_DEBUG_H_