public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* How to support interrupting a single step
@ 2019-09-04 15:25 Torsten Robitzki
  2019-10-18 13:08 ` Luis Machado
  0 siblings, 1 reply; 6+ messages in thread
From: Torsten Robitzki @ 2019-09-04 15:25 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

Hi,
I’m writing a debug server to support the debugging of an ARM Cortex M4 (nRF52) controller via SWD (Bluetooth LE debugger). I have a test program that contains an endless loop (loops over a systick counter with masked PendSV, SysTick interrupts [C_MASKINTS]). If I run that program (‚c‘ package) and interrupt the execution by ctrl-C (0x03) and try to single step through the program, I can’t get back onto the GDB prompt by cntr-C as I would expect.

I can see that GDB is sending sequences of ’s’ and ‚g‘ packages and from the content of the ‚g‘ I can see, that the $PC is moving. When I press ctrl-C, I can see that GDB is sending interrupts (0x03) to my debug stub, but as both, ’s’ and ‚g‘ are short running commands, there is no point in making them aware of an interrupt. Even if I would, I could tell, what the correct return values would be to make GDB stop sending `s` and `g` packages.

Any idea, on how to make „step“ in this scenario interruptable?

best regards,

Torsten

--
Torrox GmbH & Co. KG
persönlich haftender Gesellschafter: Torrox Verwaltungs GmbH, Rehau (Amtsgericht Hof, HRB 5927)
Geschäftsleitung:                    Dipl.-Ing. Torsten Robitzki
Umsatzsteuer-Identifikationsnr.:     DE253527398
Adresse:                             Fabrikstraße. 22; 95111 Rehau
Handelsregistereintrag:              Amtsgericht Hof, HRA 4650
Telefon:                             +49 9283 8999666






[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-03-30 10:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 15:25 How to support interrupting a single step Torsten Robitzki
2019-10-18 13:08 ` Luis Machado
2020-03-27 17:15   ` Torsten
2020-03-27 18:27     ` Luis Machado
2020-03-30  9:15       ` Torsten
2020-03-30 10:56         ` Luis Machado

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).