commit | 762fb3ec8e05ca7a61b28e8a876c194c9db591ef | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Tue Mar 03 15:57:10 2020 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Tue Mar 03 17:46:37 2020 +0100 |
tree | 58f6355905dfb83c1b1cfcf15c45681cd15fac43 | |
parent | 55a6c4f34de59cc3d5d5079968e382c6fc303ef9 [diff] |
MINOR: tools: add new function dump_addr_and_bytes() This function dumps <n> bytes from <addr> in hex form into buffer <buf> enclosed in brackets after the address itself, formatted on 14 chars including the "0x" prefix. This is meant to be used as a prefix for code areas. For example: "0x7f10b6557690 [48 c7 c0 0f 00 00 00 0f]: " It relies on may_access() to know if the bytes are dumpable, otherwise "--" is emitted. An optional prefix is supported.