diff --git a/Cargo.lock b/Cargo.lock index 9ad2007d..527dd9ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1291,7 +1291,7 @@ dependencies = [ [[package]] name = "humility-bin" -version = "0.12.8" +version = "0.12.9" dependencies = [ "anyhow", "bitfield", diff --git a/cmd/tasks/src/lib.rs b/cmd/tasks/src/lib.rs index 61b3f1a8..7c13b280 100644 --- a/cmd/tasks/src/lib.rs +++ b/cmd/tasks/src/lib.rs @@ -111,7 +111,7 @@ //! These options can naturally be combined, e.g. `humility tasks -slvr`. //! -use anyhow::{Context, Result, bail}; +use anyhow::{Context, Result, anyhow, bail}; use clap::{CommandFactory, Parser}; use humility::core::Core; use humility::hubris::*; @@ -404,7 +404,14 @@ pub fn print_tasks( if stack { let initial = desc.initial_stack; - match hubris.stack(core, t, initial, ®s) { + match hubris.stack(core, t, initial, ®s).or_else( + |e| { + // Restore original error if the syscall + // stack handler didn't work. + stack_syscall(core, hubris, t, &desc, ®s) + .map_err(|_| e) + }, + ) { Ok(stack) => printer.print(hubris, &stack), Err(e) => { writeln!( @@ -483,6 +490,69 @@ pub fn print_tasks( Ok(()) } +/// Finds a stack trace when the instruction pointer is in a syscall stub +/// +/// Functions defined with `naked_asm` do not have unwind info (hubris#2236 / +/// rust#146736). For tasks which are in a syscall stub, this prevents our +/// stack unwinder from making any progress: it can't get the unwind info for +/// the root stack frame, so can't walk up the stack. +/// +/// This function assumes that we're at a syscall, and begins stack walking *one +/// frame up* to escape the tarpit: we use `LR` as the program counter, and +/// populate register values based on the pushes at syscall entry. +fn stack_syscall<'a>( + core: &'a mut dyn Core, + hubris: &'a HubrisArchive, + t: HubrisTask, + desc: &'a TaskDesc, + regs: &'a BTreeMap, +) -> Result>> { + let pc = regs + .get(&ARMRegister::PC) + .ok_or_else(|| anyhow!("PC missing from regs map"))?; + let lr = regs + .get(&ARMRegister::LR) + .ok_or_else(|| anyhow!("LR missing from regs map"))?; + let sp = regs + .get(&ARMRegister::SP) + .ok_or_else(|| anyhow!("SP missing from regs map"))?; + + let Some(pushed) = hubris.syscall_pushes_at(*pc) else { + bail!("could not find syscall pushes at {pc:#x?}"); + }; + + // Read pushed register values from the stack + let mut frameregs = regs.clone(); + for (i, &p) in pushed.iter().enumerate() { + let val = core.read_word_32(sp + (i * 4) as u32)?; + frameregs.insert(p, val); + } + // Move ourselves up a single frame. This leaves SP with a fake value, but + // it's in the correct region, which is what matters for `hubris.stack(..)` + frameregs.insert(ARMRegister::PC, *lr); + frameregs.remove(&ARMRegister::LR); + + let mut frames = hubris.stack(core, t, desc.initial_stack, &frameregs)?; + + // Insert a synthetic frame for the syscall stub + let name = hubris.instr_sym(*pc).map(|(name, _addr)| name); + frames.insert( + 0, + HubrisStackFrame { + cfa: *sp, + pos: None, + sym: Some(HubrisStackSymbol { + name: name.unwrap_or("[syscall stub]"), + addr: *pc, + goff: None, + }), + registers: regs.clone(), + inlined: None, + }, + ); + Ok(frames) +} + fn stack_guess<'a>( w: &'a mut dyn Write, core: &'a mut dyn Core, diff --git a/humility-bin/Cargo.toml b/humility-bin/Cargo.toml index 2c9f638a..00887ee3 100644 --- a/humility-bin/Cargo.toml +++ b/humility-bin/Cargo.toml @@ -18,7 +18,7 @@ [package] name = "humility-bin" edition.workspace = true -version = "0.12.8" +version = "0.12.9" license = "MPL-2.0" [build-dependencies] diff --git a/humility-bin/tests/cmd/chip.trycmd b/humility-bin/tests/cmd/chip.trycmd index b1eabfba..bf6fae79 100644 --- a/humility-bin/tests/cmd/chip.trycmd +++ b/humility-bin/tests/cmd/chip.trycmd @@ -13,7 +13,7 @@ For more information try --help ``` $ humility --chip this-can-be-anything -V -humility 0.12.8 +humility 0.12.9 ``` @@ -28,7 +28,7 @@ For more information try --help ``` $ humility -c apx432 -V -humility 0.12.8 +humility 0.12.9 ``` diff --git a/humility-bin/tests/cmd/cores/hubris.core.new-compiler b/humility-bin/tests/cmd/cores/hubris.core.new-compiler new file mode 100644 index 00000000..9298e936 Binary files /dev/null and b/humility-bin/tests/cmd/cores/hubris.core.new-compiler differ diff --git a/humility-bin/tests/cmd/counters-arg/counters-arg.new-compiler.stderr b/humility-bin/tests/cmd/counters-arg/counters-arg.new-compiler.stderr new file mode 100644 index 00000000..5735db82 --- /dev/null +++ b/humility-bin/tests/cmd/counters-arg/counters-arg.new-compiler.stderr @@ -0,0 +1,3 @@ +humility: attached to dump +humility counters failed: no counters found with names containing "gimlet_seq" +hint: use `humility counters list` to list all available counters diff --git a/humility-bin/tests/cmd/counters-arg/counters-arg.new-compiler.stdout b/humility-bin/tests/cmd/counters-arg/counters-arg.new-compiler.stdout new file mode 100644 index 00000000..e69de29b diff --git a/humility-bin/tests/cmd/counters-arg/counters-arg.new-compiler.toml b/humility-bin/tests/cmd/counters-arg/counters-arg.new-compiler.toml new file mode 100644 index 00000000..6c392e44 --- /dev/null +++ b/humility-bin/tests/cmd/counters-arg/counters-arg.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters gimlet_seq" +status.code = 1 diff --git a/humility-bin/tests/cmd/counters-csv-full/counters-csv-full.new-compiler.stderr b/humility-bin/tests/cmd/counters-csv-full/counters-csv-full.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/counters-csv-full/counters-csv-full.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/counters-csv-full/counters-csv-full.new-compiler.stdout b/humility-bin/tests/cmd/counters-csv-full/counters-csv-full.new-compiler.stdout new file mode 100644 index 00000000..c9af6d9b --- /dev/null +++ b/humility-bin/tests/cmd/counters-csv-full/counters-csv-full.new-compiler.stdout @@ -0,0 +1,176 @@ +task,variable,variant,count +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_on(Ok),0 +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_on(Err(NotPresent)),0 +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_off(Ok),0 +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_off(Err(NotPresent)),0 +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_toggle(Ok),13 +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_toggle(Err(NotPresent)),6 +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_blink(Ok),0 +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_blink(Err(NotPresent)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_state,0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,set_state,0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,request_reset,0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_reset_reason,0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,set_reset_reason,1 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Ok),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpAgentUnsupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(InvalidArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(BadOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(UnalignedOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(UnalignedSegmentAddress)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(UnalignedSegmentLength)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(BadDumpResponse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(NotSupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpPresent)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(UnclaimedDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(CannotClaimDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpAreaInUse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(BadSegmentAdd)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpMessageFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpFailedSetup)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpFailedRead)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpFailedWrite)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpFailedControl)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpFailedUnknown)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(DumpFailedUnknownError)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(LeaseWriteFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_areas(Err(ServerRestarted)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Ok),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpAgentUnsupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(InvalidArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(BadOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(UnalignedOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(UnalignedSegmentAddress)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(UnalignedSegmentLength)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(BadDumpResponse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(NotSupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpPresent)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(UnclaimedDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(CannotClaimDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpAreaInUse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(BadSegmentAdd)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpMessageFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpFailedSetup)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpFailedRead)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpFailedWrite)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpFailedControl)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpFailedUnknown)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(DumpFailedUnknownError)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(LeaseWriteFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,get_dump_area(Err(ServerRestarted)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Ok),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpAgentUnsupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(InvalidArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(BadOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(UnalignedOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(UnalignedSegmentAddress)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(UnalignedSegmentLength)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(BadDumpResponse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(NotSupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpPresent)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(UnclaimedDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(CannotClaimDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpAreaInUse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(BadSegmentAdd)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpMessageFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpFailedSetup)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpFailedRead)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpFailedWrite)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpFailedControl)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpFailedUnknown)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(DumpFailedUnknownError)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(LeaseWriteFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,claim_dump_area(Err(ServerRestarted)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Ok),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpAgentUnsupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(InvalidArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(BadOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(UnalignedOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(UnalignedSegmentAddress)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(UnalignedSegmentLength)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(BadDumpResponse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(NotSupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpPresent)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(UnclaimedDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(CannotClaimDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpAreaInUse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(BadSegmentAdd)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpMessageFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpFailedSetup)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpFailedRead)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpFailedWrite)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpFailedControl)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpFailedUnknown)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(DumpFailedUnknownError)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(LeaseWriteFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task(Err(ServerRestarted)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Ok),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpAgentUnsupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(InvalidArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(BadOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(UnalignedOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(UnalignedSegmentAddress)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(UnalignedSegmentLength)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(BadDumpResponse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(NotSupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpPresent)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(UnclaimedDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(CannotClaimDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpAreaInUse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(BadSegmentAdd)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpMessageFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpFailedSetup)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpFailedRead)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpFailedWrite)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpFailedControl)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpFailedUnknown)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(DumpFailedUnknownError)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(LeaseWriteFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,dump_task_region(Err(ServerRestarted)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Ok),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpAgentUnsupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(InvalidArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(BadOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(UnalignedOffset)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(UnalignedSegmentAddress)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(UnalignedSegmentLength)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(BadDumpResponse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(NotSupported)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpPresent)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(UnclaimedDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(CannotClaimDumpArea)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpAreaInUse)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(BadSegmentAdd)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpMessageFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpFailedSetup)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpFailedRead)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpFailedWrite)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpFailedControl)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpFailedUnknown)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(DumpFailedUnknownError)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(LeaseWriteFailed)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,reinitialize_dump_from(Err(ServerRestarted)),0 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,restart_me_raw,0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,enable_clock_raw(Ok),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,enable_clock_raw(Err(NoSuchPeripheral)),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,disable_clock_raw(Ok),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,disable_clock_raw(Err(NoSuchPeripheral)),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,enter_reset_raw(Ok),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,enter_reset_raw(Err(NoSuchPeripheral)),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,leave_reset_raw(Ok),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,leave_reset_raw(Err(NoSuchPeripheral)),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_configure_raw,1 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_set_reset,1 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_read_input,0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_toggle(Ok),13 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_toggle(Err),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,read_uid,0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_irq_configure,0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_irq_control(Ok),0 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_irq_control(Err),0 diff --git a/humility-bin/tests/cmd/counters-csv-full/counters-csv-full.new-compiler.toml b/humility-bin/tests/cmd/counters-csv-full/counters-csv-full.new-compiler.toml new file mode 100644 index 00000000..ad448558 --- /dev/null +++ b/humility-bin/tests/cmd/counters-csv-full/counters-csv-full.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters --output csv --full" + diff --git a/humility-bin/tests/cmd/counters-csv/counters-csv.new-compiler.stderr b/humility-bin/tests/cmd/counters-csv/counters-csv.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/counters-csv/counters-csv.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/counters-csv/counters-csv.new-compiler.stdout b/humility-bin/tests/cmd/counters-csv/counters-csv.new-compiler.stdout new file mode 100644 index 00000000..7048cad5 --- /dev/null +++ b/humility-bin/tests/cmd/counters-csv/counters-csv.new-compiler.stdout @@ -0,0 +1,7 @@ +task,variable,variant,count +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_toggle(Ok),13 +pong,drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS,led_toggle(Err(NotPresent)),6 +sys,task_jefe_api::__JEFE_CLIENT_COUNTERS,set_reset_reason,1 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_configure_raw,1 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_set_reset,1 +user_leds,drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS,gpio_toggle(Ok),13 diff --git a/humility-bin/tests/cmd/counters-csv/counters-csv.new-compiler.toml b/humility-bin/tests/cmd/counters-csv/counters-csv.new-compiler.toml new file mode 100644 index 00000000..e33a4557 --- /dev/null +++ b/humility-bin/tests/cmd/counters-csv/counters-csv.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters --output csv" + diff --git a/humility-bin/tests/cmd/counters-full/counters-full.new-compiler.stderr b/humility-bin/tests/cmd/counters-full/counters-full.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/counters-full/counters-full.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/counters-full/counters-full.new-compiler.stdout b/humility-bin/tests/cmd/counters-full/counters-full.new-compiler.stdout new file mode 100644 index 00000000..20190106 --- /dev/null +++ b/humility-bin/tests/cmd/counters-full/counters-full.new-compiler.stdout @@ -0,0 +1,214 @@ +pong + | + +---> drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS: + 0 led_on(_) + 0 | led_on(Ok) + 0 | led_on(Err(_)) + 0 | Err(NotPresent) + 0 led_off(_) + 0 | led_off(Ok) + 0 | led_off(Err(_)) + 0 | Err(NotPresent) + 19 led_toggle(_) + 13 +---> led_toggle(Ok) + 6 +---> led_toggle(Err(_)) + 6 +-------> Err(NotPresent) + 0 led_blink(_) + 0 | led_blink(Ok) + 0 | led_blink(Err(_)) + 0 | Err(NotPresent) +sys + | + +---> task_jefe_api::__JEFE_CLIENT_COUNTERS: + 0 get_state + 0 set_state + 0 request_reset + 0 get_reset_reason + 1 set_reset_reason + 0 reinitialize_dump_areas(_) + 0 | reinitialize_dump_areas(Ok) + 0 | reinitialize_dump_areas(Err(_)) + 0 | Err(DumpAgentUnsupported) + 0 | Err(InvalidArea) + 0 | Err(BadOffset) + 0 | Err(UnalignedOffset) + 0 | Err(UnalignedSegmentAddress) + 0 | Err(UnalignedSegmentLength) + 0 | Err(BadDumpResponse) + 0 | Err(NotSupported) + 0 | Err(DumpPresent) + 0 | Err(UnclaimedDumpArea) + 0 | Err(CannotClaimDumpArea) + 0 | Err(DumpAreaInUse) + 0 | Err(BadSegmentAdd) + 0 | Err(DumpMessageFailed) + 0 | Err(DumpFailed) + 0 | Err(DumpFailedSetup) + 0 | Err(DumpFailedRead) + 0 | Err(DumpFailedWrite) + 0 | Err(DumpFailedControl) + 0 | Err(DumpFailedUnknown) + 0 | Err(DumpFailedUnknownError) + 0 | Err(LeaseWriteFailed) + 0 | Err(ServerRestarted) + 0 get_dump_area(_) + 0 | get_dump_area(Ok) + 0 | get_dump_area(Err(_)) + 0 | Err(DumpAgentUnsupported) + 0 | Err(InvalidArea) + 0 | Err(BadOffset) + 0 | Err(UnalignedOffset) + 0 | Err(UnalignedSegmentAddress) + 0 | Err(UnalignedSegmentLength) + 0 | Err(BadDumpResponse) + 0 | Err(NotSupported) + 0 | Err(DumpPresent) + 0 | Err(UnclaimedDumpArea) + 0 | Err(CannotClaimDumpArea) + 0 | Err(DumpAreaInUse) + 0 | Err(BadSegmentAdd) + 0 | Err(DumpMessageFailed) + 0 | Err(DumpFailed) + 0 | Err(DumpFailedSetup) + 0 | Err(DumpFailedRead) + 0 | Err(DumpFailedWrite) + 0 | Err(DumpFailedControl) + 0 | Err(DumpFailedUnknown) + 0 | Err(DumpFailedUnknownError) + 0 | Err(LeaseWriteFailed) + 0 | Err(ServerRestarted) + 0 claim_dump_area(_) + 0 | claim_dump_area(Ok) + 0 | claim_dump_area(Err(_)) + 0 | Err(DumpAgentUnsupported) + 0 | Err(InvalidArea) + 0 | Err(BadOffset) + 0 | Err(UnalignedOffset) + 0 | Err(UnalignedSegmentAddress) + 0 | Err(UnalignedSegmentLength) + 0 | Err(BadDumpResponse) + 0 | Err(NotSupported) + 0 | Err(DumpPresent) + 0 | Err(UnclaimedDumpArea) + 0 | Err(CannotClaimDumpArea) + 0 | Err(DumpAreaInUse) + 0 | Err(BadSegmentAdd) + 0 | Err(DumpMessageFailed) + 0 | Err(DumpFailed) + 0 | Err(DumpFailedSetup) + 0 | Err(DumpFailedRead) + 0 | Err(DumpFailedWrite) + 0 | Err(DumpFailedControl) + 0 | Err(DumpFailedUnknown) + 0 | Err(DumpFailedUnknownError) + 0 | Err(LeaseWriteFailed) + 0 | Err(ServerRestarted) + 0 dump_task(_) + 0 | dump_task(Ok) + 0 | dump_task(Err(_)) + 0 | Err(DumpAgentUnsupported) + 0 | Err(InvalidArea) + 0 | Err(BadOffset) + 0 | Err(UnalignedOffset) + 0 | Err(UnalignedSegmentAddress) + 0 | Err(UnalignedSegmentLength) + 0 | Err(BadDumpResponse) + 0 | Err(NotSupported) + 0 | Err(DumpPresent) + 0 | Err(UnclaimedDumpArea) + 0 | Err(CannotClaimDumpArea) + 0 | Err(DumpAreaInUse) + 0 | Err(BadSegmentAdd) + 0 | Err(DumpMessageFailed) + 0 | Err(DumpFailed) + 0 | Err(DumpFailedSetup) + 0 | Err(DumpFailedRead) + 0 | Err(DumpFailedWrite) + 0 | Err(DumpFailedControl) + 0 | Err(DumpFailedUnknown) + 0 | Err(DumpFailedUnknownError) + 0 | Err(LeaseWriteFailed) + 0 | Err(ServerRestarted) + 0 dump_task_region(_) + 0 | dump_task_region(Ok) + 0 | dump_task_region(Err(_)) + 0 | Err(DumpAgentUnsupported) + 0 | Err(InvalidArea) + 0 | Err(BadOffset) + 0 | Err(UnalignedOffset) + 0 | Err(UnalignedSegmentAddress) + 0 | Err(UnalignedSegmentLength) + 0 | Err(BadDumpResponse) + 0 | Err(NotSupported) + 0 | Err(DumpPresent) + 0 | Err(UnclaimedDumpArea) + 0 | Err(CannotClaimDumpArea) + 0 | Err(DumpAreaInUse) + 0 | Err(BadSegmentAdd) + 0 | Err(DumpMessageFailed) + 0 | Err(DumpFailed) + 0 | Err(DumpFailedSetup) + 0 | Err(DumpFailedRead) + 0 | Err(DumpFailedWrite) + 0 | Err(DumpFailedControl) + 0 | Err(DumpFailedUnknown) + 0 | Err(DumpFailedUnknownError) + 0 | Err(LeaseWriteFailed) + 0 | Err(ServerRestarted) + 0 reinitialize_dump_from(_) + 0 | reinitialize_dump_from(Ok) + 0 | reinitialize_dump_from(Err(_)) + 0 | Err(DumpAgentUnsupported) + 0 | Err(InvalidArea) + 0 | Err(BadOffset) + 0 | Err(UnalignedOffset) + 0 | Err(UnalignedSegmentAddress) + 0 | Err(UnalignedSegmentLength) + 0 | Err(BadDumpResponse) + 0 | Err(NotSupported) + 0 | Err(DumpPresent) + 0 | Err(UnclaimedDumpArea) + 0 | Err(CannotClaimDumpArea) + 0 | Err(DumpAreaInUse) + 0 | Err(BadSegmentAdd) + 0 | Err(DumpMessageFailed) + 0 | Err(DumpFailed) + 0 | Err(DumpFailedSetup) + 0 | Err(DumpFailedRead) + 0 | Err(DumpFailedWrite) + 0 | Err(DumpFailedControl) + 0 | Err(DumpFailedUnknown) + 0 | Err(DumpFailedUnknownError) + 0 | Err(LeaseWriteFailed) + 0 | Err(ServerRestarted) + 0 restart_me_raw +user_leds + | + +---> drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS: + 0 enable_clock_raw(_) + 0 | enable_clock_raw(Ok) + 0 | enable_clock_raw(Err(_)) + 0 | Err(NoSuchPeripheral) + 0 disable_clock_raw(_) + 0 | disable_clock_raw(Ok) + 0 | disable_clock_raw(Err(_)) + 0 | Err(NoSuchPeripheral) + 0 enter_reset_raw(_) + 0 | enter_reset_raw(Ok) + 0 | enter_reset_raw(Err(_)) + 0 | Err(NoSuchPeripheral) + 0 leave_reset_raw(_) + 0 | leave_reset_raw(Ok) + 0 | leave_reset_raw(Err(_)) + 0 | Err(NoSuchPeripheral) + 1 gpio_configure_raw + 1 gpio_set_reset + 0 gpio_read_input + 13 gpio_toggle(_) + 13 +---> gpio_toggle(Ok) + 0 | gpio_toggle(Err) + 0 read_uid + 0 gpio_irq_configure + 0 gpio_irq_control(_) + 0 | gpio_irq_control(Ok) + 0 | gpio_irq_control(Err) diff --git a/humility-bin/tests/cmd/counters-full/counters-full.new-compiler.toml b/humility-bin/tests/cmd/counters-full/counters-full.new-compiler.toml new file mode 100644 index 00000000..f218bc05 --- /dev/null +++ b/humility-bin/tests/cmd/counters-full/counters-full.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters --full" + diff --git a/humility-bin/tests/cmd/counters-ipc-filtered/counters-ipc-filtered.new-compiler.stderr b/humility-bin/tests/cmd/counters-ipc-filtered/counters-ipc-filtered.new-compiler.stderr new file mode 100644 index 00000000..a3c5a487 --- /dev/null +++ b/humility-bin/tests/cmd/counters-ipc-filtered/counters-ipc-filtered.new-compiler.stderr @@ -0,0 +1,2 @@ +humility: attached to dump +humility counters failed: no IPC counters found diff --git a/humility-bin/tests/cmd/counters-ipc-filtered/counters-ipc-filtered.new-compiler.stdout b/humility-bin/tests/cmd/counters-ipc-filtered/counters-ipc-filtered.new-compiler.stdout new file mode 100644 index 00000000..e69de29b diff --git a/humility-bin/tests/cmd/counters-ipc-filtered/counters-ipc-filtered.new-compiler.toml b/humility-bin/tests/cmd/counters-ipc-filtered/counters-ipc-filtered.new-compiler.toml new file mode 100644 index 00000000..1002a7fc --- /dev/null +++ b/humility-bin/tests/cmd/counters-ipc-filtered/counters-ipc-filtered.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters ipc --client gimlet_seq --client net" +status.code = 1 diff --git a/humility-bin/tests/cmd/counters-ipc-full/counters-ipc-full.new-compiler.stderr b/humility-bin/tests/cmd/counters-ipc-full/counters-ipc-full.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/counters-ipc-full/counters-ipc-full.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/counters-ipc-full/counters-ipc-full.new-compiler.stdout b/humility-bin/tests/cmd/counters-ipc-full/counters-ipc-full.new-compiler.stdout new file mode 100644 index 00000000..310b49ae --- /dev/null +++ b/humility-bin/tests/cmd/counters-ipc-full/counters-ipc-full.new-compiler.stdout @@ -0,0 +1,272 @@ +drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS + fn Sys::enable_clock_raw() ........................................... 0 calls + clients: + task user_leds (0 restarts) ........................................ = 0 ok + - Err(NoSuchPeripheral) ............................ + 0 .................. + + fn Sys::disable_clock_raw() .......................................... 0 calls + clients: + task user_leds (0 restarts) ........................................ = 0 ok + - Err(NoSuchPeripheral) ............................ + 0 .................. + + fn Sys::enter_reset_raw() ............................................ 0 calls + clients: + task user_leds (0 restarts) ........................................ = 0 ok + - Err(NoSuchPeripheral) ............................ + 0 .................. + + fn Sys::leave_reset_raw() ............................................ 0 calls + clients: + task user_leds (0 restarts) ........................................ = 0 ok + - Err(NoSuchPeripheral) ............................ + 0 .................. + + fn Sys::gpio_configure_raw() ......................................... 1 calls + clients: + task user_leds (0 restarts) ........................................ = 1 ok + + fn Sys::gpio_set_reset() ............................................. 1 calls + clients: + task user_leds (0 restarts) ........................................ = 1 ok + + fn Sys::gpio_read_input() ............................................ 0 calls + clients: + task user_leds (0 restarts) ........................................ = 0 ok + + fn Sys::gpio_toggle() ............................................... 13 calls + clients: + task user_leds (0 restarts) ....................................... = 13 ok + + fn Sys::read_uid() ................................................... 0 calls + clients: + task user_leds (0 restarts) ........................................ = 0 ok + + fn Sys::gpio_irq_configure() ......................................... 0 calls + clients: + task user_leds (0 restarts) ........................................ = 0 ok + + fn Sys::gpio_irq_control() ........................................... 0 calls + clients: + task user_leds (0 restarts) ........................................ = 0 ok + + +drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS + fn UserLeds::led_on() ................................................ 0 calls + clients: + task pong (0 restarts) ............................................. = 0 ok + - Err(NotPresent) .................................. + 0 .................. + + fn UserLeds::led_off() ............................................... 0 calls + clients: + task pong (0 restarts) ............................................. = 0 ok + - Err(NotPresent) .................................. + 0 .................. + + fn UserLeds::led_toggle() ........................................... 19 calls + clients: + task pong (0 restarts) ............................................ = 13 ok + - Err(NotPresent) .................................. + 6 .................. + + fn UserLeds::led_blink() ............................................. 0 calls + clients: + task pong (0 restarts) ............................................. = 0 ok + - Err(NotPresent) .................................. + 0 .................. + + +task_jefe_api::__JEFE_CLIENT_COUNTERS + fn Jefe::get_state() ................................................. 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + + fn Jefe::set_state() ................................................. 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + + fn Jefe::request_reset() ............................................. 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + + fn Jefe::get_reset_reason() .......................................... 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + + fn Jefe::set_reset_reason() .......................................... 1 calls + clients: + task sys (0 restarts) .............................................. = 1 ok + + fn Jefe::reinitialize_dump_areas() ................................... 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + - Err(DumpAgentUnsupported) ........................ + 0 .................. + - Err(InvalidArea) ................................. + 0 .................. + - Err(BadOffset) ................................... + 0 .................. + - Err(UnalignedOffset) ............................. + 0 .................. + - Err(UnalignedSegmentAddress) ..................... + 0 .................. + - Err(UnalignedSegmentLength) ...................... + 0 .................. + - Err(BadDumpResponse) ............................. + 0 .................. + - Err(NotSupported) ................................ + 0 .................. + - Err(DumpPresent) ................................. + 0 .................. + - Err(UnclaimedDumpArea) ........................... + 0 .................. + - Err(CannotClaimDumpArea) ......................... + 0 .................. + - Err(DumpAreaInUse) ............................... + 0 .................. + - Err(BadSegmentAdd) ............................... + 0 .................. + - Err(DumpMessageFailed) ........................... + 0 .................. + - Err(DumpFailed) .................................. + 0 .................. + - Err(DumpFailedSetup) ............................. + 0 .................. + - Err(DumpFailedRead) .............................. + 0 .................. + - Err(DumpFailedWrite) ............................. + 0 .................. + - Err(DumpFailedControl) ........................... + 0 .................. + - Err(DumpFailedUnknown) ........................... + 0 .................. + - Err(DumpFailedUnknownError) ...................... + 0 .................. + - Err(LeaseWriteFailed) ............................ + 0 .................. + - Err(ServerRestarted) ............................. + 0 .................. + --- --- + totals: = 0 err = 0 ok + + fn Jefe::get_dump_area() ............................................. 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + - Err(DumpAgentUnsupported) ........................ + 0 .................. + - Err(InvalidArea) ................................. + 0 .................. + - Err(BadOffset) ................................... + 0 .................. + - Err(UnalignedOffset) ............................. + 0 .................. + - Err(UnalignedSegmentAddress) ..................... + 0 .................. + - Err(UnalignedSegmentLength) ...................... + 0 .................. + - Err(BadDumpResponse) ............................. + 0 .................. + - Err(NotSupported) ................................ + 0 .................. + - Err(DumpPresent) ................................. + 0 .................. + - Err(UnclaimedDumpArea) ........................... + 0 .................. + - Err(CannotClaimDumpArea) ......................... + 0 .................. + - Err(DumpAreaInUse) ............................... + 0 .................. + - Err(BadSegmentAdd) ............................... + 0 .................. + - Err(DumpMessageFailed) ........................... + 0 .................. + - Err(DumpFailed) .................................. + 0 .................. + - Err(DumpFailedSetup) ............................. + 0 .................. + - Err(DumpFailedRead) .............................. + 0 .................. + - Err(DumpFailedWrite) ............................. + 0 .................. + - Err(DumpFailedControl) ........................... + 0 .................. + - Err(DumpFailedUnknown) ........................... + 0 .................. + - Err(DumpFailedUnknownError) ...................... + 0 .................. + - Err(LeaseWriteFailed) ............................ + 0 .................. + - Err(ServerRestarted) ............................. + 0 .................. + --- --- + totals: = 0 err = 0 ok + + fn Jefe::claim_dump_area() ........................................... 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + - Err(DumpAgentUnsupported) ........................ + 0 .................. + - Err(InvalidArea) ................................. + 0 .................. + - Err(BadOffset) ................................... + 0 .................. + - Err(UnalignedOffset) ............................. + 0 .................. + - Err(UnalignedSegmentAddress) ..................... + 0 .................. + - Err(UnalignedSegmentLength) ...................... + 0 .................. + - Err(BadDumpResponse) ............................. + 0 .................. + - Err(NotSupported) ................................ + 0 .................. + - Err(DumpPresent) ................................. + 0 .................. + - Err(UnclaimedDumpArea) ........................... + 0 .................. + - Err(CannotClaimDumpArea) ......................... + 0 .................. + - Err(DumpAreaInUse) ............................... + 0 .................. + - Err(BadSegmentAdd) ............................... + 0 .................. + - Err(DumpMessageFailed) ........................... + 0 .................. + - Err(DumpFailed) .................................. + 0 .................. + - Err(DumpFailedSetup) ............................. + 0 .................. + - Err(DumpFailedRead) .............................. + 0 .................. + - Err(DumpFailedWrite) ............................. + 0 .................. + - Err(DumpFailedControl) ........................... + 0 .................. + - Err(DumpFailedUnknown) ........................... + 0 .................. + - Err(DumpFailedUnknownError) ...................... + 0 .................. + - Err(LeaseWriteFailed) ............................ + 0 .................. + - Err(ServerRestarted) ............................. + 0 .................. + --- --- + totals: = 0 err = 0 ok + + fn Jefe::dump_task() ................................................. 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + - Err(DumpAgentUnsupported) ........................ + 0 .................. + - Err(InvalidArea) ................................. + 0 .................. + - Err(BadOffset) ................................... + 0 .................. + - Err(UnalignedOffset) ............................. + 0 .................. + - Err(UnalignedSegmentAddress) ..................... + 0 .................. + - Err(UnalignedSegmentLength) ...................... + 0 .................. + - Err(BadDumpResponse) ............................. + 0 .................. + - Err(NotSupported) ................................ + 0 .................. + - Err(DumpPresent) ................................. + 0 .................. + - Err(UnclaimedDumpArea) ........................... + 0 .................. + - Err(CannotClaimDumpArea) ......................... + 0 .................. + - Err(DumpAreaInUse) ............................... + 0 .................. + - Err(BadSegmentAdd) ............................... + 0 .................. + - Err(DumpMessageFailed) ........................... + 0 .................. + - Err(DumpFailed) .................................. + 0 .................. + - Err(DumpFailedSetup) ............................. + 0 .................. + - Err(DumpFailedRead) .............................. + 0 .................. + - Err(DumpFailedWrite) ............................. + 0 .................. + - Err(DumpFailedControl) ........................... + 0 .................. + - Err(DumpFailedUnknown) ........................... + 0 .................. + - Err(DumpFailedUnknownError) ...................... + 0 .................. + - Err(LeaseWriteFailed) ............................ + 0 .................. + - Err(ServerRestarted) ............................. + 0 .................. + --- --- + totals: = 0 err = 0 ok + + fn Jefe::dump_task_region() .......................................... 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + - Err(DumpAgentUnsupported) ........................ + 0 .................. + - Err(InvalidArea) ................................. + 0 .................. + - Err(BadOffset) ................................... + 0 .................. + - Err(UnalignedOffset) ............................. + 0 .................. + - Err(UnalignedSegmentAddress) ..................... + 0 .................. + - Err(UnalignedSegmentLength) ...................... + 0 .................. + - Err(BadDumpResponse) ............................. + 0 .................. + - Err(NotSupported) ................................ + 0 .................. + - Err(DumpPresent) ................................. + 0 .................. + - Err(UnclaimedDumpArea) ........................... + 0 .................. + - Err(CannotClaimDumpArea) ......................... + 0 .................. + - Err(DumpAreaInUse) ............................... + 0 .................. + - Err(BadSegmentAdd) ............................... + 0 .................. + - Err(DumpMessageFailed) ........................... + 0 .................. + - Err(DumpFailed) .................................. + 0 .................. + - Err(DumpFailedSetup) ............................. + 0 .................. + - Err(DumpFailedRead) .............................. + 0 .................. + - Err(DumpFailedWrite) ............................. + 0 .................. + - Err(DumpFailedControl) ........................... + 0 .................. + - Err(DumpFailedUnknown) ........................... + 0 .................. + - Err(DumpFailedUnknownError) ...................... + 0 .................. + - Err(LeaseWriteFailed) ............................ + 0 .................. + - Err(ServerRestarted) ............................. + 0 .................. + --- --- + totals: = 0 err = 0 ok + + fn Jefe::reinitialize_dump_from() .................................... 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + - Err(DumpAgentUnsupported) ........................ + 0 .................. + - Err(InvalidArea) ................................. + 0 .................. + - Err(BadOffset) ................................... + 0 .................. + - Err(UnalignedOffset) ............................. + 0 .................. + - Err(UnalignedSegmentAddress) ..................... + 0 .................. + - Err(UnalignedSegmentLength) ...................... + 0 .................. + - Err(BadDumpResponse) ............................. + 0 .................. + - Err(NotSupported) ................................ + 0 .................. + - Err(DumpPresent) ................................. + 0 .................. + - Err(UnclaimedDumpArea) ........................... + 0 .................. + - Err(CannotClaimDumpArea) ......................... + 0 .................. + - Err(DumpAreaInUse) ............................... + 0 .................. + - Err(BadSegmentAdd) ............................... + 0 .................. + - Err(DumpMessageFailed) ........................... + 0 .................. + - Err(DumpFailed) .................................. + 0 .................. + - Err(DumpFailedSetup) ............................. + 0 .................. + - Err(DumpFailedRead) .............................. + 0 .................. + - Err(DumpFailedWrite) ............................. + 0 .................. + - Err(DumpFailedControl) ........................... + 0 .................. + - Err(DumpFailedUnknown) ........................... + 0 .................. + - Err(DumpFailedUnknownError) ...................... + 0 .................. + - Err(LeaseWriteFailed) ............................ + 0 .................. + - Err(ServerRestarted) ............................. + 0 .................. + --- --- + totals: = 0 err = 0 ok + + fn Jefe::restart_me_raw() ............................................ 0 calls + clients: + task sys (0 restarts) .............................................. = 0 ok + + diff --git a/humility-bin/tests/cmd/counters-ipc-full/counters-ipc-full.new-compiler.toml b/humility-bin/tests/cmd/counters-ipc-full/counters-ipc-full.new-compiler.toml new file mode 100644 index 00000000..3843f5b8 --- /dev/null +++ b/humility-bin/tests/cmd/counters-ipc-full/counters-ipc-full.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters ipc --full" + diff --git a/humility-bin/tests/cmd/counters-ipc/counters-ipc.new-compiler.stderr b/humility-bin/tests/cmd/counters-ipc/counters-ipc.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/counters-ipc/counters-ipc.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/counters-ipc/counters-ipc.new-compiler.stdout b/humility-bin/tests/cmd/counters-ipc/counters-ipc.new-compiler.stdout new file mode 100644 index 00000000..6f1b5f27 --- /dev/null +++ b/humility-bin/tests/cmd/counters-ipc/counters-ipc.new-compiler.stdout @@ -0,0 +1,27 @@ +drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS + fn Sys::gpio_toggle() ............................................... 13 calls + clients: + task user_leds (0 restarts) ........................ = 0 .......... = 13 ok + + fn Sys::gpio_configure_raw() ......................................... 1 calls + clients: + task user_leds (0 restarts) ........................ = 0 ........... = 1 ok + + fn Sys::gpio_set_reset() ............................................. 1 calls + clients: + task user_leds (0 restarts) ........................ = 0 ........... = 1 ok + + +drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS + fn UserLeds::led_toggle() ........................................... 19 calls + clients: + task pong (0 restarts) ............................................ = 13 ok + - Err(NotPresent) .................................. + 6 .................. + + +task_jefe_api::__JEFE_CLIENT_COUNTERS + fn Jefe::set_reset_reason() .......................................... 1 calls + clients: + task sys (0 restarts) .............................. = 0 ........... = 1 ok + + diff --git a/humility-bin/tests/cmd/counters-ipc/counters-ipc.new-compiler.toml b/humility-bin/tests/cmd/counters-ipc/counters-ipc.new-compiler.toml new file mode 100644 index 00000000..b163e3e6 --- /dev/null +++ b/humility-bin/tests/cmd/counters-ipc/counters-ipc.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters ipc" + diff --git a/humility-bin/tests/cmd/counters-json/counters-json.new-compiler.stderr b/humility-bin/tests/cmd/counters-json/counters-json.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/counters-json/counters-json.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/counters-json/counters-json.new-compiler.stdout b/humility-bin/tests/cmd/counters-json/counters-json.new-compiler.stdout new file mode 100644 index 00000000..84a60495 --- /dev/null +++ b/humility-bin/tests/cmd/counters-json/counters-json.new-compiler.stdout @@ -0,0 +1,249 @@ +{ + "pong": { + "drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS": { + "led_on": { + "Ok": 0, + "Err": { + "NotPresent": 0 + } + }, + "led_off": { + "Ok": 0, + "Err": { + "NotPresent": 0 + } + }, + "led_toggle": { + "Ok": 13, + "Err": { + "NotPresent": 6 + } + }, + "led_blink": { + "Ok": 0, + "Err": { + "NotPresent": 0 + } + } + } + }, + "sys": { + "task_jefe_api::__JEFE_CLIENT_COUNTERS": { + "get_state": 0, + "set_state": 0, + "request_reset": 0, + "get_reset_reason": 0, + "set_reset_reason": 1, + "reinitialize_dump_areas": { + "Ok": 0, + "Err": { + "DumpAgentUnsupported": 0, + "InvalidArea": 0, + "BadOffset": 0, + "UnalignedOffset": 0, + "UnalignedSegmentAddress": 0, + "UnalignedSegmentLength": 0, + "BadDumpResponse": 0, + "NotSupported": 0, + "DumpPresent": 0, + "UnclaimedDumpArea": 0, + "CannotClaimDumpArea": 0, + "DumpAreaInUse": 0, + "BadSegmentAdd": 0, + "DumpMessageFailed": 0, + "DumpFailed": 0, + "DumpFailedSetup": 0, + "DumpFailedRead": 0, + "DumpFailedWrite": 0, + "DumpFailedControl": 0, + "DumpFailedUnknown": 0, + "DumpFailedUnknownError": 0, + "LeaseWriteFailed": 0, + "ServerRestarted": 0 + } + }, + "get_dump_area": { + "Ok": 0, + "Err": { + "DumpAgentUnsupported": 0, + "InvalidArea": 0, + "BadOffset": 0, + "UnalignedOffset": 0, + "UnalignedSegmentAddress": 0, + "UnalignedSegmentLength": 0, + "BadDumpResponse": 0, + "NotSupported": 0, + "DumpPresent": 0, + "UnclaimedDumpArea": 0, + "CannotClaimDumpArea": 0, + "DumpAreaInUse": 0, + "BadSegmentAdd": 0, + "DumpMessageFailed": 0, + "DumpFailed": 0, + "DumpFailedSetup": 0, + "DumpFailedRead": 0, + "DumpFailedWrite": 0, + "DumpFailedControl": 0, + "DumpFailedUnknown": 0, + "DumpFailedUnknownError": 0, + "LeaseWriteFailed": 0, + "ServerRestarted": 0 + } + }, + "claim_dump_area": { + "Ok": 0, + "Err": { + "DumpAgentUnsupported": 0, + "InvalidArea": 0, + "BadOffset": 0, + "UnalignedOffset": 0, + "UnalignedSegmentAddress": 0, + "UnalignedSegmentLength": 0, + "BadDumpResponse": 0, + "NotSupported": 0, + "DumpPresent": 0, + "UnclaimedDumpArea": 0, + "CannotClaimDumpArea": 0, + "DumpAreaInUse": 0, + "BadSegmentAdd": 0, + "DumpMessageFailed": 0, + "DumpFailed": 0, + "DumpFailedSetup": 0, + "DumpFailedRead": 0, + "DumpFailedWrite": 0, + "DumpFailedControl": 0, + "DumpFailedUnknown": 0, + "DumpFailedUnknownError": 0, + "LeaseWriteFailed": 0, + "ServerRestarted": 0 + } + }, + "dump_task": { + "Ok": 0, + "Err": { + "DumpAgentUnsupported": 0, + "InvalidArea": 0, + "BadOffset": 0, + "UnalignedOffset": 0, + "UnalignedSegmentAddress": 0, + "UnalignedSegmentLength": 0, + "BadDumpResponse": 0, + "NotSupported": 0, + "DumpPresent": 0, + "UnclaimedDumpArea": 0, + "CannotClaimDumpArea": 0, + "DumpAreaInUse": 0, + "BadSegmentAdd": 0, + "DumpMessageFailed": 0, + "DumpFailed": 0, + "DumpFailedSetup": 0, + "DumpFailedRead": 0, + "DumpFailedWrite": 0, + "DumpFailedControl": 0, + "DumpFailedUnknown": 0, + "DumpFailedUnknownError": 0, + "LeaseWriteFailed": 0, + "ServerRestarted": 0 + } + }, + "dump_task_region": { + "Ok": 0, + "Err": { + "DumpAgentUnsupported": 0, + "InvalidArea": 0, + "BadOffset": 0, + "UnalignedOffset": 0, + "UnalignedSegmentAddress": 0, + "UnalignedSegmentLength": 0, + "BadDumpResponse": 0, + "NotSupported": 0, + "DumpPresent": 0, + "UnclaimedDumpArea": 0, + "CannotClaimDumpArea": 0, + "DumpAreaInUse": 0, + "BadSegmentAdd": 0, + "DumpMessageFailed": 0, + "DumpFailed": 0, + "DumpFailedSetup": 0, + "DumpFailedRead": 0, + "DumpFailedWrite": 0, + "DumpFailedControl": 0, + "DumpFailedUnknown": 0, + "DumpFailedUnknownError": 0, + "LeaseWriteFailed": 0, + "ServerRestarted": 0 + } + }, + "reinitialize_dump_from": { + "Ok": 0, + "Err": { + "DumpAgentUnsupported": 0, + "InvalidArea": 0, + "BadOffset": 0, + "UnalignedOffset": 0, + "UnalignedSegmentAddress": 0, + "UnalignedSegmentLength": 0, + "BadDumpResponse": 0, + "NotSupported": 0, + "DumpPresent": 0, + "UnclaimedDumpArea": 0, + "CannotClaimDumpArea": 0, + "DumpAreaInUse": 0, + "BadSegmentAdd": 0, + "DumpMessageFailed": 0, + "DumpFailed": 0, + "DumpFailedSetup": 0, + "DumpFailedRead": 0, + "DumpFailedWrite": 0, + "DumpFailedControl": 0, + "DumpFailedUnknown": 0, + "DumpFailedUnknownError": 0, + "LeaseWriteFailed": 0, + "ServerRestarted": 0 + } + }, + "restart_me_raw": 0 + } + }, + "user_leds": { + "drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS": { + "enable_clock_raw": { + "Ok": 0, + "Err": { + "NoSuchPeripheral": 0 + } + }, + "disable_clock_raw": { + "Ok": 0, + "Err": { + "NoSuchPeripheral": 0 + } + }, + "enter_reset_raw": { + "Ok": 0, + "Err": { + "NoSuchPeripheral": 0 + } + }, + "leave_reset_raw": { + "Ok": 0, + "Err": { + "NoSuchPeripheral": 0 + } + }, + "gpio_configure_raw": 1, + "gpio_set_reset": 1, + "gpio_read_input": 0, + "gpio_toggle": { + "Ok": 13, + "Err": 0 + }, + "read_uid": 0, + "gpio_irq_configure": 0, + "gpio_irq_control": { + "Ok": 0, + "Err": 0 + } + } + } +} \ No newline at end of file diff --git a/humility-bin/tests/cmd/counters-json/counters-json.new-compiler.toml b/humility-bin/tests/cmd/counters-json/counters-json.new-compiler.toml new file mode 100644 index 00000000..4d72d382 --- /dev/null +++ b/humility-bin/tests/cmd/counters-json/counters-json.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters --output json" + diff --git a/humility-bin/tests/cmd/counters-list/counters-list.new-compiler.stderr b/humility-bin/tests/cmd/counters-list/counters-list.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/counters-list/counters-list.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/counters-list/counters-list.new-compiler.stdout b/humility-bin/tests/cmd/counters-list/counters-list.new-compiler.stdout new file mode 100644 index 00000000..64d15c64 --- /dev/null +++ b/humility-bin/tests/cmd/counters-list/counters-list.new-compiler.stdout @@ -0,0 +1,9 @@ +pong: + ADDR SIZE VARIABLE + 0x24001600 32 drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS +sys: + ADDR SIZE VARIABLE + 0x24000a00 600 task_jefe_api::__JEFE_CLIENT_COUNTERS +user_leds: + ADDR SIZE VARIABLE + 0x24001a00 68 drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS diff --git a/humility-bin/tests/cmd/counters-list/counters-list.new-compiler.toml b/humility-bin/tests/cmd/counters-list/counters-list.new-compiler.toml new file mode 100644 index 00000000..ce8c14f6 --- /dev/null +++ b/humility-bin/tests/cmd/counters-list/counters-list.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters list" + diff --git a/humility-bin/tests/cmd/counters/counters.new-compiler.stderr b/humility-bin/tests/cmd/counters/counters.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/counters/counters.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/counters/counters.new-compiler.stdout b/humility-bin/tests/cmd/counters/counters.new-compiler.stdout new file mode 100644 index 00000000..49033202 --- /dev/null +++ b/humility-bin/tests/cmd/counters/counters.new-compiler.stdout @@ -0,0 +1,15 @@ +pong + | + +---> drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS: + 13 led_toggle(Ok) + 6 led_toggle(Err(NotPresent)) +sys + | + +---> task_jefe_api::__JEFE_CLIENT_COUNTERS: + 1 set_reset_reason +user_leds + | + +---> drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS: + 13 gpio_toggle(Ok) + 1 gpio_configure_raw + 1 gpio_set_reset diff --git a/humility-bin/tests/cmd/counters/counters.new-compiler.toml b/humility-bin/tests/cmd/counters/counters.new-compiler.toml new file mode 100644 index 00000000..8597d821 --- /dev/null +++ b/humility-bin/tests/cmd/counters/counters.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler counters" + diff --git a/humility-bin/tests/cmd/extract-list/extract-list.new-compiler.stderr b/humility-bin/tests/cmd/extract-list/extract-list.new-compiler.stderr new file mode 100644 index 00000000..e69de29b diff --git a/humility-bin/tests/cmd/extract-list/extract-list.new-compiler.stdout b/humility-bin/tests/cmd/extract-list/extract-list.new-compiler.stdout new file mode 100644 index 00000000..69a8e56c --- /dev/null +++ b/humility-bin/tests/cmd/extract-list/extract-list.new-compiler.stdout @@ -0,0 +1,18 @@ + SIZE NAME + 462 README.TXT + 46 git-rev + 7 image-name + 960 app.toml + 2369 chip.toml + 1027 memory.toml + 129436 elf/task/jefe + 305660 elf/task/sys + 103108 elf/task/user_leds + 27600 elf/task/pong + 10276 elf/task/idle + 471244 elf/kernel + 39168 img/final.elf + 38944 img/final.bin + 36 img/flash.ron + 1586 debug/openocd.cfg + 235 debug/openocd.gdb diff --git a/humility-bin/tests/cmd/extract-list/extract-list.new-compiler.toml b/humility-bin/tests/cmd/extract-list/extract-list.new-compiler.toml new file mode 100644 index 00000000..faf04045 --- /dev/null +++ b/humility-bin/tests/cmd/extract-list/extract-list.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler extract --list" + diff --git a/humility-bin/tests/cmd/extract/extract.new-compiler.stderr b/humility-bin/tests/cmd/extract/extract.new-compiler.stderr new file mode 100644 index 00000000..db86d97e --- /dev/null +++ b/humility-bin/tests/cmd/extract/extract.new-compiler.stderr @@ -0,0 +1 @@ +humility: extracting app.toml to stdout diff --git a/humility-bin/tests/cmd/extract/extract.new-compiler.stdout b/humility-bin/tests/cmd/extract/extract.new-compiler.stdout new file mode 100644 index 00000000..eeacc74f --- /dev/null +++ b/humility-bin/tests/cmd/extract/extract.new-compiler.stdout @@ -0,0 +1,50 @@ +board = "grapefruit" +name = "grapefruit-mini" +target = "thumbv7em-none-eabihf" +chip = "../../chips/stm32h7" +memory = "memory-large.toml" +stacksize = 512 + +[kernel] +name = "grapefruit" +requires = {flash = 32768, ram = 2048} +features = ["measurement-handoff"] +extern-regions = ["dtcm"] + +[tasks.jefe] +name = "task-jefe" +priority = 0 +start = true +notifications = ["fault", "timer"] +extern-regions = ["sram1", "sram2", "sram3", "sram4"] + +[tasks.jefe.config.allowed-callers] +set_reset_reason = ["sys"] + +[tasks.sys] +name = "drv-stm32xx-sys" +features = ["h753"] +priority = 1 +uses = ["rcc", "gpios", "system_flash", "syscfg"] +start = true +task-slots = ["jefe"] + +[tasks.user_leds] +name = "drv-user-leds" +features = ["stm32h7"] +priority = 5 +start = true +task-slots = ["sys"] +notifications = ["timer"] + +[tasks.pong] +name = "task-pong" +priority = 8 +start = true +task-slots = ["user_leds"] +notifications = ["timer"] + +[tasks.idle] +name = "task-idle" +priority = 9 +start = true diff --git a/humility-bin/tests/cmd/extract/extract.new-compiler.toml b/humility-bin/tests/cmd/extract/extract.new-compiler.toml new file mode 100644 index 00000000..79681b63 --- /dev/null +++ b/humility-bin/tests/cmd/extract/extract.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler extract app.toml" + diff --git a/humility-bin/tests/cmd/hiffy-list/hiffy-list.new-compiler.stderr b/humility-bin/tests/cmd/hiffy-list/hiffy-list.new-compiler.stderr new file mode 100644 index 00000000..10512b11 --- /dev/null +++ b/humility-bin/tests/cmd/hiffy-list/hiffy-list.new-compiler.stderr @@ -0,0 +1,2 @@ +humility: attached to dump +humility: WARNING: couldn't find type [u32; 3] for Sys.read_uid diff --git a/humility-bin/tests/cmd/hiffy-list/hiffy-list.new-compiler.stdout b/humility-bin/tests/cmd/hiffy-list/hiffy-list.new-compiler.stdout new file mode 100644 index 00000000..d7186d64 --- /dev/null +++ b/humility-bin/tests/cmd/hiffy-list/hiffy-list.new-compiler.stdout @@ -0,0 +1,132 @@ +INTERFACE TASK +Jefe jefe + | + +--> Jefe.get_state + | u32 + | + +--> Jefe.set_state + | state u32 + | () + | + +--> Jefe.request_reset + | () + | + +--> Jefe.get_reset_reason + | ResetReason + | + +--> Jefe.set_reset_reason + | reason ResetReason + | () + | + +--> Jefe.reinitialize_dump_areas + | () + | DumpAgentError + | + +--> Jefe.get_dump_area + | index u8 + | humpty::DumpArea + | DumpAgentError + | + +--> Jefe.claim_dump_area + | humpty::DumpArea + | DumpAgentError + | + +--> Jefe.dump_task + | task_index u32 + | u8 + | DumpAgentError + | + +--> Jefe.dump_task_region + | task_index u32 + | address u32 + | length u32 + | u8 + | DumpAgentError + | + +--> Jefe.reinitialize_dump_from + | index u8 + | () + | DumpAgentError + | + +--> Jefe.restart_me_raw + () + +INTERFACE TASK +Sys sys + | + +--> Sys.enable_clock_raw + | peripheral u32 + | () + | RccError + | + +--> Sys.disable_clock_raw + | peripheral u32 + | () + | RccError + | + +--> Sys.enter_reset_raw + | peripheral u32 + | () + | RccError + | + +--> Sys.leave_reset_raw + | peripheral u32 + | () + | RccError + | + +--> Sys.gpio_configure_raw + | port Port + | pins u16 + | packed_attributes u16 + | () + | + +--> Sys.gpio_set_reset + | port Port + | set_pins u16 + | reset_pins u16 + | () + | + +--> Sys.gpio_read_input + | port Port + | u16 + | + +--> Sys.gpio_toggle + | port Port + | pins u16 + | () + | + +--> Sys.read_uid + | + +--> Sys.gpio_irq_configure + | mask u32 + | sensitivity Edge + | () + | + +--> Sys.gpio_irq_control + mask u32 + op IrqControl + bool + +INTERFACE TASK +UserLeds user_leds + | + +--> UserLeds.led_on + | index usize + | () + | LedError + | + +--> UserLeds.led_off + | index usize + | () + | LedError + | + +--> UserLeds.led_toggle + | index usize + | () + | LedError + | + +--> UserLeds.led_blink + index usize + () + LedError + diff --git a/humility-bin/tests/cmd/hiffy-list/hiffy-list.new-compiler.toml b/humility-bin/tests/cmd/hiffy-list/hiffy-list.new-compiler.toml new file mode 100644 index 00000000..9b97e364 --- /dev/null +++ b/humility-bin/tests/cmd/hiffy-list/hiffy-list.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler hiffy --list" + diff --git a/humility-bin/tests/cmd/host-panic/host-panic.new-compiler.stderr b/humility-bin/tests/cmd/host-panic/host-panic.new-compiler.stderr new file mode 100644 index 00000000..ca2a9d88 --- /dev/null +++ b/humility-bin/tests/cmd/host-panic/host-panic.new-compiler.stderr @@ -0,0 +1,2 @@ +humility: attached to dump +humility host failed: Could not find host boot variables under any known name; is this a Gimlet image? diff --git a/humility-bin/tests/cmd/host-panic/host-panic.new-compiler.stdout b/humility-bin/tests/cmd/host-panic/host-panic.new-compiler.stdout new file mode 100644 index 00000000..e69de29b diff --git a/humility-bin/tests/cmd/host-panic/host-panic.new-compiler.toml b/humility-bin/tests/cmd/host-panic/host-panic.new-compiler.toml new file mode 100644 index 00000000..45e84b62 --- /dev/null +++ b/humility-bin/tests/cmd/host-panic/host-panic.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler host last-panic" +status.code = 1 diff --git a/humility-bin/tests/cmd/manifest/manifest.new-compiler.stderr b/humility-bin/tests/cmd/manifest/manifest.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/manifest/manifest.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/manifest/manifest.new-compiler.stdout b/humility-bin/tests/cmd/manifest/manifest.new-compiler.stdout new file mode 100644 index 00000000..9150b022 --- /dev/null +++ b/humility-bin/tests/cmd/manifest/manifest.new-compiler.stdout @@ -0,0 +1,17 @@ + version => hubris build archive v10 + git rev => b068dee683c45a9578a2228668f0a59587cdf6c8-dirty + image id => [d7, fd, 9f, 7e, b4, 49, 6a, 59] + board => grapefruit + name => grapefruit-mini + image => default + target => thumbv7em-none-eabihf + features => measurement-handoff + total size => 39K + kernel size => 32K + tasks => 5 + ID OBJ TASK SIZE FEATURES + 0 2 sys 2.6K h753 + 1 1 jefe 2.3K + 2 5 idle 0.1K + 3 3 user_leds 1.2K stm32h7 + 4 4 pong 0.6K diff --git a/humility-bin/tests/cmd/manifest/manifest.new-compiler.toml b/humility-bin/tests/cmd/manifest/manifest.new-compiler.toml new file mode 100644 index 00000000..f737a4c3 --- /dev/null +++ b/humility-bin/tests/cmd/manifest/manifest.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler manifest" + diff --git a/humility-bin/tests/cmd/map/map.new-compiler.stderr b/humility-bin/tests/cmd/map/map.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/map/map.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/map/map.new-compiler.stdout b/humility-bin/tests/cmd/map/map.new-compiler.stdout new file mode 100644 index 00000000..92f3604f --- /dev/null +++ b/humility-bin/tests/cmd/map/map.new-compiler.stdout @@ -0,0 +1,33 @@ +DESC LOW HIGH SIZE ATTR ID TASK +- 0x08000000 - 0x080002e7 744 r----- - kernel +- 0x080002e8 - 0x08003a77 13KiB r-x--- - kernel +- 0x08003a78 - 0x080046fb 3KiB r----- - kernel +- 0x08004700 - 0x08007fff 14KiB r----- - kernel +0x0800453c 0x08008000 - 0x080087ff 2KiB r-x--- 1 sys +0x080044b0 0x08008800 - 0x08008fff 2KiB r-x--- 0 jefe +0x080044c4 0x08009000 - 0x080090ff 256 r-x--- 0 jefe +0x08004618 0x08009100 - 0x0800913f 64 r-x--- 4 idle +0x0800462c 0x08009140 - 0x0800915f 32 r-x--- 4 idle +0x08004564 0x08009160 - 0x0800917f 32 r-x--- 2 user_leds +0x08004578 0x08009180 - 0x080091ff 128 r-x--- 2 user_leds +0x0800458c 0x08009200 - 0x080093ff 512 r-x--- 2 user_leds +0x080045a0 0x08009400 - 0x080095ff 512 r-x--- 2 user_leds +0x080045c8 0x08009600 - 0x080096ff 256 r-x--- 3 pong +0x080045dc 0x08009700 - 0x080097ff 256 r-x--- 3 pong +0x080045f0 0x08009800 - 0x0800981f 32 r-x--- 3 pong +0x0800449c 0x1ff00000 - 0x1ff1ffff 128KiB rw-d-- 1 [system_flash] sys +- 0x24000000 - 0x240003ff 1KiB rw---- - kernel +- 0x24000400 - 0x24000403 4 rw---- - kernel +- 0x24000408 - 0x240007ff 1016 rw---- - kernel +0x08004550 0x24000800 - 0x24000fff 2KiB rw---- 1 sys +0x080044d8 0x24001000 - 0x240013ff 1KiB rw---- 0 jefe +0x08004604 0x24001400 - 0x240017ff 1KiB rw---- 3 pong +0x080045b4 0x24001800 - 0x24001bff 1KiB rw---- 2 user_leds +0x08004640 0x24001c00 - 0x24001dff 512 rw---- 4 idle +0x080044ec 0x30010000 - 0x3001ffff 64KiB rw--me 0 [sram1] jefe +0x08004500 0x30020000 - 0x3003ffff 128KiB rw--me 0 [sram2] jefe +0x08004514 0x30040000 - 0x30047fff 32KiB rw--me 0 [sram3] jefe +0x08004528 0x38000000 - 0x3800ffff 64KiB rw--me 0 [sram4] jefe +0x08004488 0x58000400 - 0x580007ff 1KiB rw-d-- 1 [syscfg] sys +0x08004460 0x58020000 - 0x58023fff 16KiB rw-d-- 1 [gpios] sys +0x08004474 0x58024400 - 0x580247ff 1KiB rw-d-- 1 [rcc] sys diff --git a/humility-bin/tests/cmd/map/map.new-compiler.toml b/humility-bin/tests/cmd/map/map.new-compiler.toml new file mode 100644 index 00000000..11db28ae --- /dev/null +++ b/humility-bin/tests/cmd/map/map.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler map" + diff --git a/humility-bin/tests/cmd/readvar-list/readvar-list.new-compiler.stderr b/humility-bin/tests/cmd/readvar-list/readvar-list.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/readvar-list/readvar-list.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/readvar-list/readvar-list.new-compiler.stdout b/humility-bin/tests/cmd/readvar-list/readvar-list.new-compiler.stdout new file mode 100644 index 00000000..f9d11307 --- /dev/null +++ b/humility-bin/tests/cmd/readvar-list/readvar-list.new-compiler.stdout @@ -0,0 +1,28 @@ +MODULE VARIABLE ADDR SIZE +kernel CLOCK_FREQ_KHZ 0x2400048c 4 +kernel CURRENT_TASK_PTR 0x240007dc 4 +kernel DEVICE_PERIPHERALS 0x240007d9 1 +kernel HUBRIS_IMAGE_ID 0x08004368 8 +kernel __EXCEPTIONS 0x08000008 56 +kernel __INTERRUPTS 0x08000040 600 +kernel __RESET_VECTOR 0x08000004 4 +kernel kern::arch::arm_m::TICKS 0x240007e0 8 +kernel kern::fail::KERNEL_EPITAPH 0x24000408 128 +kernel kern::fail::KERNEL_HAS_FAILED 0x24000488 1 +kernel kern::startup::HUBRIS_REGION_DESCS 0x0800444c 520 +kernel kern::startup::HUBRIS_TASK_DESCS 0x08004370 220 +kernel kern::startup::HUBRIS_TASK_TABLE_SPACE 0x24000490 840 +kernel kern::startup::TASK_TABLE_IN_USE 0x24000400 1 +jefe JEFE_EXTERNAL_ERRORS 0x24001248 4 +jefe JEFE_EXTERNAL_KICK 0x24001240 4 +jefe JEFE_EXTERNAL_READY 0x24001234 4 +jefe JEFE_EXTERNAL_REQUEST 0x24001238 4 +jefe JEFE_EXTERNAL_REQUESTS 0x24001244 4 +jefe JEFE_EXTERNAL_TASKINDEX 0x2400123c 4 +jefe task_jefe::external::__RINGBUF 0x24001200 52 +sys drv_stm32xx_sys::JEFE 0x080086d0 2 +sys task_jefe_api::__JEFE_CLIENT_COUNTERS 0x24000a00 600 +user_leds drv_stm32xx_sys_api::__SYS_CLIENT_COUNTERS 0x24001a00 68 +user_leds drv_user_leds::SYS 0x080095e2 2 +pong drv_user_leds_api::__USERLEDS_CLIENT_COUNTERS 0x24001600 32 +pong task_pong::USER_LEDS 0x08009808 2 diff --git a/humility-bin/tests/cmd/readvar-list/readvar-list.new-compiler.toml b/humility-bin/tests/cmd/readvar-list/readvar-list.new-compiler.toml new file mode 100644 index 00000000..de200f3e --- /dev/null +++ b/humility-bin/tests/cmd/readvar-list/readvar-list.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler readvar -l" + diff --git a/humility-bin/tests/cmd/readvar-ticks/readvar-ticks.new-compiler.stderr b/humility-bin/tests/cmd/readvar-ticks/readvar-ticks.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/readvar-ticks/readvar-ticks.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/readvar-ticks/readvar-ticks.new-compiler.stdout b/humility-bin/tests/cmd/readvar-ticks/readvar-ticks.new-compiler.stdout new file mode 100644 index 00000000..4372409b --- /dev/null +++ b/humility-bin/tests/cmd/readvar-ticks/readvar-ticks.new-compiler.stdout @@ -0,0 +1,12 @@ +kern::arch::arm_m::TICKS (0x240007e0) = [ + AtomicU32 { + v: UnsafeCell { + value: 0x19d3 + } + }, + AtomicU32 { + v: UnsafeCell { + value: 0x0 + } + } +] diff --git a/humility-bin/tests/cmd/readvar-ticks/readvar-ticks.new-compiler.toml b/humility-bin/tests/cmd/readvar-ticks/readvar-ticks.new-compiler.toml new file mode 100644 index 00000000..0eb77c68 --- /dev/null +++ b/humility-bin/tests/cmd/readvar-ticks/readvar-ticks.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler readvar TICKS" + diff --git a/humility-bin/tests/cmd/registers-s/registers-s.new-compiler.stderr b/humility-bin/tests/cmd/registers-s/registers-s.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/registers-s/registers-s.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/registers-s/registers-s.new-compiler.stdout b/humility-bin/tests/cmd/registers-s/registers-s.new-compiler.stdout new file mode 100644 index 00000000..0a4b081f --- /dev/null +++ b/humility-bin/tests/cmd/registers-s/registers-s.new-compiler.stdout @@ -0,0 +1,43 @@ + R0 = 0x24001e00 <- idle: 0x24001c00+0x200 + R1 = 0x24001e00 <- idle: 0x24001c00+0x200 + R2 = 0x00000000 + R3 = 0x00000000 + R4 = 0x00000000 + R5 = 0x00000000 + R6 = 0x00000000 + R7 = 0x24001df8 <- idle: 0x24001c00+0x1f8 + R8 = 0x00000000 + R9 = 0x00000000 + R10 = 0x00000000 + R11 = 0x00000000 + R12 = 0x00000000 + SP = 0x24001df8 <- idle: 0x24001c00+0x1f8 + | + +---> 0x24001e00 0x08009154 main + + LR = 0x0800914f <- idle: main+0x1 + PC = 0x08009154 <- idle: main+0x6 + PSR = 0x61000000 <- 0110_0001_0000_0000_0000_0000_0000_0000 + |||| | || | | | + |||| | || | | + Exception = 0x0 + |||| | || | +------------ IC/IT = 0x0 + |||| | || +-------------------- GE = 0x0 + |||| | |+------------------------------ T = 1 + |||| | +------------------------------- IC/IT = 0x0 + |||| +--------------------------------- Q = 0 + |||+----------------------------------- V = 0 + ||+------------------------------------ C = 1 + |+------------------------------------- Z = 1 + +-------------------------------------- N = 0 + + MSP = 0x240003b0 <- kernel: 0x24000000+0x3b0 + PSP = 0x24001df8 <- idle: 0x24001c00+0x1f8 + SPR = 0x07000000 <- 0000_0111_0000_0000_0000_0000_0000_0000 + ||| | | | + ||| | | + PRIMASK = 0 + ||| | +---------- BASEPRI = 0x0 + ||| +-------------------- FAULTMASK = 0 + ||+------------------------------ CONTROL.nPRIV = 1 + |+------------------------------- CONTROL.SPSEL = 1 + +-------------------------------- CONTROL.FPCA = 1 + diff --git a/humility-bin/tests/cmd/registers-s/registers-s.new-compiler.toml b/humility-bin/tests/cmd/registers-s/registers-s.new-compiler.toml new file mode 100644 index 00000000..2d4e8c33 --- /dev/null +++ b/humility-bin/tests/cmd/registers-s/registers-s.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler registers -s" + diff --git a/humility-bin/tests/cmd/registers/registers.new-compiler.stderr b/humility-bin/tests/cmd/registers/registers.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/registers/registers.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/registers/registers.new-compiler.stdout b/humility-bin/tests/cmd/registers/registers.new-compiler.stdout new file mode 100644 index 00000000..8d441208 --- /dev/null +++ b/humility-bin/tests/cmd/registers/registers.new-compiler.stdout @@ -0,0 +1,40 @@ + R0 = 0x24001e00 <- idle: 0x24001c00+0x200 + R1 = 0x24001e00 <- idle: 0x24001c00+0x200 + R2 = 0x00000000 + R3 = 0x00000000 + R4 = 0x00000000 + R5 = 0x00000000 + R6 = 0x00000000 + R7 = 0x24001df8 <- idle: 0x24001c00+0x1f8 + R8 = 0x00000000 + R9 = 0x00000000 + R10 = 0x00000000 + R11 = 0x00000000 + R12 = 0x00000000 + SP = 0x24001df8 <- idle: 0x24001c00+0x1f8 + LR = 0x0800914f <- idle: main+0x1 + PC = 0x08009154 <- idle: main+0x6 + PSR = 0x61000000 <- 0110_0001_0000_0000_0000_0000_0000_0000 + |||| | || | | | + |||| | || | | + Exception = 0x0 + |||| | || | +------------ IC/IT = 0x0 + |||| | || +-------------------- GE = 0x0 + |||| | |+------------------------------ T = 1 + |||| | +------------------------------- IC/IT = 0x0 + |||| +--------------------------------- Q = 0 + |||+----------------------------------- V = 0 + ||+------------------------------------ C = 1 + |+------------------------------------- Z = 1 + +-------------------------------------- N = 0 + + MSP = 0x240003b0 <- kernel: 0x24000000+0x3b0 + PSP = 0x24001df8 <- idle: 0x24001c00+0x1f8 + SPR = 0x07000000 <- 0000_0111_0000_0000_0000_0000_0000_0000 + ||| | | | + ||| | | + PRIMASK = 0 + ||| | +---------- BASEPRI = 0x0 + ||| +-------------------- FAULTMASK = 0 + ||+------------------------------ CONTROL.nPRIV = 1 + |+------------------------------- CONTROL.SPSEL = 1 + +-------------------------------- CONTROL.FPCA = 1 + diff --git a/humility-bin/tests/cmd/registers/registers.new-compiler.toml b/humility-bin/tests/cmd/registers/registers.new-compiler.toml new file mode 100644 index 00000000..4bbe9700 --- /dev/null +++ b/humility-bin/tests/cmd/registers/registers.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler registers" + diff --git a/humility-bin/tests/cmd/ringbuf-arg/ringbuf-arg.new-compiler.stderr b/humility-bin/tests/cmd/ringbuf-arg/ringbuf-arg.new-compiler.stderr new file mode 100644 index 00000000..485a36d9 --- /dev/null +++ b/humility-bin/tests/cmd/ringbuf-arg/ringbuf-arg.new-compiler.stderr @@ -0,0 +1,2 @@ +humility: attached to dump +humility ringbuf failed: no ring buffer name contains "i2c" (-l to list) diff --git a/humility-bin/tests/cmd/ringbuf-arg/ringbuf-arg.new-compiler.stdout b/humility-bin/tests/cmd/ringbuf-arg/ringbuf-arg.new-compiler.stdout new file mode 100644 index 00000000..e69de29b diff --git a/humility-bin/tests/cmd/ringbuf-arg/ringbuf-arg.new-compiler.toml b/humility-bin/tests/cmd/ringbuf-arg/ringbuf-arg.new-compiler.toml new file mode 100644 index 00000000..050ef7f3 --- /dev/null +++ b/humility-bin/tests/cmd/ringbuf-arg/ringbuf-arg.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler ringbuf i2c" +status.code = 1 diff --git a/humility-bin/tests/cmd/ringbuf-full-totals/ringbuf-full-totals.new-compiler.stderr b/humility-bin/tests/cmd/ringbuf-full-totals/ringbuf-full-totals.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/ringbuf-full-totals/ringbuf-full-totals.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/ringbuf-full-totals/ringbuf-full-totals.new-compiler.stdout b/humility-bin/tests/cmd/ringbuf-full-totals/ringbuf-full-totals.new-compiler.stdout new file mode 100644 index 00000000..b7f6e019 --- /dev/null +++ b/humility-bin/tests/cmd/ringbuf-full-totals/ringbuf-full-totals.new-compiler.stdout @@ -0,0 +1 @@ +humility: ring buffer task_jefe::external::__RINGBUF in jefe: diff --git a/humility-bin/tests/cmd/ringbuf-full-totals/ringbuf-full-totals.new-compiler.toml b/humility-bin/tests/cmd/ringbuf-full-totals/ringbuf-full-totals.new-compiler.toml new file mode 100644 index 00000000..299d0e56 --- /dev/null +++ b/humility-bin/tests/cmd/ringbuf-full-totals/ringbuf-full-totals.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler ringbuf --full-totals" + diff --git a/humility-bin/tests/cmd/ringbuf/ringbuf.new-compiler.stderr b/humility-bin/tests/cmd/ringbuf/ringbuf.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/ringbuf/ringbuf.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/ringbuf/ringbuf.new-compiler.stdout b/humility-bin/tests/cmd/ringbuf/ringbuf.new-compiler.stdout new file mode 100644 index 00000000..b7f6e019 --- /dev/null +++ b/humility-bin/tests/cmd/ringbuf/ringbuf.new-compiler.stdout @@ -0,0 +1 @@ +humility: ring buffer task_jefe::external::__RINGBUF in jefe: diff --git a/humility-bin/tests/cmd/ringbuf/ringbuf.new-compiler.toml b/humility-bin/tests/cmd/ringbuf/ringbuf.new-compiler.toml new file mode 100644 index 00000000..ef510bf1 --- /dev/null +++ b/humility-bin/tests/cmd/ringbuf/ringbuf.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler ringbuf" + diff --git a/humility-bin/tests/cmd/sensors-read/sensors-read.new-compiler.stderr b/humility-bin/tests/cmd/sensors-read/sensors-read.new-compiler.stderr new file mode 100644 index 00000000..fecf2bb7 --- /dev/null +++ b/humility-bin/tests/cmd/sensors-read/sensors-read.new-compiler.stderr @@ -0,0 +1,2 @@ +humility: attached to dump +humility sensors failed: no sensors found diff --git a/humility-bin/tests/cmd/sensors-read/sensors-read.new-compiler.stdout b/humility-bin/tests/cmd/sensors-read/sensors-read.new-compiler.stdout new file mode 100644 index 00000000..e69de29b diff --git a/humility-bin/tests/cmd/sensors-read/sensors-read.new-compiler.toml b/humility-bin/tests/cmd/sensors-read/sensors-read.new-compiler.toml new file mode 100644 index 00000000..3754f542 --- /dev/null +++ b/humility-bin/tests/cmd/sensors-read/sensors-read.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler sensors " +status.code = 1 diff --git a/humility-bin/tests/cmd/sensors/sensors.new-compiler.stderr b/humility-bin/tests/cmd/sensors/sensors.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/sensors/sensors.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/sensors/sensors.new-compiler.stdout b/humility-bin/tests/cmd/sensors/sensors.new-compiler.stdout new file mode 100644 index 00000000..00969383 --- /dev/null +++ b/humility-bin/tests/cmd/sensors/sensors.new-compiler.stdout @@ -0,0 +1 @@ +ID HEXID KIND C P MUX ADDR DEVICE NAME diff --git a/humility-bin/tests/cmd/sensors/sensors.new-compiler.toml b/humility-bin/tests/cmd/sensors/sensors.new-compiler.toml new file mode 100644 index 00000000..4a2211bd --- /dev/null +++ b/humility-bin/tests/cmd/sensors/sensors.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler sensors --list" + diff --git a/humility-bin/tests/cmd/spd/spd.new-compiler.stderr b/humility-bin/tests/cmd/spd/spd.new-compiler.stderr new file mode 100644 index 00000000..9710b931 --- /dev/null +++ b/humility-bin/tests/cmd/spd/spd.new-compiler.stderr @@ -0,0 +1,2 @@ +humility: attached to dump +humility spd failed: no bus specified and no SPD_DATA found diff --git a/humility-bin/tests/cmd/spd/spd.new-compiler.stdout b/humility-bin/tests/cmd/spd/spd.new-compiler.stdout new file mode 100644 index 00000000..e69de29b diff --git a/humility-bin/tests/cmd/spd/spd.new-compiler.toml b/humility-bin/tests/cmd/spd/spd.new-compiler.toml new file mode 100644 index 00000000..2742ce4f --- /dev/null +++ b/humility-bin/tests/cmd/spd/spd.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler spd" +status.code = 1 diff --git a/humility-bin/tests/cmd/stackmargin/stackmargin.new-compiler.stderr b/humility-bin/tests/cmd/stackmargin/stackmargin.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/stackmargin/stackmargin.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/stackmargin/stackmargin.new-compiler.stdout b/humility-bin/tests/cmd/stackmargin/stackmargin.new-compiler.stdout new file mode 100644 index 00000000..72ee0b50 --- /dev/null +++ b/humility-bin/tests/cmd/stackmargin/stackmargin.new-compiler.stdout @@ -0,0 +1,6 @@ +ID TASK STACKBASE STACKSIZE MAXDEPTH MARGIN + 0 jefe 0x24001000 512 376 136 + 1 sys 0x24000800 512 192 320 + 2 user_leds 0x24001800 512 280 232 + 3 pong 0x24001400 512 216 296 + 4 idle 0x24001c00 512 112 400 diff --git a/humility-bin/tests/cmd/stackmargin/stackmargin.new-compiler.toml b/humility-bin/tests/cmd/stackmargin/stackmargin.new-compiler.toml new file mode 100644 index 00000000..3a292528 --- /dev/null +++ b/humility-bin/tests/cmd/stackmargin/stackmargin.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler stackmargin" + diff --git a/humility-bin/tests/cmd/tasks-slvr/tasks-slvr.new-compiler.stderr b/humility-bin/tests/cmd/tasks-slvr/tasks-slvr.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/tasks-slvr/tasks-slvr.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/tasks-slvr/tasks-slvr.new-compiler.stdout b/humility-bin/tests/cmd/tasks-slvr/tasks-slvr.new-compiler.stdout new file mode 100644 index 00000000..f0301680 --- /dev/null +++ b/humility-bin/tests/cmd/tasks-slvr/tasks-slvr.new-compiler.stdout @@ -0,0 +1,282 @@ +system time = 6611 +ID TASK GEN PRI STATE + 0 jefe 0 0 recv, notif: fault timer(T+89) + | + +---> 0x240010f0 0x0800887c userlib::sys_recv_stub + | 0x24001200 0x08008a3b userlib::sys_recv + | @ /hubris/sys/userlib/src/lib.rs:320:8 + | 0x24001200 0x08008a3b idol_runtime::dispatch + | @ /git/idolatry-25cdcedc9b4829b2/f67fffe/runtime/src/lib.rs:237:20 + | 0x24001200 0x08008a3b main + | @ /hubris/task/jefe/src/main.rs:93:9 + | + | + +---> R0 = 0x240011bc R1 = 0x0000000c R2 = 0x00000003 R3 = 0x240011d8 + | R4 = 0x240011bc R5 = 0x0000000c R6 = 0x00000003 R7 = 0x00000000 + | R8 = 0x00000004 R9 = 0x240011bc R10 = 0x00001a2c R11 = 0x00000001 + | R12 = 0x24001148 SP = 0x240010f0 LR = 0x08008a3b PC = 0x0800887c + | PSR = 0x61000000 + | + +-----------> 0x24000490 Task { + save: SavedState { + r4: 0x240011bc, + r5: 0xc, + r6: 0x3, + r7: 0x0, + r8: 0x4, + r9: 0x240011bc, + r10: 0x1a2c, + r11: 0x1, + psp: 0x24001088, + exc_return: 0xffffffed, + s16: 0x0, + s17: 0x0, + s18: 0x0, + s19: 0x0, + s20: 0x0, + s21: 0x0, + s22: 0x0, + s23: 0x0, + s24: 0x0, + s25: 0x0, + s26: 0x0, + s27: 0x0, + s28: 0x0, + s29: 0x0, + s30: 0x0, + s31: 0xffffffff + }, + priority: Priority(0x0), + state: Healthy(InRecv(None)), + timer: TimerState { + deadline: Some(Timestamp(0x1a2c)), + to_post: NotificationSet(0x2) + }, + generation: 0x0, + notifications: 0x0, + descriptor: 0x8004370 (&kern::descs::TaskDesc) + } + + 1 sys 0 1 recv + | + +---> 0x240009a8 0x0800807c userlib::sys_recv_stub + | 0x24000a00 0x080081ff userlib::sys_recv + | @ /hubris/sys/userlib/src/lib.rs:320:8 + | 0x24000a00 0x080081ff idol_runtime::dispatch + | @ /git/idolatry-25cdcedc9b4829b2/f67fffe/runtime/src/lib.rs:237:20 + | 0x24000a00 0x080081ff main + | @ /hubris/drv/stm32xx-sys/src/main.rs:538:9 + | + | + +---> R0 = 0x240009d0 R1 = 0x00000005 R2 = 0x00000000 R3 = 0x240009d8 + | R4 = 0x240009d0 R5 = 0x00000005 R6 = 0x00000000 R7 = 0x00000000 + | R8 = 0x240009d0 R9 = 0x240009d8 R10 = 0x00000002 R11 = 0x00000001 + | R12 = 0x00000002 SP = 0x240009a8 LR = 0x080081ff PC = 0x0800807c + | PSR = 0x61000000 + | + +-----------> 0x24000538 Task { + save: SavedState { + r4: 0x240009d0, + r5: 0x5, + r6: 0x0, + r7: 0x0, + r8: 0x240009d0, + r9: 0x240009d8, + r10: 0x2, + r11: 0x1, + psp: 0x24000940, + exc_return: 0xffffffed, + s16: 0x0, + s17: 0x0, + s18: 0x0, + s19: 0x0, + s20: 0x0, + s21: 0x0, + s22: 0x0, + s23: 0x0, + s24: 0x0, + s25: 0x0, + s26: 0x0, + s27: 0x0, + s28: 0x0, + s29: 0x0, + s30: 0x0, + s31: 0x0 + }, + priority: Priority(0x1), + state: Healthy(InRecv(None)), + timer: TimerState { + deadline: None, + to_post: NotificationSet(0x0) + }, + generation: 0x0, + notifications: 0x0, + descriptor: 0x800439c (&kern::descs::TaskDesc) + } + + 2 user_leds 0 5 recv, notif: timer + | + +---> 0x240019a0 0x080091dc userlib::sys_recv_stub + | 0x24001a00 0x08009323 userlib::sys_recv + | @ /hubris/sys/userlib/src/lib.rs:320:8 + | 0x24001a00 0x08009323 idol_runtime::dispatch + | @ /git/idolatry-25cdcedc9b4829b2/f67fffe/runtime/src/lib.rs:237:20 + | 0x24001a00 0x08009323 main + | @ /hubris/drv/user-leds/src/main.rs:206:9 + | + | + +---> R0 = 0x240019d0 R1 = 0x00000004 R2 = 0x00000001 R3 = 0x240019d8 + | R4 = 0x240019d0 R5 = 0x00000004 R6 = 0x00000001 R7 = 0x00000000 + | R8 = 0x240019f7 R9 = 0x0000ffff R10 = 0x240019d0 R11 = 0x00000001 + | R12 = 0x00000000 SP = 0x240019a0 LR = 0x08009323 PC = 0x080091dc + | PSR = 0x61000000 + | + +-----------> 0x240005e0 Task { + save: SavedState { + r4: 0x240019d0, + r5: 0x4, + r6: 0x1, + r7: 0x0, + r8: 0x240019f7, + r9: 0xffff, + r10: 0x240019d0, + r11: 0x1, + psp: 0x24001938, + exc_return: 0xffffffed, + s16: 0x0, + s17: 0x0, + s18: 0x0, + s19: 0x0, + s20: 0x0, + s21: 0x0, + s22: 0x0, + s23: 0x0, + s24: 0x0, + s25: 0x0, + s26: 0x0, + s27: 0x0, + s28: 0x0, + s29: 0x0, + s30: 0x0, + s31: 0x0 + }, + priority: Priority(0x5), + state: Healthy(InRecv(None)), + timer: TimerState { + deadline: None, + to_post: NotificationSet(0x0) + }, + generation: 0x0, + notifications: 0x0, + descriptor: 0x80043c8 (&kern::descs::TaskDesc) + } + + 3 pong 0 8 recv, notif: timer(T+389) + | + +---> 0x24001590 0x0800967c userlib::sys_recv_stub + | 0x24001600 0x08009737 userlib::sys_recv + | @ /hubris/sys/userlib/src/lib.rs:318:24 + | 0x24001600 0x08009737 userlib::sys_recv_open + | @ /hubris/sys/userlib/src/lib.rs:237:11 + | 0x24001600 0x08009737 main + | @ /hubris/task/pong/src/main.rs:25:23 + | + | + +---> R0 = 0x240015c4 R1 = 0x00000010 R2 = 0x00000001 R3 = 0x240015d8 + | R4 = 0x240015c4 R5 = 0x00000010 R6 = 0x00000001 R7 = 0x00000000 + | R8 = 0x240015d4 R9 = 0x00000004 R10 = 0x24001600 R11 = 0x00000001 + | R12 = 0x00000000 SP = 0x24001590 LR = 0x08009737 PC = 0x0800967c + | PSR = 0x41000000 + | + +-----------> 0x24000688 Task { + save: SavedState { + r4: 0x240015c4, + r5: 0x10, + r6: 0x1, + r7: 0x0, + r8: 0x240015d4, + r9: 0x4, + r10: 0x24001600, + r11: 0x1, + psp: 0x24001528, + exc_return: 0xffffffed, + s16: 0x0, + s17: 0x0, + s18: 0x0, + s19: 0x0, + s20: 0x0, + s21: 0x0, + s22: 0x0, + s23: 0x0, + s24: 0x0, + s25: 0x0, + s26: 0x0, + s27: 0x0, + s28: 0x0, + s29: 0x0, + s30: 0x0, + s31: 0x0 + }, + priority: Priority(0x8), + state: Healthy(InRecv(None)), + timer: TimerState { + deadline: Some(Timestamp(0x1b58)), + to_post: NotificationSet(0x1) + }, + generation: 0x0, + notifications: 0x0, + descriptor: 0x80043f4 (&kern::descs::TaskDesc) + } + + 4 idle 0 9 RUNNING + | + +---> 0x24001e00 0x08009154 main + | @ /hubris/task/idle/src/main.rs:28:13 + | + | + +---> R0 = 0x24001e00 R1 = 0x24001e00 R2 = 0x00000000 R3 = 0x00000000 + | R4 = 0x00000000 R5 = 0x00000000 R6 = 0x00000000 R7 = 0x24001df8 + | R8 = 0x00000000 R9 = 0x00000000 R10 = 0x00000000 R11 = 0x00000000 + | R12 = 0x00000000 SP = 0x24001df8 LR = 0x0800914f PC = 0x08009154 + | PSR = 0x61000000 + | + +-----------> 0x24000730 Task { + save: SavedState { + r4: 0x0, + r5: 0x0, + r6: 0x0, + r7: 0x24001df8, + r8: 0x0, + r9: 0x0, + r10: 0x0, + r11: 0x0, + psp: 0x24001d90, + exc_return: 0xffffffed, + s16: 0x0, + s17: 0x0, + s18: 0x0, + s19: 0x0, + s20: 0x0, + s21: 0x0, + s22: 0x0, + s23: 0x0, + s24: 0x0, + s25: 0x0, + s26: 0x0, + s27: 0x0, + s28: 0x0, + s29: 0x0, + s30: 0x0, + s31: 0x0 + }, + priority: Priority(0x9), + state: Healthy(Runnable), + timer: TimerState { + deadline: None, + to_post: NotificationSet(0x0) + }, + generation: 0x0, + notifications: 0x0, + descriptor: 0x8004420 (&kern::descs::TaskDesc) + } + diff --git a/humility-bin/tests/cmd/tasks-slvr/tasks-slvr.new-compiler.toml b/humility-bin/tests/cmd/tasks-slvr/tasks-slvr.new-compiler.toml new file mode 100644 index 00000000..24e46914 --- /dev/null +++ b/humility-bin/tests/cmd/tasks-slvr/tasks-slvr.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler tasks -slvr --guess" + diff --git a/humility-bin/tests/cmd/tasks/tasks.new-compiler.stderr b/humility-bin/tests/cmd/tasks/tasks.new-compiler.stderr new file mode 100644 index 00000000..da2ede4a --- /dev/null +++ b/humility-bin/tests/cmd/tasks/tasks.new-compiler.stderr @@ -0,0 +1 @@ +humility: attached to dump diff --git a/humility-bin/tests/cmd/tasks/tasks.new-compiler.stdout b/humility-bin/tests/cmd/tasks/tasks.new-compiler.stdout new file mode 100644 index 00000000..757827f6 --- /dev/null +++ b/humility-bin/tests/cmd/tasks/tasks.new-compiler.stdout @@ -0,0 +1,7 @@ +system time = 6611 +ID TASK GEN PRI STATE + 0 jefe 0 0 recv, notif: fault timer(T+89) + 1 sys 0 1 recv + 2 user_leds 0 5 recv, notif: timer + 3 pong 0 8 recv, notif: timer(T+389) + 4 idle 0 9 RUNNING diff --git a/humility-bin/tests/cmd/tasks/tasks.new-compiler.toml b/humility-bin/tests/cmd/tasks/tasks.new-compiler.toml new file mode 100644 index 00000000..109f0671 --- /dev/null +++ b/humility-bin/tests/cmd/tasks/tasks.new-compiler.toml @@ -0,0 +1,10 @@ + +# +# This test case has been automatically created, but can be edited and +# should be checked in. Should it ever be regenerated, simply delete +# it and re-run "cargo test" +# +fs.base = "../cores" +bin.name = "humility" +args = "-d hubris.core.new-compiler tasks" + diff --git a/humility-bin/tests/cmd/version.trycmd b/humility-bin/tests/cmd/version.trycmd index 0cbc966d..eba3d8ab 100644 --- a/humility-bin/tests/cmd/version.trycmd +++ b/humility-bin/tests/cmd/version.trycmd @@ -2,7 +2,7 @@ Long version flag: ``` $ humility --version -humility 0.12.8 +humility 0.12.9 ``` @@ -10,6 +10,6 @@ Short version flag: ``` $ humility -V -humility 0.12.8 +humility 0.12.9 ``` diff --git a/humility-core/src/hubris.rs b/humility-core/src/hubris.rs index c3bd18d5..ee8a71d5 100644 --- a/humility-core/src/hubris.rs +++ b/humility-core/src/hubris.rs @@ -3766,6 +3766,13 @@ impl HubrisArchive { _ => Ok(true), } } + + /// Returns syscall pushes at the given address (or `None`) + pub fn syscall_pushes_at(&self, pc: u32) -> Option<&[ARMRegister]> { + self.syscall_pushes + .get(&pc) + .and_then(|p| p.as_ref().map(|p| p.as_slice())) + } } /// Loader for a single ELF file