From dc9894c8b14172f3046b43fad45b0f281fe21374 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Sat, 28 Sep 1991 17:13:08 +0000 Subject: [PATCH] * symtab.c (lookup_method_type): Arguments were swapped in all callers, so fix it here. I'm amazed this worked at all! --- gdb/ChangeLog | 2 ++ gdb/symtab.c | 17 +++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7d8e94f..2a68216 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -3,6 +3,8 @@ Sat Sep 28 10:02:33 1991 John Gilmore (gnu at cygnus.com) * eval.c (evaluate_subexp_for_address): Don't use TYPE_POINTER_TYPE directly (it might be zero if this type has never had a pointer created before); use lookup_pointer_type. + * symtab.c (lookup_method_type): Arguments were swapped in all + callers, so fix it here. I'm amazed this worked at all! Fri Sep 27 18:09:31 1991 John Gilmore (gnu at cygnus.com) diff --git a/gdb/symtab.c b/gdb/symtab.c index cb4d2d2..2d6cd05 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -437,6 +437,8 @@ lookup_pointer_type (type) if (TYPE_FLAGS (type) & TYPE_FLAG_PERM) TYPE_FLAGS (ptype) |= TYPE_FLAG_PERM; /* We assume the machine has only one representation for pointers! */ + /* FIXME: This confuses host<->target data representations, and is a + poor assumption besides. */ TYPE_LENGTH (ptype) = sizeof (char *); TYPE_CODE (ptype) = TYPE_CODE_PTR; return ptype; @@ -548,13 +550,13 @@ allocate_stub_method (type) return mtype; } -/* Lookup a method type returning type TYPE, belonging - to class DOMAIN, and taking a list of arguments ARGS. +/* Lookup a method type belonging to class DOMAIN, returning type TYPE, + and taking a list of arguments ARGS. If one is not found, allocate a new one. */ struct type * -lookup_method_type (type, domain, args) - struct type *type, *domain, **args; +lookup_method_type (domain, type, args) + struct type *domain, *type, **args; { register struct type *mtype = TYPE_MAIN_VARIANT (type); struct type *main_type; @@ -2597,12 +2599,7 @@ list_symbols (regexp, class, bpt) /* Typedef that is not a C++ class */ if (class == 2 && SYMBOL_NAMESPACE (sym) != STRUCT_NAMESPACE) -#ifndef FIXME - /* We haven't integrated this from A. Beers yet */ - error ("typedef_print(SYMBOL_TYPE(sym),sym,stdout);"); -#else - typedef_print(SYMBOL_TYPE(sym),sym,stdout); -#endif + typedef_print (SYMBOL_TYPE(sym), sym, stdout); /* variable, func, or typedef-that-is-c++-class */ else if (class < 2 || (class == 2 && -- 2.7.4