aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2000-03-28 02:25:14 +0000
committerDaniel Berlin <dberlin@dberlin.org>2000-03-28 02:25:14 +0000
commit5d161b24198e362be0f768e76e6f76bd110d8acb (patch)
tree7a7095d7ec3ec96b13ce4a232db0a0d2fa8121e5 /gdb/gdbtypes.c
parent107b56f053504c0864319ccb6c0f3fef03186fe6 (diff)
downloadfsf-binutils-gdb-5d161b24198e362be0f768e76e6f76bd110d8acb.zip
fsf-binutils-gdb-5d161b24198e362be0f768e76e6f76bd110d8acb.tar.gz
fsf-binutils-gdb-5d161b24198e362be0f768e76e6f76bd110d8acb.tar.bz2
The set debug changes
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index a940931..08d194f 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -75,7 +75,7 @@ struct type *builtin_type_CORE_ADDR;
struct type *builtin_type_bfd_vma;
int opaque_type_resolution = 1;
-
+int overload_debug = 0;
struct extra
{
@@ -2186,16 +2186,10 @@ rank_one_type (parm, arg)
if (TYPE_CODE (parm) == TYPE_CODE_REF)
return (rank_one_type (arg, TYPE_TARGET_TYPE (parm))
+ REFERENCE_CONVERSION_BADNESS);
-
-#ifdef DEBUG_OLOAD
+ if (overload_debug)
/* Debugging only. */
- /* FIXME/FYI: cagney/2000-03-13: No need to #ifdef this sort of
- thing. Instead add a command like ``set debug gdbtypes <int>''.
- (A predicate to this is the addition of the ``set debug''). Also,
- send the output to gdb_stderr and don't use printf. */
- printf ("------ Arg is %s [%d], parm is %s [%d]\n",
- TYPE_NAME (arg), TYPE_CODE (arg), TYPE_NAME (parm), TYPE_CODE (parm));
-#endif
+ fprintf_filtered (gdb_stderr,"------ Arg is %s [%d], parm is %s [%d]\n",
+ TYPE_NAME (arg), TYPE_CODE (arg), TYPE_NAME (parm), TYPE_CODE (parm));
/* x -> y means arg of type x being supplied for parameter of type y */
@@ -3020,6 +3014,7 @@ extern void _initialize_gdbtypes PARAMS ((void));
void
_initialize_gdbtypes ()
{
+ struct cmd_list_element *c;
build_gdbtypes ();
/* FIXME - For the moment, handle types by swapping them in and out.
@@ -3060,4 +3055,11 @@ _initialize_gdbtypes ()
REGISTER_GDBARCH_SWAP (builtin_type_CORE_ADDR);
REGISTER_GDBARCH_SWAP (builtin_type_bfd_vma);
register_gdbarch_swap (NULL, 0, build_gdbtypes);
+
+ add_show_from_set (
+ add_set_cmd ("overload", no_class, var_zinteger, (char *) &overload_debug,
+ "Set debugging of C++ overloading.\n\
+ When enabled, ranking of the functions\n\
+ is displayed.", &setdebuglist),
+ &showdebuglist);
}