summaryrefslogtreecommitdiffstats
path: root/gdb/sh-stub.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-04-23 21:59:20 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-04-23 21:59:20 +0000
commit8ee52130f0105723186d648688548be0561b8e08 (patch)
tree64c455cc9d80b8d07200dd8eb648d6d59cdb0e65 /gdb/sh-stub.c
parent3236c3581b591e2d482e356b979738ccc4b8f08f (diff)
downloadrockbox-8ee52130f0105723186d648688548be0561b8e08.tar.gz
rockbox-8ee52130f0105723186d648688548be0561b8e08.tar.bz2
rockbox-8ee52130f0105723186d648688548be0561b8e08.zip
Fixed the mess with all the different stacks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@204 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'gdb/sh-stub.c')
-rw-r--r--gdb/sh-stub.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/sh-stub.c b/gdb/sh-stub.c
index 4def26b797..2eb6a5d750 100644
--- a/gdb/sh-stub.c
+++ b/gdb/sh-stub.c
@@ -358,12 +358,11 @@ void catch_exception_127 (void);
void breakpoint (void);
-#define init_stack_size 2*1024 /* if you change this you should also modify BINIT */
-#define stub_stack_size 2*1024
+//#define stub_stack_size 2*1024
-int init_stack[init_stack_size] __attribute__ ((section ("stack"))) = {0};
-int stub_stack[stub_stack_size] __attribute__ ((section ("stack"))) = {0};
+//int stub_stack[stub_stack_size] __attribute__ ((section (".stack"))) = {0};
+extern int stub_stack[];
void INIT (void);
void start (void);
@@ -934,6 +933,8 @@ void breakpoint (void)
/**** Processor-specific routines start here ****/
/**** Processor-specific routines start here ****/
+extern int stack[];
+
/* SH1/SH2 exception vector table format */
typedef struct
{
@@ -949,13 +950,12 @@ typedef struct
** Note that we only define the first 128 vectors, since the Jukebox
** firmware has its entry point at 0x200
*/
-
const vec_type vectable __attribute__ ((section (".vectors"))) =
{
&start, /* 0: Power-on reset PC */
- init_stack + init_stack_size, /* 1: Power-on reset SP */
+ stack, /* 1: Power-on reset SP */
&start, /* 2: Manual reset PC */
- init_stack + init_stack_size, /* 3: Manual reset SP */
+ stack, /* 3: Manual reset SP */
{
&catch_exception_4, /* 4: General invalid instruction */
&catch_exception_5, /* 5: Reserved for system */
@@ -1097,7 +1097,7 @@ void INIT (void)
dofault = 1;
stepped = 0;
- stub_sp = stub_stack + stub_stack_size;
+ stub_sp = stub_stack;
breakpoint ();
/* We should never come here */
@@ -1115,7 +1115,7 @@ void sr(void)
" bra _INIT\n"
" nop\n"
" .align 2\n"
- "L_sp: .long _init_stack + 8000");
+ "L_sp: .long _stack");
asm("saveRegisters:\n");
asm(" mov.l @(L_reg, pc), r0\n"