public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* MI and modifying register value
@ 2023-09-04 21:41 Jan Vrany
  2023-09-08 16:53 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Vrany @ 2023-09-04 21:41 UTC (permalink / raw)
  To: GDB mailing list

Hi, 

while investigating MI client issue when setting a register value
from debugger I realized two things: 

1) There's an MI command to set register value: -data-write-register-values
   This command is not documented and looking at the code, seems to be somewhat
   half-implemented - does not use <format> parameter its comment mentions and
   only works for frame 0 (but using --frame 1 does not result in an error,
   it just silently changes value in frame 0). 

   Is this command some leftover that should not be used (but kept for some
   old clients)? Or is it something to fix? 

2) Another way to change register value is CLI command `set r4 = 0x4`. There's
   no mechanism the MI client gets notified about the change - there's no =register-changed
   async event. 

   Is this by purpose? I'd expect some kind of notification, just like there's =memory-changed
   event. Also, in Python API, there's memory_ckanged event which get triggered when
   using `set` to modify register. 

Best, Jan

   


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

end of thread, other threads:[~2023-09-08 21:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-04 21:41 MI and modifying register value Jan Vrany
2023-09-08 16:53 ` Tom Tromey
2023-09-08 21:25   ` Jan Vrany

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).