~ubuntu-branches/debian/jessie/gdb/jessie

« back to all changes in this revision

Viewing changes to bfd/ieee.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2010-03-20 01:21:29 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100320012129-t7h25y8zgr8c2369
Tags: 7.1-1
* New upstream release, including:
  - PIE support (Closes: #346409).
  - C++ improvements, including static_cast<> et al, namespace imports,
    and bug fixes in printing virtual base classes.
  - Multi-program debugging.  One GDB can now debug multiple programs
    at the same time.
  - Python scripting improvements, including gdb.parse_and_eval.
  - Updated MIPS Linux signal frame layout (Closes: #570875).
  - No internal error stepping over _dl_debug_state (Closes: #569551).
* Update to Standards-Version: 3.8.4 (no changes required).
* Include more relevant (and smaller) docs in the gdbserver package
  (Closes: #571132).
* Do not duplicate documentation in gdb64, gdb-source, and libgdb-dev.
* Fix crash when switching into TUI mode (Closes: #568489).

Show diffs side-by-side

added added

removed removed

Lines of Context:
228
228
                       bfd_vma value,
229
229
                       asymbol *symbol,
230
230
                       bfd_boolean pcrel,
231
 
                       unsigned int index)
 
231
                       unsigned int sindex)
232
232
{
233
233
  unsigned int term_count = 0;
234
234
 
297
297
      /* Subtract the pc from here by asking for PC of this section.  */
298
298
      if (! ieee_write_byte (abfd, ieee_variable_P_enum)
299
299
          || ! ieee_write_byte (abfd,
300
 
                                (bfd_byte) (index + IEEE_SECTION_NUMBER_BASE))
 
300
                                (bfd_byte) (sindex + IEEE_SECTION_NUMBER_BASE))
301
301
          || ! ieee_write_byte (abfd, ieee_function_minus_enum))
302
302
        return FALSE;
303
303
    }
1045
1045
}
1046
1046
 
1047
1047
static asection *
1048
 
get_section_entry (bfd *abfd, ieee_data_type *ieee, unsigned int index)
 
1048
get_section_entry (bfd *abfd, ieee_data_type *ieee, unsigned int sindex)
1049
1049
{
1050
 
  if (index >= ieee->section_table_size)
 
1050
  if (sindex >= ieee->section_table_size)
1051
1051
    {
1052
1052
      unsigned int c, i;
1053
1053
      asection **n;
1056
1056
      c = ieee->section_table_size;
1057
1057
      if (c == 0)
1058
1058
        c = 20;
1059
 
      while (c <= index)
 
1059
      while (c <= sindex)
1060
1060
        c *= 2;
1061
1061
 
1062
1062
      amt = c;
1072
1072
      ieee->section_table_size = c;
1073
1073
    }
1074
1074
 
1075
 
  if (ieee->section_table[index] == (asection *) NULL)
 
1075
  if (ieee->section_table[sindex] == (asection *) NULL)
1076
1076
    {
1077
1077
      char *tmp = bfd_alloc (abfd, (bfd_size_type) 11);
1078
1078
      asection *section;
1079
1079
 
1080
1080
      if (!tmp)
1081
1081
        return NULL;
1082
 
      sprintf (tmp, " fsec%4d", index);
 
1082
      sprintf (tmp, " fsec%4d", sindex);
1083
1083
      section = bfd_make_section (abfd, tmp);
1084
 
      ieee->section_table[index] = section;
1085
 
      section->target_index = index;
1086
 
      ieee->section_table[index] = section;
 
1084
      ieee->section_table[sindex] = section;
 
1085
      section->target_index = sindex;
 
1086
      ieee->section_table[sindex] = section;
1087
1087
    }
1088
 
  return ieee->section_table[index];
 
1088
  return ieee->section_table[sindex];
1089
1089
}
1090
1090
 
1091
1091
static void
3743
3743
    (bfd *, unsigned int, struct orl *, unsigned int, int)) \
3744
3744
   bfd_true)
3745
3745
#define ieee_read_ar_hdr bfd_nullvoidptr
 
3746
#define ieee_write_ar_hdr ((bfd_boolean (*) (bfd *, bfd *)) bfd_false)
3746
3747
#define ieee_update_armap_timestamp bfd_true
3747
3748
#define ieee_get_elt_at_index _bfd_generic_get_elt_at_index
3748
3749
 
3775
3776
#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
3776
3777
#define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
3777
3778
#define ieee_bfd_link_just_syms _bfd_generic_link_just_syms
 
3779
#define ieee_bfd_copy_link_hash_symbol_type \
 
3780
  _bfd_generic_copy_link_hash_symbol_type
3778
3781
#define ieee_bfd_final_link _bfd_generic_final_link
3779
3782
#define ieee_bfd_link_split_section  _bfd_generic_link_split_section
3780
3783