From f603d794f94cb8e6ffb86e0eb78b739788b448b6 Mon Sep 17 00:00:00 2001 From: Guinevere Larsen Date: Tue, 24 Oct 2023 17:44:43 +0200 Subject: [PATCH] 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 --- gdb/testsuite/gdb.python/py-explore.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.30.2