diff options
Diffstat (limited to 'src/target/ext/libraries.rs')
-rw-r--r-- | src/target/ext/libraries.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/target/ext/libraries.rs b/src/target/ext/libraries.rs new file mode 100644 index 0000000..5feea82 --- /dev/null +++ b/src/target/ext/libraries.rs @@ -0,0 +1,29 @@ +//! Report information about the loaded shared libraries for targets where there +//! are possibly multiple files to be debugged mapped into the same address +//! space. + +use crate::target::Target; +use crate::target::TargetResult; + +/// Target Extension - List an SVR4 (System-V/Unix) target's libraries. +pub trait LibrariesSvr4: Target { + /// Get library list XML for this target. + /// + /// See the [GDB Documentation] for a description of the format. + /// + /// [GDB Documentation]: https://sourceware.org/gdb/current/onlinedocs/gdb.html/Library-List-Format-for-SVR4-Targets.html + /// + /// Return the number of bytes written into `buf` (which may be less than + /// `length`). + /// + /// If `offset` is greater than the length of the underlying data, return + /// `Ok(0)`. + fn get_libraries_svr4( + &self, + offset: u64, + length: usize, + buf: &mut [u8], + ) -> TargetResult<usize, Self>; +} + +define_ext!(LibrariesSvr4Ops, LibrariesSvr4); |