From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21995 invoked by alias); 12 Jun 2003 15:55:07 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21935 invoked from network); 12 Jun 2003 15:55:04 -0000 Received: from unknown (HELO coconut.kealia.com) (216.101.126.244) by sources.redhat.com with SMTP; 12 Jun 2003 15:55:04 -0000 Received: from dhcp-10-42-69-238.kealia.com (coconut.kealia.com [127.0.0.1]) by coconut.kealia.com (8.12.8/8.12.8) with ESMTP id h5CFt7Q4016715; Thu, 12 Jun 2003 08:55:07 -0700 Received: (from carlton@localhost) by dhcp-10-42-69-238.kealia.com (8.12.8/8.12.8/Submit) id h5CFt7XO016713; Thu, 12 Jun 2003 08:55:07 -0700 X-Authentication-Warning: dhcp-10-42-69-238.kealia.com: carlton set sender to carlton@kealia.com using -f To: gdb-patches@sources.redhat.com Cc: ezannoni@redhat.com, jimb@redhat.com Subject: [commit] remove DEPRECATED_SYMBOL_NAME uses from symtab.c From: David Carlton Date: Thu, 12 Jun 2003 15:55:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-06/txt/msg00419.txt.bz2 This patch gets rid of the uses of DEPRECATED_SYMBOL_NAME in symtab.c. Tested on GCC 3.2, DWARF 2, i686-pc-linux-gnu; committed as obvious. David Carlton carlton@kealia.com 2003-06-12 David Carlton * symtab.c (lookup_symbol_aux_minsyms): Replace DEPRECATED_SYMBOL_NAME by SYMBOL_LINKAGE_NAME. (find_pc_sect_line, search_symbols, rbreak_command): Ditto. (COMPLETION_LIST_ADD_SYMBOL): Rewrite in terms of SYMBOL_NATURAL_NAME. Index: symtab.c =================================================================== RCS file: /cvs/src/src/gdb/symtab.c,v retrieving revision 1.112 diff -u -p -r1.112 symtab.c --- symtab.c 12 Jun 2003 15:33:45 -0000 1.112 +++ symtab.c 12 Jun 2003 15:44:52 -0000 @@ -1227,7 +1227,7 @@ lookup_symbol_aux_minsyms (const char *n bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - /* This call used to pass `DEPRECATED_SYMBOL_NAME (msymbol)' as the + /* This call used to pass `SYMBOL_LINKAGE_NAME (msymbol)' as the `name' argument to lookup_block_symbol. But the name of a minimal symbol is always mangled, so that seems to be clearly the wrong thing to pass as the @@ -1961,7 +1961,8 @@ find_pc_sect_line (CORE_ADDR pc, struct if (msymbol != NULL) if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline) { - mfunsym = lookup_minimal_symbol_text (DEPRECATED_SYMBOL_NAME (msymbol), NULL, NULL); + mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol), + NULL, NULL); if (mfunsym == NULL) /* I eliminated this warning since it is coming out * in the following situation: @@ -1972,12 +1973,12 @@ find_pc_sect_line (CORE_ADDR pc, struct * so of course we can't find the real func/line info, * but the "break" still works, and the warning is annoying. * So I commented out the warning. RT */ - /* warning ("In stub for %s; unable to find real function/line info", DEPRECATED_SYMBOL_NAME (msymbol)) */ ; + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; /* fall through */ else if (SYMBOL_VALUE (mfunsym) == SYMBOL_VALUE (msymbol)) /* Avoid infinite recursion */ /* See above comment about why warning is commented out */ - /* warning ("In stub for %s; unable to find real function/line info", DEPRECATED_SYMBOL_NAME (msymbol)) */ ; + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; /* fall through */ else return find_pc_line (SYMBOL_VALUE (mfunsym), 0); @@ -2911,7 +2912,7 @@ search_symbols (char *regexp, domain_enu symbol associated to a given minimal symbol (if any). */ if (kind == FUNCTIONS_DOMAIN - || lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), + || lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), (struct block *) NULL, VAR_DOMAIN, 0, (struct symtab **) NULL) == NULL) @@ -3003,7 +3004,7 @@ search_symbols (char *regexp, domain_enu (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))) { /* Variables/Absolutes: Look up by name */ - if (lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), + if (lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), (struct block *) NULL, VAR_DOMAIN, 0, (struct symtab **) NULL) == NULL) { @@ -3183,12 +3184,12 @@ rbreak_command (char *regexp, int from_t { if (p->msymbol == NULL) { - char *string = (char *) alloca (strlen (p->symtab->filename) - + strlen (DEPRECATED_SYMBOL_NAME (p->symbol)) - + 4); + char *string = alloca (strlen (p->symtab->filename) + + strlen (SYMBOL_LINKAGE_NAME (p->symbol)) + + 4); strcpy (string, p->symtab->filename); strcat (string, ":'"); - strcat (string, DEPRECATED_SYMBOL_NAME (p->symbol)); + strcat (string, SYMBOL_LINKAGE_NAME (p->symbol)); strcat (string, "'"); break_command (string, from_tty); print_symbol_info (FUNCTIONS_DOMAIN, @@ -3199,7 +3200,7 @@ rbreak_command (char *regexp, int from_t } else { - break_command (DEPRECATED_SYMBOL_NAME (p->msymbol), from_tty); + break_command (SYMBOL_LINKAGE_NAME (p->msymbol), from_tty); printf_filtered (" %s;\n", SYMBOL_PRINT_NAME (p->msymbol)); } @@ -3216,17 +3217,8 @@ static int return_val_index; static char **return_val; #define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \ - do { \ - if (SYMBOL_DEMANGLED_NAME (symbol) != NULL) \ - /* Put only the mangled name on the list. */ \ - /* Advantage: "b foo" completes to "b foo(int, int)" */ \ - /* Disadvantage: "b foo__i" doesn't complete. */ \ completion_list_add_name \ - (SYMBOL_DEMANGLED_NAME (symbol), (sym_text), (len), (text), (word)); \ - else \ - completion_list_add_name \ - (DEPRECATED_SYMBOL_NAME (symbol), (sym_text), (len), (text), (word)); \ - } while (0) + (SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word)) /* Test to see if the symbol specified by SYMNAME (which is already demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN