ptxed, block: fetch an instruction after printing its IP

In case of errors when trying to fetch an instruction, ptxed will print the
error without the IP of the instruction it failed to fetch.  Reorder the code to
first print the optional offset and time and the IP.

Change-Id: Ic5ee512eb55577e0ab12d88611613b8fc6579b23
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
diff --git a/ptxed/src/ptxed.c b/ptxed/src/ptxed.c
index 59f2e27..7299061 100644
--- a/ptxed/src/ptxed.c
+++ b/ptxed/src/ptxed.c
@@ -874,15 +874,6 @@
 		xed_error_enum_t xederrcode;
 		int errcode;
 
-		errcode = block_fetch_insn(&insn, block, block->ip, iscache);
-		if (errcode < 0) {
-			printf(" [fetch error: %s]\n",
-			       pt_errstr(pt_errcode(errcode)));
-			break;
-		}
-
-		xed_decoded_inst_zero_set_mode(&inst, &xed);
-
 		if (block->speculative)
 			printf("? ");
 
@@ -894,6 +885,15 @@
 
 		printf("%016" PRIx64, block->ip);
 
+		errcode = block_fetch_insn(&insn, block, block->ip, iscache);
+		if (errcode < 0) {
+			printf(" [fetch error: %s]\n",
+			       pt_errstr(pt_errcode(errcode)));
+			break;
+		}
+
+		xed_decoded_inst_zero_set_mode(&inst, &xed);
+
 		xederrcode = xed_decode(&inst, insn.raw, insn.size);
 		if (xederrcode != XED_ERROR_NONE) {
 			printf(" [xed decode error: (%u) %s]\n", xederrcode,