Thread overview
break on assertion in GDB?
Jun 30, 2014
Vlad Levenfeld
Jun 30, 2014
Dicebot
Jun 30, 2014
Vlad Levenfeld
Jun 30, 2014
Vlad Levenfeld
Jul 05, 2014
Vlad Levenfeld
June 30, 2014
Is this possible? I find myself having to set breakpoints up the callchain and step through every invocation till I find the one that breaks. This is a really bad way to work, but when I fail an assertion in GDB, it just reports "program terminated."
June 30, 2014
On Monday, 30 June 2014 at 11:56:27 UTC, Vlad Levenfeld wrote:
> Is this possible? I find myself having to set breakpoints up the callchain and step through every invocation till I find the one that breaks. This is a really bad way to work, but when I fail an assertion in GDB, it just reports "program terminated."

b _d_assert
b _d_assert_msg

(out of my memory)
June 30, 2014
On Monday, 30 June 2014 at 12:08:31 UTC, Dicebot wrote:
> On Monday, 30 June 2014 at 11:56:27 UTC, Vlad Levenfeld wrote:
>> Is this possible? I find myself having to set breakpoints up the callchain and step through every invocation till I find the one that breaks. This is a really bad way to work, but when I fail an assertion in GDB, it just reports "program terminated."
>
> b _d_assert
> b _d_assert_msg
>
> (out of my memory)

GDB recognizes both of these and sets the breakpoints, but never actually breaks.
June 30, 2014
I tried it again in a different context and it worked. Odd. Anyway, thanks for the information.
July 05, 2014
The reason it worked one time and not the other was because the other time was an exception, not an assertion. How do I break on exceptions?

(ps. is there a guide anywhere to using GDB with D?)