}
# Start with a fresh gdb.
-clean_restart ${testfile}
+save_vars { env(ASAN_OPTIONS) } {
+ # The call to gdb.selected_inferior().read_memory (0, 0xffffffffffffffff)
+ # triggers address sanitizer. Suppress the error, leaving us with just
+ # this warning:
+ # WARNING: AddressSanitizer failed to allocate 0xffffffffffffffff bytes
+ set_sanitizer ASAN_OPTIONS allocator_may_return_null 1
+
+ clean_restart ${testfile}
+}
switch [get_endianness] {
little { set python_pack_char "<" }