This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA 2/4] Explicit locations


Hi,

This is the second patch in the series. The main purpose of this patch is to introduce explicit locations and use them internally. This includes converting all linespec locations to explicit form.

Keith

2012-03-21  Keith Seitz  <keiths@redhat.com>

	* breakpoint.h: Include linespec.h.
	(enum event_location_type): Add EVENT_LOCATION_EXPLICIT.
	(struct explicit_location): New structure.
	(struct event_location): Add "explicit" and accessor macro.
	(initialize_explicit_location): Declare.
	* breakpoint.c (location_empty_p): New macro.
	(create_overlay_event_breakpoint): Convert linespec location to
	explicit location.
	(create_longjmp_master_breakpoint): Likewise.
	(create_std_terminate_master_breakpoint): Likewise.
	(create_exception_master_breakpoint): Likewise.
	(update_breakpoints_after_exec): Check for empty location instead
	of NULL linespec.
	(copy_event_location): Handle EVENT_LOCATION_EXPLICIT.
	(delete_event_location): Likewise.
	(initialize_explicit_location): New function.
	(initialize_event_location): Handle explicit locations.
	(parse_breakpoint_sals): Likewise.
	(create_breakpoint): Handle pending explicit breakpoints.
	(handle_gnu_v3_exceptions): Use explicit location instead of
	linespec location.
	(bkpt_re_set): Check for empty location instead of NULL linespec.
	(update_static_tracepoint): Use explicit location instead of linespec
	location.
	(location_to_sals): Handle explicit locations.
	(event_location_to_string): Likewise.
	* linespec.h (enum offset_relative_sign): Move here from linespec.c.
	(struct line_offset): Likewise.
	* linespec.c (enum offset_relative_sign): Moved to linespec.h.
	(struct line_offset): Likewise.
	(undefined_label_error): New function.
	(source_file_not_found_error): New function.
	(linespec_parse_basic): Use undefined_label_error.
	(canonicalize_linespec): Canonicalize all linespecs as
	explicit locations.
	(convert_explicit_location_to_sals): New function.
	(event_location_to_sals): Handle explicit locations.
	(decode_line_with_current_source): Likewise.
	(decode_line_with_last_displayed): Likewise.
	(symtabs_from_filename): Use source_file_not_found_error.


diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index bae5d7c..6c4e40d 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -24,6 +24,7 @@
 #include "vec.h"
 #include "ax.h"
 #include "command.h"
+#include "linespec.h"
 
 struct value;
 struct block;
@@ -488,8 +489,33 @@ enum event_location_type
 
     /* An address in the inferior.  */
     EVENT_LOCATION_ADDRESS,
+
+    /* An explicit location.  */
+    EVENT_LOCATION_EXPLICIT
   };
 
+/* An explicit location.  This structure is used to bypass the
+   parsing done on linespecs.  It still has the same requirements
+   as linespecs, though.  For example, source_filename requires
+   at least one other field.  */
+
+struct explicit_location
+{
+  /* The source filename. Malloc'd.  */
+  char *source_filename;
+
+  /* The function name.  Malloc'd.  */
+  char *function_name;
+
+  /* The name of a label.  Malloc'd.  */
+  char *label_name;
+
+  /* A line offset relative to the start of the symbol
+     identified by the above fields or the current symtab
+     if the other fields are NULL.  */
+  struct line_offset line_offset;
+};
+
 /* An event location used to set a stop event in the inferior.
    This structure is an amalgam of the various ways
    to specify a where a stop event should be set.  */
@@ -510,6 +536,10 @@ struct event_location
     /* An address in the inferior.  */
     CORE_ADDR address;
 #define EVENT_LOCATION_ADDRESS(S) ((S)->u.address)
+
+    /* An explicit location.  */
+    struct explicit_location explicit;
+#define EVENT_LOCATION_EXPLICIT(S) (&((S)->u.explicit))
   } u;
 
   /* A string representation of how this location may be
@@ -1343,6 +1373,10 @@ extern struct event_location *
 extern void initialize_event_location (struct event_location *location,
 				       enum event_location_type type);
 
+/* Initialize the given explicit location.  */
+
+extern void initialize_explicit_location (struct explicit_location *explicit);
+
 extern void insert_breakpoints (void);
 
 extern int remove_breakpoints (void);
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 3d6155f..b885708 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3051,6 +3051,18 @@ static const char *const longjmp_names[] =
   };
 #define NUM_LONGJMP_NAMES ARRAY_SIZE(longjmp_names)
 
+/* A convenience macro for testing for unset locations.  */
+#define location_empty_p(L)						\
+  ((EVENT_LOCATION_TYPE ((L)) == EVENT_LOCATION_EXPLICIT		\
+    && (EVENT_LOCATION_EXPLICIT ((L)) == NULL				\
+	|| (EVENT_LOCATION_EXPLICIT ((L))->source_filename == NULL	\
+	    && EVENT_LOCATION_EXPLICIT ((L))->function_name == NULL	\
+	    && EVENT_LOCATION_EXPLICIT ((L))->label_name == NULL	\
+	    && (EVENT_LOCATION_EXPLICIT ((L))->line_offset.sign		\
+		== LINE_OFFSET_UNKNOWN))))				\
+   || (EVENT_LOCATION_TYPE ((L)) == EVENT_LOCATION_LINESPEC		\
+       && EVENT_LOCATION_LINESPEC ((L)) == NULL))
+
 /* Per-objfile data private to breakpoint.c.  */
 struct breakpoint_objfile_data
 {
@@ -3156,8 +3168,9 @@ create_overlay_event_breakpoint (void)
       b = create_internal_breakpoint (get_objfile_arch (objfile), addr,
                                       bp_overlay_event,
 				      &internal_breakpoint_ops);
-      b->location = new_event_location (EVENT_LOCATION_LINESPEC);
-      EVENT_LOCATION_LINESPEC (b->location) = xstrdup (func_name);
+      b->location = new_event_location (EVENT_LOCATION_EXPLICIT);
+      EVENT_LOCATION_EXPLICIT (b->location)->function_name
+	= xstrdup (func_name);
 
       if (overlay_debugging == ovly_auto)
         {
@@ -3259,8 +3272,9 @@ create_longjmp_master_breakpoint (void)
 	  addr = SYMBOL_VALUE_ADDRESS (bp_objfile_data->longjmp_msym[i]);
 	  b = create_internal_breakpoint (gdbarch, addr, bp_longjmp_master,
 					  &internal_breakpoint_ops);
-	  b->location = new_event_location (EVENT_LOCATION_LINESPEC);
-	  EVENT_LOCATION_LINESPEC (b->location) = xstrdup (func_name);
+	  b->location = new_event_location (EVENT_LOCATION_EXPLICIT);
+	  EVENT_LOCATION_EXPLICIT (b->location)->function_name
+	    = xstrdup (func_name);
 	  b->enable_state = bp_disabled;
 	}
     }
@@ -3316,8 +3330,9 @@ create_std_terminate_master_breakpoint (void)
       b = create_internal_breakpoint (get_objfile_arch (objfile), addr,
                                       bp_std_terminate_master,
 				      &internal_breakpoint_ops);
-      b->location = new_event_location (EVENT_LOCATION_LINESPEC);
-      EVENT_LOCATION_LINESPEC (b->location) = xstrdup (func_name);
+      b->location = new_event_location (EVENT_LOCATION_EXPLICIT);
+      EVENT_LOCATION_EXPLICIT (b->location)->function_name
+	= xstrdup (func_name);
       b->enable_state = bp_disabled;
     }
   }
@@ -3404,8 +3419,9 @@ create_exception_master_breakpoint (void)
 						 &current_target);
       b = create_internal_breakpoint (gdbarch, addr, bp_exception_master,
 				      &internal_breakpoint_ops);
-      b->location = new_event_location (EVENT_LOCATION_LINESPEC);
-      EVENT_LOCATION_LINESPEC (b->location) = xstrdup (func_name);
+      b->location = new_event_location (EVENT_LOCATION_EXPLICIT);
+      EVENT_LOCATION_EXPLICIT (b->location)->function_name
+	= xstrdup (func_name);
       b->enable_state = bp_disabled;
     }
 
@@ -3519,7 +3535,7 @@ update_breakpoints_after_exec (void)
     /* Without a symbolic address, we have little hope of the
        pre-exec() address meaning the same thing in the post-exec()
        a.out.  */
-    if (EVENT_LOCATION_LINESPEC (b->location) == NULL)
+    if (location_empty_p (b->location))
       {
 	delete_breakpoint (b);
 	continue;
@@ -9025,6 +9041,23 @@ copy_event_location (struct event_location *src)
       EVENT_LOCATION_ADDRESS (dst) = EVENT_LOCATION_ADDRESS (src);
       break;
 
+    case EVENT_LOCATION_EXPLICIT:
+      if (EVENT_LOCATION_EXPLICIT (src)->source_filename != NULL)
+	EVENT_LOCATION_EXPLICIT (dst)->source_filename
+	  = xstrdup (EVENT_LOCATION_EXPLICIT (src)->source_filename);
+
+      if (EVENT_LOCATION_EXPLICIT (src)->function_name != NULL)
+	EVENT_LOCATION_EXPLICIT (dst)->function_name
+	  = xstrdup (EVENT_LOCATION_EXPLICIT (src)->function_name);
+
+      if (EVENT_LOCATION_EXPLICIT (src)->label_name != NULL)
+	EVENT_LOCATION_EXPLICIT (dst)->label_name
+	  = xstrdup (EVENT_LOCATION_EXPLICIT (src)->label_name);
+
+      EVENT_LOCATION_EXPLICIT (dst)->line_offset
+	= EVENT_LOCATION_EXPLICIT (src)->line_offset;
+      break;
+
     default:
       gdb_assert_not_reached ("unknown event location type");
     }
@@ -9053,12 +9086,27 @@ delete_event_location (void *data)
 	case EVENT_LOCATION_ADDRESS:
 	  /* Nothing to do.  */
 	  break;
+
+	case EVENT_LOCATION_EXPLICIT:
+	  xfree (EVENT_LOCATION_EXPLICIT (location)->source_filename);
+	  xfree (EVENT_LOCATION_EXPLICIT (location)->function_name);
+	  xfree (EVENT_LOCATION_EXPLICIT (location)->label_name);
+	  break;
 	}
 
       xfree (location);
     }
 }
 
+/* Initialize the given explicit location.  */
+
+void
+initialize_explicit_location (struct explicit_location *explicit)
+{
+  memset (explicit, 0, sizeof (struct explicit_location));
+  explicit->line_offset.sign = LINE_OFFSET_UNKNOWN;
+}
+
 /* Initialize the given LOCATION.  */
 
 void
@@ -9067,6 +9115,8 @@ initialize_event_location (struct event_location *location,
 {
   memset (location, 0, sizeof (struct event_location));
   EVENT_LOCATION_TYPE (location) = type;
+  if (type == EVENT_LOCATION_EXPLICIT)
+    initialize_explicit_location (EVENT_LOCATION_EXPLICIT (location));
 }
 
 /* Create a new user location with the given TYPE.  */
@@ -9678,8 +9728,18 @@ create_breakpoint (struct gdbarch *gdbarch,
 	    /* If the location has a string representation,
 	       save it to the location's save spec, since this
 	       may be used to save the breakpoint to a file.  */
-	    if (EVENT_LOCATION_SAVE_SPEC (location) == NULL
-		&& event_location_to_string (location) != NULL)
+	    if (EVENT_LOCATION_TYPE (location) == EVENT_LOCATION_EXPLICIT)
+	      {
+		char *old = EVENT_LOCATION_SAVE_SPEC (location);
+
+		EVENT_LOCATION_SAVE_SPEC (location)
+		  = xstrprintf ("%s%s%s", old,
+				(extra_string == NULL ? "" : " "),
+				(extra_string == NULL ? "" : extra_string));
+		xfree (old);
+	      }
+	    else if (EVENT_LOCATION_SAVE_SPEC (location) == NULL
+		     && event_location_to_string (location) != NULL)
 	      {
 		EVENT_LOCATION_SAVE_SPEC (location)
 		  = xstrdup (event_location_to_string (location));
@@ -11823,11 +11883,11 @@ handle_gnu_v3_exceptions (int tempflag, char *cond_string,
 {
   struct event_location location;
  
-  initialize_event_location (&location, EVENT_LOCATION_LINESPEC);
+  initialize_event_location (&location, EVENT_LOCATION_EXPLICIT);
   if (ex_event == EX_EVENT_CATCH)
-    EVENT_LOCATION_LINESPEC (&location) = "__cxa_begin_catch";
+    EVENT_LOCATION_EXPLICIT (&location)->function_name = "__cxa_begin_catch";
   else
-    EVENT_LOCATION_LINESPEC (&location) = "__cxa_throw";
+    EVENT_LOCATION_EXPLICIT (&location)->function_name = "__cxa_throw";
 
   create_breakpoint (get_current_arch (),
 		     &location, cond_string, -1, NULL,
@@ -13115,8 +13175,7 @@ static void
 bkpt_re_set (struct breakpoint *b)
 {
   /* FIXME: is this still reachable?  */
-  if (EVENT_LOCATION_TYPE (b->location) == EVENT_LOCATION_LINESPEC
-       && EVENT_LOCATION_LINESPEC (b->location) == NULL)
+  if (location_empty_p (b->location))
     {
       /* Anything without a string can't be re-set.  */
       delete_breakpoint (b);
@@ -14130,11 +14189,11 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal)
 	  b->loc->symtab = sym != NULL ? sal2.symtab : NULL;
 
 	  delete_event_location (b->location);
-	  b->location = new_event_location (EVENT_LOCATION_LINESPEC);
-	  EVENT_LOCATION_LINESPEC (b->location)
-	    = xstrprintf ("%s:%d",
-			  symtab_to_filename_for_display (sal2.symtab),
-			  b->loc->line_number);
+	  b->location = new_event_location (EVENT_LOCATION_EXPLICIT);
+	  EVENT_LOCATION_EXPLICIT (b->location)->source_filename
+	    = xstrdup (symtab_to_filename_for_display (sal2.symtab));
+	  EVENT_LOCATION_EXPLICIT (b->location)->line_offset.offset
+	    = b->loc->line_number;
 
 	  /* Might be nice to check if function changed, and warn if
 	     so.  */
@@ -14356,10 +14415,7 @@ location_to_sals (struct breakpoint *b, struct event_location *location,
 	  if (EVENT_LOCATION_TYPE (location) == EVENT_LOCATION_LINESPEC)
 	    s = EVENT_LOCATION_LINESPEC (location);
 	  else
-	    {
-	      s = b->extra_string;
-	      b->extra_string = NULL;
-	    }
+	    s = b->extra_string;
 
 	  if (s != NULL && *s != '\0')
 	    {
@@ -14389,7 +14445,15 @@ location_to_sals (struct breakpoint *b, struct event_location *location,
 		  char *p, *str;
 		  char *old = EVENT_LOCATION_SAVE_SPEC (location);
 
-		  len = orig - prev;
+		  if (EVENT_LOCATION_TYPE (location) == EVENT_LOCATION_EXPLICIT)
+		    {
+		      len = strlen (prev);
+		      if (s != NULL)
+			len -= strlen (s);
+		    }
+		  else
+		    len = orig - prev;
+
 		  str = savestring (prev, len);
 		  p = remove_trailing_whitespace (str, str + len);
 		  *p = '\0';
@@ -16045,6 +16109,7 @@ event_location_to_string (const struct event_location *location)
       break;
 
     case EVENT_LOCATION_ADDRESS:
+    case EVENT_LOCATION_EXPLICIT:
       result = EVENT_LOCATION_SAVE_SPEC (location);
       break;
 
diff --git a/gdb/linespec.h b/gdb/linespec.h
index c7926e0..fcfc2f5 100644
--- a/gdb/linespec.h
+++ b/gdb/linespec.h
@@ -21,6 +21,32 @@ struct symtab;
 
 #include "vec.h"
 
+/* An enumeration of possible signs for a line offset.  */
+
+enum offset_relative_sign
+{
+  /* No sign  */
+  LINE_OFFSET_NONE,
+
+  /* A plus sign ("+")  */
+  LINE_OFFSET_PLUS,
+
+  /* A minus sign ("-")  */
+  LINE_OFFSET_MINUS,
+
+  /* A special "sign" for unspecified offset.  */
+  LINE_OFFSET_UNKNOWN
+};
+
+/* A line offset in a location.  */
+
+struct line_offset
+{
+  /* Line offset and any specified sign.  */
+  int offset;
+  enum offset_relative_sign sign;
+};
+
 /* Flags to pass to decode_line_1 and decode_line_full.  */
 
 enum decode_line_flags
diff --git a/gdb/linespec.c b/gdb/linespec.c
index ad98f26..710fa21 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -75,31 +75,6 @@ typedef struct minsym_and_objfile
 
 DEF_VEC_O (minsym_and_objfile_d);
 
-/* An enumeration of possible signs for a line offset.  */
-enum offset_relative_sign
-{
-  /* No sign  */
-  LINE_OFFSET_NONE,
-
-  /* A plus sign ("+")  */
-  LINE_OFFSET_PLUS,
-
-  /* A minus sign ("-")  */
-  LINE_OFFSET_MINUS,
-
-  /* A special "sign" for unspecified offset.  */
-  LINE_OFFSET_UNKNOWN
-};
-
-/* A line offset in a linespec.  */
-
-struct line_offset
-{
-  /* Line offset and any specified sign.  */
-  int offset;
-  enum offset_relative_sign sign;
-};
-
 /* A linespec.  Elements of this structure are filled in by a parser
    (either parse_linespec or some other function).  The structure is
    then converted into SALs by convert_linespec_to_sals.  */
@@ -1560,6 +1535,29 @@ unexpected_linespec_error (linespec_parser *parser)
 		 token_type_strings[token.type]);
 }
 
+/* Throw an undefined label error.  */
+
+static void ATTRIBUTE_NORETURN
+undefined_label_error (const char *function, const char *label)
+{
+  if (function != NULL)
+    throw_error (NOT_FOUND_ERROR,
+                _("No label \"%s\" defined in function \"%s\"."),
+                label, function);
+  else
+    throw_error (NOT_FOUND_ERROR,
+                _("No label \"%s\" defined in curernt function."),
+                label);
+}
+
+/* Throw a source file not found error.  */
+
+static void ATTRIBUTE_NORETURN
+source_file_not_found_error (const char *name)
+{
+  throw_error (NOT_FOUND_ERROR, _("No source file named %s."), name);
+}
+
 /* Parse and return a line offset in STRING.  */
 
 static struct line_offset
@@ -1714,9 +1712,8 @@ linespec_parse_basic (linespec_parser *parser)
 	  else
 	    {
 	      /* We don't know what it was, but it isn't a label.  */
-	      throw_error (NOT_FOUND_ERROR,
-			   _("No label \"%s\" defined in function \"%s\"."),
-			   name, PARSER_RESULT (parser)->function_name);
+	      undefined_label_error (PARSER_RESULT (parser)->function_name,
+				     name);
 	    }
 
 	  /* Check for a line offset.  */
@@ -1772,17 +1769,22 @@ canonicalize_linespec (struct linespec_state *state, linespec_p ls)
   else
     {
       struct ui_file *buf;
+      struct explicit_location *explicit;
       int need_colon = 0;
 
       buf = mem_fileopen ();
 
+      /* Convert any LINESPEC into EXPLICIT form so that the
+	 parsing that was just done does not need to be repeated.  */
       state->canonical->location
-	= new_event_location (EVENT_LOCATION_LINESPEC);
+	= new_event_location (EVENT_LOCATION_EXPLICIT);
+      explicit = EVENT_LOCATION_EXPLICIT (state->canonical->location);
 
       if (ls->source_filename)
 	{
 	  fputs_unfiltered (ls->source_filename, buf);
 	  need_colon = 1;
+	  explicit->source_filename = xstrdup (ls->source_filename);
 	}
 
       if (ls->function_name)
@@ -1791,6 +1793,7 @@ canonicalize_linespec (struct linespec_state *state, linespec_p ls)
 	    fputc_unfiltered (':', buf);
 	  fputs_unfiltered (ls->function_name, buf);
 	  need_colon = 1;
+	  explicit->function_name = xstrdup (ls->function_name);
 	}
 
       if (ls->label_name)
@@ -1809,11 +1812,13 @@ canonicalize_linespec (struct linespec_state *state, linespec_p ls)
 	      s = VEC_index (symbolp, ls->labels.function_symbols, 0);
 	      fputs_unfiltered (SYMBOL_NATURAL_NAME (s), buf);
 	      fputc_unfiltered (':', buf);
+	      explicit->function_name = xstrdup (SYMBOL_NATURAL_NAME (s));
 	    }
 
 	  fputs_unfiltered (ls->label_name, buf);
 	  need_colon = 1;
 	  state->canonical->special_display = 1;
+	  explicit->label_name = xstrdup (ls->label_name);
 	}
 
       if (ls->line_offset.sign != LINE_OFFSET_UNKNOWN)
@@ -1825,12 +1830,11 @@ canonicalize_linespec (struct linespec_state *state, linespec_p ls)
 			     : (ls->line_offset.sign
 				== LINE_OFFSET_PLUS ? "+" : "-")),
 			    ls->line_offset.offset);
+	  explicit->line_offset = ls->line_offset;
 	}
 
       EVENT_LOCATION_SAVE_SPEC (state->canonical->location)
 	= ui_file_xstrdup (buf, NULL);
-      EVENT_LOCATION_LINESPEC (state->canonical->location)
-	= xstrdup (EVENT_LOCATION_SAVE_SPEC (state->canonical->location));
       ui_file_delete (buf);
     }
 }
@@ -2108,6 +2112,72 @@ convert_linespec_to_sals (struct linespec_state *state, linespec_p ls)
   return sals;
 }
 
+/* Convert the explicit location EXPLICIT into SaLs.  */
+
+static struct symtabs_and_lines
+convert_explicit_location_to_sals (struct linespec_state *self,
+				   linespec_p result,
+				   struct explicit_location *explicit)
+{
+  VEC (symbolp) *symbols, *labels;
+  VEC (minsym_and_objfile_d) *minimal_symbols;
+
+  if (explicit->source_filename != NULL)
+    {
+      volatile struct gdb_exception except;
+
+      TRY_CATCH (except, RETURN_MASK_ERROR)
+	{
+	  result->file_symtabs
+	    = symtabs_from_filename (explicit->source_filename);
+	}
+
+      if (except.reason < 0 || result->file_symtabs == NULL)
+	source_file_not_found_error (explicit->source_filename);
+
+      result->source_filename = xstrdup (explicit->source_filename);
+    }
+  else
+    {
+      /* A NULL entry means to use the default symtab.  */
+      VEC_safe_push (symtab_p, result->file_symtabs, NULL);
+    }
+
+  if (explicit->function_name != NULL)
+    {
+      find_linespec_symbols (self, result->file_symtabs,
+			     explicit->function_name, &symbols,
+			     &minimal_symbols);
+
+      if (symbols == NULL && minimal_symbols == NULL)
+	symbol_not_found_error (explicit->function_name,
+				result->source_filename);
+
+      result->function_name = xstrdup (explicit->function_name);
+      result->function_symbols = symbols;
+      result->minimal_symbols = minimal_symbols;
+    }
+
+  if (explicit->label_name != NULL)
+    {
+      symbols = NULL;
+      labels = find_label_symbols (self, result->function_symbols,
+				   &symbols, explicit->label_name);
+
+      if (labels == NULL)
+	undefined_label_error (result->function_name, explicit->label_name);
+
+      result->label_name = xstrdup (explicit->label_name);
+      result->labels.label_symbols = labels;
+      result->labels.function_symbols = symbols;
+    }
+
+  if (explicit->line_offset.sign != LINE_OFFSET_UNKNOWN)
+    result->line_offset = explicit->line_offset;
+
+  return convert_linespec_to_sals (self, result);
+}
+
 /* Parse a string that specifies a linespec.
    Pass the address of a char * variable; that variable will be
    advanced over the characters actually parsed.
@@ -2468,6 +2538,13 @@ event_location_to_sals (linespec_parser *parser,
 					    EVENT_LOCATION_ADDRESS (location));
       break;
 
+    case EVENT_LOCATION_EXPLICIT:
+      result
+	= convert_explicit_location_to_sals (PARSER_STATE (parser),
+					     PARSER_RESULT (parser),
+					     EVENT_LOCATION_EXPLICIT (location));
+      break;
+
     default:
       gdb_assert_not_reached ("unhandled event location type");
     }
@@ -3134,7 +3211,7 @@ symtabs_from_filename (const char *filename)
 	throw_error (NOT_FOUND_ERROR,
 		     _("No symbol table is loaded.  "
 		       "Use the \"file\" command."));
-      throw_error (NOT_FOUND_ERROR, _("No source file named %s."), filename);
+      source_file_not_found_error (filename);
     }
 
   return result;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]