aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-07-08 12:16:00 -0600
committerTom Tromey <tom@tromey.com>2018-07-22 13:20:02 -0600
commit996d693a07973411897103a36e89bccee6c94479 (patch)
tree8c58eed58609b13b25b87ac2071d691ff47a15e6
parent157663703656814c751998747faadf41711e51ec (diff)
downloadgdb-996d693a07973411897103a36e89bccee6c94479.zip
gdb-996d693a07973411897103a36e89bccee6c94479.tar.gz
gdb-996d693a07973411897103a36e89bccee6c94479.tar.bz2
Use a previously unused variable in bfin-tdep.c
This changes bfin_push_dummy_call to use the result of check_typedef. Calling check_typedef for effect was probably ok as well, but this seemed a little nicer. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not value_type.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/bfin-tdep.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 224d91d..8eb2cde 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2018-07-22 Tom Tromey <tom@tromey.com>
+ * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
+ value_type.
+
+2018-07-22 Tom Tromey <tom@tromey.com>
+
* windows-nat.c (saved_context): Conditionally define.
* remote.c (remote_target::remote_btrace_maybe_reopen):
Conditionally declare "warned".
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index da62130..c84625c 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -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);