gdb: Convert language la_watch_location_expression field to a method
[deliverable/binutils-gdb.git] / gdb / dwarf2 / abbrev.h
index b9ace64b4482c808a405373845e362073168f3b8..888f04ebebbbad6f27f1cf60474904b18959edf8 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef GDB_DWARF2_ABBREV_H
 #define GDB_DWARF2_ABBREV_H
 
+#include "hashtab.h"
+
 /* This data structure holds the information of an abbrev.  */
 struct abbrev_info
   {
@@ -60,8 +62,15 @@ struct abbrev_table
   /* Look up an abbrev in the table.
      Returns NULL if the abbrev is not found.  */
 
-  struct abbrev_info *lookup_abbrev (unsigned int abbrev_number);
+  struct abbrev_info *lookup_abbrev (unsigned int abbrev_number)
+  {
+    struct abbrev_info search;
+    search.number = abbrev_number;
 
+    return (struct abbrev_info *) htab_find_with_hash (m_abbrevs.get (),
+                                                      &search,
+                                                      abbrev_number);
+  }
 
   /* Where the abbrev table came from.
      This is used as a sanity check when the table is used.  */
@@ -78,7 +87,7 @@ private:
   struct abbrev_info *alloc_abbrev ();
 
   /* Add an abbreviation to the table.  */
-  void add_abbrev (unsigned int abbrev_number, struct abbrev_info *abbrev);
+  void add_abbrev (struct abbrev_info *abbrev);
 
   /* Hash table of abbrevs.  */
   htab_up m_abbrevs;
This page took 0.024735 seconds and 4 git commands to generate.