[PUSHED] arc: Don't build arc-analyze-prologue.S with -g

Message ID 20240227141240.20690-1-list+gdb@vahedi.org
State New
Headers
Series [PUSHED] arc: Don't build arc-analyze-prologue.S with -g |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Shahab Vahedi Feb. 27, 2024, 2:12 p.m. UTC
  From: Yuriy Kolerov <kolerov93@gmail.com>

arc-analyze-prologue.S test does not contain debug information thus
it must be compiled without -g option. Otherwise GDB will try to
unwind frames using debug information (which does not exist for .S
code!) instead of analyzing frames manually.

Approved-By: Shahab Vahedi <shahab@synopsys.com>
---
 gdb/testsuite/gdb.arch/arc-analyze-prologue.exp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp b/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
index 32387c00169..b8d9a8fb75f 100644
--- a/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
+++ b/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
@@ -19,7 +19,13 @@  require {istarget "arc*-*-*"}
 
 standard_testfile .S
 
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+# arc-analyze-prologue.S test does not contain debug information thus it must
+# be compiled without -g option. Otherwise GDB will try to unwind frames using
+# debug information (which does not exist for .S code!) instead of analyzing
+# frames manually.
+set options {}
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile $options] } {
     return -1
 }