mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
46fec6428e
Makes the objc_demangle helper function a member function of objc_language (by renaming it to be the demangle_symbol member function). I also fixed some of the obvious coding standard violations in obj_demangle, so the '&&' operators are now at the start of the line, not the end. Comparison to nullptr are now made explicit, as are comparisons to the null character. There should be no user visible changes after this commit. gdb/ChangeLog: * objc-lang.c (objc_demangle): Renamed to objc_language::demangle_symbol, and moved later in the file. (objc_language::sniff_from_mangled_name): Call demangle_symbol member function. (objc_language::demangle_symbol): Defined outside of class declaration. The definition is the old objc_demangle with NULL changed to nullptr, and if conditions relating to nullptr pointers or null character checks made explicit. * objc-lang.h (objc_demangle): Delete declaration.
52 lines
1.6 KiB
C++
52 lines
1.6 KiB
C++
/* Objective-C language support definitions for GDB, the GNU debugger.
|
|
|
|
Copyright (C) 1992-2021 Free Software Foundation, Inc.
|
|
|
|
Contributed by Apple Computer, Inc.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#if !defined(OBJC_LANG_H)
|
|
#define OBJC_LANG_H
|
|
|
|
struct stoken;
|
|
|
|
struct value;
|
|
struct block;
|
|
struct parser_state;
|
|
|
|
extern CORE_ADDR lookup_objc_class (struct gdbarch *gdbarch,
|
|
const char *classname);
|
|
extern CORE_ADDR lookup_child_selector (struct gdbarch *gdbarch,
|
|
const char *methodname);
|
|
|
|
extern int find_objc_msgcall (CORE_ADDR pc, CORE_ADDR *new_pc);
|
|
|
|
extern const char *find_imps (const char *method,
|
|
std::vector<const char *> *symbol_names);
|
|
|
|
extern struct value *value_nsstring (struct gdbarch *gdbarch,
|
|
const char *ptr, int len);
|
|
|
|
/* for parsing Objective C */
|
|
extern void start_msglist (void);
|
|
extern void add_msglist (struct stoken *str, int addcolon);
|
|
extern int end_msglist (struct parser_state *);
|
|
|
|
struct symbol *lookup_struct_typedef (const char *name,
|
|
const struct block *block,
|
|
int noerr);
|
|
|
|
#endif
|