MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / exception_table

Method exception_table

src/commands/objdump.rs:522–555  ·  view source on GitHub ↗
(&mut self, address: u64, list: &mut Vec<String>)

Source from the content-addressed store, hash-verified

520 }
521
522 fn exception_table(&mut self, address: u64, list: &mut Vec<String>) {
523 if !self.objdump.exception_tables() {
524 return;
525 }
526 let Some(exception_tables) = &mut self.exception_tables else {
527 return;
528 };
529 while let Some((addr, frame_offset, handlers)) =
530 exception_tables.next_if(|(addr, _, _)| u64::from(*addr) <= address)
531 {
532 if u64::from(addr) != address {
533 continue;
534 }
535 if let Some(frame_offset) = frame_offset {
536 list.push(format!(
537 "exception frame offset: SP = FP - 0x{frame_offset:x}",
538 ));
539 }
540 for handler in &handlers {
541 let tag = match handler.tag {
542 Some(tag) => format!("tag={tag}"),
543 None => "default handler".to_string(),
544 };
545 let context = match handler.context_sp_offset {
546 Some(offset) => format!("context at [SP+0x{offset:x}]"),
547 None => "no dynamic context".to_string(),
548 };
549 list.push(format!(
550 "exception handler: {tag}, {context}, handler=0x{:x}",
551 handler.handler_offset
552 ));
553 }
554 }
555 }
556
557 fn frame_table(
558 &mut self,

Callers 1

decorateMethod · 0.45

Calls 4

fromFunction · 0.85
exception_tablesMethod · 0.45
pushMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected