This is similar to the previous events that we added.
Approved-By: Markus Metzger <markus.t.metzger@intel.com>
handle_pt_aux_insn (btinfo, aux_string, pc);
break;
}
+
+ case ptev_iret:
+ {
+ std::string aux_string = std::string (_("iret"));
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.iret.ip;
+ aux_string += std::string (": ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
#endif /* defined (LIBIPT_VERSION >= 0x201) */
}
}
# gdb_test_sequence and check only for events that we can control.
gdb_test_sequence "record function-call-history" "function-call-history" {
"\[0-9\]+\tmain"
+ "\\\[iret(: ip = $hex)?\\\]"
"\[0-9\]+\t\\\[non-contiguous\\\]"
"\[0-9\]+\tsquare"
"\\\[interrupt: vector = 0x3 \\\(#bp\\\)(, ip = 0x\[0-9a-fA-F\]+)?\\\]"
+ "\\\[iret(: ip = $hex)?\\\]"
"\[0-9\]+\t\\\[non-contiguous\\\]"
"\[0-9\]+\tmain"
"\[0-9\]+\tsquare"
"\\\[interrupt: vector = 0x3 \\\(#bp\\\)(, ip = 0x\[0-9a-fA-F\]+)?\\\]"
+ "\\\[iret(: ip = $hex)?\\\]"
"\[0-9\]+\tmain"
}
gdb_test "continue" "Program received signal SIGSEGV, Segmentation fault.*"
-# Test printing of at least one INTERRUPT event.
+# Test printing of at least one INTERRUPT and one IRET event.
# This uses test_sequence to avoid random events failing the tests.
gdb_test_sequence "record function-call-history" "function-call-history" {
"\[0-9\]+\tmain"
+ "\t \\\[iret(: ip = $hex)?\\\]"
"\t \\\[interrupt: vector = 0xe \\\(#pf\\\)(, cr2 = 0x0)?(, ip = 0x\[0-9a-fA-F\]+)?\\\]"
}