浏览代码

[debug] Use a delimiter to break up DBG_HD() output

Reading sixteen columns of hex digits can be difficult; include a "-"
character to split the output into two groups of eight columns.
tags/v0.9.8
Michael Brown 15 年前
父节点
当前提交
51172783e2
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      src/core/debug.c

+ 2
- 1
src/core/debug.c 查看文件

@@ -36,7 +36,8 @@ static void dbg_hex_dump_da_row ( unsigned long dispaddr, const void *data,
36 36
 			printf ( "   " );
37 37
 			continue;
38 38
 		}
39
-		printf ( " %02x", bytes[i] );
39
+		printf ( "%c%02x",
40
+			 ( ( ( i % 16 ) == 8 ) ? '-' : ' ' ), bytes[i] );
40 41
 	}
41 42
 	printf ( " : " );
42 43
 	for ( i = offset ; i < ( offset + 16 ) ; i++ ) {

正在加载...
取消
保存