original patches were posted:
pe/coff: Display GUID build-id in the conventional way
pe/coff: Don't interpret debug directory in section with no contents
pe/coff: Keep .build-id with --only-keep-debug
pe/coff: Don't break .build-id with objcopy/strip
* peXXigen.c (pe_print_debugdata): Don't interpret debug directory
in a section with no contents.
(is_vma_in_section, find_section_by_vma): New functions.
(_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file
offsets in the debug directory.
(_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
Byte-swap GUID from little-endian to big-endian order for
consistent and conventional display.
* objcopy.c (is_nondebug_keep_contents_section): New function.
(setup_section): Use it.
or 64-bit doubles. It also makes the linker complain if the user attempts
to link together binaries with different sized doubles.
* elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if
64-bit doubles objects mix with 32-bit doubles objects.
(rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag.
* readelf.c (get_machine_flags): Handle RL78 64-bit doubles flag.
* config/tc-rl78.c (enum options): Add OPTION_32BIT_DOUBLES
and OPTION_64BIT_DOUBLES.
(md_longopts): Add -m32bit-doubles and -m64bit-doubles.
(md_parse_option): Parse -m32bit-doubles and -m64bit-doubles.
(md_show_usage): Show all of the RL78 options.
(rl78_float_cons): New static functions.
(md_pseudo_table): Update handler for "double".
gdb/testsuite/
2014-05-16 Pedro Alves <palves@redhat.com>
* lib/mi-support.exp (mi_expect_stop): On timeout, say "timeout"
instead of "unknown output after running".
Some gdb.dwarf2/*.exp tests copy file1.txt to host via gdb_remote_download
but dw2-filename.exp and dw2-anonymous-func.exp don't do that. Looks like
an oversight in this patch
https://sourceware.org/ml/gdb-patches/2013-08/msg00365.html
There are some fails in remote host testing.
FAIL: gdb.dwarf2/dw2-anonymous-func.exp: list file1.txt
FAIL: gdb.dwarf2/dw2-filename.exp: interpreter-exec mi -file-list-exec-source-files
FAIL: gdb.dwarf2/dw2-filename.exp: info sources
This patch is to invoke gdb_remote_download to copy file1.txt to host
and remote it at the end. This patch fixes these fails above.
gdb/testsuite:
2014-05-16 Yao Qi <yao@codesourcery.com>
* gdb.dwarf2/dw2-filename.exp: Copy file1.txt to host. Remove
file1.txt from host at the end.
* gdb.dwarf2/dw2-anonymous-func.exp: Likewise.
Pierre proposed this patch
https://sourceware.org/ml/gdb-patches/2013-10/msg00011.html and
Tom gave a suggestion that it's better to do check \t in print_wchar
<https://sourceware.org/ml/gdb-patches/2013-11/msg00148.html>
However, I don't see the follow-up to this discussion.
We encounter two fails in printcmds.exp on mingw host, and Pierre's
patch fixes them. I pick it up, update a little per Tom's
comments, and post it here for review. This patch fixes these fails
below on mingw32 host.
FAIL: gdb.base/charset.exp: print string in ASCII
FAIL: gdb.base/charset.exp: try printing '\t' in ASCII
FAIL: gdb.base/charset.exp: print string in ISO-8859-1
FAIL: gdb.base/charset.exp: try printing '\t' in ISO-8859-1
FAIL: gdb.base/charset.exp: print string in UTF-32
FAIL: gdb.base/charset.exp: try printing '\t' in UTF-32
FAIL: gdb.base/printcmds.exp: p ctable1[9]
FAIL: gdb.base/printcmds.exp: p &ctable1[1*8]
Also regression tested on x86_64-linux. Is it OK?
gdb:
2014-05-16 Pierre Muller <muller@sourceware.org>
Yao Qi <yao@codesourcery.com>
* valprint.c (print_wchar): Move the code on checking whether
W is a printable wide char to the default branch of switch
statement below. Call wchar_printable instead of gdb_iswprint.
Prologue analysis for ldr.w and ldrd instruction obtains offset from
first two bytes that contains opcode of instruction. It should obtain
offset from next two bytes that actually contain operands.
* arm-tdep.c (thumb_analyze_prologue): Fix offset calculation for
ldr.w and ldrd instructions.
Signed-off-by: Taimoor Mirza <tmirza@codesourcery.com>
Since we're not compiling with gcc, we don't know where the
DWO file will ultimately be built. It could be built in
testsuite/gdb.dwarf2/foo (non-parallel mode) or
testsuite/outputs/gdb.dwarf2/foo (parallel mode).
* gdb.dwarf2/fission-reread.S: Remove directory from .dwo file path.
* gdb.dwarf2/fission-reread.exp: Set debug-file-directory before
loading file. Add test for TU lookup.
Passing arguments did not work when use_mi_command was set.
gdb/testsuite/ChangeLog:
2014-05-13 Simon Marchi <simon.marchi@ericsson.com>
* lib/mi-support.exp (mi_run_cmd_full): Set arguments by calling
"-exec-arguments" or "set args" before running the inferior.
The message displayed by gdb is different when the inferior exits with
zero and non-zero values, this fix takes that into account.
gdb/testsuite/ChangeLog:
2014-05-13 Simon Marchi <simon.marchi@ericsson.com>
* lib/mi-support.exp (mi_expect_stop): Expect message for
inferiors that exit with non-zero exit code.
When linking statically, it's possible to hit this warning with IFUNC
or very large executables, due to .glink being unused.
* powerpc.cc (do_plt_fde_location): Handle zero length .glink.
Compare FDE contents with DW_CFA_nop rather than 0.
I happened to notice that print_macro_definition is indented
improperly. All the lines were a few extra spaces to the right.
This patch fixes the indentation.
Tested by rebuilding, committed.
2014-05-14 Tom Tromey <tromey@redhat.com>
* macrocmd.c (print_macro_definition): Reindent.
This patch fixes mi-file.exp fails on remote host. First, we can't
assume ${srcdir}/${subdir}/${srcfile} directory exists on remote host,
so this patch changes it to match ${srcfile} only on remote host.
Second, regexp pattern ".*/${srcfile}" isn't friendly to Windows path.
The file name is "basics.c" in my test env and can't match the pattern
due to "/" in it. Remove "/" from the pattern.
gdb/testsuite:
2014-05-14 Yao Qi <yao@codesourcery.com>
* gdb.mi/mi-file.exp (test_file_list_exec_source_file): Don't
match absolute path on remote host.
(test_file_list_exec_source_files): Remove "/" from the
pattern.
After I run test like this,
$ make check RUNTESTFLAGS='--host_board=local-remote-host dw2-basic.exp'
gdb.dwarf2/file1.txt in source tree was removed. In some gdb.dwarf2/*.exp,
file1.txt is copied to host and then removed at the end. However, in
local-remote-host-notty.exp, ${board}_download doesn't copy the file but
return the absolute path of the src file. 'remote_file host delete' at
the end will remove the file in source tree.
This patch is to overwrite ${board}_file, and specially make "delete"
option do nothing. This approach is used in gdbserver-base.exp and
remote-stdio-gdbserver.exp too.
gdb/testsuite:
2014-05-14 Yao Qi <yao@codesourcery.com>
* boards/local-remote-host-notty.exp (${board}_file): New
proc.
should_resume is set to 1 at the beginning and never changed.
gdb/ChangeLog:
2014-05-13 Simon Marchi <simon.marchi@ericsson.com>
* infrun.c (resume): Remove should_resume (unused). Move up
declaration of resume_ptid.
to access a global as it expects a GOTPCREL relocation. This is really not
necessary as the linker could use a copy relocation to get around it. This
patch enables copy relocations with pie.
Context:
This is useful because currently the GCC compiler with option -fpie makes
every extern global access go through the GOT. That is because the compiler
cannot tell if a global will end up being defined in the executable or not
and is conservative. This ends up hurting performance when the binary is linked
as mostly static where most of the globals do end up being defined in the
executable. By allowing copy relocs with fPIE, the compiler need not generate
a GOTPCREL(GOT access) for any global access. It can safely assume that all
globals will be defined in the executable and generate a PC-relative access
instead. Gold can then create a copy reloc for only the undefined globals.
gold/
* symtab.h (may_need_copy_reloc): Remove check for position independent
code.
* x86_64.cc (Target_x86_64<size>::Scan::global): Add check for no
position independence before pc absolute may_need_copy_reloc call.
Add check for executable output befor pc relative may_need_copy_reloc
call.
* i386.cc: Ditto.
* arm.cc: Ditto.
* sparc.cc: Ditto.
* tilegx.cc: Ditto.
* powerpc.cc: Add check for no position independence before
may_need_copy_reloc calls.
* testsuite/pie_copyrelocs_test.cc: New file.
* testsuite/pie_copyrelocs_shared_test.cc: New file.
* Makefile.am (pie_copyrelocs_test): New test.
* Makefile.in: Regenerate.
This patch removes an unused macro from language.h. It also removes
the declaration of a function which is not defined.
I'm checking this in as obvious.
Tested by rebuilding.
2014-05-13 Tom Tromey <tromey@redhat.com>
* language.h (unop_type_check): Remove.
(binop_type_check): Don't declare.
With -pie and x86, the linker complains if it sees a PC-relative relocation
to access a global as it expects a GOTPCREL relocation. This is really not
necessary as the linker could use a copy relocation to get around it. This
patch enables copy relocations with pie.
Context:
This is useful because currently the GCC compiler with option -fpie makes
every extern global access go through the GOT. That is because the compiler
cannot tell if a global will end up being defined in the executable or not
and is conservative. This ends up hurting performance when the binary is linked
as mostly static where most of the globals do end up being defined in the
executable. By allowing copy relocs with fPIE, the compiler need not generate
a GOTPCREL(GOT access) for any global access. It can safely assume that all
globals will be defined in the executable and generate a PC-relative access
instead. Gold can then create a copy reloc for only the undefined globals.
gas/
* config/tc-mips.c (mips_set_options): Rename gp32 to gp throughout.
(HAVE_32BIT_GPRS, HAVE_64BIT_GPRS): Remove. Re-implement via GPR_SIZE.
(HAVE_32BIT_FPRS, HAVE_64BIT_FPRS): Remove. Re-implement via FPR_SIZE.
(GPR_SIZE, FPR_SIZE): New macros. Use throughout.
In mi_interpreter_init, multiple MI consoles/channels are created and a quoting
character is given. In mi_console_raw_packet, we check if the value is not 0
to decide if we should quote the string, but we don't use the value. It is
hardcoded to ". We might never use another quoting character than an actual
quote, but I suggest we change it, for correctness. There is not visible
behavior change.
I changed the latest fputs_unfiltered changed to fputc_unfiltered just to stay
consistent.
gdb/ChangeLog:
2014-05-12 Simon Marchi <simon.marchi@ericsson.com>
* mi/mi-console.c (mi_console_raw_packet): Use the value from
mi_console->quote as the quoting character.
ld:
* ldlang.c (lang_finish): Don't call bfd_link_hash_table_free here.
(output_bfd_hash_table_free_fn): New variable.
(open_output): Save the _bfd_link_hash_table_free function for the
output_bfd into output_bfd_hash_table_free_fn.
* ldmain.c (ld_cleanup): If set, call output_bfd_hash_table_free_fn
on link_info.hash.
* ldlang.h (output_bfd_hash_table_free_fn): Declare.
ld/testsuite:
* ld-mmix/wrap1.d, ld-mmix/wrap1a.s, ld-mmix/wrap1b.s,
ld-mmix/wrap1c.s, ld-mmix/wrap2.d, ld-mmix/wrap3.d,
ld-mmix/wrap3a.s, ld-mmix/wrap3b.s, ld-mmix/wrap4.d: New
tests.
gas/
* config/tc-mips.c (mips_set_options): Rename fp32 field to fp.
Update fp32 == 0 to fp == 64 and fp32 == 1 to fp != 64 throughout.
(file_mips_gp32, file_mips_fp32, file_mips_soft_float,
file_mips_single_float, file_mips_isa, file_mips_arch): Merge into
one struct...
(file_mips_opts): Here. New static global. Update throughout.
(mips_opts): Update defaults for gp32 and fp.
* cp-demangle.c (struct d_component_stack): New structure.
(struct d_print_info): New field component_stack.
(d_print_init): Initialize the above.
(d_print_comp_inner): Renamed from d_print_comp.
Do not restore template stack if it would cause a loop.
(d_print_comp): New function.
* testsuite/demangle-expected: New test cases.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210205 138bc75d-0d04-0410-961f-82ee72b054a4