target/riscv: replace `__PRETTY_FUNCTION__` with `__func__`
The reasoning for the change: * `__func__` is part of C99, `__PRETTY_FUNCTION__` is GNU extension. * `__PRETTY_FUNCTION__` is defined to be the same as `__func__` for C sources by GCC documentation but differ for C++ sources (full signature instead of just a name). * Currently Clang does support `__PRETTY_FUNCTION__`, though it uses GCC's C++ variant across C and C++. Therefore using `__PRETTY_FUNCTION__` creates confusion and does not provide any valueble information in the logs. Change-Id: Ie0db6d73f602784b6752a30911dcef3dd7ee4594
This commit is contained in:
parent
3b0c654c67
commit
00320fd198
|
@ -215,13 +215,13 @@ static void dump_field(int idle, const struct scan_field *field)
|
|||
unsigned int in_address = in >> DTM_DMI_ADDRESS_OFFSET;
|
||||
|
||||
log_printf_lf(LOG_LVL_DEBUG,
|
||||
__FILE__, __LINE__, __PRETTY_FUNCTION__,
|
||||
__FILE__, __LINE__, __func__,
|
||||
"%db %s %08x @%02x -> %s %08x @%02x; %di",
|
||||
field->num_bits, op_string[out_op], out_data, out_address,
|
||||
status_string[in_op], in_data, in_address, idle);
|
||||
} else {
|
||||
log_printf_lf(LOG_LVL_DEBUG,
|
||||
__FILE__, __LINE__, __PRETTY_FUNCTION__, "%db %s %08x @%02x -> ?; %di",
|
||||
__FILE__, __LINE__, __func__, "%db %s %08x @%02x -> ?; %di",
|
||||
field->num_bits, op_string[out_op], out_data, out_address, idle);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -389,8 +389,7 @@ static void dump_field(struct target *target, int idle, const struct scan_field
|
|||
unsigned int in_data = get_field(in, DTM_DMI_DATA);
|
||||
unsigned int in_address = in >> DTM_DMI_ADDRESS_OFFSET;
|
||||
|
||||
log_printf_lf(LOG_LVL_DEBUG,
|
||||
__FILE__, __LINE__, __PRETTY_FUNCTION__,
|
||||
log_printf_lf(LOG_LVL_DEBUG, __FILE__, __LINE__, __func__,
|
||||
"%db %s %08x @%02x -> %s %08x @%02x; %di",
|
||||
field->num_bits, op_string[out_op], out_data, out_address,
|
||||
status_string[in_op], in_data, in_address, idle);
|
||||
|
@ -398,13 +397,13 @@ static void dump_field(struct target *target, int idle, const struct scan_field
|
|||
if (out_op == DTM_DMI_OP_WRITE) {
|
||||
char out_decoded[decode_dmi(target, NULL, out_address, out_data) + 1];
|
||||
decode_dmi(target, out_decoded, out_address, out_data);
|
||||
log_printf_lf(LOG_LVL_DEBUG, __FILE__, __LINE__, __PRETTY_FUNCTION__,
|
||||
log_printf_lf(LOG_LVL_DEBUG, __FILE__, __LINE__, __func__,
|
||||
"write: %s", out_decoded);
|
||||
}
|
||||
if (!discard_in && in_op == DTM_DMI_OP_SUCCESS) {
|
||||
char in_decoded[decode_dmi(target, NULL, in_address, in_data) + 1];
|
||||
decode_dmi(target, in_decoded, in_address, in_data);
|
||||
log_printf_lf(LOG_LVL_DEBUG, __FILE__, __LINE__, __PRETTY_FUNCTION__,
|
||||
log_printf_lf(LOG_LVL_DEBUG, __FILE__, __LINE__, __func__,
|
||||
"read: %s", in_decoded);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue