GNU Binutils with patches for OS216
Révision | fdadd5333c3878eb001446d4bba21c11a7bfba05 (tree) |
---|---|
l'heure | 2006-06-09 21:12:03 |
Auteur | Nathan Sidwell <nathan@code...> |
Commiter | Nathan Sidwell |
gdb/
* m68k-tdep.c (m68k_frame_align): New.
(m68k_push_dummy_call): Don't align here.
(m68k_gdbarch_init): Set frame_align here.
@@ -1,3 +1,10 @@ | ||
1 | +2006-06-09 Nathan Sidwell <nathan@codesourcery.com> | |
2 | + | |
3 | + gdb/ | |
4 | + * m68k-tdep.c (m68k_frame_align): New. | |
5 | + (m68k_push_dummy_call): Don't align here. | |
6 | + (m68k_gdbarch_init): Set frame_align here. | |
7 | + | |
1 | 8 | 2006-06-08 Nathan Sidwell <nathan@codesourcery.com> |
2 | 9 | |
3 | 10 | * gdb/remote.c (remote_open_1): Do preopen tasks before |
@@ -485,6 +485,16 @@ m68k_svr4_return_value (struct gdbarch *gdbarch, struct type *type, | ||
485 | 485 | } |
486 | 486 | |
487 | 487 | |
488 | +/* Always align the frame to a 4-byte boundary. This is required on | |
489 | + some platforms and harmless on the rest. */ | |
490 | + | |
491 | +static CORE_ADDR | |
492 | +m68k_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) | |
493 | +{ | |
494 | + /* Align the stack to four bytes. */ | |
495 | + return sp & ~3; | |
496 | +} | |
497 | + | |
488 | 498 | static CORE_ADDR |
489 | 499 | m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function, |
490 | 500 | struct regcache *regcache, CORE_ADDR bp_addr, int nargs, |
@@ -495,9 +505,6 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function, | ||
495 | 505 | gdb_byte buf[4]; |
496 | 506 | int i; |
497 | 507 | |
498 | - /* Align the stack down to 4 bytes. Needed for coldfire. */ | |
499 | - sp &= ~3; | |
500 | - | |
501 | 508 | /* Push arguments in reverse order. */ |
502 | 509 | for (i = nargs - 1; i >= 0; i--) |
503 | 510 | { |
@@ -1249,6 +1256,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1249 | 1256 | |
1250 | 1257 | /* Stack grows down. */ |
1251 | 1258 | set_gdbarch_inner_than (gdbarch, core_addr_lessthan); |
1259 | + set_gdbarch_frame_align (gdbarch, m68k_frame_align); | |
1252 | 1260 | |
1253 | 1261 | set_gdbarch_believe_pcc_promotion (gdbarch, 1); |
1254 | 1262 | set_gdbarch_decr_pc_after_break (gdbarch, 2); |