aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2012-04-16 08:02:09 +0000
committerThomas Schwinge <tschwinge@gnu.org>2012-04-16 08:02:09 +0000
commitdd6d3b70d9310dafd66594a909158381b4b3f2b0 (patch)
treec7774f435be793bef23bdcc491b12ab7c9476715
parentcbf68a605be6e1e8bab7c6e3ca2dddca38994fec (diff)
downloadgdb-dd6d3b70d9310dafd66594a909158381b4b3f2b0.zip
gdb-dd6d3b70d9310dafd66594a909158381b4b3f2b0.tar.gz
gdb-dd6d3b70d9310dafd66594a909158381b4b3f2b0.tar.bz2
gdb/testsuite/
* gdb.asm/sh.inc (gdbasm_startup): Only set up the stack pointer if the symbol _stack is defined. Get rid of a hard-coded constant for _stack.
-rw-r--r--gdb/testsuite/ChangeLog3
-rw-r--r--gdb/testsuite/gdb.asm/sh.inc12
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c47160e..a4acfd8 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2012-04-16 Thomas Schwinge <thomas@codesourcery.com>
+ * gdb.asm/sh.inc (gdbasm_startup): Only set up the stack pointer if the
+ symbol _stack is defined. Get rid of a hard-coded constant for _stack.
+
* gdb.asm/sh.inc (gdbasm_end) <.size>: Refer to the function's name.
2012-04-14 Anton Gorenkov <xgsa@yandex.ru>
diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc
index 8816cb4..a4a5fc5 100644
--- a/gdb/testsuite/gdb.asm/sh.inc
+++ b/gdb/testsuite/gdb.asm/sh.inc
@@ -65,13 +65,19 @@
comment "crt0 startup"
.macro gdbasm_startup
- mov.l .stackaddr,r15
+ comment "If there is a _stack symbol, use it for setting up the stack"
+ comment "pointer. In hosted mode (when there is no _stack symbol),"
+ comment "the operating system will have initialized it already."
+ mov.l .stackaddr, r0
+ tst r0, r0
+ bt .afterstackaddr
+ mov r0, r15
bra .afterstackaddr
nop
- nop
.align 2
.stackaddr:
- .long 196608 ! 0x30000
+ .weak _stack
+ .long _stack
.align 1
.afterstackaddr:
.endm