aboutsummaryrefslogtreecommitdiff
path: root/gdb/mipsv4-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mipsv4-nat.c')
-rw-r--r--gdb/mipsv4-nat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index d63e043..cca4006 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -143,9 +143,10 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
int
get_longjmp_target (CORE_ADDR *pc)
{
- char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+ char *buf;
CORE_ADDR jb_addr;
+ buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
jb_addr = read_register (A0_REGNUM);
if (target_read_memory (jb_addr + _JB_PC * JB_ELEMENT_SIZE, buf,