This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][PATCH 10/15] gdb: Add arm_fast_tracepoint_valid_at


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]