Issue #26127: Merge test_gdb fix from 3.5