Fix PR gdb/20948: --write option to GDB causes segmentation fault
[deliverable/binutils-gdb.git] / gdb / bfin-tdep.c
index a2b3464b3471177648c4784e66dab46c8009ad9f..c84625c89480a738695e74deb8f9e39496a3fcfe 100644 (file)
@@ -526,7 +526,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch,
     {
       struct type *value_type = value_enclosing_type (args[i]);
       struct type *arg_type = check_typedef (value_type);
-      int container_len = (TYPE_LENGTH (value_type) + 3) & ~3;
+      int container_len = (TYPE_LENGTH (arg_type) + 3) & ~3;
 
       sp -= container_len;
       write_memory (sp, value_contents (args[i]), container_len);
@@ -647,7 +647,7 @@ bfin_store_return_value (struct type *type,
 
   while (len > 0)
     {
-      regcache_cooked_write (regs, regno++, valbuf);
+      regs->cooked_write (regno++, valbuf);
       len -= 4;
       valbuf += 4;
     }
This page took 0.024202 seconds and 4 git commands to generate.