config

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClangResourceDir

func ClangResourceDir() string

temp to avoid call exec.Command in llcppsigfetch

func CreateJSONFile

func CreateJSONFile(filepath string, data any) error

func CreateTmpJSONFile

func CreateTmpJSONFile(filename string, data any) (string, error)

func GetCppgCfgFromPath

func GetCppgCfgFromPath(filePath string) (*llcppg.Config, error)

llcppg.cfg

func GetPubFromPath

func GetPubFromPath(filePath string) (map[string]string, error)

llcppg.pub

func ReadFile

func ReadFile(filePath string) ([]byte, error)

func ReadPubFile

func ReadPubFile(pubfile string) (ret map[string]string, err error)

func ReadSigfetchFile

func ReadSigfetchFile(sigfetchFile string) ([]byte, error)

func RunCommand

func RunCommand(dir, cmdName string, args ...string) error

func SigfetchConfig

func SigfetchConfig(configFile string, dir string, isCpp bool) ([]byte, error)

func SigfetchExtract

func SigfetchExtract(cfg *SigfetchExtractConfig) ([]byte, error)

func WritePubFile

func WritePubFile(file string, public map[string]string) (err error)

Types

type CppNameType

type CppNameType = string

type GoNameType

type GoNameType = string

type MangleNameType

type MangleNameType = string

type SigfetchExtractConfig

type SigfetchExtractConfig struct {
	File   string
	IsTemp bool
	IsCpp  bool
	Dir    string
}

type SymbolEntry

type SymbolEntry struct {
	MangleName MangleNameType `json:"mangle"`
	CppName    CppNameType    `json:"c++"`
	GoName     GoNameType     `json:"go"`
}

type SymbolTable

type SymbolTable struct {
	// contains filtered or unexported fields
}

func CreateSymbolTable

func CreateSymbolTable(symbs []SymbolEntry) *SymbolTable

func NewSymbolTable

func NewSymbolTable(filePath string) (*SymbolTable, error)

llcppg.symb.json

func (*SymbolTable) LookupSymbol

func (t *SymbolTable) LookupSymbol(name MangleNameType) (*SymbolEntry, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL