[PATCH 4/4] gdb/mi: add a '-b' flag to the '-break-insert' cmd to force the condition

Eli Zaretskii eliz@gnu.org
Wed Apr 7 16:50:32 GMT 2021


> From: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>
> CC: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
> Date: Wed, 7 Apr 2021 16:05:11 +0000
> > Then how about simply accepting the condition by default in that case,
> > without any need for a special flag?  IOW, it makes little sense to me
> > to accept the condition if it is _sometimes_ invalid, but not if it is
> > _always_ invalid.  It sounds like a gratuitous limitation.  Am I
> > missing something?
> 
> There are two problems with that approach:
> 
> 1. Backward compatibility would be broken.

Would someone expect the current behavior?  Why would they?

> 2. (The more important one, IMHO) If the user makes a typo in the condition,
> the breakpoint would still be accepted by making it disabled at all the locations.

That's easy: issue a warning.

Anyway, if no one else thinks like me, I'm okay with doing it your
way.


More information about the Gdb-patches mailing list