mac_ptr = dwarf_macinfo_buffer + offset; mac_end = dwarf_macinfo_buffer + dwarf_macinfo_size;
mac_ptr = dwarf2_per_objfile->macinfo_buffer + offset; mac_end = dwarf2_per_objfile->macinfo_buffer + dwarf2_per_objfile->macinfo_size;
dwarf_decode_macros (struct line_header *lh, unsigned int offset,                     char *comp_dir, bfd *abfd,                     struct dwarf2_cu *cu){  char *mac_ptr, *mac_end;  struct macro_source_file *current_file = 0;  if (dwarf_macinfo_buffer == NULL)    {      complaint (&symfile_complaints, "missing .debug_macinfo section");      return;    }  mac_ptr = dwarf_macinfo_buffer + offset;  mac_end = dwarf_macinfo_buffer + dwarf_macinfo_size;  for (;;)    {      enum dwarf_macinfo_record_type macinfo_type;      /* Do we at least have room for a macinfo type byte?  */      if (mac_ptr >= mac_end)        {	  dwarf2_macros_too_long_complaint ();          return;        }      macinfo_type = read_1_byte (abfd, mac_ptr);      mac_ptr++;      switch (macinfo_type)        {          /* A zero macinfo type indicates the end of the macro             information.  */        case 0:          return;        case DW_MACINFO_define:        case DW_MACINFO_undef:          {            int bytes_read;            int line;            char *body;            line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);            mac_ptr += bytes_read;            body = read_string (abfd, mac_ptr, &bytes_read);            mac_ptr += bytes_read;            if (! current_file)	      complaint (&symfile_complaints,			 "debug info gives macro %s outside of any file: %s",			 macinfo_type ==			 DW_MACINFO_define ? "definition" : macinfo_type ==			 DW_MACINFO_undef ? "undefinition" :			 "something-or-other", body);            else              {                if (macinfo_type == DW_MACINFO_define)                  parse_macro_definition (current_file, line, body);                else if (macinfo_type == DW_MACINFO_undef)                  macro_undef (current_file, line, body);              }          }          break;        case DW_MACINFO_start_file:          {            int bytes_read;            int line, file;            line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);            mac_ptr += bytes_read;            file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);            mac_ptr += bytes_read;            current_file = macro_start_file (file, line,                                             current_file, comp_dir,                                             lh, cu->objfile);          }          break;        case DW_MACINFO_end_file:          if (! current_file)	    complaint (&symfile_complaints,		       "macro debug info has an unmatched `close_file' directive");          else            {              current_file = current_file->included_by;              if (! current_file)                {                  enum dwarf_macinfo_record_type next_type;                  /* GCC circa March 2002 doesn't produce the zero                     type byte marking the end of the compilation                     unit.  Complain if it's not there, but exit no                     matter what.  */                  /* Do we at least have room for a macinfo type byte?  */                  if (mac_ptr >= mac_end)                    {		      dwarf2_macros_too_long_complaint ();                      return;                    }                  /* We don't increment mac_ptr here, so this is just                     a look-ahead.  */                  next_type = read_1_byte (abfd, mac_ptr);                  if (next_type != 0)		    complaint (&symfile_complaints,			       "no terminating 0-type entry for macros in `.debug_macinfo' section");                  return;                }            }          break;        case DW_MACINFO_vendor_ext:          {            int bytes_read;            int constant;            char *string;            constant = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);            mac_ptr += bytes_read;            string = read_string (abfd, mac_ptr, &bytes_read);            mac_ptr += bytes_read;            /* We don't recognize any vendor extensions.  */          }          break;        }    }}