feat(go): profiles are now configured by an info.json file

This commit is contained in:
phaneron 2024-11-27 01:55:46 -05:00
parent e591b8b17d
commit 9053d61b6b
13 changed files with 222 additions and 111 deletions

View file

@ -10,6 +10,7 @@ import (
)
type Profile struct {
Info Info
Directory string
SymbolTable *symfile.InMemoryTable
}
@ -29,6 +30,11 @@ func Open(profile_directory string) (profile *Profile, err error) {
fmt.Println("Opening profile", profile_directory)
profile = new(Profile)
if err = read_info(filepath.Join(profile_directory, "info.json"), &profile.Info); err != nil {
return
}
profile.Directory = profile_directory
path_to_symbols_file := filepath.Join(profile_directory, "symbol", "main.sym")