Commit Graph

89511 Commits

Author SHA1 Message Date
Tom Tromey 87ce03fdc5 Use gdbpy_ref in py-linetable.c
This changes some code in py-linetable.c to use gdbpy_ref.

2017-01-10  Tom Tromey  <tom@tromey.com>

	* python/py-linetable.c (build_line_table_tuple_from_pcs)
	(ltpy_get_all_source_lines): Use gdbpy_ref.
2017-01-10 19:13:34 -07:00
Tom Tromey ee0a3fb85b Use gdbpy_ref in py-framefilter.c
This changes some code in py-framefilter.c to use gdbpy_ref.

2017-01-10  Tom Tromey  <tom@tromey.com>

	* python/py-framefilter.c (extract_sym, extract_value)
	(get_py_iter_from_func, bootstrap_python_frame_filters): Use
	gdbpy_ref.
2017-01-10 19:13:33 -07:00
Tom Tromey bf2a52fa2a Use gdbpy_ref in gdbpy_breakpoints
This changes gdbpy_breakpoints to use gdbpy_ref.

2017-01-10  Tom Tromey  <tom@tromey.com>

	* python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
2017-01-10 19:13:33 -07:00
Tom Tromey f59fe7f8e3 Use gdbpy_ref in gdbpy_inferiors
This changes gdbpy_inferiors to use gdbpy_ref.

2017-01-10  Tom Tromey  <tom@tromey.com>

	* python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
2017-01-10 19:13:32 -07:00
Tom Tromey 80bd970a4b Use gdbpy_ref in py-function.c
This changes some code in py-function.c to use gdbpy_ref.

2017-01-10  Tom Tromey  <tom@tromey.com>

	* python/py-function.c (convert_values_to_python, fnpy_init): Use
	gdbpy_ref.
2017-01-10 19:13:31 -07:00
Tom Tromey d1b3de2e43 Use gdbpy_ref in gdbpy_string_to_argv
This chanes gdbpy_string_to_argv to use gdbpy_ref.

2017-01-10  Tom Tromey  <tom@tromey.com>

	* python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
2017-01-10 19:13:31 -07:00
Tom Tromey 3bb4338431 Use gdbpy_ref in py-type.c
This changes py-type.c to use gdbpy_ref.
This results in simpler logic and the removal of "goto"s.

2017-01-10  Tom Tromey  <tom@tromey.com>

	* python/py-type.c (convert_field, make_fielditem, typy_fields)
	(typy_range): Use gdbpy_ref.
2017-01-10 19:13:30 -07:00
Tom Tromey abf5651e47 Change event code to use gdbpy_ref
This changes the event code in the Python layer to use
gdbpy_ref, simplifying the logic in many places.

It also changes evpy_emit_event not to steal a reference to its
argument.  This is simpler to do now that gdbpy_ref is in use;
it's also a reasonable cleanup in its own right.  While doing this I
realized that evpy_emit_event should not be calling gdbpy_print_stack
(all the outermost callers do this if needed), so I removed this as
well.

2017-01-10  Tom Tromey  <tom@tromey.com>

	* python/py-threadevent.c (create_thread_event_object): Use
	gdbpy_ref.
	* python/py-stopevent.c (create_stop_event_object): Simplify.
	(emit_stop_event): Use gdbpy_ref.
	* python/py-signalevent.c (create_signal_event_object): Use
	gdbpy_ref.
	* python/py-newobjfileevent.c (create_new_objfile_event_object)
	(emit_new_objfile_event, create_clear_objfiles_event_object)
	(emit_clear_objfiles_event): Use gdbpy_ref.
	* python/py-infevents.c (create_inferior_call_event_object)
	(create_register_changed_event_object)
	(create_memory_changed_event_object, emit_inferior_call_event)
	(emit_memory_changed_event, emit_register_changed_event): Use
	gdbpy_ref.
	* python/py-exitedevent.c (create_exited_event_object)
	(emit_exited_event): Use gdbpy_ref.
	* python/py-event.h (evpy_emit_event): Remove
	CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
	* python/py-event.c (evpy_emit_event): Use gdbpy_ref.
	* python/py-continueevent.c (emit_continue_event): Use
	gdbpy_ref.
	* python/py-breakpoint.c (gdbpy_breakpoint_created)
	(gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
	gdbpy_ref.
	* python/py-bpevent.c (create_breakpoint_event_object): Use
	gdbpy_ref.
2017-01-10 19:13:29 -07:00
Tom Tromey a68ff33e0d Introduce py-ref.h
This patch introduces class gdbpy_ref, which is a sort of smart
pointer that owns a single Python reference to a PyObject.  This class
acts a bit like unique_ptr, but also a bit like shared_ptr (in that
copies do what you might expect); I considered going solely with
unique_ptr but it seemed quite strange to have a unique_ptr that
actually manages a shared resource.

Subsequent patches use this new class to simplify logic in the Python
layer.

2017-01-10  Tom Tromey  <tom@tromey.com>

	* python/py-ref.h: New file.
2017-01-10 19:13:29 -07:00
GDB Administrator 0b67023188 Automatic date update in version.in 2017-01-11 00:00:35 +00:00
H.J. Lu 52b232b366 i386/x32: Align .eh_frame section to 4 bytes
.eh_frame section covering PLT sections should be aligned to 4 bytes
for i386 and x32.

bfd/

	* elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
	to 4 bytes.
	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
	.eh_frame section to 4 bytes for x32.
	(elf_x86_64_check_relocs): Likewise.

ld/

	* testsuite/ld-x86-64/pr20830b.d: Updated.
2017-01-10 14:21:21 -08:00
H.J. Lu 59a1e29d9e X32: Place .plt.got section after .plt section
This patch places .plt.got section after .plt section for x32.

	* emulparams/elf32_x86_64.sh (TINY_READONLY_SECTION): New.
	* testsuite/ld-x86-64/pr20830.d: Renamed to ...
	* testsuite/ld-x86-64/pr20830a.d: This.  Updated.
	* testsuite/ld-x86-64/pr20830b.d: New file.
	* testsuite/ld-x86-64/x86-64.exp: Rename pr20830 to pr20830a.
	Run pr20830b.
2017-01-10 13:57:39 -08:00
H.J. Lu fff53daefb i386/x86-64: Add unwind info for .plt.got section
When there are both PLT and GOT references to the same function symbol,
linker combines GOTPLT and GOT slots into a single GOT slot and create
an entry in .plt.got section for PLT access via the GOT slot.  This
patch adds unwind info for .plt.got section.

bfd/

	PR ld/20830
	* elf32-i386.c (elf_i386_eh_frame_plt_got): New.
	(PLT_GOT_FDE_LENGTH): Likewise.
	(elf_i386_plt_layout): Add eh_frame_plt_got and
	eh_frame_plt_got_size.
	(elf_i386_plt): Updated.
	(elf_i386_link_hash_table): Add plt_got_eh_frame.
	(elf_i386_check_relocs): Create .eh_frame section for .plt.got.
	(elf_i386_size_dynamic_sections): Allocate and initialize
	.eh_frame section for .plt.got.
	(elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
	.plt.got.
	(elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
	eh_frame_plt_got_size.
	* elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
	(PLT_GOT_FDE_LENGTH): Likewise.
	(elf_x86_64_backend_data): Add eh_frame_plt_got and
	eh_frame_plt_got_size.
	(elf_x86_64_arch_bed): Updated.
	(elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
	eh_frame_plt_got_size.
	(elf_x86_64_nacl_arch_bed): Likewise.
	(elf_x86_64_link_hash_table): Add plt_got_eh_frame.
	(elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
	(elf_x86_64_size_dynamic_sections): Allocate and initialize
	.eh_frame section for .plt.got.
	(elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
	for .plt.got.

ld/

	PR ld/20830
	* testsuite/ld-i386/i386.exp: Run pr20830.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
	* testsuite/ld-i386/pr20830.d: New file.
	* testsuite/ld-i386/pr20830.s: Likewise.
	* testsuite/ld-x86-64/pr20830.d: Likewise.
	* testsuite/ld-x86-64/pr20830.s: Likewise.
2017-01-10 13:31:59 -08:00
Alan Modra 5edad15d7c [GOLD] PowerPC64 TOC indirect to TOC relative code editing
Doesn't yet trim off the unused TOC entries.

	* powerpc.cc (class Powerpc_copy_relocs): New.
	(Powerpc_copy_relocs::emit): New function.
	(Powerpc_relobj::relatoc_, toc_, no_toc_opt_): New variables.
	(Powerpc_relobj::toc_shndx, set_no_toc_opt, no_toc_opt): New inlines.
	(Powerpc_relobj::do_relocate_sections): New function.
	(Powerpc_relobj::make_toc_relative): Likewise.
	(Powerpc_relobj::do_find_special_sections): Stash away .rela.toc
	and .toc too.
	(ok_lo_toc_insn): Move earlier, and handle more insns.
	(Target_powerpc::Scan::local): If optimizing toc accesses, set
	no_toc_opt for entries we can't edit.  Check insn validity.
	Emit "toc optimization is not supported" warning, downgraded
	from error.
	(Target_powerpc::Scan::global): Likewise.
	(Target_powerpc::Relocate::relocate): Edit TOC indirect code
	to TOC relative.  Don't emit "toc optimization is not supported"
	error here.
2017-01-11 07:41:53 +10:30
H.J. Lu f129e49f4d Don't use elf_i386_eh_frame_plt directly
Use eh_frame_plt_size and eh_frame_plt from elf_i386_plt_layout for
.eh_frame covering the .plt section.

	* elf32-i386.c (elf_i386_size_dynamic_sections): Set
	plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2017-01-10 11:30:25 -08:00
H.J. Lu e92372274e i386: Pass -Wl,-R,tmpdir/-Wl --as-needed to $CC
Since linker tests were changed to use $CC, instead of $LD, we need
to pass -Wl,-R,tmpdir and -Wl,--as-needed to $CC.

	* testsuite/ld-i386/i386.exp: Pass -Wl,-R,tmpdir to GCC driver.
	* testsuite/ld-i386/tls.exp: Likewise.
2017-01-10 10:58:51 -08:00
Simon Marchi 7becfd03ba Change return type of ui_out redirect to void
All implementations of redirect/do_redirect in the ui_out subsystem
always return 0 (success).  We can therefore clean it up and make them
return void.

gdb/ChangeLog:

	* cli-out.c (cli_ui_out::do_redirect): Change return type to
	void.
	* cli-out.h (cli_ui_out::do_redirect): Likewise.
	* mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
	* mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
	* ui-out.c (ui_out::redirect): Likewise.
	* ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
	* cli/cli-logging.c (set_logging_redirect): Update call site of
	ui_out::redirect.
	(handle_redirections): Likewise.
	* scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
	* top.c (execute_command_to_string): Likewise.
	* utils.c (do_ui_out_redirect_pop): Likewise.
2017-01-10 11:32:04 -05:00
Cary Coutant 98461510d3 Refactor Sized_relobj_file::do_relocate_sections.
gold/
	* aarch64.cc (AArch64_relobj::do_relocate_sections): Call
	Sized_relobj_file::relocate_section_range().
	* arm.cc (Arm_relobj::do_relocate_sections): Likewise.
	* object.h (Sized_relobj_file::relocate_section_range): New method.
	* reloc.cc (Sized_relobj_file::do_relocate_sections): Move
	implementation...
	(Sized_relobj_file::relocate_section_range): ...to new method.
2017-01-10 07:46:43 -08:00
Simon Marchi df2946549f Update help of the "frame" command
The help message of the "frame" command states that nothing is printed
if the command is executed from the command file or user-defined
command.  My testing leads me to think that this is not true (at least
today).

  (gdb) bt
  #0  bar (n=17) at test.c:9
  #1  0x00000000004006e0 in foo (v=17) at test.c:13
  #2  0x00000000004006f0 in main () at test.c:21
  (gdb) frame
  #0  bar (n=17) at test.c:9
  9	    baz(n);
  (gdb) define foo
  Type commands for definition of "foo".
  End with a line saying just "end".
  >frame 1
  >end
  (gdb) foo
  #1  0x00000000004006e0 in foo (v=17) at test.c:13
  13	    bar(v);

This patch simply removes that bit from the help message.  I didn't find
anything corresponding to this in the documentation that needs to be
fixed.

The behavior change corresponding to this documentation change was done
in commit b00771232f.

gdb/ChangeLog:

	* stack.c (_initialize_stack): Update "frame" command help message.
2017-01-10 10:18:08 -05:00
Tristan Gingold 1a94eb29d0 Fix sleb128-8 regressions.
gas/
	* testsuite/gas/all/sleb128-8.d: Adjust test.
	* testsuite/gas/all/gas.exp (test_cond): Likewise.
2017-01-10 14:43:28 +01:00
Nick Clifton b972a0d61a Fix compile time warning about pointer comparison.
PR 21034
	* stabs.c (parse_stab_members): Fix thinko checking for g++
	version 1 stabs information.
2017-01-10 11:45:12 +00:00
Nick Clifton 07e8e62387 Updated Swedish translations for GAS and LD 2017-01-10 11:28:36 +00:00
Graham Markall 07ccf83cf5 [ARC] Add new linker emulation for nps
The arc700 nps variant uses some specific named sections to
facilitate its CMEM based instructions, which operate on memory
regions fixed at specific addresses.

This commit adds the arclinux_nps emulation, which is based on the
arclinux emulation. The new emulation uses the OTHER_SECTIONS
variable in the emulation parameters script to provide symbols
mapping to various locations in the CMEM space on nps.

The accompanying test ensures that all symbols are provided at the
correct address in the linker script.

ld/ChangeLog:

  * Makefile.am: Add earclinux_nps.c target and add to
  ALL_EMULATION_SOURCES.
  * Makefile.in: Likewise, regenerated.
  * configure.tgt: Add arclinux_nps as an extra emulation for
  arc*-*-elf* and arc*-*-linux*.
  * emulparams/arc-nps.sh: New file.
  * emulparams/arclinux_nps.sh: New file.
  * testsuite/ld-arc/arclinux-nps.d,
  * testsuite/ld-arc/arclinux-nps.s: New test.
2017-01-10 10:55:13 +00:00
Tristan Gingold 74def31dcd This patch ensure same output for sleb128 with large number.
gas/
	* read.c (emit_leb128_expr): Extended unsigned big number for
	sleb128.
	* testsuite/gas/all/gas.exp (test_cond): Add sleb128-8 test.
	* testsuite/gas/all/sleb128.d: New test.
	* testsuite/gas/all/sleb128.s: New test source.
2017-01-10 10:23:23 +01:00
Alan Modra f7fd19e2b8 [GOLD] Fix tests for powerpc64
PowerPC64 defines .TOC. rather than _GLOBAL_OFFSET_TABLE_, and
what's more, doesn't define it at all unless referenced.  For ELFv1
ABI the symbol isn't normally referenced, so modify the test to accept
.TOC. as a variant of _GLOBAL_OFFSET_TABLE_ and 0 or 1 occurrences.

copy_test_relro as written doesn't need copy relocs on PowerPC64.
PowerPC64 is always PIC.  So, modify copy_test_relro to test that the
existing vars are in fact read-only directly by deliberately causing a
sigsegv, and add another couple of vars that do cause copy relocs even
when PIC.

	* testsuite/ver_test_8.sh: Accept .TOC. in lieu of
	_GLOBAL_OFFSET_TABLE_.  Allow zero count.
	* testsuite/copy_test_relro_1.cc (c, q): New vars.
	* testsuite/copy_test_relro.cc: Rewrite to test read-only
	status of variables directly.  Reference new vars in
	read-only data.
2017-01-10 11:50:07 +10:30
Alan Modra f159cdb611 [GOLD] Add --secure-plt option for ppc32
Added just to accept, and ignore.  gcc since 2015-10-21, when
configured with --enable-secureplt passes this option to the linker.
As powerpc gold cannot link --bss-plt code successfully, gold needs to
accept the option or the gcc specs file needs to be changed.

The patch also make gold detect --bss-plt code and error out rather
than producing a binary that crashes.

	* options.h: Add --secure-plt option.
	* powerpc.cc (Target_powerpc::Scan::local): Detect and error
	on -fPIC -mbss-plt code.
	(Target_powerpc::Scan::global): Likewise.
2017-01-10 11:50:07 +10:30
GDB Administrator eaa38cfd42 Automatic date update in version.in 2017-01-10 00:00:22 +00:00
Jim Wilson a4fb5981b7 Fix problems with the implementation of the uzp1 and uzp2 instructions.
sim/aarch64/
	* simulator.c (do_vec_UZP): Rewrite.
	sim/testsuite/sim/aarch64/
	* uzp.s: New.
2017-01-09 15:44:57 -08:00
Antoine Tremblay 694b382c67 Fix inferior memory reading in GDBServer for arm/aarch32
Before this patch, some functions would read the inferior memory with
(*the_target)->read_memory, which returns the raw memory, rather than the
shadowed memory.

This is wrong since these functions do not expect to read a breakpoint
instruction and can lead to invalid behavior.

Use of raw memory in get_next_pcs_read_memory_unsigned_integer for example
could lead to get_next_pc returning an invalid pc.

Here's how this would happen:

In non-stop:

the user issues:

thread 1
step&
thread 2
step&
thread 3
step&

In a similar way as non-stop-fair-events.exp (threads are looping).

GDBServer:

 linux_resume is called
 GDBServer has pending events,
 threads are not resumed and single-step breakpoint for thread 1 not installed.

 linux_wait_1 is called with a pending event on thread 2 at pc A
 GDBServer handles the event and calls proceed_all_lwps
 This calls proceed_one_lwp and installs single-step breakpoints on all
 the threads that need one.

 Now since thread 1 needs to install a single-step breakpoint and is at pc B
 (different than thread 2), a step-over is not initiated and get_next_pc
 is called to figure out the next instruction from pc B.

 However it may just be that thread 3 as a single step breakpoint at pc
 B. And thus get_next_pc fails.

This situation is tested with non-stop-fair-events.exp.

In other words, single-step breakpoints are installed in proceed_one_lwp
for each thread.  GDBserver proceeds two threads for resume_step, as
requested by GDB, and the thread proceeded later may see the single-step
breakpoints installed for the thread proceeded just now.

Tested on gdbserver-native/-m{thumb,arm} no regressions.

gdb/gdbserver/ChangeLog:

	* linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
	target_read_memory.
	* linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
	(get_next_pcs_syscall_next_pc): Likewise.
2017-01-09 12:39:07 -05:00
Andrew Waterman a5ec5e3fe1 RISC-V/GAS: Support more relocs against constant addresses
Previously, some pseudoinstructions like "call" only accepted
symbolic addresses and rejected constant addresses with an
esoteric internal error.  This patch enables them by deferring
application of constant relocations to md_apply_fix, rather than
eagerly applying them during instruction assembly.

gas/ChangeLog

2017-01-09  Andrew Waterman <andrew@sifive.com>

	* config/tc-riscv.c (append_insn): Don't eagerly apply relocations
	against constants.
	(md_apply_fix): Mark relocations against constants as "done."
2017-01-09 09:20:05 -08:00
Andrew Waterman e294484ee7 RISC-V/GAS: Improve handling of invalid relocs
TLS relocs against constants previously segfaulted, and illegal
symbol subtractions were silently ignored.

The previous behavior was to segfault.

gas/ChangeLog

2017-01-09  Andrew Waterman <andrew@sifive.com>

	* config/tc-riscv.c (md_apply_fix): Report TLS relocations against
	constants.  Report disallowed symbol subtractions.
2017-01-09 09:18:36 -08:00
Palmer Dabbelt 6ec11ab97a Remove some custom sections from RISC-V's default linker scripts
This was added so compressed loads could have smaller offsets for
accessing the data section, but the result was that writable sections
ended up in INITIAL_READONLY_SECTIONS.  This is a bad idea.  The fix is
to just remove this micro-optimization.

Thanks to Alan Morda for finding the problem!

ld/ChangeLog

2017-01-09  Palmer Dabbelt <palmer@dabbelt.com>
            Kito Cheng <kito.cheng@gmail.com>

        * emulparams/elf32lriscv-defs.sh (INITIAL_READONLY_SECTIONS):
        Removed.
        (SDATA_START_SYMBOLS): Likewise.
2017-01-09 09:12:20 -08:00
Nick Clifton cd6581da62 Speed up objdump when displaying disassembly mixed with line number and source code information.
bfd	* dwarf2.c (lookup_address_in_function_table): Return early if
	there are no functions in the given comp unit, or if the high
	address of the last function in the comp unit is less than the
	desired address.

binutils * objdump.c (display_file): Add new parameter 'last_file'.  If
	last_file is true, do not call bfd_close at the end of the
	function.
	(main): Set the value of the last_file parameter when calling
	display_file.
2017-01-09 16:49:48 +00:00
Nick Clifton 20b52c88ea Add Swedish translation for GAS.
* po/sv.po: New Swedish translation.
	* configure.ac (ALL_LINGUAS): Add sv.
	* configure: Regenerate.
2017-01-09 10:11:50 +00:00
Nick Clifton 98f02962fe Improve objdump's behaviour when it encounters a corrupt binary with an excessively large symbol table.
PR binutils/21013
	* coffgen.c (_bfd_coff_get_external_symbols): Generate an error
	message if there are too many symbols to load.
2017-01-09 09:27:46 +00:00
Andrew Waterman 011561117e RISC-V/GAS: Correct branch relaxation for weak symbols.
* config/tc-riscv.c (relaxed_branch_length): Use the long
	sequence when the target is a weak symbol.
2017-01-09 09:22:33 +00:00
Alan Modra 3254d32c4b [GOLD] Set sh_info of .rela.plt for powerpc
* powerpc.cc (Target_powerpc::make_plt_section): Point sh_info of
	".rela.plt" at ".plt".
2017-01-09 12:10:56 +10:30
Alan Modra 4d74727a4a .rela.dyn comment fix and add missing ChangeLog entry
ChangeLog entry missed from commit dd90581873.

	* readelf.c (process_section_headers): Correct .rel.dyn/.rela.dyn
	comment.
2017-01-09 12:10:55 +10:30
GDB Administrator a631dd7b79 Automatic date update in version.in 2017-01-09 00:00:20 +00:00
Iain Buclaw f5e6296e21 [D] Fix crash when debug expression enabled.
While casting works as expected with expression debugging turned off,
this seems to be an indication that the D language parser function is
doing something wrong in the building of the expression.

Without changing the grammar, using UNOP_CAST_TYPE is the right thing to
do here, as the TypeExp handler has already wrapped the type around a
pair of OP_TYPE opcodes.

gdb/ChangeLog:

	* d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.

gdb/testsuite/ChangeLog:

	* gdb.dlang/debug-expr.exp: New file.
2017-01-08 11:20:56 +01:00
GDB Administrator 2efa21564b Automatic date update in version.in 2017-01-08 00:00:24 +00:00
Andreas Krebbel 431e5de3f2 S/390: Issue error for overflowing relocs.
Building PIE executable from non-PIC code results in broken binaries.
With this patch the problem is detected at link-time.

bfd/ChangeLog:

2017-01-07  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* elf64-s390.c (elf_s390_relocate_section): Issue error for
	non-PLT relocs of shared libary symbol in exectuable.
2017-01-07 22:03:07 +01:00
Alan Modra 0e123f69da [GOLD] powerpc.cc tidies
Plus some paranoia in symval_for_branch.  We shouldn't get there with
dynamic symbols, but if we ever did the static_cast to Powerpc_relobj
would be wrong.

	* powerpc.cc: Use shorter equivalent elfcpp typedef for
	Reltype and reloc_size throughout.
	(Target_powerpc::symval_for_branch): Exclude dynamic symbols.
	(Target_powerpc::Scan::local): Use local var r_sym.
	(Target_powerpc::Scan::global: Likewise.
	(Target_powerpc::Relocate::relocate): Delete shadowing r_sym.
2017-01-07 22:04:51 +10:30
GDB Administrator a6eb589ffe Automatic date update in version.in 2017-01-07 00:00:21 +00:00
Yao Qi 0e2d6fa6a3 Include gdb_proc_service.h in x86-linux-nat.h
$ make check-headers CHECK_HEADERS="x86-linux-nat.h"
...
../../binutils-gdb/gdb/x86-linux-nat.h:29:8: error: 'ps_err_e' does not name a type
 extern ps_err_e x86_linux_get_thread_area (pid_t pid, void *addr,
        ^

gdb:

2017-01-06  Yao Qi  <yao.qi@linaro.org>

	* x86-linux-nat.h: Include gdb_proc_service.h.
2017-01-06 14:33:01 +00:00
Yao Qi 44d6d3f933 Include serial.h in ser-base.h.
$ make check-headers CHECK_HEADERS="ser-base.h"
...
../../binutils-gdb/gdb/ser-base.h:33:8: error: 'serial_ttystate' does not name a type
 extern serial_ttystate ser_base_get_tty_state (struct serial *scb);
        ^

gdb:

2017-01-06  Yao Qi  <yao.qi@linaro.org>

	* ser-base.h: Include serial.h.
2017-01-06 14:33:01 +00:00
Yao Qi 656731fe0f Include ppc-tdep.h in ppc-linux-tdep.h
$ make check-headers CHECK_HEADERS="ppc-linux-tdep.h"
...
../../binutils-gdb/gdb/ppc-linux-tdep.h:34:24: error: 'PPC_NUM_REGS' was not declared in this scope
   PPC_ORIG_R3_REGNUM = PPC_NUM_REGS,
                        ^

gdb:

2017-01-06  Yao Qi  <yao.qi@linaro.org>

	* ppc-linux-tdep.h: Include ppc-tdep.h.
2017-01-06 14:33:01 +00:00
Yao Qi 1ca8f924a4 Include signal.h in nat/amd64-linux-siginfo.h
$ make check-headers CHECK_HEADERS="nat/amd64-linux-siginfo.h"
....
../../binutils-gdb/gdb/nat/amd64-linux-siginfo.h:52:39: error: 'siginfo_t' was not declared in this scope
 int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
                                       ^
gdb:

2017-01-06  Yao Qi  <yao.qi@linaro.org>

	* nat/amd64-linux-siginfo.h: Include signal.h.
2017-01-06 14:33:01 +00:00
Yao Qi bc3008c48f Include break-common.h in nat/aarch64-linux-hw-point.h
$ make check-headers CHECK_HEADERS="nat/aarch64-linux-hw-point.h"
...
../../binutils-gdb/gdb/nat/aarch64-linux-hw-point.h:169:37: error: use of enum 'target_hw_bp_type' without previous declaration
 int aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr,
                                     ^
gdb:

2017-01-06  Yao Qi  <yao.qi@linaro.org>

	* nat/aarch64-linux-hw-point.h: Include break-common.h.
2017-01-06 14:33:01 +00:00
Yao Qi 66c80d0307 Include mi-cmds.h in mi-parse.h
$ make check-headers CHECK_HEADERS="mi/mi-parse.h"
...
../../binutils-gdb/gdb/mi/mi-parse.h:77:6: error: use of enum 'print_values' without previous declaration
 enum print_values mi_parse_print_values (const char *name);
      ^

gdb:

2017-01-06  Yao Qi  <yao.qi@linaro.org>

	* mi/mi-parse.h: Include mi-cmds.h.
2017-01-06 14:33:00 +00:00