Work around GCC 6.3.1 bug
[deliverable/binutils-gdb.git] / gdb / location.h
index 5a5adb563258a94ca49d4b60ba1cf1b6cfd51dc6..d954eac7207f6d933ce3ea59c51bf117fb414b7d 100644 (file)
@@ -114,18 +114,11 @@ extern char *
 extern const char *
   event_location_to_string (struct event_location *location);
 
-/* Free an event location and any associated data.  */
-
-extern void delete_event_location (struct event_location *location);
-
 /* A deleter for a struct event_location.  */
 
 struct event_location_deleter
 {
-  void operator() (event_location *location) const
-  {
-    delete_event_location (location);
-  }
+  void operator() (event_location *location) const;
 };
 
 /* A unique pointer for event_location.  */
@@ -134,7 +127,7 @@ typedef std::unique_ptr<event_location, event_location_deleter>
 
 /* Create a new linespec location.  */
 
-extern event_location_up new_linespec_location (char **linespec);
+extern event_location_up new_linespec_location (const char **linespec);
 
 /* Return the linespec location (a string) of the given event_location
    (which must be of type LINESPEC_LOCATION).  */
@@ -215,30 +208,47 @@ extern event_location_up
    legacy specifications of probe, address, and linespec locations.  */
 
 extern event_location_up
-  string_to_event_location (char **argp,
+  string_to_event_location (const char **argp,
                            const struct language_defn *langauge);
 
 /* Like string_to_event_location, but does not attempt to parse explicit
    locations.  */
 
 extern event_location_up
-  string_to_event_location_basic (char **argp,
+  string_to_event_location_basic (const char **argp,
                                  const struct language_defn *language);
 
+/* Structure filled in by string_to_explicit_location to aid the
+   completer.  */
+struct explicit_completion_info
+{
+  /* Pointer to the last option found.  E.g., in "b -sou src.c -fun
+     func", LAST_OPTION is left pointing at "-fun func".  */
+  const char *last_option = NULL;
+
+  /* These point to the start and end of a quoted argument, iff the
+     last argument was quoted.  If parsing finds an incomplete quoted
+     string (e.g., "break -function 'fun"), then QUOTED_ARG_START is
+     set to point to the opening \', and QUOTED_ARG_END is left NULL.
+     If the last option is not quoted, then both are set to NULL. */
+  const char *quoted_arg_start = NULL;
+  const char *quoted_arg_end = NULL;
+};
+
 /* Attempt to convert the input string in *ARGP into an explicit location.
    ARGP is advanced past any processed input.  Returns an event_location
    (malloc'd) if an explicit location was successfully found in *ARGP,
    NULL otherwise.
 
-   IF !DONT_THROW, this function may call error() if *ARGP looks like
-   properly formed input, e.g., if it is called with missing argument
-   parameters or invalid options.  If DONT_THROW is non-zero, this function
-   will not throw any exceptions.  */
+   If COMPLETION_INFO is NULL, this function may call error() if *ARGP
+   looks like improperly formed input, e.g., if it is called with
+   missing argument parameters or invalid options.  If COMPLETION_INFO
+   is not NULL, this function will not throw any exceptions.  */
 
 extern event_location_up
   string_to_explicit_location (const char **argp,
-                              const struct language_defn *langauge,
-                              int dont_throw);
+                              const struct language_defn *language,
+                              explicit_completion_info *completion_info);
 
 /* A convenience function for testing for unset locations.  */
 
This page took 0.02492 seconds and 4 git commands to generate.