@@ -449,7 +449,7 @@ void lava_hypercall(CPUState *cpu) {
449449 #endif
450450 }
451451 else if (pandalog) {
452- dprintf (" [pri_taint] Hypercall is OK and Panda Log is set\n " );
452+ dprintf (" [pri_taint] Hypercall is OK and Panda Log is set\n " );
453453 PandaHypercallStruct phs;
454454 #if defined(TARGET_ARM) && !defined(TARGET_AARCH64)
455455 panda_virtual_memory_read (cpu, env->regs [0 ], (uint8_t *) &phs, sizeof (phs));
@@ -461,23 +461,31 @@ void lava_hypercall(CPUState *cpu) {
461461 panda_virtual_memory_read (cpu, env->regs [R_EDI ], (uint8_t *) &phs, sizeof (phs));
462462 #endif
463463
464+ dprintf (" [pri_taint] Completed memory read of PANDA Hypercall Struct\n " );
465+
464466 // To be used for chaff bugs?
465467 uint64_t funcaddr = 0 ;
466468 panda_virtual_memory_read (cpu, phs.info , (uint8_t *)&funcaddr, sizeof (target_ulong));
469+ dprintf (" [pri_taint] Completed memory read of the phs.info for Chaff Bugs\n " );
467470 // if the phs action is a pri_query point, see
468471 // lava/include/pirate_mark_lava.h
469472 if (phs.action == 13 ) {
470473 target_ulong pc = panda_current_pc (cpu);
474+ dprintf (" [pri_taint] ABOUT TO CALL pri_get_pc_source_info for PC: 0x%lx\n " , (uint64_t ) pc);
471475 // Calls 'pri_get_pc_source_info' in pri.c, which calls 'on_get_pc_source_info'
472476 // In Dwarf2, the function 'on_get_pc_source_info' is mapped to 'dwarf_get_pc_source_info'
473477 SrcInfo info;
474478 int rc = pri_get_pc_source_info (cpu, pc, &info);
479+ dprintf (" [pri_taint] SURVIVED pri_get_pc_source_info! rc = %d\n " , rc);
475480 if (!rc) {
476481 struct args args = {cpu, info.filename , info.line_number , phs.src_filename , funcaddr};
477- dprintf (" [pri_taint] panda hypercall: [%s], "
478- " ln: %4ld, pc @ 0x" TARGET_FMT_lx " \n " ,
479- info.filename ,
480- info.line_number , pc);
482+ if (info.filename == NULL ) {
483+ dprintf (" [pri_taint] CRITICAL: info.filename is NULL! Cannot print.\n " );
484+ } else {
485+ dprintf (" [pri_taint] panda hypercall: [%s], ln: %4ld, pc @ 0x" TARGET_FMT_lx " \n " ,
486+ info.filename , info.line_number , pc);
487+ }
488+
481489 // Calls 'pri_funct_livevar_iter' in pri.c, which calls 'on_funct_livevar_iter'
482490 // In Dwarf2, the function 'on_funct_livevar_iter' is mapped to 'dwarf_funct_livevar_iter'
483491 // This is passing the function 'pfun' to 'pri_funct_livevar_iter', which is called at the end
0 commit comments