• R/O
  • HTTP
  • SSH
  • HTTPS

提交列表

标签
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/pr22101
RSS
Rev. 时间 作者
c35b4e8 users/hjl/pr22101 2017-09-16 04:26:43 H.J. Lu

Remove invalid .dynamic section with --only-keep-debug

Remove invalid .dynamic section with --only-keep-debug.

bfd/

PR binutils/22101
* elf.c (rewrite_elf_program_header): Remove the segment from
output if all sections in input have been removed.

binutils/x

PR binutils/22101
* objcopy.c (strip_main): Also remove invalid .dynamic section
with --only-keep-debug.
(copy_main): Likewise.

79254a5 2017-09-15 04:45:18 H.J. Lu

globalaudit.rd: Allow additional bits in DT_FLAGS_1

With -PIE on x86-64, we get

0x000000006ffffffb (FLAGS_1) Flags: GLOBAUDIT PIE

We should allow additional bits in DT_FLAGS_1.

PR ld/22139
* testsuite/ld-elf/globalaudit.rd: Allow additional bits in
DT_FLAGS_1.

5e5e02a 2017-09-15 04:29:29 H.J. Lu

x86: Cache section contents and relocations

bfd/

PR ld/22135
* elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
to indicate if conversion is performed.
(elf_i386_check_relocs): Cache section contents and relocations
if conversion is performed.
* elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
contents and relocations if conversion is performed.

ld/

PR ld/22135
* testsuite/ld-i386/i386.exp: Run pr22135.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr22135.d: New file.
* testsuite/ld-i386/pr22135.s: Likewise.
* testsuite/ld-x86-64/pr22135.d: Likewise.
* testsuite/ld-x86-64/pr22135.s: Likewise.

26e53f3 2017-09-15 02:32:00 Pedro Alves

gdb.base/nodebug.exp: Rename called functions

I'm seeing these failures on my system:

FAIL: gdb.base/nodebug.exp: p (double) mult (2.0, 3.0)
FAIL: gdb.base/nodebug.exp: p ((double (*) (double, double)) mult)(2.0f, 3.0f)
FAIL: gdb.base/nodebug.exp: p ((double (*) (double, double)) mult)(2, 3)

The problem is simply that GDB is finding a symbol named "mult" from
glibc's debug info:

(gdb) ptype mult
type = enum expression_operator {var, num, lnot, mult, divide, module, plus, minus, less_than, greater_than, less_or_equal, greater_or_equal, equal, not_equal, land, lor, qmop}

(gdb) info types expression_operator
All types matching regular expression "expression_operator":

File plural-exp.h:
enum expression_operator;

Fix this by unloading symbols from shared libraries.

gdb/testsuite/ChangeLog:
2017-09-14 Pedro Alves <palves@redhat.com>

* gdb.base/nodebug.exp (nodebug_runto): New procedure.
(top level): Use it instead of runto.

eccd80d 2017-09-14 23:54:37 Simon Marchi

Make dwarf_expr_context::stack_empty_p return a bool

gdb/ChangeLog:

* dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
return type to bool.
* dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.

6900988 2017-09-14 23:14:35 Simon Marchi

Make dwarf_stack_value::in_stack_memory a bool

Replace int with bool, because that's what it is.

gdb/ChangeLog:

* dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
Change type to bool.
(dwarf_stack_value) <in_stack_memory>: Likewise.
(dwarf_expr_context) <push_address>: Change parameter type to
bool.
<fetch_in_stack_memory>: Change return type to bool.
<push>: Change parameter type to bool.
* dwarf2expr.c (dwarf_expr_context::push): Change parameter type
to bool.
(dwarf_expr_context::push_address): Likewise.
(dwarf_expr_context::fetch_in_stack_memory): Change return type
to bool.
(dwarf_expr_context::execute_stack_op): Adjust.
* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.

1e46716 2017-09-14 22:57:01 Simon Marchi

Make dwarf_expr_piece::pieces an std::vector

Change the manually managed array dwarf_expr_piece::piece with an
std::vector. After passing the pieces array to allocate_piece_closure,
dwarf2_evaluate_loc_desc_full doesn't need that data anymore. We can
therefore move the content of the vector to avoid copying it.

Reg-tested on the buildbot.

gdb/ChangeLog:

* dwarf2expr.h (struct dwarf_expr_piece): Move up.
(struct dwarf_expr_context) <n_pieces>: Remove.
<pieces>: Change type to std::vector.
* dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
(dwarf_expr_context::~dwarf_expr_context): Don't manually free
pieces.
(dwarf_expr_context::add_piece): Adjust.
* dwarf2loc.c (struct piece_closure): Initialize fields.
<n_pieces>: Remove.
<pieces>: Change type to std::vector.
(allocate_piece_closure): Adjust, change parameter to
std::vector rvalue and std::move it to piece_closure.
(rw_pieced_value): Adjust.
(check_pieced_synthetic_pointer): Adjust.
(indirect_synthetic_pointer): Adjust.
(coerce_pieced_ref): Adjust.
(free_pieced_value_closure): Adjust. Use delete to free
piece_closure.
(dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
to allocate_piece_closure.
(dwarf2_loc_desc_get_symbol_read_needs): Adjust.

4d465c6 2017-09-14 19:15:55 Nick Clifton

Fix address violation when parsing a corrupt PE binary.

PR binutils/22113
* peXXigen.c (pe_print_idata): Extend check for HintName vector
entries.

255300f 2017-09-14 18:04:18 matt rice

Add enable-gold and enable-ld to src-release

So that the tarball picks up gold bison output.

* src-release.sh (do_proto_toplev): Enable gold during release process.

2578f2f 2017-09-14 10:05:17 Alan Modra

PR22127, as segfaults assembling invalid .reloc

"sec" gets set to NULL on errors in the offset expression. This patch
disables part of the reloc expression processing that needs "sec"
valid. I didn't disable the entire reloc expression handling so that
errors in the reloc expression are reported even when the offset
expression has an error.

PR 22127
* write.c (resolve_reloc_expr_symbols): Don't segfault when
sec has been set to NULL.

0952b71 2017-09-14 09:00:26 GDB Administrator

Automatic date update in version.in

f47432d 2017-09-13 20:25:14 H.J. Lu

elfxx-x86.h: Fix a typo in comments

* elfxx-x86.h: Fix a typo in comments.

9f2815a 2017-09-13 09:00:31 GDB Administrator

Automatic date update in version.in

0782db8 2017-09-12 21:15:23 Simon Marchi

probe: Replace VEC(probe_ops_cp) with std::vector

This patch replaces the usage of VEC to store pointers to probe_ops with
an std::vector. The sole usage of that vector type is one global
variable that holds the ops for the various kinds of probes, so this is
pretty straightforward (no allocation/deallocation issues).

gdb/ChangeLog:

* probe.h (probe_ops_cp): Remove typedef.
(DEF_VEC_P (probe_ops_cp)): Remove.
(all_probe_ops): Change type to std::vector.
* probe.c (info_probes_for_ops): Adjust to vector change.
(probe_linespec_to_ops): Likewise.
(all_probe_ops): Change type to std::vector.
(_initialize_probe): Adjust to vector change.
* dtrace-probe.c (_initialize_dtrace_probe): Likewise.
* elfread.c (elf_get_probes): Likewise.
* stap-probe.c (_initialize_stap_probe): Likewise.

1eac6be 2017-09-12 20:55:32 Simon Marchi

Make collect_probes return an std::vector

Change collect_probes so it returns an std::vector<bound_probe> instead
of a VEC(bound_probe_s). This allows removing some cleanups. It also
seems like enable_probes_command and disable_probes_command were not
freeing that vector.

The comparison function compare_probes needs to be updated to return a
bool indicating whether the first parameter is "less than" the second
parameter.

I defined two constructors to bound_probe. The default constructor is
needed, for example, so the instance in struct bp_location can be
constructed without parameters. The constructor with parameters is
useful so we can use emplace_back and pass the values directly.

The s390 builder on the buildbot shows a weird failure that I can't
explain:

../../binutils-gdb/gdb/elfread.c: In function void probe_key_free(bfd*, void*):
../../binutils-gdb/gdb/elfread.c:1346:8: error: types may not be defined in a for-range-declaration [-Werror]
for (struct probe *probe : *probes)
^~~~~~

I guess it's a bug with that specific version< of the compiler, since no
other gcc gives me that error. It is using:

g++ (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)

Any idea about this problem?

gdb/ChangeLog:

* probe.h (struct bound_probe): Define constructors.
* probe.c (bound_probe_s): Remove typedef.
(DEF_VEC_O (bound_probe_s)): Remove VEC.
(collect_probes): Change return type to std::vector, remove
cleanup.
(compare_probes): Return bool, change parameter type. Change
semantic to "less than".
(gen_ui_out_table_header_info): Change parameter to std::vector
and update.
(exists_probe_with_pops): Likewise.
(info_probes_for_ops): Update to std::vector change.
(enable_probes_command): Likewise.
(disable_probes_command): Likewise.

aaa63a3 2017-09-12 20:37:00 Simon Marchi

Make probe_ops::get_probes fill an std::vector

This patch changes one usage of VEC to std::vector. It is a relatively
straightforward 1:1 change. The implementations of
sym_probe_fns::sym_get_probes return a borrowed reference to their probe
vectors, meaning that the caller should not free it. In the new code, I
made them return a const reference to the vector.

This patch and the following one were tested by the buildbot. I didn't
see any failures that looked related to this one.

gdb/ChangeLog:

* probe.h (struct probe_ops) <get_probes>: Change parameter from
vec to std::vector.
* probe.c (parse_probes_in_pspace): Update.
(find_probes_in_objfile): Update.
(find_probe_by_pc): Update.
(collect_probes): Update.
(probe_any_get_probes): Update.
* symfile.h (struct sym_probe_fns) <sym_get_probes> Change
return type to reference to std::vector.
* dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
std::vector and update.
(dtrace_process_dof): Likewise.
(dtrace_get_probes): Likewise.
* elfread.c (elf_get_probes): Change return type to std::vector,
store an std::vector in bfd_data.
(probe_key_free): Update to std::vector.
* stap-probe.c (handle_stap_probe): Change parameter to
std::vector and update.
(stap_get_probes): Likewise.
* symfile-debug.c (debug_sym_get_probes): Change return type to
std::vector and update.

331f81b 2017-09-12 09:00:28 GDB Administrator

Automatic date update in version.in

cb85b21 2017-09-12 07:15:14 Tom Tromey

Remove make_show_memory_breakpoints_cleanup

This removes make_show_memory_breakpoints_cleanup, replacing it with
make_scoped_restore_show_memory_breakpoints and updating all callers.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* breakpoint.c (program_breakpoint_here_p): Update.
* target.c (make_scoped_restore_show_memory_breakpoints): Rename
from make_show_memory_breakpoints_cleanup. Return a
scoped_restore_tmpl<int>.
(restore_show_memory_breakpoints): Remove.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
* mem-break.c (memory_validate_breakpoint): Update.
* ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
(ia64_memory_remove_breakpoint): Update.
(ia64_breakpoint_from_pc): Update.
* target.h (make_scoped_restore_show_memory_breakpoints): Rename
from make_show_memory_breakpoints_cleanup.

8fbc99e 2017-09-12 07:15:13 Tom Tromey

Use std::string in d-namespace.c

This removes some cleanups from d-namespace.c by replacing manual
string management with std::string.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* d-namespace.c (d_lookup_symbol): Use std::string.
(find_symbol_in_baseclass): Likewise.

50feb4b 2017-09-12 07:15:12 Tom Tromey

Use std::string in ctf_start

This changes ctf_start to use std::string, allowing for some cleanup
removal.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* ctf.c (ctf_start): Use std::string.

c6dc63a 2017-09-12 07:15:11 Tom Tromey

Remove cleanups from find_frame_funname

This changes find_frame_funname to return a unique_xmalloc_ptr and
then fixes up the callers. This removes several cleanups.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* ada-lang.c (is_known_support_routine): Update.
(ada_unhandled_exception_name_addr_from_raise): Update.
* guile/scm-frame.c (gdbscm_frame_name): Update.
* python/py-frame.c (frapy_name): Update.
(frapy_function): Update.
* stack.h (find_frame_funname): Update.
* stack.c (find_frame_funname): Return unique_xmalloc_ptr.
(print_frame): Update.

d6b9b80 2017-09-12 07:15:10 Tom Tromey

Remove cleanups from findcmd.c

This removes cleanups from findcmd.c, replacing manual buffer
management with a gdb::byte_vector.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* findcmd.c (put_bits): Take a gdb::byte_vector.
(parse_find_args): Return gdb::byte_vector. "args" now const.
Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
cleanups.
(find_command): Update.

a992162 2017-09-12 07:15:09 Tom Tromey

Replace clear_hook_in_cleanup with scoped_restore_hook_in

This removes clear_hook_in_cleanup in favor of a scoped_restore-like
class. scoped_restore itself can't be used because hook_in is a
bitfield.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* cli/cli-script.c (class scoped_restore_hook_in): New.
(clear_hook_in_cleanup): Remove.
(execute_cmd_pre_hook, execute_cmd_post_hook): Use
scoped_restore_hook_in.

be0d7ab 2017-09-12 07:15:08 Tom Tromey

Replace interp_set_temp with scoped_restore_interp

This removes interp_set_temp and an associated cleanup, in favor of a
new RAII class, scoped_restore_interp.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* cli/cli-script.c (restore_interp): Remove.
(read_command_lines): Use scoped_restore_interp.
* interps.c (scoped_restore_interp::set_temp): Rename from
interp_set_temp.
* interps.h (class scoped_restore_interp): New.
(interp_set_temp): Remove.

00f675f 2017-09-12 07:15:07 Tom Tromey

Change setup_breakpoint_reporting to return a scoped_restore

This changes setup_breakpoint_reporting to return a scoped_restore,
allowing for some cleanup removal.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* mi/mi-cmd-catch.c (mi_cmd_catch_assert)
(mi_cmd_catch_exception, mi_catch_load_unload): Update.
* mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
scoped_restore.
(mi_cmd_break_insert_1): Update.
* mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
scoped_restore.

cb791d5 2017-09-12 06:46:14 Tom Tromey

Make extract_arg return a std::string

Change extract_arg to return a std::string and fix up all the users.
I think string is mildly better than unique_xmalloc_ptr<char>, when
possible, because it provides a more robust API.

I changed the error messages emitted from find_location_by_number to
avoid either writing to a string or an extra allocation; this can be
changed but I thought that the new message was not any less clear.
You can see an example in the testsuite patch.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* demangle.c (demangle_command): Update.
* breakpoint.c (disable_command): Update.
(enable_command): Update.
(find_location_by_number): Make "number" const. Use
get_number_trailer.
* cli/cli-utils.c (extract_arg): Return std::string.
* probe.c (parse_probe_linespec): Update. Change types.
(collect_probes): Take string arguments.
(parse_probe_linespec): Likewise.
(info_probes_for_ops): Update.
(enable_probes_command): Update.
(disable_probes_command): Update.
* break-catch-sig.c (catch_signal_split_args): Update.
* mi/mi-parse.c (mi_parse): Update.

testsuite/ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* gdb.base/ena-dis-br.exp (test_ena_dis_br): Update test.

2039bd9 2017-09-12 06:46:13 Tom Tromey

Constify language_enum

Change language_enum to take a const argument.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* language.h (language_enum): Make argument const.
* language.c (language_enum): Make argument const.

f1735a5 2017-09-12 06:46:12 Tom Tromey

Rename _const functions to use overloading instead

This renames a few functions -- skip_spaces_const,
skip_to_space_const, get_number_const, extract_arg_const -- to drop
the "_const" suffix and instead rely on overloading.

This makes future const fixes simpler by reducing the number of lines
that must be changed. I think it is also not any less clear, as all
these functions have the same interface as their non-const versions by
design. Furthermore there's an example of using an overload in-tree
already, namely check_for_argument.

This patch was largely created using some perl one-liners; then a few
fixes were applied by hand.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* common/common-utils.h (skip_to_space): Remove macro, redeclare
as function.
(skip_to_space): Rename from skip_to_space_const.
* common/common-utils.c (skip_to_space): New function.
(skip_to_space): Rename from skip_to_space_const.
* cli/cli-utils.h (get_number): Rename from get_number_const.
(extract_arg): Rename from extract_arg_const.
* cli/cli-utils.c (get_number): Rename from get_number_const.
(extract_arg): Rename from extract_arg_const.
(number_or_range_parser::get_number): Use ::get_number.
* aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.

7d221d7 2017-09-12 05:15:22 Tom Tromey

Make it simpler to add events to Python

The first patch in this series went through several iterations as I'd
forgotten how many places had to be touched to add a new event and a
new event type.

This patch simplifies the process using two new ".def" files. Now, a
new event type can be added by adding a line to "py-event-types.def",
and a new event registry can be added by adding a line to
"py-all-events.def".

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* python/python.c (do_start_initialization): Use
py-event-types.def to initialize types.
Define all object type structures.
* python/python-internal.h: Don't declare event initialization
functions.
* python/py-threadevent.c (thread_event_object_type): Don't
define.
* python/py-stopevent.c (stop_event_object_type): Don't define.
* python/py-signalevent.c (signal_event_object_type): Don't
declare or define.
* python/py-newobjfileevent.c (new_objfile_event_object_type)
(clear_objfiles_event_object_type): Don't declare or define.
* python/py-infevents.c (inferior_call_pre_event_object_type)
(inferior_call_post_event_object_type)
(register_changed_event_object_type)
(memory_changed_event_object_type): Don't declare or define.
* python/py-inferior.c (new_thread_event_object_type)
(new_inferior_event_object_type)
(inferior_deleted_event_object_type): Don't declare or define.
* python/py-exitedevent.c (exited_event_object_type): Don't
declare or define.
* python/py-evts.c (gdbpy_initialize_py_events): Use
py-all-events.def.
* python/py-events.h (thread_event_object_type): Don't declare.
(events_object): Use py-all-events.def.
* python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
py-event-types.def.
* python/py-event-types.def: New file.
* python/py-continueevent.c (create_continue_event_object): Don't
declare or define.
* python/py-bpevent.c (breakpoint_event_object_type): Don't
declare or define.
* python/py-all-events.def: New file.

35c61a1 2017-09-12 05:15:21 Tom Tromey

Small event ownership clean up in Python layer

It seems cleaner to me for functions like create_thread_event_object,
which pass object ownership to their callers, to directly return a
gdb_ref<>. This way the ownership transfer is part of the API. This
patch makes this change.

ChangeLog
2017-09-11 Tom Tromey <tom@tromey.com>

* python/py-threadevent.c (create_thread_event_object): Return
gdbpy_ref.
* python/py-stopevent.h (create_stop_event_object)
(create_breakpoint_event_object, create_signal_event_object):
Update.
* python/py-stopevent.c (create_stop_event_object): Return
gdbpy_ref.
(emit_stop_event): Update.
* python/py-signalevent.c (create_signal_event_object): Return
gdbpy_ref.
* python/py-infevents.c (create_inferior_call_event_object):
Update.
* python/py-event.h (create_event_object)
(create_thread_event_object): Update.
* python/py-event.c (create_event_object): Return gdbpy_ref.
* python/py-continueevent.c: Return gdbpy_ref.
* python/py-bpevent.c (create_breakpoint_event_object): Return
gdbpy_ref.