+2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
+
+ * gdb.python/py-inferior.exp: Test using an invalid gdb.Inferior
+ object.
+
2018-09-12 Alan Hayward <alan.hayward@arm.com>
* lib/gdb.exp (gdb_can_simple_compile): Add proc.
gdb_test "python print (my_inferior_count)" "1" \
"test inferior-deleted event handler"
+
+ # Test that other properties and methods handle the removed inferior
+ # correctly.
+ gdb_test "python print (inf_list\[1\].num)" \
+ "RuntimeError: Inferior no longer exists.*"
+ gdb_test "python print (inf_list\[1\].pid)" \
+ "RuntimeError: Inferior no longer exists.*"
+ gdb_test "python print (inf_list\[1\].was_attached)" \
+ "RuntimeError: Inferior no longer exists.*"
+ gdb_test "python print (inf_list\[1\].threads ())" \
+ "RuntimeError: Inferior no longer exists.*"
+ gdb_test "python print (inf_list\[1\].thread_from_thread_handle (1))" \
+ "RuntimeError: Inferior no longer exists.*"
}
# Test gdb.selected_inferior()