Skip to content

Commit

Permalink
Merge branch 'master' into rebootleby
Browse files Browse the repository at this point in the history
  • Loading branch information
labbott authored Jul 31, 2023
2 parents ed15a3c + 1840ece commit 6c5df7f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
7 changes: 6 additions & 1 deletion cmd/readvar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,19 @@ fn readvar(context: &mut ExecutionContext) -> Result<()> {
n == v || n.ends_with(&suffix)
}

if let Some(ref variable) = subargs.variable {
if let Some(variable) = &subargs.variable {
let m =
if variable.contains("::") { match_exact } else { match_suffix };

let mut found = false;
for (n, v) in
hubris.qualified_variables().filter(|&(n, _)| m(n, variable))
{
readvar_dump(hubris, core, v, n, &subargs)?;
found = true;
}
if !found {
bail!("variable '{variable}' not found; use \"-l\" to list");
}
} else {
bail!("expected variable (use \"-l\" to list)");
Expand Down
22 changes: 11 additions & 11 deletions humility-core/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,47 +148,47 @@ impl Core for UnattachedCore {
}

fn read_8(&mut self, _addr: u32, _data: &mut [u8]) -> Result<()> {
bail!("Unimplemented when unattached!");
bail!("Core::read_8 unimplemented when unattached!");
}

fn read_reg(&mut self, _reg: ARMRegister) -> Result<u32> {
bail!("Unimplemented when unattached!");
bail!("Core::read_reg unimplemented when unattached!");
}

fn write_reg(&mut self, _reg: ARMRegister, _value: u32) -> Result<()> {
bail!("Unimplemented when unattached!");
bail!("Core::write_reg unimplemented when unattached!");
}

fn write_word_32(&mut self, _addr: u32, _data: u32) -> Result<()> {
bail!("Unimplemented when unattached!");
bail!("Core::write_word_32 unimplemented when unattached!");
}

fn write_8(&mut self, _addr: u32, _data: &[u8]) -> Result<()> {
bail!("Unimplemented when unattached!");
bail!("Core::write_8 unimplemented when unattached!");
}

fn halt(&mut self) -> Result<()> {
bail!("Unimplemented when unattached!");
bail!("Core::halt unimplemented when unattached!");
}

fn run(&mut self) -> Result<()> {
bail!("Unimplemented when unattached!");
bail!("Core::run unimplemented when unattached!");
}

fn step(&mut self) -> Result<()> {
bail!("Unimplemented when unattached!");
bail!("Core::step unimplemented when unattached!");
}

fn init_swv(&mut self) -> Result<()> {
bail!("Unimplemented when unattached!");
bail!("Core::init_swv unimplemented when unattached!");
}

fn read_swv(&mut self) -> Result<Vec<u8>> {
bail!("Unimplemented when unattached!");
bail!("Core::read_swv unimplemented when unattached!");
}

fn load(&mut self, _path: &Path) -> Result<()> {
bail!("Unimplemented when unattached!");
bail!("Core::load unimplemented when unattached!");
}

fn reset(&mut self) -> Result<()> {
Expand Down
3 changes: 2 additions & 1 deletion humility-net-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ impl NetCore {
// least one task associated with it. If this task is the
// supervisor, then that's bad news.
let region = ram[p - 1].clone();
let Some(&task) = region.tasks.iter().find(|t| t.task() != 0) else {
let Some(&task) = region.tasks.iter().find(|t| t.task() != 0)
else {
bail!("supervisor memory cannot be read using dump facilities");
};

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/cmd/readvar-ticks/readvar-ticks.extern-regions.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/cmd/readvar-ticks/readvar-ticks.task.net.stderr

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/cmd/readvar-ticks/readvar-ticks.task.net.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6c5df7f

Please sign in to comment.