diff --git a/src/DbgBreakpoint.cc b/src/DbgBreakpoint.cc index 21753f4035..a1ef53d6ec 100644 --- a/src/DbgBreakpoint.cc +++ b/src/DbgBreakpoint.cc @@ -148,9 +148,10 @@ bool DbgBreakpoint::SetLocation(ParseLocationRec plr, string_view loc_str) else if ( plr.type == plrFunction ) { + std::string loc_s(loc_str); kind = BP_FUNC; function_name = make_full_var_name(current_module.c_str(), - loc_str.data()); + loc_s.c_str()); at_stmt = plr.stmt; const Location* loc = at_stmt->GetLocationInfo(); snprintf(description, sizeof(description), "%s at %s:%d", diff --git a/src/DebugCmds.cc b/src/DebugCmds.cc index 983ee69e84..255d36f060 100644 --- a/src/DebugCmds.cc +++ b/src/DebugCmds.cc @@ -27,7 +27,7 @@ // // Helper routines // -bool string_is_regex(string_view s) +bool string_is_regex(const string& s) { return strpbrk(s.data(), "?*\\+"); }