Use block_symbol in linespec APIs
[deliverable/binutils-gdb.git] / gdb / symtab.h
index 746b5e6a0ff9da3564ef826419559ef7f7ecc1a8..1dc9a0930572cacb2b3240dd20b0ead7527cb78d 100644 (file)
@@ -1725,12 +1725,31 @@ extern struct symbol *find_symbol_at_address (CORE_ADDR);
    This might suggest that *ADDRESS and *ENDADDR ought to be set to the
    limits of the entry pc range, but that will cause the 
    *ADDRESS <= PC < *ENDADDR condition to be violated; many of the
-   callers of find_pc_partial_function expect this condition to hold.  */
+   callers of find_pc_partial_function expect this condition to hold. 
+
+   Callers which require the start and/or end addresses for the range
+   containing the entry pc should instead call
+   find_function_entry_range_from_pc.  */
 
 extern int find_pc_partial_function (CORE_ADDR pc, const char **name,
                                     CORE_ADDR *address, CORE_ADDR *endaddr,
                                     const struct block **block = nullptr);
 
+/* Like find_pc_partial_function, above, but *ADDRESS and *ENDADDR are
+   set to start and end addresses of the range containing the entry pc.
+
+   Note that it is not necessarily the case that (for non-NULL ADDRESS
+   and ENDADDR arguments) the *ADDRESS <= PC < *ENDADDR condition will
+   hold.
+
+   See comment for find_pc_partial_function, above, for further
+   explanation.  */
+
+extern bool find_function_entry_range_from_pc (CORE_ADDR pc,
+                                              const char **name,
+                                              CORE_ADDR *address,
+                                              CORE_ADDR *endaddr);
+
 /* Return the type of a function with its first instruction exactly at
    the PC address.  Return NULL otherwise.  */
 
@@ -2105,7 +2124,7 @@ std::vector<CORE_ADDR> find_pcs_for_symtab_line
    true to indicate that LA_ITERATE_OVER_SYMBOLS should continue
    iterating, or false to indicate that the iteration should end.  */
 
-typedef bool (symbol_found_callback_ftype) (symbol *sym);
+typedef bool (symbol_found_callback_ftype) (struct block_symbol *bsym);
 
 void iterate_over_symbols (const struct block *block,
                           const lookup_name_info &name,
This page took 0.024442 seconds and 4 git commands to generate.