From 0497f5b03f47a7bf6e992d39b8057f647b181a8f Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Wed, 5 May 2010 16:59:00 +0000 Subject: [PATCH] "finish" does not work on sparc if function returns array. ChangeLog: * sparc-tdep.c (sparc_structure_or_union_p): Return non-zero for array types. * sparc64-tdep.c (sparc64_structure_or_union_p): Likewise. --- gdb/ChangeLog | 6 ++++++ gdb/sparc-tdep.c | 7 ++++++- gdb/sparc64-tdep.c | 7 ++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 140684020c1..b5f75b4b590 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-05-05 Joel Brobecker + + * sparc-tdep.c (sparc_structure_or_union_p): Return non-zero + for array types. + * sparc64-tdep.c (sparc64_structure_or_union_p): Likewise. + 2010-05-04 Pierre Muller ARI fix: Remove ATTRIBUTE_UNUSED throughout. diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index a2bae9f0f58..29a12cf5d65 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -221,7 +221,11 @@ sparc_floating_p (const struct type *type) return 0; } -/* Check whether TYPE is "Structure or Union". */ +/* Check whether TYPE is "Structure or Union". + + In terms of Ada subprogram calls, arrays are treated the same as + struct and union types. So this function also returns non-zero + for array types. */ static int sparc_structure_or_union_p (const struct type *type) @@ -230,6 +234,7 @@ sparc_structure_or_union_p (const struct type *type) { case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: + case TYPE_CODE_ARRAY: return 1; default: break; diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index 9a34834f69d..3cd6109f90a 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -103,7 +103,11 @@ sparc64_floating_p (const struct type *type) return 0; } -/* Check whether TYPE is "Structure or Union". */ +/* Check whether TYPE is "Structure or Union". + + In terms of Ada subprogram calls, arrays are treated the same as + struct and union types. So this function also returns non-zero + for array types. */ static int sparc64_structure_or_union_p (const struct type *type) @@ -112,6 +116,7 @@ sparc64_structure_or_union_p (const struct type *type) { case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: + case TYPE_CODE_ARRAY: return 1; default: break; -- 2.30.2