xref: /freebsd-src/contrib/llvm-project/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.h (revision e25152834cdf3b353892835a4f3b157e066a8ed4)
10b57cec5SDimitry Andric //===-- PDBLocationToDWARFExpression.h --------------------------*- C++ -*-===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
9*5ffd83dbSDimitry Andric #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_PDB_PDBLOCATIONTODWARFEXPRESSION_H
10*5ffd83dbSDimitry Andric #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_PDB_PDBLOCATIONTODWARFEXPRESSION_H
110b57cec5SDimitry Andric 
120b57cec5SDimitry Andric #include "lldb/Core/Module.h"
130b57cec5SDimitry Andric #include "lldb/Symbol/Variable.h"
140b57cec5SDimitry Andric 
150b57cec5SDimitry Andric namespace lldb_private {
160b57cec5SDimitry Andric class DWARFExpression;
170b57cec5SDimitry Andric }
180b57cec5SDimitry Andric 
190b57cec5SDimitry Andric namespace llvm {
200b57cec5SDimitry Andric namespace pdb {
210b57cec5SDimitry Andric class PDBSymbolData;
220b57cec5SDimitry Andric }
230b57cec5SDimitry Andric } // namespace llvm
240b57cec5SDimitry Andric 
250b57cec5SDimitry Andric /// Converts a location information from a PDB symbol to a DWARF expression
260b57cec5SDimitry Andric ///
270b57cec5SDimitry Andric /// \param[in] module
280b57cec5SDimitry Andric ///     The module \a symbol belongs to.
290b57cec5SDimitry Andric ///
300b57cec5SDimitry Andric /// \param[in] symbol
310b57cec5SDimitry Andric ///     The symbol with a location information to convert.
320b57cec5SDimitry Andric ///
330b57cec5SDimitry Andric /// \param[in] ranges
340b57cec5SDimitry Andric ///     Ranges where this variable is valid.
350b57cec5SDimitry Andric ///
360b57cec5SDimitry Andric /// \param[out] is_constant
370b57cec5SDimitry Andric ///     Set to \b true if the result expression is a constant value data,
380b57cec5SDimitry Andric ///     and \b false if it is a DWARF bytecode.
390b57cec5SDimitry Andric ///
400b57cec5SDimitry Andric /// \return
410b57cec5SDimitry Andric ///     The DWARF expression corresponding to the location data of \a symbol.
420b57cec5SDimitry Andric lldb_private::DWARFExpression
430b57cec5SDimitry Andric ConvertPDBLocationToDWARFExpression(lldb::ModuleSP module,
440b57cec5SDimitry Andric                                     const llvm::pdb::PDBSymbolData &symbol,
450b57cec5SDimitry Andric                                     const lldb_private::Variable::RangeList &ranges,
460b57cec5SDimitry Andric                                     bool &is_constant);
470b57cec5SDimitry Andric #endif
48