diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-07-04 17:24:52 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-07-05 11:16:58 +0200 |
| commit | 6539c825b51dcb1bf5181e5aba91cdc41ff0850f (patch) | |
| tree | 21697f2cff2be64ffcbbce689c02c004f7d5c771 | |
| parent | c616151cbfdd3c7b3882c16656b4f8af74d48519 (diff) | |
| download | lilliput-ae-implem-6539c825b51dcb1bf5181e5aba91cdc41ff0850f.tar.xz | |
Ajout d'indices dans les traces
| -rw-r--r-- | test/debug.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/debug.h b/test/debug.h index d958475..56cd123 100644 --- a/test/debug.h +++ b/test/debug.h @@ -30,7 +30,7 @@ static inline void debug_dump_buffer(const char *header, size_t len, const uint8 for (size_t line=0; line<len/8; line++) { - fprintf(DUMP, "%*s", indent, ""); + fprintf(DUMP, "%*s[0x%02zx] ", indent, "", line*8); for (size_t b=0; b<8; b++) { /* fprintf(DUMP, "[%zu / %zu => %zu]", line, b, line*8+b); */ @@ -42,7 +42,7 @@ static inline void debug_dump_buffer(const char *header, size_t len, const uint8 size_t rest = len%8; if (rest != 0) { - fprintf(DUMP, "%*s", indent, ""); + fprintf(DUMP, "%*s[0x%02zx] ", indent, "", len-rest); for (size_t b=0; b<rest; b++) { fprintf(DUMP, "%02x ", buf[len-rest+b]); |
