mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Add debug string and ODesc support to HashKey class
This allows tracing of hash key buffer reservations, reads, and writes via a new debug stream, and supports printing a summary of a HashKey object via Describe(). The latter comes in handy e.g. in TableVal::Describe() (where including the hash key is now available but commented out).
This commit is contained in:
parent
82822b1e07
commit
b6a11a69db
5 changed files with 76 additions and 1 deletions
|
@ -28,8 +28,12 @@
|
|||
|
||||
namespace zeek
|
||||
{
|
||||
|
||||
class String;
|
||||
class ODesc;
|
||||
|
||||
}
|
||||
|
||||
namespace zeek::detail
|
||||
{
|
||||
|
||||
|
@ -354,6 +358,8 @@ public:
|
|||
const void* KeyAtRead() const { return static_cast<void*>(key + read_size); }
|
||||
const void* KeyEnd() const { return static_cast<void*>(key + size); }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
|
||||
protected:
|
||||
char* CopyKey(const char* key, size_t size) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue