2 * Copyright 2013, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef _KERNEL_DEBUG_HEX_DUMP_H
6 #define _KERNEL_DEBUG_HEX_DUMP_H
16 HEX_DUMP_FLAG_OMIT_ADDRESS
= 0x01
20 class HexDumpDataProvider
{
22 virtual ~HexDumpDataProvider();
24 virtual bool HasMoreData() const = 0;
25 virtual uint8
NextByte() = 0;
26 virtual bool GetAddressString(char* buffer
,
27 size_t bufferSize
) const;
31 class HexDumpBufferDataProvider
: public HexDumpDataProvider
{
33 HexDumpBufferDataProvider(const void* data
,
36 virtual bool HasMoreData() const;
37 virtual uint8
NextByte();
38 virtual bool GetAddressString(char* buffer
,
39 size_t bufferSize
) const;
47 void print_hex_dump(HexDumpDataProvider
& data
, size_t maxBytes
,
49 void print_hex_dump(const void* data
, size_t maxBytes
, uint32 flags
= 0);
52 } // namespace BKernel
55 #endif /* _KERNEL_DEBUG_HEX_DUMP_H */