1 /** 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef ASSEMBLER_ASSEMBLY_DEBUG_H 17 #define ASSEMBLER_ASSEMBLY_DEBUG_H 18 19 #include <string> 20 21 namespace panda::pandasm::debuginfo { 22 23 struct Ins { 24 size_t line_number = 0; 25 uint32_t column_number = 0; 26 size_t bound_left = 0; 27 size_t bound_right = 0; 28 SetLineNumberIns29 void SetLineNumber(size_t ln) 30 { 31 line_number = ln; 32 } 33 SetColumnNumberIns34 void SetColumnNumber(size_t cn) 35 { 36 column_number = cn; 37 } 38 39 Ins() = default; InsIns40 Ins(size_t l_n, std::string &f_c, size_t b_l, size_t b_r) 41 : line_number(l_n), bound_left(b_l), bound_right(b_r) 42 { 43 } 44 }; 45 46 struct LocalVariable { 47 std::string name; 48 std::string signature; 49 std::string signature_type; 50 int32_t reg = 0; 51 uint32_t start = 0; 52 uint32_t length = 0; 53 }; 54 55 } // namespace panda::pandasm::debuginfo 56 57 #endif // ASSEMBLER_ASSEMBLY_DEBUG_H 58