add resultbrowser menu action

This commit is contained in:
2026-04-21 18:39:39 +02:00
parent 371b323980
commit 41e079b977
3 changed files with 18 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/mars-db.conf /mars-db.conf
/.direnv /.direnv
/db.conf /db.conf
/fail/bin/resultbrowser/app/__pycache__

View File

@ -35,6 +35,8 @@ my $cui = TUI::init_cui();
# TODO: Add a more exhaustive faults query that also retrieves # TODO: Add a more exhaustive faults query that also retrieves
# what fault has been injected. Then add an info popup or # what fault has been injected. Then add an info popup or
# display it in the markers panel # display it in the markers panel
# TODO: Add a filter for address ranges
# TODO: Add a filter for segments
# ============================================================================= # =============================================================================
# Data handling # Data handling

View File

@ -24,6 +24,9 @@ my $local_ghidra_projects = "$local_root/ghidra/projects";
my $local_ghidra_scripts = "$local_root/ghidra/scripts"; my $local_ghidra_scripts = "$local_root/ghidra/scripts";
my $local_db_conf = "$local_root/db.conf"; my $local_db_conf = "$local_root/db.conf";
my $resultbrowser_port = '5000';
my $resultbrowser = 'resultbrowser.py';
my $remote_root = '/home/lab/smchurla/Documents/failnix'; my $remote_root = '/home/lab/smchurla/Documents/failnix';
my $remote_builds_dir = "$remote_root/builds"; my $remote_builds_dir = "$remote_root/builds";
@ -141,8 +144,18 @@ my %handlers = (
'13. Open Experiment in ResultBrowser' => sub { '13. Open Experiment in ResultBrowser' => sub {
# TODO: Select from existing DBs, rewrite db.conf, my @db_names = Mars::db_list();
# launch resultbrowser + firefox my @selected_dbs =
TUI::select_from_list( "Select Database for ResultBrowser",
0, @db_names );
die "No database selected" unless @selected_dbs;
my $selected_db = $selected_dbs[0];
Util::rewrite_file( $local_db_conf, "database=",
"database=$selected_db\n" );
system( $resultbrowser, '-c', $local_db_conf, '--host=0.0.0.0',
"--port=$resultbrowser_port" );
}, },
'14. Run Build in GDB' => sub { '14. Run Build in GDB' => sub {