mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 09:14:14 +08:00
gdbsupport: remove FUNCTION_NAME
__func__ is standard C++11: https://en.cppreference.com/w/cpp/language/function Also, in C++11, __func__ expands to the demangled function name, so the mention in the comment above FUNCTION_NAME doesn't apply anymore. Finally, in places where FUNCTION_NAME is used, I think it's enough to print the function name, no need to print the whole signature. Therefore, I propose to just remove FUNCTION_NAME and update users to use the standard __func__. Change-Id: I778f28155422b044402442dc18d42d0cded1017d
This commit is contained in:
@ -200,14 +200,8 @@ extern mach_port_t darwin_port_set;
|
||||
/* A copy of mach_host_self (). */
|
||||
extern mach_port_t darwin_host_self;
|
||||
|
||||
/* FUNCTION_NAME is defined in common-utils.h (or not). */
|
||||
#ifdef FUNCTION_NAME
|
||||
#define MACH_CHECK_ERROR(ret) \
|
||||
mach_check_error (ret, __FILE__, __LINE__, FUNCTION_NAME)
|
||||
#else
|
||||
#define MACH_CHECK_ERROR(ret) \
|
||||
mach_check_error (ret, __FILE__, __LINE__, "??")
|
||||
#endif
|
||||
mach_check_error (ret, __FILE__, __LINE__, __func__)
|
||||
|
||||
extern void mach_check_error (kern_return_t ret, const char *file,
|
||||
unsigned int line, const char *func);
|
||||
|
Reference in New Issue
Block a user