From e36cfdc07d72ca4946dbbb41e53c061aacbc29cd Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Wed, 22 Apr 2026 10:22:57 +0200 Subject: [PATCH] abort assembly/source loading if no marker is selected in explorer --- scripts/explore.pl | 8 +++++++- scripts/menu.pl | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/explore.pl b/scripts/explore.pl index f4fcc4a..28f1ccd 100644 --- a/scripts/explore.pl +++ b/scripts/explore.pl @@ -30,8 +30,10 @@ my $selected_experiment = $selected_experiments[0]; my $cui = TUI::init_cui(); +# TODO: Add a TextEditor panel beside the experiment selection for notes. +# Store notes in experiment/notes/description.txt # TODO: Add a TextEditor panel below the markers for notes. -# Store notes in ./notes/benchmark-type-address.txt +# Store notes in experiment/notes/benchmark-type-address.txt # TODO: Add a more exhaustive faults query that also retrieves # what fault has been injected. Then add an info popup or # display it in the markers panel @@ -171,6 +173,8 @@ sub align_region { sub load_assembly_elf { my ($marker) = @_; + return unless defined $marker; + my $address = hex( $marker->{fault_address} ); if ( !exists $assembly_cache{$address} ) { @@ -248,6 +252,8 @@ my %source_line_cache; sub load_source_c { my ($marker) = @_; + return unless defined $marker; + my $address = $marker->{fault_address}; if ( !exists $source_cache{$address} ) { diff --git a/scripts/menu.pl b/scripts/menu.pl index 8c1b36f..76ea9fd 100644 --- a/scripts/menu.pl +++ b/scripts/menu.pl @@ -13,6 +13,13 @@ use TUI; use feature 'say'; +# TODO: Less navigation if the object is selected first, then the action +# - Differentiate between local/remote object +# - List all types in the same list? +# - Select actions afterwards and apply fitting ones all in one go +# - Hide unfeasible actions +# TODO: Much can be extracted into utility functions + my $local_obsidian = '/home/christoph/Notes/Obsidian/Chriphost'; my $local_obsidian_attach = "$local_obsidian/attach";