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: Yao Qi <qiyaoltc at gmail dot com>
- To: henrik dot wallin at windriver dot com
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 27 Oct 2015 11:25:12 +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>
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;
See how it is done in arm-tdep.c:arm_breakpoint_from_pc
--
Yao (éå)