• 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/qiyao/regcache-split-3
RSS
Rev. Hora Autor
11fc8ec users/qiyao/regcache-split-3 2017-10-13 19:52:12 Yao Qi

regcache_raw and use it in to_{fetch,store}_registers

This patch adds a new class regcache_raw, between reg_buffer and regcache
in the class hierarchy. Also use it in target_ops
to_{fetch,store}_registers methods, because target_ops accesses raw
registers. (pseudo registers are abstracted by gdbarch).

gdb:

2017-10-03 Yao Qi <yao.qi@linaro.org>
:
* aarch32-linux-nat.c (aarch32_gp_regcache_supply): -
(aarch32_gp_regcache_supply): +
(aarch32_gp_regcache_supply):
(aarch32_gp_regcache_collect): -
(aarch32_gp_regcache_collect): +
(aarch32_gp_regcache_collect):
(aarch32_vfp_regcache_supply): -
(aarch32_vfp_regcache_supply): +
(aarch32_vfp_regcache_supply):
(aarch32_vfp_regcache_collect): -
(aarch32_vfp_regcache_collect): +
* aarch32-linux-nat.h:
* aarch64-linux-nat.c (aarch64_get_debug_reg_state):
(fetch_gregs_from_thread): -
(fetch_gregs_from_thread): +
(fetch_gregs_from_thread):
(store_gregs_to_thread): -
(store_gregs_to_thread): +
(store_gregs_to_thread):
(fetch_fpregs_from_thread): -
(fetch_fpregs_from_thread): +
(fetch_fpregs_from_thread):
(store_fpregs_to_thread): -
(store_fpregs_to_thread): +
(store_fpregs_to_thread):
(aarch64_linux_fetch_inferior_registers):
* arch-utils.c (default_addressable_memory_unit_size):
* arch-utils.h (extern const char *default_gnu_triplet_regexp):
* arm-linux-tdep.c (static struct tramp_frame arm_kernel_linux_restart_syscall_tramp_frame = {):
(arm_linux_supply_gregset):
(arm_linux_collect_gregset):
(supply_nwfpe_register): -
(supply_nwfpe_register): +
(supply_nwfpe_register):
(collect_nwfpe_register): -
(collect_nwfpe_register): +
(collect_nwfpe_register):
(arm_linux_supply_nwfpe):
(arm_linux_collect_nwfpe):
(arm_linux_supply_vfp):
* arm-linux-tdep.h (void arm_linux_collect_gregset):
* corelow.c (core_detach):
(get_core_register_section): -
(get_core_register_section): +
(get_core_registers_cb):
* gdbarch.c (set_gdbarch_fast_tracepoint_valid_at):
(gdbarch_guess_tracepoint_registers): -
(gdbarch_guess_tracepoint_registers): +
* gdbarch.h (extern void set_gdbarch_fast_tracepoint_valid_at):
* gdbarch.sh (m;int;fast_tracepoint_valid_at;CORE_ADDR addr, char **msg;addr, msg;;default_fas):
* gdbcore.h (struct core_fns):
* inf-child.c (store_waitstatus):
(inf_child_fetch_inferior_registers):
(inf_child_post_attach):
* inf-ptrace.c (static CORE_ADDR):
(inf_ptrace_fetch_register): -
(inf_ptrace_fetch_register): +
(inf_ptrace_fetch_register):
(inf_ptrace_fetch_registers):
(inf_ptrace_store_register): -
(inf_ptrace_store_register): +
(inf_ptrace_store_register):
* record-btrace.c (record_btrace_remove_breakpoint):
(record_btrace_fetch_registers):
(record_btrace_store_registers):
* record-full.c (static void record_full_save):
(record_full_reg_alloc): -
(record_full_reg_alloc): +
(record_full_get_loc):
(record_full_arch_list_add_reg): -
(record_full_arch_list_add_reg): +
(record_full_supports_stopped_by_hw_breakpoint):
(record_full_registers_change): -
(record_full_registers_change): +
(record_full_registers_change):
(record_full_core_kill):
(record_full_core_fetch_registers):
(record_full_core_prepare_to_store):
* record-full.h:
* regcache.c (regcache_register_size):
(regcache::regcache):
(regcache::arch):
(regcache_get_ptid): -
(regcache_get_ptid): +
(class regcache_invalidator):
(public:):
(public:):
(get_regcache_arch): -
(get_regcache_arch): +
(regcache_dup):
(regcache_register_status): -
(regcache_register_status): +
(reg_buffer::set_register_status):
(regcache_invalidate): -
(regcache_invalidate): +
(registers_changed):
(regcache_raw_update): -
(regcache_raw_update): +
(regcache_raw_update):
(regcache::raw_update):
(regcache_raw_read): -
(regcache_raw_read): +
(regcache_raw_read_signed):
(regcache_raw_write_signed):
(regcache_raw_write):
(reg_buffer::raw_supply_zeroed):
(regcache_raw_collect): -
(regcache_raw_collect): +
(reg_buffer::transfer_regset):
(reg_buffer::supply_regset):
(regcache_write_pc):
* regcache.h (struct regcache;):
(extern struct regcache *get_thread_arch_aspace_regcache):
(extern enum register_status):
(extern void regcache_write_pc):
(enum):
(private:):
(public:):
(public:):
(public:):
(public:):
(private:):
* regset.h (struct regcache;):
* remote.c (static int getpkt_or_notif_sane):
(remote_wait):
(fetch_register_using_p): -
(fetch_register_using_p): +
(send_g_packet):
(process_g_packet): -
(process_g_packet): +
(process_g_packet):
(fetch_registers_using_g): -
(fetch_registers_using_g): +
(set_remote_traceframe):
(remote_fetch_registers):
(remote_prepare_to_store): -
(remote_prepare_to_store): +
(remote_prepare_to_store):
(store_register_using_P): -
(store_register_using_P): +
(store_register_using_P):
(store_registers_using_G): -
(store_registers_using_G): +
(store_registers_using_G):
* s390-linux-tdep.c (s390_write_pc):
* target-debug.h:
* target-delegates.c (debug_wait):
(delegate_fetch_registers): -
(delegate_fetch_registers): +
(tdefault_fetch_registers): -
(tdefault_fetch_registers): +
(debug_fetch_registers): -
(debug_fetch_registers): +
(delegate_store_registers): -
(delegate_store_registers): +
(tdefault_store_registers): -
(tdefault_store_registers): +
(debug_store_registers): -
(debug_store_registers): +
(delegate_prepare_to_store): -
(delegate_prepare_to_store): +
(tdefault_prepare_to_store): -
(tdefault_prepare_to_store): +
(debug_prepare_to_store): -
(debug_prepare_to_store): +
* target.c (target_options_to_string):
(target_fetch_registers): -
(target_fetch_registers): +
(target_fetch_registers):
(target_store_registers): -
(target_store_registers): +
* target.h (struct target_ops):
(extern ptid_t default_target_wait):
* tracefile-tfile.c (traceframe_find_block_type):
* tracefile.c (trace_save_ctf):
(tracefile_fetch_registers): -
(tracefile_fetch_registers): +
* tracefile.h (extern struct trace_file_writer *tfile_trace_file_writer_new):

ee085f4 2017-10-13 19:52:11 Yao Qi

Simplify {supply,fill}_{g,fp}regset

{supply,fill}_{g,fp}regset methods need only to access reg_buffer, instead
of regcache, so this patch change parameter type to reg_buffer.

Only works for aarch64 native

gdb:

2017-10-02 Yao Qi <yao.qi@linaro.org>
:
* aarch64-linux-nat.c (aarch64_linux_store_inferior_registers):
(fill_gregset): -
(fill_gregset): +
(supply_gregset): -
(supply_gregset): +
(supply_gregset):
(fill_fpregset): -
(fill_fpregset): +
(supply_fpregset): -
(supply_fpregset): +
* gregset.h (struct regcache;):

c2db73a 2017-10-13 19:52:11 Yao Qi

Move more supply and collect methods to reg_buffer

This patch moves more supply and collect methods to class reg_buffer

gdb:

2017-09-22 Yao Qi <yao.qi@linaro.org>
:
* regcache.c (reg_buffer::raw_collect_integer):
(regcache_supply_regset):
(regcache_collect_regset):
* regcache.h (public:):
(public:):
(private:):

21be975 2017-10-13 19:52:11 Yao Qi

Remove MAX_REGISTER_SIZE in record-full.c

This patch changes record_full_core_regbuf from "gdb_byte *" to
reg_buffer. As a result, MAX_REGISTER_SIZE is removed.

gdb:

2017-09-22 Yao Qi <yao.qi@linaro.org>
:
* record-full.c (struct record_full_core_buf_entry):
(record_full_core_open_1):
(record_full_close):
(record_full_core_fetch_registers):
(record_full_core_store_registers):
* regcache.h (public:):

2d6f8f5 2017-10-13 19:52:11 Yao Qi

New class reg_buffer

This patch splits regcache, moves part of it to reg_buffer, which is a
buffer to hold register contents, and also their status. reg_buffer may
or may not hold pseudo registers. Class reg_buffer has methods supply and
collect.

gdb:

2017-09-22 Yao Qi <yao.qi@linaro.org>
:
* regcache.c (regcache_descr):
(regcache_register_size):
(get_regcache_aspace):
(regcache::save):
(regcache::save):
(regcache::restore):
(regcache_register_status):
(regcache::get_register_status):
(regcache::invalidate):
(regcache::raw_update):
(regcache::raw_read):
(regcache::cooked_read):
(regcache::cooked_read_value):
(regcache_raw_set_cached_value):
(regcache_raw_supply):
(regcache::raw_supply):
(regcache::raw_supply_integer):
(regcache_raw_collect):
(regcache::raw_collect):
* regcache.h (typedef struct cached_reg):
(public:):
(public:):
(protected:):
(private:):

9fa4f9d 2017-10-13 19:52:10 Yao Qi

Simplify xfer_part

Since xfer_part is already a class method, and only
{raw,cooked}_{read,write} are passed to it. We can remove these two
arguments, but add a bool argument is_raw, indicating raw registers or
cooked registers are accessed.

gdb:

2017-10-03 Yao Qi <yao.qi@linaro.org>
:
* regcache.c (typedef void):
(regcache::xfer_part):
(regcache::xfer_part):
(enum register_status):
(regcache::raw_write_part):
(enum register_status):
(regcache::cooked_write_part):
(regcache_raw_supply): -
(regcache_raw_supply): +
(aarch32_gp_regcache_supply): -
(aarch32_gp_regcache_supply): +
(aarch32_gp_regcache_supply):
(aarch32_gp_regcache_collect): -
(aarch32_gp_regcache_collect): +
(aarch32_gp_regcache_collect):
(aarch32_vfp_regcache_supply): -
(aarch32_vfp_regcache_supply): +
(aarch32_vfp_regcache_supply):
(aarch32_vfp_regcache_collect): -
(aarch32_vfp_regcache_collect): +
(aarch64_get_debug_reg_state):
(fetch_gregs_from_thread): -
(fetch_gregs_from_thread): +
(fetch_gregs_from_thread):
(store_gregs_to_thread): -
(store_gregs_to_thread): +
(store_gregs_to_thread):
(fetch_fpregs_from_thread): -
(fetch_fpregs_from_thread): +
(fetch_fpregs_from_thread):
(store_fpregs_to_thread): -
(store_fpregs_to_thread): +
(store_fpregs_to_thread):
(aarch64_linux_fetch_inferior_registers):
(default_addressable_memory_unit_size):
(extern const char *default_gnu_triplet_regexp):
(static struct tramp_frame arm_kernel_linux_restart_syscall_tramp_frame = {):
(arm_linux_supply_gregset):
(arm_linux_collect_gregset):
(supply_nwfpe_register): -
(supply_nwfpe_register): +
(supply_nwfpe_register):
(collect_nwfpe_register): -
(collect_nwfpe_register): +
(collect_nwfpe_register):
(arm_linux_supply_nwfpe):
(arm_linux_collect_nwfpe):
(arm_linux_supply_vfp):
(void arm_linux_collect_gregset):
(core_detach):
(get_core_register_section): -
(get_core_register_section): +
(get_core_registers_cb):
(set_gdbarch_fast_tracepoint_valid_at):
(gdbarch_guess_tracepoint_registers): -
(gdbarch_guess_tracepoint_registers): +
(extern void set_gdbarch_fast_tracepoint_valid_at):
(m;int;fast_tracepoint_valid_at;CORE_ADDR addr, char **msg;addr, msg;;default_fas):
(struct core_fns):
(store_waitstatus):
(inf_child_fetch_inferior_registers):
(inf_child_post_attach):
(static CORE_ADDR):
(inf_ptrace_fetch_register): -
(inf_ptrace_fetch_register): +
(inf_ptrace_fetch_register):
(inf_ptrace_fetch_registers):
(inf_ptrace_store_register): -
(inf_ptrace_store_register): +
(inf_ptrace_store_register):
(record_btrace_remove_breakpoint):
(record_btrace_fetch_registers):
(record_btrace_store_registers):
(static void record_full_save):
(record_full_reg_alloc): -
(record_full_reg_alloc): +
(record_full_get_loc):
(record_full_arch_list_add_reg): -
(record_full_arch_list_add_reg): +
(record_full_supports_stopped_by_hw_breakpoint):
(record_full_registers_change): -
(record_full_registers_change): +
(record_full_registers_change):
(record_full_core_kill):
(record_full_core_fetch_registers):
(record_full_core_prepare_to_store):
(regcache_register_size):
(regcache::regcache):
(regcache::arch):
(regcache_get_ptid): -
(regcache_get_ptid): +
(class regcache_invalidator):
(public:):
(public:):
(get_regcache_arch): -
(get_regcache_arch): +
(regcache_dup):
(regcache_register_status): -
(regcache_register_status): +
(reg_buffer::set_register_status):
(regcache_invalidate): -
(regcache_invalidate): +
(registers_changed):
(regcache_raw_update): -
(regcache_raw_update): +
(regcache_raw_update):
(regcache::raw_update):
(regcache_raw_read): -
(regcache_raw_read): +
(regcache_raw_read_signed):
(regcache_raw_write_signed):
(regcache_raw_write):
(reg_buffer::raw_supply_zeroed):
(regcache_raw_collect): -
(regcache_raw_collect): +
(reg_buffer::transfer_regset):
(reg_buffer::supply_regset):
(regcache_write_pc):
(struct regcache;):
(extern struct regcache *get_thread_arch_aspace_regcache):
(extern enum register_status):
(extern void regcache_write_pc):
(enum):
(private:):
(public:):
(public:):
(public:):
(public:):
(private:):
(struct regcache;):
(static int getpkt_or_notif_sane):
(remote_wait):
(fetch_register_using_p): -
(fetch_register_using_p): +
(send_g_packet):
(process_g_packet): -
(process_g_packet): +
(process_g_packet):
(fetch_registers_using_g): -
(fetch_registers_using_g): +
(set_remote_traceframe):
(remote_fetch_registers):
(remote_prepare_to_store): -
(remote_prepare_to_store): +
(remote_prepare_to_store):
(store_register_using_P): -
(store_register_using_P): +
(store_register_using_P):
(store_registers_using_G): -
(store_registers_using_G): +
(store_registers_using_G):
(s390_write_pc):
(debug_wait):
(delegate_fetch_registers): -
(delegate_fetch_registers): +
(tdefault_fetch_registers): -
(tdefault_fetch_registers): +
(debug_fetch_registers): -
(debug_fetch_registers): +
(delegate_store_registers): -
(delegate_store_registers): +
(tdefault_store_registers): -
(tdefault_store_registers): +
(debug_store_registers): -
(debug_store_registers): +
(delegate_prepare_to_store): -
(delegate_prepare_to_store): +
(tdefault_prepare_to_store): -
(tdefault_prepare_to_store): +
(debug_prepare_to_store): -
(debug_prepare_to_store): +
(target_options_to_string):
(target_fetch_registers): -
(target_fetch_registers): +
(target_fetch_registers):
(target_store_registers): -
(target_store_registers): +
(struct target_ops):
(extern ptid_t default_target_wait):
(traceframe_find_block_type):
(trace_save_ctf):
(tracefile_fetch_registers): -
(tracefile_fetch_registers): +
(extern struct trace_file_writer *tfile_trace_file_writer_new):

e8b8ffd 2017-10-11 09:00:22 GDB Administrator

Automatic date update in version.in

0f09b4d 2017-10-11 07:52:39 H.J. Lu

x86: Set GOT refcount to 1

Since x86 check_relocs is called after opening all inputs and garbage
collection, they never see the removed sections. There is no need
for incrementing GOT refcount. But since PLT refcount is also used in

/* Don't create the PLT entry if there are only function pointer
relocations which can be resolved at run-time. */
else if (htab->elf.dynamic_sections_created
&& (h->plt.refcount > eh->func_pointer_refcount
|| eh->plt_got.refcount > 0))
{

we must increment it.

* elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
instead of incrementing it.
* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.

2f20e31 2017-10-11 04:10:25 Simon Marchi

get_integer_valueof: Don't output value in test name

The get_integer_valueof outputs the value it has read as part of the
test name. This causes test names to vary from run to run, and adds
some noise when diffing test results. e.g.:

-PASS: gdb.threads/process-dies-while-detaching.exp: multi-process: continue: killed outside: get integer valueof "mypid" (28770)
+PASS: gdb.threads/process-dies-while-detaching.exp: multi-process: continue: killed outside: get integer valueof "mypid" (32238)

This patch removes that, since it's probably not very useful.

gdb/testsuite/ChangeLog:

* lib/gdb.exp (get_integer_valueof): Don't output read value in test name.

eb8c0d3 2017-10-11 04:01:42 Tom Tromey

Bump dwarf-mode version number

Bump the dwarf-mode version number, so it can be installed by package.el
users who installed an earlier verision.

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

* dwarf-mode.el: Bump to version 1.4.

c85fa91 2017-10-11 04:01:42 Tom Tromey

Asynchronous insertion for dwarf-mode.el

I was recently examining a very large .debug file. I tried to use
dwarf-mode, but it blocked Emacs for a very long time while reading
output.

This patch changes dwarf-mode to run the objdump process asynchronously.
This way, I can still do other things in Emacs while waiting for the
dumping to finish.

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

* dwarf-mode.el (dwarf--process, dwarf--deletion-region): New
defvar.
(dwarf--check-running, dwarf--sentinel, dwarf--invoke)
(dwarf--filter): New functions.
(dwarf-do-insert-substructure, dwarf-do-refresh): Call
dwarf--check-running, dwarf--invoke.
(dwarf-browse): Initialize new variables.

e4905c7 2017-10-11 04:01:42 Tom Tromey

Set lexical-binding in dwarf-mode

Emacs has had lexical binding for a while, and it's a good practice to
use it; so enable it in dwarf-mode.el.

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

* dwarf-mode.el: Set lexical-binding.

22b6379 2017-10-11 04:01:42 Tom Tromey

Bind keys in dwarf-mode-map definition

It's bad Emacs style to define keys from a top-level form. Instead, one
should define a mode map separately and binding keys in the definition.
This lets users completely override the map by defining it before
loading the mode.

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

* dwarf-mode.el (dwarf-mode-map): New defvar.

6563036 2017-10-11 01:01:25 Pedro Alves

Eliminate catch_exceptions/catch_exceptions_with_msg

This patch gets rid of catch_exceptions / catch_exceptions_with_msg.
The latter is done mostly by getting rid of the three remaining
vestigial libgdb wrapper functions, which are really pointless
nowadays. This results in a good number of simplifications.

(I checked that Insight doesn't use those functions.)

The gdb.mi/mi-pthreads.exp change is necessary because this actually
fixes a bug, IMO -- the patch stops MI's -thread-select causing output
on the CLI stream.

I.e., before:
-thread-select 123456789
&"Thread ID 123456789 not known.\n"
^error,msg="Thread ID 123456789 not known."
(gdb)

After:
-thread-select 123456789
^error,msg="Thread ID 123456789 not known."
(gdb)

gdb/ChangeLog
2017-10-10 Pedro Alves <palves@redhat.com>
Tom Tromey <tom@tromey.com>

* breakpoint.c (struct captured_breakpoint_query_args)
(do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
(print_breakpoint): New.
* breakpoint.h (print_breakpoint): Declare.
* common/common-exceptions.h (enum return_reason): Remove
references to catch_exceptions.
* exceptions.c (catch_exceptions, catch_exceptions_with_msg):
Delete.
* exceptions.h (catch_exceptions_ftype, catch_exceptions)
(catch_exception_ftype, catch_exceptions_with_msg): Delete.
* gdb.h: Delete.
* gdbthread.h (thread_select): Declare.
* mi/mi-cmd-break.c: Don't include gdb.h.
(breakpoint_notify): Use print_breakpoint.
* mi/mi-cmd-catch.c: Don't include gdb.h.
* mi/mi-interp.c: Don't include gdb.h.
(mi_print_breakpoint_for_event): New.
(mi_breakpoint_created, mi_breakpoint_modified): Use
mi_print_breakpoint_for_event.
* mi/mi-main.c: Don't include gdb.h.
(mi_cmd_thread_select): Parse the global thread ID here. Use
thread_select instead of gdb_thread_select.
(mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
of using gdb_list_thread_ids.
* remote-fileio.c (do_remote_fileio_request): Change type. Reply
FILEIO_ENOSYS here.
(remote_fileio_request): Use TRY/CATCH instead of
catch_exceptions.
* symfile-mem.c (struct symbol_file_add_from_memory_args)
(symbol_file_add_from_memory_wrapper): Delete.
(add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
* thread.c: Don't include gdb.h.
(do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
(thread_alive): Use thread_select.
(do_captured_thread_select): Delete, parts salvaged as ...
(thread_select): ... this new function.
(gdb_thread_select): Delete.

gdb/testsuite/ChangeLog
2017-10-10 Pedro Alves <palves@redhat.com>

* gdb.mi/mi-pthreads.exp (check_mi_thread_command_set): Don't
expect CLI output.

bf46927 2017-10-11 00:45:50 Pedro Alves

Eliminate catch_errors

If you want to use catch_errors with a function with parameters, then
currently you have to manually write a "capture" struct wrapping the
arguments and marshall/unmarshall that.

https://sourceware.org/ml/gdb-patches/2017-09/msg00834.html proposed
adjusting catch_errors to use gdb::function_view, which would allow
passing lambdas with automatic captures. However, it seems like using
TRY/CATCH directly instead ends up producing clearer and easier to
debug code. This is what this commit does.

Note that removing catch_errors exposes further cleanup opportunities
around no longer having to follow catch_errors callback type, and also
removes a few cleanups.

I didn't do anything to save/restore current_uiout because I think
that should be the responsibility of the code that changes
current_uiout in the first place.

(Another approach could be to make catch_errors a variadic template
like:

template<typename Function, typename... Args>
int catch_errors (const char *errstring, return_mask mask,
Function &&func, Args... args);

and then with:

extern void function_with_args (int, int);
extern void function_with_no_args ();

calls to the above functions would be wrapped like this:

catch_errors ("some error happened", RETURN_MASK_ERROR,
function_with_args, arg1, arg2);

catch_errors ("some error happened", RETURN_MASK_ERROR,
function_with_no_args);

but I'm thinking that that doesn't improve much if at all either.)

gdb/ChangeLog
2017-10-10 Pedro Alves <palves@redhat.com>
Tom Tromey <tom@tromey.com>

* breakpoint.c (breakpoint_cond_eval): Change return type to bool
and reverse logic.
(WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
No longer macros. Instead ...
(enum wp_check_result): They're now values of this new
enumeration.
(watchpoint_check): Change return type to wp_check_result and
parameter type to bpstat.
(bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
(bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
catch_errors. Reverse logic of watchpoint_check call.
(breakpoint_re_set_one): Now returns void and takes a breakpoint
pointer as parameter.
(breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
* common/common-exceptions.c (throw_exception_sjlj): Update
comments to avoid mentioning catch_errors.
* exceptions.c (catch_errors): Delete.
* exceptions.h: Update comments to avoid mentioning catch_errors.
(catch_errors_ftype, catch_errors): Delete.
* infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
(hook_stop_stub): Delete.
(restore_selected_frame): Change return type to void, and
parameter type to const frame_id &.
(restore_infcall_control_state): Use TRY/CATCH instead of
catch_errors.
* main.c (captured_command_loop): Return void and remove
parameter. Remove references to catch_errors.
(captured_main): Use TRY/CATCH instead of catch_errors.
* objc-lang.c (objc_submethod_helper_data)
(find_objc_msgcall_submethod_helper): Delete.
(find_objc_msgcall_submethod): Use TRY/CATCH instead of
catch_errors.
* record-full.c (record_full_message): Return void.
(record_full_message_args, record_full_message_wrapper): Delete.
(record_full_message_wrapper_safe): Return bool and use TRY/CATCH
instead of catch_errors.
* solib-aix.c (solib_aix_open_symbol_file_object): Change
parameter type to int.
* solib-darwin.c (open_symbol_file_object): Ditto.
* solib-dsbt.c (open_symbol_file_object): Ditto.
* solib-frv.c (open_symbol_file_object): Ditto.
* solib-svr4.c (open_symbol_file_object): Ditto.
* solib-target.c (solib_target_open_symbol_file_object): Ditto.
* solib.c (update_solib_list): Use TRY/CATCH instead of
catch_errors.
* solist.h (struct target_so_ops) <open_symbol_file_object>:
Change type.
* symmisc.c (struct print_symbol_args): Remove.
(dump_symtab_1): Use TRY/CATCH instead of catch_errors.
(print_symbol): Change type.
* windows-nat.c (handle_load_dll, handle_unload_dll): Return void
and remove parameters.
(catch_errors): New.
(get_windows_debug_event): Adjust.

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

* lib/selftest-support.exp (selftest_setup): Update for
captured_command_loop's prototype change.

6c69971 2017-10-11 00:18:07 Renlin Li

[ARM] PR ld/21402, only override the symbol dynamic decision on undefined weak symbol.

Similar as aarch64 backend, arm backend only overrides the decision on undefined
weak symbols. arm backend part already emits necessary relative relocation for
this case.

bfd/

PR ld/21402
* elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
symbols into dynamic.

ld/

PR ld/21402
* testsuite/ld-arm/tls-app.d: Update address.
* testsuite/ld-arm/tls-app.r: Remove relocations.
* testsuite/ld-arm/unresolved-1-dyn.d: Update.

ae7e782 2017-10-10 21:37:58 Nick Clifton

Improve the speed of the --dwarf-start option by skipping processing of any comp unit that ends before the specified start address.

PR 22249
* dwarf.c (process_debug_info): Skip any comp unit that ends
before dwarf_start_die.

fc3c534 2017-10-10 14:04:00 H.J. Lu

riscv: Cache the max alignment of output sections

Cache the max alignment of output sections instead of scanning all
output sections for each input section, which can take a very long
time if there are millions of input/output sections.

PR ld/22274
* elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
(riscv_elf_link_hash_table_create): Initialize max_alignment to
(bfd_vma) -1.
(_bfd_riscv_relax_section): Cache the max alignment of output
sections if possible.

b9399fc 2017-10-10 13:16:07 Alan Modra

Prepare powerpc64 for late check_relocs

check_relocs was setting up some data used by the --gc-sections
gc_mark_hook. If we change ld to run check_relocs after gc_sections
that data needs to be set up elsewhere. Done by this patch in the
backend check_directives function (ppc64_elf_before_check_relocs).

* elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
.opd whenever .opd is present and non-zero size. Move code
setting abiversion to/from output file earlier. Only set
u.opd.func_sec when --gc-sections. Read relocs and set up
u.opd.func_sec values here..
(ppc64_elf_check_relocs): ..rather than here. Simplify opd
section tests.
(ppc64_elf_edit_opd): Don't set sec_type for .opd here.

cbd3b1c 2017-10-10 13:14:58 Alan Modra

Correct ld/Makefile earmelfb_fuchsia dependencies

There were two copies of earmelf_fuchsia.c dependencies.

* Makefile.am (earmelfb_fuchsia.c): Rename rule from earmelf_fuchsia.c.
* Makefile.in: Regenerate.

f8f762b 2017-10-10 09:00:24 GDB Administrator

Automatic date update in version.in

1a56bfa 2017-10-10 08:39:29 Tom Tromey

Remove free_splay_tree cleanup

One spot in gdb uses a cleanup to free a splay tree. This patch
introduces a unique_ptr specialization for this case.

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

* mi/mi-main.c (free_splay_tree): Remove.
(list_available_thread_groups): Use splay_tree_up.
* common/gdb_splay_tree.h: New file.

0c478e2 2017-10-10 08:39:29 Tom Tromey

Remove "do_nothing"

The do_nothing function in mi-main.c is used as a splay tree
key-deleting function; but NULL serves the same purpose and is used
elsewhere in gdb. This patch removes the unneeded function.

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

* mi/mi-main.c (do_nothing): Remove.
(list_available_thread_groups): Update.

478c006 2017-10-10 07:05:03 H.J. Lu

mn10300: Don't free cached internal symbol table

Since ELF linker may cache internal symbol table in init_reloc_cookie,
we should check if it is cached, before free it.

* elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
isymbuf.

9d45a7d 2017-10-10 04:45:57 H.J. Lu

bfin: Don't create .interp section for info->nointerp

Don't create the .interp section with "ld --no-dynamic-linker". This
fixed:

FAIL: PR ld/20828 forcibly exported symbol version without section GC
FAIL: PR ld/20828 forcibly exported symbol version with section GC
FAIL: readelf version information

* elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
.interp section with "ld --no-dynamic-linker".

777a42f 2017-10-10 02:11:02 Pedro Alves

gdb.multi/multi-arch-exec.exp: Also test -m32 => -m64

The gdb.multi/multi-arch-exec.exp testcase currently tests execing
from -m64 to -m32, but does not test the other direction. For
thoroughness, this commit fixes that. Without the fix in the previous
commit for example ("Multi-arch exec, more register reading
avoidance"), on x86_64 we would get different symptoms depending on
"execing direction". Vis:

Continuing.
Truncated register 50 in remote 'g' packet
Truncated register 50 in remote 'g' packet
(gdb) FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=2: follow_exec_mode=same: continue across exec that changes architecture

Vs:

Continuing.
Remote 'g' packet reply is too long (expected 440 bytes, got 816 bytes): daffffffffffffff0000[snip]
Remote 'g' packet reply is too long (expected 440 bytes, got 816 bytes): daffffffffffffff0000[snip]
(gdb) FAIL: gdb.multi/multi-arch-exec.exp: first_arch=2: selected_thread=2: follow_exec_mode=same: continue across exec that changes architecture

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

Test both arch1=>arch2 and arch2=>arch1.

* gdb.multi/multi-arch-exec.exp (exec1, srcfile1, binfile1, exec2)
(srcfile2, binfile2, march1, march2): Remove globals. Largely
factored out to...
(append_arch1_options, append_arch2_options, append_arch_options)
(build_executables): New procedures.
(do_test): New 'first_arch' parameter. Use it to define 'from_exec'
local.
(top level): Add new 'first_arch' testing axis.

cbd2b4e 2017-10-10 02:11:01 Pedro Alves

Multi-arch exec, more register reading avoidance

As mentioned in commit bf93d7ba9931 ("Add thread after updating
gdbarch when exec'ing"), we should avoid doing register reads after a
process does an exec and before we've updated that inferior's gdbarch.
Otherwise, we may interpret the registers using the wrong
architecture.

There's still (at least) one case where we still read registers
post-exec with the pre-exec architecture. That's when infrun decides
it needs to switch context to the exec'ing thread. I.e., if the exec
event is processed at a time when the current thread is not already
the exec'ing thread, then we get (with the test added by this commit):

continue
Continuing.
Truncated register 50 in remote 'g' packet
Truncated register 50 in remote 'g' packet
(gdb) FAIL: gdb.multi/multi-arch-exec.exp: selected_thread=2: follow_exec_mode=same: continue across exec that changes architecture

The fix is to avoid reading registers when switching context in this
case.

(I'd be nice to get rid of the constant stop_pc reading when switching
threads, but that'd be a deeper change.)

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

* infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
reading registers when switching context.

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

* gdb.multi/multi-arch-exec.c: Include <pthread.h> and <assert.h>.
(barrier): New.
(thread_start, all_started): New functions.
(main): Spawn new thread and wait until it is scheduled.
* gdb.multi/multi-arch-exec.exp: Build $srcfile1 with the pthreads
option.
(do_test): Add 'selected_thread' parameter. Run to all_started
instead of main. Explicitly set the breakpoint at main. Switch
to the SELECTED_THREAD thread.
(top level): Test handling the exec event with either the main
thread or the second thread selected.

a181c0b 2017-10-10 01:54:42 John Baldwin

Use gdbarch_long_bit to determine layout of FreeBSD siginfo_t.

FreeBSD architectures are either ILP32 or LP64 resulting in two
different layouts for siginfo_t. Previously, the 'bits_per_word'
member of bfd_arch_info was used to determine the layout to use for a
given FreeBSD architecture. However, mipsn32 architectures inherit
from a 64-bit mips architecture where bits_per_word is 64. As a
result, $_siginfo was not properly extracted from FreeBSD/mipsn32 core
dumps. Fix this by using gdbarch_long_bit instead of 'bits_per_word'
to determine if a FreeBSD architecture is ILP32 or LP64.

gdb/ChangeLog:

* fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
(fbsd_convert_siginfo): Likewise.
* fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.

6e66f75 2017-10-10 01:50:58 Simon Marchi

Don't try building gdb against guile-2.2

GDB currently doesn't build with Guile 2.2 (see PR 21104). If one has
both Guile 2.2 and 2.0 installed, GDB will pick up Guile 2.2 first and
fail building. Until somebody does the work of adapting the GDB code to
Guile 2.2, we should not try using it. This patch therefore removes it
from configure.

gdb/ChangeLog:

* configure.ac (try_guile_versions): Remove guile-2.2.
* configure: Regenerate.

8e46450 2017-10-10 01:37:53 Andreas Krebbel

S/390: Sync with latest POP - 3 new instructions

prno, tpei, and irbm are missing in the optable.

gas/ChangeLog:

2017-10-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>

* testsuite/gas/s390/zarch-arch12.d (prno, tpei, irbm): New
instructions added.
* testsuite/gas/s390/zarch-arch12.s: Likewise.
* testsuite/gas/s390/zarch-z13.d: Rename ppno to prno.

opcodes/ChangeLog:

2017-10-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>

* s390-opc.txt (prno, tpei, irbm): New instructions added.