aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-12-06 09:26:00 +1030
committerAlan Modra <amodra@gmail.com>2017-12-06 17:51:43 +1030
commit07d6d2b8345ef3dc82eab49635acac9ee67dbb18 (patch)
tree380d1e08ae32b2a37d5f9610f1811bb98299ac09 /bfd/dwarf2.c
parent65281396861dfcfa993eb5af4769d6837104890d (diff)
downloadgdb-07d6d2b8345ef3dc82eab49635acac9ee67dbb18.zip
gdb-07d6d2b8345ef3dc82eab49635acac9ee67dbb18.tar.gz
gdb-07d6d2b8345ef3dc82eab49635acac9ee67dbb18.tar.bz2
BFD whitespace fixes
Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c146
1 files changed, 73 insertions, 73 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index ef380dd6..f1df59d 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -117,11 +117,11 @@ struct dwarf2_debug
This includes a pointer to an alternate bfd which contains *extra*,
possibly duplicate debug sections, and pointers to the loaded
.debug_str and .debug_info sections from this bfd. */
- bfd * alt_bfd_ptr;
- bfd_byte * alt_dwarf_str_buffer;
- bfd_size_type alt_dwarf_str_size;
- bfd_byte * alt_dwarf_info_buffer;
- bfd_size_type alt_dwarf_info_size;
+ bfd * alt_bfd_ptr;
+ bfd_byte * alt_dwarf_str_buffer;
+ bfd_size_type alt_dwarf_str_size;
+ bfd_byte * alt_dwarf_info_buffer;
+ bfd_size_type alt_dwarf_info_size;
/* A pointer to the memory block allocated for info_ptr. Neither
info_ptr nor sec_info_ptr are guaranteed to stay pointing to the
@@ -193,8 +193,8 @@ struct dwarf2_debug
/* Status of info hash. */
int info_hash_status;
-#define STASH_INFO_HASH_OFF 0
-#define STASH_INFO_HASH_ON 1
+#define STASH_INFO_HASH_OFF 0
+#define STASH_INFO_HASH_ON 1
#define STASH_INFO_HASH_DISABLED 2
/* True if we opened bfd_ptr. */
@@ -517,7 +517,7 @@ lookup_info_hash_table (struct info_hash_table *hash_table, const char *key)
the located section does not contain at least OFFSET bytes. */
static bfd_boolean
-read_section (bfd * abfd,
+read_section (bfd * abfd,
const struct dwarf_debug_section *sec,
asymbol ** syms,
bfd_uint64_t offset,
@@ -639,9 +639,9 @@ read_n_bytes (bfd *abfd ATTRIBUTE_UNUSED,
problem, or if the string is empty. */
static char *
-read_string (bfd * abfd ATTRIBUTE_UNUSED,
- bfd_byte * buf,
- bfd_byte * buf_end,
+read_string (bfd * abfd ATTRIBUTE_UNUSED,
+ bfd_byte * buf,
+ bfd_byte * buf_end,
unsigned int * bytes_read_ptr)
{
bfd_byte *str = buf;
@@ -679,9 +679,9 @@ read_string (bfd * abfd ATTRIBUTE_UNUSED,
static char *
read_indirect_string (struct comp_unit * unit,
- bfd_byte * buf,
- bfd_byte * buf_end,
- unsigned int * bytes_read_ptr)
+ bfd_byte * buf,
+ bfd_byte * buf_end,
+ unsigned int * bytes_read_ptr)
{
bfd_uint64_t offset;
struct dwarf2_debug *stash = unit->stash;
@@ -717,8 +717,8 @@ read_indirect_string (struct comp_unit * unit,
static char *
read_indirect_line_string (struct comp_unit * unit,
- bfd_byte * buf,
- bfd_byte * buf_end,
+ bfd_byte * buf,
+ bfd_byte * buf_end,
unsigned int * bytes_read_ptr)
{
bfd_uint64_t offset;
@@ -758,8 +758,8 @@ read_indirect_line_string (struct comp_unit * unit,
static char *
read_alt_indirect_string (struct comp_unit * unit,
- bfd_byte * buf,
- bfd_byte * buf_end,
+ bfd_byte * buf,
+ bfd_byte * buf_end,
unsigned int * bytes_read_ptr)
{
bfd_uint64_t offset;
@@ -1073,11 +1073,11 @@ is_str_attr (enum dwarf_form form)
static bfd_byte *
read_attribute_value (struct attribute * attr,
- unsigned form,
- bfd_vma implicit_const,
+ unsigned form,
+ bfd_vma implicit_const,
struct comp_unit * unit,
- bfd_byte * info_ptr,
- bfd_byte * info_ptr_end)
+ bfd_byte * info_ptr,
+ bfd_byte * info_ptr_end)
{
bfd *abfd = unit->abfd;
unsigned int bytes_read;
@@ -1272,8 +1272,8 @@ static bfd_byte *
read_attribute (struct attribute * attr,
struct attr_abbrev * abbrev,
struct comp_unit * unit,
- bfd_byte * info_ptr,
- bfd_byte * info_ptr_end)
+ bfd_byte * info_ptr,
+ bfd_byte * info_ptr_end)
{
attr->name = abbrev->name;
info_ptr = read_attribute_value (attr, abbrev->form, abbrev->implicit_const,
@@ -1335,24 +1335,24 @@ struct fileinfo
struct line_sequence
{
- bfd_vma low_pc;
+ bfd_vma low_pc;
struct line_sequence* prev_sequence;
- struct line_info* last_line; /* Largest VMA. */
- struct line_info** line_info_lookup;
+ struct line_info* last_line; /* Largest VMA. */
+ struct line_info** line_info_lookup;
bfd_size_type num_lines;
};
struct line_info_table
{
- bfd * abfd;
- unsigned int num_files;
- unsigned int num_dirs;
- unsigned int num_sequences;
- char * comp_dir;
- char ** dirs;
- struct fileinfo* files;
+ bfd * abfd;
+ unsigned int num_files;
+ unsigned int num_dirs;
+ unsigned int num_sequences;
+ char * comp_dir;
+ char ** dirs;
+ struct fileinfo* files;
struct line_sequence* sequences;
- struct line_info* lcl_head; /* Local head; used in 'add_line_info'. */
+ struct line_info* lcl_head; /* Local head; used in 'add_line_info'. */
};
/* Remember some information about each function. If the function is
@@ -1388,12 +1388,12 @@ struct lookup_funcinfo
struct funcinfo * funcinfo;
/* The lowest address for this specific function. */
- bfd_vma low_addr;
+ bfd_vma low_addr;
/* The highest address of this function before the lookup table is sorted.
The highest address of all prior functions after the lookup table is
sorted, which is used for binary search. */
- bfd_vma high_addr;
+ bfd_vma high_addr;
};
struct varinfo
@@ -1747,12 +1747,12 @@ build_line_info_table (struct line_info_table * table,
static bfd_boolean
sort_line_sequences (struct line_info_table* table)
{
- bfd_size_type amt;
- struct line_sequence* sequences;
- struct line_sequence* seq;
- unsigned int n = 0;
- unsigned int num_sequences = table->num_sequences;
- bfd_vma last_high_pc;
+ bfd_size_type amt;
+ struct line_sequence* sequences;
+ struct line_sequence* seq;
+ unsigned int n = 0;
+ unsigned int num_sequences = table->num_sequences;
+ bfd_vma last_high_pc;
if (num_sequences == 0)
return TRUE;
@@ -2644,7 +2644,7 @@ lookup_address_in_function_table (struct comp_unit *unit,
if (unit->lookup_funcinfo_table[number_of_functions - 1].high_addr < addr)
return FALSE;
-
+
/* Find the first function in the lookup table which may contain the
specified address. */
low = 0;
@@ -4297,19 +4297,19 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd,
if (stash != NULL)
{
if (stash->orig_bfd == abfd
- && section_vma_same (abfd, stash))
- {
- /* Check that we did previously find some debug information
- before attempting to make use of it. */
- if (stash->bfd_ptr != NULL)
- {
- if (do_place && !place_sections (abfd, stash))
- return FALSE;
- return TRUE;
- }
-
- return FALSE;
- }
+ && section_vma_same (abfd, stash))
+ {
+ /* Check that we did previously find some debug information
+ before attempting to make use of it. */
+ if (stash->bfd_ptr != NULL)
+ {
+ if (do_place && !place_sections (abfd, stash))
+ return FALSE;
+ return TRUE;
+ }
+
+ return FALSE;
+ }
_bfd_dwarf2_cleanup_debug_info (abfd, pinfo);
memset (stash, 0, amt);
}
@@ -4550,18 +4550,18 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
addr = offset;
/* If we have no SYMBOL but the section we're looking at is not a
- code section, then take a look through the list of symbols to see
- if we have a symbol at the address we're looking for. If we do
- then use this to look up line information. This will allow us to
- give file and line results for data symbols. We exclude code
- symbols here, if we look up a function symbol and then look up the
- line information we'll actually return the line number for the
- opening '{' rather than the function definition line. This is
- because looking up by symbol uses the line table, in which the
- first line for a function is usually the opening '{', while
- looking up the function by section + offset uses the
- DW_AT_decl_line from the function DW_TAG_subprogram for the line,
- which will be the line of the function name. */
+ code section, then take a look through the list of symbols to see
+ if we have a symbol at the address we're looking for. If we do
+ then use this to look up line information. This will allow us to
+ give file and line results for data symbols. We exclude code
+ symbols here, if we look up a function symbol and then look up the
+ line information we'll actually return the line number for the
+ opening '{' rather than the function definition line. This is
+ because looking up by symbol uses the line table, in which the
+ first line for a function is usually the opening '{', while
+ looking up the function by section + offset uses the
+ DW_AT_decl_line from the function DW_TAG_subprogram for the line,
+ which will be the line of the function name. */
if (symbols != NULL && (section->flags & SEC_CODE) == 0)
{
asymbol **tmp;
@@ -4574,10 +4574,10 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
{
symbol = *tmp;
do_line = TRUE;
- /* For local symbols, keep going in the hope we find a
- global. */
- if ((symbol->flags & BSF_GLOBAL) != 0)
- break;
+ /* For local symbols, keep going in the hope we find a
+ global. */
+ if ((symbol->flags & BSF_GLOBAL) != 0)
+ break;
}
}
}