#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
{
/* 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. */
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;