/* See description in linespec.h. */
void
-linespec_lex_to_end (char **stringp)
+linespec_lex_to_end (const char **stringp)
{
linespec_parser parser;
struct cleanup *cleanup;
/* See linespec.h. */
std::vector<symtab_and_line>
-decode_line_with_current_source (char *string, int flags)
+decode_line_with_current_source (const char *string, int flags)
{
if (string == 0)
error (_("Empty line specification."));
/* See linespec.h. */
std::vector<symtab_and_line>
-decode_line_with_last_displayed (char *string, int flags)
+decode_line_with_last_displayed (const char *string, int flags)
{
if (string == 0)
error (_("Empty line specification."));
if (self->canonical)
{
- char *str;
+ std::string holder;
+ const char *str;
self->canonical->pre_expanded = 1;
if (ls->explicit_loc.source_filename)
{
- str = xstrprintf ("%s:%s",
- ls->explicit_loc.source_filename, saved_arg);
+ holder = string_printf ("%s:%s",
+ ls->explicit_loc.source_filename,
+ saved_arg);
+ str = holder.c_str ();
}
else
- str = xstrdup (saved_arg);
+ str = saved_arg;
- make_cleanup (xfree, str);
self->canonical->location = new_linespec_location (&str);
}
}