aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-11-02 10:26:14 -0500
committerSimon Marchi <simon.marchi@efficios.com>2020-11-02 10:28:45 -0500
commitdda83cd783075941aabe9b0292b004b11f00c831 (patch)
tree185c06ef106c06ecc55ea045a4916495c1a3526b /gdb/dwarf2
parent1c2bec1918cee91221bccc30db4f0253dc31d1b7 (diff)
downloadgdb-dda83cd783075941aabe9b0292b004b11f00c831.zip
gdb-dda83cd783075941aabe9b0292b004b11f00c831.tar.gz
gdb-dda83cd783075941aabe9b0292b004b11f00c831.tar.bz2
gdb, gdbserver, gdbsupport: fix leading space vs tabs issues
Many spots incorrectly use only spaces for indentation (for example, there are a lot of spots in ada-lang.c). I've always found it awkward when I needed to edit one of these spots: do I keep the original wrong indentation, or do I fix it? What if the lines around it are also wrong, do I fix them too? I probably don't want to fix them in the same patch, to avoid adding noise to my patch. So I propose to fix as much as possible once and for all (hopefully). One typical counter argument for this is that it makes code archeology more difficult, because git-blame will show this commit as the last change for these lines. My counter counter argument is: when git-blaming, you often need to do "blame the file at the parent commit" anyway, to go past some other refactor that touched the line you are interested in, but is not the change you are looking for. So you already need a somewhat efficient way to do this. Using some interactive tool, rather than plain git-blame, makes this trivial. For example, I use "tig blame <file>", where going back past the commit that changed the currently selected line is one keystroke. It looks like Magit in Emacs does it too (though I've never used it). Web viewers of Github and Gitlab do it too. My point is that it won't really make archeology more difficult. The other typical counter argument is that it will cause conflicts with existing patches. That's true... but it's a one time cost, and those are not conflicts that are difficult to resolve. I have also tried "git rebase --ignore-whitespace", it seems to work well. Although that will re-introduce the faulty indentation, so one needs to take care of fixing the indentation in the patch after that (which is easy). gdb/ChangeLog: * aarch64-linux-tdep.c: Fix indentation. * aarch64-ravenscar-thread.c: Fix indentation. * aarch64-tdep.c: Fix indentation. * aarch64-tdep.h: Fix indentation. * ada-lang.c: Fix indentation. * ada-lang.h: Fix indentation. * ada-tasks.c: Fix indentation. * ada-typeprint.c: Fix indentation. * ada-valprint.c: Fix indentation. * ada-varobj.c: Fix indentation. * addrmap.c: Fix indentation. * addrmap.h: Fix indentation. * agent.c: Fix indentation. * aix-thread.c: Fix indentation. * alpha-bsd-nat.c: Fix indentation. * alpha-linux-tdep.c: Fix indentation. * alpha-mdebug-tdep.c: Fix indentation. * alpha-nbsd-tdep.c: Fix indentation. * alpha-obsd-tdep.c: Fix indentation. * alpha-tdep.c: Fix indentation. * amd64-bsd-nat.c: Fix indentation. * amd64-darwin-tdep.c: Fix indentation. * amd64-linux-nat.c: Fix indentation. * amd64-linux-tdep.c: Fix indentation. * amd64-nat.c: Fix indentation. * amd64-obsd-tdep.c: Fix indentation. * amd64-tdep.c: Fix indentation. * amd64-windows-tdep.c: Fix indentation. * annotate.c: Fix indentation. * arc-tdep.c: Fix indentation. * arch-utils.c: Fix indentation. * arch/arm-get-next-pcs.c: Fix indentation. * arch/arm.c: Fix indentation. * arm-linux-nat.c: Fix indentation. * arm-linux-tdep.c: Fix indentation. * arm-nbsd-tdep.c: Fix indentation. * arm-pikeos-tdep.c: Fix indentation. * arm-tdep.c: Fix indentation. * arm-tdep.h: Fix indentation. * arm-wince-tdep.c: Fix indentation. * auto-load.c: Fix indentation. * auxv.c: Fix indentation. * avr-tdep.c: Fix indentation. * ax-gdb.c: Fix indentation. * ax-general.c: Fix indentation. * bfin-linux-tdep.c: Fix indentation. * block.c: Fix indentation. * block.h: Fix indentation. * blockframe.c: Fix indentation. * bpf-tdep.c: Fix indentation. * break-catch-sig.c: Fix indentation. * break-catch-syscall.c: Fix indentation. * break-catch-throw.c: Fix indentation. * breakpoint.c: Fix indentation. * breakpoint.h: Fix indentation. * bsd-uthread.c: Fix indentation. * btrace.c: Fix indentation. * build-id.c: Fix indentation. * buildsym-legacy.h: Fix indentation. * buildsym.c: Fix indentation. * c-typeprint.c: Fix indentation. * c-valprint.c: Fix indentation. * c-varobj.c: Fix indentation. * charset.c: Fix indentation. * cli/cli-cmds.c: Fix indentation. * cli/cli-decode.c: Fix indentation. * cli/cli-decode.h: Fix indentation. * cli/cli-script.c: Fix indentation. * cli/cli-setshow.c: Fix indentation. * coff-pe-read.c: Fix indentation. * coffread.c: Fix indentation. * compile/compile-cplus-types.c: Fix indentation. * compile/compile-object-load.c: Fix indentation. * compile/compile-object-run.c: Fix indentation. * completer.c: Fix indentation. * corefile.c: Fix indentation. * corelow.c: Fix indentation. * cp-abi.h: Fix indentation. * cp-namespace.c: Fix indentation. * cp-support.c: Fix indentation. * cp-valprint.c: Fix indentation. * cris-linux-tdep.c: Fix indentation. * cris-tdep.c: Fix indentation. * darwin-nat-info.c: Fix indentation. * darwin-nat.c: Fix indentation. * darwin-nat.h: Fix indentation. * dbxread.c: Fix indentation. * dcache.c: Fix indentation. * disasm.c: Fix indentation. * dtrace-probe.c: Fix indentation. * dwarf2/abbrev.c: Fix indentation. * dwarf2/attribute.c: Fix indentation. * dwarf2/expr.c: Fix indentation. * dwarf2/frame.c: Fix indentation. * dwarf2/index-cache.c: Fix indentation. * dwarf2/index-write.c: Fix indentation. * dwarf2/line-header.c: Fix indentation. * dwarf2/loc.c: Fix indentation. * dwarf2/macro.c: Fix indentation. * dwarf2/read.c: Fix indentation. * dwarf2/read.h: Fix indentation. * elfread.c: Fix indentation. * eval.c: Fix indentation. * event-top.c: Fix indentation. * exec.c: Fix indentation. * exec.h: Fix indentation. * expprint.c: Fix indentation. * f-lang.c: Fix indentation. * f-typeprint.c: Fix indentation. * f-valprint.c: Fix indentation. * fbsd-nat.c: Fix indentation. * fbsd-tdep.c: Fix indentation. * findvar.c: Fix indentation. * fork-child.c: Fix indentation. * frame-unwind.c: Fix indentation. * frame-unwind.h: Fix indentation. * frame.c: Fix indentation. * frv-linux-tdep.c: Fix indentation. * frv-tdep.c: Fix indentation. * frv-tdep.h: Fix indentation. * ft32-tdep.c: Fix indentation. * gcore.c: Fix indentation. * gdb_bfd.c: Fix indentation. * gdbarch.sh: Fix indentation. * gdbarch.c: Re-generate * gdbarch.h: Re-generate. * gdbcore.h: Fix indentation. * gdbthread.h: Fix indentation. * gdbtypes.c: Fix indentation. * gdbtypes.h: Fix indentation. * glibc-tdep.c: Fix indentation. * gnu-nat.c: Fix indentation. * gnu-nat.h: Fix indentation. * gnu-v2-abi.c: Fix indentation. * gnu-v3-abi.c: Fix indentation. * go32-nat.c: Fix indentation. * guile/guile-internal.h: Fix indentation. * guile/scm-cmd.c: Fix indentation. * guile/scm-frame.c: Fix indentation. * guile/scm-iterator.c: Fix indentation. * guile/scm-math.c: Fix indentation. * guile/scm-ports.c: Fix indentation. * guile/scm-pretty-print.c: Fix indentation. * guile/scm-value.c: Fix indentation. * h8300-tdep.c: Fix indentation. * hppa-linux-nat.c: Fix indentation. * hppa-linux-tdep.c: Fix indentation. * hppa-nbsd-nat.c: Fix indentation. * hppa-nbsd-tdep.c: Fix indentation. * hppa-obsd-nat.c: Fix indentation. * hppa-tdep.c: Fix indentation. * hppa-tdep.h: Fix indentation. * i386-bsd-nat.c: Fix indentation. * i386-darwin-nat.c: Fix indentation. * i386-darwin-tdep.c: Fix indentation. * i386-dicos-tdep.c: Fix indentation. * i386-gnu-nat.c: Fix indentation. * i386-linux-nat.c: Fix indentation. * i386-linux-tdep.c: Fix indentation. * i386-nto-tdep.c: Fix indentation. * i386-obsd-tdep.c: Fix indentation. * i386-sol2-nat.c: Fix indentation. * i386-tdep.c: Fix indentation. * i386-tdep.h: Fix indentation. * i386-windows-tdep.c: Fix indentation. * i387-tdep.c: Fix indentation. * i387-tdep.h: Fix indentation. * ia64-libunwind-tdep.c: Fix indentation. * ia64-libunwind-tdep.h: Fix indentation. * ia64-linux-nat.c: Fix indentation. * ia64-linux-tdep.c: Fix indentation. * ia64-tdep.c: Fix indentation. * ia64-tdep.h: Fix indentation. * ia64-vms-tdep.c: Fix indentation. * infcall.c: Fix indentation. * infcmd.c: Fix indentation. * inferior.c: Fix indentation. * infrun.c: Fix indentation. * iq2000-tdep.c: Fix indentation. * language.c: Fix indentation. * linespec.c: Fix indentation. * linux-fork.c: Fix indentation. * linux-nat.c: Fix indentation. * linux-tdep.c: Fix indentation. * linux-thread-db.c: Fix indentation. * lm32-tdep.c: Fix indentation. * m2-lang.c: Fix indentation. * m2-typeprint.c: Fix indentation. * m2-valprint.c: Fix indentation. * m32c-tdep.c: Fix indentation. * m32r-linux-tdep.c: Fix indentation. * m32r-tdep.c: Fix indentation. * m68hc11-tdep.c: Fix indentation. * m68k-bsd-nat.c: Fix indentation. * m68k-linux-nat.c: Fix indentation. * m68k-linux-tdep.c: Fix indentation. * m68k-tdep.c: Fix indentation. * machoread.c: Fix indentation. * macrocmd.c: Fix indentation. * macroexp.c: Fix indentation. * macroscope.c: Fix indentation. * macrotab.c: Fix indentation. * macrotab.h: Fix indentation. * main.c: Fix indentation. * mdebugread.c: Fix indentation. * mep-tdep.c: Fix indentation. * mi/mi-cmd-catch.c: Fix indentation. * mi/mi-cmd-disas.c: Fix indentation. * mi/mi-cmd-env.c: Fix indentation. * mi/mi-cmd-stack.c: Fix indentation. * mi/mi-cmd-var.c: Fix indentation. * mi/mi-cmds.c: Fix indentation. * mi/mi-main.c: Fix indentation. * mi/mi-parse.c: Fix indentation. * microblaze-tdep.c: Fix indentation. * minidebug.c: Fix indentation. * minsyms.c: Fix indentation. * mips-linux-nat.c: Fix indentation. * mips-linux-tdep.c: Fix indentation. * mips-nbsd-tdep.c: Fix indentation. * mips-tdep.c: Fix indentation. * mn10300-linux-tdep.c: Fix indentation. * mn10300-tdep.c: Fix indentation. * moxie-tdep.c: Fix indentation. * msp430-tdep.c: Fix indentation. * namespace.h: Fix indentation. * nat/fork-inferior.c: Fix indentation. * nat/gdb_ptrace.h: Fix indentation. * nat/linux-namespaces.c: Fix indentation. * nat/linux-osdata.c: Fix indentation. * nat/netbsd-nat.c: Fix indentation. * nat/x86-dregs.c: Fix indentation. * nbsd-nat.c: Fix indentation. * nbsd-tdep.c: Fix indentation. * nios2-linux-tdep.c: Fix indentation. * nios2-tdep.c: Fix indentation. * nto-procfs.c: Fix indentation. * nto-tdep.c: Fix indentation. * objfiles.c: Fix indentation. * objfiles.h: Fix indentation. * opencl-lang.c: Fix indentation. * or1k-tdep.c: Fix indentation. * osabi.c: Fix indentation. * osabi.h: Fix indentation. * osdata.c: Fix indentation. * p-lang.c: Fix indentation. * p-typeprint.c: Fix indentation. * p-valprint.c: Fix indentation. * parse.c: Fix indentation. * ppc-linux-nat.c: Fix indentation. * ppc-linux-tdep.c: Fix indentation. * ppc-nbsd-nat.c: Fix indentation. * ppc-nbsd-tdep.c: Fix indentation. * ppc-obsd-nat.c: Fix indentation. * ppc-ravenscar-thread.c: Fix indentation. * ppc-sysv-tdep.c: Fix indentation. * ppc64-tdep.c: Fix indentation. * printcmd.c: Fix indentation. * proc-api.c: Fix indentation. * producer.c: Fix indentation. * producer.h: Fix indentation. * prologue-value.c: Fix indentation. * prologue-value.h: Fix indentation. * psymtab.c: Fix indentation. * python/py-arch.c: Fix indentation. * python/py-bpevent.c: Fix indentation. * python/py-event.c: Fix indentation. * python/py-event.h: Fix indentation. * python/py-finishbreakpoint.c: Fix indentation. * python/py-frame.c: Fix indentation. * python/py-framefilter.c: Fix indentation. * python/py-inferior.c: Fix indentation. * python/py-infthread.c: Fix indentation. * python/py-objfile.c: Fix indentation. * python/py-prettyprint.c: Fix indentation. * python/py-registers.c: Fix indentation. * python/py-signalevent.c: Fix indentation. * python/py-stopevent.c: Fix indentation. * python/py-stopevent.h: Fix indentation. * python/py-threadevent.c: Fix indentation. * python/py-tui.c: Fix indentation. * python/py-unwind.c: Fix indentation. * python/py-value.c: Fix indentation. * python/py-xmethods.c: Fix indentation. * python/python-internal.h: Fix indentation. * python/python.c: Fix indentation. * ravenscar-thread.c: Fix indentation. * record-btrace.c: Fix indentation. * record-full.c: Fix indentation. * record.c: Fix indentation. * reggroups.c: Fix indentation. * regset.h: Fix indentation. * remote-fileio.c: Fix indentation. * remote.c: Fix indentation. * reverse.c: Fix indentation. * riscv-linux-tdep.c: Fix indentation. * riscv-ravenscar-thread.c: Fix indentation. * riscv-tdep.c: Fix indentation. * rl78-tdep.c: Fix indentation. * rs6000-aix-tdep.c: Fix indentation. * rs6000-lynx178-tdep.c: Fix indentation. * rs6000-nat.c: Fix indentation. * rs6000-tdep.c: Fix indentation. * rust-lang.c: Fix indentation. * rx-tdep.c: Fix indentation. * s12z-tdep.c: Fix indentation. * s390-linux-tdep.c: Fix indentation. * score-tdep.c: Fix indentation. * ser-base.c: Fix indentation. * ser-mingw.c: Fix indentation. * ser-uds.c: Fix indentation. * ser-unix.c: Fix indentation. * serial.c: Fix indentation. * sh-linux-tdep.c: Fix indentation. * sh-nbsd-tdep.c: Fix indentation. * sh-tdep.c: Fix indentation. * skip.c: Fix indentation. * sol-thread.c: Fix indentation. * solib-aix.c: Fix indentation. * solib-darwin.c: Fix indentation. * solib-frv.c: Fix indentation. * solib-svr4.c: Fix indentation. * solib.c: Fix indentation. * source.c: Fix indentation. * sparc-linux-tdep.c: Fix indentation. * sparc-nbsd-tdep.c: Fix indentation. * sparc-obsd-tdep.c: Fix indentation. * sparc-ravenscar-thread.c: Fix indentation. * sparc-tdep.c: Fix indentation. * sparc64-linux-tdep.c: Fix indentation. * sparc64-nbsd-tdep.c: Fix indentation. * sparc64-obsd-tdep.c: Fix indentation. * sparc64-tdep.c: Fix indentation. * stabsread.c: Fix indentation. * stack.c: Fix indentation. * stap-probe.c: Fix indentation. * stubs/ia64vms-stub.c: Fix indentation. * stubs/m32r-stub.c: Fix indentation. * stubs/m68k-stub.c: Fix indentation. * stubs/sh-stub.c: Fix indentation. * stubs/sparc-stub.c: Fix indentation. * symfile-mem.c: Fix indentation. * symfile.c: Fix indentation. * symfile.h: Fix indentation. * symmisc.c: Fix indentation. * symtab.c: Fix indentation. * symtab.h: Fix indentation. * target-float.c: Fix indentation. * target.c: Fix indentation. * target.h: Fix indentation. * tic6x-tdep.c: Fix indentation. * tilegx-linux-tdep.c: Fix indentation. * tilegx-tdep.c: Fix indentation. * top.c: Fix indentation. * tracefile-tfile.c: Fix indentation. * tracepoint.c: Fix indentation. * tui/tui-disasm.c: Fix indentation. * tui/tui-io.c: Fix indentation. * tui/tui-regs.c: Fix indentation. * tui/tui-stack.c: Fix indentation. * tui/tui-win.c: Fix indentation. * tui/tui-winsource.c: Fix indentation. * tui/tui.c: Fix indentation. * typeprint.c: Fix indentation. * ui-out.h: Fix indentation. * unittests/copy_bitwise-selftests.c: Fix indentation. * unittests/memory-map-selftests.c: Fix indentation. * utils.c: Fix indentation. * v850-tdep.c: Fix indentation. * valarith.c: Fix indentation. * valops.c: Fix indentation. * valprint.c: Fix indentation. * valprint.h: Fix indentation. * value.c: Fix indentation. * value.h: Fix indentation. * varobj.c: Fix indentation. * vax-tdep.c: Fix indentation. * windows-nat.c: Fix indentation. * windows-tdep.c: Fix indentation. * xcoffread.c: Fix indentation. * xml-syscall.c: Fix indentation. * xml-tdesc.c: Fix indentation. * xstormy16-tdep.c: Fix indentation. * xtensa-config.c: Fix indentation. * xtensa-linux-nat.c: Fix indentation. * xtensa-linux-tdep.c: Fix indentation. * xtensa-tdep.c: Fix indentation. gdbserver/ChangeLog: * ax.cc: Fix indentation. * dll.cc: Fix indentation. * inferiors.h: Fix indentation. * linux-low.cc: Fix indentation. * linux-nios2-low.cc: Fix indentation. * linux-ppc-ipa.cc: Fix indentation. * linux-ppc-low.cc: Fix indentation. * linux-x86-low.cc: Fix indentation. * linux-xtensa-low.cc: Fix indentation. * regcache.cc: Fix indentation. * server.cc: Fix indentation. * tracepoint.cc: Fix indentation. gdbsupport/ChangeLog: * common-exceptions.h: Fix indentation. * event-loop.cc: Fix indentation. * fileio.cc: Fix indentation. * filestuff.cc: Fix indentation. * gdb-dlfcn.cc: Fix indentation. * gdb_string_view.h: Fix indentation. * job-control.cc: Fix indentation. * signals.cc: Fix indentation. Change-Id: I4bad7ae6be0fbe14168b8ebafb98ffe14964a695
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/abbrev.c12
-rw-r--r--gdb/dwarf2/attribute.c2
-rw-r--r--gdb/dwarf2/expr.c34
-rw-r--r--gdb/dwarf2/frame.c110
-rw-r--r--gdb/dwarf2/index-cache.c6
-rw-r--r--gdb/dwarf2/index-write.c8
-rw-r--r--gdb/dwarf2/line-header.c14
-rw-r--r--gdb/dwarf2/loc.c12
-rw-r--r--gdb/dwarf2/macro.c224
-rw-r--r--gdb/dwarf2/read.c690
-rw-r--r--gdb/dwarf2/read.h4
11 files changed, 558 insertions, 558 deletions
diff --git a/gdb/dwarf2/abbrev.c b/gdb/dwarf2/abbrev.c
index 1552594..86789e5 100644
--- a/gdb/dwarf2/abbrev.c
+++ b/gdb/dwarf2/abbrev.c
@@ -165,12 +165,12 @@ abbrev_table::read (struct objfile *objfile,
abbrev_table->add_abbrev (cur_abbrev);
/* Get next abbreviation.
- Under Irix6 the abbreviations for a compilation unit are not
- always properly terminated with an abbrev number of 0.
- Exit loop if we encounter an abbreviation which we have
- already read (which means we are about to read the abbreviations
- for the next compile unit) or if the end of the abbreviation
- table is reached. */
+ Under Irix6 the abbreviations for a compilation unit are not
+ always properly terminated with an abbrev number of 0.
+ Exit loop if we encounter an abbreviation which we have
+ already read (which means we are about to read the abbreviations
+ for the next compile unit) or if the end of the abbreviation
+ table is reached. */
if ((unsigned int) (abbrev_ptr - section->buffer) >= section->size)
break;
abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
diff --git a/gdb/dwarf2/attribute.c b/gdb/dwarf2/attribute.c
index 0bbd0da..9596158 100644
--- a/gdb/dwarf2/attribute.c
+++ b/gdb/dwarf2/attribute.c
@@ -107,7 +107,7 @@ bool
attribute::form_is_section_offset () const
{
return (form == DW_FORM_data4
- || form == DW_FORM_data8
+ || form == DW_FORM_data8
|| form == DW_FORM_sec_offset
|| form == DW_FORM_loclistx);
}
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c
index ab511d5..eaeb76f 100644
--- a/gdb/dwarf2/expr.c
+++ b/gdb/dwarf2/expr.c
@@ -859,8 +859,8 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
stack.clear ();
/* FIXME: cagney/2003-03-26: This code should be using
- get_frame_base_address(), and then implement a dwarf2
- specific this_base method. */
+ get_frame_base_address(), and then implement a dwarf2
+ specific this_base method. */
this->get_frame_base (&datastart, &datalen);
eval (datastart, datalen);
if (this->location == DWARF_VALUE_MEMORY)
@@ -1040,7 +1040,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
break;
case DW_OP_div:
result_val = value_binop (first, second, BINOP_DIV);
- break;
+ break;
case DW_OP_minus:
result_val = value_binop (first, second, BINOP_SUB);
break;
@@ -1100,7 +1100,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
with. */
if (value_type (result_val) != value_type (second))
result_val = value_cast (value_type (second), result_val);
- break;
+ break;
case DW_OP_shra:
dwarf_require_integral (value_type (first));
dwarf_require_integral (value_type (second));
@@ -1202,38 +1202,38 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
case DW_OP_nop:
goto no_push;
- case DW_OP_piece:
- {
- uint64_t size;
+ case DW_OP_piece:
+ {
+ uint64_t size;
- /* Record the piece. */
- op_ptr = safe_read_uleb128 (op_ptr, op_end, &size);
+ /* Record the piece. */
+ op_ptr = safe_read_uleb128 (op_ptr, op_end, &size);
add_piece (8 * size, 0);
- /* Pop off the address/regnum, and reset the location
+ /* Pop off the address/regnum, and reset the location
type. */
if (this->location != DWARF_VALUE_LITERAL
&& this->location != DWARF_VALUE_OPTIMIZED_OUT)
pop ();
- this->location = DWARF_VALUE_MEMORY;
- }
- goto no_push;
+ this->location = DWARF_VALUE_MEMORY;
+ }
+ goto no_push;
case DW_OP_bit_piece:
{
uint64_t size, uleb_offset;
- /* Record the piece. */
+ /* Record the piece. */
op_ptr = safe_read_uleb128 (op_ptr, op_end, &size);
op_ptr = safe_read_uleb128 (op_ptr, op_end, &uleb_offset);
add_piece (size, uleb_offset);
- /* Pop off the address/regnum, and reset the location
+ /* Pop off the address/regnum, and reset the location
type. */
if (this->location != DWARF_VALUE_LITERAL
&& this->location != DWARF_VALUE_OPTIMIZED_OUT)
pop ();
- this->location = DWARF_VALUE_MEMORY;
+ this->location = DWARF_VALUE_MEMORY;
}
goto no_push;
@@ -1267,7 +1267,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
{
sect_offset sect_off
= (sect_offset) extract_unsigned_integer (op_ptr,
- this->ref_addr_size,
+ this->ref_addr_size,
byte_order);
op_ptr += this->ref_addr_size;
result_val = value_cast (address_type,
diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c
index a8748e4..a577a67 100644
--- a/gdb/dwarf2/frame.c
+++ b/gdb/dwarf2/frame.c
@@ -492,7 +492,7 @@ bad CFI data; mismatched DW_CFA_restore_state at %s"),
case DW_CFA_def_cfa_register:
insn_ptr = safe_read_uleb128 (insn_ptr, insn_end, &reg);
fs->regs.cfa_reg = dwarf2_frame_adjust_regnum (gdbarch, reg,
- eh_frame_p);
+ eh_frame_p);
fs->regs.cfa_how = CFA_REG_OFFSET;
break;
@@ -569,7 +569,7 @@ bad CFI data; mismatched DW_CFA_restore_state at %s"),
case DW_CFA_def_cfa_sf:
insn_ptr = safe_read_uleb128 (insn_ptr, insn_end, &reg);
fs->regs.cfa_reg = dwarf2_frame_adjust_regnum (gdbarch, reg,
- eh_frame_p);
+ eh_frame_p);
insn_ptr = safe_read_sleb128 (insn_ptr, insn_end, &offset);
fs->regs.cfa_offset = offset * fs->data_align;
fs->regs.cfa_how = CFA_REG_OFFSET;
@@ -1159,12 +1159,12 @@ incomplete CFI data; unspecified registers (e.g., %s) at %s"),
ULONGEST retaddr_column = fs.retaddr_column;
/* It seems rather bizarre to specify an "empty" column as
- the return adress column. However, this is exactly
- what GCC does on some targets. It turns out that GCC
- assumes that the return address can be found in the
- register corresponding to the return address column.
- Incidentally, that's how we should treat a return
- address column specifying "same value" too. */
+ the return adress column. However, this is exactly
+ what GCC does on some targets. It turns out that GCC
+ assumes that the return address can be found in the
+ register corresponding to the return address column.
+ Incidentally, that's how we should treat a return
+ address column specifying "same value" too. */
if (fs.retaddr_column < fs.regs.reg.size ()
&& regs[retaddr_column].how != DWARF2_FRAME_REG_UNSPECIFIED
&& regs[retaddr_column].how != DWARF2_FRAME_REG_SAME_VALUE)
@@ -1461,13 +1461,13 @@ dwarf2_frame_cfa (struct frame_info *this_frame)
this_frame = get_prev_frame (this_frame);
if (get_frame_unwind_stop_reason (this_frame) == UNWIND_UNAVAILABLE)
throw_error (NOT_AVAILABLE_ERROR,
- _("can't compute CFA for this frame: "
- "required registers or memory are unavailable"));
+ _("can't compute CFA for this frame: "
+ "required registers or memory are unavailable"));
if (get_frame_id (this_frame).stack_status != FID_STACK_VALID)
throw_error (NOT_AVAILABLE_ERROR,
- _("can't compute CFA for this frame: "
- "frame base not available"));
+ _("can't compute CFA for this frame: "
+ "frame base not available"));
return get_frame_base (this_frame);
}
@@ -1684,19 +1684,19 @@ dwarf2_frame_find_fde (CORE_ADDR *pc, dwarf2_per_objfile **out_per_objfile)
gdb_assert (!fde_table->empty ());
if (*pc < offset + (*fde_table)[0]->initial_location)
- continue;
+ continue;
seek_pc = *pc - offset;
auto it = gdb::binary_search (fde_table->begin (), fde_table->end (),
seek_pc, bsearch_fde_cmp);
if (it != fde_table->end ())
- {
- *pc = (*it)->initial_location + offset;
+ {
+ *pc = (*it)->initial_location + offset;
if (out_per_objfile != nullptr)
*out_per_objfile = get_dwarf2_per_objfile (objfile);
- return *it;
- }
+ return *it;
+ }
}
return NULL;
}
@@ -1739,9 +1739,9 @@ static const gdb_byte *
decode_frame_entry_1 (struct gdbarch *gdbarch,
struct comp_unit *unit, const gdb_byte *start,
int eh_frame_p,
- dwarf2_cie_table &cie_table,
- dwarf2_fde_table *fde_table,
- enum eh_frame_type entry_type)
+ dwarf2_cie_table &cie_table,
+ dwarf2_fde_table *fde_table,
+ enum eh_frame_type entry_type)
{
const gdb_byte *buf, *end;
ULONGEST length;
@@ -1809,7 +1809,7 @@ decode_frame_entry_1 (struct gdbarch *gdbarch,
cie->cie_pointer = cie_pointer;
/* The encoding for FDE's in a normal .debug_frame section
- depends on the target address size. */
+ depends on the target address size. */
cie->encoding = DW_EH_PE_absptr;
/* We'll determine the final value later, but we need to
@@ -1833,8 +1833,8 @@ decode_frame_entry_1 (struct gdbarch *gdbarch,
augmentation += strlen (augmentation);
/* The GCC 2.x "eh" augmentation has a pointer immediately
- following the augmentation string, so it must be handled
- first. */
+ following the augmentation string, so it must be handled
+ first. */
if (augmentation[0] == 'e' && augmentation[1] == 'h')
{
/* Skip. */
@@ -2043,8 +2043,8 @@ decode_frame_entry (struct gdbarch *gdbarch,
struct comp_unit *unit, const gdb_byte *start,
int eh_frame_p,
dwarf2_cie_table &cie_table,
- dwarf2_fde_table *fde_table,
- enum eh_frame_type entry_type)
+ dwarf2_fde_table *fde_table,
+ enum eh_frame_type entry_type)
{
enum { NONE, ALIGN4, ALIGN8, FAIL } workaround = NONE;
const gdb_byte *ret;
@@ -2139,13 +2139,13 @@ fde_is_less_than (const dwarf2_fde *aa, const dwarf2_fde *bb)
if (aa->initial_location == bb->initial_location)
{
if (aa->address_range != bb->address_range
- && aa->eh_frame_p == 0 && bb->eh_frame_p == 0)
- /* Linker bug, e.g. gold/10400.
- Work around it by keeping stable sort order. */
- return aa < bb;
+ && aa->eh_frame_p == 0 && bb->eh_frame_p == 0)
+ /* Linker bug, e.g. gold/10400.
+ Work around it by keeping stable sort order. */
+ return aa < bb;
else
- /* Put eh_frame entries after debug_frame ones. */
- return aa->eh_frame_p < bb->eh_frame_p;
+ /* Put eh_frame entries after debug_frame ones. */
+ return aa->eh_frame_p < bb->eh_frame_p;
}
return aa->initial_location < bb->initial_location;
@@ -2166,28 +2166,28 @@ dwarf2_build_frame_info (struct objfile *objfile)
if (objfile->separate_debug_objfile_backlink == NULL)
{
/* Do not read .eh_frame from separate file as they must be also
- present in the main file. */
+ present in the main file. */
dwarf2_get_section_info (objfile, DWARF2_EH_FRAME,
- &unit->dwarf_frame_section,
- &unit->dwarf_frame_buffer,
- &unit->dwarf_frame_size);
+ &unit->dwarf_frame_section,
+ &unit->dwarf_frame_buffer,
+ &unit->dwarf_frame_size);
if (unit->dwarf_frame_size)
- {
- asection *got, *txt;
-
- /* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base
- that is used for the i386/amd64 target, which currently is
- the only target in GCC that supports/uses the
- DW_EH_PE_datarel encoding. */
- got = bfd_get_section_by_name (unit->abfd, ".got");
- if (got)
- unit->dbase = got->vma;
-
- /* GCC emits the DW_EH_PE_textrel encoding type on sh and ia64
- so far. */
- txt = bfd_get_section_by_name (unit->abfd, ".text");
- if (txt)
- unit->tbase = txt->vma;
+ {
+ asection *got, *txt;
+
+ /* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base
+ that is used for the i386/amd64 target, which currently is
+ the only target in GCC that supports/uses the
+ DW_EH_PE_datarel encoding. */
+ got = bfd_get_section_by_name (unit->abfd, ".got");
+ if (got)
+ unit->dbase = got->vma;
+
+ /* GCC emits the DW_EH_PE_textrel encoding type on sh and ia64
+ so far. */
+ txt = bfd_get_section_by_name (unit->abfd, ".text");
+ if (txt)
+ unit->tbase = txt->vma;
try
{
@@ -2209,13 +2209,13 @@ dwarf2_build_frame_info (struct objfile *objfile)
}
cie_table.clear ();
- }
+ }
}
dwarf2_get_section_info (objfile, DWARF2_DEBUG_FRAME,
- &unit->dwarf_frame_section,
- &unit->dwarf_frame_buffer,
- &unit->dwarf_frame_size);
+ &unit->dwarf_frame_section,
+ &unit->dwarf_frame_buffer,
+ &unit->dwarf_frame_size);
if (unit->dwarf_frame_size)
{
size_t num_old_fde_entries = fde_table.size ();
diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
index 38cbc54..e91e507 100644
--- a/gdb/dwarf2/index-cache.c
+++ b/gdb/dwarf2/index-cache.c
@@ -144,11 +144,11 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
}
if (debug_index_cache)
- printf_unfiltered ("index cache: writing index cache for objfile %s\n",
+ printf_unfiltered ("index cache: writing index cache for objfile %s\n",
objfile_name (obj));
/* Write the index itself to the directory, using the build id as the
- filename. */
+ filename. */
write_psymtabs_to_index (per_objfile, m_dir.c_str (),
build_id_str.c_str (), dwz_build_id_ptr,
dw_index_kind::GDB_INDEX);
@@ -198,7 +198,7 @@ index_cache::lookup_gdb_index (const bfd_build_id *build_id,
try
{
if (debug_index_cache)
- printf_unfiltered ("index cache: trying to read %s\n",
+ printf_unfiltered ("index cache: trying to read %s\n",
filename.c_str ());
/* Try to map that file. */
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index e6188f7..4881105 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -57,7 +57,7 @@
#define DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE(cu_index, value) \
do { \
gdb_assert ((value) >= GDB_INDEX_SYMBOL_KIND_TYPE \
- && (value) <= GDB_INDEX_SYMBOL_KIND_OTHER); \
+ && (value) <= GDB_INDEX_SYMBOL_KIND_OTHER); \
GDB_INDEX_SYMBOL_KIND_SET_VALUE((cu_index), (value)); \
} while (0)
@@ -594,7 +594,7 @@ write_psymbols (struct mapped_symtab *symtab,
struct signatured_type_index_data
{
signatured_type_index_data (data_buf &types_list_,
- std::unordered_set<partial_symbol *> &psyms_seen_)
+ std::unordered_set<partial_symbol *> &psyms_seen_)
: types_list (types_list_), psyms_seen (psyms_seen_)
{}
@@ -941,7 +941,7 @@ public:
{
public:
write_one_signatured_type_data (debug_names &nametable_,
- signatured_type_index_data &&info_)
+ signatured_type_index_data &&info_)
: nametable (nametable_), info (std::move (info_))
{}
debug_names &nametable;
@@ -1069,7 +1069,7 @@ private:
symbol_value (int dwarf_tag_, int cu_index_, bool is_static_,
unit_kind kind_)
: dwarf_tag (dwarf_tag_), cu_index (cu_index_), is_static (is_static_),
- kind (kind_)
+ kind (kind_)
{}
bool
diff --git a/gdb/dwarf2/line-header.c b/gdb/dwarf2/line-header.c
index 6c67f2b..3d38e07 100644
--- a/gdb/dwarf2/line-header.c
+++ b/gdb/dwarf2/line-header.c
@@ -32,9 +32,9 @@ line_header::add_include_dir (const char *include_dir)
{
size_t new_size;
if (version >= 5)
- new_size = m_include_dirs.size ();
+ new_size = m_include_dirs.size ();
else
- new_size = m_include_dirs.size () + 1;
+ new_size = m_include_dirs.size () + 1;
fprintf_unfiltered (gdb_stdlog, "Adding dir %zu: %s\n",
new_size, include_dir);
}
@@ -51,9 +51,9 @@ line_header::add_file_name (const char *name,
{
size_t new_size;
if (version >= 5)
- new_size = file_names_size ();
+ new_size = file_names_size ();
else
- new_size = file_names_size () + 1;
+ new_size = file_names_size () + 1;
fprintf_unfiltered (gdb_stdlog, "Adding file %zu: %s\n",
new_size, name);
}
@@ -82,15 +82,15 @@ line_header::file_file_name (int file) const
else
{
/* The compiler produced a bogus file number. We can at least
- record the macro definitions made in the file, even if we
- won't be able to find the file by name. */
+ record the macro definitions made in the file, even if we
+ won't be able to find the file by name. */
char fake_name[80];
xsnprintf (fake_name, sizeof (fake_name),
"<bad macro file number %d>", file);
complaint (_("bad file number in macro information (%d)"),
- file);
+ file);
return make_unique_xstrdup (fake_name);
}
diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c
index c18ac70..86d0ca4 100644
--- a/gdb/dwarf2/loc.c
+++ b/gdb/dwarf2/loc.c
@@ -1590,7 +1590,7 @@ value_of_dwarf_block_entry (struct type *type, struct frame_info *frame,
if (dwarf_block_to_fb_offset (block, block + block_len, &kind_u.fb_offset))
return value_of_dwarf_reg_entry (type, frame, CALL_SITE_PARAMETER_FB_OFFSET,
- kind_u);
+ kind_u);
/* This can normally happen - throw NO_ENTRY_VALUE_ERROR to get the message
suppressed during normal operation. The expression can be arbitrary if
@@ -3556,7 +3556,7 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
case DW_OP_nop:
break;
- case DW_OP_piece:
+ case DW_OP_piece:
case DW_OP_bit_piece:
{
uint64_t size;
@@ -3565,7 +3565,7 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
error (_("Cannot translate empty pieces to agent expressions"));
previous_piece = op_ptr - 1;
- op_ptr = safe_read_uleb128 (op_ptr, op_end, &size);
+ op_ptr = safe_read_uleb128 (op_ptr, op_end, &size);
if (op == DW_OP_piece)
{
size *= 8;
@@ -3857,7 +3857,7 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream,
64-bit LE machine):
DW_AT_location : 10 byte block: 3 4 0 0 0 0 0 0 0 e0
- (DW_OP_addr: 4; DW_OP_GNU_push_tls_address)
+ (DW_OP_addr: 4; DW_OP_GNU_push_tls_address)
0x3 is the encoding for DW_OP_addr, which has an operand as long
as the size of an address on the target machine (here is 8
@@ -3889,7 +3889,7 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream,
/* With -gsplit-dwarf a TLS variable can also look like this:
DW_AT_location : 3 byte block: fc 4 e0
- (DW_OP_GNU_const_index: 4;
+ (DW_OP_GNU_const_index: 4;
DW_OP_GNU_push_tls_address) */
else if (data + 3 <= end
&& data + 1 + (leb128_size = skip_leb128 (data + 1, end)) < end
@@ -4166,7 +4166,7 @@ disassemble_dwarf_expression (struct ui_file *stream,
fprintf_filtered (stream, " offset %s", phex_nz (ul, offset_size));
break;
- case DW_OP_piece:
+ case DW_OP_piece:
data = safe_read_uleb128 (data, end, &ul);
fprintf_filtered (stream, " %s (bytes)", pulongest (ul));
break;
diff --git a/gdb/dwarf2/macro.c b/gdb/dwarf2/macro.c
index 9208614..bafb8aa 100644
--- a/gdb/dwarf2/macro.c
+++ b/gdb/dwarf2/macro.c
@@ -47,8 +47,8 @@ dwarf2_macro_malformed_definition_complaint (const char *arg1)
static struct macro_source_file *
macro_start_file (buildsym_compunit *builder,
int file, int line,
- struct macro_source_file *current_file,
- const struct line_header *lh)
+ struct macro_source_file *current_file,
+ const struct line_header *lh)
{
/* File name relative to the compilation directory of this source file. */
gdb::unique_xmalloc_ptr<char> file_name = lh->file_file_name (file);
@@ -80,7 +80,7 @@ consume_improper_spaces (const char *p, const char *body)
body);
while (*p == ' ')
- p++;
+ p++;
}
return p;
@@ -89,20 +89,20 @@ consume_improper_spaces (const char *p, const char *body)
static void
parse_macro_definition (struct macro_source_file *file, int line,
- const char *body)
+ const char *body)
{
const char *p;
/* The body string takes one of two forms. For object-like macro
definitions, it should be:
- <macro name> " " <definition>
+ <macro name> " " <definition>
For function-like macro definitions, it should be:
- <macro name> "() " <definition>
+ <macro name> "() " <definition>
or
- <macro name> "(" <arg name> ( "," <arg name> ) * ") " <definition>
+ <macro name> "(" <arg name> ( "," <arg name> ) * ") " <definition>
Spaces may appear only where explicitly indicated, and in the
<definition>.
@@ -132,12 +132,12 @@ parse_macro_definition (struct macro_source_file *file, int line,
const char *replacement;
if (*p == ' ')
- replacement = body + name_len + 1;
+ replacement = body + name_len + 1;
else
- {
+ {
dwarf2_macro_malformed_definition_complaint (body);
- replacement = body + name_len;
- }
+ replacement = body + name_len;
+ }
macro_define_object (file, line, name.c_str (), replacement);
}
@@ -155,68 +155,68 @@ parse_macro_definition (struct macro_source_file *file, int line,
/* Parse the formal argument list. */
while (*p && *p != ')')
- {
- /* Find the extent of the current argument name. */
- const char *arg_start = p;
+ {
+ /* Find the extent of the current argument name. */
+ const char *arg_start = p;
- while (*p && *p != ',' && *p != ')' && *p != ' ')
- p++;
+ while (*p && *p != ',' && *p != ')' && *p != ' ')
+ p++;
- if (! *p || p == arg_start)
+ if (! *p || p == arg_start)
dwarf2_macro_malformed_definition_complaint (body);
- else
- {
- /* Make sure argv has room for the new argument. */
- if (argc >= argv_size)
- {
- argv_size *= 2;
- argv = XRESIZEVEC (char *, argv, argv_size);
- }
-
- argv[argc++] = savestring (arg_start, p - arg_start);
- }
+ else
+ {
+ /* Make sure argv has room for the new argument. */
+ if (argc >= argv_size)
+ {
+ argv_size *= 2;
+ argv = XRESIZEVEC (char *, argv, argv_size);
+ }
+
+ argv[argc++] = savestring (arg_start, p - arg_start);
+ }
- p = consume_improper_spaces (p, body);
+ p = consume_improper_spaces (p, body);
- /* Consume the comma, if present. */
- if (*p == ',')
- {
- p++;
+ /* Consume the comma, if present. */
+ if (*p == ',')
+ {
+ p++;
- p = consume_improper_spaces (p, body);
- }
- }
+ p = consume_improper_spaces (p, body);
+ }
+ }
if (*p == ')')
- {
- p++;
-
- if (*p == ' ')
- /* Perfectly formed definition, no complaints. */
- macro_define_function (file, line, name.c_str (),
- argc, (const char **) argv,
- p + 1);
- else if (*p == '\0')
- {
- /* Complain, but do define it. */
+ {
+ p++;
+
+ if (*p == ' ')
+ /* Perfectly formed definition, no complaints. */
+ macro_define_function (file, line, name.c_str (),
+ argc, (const char **) argv,
+ p + 1);
+ else if (*p == '\0')
+ {
+ /* Complain, but do define it. */
dwarf2_macro_malformed_definition_complaint (body);
- macro_define_function (file, line, name.c_str (),
- argc, (const char **) argv,
- p);
- }
- else
- /* Just complain. */
+ macro_define_function (file, line, name.c_str (),
+ argc, (const char **) argv,
+ p);
+ }
+ else
+ /* Just complain. */
dwarf2_macro_malformed_definition_complaint (body);
- }
+ }
else
- /* Just complain. */
+ /* Just complain. */
dwarf2_macro_malformed_definition_complaint (body);
{
- int i;
+ int i;
- for (i = 0; i < argc; i++)
- xfree (argv[i]);
+ for (i = 0; i < argc; i++)
+ xfree (argv[i]);
}
xfree (argv);
}
@@ -477,16 +477,16 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile,
case 0:
break;
- case DW_MACRO_define:
- case DW_MACRO_undef:
+ case DW_MACRO_define:
+ case DW_MACRO_undef:
case DW_MACRO_define_strp:
case DW_MACRO_undef_strp:
case DW_MACRO_define_sup:
case DW_MACRO_undef_sup:
- {
- unsigned int bytes_read;
- int line;
- const char *body;
+ {
+ unsigned int bytes_read;
+ int line;
+ const char *body;
int is_define;
line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
@@ -522,7 +522,7 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile,
is_define = (macinfo_type == DW_MACRO_define
|| macinfo_type == DW_MACRO_define_strp
|| macinfo_type == DW_MACRO_define_sup);
- if (! current_file)
+ if (! current_file)
{
/* DWARF violation as no main source is present. */
complaint (_("debug info with no main source gives macro %s "
@@ -561,8 +561,8 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile,
|| macinfo_type == DW_MACRO_undef_sup);
macro_undef (current_file, line, body);
}
- }
- break;
+ }
+ break;
case DW_MACRO_define_strx:
case DW_MACRO_undef_strx:
@@ -611,15 +611,15 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile,
}
break;
- case DW_MACRO_start_file:
- {
- unsigned int bytes_read;
- int line, file;
+ case DW_MACRO_start_file:
+ {
+ unsigned 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;
+ 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;
if ((line == 0 && !at_commandline)
|| (line != 0 && at_commandline))
@@ -637,45 +637,45 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile,
else
current_file = macro_start_file (builder, file, line,
current_file, lh);
- }
- break;
+ }
+ break;
- case DW_MACRO_end_file:
- if (! current_file)
+ case DW_MACRO_end_file:
+ if (! current_file)
complaint (_("macro debug info has an unmatched "
"`close_file' directive"));
- else
- {
- current_file = current_file->included_by;
- if (! current_file)
- {
- enum dwarf_macro_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)
- {
+ else
+ {
+ current_file = current_file->included_by;
+ if (! current_file)
+ {
+ enum dwarf_macro_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)
+ {
section->overflow_complaint ();
- return;
- }
+ return;
+ }
- /* We don't increment mac_ptr here, so this is just
- a look-ahead. */
- next_type
+ /* We don't increment mac_ptr here, so this is just
+ a look-ahead. */
+ next_type
= (enum dwarf_macro_record_type) read_1_byte (abfd,
mac_ptr);
- if (next_type != 0)
+ if (next_type != 0)
complaint (_("no terminating 0-type entry for "
"macros in `.debug_macinfo' section"));
- return;
- }
- }
- break;
+ return;
+ }
+ }
+ break;
case DW_MACRO_import:
case DW_MACRO_import_sup:
@@ -729,7 +729,7 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile,
}
break;
- case DW_MACINFO_vendor_ext:
+ case DW_MACINFO_vendor_ext:
if (!section_is_gnu)
{
unsigned int bytes_read;
@@ -753,7 +753,7 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile,
if (mac_ptr == NULL)
return;
break;
- }
+ }
DIAGNOSTIC_POP
} while (macinfo_type != 0);
}
@@ -802,12 +802,12 @@ dwarf_decode_macros (dwarf2_per_objfile *per_objfile,
{
/* Do we at least have room for a macinfo type byte? */
if (mac_ptr >= mac_end)
- {
+ {
/* Complaint is printed during the second pass as GDB will probably
stop the first pass earlier upon finding
DW_MACINFO_start_file. */
break;
- }
+ }
macinfo_type = (enum dwarf_macro_record_type) read_1_byte (abfd, mac_ptr);
mac_ptr++;
@@ -817,10 +817,10 @@ dwarf_decode_macros (dwarf2_per_objfile *per_objfile,
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
switch (macinfo_type)
- {
- /* A zero macinfo type indicates the end of the macro
- information. */
- case 0:
+ {
+ /* A zero macinfo type indicates the end of the macro
+ information. */
+ case 0:
break;
case DW_MACRO_define:
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 19131da..7d258f3 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -1337,12 +1337,12 @@ static struct attribute *dwarf2_attr (struct die_info *, unsigned int,
struct dwarf2_cu *);
static const char *dwarf2_string_attr (struct die_info *die, unsigned int name,
- struct dwarf2_cu *cu);
+ struct dwarf2_cu *cu);
static const char *dwarf2_dwo_name (struct die_info *die, struct dwarf2_cu *cu);
static int dwarf2_flag_true_p (struct die_info *die, unsigned name,
- struct dwarf2_cu *cu);
+ struct dwarf2_cu *cu);
static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu);
@@ -1446,7 +1446,7 @@ static void get_scope_pc_bounds (struct die_info *,
struct dwarf2_cu *);
static void dwarf2_record_block_ranges (struct die_info *, struct block *,
- CORE_ADDR, struct dwarf2_cu *);
+ CORE_ADDR, struct dwarf2_cu *);
static void dwarf2_add_field (struct field_info *, struct die_info *,
struct dwarf2_cu *);
@@ -1892,7 +1892,7 @@ dwarf2_per_objfile::set_symtab (const dwarf2_per_cu_data *per_cu,
int
dwarf2_has_info (struct objfile *objfile,
- const struct dwarf2_debug_sections *names,
+ const struct dwarf2_debug_sections *names,
bool can_copy)
{
if (objfile->flags & OBJF_READNEVER)
@@ -1905,7 +1905,7 @@ dwarf2_has_info (struct objfile *objfile,
dwarf2_per_bfd *per_bfd;
/* We can share a "dwarf2_per_bfd" with other objfiles if the BFD
- doesn't require relocations and if there aren't partial symbols
+ doesn't require relocations and if there aren't partial symbols
from some other reader. */
if (!objfile_has_partial_symbols (objfile)
&& !gdb_bfd_requires_relocations (objfile->obfd))
@@ -1941,7 +1941,7 @@ dwarf2_has_info (struct objfile *objfile,
static int
section_is_p (const char *section_name,
- const struct dwarf2_section_names *names)
+ const struct dwarf2_section_names *names)
{
if (names->normal != NULL
&& strcmp (section_name, names->normal) == 0)
@@ -2083,9 +2083,9 @@ dwarf2_per_bfd::locate_sections (bfd *abfd, asection *sectp,
void
dwarf2_get_section_info (struct objfile *objfile,
- enum dwarf2_section_enum sect,
- asection **sectp, const gdb_byte **bufp,
- bfd_size_type *sizep)
+ enum dwarf2_section_enum sect,
+ asection **sectp, const gdb_byte **bufp,
+ bfd_size_type *sizep)
{
dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
struct dwarf2_section_info *info;
@@ -2796,7 +2796,7 @@ create_addrmap_from_aranges (dwarf2_per_objfile *per_objfile,
if (addr + entry_length > section->buffer + section->size)
{
warning (_("Section .debug_aranges in %s entry at offset %s "
- "length %s exceeds section length %s, "
+ "length %s exceeds section length %s, "
"ignoring .debug_aranges."),
objfile_name (objfile),
plongest (entry_addr - section->buffer),
@@ -2857,11 +2857,11 @@ create_addrmap_from_aranges (dwarf2_per_objfile *per_objfile,
}
/* Must pad to an alignment boundary that is twice the address
- size. It is undocumented by the DWARF standard but GCC does
- use it. */
+ size. It is undocumented by the DWARF standard but GCC does
+ use it. */
for (size_t padding = ((-(addr - section->buffer))
& (2 * address_size - 1));
- padding > 0; padding--)
+ padding > 0; padding--)
if (*addr++ != 0)
{
warning (_("Section .debug_aranges in %s entry at offset %s "
@@ -2942,7 +2942,7 @@ find_slot_in_mapped_hash (struct mapped_index *index, const char *name,
indices for case insensitive languages are built in lowercase, therefore
simulate our NAME being searched is also lowercased. */
hash = mapped_index_string_hash ((index->version == 4
- && case_sensitivity == case_sensitive_off
+ && case_sensitivity == case_sensitive_off
? 5 : index->version),
name);
@@ -4134,7 +4134,7 @@ dw2_expand_symtabs_matching_symbol
= lang->get_symbol_name_matcher (lookup_name_without_params);
name_and_matcher key {
- name_matcher,
+ name_matcher,
lookup_name_without_params.language_lookup_name (lang_e)
};
@@ -6272,7 +6272,7 @@ private:
static void
dwarf2_create_include_psymtab (const char *name, dwarf2_psymtab *pst,
- struct objfile *objfile)
+ struct objfile *objfile)
{
dwarf2_include_psymtab *subpst = new dwarf2_include_psymtab (name, objfile);
@@ -7053,7 +7053,7 @@ cutu_reader::init_tu_and_read_dwo_dies (dwarf2_per_cu_data *this_cu,
else
{
/* If an existing_cu is provided, a dwarf2_cu must not exist for this_cu
- in per_objfile yet. */
+ in per_objfile yet. */
gdb_assert (per_objfile->get_cu (this_cu) == nullptr);
m_new_cu.reset (new dwarf2_cu (this_cu, per_objfile));
cu = m_new_cu.get ();
@@ -7144,7 +7144,7 @@ cutu_reader::cutu_reader (dwarf2_per_cu_data *this_cu,
else
{
/* If an existing_cu is provided, a dwarf2_cu must not exist for this_cu
- in per_objfile yet. */
+ in per_objfile yet. */
gdb_assert (per_objfile->get_cu (this_cu) == nullptr);
m_new_cu.reset (new dwarf2_cu (this_cu, per_objfile));
cu = m_new_cu.get ();
@@ -7284,7 +7284,7 @@ cutu_reader::keep ()
if (m_new_cu != NULL)
{
/* Save this dwarf2_cu in the per_objfile. The per_objfile owns it
- now. */
+ now. */
dwarf2_per_objfile *per_objfile = m_new_cu->per_objfile;
per_objfile->set_cu (m_this_cu, m_new_cu.release ());
}
@@ -8259,9 +8259,9 @@ scan_partial_symbols (struct partial_die_info *first_die, CORE_ADDR *lowpc,
add_partial_enumeration (pdi, cu);
break;
case DW_TAG_base_type:
- case DW_TAG_subrange_type:
+ case DW_TAG_subrange_type:
/* File scope base type definitions are added to the partial
- symbol table. */
+ symbol table. */
add_partial_symbol (pdi, cu);
break;
case DW_TAG_namespace:
@@ -8494,10 +8494,10 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
&& pdi->die_parent != NULL
&& pdi->die_parent->tag == DW_TAG_subprogram))
{
- /* Normally, only "external" DIEs are part of the global scope.
- But in Ada and Fortran, we want to be able to access nested
- procedures globally. So all Ada and Fortran subprograms are
- stored in the global scope. */
+ /* Normally, only "external" DIEs are part of the global scope.
+ But in Ada and Fortran, we want to be able to access nested
+ procedures globally. So all Ada and Fortran subprograms are
+ stored in the global scope. */
where = psymbol_placement::GLOBAL;
}
else
@@ -8587,8 +8587,8 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
break;
case DW_TAG_module:
/* With Fortran 77 there might be a "BLOCK DATA" module
- available without any name. If so, we skip the module as it
- doesn't bring any value. */
+ available without any name. If so, we skip the module as it
+ doesn't bring any value. */
if (actual_name != nullptr)
{
psymbol.domain = MODULE_DOMAIN;
@@ -8602,10 +8602,10 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
case DW_TAG_union_type:
case DW_TAG_enumeration_type:
/* Skip external references. The DWARF standard says in the section
- about "Structure, Union, and Class Type Entries": "An incomplete
- structure, union or class type is represented by a structure,
- union or class entry that does not have a byte size attribute
- and that has a DW_AT_declaration attribute." */
+ about "Structure, Union, and Class Type Entries": "An incomplete
+ structure, union or class type is represented by a structure,
+ union or class entry that does not have a byte size attribute
+ and that has a DW_AT_declaration attribute." */
if (!pdi->has_byte_size && pdi->is_declaration)
return;
@@ -8699,11 +8699,11 @@ add_partial_subprogram (struct partial_die_info *pdi,
if (pdi->tag == DW_TAG_subprogram || pdi->tag == DW_TAG_inlined_subroutine)
{
if (pdi->has_pc_info)
- {
- if (pdi->lowpc < *lowpc)
- *lowpc = pdi->lowpc;
- if (pdi->highpc > *highpc)
- *highpc = pdi->highpc;
+ {
+ if (pdi->lowpc < *lowpc)
+ *lowpc = pdi->lowpc;
+ if (pdi->highpc > *highpc)
+ *highpc = pdi->highpc;
if (set_addrmap)
{
struct objfile *objfile = cu->per_objfile->objfile;
@@ -8725,17 +8725,17 @@ add_partial_subprogram (struct partial_die_info *pdi,
this_lowpc, this_highpc - 1,
cu->per_cu->v.psymtab);
}
- }
+ }
if (pdi->has_pc_info || (!pdi->is_external && pdi->may_be_inlined))
{
- if (!pdi->is_declaration)
+ if (!pdi->is_declaration)
/* Ignore subprogram DIEs that do not have a name, they are
illegal. Do not emit a complaint at this point, we will
do so when we convert this psymtab into a symtab. */
if (pdi->name (cu))
add_partial_symbol (pdi, cu);
- }
+ }
}
if (! pdi->has_children)
@@ -10211,7 +10211,7 @@ process_die (struct die_info *die, struct dwarf2_cu *cu)
case DW_TAG_subrange_type:
case DW_TAG_typedef:
/* Add a typedef symbol for the type definition, if it has a
- DW_AT_name. */
+ DW_AT_name. */
new_symbol (die, read_type_die (die, cu), cu);
break;
case DW_TAG_common_block:
@@ -10809,36 +10809,36 @@ read_import_statement (struct die_info *die, struct dwarf2_cu *cu)
{
/* GCC bug: https://bugzilla.redhat.com/show_bug.cgi?id=506524
- The import in the following code:
- namespace A
- {
- typedef int B;
- }
-
- int main ()
- {
- using A::B;
- B b;
- return b;
- }
-
- ...
- <2><51>: Abbrev Number: 3 (DW_TAG_imported_declaration)
- <52> DW_AT_decl_file : 1
- <53> DW_AT_decl_line : 6
- <54> DW_AT_import : <0x75>
- <2><58>: Abbrev Number: 4 (DW_TAG_typedef)
- <59> DW_AT_name : B
- <5b> DW_AT_decl_file : 1
- <5c> DW_AT_decl_line : 2
- <5d> DW_AT_type : <0x6e>
- ...
- <1><75>: Abbrev Number: 7 (DW_TAG_base_type)
- <76> DW_AT_byte_size : 4
- <77> DW_AT_encoding : 5 (signed)
-
- imports the wrong die ( 0x75 instead of 0x58 ).
- This case will be ignored until the gcc bug is fixed. */
+ The import in the following code:
+ namespace A
+ {
+ typedef int B;
+ }
+
+ int main ()
+ {
+ using A::B;
+ B b;
+ return b;
+ }
+
+ ...
+ <2><51>: Abbrev Number: 3 (DW_TAG_imported_declaration)
+ <52> DW_AT_decl_file : 1
+ <53> DW_AT_decl_line : 6
+ <54> DW_AT_import : <0x75>
+ <2><58>: Abbrev Number: 4 (DW_TAG_typedef)
+ <59> DW_AT_name : B
+ <5b> DW_AT_decl_file : 1
+ <5c> DW_AT_decl_line : 2
+ <5d> DW_AT_type : <0x6e>
+ ...
+ <1><75>: Abbrev Number: 7 (DW_TAG_base_type)
+ <76> DW_AT_byte_size : 4
+ <77> DW_AT_encoding : 5 (signed)
+
+ imports the wrong die ( 0x75 instead of 0x58 ).
+ This case will be ignored until the gcc bug is fixed. */
return;
}
@@ -11081,7 +11081,7 @@ handle_DW_AT_stmt_list (struct die_info *die, struct dwarf2_cu *cu,
else
{
/* We cannot free any current entry in (*slot) as that struct line_header
- may be already used by multiple CUs. Create only temporary decoded
+ may be already used by multiple CUs. Create only temporary decoded
line_header for this CU - it may happen at most once for each line
number information unit. And if we're not using line_header_hash
then this is what we want as well. */
@@ -12357,7 +12357,7 @@ create_dwo_unit_in_dwp_v2 (dwarf2_per_objfile *per_objfile,
dwo_unit->section =
XOBNEW (&per_objfile->per_bfd->obstack, struct dwarf2_section_info);
*dwo_unit->section = create_dwp_v2_or_v5_section
- (per_objfile,
+ (per_objfile,
is_debug_types
? &dwp_file->sections.types
: &dwp_file->sections.info,
@@ -12394,9 +12394,9 @@ create_dwo_unit_in_dwp_v5 (dwarf2_per_objfile *per_objfile,
if (dwarf_read_debug)
{
fprintf_unfiltered (gdb_stdlog, "Reading %s %s/%s in DWP V5 file: %s\n",
- kind,
- pulongest (unit_index), hex_string (signature),
- dwp_file->name);
+ kind,
+ pulongest (unit_index), hex_string (signature),
+ dwp_file->name);
}
/* Fetch the section offsets of this DWO unit. */
@@ -12406,51 +12406,51 @@ create_dwo_unit_in_dwp_v5 (dwarf2_per_objfile *per_objfile,
for (int i = 0; i < dwp_htab->nr_columns; ++i)
{
uint32_t offset = read_4_bytes (dbfd,
- dwp_htab->section_pool.v5.offsets
- + (((unit_index - 1)
- * dwp_htab->nr_columns
- + i)
- * sizeof (uint32_t)));
+ dwp_htab->section_pool.v5.offsets
+ + (((unit_index - 1)
+ * dwp_htab->nr_columns
+ + i)
+ * sizeof (uint32_t)));
uint32_t size = read_4_bytes (dbfd,
- dwp_htab->section_pool.v5.sizes
- + (((unit_index - 1) * dwp_htab->nr_columns
- + i)
- * sizeof (uint32_t)));
+ dwp_htab->section_pool.v5.sizes
+ + (((unit_index - 1) * dwp_htab->nr_columns
+ + i)
+ * sizeof (uint32_t)));
switch (dwp_htab->section_pool.v5.section_ids[i])
- {
- case DW_SECT_ABBREV_V5:
- sections.abbrev_offset = offset;
- sections.abbrev_size = size;
- break;
- case DW_SECT_INFO_V5:
- sections.info_or_types_offset = offset;
- sections.info_or_types_size = size;
- break;
- case DW_SECT_LINE_V5:
- sections.line_offset = offset;
- sections.line_size = size;
- break;
- case DW_SECT_LOCLISTS_V5:
- sections.loclists_offset = offset;
- sections.loclists_size = size;
- break;
- case DW_SECT_MACRO_V5:
- sections.macro_offset = offset;
- sections.macro_size = size;
- break;
- case DW_SECT_RNGLISTS_V5:
- sections.rnglists_offset = offset;
- sections.rnglists_size = size;
- break;
- case DW_SECT_STR_OFFSETS_V5:
- sections.str_offsets_offset = offset;
- sections.str_offsets_size = size;
- break;
- case DW_SECT_RESERVED_V5:
- default:
- break;
- }
+ {
+ case DW_SECT_ABBREV_V5:
+ sections.abbrev_offset = offset;
+ sections.abbrev_size = size;
+ break;
+ case DW_SECT_INFO_V5:
+ sections.info_or_types_offset = offset;
+ sections.info_or_types_size = size;
+ break;
+ case DW_SECT_LINE_V5:
+ sections.line_offset = offset;
+ sections.line_size = size;
+ break;
+ case DW_SECT_LOCLISTS_V5:
+ sections.loclists_offset = offset;
+ sections.loclists_size = size;
+ break;
+ case DW_SECT_MACRO_V5:
+ sections.macro_offset = offset;
+ sections.macro_size = size;
+ break;
+ case DW_SECT_RNGLISTS_V5:
+ sections.rnglists_offset = offset;
+ sections.rnglists_size = size;
+ break;
+ case DW_SECT_STR_OFFSETS_V5:
+ sections.str_offsets_offset = offset;
+ sections.str_offsets_size = size;
+ break;
+ case DW_SECT_RESERVED_V5:
+ default:
+ break;
+ }
}
/* It's easier for the rest of the code if we fake a struct dwo_file and
@@ -12464,75 +12464,75 @@ create_dwo_unit_in_dwp_v5 (dwarf2_per_objfile *per_objfile,
std::string virtual_dwo_name =
string_printf ("virtual-dwo/%ld-%ld-%ld-%ld-%ld-%ld",
- (long) (sections.abbrev_size ? sections.abbrev_offset : 0),
- (long) (sections.line_size ? sections.line_offset : 0),
- (long) (sections.loclists_size ? sections.loclists_offset : 0),
- (long) (sections.str_offsets_size
- ? sections.str_offsets_offset : 0),
- (long) (sections.macro_size ? sections.macro_offset : 0),
- (long) (sections.rnglists_size ? sections.rnglists_offset: 0));
+ (long) (sections.abbrev_size ? sections.abbrev_offset : 0),
+ (long) (sections.line_size ? sections.line_offset : 0),
+ (long) (sections.loclists_size ? sections.loclists_offset : 0),
+ (long) (sections.str_offsets_size
+ ? sections.str_offsets_offset : 0),
+ (long) (sections.macro_size ? sections.macro_offset : 0),
+ (long) (sections.rnglists_size ? sections.rnglists_offset: 0));
/* Can we use an existing virtual DWO file? */
dwo_file_slot = lookup_dwo_file_slot (per_objfile,
- virtual_dwo_name.c_str (),
- comp_dir);
+ virtual_dwo_name.c_str (),
+ comp_dir);
/* Create one if necessary. */
if (*dwo_file_slot == NULL)
{
if (dwarf_read_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "Creating virtual DWO: %s\n",
- virtual_dwo_name.c_str ());
- }
+ {
+ fprintf_unfiltered (gdb_stdlog, "Creating virtual DWO: %s\n",
+ virtual_dwo_name.c_str ());
+ }
dwo_file = new struct dwo_file;
dwo_file->dwo_name = per_objfile->objfile->intern (virtual_dwo_name);
dwo_file->comp_dir = comp_dir;
dwo_file->sections.abbrev =
- create_dwp_v2_or_v5_section (per_objfile,
- &dwp_file->sections.abbrev,
- sections.abbrev_offset,
- sections.abbrev_size);
+ create_dwp_v2_or_v5_section (per_objfile,
+ &dwp_file->sections.abbrev,
+ sections.abbrev_offset,
+ sections.abbrev_size);
dwo_file->sections.line =
- create_dwp_v2_or_v5_section (per_objfile,
- &dwp_file->sections.line,
- sections.line_offset, sections.line_size);
+ create_dwp_v2_or_v5_section (per_objfile,
+ &dwp_file->sections.line,
+ sections.line_offset, sections.line_size);
dwo_file->sections.macro =
- create_dwp_v2_or_v5_section (per_objfile,
- &dwp_file->sections.macro,
- sections.macro_offset,
- sections.macro_size);
+ create_dwp_v2_or_v5_section (per_objfile,
+ &dwp_file->sections.macro,
+ sections.macro_offset,
+ sections.macro_size);
dwo_file->sections.loclists =
- create_dwp_v2_or_v5_section (per_objfile,
- &dwp_file->sections.loclists,
- sections.loclists_offset,
- sections.loclists_size);
+ create_dwp_v2_or_v5_section (per_objfile,
+ &dwp_file->sections.loclists,
+ sections.loclists_offset,
+ sections.loclists_size);
dwo_file->sections.rnglists =
- create_dwp_v2_or_v5_section (per_objfile,
- &dwp_file->sections.rnglists,
- sections.rnglists_offset,
- sections.rnglists_size);
+ create_dwp_v2_or_v5_section (per_objfile,
+ &dwp_file->sections.rnglists,
+ sections.rnglists_offset,
+ sections.rnglists_size);
dwo_file->sections.str_offsets =
- create_dwp_v2_or_v5_section (per_objfile,
- &dwp_file->sections.str_offsets,
- sections.str_offsets_offset,
- sections.str_offsets_size);
+ create_dwp_v2_or_v5_section (per_objfile,
+ &dwp_file->sections.str_offsets,
+ sections.str_offsets_offset,
+ sections.str_offsets_size);
/* The "str" section is global to the entire DWP file. */
dwo_file->sections.str = dwp_file->sections.str;
/* The info or types section is assigned below to dwo_unit,
- there's no need to record it in dwo_file.
- Also, we can't simply record type sections in dwo_file because
- we record a pointer into the vector in dwo_unit. As we collect more
- types we'll grow the vector and eventually have to reallocate space
- for it, invalidating all copies of pointers into the previous
- contents. */
+ there's no need to record it in dwo_file.
+ Also, we can't simply record type sections in dwo_file because
+ we record a pointer into the vector in dwo_unit. As we collect more
+ types we'll grow the vector and eventually have to reallocate space
+ for it, invalidating all copies of pointers into the previous
+ contents. */
*dwo_file_slot = dwo_file;
}
else
{
if (dwarf_read_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n",
- virtual_dwo_name.c_str ());
- }
+ {
+ fprintf_unfiltered (gdb_stdlog, "Using existing virtual DWO: %s\n",
+ virtual_dwo_name.c_str ());
+ }
dwo_file = (struct dwo_file *) *dwo_file_slot;
}
@@ -12542,9 +12542,9 @@ create_dwo_unit_in_dwp_v5 (dwarf2_per_objfile *per_objfile,
dwo_unit->section
= XOBNEW (&per_objfile->per_bfd->obstack, struct dwarf2_section_info);
*dwo_unit->section = create_dwp_v2_or_v5_section (per_objfile,
- &dwp_file->sections.info,
- sections.info_or_types_offset,
- sections.info_or_types_size);
+ &dwp_file->sections.info,
+ sections.info_or_types_offset,
+ sections.info_or_types_size);
/* dwo_unit->{offset,length,type_offset_in_tu} are set later. */
return dwo_unit;
@@ -13450,7 +13450,7 @@ inherit_abstract_dies (struct die_info *die, struct dwarf2_cu *cu)
present in the abstract instance but not referenced in the concrete
one. */
if (child_die->tag == DW_TAG_call_site
- || child_die->tag == DW_TAG_GNU_call_site)
+ || child_die->tag == DW_TAG_GNU_call_site)
continue;
/* For each CHILD_DIE, find the corresponding child of
@@ -13695,7 +13695,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
templ_func->n_template_arguments = template_args.size ();
templ_func->template_arguments
- = XOBNEWVEC (&objfile->objfile_obstack, struct symbol *,
+ = XOBNEWVEC (&objfile->objfile_obstack, struct symbol *,
templ_func->n_template_arguments);
memcpy (templ_func->template_arguments,
template_args.data (),
@@ -13784,19 +13784,19 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
|| (*cu->get_builder ()->get_local_using_directives ()) != NULL)
{
struct block *block
- = cu->get_builder ()->finish_block (0, cstk.old_blocks, NULL,
+ = cu->get_builder ()->finish_block (0, cstk.old_blocks, NULL,
cstk.start_addr, highpc);
/* Note that recording ranges after traversing children, as we
- do here, means that recording a parent's ranges entails
- walking across all its children's ranges as they appear in
- the address map, which is quadratic behavior.
-
- It would be nicer to record the parent's ranges before
- traversing its children, simply overriding whatever you find
- there. But since we don't even decide whether to create a
- block until after we've traversed its children, that's hard
- to do. */
+ do here, means that recording a parent's ranges entails
+ walking across all its children's ranges as they appear in
+ the address map, which is quadratic behavior.
+
+ It would be nicer to record the parent's ranges before
+ traversing its children, simply overriding whatever you find
+ there. But since we don't even decide whether to create a
+ block until after we've traversed its children, that's hard
+ to do. */
dwarf2_record_block_ranges (die, block, baseaddr, cu);
}
*cu->get_builder ()->get_local_symbols () = cstk.locals;
@@ -13859,7 +13859,7 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
child_die = child_die->sibling)
{
if (child_die->tag != DW_TAG_call_site_parameter
- && child_die->tag != DW_TAG_GNU_call_site_parameter)
+ && child_die->tag != DW_TAG_GNU_call_site_parameter)
{
complaint (_("Tag %d is not DW_TAG_call_site_parameter in "
"DW_TAG_call_site child DIE %s [in module %s]"),
@@ -13894,8 +13894,8 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
/* DW_AT_call_all_calls is a superset
of DW_AT_call_all_tail_calls. */
if (func_die
- && !dwarf2_flag_true_p (func_die, DW_AT_call_all_calls, cu)
- && !dwarf2_flag_true_p (func_die, DW_AT_GNU_all_call_sites, cu)
+ && !dwarf2_flag_true_p (func_die, DW_AT_call_all_calls, cu)
+ && !dwarf2_flag_true_p (func_die, DW_AT_GNU_all_call_sites, cu)
&& !dwarf2_flag_true_p (func_die, DW_AT_call_all_tail_calls, cu)
&& !dwarf2_flag_true_p (func_die, DW_AT_GNU_all_tail_call_sites, cu))
{
@@ -13972,7 +13972,7 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
target_physname = dwarf2_physname (NULL, target_die, target_cu);
if (target_physname == NULL)
complaint (_("DW_AT_call_target target DIE has invalid "
- "physname, for referencing DIE %s [in module %s]"),
+ "physname, for referencing DIE %s [in module %s]"),
sect_offset_str (die->sect_off), objfile_name (objfile));
else
SET_FIELD_PHYSNAME (call_site->target, target_physname);
@@ -13985,7 +13985,7 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
if (dwarf2_get_pc_bounds (target_die, &lowpc, NULL, target_cu, NULL)
<= PC_BOUNDS_INVALID)
complaint (_("DW_AT_call_target target DIE has invalid "
- "low pc, for referencing DIE %s [in module %s]"),
+ "low pc, for referencing DIE %s [in module %s]"),
sect_offset_str (die->sect_off), objfile_name (objfile));
else
{
@@ -14010,7 +14010,7 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
struct attribute *loc, *origin;
if (child_die->tag != DW_TAG_call_site_parameter
- && child_die->tag != DW_TAG_GNU_call_site_parameter)
+ && child_die->tag != DW_TAG_GNU_call_site_parameter)
{
/* Already printed the complaint above. */
continue;
@@ -14251,11 +14251,11 @@ dwarf2_rnglists_process (unsigned offset, struct dwarf2_cu *cu,
base = cu->header.read_address (obfd, buffer, &bytes_read);
buffer += bytes_read;
break;
- case DW_RLE_base_addressx:
- addr_index = read_unsigned_leb128 (obfd, buffer, &bytes_read);
- buffer += bytes_read;
- base = read_addr_index (cu, addr_index);
- break;
+ case DW_RLE_base_addressx:
+ addr_index = read_unsigned_leb128 (obfd, buffer, &bytes_read);
+ buffer += bytes_read;
+ base = read_addr_index (cu, addr_index);
+ break;
case DW_RLE_start_length:
if (buffer + cu->header.addr_size > buf_end)
{
@@ -14275,18 +14275,18 @@ dwarf2_rnglists_process (unsigned offset, struct dwarf2_cu *cu,
}
break;
case DW_RLE_startx_length:
- addr_index = read_unsigned_leb128 (obfd, buffer, &bytes_read);
- buffer += bytes_read;
- range_beginning = read_addr_index (cu, addr_index);
- if (buffer > buf_end)
- {
- overflow = true;
- break;
- }
- range_end = (range_beginning
- + read_unsigned_leb128 (obfd, buffer, &bytes_read));
- buffer += bytes_read;
- break;
+ addr_index = read_unsigned_leb128 (obfd, buffer, &bytes_read);
+ buffer += bytes_read;
+ range_beginning = read_addr_index (cu, addr_index);
+ if (buffer > buf_end)
+ {
+ overflow = true;
+ break;
+ }
+ range_end = (range_beginning
+ + read_unsigned_leb128 (obfd, buffer, &bytes_read));
+ buffer += bytes_read;
+ break;
case DW_RLE_offset_pair:
range_beginning = read_unsigned_leb128 (obfd, buffer, &bytes_read);
buffer += bytes_read;
@@ -14316,18 +14316,18 @@ dwarf2_rnglists_process (unsigned offset, struct dwarf2_cu *cu,
buffer += bytes_read;
break;
case DW_RLE_startx_endx:
- addr_index = read_unsigned_leb128 (obfd, buffer, &bytes_read);
- buffer += bytes_read;
- range_beginning = read_addr_index (cu, addr_index);
- if (buffer > buf_end)
- {
- overflow = true;
- break;
- }
- addr_index = read_unsigned_leb128 (obfd, buffer, &bytes_read);
- buffer += bytes_read;
- range_end = read_addr_index (cu, addr_index);
- break;
+ addr_index = read_unsigned_leb128 (obfd, buffer, &bytes_read);
+ buffer += bytes_read;
+ range_beginning = read_addr_index (cu, addr_index);
+ if (buffer > buf_end)
+ {
+ overflow = true;
+ break;
+ }
+ addr_index = read_unsigned_leb128 (obfd, buffer, &bytes_read);
+ buffer += bytes_read;
+ range_end = read_addr_index (cu, addr_index);
+ break;
default:
complaint (_("Invalid .debug_rnglists data (no base address)"));
return false;
@@ -14578,7 +14578,7 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
{
attr = dwarf2_attr (die, DW_AT_low_pc, cu);
if (attr != nullptr)
- {
+ {
low = attr->as_address ();
high = attr_high->as_address ();
if (cu->header.version >= 4 && attr_high->form_is_constant ())
@@ -14651,8 +14651,8 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
static void
dwarf2_get_subprogram_pc_bounds (struct die_info *die,
- CORE_ADDR *lowpc, CORE_ADDR *highpc,
- struct dwarf2_cu *cu)
+ CORE_ADDR *lowpc, CORE_ADDR *highpc,
+ struct dwarf2_cu *cu)
{
CORE_ADDR low, high;
struct die_info *child = die->child;
@@ -14675,8 +14675,8 @@ dwarf2_get_subprogram_pc_bounds (struct die_info *die,
while (child && child->tag)
{
if (child->tag == DW_TAG_subprogram
- || child->tag == DW_TAG_lexical_block)
- dwarf2_get_subprogram_pc_bounds (child, lowpc, highpc, cu);
+ || child->tag == DW_TAG_lexical_block)
+ dwarf2_get_subprogram_pc_bounds (child, lowpc, highpc, cu);
child = child->sibling;
}
}
@@ -14708,7 +14708,7 @@ get_scope_pc_bounds (struct die_info *die,
{
switch (child->tag) {
case DW_TAG_subprogram:
- dwarf2_get_subprogram_pc_bounds (child, &best_low, &best_high, cu);
+ dwarf2_get_subprogram_pc_bounds (child, &best_low, &best_high, cu);
break;
case DW_TAG_namespace:
case DW_TAG_module:
@@ -14746,7 +14746,7 @@ get_scope_pc_bounds (struct die_info *die,
static void
dwarf2_record_block_ranges (struct die_info *die, struct block *block,
- CORE_ADDR baseaddr, struct dwarf2_cu *cu)
+ CORE_ADDR baseaddr, struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->per_objfile->objfile;
struct gdbarch *gdbarch = objfile->arch ();
@@ -14758,7 +14758,7 @@ dwarf2_record_block_ranges (struct die_info *die, struct block *block,
{
attr = dwarf2_attr (die, DW_AT_low_pc, cu);
if (attr != nullptr)
- {
+ {
CORE_ADDR low = attr->as_address ();
CORE_ADDR high = attr_high->as_address ();
@@ -14768,7 +14768,7 @@ dwarf2_record_block_ranges (struct die_info *die, struct block *block,
low = gdbarch_adjust_dwarf2_addr (gdbarch, low + baseaddr);
high = gdbarch_adjust_dwarf2_addr (gdbarch, high + baseaddr);
cu->get_builder ()->record_block_range (block, low, high - 1);
- }
+ }
}
attr = dwarf2_attr (die, DW_AT_ranges, cu);
@@ -14786,7 +14786,7 @@ dwarf2_record_block_ranges (struct die_info *die, struct block *block,
&& attr->form != DW_FORM_rnglistx);
/* The value of the DW_AT_ranges attribute is the offset of the
- address range list in the .debug_ranges section. */
+ address range list in the .debug_ranges section. */
unsigned long offset = (attr->as_unsigned ()
+ (need_ranges_base ? cu->ranges_base : 0));
@@ -15063,21 +15063,21 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
/* For big endian bits, the DW_AT_bit_offset gives the
- additional bit offset from the MSB of the containing
- anonymous object to the MSB of the field. We don't
- have to do anything special since we don't need to
- know the size of the anonymous object. */
+ additional bit offset from the MSB of the containing
+ anonymous object to the MSB of the field. We don't
+ have to do anything special since we don't need to
+ know the size of the anonymous object. */
SET_FIELD_BITPOS (*fp, (FIELD_BITPOS (*fp)
+ attr->constant_value (0)));
}
else
{
/* For little endian bits, compute the bit offset to the
- MSB of the anonymous object, subtract off the number of
- bits from the MSB of the field to the MSB of the
- object, and then subtract off the number of bits of
- the field itself. The result is the bit offset of
- the LSB of the field. */
+ MSB of the anonymous object, subtract off the number of
+ bits from the MSB of the field to the MSB of the
+ object, and then subtract off the number of bits of
+ the field itself. The result is the bit offset of
+ the LSB of the field. */
int anonymous_size;
int bit_offset = attr->constant_value (0);
@@ -15118,7 +15118,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
fp->name = fieldname;
/* Change accessibility for artificial fields (e.g. virtual table
- pointer or virtual base class pointer) to private. */
+ pointer or virtual base class pointer) to private. */
if (dwarf2_attr (die, DW_AT_artificial, cu))
{
FIELD_ARTIFICIAL (*fp) = 1;
@@ -15618,11 +15618,11 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
this_type->has_varargs ());
/* Handle static member functions.
- Dwarf2 has no clean way to discern C++ static and non-static
- member functions. G++ helps GDB by marking the first
- parameter for non-static member functions (which is the this
- pointer) as artificial. We obtain this information from
- read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */
+ Dwarf2 has no clean way to discern C++ static and non-static
+ member functions. G++ helps GDB by marking the first
+ parameter for non-static member functions (which is the this
+ pointer) as artificial. We obtain this information from
+ read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */
if (nparams == 0 || TYPE_FIELD_ARTIFICIAL (this_type, 0) == 0)
fnp->voffset = VOFFSET_STATIC;
}
@@ -15676,7 +15676,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
if (attr != nullptr)
{
if (attr->form_is_block () && attr->as_block ()->size > 0)
- {
+ {
struct dwarf_block *block = attr->as_block ();
if (block->data[0] == DW_OP_constu)
@@ -15719,14 +15719,14 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
}
}
else if (attr->form_is_section_offset ())
- {
+ {
dwarf2_complex_location_expr_complaint ();
- }
+ }
else
- {
+ {
dwarf2_invalid_attrib_class_complaint ("DW_AT_vtable_elem_location",
fieldname);
- }
+ }
}
else
{
@@ -16037,13 +16037,13 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
if (attr != nullptr)
{
if (attr->form_is_constant ())
- TYPE_LENGTH (type) = attr->constant_value (0);
+ TYPE_LENGTH (type) = attr->constant_value (0);
else
{
struct dynamic_prop prop;
if (attr_to_dynamic_prop (attr, die, cu, &prop, cu->addr_type ()))
type->add_dyn_prop (DYN_PROP_BYTE_SIZE, prop);
- TYPE_LENGTH (type) = 0;
+ TYPE_LENGTH (type) = 0;
}
}
else
@@ -16330,7 +16330,7 @@ process_structure_scope (struct die_info *die, struct dwarf2_cu *cu)
{
const char *fieldname = TYPE_FIELD_NAME (t, i);
- if (is_vtable_name (fieldname, cu))
+ if (is_vtable_name (fieldname, cu))
{
set_type_vptr_fieldno (type, i);
break;
@@ -16352,8 +16352,8 @@ process_structure_scope (struct die_info *die, struct dwarf2_cu *cu)
&& startswith (cu->producer, "IBM(R) XL C/C++ Advanced Edition"))
{
/* The IBM XLC compiler does not provide direct indication
- of the containing type, but the vtable pointer is
- always named __vfp. */
+ of the containing type, but the vtable pointer is
+ always named __vfp. */
int i;
@@ -16773,12 +16773,12 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct type *child_type = read_type_die (child_die, cu);
- if (child_type != NULL)
- {
+ if (child_type != NULL)
+ {
/* The range type was succesfully read. Save it for the
- array type creation. */
+ array type creation. */
range_types.push_back (child_type);
- }
+ }
}
child_die = child_die->sibling;
}
@@ -16996,20 +16996,20 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu)
{
/* Support the .debug_loc offsets. */
if (attr->form_is_block ())
- {
+ {
/* Ok. */
- }
+ }
else if (attr->form_is_section_offset ())
- {
+ {
dwarf2_complex_location_expr_complaint ();
attr = NULL;
- }
+ }
else
- {
+ {
dwarf2_invalid_attrib_class_complaint ("DW_AT_location",
"common block member");
attr = NULL;
- }
+ }
}
if (die->child != NULL)
@@ -17346,7 +17346,7 @@ read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu)
static struct type *
read_tag_reference_type (struct die_info *die, struct dwarf2_cu *cu,
- enum type_code refcode)
+ enum type_code refcode)
{
struct comp_unit_head *cu_header = &cu->header;
struct type *type, *target_type;
@@ -17678,8 +17678,8 @@ read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu)
int nparams, iparams;
/* Count the number of parameters.
- FIXME: GDB currently ignores vararg functions, but knows about
- vararg member functions. */
+ FIXME: GDB currently ignores vararg functions, but knows about
+ vararg member functions. */
nparams = 0;
child_die = die->child;
while (child_die && child_die->tag)
@@ -18993,12 +18993,12 @@ partial_die_info::read (const struct die_reader_specs *reader,
attribute attr;
info_ptr = read_attribute (reader, &attr, &abbrev.attrs[i], info_ptr);
/* String and address offsets that need to do the reprocessing have
- already been read at this point, so there is no need to wait until
+ already been read at this point, so there is no need to wait until
the loop terminates to do the reprocessing. */
if (attr.requires_reprocessing_p ())
read_attribute_reprocess (reader, &attr, tag);
/* Store the data if it is of an attribute we want to keep in a
- partial symbol table. */
+ partial symbol table. */
switch (attr.name)
{
case DW_AT_name:
@@ -19040,20 +19040,20 @@ partial_die_info::read (const struct die_reader_specs *reader,
high_pc_relative = 1;
break;
case DW_AT_location:
- /* Support the .debug_loc offsets. */
- if (attr.form_is_block ())
- {
+ /* Support the .debug_loc offsets. */
+ if (attr.form_is_block ())
+ {
d.locdesc = attr.as_block ();
- }
- else if (attr.form_is_section_offset ())
- {
+ }
+ else if (attr.form_is_section_offset ())
+ {
dwarf2_complex_location_expr_complaint ();
- }
- else
- {
+ }
+ else
+ {
dwarf2_invalid_attrib_class_complaint ("DW_AT_location",
"partial symbol information");
- }
+ }
break;
case DW_AT_external:
is_external = attr.as_boolean ();
@@ -19091,12 +19091,12 @@ partial_die_info::read (const struct die_reader_specs *reader,
sibling = sibling_ptr;
}
break;
- case DW_AT_byte_size:
- has_byte_size = 1;
- break;
- case DW_AT_const_value:
- has_const_value = 1;
- break;
+ case DW_AT_byte_size:
+ has_byte_size = 1;
+ break;
+ case DW_AT_const_value:
+ has_const_value = 1;
+ break;
case DW_AT_calling_convention:
/* DWARF doesn't provide a way to identify a program's source-level
entry point. DW_AT_calling_convention attributes are only meant
@@ -19145,7 +19145,7 @@ partial_die_info::read (const struct die_reader_specs *reader,
does not appear in DW_TAG_compile_unit of DWO files.
Attributes of the form DW_FORM_rnglistx have already had
- their value changed by read_rnglist_index and already
+ their value changed by read_rnglist_index and already
include DW_AT_rnglists_base, so don't need to add the ranges
base, either. */
int need_ranges_base = (tag != DW_TAG_compile_unit
@@ -19539,18 +19539,18 @@ read_loclist_index (struct dwarf2_cu *cu, ULONGEST loclist_index)
section->read (objfile);
if (section->buffer == NULL)
complaint (_("DW_FORM_loclistx used without .debug_loclists "
- "section [in module %s]"), objfile_name (objfile));
+ "section [in module %s]"), objfile_name (objfile));
struct loclists_rnglists_header header;
read_loclists_rnglists_header (&header, section);
if (loclist_index >= header.offset_entry_count)
complaint (_("DW_FORM_loclistx pointing outside of "
- ".debug_loclists offset array [in module %s]"),
- objfile_name (objfile));
+ ".debug_loclists offset array [in module %s]"),
+ objfile_name (objfile));
if (loclist_base + loclist_index * cu->header.offset_size
>= section->size)
complaint (_("DW_FORM_loclistx pointing outside of "
- ".debug_loclists section [in module %s]"),
- objfile_name (objfile));
+ ".debug_loclists section [in module %s]"),
+ objfile_name (objfile));
const gdb_byte *info_ptr
= section->buffer + loclist_base + loclist_index * cu->header.offset_size;
@@ -19598,7 +19598,7 @@ read_rnglist_index (struct dwarf2_cu *cu, ULONGEST rnglist_index,
/* Validate that the offset is within the section's range. */
if (start_offset >= section->size)
error (_("DW_FORM_rnglistx pointing outside of "
- ".debug_rnglists section [in module %s]"),
+ ".debug_rnglists section [in module %s]"),
objfile_name (objfile));
/* Validate that reading won't go beyond the end of the section. */
@@ -19630,13 +19630,13 @@ read_attribute_reprocess (const struct die_reader_specs *reader,
case DW_FORM_GNU_addr_index:
attr->set_address (read_addr_index (cu,
attr->as_unsigned_reprocess ()));
- break;
+ break;
case DW_FORM_loclistx:
attr->set_address (read_loclist_index (cu, attr->as_unsigned ()));
break;
case DW_FORM_rnglistx:
attr->set_address (read_rnglist_index (cu, attr->as_unsigned (), tag));
- break;
+ break;
case DW_FORM_strx:
case DW_FORM_strx1:
case DW_FORM_strx2:
@@ -19931,8 +19931,8 @@ read_attribute_value (const struct die_reader_specs *reader,
&& attr->as_unsigned () >= 0xffffffff)
{
complaint
- (_("Suspicious DW_AT_byte_size value treated as zero instead of %s"),
- hex_string (attr->as_unsigned ()));
+ (_("Suspicious DW_AT_byte_size value treated as zero instead of %s"),
+ hex_string (attr->as_unsigned ()));
attr->set_unsigned (0);
}
@@ -20108,12 +20108,12 @@ read_str_index (struct dwarf2_cu *cu,
error (_("%s used without %s section"
" in CU at offset %s [in module %s]"),
form_name, str_section->get_name (),
- sect_offset_str (cu->header.sect_off), objf_name);
+ sect_offset_str (cu->header.sect_off), objf_name);
if (str_offsets_section->buffer == NULL)
error (_("%s used without %s section"
" in CU at offset %s [in module %s]"),
form_name, str_section->get_name (),
- sect_offset_str (cu->header.sect_off), objf_name);
+ sect_offset_str (cu->header.sect_off), objf_name);
info_ptr = (str_offsets_section->buffer
+ str_offsets_base
+ str_index * cu->header.offset_size);
@@ -20282,7 +20282,7 @@ dwarf2_string_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *c
{
str = attr->as_string ();
if (str == nullptr)
- complaint (_("string type expected for attribute %s for "
+ complaint (_("string type expected for attribute %s for "
"DIE at %s in module %s"),
dwarf_attr_name (name), sect_offset_str (die->sect_off),
objfile_name (cu->per_objfile->objfile));
@@ -20838,9 +20838,9 @@ lnp_state_machine::record_line (bool end_sequence)
bool file_changed
= m_last_subfile != m_cu->get_builder ()->get_current_subfile ();
bool ignore_this_line
- = ((file_changed && !end_sequence && m_last_address == m_address
- && !m_is_stmt && m_stmt_at_address)
- || (!end_sequence && m_line == 0));
+ = ((file_changed && !end_sequence && m_last_address == m_address
+ && !m_is_stmt && m_stmt_at_address)
+ || (!end_sequence && m_line == 0));
if ((file_changed && !ignore_this_line) || end_sequence)
{
@@ -21017,25 +21017,25 @@ dwarf_decode_lines_1 (struct line_header *lh, struct dwarf2_cu *cu,
}
break;
case DW_LNE_define_file:
- {
- const char *cur_file;
+ {
+ const char *cur_file;
unsigned int mod_time, length;
dir_index dindex;
- cur_file = read_direct_string (abfd, line_ptr,
+ cur_file = read_direct_string (abfd, line_ptr,
&bytes_read);
- line_ptr += bytes_read;
- dindex = (dir_index)
- read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
- line_ptr += bytes_read;
- mod_time =
- read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
- line_ptr += bytes_read;
- length =
- read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
- line_ptr += bytes_read;
- lh->add_file_name (cur_file, dindex, mod_time, length);
- }
+ line_ptr += bytes_read;
+ dindex = (dir_index)
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ mod_time =
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ length =
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ lh->add_file_name (cur_file, dindex, mod_time, length);
+ }
break;
case DW_LNE_set_discriminator:
{
@@ -21186,17 +21186,17 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir,
if (decode_for_pst_p)
{
/* Now that we're done scanning the Line Header Program, we can
- create the psymtab of each included file. */
+ create the psymtab of each included file. */
for (auto &file_entry : lh->file_names ())
- if (file_entry.included_p == 1)
- {
+ if (file_entry.included_p == 1)
+ {
gdb::unique_xmalloc_ptr<char> name_holder;
const char *include_name =
psymtab_include_file_name (lh, file_entry, pst,
comp_dir, &name_holder);
if (include_name != NULL)
- dwarf2_create_include_psymtab (include_name, pst, objfile);
- }
+ dwarf2_create_include_psymtab (include_name, pst, objfile);
+ }
}
else
{
@@ -21325,7 +21325,7 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
if ((block->data[0] == DW_OP_addr
&& block->size == 1 + cu_header->addr_size)
|| ((block->data[0] == DW_OP_GNU_addr_index
- || block->data[0] == DW_OP_addrx)
+ || block->data[0] == DW_OP_addrx)
&& (block->size
== 1 + leb128_size (&block->data[1]))))
{
@@ -21419,7 +21419,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
}
/* Default assumptions.
- Use the passed type or decode it from the die. */
+ Use the passed type or decode it from the die. */
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
SYMBOL_ACLASS_INDEX (sym) = LOC_OPTIMIZED_OUT;
if (type != NULL)
@@ -21480,12 +21480,12 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|| cu->language == language_ada
|| cu->language == language_fortran)
{
- /* Subprograms marked external are stored as a global symbol.
- Ada and Fortran subprograms, whether marked external or
- not, are always stored as a global symbol, because we want
- to be able to access them globally. For instance, we want
- to be able to break on a nested subprogram without having
- to specify the context. */
+ /* Subprograms marked external are stored as a global symbol.
+ Ada and Fortran subprograms, whether marked external or
+ not, are always stored as a global symbol, because we want
+ to be able to access them globally. For instance, we want
+ to be able to break on a nested subprogram without having
+ to specify the context. */
list_to_add = cu->get_builder ()->get_global_symbols ();
}
else
@@ -21588,11 +21588,11 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
else
{
/* We do not know the address of this symbol.
- If it is an external symbol and we have type information
- for it, enter the symbol as a LOC_UNRESOLVED symbol.
- The address of the variable will then be determined from
- the minimal symbol table whenever the variable is
- referenced. */
+ If it is an external symbol and we have type information
+ for it, enter the symbol as a LOC_UNRESOLVED symbol.
+ The address of the variable will then be determined from
+ the minimal symbol table whenever the variable is
+ referenced. */
attr2 = dwarf2_attr (die, DW_AT_external, cu);
/* Fortran explicitly imports any global symbols to the local
@@ -21709,7 +21709,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
list_to_add = cu->list_in_scope;
break;
case DW_TAG_base_type:
- case DW_TAG_subrange_type:
+ case DW_TAG_subrange_type:
SYMBOL_ACLASS_INDEX (sym) = LOC_TYPEDEF;
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
list_to_add = cu->list_in_scope;
@@ -22410,13 +22410,13 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
template class <class Enum> Class{};
Class<enum E> class_e;
- 1: DW_TAG_class_type (Class)
- 2: DW_TAG_enumeration_type (E)
- 3: DW_TAG_enumerator (enum1:0)
- 3: DW_TAG_enumerator (enum2:1)
- ...
- 2: DW_TAG_template_type_param
- DW_AT_type DW_FORM_ref_udata (E)
+ 1: DW_TAG_class_type (Class)
+ 2: DW_TAG_enumeration_type (E)
+ 3: DW_TAG_enumerator (enum1:0)
+ 3: DW_TAG_enumerator (enum2:1)
+ ...
+ 2: DW_TAG_template_type_param
+ DW_AT_type DW_FORM_ref_udata (E)
Besides being broken debug info, it can put GDB into an
infinite loop. Consider:
@@ -22513,7 +22513,7 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
static char *
typename_concat (struct obstack *obs, const char *prefix, const char *suffix,
- int physname, struct dwarf2_cu *cu)
+ int physname, struct dwarf2_cu *cu)
{
const char *lead = "";
const char *sep;
@@ -23370,8 +23370,8 @@ follow_die_sig (struct die_info *src_die, const struct attribute *attr,
if (sig_type == NULL)
{
error (_("Dwarf Error: Cannot find signatured DIE %s referenced"
- " from DIE at %s [in module %s]"),
- hex_string (signature), sect_offset_str (src_die->sect_off),
+ " from DIE at %s [in module %s]"),
+ hex_string (signature), sect_offset_str (src_die->sect_off),
objfile_name ((*ref_cu)->per_objfile->objfile));
}
@@ -23763,7 +23763,7 @@ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu, bool *computed)
}
break;
- case DW_OP_GNU_push_tls_address:
+ case DW_OP_GNU_push_tls_address:
case DW_OP_form_tls_address:
/* The top of the stack has the offset from the beginning
of the thread control block at which the variable is located. */
@@ -23781,7 +23781,7 @@ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu, bool *computed)
return 0;
}
stack[stacki]++;
- break;
+ break;
case DW_OP_GNU_uninit:
if (computed != nullptr)
@@ -23813,7 +23813,7 @@ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu, bool *computed)
}
/* Enforce maximum stack depth of SIZE-1 to avoid writing
- outside of the allocated space. Also enforce minimum>0. */
+ outside of the allocated space. Also enforce minimum>0. */
if (stacki >= ARRAY_SIZE (stack) - 1)
{
if (computed == nullptr)
@@ -24461,7 +24461,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
{
struct type *prop_type = cu->addr_sized_int_type (false);
if (attr_to_dynamic_prop (attr, die, cu, &prop, prop_type))
- type->add_dyn_prop (DYN_PROP_ALLOCATED, prop);
+ type->add_dyn_prop (DYN_PROP_ALLOCATED, prop);
}
/* Read DW_AT_associated and set in type. */
@@ -24470,7 +24470,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
{
struct type *prop_type = cu->addr_sized_int_type (false);
if (attr_to_dynamic_prop (attr, die, cu, &prop, prop_type))
- type->add_dyn_prop (DYN_PROP_ASSOCIATED, prop);
+ type->add_dyn_prop (DYN_PROP_ASSOCIATED, prop);
}
/* Read DW_AT_data_location and set in type. */
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index fe5aab0..a0d76f3 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -100,9 +100,9 @@ struct dwarf2_per_bfd
for (i = 0; i < (dwarf2_per_bfd->n_comp_units
+ dwarf2_per_bfd->n_type_units); ++i)
{
- dwarf2_per_cu_data *per_cu = dwarf2_per_bfd->get_cutu (i);
+ dwarf2_per_cu_data *per_cu = dwarf2_per_bfd->get_cutu (i);
- ...;
+ ...;
}
*/
dwarf2_per_cu_data *get_cutu (int index);