This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC][PATCH 10/15] gdb: Add arm_fast_tracepoint_valid_at
- From: "Wallin, Henrik" <Henrik dot Wallin at windriver dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 29 Oct 2015 17:51:27 +0000
- Subject: RE: [RFC][PATCH 10/15] gdb: Add arm_fast_tracepoint_valid_at
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1444820235 dot git dot henrik dot wallin at windriver dot com> <cover dot 1444820235 dot git dot henrik dot wallin at windriver dot com> <3a55070efb60b203fc73e0529a586d16f794ac26 dot 1444820235 dot git dot henrik dot wallin at windriver dot com>,<86io5szh7r dot fsf at gmail dot com>
2015-10-27 12:25 GMT+01:00 Yao Qi <qiyaoltc@gmail.com>:
> henrik.wallin@windriver.com writes:
>
>> + if (arm_pc_is_thumb (gdbarch, addr))
>> + {
>> + len = gdb_print_insn (gdbarch, addr, gdb_null, NULL);
>
> We don't need to call gdb_print_insn to know the instruction size.
> Instead, we can do something simpler,
>
> if (arm_pc_is_thumb (gdbarch, pc))
> {
> len = thumb_insn_size (inst1);
> }
> else
> len = 4;
yes, that looks better.
thanks,
/ Henrik