|
From: Philippe W. <phi...@so...> - 2019-09-28 20:22:33
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=fe7ec1eca269faeca0fa3b025ea02b72660477b7 commit fe7ec1eca269faeca0fa3b025ea02b72660477b7 Author: Philippe Waroquiers <phi...@sk...> Date: Sat Sep 28 22:18:23 2019 +0200 xb monitor command: fix adressability for first byte of a line The addressability of the first byte of a new line was used for the first byte of the previous line. Fix by first outputting the line, then getting the addressability of the first byte of the new line. Diff: --- memcheck/mc_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index 6685dff..3afc991 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -6803,10 +6803,6 @@ static Bool handle_gdb_monitor_command (ThreadId tid, HChar *req) Int unaddressable = 0; for (i = 0; i < szB; i++) { Int bnr = i % 8; - res[bnr] = mc_get_or_set_vbits_for_client - (address+i, (Addr) &vbits[bnr], 1, - False, /* get them */ - False /* is client request */ ); /* We going to print the first vabits of a new line. Terminate the previous line if needed: prints a line with the address and the data. */ @@ -6817,6 +6813,10 @@ static Bool handle_gdb_monitor_command (ThreadId tid, HChar *req) } VG_(printf) ("\t"); // To align VABITS with gdb_xb layout } + res[bnr] = mc_get_or_set_vbits_for_client + (address+i, (Addr) &vbits[bnr], 1, + False, /* get them */ + False /* is client request */ ); if (res[bnr] == 1) { VG_(printf) ("\t %02x", vbits[bnr]); } else { |