This is the mail archive of the
mailing list for the GDB project.
[binutils-gdb] Hoist assertion in target_stack::unpush
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Tue, 05 Feb 2019 08:58:37 -0500
- Subject: [binutils-gdb] Hoist assertion in target_stack::unpush
*** TEST RESULTS FOR COMMIT 1688cb2916e7bc46c92dd6f5ac2ba0da6c832274 ***
Author: Tom Tromey <firstname.lastname@example.org>
Hoist assertion in target_stack::unpush
I noticed that target_stack::unpush first uses the target "t", then
later asserts that it is non-NULL:
strata stratum = t->stratum ();
gdb_assert (t != NULL);
This is backwards, though, as the assertion must come first.
2019-02-05 Tom Tromey <email@example.com>
* target.c (target_stack::unpush): Move assertion earlier.