aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-abi.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-09-23 16:25:06 +0000
committerDaniel Jacobowitz <drow@false.org>2007-09-23 16:25:06 +0000
commit41f1b6975dce5616800a8ff1acb544019c7bc132 (patch)
treef3e49925507634d70cb6d6e1fbd9ce7c6b8ec313 /gdb/cp-abi.h
parent3f213f78ed9182dbdeb3500dab729a6aad17dfd9 (diff)
downloadgdb-41f1b6975dce5616800a8ff1acb544019c7bc132.zip
gdb-41f1b6975dce5616800a8ff1acb544019c7bc132.tar.gz
gdb-41f1b6975dce5616800a8ff1acb544019c7bc132.tar.bz2
* infcall.c (call_function_by_hand): Handle language-specific
pass and return by reference. * cp-abi.c (cp_pass_by_reference): New. * cp-abi.h (cp_pass_by_reference): Declare. (struct cp_abi_ops): Add pass_by_reference. * gnu-v3-abi.c (gnuv3_pass_by_reference): New. (init_gnuv3_ops): Set pass_by_reference. * language.c (language_pass_by_reference): New. (default_pass_by_reference): New. (unknown_language_defn, auto_language_defn, local_language_defn): Add default_pass_by_reference. * langauge.h (struct language_defn): Add la_pass_by_reference. (language_pass_by_reference, default_pass_by_reference): Declare. * ada-lang.c (ada_language_defn): Add default_pass_by_reference. * c-lang.c (c_language_defn, asm_language_defn) (minimal_language_defn): Likewise. (cplus_language_defn): Add cp_pass_by_reference. * f-lang.c (f_language_defn): Add default_pass_by_reference. * jv-lang.c (java_language_defn): Likewise. * m2-lang.c (m2_language_defn): Likewise. * objc-lang.c (objc_language_defn): Likewise. * p-lang.c (pascal_language_defn): Likewise. * scm-lang.c (scm_language_defn): Likewise * gdb.cp/pass-by-ref.cc, gdb.cp/pass-by-ref.exp: New files.
Diffstat (limited to 'gdb/cp-abi.h')
-rw-r--r--gdb/cp-abi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/cp-abi.h b/gdb/cp-abi.h
index a0efb33..2b1838d 100644
--- a/gdb/cp-abi.h
+++ b/gdb/cp-abi.h
@@ -172,6 +172,10 @@ void cplus_make_method_ptr (gdb_byte *CONTENTS, CORE_ADDR address,
CORE_ADDR cplus_skip_trampoline (struct frame_info *frame, CORE_ADDR stop_pc);
+/* Return non-zero if an argument of type TYPE should be passed by reference
+ instead of value. */
+extern int cp_pass_by_reference (struct type *type);
+
struct cp_abi_ops
{
const char *shortname;
@@ -195,6 +199,7 @@ struct cp_abi_ops
void (*make_method_ptr) (gdb_byte *, CORE_ADDR, int);
struct value * (*method_ptr_to_value) (struct value **, struct value *);
CORE_ADDR (*skip_trampoline) (struct frame_info *, CORE_ADDR);
+ int (*pass_by_reference) (struct type *type);
};