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 SetLineNumberIns27 void SetLineNumber(size_t ln) 28 { 29 line_number = ln; 30 } 31 SetColumnNumberIns32 void SetColumnNumber(size_t cn) 33 { 34 column_number = cn; 35 } 36 37 Ins() = default; InsIns38 Ins(size_t l_n) 39 : line_number(l_n) 40 { 41 } 42 }; 43 44 struct LocalVariable { 45 std::string name; 46 std::string signature; 47 std::string signature_type; 48 int32_t reg = 0; 49 uint32_t start = 0; 50 uint32_t length = 0; 51 }; 52 53 } // namespace panda::pandasm::debuginfo 54 55 #endif // ASSEMBLER_ASSEMBLY_DEBUG_H 56