Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* read target register to decide breakpoint size
@ 2016-11-18 23:44 Tim Newsome
  2016-11-19  1:16 ` Ofir Cohen
  2016-11-21 16:37 ` Antoine Tremblay
  0 siblings, 2 replies; 11+ messages in thread
From: Tim Newsome @ 2016-11-18 23:44 UTC (permalink / raw)
  To: gdb

I'm still working on RISC-V support for gdb. Any given RISC-V core may
support a compressed instruction set (2 bytes per instruction as
opposed to 4). There are corresponding 2-byte and 4-byte breakpoint
instructions. On cores that support the compressed instruction set it
is safe to just always use the 2-byte version, and there is a register
I can read to tell me whether the compressed instruction set is
supported. What I would like to do is read (and cache) that register
when breakpoint size is determined. That seems more robust than making
a decision based on ELF info, which may not reflect what is actually
being executed.

Is that a good idea? Are there examples of operations that read target
registers to complete?

Thank you,
Tim


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-12-14 18:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 23:44 read target register to decide breakpoint size Tim Newsome
2016-11-19  1:16 ` Ofir Cohen
2016-11-21 16:37 ` Antoine Tremblay
2016-11-21 18:00   ` Tim Newsome
2016-12-13 20:58     ` Tim Newsome
2016-12-13 21:30       ` Tim Newsome
2016-12-14  9:18         ` Yao Qi
2016-12-14 12:32           ` Antoine Tremblay
2016-12-14 17:02             ` Tim Newsome
2016-12-14 17:22               ` Yao Qi
2016-12-14 18:15                 ` Antoine Tremblay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox