David Srbecky | 3b9d57a | 2015-04-10 00:22:14 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
David Srbecky | 4fda4eb | 2016-02-05 13:34:46 +0000 | [diff] [blame^] | 17 | #ifndef ART_COMPILER_DEBUG_ELF_WRITER_DEBUG_H_ |
| 18 | #define ART_COMPILER_DEBUG_ELF_WRITER_DEBUG_H_ |
David Srbecky | 3b9d57a | 2015-04-10 00:22:14 +0100 | [diff] [blame] | 19 | |
Tamas Berghammer | 86e4278 | 2016-01-05 14:29:02 +0000 | [diff] [blame] | 20 | #include "base/macros.h" |
| 21 | #include "base/mutex.h" |
David Srbecky | 4fda4eb | 2016-02-05 13:34:46 +0000 | [diff] [blame^] | 22 | #include "debug/dwarf/dwarf_constants.h" |
Tamas Berghammer | 86e4278 | 2016-01-05 14:29:02 +0000 | [diff] [blame] | 23 | #include "elf_builder.h" |
Vladimir Marko | 10c1356 | 2015-11-25 14:33:36 +0000 | [diff] [blame] | 24 | #include "utils/array_ref.h" |
David Srbecky | 3b9d57a | 2015-04-10 00:22:14 +0100 | [diff] [blame] | 25 | |
| 26 | namespace art { |
Tamas Berghammer | 86e4278 | 2016-01-05 14:29:02 +0000 | [diff] [blame] | 27 | namespace mirror { |
| 28 | class Class; |
| 29 | } |
David Srbecky | 3b9d57a | 2015-04-10 00:22:14 +0100 | [diff] [blame] | 30 | namespace dwarf { |
Tamas Berghammer | 86e4278 | 2016-01-05 14:29:02 +0000 | [diff] [blame] | 31 | struct MethodDebugInfo; |
David Srbecky | 3b9d57a | 2015-04-10 00:22:14 +0100 | [diff] [blame] | 32 | |
David Srbecky | e0febdf | 2015-12-17 20:53:07 +0000 | [diff] [blame] | 33 | template <typename ElfTypes> |
| 34 | void WriteDebugInfo(ElfBuilder<ElfTypes>* builder, |
| 35 | const ArrayRef<const MethodDebugInfo>& method_infos, |
David Srbecky | 579942f | 2016-01-28 20:01:28 +0000 | [diff] [blame] | 36 | CFIFormat cfi_format, |
| 37 | bool write_oat_patches); |
David Srbecky | 3b9d57a | 2015-04-10 00:22:14 +0100 | [diff] [blame] | 38 | |
David Srbecky | ae5d273 | 2016-02-05 09:40:10 +0000 | [diff] [blame] | 39 | std::vector<uint8_t> MakeMiniDebugInfo(InstructionSet isa, |
| 40 | size_t rodata_section_size, |
| 41 | size_t text_section_size, |
| 42 | const ArrayRef<const MethodDebugInfo>& method_infos); |
David Srbecky | 5b1c2ca | 2016-01-25 17:32:41 +0000 | [diff] [blame] | 43 | |
Tamas Berghammer | 86e4278 | 2016-01-05 14:29:02 +0000 | [diff] [blame] | 44 | ArrayRef<const uint8_t> WriteDebugElfFileForMethod(const dwarf::MethodDebugInfo& method_info); |
| 45 | |
Tamas Berghammer | fffbee4 | 2016-01-15 13:09:34 +0000 | [diff] [blame] | 46 | ArrayRef<const uint8_t> WriteDebugElfFileForClasses(const InstructionSet isa, |
| 47 | const ArrayRef<mirror::Class*>& types) |
Tamas Berghammer | 86e4278 | 2016-01-05 14:29:02 +0000 | [diff] [blame] | 48 | SHARED_REQUIRES(Locks::mutator_lock_); |
David Srbecky | 5cc349f | 2015-12-18 15:04:48 +0000 | [diff] [blame] | 49 | |
David Srbecky | 3b9d57a | 2015-04-10 00:22:14 +0100 | [diff] [blame] | 50 | } // namespace dwarf |
| 51 | } // namespace art |
| 52 | |
David Srbecky | 4fda4eb | 2016-02-05 13:34:46 +0000 | [diff] [blame^] | 53 | #endif // ART_COMPILER_DEBUG_ELF_WRITER_DEBUG_H_ |