rust-vmm / vmm-sys-util

Helpers and utilities used by multiple rust-vmm components and VMMs
BSD 3-Clause "New" or "Revised" License
78 stars 64 forks source link

Make `Debug` impl for `FamStructWrapper` print contents #228

Closed roypat closed 2 months ago

roypat commented 2 months ago

Instead of re-interpreting the entire flexible array member contents as T, and then printing garbage, actually print out the FAM header, and then the entries of the array.

Tightens the bound on the Debug implementation to require T::Entry: Debug (as opposed to just T: Debug).

Summary of the PR

Please summarize here why the changes in this PR are needed.

Requirements

Before submitting your PR, please make sure you addressed the following requirements: