* linespec.c: #include "stack.h".

(decode_line_with_current_source): Moved here from symtab.c and
	renamed from decode_line_spec.  All callers updated.
	(decode_line_with_last_displayed): Moved here from breakpoint.c and
	renamed from decode_line_spec_1.  All callers updated.
	* linespec.h (decode_line_with_current_source): Move declaration here
	from symtab.h and renamed from decode_line_spec.
	(decode_line_with_last_displayed): Move declaration here from symtab.h
	and renamed from decode_line_spec_1.
	* macrocmd.c: #include "linespec.h".
	* symtab.c: Remove #include "linespec.h".
This commit is contained in:
Doug Evans 2012-06-29 22:46:46 +00:00
parent a040981f62
commit 39cf75f7e0
12 changed files with 89 additions and 59 deletions

View file

@ -33,7 +33,6 @@
#include "language.h"
#include "demangle.h"
#include "inferior.h"
#include "linespec.h"
#include "source.h"
#include "filenames.h" /* for FILENAME_CMP */
#include "objc-lang.h"
@ -4821,27 +4820,6 @@ skip_prologue_using_sal (struct gdbarch *gdbarch, CORE_ADDR func_addr)
return prologue_sal.pc;
}
struct symtabs_and_lines
decode_line_spec (char *string, int flags)
{
struct symtabs_and_lines sals;
struct symtab_and_line cursal;
if (string == 0)
error (_("Empty line specification."));
/* We use whatever is set as the current source line. We do not try
and get a default or it will recursively call us! */
cursal = get_current_source_symtab_and_line ();
sals = decode_line_1 (&string, flags,
cursal.symtab, cursal.line);
if (*string)
error (_("Junk at end of line specification: %s"), string);
return sals;
}
/* Track MAIN */
static char *name_of_main;
enum language language_of_main = language_unknown;