================
@@ -330,6 +330,28 @@ class Platform : public PluginInterface {
   virtual std::vector<ArchSpec>
   GetSupportedArchitectures(const ArchSpec &process_host_arch) = 0;
 
+  /// Get the bytes of the platform's software interrupt instruction.
+  ///
+  /// \param[in] arch
+  ///     The architecture of the inferior
+  /// \param size_hint
+  ///     A hint to disambiguate which instruction is used on platforms where
+  ///     there are multiple interrupts with different sizes in the ISA (e.g
+  ///     ARM Thumb, RISC-V)
+  llvm::ArrayRef<uint8_t> SoftwareTrapOpcodeBytes(const ArchSpec &arch,
+                                                  size_t size_hint = 0);
+
+  /// Get the suggested size hint for a trap instruction on the given target.
----------------
DavidSpickett wrote:

I think this needs a "in other words" for those of us not knee deep in this 
stuff. I would add:
```
/// In other words, if there were to be a trap instruction at this address, 
what size is it most likely to be?
```
Or you can rewrite it all in that question form if you like but hopefully you 
see that I'm interested in documenting what question this function answers.

https://github.com/llvm/llvm-project/pull/174348
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to