mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add api call to increase PDDB debug level at runtime
This commit is contained in:
parent
d77552899b
commit
df2dda32be
2 changed files with 13 additions and 0 deletions
|
|
@ -558,6 +558,7 @@ pub enum DebugRequest {
|
|||
Dump = 0,
|
||||
Remount = 1,
|
||||
Prune = 2,
|
||||
SetDebug = 3,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
|
|
@ -1130,6 +1130,18 @@ impl Pddb {
|
|||
buf.lend(self.conn, Opcode::DangerousDebug.to_u32().unwrap())
|
||||
.or(Err(Error::new(ErrorKind::Other, "Xous internal error"))).map(|_| ())
|
||||
}
|
||||
/// Turns on debug spew
|
||||
#[cfg(not(target_os = "xous"))]
|
||||
pub fn dbg_set_debug(&self) -> Result<()> {
|
||||
let ipc = PddbDangerousDebug {
|
||||
request: DebugRequest::SetDebug,
|
||||
dump_name: xous_ipc::String::new(),
|
||||
};
|
||||
let buf = Buffer::into_buf(ipc)
|
||||
.or(Err(Error::new(ErrorKind::Other, "Xous internal error")))?;
|
||||
buf.lend(self.conn, Opcode::DangerousDebug.to_u32().unwrap())
|
||||
.or(Err(Error::new(ErrorKind::Other, "Xous internal error"))).map(|_| ())
|
||||
}
|
||||
|
||||
#[cfg(all(feature="pddbtest", feature="autobasis"))]
|
||||
pub fn basis_testing(&self, config: &[Option<bool>; 32]) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue