aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-09-17 19:48:42 +0000
committerMark Kettenis <kettenis@gnu.org>2003-09-17 19:48:42 +0000
commit192cb3d4e24944db8dfac26575a1209605dffee0 (patch)
tree99165e9de7a4ccea2fb6d292bfd3c07b16ca5eb7 /gdb/arch-utils.c
parentefe59759d8d01aa611222e4d7000e41561945741 (diff)
downloadgdb-192cb3d4e24944db8dfac26575a1209605dffee0.zip
gdb-192cb3d4e24944db8dfac26575a1209605dffee0.tar.gz
gdb-192cb3d4e24944db8dfac26575a1209605dffee0.tar.bz2
* gdbarch.sh (DEPRECATED_REG_STRUCT_HAS_ADDR): Add comment.
* gdbarch.h, gdbarch.c: Regenerate. (stabs_argument_has_addr): New architecture method. * arch-utils.h (default_stabs_argument_has_addr): New prototype. * arch-utils.c: Include "buildsym.h". (default_stabs_argument_has_addr): New function. * stabsread.c (define_symbol): Use stabs_argument_has_addr instead of DEPRECATED_REG_STRUCT_HAS_ADDR.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r--gdb/arch-utils.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index e344ec0..9289e7a 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -23,6 +23,7 @@
#include "defs.h"
#include "arch-utils.h"
+#include "buildsym.h"
#include "gdbcmd.h"
#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
#include "gdb_string.h"
@@ -359,6 +360,23 @@ legacy_value_to_register (struct frame_info *frame, int regnum,
put_frame_register (frame, regnum, to);
}
+int
+default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
+{
+ if (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()
+ && DEPRECATED_REG_STRUCT_HAS_ADDR (processing_gcc_compilation, type))
+ {
+ CHECK_TYPEDEF (type);
+
+ return (TYPE_CODE (type) == TYPE_CODE_STRUCT
+ || TYPE_CODE (type) == TYPE_CODE_UNION
+ || TYPE_CODE (type) == TYPE_CODE_SET
+ || TYPE_CODE (type) == TYPE_CODE_BITSTRING);
+ }
+
+ return 0;
+}
+
/* Functions to manipulate the endianness of the target. */