diff options
Diffstat (limited to 'gdb/sh-stub.c')
-rw-r--r-- | gdb/sh-stub.c | 18 |
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); | |||
358 | void breakpoint (void); | 358 | void breakpoint (void); |
359 | 359 | ||
360 | 360 | ||
361 | #define init_stack_size 2*1024 /* if you change this you should also modify BINIT */ | 361 | //#define stub_stack_size 2*1024 |
362 | #define stub_stack_size 2*1024 | ||
363 | 362 | ||
364 | int init_stack[init_stack_size] __attribute__ ((section ("stack"))) = {0}; | 363 | //int stub_stack[stub_stack_size] __attribute__ ((section (".stack"))) = {0}; |
365 | int stub_stack[stub_stack_size] __attribute__ ((section ("stack"))) = {0}; | ||
366 | 364 | ||
365 | extern int stub_stack[]; | ||
367 | 366 | ||
368 | void INIT (void); | 367 | void INIT (void); |
369 | void start (void); | 368 | void start (void); |
@@ -934,6 +933,8 @@ void breakpoint (void) | |||
934 | /**** Processor-specific routines start here ****/ | 933 | /**** Processor-specific routines start here ****/ |
935 | /**** Processor-specific routines start here ****/ | 934 | /**** Processor-specific routines start here ****/ |
936 | 935 | ||
936 | extern int stack[]; | ||
937 | |||
937 | /* SH1/SH2 exception vector table format */ | 938 | /* SH1/SH2 exception vector table format */ |
938 | typedef struct | 939 | typedef struct |
939 | { | 940 | { |
@@ -949,13 +950,12 @@ typedef struct | |||
949 | ** Note that we only define the first 128 vectors, since the Jukebox | 950 | ** Note that we only define the first 128 vectors, since the Jukebox |
950 | ** firmware has its entry point at 0x200 | 951 | ** firmware has its entry point at 0x200 |
951 | */ | 952 | */ |
952 | |||
953 | const vec_type vectable __attribute__ ((section (".vectors"))) = | 953 | const vec_type vectable __attribute__ ((section (".vectors"))) = |
954 | { | 954 | { |
955 | &start, /* 0: Power-on reset PC */ | 955 | &start, /* 0: Power-on reset PC */ |
956 | init_stack + init_stack_size, /* 1: Power-on reset SP */ | 956 | stack, /* 1: Power-on reset SP */ |
957 | &start, /* 2: Manual reset PC */ | 957 | &start, /* 2: Manual reset PC */ |
958 | init_stack + init_stack_size, /* 3: Manual reset SP */ | 958 | stack, /* 3: Manual reset SP */ |
959 | { | 959 | { |
960 | &catch_exception_4, /* 4: General invalid instruction */ | 960 | &catch_exception_4, /* 4: General invalid instruction */ |
961 | &catch_exception_5, /* 5: Reserved for system */ | 961 | &catch_exception_5, /* 5: Reserved for system */ |
@@ -1097,7 +1097,7 @@ void INIT (void) | |||
1097 | dofault = 1; | 1097 | dofault = 1; |
1098 | stepped = 0; | 1098 | stepped = 0; |
1099 | 1099 | ||
1100 | stub_sp = stub_stack + stub_stack_size; | 1100 | stub_sp = stub_stack; |
1101 | breakpoint (); | 1101 | breakpoint (); |
1102 | 1102 | ||
1103 | /* We should never come here */ | 1103 | /* We should never come here */ |
@@ -1115,7 +1115,7 @@ void sr(void) | |||
1115 | " bra _INIT\n" | 1115 | " bra _INIT\n" |
1116 | " nop\n" | 1116 | " nop\n" |
1117 | " .align 2\n" | 1117 | " .align 2\n" |
1118 | "L_sp: .long _init_stack + 8000"); | 1118 | "L_sp: .long _stack"); |
1119 | 1119 | ||
1120 | asm("saveRegisters:\n"); | 1120 | asm("saveRegisters:\n"); |
1121 | asm(" mov.l @(L_reg, pc), r0\n" | 1121 | asm(" mov.l @(L_reg, pc), r0\n" |