This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/8] [AArch64] Use debug_printf instead of fprintf_unfiltered
- From: Pierre Langlois <pierre dot langlois at arm dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: pierre dot langlois at arm dot com, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 15 Sep 2015 12:07:28 +0100
- Subject: Re: [PATCH 1/8] [AArch64] Use debug_printf instead of fprintf_unfiltered
- Authentication-results: sourceware.org; auth=none
- References: <1442230282-20751-1-git-send-email-pierre dot langlois at arm dot com> <1442230282-20751-2-git-send-email-pierre dot langlois at arm dot com> <86d1xk3skc dot fsf at gmail dot com>
On 15/09/15 11:06, Yao Qi wrote:
> Pierre Langlois <pierre.langlois@arm.com> writes:
>
>> @@ -3363,8 +3337,7 @@ aarch64_record_load_store (insn_decode_record *aarch64_insn_r)
>> {
>> if (record_debug)
>> {
>> - fprintf_unfiltered (gdb_stdlog,
>> - "Process record: load/store exclusive\n");
>> + debug_printf ("Process record: load/store exclusive\n");
>> }
>
> After your change, it becomes an one-line statement, so "{" and "}" are no
> longer needed. We can remove them too. Here, and somewhere else.
OK, I'll fix this.
Should the other if statements like this one have braces? I can fix those
too in this patch.
@@ -261,10 +261,8 @@ decode_add_sub_imm (CORE_ADDR addr, uint32_t insn, unsigned *rd, unsigned *rn,
*imm = -*imm;
if (aarch64_debug)
- fprintf_unfiltered (gdb_stdlog,
- "decode: 0x%s 0x%x add x%u, x%u, #%d\n",
- core_addr_to_string_nz (addr), insn, *rd, *rn,
- *imm);
+ debug_printf ("decode: 0x%s 0x%x add x%u, x%u, #%d\n",
+ core_addr_to_string_nz (addr), insn, *rd, *rn, *imm);
return 1;
}
return 0;
Thanks,
Pierre