From: Guinevere Larsen Date: Tue, 24 Oct 2023 15:44:43 +0000 (+0200) Subject: gdb/testsuite: fix running gdb.python/py-explore-cc with clang X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f603d794f94cb8e6ffb86e0eb78b739788b448b6;p=binutils-gdb.git gdb/testsuite: fix running gdb.python/py-explore-cc with clang The test gdb.python/py-explore-cc.exp was showing one unexpected failure. This was due to how clang mapped instructions to lines, resulting in the inferior seemingly stopping at a different location. This patch adds a nop line in the relevant location so we don't need to add XFAILs for existing clang releases, if this gets solved in future versions. Approved-By: Tom Tromey --- diff --git a/gdb/testsuite/gdb.python/py-explore.cc b/gdb/testsuite/gdb.python/py-explore.cc index dfbc08ce5e3..e526c3c4975 100644 --- a/gdb/testsuite/gdb.python/py-explore.cc +++ b/gdb/testsuite/gdb.python/py-explore.cc @@ -42,7 +42,8 @@ func (const A &a) b.i = 10; b.c = 'a'; - return 0; /* Break here. */ + val *= 1; /* Break here. */ + return 0; } int