[PATCH 18/18] Introduce catchpoint class
Tom Tromey
tom@tromey.com
Tue May 3 23:02:07 GMT 2022
>> This changes the hierarchy a little -- some catchpoints now inherit
>> from base_breakpoint whereas previously they did not. This isn't a
>> problem, as long as re_set is redefined in catchpoint.
Pedro> This hierarchy change stretches things a bit. By inheriting
Pedro> base_breakpoint, this is saying that catchpoints is-a
Pedro> software/hardware breakpoint, while most catchpoints are not.
Pedro> Catchpoints are exactly the event points that are _not_ some PC
Pedro> location that execution traps at.
...
Pedro> But I suppose in the end either change wouldn't simplify much, if anything.
Well, another option might be to add another constructor to breakpoint
itself. Then the hierarchy wouldn't have to change, just which
constructors are visible.
It seems a little weird that these all call init_raw_breakpoint, which
calls add_location_to_breakpoint. Maybe I need to look into that.
Tom
More information about the Gdb-patches
mailing list