String parseCell(String line) {
			int begin = Math.min(line.length(), this.begin);
			int end = Math.min(line.length(), this.end);
			/**
			 * NOTE: Do not assert previous char is space.
			 * 
			 * When breakpoints table spells out locations, Address and What cells are indented and
			 * no longer align with their column headers.
			 */
			return line.substring(begin, end).trim();
		}
This seems like a bug in gdb. AFAICT, it's a rehash or regression of
https://sourceware.org/bugzilla/show_bug.cgi?id=17247. If I attach to the
hung gdb, I get a similar stack trace, but with Python frames on the
stack. The workaround given in the comments works here, too. I hesitate
to point fingers, though, because I'm testing with a modern gdb-13.1
compiled from source on a rather un-modern distro.
Ghidra/Test/DebuggerIntegrationTest/src/test.slow/java/agent/gdb/rmi/AbstractGdbTraceRmiTest.java