diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-11-12 21:12:00 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-11-16 15:37:00 -0500 |
commit | 830070c66d25e6749b7159009f1d87d85f02eaa3 (patch) | |
tree | 124d4d830112e4ffb121b3cefa4e1f2335fcd259 /gdb/darwin-nat.h | |
parent | 8579fd136a614985bd27f20539c7bb7c5a51287d (diff) | |
download | gdb-830070c66d25e6749b7159009f1d87d85f02eaa3.zip gdb-830070c66d25e6749b7159009f1d87d85f02eaa3.tar.gz gdb-830070c66d25e6749b7159009f1d87d85f02eaa3.tar.bz2 |
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
Diffstat (limited to 'gdb/darwin-nat.h')
-rw-r--r-- | gdb/darwin-nat.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gdb/darwin-nat.h b/gdb/darwin-nat.h index 0e5951d..9d6b0c5 100644 --- a/gdb/darwin-nat.h +++ b/gdb/darwin-nat.h @@ -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); |