comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: DebugBreak() in Ada
Date: Tue, 25 Apr 2023 15:11:57 +0300	[thread overview]
Message-ID: <kapuceFoq8mU1@mid.individual.net> (raw)
In-Reply-To: <74eb5c78-2212-48d8-beae-40b2b3ea6e69n@googlegroups.com>

On 2023-04-25 14:18, Petter wrote:
> I used some way to cause a DebugBreak() (programmatically causeng a
> break command in gdb) some 10 years ago. Now I can't find it. Perhaps
> one could raise int3? But I can't find how to either. Regards, 
> Petter


What do you mean by "causing a break command in gdb"? Do you intend to 
run the program under gdb, and want to be able to insert something -- 
perhaps a call DebugBreak -- in the Ada source to always cause a break 
into gdb control at the point of that call, without having to set gdb 
breakpoints at every call?

It is not a fully automatic method, but you could write a null Ada 
procedure DebugBreak and set a breakpoint in that procedure, manually 
from gdb, before starting the program. Then every call to DebugBreak 
will break, and you can look one level down in the call chain to see the 
state at the point of call.

  reply	other threads:[~2023-04-25 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 11:18 DebugBreak() in Ada Petter
2023-04-25 12:11 ` Niklas Holsti [this message]
2023-04-25 15:21   ` Petter
2023-04-25 17:22   ` Simon Wright
2023-04-25 17:20 ` Simon Wright
replies disabled

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