• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/hjl/tls
RSS
Rev. Time Author
56dc8a5 users/hjl/tls 2017-08-05 02:37:02 H.J. Lu

x86: Lookup __tls_get_addr or ___tls_get_addr once

Instead of checking if a symbol is __tls_get_addr or ___tls_get_addr,
we check if there is a reference to __tls_get_addr or ___tls_get_addr
before starting relocation check.

* elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
to 1 bit.
(elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
(elf_i386_check_tls_transition): Check tls_get_addr directly.
(elf_i386_convert_load_reloc): Update tls_get_addr check.
(elf_i386_link_check_relocs): New function.
(bfd_elf32_bfd_link_check_relocs): New.
* elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
to 1 bit.
(elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
(elf_x86_64_check_tls_transition): Check tls_get_addr directly.
(elf_x86_64_convert_load_reloc): Update tls_get_addr check.
(elf_x86_64_link_check_relocs): New function.
(bfd_elf64_bfd_link_check_relocs): New.
(bfd_elf32_bfd_link_check_relocs): Likewise.

f02fd77 2017-08-05 00:06:01 Yao Qi

Unbreak GDBserver build for x32

When I verify my target description changes, I build GDB and GDBserver for
x32, but it failed.

/../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c
../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘const target_desc* get_ipa_tdesc(int)’:
../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:184:10: error: ‘X86_TDESC_AVX512’ was not declared in this scope
case X86_TDESC_AVX512:
^
../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:185:14: error: ‘tdesc_x32_avx512_linux’ was not declared in this scope
return tdesc_x32_avx512_linux;
^
../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘void initialize_low_tracepoint()’:
../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:282:36: error: ‘init_registers_x32_avx512_linux’ was not declared in this scope
init_registers_x32_avx512_linux ();
^

ipa_x32_linux_regobj use to be there, but removed by
22049425ce40324139be82d9a6ec518c46b65815 by mistake.

gdb/gdbserver:

2017-08-04 Yao Qi <yao.qi@linaro.org>

* configure.srv (ipa_x32_linux_regobj): New.
* linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
instead of X86_TDESC_AVX512.
(initialize_low_tracepoint): Call
init_registers_x32_avx_avx512_linux.

91975af 2017-08-04 22:27:58 Yao Qi

Add namespace std to nullptr_t

This patch fixes the build failure for target i686-w64-mingw32,

In file included from ../../binutils-gdb/gdb/defs.h:786:0,
from ../../binutils-gdb/gdb/gdb.c:19:
../../binutils-gdb/gdb/utils.h:188:20: error: ‘nullptr_t’ has not been declared
bool operator!= (nullptr_t)
^
../../binutils-gdb/gdb/utils.h:193:20: error: ‘nullptr_t’ has not been declared
bool operator== (nullptr_t)
^

gdb:

2017-08-04 Yao Qi <yao.qi@linaro.org>

* utils.h (gdb_argv): Add namespace std for nullptr_t.

9f06dab 2017-08-04 21:39:56 H.J. Lu

Add a testcase for "ld -d"

"ld -d" assigns space to common symbols even if a relocatable output
file is specified (with '-r').

PR ld/21904
* testsuite/ld-elf/pr21904.d: New file.
* testsuite/ld-elf/pr21904.s: Likewise.

223b97b 2017-08-04 14:44:44 James Clarke

Add --no-relax option.

gold/
* options.h (General_options): Set a non-NULL second help string
argument for relax to allow --no-relax.

a30d3a7 2017-08-04 09:00:52 GDB Administrator

Automatic date update in version.in

2331fa3 2017-08-04 04:23:22 Ruslan Kabatsayev

Add myself as a write-after-approval GDB maintainer.

744e4fe 2017-08-03 22:59:10 Tom Tromey

Remove make_cleanup_freeargv and gdb_buildargv

After the previous patches in this series, make_cleanup_freeargv and
gdb_buildargv are now unused and can be removed.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
Remove.
* utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.

1c034b6 2017-08-03 22:59:09 Tom Tromey

Use gdb_argv in Python

This changes one spot in the Python code to use gdb_argv. This
removes the last cleanup from the Python layer.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* python/py-param.c (compute_enum_values): Use gdb_argv.

773a1ed 2017-08-03 22:59:08 Tom Tromey

Introduce gdb_argv, a class wrapper for buildargv

This introduces gdb_argv, a class wrapping an "argv" pointer; that is,
a pointer to a NULL-terminated array of char*, where both the array
and each non-NULL element in the array are xmalloc'd.

This patch then changes most users of gdb_buildargv to use gdb_argv
instead.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* utils.h (struct gdb_argv_deleter): New.
(gdb_argv): New class.
* utils.c (gdb_argv::reset): New method.
* tracepoint.c (delete_trace_variable_command): Use gdb_argv.
* tracefile.c (tsave_command): Use gdb_argv.
* top.c (new_ui_command): Use gdb_argv.
* symmisc.c (maintenance_print_symbols)
(maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
* symfile.c (symbol_file_command, generic_load)
(remove_symbol_file_command): Use gdb_argv.
* stack.c (backtrace_command): Use gdb_argv.
* source.c (add_path, show_substitute_path_command)
(unset_substitute_path_command, set_substitute_path_command):
Use gdb_argv.
* skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
* ser-mingw.c (pipe_windows_open): Use gdb_argv.
* remote.c (extended_remote_run, remote_put_command)
(remote_get_command, remote_delete_command): Use gdb_argv.
* remote-sim.c (gdbsim_load, gdbsim_create_inferior)
(gdbsim_open): Use gdb_argv.
* python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
* psymtab.c (maintenance_print_psymbols): Use gdb_argv.
* procfs.c (procfs_info_proc): Use gdb_argv.
* interps.c (interpreter_exec_cmd): Use gdb_argv.
* infrun.c (handle_command): Use gdb_argv.
* inferior.c (add_inferior_command, clone_inferior_command):
Use gdb_argv.
* guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
* exec.c (exec_file_command): Use gdb_argv.
* cli/cli-cmds.c (alias_command): Use gdb_argv.
* compile/compile.c (build_argc_argv): Use gdb_argv.

0d50bde 2017-08-03 22:59:07 Tom Tromey

Remove a cleanup in Python

This removes cleanups from gdbpy_decode_line, in favor of a use of
unique_xmalloc_ptr.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.

7f968c8 2017-08-03 22:59:07 Tom Tromey

Avoid some manual memory management in Python

This changes a few places in the Python code to avoid manual memory
management, in favor of letting std::string do the work.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* python/python.c (compute_python_string): Return std::string.
(gdbpy_eval_from_control_command): Update.
(do_start_initialization): Use std::string.
* python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
xstrprintf.
* python/py-breakpoint.c (local_setattro): Use string_printf, not
xstrprintf.

3c9ebdd 2017-08-03 22:59:06 Tom Tromey

Replace do_restore_instream_cleanup with scoped_restore

This changes the users of do_restore_instream_cleanup to use a
scoped_restore instead. This patch is broken out because it warrants
some additional attention: in particular it's unclear to me whether
current_ui can change in the body of these functions -- but if it can,
then the cleanup would have modified a different UI's instream member.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* top.h (do_restore_instream_cleanup): Remove.
* top.c (do_restore_instream_cleanup): Remove.
(read_command_file): Use scoped_restore.
* cli/cli-script.c (execute_user_command): Use scoped_restore.

b51b225 2017-08-03 22:59:05 Tom Tromey

Use a scoped_restore for command_nest_depth

This changes a couple of places to use a scoped_restore when
manipulating command_nest_depth.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* cli/cli-script.c (execute_user_command)
(execute_control_command): Use scoped_restore.

ac99163 2017-08-03 22:59:04 Tom Tromey

Remove user_call_depth

This changes execute_user_command to remove user_call_depth, using the
size of user_args_stack instead. This avoids a cleanup.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* cli/cli-script.c (do_restore_user_call_depth): Remove.
(execute_user_command): Remove user_call_depth; use
user_args_stack's size instead.

898e0c8 2017-08-03 22:59:03 Tom Tromey

Remove in_user_command

While working on the next patch in this series, I found that the
global in_user_command is not used. This patch removes it. (I didn't
think to check Insight until submitting this series; and it's not very
convenient to do so, so if someone has it checked out and could look
at it, that would be nice.)

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* top.h (in_user_command): Remove.
* top.c (in_user_command): Remove.
* cli/cli-script.c (do_restore_user_call_depth)
(execute_user_command): Update.

26fcd5d 2017-08-03 22:59:02 Tom Tromey

Use containers to avoid cleanups

This patch introduces the use of various containers -- std::vector,
std::string, or gdb::byte_vector -- in several spots in gdb that were
using xmalloc and a cleanup.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* valops.c (search_struct_method): Use gdb::byte_vector.
* valarith.c (value_concat): Use std::vector.
* target.c (memory_xfer_partial): Use gdb::byte_vector.
(simple_search_memory): Likewise.
* printcmd.c (find_string_backward): Use gdb::byte_vector.
* mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
* gcore.c (gcore_copy_callback): Use gdb::byte_vector.
* elfread.c (elf_rel_plt_read): Use std::string.
* cp-valprint.c (cp_print_value): Use gdb::byte_vector.
* cli/cli-dump.c (restore_section_callback): Use
gdb::byte_vector.

7c218e6 2017-08-03 22:59:01 Tom Tromey

Use unique_xmalloc_ptr in jit.c

This removes some cleanups from jit.c by using unique_xmalloc_ptr
instead.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.

31b68d4 2017-08-03 22:59:01 Tom Tromey

Replace tui_restore_gdbout with scoped_restore

This patch replaces tui_restore_gdbout (a cleaup function) with a use
of scoped_restore. This one is broken out into its own patch because
it might slightly change the behavior of gdb: it saves and restores
pagination_enabled, whereas the tui_restore_gdbout unconditionally set
pagination_enabled to 1; and I think this warrants closer review.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* tui/tui-regs.c (tui_restore_gdbout): Remove.
(tui_register_format): Use scoped_restore.

2ec845e 2017-08-03 22:59:00 Tom Tromey

More uses of scoped_restore

There were a few more places in gdb that could easily use
scoped_restore, replacing some cleanups.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* reverse.c (exec_direction_default): Remove.
(exec_reverse_once): Use scoped_restore.
* remote.c (restore_remote_timeout): Remove.
(remote_flash_erase, remote_flash_write, remote_flash_done)
(readchar, remote_serial_write): Use scoped_restore.
* cli/cli-script.c (struct source_cleanup_lines_args)
(source_cleanup_lines): Remove.
(script_from_file): Use scoped_restore.
* cli/cli-cmds.c (source_verbose_cleanup): Remove.
(source_command): Use scoped_restore.

b3bc845 2017-08-03 22:58:59 Tom Tromey

Remove make_cleanup_free_so

make_cleanup_free_so is used in a single spot. This patch introduces
a unique pointer wrapper for struct so_list, and changes this spot to
use it.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* utils.h (make_cleanup_free_so): Remove.
* utils.c (do_free_so, make_cleanup_free_so): Remove.
* solist.h (struct so_deleter): New.
(so_list_up): New typedef.
* solib-svr4.c (svr4_read_so_list): Use so_list_up.

e3ad284 2017-08-03 22:58:58 Tom Tromey

Remove make_cleanup_restore_current_language

This patch replaces make_cleanup_restore_current_language with an RAII
class that saves the current language, and restores it when the object
is destroyed.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* utils.h (make_cleanup_restore_current_language): Remove.
* utils.c (do_restore_current_language)
(make_cleanup_restore_current_language): Remove.
* parse.c (parse_exp_in_context_1)
(parse_expression_with_language): Use
scoped_restore_current_language.
* mi/mi-main.c (mi_cmd_execute): Use
scoped_restore_current_language.
* language.h (scoped_restore_current_language): New class.

b80cf83 2017-08-03 22:58:57 Tom Tromey

Remove an unlink cleanup

compile/compile.c had its own cleanup to unlink a file. This patch
replaces this cleanup with gdb::unlinker.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* compile/compile.c (cleanup_unlink_file): Remove.
(compile_to_object): Use gdb::unlinker.
(eval_compile_command): Likewise.

fad0444 2017-08-03 22:58:56 Tom Tromey

Remove make_cleanup_fclose

After the preceding patches, make_cleanup_fclose is no longer used, so
remove it.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* utils.h (make_cleanup_fclose): Remove.
* utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.

6e7bc05 2017-08-03 22:58:55 Tom Tromey

Change open_terminal_stream to return a gdb_file_up

This changes open_terminal_stream to return a gdb_file_up, eliminating
another use of make_cleanup_fclose. Arguably perhaps new_ui should
take ownership of the files using a move, but there is at least one
spot where this isn't appropriate (or at least not currently done), so
I elected to use a more minimal approach.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* top.c (open_terminal_stream): Return gdb_file_up.
(new_ui_command): Update.

4a45905 2017-08-03 22:58:54 Tom Tromey

Use gdb_file_up in source.c

This changes some functions in source.c to use gdb_file_up.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* source.c (print_source_lines_base, forward_search_command)
(reverse_search_command): Use gdb_file_up.

7cd06d6 2017-08-03 22:58:54 Tom Tromey

Use gdb_file_up in fbsd-nat.c

This updates fbsd-nat.c to use gdb_file_up. This removes a use of a
cleanup, and helps remove make_cleanup_fclose in a later patch.

I have no way to test this patch.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* fbsd-nat.c (fbsd_find_memory_regions): Update.

ed16694 2017-08-03 22:58:53 Tom Tromey

Change return type of find_and_open_script

This changes find_and_open_script to return a
gdb::optional<open_script>, where open_script is a new type
encapsulating the two return values. The new type helps avoid
cleanups in the callers.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* cli/cli-cmds.c (find_and_open_script): Change return type.
Remove "streamp" and "full_path" parameters.
(source_script_with_search): Update.
* auto-load.c (source_script_file): Update.
* cli/cli-cmds.h (find_and_open_script): Change type.
(open_script): New struct.

d419f42 2017-08-03 22:58:52 Tom Tromey

Introduce and use gdb_file_up

This introduces gdb_file_up, a unique pointer holding a FILE*, and
then changes some code in gdb to use it. In particular
gdb_fopen_cloexec now returns a gdb_file_up. This allow removing some
cleanups.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* xml-support.c (xml_fetch_content_from_file): Update.
* ui-file.c (stdio_file::open): Update.
* tracefile-tfile.c (tfile_start): Update.
* remote.c (remote_file_put, remote_file_get): Update.
* nat/linux-procfs.c (linux_proc_get_int)
(linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
* nat/linux-osdata.c (linux_common_core_of_thread): Update.
(command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
(print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
(linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
* nat/linux-btrace.c (linux_determine_kernel_start): Update.
* linux-nat.c (linux_proc_pending_signals): Update.
* dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
(file_closer): Remove.
* compile/compile.c (compile_to_object): Update.
* common/filestuff.h (struct gdb_file_deleter): New.
(gdb_file_up): New typedef.
(gdb_fopen_cloexec): Change return type.
* common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
* cli/cli-dump.c (fopen_with_cleanup): Remove.
(dump_binary_file, restore_binary_file): Update.
* auto-load.c (auto_load_objfile_script_1): Update.

4a2b031 2017-08-03 22:58:51 Tom Tromey

Introduce and use ui_out_emit_table

This introduces ui_out_emit_table, similar to the other existing
ui_out RAII classes, and then uses it in a number of places. This
replaces some cleanups.

ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>

* tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
(info_static_tracepoint_markers_command): Likewise.
* solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
* skip.c (skip_info): Use ui_out_emit_table.
* progspace.c (print_program_space): Use ui_out_emit_table.
* osdata.c (info_osdata): Use ui_out_emit_table.
* mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
ui_out_emit_table.
* linux-thread-db.c (info_auto_load_libthread_db): Use
ui_out_emit_table.
* inferior.c (print_inferior): Use ui_out_emit_table.
* gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
* breakpoint.c (breakpoint_1): Use ui_out_emit_table.
* auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
* ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
* ui-out.h (class ui_out_emit_table): New.