aboutsummaryrefslogtreecommitdiff
path: root/gdb/break-catch-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/break-catch-load.c')
-rw-r--r--gdb/break-catch-load.c53
1 files changed, 22 insertions, 31 deletions
diff --git a/gdb/break-catch-load.c b/gdb/break-catch-load.c
index d8dab0b..5998825 100644
--- a/gdb/break-catch-load.c
+++ b/gdb/break-catch-load.c
@@ -36,14 +36,13 @@
struct solib_catchpoint : public catchpoint
{
solib_catchpoint (struct gdbarch *gdbarch, bool temp,
- const char *cond_string,
- bool is_load_, const char *arg)
+ const char *cond_string, bool is_load_, const char *arg)
: catchpoint (gdbarch, temp, cond_string),
is_load (is_load_),
regex (arg == nullptr ? nullptr : make_unique_xstrdup (arg)),
compiled (arg == nullptr
- ? nullptr
- : new compiled_regex (arg, REG_NOSUB, _("Invalid regexp")))
+ ? nullptr
+ : new compiled_regex (arg, REG_NOSUB, _ ("Invalid regexp")))
{
}
@@ -51,8 +50,7 @@ struct solib_catchpoint : public catchpoint
int remove_location (struct bp_location *,
enum remove_bp_reason reason) override;
int breakpoint_hit (const struct bp_location *bl,
- const address_space *aspace,
- CORE_ADDR bp_addr,
+ const address_space *aspace, CORE_ADDR bp_addr,
const target_waitstatus &ws) override;
void check_status (struct bpstat *bs) override;
enum print_stop_action print_it (const bpstat *bs) const override;
@@ -119,8 +117,7 @@ solib_catchpoint::check_status (struct bpstat *bs)
{
for (so_list *iter : current_program_space->added_solibs)
{
- if (!regex
- || compiled->exec (iter->so_name, 0, NULL, 0) == 0)
+ if (!regex || compiled->exec (iter->so_name, 0, NULL, 0) == 0)
return;
}
}
@@ -128,8 +125,7 @@ solib_catchpoint::check_status (struct bpstat *bs)
{
for (const std::string &iter : current_program_space->deleted_solibs)
{
- if (!regex
- || compiled->exec (iter.c_str (), 0, NULL, 0) == 0)
+ if (!regex || compiled->exec (iter.c_str (), 0, NULL, 0) == 0)
return;
}
}
@@ -179,18 +175,17 @@ solib_catchpoint::print_one (bp_location **locs) const
if (is_load)
{
if (regex)
- msg = string_printf (_("load of library matching %s"),
- regex.get ());
+ msg = string_printf (_ ("load of library matching %s"), regex.get ());
else
- msg = _("load of library");
+ msg = _ ("load of library");
}
else
{
if (regex)
- msg = string_printf (_("unload of library matching %s"),
- regex.get ());
+ msg
+ = string_printf (_ ("unload of library matching %s"), regex.get ());
else
- msg = _("unload of library");
+ msg = _ ("unload of library");
}
uiout->field_string ("what", msg);
@@ -203,15 +198,13 @@ solib_catchpoint::print_one (bp_location **locs) const
void
solib_catchpoint::print_mention () const
{
- gdb_printf (_("Catchpoint %d (%s)"), number,
- is_load ? "load" : "unload");
+ gdb_printf (_ ("Catchpoint %d (%s)"), number, is_load ? "load" : "unload");
}
void
solib_catchpoint::print_recreate (struct ui_file *fp) const
{
- gdb_printf (fp, "%s %s",
- disposition == disp_del ? "tcatch" : "catch",
+ gdb_printf (fp, "%s %s", disposition == disp_del ? "tcatch" : "catch",
is_load ? "load" : "unload");
if (regex)
gdb_printf (fp, " %s", regex.get ());
@@ -221,7 +214,8 @@ solib_catchpoint::print_recreate (struct ui_file *fp) const
/* See breakpoint.h. */
void
-add_solib_catchpoint (const char *arg, bool is_load, bool is_temp, bool enabled)
+add_solib_catchpoint (const char *arg, bool is_load, bool is_temp,
+ bool enabled)
{
struct gdbarch *gdbarch = get_current_arch ();
@@ -232,8 +226,8 @@ add_solib_catchpoint (const char *arg, bool is_load, bool is_temp, bool enabled)
arg = nullptr;
std::unique_ptr<solib_catchpoint> c (new solib_catchpoint (gdbarch, is_temp,
- nullptr,
- is_load, arg));
+ nullptr, is_load,
+ arg));
c->enable_state = enabled ? bp_enabled : bp_disabled;
@@ -268,21 +262,18 @@ catch_unload_command_1 (const char *arg, int from_tty,
}
void _initialize_break_catch_load ();
+
void
_initialize_break_catch_load ()
{
- add_catch_command ("load", _("Catch loads of shared libraries.\n\
+ add_catch_command ("load", _ ("Catch loads of shared libraries.\n\
Usage: catch load [REGEX]\n\
If REGEX is given, only stop for libraries matching the regular expression."),
- catch_load_command_1,
- NULL,
- CATCH_PERMANENT,
+ catch_load_command_1, NULL, CATCH_PERMANENT,
CATCH_TEMPORARY);
- add_catch_command ("unload", _("Catch unloads of shared libraries.\n\
+ add_catch_command ("unload", _ ("Catch unloads of shared libraries.\n\
Usage: catch unload [REGEX]\n\
If REGEX is given, only stop for libraries matching the regular expression."),
- catch_unload_command_1,
- NULL,
- CATCH_PERMANENT,
+ catch_unload_command_1, NULL, CATCH_PERMANENT,
CATCH_TEMPORARY);
}