1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! `cxx` spike bridge proving three findings about the bridge boundary (`idakit_cxx::ext_*`,
//! `test-shims` only).
//!
//! A hand-written `cxx_build` bridge (not the `cxx-gen` one, which inlines the `trycatch`
//! definition and complicates the override) carrying three probes:
//!
//! - A custom [`rust::behavior::trycatch`](https://docs.rs/cxx) in `facade/probe_ext_cxx.h`
//! makes this bridge's shims catch more than cxx's stock `std::exception`: a non-`std::exception`
//! throw ([`ext_throw_plain_int`]) becomes an `Err` instead of a `std::terminate`, and an
//! `interr_exc_t` ([`ext_throw_interr`]) carries its code in the message rather than the base
//! `what()`'s uninformative `"std::exception"`.
//! - [`AddrCursor::advance`] / [`AddrCursor::seek`] take `self: Pin<&mut AddrCursor>` and bind to
//! the **non-const** C++ members, mutating state that [`AddrCursor::pos`] (a `&self` const
//! member) reads back. The real-database writes [`ext_set_name`] / [`ext_set_cmt`] cross the
//! same boundary into implicit-current-DB libida calls.
//! - [`WriteOutcome`] is a cxx **shared enum**, returned by value from [`ext_classify`]; cxx emits
//! its own C++ enum and (because the type can hold any `repr`) a Rust match over it needs a
//! wildcard arm.
//!
//! The C++ side (custom `trycatch`, cursor, bodies) is `facade/probe_ext_cxx.{h,cc}`. Gated behind
//! `test-shims` like [`bridge_probe`](crate::bridge_probe) and [`bridge_cfunc`](crate::bridge_cfunc).
// The custom trycatch here is also productionized as the shared `facade/idakit_trycatch.h`, which
// every production bridge includes (plus a scoped `set_interr_throws` arm). This spike keeps its own
// inline copy so its throwing probes stay self-contained.
pub use ;