+/* Remember the last symtab and line we displayed, which we use e.g.
+ * as the place to put a breakpoint when the `break' command is
+ * invoked with no arguments. */
+
+static void
+set_last_displayed_sal (int valid, struct program_space *pspace,
+ CORE_ADDR addr, struct symtab *symtab,
+ int line)
+{
+ last_displayed_sal_valid = valid;
+ last_displayed_pspace = pspace;
+ last_displayed_addr = addr;
+ last_displayed_symtab = symtab;
+ last_displayed_line = line;
+ if (valid && pspace == NULL)
+ {
+ clear_last_displayed_sal ();
+ internal_error (__FILE__, __LINE__,
+ _("Trying to set NULL pspace."));
+ }
+}
+
+/* Forget the last sal we displayed. */
+
+void
+clear_last_displayed_sal (void)
+{
+ last_displayed_sal_valid = 0;
+ last_displayed_pspace = 0;
+ last_displayed_addr = 0;
+ last_displayed_symtab = 0;
+ last_displayed_line = 0;
+}
+
+/* Is our record of the last sal we displayed valid? If not,
+ * the get_last_displayed_* functions will return NULL or 0, as
+ * appropriate. */
+
+int
+last_displayed_sal_is_valid (void)
+{
+ return last_displayed_sal_valid;
+}
+
+/* Get the pspace of the last sal we displayed, if it's valid. */
+
+struct program_space *
+get_last_displayed_pspace (void)
+{
+ if (last_displayed_sal_valid)
+ return last_displayed_pspace;
+ return 0;
+}
+
+/* Get the address of the last sal we displayed, if it's valid. */
+
+CORE_ADDR
+get_last_displayed_addr (void)
+{
+ if (last_displayed_sal_valid)
+ return last_displayed_addr;
+ return 0;
+}
+
+/* Get the symtab of the last sal we displayed, if it's valid. */
+
+struct symtab*
+get_last_displayed_symtab (void)
+{
+ if (last_displayed_sal_valid)
+ return last_displayed_symtab;
+ return 0;
+}
+
+/* Get the line of the last sal we displayed, if it's valid. */
+
+int
+get_last_displayed_line (void)
+{
+ if (last_displayed_sal_valid)
+ return last_displayed_line;
+ return 0;
+}
+
+/* Get the last sal we displayed, if it's valid. */
+
+void
+get_last_displayed_sal (struct symtab_and_line *sal)
+{
+ if (last_displayed_sal_valid)
+ {
+ sal->pspace = last_displayed_pspace;
+ sal->pc = last_displayed_addr;
+ sal->symtab = last_displayed_symtab;
+ sal->line = last_displayed_line;
+ }
+ else
+ {
+ sal->pspace = 0;
+ sal->pc = 0;
+ sal->symtab = 0;
+ sal->line = 0;
+ }
+}
+
+