{
struct exception_catchpoint *self
= (struct exception_catchpoint *) bs->breakpoint_at;
- char *type_name = NULL;
+ std::string type_name;
bkpt_breakpoint_ops.check_status (bs);
if (bs->stop == 0)
TRY
{
struct value *typeinfo_arg;
- char *canon;
+ std::string canon;
fetch_probe_arguments (NULL, &typeinfo_arg);
type_name = cplus_typename_from_type_info (typeinfo_arg);
- canon = cp_canonicalize_string (type_name);
- if (canon != NULL)
- {
- xfree (type_name);
- type_name = canon;
- }
+ canon = cp_canonicalize_string (type_name.c_str ());
+ if (!canon.empty ())
+ std::swap (type_name, canon);
}
CATCH (e, RETURN_MASK_ERROR)
{
}
END_CATCH
- if (type_name != NULL)
+ if (!type_name.empty ())
{
- if (regexec (self->pattern, type_name, 0, NULL, 0) != 0)
+ if (regexec (self->pattern, type_name.c_str (), 0, NULL, 0) != 0)
bs->stop = 0;
-
- xfree (type_name);
}
}