mirror of
https://github.com/thunderbrewhq/binana.git
synced 2025-12-12 09:52:28 +00:00
feat(profile): binana x64dbg-gen now generates a types file from C source headers
This commit is contained in:
parent
e3ec21ecec
commit
5d5630a6cb
19 changed files with 2961 additions and 354 deletions
|
|
@ -1,44 +1,43 @@
|
|||
package symfile
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// What kind of Entry is this?
|
||||
type EntryKind uint8
|
||||
|
||||
const (
|
||||
// Something that can be executed
|
||||
Function EntryKind = 'f'
|
||||
// Something that is read or written to
|
||||
DataLabel EntryKind = 'l'
|
||||
)
|
||||
|
||||
var (
|
||||
valid_kinds = []EntryKind{Function, DataLabel}
|
||||
)
|
||||
|
||||
// An entry in the table
|
||||
type Entry struct {
|
||||
// Undecorated, raw name
|
||||
Name string
|
||||
// Offset to the start of the function or data
|
||||
StartAddress uint64
|
||||
// What kind of Entry is this?
|
||||
Kind EntryKind
|
||||
// Any table entry can have a comment after a ';' column
|
||||
Comment string
|
||||
// Attributes
|
||||
// end=AABBCCEEDD
|
||||
EndAddress uint64
|
||||
}
|
||||
|
||||
type Table interface {
|
||||
Insert(entry *Entry) (err error)
|
||||
// Find() (iter func() (entry *Entry, err error))
|
||||
}
|
||||
|
||||
func Load(table Table, text io.Reader) (err error) {
|
||||
err = load(text, table)
|
||||
return
|
||||
}
|
||||
package symfile
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// What kind of Entry is this?
|
||||
type EntryKind uint8
|
||||
|
||||
const (
|
||||
// Something that can be executed
|
||||
Function EntryKind = 'f'
|
||||
// Something that is read or written to
|
||||
DataLabel EntryKind = 'l'
|
||||
)
|
||||
|
||||
var (
|
||||
valid_kinds = []EntryKind{Function, DataLabel}
|
||||
)
|
||||
|
||||
// An entry in the table
|
||||
type Entry struct {
|
||||
// Undecorated, raw name
|
||||
Name string
|
||||
// Offset to the start of the function or data
|
||||
StartAddress uint64
|
||||
// What kind of Entry is this?
|
||||
Kind EntryKind
|
||||
// Any table entry can have a comment after a ';' column
|
||||
Comment string
|
||||
// Attributes
|
||||
// end=AABBCCEEDD
|
||||
EndAddress uint64
|
||||
}
|
||||
|
||||
type Table interface {
|
||||
Insert(entry *Entry) (err error)
|
||||
}
|
||||
|
||||
func Load(table Table, text io.Reader) (err error) {
|
||||
err = load(text, table)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue