This is the mail archive of the gdb@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: read target register to decide breakpoint size


On 16-12-13 13:30:02, Tim Newsome wrote:
> Actually, this seems to work inside breakpoint_kind_from_pc():
> ```
>     struct frame_info *frame = get_current_frame ();
>     uint32_t misa = get_frame_register_unsigned (frame, RISCV_CSR_MISA_REGNUM);
> ```
> 
> Is that kosher? If so, is there any reason for me to implement
> breakpoint_kind_from_current_state?

I'd like not to do so.  Can't you decode the instruction to see whether
it is compressed or uncompressed?  I also think it is a good idea to
make a decision based on ELF info, as you mentioned in the first email.

-- 
Yao (齐尧)


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