Re: read target register to decide breakpoint size

Yao Qi <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <20161214091811.GH25542@E107787-LIN>
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 (齐尧)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.