Commit Graph

13 Commits

Author SHA1 Message Date
Tom Tromey
fed1c982de Introduce catchpoint class
This introduces a catchpoint class that is used as the base class for
all catchpoints.  init_catchpoint is rewritten to be a constructor
instead.

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.
2022-05-06 12:03:35 -06:00
Tom Tromey
73063f5180 Remove init_raw_breakpoint_without_location
This removes init_raw_breakpoint_without_location, replacing it with a
constructor on 'breakpoint' itself.  The subclasses and callers are
all updated.
2022-05-06 12:03:35 -06:00
Tom Tromey
fb9e637013 Remove unnecessary line from catch_exec_command_1
catch_exec_command_1 clears the new catchpoint's "exec_pathname"
field, but this is already done by virtue of calling "new".
2022-05-06 12:03:34 -06:00
Tom Tromey
4d1ae55893 Constify breakpoint::print_recreate
This constifies breakpoint::print_recreate.
2022-05-06 12:03:34 -06:00
Tom Tromey
b713485d66 Constify breakpoint::print_mention
This constifies breakpoint::print_mention.
2022-05-06 12:03:34 -06:00
Tom Tromey
a67bcaba1c Constify breakpoint::print_one
This constifies breakpoint::print_one.
2022-05-06 12:03:34 -06:00
Tom Tromey
7bd8631327 Constify breakpoint::print_it
This constifies breakpoint::print_it.  Doing this pointed out some
code in ada-lang.c that can be simplified a little as well.
2022-05-06 12:03:34 -06:00
Tom Tromey
04d0163c3f Change print_recreate_thread to a method
This changes print_recreate_thread to be a method on breakpoint.  This
function is only used as a helper by print_recreate methods, so I
thought this transformation made sense.
2022-05-06 12:03:34 -06:00
Tom Tromey
b3316ff153 Remove breakpoint_ops from init_catchpoint
init_catchpoint is only ever passed a single breakpoint_ops pointer,
so remove the parameter.
2022-04-29 16:14:32 -06:00
Tom Tromey
021443b5f3 Convert break-catch-exec to vtable ops
This converts break-catch-exec.c to use vtable_breakpoint_ops.
2022-04-29 16:14:31 -06:00
Tom Tromey
c01e038bd2 Return bool from breakpoint_ops::print_one
This changes breakpoint_ops::print_one to return bool, and updates all
the implementations and the caller.  The caller is changed so that a
NULL check is no longer needed -- something that will be impossible
with a real method.
2022-04-29 16:14:30 -06:00
Tom Tromey
6cb06a8cda Unify gdb printf functions
Now that filtered and unfiltered output can be treated identically, we
can unify the printf family of functions.  This is done under the name
"gdb_printf".  Most of this patch was written by script.
2022-03-29 12:46:24 -06:00
Tom Tromey
de8e4cb3af Move "catch exec" to a new file
The "catch exec" code is reasonably self-contained, and so this patch
moves it out of breakpoint.c (the second largest source file in gdb)
and into a new file, break-catch-exec.c.
2022-01-18 10:34:05 -07:00