cc

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path string) ([]asm.Function, error)

Parse parse C source file and extracts functions declarations.

Types

type Compiler

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

Compiler represents a C/C++ compiler.

func NewCompiler

func NewCompiler(arch *config.Arch) (*Compiler, error)

NewCompiler creates a new compiler.

func (*Compiler) Compile

func (c *Compiler) Compile(source, assembly, object string, args ...string) error

compile compiles the C source file to assembly and then to object.

func (*Compiler) Version

func (c *Compiler) Version() string

type Disassembler

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

func NewDisassembler

func NewDisassembler(arch *config.Arch) (*Disassembler, error)

func (*Disassembler) Disassemble

func (d *Disassembler) Disassemble(assemblyPath, objectPath string) ([]asm.Function, error)

Disassemble disassembles the object file

Jump to

Keyboard shortcuts

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