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

Message ID 20240222080219.51830-1-kolerov93@gmail.com
State New
Headers
Series arc: Don't build arc-analyze-prologue.S with -g |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Yuriy Kolerov Feb. 22, 2024, 8:02 a.m. UTC
  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.

Signed-off-by: Yuriy Kolerov <kolerov93@gmail.com>
---
 gdb/testsuite/gdb.arch/arc-analyze-prologue.exp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
  

Comments

Shahab Vahedi Feb. 27, 2024, 2:03 p.m. UTC | #1
On 2/22/24 09:02, Yuriy Kolerov wrote:
> 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.
> 
> Signed-off-by: Yuriy Kolerov <kolerov93@gmail.com>
> ---
>  gdb/testsuite/gdb.arch/arc-analyze-prologue.exp | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Approved-By: Shahab Vahedi <shahab@synopsys.com>
  

Patch

diff --git a/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp b/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
index f414d9ccde0..371858ec0bc 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
 }