1 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
4 without altivec or fpu.
6 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
9 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
10 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
11 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
12 Define if not already defined.
13 * features/rs6000/power-ebb.xml: New file.
14 * features/rs6000/power-linux-pmu.xml: New file.
15 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
17 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
18 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
19 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
20 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
21 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
22 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
23 fetch_regset with ebb and pmu regsets.
24 (store_register, store_ppc_registers): Call store_regset with ebb
26 (ppc_linux_nat_target::read_description): Set isa207 field in the
27 features struct if ebb and pmu are avaiable.
28 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
29 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
30 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
32 (ppc_linux_core_read_description): Check if the pmu section is
33 present and set isa207 in the features struct.
34 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
35 (ppc32_linux_pmuregset): Declare.
36 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
37 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
38 <ppc_sier_regnum>: New field.
39 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
41 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
43 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
44 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
45 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
48 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
49 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
51 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
52 (tdesc_powerpc_isa207_vsx64l): Declare.
53 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
54 (struct ppc_linux_features) <isa207>: New field.
55 (ppc_linux_no_features): Add initializer for isa207 field.
56 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
58 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
59 (NT_PPC_TAR): Define if not already defined.
60 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
61 rs6000/powerpc-isa207-vsx64l.
62 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
63 rs6000/powerpc-isa207-vsx64l.xml.
64 * features/rs6000/power-tar.xml: New file.
65 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
66 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
67 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
68 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
69 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
70 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
71 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
72 fetch_regset with the TAR regset.
73 (store_register, store_ppc_registers): Call store_regset with the
75 (ppc_linux_nat_target::read_description): Set isa207 field in the
76 features struct if needed.
77 * ppc-linux-tdep.c: Include
78 features/rs6000/powerpc-isa207-vsx32l.c and
79 features/rs6000/powerpc-isa207-vsx64l.c.
80 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
81 (ppc_linux_iterate_over_regset_sections): Call back with the tar
83 (ppc_linux_core_read_description): Check if the tar section is
84 present and set isa207 in the features struct.
85 (_initialize_ppc_linux_tdep): Call
86 initialize_tdesc_powerpc_isa207_vsx32l and
87 initialize_tdesc_powerpc_isa207_vsx64l.
88 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
89 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
90 (enum) <PPC_TAR_REGNUM>: New enum value.
91 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
93 (ppc_process_record_op31): Record changes to TAR.
95 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
96 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
98 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
99 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
100 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
101 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
102 (struct ppc_linux_features) <ppr_dscr>: New field.
103 (ppc_linux_no_features): Add initializer for ppr_dscr field.
104 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
106 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
107 Define if not already defined.
108 * features/Makefile (WHICH): Add
109 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
110 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
111 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
112 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
113 * features/rs6000/power-dscr.xml: New file.
114 * features/rs6000/power-ppr.xml: New file.
115 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
116 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
117 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
118 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
119 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
120 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
121 * ppc-linux-nat.c: Include <sys/uio.h>.
122 (fetch_regset, store_regset, check_regset): New functions.
123 (fetch_register, fetch_ppc_registers): Call fetch_regset with
124 DSCR and PPR regsets.
125 (store_register, store_ppc_registers): Call store_regset with
126 DSCR and PPR regsets.
127 (ppc_linux_get_hwcap2): New function.
128 (ppc_linux_nat_target::read_description): Call
129 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
130 features struct if needed.
131 * ppc-linux-tdep.c: Include
132 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
133 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
134 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
135 (ppc32_linux_dscrregset): New globals.
136 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
138 (ppc_linux_core_read_description): Check if the ppr and dscr
139 sections are present and set ppr_dscr in the features struct.
140 (_initialize_ppc_linux_tdep): Call
141 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
142 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
143 * ppc-linux-tdep.h (ppc32_linux_pprregset)
144 (ppc32_linux_dscrregset): Declare.
145 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
146 <ppc_dscr_regnum>: New field.
147 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
148 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
150 (ppc_process_record_op31): Record changes to PPR and DSCR.
152 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
154 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
155 second initializer line for the have_* variables. Initialize
156 have_fpu to 0 instead of 1.
158 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
160 * arch/ppc-linux-common.c (ppc_linux_match_description):
161 Parenthesize tdesc assignements and indent them properly.
163 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
165 * ppc-linux-nat.c (fetch_register): Change if statement to else
167 (store_register): Likewise.
169 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
171 * rs6000-tdep.c: Remove reggroups.h include.
172 (rs6000_pseudo_register_reggroup_p): Remove.
173 (rs6000_gdbarch_init): Remove call to
174 set_tdesc_pseudo_register_reggroup_p.
176 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
178 * reggroups.c (default_register_reggroup_p): Return true for
179 decfloat registers and float_reggroup.
181 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
183 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
184 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
185 ppc_linux_collect_vrregset by regcache_collect_regset.
187 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
189 * linux-tdep.c (linux_collect_regset_section_cb): Use
190 std::vector<gdb_byte> instead of char * and malloc for buf.
193 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
195 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
196 symtab_start instead of always using language_unknown.
198 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
200 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
201 READ_P parameter, catch and ignore register access errors from
202 either the old or new MISA location.
203 (riscv_has_feature): Update call to riscv_read_misa_reg.
205 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
207 * python/py-function.c (convert_values_to_python): Return
208 gdbpy_ref<>. Add header comment.
211 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
213 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
214 (cmdpy_completer_handle_brkchars): Adjust.
215 (cmdpy_completer): Adjust.
217 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
219 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
220 Pass correct regnum to raw_supply_zeroed.
222 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
224 * regcache.c (cooked_read_test): Add CSKY to the list of
225 architectures with a save_reggroup
227 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
230 * infrun.c (follow_exec): In the follow_exec_mode_new case,
231 transfer terminal state from old new new inferior.
232 * terminal.h (swap_terminal_info): New function.
233 * inflow.c (swap_terminal_info): New function.
235 2018-10-23 Tom Tromey <tom@tromey.com>
237 * record-btrace.c (get_thread_current_frame_id): Rename from
238 get_thread_current_frame. Return a frame_id.
239 (record_btrace_start_replaying): Update.
241 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
243 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
246 2018-10-23 Joel Brobecker <brobecker@adacore.com>
248 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
249 have_nonsteppable_watchpoint attribute to 1.
251 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
253 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
255 (struct register_alias): Rename to...
256 (struct riscv_register_alias): ...this, and update comment.
257 (riscv_register_aliases): Update type, and alias names. Remove
258 CSR names from this list.
259 (riscv_register_name): Use riscv_gdb_reg_names for int and float
260 register names. Add an extra assertion.
261 (riscv_is_regnum_a_named_csr): New function.
262 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
264 2018-10-22 Jim Wilson <jimw@sifive.com>
266 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
267 FP reg smaller than FP reg size, and fill with -1 instead of 0.
269 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
270 (riscv_register_type): Use them.
271 (riscv_print_one_register_info): Handle union of floats same as float.
272 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
273 riscv_fpreg_q_type fields.
275 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
277 * gdbarch.sh (gdbarch_num_cooked_regs): New.
278 * gdbarch.h: Re-generate.
279 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
280 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
281 * eval.c (evaluate_subexp_standard): Likewise.
282 * findvar.c (value_of_register): Likewise.
283 (value_of_register_lazy): Likewise.
284 (address_from_register): Likewise.
285 * frame.c (get_frame_register_bytes): Likewise.
286 * gdbarch-selftests.c (register_to_value_test): Likewise.
287 * h8300-tdep.c (h8300_register_type): Likewise.
288 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
289 (i386_svr4_reg_to_regnum): Likewise.
290 * infcmd.c (default_print_registers_info): Likewise.
291 (registers_info): Likewise.
292 (print_vector_info): Likewise.
293 (default_print_float_info): Likewise.
294 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
295 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
296 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
297 (mi_cmd_data_list_changed_registers): Likewise.
298 (mi_cmd_data_list_register_values): Likewise.
299 (mi_cmd_data_write_register_values): Likewise.
300 (mi_cmd_trace_frame_collected): Likewise.
301 * mips-tdep.c (print_gp_register_row): Likewise.
302 (mips_print_registers_info): Likewise.
303 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
304 * regcache.c (init_regcache_descr): Likewise.
305 (register_size): Likewise.
306 (register_dump::dump): Likewise.
307 (cooked_read_test): Likewise.
308 (cooked_write_test): Likewise.
309 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
310 (rs6000_gdbarch_init): Likewise.
311 * stabsread.c (stab_reg_to_regnum): Likewise.
312 * stack.c (info_frame_command): Likewise.
313 * target-descriptions.c (tdesc_register_name): Likewise.
314 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
315 * tui/tui-regs.c (tui_show_register_group): Likewise.
316 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
317 (user_reg_map_regnum_to_name): Likewise.
318 (value_of_user_reg): Likewise.
319 (maintenance_print_user_registers): Likewise.
320 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
321 (xtensa_register_name): Likewise.
322 (xtensa_register_type): Likewise.
323 (xtensa_reg_to_regnum): Likewise.
324 (xtensa_pseudo_register_read): Likewise.
325 (xtensa_pseudo_register_write): Likewise.
327 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
329 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
330 correctly-sized buffer with raw_read.
331 (amd64_pseudo_register_write): Use correctly-sized buffer for
334 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
336 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
337 in add_prefix_cmd of set print type.
339 2018-10-19 Tom Tromey <tom@tromey.com>
342 * NEWS: Mention tabset deprecation.
343 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
344 (update_tab_width): New function.
345 (tui_set_tab_width, tui_show_tab_width): New functions.
346 (tui_set_tab_width_command): Use update_tab_width.
347 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
348 Add new "set tui tab-width" command.
349 * tui/tui-source.c (tui_set_source_content): Update.
350 * tui/tui-disasm.c (tui_set_disassem_content): Update.
351 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
353 (tui_tab_width): Declare.
354 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
355 (tui_set_default_tab_len): Remove.
357 2018-10-19 Tom Tromey <tom@tromey.com>
359 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
360 (key_is_backspace, tui_getc): Don't declare.
361 * tui/tui-io.c (key_is_start_sequence): Now static.
362 (key_is_end_sequence, key_is_backspace): Remove.
363 (tui_getc): Now static.
365 2018-10-19 Tom Tromey <tom@tromey.com>
367 * symfile.c (reread_symbols): Clear "static_links".
369 2018-10-19 Alan Hayward <alan.hayward@arm.com>
371 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
373 (aarch64_linux_sigframe_init): Extra boundary checks.
375 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
377 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
378 the possibly non-existent tdesc type 'vec128', but the type of raw
379 register v16 instead.
381 2018-10-19 Gary Benson <gbenson@redhat.com>
383 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
385 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
388 * cli/cli-dump.c (restore_binary_file): Check if "file" is
391 2018-10-17 Paul Koning <paul_koning@dell.com>
393 * charset.c (convert_between_encodings): Fix unsigned overflow.
395 2018-10-17 John Baldwin <jhb@FreeBSD.org>
397 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
398 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
399 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
400 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
402 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
403 and fbsd_info_proc_mappings_header.
404 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
405 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
408 2018-10-17 Joel Brobecker <brobecker@adacore.com>
410 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
413 2018-10-15 Tom Tromey <tom@tromey.com>
415 * tui/tui.c (strcat_to_buf): Remove casts.
416 * tui/tui-winsource.c (tui_show_source_line)
417 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
418 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
419 * tui/tui-windata.c (tui_first_data_item_displayed)
420 (tui_delete_data_content_windows, tui_erase_data_content)
421 (tui_display_all_data, tui_display_data_from)
422 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
423 * tui/tui-win.c (tui_set_win_height)
424 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
426 * tui/tui-win.c (tui_resize_all): Remove casts.
427 (tui_scroll_backward_command, tui_set_focus)
428 (tui_set_tab_width_command): Likewise.
429 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
430 * tui/tui-regs.c (tui_show_register_group): Remove cast.
431 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
432 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
433 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
436 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
438 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
439 AArch64/ARM maintainer.
441 2018-10-11 Gary Benson <gbenson@redhat.com>
443 * interps.h (interp::m_name): Make private and mutable.
444 * interps.c (interp::~interp): Free m_name.
446 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
447 Simon Marchi <simark@simark.ca>
449 * README (`configure' options): Add documentation for new
450 "--enable-unit-tests" option.
451 * acinclude.m4: Include "selftest.m4".
452 * configure: Regenerate.
453 * configure.ac: Use "GDB_AC_SELFTEST".
454 * maint.c (maintenance_selftest): Update message informing
455 that selftests have been disabled.
456 (maintenance_info_selftests): Likewise.
457 * selftest.m4: New file.
459 2018-10-10 Gary Benson <gbenson@redhat.com>
461 * remote.c (remote_target::remote_send_printf): Add
462 missing va_end found by Coverity.
464 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
466 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
468 2018-10-09 Tom Tromey <tom@tromey.com>
470 * configure: Rebuild.
471 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
472 * NEWS: Update --enable-ubsan documentation.
474 2018-10-09 Gary Benson <gbenson@redhat.com>
476 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
479 2018-10-08 Tom Tromey <tom@tromey.com>
481 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
483 (riscv_fbsd_init_abi): Likewise.
485 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
486 * valops.c (value_struct_elt_for_reference): Rename local variable
487 to work around the shadowing a previous local warning.
489 2018-10-08 John Baldwin <jhb@FreeBSD.org>
491 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
492 * NEWS: Mention new FreeBSD/riscv native configuration.
493 * configure.host: Add riscv*-*-freebsd*.
494 * configure.nat: Likewise.
495 * riscv-fbsd-nat.c: New file.
497 2018-10-08 John Baldwin <jhb@FreeBSD.org>
499 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
500 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
501 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
502 * NEWS: Mention new FreeBSD/riscv target.
503 * configure.tgt: Add riscv*-*-freebsd*.
504 * riscv-fbsd-tdep.c: New file.
505 * riscv-fbsd-tdep.h: New file.
507 2018-10-08 John Baldwin <jhb@FreeBSD.org>
509 * regcache.h (struct regcache_map_entry): Note that this type can
510 be used with traditional frame caches.
511 * trad-frame.c (trad_frame_set_reg_regmap): New.
512 * trad-frame.h (trad_frame_set_reg_regmap): New.
514 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
517 * valops.c (get_virtual_base_offset): New function.
518 (value_struct_elt_for_reference): Use it to get virtual base offset
519 and add it in calculating class member address.
521 2018-10-08 John Darrington <john@darrington.wattle.id.au>
523 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
524 (check_producer): Check if the producer is codewarrior.
525 (producer_is_codewarrior): New function.
526 (lnp_state_machine::record_line): Ignore is_stmt flag for records
527 produced by codewarrior.
528 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
530 2018-10-06 Tom Tromey <tom@tromey.com>
533 * python/py-inferior.c: Add "architecture" entry.
534 (infpy_architecture): New function.
536 2018-10-06 Tom Tromey <tom@tromey.com>
539 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
540 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
541 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
542 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
544 2018-10-06 Tom Tromey <tom@tromey.com>
547 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
548 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
549 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
552 2018-10-06 Tom Tromey <tom@tromey.com>
554 * python/py-breakpoint.c (bppy_get_location): Handle a
555 bp_breakpoint without a location.
557 2018-10-06 Tom Tromey <tom@tromey.com>
559 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
560 (_RegEx): Reformat help text.
561 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
562 (AnyCallerIs, AnyCallerMatches): Reformat help text.
563 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
565 * python/lib/gdb/command/xmethods.py (InfoXMethod)
566 (EnableXMethod, DisableXMethod): Remove help indentation.
567 Capitalize meta-syntactic variables.
568 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
569 (EnableUnwinder, DisableUnwinder): Remove help indentation.
570 Capitalize meta-syntactic variables.
571 * python/lib/gdb/command/explore.py (ExploreCommand)
572 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
573 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
574 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
575 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
576 Remove help indentation.
577 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
578 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
579 (DisableFrameFilter, SetFrameFilterPriority)
580 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
582 2018-10-06 Tom Tromey <tom@tromey.com>
585 * tui/tui-io.c (gdb_wgetch): New function.
586 (tui_mld_getc, tui_getc): Use it.
588 2018-10-05 Tom Tromey <tom@tromey.com>
590 * sol-thread.c (sol_thread_target::wait): Rename inner
593 2018-10-04 Tom Tromey <tom@tromey.com>
595 * configure: Rebuild.
596 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
598 2018-10-04 Tom Tromey <tom@tromey.com>
600 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
601 declaration of "block".
603 2018-10-04 Tom Tromey <tom@tromey.com>
605 * common/filestuff.c (fdwalk): Remove inner declaration of
608 2018-10-04 Tom Tromey <tom@tromey.com>
610 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
611 "structs_addr" and hoist declaration.
613 2018-10-04 Tom Tromey <tom@tromey.com>
615 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
618 2018-10-04 Tom Tromey <tom@tromey.com>
620 * mdebugread.c (parse_partial_symbols): Use std::string.
622 2018-10-04 Tom Tromey <tom@tromey.com>
624 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
625 * p-valprint.c (pascal_val_print): Split inner "i" variable.
626 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
628 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
630 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
631 * varobj.c (varobj_update): Rename inner "newobj",
633 * valprint.c (generic_emit_char): Rename inner "buf".
634 * valops.c (find_overload_match): Rename inner "temp".
635 (value_struct_elt_for_reference): Declare "v" in more inner
637 * v850-tdep.c (v850_push_dummy_call): Rename "len".
638 * unittests/array-view-selftests.c (run_tests): Rename inner
640 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
642 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
643 "tsv" in more inner scope.
644 (print_one_static_tracepoint_marker): Rename inner
646 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
647 (tic6x_push_dummy_call): Don't redeclare "addr".
648 * target-float.c: Declare "dto" lower.
649 * symtab.c (lookup_local_symbol): Rename inner "sym".
650 (find_pc_sect_line): Rename inner "pc".
651 * stack.c (print_frame): Don't redeclare "gdbarch".
652 (return_command): Rename inner "gdbarch".
653 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
655 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
657 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
658 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
660 * remote.c (remote_target::update_thread_list): Don't redeclare
662 (remote_target::process_initial_stop_replies): Rename inner
664 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
665 (remote_target::wait_as): Don't redeclare "stop_reply".
666 (remote_target::get_thread_local_address): Rename inner
668 (remote_target::get_tib_address): Likewise.
670 * regcache.c (cooked_read_test): Rename "regnum".
671 * record-btrace.c (cmd_record_btrace_start): Rename inner
673 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
675 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
677 (ppu2spu_sniffer): Rename inner "buf".
678 * parse.c (operator_check_standard): Rename inner "type",
680 * p-valprint.c (pascal_val_print): Introduce new scope for
681 "low_bound", "high_bound".
682 * p-exp.y (yylex): Declare "i" in loop header.
683 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
684 Lower declaration of "s".
685 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
687 (nios2_push_dummy_call): Rename "len".
688 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
690 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
691 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
692 (linux_xfer_osdata_modules): Likewise.
693 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
694 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
695 (mips_o64_push_dummy_call): Likewise.
696 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
698 * mi/mi-main.c (list_available_thread_groups): Rename inner
700 (mi_cmd_data_read_memory): Rename inner "opts".
701 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
703 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
704 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
706 (parse_partial_symbols): Rename inner "pst", "p", "name"
707 * main.c (captured_main_1): Rename inner "i"s.
708 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
710 * linux-tdep.c (linux_info_proc): Rename inner "filename".
711 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
712 * infrun.c (handle_no_resumed): Don't redeclare "thread".
713 (handle_signal_stop): Rename inner "gdbarch".
714 (handle_command): Declare "signum" in loop header.
715 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
717 (examine_prologue): Rename inner "sol" and "sof".
718 (ia64_extract_return_value): Rename inner "val". Declare another
719 "val" in a more inner scope.
720 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
722 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
724 * findvar.c (default_read_var_value): Don't redeclare "addr".
725 * f-exp.y (yylex): Declare "i" in loop header.
726 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
727 Rename inner "type", "expect_type".
728 (evaluate_subexp_for_sizeof): Rename inner "pc".
729 * elfread.c (elf_symfile_read): Rename inner "abfd".
730 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
732 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
733 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
734 (dwarf_decode_line_header): Rename inner "lh".
735 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
736 "offset". Declare "i" in loop header.
737 (disassemble_dwarf_expression): Rename inner "addr_size".
738 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
740 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
741 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
742 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
743 "inner_list_emitter".
744 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
745 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
746 declaration in a block.
747 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
748 * cp-valprint.c (cp_print_value_fields): Don't redeclare
749 "obstack_final_size".
750 * cp-support.c (inspect_type): Declare "i" in loop header.
751 * compile/compile.c (compile_instance::insert_symbol_error):
753 * common/agent.c (agent_run_command): Remove inner "ret"
755 * coffread.c (coff_symfile_read): Rename inner "name".
756 (coff_symfile_read): Rename inner "abfd".
757 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
758 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
760 * c-exp.y (lex_one_token): Move "len" declaration lower.
761 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
763 (create_exception_master_breakpoint): Likewise. Don't redeclare
765 (watch_command_1): Declare "mark" later.
766 (clear_command): Don't shadow "a" or "b".
767 (delete_command): Rename inner "b".
768 (delete_trace_command): Likewise.
769 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
771 (arm_gdbarch_init): Remove inner "e_flags".
772 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
773 "offset" in inner blocks.
775 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
777 * dwarf-index-write.c (file_write): Don't write if the vector is
780 2018-10-05 Tom de Vries <tdevries@suse.de>
782 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
783 PyArg_ParseTuple call.
785 2018-10-05 Tom de Vries <tdevries@suse.de>
787 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
788 PyArg_ParseTuple call.
790 2018-10-04 Joel Brobecker <brobecker@adacore.com>
792 * psymtab.c (recursively_search_psymtabs): Reformat parameters
793 to avoid exceeding 80 characters per line limit.
795 2018-10-04 Tom Tromey <tom@tromey.com>
797 * symfile.c (syms_from_objfile_1, finish_new_objfile)
798 (reread_symbols): Update.
799 * complaints.h (clear_complaints): Remove argument.
800 * complaints.c (enum complaint_series): Remove.
801 (series): Remove global.
802 (complaint_internal): Update.
803 (clear_complaints): Remove argument.
805 2018-10-04 Tom Tromey <tom@tromey.com>
807 * symfile.c (symbol_file_add_with_addrs): Do not print "no
808 debugging symbols" message if there is a separate debug objfile.
810 2018-10-04 Tom Tromey <tom@tromey.com>
813 * symfile.c (symbol_file_add_with_addrs): Update output.
814 * psymtab.c (require_partial_symbols): Update output.
816 2018-10-04 Tom Tromey <tom@tromey.com>
819 * complaints.c: Emit \n.
821 2018-10-04 Tom Tromey <tom@tromey.com>
823 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
824 (separate_debug_file_exists, find_separate_debug_file)
825 (add_symbol_file_command, reread_symbols, allocate_symtab)
826 (allocate_compunit_symtab): Use filtered printing, not
828 * psymtab.c (require_partial_symbols, dump_psymtab)
829 (allocate_psymtab): Use filtered printing, not unfiltered.
831 2018-10-04 Tom Tromey <tom@tromey.com>
833 * complaints.c (complaint_internal): Correctly check complaint
836 2018-10-04 Tom Tromey <tom@tromey.com>
838 * complaints.h (struct complaints): Remove declaration.
839 * complaints.c (clear_complaints): Remove an unused variable.
841 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
843 * MAINTAINERS (Write After Approval): Add self.
845 2018-10-03 Tom Tromey <tom@tromey.com>
847 * guile/scm-value.c (gdbscm_value_to_string): Initialize
849 * coffread.c (coff_symtab_read): Initialize "newobj".
851 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
853 * dwarf2read.c (read_func_scope): Remove struct keyword in
856 2018-10-03 Tom Tromey <tom@tromey.com>
858 * README: Mention --enable-ubsan.
859 * NEWS: Mention --enable-ubsan.
860 * acinclude.m4: Include sanitize.m4.
861 * configure: Rebuild.
862 * configure.ac: Call AM_GDB_UBSAN.
863 * sanitize.m4: New file.
865 2018-10-03 Tom Tromey <tom@tromey.com>
867 * expression.h (enum exp_opcode): Use uint8_t as base type.
868 * expprint.c (op_name): Handle invalid opcodes.
870 2018-10-03 Tom Tromey <tom@tromey.com>
872 * parse.c (prefixify_expression): Add assert.
873 (parse_exp_in_context_1): Throw exception if the expression is
876 2018-10-03 Tom Tromey <tom@tromey.com>
878 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
880 2018-10-03 Tom Tromey <tom@tromey.com>
882 * c-exp.y (parse_number): Work in unsigned. Remove casts.
884 2018-10-03 Tom Tromey <tom@tromey.com>
886 * dwarf2read.c (read_subrange_type): Make "negative_mask"
889 2018-10-03 Tom Tromey <tom@tromey.com>
891 * findvar.c (extract_integer): Do work in an unsigned type.
893 2018-10-03 Tom Tromey <tom@tromey.com>
895 * common/enum-flags.h (enum_flags::operator~): Add static assert.
896 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
898 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
899 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
901 * c-lang.h (enum c_string_type_values): Use unsigned as base
903 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
905 2018-10-03 Tom Tromey <tom@tromey.com>
907 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
908 <~dwarf2_frame_state_reg_info>: Update.
909 <dwarf2_frame_state_reg_info>: Update.
910 <alloc_regs>: Add assertion. Update.
911 <reg>: Now a std::vector.
914 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
915 (execute_cfa_program_test, dwarf2_frame_cache): Update.
917 2018-10-03 Tom Tromey <tom@tromey.com>
919 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
921 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
923 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
925 2018-10-02 Tom Tromey <tom@tromey.com>
927 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
929 2018-10-02 John Darrington <john@darrington.wattle.id.au>
931 * NEWS: Mention changed commands.
932 * ser-uds.c: New file.
933 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
934 * configure: Regenerate.
935 * Makefile.in: Add new file.
936 * serial.c (serial_open): Check if filename is a socket
937 and lookup the appropriate interface accordingly.
939 2018-10-01 Alan Hayward <alan.hayward@arm.com>
941 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
943 (AARCH64_EXTRA_MAGIC): Likewise.
944 (AARCH64_FPSIMD_MAGIC): Likewise.
945 (AARCH64_SVE_MAGIC): Likewise.
946 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
947 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
948 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
949 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
950 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
951 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
952 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
953 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
954 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
955 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
956 (read_aarch64_ctx): Add function.
957 (aarch64_linux_sigframe_init): Detect FP registers.
959 2018-10-01 Alan Hayward <alan.hayward@arm.com>
961 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
962 (AARCH64_D0_REGNUM): Likewise.
963 (AARCH64_S0_REGNUM): Likewise.
964 (AARCH64_H0_REGNUM): Likewise.
965 (AARCH64_B0_REGNUM): Likewise.
966 (AARCH64_SVE_V0_REGNUM): Likewise.
967 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
968 (AARCH64_D0_REGNUM): Likewise.
969 (AARCH64_S0_REGNUM): Likewise.
970 (AARCH64_H0_REGNUM): Likewise.
971 (AARCH64_B0_REGNUM): Likewise.
972 (AARCH64_SVE_V0_REGNUM): Likewise.
974 2018-10-01 Gary Benson <gbenson@redhat.com>
976 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
977 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
978 prfpregset_t instead of gdb_prfpregset_t.
979 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
980 * configure, config.in: Rebuild.
982 2018-10-01 Gary Benson <gbenson@redhat.com>
984 * common/gdb_proc_service.h: New file, factored out from...
985 * gdb_proc_service.h: Moved common code to the above file.
986 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
988 2018-10-01 Gary Benson <gbenson@redhat.com>
990 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
991 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
993 2018-10-01 Gary Benson <gbenson@redhat.com>
995 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
996 (AC_CHECK_HEADERS): Check for linux/elf.h.
997 * configure, config.in: Rebuild.
998 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
999 doesn't define elf_fpregset_t.
1001 2018-10-01 Gary Benson <gbenson@redhat.com>
1003 * gdb_proc_service.h: Whitespace change.
1005 2018-10-01 Tom Tromey <tom@tromey.com>
1007 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1008 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1009 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1011 2018-10-01 Tom Tromey <tom@tromey.com>
1013 * README: Minor change.
1015 2018-09-30 Pedro Alves <palves@redhat.com>
1017 * darwin-nat-info.c (darwin_debug_regions_recurse)
1018 (info_mach_exceptions_command): Remove unused local variables.
1019 * darwin-nat.c (darwin_decode_notify_message)
1020 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1021 (darwin_stop_inferior, darwin_setup_exceptions)
1022 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1023 (darwin_nat_target::attach, darwin_nat_target::detach)
1024 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1026 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1029 2018-09-29 Tom Tromey <tom@tromey.com>
1031 * README: Remove some leftover text.
1033 2018-09-29 Tom Tromey <tom@tromey.com>
1035 * PROBLEMS: Rewrite.
1038 2018-09-28 John Baldwin <jhb@FreeBSD.org>
1040 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1041 case with explicit breakpoint kind.
1042 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1043 'additional_info' and related logic.
1044 (riscv_debug_breakpoints): New variable.
1045 (riscv_breakpoint_kind_from_pc): Use the length of the existing
1046 instruction to determine the breakpoint kind.
1047 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1048 flag. Update description of 'set/show riscv
1049 use-compressed-breakpoints' flag.
1051 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
1053 (NEWS): Mention changes to frame related commands.
1054 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1055 (add_prefix_cmd_suppress_notification): New function.
1056 (add_com_suppress_notification): Call
1057 add_cmd_suppress_notification.
1058 * command.h (add_cmd_suppress_notification): Declare.
1059 (add_prefix_cmd_suppress_notification): Declare.
1060 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1061 (parse_frame_specification): Moved from stack.c, with
1062 simplification to handle a single argument.
1063 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1064 switch to the selected frame. Add a header comment.
1065 * stack.c: Remove 'safe-ctype.h' include.
1066 (find_frame_for_function): Add declaration.
1067 (find_frame_for_address): New function.
1068 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1069 (frame_selection_by_function_completer): New function.
1070 (info_frame_command): Rename to...
1071 (info_frame_command_core): ...this, and update parameter types.
1072 (select_frame_command): Rename to...
1073 (select_frame_command_core): ...this, and update parameter types.
1074 (frame_command): Rename to...
1075 (frame_command_core): ...this, and update parameter types.
1076 (class frame_command_helper): New class to wrap implementations of
1077 frame related sub-commands.
1078 (frame_apply_cmd_list): New static global.
1079 (frame_cmd_list): Make static.
1080 (select_frame_cmd_list): New global for sub-commands.
1081 (info_frame_cmd_list): New global for sub-commands.
1082 (_initialize_stack): Register sub-commands for 'frame',
1083 'select-frame', and 'info frame'. Update 'frame apply' commands
1084 to use frame_apply_cmd_list. Move function local static
1085 frame_apply_list to file static frame_apply_cmd_list for
1087 * stack.h (select_frame_command): Delete declarationn.
1088 (select_frame_for_mi): Declare new function.
1090 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
1092 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1093 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1096 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
1098 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1100 2018-09-26 Tom Tromey <tom@tromey.com>
1102 * valops.c (auto_abandon): Remove dead code.
1104 2018-09-26 Tom Tromey <tom@tromey.com>
1106 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1108 2018-09-24 Tom Tromey <tom@tromey.com>
1110 * common/pathstuff.c (get_standard_cache_dir): Make
1111 "xdg_cache_home" and "home" const.
1112 * top.c (init_history): Make "tmpenv" const.
1113 * main.c (get_init_files): Make "homedir" const.
1115 2018-09-23 Tom Tromey <tom@tromey.com>
1118 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1120 2018-09-23 Tom Tromey <tom@tromey.com>
1122 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1123 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1124 * python/python-internal.h (gdbpy_handle_exception): Declare.
1125 * python/py-utils.c (gdbpy_handle_exception): New function.
1127 2018-09-23 Tom Tromey <tom@tromey.com>
1130 * python/py-type.c (typy_template_argument): Check for negative
1133 2018-09-23 Tom Tromey <tom@tromey.com>
1136 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1138 2018-09-23 Tom Tromey <tom@tromey.com>
1141 * python/py-value.c (valpy_int): Allow conversion from pointer
1144 2018-09-23 Tom Tromey <tom@tromey.com>
1147 * python/py-value.c (valpy_int): Respect type sign.
1149 2018-09-23 Tom Tromey <tom@tromey.com>
1152 * python/py-value.c (valpy_float): Allow conversions from int or
1154 (valpy_int, valpy_long): Allow conversions from float.
1156 2018-09-23 Tom Tromey <tom@tromey.com>
1158 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1159 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1161 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1163 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1165 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1167 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
1169 * windows-nat.c (windows_nat_target::wait): Remove a spurious
1170 target_terminal::ours().
1172 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
1174 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1177 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
1179 * breakpoint.c (update_inserted_breakpoint_locations): Remove
1180 redundant condition.
1182 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1184 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1186 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1187 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
1188 * sol-thread.c (ps_pdmodel): Don't guard definition.
1190 * procfs.c: Fix formatting.
1192 * procfs.c (sysset_t_alloc): Remove.
1193 (create_procinfo): Use XNEW instead of sysset_t_alloc.
1194 (procfs_debug_inferior): Likewise.
1195 (procfs_set_exec_trap): Likewise.
1196 (proc_set_traced_sysentry): Don't allocate argp dynamically.
1197 (proc_set_traced_sysexit): Likewise.
1199 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1200 (dead_procinfo): Likewise.
1201 (proc_warn): Likewise.
1202 (proc_error): Likewise.
1203 (proc_get_LDT_entry): Likewise.
1204 (do_attach): Likewise.
1205 (procfs_target::pid_to_str): Likewise.
1206 (iterate_over_mappings): Likewise.
1208 * procfs.c (create_procinfo): Fix ARI warning.
1209 (proc_get_status): Likewise.
1210 (proc_stop_process): Likewise.
1211 (proc_run_process): Likewise.
1212 (proc_kill): Likewise.
1213 (proc_get_LDT_entry): Likewise.
1214 (procfs_find_LDT_entry): Likewise.
1215 (proc_update_threads): Likewise.
1216 (proc_iterate_over_threads): Likewise.
1217 (do_attach): Likewise.
1218 (procfs_xfer_memory): Likewise.
1219 (invalidate_cache): Likewise.
1220 (procfs_target::resume): Likewise.
1221 (procfs_init_inferior): Likewise.
1222 (procfs_set_exec_trap): Likewise.
1223 (procfs_target::thread_alive): Likewise.
1224 (procfs_target::pid_to_exec_file): Likewise.
1225 (iterate_over_mappings): Likewise.
1226 (procfs_target::make_corefile_notes): Likewise.
1227 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1229 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1230 (procfs_find_LDT_entry): Likewise.
1231 * sol-thread.c (ps_lgetLDT): Likewise.
1233 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1236 * procfs.c (procfs_target): Declare pid_to_exec_file.
1237 (procfs_target::pid_to_exec_file): New.
1239 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1241 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1243 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1244 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1246 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1248 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1249 (supply_fpregset, fill_fpregset): Move ...
1250 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1251 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1252 Remove references to ioctl-based procfs.
1253 Include <sys/reg.h>.
1254 Remove PR_MODEL_NATIVE guards.
1255 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1256 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1258 2018-09-19 Xavier Roirand <roirand@adacore.com>
1261 * solib-darwin.c (darwin_get_dyld_bfd): New function.
1262 (darwin_solib_get_all_image_info_addr_at_init): Update call.
1263 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1265 2018-09-19 John Baldwin <jhb@FreeBSD.org>
1267 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1268 (fbsd_print_sockaddr_in6): Likewise.
1270 2018-09-19 Richard Bunt <richard.bunt@arm.com>
1271 Chris January <chris.january@arm.com>
1273 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1274 (evaluate_subexp_standard): Return a dummy type when
1275 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1276 OP_F77_UNDETERMINED_ARGLIST case.
1277 * expression.h (enum noside): Update comment.
1279 2018-09-19 George Vasick <george.vasick@oracle.com>
1281 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1283 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1284 April Chin <april.chin@oracle.com>
1285 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1287 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1289 (create_procinfo): Print pids in /proc without leading zeros.
1291 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1293 * nios2-tdep.c (nios2_gcc_target_options): New.
1294 (nios2_gdb_arch_init): Install new hook.
1296 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1298 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1300 * update-gnulib.sh: Apply patch.
1301 * configure: Re-generate.
1303 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1305 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1306 description. Make "info proc" command descriptions more
1309 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1311 * NEWS: Mention 'info proc files' command.
1313 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1315 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1316 descriptors for IP_FILES and IP_ALL.
1318 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1320 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1321 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1322 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1323 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1324 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1325 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1326 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1327 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1328 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1329 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1330 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1331 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1332 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1333 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1334 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1335 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1336 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1337 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1338 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1339 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1340 (struct fbsd_sockaddr_un): New types.
1341 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1342 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1343 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1344 (fbsd_core_info_proc_files): New functions.
1345 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1347 * fbsd-tdep.h (fbsd_info_proc_files_header)
1348 (fbsd_info_proc_files_entry): New.
1350 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1352 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1353 * infcmd.c (info_proc_cmd_files): New function.
1354 (_initialize_infcmd): Register 'info proc files' command.
1356 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1358 * gnulib/aclocal-m4-deps.mk: Re-generate.
1359 * gnulib/aclocal.m4: Re-generate.
1360 * gnulib/config.in: Re-generate.
1361 * gnulib/configure: Re-generate.
1362 * gnulib/import/Makefile.am: Re-generate.
1363 * gnulib/import/Makefile.in: Re-generate.
1364 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1365 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1366 * gnulib/import/arpa_inet.in.h: New file.
1367 * gnulib/import/inet_ntop.c: New file.
1368 * gnulib/import/m4/arpa_inet_h.m4: New file.
1369 * gnulib/import/m4/inet_ntop.m4: New file.
1370 * gnulib/import/m4/netinet_in_h.m4: New file.
1371 * gnulib/import/m4/socklen.m4: New file.
1372 * gnulib/import/m4/sockpfaf.m4: New file.
1373 * gnulib/import/m4/stdalign.m4: New file.
1374 * gnulib/import/m4/sys_uio_h.m4: New file.
1375 * gnulib/import/netinet_in.in.h: New file.
1376 * gnulib/import/stdalign.in.h: New file.
1377 * gnulib/import/sys_socket.c: New file.
1378 * gnulib/import/sys_socket.in.h: New file.
1379 * gnulib/import/sys_uio.in.h: New file.
1380 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1383 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1385 * gnulib/aclocal-m4-deps.mk: New file.
1386 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1389 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1391 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1394 2018-09-18 Tom Tromey <tom@tromey.com>
1396 * compile/compile-object-load.c (struct
1397 link_hash_table_cleanup_data): Add constructor and destructor.
1398 Use DISABLE_COPY_AND_ASSIGN.
1399 (~link_hash_table_cleanup_data): Rename from
1400 link_hash_table_free. Now a destructor.
1401 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1403 2018-09-18 Tom Tromey <tom@tromey.com>
1405 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1406 * compile/compile-object-load.c (struct munmap_list): Move to
1408 (munmap_list::add): Rename from munmap_list_add; rewrite.
1409 (munmap_list::~munmap_list): Rename from munmap_list_free.
1410 (munmap_listp_free_cleanup): Remove.
1411 (compile_object_load): Update.
1412 * compile/compile-object-load.h (struct munmap_list): Move from
1413 compile-object-load.c. Rewrite.
1415 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1417 * aarch64-tdep.c (pass_in_v): Use register size.
1418 (aarch64_extract_return_value): Likewise.
1419 (aarch64_store_return_value): Likewise.
1421 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1423 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1426 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1428 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1429 Fix short help line.
1431 2018-09-17 Tom Tromey <tom@tromey.com>
1434 * configure: Rebuild.
1435 * configure.ac: Conditionally use -DNDEBUG for Python.
1437 2018-09-17 Tom Tromey <tom@tromey.com>
1439 * configure: Rebuild.
1440 * configure.ac: Use gmp as a library dependency when checking for
1443 2018-09-17 Pedro Alves <palves@redhat.com>
1445 * python/py-inferior.c (find_inferior_object): Delete.
1447 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1449 * compile/compile-cplus-types.c
1450 (compile_cplus_instance::enter_scope): Don't use new_scope after
1453 2018-09-17 Tom Tromey <tom@tromey.com>
1455 * common/pathstuff.c (get_standard_cache_dir): Use
1456 ~/Library/Caches on macOS.
1457 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1459 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1462 * breakpoint.c (commands_cmd_element): New.
1463 (_initialize_breakpoint): Assign commands_cmd_element.
1464 * breakpoint.h (commands_cmd_element): New.
1465 * cli/cli-script.c (while_cmd_element, if_command,
1466 define_cmd_element): New.
1467 (command_name_equals): Remove.
1468 (process_next_line): Compare commands by pointer, not by name.
1469 (_initialize_cli_script): Assign the various cmd_list_element
1471 * compile/compile.c (compile_cmd_element): New.
1472 (_initialize_compile): Assign compile_cmd_element.
1473 * compile/compile.h (compile_cmd_element): New.
1474 * guile/guile.c (guile_cmd_element): New.
1475 (install_gdb_commands): Assign guile_cmd_element.
1476 * guile/guile.h (guile_cmd_element): New.
1477 * python/python.c (python_cmd_element): New.
1478 (_initialize_python): Assign python_cmd_element.
1479 * python/python.h (python_cmd_element): New.
1480 * tracepoint.c (while_stepping_cmd_element): New.
1481 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1482 * tracepoint.h (while_stepping_cmd_element): New.
1484 2018-09-17 Tom Tromey <tom@tromey.com>
1486 * infrun.c (save_infcall_suspend_state): Return
1487 infcall_suspend_state_up.
1488 (save_infcall_control_state): Return infcall_control_state_up.
1489 * inferior.h (save_infcall_suspend_state)
1490 (save_infcall_control_state): Declare later. Return unique
1493 2018-09-17 Tom Tromey <tom@tromey.com>
1495 * infrun.c (struct stop_context): Declare constructor,
1496 destructor, "changed" method.
1497 (stop_context::stop_context): Rename from save_stop_context.
1498 (stop_context::~stop_context): Rename from
1499 release_stop_context_cleanup.
1500 (normal_stop): Update.
1501 (stop_context::changed): Rename from stop_context_changed. Return
1504 2018-09-17 Tom Tromey <tom@tromey.com>
1506 * inferior.h (struct infcall_suspend_state_deleter): New.
1507 (infcall_suspend_state_up): New typedef.
1508 (struct infcall_control_state_deleter): New.
1509 (infcall_control_state_up): New typedef.
1510 (make_cleanup_restore_infcall_suspend_state)
1511 (make_cleanup_restore_infcall_control_state): Don't declare.
1512 * infcall.c (call_function_by_hand_dummy): Update.
1513 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1514 (make_cleanup_restore_infcall_suspend_state): Remove.
1515 (do_restore_infcall_control_state_cleanup)
1516 (make_cleanup_restore_infcall_control_state): Remove.
1518 2018-09-17 Tom Tromey <tom@tromey.com>
1520 * gdbthread.h (struct thread_control_state): Add initializer.
1521 (class thread_info) <control>: Remove initializer.
1522 * inferior.h (struct inferior_control_state): Add initializer.
1523 (class inferior) <control>: Remove initializer.
1524 (exit_inferior_1): Update.
1525 * infrun.c (struct infcall_control_state): Add constructors.
1526 (save_infcall_control_state): Use new.
1527 (restore_infcall_control_state, discard_infcall_control_state):
1530 2018-09-17 Tom Tromey <tom@tromey.com>
1532 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1534 <siginfo_data>: Now a unique_xmalloc_ptr.
1535 (save_infcall_suspend_state, restore_infcall_suspend_state)
1536 (discard_infcall_suspend_state)
1537 (get_infcall_suspend_state_regcache): Update.
1539 2018-09-17 Tom Tromey <tom@tromey.com>
1541 * gdbthread.h (struct thread_suspend_state): Add initializers.
1542 (class thread_info) <suspend>: Remove initializer.
1543 * infrun.c (struct infcall_suspend_state): Add initializers.
1544 (save_infcall_suspend_state): Use new.
1545 (discard_infcall_suspend_state): Use delete.
1547 2018-09-16 Tom Tromey <tom@tromey.com>
1549 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1551 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1552 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1553 (py_varobj_iter_new): Likewise.
1554 (py_varobj_get_iterator): Use gdbpy_ref.
1556 2018-09-16 Tom Tromey <tom@tromey.com>
1558 * python/py-threadevent.c (py_get_event_thread): Simplify.
1559 * python/py-inferior.c (infpy_thread_from_thread_handle):
1560 Return immediately after calling thread_to_thread_object. Use
1562 (thread_to_thread_object): Set the exception on a NULL return.
1564 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1566 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1568 2018-09-16 Tom Tromey <tom@tromey.com>
1570 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1573 2018-09-16 Tom Tromey <tom@tromey.com>
1575 * python/python-internal.h (thread_to_thread_object): Change
1577 * python/py-inferior.c (thread_to_thread_object): Return a new
1579 (infpy_thread_from_thread_handle): Update.
1580 * python/py-infthread.c (gdbpy_selected_thread): Update.
1581 * python/py-stopevent.c (create_stop_event_object): Update.
1582 * python/py-threadevent.c (py_get_event_thread): Return a new
1584 (py_get_event_thread): Update.
1585 * python/py-event.h (py_get_event_thread): Change return type.
1586 * python/py-continueevent.c (create_continue_event_object):
1589 2018-09-16 Tom Tromey <tom@tromey.com>
1591 * python/py-progspace.c (pspy_get_objfiles): Update.
1592 * python/python-internal.h (objfile_to_objfile_object): Change
1594 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1596 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1598 * python/python.c (gdbpy_get_current_objfile): Update.
1599 (gdbpy_objfiles): Update.
1600 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1602 (objfile_to_objfile_object): Return a new reference.
1603 * python/py-symtab.c (stpy_get_objfile): Update.
1604 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1607 2018-09-16 Tom Tromey <tom@tromey.com>
1609 * python/py-inferior.c (infpy_get_progspace): Update.
1610 * python/python-internal.h (pspace_to_pspace_object): Change
1612 * python/py-newobjfileevent.c
1613 (create_clear_objfiles_event_object): Update.
1614 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1616 * python/python.c (gdbpy_get_current_progspace): Update.
1617 (gdbpy_progspaces): Update.
1618 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1620 * python/py-objfile.c (objfpy_get_progspace): Update.
1621 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1624 2018-09-16 Tom Tromey <tom@tromey.com>
1626 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1627 (solib_name, block_for_pc, find_pc_line): New functions.
1628 (execute_unwinders): Update.
1629 * python/py-block.c (gdbpy_block_for_pc): Remove.
1630 * python/py-inferior.c (infpy_get_progspace): New function.
1631 (inferior_object_getset) <progspace>: Add.
1632 * python/py-progspace.c (pspy_objfiles): Rewrite.
1633 (pspy_solib_name, pspy_block_for_pc)
1634 (pspy_find_pc_line, pspy_is_valid): New functions.
1635 (progspace_object_methods): Add entries for solib_name,
1636 block_for_pc, find_pc_line, is_valid.
1637 * python/python-internal.h (gdbpy_block_for_pc)
1638 (build_objfiles_list): Don't declare.
1639 * python/python.c: Don't include solib.h.
1640 (gdbpy_solib_name, gdbpy_find_pc_line)
1641 (gdbpy_get_current_progspace, build_objfiles_list)
1642 (gdbpy_objfiles): Remove.
1643 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1644 solib_name, find_pc_line>: Remove entries.
1646 2018-09-16 Tom Tromey <tom@tromey.com>
1648 * top.c (new_ui_command): Use GNU style for metasyntactic
1650 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1652 * maint.c (maintenance_translate_address): Remove "<>" around
1654 * interps.c (interpreter_exec_cmd): Use GNU style for
1655 metasyntactic variables.
1656 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1657 metasyntactic variables.
1658 * tracepoint.c (tfind_range_command): Use GNU style for
1659 metasyntactic variables.
1660 (tfind_outside_command): Likewise.
1661 (_initialize_tracepoint): Likewise.
1662 * remote.c (extended_remote_target::create_inferior): Use GNU
1663 style for metasyntactic variables.
1664 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1665 metasyntactic variables.
1666 (adi_assign_command): Likewise.
1668 2018-09-16 Tom Tromey <tom@tromey.com>
1670 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1671 metasyntactic variables. Print message if no disassembler options
1674 2018-09-15 Tom Tromey <tom@tromey.com>
1676 * infcmd.c (get_inferior_args): Return const char *.
1677 * inferior.h (get_inferior_args): Return type now const.
1678 * linux-tdep.c (linux_fill_prpsinfo): Update.
1679 * procfs.c (procfs_target::make_corefile_notes): Update.
1681 2018-09-07 Tom Tromey <tom@tromey.com>
1683 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1686 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1688 * nios2-tdep.c (nios2_type_align): New.
1689 (nios2_gdb_arch_init): Install type_align hook.
1691 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1693 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1694 type that is neither object file owned, nor gdbarch owned.
1695 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1696 gdbarch is non-NULL.
1697 (alloc_type_instance): Allocate non-objfile owned types on the
1699 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1700 using TYPE_ALLOC to ensure memory is allocated on the correct
1702 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1703 obstack, or the gdbarch obstack.
1704 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1706 2018-09-14 Tom Tromey <tom@tromey.com>
1708 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1711 2018-09-14 Tom Tromey <tom@tromey.com>
1713 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1715 2018-09-13 Tom Tromey <tom@tromey.com>
1717 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1720 2018-09-13 Tom Tromey <tom@tromey.com>
1722 * exec.c (try_open_exec_file): Use std::string.
1724 2018-09-13 Tom Tromey <tom@tromey.com>
1726 * utils.h (gdb_bfd_errmsg): Return std::string.
1727 * exec.c (exec_file_attach): Update.
1728 * compile/compile-object-load.c (compile_object_load): Update.
1729 * utils.c (gdb_bfd_errmsg): Return std::string.
1731 2018-09-13 Tom Tromey <tom@tromey.com>
1733 * procfs.c (struct procinfo_deleter): New.
1734 (procinfo_up): New typedef.
1735 (do_destroy_procinfo_cleanup): Remove.
1736 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
1738 2018-09-13 Tom Tromey <tom@tromey.com>
1740 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1742 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1743 2018-09-13 Tom Tromey <tom@tromey.com>
1745 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1746 (pspy_get_objfiles): New function.
1747 (progspace_object_methods): New.
1748 (pspace_object_type): Add tp_methods callback.
1749 * python/python-internal.h (build_objfiles_list): New
1751 * python/python.c (build_objfiles_list): New function.
1752 (gdbpy_objfiles): Implement using build_objfiles_list.
1753 * NEWS: Mention the Progspace.objfiles method.
1755 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1757 * python/py-inferior.c (infpy_get_progspace): New function.
1758 (inferior_object_getset): Add progspace property.
1759 * NEWS: Mention the new property.
1761 2018-09-13 Tom Tromey <tom@tromey.com>
1764 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1766 2018-09-13 Tom Tromey <tom@tromey.com>
1769 * rust-lang.c (rust_enum_variant): Now static.
1770 (rust_empty_enum_p): New function.
1771 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1774 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1776 * python/py-inferior.c (infpy_repr): New.
1777 (inferior_object_type): Register infpy_repr.
1778 * python/py-objfile.c (objfpy_repr): New.
1779 (objfile_object_type): Register objfpy_repr.
1781 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1783 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1785 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1787 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1790 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
1792 * common/common-utils.c: Don't include '<sys/stat.h>'.
1793 (is_regular_file): Move to...
1794 * common/filestuff.c (is_regular_file): ... here.
1795 * common/common-utils.h (is_regular_file): Move to...
1796 * common/filestuff.h (is_regular_file): ... here.
1798 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1800 * skip.c (debug_skip): New variable.
1801 (skiplist_entry::do_skip_file_p): Add debug output.
1802 (skiplist_entry::do_skip_gfile_p): Likewise.
1803 (skiplist_entry::skip_function_p): Likewise.
1804 (_initialize_step_skip): Create debug command.
1805 * NEWS: Mention set/show debug skip.
1807 2018-09-11 Xavier Roirand <roirand@adacore.com>
1809 * darwin-nat.c (should_disable_startup_with_shell):
1811 (darwin_nat_target::create_inferior): Add call.
1813 2018-09-11 Xavier Roirand <roirand@adacore.com>
1815 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1816 inf_port, msg_state>: Initialize.
1817 (struct darwin_thread_info) <signaled, single_step>: Change
1818 type and initialize.
1819 (struct darwin_thread_info) <event>: Initialize.
1821 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1825 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1828 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1831 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1835 * gnulib/aclocal.m4: Regenerate.
1836 * gnulib/config.in: Regenerate.
1837 * gnulib/configure: Regenerate.
1838 * gnulib/import/Makefile.am: Update.
1839 * gnulib/import/Makefile.in: Update.
1840 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1841 * gnulib/import/_Noreturn.h: ... this.
1842 * gnulib/import/alloca.in.h: Update.
1843 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1844 * gnulib/import/arg-nonnull.h: ... this.
1845 * gnulib/import/assure.h: Update.
1846 * gnulib/import/at-func.c: Update.
1847 * gnulib/import/basename-lgpl.c: Update.
1848 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1849 * gnulib/import/c++defs.h: ... this.
1850 * gnulib/import/canonicalize-lgpl.c: Update.
1851 * gnulib/import/cdefs.h: Update.
1852 * gnulib/import/chdir-long.c: Update.
1853 * gnulib/import/chdir-long.h: Update.
1854 * gnulib/import/cloexec.c: Update.
1855 * gnulib/import/cloexec.h: Update.
1856 * gnulib/import/close.c: Update.
1857 * gnulib/import/closedir.c: Update.
1858 * gnulib/import/config.charset: Update.
1859 * gnulib/import/dirent-private.h: Update.
1860 * gnulib/import/dirent.in.h: Update.
1861 * gnulib/import/dirfd.c: Update.
1862 * gnulib/import/dirname-lgpl.c: Update.
1863 * gnulib/import/dirname.h: Update.
1864 * gnulib/import/dosname.h: Update.
1865 * gnulib/import/dup-safer-flag.c: Update.
1866 * gnulib/import/dup-safer.c: Update.
1867 * gnulib/import/dup.c: Update.
1868 * gnulib/import/dup2.c: Update.
1869 * gnulib/import/errno.in.h: Update.
1870 * gnulib/import/error.c: Update.
1871 * gnulib/import/error.h: Update.
1872 * gnulib/import/exitfail.c: Update.
1873 * gnulib/import/exitfail.h: Update.
1874 * gnulib/import/extra/update-copyright: Update.
1875 * gnulib/import/fchdir.c: Update.
1876 * gnulib/import/fcntl.c: Update.
1877 * gnulib/import/fcntl.in.h: Update.
1878 * gnulib/import/fd-hook.c: Update.
1879 * gnulib/import/fd-hook.h: Update.
1880 * gnulib/import/fd-safer-flag.c: Update.
1881 * gnulib/import/fd-safer.c: Update.
1882 * gnulib/import/fdopendir.c: Update.
1883 * gnulib/import/filename.h: Update.
1884 * gnulib/import/filenamecat-lgpl.c: Update.
1885 * gnulib/import/filenamecat.h: Update.
1886 * gnulib/import/flexmember.h: Update.
1887 * gnulib/import/float+.h: Update.
1888 * gnulib/import/float.c: Update.
1889 * gnulib/import/float.in.h: Update.
1890 * gnulib/import/fnmatch.c: Update.
1891 * gnulib/import/fnmatch.in.h: Update.
1892 * gnulib/import/fnmatch_loop.c: Update.
1893 * gnulib/import/fpucw.h: Update.
1894 * gnulib/import/frexp.c: Update.
1895 * gnulib/import/frexpl.c: Update.
1896 * gnulib/import/fstat.c: Update.
1897 * gnulib/import/fstatat.c: Update.
1898 * gnulib/import/getcwd-lgpl.c: Update.
1899 * gnulib/import/getcwd.c: Update.
1900 * gnulib/import/getdtablesize.c: Update.
1901 * gnulib/import/getlogin_r.c: Update.
1902 * gnulib/import/getprogname.c: Update.
1903 * gnulib/import/getprogname.h: Update.
1904 * gnulib/import/gettext.h: Update.
1905 * gnulib/import/gettimeofday.c: Update.
1906 * gnulib/import/glob-libc.h: Update.
1907 * gnulib/import/glob.c: Update.
1908 * gnulib/import/glob.in.h: Update.
1909 * gnulib/import/glob_internal.h: Update.
1910 * gnulib/import/glob_pattern_p.c: Update.
1911 * gnulib/import/globfree.c: Update.
1912 * gnulib/import/hard-locale.c: Update.
1913 * gnulib/import/hard-locale.h: Update.
1914 * gnulib/import/intprops.h: Update.
1915 * gnulib/import/inttypes.in.h: Update.
1916 * gnulib/import/isnan.c: Update.
1917 * gnulib/import/isnand-nolibm.h: Update.
1918 * gnulib/import/isnand.c: Update.
1919 * gnulib/import/isnanl-nolibm.h: Update.
1920 * gnulib/import/isnanl.c: Update.
1921 * gnulib/import/itold.c: Update.
1922 * gnulib/import/libc-config.h: Update.
1923 * gnulib/import/limits.in.h: Update.
1924 * gnulib/import/localcharset.c: Update.
1925 * gnulib/import/localcharset.h: Update.
1926 * gnulib/import/localtime-buffer.c: Update.
1927 * gnulib/import/localtime-buffer.h: Update.
1928 * gnulib/import/lstat.c: Update.
1929 * gnulib/import/m4/00gnulib.m4: Update.
1930 * gnulib/import/m4/__inline.m4: Update.
1931 * gnulib/import/m4/absolute-header.m4: Update.
1932 * gnulib/import/m4/alloca.m4: Update.
1933 * gnulib/import/m4/builtin-expect.m4: Update.
1934 * gnulib/import/m4/canonicalize.m4: Update.
1935 * gnulib/import/m4/chdir-long.m4: Update.
1936 * gnulib/import/m4/close.m4: Update.
1937 * gnulib/import/m4/closedir.m4: Update.
1938 * gnulib/import/m4/configmake.m4: Update.
1939 * gnulib/import/m4/d-ino.m4: Update.
1940 * gnulib/import/m4/d-type.m4: Update.
1941 * gnulib/import/m4/dirent_h.m4: Update.
1942 * gnulib/import/m4/dirfd.m4: Update.
1943 * gnulib/import/m4/dirname.m4: Update.
1944 * gnulib/import/m4/double-slash-root.m4: Update.
1945 * gnulib/import/m4/dup.m4: Update.
1946 * gnulib/import/m4/dup2.m4: Update.
1947 * gnulib/import/m4/eealloc.m4: Update.
1948 * gnulib/import/m4/environ.m4: Update.
1949 * gnulib/import/m4/errno_h.m4: Update.
1950 * gnulib/import/m4/error.m4: Update.
1951 * gnulib/import/m4/exponentd.m4: Update.
1952 * gnulib/import/m4/exponentl.m4: Update.
1953 * gnulib/import/m4/extensions.m4: Update.
1954 * gnulib/import/m4/extern-inline.m4: Update.
1955 * gnulib/import/m4/fchdir.m4: Update.
1956 * gnulib/import/m4/fcntl-o.m4: Update.
1957 * gnulib/import/m4/fcntl.m4: Update.
1958 * gnulib/import/m4/fcntl_h.m4: Update.
1959 * gnulib/import/m4/fdopendir.m4: Update.
1960 * gnulib/import/m4/filenamecat.m4: Update.
1961 * gnulib/import/m4/flexmember.m4: Update.
1962 * gnulib/import/m4/float_h.m4: Update.
1963 * gnulib/import/m4/fnmatch.m4: Update.
1964 * gnulib/import/m4/fnmatch_h.m4: Update.
1965 * gnulib/import/m4/fpieee.m4: Update.
1966 * gnulib/import/m4/frexp.m4: Update.
1967 * gnulib/import/m4/frexpl.m4: Update.
1968 * gnulib/import/m4/fstat.m4: Update.
1969 * gnulib/import/m4/fstatat.m4: Update.
1970 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1971 * gnulib/import/m4/getcwd-path-max.m4: Update.
1972 * gnulib/import/m4/getcwd.m4: Update.
1973 * gnulib/import/m4/getdtablesize.m4: Update.
1974 * gnulib/import/m4/getlogin.m4: Update.
1975 * gnulib/import/m4/getlogin_r.m4: Update.
1976 * gnulib/import/m4/getpagesize.m4: Update.
1977 * gnulib/import/m4/getprogname.m4: Update.
1978 * gnulib/import/m4/gettimeofday.m4: Update.
1979 * gnulib/import/m4/glibc21.m4: Update.
1980 * gnulib/import/m4/glob.m4: Update.
1981 * gnulib/import/m4/glob_h.m4: Update.
1982 * gnulib/import/m4/gnulib-cache.m4: Update.
1983 * gnulib/import/m4/gnulib-common.m4: Update.
1984 * gnulib/import/m4/gnulib-comp.m4: Update.
1985 * gnulib/import/m4/gnulib-tool.m4: Update.
1986 * gnulib/import/m4/hard-locale.m4: Update.
1987 * gnulib/import/m4/include_next.m4: Update.
1988 * gnulib/import/m4/inttypes-pri.m4: Update.
1989 * gnulib/import/m4/inttypes.m4: Update.
1990 * gnulib/import/m4/isnand.m4: Update.
1991 * gnulib/import/m4/isnanl.m4: Update.
1992 * gnulib/import/m4/largefile.m4: Update.
1993 * gnulib/import/m4/limits-h.m4: Update.
1994 * gnulib/import/m4/localcharset.m4: Update.
1995 * gnulib/import/m4/locale-fr.m4: Update.
1996 * gnulib/import/m4/locale-ja.m4: Update.
1997 * gnulib/import/m4/locale-zh.m4: Update.
1998 * gnulib/import/m4/localtime-buffer.m4: Update.
1999 * gnulib/import/m4/longlong.m4: Update.
2000 * gnulib/import/m4/lstat.m4: Update.
2001 * gnulib/import/m4/malloc.m4: Update.
2002 * gnulib/import/m4/malloca.m4: Update.
2003 * gnulib/import/m4/math_h.m4: Update.
2004 * gnulib/import/m4/mbrtowc.m4: Update.
2005 * gnulib/import/m4/mbsinit.m4: Update.
2006 * gnulib/import/m4/mbsrtowcs.m4: Update.
2007 * gnulib/import/m4/mbstate_t.m4: Update.
2008 * gnulib/import/m4/memchr.m4: Update.
2009 * gnulib/import/m4/memmem.m4: Update.
2010 * gnulib/import/m4/mempcpy.m4: Update.
2011 * gnulib/import/m4/memrchr.m4: Update.
2012 * gnulib/import/m4/mkdir.m4: Update.
2013 * gnulib/import/m4/mkstemp.m4: Update.
2014 * gnulib/import/m4/mmap-anon.m4: Update.
2015 * gnulib/import/m4/mode_t.m4: Update.
2016 * gnulib/import/m4/msvc-inval.m4: Update.
2017 * gnulib/import/m4/msvc-nothrow.m4: Update.
2018 * gnulib/import/m4/multiarch.m4: Update.
2019 * gnulib/import/m4/nocrash.m4: Update.
2020 * gnulib/import/m4/off_t.m4: Update.
2021 * gnulib/import/m4/onceonly.m4: Update.
2022 * gnulib/import/m4/open-cloexec.m4: Update.
2023 * gnulib/import/m4/open.m4: Update.
2024 * gnulib/import/m4/openat.m4: Update.
2025 * gnulib/import/m4/opendir.m4: Update.
2026 * gnulib/import/m4/pathmax.m4: Update.
2027 * gnulib/import/m4/rawmemchr.m4: Update.
2028 * gnulib/import/m4/readdir.m4: Update.
2029 * gnulib/import/m4/readlink.m4: Update.
2030 * gnulib/import/m4/realloc.m4: Update.
2031 * gnulib/import/m4/rename.m4: Update.
2032 * gnulib/import/m4/rewinddir.m4: Update.
2033 * gnulib/import/m4/rmdir.m4: Update.
2034 * gnulib/import/m4/save-cwd.m4: Update.
2035 * gnulib/import/m4/secure_getenv.m4: Update.
2036 * gnulib/import/m4/setenv.m4: Update.
2037 * gnulib/import/m4/signal_h.m4: Update.
2038 * gnulib/import/m4/ssize_t.m4: Update.
2039 * gnulib/import/m4/stat-time.m4: Update.
2040 * gnulib/import/m4/stat.m4: Update.
2041 * gnulib/import/m4/std-gnu11.m4: Update.
2042 * gnulib/import/m4/stdbool.m4: Update.
2043 * gnulib/import/m4/stddef_h.m4: Update.
2044 * gnulib/import/m4/stdint.m4: Update.
2045 * gnulib/import/m4/stdio_h.m4: Update.
2046 * gnulib/import/m4/stdlib_h.m4: Update.
2047 * gnulib/import/m4/strchrnul.m4: Update.
2048 * gnulib/import/m4/strdup.m4: Update.
2049 * gnulib/import/m4/strerror.m4: Update.
2050 * gnulib/import/m4/string_h.m4: Update.
2051 * gnulib/import/m4/strstr.m4: Update.
2052 * gnulib/import/m4/strtok_r.m4: Update.
2053 * gnulib/import/m4/sys_socket_h.m4: Update.
2054 * gnulib/import/m4/sys_stat_h.m4: Update.
2055 * gnulib/import/m4/sys_time_h.m4: Update.
2056 * gnulib/import/m4/sys_types_h.m4: Update.
2057 * gnulib/import/m4/tempname.m4: Update.
2058 * gnulib/import/m4/time_h.m4: Update.
2059 * gnulib/import/m4/unistd-safer.m4: Update.
2060 * gnulib/import/m4/unistd_h.m4: Update.
2061 * gnulib/import/m4/warn-on-use.m4: Update.
2062 * gnulib/import/m4/wchar_h.m4: Update.
2063 * gnulib/import/m4/wchar_t.m4: Update.
2064 * gnulib/import/m4/wctype_h.m4: Update.
2065 * gnulib/import/m4/wint_t.m4: Update.
2066 * gnulib/import/malloc.c: Update.
2067 * gnulib/import/malloc/scratch_buffer.h: Update.
2068 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2069 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2070 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2071 * gnulib/import/malloca.c: Update.
2072 * gnulib/import/malloca.h: Update.
2073 * gnulib/import/malloca.valgrind: Update.
2074 * gnulib/import/math.in.h: Update.
2075 * gnulib/import/mbrtowc.c: Update.
2076 * gnulib/import/mbsinit.c: Update.
2077 * gnulib/import/mbsrtowcs-impl.h: Update.
2078 * gnulib/import/mbsrtowcs-state.c: Update.
2079 * gnulib/import/mbsrtowcs.c: Update.
2080 * gnulib/import/memchr.c: Update.
2081 * gnulib/import/memmem.c: Update.
2082 * gnulib/import/mempcpy.c: Update.
2083 * gnulib/import/memrchr.c: Update.
2084 * gnulib/import/mkdir.c: Update.
2085 * gnulib/import/mkstemp.c: Update.
2086 * gnulib/import/msvc-inval.c: Update.
2087 * gnulib/import/msvc-inval.h: Update.
2088 * gnulib/import/msvc-nothrow.c: Update.
2089 * gnulib/import/msvc-nothrow.h: Update.
2090 * gnulib/import/open.c: Update.
2091 * gnulib/import/openat-die.c: Update.
2092 * gnulib/import/openat-priv.h: Update.
2093 * gnulib/import/openat-proc.c: Update.
2094 * gnulib/import/openat.c: Update.
2095 * gnulib/import/openat.h: Update.
2096 * gnulib/import/opendir.c: Update.
2097 * gnulib/import/pathmax.h: Update.
2098 * gnulib/import/pipe-safer.c: Update.
2099 * gnulib/import/rawmemchr.c: Update.
2100 * gnulib/import/readdir.c: Update.
2101 * gnulib/import/readlink.c: Update.
2102 * gnulib/import/realloc.c: Update.
2103 * gnulib/import/ref-add.sin: Update.
2104 * gnulib/import/ref-del.sin: Update.
2105 * gnulib/import/rename.c: Update.
2106 * gnulib/import/rewinddir.c: Update.
2107 * gnulib/import/rmdir.c: Update.
2108 * gnulib/import/same-inode.h: Update.
2109 * gnulib/import/save-cwd.c: Update.
2110 * gnulib/import/save-cwd.h: Update.
2111 * gnulib/import/scratch_buffer.h: Update.
2112 * gnulib/import/secure_getenv.c: Update.
2113 * gnulib/import/setenv.c: Update.
2114 * gnulib/import/signal.in.h: Update.
2115 * gnulib/import/stat-time.c: Update.
2116 * gnulib/import/stat-time.h: Update.
2117 * gnulib/import/stat-w32.c: Update.
2118 * gnulib/import/stat-w32.h: Update.
2119 * gnulib/import/stat.c: Update.
2120 * gnulib/import/stdbool.in.h: Update.
2121 * gnulib/import/stddef.in.h: Update.
2122 * gnulib/import/stdint.in.h: Update.
2123 * gnulib/import/stdio.in.h: Update.
2124 * gnulib/import/stdlib.in.h: Update.
2125 * gnulib/import/str-two-way.h: Update.
2126 * gnulib/import/strchrnul.c: Update.
2127 * gnulib/import/strdup.c: Update.
2128 * gnulib/import/streq.h: Update.
2129 * gnulib/import/strerror-override.c: Update.
2130 * gnulib/import/strerror-override.h: Update.
2131 * gnulib/import/strerror.c: Update.
2132 * gnulib/import/string.in.h: Update.
2133 * gnulib/import/stripslash.c: Update.
2134 * gnulib/import/strnlen1.c: Update.
2135 * gnulib/import/strnlen1.h: Update.
2136 * gnulib/import/strstr.c: Update.
2137 * gnulib/import/strtok_r.c: Update.
2138 * gnulib/import/sys_stat.in.h: Update.
2139 * gnulib/import/sys_time.in.h: Update.
2140 * gnulib/import/sys_types.in.h: Update.
2141 * gnulib/import/tempname.c: Update.
2142 * gnulib/import/tempname.h: Update.
2143 * gnulib/import/time.in.h: Update.
2144 * gnulib/import/unistd--.h: Update.
2145 * gnulib/import/unistd-safer.h: Update.
2146 * gnulib/import/unistd.in.h: Update.
2147 * gnulib/import/unsetenv.c: Update.
2148 * gnulib/import/verify.h: Update.
2149 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2150 * gnulib/import/wchar.in.h: Update.
2151 * gnulib/import/wctype.in.h: Update.
2152 * gnulib/import/xalloc-oversized.h: Update.
2153 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2154 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2156 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
2158 * record-btrace.c (get_thread_current_frame): Remove
2161 2018-09-10 Jerome Guitton <guitton@adacore.com>
2163 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2164 with check_tag to 1 if and only if the type is tagged and the
2165 component being searched cannot been found in the current
2166 view. Otherwise, always call ada_to_fixed_type with
2169 2018-09-10 Xavier Roirand <roirand@adacore.com>
2171 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2173 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2174 * ada-varobj.c (ada_varobj_get_number_of_children,
2175 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2177 2018-09-10 Xavier Roirand <roirand@adacore.com>
2179 * ada-valprint.c (ada_value_print): Use type instead of
2182 2018-09-10 Xavier Roirand <roirand@adacore.com>
2184 * ada-lang.c (ada_value_subscript): Handle case when parameter is
2185 an array of access to unconstrained array.
2187 2018-09-10 Xavier Roirand <roirand@adacore.com>
2189 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2190 (ada_check_typedef): Use it.
2192 2018-09-10 Xavier Roirand <roirand@adacore.com>
2194 * ada-varobj.c (ada_varobj_describe_struct_child)
2195 (ada_varobj_describe_child): Handle union case like struct one.
2197 2018-09-10 Tom Tromey <tom@tromey.com>
2200 * python/python.c (_initialize_python): Make example in "python"
2201 help work in Python 3.
2203 2018-09-10 Eli Zaretskii <eliz@gnu.org>
2205 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2206 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
2207 $(EXEEXT) to the script, as it is not a program.
2209 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
2211 * python/py-prettyprint.c (pretty_print_one_value): Return
2213 (print_string_repr): Adjust.
2214 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2215 * python/python-internal.h (apply_varobj_pretty_printer): Return
2217 * varobj.c (varobj_value_get_print_value): Adjust.
2219 2018-09-08 Tom Tromey <tom@tromey.com>
2222 * python/py-prettyprint.c (pretty_print_one_value): Check for
2225 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2227 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2228 replace_operator_with_call.
2230 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2232 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2234 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2236 * ada-typeprint.c (print_range): Print the bounds using TYPE
2237 rather than its TYPE_TARGET_TYPE.
2239 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2241 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2242 call to ada_to_fixed_value_create.
2244 2018-09-08 Jerome Guitton <guitton@adacore.com>
2246 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2248 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2250 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2253 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2255 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2256 Move update of loop variable "fi".
2258 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2260 * ada-lang.c (value_assign_to_component): In the case of
2261 big-endian targets, extract the bits of the given VAL
2262 using an src_offset of zero if container is not a scalar.
2264 2018-09-06 Simon Ser <contact@emersion.fr>
2267 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2268 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2269 * fbsd-tdep.c (fbsd_make_note_desc): New.
2270 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2271 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2272 * target.h (enum target_object) Add FreeBSD-specific
2273 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2275 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2277 * compile/compile-c.h (generate_c_for_variable_locations):
2278 Change reference to pointer.
2279 * compile/compile-c-support.c (compile_program) <compute>:
2281 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2282 (generate_c_for_for_one_variable): Likewise
2283 (generate_c_for_variable_locations): Likewise
2284 * compile/compile-c-types.c (compile_c_instance::convert_type):
2286 * compile/compile-cplus-symbols.c (convert_one_symbol):
2287 std::move the scope passed to enter_scope.
2288 * compile/compile-cplus-types.c
2289 (compile_cplus_instance::enter_scope): Make parameter
2291 (compile_cplus_instance::new_scope): Change reference to
2293 (compile_cplus_instance::convert_type): Likewise
2294 (compile_cplus_convert_typedef): std::move the scope passed to
2296 (compile_cplus_convert_struct_or_union): Likewise.
2297 (compile_cplus_convert_enum): Likewise.
2298 (compile_cplus_convert_namespace): Likewise.
2299 * compile/compile-cplus.h (compile_cplus_instance)
2300 <enter_scope>: Make parameter rvalue-reference.
2301 * compile/compile-internal.h (compile_instance)
2302 <get_cached_type>: Likewise
2303 * compile/compile-loc2c.c (push): Likewise
2307 (print_label): Likewise
2308 (pushf_register_address): Likewise
2309 (pushf_register): Likewise
2310 (do_compile_dwarf_expr_to_c): Likewise
2311 (compile_dwarf_expr_to_c): Likewise
2312 (compile_dwarf_bounds_to_c): Likewise
2313 * compile/compile.c (compile_instance::get_cached_type):
2315 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2316 (compile_dwarf_bounds_to_c): Likewise
2317 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2318 (dwarf2_compile_property_to_c): Likewise
2319 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2320 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2323 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2325 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2326 * tui/tui-data.c (init_content_element): Don't initialize it.
2328 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2330 * tui/tui-data.h (struct tui_win_info)
2331 <detail::opaque>: Remove.
2332 * tui/tui-data.c (init_win_info): Remove assignment.
2334 2018-09-05 Tom Tromey <tom@tromey.com>
2336 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2337 -Wformat-nonliteral.
2338 * target-float.c (host_float_ops<T>::to_string)
2339 (host_float_ops<T>::from_string): Use
2340 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2341 * configure: Rebuild.
2343 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2345 * printcmd.c (printf_c_string): Use
2346 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2347 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2349 2018-09-05 Tom Tromey <tom@tromey.com>
2351 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2353 2018-09-05 Tom de Vries <tdevries@suse.de>
2355 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2356 with resolve_abstract_p == true.
2357 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2358 defaulting to false. Propagate resolve_abstract_p to
2359 dwarf2_fetch_die_loc_sect_off.
2360 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2361 parameter, defaulting to false.
2362 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2363 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2365 * dwarf2read.h (struct die_info): Forward-declare.
2366 (die_info_ptr): New typedef.
2367 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2369 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2373 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2374 Pedro Alves <palves@redhat.com>
2376 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2377 "aclocal-m4-deps.mk". Include file here.
2378 $(srcdir)/aclocal.m4: Add "configure.ac".
2379 * gnulib/aclocal-m4-deps.mk: New file.
2380 * gnulib/update-gnulib.sh: Automatically update
2381 "aclocal-m4-deps.mk".
2383 2018-09-04 Tom Tromey <tom@tromey.com>
2385 * configure: Rebuild.
2386 * configure.ac: Remove multi-ice code.
2388 2018-09-04 Tom Tromey <tom@tromey.com>
2390 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2391 (ada-exp.o): Update.
2393 2018-09-04 Tom Tromey <tom@tromey.com>
2395 * Makefile.in (printcmd.o, target-float.o): Remove.
2396 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2398 2018-09-04 Tom Tromey <tom@tromey.com>
2400 * gnulib/Makefile.in: Remove obsolete comment.
2401 * Makefile.in: Remove obsolete comment.
2403 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2405 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2408 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2410 * riscv-tdep.c: Add 'prologue-value.h' include.
2411 (struct riscv_unwind_cache): New struct.
2412 (riscv_debug_unwinder): New global.
2413 (riscv_scan_prologue): Update arguments, capture register details
2415 (riscv_skip_prologue): Reformat arguments line, move end of
2416 prologue calculation into riscv_scan_prologue.
2417 (riscv_frame_cache): Update return type, create
2418 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2420 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2421 (riscv_frame_prev_register): Use the trad_frame within the
2423 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2426 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2428 * trad-frame.h (trad_frame_set_realreg): Declare.
2429 (trad_frame_set_addr): Declare.
2430 * trad-frame.c (trad_frame_set_realreg): Define new function.
2431 (trad_frame_set_addr): Define new function.
2432 (trad_frame_set_reg_realreg): Use new function.
2433 (trad_frame_set_reg_addr): Use new function.
2435 2018-09-01 Keith Seitz <keiths@redhat.com>
2437 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2438 pulongest instead of "%lld".
2439 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2442 2018-08-31 Tom Tromey <tom@tromey.com>
2444 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2447 2018-08-31 Pedro Alves <palves@redhat.com>
2449 * gdbarch.h: Regenerate.
2451 2018-08-31 Pedro Alves <palves@redhat.com>
2453 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2454 * target.h (Hardware watchpoint interfaces): Describe
2455 continuable/steppable/non-steppable watchpoints.
2456 * gdbarch.h, gdbarch.c: Regenerate.
2458 2018-08-31 Pedro Alves <palves@redhat.com>
2460 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2463 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2464 * target.h (target_ops::have_continuable_watchpoint): Delete.
2465 (target_have_continuable_watchpoint): Delete.
2466 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2467 * target-delegates.c: Regenerate.
2469 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2471 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2472 the files present in "gnulib/import/m4/".
2474 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2476 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2477 c.sw, c.swsp, and c.sdsp.
2479 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2481 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2482 (riscv_read_misa_reg): Don't cache value read into inferior data.
2483 (riscv_new_inferior_data): Delete.
2484 (riscv_inferior_data_cleanup): Delete.
2485 (riscv_inferior_data): Delete.
2486 (riscv_invalidate_inferior_data): Delete.
2487 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2489 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2491 * compile/compile-cplus-types.c
2492 (compile_cplus_instance::leave_scope): Take the address of scope
2494 (compile_cplus_instance::convert_qualified_base): Compare quals
2497 2018-08-30 Keith Seitz <keiths@redhat.com>
2499 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2500 Use "%s" and host_address_to_string instead of "%p" in printf.
2502 2018-08-29 Keith Seitz <keiths@redhat.com>
2504 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2505 and compile-cplus-types.c.
2506 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2507 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2508 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2510 * compile/compile-c-support.c: Include compile-cplus.h.
2511 (load_libcompile): Templatize.
2512 (get_compile_context): "New" function.
2513 (c_get_compile_context): Use get_compile_context.
2514 (cplus_get_compile_context): New function.
2515 (cplus_push_user_expression, cplus_pop_user_expression)
2516 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2517 (cplus_compute_program): Define new structs/functions.
2518 * compile/compile-cplus-symmbols.c: New file.
2519 * compile/compile-cplus-types.c: New file.
2520 * compile/compile-cplus.h: New file.
2521 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2523 * compile/compile-object-load.c (get_out_value_type): Use
2524 strncmp_iw when comparing symbol names.
2525 (compile_object_load): Add mst_bss and mst_data.
2526 * compile/compile.c (_initialize_compile): Remove
2527 -Wno-implicit-function-declaration from `compile_args'.
2528 * compile/gcc-cp-plugin.h: New file.
2529 * NEWS: Mention C++ compile support and new debug options.
2531 2018-08-29 Keith Seitz <keiths@redhat.com>
2533 * linespec.c (collect_info::add_symbol): Make virtual.
2534 (struct symbol_searcher_collect_info): New struct.
2535 (symbol_searcher::find_all_symbols): New method.
2536 * symtab.h (class symbol_searcher): New class.
2538 2018-08-29 Keith Seitz <keiths@redhat.com>
2540 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2541 Change to vector of block_symbol. Update all users.
2542 (struct collect_info) <symbols>: Likewise.
2543 (collect_info::add_symbol): Take block_symbol as argument.
2545 (decode_compound_collector) <m_symbols>: Change type to vector
2546 of block_symbol. Update all users.
2547 (decode_compound_collector::operator ()): Change parameter type
2549 (find_method, find_function_symbols, find_linespec_symbols)
2550 (find_label_symbols_in_block, find_label_symbols): Change symbol
2551 vectors to block_symbol vectors.
2552 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2555 2018-08-29 Keith Seitz <keiths@redhat.com>
2557 * linespec.c (symbolp): Remove typedef and VEC definitions.
2558 (bound_minimal_symbol_d): Likewise.
2560 2018-08-29 Keith Seitz <keiths@redhat.com>
2562 * linespec.c (decode_compound_collector::decode_compound_collector):
2563 Remove initialization for `m_symtabs'.
2564 (decode_compound_collector::release_symbols): Change return type
2565 to std::vector. Update all callers.
2566 (class decode_compound_collector) <m_symbols>: Change type to
2568 (lookup_prefix_sym): Change return type to std::vector. Update all
2570 (compare_symbols): Remove.
2571 (std_compare_symbols): Rename to `compare_symbols'.
2572 (find_method): Change `sym_classes' parameter to std::vector.
2573 Update all callers. Use std::sort to sort sym_classes.
2574 (find_linespec_symbols): Remove cleanup.
2576 2018-08-29 Keith Seitz <keiths@redhat.com>
2578 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2579 std::vector. Update all users.
2580 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2581 (struct collect_info) <minimal_symbols>: Likewise.
2582 (compare_msymbols): Return bool. Change parameters to const
2583 bound_minimal_symbol references.
2584 (find_method, find_function_symbols, find_linespec_symbols): Change
2585 `minsyms' parameter to std::vector. Update all callers.
2587 2018-08-29 Keith Seitz <keiths@redhat.com>
2589 * linespec.c (struct linespec) <label_symbols>: Change type to
2590 std::vector. Update all users.
2591 (find_label_symbols_in_block): Change `result' parameter to
2592 std::vector. Update all callers.
2593 (find_label_symbols): Return std::vector. Update all callers.
2595 2018-08-29 Keith Seitz <keiths@redhat.com>
2597 * linespec.c (struct linespec) <function_symbols>: Change type to
2598 std::vector. Update all users.
2599 (struct collect_info) <function_symbols>: Likewise.
2600 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2601 (std_compare_symbols): New function.
2602 (find_method, find_function_symbols, find_linespec_symbols)
2603 (find_label_symbols_in_block): Change `symbols' parameter to
2604 std::vector. Update all callers.
2605 (find_label_symbols): Likewise for `function_symbols' and
2608 2018-08-29 Keith Seitz <keiths@redhat.com>
2610 * linespec.c (symtab_vector_up): Define.
2611 (struct linespec) <file_symtabs>: Change type to std::vector *.
2613 (struct collect_info) <file_symtabs>: Likewise.
2614 (collect_symtabs_from_filename): Return symtab_vector_up.
2616 (decode_objc): Remove cleanup.
2617 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2618 (symtab_collector::release_symtabs): Return symtab_vector_up.
2620 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2622 (collect_symtabs_from_filename, symtabs_from_filename): Return
2623 symtab_vector_up. Update all callers.
2625 2018-08-29 Tom Tromey <tom@tromey.com>
2627 * csky-tdep.c (csky_analyze_prologue): Use
2628 core_addr_to_string_nz.
2630 2018-08-29 Tom Tromey <tom@tromey.com>
2632 * windows-nat.c (struct xlate_exception) <them>: Change type to
2634 (xlate): Fix formatting. Remove last entry.
2635 (struct xlate_exception, xlate): Comment out.
2636 (windows_nat_target::resume): Use ranged for.
2638 2018-08-29 Jim Wilson <jimw@sifive.com>
2640 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2641 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2643 (riscv_linux_nat_target::store_registers): Likewise.
2645 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2649 * gnulib/aclocal.m4: Regenerate.
2650 * gnulib/config.in: Regenerate.
2651 * gnulib/configure: Regenerate.
2652 * gnulib/import/Makefile.am: Update.
2653 * gnulib/import/Makefile.in: Update.
2654 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2655 * gnulib/import/_Noreturn.h: ... this.
2656 * gnulib/import/alloca.in.h: Update.
2657 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2658 * gnulib/import/arg-nonnull.h: ... this.
2659 * gnulib/import/assure.h: Update.
2660 * gnulib/import/at-func.c: Update.
2661 * gnulib/import/basename-lgpl.c: Update.
2662 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2663 * gnulib/import/c++defs.h: ... this.
2664 * gnulib/import/canonicalize-lgpl.c: Update.
2665 * gnulib/import/cdefs.h: Update.
2666 * gnulib/import/chdir-long.c: Update.
2667 * gnulib/import/chdir-long.h: Update.
2668 * gnulib/import/cloexec.c: Update.
2669 * gnulib/import/cloexec.h: Update.
2670 * gnulib/import/close.c: Update.
2671 * gnulib/import/closedir.c: Update.
2672 * gnulib/import/config.charset: Update.
2673 * gnulib/import/dirent-private.h: Update.
2674 * gnulib/import/dirent.in.h: Update.
2675 * gnulib/import/dirfd.c: Update.
2676 * gnulib/import/dirname-lgpl.c: Update.
2677 * gnulib/import/dirname.h: Update.
2678 * gnulib/import/dosname.h: Update.
2679 * gnulib/import/dup-safer-flag.c: Update.
2680 * gnulib/import/dup-safer.c: Update.
2681 * gnulib/import/dup.c: Update.
2682 * gnulib/import/dup2.c: Update.
2683 * gnulib/import/errno.in.h: Update.
2684 * gnulib/import/error.c: Update.
2685 * gnulib/import/error.h: Update.
2686 * gnulib/import/exitfail.c: Update.
2687 * gnulib/import/exitfail.h: Update.
2688 * gnulib/import/extra/update-copyright: Update.
2689 * gnulib/import/fchdir.c: Update.
2690 * gnulib/import/fcntl.c: Update.
2691 * gnulib/import/fcntl.in.h: Update.
2692 * gnulib/import/fd-hook.c: Update.
2693 * gnulib/import/fd-hook.h: Update.
2694 * gnulib/import/fd-safer-flag.c: Update.
2695 * gnulib/import/fd-safer.c: Update.
2696 * gnulib/import/fdopendir.c: Update.
2697 * gnulib/import/filename.h: Update.
2698 * gnulib/import/filenamecat-lgpl.c: Update.
2699 * gnulib/import/filenamecat.h: Update.
2700 * gnulib/import/flexmember.h: Update.
2701 * gnulib/import/float+.h: Update.
2702 * gnulib/import/float.c: Update.
2703 * gnulib/import/float.in.h: Update.
2704 * gnulib/import/fnmatch.c: Update.
2705 * gnulib/import/fnmatch.in.h: Update.
2706 * gnulib/import/fnmatch_loop.c: Update.
2707 * gnulib/import/fpucw.h: Update.
2708 * gnulib/import/frexp.c: Update.
2709 * gnulib/import/frexpl.c: Update.
2710 * gnulib/import/fstat.c: Update.
2711 * gnulib/import/fstatat.c: Update.
2712 * gnulib/import/getcwd-lgpl.c: Update.
2713 * gnulib/import/getcwd.c: Update.
2714 * gnulib/import/getdtablesize.c: Update.
2715 * gnulib/import/getlogin_r.c: Update.
2716 * gnulib/import/getprogname.c: Update.
2717 * gnulib/import/getprogname.h: Update.
2718 * gnulib/import/gettext.h: Update.
2719 * gnulib/import/gettimeofday.c: Update.
2720 * gnulib/import/glob-libc.h: Update.
2721 * gnulib/import/glob.c: Update.
2722 * gnulib/import/glob.in.h: Update.
2723 * gnulib/import/glob_internal.h: Update.
2724 * gnulib/import/glob_pattern_p.c: Update.
2725 * gnulib/import/globfree.c: Update.
2726 * gnulib/import/hard-locale.c: Update.
2727 * gnulib/import/hard-locale.h: Update.
2728 * gnulib/import/intprops.h: Update.
2729 * gnulib/import/inttypes.in.h: Update.
2730 * gnulib/import/isnan.c: Update.
2731 * gnulib/import/isnand-nolibm.h: Update.
2732 * gnulib/import/isnand.c: Update.
2733 * gnulib/import/isnanl-nolibm.h: Update.
2734 * gnulib/import/isnanl.c: Update.
2735 * gnulib/import/itold.c: Update.
2736 * gnulib/import/libc-config.h: Update.
2737 * gnulib/import/limits.in.h: Update.
2738 * gnulib/import/localcharset.c: Update.
2739 * gnulib/import/localcharset.h: Update.
2740 * gnulib/import/localtime-buffer.c: Update.
2741 * gnulib/import/localtime-buffer.h: Update.
2742 * gnulib/import/lstat.c: Update.
2743 * gnulib/import/m4/00gnulib.m4: Update.
2744 * gnulib/import/m4/__inline.m4: Update.
2745 * gnulib/import/m4/absolute-header.m4: Update.
2746 * gnulib/import/m4/alloca.m4: Update.
2747 * gnulib/import/m4/builtin-expect.m4: Update.
2748 * gnulib/import/m4/canonicalize.m4: Update.
2749 * gnulib/import/m4/chdir-long.m4: Update.
2750 * gnulib/import/m4/close.m4: Update.
2751 * gnulib/import/m4/closedir.m4: Update.
2752 * gnulib/import/m4/configmake.m4: Update.
2753 * gnulib/import/m4/d-ino.m4: Update.
2754 * gnulib/import/m4/d-type.m4: Update.
2755 * gnulib/import/m4/dirent_h.m4: Update.
2756 * gnulib/import/m4/dirfd.m4: Update.
2757 * gnulib/import/m4/dirname.m4: Update.
2758 * gnulib/import/m4/double-slash-root.m4: Update.
2759 * gnulib/import/m4/dup.m4: Update.
2760 * gnulib/import/m4/dup2.m4: Update.
2761 * gnulib/import/m4/eealloc.m4: Update.
2762 * gnulib/import/m4/environ.m4: Update.
2763 * gnulib/import/m4/errno_h.m4: Update.
2764 * gnulib/import/m4/error.m4: Update.
2765 * gnulib/import/m4/exponentd.m4: Update.
2766 * gnulib/import/m4/exponentl.m4: Update.
2767 * gnulib/import/m4/extensions.m4: Update.
2768 * gnulib/import/m4/extern-inline.m4: Update.
2769 * gnulib/import/m4/fchdir.m4: Update.
2770 * gnulib/import/m4/fcntl-o.m4: Update.
2771 * gnulib/import/m4/fcntl.m4: Update.
2772 * gnulib/import/m4/fcntl_h.m4: Update.
2773 * gnulib/import/m4/fdopendir.m4: Update.
2774 * gnulib/import/m4/filenamecat.m4: Update.
2775 * gnulib/import/m4/flexmember.m4: Update.
2776 * gnulib/import/m4/float_h.m4: Update.
2777 * gnulib/import/m4/fnmatch.m4: Update.
2778 * gnulib/import/m4/fnmatch_h.m4: Update.
2779 * gnulib/import/m4/fpieee.m4: Update.
2780 * gnulib/import/m4/frexp.m4: Update.
2781 * gnulib/import/m4/frexpl.m4: Update.
2782 * gnulib/import/m4/fstat.m4: Update.
2783 * gnulib/import/m4/fstatat.m4: Update.
2784 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2785 * gnulib/import/m4/getcwd-path-max.m4: Update.
2786 * gnulib/import/m4/getcwd.m4: Update.
2787 * gnulib/import/m4/getdtablesize.m4: Update.
2788 * gnulib/import/m4/getlogin.m4: Update.
2789 * gnulib/import/m4/getlogin_r.m4: Update.
2790 * gnulib/import/m4/getpagesize.m4: Update.
2791 * gnulib/import/m4/getprogname.m4: Update.
2792 * gnulib/import/m4/gettimeofday.m4: Update.
2793 * gnulib/import/m4/glibc21.m4: Update.
2794 * gnulib/import/m4/glob.m4: Update.
2795 * gnulib/import/m4/glob_h.m4: Update.
2796 * gnulib/import/m4/gnulib-cache.m4: Update.
2797 * gnulib/import/m4/gnulib-common.m4: Update.
2798 * gnulib/import/m4/gnulib-comp.m4: Update.
2799 * gnulib/import/m4/gnulib-tool.m4: Update.
2800 * gnulib/import/m4/hard-locale.m4: Update.
2801 * gnulib/import/m4/include_next.m4: Update.
2802 * gnulib/import/m4/inttypes-pri.m4: Update.
2803 * gnulib/import/m4/inttypes.m4: Update.
2804 * gnulib/import/m4/isnand.m4: Update.
2805 * gnulib/import/m4/isnanl.m4: Update.
2806 * gnulib/import/m4/largefile.m4: Update.
2807 * gnulib/import/m4/limits-h.m4: Update.
2808 * gnulib/import/m4/localcharset.m4: Update.
2809 * gnulib/import/m4/locale-fr.m4: Update.
2810 * gnulib/import/m4/locale-ja.m4: Update.
2811 * gnulib/import/m4/locale-zh.m4: Update.
2812 * gnulib/import/m4/localtime-buffer.m4: Update.
2813 * gnulib/import/m4/longlong.m4: Update.
2814 * gnulib/import/m4/lstat.m4: Update.
2815 * gnulib/import/m4/malloc.m4: Update.
2816 * gnulib/import/m4/malloca.m4: Update.
2817 * gnulib/import/m4/math_h.m4: Update.
2818 * gnulib/import/m4/mbrtowc.m4: Update.
2819 * gnulib/import/m4/mbsinit.m4: Update.
2820 * gnulib/import/m4/mbsrtowcs.m4: Update.
2821 * gnulib/import/m4/mbstate_t.m4: Update.
2822 * gnulib/import/m4/memchr.m4: Update.
2823 * gnulib/import/m4/memmem.m4: Update.
2824 * gnulib/import/m4/mempcpy.m4: Update.
2825 * gnulib/import/m4/memrchr.m4: Update.
2826 * gnulib/import/m4/mkdir.m4: Update.
2827 * gnulib/import/m4/mkstemp.m4: Update.
2828 * gnulib/import/m4/mmap-anon.m4: Update.
2829 * gnulib/import/m4/mode_t.m4: Update.
2830 * gnulib/import/m4/msvc-inval.m4: Update.
2831 * gnulib/import/m4/msvc-nothrow.m4: Update.
2832 * gnulib/import/m4/multiarch.m4: Update.
2833 * gnulib/import/m4/nocrash.m4: Update.
2834 * gnulib/import/m4/off_t.m4: Update.
2835 * gnulib/import/m4/onceonly.m4: Update.
2836 * gnulib/import/m4/open-cloexec.m4: Update.
2837 * gnulib/import/m4/open.m4: Update.
2838 * gnulib/import/m4/openat.m4: Update.
2839 * gnulib/import/m4/opendir.m4: Update.
2840 * gnulib/import/m4/pathmax.m4: Update.
2841 * gnulib/import/m4/rawmemchr.m4: Update.
2842 * gnulib/import/m4/readdir.m4: Update.
2843 * gnulib/import/m4/readlink.m4: Update.
2844 * gnulib/import/m4/realloc.m4: Update.
2845 * gnulib/import/m4/rename.m4: Update.
2846 * gnulib/import/m4/rewinddir.m4: Update.
2847 * gnulib/import/m4/rmdir.m4: Update.
2848 * gnulib/import/m4/save-cwd.m4: Update.
2849 * gnulib/import/m4/secure_getenv.m4: Update.
2850 * gnulib/import/m4/setenv.m4: Update.
2851 * gnulib/import/m4/signal_h.m4: Update.
2852 * gnulib/import/m4/ssize_t.m4: Update.
2853 * gnulib/import/m4/stat-time.m4: Update.
2854 * gnulib/import/m4/stat.m4: Update.
2855 * gnulib/import/m4/std-gnu11.m4: Update.
2856 * gnulib/import/m4/stdbool.m4: Update.
2857 * gnulib/import/m4/stddef_h.m4: Update.
2858 * gnulib/import/m4/stdint.m4: Update.
2859 * gnulib/import/m4/stdio_h.m4: Update.
2860 * gnulib/import/m4/stdlib_h.m4: Update.
2861 * gnulib/import/m4/strchrnul.m4: Update.
2862 * gnulib/import/m4/strdup.m4: Update.
2863 * gnulib/import/m4/strerror.m4: Update.
2864 * gnulib/import/m4/string_h.m4: Update.
2865 * gnulib/import/m4/strstr.m4: Update.
2866 * gnulib/import/m4/strtok_r.m4: Update.
2867 * gnulib/import/m4/sys_socket_h.m4: Update.
2868 * gnulib/import/m4/sys_stat_h.m4: Update.
2869 * gnulib/import/m4/sys_time_h.m4: Update.
2870 * gnulib/import/m4/sys_types_h.m4: Update.
2871 * gnulib/import/m4/tempname.m4: Update.
2872 * gnulib/import/m4/time_h.m4: Update.
2873 * gnulib/import/m4/unistd-safer.m4: Update.
2874 * gnulib/import/m4/unistd_h.m4: Update.
2875 * gnulib/import/m4/warn-on-use.m4: Update.
2876 * gnulib/import/m4/wchar_h.m4: Update.
2877 * gnulib/import/m4/wchar_t.m4: Update.
2878 * gnulib/import/m4/wctype_h.m4: Update.
2879 * gnulib/import/m4/wint_t.m4: Update.
2880 * gnulib/import/malloc.c: Update.
2881 * gnulib/import/malloc/scratch_buffer.h: Update.
2882 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2883 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2884 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2885 * gnulib/import/malloca.c: Update.
2886 * gnulib/import/malloca.h: Update.
2887 * gnulib/import/malloca.valgrind: Update.
2888 * gnulib/import/math.in.h: Update.
2889 * gnulib/import/mbrtowc.c: Update.
2890 * gnulib/import/mbsinit.c: Update.
2891 * gnulib/import/mbsrtowcs-impl.h: Update.
2892 * gnulib/import/mbsrtowcs-state.c: Update.
2893 * gnulib/import/mbsrtowcs.c: Update.
2894 * gnulib/import/memchr.c: Update.
2895 * gnulib/import/memmem.c: Update.
2896 * gnulib/import/mempcpy.c: Update.
2897 * gnulib/import/memrchr.c: Update.
2898 * gnulib/import/mkdir.c: Update.
2899 * gnulib/import/mkstemp.c: Update.
2900 * gnulib/import/msvc-inval.c: Update.
2901 * gnulib/import/msvc-inval.h: Update.
2902 * gnulib/import/msvc-nothrow.c: Update.
2903 * gnulib/import/msvc-nothrow.h: Update.
2904 * gnulib/import/open.c: Update.
2905 * gnulib/import/openat-die.c: Update.
2906 * gnulib/import/openat-priv.h: Update.
2907 * gnulib/import/openat-proc.c: Update.
2908 * gnulib/import/openat.c: Update.
2909 * gnulib/import/openat.h: Update.
2910 * gnulib/import/opendir.c: Update.
2911 * gnulib/import/pathmax.h: Update.
2912 * gnulib/import/pipe-safer.c: Update.
2913 * gnulib/import/rawmemchr.c: Update.
2914 * gnulib/import/readdir.c: Update.
2915 * gnulib/import/readlink.c: Update.
2916 * gnulib/import/realloc.c: Update.
2917 * gnulib/import/ref-add.sin: Update.
2918 * gnulib/import/ref-del.sin: Update.
2919 * gnulib/import/rename.c: Update.
2920 * gnulib/import/rewinddir.c: Update.
2921 * gnulib/import/rmdir.c: Update.
2922 * gnulib/import/same-inode.h: Update.
2923 * gnulib/import/save-cwd.c: Update.
2924 * gnulib/import/save-cwd.h: Update.
2925 * gnulib/import/scratch_buffer.h: Update.
2926 * gnulib/import/secure_getenv.c: Update.
2927 * gnulib/import/setenv.c: Update.
2928 * gnulib/import/signal.in.h: Update.
2929 * gnulib/import/stat-time.c: Update.
2930 * gnulib/import/stat-time.h: Update.
2931 * gnulib/import/stat-w32.c: Update.
2932 * gnulib/import/stat-w32.h: Update.
2933 * gnulib/import/stat.c: Update.
2934 * gnulib/import/stdbool.in.h: Update.
2935 * gnulib/import/stddef.in.h: Update.
2936 * gnulib/import/stdint.in.h: Update.
2937 * gnulib/import/stdio.in.h: Update.
2938 * gnulib/import/stdlib.in.h: Update.
2939 * gnulib/import/str-two-way.h: Update.
2940 * gnulib/import/strchrnul.c: Update.
2941 * gnulib/import/strdup.c: Update.
2942 * gnulib/import/streq.h: Update.
2943 * gnulib/import/strerror-override.c: Update.
2944 * gnulib/import/strerror-override.h: Update.
2945 * gnulib/import/strerror.c: Update.
2946 * gnulib/import/string.in.h: Update.
2947 * gnulib/import/stripslash.c: Update.
2948 * gnulib/import/strnlen1.c: Update.
2949 * gnulib/import/strnlen1.h: Update.
2950 * gnulib/import/strstr.c: Update.
2951 * gnulib/import/strtok_r.c: Update.
2952 * gnulib/import/sys_stat.in.h: Update.
2953 * gnulib/import/sys_time.in.h: Update.
2954 * gnulib/import/sys_types.in.h: Update.
2955 * gnulib/import/tempname.c: Update.
2956 * gnulib/import/tempname.h: Update.
2957 * gnulib/import/time.in.h: Update.
2958 * gnulib/import/unistd--.h: Update.
2959 * gnulib/import/unistd-safer.h: Update.
2960 * gnulib/import/unistd.in.h: Update.
2961 * gnulib/import/unsetenv.c: Update.
2962 * gnulib/import/verify.h: Update.
2963 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2964 * gnulib/import/wchar.in.h: Update.
2965 * gnulib/import/wctype.in.h: Update.
2966 * gnulib/import/xalloc-oversized.h: Update.
2967 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2968 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2970 2018-08-16 Gary Benson <gbenson@redhat.com>
2973 * gdb/main.c (captured_main_1): Exit with nonzero status
2974 in batch mode if the last command to be executed failed.
2975 * NEWS: Mention the above.
2977 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2979 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2980 end of warning message.
2982 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2985 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2986 (aarch64_extract_return_value): Use
2987 aapcs_is_vfp_call_or_return_candidate.
2988 (aarch64_return_in_memory): Likewise.
2989 (aarch64_store_return_value): Likewise.
2991 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2994 (aapcs_is_vfp_call_or_return_candidate): Make static
2995 (pass_in_v_or_stack): Remove function.
2996 (pass_in_v_vfp_candidate): New function.
2997 (aarch64_push_dummy_call): Check for float register candidates.
2999 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3001 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3002 (aapcs_is_vfp_call_or_return_candidate_1): New function.
3003 (aapcs_is_vfp_call_or_return_candidate): Likewise.
3005 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3008 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3009 (struct ipa_sym_addresses): Rename to...
3010 (struct ipa_sym_addresses_common): ... this.
3011 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3013 2018-08-28 Tom Tromey <tom@tromey.com>
3015 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3016 (token_fifo): Now a std::vector.
3017 (yylex, c_parse): Update.
3018 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3019 (token_fifo): Now a std::vector.
3020 (yylex, d_parse): Update.
3021 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3022 (token_fifo): Now a std::vector.
3023 (yylex, go_parse): Update.
3025 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
3027 * parser-defs.h (struct type_stack) <elements>: Change type to
3028 std::vector<union type_stack_elt>.
3029 <depth, size>: Remove.
3030 * parse.c (parse_exp_in_context_1): Adjust.
3031 (type_stack_reserve): Remove.
3032 (check_type_stack_depth): Remove.
3033 (insert_into_type_stack): Adjust to std::vector.
3034 (insert_type): Likewise.
3035 (push_type): Likewise.
3036 (push_type_int): Likewise.
3037 (insert_type_address_space): Likewise.
3038 (pop_type): Likewise.
3039 (pop_type_int): Likewise.
3040 (pop_typelist): Likewise.
3041 (pop_type_stack): Likewise.
3042 (append_type_stack): Likewise.
3043 (push_type_stack): Likewise.
3044 (get_type_stack): Likewise.
3045 (type_stack_cleanup): Likewise.
3046 (push_typelist): Likewise.
3047 (follow_types): Likewise.
3048 (_initialize_parse): Likewise.
3050 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
3052 * NEWS: Mention csky target.
3054 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
3055 Hafiz Abid Qadeer <abidh@codesourcery.com>
3056 Don Breazeal <donb@codesourcery.com>
3058 * csky-linux-tdep.c: New file.
3059 * csky-tdep.c: Likewise.
3060 * csky-tdep.h: Likewise.
3061 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3063 (HFILES_NO_SRCDIR): Add csky-tdep.h.
3064 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3065 * configure.tgt: Add csky support.
3067 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
3069 * python/py-framefilter.c (py_print_frame): Print frame architecture
3070 when printing on an MI output.
3072 2018-08-27 Tom Tromey <tom@tromey.com>
3075 * configure: Rebuild.
3076 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3078 2018-08-27 Tom Tromey <tom@tromey.com>
3080 * aarch64-linux-tdep.c
3081 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3084 2018-08-27 Tom Tromey <tom@tromey.com>
3086 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3088 (ppc64_standard_linkage1, ppc64_standard_linkage2)
3089 (ppc64_standard_linkage3, ppc64_standard_linkage4)
3090 (ppc64_standard_linkage5, ppc64_standard_linkage6)
3091 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3094 2018-08-27 Tom Tromey <tom@tromey.com>
3096 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3097 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3099 2018-08-27 Tom Tromey <tom@tromey.com>
3101 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3102 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3104 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3106 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3108 * sparc-linux-tdep.c (sparc32_linux_sigframe)
3109 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3110 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3112 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3113 (ppc64_linux_sigaction_tramp_frame)
3114 (ppc32_linux_sighandler_tramp_frame)
3115 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3116 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3117 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3118 * mn10300-linux-tdep.c (am33_linux_sigframe)
3119 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3120 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3121 * mips-linux-tdep.c (mips_linux_o32_sigframe)
3122 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3123 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3124 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3125 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3126 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3127 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3128 * microblaze-linux-tdep.c
3129 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3130 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3131 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3132 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3133 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3134 * common/common-types.h (ULONGEST_MAX): New define.
3135 (CORE_ADDR_MAX): Fix formatting.
3136 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3137 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3138 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3139 (arm_linux_rt_sigreturn_tramp_frame)
3140 (arm_eabi_linux_sigreturn_tramp_frame)
3141 (arm_eabi_linux_rt_sigreturn_tramp_frame)
3142 (thumb2_eabi_linux_sigreturn_tramp_frame)
3143 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3144 (arm_linux_restart_syscall_tramp_frame)
3145 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3146 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3147 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3149 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3151 2018-08-27 Tom Tromey <tom@tromey.com>
3153 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3155 * mips-tdep.c (mips_deal_with_atomic_sequence)
3156 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3157 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3158 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3159 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3161 * aarch64-tdep.c (aarch64_software_single_step): Use
3164 2018-08-27 Tom Tromey <tom@tromey.com>
3166 * linespec.c (complete_linespec_component): Add cast to "char".
3167 * completer.c (completion_tracker::build_completion_result): Add
3170 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3172 * solist.h (struct solist, struct target_so_ops): Fix
3175 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3177 * ada-tasks.c (ada_task_info_s): Remove typedef.
3178 (DEF_VEC_O(ada_task_info_s)): Remove.
3179 (struct ada_tasks_inferior_data): Initialize fields.
3180 <task_list>: Make an std::vector.
3181 (get_ada_tasks_inferior_data): Allocate with new.
3182 (ada_get_task_number): Adjust.
3183 (get_task_number_from_id): Likewise.
3184 (valid_task_id): Likewise.
3185 (ada_get_task_info_from_ptid): Likewise.
3186 (iterate_over_live_ada_tasks): Likewise.
3187 (add_ada_task): Likewise.
3188 (read_known_tasks): Likewise.
3189 (ada_build_task_list): Likewise.
3190 (print_ada_task_info): Likewise.
3191 (info_task): Likewise.
3192 (task_command_1): Likewise.
3194 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3196 * ada-lang.c (add_angle_brackets): Return std::string.
3198 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
3200 * python/py-threadevent.c (py_get_event_thread): Initialize
3203 2018-08-24 Pedro Alves <palves@redhat.com>
3205 * python/py-bpevent.c (create_breakpoint_event_object): Use
3206 copy-initialization.
3207 * python/py-continueevent.c (emit_continue_event): Use
3208 copy-initialization.
3209 * python/py-exitedevent.c (create_exited_event_object): Return a
3211 (emit_exited_event): Use copy-initialization.
3212 * python/py-inferior.c (python_new_inferior)
3213 (python_inferior_deleted, add_thread_object): Use
3214 copy-initialization.
3215 * python/py-infevents.c (create_inferior_call_event_object)
3216 (create_register_changed_event_object)
3217 (create_memory_changed_event_object): Return a gdbpy_ref<>.
3218 (emit_inferior_call_event, emit_memory_changed_event)
3219 (emit_register_changed_event): Use copy-initialization.
3220 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3221 Return a gdbpy_ref<>.
3222 (emit_new_objfile_event): Use copy-initialization.
3223 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3224 (emit_clear_objfiles_event): Use copy-initialization.
3225 * python/py-signalevent.c (create_signal_event_object): Use
3226 copy-initialization.
3227 * python/py-threadevent.c (create_thread_event_object): Use
3228 copy-initialization.
3230 2018-08-24 Pedro Alves <palves@redhat.com>
3231 Simon Marchi <simon.marchi@ericsson.com>
3234 * python/py-continueevent.c: Include "gdbthread.h".
3235 (create_continue_event_object): Add intro comment. Add 'ptid'
3236 parameter. Use it to find thread to pass to
3237 create_thread_event_object.
3238 (emit_continue_event): Pass PTID down to
3239 create_continue_event_object.
3240 * python/py-event.h (py_get_event_thread): Declare.
3241 (create_thread_event_object): Remove default from 'thread'
3243 * python/py-stopevent.c (create_stop_event_object): Use
3244 py_get_event_thread.
3245 * python/py-threadevent.c (get_event_thread): Rename to ...
3246 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3247 and use it to find the thread.
3248 (create_thread_event_object): Assert that THREAD isn't null.
3249 Don't find the event thread here.
3251 2018-08-23 Kevin Buettner <kevinb@redhat.com>
3253 * block.h (blockrange, blockranges): New struct declarations.
3254 (struct block): Add new field named `ranges'.
3255 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3256 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3257 macros for accessing ranges in struct block.
3258 (make_blockranges): New declaration.
3259 block.c (make_blockranges): New function.
3260 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3262 * symtab.h (find_pc_partial_function): Add new parameter `block'.
3263 * blockframe.c (cache_pc_function_block): New static global.
3264 (clear_pc_function_cache): Clear cache_pc_function_block.
3265 (find_pc_partial_function): Move comment to symtab.h. Add
3266 support for non-contiguous blocks.
3267 * cli/cli-cmds.c (block.h): Include.
3268 (print_disassembly): Handle printing of non-contiguous blocks.
3269 (disassemble_current_function): Likewise.
3270 (disassemble_command): Likewise.
3272 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3274 * blockframe.c (get_pc_function_start): Likewise.
3275 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3276 (gcc_symbol_address): Likewise.
3277 * compile/compile-object-run.c (compile_object_run): Likewise.
3278 * compile/compile.c (get_expr_block_and_pc): Likewise.
3279 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3280 (func_addr_to_tail_call_list): Likewise.
3281 * findvar.c (default_read_var_value): Likewise.
3282 * inline-frame.c (inline_frame_this_id): Likewise.
3283 (skip-inline_frames): Likewise.
3284 * infcmd.c (until_next_command): Likewise.
3285 * linespec.c (convert_linespec_to_sals): Likewise.
3286 * parse.c (parse_exp_in_context_1): Likewise.
3287 * printcmd.c (build_address_symbolic): likewise.
3288 (info_address_command): Likewise.
3289 symtab.c (find_function_start_sal): Likewise.
3290 (skip_prologue_sal): Likewise.
3291 (find_function_alias_target): Likewise.
3292 (find_gnu_ifunc): Likewise.
3293 * stack.c (find_frame_funname): Likewise.
3294 * symtab.c (fixup_symbol_section): Likewise.
3295 (find_function_start_sal): Likewise.
3296 (skip_prologue_sal): Likewsie.
3297 (find_function_alias_target): Likewise.
3298 (find_gnu_ifunc): Likewise.
3299 * tracepoint.c (info_scope_command): Likewise.
3300 * value.c (value_fn_field): Likewise.
3302 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3303 in place of find_pc_partial_function.
3304 * blockframe.c (find_function_entry_range_from_pc): New function.
3305 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3306 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3307 for each range in a block.
3310 2018-08-23 Xavier Roirand <roirand@adacore.com>
3312 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3315 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3317 * solib-svr4.c (read_program_headers_from_bfd): Return
3318 gdb::optional<gdb::byte_vector>.
3319 (svr4_exec_displacement): Adjust.
3321 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3323 * solib-svr4.c (read_program_header): Return
3324 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3325 (find_program_interpreter): Return
3326 gdb::optional<gdb::byte_vector>.
3327 (scan_dyntag_auxv): Adjust.
3328 (enable_break): Adjust.
3329 (svr4_exec_displacement): Adjust.
3331 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3333 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3334 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3336 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3338 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3340 * guile/scm-utils.c (gdbscm_printf): Likewise.
3341 * serial.c (serial_printf): Likewise.
3342 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3344 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3346 * stack.c (print_frame): Print frame architecture when printing on
3348 * NEWS: Mention new "arch" attribute in frame output.
3350 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3352 * arch/aarch64.h (aarch64_regnum): Update comment.
3354 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3356 * NEWS: Add SVE to 8.2 section.
3358 2018-08-21 Pedro Alves <palves@redhat.com>
3360 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3361 out from gdbscm_parse_function_args.
3362 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3363 gdbscm_parse_function_args_1.
3365 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3368 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3371 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3373 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3375 2018-08-19 Michael Spang <spang@google.com>
3378 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3379 for PT_TLS segments.
3381 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3383 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3384 dwarf_variable_value.
3385 * dwarf2-frame.c (class dwarf_expr_executor):
3386 Add override for dwarf_variable_value.
3387 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3388 (class symbol_needs_eval_context): Likewise.
3389 (indirect_synthetic_pointer): Add forward declaration.
3390 (sect_variable_value): New function.
3391 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3392 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3393 for DW_OP_GNU_variable_value.
3395 2018-08-16 Tom Tromey <tom@tromey.com>
3397 * top.c (read_command_file): Update.
3398 (command_line_input): Remove "repeat" argument.
3399 * ada-lang.c (get_selections): Update.
3400 * linespec.c (decode_line_2): Update.
3401 * defs.h (command_line_input): Remove argument.
3402 * cli/cli-script.c (read_next_line): Update.
3403 * python/py-gdb-readline.c: Update.
3405 2018-08-17 Tom Tromey <tom@tromey.com>
3407 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3410 2018-08-15 Tom Tromey <tom@tromey.com>
3412 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3414 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3416 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3417 If used, use find_pc_partial_function to find address range
3419 * mi/mi-main.c (mi_cmd_list_features): Report
3420 "data-disassemble-a-option" feature.
3421 * NEWS: Mention new -data-disassemble option -a.
3423 2018-08-13 Tom Tromey <tom@tromey.com>
3425 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3427 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3429 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3430 (aarch64_linux_collect_sve_regset): Likewise.
3431 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3432 * regcache.h (regcache_map_entry_size): New function.
3434 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3436 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3437 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3438 (SVE_HEADER_VL_LENGTH): Likewise.
3439 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3440 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3441 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3442 (SVE_HEADER_SIZE_OFFSET): Likewise.
3443 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3444 (SVE_HEADER_VL_OFFSET): Likewise.
3445 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3446 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3447 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3448 (SVE_HEADER_SIZE): Likewise.
3449 (aarch64_linux_core_read_vq): Add function.
3450 (aarch64_linux_core_read_description): Check for SVE section.
3452 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3454 * aarch64-fbsd-tdep.c
3455 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3457 * aarch64-linux-tdep.c
3458 (aarch64_linux_iterate_over_regset_sections): Likewise.
3459 * alpha-linux-tdep.c
3460 (alpha_linux_iterate_over_regset_sections):
3462 (alphanbsd_iterate_over_regset_sections): Likewise.
3464 (amd64fbsd_iterate_over_regset_sections): Likewise.
3465 * amd64-linux-tdep.c
3466 (amd64_linux_iterate_over_regset_sections): Likewise.
3468 (armbsd_iterate_over_regset_sections): Likewise.
3470 (arm_fbsd_iterate_over_regset_sections): Likewise.
3472 (arm_linux_iterate_over_regset_sections): Likewise.
3473 * corelow.c (get_core_registers_cb): Likewise.
3474 (core_target::fetch_registers): Likewise.
3475 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3476 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3477 * gdbarch.h (void): Regenerate.
3478 * gdbarch.sh: Add supply_size and collect_size.
3479 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3480 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3481 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3482 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3483 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3484 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3485 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3486 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3487 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3488 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3489 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3490 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3491 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3492 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3493 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3494 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3495 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3496 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3497 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3498 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3499 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3500 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3501 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3502 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3503 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3504 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3505 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3506 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3507 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3508 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3510 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3512 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3515 2018-08-10 Keith Seitz <keiths@redhat.com>
3517 * compile/compile-c-support.c (add_code_header, add_code_footer):
3518 Move into policy class.
3519 (c_push_user_expression, pop_user_expression_nop)
3520 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3521 (compile_program): New host class.
3522 (c_compile_program): New typedef.
3523 (c_compute_porgram): Use c_compile_program.
3525 2018-08-10 Keith Seitz <keiths@redhat.com>
3527 * compile/compile-internal.h (compile_instance::~compile_instance):
3528 Remove calls to htab_delete.
3529 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3530 * compile.c (compile_instance::compile_instance): Initialize
3531 htab unique pointers.
3532 (compile_instance::get_cached_type, compile_instance::insert_type)
3533 (compile_instance::error_symbol_once): Update for unique_ptr.
3535 2018-08-10 Keith Seitz <keiths@redhat.com>
3537 * compile/compile-c-symbols.c (struct symbol_error)
3538 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3539 (compile_instance::insert_symbol_error)
3540 (compile_instance::error_symbol_once): Move to ...
3541 * compile/compile.c: ... here.
3543 2018-08-10 Keith Seitz <keiths@redhat.com>
3545 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3546 instead of `new_compile_instance'.
3547 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3549 If the symbol error map is not initialized, create it.
3550 (generate_c_for_for_one_symbol): Do not check/initialize
3551 the symbol error map.
3552 * compile/compile-c-types.c (compile_c_instance): Make a class.
3554 (compile_instance::compile_instance): Initialize the type cache.
3555 (get_cached_type): New function.
3556 (insert_type): Update description.
3557 (compile_c_instance::m_default_cflags): Define.
3558 (convert_type): Update description. Use get_cached_type.
3559 (delete_instance): Moved to destructor.
3560 (new_compile_instance): Moved to constructor.
3561 * compile/compile-c.h (compile_c_instance): Make class inheriting
3562 from compile_instance.
3563 <base>: Remove field.
3564 <type_map, symbol_err_map>: Move to base class.
3565 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3566 * compile/compile-internal.h (compile_instance): Make class.
3567 <type_map_t, symbol_err_map_t>: Define.
3568 <fe>: Rename to `m_gcc_fe'.
3569 <scope, block, gcc_target_options>: Add `m_' prefix.
3570 <m_type_map, m_symbol_err_map>: New fields, moved from
3573 (convert_type, new_compile_instance): Remove.
3574 * compile/compile.c (cleanup_compile_instance): Remove.
3575 (compile_to_object): Use unique_ptr to eliminate cleanups.
3576 (compile_instance::set_print_callback, compile_instance::version)
3577 (compile_instance::set_verbose)
3578 (compile_instance::set_driver_filename)
3579 (compile_instance::set_triplet_regexp)
3580 (compile_instance::set_arguments)
3581 (compile_instance::set_source_file)
3582 (compile_instance::compile): Define.
3584 2018-08-10 Keith Seitz <keiths@redhat.com>
3586 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3587 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3588 gcc-c-fe.def to define C plugin.
3589 (delete_instance): Delete `c_plugin'.
3590 (new_compile_instance): Initialize `c_plugin'.
3591 * compile/compile-c.h: Include gcc_c_plugin.h.
3592 (struct compile_c_instance) <c_plugin>: New member.
3593 * gcc-c-plugin.h: New file.
3594 Update all callers with API change.
3596 2018-08-10 Keith Seitz <keiths@redhat.com>
3598 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3599 (HFILES_NO_SRCDIR): ... to here.
3600 Add compile-internal.h and compile-c.h.
3601 * compile/compile-c-support.c: Include compile-c.h.
3602 * compile/compile-c-symbols.c: Include compile-c.h.
3603 (generate_c_for_variable_locations): Update comment.
3604 * compile/compile-c-types.c: Include compile-c.h.
3605 * compile/compile-c.h: New file -- moved C language declarations
3606 from other files here.
3607 * compile/compile-internal.h: Do not include hashtab.h or
3608 common/enum-flags.h.
3609 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3610 (gcc_convert_symbol, gcc_symbol_address)
3611 (generate_c_for_variable_locations, c_get_mode_for_size)
3612 (c_get_range_decl_name): Definitions moved to compile-c.h.
3613 * compile/compile-loc2c.c: Include compile-c.h.
3615 2018-08-10 Keith Seitz <keiths@redhat.com>
3617 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3618 (c_symbol_substitution_name): ... this.
3621 2018-08-10 Keith Seitz <keiths@redhat.com>
3623 * compile/compile-c-support.c (c_compute_program): Use
3624 unique_xmalloc_ptr to eliminate cleanup.
3625 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3626 Return a unique_xmalloc_ptr and eliminate cleanup.
3627 * compile/compile-internal.h (generate_c_for_variable_locations):
3628 Return unique_xmalloc_ptr and update description.
3630 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3632 * corelow.c (core_target::get_core_register_section): Rename
3633 min_size to section_min_size.
3635 2018-08-09 Jim Wilson <jimw@sifive.com>
3637 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3638 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3639 * NEWS: Mention new GNU/Linux RISC-V target.
3640 * configure.host: Add riscv*-*-linux*.
3641 * configure.nat: Add riscv*.
3642 * configure.tgt: Add riscv*-*-linux*.
3643 * riscv-linux-nat.c: New file.
3644 * riscv-linux-tdep.c: New file.
3646 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3648 * infrun.c (resume): Make static, add forward declaration.
3649 (proceed): Update header comment.
3650 * infrun.h (resume): Delete declaration.
3652 2018-08-09 Tom Tromey <tom@tromey.com>
3654 * riscv-tdep.h: Minor formatting fixes.
3656 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3658 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3659 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3660 (test_mkdir_recursive): Likewise.
3661 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3663 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3665 * valarith.c (value_subscripted_rvalue): If an array is not in
3666 memory, and we don't know the upper bound, then we can't know that
3667 the requested element exists or not.
3669 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3671 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3672 (target_options_to_string): Add comment.
3674 2018-08-08 Tom Tromey <tom@tromey.com>
3676 * unittests/scoped_mmap-selftests.c: Check result of "write".
3678 2018-08-08 Jim Wilson <jimw@sifive.com>
3680 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3681 (decode_register_index_short): New.
3682 (decode_j_type_insn, decode_cj_type_insn): New.
3683 (decode_b_type_insn, decode_cb_type_insn): New.
3684 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3685 local xlen. Check xlen when decoding ambiguous compressed insns. In
3686 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3687 is_c_sw_insn instead of is_sw_insn.
3688 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3689 (riscv_software_single_step): New.
3690 * riscv-tdep.h (riscv_software_single_step): Declare.
3692 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3693 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3695 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3698 * target.c (dispose_inferior): Don't dispose of inferiors that are
3701 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3703 * remote.c (remote_target::download_tracepoint): Change char* to
3706 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3708 * target.h (target_options_to_string): Return an std::string.
3709 * target.c (str_comma_list_concat_elem): Return void, use
3711 (do_option): Likewise.
3712 (target_options_to_string): Return an std::string.
3713 * linux-nat.c (linux_nat_target::wait): Adjust.
3714 * target-debug.h (target_debug_print_options): Adjust.
3716 2018-08-07 Tom Tromey <tom@tromey.com>
3718 * Makefile.in (CPPFLAGS): New variable.
3719 (INTERNAL_CPPFLAGS): Use it.
3721 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3723 * NEWS: Mention the index cache.
3725 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3727 * common/pathstuff.h (get_standard_cache_dir): New.
3728 * common/pathstuff.c (get_standard_cache_dir): New.
3729 * build-id.h (build_id_to_string): New.
3730 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3731 DEBUG_STR_SUFFIX): Move to here.
3732 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3733 DEBUG_STR_SUFFIX): Move from there.
3734 (write_psymtabs_to_index): Make non-static, add basename
3735 parameter. Write to temporary files, rename when done.
3736 (save_gdb_index_command): Adjust call to
3737 write_psymtabs_to_index.
3738 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3740 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3741 (get_gdb_index_contents_from_cache): New.
3742 (get_gdb_index_contents_from_cache_dwz): New.
3743 (dwarf2_initialize_objfile): Read index from cache.
3744 (dwarf2_build_psymtabs): Save to index.
3745 * dwarf-index-cache.h: New file.
3746 * dwarf-index-cache.c: New file.
3747 * dwarf-index-write.h: New file.
3749 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3751 * gnulib/aclocal.m4: Re-generate.
3752 * gnulib/config.in: Re-generate.
3753 * gnulib/configure: Re-generate.
3754 * gnulib/import/Makefile.am: Re-generate.
3755 * gnulib/import/Makefile.in: Re-generate.
3756 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3757 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3758 * gnulib/import/m4/mkdir.m4: New file.
3759 * gnulib/import/mkdir.c: New file.
3760 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3763 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3765 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3766 * common/scoped_mmap.c: New file.
3767 * common/scoped_mmap.h (destroy): New method.
3768 (~scoped_mmap, reset): Use destroy.
3769 (scoped_mmap): New move constructor.
3770 (mmap_file): New declaration.
3771 * unittests/scoped_mmap-selftests.c (test_normal,
3772 test_invalid_filename, run_tests): New functions.
3773 (_initialize_scoped_mmap_selftests): Register selftest.
3775 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3777 * dwarf2read.c (read_gdb_index_from_section): Rename to...
3778 (read_gdb_index_from_buffer): ... this. Remove section
3779 parameter, add buffer parameter.
3780 (get_gdb_index_contents_ftype,
3781 get_gdb_index_contents_dwz_ftype): New typedefs.
3782 (dwarf2_read_gdb_index): Add callback parameters to get the
3784 (get_gdb_index_contents_from_section): New.
3785 (dwarf2_initialize_objfile): Update call to
3786 dwarf2_read_gdb_index.
3788 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3790 * common/filestuff.h (gdb_fopen_cloexec): New overload.
3791 (gdb_open_cloexec): Likewise.
3792 * nat/linux-osdata.c (command_from_pid): Use string_printf.
3793 (commandline_from_pid): Likewise.
3794 (linux_xfer_osdata_threads): Likewise.
3795 (linux_xfer_osdata_fds): Likewise.
3796 * ada-lang.c (is_package_name): Likewise.
3797 * auxv.c (procfs_xfer_auxv): Likewise.
3798 * breakpoint.c (print_one_breakpoint_location): Use
3800 (print_one_catch_solib): Use string_printf.
3801 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3802 (add_pe_forwarded_sym): Likewise.
3803 * dwarf2read.c (create_type_unit_group): Likewise.
3804 (build_error_marker_type): Likewise.
3805 * infcall.c (get_function_name): Likewise.
3806 * valprint.c (print_converted_chars_to_obstack): Likewise.
3807 * xtensa-tdep.c (xtensa_register_type): Likewise.
3809 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3811 * remote.c (remote_target::download_tracepoint): Fix format
3814 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3816 * tracefile.c: Include common/byte-vector.h.
3817 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3818 with trace_regblock_size if needed. Update uses of buf.
3820 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3822 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3823 std::vector<unsigned char>.
3824 * tracepoint.c (collection_list::collection_list): Remove
3825 m_regs_mask initializer from initializer list. Resize
3826 m_regs_mask using the largest remote register number.
3827 (collection_list::add_remote_register): Remove size check on
3828 m_regs_mask. Use at to access element.
3829 (collection_list::stringify): Change type of temp_buf to
3830 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3831 stringify the register mask. Use pack_hex_byte for the register
3834 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3836 * tracepoint.h (class collection_list) <add_register>: Remove.
3837 <add_remote_register, add_ax_registers, add_local_register>:
3839 <add_memrange>: Add scope parameter.
3840 * tracepoint.c (encode_actions_1): Likewise.
3841 (collection_list::add_register): Rename to ...
3842 (collection_list::add_remote_register): ... this. Update
3844 (collection_list::add_ax_registers, add_local_register): New
3846 (collection_list::add_memrange): Add scope parameter. Call
3847 add_local_register instead of add_register.
3848 (finalize_tracepoint_aexpr): New function.
3849 (collection_list::collect_symbol): Update calls to add_memrange.
3850 Call add_local_register instead of add_register. Call
3851 add_ax_registers. Call finalize_tracepoint_aexpr.
3852 (encode_actions_1): Get remote regnos for $reg action. Call
3853 add_remote_register, add_ax_registers, and add_local_register.
3854 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3855 (validate_actionline): Call finalize_tracepoint_aexpr.
3857 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3859 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3860 Replace array buf with gdb::char_vector buf, of size
3861 get_remote_packet_size (). Replace references to buf and
3862 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3863 and xsnprintf with snprintf. Raise errors if the buffer is too
3866 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3868 * remote.c (remote_target::download_tracepoint): Fix the has_more
3869 predicate in the QTDP action list iteration.
3871 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3873 * remote.c (remote_target::download_tracepoint): Fix indentation
3876 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3878 * proc-api.c (_initialize_proc_api): Remove c, unused.
3879 * procfs.c (procfs_init_inferior): Remove signals, unused.
3880 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3883 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3884 Andrew Burgess <andrew.burgess@embecosm.com>
3886 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3887 'W_STOPCODE (0)' as this could be ambiguous.
3889 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3891 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3892 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3895 2018-08-02 Tom Tromey <tom@tromey.com>
3898 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3900 (process_structure_scope): Likewise.
3902 2018-08-02 Xavier Roirand <roirand@adacore.com>
3905 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3908 2018-08-02 Tom Tromey <tom@tromey.com>
3910 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3911 (darwin_suspend_inferior, darwin_resume_inferior)
3912 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3913 (darwin_check_new_threads): Check result of get_darwin_inferior.
3915 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3919 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3921 * varobj.c (varobj_get_path_expr_parent): Report an error if
3922 parent is a dynamic varobj.
3924 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3926 * gnulib/aclocal.m4: Re-generate.
3927 * gnulib/config.in: Re-generate.
3928 * gnulib/configure: Re-generate.
3929 * gnulib/import/Makefile.in: Re-generate.
3930 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3931 * gnulib/import/m4/onceonly.m4: Re-generate.
3933 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3935 * target-descriptions.c (struct xml_test_tdesc): New.
3936 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3937 (record_xml_tdesc): Update.
3938 (maintenance_check_xml_descriptions): Update.
3939 * target-descriptions.h (record_xml_tdesc): Update comment.
3941 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3943 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3944 checking array bounds are defined.
3946 2018-07-30 Tom Tromey <tom@tromey.com>
3948 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3949 irreflexivity violation.
3951 2018-07-30 Tom Tromey <tom@tromey.com>
3953 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3954 * value.c (unpack_long): Remove lint code.
3955 * valops.c (value_ind): Remove lint code.
3956 * valarith.c (value_x_binop, value_x_unop, value_equal)
3957 (value_pos): Remove lint code.
3959 2018-07-28 Tom de Vries <tdevries@suse.de>
3961 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3962 with undefined upper bound as <optimized out>.
3964 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3966 * gcore.in: Rename variable "name" to "prefix". Expand
3969 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3971 * windows-nat.c (windows_nat_target::create_inferior): Update to
3972 call close() in global namespace.
3974 2018-07-26 Tom Tromey <tom@tromey.com>
3976 * dwarf-index-write.c (add_address_entry): Don't add objfile
3978 * dbxread.c (find_stab_function): Rename from
3979 find_stab_function_addr. Return a bound_minimal_symbol.
3980 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3981 Don't add objfile offsets.
3982 (end_psymtab): Use raw_text_low, raw_text_high,
3983 MSYMBOL_VALUE_RAW_ADDRESS.
3984 (read_ofile_symtab): Update.
3985 (process_one_symbol): Update.
3986 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3988 (dw2_relocate): Remove.
3989 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3991 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3993 (process_psymtab_comp_unit_reader, add_partial_symbol)
3994 (add_partial_subprogram, dwarf2_ranges_read): Update.
3995 (load_partial_dies): Update.
3996 (add_address_entry): Don't add objfile offsets.
3997 (dwarf2_build_include_psymtabs): Update.
3998 (create_addrmap_from_aranges): Don't add objfile offsets.
3999 (dw2_find_pc_sect_compunit_symtab): Update.
4000 * mdebugread.c (parse_symbol): Don't add objfile offsets.
4001 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4003 (parse_partial_symbols): Don't add objfile offsets. Use
4004 raw_text_low, raw_text_high. Update.
4005 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4006 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4007 or call 'relocate' quick function. Clear psymbol_map.
4008 * psympriv.h (struct partial_symbol) <address>: Add section
4010 <set_unrelocated_address>: Rename from set_address.
4011 <raw_text_low, raw_text_high>: New methods.
4012 <text_low, text_high>: Add objfile parameter.
4013 (add_psymbol_to_bcache): Add 'section' parameter. Call
4014 set_unrelocated_address.
4015 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4016 (find_pc_psymbol): Update.
4017 (fixup_psymbol_section, relocate_psymtabs): Remove.
4018 (dump_psymtab, psym_functions): Update.
4019 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4021 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4022 (start_psymtab_common): Update.
4023 * symfile-debug.c (debug_qf_relocate): Remove.
4024 (debug_sym_quick_functions): Update.
4025 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4026 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4029 2018-07-26 Tom Tromey <tromey@redhat.com>
4031 * dbxread.c (end_psymtab): Use text_high_valid and
4033 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4034 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4035 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4037 <text_low_valid, text_high_valid>: New fields.
4038 <set_text_low, set_text_high>: Update.
4039 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4041 2018-07-26 Tom Tromey <tom@tromey.com>
4043 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4045 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4046 textlow and texthigh fields.
4047 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4049 * mdebugread.c (parse_lines, parse_partial_symbols)
4050 (psymtab_to_symtab_1): Update.
4051 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4052 Rename fields. Update comment. Now private.
4053 <text_low, text_high, set_text_low, set_text_high>: New methods.
4054 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4055 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4056 (start_psymtab_common, maintenance_info_psymtabs)
4057 (maintenance_check_psymtabs): Update.
4058 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4060 (scan_xcoff_symtab): Update.
4062 2018-07-26 Tom Tromey <tromey@redhat.com>
4064 * psympriv.h (struct partial_symbol) <unrelocated_address,
4065 address, set_address>: New methods.
4066 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4067 (fixup_psymbol_section, relocate_psymtabs): Update.
4068 (print_partial_symbols): Add 'objfile' parameter. Update.
4069 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4072 2018-07-26 Tom Tromey <tom@tromey.com>
4074 * dwarf-index-write.c (write_psymbols, debug_names::insert)
4075 (debug_names::write_psymbols): Update.
4076 * psympriv.h (struct partial_symbol): Derive from
4077 general_symbol_info.
4078 <obj_section>: New method.
4079 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4080 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4081 (find_pc_sect_psymbol, fixup_psymbol_section)
4082 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4083 (print_partial_symbols, recursively_search_psymtabs)
4084 (compare_psymbols, psymbol_hash, psymbol_compare)
4085 (add_psymbol_to_bcache, maintenance_check_psymtabs)
4086 (psymbol_name_matches, psym_fill_psymbol_map): Update.
4088 2018-07-26 Tom Tromey <tromey@redhat.com>
4090 * dbxread.c (end_psymtab): Remove dead code.
4092 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
4094 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4095 DWARF unwinders are disabled.
4096 * dwarf2-frame.c: Add dwarf2read.h include.
4097 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4099 (dwarf2_frame_unwinders_enabled_p): Define.
4100 (show_dwarf_unwinders_enabled_p): New function.
4101 (_initialize_dwarf2_frame): Register switch to control DWARF
4103 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4104 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4105 (show_dwarf_cmdlist): Remove static keyword.
4106 * dwarf2read.h (set_dwarf_cmdlist): Declare.
4107 (show_dwarf_cmdlist): Declare.
4108 * NEWS: Document new feature.
4110 2018-07-26 Tom de Vries <tdevries@suse.de>
4112 PR breakpoints/23366
4113 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4115 2018-07-26 Tom de Vries <tdevries@suse.de>
4117 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4118 DW_AT_count can't be translated to a dynamic prop.
4120 2018-07-25 Tom de Vries <tdevries@suse.de>
4122 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4125 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
4127 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4129 2018-07-25 Joel Brobecker <brobecker@adacore.com>
4131 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4133 2018-07-24 Keith Seitz <keiths@redhat.comt
4136 * dwarf2read.c (dw2_add_symbol_to_list): New function.
4137 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4138 instead of add_symbol_to_list.
4139 (read_file_scope): Call prepare_one_comp_unit before reading
4142 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
4144 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4146 2018-07-24 Tom Tromey <tom@tromey.com>
4148 * utils.c (malloc, realloc, free): Don't declare.
4149 * configure, config.in: Rebuild.
4150 * configure.ac: Don't check for declarations of free, malloc, or
4153 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4155 * aarch64-linux-nat.c
4156 (aarch64_linux_nat_target::stopped_data_address): Remove unused
4158 * arm-linux-nat.c (fetch_regs): Likewise.
4159 (store_regs): Likewise.
4160 (fetch_vfp_regs): Likewise.
4161 (store_vfp_regs): Likewise.
4162 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4163 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4164 (arm_linux_nat_target::insert_watchpoint): Likewise.
4165 (arm_linux_nat_target::remove_watchpoint): Likewise.
4166 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4168 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4170 * ppc-linux-nat.c (fetch_register): Likewise.
4171 (fetch_all_gp_regs): Likewise.
4172 (fetch_ppc_registers): Likewise.
4173 (store_all_gp_regs): Likewise.
4174 (store_ppc_registers): Likewise.
4175 (hwdebug_insert_point): Likewise.
4176 (can_use_watchpoint_cond_accel): Likewise.
4177 * remote-sim.c (gdb_os_write_stdout): Likewise.
4179 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4180 Tom Tromey <tom@tromey.com>
4182 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4184 * configure: Rebuild.
4186 2018-07-22 Tom Tromey <tom@tromey.com>
4188 * regformats/regdat.sh: Define xmltarget_${name} inside
4189 #ifndef IN_PROCESS_AGENT.
4191 2018-07-22 Tom Tromey <tom@tromey.com>
4193 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4195 2018-07-22 Tom Tromey <tom@tromey.com>
4197 * symfile.c (reread_symbols): Notify iter, not objfile.
4199 2018-07-22 Tom Tromey <tom@tromey.com>
4201 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4203 (ravenscar_thread_target::prepare_to_store): Likewise.
4205 2018-07-22 Tom Tromey <tom@tromey.com>
4207 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4208 unused variable. Call value_fetch_lazy when needed.
4209 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4210 Remove unused variable. Call value_fetch_lazy when needed.
4212 2018-07-22 Tom Tromey <tom@tromey.com>
4214 * m32c-tdep.c (mark_dma): Return void.
4215 (make_regs): Remove unused declarations.
4217 2018-07-22 Tom Tromey <tom@tromey.com>
4219 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4220 cmdscm_get_valid_command_smob_arg_unsafe for effect.
4221 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4222 bkscm_get_valid_block_smob_arg_unsafe for effect.
4224 2018-07-22 Tom Tromey <tom@tromey.com>
4226 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4229 2018-07-22 Tom Tromey <tom@tromey.com>
4231 * windows-nat.c (saved_context): Conditionally define.
4232 * remote.c (remote_target::remote_btrace_maybe_reopen):
4233 Conditionally declare "warned".
4234 * inflow.c (sigquit_ours): Conditionally define.
4235 (new_tty): Move "tty" declaration inside #if.
4236 * guile/guile.c (guile_datadir): Conditionally define.
4237 * charset.c (set_be_le_names): Move some declarations inside #if.
4238 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4240 (parse_xml_btrace_conf): Likewise.
4242 2018-07-22 Tom Tromey <tom@tromey.com>
4244 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4246 2018-07-22 Tom Tromey <tom@tromey.com>
4248 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4249 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4250 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4251 * buildsym-legacy.c (get_macro_table): Remove unused variable.
4252 * stack.c (frame_apply_level_command): Remove unused variable.
4253 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4254 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4255 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4257 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4258 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4259 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4261 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4262 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4264 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4265 Remove unused variable.
4266 * cli/cli-script.c (recurse_read_control_structure): Remove unused
4268 * common/tdesc.c (print_xml_feature::visit): Remove unused
4270 * compile/compile-object-load.c (store_regs): Remove unused
4272 * complaints.c (clear_complaints): Remove unused variable.
4273 * corelow.c (core_target_open): Remove unused variable.
4274 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4276 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4278 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4280 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4282 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4284 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4286 * ia64-tdep.c (examine_prologue): Remove unused variable.
4287 * infcall.c (run_inferior_call): Remove unused variable.
4288 * inferior.c (exit_inferior): Remove unused variable.
4289 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4290 * linespec.c (decode_line_2): Remove unused variable.
4291 * linux-nat.c (super_close): Remove.
4292 * linux-tdep.c (linux_info_proc): Remove unused variable.
4293 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4294 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4295 Remove unused variable.
4296 * parse.c (find_minsym_type_and_address): Remove unused variable.
4297 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4299 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4301 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4303 * record-btrace.c (record_btrace_target::store_registers): Remove
4305 (cmd_show_record_btrace_cpu): Remove unused variable.
4306 * riscv-tdep.c (riscv_register_reggroup_p)
4307 (riscv_push_dummy_call, riscv_return_value): Remove unused
4309 * rust-exp.y (literal): Remove unused variable.
4310 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4312 <STRUCTOP_ANONYMOUS>: Likewise.
4313 * s390-linux-tdep.c (s390_linux_init_abi_31)
4314 (s390_linux_init_abi_64): Remove unused variable.
4315 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4316 (file_select_thread, net_windows_open, _initialize_ser_windows):
4317 Remove unused variables.
4318 * symtab.c (find_pc_sect_line): Remove unused variable.
4319 * target-memory.c (compute_garbled_blocks): Remove unused
4321 (target_write_memory_blocks): Remove unused variable.
4322 * target.c (target_stack::unpush): Remove unused variables.
4323 * tracepoint.c (start_tracing, all_tracepoint_actions)
4324 (merge_uploaded_trace_state_variables)
4325 (print_one_static_tracepoint_marker): Remove unused variable.
4326 * unittests/basic_string_view/element_access/char/1.cc (test01):
4327 Remove unused variable.
4328 * windows-nat.c (windows_continue, windows_add_all_dlls)
4329 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4330 Remove unused variables.
4332 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4334 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4335 attr_profile in HAVE_ELF.
4336 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4339 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4341 * frame.c (frame_register_unwind): Change parameter name.
4342 (frame_unwind_register): Likewise.
4343 (frame_unwind_register_value): Likewise.
4344 (frame_unwind_register_signed): Likewise.
4345 (frame_unwind_register_unsigned): Likewise.
4346 * frame.h (frame_register_unwind): Likewise.
4347 (frame_unwind_register): Likewise.
4348 (frame_unwind_register_value): Likewise.
4349 (frame_unwind_register_signed): Likewise.
4350 (frame_unwind_register_unsigned): Likewise.
4351 (frame_unwind_arch): Likewise.
4353 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4355 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4358 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4360 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4361 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4364 2018-07-20 Keith Seitz <keiths@redhat.com>
4366 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4367 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4368 m_compunit_symtab, m_language>: Add "m_" prefix.
4370 * buildsym.c: Update all uses.
4372 2018-07-20 Tom Tromey <tom@tromey.com>
4374 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4375 * buildsym.h (record_line_ftype): Remove typedef.
4377 2018-07-20 Tom Tromey <tom@tromey.com>
4379 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4380 (end_expandable_symtab): Likewise.
4381 (end_symtab_get_static_block): Likewise.
4382 (end_symtab_from_static_block): Likewise.
4383 * buildsym-legacy.c (augment_type_symtab): Remove.
4384 (end_expandable_symtab): Remove.
4385 (end_symtab_get_static_block): Remove.
4386 (end_symtab_from_static_block): Remove.
4388 2018-07-20 Tom Tromey <tom@tromey.com>
4390 * dwarf2read.c: Include buildsym.h.
4391 (struct dwarf2_cu) <builder>: New method.
4392 (fixup_go_packaging): Update.
4393 (process_full_comp_unit, process_full_type_unit): Update. Don't
4394 use scoped_free_pendings.
4395 (using_directives): Add "cu" parameter, remove "language".
4396 (read_import_statement, setup_type_unit_groups, )
4397 (read_func_scope, read_lexical_block_scope)
4398 (dwarf2_record_block_ranges, read_namespace): Update.
4399 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4400 (lnp_state_machine::handle_end_sequence): Update.
4401 (class lnp_state_machine) <m_cu>: New member.
4402 <m_record_line_callback>: Remove.
4403 <m_currently_recording_lines>: New member.
4404 (lnp_state_machine::handle_set_file): Update.
4405 (noop_record_line): Remove.
4406 (dwarf_record_line_p): Add cu parameter.
4407 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4408 (lnp_state_machine::record_line)
4409 (lnp_state_machine::lnp_state_machine)
4410 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4411 (dwarf_decode_lines): Update.
4412 (dwarf2_start_subfile): Add cu parameter.
4413 (dwarf2_start_symtab, new_symbol): Update.
4414 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4415 Remove dwarf2_per_objfile parameter.
4416 (dwarf_decode_macros): Update.
4418 2018-07-20 Tom Tromey <tom@tromey.com>
4420 * stabsread.c (define_symbol): Update.
4421 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4422 * dwarf2read.c (new_symbol): Update.
4423 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4424 * cp-namespace.c: Include buildsym.h.
4425 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4426 * buildsym-legacy.c (get_buildsym_compunit): New function.
4428 2018-07-20 Tom Tromey <tom@tromey.com>
4430 * xcoffread.c: Include buildsym-legacy.h.
4431 * windows-nat.c: Include buildsym-legacy.h.
4432 * stabsread.c: Include buildsym-legacy.h.
4433 * mdebugread.c: Include buildsym-legacy.h.
4434 * buildsym-legacy.h: New file.
4435 * buildsym-legacy.c: New file, from buildsym.c.
4436 * go32-nat.c: Include buildsym-legacy.h.
4437 * dwarf2read.c: Include buildsym-legacy.h.
4438 * dbxread.c: Include buildsym-legacy.h.
4439 * cp-namespace.c: Include buildsym-legacy.h.
4440 * coffread.c: Include buildsym-legacy.h.
4441 * buildsym.h: Move some contents to buildsym-legacy.h.
4442 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4444 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4446 2018-07-20 Tom Tromey <tom@tromey.com>
4448 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4449 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4450 (buildsym_compunit::buildsym_compunit)
4451 (buildsym_compunit::~buildsym_compunit)
4452 (buildsym_compunit::get_macro_table): Define.
4454 2018-07-20 Tom Tromey <tom@tromey.com>
4456 * buildsym.c (reset_symtab_globals): Remove.
4457 (buildsym_compunit::end_symtab_from_static_block): Update.
4458 (buildsym_compunit::augment_type_symtab): Update.
4459 (end_symtab_from_static_block): Call free_buildsym_compunit.
4460 (augment_type_symtab, end_symtab, end_expandable_symtab):
4463 2018-07-20 Tom Tromey <tom@tromey.com>
4465 * arch-utils.c: Do not include buildsym.h.
4466 * mipsread.c: Do not include buildsym.h.
4467 * machoread.c: Do not include buildsym.h.
4468 * elfread.c: Do not include buildsym.h.
4470 2018-07-20 Tom Tromey <tom@tromey.com>
4472 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4474 (buildsym_compunit): Add new constructor.
4475 (struct buildsym_compunit) <get_last_source_file, finish_block,
4476 record_block_range, start_subfile, patch_subfile_names,
4477 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4478 set_last_source_start_addr, get_last_source_start_addr,
4479 get_local_using_directives, set_local_using_directives,
4480 get_global_using_directives, outermost_context_p,
4481 get_current_context_stack, get_context_stack_depth,
4482 get_current_subfile, get_local_symbols, get_file_symbols,
4483 get_global_symbols, record_debugformat, record_producer,
4484 push_context, pop_context, end_symtab_get_static_block,
4485 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4487 <record_pending_block, finish_block_internal, make_blockvector,
4488 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4492 2018-05-22 Tom Tromey <tom@tromey.com>
4494 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4496 (finish_block_internal): Update.
4498 2018-07-20 Tom Tromey <tom@tromey.com>
4500 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4502 (finish_block_internal): Update.
4504 2018-07-20 Tom Tromey <tom@tromey.com>
4506 * buildsym.h (EXTERN): Don't define or undef.
4507 * buildsym.c (EXTERN): Don't define.
4509 2018-07-20 Tom Tromey <tom@tromey.com>
4511 * buildsym.c: Remove TODO comment.
4513 2018-07-20 Tom Tromey <tom@tromey.com>
4515 * coffread.c (coff_symtab_read): Update.
4516 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4517 (xcoff_new_init): Update.
4518 * mipsread.c (mipscoff_new_init): Update.
4519 * mdebugread.c (mdebug_build_psymtabs): Update.
4520 * elfread.c (elf_new_init): Update.
4521 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4523 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4524 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4525 (stabsect_build_psymtabs): Update.
4526 * buildsym.h (buildsym_init): Don't declare.
4527 * buildsym.c: Update comment.
4528 (prepare_for_building): Remove.
4529 (start_symtab, restart_symtab): Update.
4530 (reset_symtab_globals): Update comment.
4531 (buildsym_init): Remove.
4533 2018-07-20 Tom Tromey <tom@tromey.com>
4535 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4536 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4537 (read_enum_type, common_block_start, common_block_end)
4538 (cleanup_undefined_types_1, finish_global_stabs): Update.
4539 * mdebugread.c (psymtab_to_symtab_1): Update.
4540 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4541 (read_lexical_block_scope, new_symbol): Update.
4542 * dbxread.c (process_one_symbol): Update.
4543 * coffread.c (coff_symtab_read, process_coff_symbol)
4544 (coff_read_enum_type): Update.
4545 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4547 (get_local_symbols, get_file_symbols, get_global_symbols): New
4549 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4551 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4552 (~scoped_free_pendings): Update.
4553 (finish_block, prepare_for_building, reset_symtab_globals)
4554 (end_symtab_get_static_block, end_symtab_with_blockvector)
4555 (augment_type_symtab, push_context): Update.
4556 (get_local_symbols, get_file_symbols, get_global_symbols): New
4558 (buildsym_init): Update.
4560 2018-07-20 Tom Tromey <tom@tromey.com>
4562 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4563 (process_full_type_unit): Likewise.
4564 (dwarf2_start_symtab): Set list_in_scope.
4566 2018-07-20 Tom Tromey <tom@tromey.com>
4568 * dwarf2read.c (process_psymtab_comp_unit_reader)
4569 (build_type_psymtabs_reader): Do not set list_in_scope.
4571 2018-07-20 Tom Tromey <tom@tromey.com>
4573 * buildsym.c (free_pendings): Remove.
4574 (add_symbol_to_list, scoped_free_pendings)
4575 (finish_block_internal, buildsym_init): Update.
4577 2018-07-20 Tom Tromey <tom@tromey.com>
4579 * xcoffread.c (read_xcoff_symtab): Update.
4580 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4582 * dbxread.c (process_one_symbol): Update.
4583 * coffread.c (coff_symtab_read): Update.
4584 * buildsym.h (finish_block): Update.
4585 * buildsym.c (finish_block): Remove "listhead" argument.
4586 (end_symtab_get_static_block): Update.
4588 2018-07-20 Tom Tromey <tom@tromey.com>
4590 * buildsym.h (class scoped_free_pendings): Remove constructor.
4591 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4593 <m_pending_block_obstack, m_pending_blocks>: New members.
4594 (pending_block_obstack, pending_blocks): Remove.
4595 (scoped_free_pendings::scoped_free_pendings): Default.
4596 (~scoped_free_pendings): Update.
4597 (free_pending_blocks): Remove.
4598 (finish_block_internal, record_pending_block, make_blockvector)
4599 (end_symtab_get_static_block, augment_type_symtab, push_context)
4600 (buildsym_init): Update.
4602 2018-07-20 Tom Tromey <tom@tromey.com>
4604 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4605 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4607 (pending_addrmap, pending_addrmap_obstack)
4608 (pending_addrmap_interesting): Remove.
4609 (scoped_free_pendings, record_block_range, make_blockvector)
4610 (prepare_for_building, reset_symtab_globals, buildsym_init):
4613 2018-07-20 Tom Tromey <tom@tromey.com>
4615 * xcoffread.c (process_linenos): Update.
4616 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4617 * mdebugread.c (psymtab_to_symtab_1): Update.
4618 * dwarf2read.c (setup_type_unit_groups)
4619 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4620 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4621 * dbxread.c (process_one_symbol): Update.
4622 * coffread.c (coff_symtab_read, enter_linenos)
4623 (process_coff_symbol): Update.
4624 * buildsym.h (current_subfile): Don't declare.
4625 (get_current_subfile): Declare.
4626 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4628 (start_subfile, free_buildsym_compunit, push_subfile)
4629 (prepare_for_building, start_symtab): Update.
4630 (get_current_subfile): New function.
4632 2018-07-20 Tom Tromey <tom@tromey.com>
4634 * coffread.c (coff_symtab_read): Update.
4635 * xcoffread.c (read_xcoff_symtab): Update.
4636 * dwarf2read.c (new_symbol): Update.
4637 (read_func_scope, read_lexical_block_scope): Update.
4638 * dbxread.c (process_one_symbol): Update.
4639 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4640 (outermost_context_p): Remove macro.
4641 (outermost_context_p, get_current_context_stack)
4642 (get_context_stack_depth): Declare.
4643 (pop_context): Return struct context_stack.
4644 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4646 (context_stack_size): Remove.
4647 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4648 (prepare_for_building, end_symtab_get_static_block)
4649 (augment_type_symtab, push_context): Update.
4650 (pop_context): Return struct context_stack.
4651 (outermost_context_p, get_current_context_stack)
4652 (get_context_stack_depth): New functions.
4653 (buildsym_init): Update.
4655 2018-07-20 Tom Tromey <tom@tromey.com>
4657 * rust-exp.y: Now a pure parser. Update all rules.
4658 (%union): Move earlier.
4659 (current_parser, work_obstack): Remove globals.
4660 (rust_parser, ~rust_parser): Update.
4661 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4662 lex_character, lex_number, lex_string, lex_identifier,
4663 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4664 convert_name, convert_params_to_expression,
4665 convert_ast_to_expression, ast_basic_type, ast_operation,
4666 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4667 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4668 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4669 ast_array_type, ast_slice_type, ast_reference_type,
4670 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4671 (rust_parse): Update.
4672 (rustyyerror, rustyylex): Add parser parameter.
4673 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4674 (rust_lex_stringish_test, rust_lex_test_sequence)
4675 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4676 (rust_lex_test_push_back, rust_lex_tests): Update.
4678 2018-07-19 Pedro Alves <palves@redhat.com>
4680 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4681 gdb::unique_xmalloc_ptr.
4682 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4683 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4684 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4685 copy-initialization.
4686 * guile/scm-pretty-print.c (ppscm_print_children): Use
4687 gdb::unique_xmalloc_ptr instead of cleanups.
4688 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4689 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4690 gdb::unique_xmalloc_ptr.
4691 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4692 Adjust to use gdb::unique_xmalloc_ptr.
4693 * guile/scm-utils.c (extract_arg): Adjust.
4694 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4695 gdb::unique_xmalloc_ptr instead of a cleanup.
4697 2018-07-19 Tom Tromey <tom@tromey.com>
4699 * utils.c (do_value_free_to_mark)
4700 (make_cleanup_value_free_to_mark): Remove.
4701 * utils.h (make_cleanup_value_free_to_mark): Remove.
4703 2018-07-19 Pedro Alves <palves@redhat.com>
4705 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4706 forwarding reference.
4708 2018-07-18 Pedro Alves <palves@redhat.com>
4710 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4711 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4714 2018-07-18 Pedro Alves <palves@redhat.com>
4716 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4718 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4720 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4721 directly instead of a cleanup.
4722 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4723 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
4724 (vlscm_binop_gdbthrow): New, factored out from ...
4725 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
4726 (vlscm_rich_compare): Use gdbscm_wrap.
4727 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4728 instead of a cleanup.
4729 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4731 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4732 Use xfree directly instead of a cleanup.
4733 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4734 Adjust to use gdbscm_wrap and scoped_value_mark.
4735 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4736 (gdbscm_value_address, gdbscm_value_dereference)
4737 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4739 (gdbscm_value_dynamic_type): Use scoped_value_mark.
4740 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4742 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4743 gdbscm_wrap and scoped_value_mark.
4744 (gdbscm_value_to_string): Use xfree directly instead of a
4745 cleanup. Move 'buffer' unique_ptr to TRY scope.
4746 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4747 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
4749 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4750 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4752 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4755 2018-07-18 Tom de Vries <tdevries@suse.de>
4757 * findvar.c (default_read_var_value): Also resolve dynamic type for
4758 LOC_OPTIMIZED_OUT vars.
4760 2018-07-18 Maciej W. Rozycki <macro@mips.com>
4762 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4765 2018-07-17 Tom Tromey <tom@tromey.com>
4767 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4768 (compute_enum_list, pascm_set_param_value_x)
4769 (gdbscm_parameter_value): Update.
4770 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4771 (gdbscm_scm_to_host_string): Update.
4772 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4774 * guile/scm-cmd.c (cmdscm_add_completion): Update.
4775 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4776 * guile/scm-string.c (gdbscm_scm_to_string): Return
4778 (gdbscm_scm_to_host_string): Likewise.
4780 2018-07-17 Tom Tromey <tom@tromey.com>
4782 * guile/guile.c (gdbscm_eval_from_control_command): Update.
4783 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4784 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4785 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4788 2018-07-17 Tom Tromey <tom@tromey.com>
4790 * guile/scm-param.c (pascm_signal_setshow_error): Update.
4791 * guile/guile-internal.h (gdbscm_exception_message_to_string):
4793 * guile/scm-cmd.c (cmdscm_function): Update.
4794 * guile/scm-pretty-print.c
4795 (ppscm_print_exception_unless_memory_error): Update.
4796 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4797 Return unique_xmalloc_ptr.
4799 2018-07-17 Tom Tromey <tom@tromey.com>
4801 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4804 2018-07-17 Jim Wilson <jimw@sifive.com>
4806 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4807 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4808 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4809 unecessary braces after EF_RISCV_RVC test. Delete call to
4810 set_gdbarch_decr_pc_after_break.
4812 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4813 RISCV_LAST_FP_REGNUM + 1.
4814 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4816 2018-07-17 Tom Tromey <tom@tromey.com>
4818 * configure.ac: Remove --disable-gdbcli.
4819 * configure: Rebuild.
4820 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4821 (SUBDIR_CLI_CFLAGS): Remove.
4822 (SFILES): Use SUBDIR_CLI_SRCS.
4823 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4825 2018-07-17 Tom Tromey <tom@tromey.com>
4828 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4830 2018-07-16 Jim Wilson <jimw@sifive.com>
4832 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4834 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4836 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4838 (libunwind_frame_sniffer): Likewise.
4839 (libunwind_frame_prev_register): Likewise.
4840 (libunwind_sigtramp_frame_sniffer): Likewise.
4841 * ia64-tdep.c (ia64_access_reg): Likewise.
4842 (ia64_access_rse_reg): Likewise.
4843 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4844 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4846 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4848 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4850 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4852 * remote-sim.c (gdbsim_target::close,
4853 gdbsim_target::mourn_inferior): Remove unused variables.
4855 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4857 * ia64-tdep.c (ktab_buf): New global.
4858 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4859 (get_kernel_table): Adjust.
4861 2018-07-16 Tom Tromey <tom@tromey.com>
4863 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4864 * dwarf2read.c (using_directives, new_symbol): Use
4865 outermost_context_p.
4866 * dbxread.c (process_one_symbol): Use outermost_context_p.
4867 * coffread.c (coff_symtab_read): Use outermost_context_p.
4869 2018-07-16 Tom Tromey <tom@tromey.com>
4871 * dwarf2read.c (using_directives, read_func_scope)
4872 (read_lexical_block_scope): Update.
4873 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4874 * buildsym.h (local_using_directives, global_using_directives):
4876 (get_local_using_directives, set_local_using_directives)
4877 (get_global_using_directives): Declare.
4878 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4879 m_global_using_directives>: New members.
4880 (finish_block_internal, prepare_for_building)
4881 (reset_symtab_globals, end_symtab_get_static_block)
4882 (push_context): Update.
4883 (get_local_using_directives, set_local_using_directives)
4884 (get_global_using_directives): New functions.
4885 (buildsym_init): Update.
4887 2018-07-16 Tom Tromey <tom@tromey.com>
4889 * xcoffread.c (xcoff_initial_scan): Don't call
4890 free_pending_blocks.
4891 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4892 * buildsym.h (class scoped_free_pendings): Add constructor.
4893 (free_pending_blocks): Don't declare.
4894 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4895 (free_pending_blocks): Now static.
4897 2018-07-16 Tom Tromey <tom@tromey.com>
4899 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4900 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4902 (struct subfile_stack): Remove.
4903 (subfile_stack): Remove.
4904 (push_subfile, pop_subfile, buildsym_init): Update.
4906 2018-07-16 Tom Tromey <tom@tromey.com>
4908 * buildsym.c (push_subfile): Use gdb_assert.
4909 (pop_subfile): Use gdb_assert.
4911 2018-07-16 Tom Tromey <tom@tromey.com>
4913 * buildsym.h (merge_symbol_lists): Remove.
4914 * buildsym.c (merge_symbol_lists): Remove.
4916 2018-07-16 Tom Tromey <tom@tromey.com>
4918 * stabsread.c (scan_file_globals): Update comment.
4919 * stabsread.h (scan_file_globals): Move from buildsym.h.
4920 * buildsym.h (scan_file_globals): Move to stabsread.h.
4922 2018-07-16 Tom Tromey <tom@tromey.com>
4924 * xcoffread.c (xcoff_new_init): Update.
4925 * mipsread.c (mipscoff_new_init): Update.
4926 * mdebugread.c (mdebug_build_psymtabs): Update.
4927 * elfread.c (elf_new_init): Update.
4928 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4929 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4930 * buildsym.h (buildsym_new_init): Don't declare.
4931 * buildsym.c (buildsym_new_init): Remove.
4933 2018-07-16 Tom Tromey <tom@tromey.com>
4935 * stabsread.h (within_function): Move from buildsym.h.
4936 * stabsread.c (start_stabs): Clear within_function.
4937 * coffread.c (coff_start_symtab): Clear within_function.
4938 * buildsym.h (within_function): Move to stabsread.h.
4939 * buildsym.c (prepare_for_building): Update.
4941 2018-07-16 Tom Tromey <tom@tromey.com>
4943 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4944 * dwarf2read.c (dwarf2_start_symtab): Don't set
4945 processing_gcc_compilation.
4946 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4948 2018-07-16 Tom Tromey <tom@tromey.com>
4950 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4951 (next_symbol_text_func): Move from buildsym.h.
4952 * stabsread.c (hashname): Move from buildsym.c.
4953 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4954 (next_symbol_text_func, hashname): Move to stabsread.h.
4955 * buildsym.c: Don't include bcache.h
4956 (hashname): Move to stasbread.c.
4958 2018-07-16 Tom Tromey <tom@tromey.com>
4960 * buildsym.h (context_stack_size): Don't declare.
4961 * buildsym.c (context_stack_size): New global.
4963 2018-07-16 Tom Tromey <tom@tromey.com>
4965 * dbxread.c (processing_acc_compilation): New global.
4966 * buildsym.h (processing_acc_compilation): Don't declare.
4968 2018-07-16 Tom Tromey <tom@tromey.com>
4970 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4971 * dbxread.c (read_ofile_symtab): Update.
4972 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4973 * buildsym.h (last_source_start_addr): Remove.
4974 (set_last_source_start_addr, get_last_source_start_addr):
4976 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4978 (struct buildsym_compunit) <m_last_source_start_addr>: New
4980 (prepare_for_building): Remove start_addr parameter.
4981 (start_symtab, restart_symtab, end_symtab_get_static_block)
4982 (end_symtab_with_blockvector): Update.
4983 (set_last_source_start_addr, get_last_source_start_addr): New
4986 2018-07-16 Tom Tromey <tom@tromey.com>
4988 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4990 (have_line_numbers): Remove.
4991 (record_line, prepare_for_building, end_symtab_get_static_block)
4992 (augment_type_symtab): Update.
4994 2018-07-16 Tom Tromey <tom@tromey.com>
4996 * buildsym.c (~buildsym_compunit): Free the macro table.
4997 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4999 <m_pending_macros>: New member.
5000 (pending_macros): Remove.
5001 (~scoped_free_pendings, get_macro_table, prepare_for_building)
5002 (reset_symtab_globals, end_symtab_get_static_block)
5003 (end_symtab_with_blockvector, augment_type_symtab)
5004 (buildsym_init): Update.
5006 2018-07-16 Tom Tromey <tom@tromey.com>
5008 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5010 (buildsym_compunit::set_last_source_file): New method.
5011 <m_last_source_file>: New member.
5012 (prepare_for_building): Remove "name" parameter.
5013 (start_symtab, restart_symtab, reset_symtab_globals): Update.
5014 (last_source_file): Remove.
5015 (set_last_source_file, get_last_source_file): Update.
5017 2018-07-16 Tom Tromey <tom@tromey.com>
5019 * buildsym.c (prepare_for_building): Add assert.
5021 2018-07-16 Tom Tromey <tom@tromey.com>
5023 * buildsym.c (~buildsym_compunit): Update.
5024 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5025 (start_subfile, patch_subfile_names)
5026 (end_symtab_with_blockvector): Update.
5028 2018-07-16 Tom Tromey <tom@tromey.com>
5030 * buildsym.c (struct buildsym_compunit): Add constructor,
5031 destructor, initializers.
5032 (start_buildsym_compunit): Remove.
5033 (free_buildsym_compunit): Use "delete".
5034 (start_symtab, restart_symtab): Use "new".
5036 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
5038 * symfile.c (set_objfile_default_section_offset): Remove struct
5041 2018-07-14 Stafford Horne <shorne@gmail.com>
5043 * (Responsible Maintainers): Add myself as or1k maintainer.
5045 2018-07-13 Tom Tromey <tom@tromey.com>
5047 * symfile.c (set_objfile_default_section_offset): Use extra braces
5050 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5052 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5055 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5057 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5058 unittests/cli-utils-selftests.c
5059 * unittests/cli-utils-selftests.c: New file.
5061 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5063 * NEWS: Mention new commands. Mention change to 'thread apply'.
5065 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5067 * thread.c (thr_try_catch_cmd): New function.
5068 (thread_apply_all_command): Handle qcs flags.
5069 (thread_apply_command): Handle qcs flags.
5070 (taas_command): New function.
5071 (tfaas_command): New function.
5072 (_initialize_thread): Update to setup the new commands 'taas
5073 and 'tfaas'. Change doc string for 'thread apply'.
5075 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5077 * stack.c: (trailing_outermost_frame): New function, mostly
5078 extracted from backtrace_command_1.
5079 (leading_innermost_frame): New function.
5080 (backtrace_command_1): Update to call trailing_outermost_frame.
5081 (frame_apply_command_count): New function.
5082 (frame_apply_level_command): New function.
5083 (frame_apply_all_command): New function.
5084 (frame_apply_command): New function.
5085 (faas_command): New function.
5086 (frame_cmd_list): New variable.
5087 (_initialize_stack): Update to setup the new commands 'frame apply'
5090 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5092 * cli-utils.c (number_or_range_parser::get_number): Only handle
5093 numbers or convenience var as numbers.
5094 (parse_flags): New function.
5095 (parse_flags_qcs): New function.
5096 (number_or_range_parser::finished): Ensure parsing end is detected
5097 before end of string.
5098 * cli-utils.h (parse_flags): New function.
5099 (parse_flags_qcs): New function.
5100 (number_or_range_parser): Remove m_finished bool.
5101 (number_or_range_parser::skip_range): Set m_in_range to false.
5103 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
5105 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5108 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5109 Jan Kratochvil <jan.kratochvil@redhat.com>
5110 Paul Fertser <fercerpav@gmail.com>
5111 Tsutomu Seki <sekiriki@gmail.com>
5112 Pedro Alves <palves@redhat.com>
5114 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5115 'unittests/parse-connection-spec-selftests.c'.
5116 (COMMON_SFILES): Add 'common/netstuff.c'.
5117 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5118 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5119 * common/netstuff.c: New file.
5120 * common/netstuff.h: New file.
5121 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5122 (wait_for_connect): Update comment. New parameter
5123 'gdb::optional<int> sock' instead of 'struct serial *scb'.
5124 Use 'sock' directly instead of 'scb->fd'.
5125 (try_connect): New function, with code from 'net_open'.
5126 (net_open): Rewrite main loop to deal with multiple
5127 sockets/addresses. Handle IPv6-style hostnames; implement
5128 support for IPv6 connections.
5129 * unittests/parse-connection-spec-selftests.c: New file.
5131 2018-07-11 Pedro Alves <palves@redhat.com>
5134 * remote.c (remote_target::remote_detach_pid): Call
5135 set_current_process.
5137 2018-07-11 Pedro Alves <palves@redhat.com>
5139 * h8300-tdep.c (h8300_gdbarch_init): Remove
5140 set_gdbarch_ecoff_reg_to_regnum calls.
5142 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5145 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5146 offsets/sizes for static members of a class/struct.
5148 2018-07-11 Alan Hayward <alan.hayward@arm.com>
5150 * target-descriptions.c (tdesc_register_bitsize): Rename.
5151 * target-descriptions.h (tdesc_register_bitsize): Likewise.
5152 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5153 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5155 2018-07-10 Tom Tromey <tom@tromey.com>
5157 * breakpoint.c (moribund_locations): Now static and a
5159 (breakpoint_init_inferior, moribund_breakpoint_here_p)
5160 (build_bpstat_chain, update_global_location_list)
5161 (breakpoint_retire_moribund): Update.
5162 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
5165 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5167 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5168 (riscv_register_reggroup_p): Use new function, remove unneeded
5170 (riscv_push_dummy_call): Extend assert to compare against xlen or
5171 flen based on register type.
5173 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5175 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5177 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
5179 * remote.c (show_hardware_watchpoint_limit): New function.
5180 (show_hardware_watchpoint_length_limit): New function.
5181 (show_hardware_breakpoint_limit): New function.
5182 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5183 where appropriate, update help text.
5185 2018-07-09 Tom Tromey <tom@tromey.com>
5187 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5188 (CLIBS): Don't mention NAT_CLIBS.
5190 2018-07-09 Tom Tromey <tom@tromey.com>
5192 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5193 (LIBGDB_OBS, clean mostlyclean): Update.
5194 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5196 2018-07-09 Tom Tromey <tom@tromey.com>
5198 * Makefile.in (%.c: %.y): Use ECHO_YACC.
5199 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
5200 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5202 2018-07-09 Tom Tromey <tom@tromey.com>
5204 * Makefile.in (ALLDEPFILES): Remove exec.c.
5205 (COMMON_OBS): Remove exec.o.
5206 (COMMON_SFILES): Add exec.c.
5208 2018-07-09 Tom Tromey <tom@tromey.com>
5210 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5212 2018-07-09 Tom Tromey <tom@tromey.com>
5214 * Makefile.in (clean mostlyclean): Remove stamp-version.
5215 (version.c): Depend on stamp-version.
5216 (stamp-version): New rule, from version.c rule.
5218 2018-07-09 Tom Tromey <tom@tromey.com>
5220 * Makefile.in (init.c): Depend on stamp-init.
5221 (stamp-init): New rule, from init.c rule.
5222 (clean mostlyclean): Remove stamp-init.
5224 2018-07-09 Tom Tromey <tom@tromey.com>
5226 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5227 SUBDIR_GCC_COMPILE_SRCS.
5229 2018-07-09 Tom Tromey <tom@tromey.com>
5231 * Makefile.in (init.c): Remove some unused sed rules.
5233 2018-07-09 Tom Tromey <tom@tromey.com>
5235 * Makefile.in (TSOBS): Remove.
5236 (INIT_FILES): Update.
5237 (LIBGDB_OBS): Update.
5238 (COMMON_SFILES): Add inflow.c.
5239 (SFILES): Remove inflow.c.
5241 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5243 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5245 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
5247 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5248 get_saveloc_name, is_signal_frame_name, step_name,
5249 init_remote_name, create_addr_space_name,
5250 destroy_addr_space_name, search_unwind_table_name,
5251 find_dyn_list_name): Constify.
5253 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
5255 * darwin-nat.c (darwin_pthread_kill): New function.
5256 (darwin_resume_thread): Use darwin_pthread_kill.
5258 2018-07-05 Tom de Vries <tdevries@suse.de>
5260 * macroexp.c (macro_buffer) <operator=>: New member function.
5262 2018-07-04 Tom Tromey <tom@tromey.com>
5264 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5266 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
5268 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5269 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5270 * maint.c: Likewise.
5273 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5275 * NEWS: Create a new section for the next release branch.
5276 Rename the section of the current branch, now that it has
5279 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5281 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5282 * version.in: Bump version to 8.2.50.DATE-git.
5284 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5285 Pedro Alves <palves@redhat.com>
5287 * linux-nat.c (linux_init_ptrace): Rename to ...
5288 (linux_init_ptrace_procfs): ... this. Call
5289 linux_proc_init_warnings.
5290 (linux_nat_target::post_attach)
5291 (linux_nat_target::post_startup_inferior): Adjust.
5292 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5293 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5295 2018-07-04 Tom de Vries <tdevries@suse.de>
5297 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5299 (read_comp_unit_head): ... here.
5301 2018-07-03 Tom Tromey <tom@tromey.com>
5303 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5304 (stop_tracing, tstatus_command)
5305 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5306 (print_one_static_tracepoint_marker): Update.
5307 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5309 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5311 (all_tracepoints, static_tracepoints_here): Return std::vector.
5313 2018-07-03 Tom Tromey <tom@tromey.com>
5315 * common/ptid.c (ptid_equal): Remove.
5316 * common/ptid.h (ptid_equal): Don't declare.
5317 * ada-tasks.c: Update.
5318 * breakpoint.c: Update.
5319 * common/agent.c: Update.
5320 * corelow.c: Update.
5321 * darwin-nat-info.c: Update.
5322 * darwin-nat.c: Update.
5324 * dtrace-probe.c: Update.
5325 * dummy-frame.c: Update.
5326 * fbsd-nat.c: Update.
5328 * gdbthread.h: Update.
5329 * gnu-nat.c: Update.
5330 * go32-nat.c: Update.
5331 * inf-loop.c: Update.
5332 * inf-ptrace.c: Update.
5333 * infcall.c: Update.
5337 * linux-fork.c: Update.
5338 * linux-nat.c: Update.
5339 * linux-thread-db.c: Update.
5340 * mi/mi-cmd-var.c: Update.
5341 * mi/mi-interp.c: Update.
5342 * mi/mi-main.c: Update.
5343 * nto-procfs.c: Update.
5344 * ppc-linux-tdep.c: Update.
5346 * python/py-inferior.c: Update.
5347 * python/py-record-btrace.c: Update.
5348 * python/py-record.c: Update.
5349 * ravenscar-thread.c: Update.
5350 * regcache.c: Update.
5351 * remote-sim.c: Update.
5353 * sol-thread.c: Update.
5356 * tui/tui-stack.c: Update.
5358 * windows-nat.c: Update.
5359 * windows-tdep.c: Update.
5361 2018-07-03 Tom Tromey <tom@tromey.com>
5363 * common/ptid.c (ptid_match): Remove.
5364 * common/ptid.h (ptid_match): Don't declare.
5365 * fbsd-nat.c: Update.
5368 * linux-nat.c: Update.
5369 * record-btrace.c: Update.
5370 * regcache.c: Update.
5373 2018-07-03 Tom Tromey <tom@tromey.com>
5375 * common/ptid.c (ptid_tid_p): Remove.
5376 * common/ptid.h (ptid_tid_p): Don't declare.
5377 * sol-thread.c: Update.
5379 2018-07-03 Tom Tromey <tom@tromey.com>
5381 * common/ptid.c (ptid_lwp_p): Remove.
5382 * common/ptid.h (ptid_lwp_p): Don't declare.
5383 * fbsd-nat.c: Update.
5384 * linux-nat.c: Update.
5385 * nat/linux-procfs.c: Update.
5386 * nat/x86-linux-dregs.c: Update.
5387 * sol-thread.c: Update.
5389 2018-07-03 Tom Tromey <tom@tromey.com>
5391 * common/ptid.c (ptid_is_pid): Remove.
5392 * common/ptid.h (ptid_is_pid): Don't declare.
5394 * linux-nat.c: Update.
5395 * mi/mi-interp.c: Update.
5399 2018-07-03 Tom Tromey <tom@tromey.com>
5401 * common/ptid.c (ptid_get_tid): Remove.
5402 * common/ptid.h (ptid_get_tid): Don't declare.
5403 * ada-tasks.c: Update.
5404 * aix-thread.c: Update.
5405 * bsd-uthread.c: Update.
5406 * darwin-nat.c: Update.
5407 * fbsd-nat.c: Update.
5408 * i386-darwin-nat.c: Update.
5410 * linux-tdep.c: Update.
5411 * nto-procfs.c: Update.
5412 * ppc-ravenscar-thread.c: Update.
5413 * python/py-infthread.c: Update.
5414 * ravenscar-thread.c: Update.
5415 * sol-thread.c: Update.
5416 * sparc-ravenscar-thread.c: Update.
5417 * windows-nat.c: Update.
5419 2018-07-03 Tom Tromey <tom@tromey.com>
5421 * common/ptid.c (ptid_get_lwp): Remove.
5422 * common/ptid.h (ptid_get_lwp): Don't declare.
5423 * aarch64-linux-nat.c: Update.
5424 * ada-tasks.c: Update.
5425 * aix-thread.c: Update.
5426 * amd64-linux-nat.c: Update.
5427 * arm-linux-nat.c: Update.
5428 * corelow.c: Update.
5429 * fbsd-nat.c: Update.
5430 * fbsd-tdep.c: Update.
5431 * gnu-nat.c: Update.
5432 * i386-cygwin-tdep.c: Update.
5433 * i386-gnu-nat.c: Update.
5434 * i386-linux-nat.c: Update.
5435 * ia64-linux-nat.c: Update.
5436 * inf-ptrace.c: Update.
5438 * linux-fork.c: Update.
5439 * linux-nat.c: Update.
5440 * linux-tdep.c: Update.
5441 * linux-thread-db.c: Update.
5442 * mips-linux-nat.c: Update.
5443 * nat/aarch64-linux-hw-point.c: Update.
5444 * nat/aarch64-linux.c: Update.
5445 * nat/linux-btrace.c: Update.
5446 * nat/linux-osdata.c: Update.
5447 * nat/linux-procfs.c: Update.
5448 * nat/x86-linux-dregs.c: Update.
5449 * obsd-nat.c: Update.
5450 * ppc-fbsd-nat.c: Update.
5451 * ppc-linux-nat.c: Update.
5453 * python/py-infthread.c: Update.
5454 * ravenscar-thread.c: Update.
5456 * s390-linux-nat.c: Update.
5457 * sol-thread.c: Update.
5458 * sol2-tdep.c: Update.
5459 * spu-linux-nat.c: Update.
5460 * x86-linux-nat.c: Update.
5461 * xtensa-linux-nat.c: Update.
5463 2018-07-03 Tom Tromey <tom@tromey.com>
5465 * common/ptid.c (ptid_get_pid): Remove.
5466 * common/ptid.h (ptid_get_pid): Don't declare.
5467 * aarch64-linux-nat.c: Update.
5468 * ada-lang.c: Update.
5469 * aix-thread.c: Update.
5470 * alpha-bsd-nat.c: Update.
5471 * amd64-fbsd-nat.c: Update.
5472 * amd64-linux-nat.c: Update.
5473 * arm-linux-nat.c: Update.
5474 * arm-nbsd-nat.c: Update.
5476 * break-catch-syscall.c: Update.
5477 * breakpoint.c: Update.
5478 * bsd-uthread.c: Update.
5479 * corelow.c: Update.
5481 * darwin-nat.c: Update.
5482 * fbsd-nat.c: Update.
5483 * fbsd-tdep.c: Update.
5485 * gnu-nat.c: Update.
5486 * hppa-nbsd-nat.c: Update.
5487 * hppa-obsd-nat.c: Update.
5488 * i386-fbsd-nat.c: Update.
5489 * ia64-linux-nat.c: Update.
5490 * inf-ptrace.c: Update.
5492 * inferior.c: Update.
5493 * inferior.h: Update.
5496 * linux-fork.c: Update.
5497 * linux-nat.c: Update.
5498 * linux-tdep.c: Update.
5499 * linux-thread-db.c: Update.
5500 * m68k-bsd-nat.c: Update.
5501 * mi/mi-interp.c: Update.
5502 * mi/mi-main.c: Update.
5503 * mips-linux-nat.c: Update.
5504 * mips-nbsd-nat.c: Update.
5505 * mips64-obsd-nat.c: Update.
5506 * nat/aarch64-linux-hw-point.c: Update.
5507 * nat/aarch64-linux.c: Update.
5508 * nat/linux-btrace.c: Update.
5509 * nat/linux-osdata.c: Update.
5510 * nat/linux-procfs.c: Update.
5511 * nat/x86-linux-dregs.c: Update.
5512 * nto-procfs.c: Update.
5513 * obsd-nat.c: Update.
5514 * ppc-linux-nat.c: Update.
5515 * ppc-nbsd-nat.c: Update.
5516 * ppc-obsd-nat.c: Update.
5517 * proc-service.c: Update.
5519 * python/py-inferior.c: Update.
5520 * python/py-infthread.c: Update.
5521 * ravenscar-thread.c: Update.
5523 * remote-sim.c: Update.
5525 * rs6000-nat.c: Update.
5526 * s390-linux-nat.c: Update.
5527 * sh-nbsd-nat.c: Update.
5528 * sol-thread.c: Update.
5529 * sparc-nat.c: Update.
5530 * sparc64-tdep.c: Update.
5531 * spu-linux-nat.c: Update.
5532 * spu-tdep.c: Update.
5533 * target-debug.h: Update.
5536 * tid-parse.c: Update.
5537 * tracefile-tfile.c: Update.
5538 * vax-bsd-nat.c: Update.
5539 * windows-nat.c: Update.
5540 * x86-linux-nat.c: Update.
5541 * x86-nat.c: Update.
5543 2018-07-03 Tom Tromey <tom@tromey.com>
5545 * common/ptid.c (pid_to_ptid): Remove.
5546 * common/ptid.h (pid_to_ptid): Don't declare.
5547 * aix-thread.c: Update.
5548 * arm-linux-nat.c: Update.
5549 * common/ptid.c: Update.
5550 * common/ptid.h: Update.
5551 * corelow.c: Update.
5553 * darwin-nat.c: Update.
5554 * fbsd-nat.c: Update.
5555 * fork-child.c: Update.
5556 * gnu-nat.c: Update.
5557 * go32-nat.c: Update.
5558 * inf-ptrace.c: Update.
5560 * inferior.c: Update.
5562 * linux-fork.c: Update.
5563 * linux-nat.c: Update.
5564 * nat/aarch64-linux-hw-point.c: Update.
5565 * nat/fork-inferior.c: Update.
5566 * nat/x86-linux-dregs.c: Update.
5567 * nto-procfs.c: Update.
5568 * obsd-nat.c: Update.
5570 * progspace.c: Update.
5572 * rs6000-nat.c: Update.
5573 * s390-linux-nat.c: Update.
5574 * sol-thread.c: Update.
5575 * spu-linux-nat.c: Update.
5578 * tracefile-tfile.c: Update.
5579 * windows-nat.c: Update.
5581 2018-07-03 Tom Tromey <tom@tromey.com>
5583 * common/ptid.h (ptid_build): Don't declare.
5584 * common/ptid.c (ptid_build): Remove.
5585 * aix-thread.c: Update.
5586 * bsd-kvm.c: Update.
5587 * bsd-uthread.c: Update.
5588 * common/agent.c: Update.
5589 * common/ptid.c: Update.
5590 * common/ptid.h: Update.
5591 * corelow.c: Update.
5592 * darwin-nat.c: Update.
5593 * fbsd-nat.c: Update.
5594 * gnu-nat.c: Update.
5595 * linux-fork.c: Update.
5596 * linux-nat.c: Update.
5597 * linux-thread-db.c: Update.
5598 * nat/linux-osdata.c: Update.
5599 * nat/linux-procfs.c: Update.
5600 * nto-procfs.c: Update.
5601 * obsd-nat.c: Update.
5602 * proc-service.c: Update.
5604 * ravenscar-thread.c: Update.
5605 * remote-sim.c: Update.
5607 * sol-thread.c: Update.
5609 * windows-nat.c: Update.
5611 2018-07-03 Tom Tromey <tom@tromey.com>
5613 * infrun.c (follow_exec): Use exit_inferior_silent.
5614 * inferior.c (exit_inferior_num_silent): Remove.
5615 * inferior.h (exit_inferior_num_silent): Don't declare.
5617 2018-07-03 Tom Tromey <tom@tromey.com>
5620 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5621 inferior_ptid on error.
5623 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5624 Simon Marchi <simon.marchi@polymtl.ca>
5627 * disasm.h (gdb_disassembler): Add
5628 `m_disassembler_options_holder'. member
5629 * disasm.c (get_all_disassembler_options): New function.
5630 (gdb_disassembler::gdb_disassembler): Use it.
5631 (gdb_buffered_insn_length_init_dis): Likewise.
5632 (gdb_buffered_insn_length): Adjust accordingly.
5633 (set_disassembler_options): Handle options with arguments.
5634 (show_disassembler_options_sfunc): Likewise. Add a leading new
5635 line if showing options with descriptions.
5636 (disassembler_options_completer): Adapt to using the
5637 `disasm_options_and_args_t' structure.
5638 * mips-tdep.c (mips_disassembler_options): New variable.
5639 (mips_disassembler_options_o32): Likewise.
5640 (mips_disassembler_options_n32): Likewise.
5641 (mips_disassembler_options_n64): Likewise.
5642 (gdb_print_insn_mips): Don't set `disassembler_options'.
5643 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5645 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5646 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5647 `gdbarch_disassembler_options_implicit' and
5648 `gdbarch_valid_disassembler_options'.
5649 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5650 `disasm_options_and_args_t' structure.
5651 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5653 (valid_disassembler_options): Switch from `disasm_options_t' to
5654 the `disasm_options_and_args_t' structure.
5655 * NEWS: Document `set disassembler-options' support for the MIPS
5657 * gdbarch.h: Regenerate.
5658 * gdbarch.c: Regenerate.
5660 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5662 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5664 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5666 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5667 parameter in call to amd64_target_description.
5668 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5669 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5670 (amd64fbsd_init_abi): Likewise.
5671 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5672 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5673 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5674 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5676 2018-06-29 Pedro Alves <palves@redhat.com>
5678 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5679 "segments" parameter.
5680 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5681 (_initialize_amd64_tdep): Update call to
5682 amd64_create_target_description.
5683 (amd64_target_description): Add "segments" parameter. Adjust
5684 the implementation to use it.
5685 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5686 call to amd64_create_target_description.
5687 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5688 * gdb/arch/amd64.h (amd64_create_target_description): Add
5689 "segments" register.
5690 * gdb/arch/amd64.c (amd64_create_target_description): Add
5691 "segments" parameter. Call create_feature_i386_64bit_segments
5692 only if SEGMENTS is true.
5693 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5694 call to amd64_create_target_description.
5696 2018-06-29 Pedro Alves <palves@redhat.com>
5698 * thread.c (thread_target_id_str): New, factored out from ...
5699 (print_thread_info_1): ... here. Use it to compute the max
5700 "Target Id" column width.
5702 2018-06-29 Pedro Alves <palves@redhat.com>
5704 * remote.c (remote_target::extra_thread_info): Delete
5705 'display_buf' and 'n' locals. from the cache, regardless of
5706 packet mechanims is in use. Use cache for qThreadExtra and qP
5709 2018-06-29 Pedro Alves <palves@redhat.com>
5711 * blockframe.c (find_pc_sect_containing_function): New function.
5712 * breakpoint.c (print_breakpoint_location): Don't call
5713 find_pc_sect_function.
5714 * linespec.c (create_sals_line_offset): Record the location's
5716 * linespec.c (convert_address_location_to_sals): Fill in sal's
5717 symbol with find_pc_sect_containing_function.
5718 * symtab.c (find_function_start_sal): Rename to ...
5719 (find_function_start_sal_1): ... this.
5720 (find_function_start_sal): Reimplement as wrapper around
5721 find_function_start_sal_1, and use
5722 find_pc_sect_containing_function to fill in the sal's symbol.
5723 (find_function_start_sal(symbol*, bool)): Adjust.
5724 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5726 (find_pc_sect_containing_function): Declare.
5728 2018-06-29 Pedro Alves <palves@redhat.com>
5730 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5731 true if the the location has no symbol.
5733 2018-06-28 Tom Tromey <tom@tromey.com>
5735 * NEWS: Mention --enable-codesign.
5736 * silent-rules.mk (ECHO_SIGN): New variable.
5737 * configure.ac: Add --enable-codesign.
5738 * configure: Rebuild.
5739 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5740 (gdb$(EXEEXT)): Optionally invoke codesign.
5742 2018-06-28 Pedro Alves <palves@redhat.com>
5744 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5746 (switch_to_thread_no_regs): Adjust comment.
5747 * infcmd.c (stop_pc): Delete.
5748 (post_create_inferior, info_program_command): Replace references
5749 to stop_pc with references to thread_info->suspend.stop_pc.
5750 * inferior.h (stop_pc): Delete declaration.
5751 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5752 (handle_inferior_event_1, handle_signal_stop)
5753 (process_event_stop_test, keep_going_stepped_thread)
5754 (handle_step_into_function, handle_step_into_function_backward)
5755 (print_stop_location): Replace references to stop_pc with
5756 references to thread_info->suspend.stop_pc.
5757 (struct infcall_suspend_state) <stop_pc>: Delete field.
5758 (save_infcall_suspend_state, restore_infcall_suspend_state):
5759 Remove references to inf_stat->stop_pc.
5760 * linux-fork.c (fork_load_infrun_state): Likewise.
5761 * record-btrace.c (record_btrace_set_replay): Likewise.
5762 * record-full.c (record_full_goto_entry): Likewise.
5763 * remote.c (print_one_stopped_thread): Likewise.
5764 * target.c (target_resume): Extend comment.
5765 * thread.c (set_executing_thread): New.
5766 (set_executing): Use it.
5767 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5768 Remove references to stop_pc.
5770 2018-06-28 Pedro Alves <palves@redhat.com>
5772 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5773 Moving fetching stop_pc until after ecs->event_thread is refreshed.
5775 2018-06-28 Tom Tromey <tom@tromey.com>
5777 * coffread.c (coff_symfile_finish): Update.
5778 * xcoffread.c (xcoff_symfile_finish): Update.
5779 * elfread.c (elf_symfile_finish): Update.
5780 * symfile.h (dwarf2_free_objfile): Don't declare.
5781 * dwarf2read.c (_initialize_dwarf2_read): Use
5782 register_objfile_data_with_cleanup.
5783 (dwarf2_free_objfile): Now static. Change signature.
5785 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5787 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5788 option "-o" to add-symbol-file-load to add an offset to each
5789 section's load address.
5790 * symfile.c (set_objfile_default_section_offset): New function.
5792 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5794 * symfile.c (add_symbol_file_command): Make sure that sections
5795 with the same name are sorted in the same order.
5797 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5799 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5800 require the second argument. If omitted, load sections at the
5801 addresses specified in the file.
5803 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5805 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5806 (_initialize_symfile): Add option "-o" to symbol-file to add an
5807 offset to each section of the symbol file.
5809 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5811 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5813 2018-06-27 Tom Tromey <tom@tromey.com>
5815 * stack.c (_initialize_stack): Update "func" help text.
5817 2018-06-27 Tom Tromey <tom@tromey.com>
5819 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5821 (unwind_infopy_str, pyuw_create_unwind_info)
5822 (unwind_infopy_add_saved_register, pyuw_sniffer)
5823 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5825 (struct saved_reg): Add constructor.
5826 <value>: Now a gdbpy_ref<>.
5828 2018-06-27 Tom Tromey <tom@tromey.com>
5830 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5832 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5834 * gdb-gdb.py.in: Format using autopep8.
5836 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5838 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5839 (type_lookup_function): Recognize CORE_ADDR values.
5841 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5843 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5846 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5848 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5851 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5853 * gdb-gdb.py: Move to...
5854 * gdb-gdb.py.in: ... here.
5855 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5856 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5858 (distclean): Remove gdb-gdb.py when cleaning.
5859 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5860 * configure: Re-generate.
5862 2018-06-27 Pedro Alves <palves@redhat.com>
5864 * proc-service.c (get_ps_regcache): New.
5865 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5866 (ps_lsetfpregs): Use it.
5868 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5871 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5872 (dwarf_decode_lines_1): Adjust.
5874 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5876 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5878 <info_proc>: Likewise.
5880 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5882 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5883 to windows_fetch_one_register, and only handle the case of
5884 fetching one register. Move the code that reloads the context
5885 and iterates over all registers if R is negative to...
5886 (windows_nat_target::fetch_registers): ... here.
5887 (do_windows_store_inferior_registers): Rename to
5888 windows_store_one_register, and only handle the case of storing
5889 one register. Move the code that handles the case where r is
5891 (windows_nat_target::store_registers) ... here.
5893 2018-06-26 Tom Tromey <tom@tromey.com>
5896 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5897 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5899 (rust_internal_print_type): Add podata parameter.
5900 (rust_print_type): Update.
5902 2018-06-26 Tom Tromey <tom@tromey.com>
5904 * typeprint.h (struct print_offset_data) <update, finish,
5905 maybe_print_hole>: New methods.
5906 <indentation>: New constant.
5907 * typeprint.c (print_offset_data::indentation): Define.
5908 (print_offset_data::maybe_print_hole, print_offset_data::update)
5909 (print_offset_data::finish): Move from c-typeprint.c and rename.
5910 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5911 (print_spaces_filtered_with_print_options): Update.
5912 (c_print_type_union_field_offset, maybe_print_hole)
5913 (c_print_type_struct_field_offset): Move to typeprint.c and
5915 (c_type_print_base_struct_union): Update.
5917 2018-06-25 Pedro Alves <palves@redhat.com>
5919 * gdbthread.h (thread_info_ref, delete_thread)
5920 (delete_thread_silent, first_thread_of_inferior)
5921 (any_thread_of_inferior, switch_to_thread)
5922 (enable_thread_stack_temporaries)
5923 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5924 (get_last_thread_stack_temporary)
5925 (value_in_thread_stack_temporaries, can_access_registers_thread):
5926 Spell out "struct thread_info" instead of just "thread_info".
5927 * inferior.h (notice_new_inferior): Likewise.
5929 2018-06-25 Pedro Alves <palves@redhat.com>
5931 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5932 pass thread_info pointer to delete_thread.
5933 (windows_nat_target::detach): Pass inferior pointer to
5935 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5937 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5938 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5939 and pass a thread_info pointer to delete_thread.
5940 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5941 pass thread_info pointer to delete_thread.
5942 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5943 delete_thread_silent call.
5944 * procfs.c (procfs_target::detach): Pass inferior pointer to
5946 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5947 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5948 delete_thread_silent call.
5949 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5950 pass thread_info pointer to delete_thread.
5951 (windows_nat_target::detach): Pass inferior pointer to
5954 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5956 * regcache.c (readable_regcache::read_part): Fix asserts.
5957 (reg_buffer::raw_collect_part): New function.
5958 (regcache::write_part): Fix asserts.
5959 (reg_buffer::raw_supply_part): New function.
5960 (regcache::transfer_regset_register): New helper function.
5961 (regcache::transfer_regset): Call new functions.
5962 (regcache_supply_regset): Use gdb_byte*.
5963 (regcache::supply_regset): Likewise.
5964 (regcache_collect_regset): Likewise.
5965 (regcache::collect_regset): Likewise.
5966 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5967 (reg_buffer::raw_supply_part): Likewise.
5968 (regcache::transfer_regset_register): Likewise.
5969 (regcache::transfer_regset): Use gdb_byte*.
5971 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5973 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5975 2018-06-21 Pedro Alves <palves@redhat.com>
5977 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5978 instead of a ptid_t. All callers adjusted.
5979 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5981 (print_ada_task_info, display_current_task_id, task_command_1):
5983 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5985 (breakpoint_kind): Adjust.
5986 (remove_breakpoints_pid): Rename to ...
5987 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5988 pointer. All callers adjusted.
5989 (bpstat_clear_actions): Use inferior_thread.
5990 (get_bpstat_thread): New.
5991 (bpstat_do_actions): Use it.
5992 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5993 to take a thread_info pointer. All callers adjusted.
5994 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5995 (breakpoint_re_set_thread): Use inferior_thread.
5996 * breakpoint.h (struct inferior): Forward declare.
5997 (bpstat_stop_status): Update.
5998 (remove_breakpoints_pid): Delete.
5999 (remove_breakpoints_inf): New.
6000 * bsd-uthread.c (bsd_uthread_target::wait)
6001 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6002 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6003 (maint_btrace_packet_history_cmd)
6004 (maint_btrace_clear_packet_history_cmd): Adjust.
6005 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6007 * cli/cli-interp.c: Include "inferior.h".
6008 * common/refcounted-object.h (struct
6009 refcounted_object_ref_policy): New.
6010 * compile/compile-object-load.c: Include gdbthread.h.
6011 (store_regs): Use inferior_thread.
6012 * corelow.c (core_target::close): Use current_inferior.
6013 (core_target_open): Adjust to use first_thread_of_inferior and use
6014 the current inferior.
6015 * ctf.c (ctf_target::close): Adjust to use current_inferior.
6016 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6017 <thread>: ... this new field. All references adjusted.
6018 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6019 Take a thread_info pointer instead of a ptid_t.
6020 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6021 (dummy_frame_discard, register_dummy_frame_dtor): Take a
6022 thread_info pointer instead of a ptid_t.
6023 * elfread.c: Include "inferior.h".
6024 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6025 Use inferior_thread.
6026 * eval.c (evaluate_subexp): Likewise.
6027 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6029 * gdb_proc_service.h (struct thread_info): Forward declare.
6030 (struct ps_prochandle) <ptid>: Delete, replaced by ...
6031 <thread>: ... this new field. All references adjusted.
6032 * gdbarch.h, gdbarch.c: Regenerate.
6033 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6034 'thread' parameter. All implementations and callers adjusted.
6035 * gdbthread.h (thread_info) <set_running>: New method.
6036 (delete_thread, delete_thread_silent): Take a thread_info pointer
6038 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6039 (first_thread_of_process): Delete, replaced by ...
6040 (first_thread_of_inferior): ... this new function. All callers
6042 (any_live_thread_of_process): Delete, replaced by ...
6043 (any_live_thread_of_inferior): ... this new function. All callers
6045 (switch_to_thread, switch_to_no_thread): Declare.
6046 (is_executing): Delete.
6047 (enable_thread_stack_temporaries): Update comment.
6048 <enable_thread_stack_temporaries>: Take a thread_info pointer
6049 instead of a ptid_t. Incref the thread.
6050 <~enable_thread_stack_temporaries>: Decref the thread.
6053 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6054 (get_last_thread_stack_temporary)
6055 (value_in_thread_stack_temporaries, can_access_registers_thread):
6056 Take a thread_info pointer instead of a ptid_t. All callers
6058 * infcall.c (get_call_return_value): Use inferior_thread.
6059 (run_inferior_call): Work with thread pointers instead of ptid_t.
6060 (call_function_by_hand_dummy): Work with thread pointers instead
6061 of ptid_t. Use thread_info_ref.
6062 * infcmd.c (proceed_thread_callback): Access thread's state
6064 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6065 access thread's state directly.
6066 (continue_command): Use inferior_thread.
6067 (info_program_command): Use find_thread_ptid and access thread
6069 (proceed_after_attach_callback): Use thread state directly.
6070 (notice_new_inferior): Take a thread_info pointer instead of a
6071 ptid_t. All callers adjusted.
6072 (exit_inferior): Take an inferior pointer instead of a pid. All
6074 (exit_inferior_silent): New.
6075 (detach_inferior): Delete.
6076 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6077 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6078 (detach_inferior_command, kill_inferior_command): Use
6079 find_inferior_id instead of valid_gdb_inferior_id and
6080 gdb_inferior_id_to_pid.
6081 (inferior_command): Use inferior and thread pointers.
6082 * inferior.h (struct thread_info): Forward declare.
6083 (notice_new_inferior): Take a thread_info pointer instead of a
6084 ptid_t. All callers adjusted.
6085 (detach_inferior): Delete declaration.
6086 (exit_inferior, exit_inferior_silent): Take an inferior pointer
6087 instead of a pid. All callers adjusted.
6088 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6089 (valid_gdb_inferior_id): Delete.
6090 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6091 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6092 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6094 <inf>: ... this new field.
6095 <step_ptid>: Delete, replaced by ...
6096 <step_thread>: ... this new field.
6097 (get_displaced_stepping_state): Take an inferior pointer instead
6098 of a pid. All callers adjusted.
6099 (displaced_step_in_progress_any_inferior): Adjust.
6100 (displaced_step_in_progress_thread): Take a thread pointer instead
6101 of a ptid_t. All callers adjusted.
6102 (displaced_step_in_progress, add_displaced_stepping_state): Take
6103 an inferior pointer instead of a pid. All callers adjusted.
6104 (get_displaced_step_closure_by_addr): Adjust.
6105 (remove_displaced_stepping_state): Take an inferior pointer
6106 instead of a pid. All callers adjusted.
6107 (displaced_step_prepare_throw, displaced_step_prepare)
6108 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6109 All callers adjusted.
6110 (start_step_over): Adjust.
6111 (infrun_thread_ptid_changed): Remove bit updating ptids in the
6112 displaced step queue.
6113 (do_target_resume): Adjust.
6114 (fetch_inferior_event): Use inferior_thread.
6115 (context_switch, get_inferior_stop_soon): Take an
6116 execution_control_state pointer instead of a ptid_t. All callers
6118 (switch_to_thread_cleanup): Delete.
6119 (stop_all_threads): Use scoped_restore_current_thread.
6120 * inline-frame.c: Include "gdbthread.h".
6121 (inline_state) <inline_state>: Take a thread pointer instead of a
6122 ptid_t. All callers adjusted.
6123 <ptid>: Delete, replaced by ...
6124 <thread>: ... this new field.
6125 (find_inline_frame_state): Take a thread pointer instead of a
6126 ptid_t. All callers adjusted.
6127 (skip_inline_frames, step_into_inline_frame)
6128 (inline_skipped_frames, inline_skipped_symbol): Take a thread
6129 pointer instead of a ptid_t. All callers adjusted.
6130 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6131 (inline_skipped_frames, inline_skipped_symbol): Likewise.
6132 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6134 * linux-nat.c (get_detach_signal): Likewise.
6135 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6136 (thread_db_notice_clone): Adjust.
6137 (thread_db_find_new_threads_silently)
6138 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6139 a thread pointer instead of a ptid_t. All callers adjusted.
6140 * mi/mi-cmd-var.c: Include "inferior.h".
6141 (mi_cmd_var_update_iter): Update to use thread pointers.
6142 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6144 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6146 (mi_output_running): ... this new function.
6147 (mi_on_resume_1): Adjust to use it.
6148 (mi_user_selected_context_changed): Adjust to use inferior_thread.
6149 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6151 (interrupt_thread_callback): : Adjust to use thread and inferior
6153 * proc-service.c: Include "gdbthread.h".
6154 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6155 * progspace-and-thread.c: Include "inferior.h".
6156 * progspace.c: Include "inferior.h".
6157 * python/py-exitedevent.c (create_exited_event_object): Adjust to
6158 hold a reference to an inferior_object.
6159 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6161 * python/py-inferior.c (struct inferior_object): Give the type a
6162 tag name instead of a typedef.
6163 (python_on_normal_stop): No need to check if the current thread is
6165 (inferior_to_inferior_object): Change return type to
6166 inferior_object. All callers adjusted.
6167 (find_thread_object): Delete, bits factored out to ...
6168 (thread_to_thread_object): ... this new function.
6169 * python/py-infthread.c (create_thread_object): Use
6170 inferior_to_inferior_object.
6171 (thpy_is_stopped): Use thread pointer directly.
6172 (gdbpy_selected_thread): Use inferior_thread.
6173 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6174 field, replaced with ...
6175 <thread>: ... this new field. All users adjusted.
6176 (btpy_insn_or_gap_new): Drop const.
6177 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
6179 * python/py-record.c: Include "gdbthread.h".
6180 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6181 a ptid_t. All callers adjusted.
6182 (gdbpy_current_recording): Use inferior_thread.
6183 * python/py-record.h (recpy_record_object) <ptid>: Delete
6184 field, replaced with ...
6185 <thread>: ... this new field. All users adjusted.
6186 (recpy_element_object) <ptid>: Delete
6187 field, replaced with ...
6188 <thread>: ... this new field. All users adjusted.
6189 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6190 a ptid_t. All callers adjusted.
6191 * python/py-threadevent.c: Include "gdbthread.h".
6192 (get_event_thread): Use thread_to_thread_object.
6193 * python/python-internal.h (struct inferior_object): Forward
6195 (find_thread_object, find_inferior_object): Delete declarations.
6196 (thread_to_thread_object, inferior_to_inferior_object): New
6198 * record-btrace.c: Include "inferior.h".
6199 (require_btrace_thread): Use inferior_thread.
6200 (record_btrace_frame_sniffer)
6201 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6202 (get_thread_current_frame): Use scoped_restore_current_thread and
6204 (get_thread_current_frame): Use thread pointer directly.
6205 (record_btrace_replay_at_breakpoint): Use thread's inferior
6207 * record-full.c: Include "inferior.h".
6208 * regcache.c: Include "gdbthread.h".
6209 (get_thread_arch_regcache): Use the inferior's address space
6211 (get_thread_regcache, registers_changed_thread): New.
6212 * regcache.h (get_thread_regcache(thread_info *thread)): New
6214 (registers_changed_thread): New.
6215 (remote_target) <remote_detach_1>: Swap order of parameters.
6216 (remote_add_thread): <remote_add_thread>: Return the new thread.
6217 (get_remote_thread_info(ptid_t)): New overload.
6218 (remote_target::remote_notice_new_inferior): Use thread pointers
6220 (remote_target::process_initial_stop_replies): Use
6221 thread_info::set_running.
6222 (remote_target::remote_detach_1, remote_target::detach)
6223 (extended_remote_target::detach): Adjust.
6224 * stack.c (frame_show_address): Use inferior_thread.
6225 * target-debug.h (target_debug_print_thread_info_pp): New.
6226 * target-delegates.c: Regenerate.
6227 * target.c (default_thread_address_space): Delete.
6228 (memory_xfer_partial_1): Use current_inferior.
6229 (target_detach): Use current_inferior.
6230 (target_thread_address_space): Delete.
6231 (generic_mourn_inferior): Use current_inferior.
6232 * target.h (struct target_ops) <thread_address_space>: Delete.
6233 (target_thread_address_space): Delete.
6234 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
6236 (delete_thread_1, delete_thread, delete_thread_silent): Take a
6237 thread pointer instead of a ptid_t. Adjust all callers.
6238 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6239 (first_thread_of_process): Delete, replaced by ...
6240 (first_thread_of_inferior): ... this new function. All callers
6242 (any_thread_of_process): Rename to ...
6243 (any_thread_of_inferior): ... this, and take an inferior pointer.
6244 (any_live_thread_of_process): Rename to ...
6245 (any_live_thread_of_inferior): ... this, and take an inferior
6247 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6248 (value_in_thread_stack_temporaries)
6249 (get_last_thread_stack_temporary): Take a thread pointer instead
6250 of a ptid_t. Adjust all callers.
6251 (thread_info::set_running): New.
6252 (validate_registers_access): Use inferior_thread.
6253 (can_access_registers_ptid): Rename to ...
6254 (can_access_registers_thread): ... this, and take a thread
6256 (print_thread_info_1): Adjust to compare thread pointers instead
6258 (switch_to_no_thread, switch_to_thread): Make extern.
6259 (scoped_restore_current_thread::~scoped_restore_current_thread):
6260 Use m_thread pointer directly.
6261 (scoped_restore_current_thread::scoped_restore_current_thread):
6262 Use inferior_thread.
6263 (thread_command): Use thread pointer directly.
6264 (thread_num_make_value_helper): Use inferior_thread.
6265 * top.c (execute_command): Use inferior_thread.
6266 * tui/tui-interp.c: Include "inferior.h".
6267 * varobj.c (varobj_create): Use inferior_thread.
6268 (value_of_root_1): Use find_thread_global_id instead of
6269 global_thread_id_to_ptid.
6271 2018-06-21 Alan Hayward <alan.hayward@arm.com>
6273 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6275 (regcache::write_part): Likewise.
6276 (readable_regcache::cooked_read_part): Update comment.
6277 (readable_regcache::cooked_write_part): Likewise.
6278 * regcache.h: (readable_regcache::read_part): Likewise.
6279 (regcache::write_part): Likewise.
6281 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6282 Dirk Schubert <dirk.schubert@arm.com>
6284 * aarch64-linux-nat.c (post_attach): New.
6285 (aarch64_linux_nat_target::post_attach): Override post_attach to
6286 record the number of hardware debug registers.
6288 2018-06-20 Tom Tromey <tom@tromey.com>
6290 * python/py-param.c (add_setshow_generic): Make parameters const.
6291 (parmpy_init): Update.
6293 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6295 * regcache.h (regcache_cooked_read_ftype): Rename to...
6296 (register_read_ftype): ...this, change type to function_view.
6297 (class reg_buffer) <save>: Remove src parameter.
6298 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6299 parameter non-const in first overload. Remove src parameter in
6301 * regcache.c (do_cooked_read): Remove.
6302 (readonly_detached_regcache::readonly_detached_regcache): Make
6303 parameter non-const, adjust call to other constructor.
6304 (reg_buffer::save): Remove src parameter.
6305 * frame.c (do_frame_register_read): Remove.
6306 (frame_save_as_regcache): Use lambda function.
6307 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6308 parameter to ppu2spu_data *.
6309 (ppu2spu_sniffer): Use lambda function.
6311 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6313 * record-full.c (record_full_target::insert_breakpoint): Remove
6314 "struct" keyword, add const.
6316 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6318 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6319 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6320 * configure.ac: Remove AC_PREREQ, add missing quoting.
6321 * gnulib/configure.ac: Modernize usage of
6322 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6323 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6324 (AUTOMAKE_VERSION): Bump to 1.15.1.
6325 * configure: Re-generate.
6326 * config.in: Re-generate.
6327 * aclocal.m4: Re-generate.
6328 * gnulib/aclocal.m4: Re-generate.
6329 * gnulib/config.in: Re-generate.
6330 * gnulib/configure: Re-generate.
6331 * gnulib/import/Makefile.in: Re-generate.
6333 2018-06-19 Pedro Alves <palves@redhat.com>
6335 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6336 (lookup_minimal_symbol_by_pc_section): ... here with
6337 gdb_assert_not_reached added.
6339 2018-06-19 Pedro Alves <palves@redhat.com>
6341 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6342 parameter with a block parameter. Compare location's block symbol
6343 with the frame's block instead of addresses.
6344 (skip_inline_frames): Pass the current block instead of the
6345 frame's address. Break out as soon as we determine the frame
6346 should not be skipped.
6348 2018-06-18 Tom Tromey <tom@tromey.com>
6350 * solib-aix.c (solib_aix_get_section_offsets): Return
6352 (solib_aix_solib_create_inferior_hook): Update.
6354 2018-06-18 Tom Tromey <tom@tromey.com>
6356 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6358 2018-06-18 Tom Tromey <tom@tromey.com>
6360 * solib-frv.c (frv_relocate_main_executable): Use
6362 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6365 2018-06-18 Tom Tromey <tom@tromey.com>
6367 * objfiles.h (inhibit_section_map_updates): Update.
6368 (resume_section_map_updates, resume_section_map_updates_cleanup):
6370 * solib-svr4.c (svr4_handle_solib_event): Update.
6371 * objfiles.c (inhibit_section_map_updates): Return
6372 scoped_restore_tmpl<int>.
6373 (resume_section_map_updates, resume_section_map_updates_cleanup):
6376 2018-06-18 Tom Tromey <tom@tromey.com>
6378 * valprint.h (read_string): Update.
6379 * valprint.c (read_string): Change type of "buffer".
6380 (val_print_string): Update.
6381 * python/py-value.c (valpy_string): Update.
6382 * language.h (struct language_defn) <la_get_string>: Change
6384 (default_get_string, c_get_string): Update.
6385 * language.c (default_get_string): Change type of "buffer".
6386 * guile/scm-value.c (gdbscm_value_to_string): Update.
6387 * c-lang.c (c_get_string): Change type of "buffer".
6389 2018-06-18 Tom Tromey <tom@tromey.com>
6391 * ser-mingw.c (struct pipe_state_destroyer): New.
6392 (pipe_state_up): New typedef.
6393 (cleanup_pipe_state): Remove.
6394 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6396 2018-06-18 Tom Tromey <tom@tromey.com>
6398 * rust-lang.h (rust_yyerror): Don't declare.
6399 * rust-lang.c (rust_language_defn): Update.
6400 * rust-exp.y (yyerror): Now static.
6401 * parse.c (parse_exp_in_context_1): Update.
6402 * p-lang.h (p_yyerror): Don't declare.
6403 * p-lang.c (p_language_defn): Update.
6404 * p-exp.y (yyerror): Now static.
6405 * opencl-lang.c (opencl_language_defn): Update.
6406 * objc-lang.c (objc_language_defn): Update.
6407 * m2-lang.h (m2_yyerror): Don't declare.
6408 * m2-lang.c (m2_language_defn): Update.
6409 * m2-exp.y (yyerror): Now static.
6410 * language.h (struct language_defn) <la_error>: Remove.
6411 * language.c (unk_lang_error): Remove.
6412 (unknown_language_defn, auto_language_defn): Remove.
6413 * go-lang.h (go_yyerror): Don't declare.
6414 * go-lang.c (go_language_defn): Update.
6415 * go-exp.y (yyerror): Now static.
6416 * f-lang.h (f_yyerror): Don't declare.
6417 * f-lang.c (f_language_defn): Update.
6418 * f-exp.y (yyerror): Now static.
6419 * d-lang.h (d_yyerror): Don't declare.
6420 * d-lang.c (d_language_defn): Update.
6421 * d-exp.y (yyerror): Now static.
6422 * c-lang.h (c_yyerror): Don't declare.
6423 * c-lang.c (c_language_defn, cplus_language_defn)
6424 (asm_language_defn, minimal_language_defn): Update.
6425 * c-exp.y (yyerror): Now static.
6426 * ada-lang.h (ada_yyerror): Don't declare.
6427 * ada-lang.c (ada_language_defn): Update.
6428 * ada-exp.y (yyerror): Now static.
6430 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6432 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6433 (store_sveregs_to_thread): Likewise.
6434 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6435 (aarch64_linux_store_inferior_registers): Likewise.
6436 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6438 (aarch64_sve_regs_copy_to_regcache): Likewise.
6439 (aarch64_sve_regs_copy_from_regcache): Likewise.
6440 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6442 (aarch64_sve_regs_copy_to_regcache): Likewise.
6443 (aarch64_sve_regs_copy_from_regcache): Likewise.
6444 (sve_context): Structure from Linux headers.
6445 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6446 (SVE_SIG_ZREG_SIZE): Likewise.
6447 (SVE_SIG_PREG_SIZE): Likewise.
6448 (SVE_SIG_FFR_SIZE): Likewise.
6449 (SVE_SIG_REGS_OFFSET): Likewise.
6450 (SVE_SIG_ZREGS_OFFSET): Likewise.
6451 (SVE_SIG_ZREG_OFFSET): Likewise.
6452 (SVE_SIG_ZREGS_SIZE): Likewise.
6453 (SVE_SIG_PREGS_OFFSET): Likewise.
6454 (SVE_SIG_PREG_OFFSET): Likewise.
6455 (SVE_SIG_PREGS_SIZE): Likewise.
6456 (SVE_SIG_FFR_OFFSET): Likewise.
6457 (SVE_SIG_REGS_SIZE): Likewise.
6458 (SVE_SIG_CONTEXT_SIZE): Likewise.
6459 (SVE_PT_REGS_MASK): Likewise.
6460 (SVE_PT_REGS_FPSIMD): Likewise.
6461 (SVE_PT_REGS_SVE): Likewise.
6462 (SVE_PT_VL_INHERIT): Likewise.
6463 (SVE_PT_VL_ONEXEC): Likewise.
6464 (SVE_PT_REGS_OFFSET): Likewise.
6465 (SVE_PT_FPSIMD_OFFSET): Likewise.
6466 (SVE_PT_FPSIMD_SIZE): Likewise.
6467 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6468 (SVE_PT_SVE_PREG_SIZE): Likewise.
6469 (SVE_PT_SVE_FFR_SIZE): Likewise.
6470 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6471 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6472 (__SVE_SIG_TO_PT): Likewise.
6473 (SVE_PT_SVE_OFFSET): Likewise.
6474 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6475 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6476 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6477 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6478 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6479 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6480 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6481 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6482 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6483 (SVE_PT_SVE_SIZE): Likewise.
6484 (SVE_PT_SIZE): Likewise.
6485 (HAS_SVE_STATE): New define.
6487 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6489 * nat/aarch64-sve-linux-sigcontext.h: New file.
6490 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6492 (SVE_VQ_MIN): Likewise.
6493 (SVE_VQ_MAX): Likewise.
6494 (SVE_VL_MIN): Likewise.
6495 (SVE_VL_MAX): Likewise.
6496 (SVE_NUM_ZREGS): Likewise.
6497 (SVE_NUM_PREGS): Likewise.
6498 (sve_vl_valid): Likewise.
6499 (struct user_sve_header): Likewise.
6501 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6502 Richard Bunt <Richard.Bunt@arm.com>
6504 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6505 was requested by GDB.
6507 2018-06-15 Tom de Vries <tdevries@suse.de>
6509 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6511 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6513 * gnulib/update-gnulib.sh: Print expected versions of
6516 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6518 * arch-utils.c (default_type_align): Use type_length_units.
6519 * gdbtypes.c (type_align): Use type_length_units.
6521 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6523 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6524 of 'define' command.
6526 2018-06-14 Tom de Vries <tdevries@suse.de>
6529 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6530 get_no_prettyformat_print_options.
6532 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6534 * sparc-nat.h: Include target.h.
6535 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6536 <fetch_registers>: Remove this argument in function call.
6537 <store_registers>: Remove this argument in function call, remove
6539 <low_forget_process>: Call sparc64_forget_process instead of
6540 sparc_forget_process.
6542 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6544 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6545 (procfs_target::make_corefile_notes): Adjust to new
6546 target_read_alloc return type.
6548 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6549 Stephen Roberts <stephen.roberts@arm.com>
6552 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6553 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6554 Move should_notify_stop local into more inner scope.
6556 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6557 Stephen Roberts <stephen.roberts@arm.com>
6560 * infrun.c (resume_1): Add call to mark_async_event_handler.
6562 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6564 * infrun.c (do_target_wait): Change old version of $pc printed.
6566 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6568 * dwarf2read.c (read_index_from_section): Rename to...
6569 (read_gdb_index_from_section): ... this, update all callers.
6570 (dwarf2_read_index): Rename to...
6571 (dwarf2_read_gdb_index): ... this, update all callers.
6573 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6575 * gdb/hppa-linux-nat.c
6576 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6577 hppa_linux_nat_target::fetch_registers.
6579 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6581 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6582 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6583 (AARCH64_DWARF_SVE_FFR): Likewise.
6584 (AARCH64_DWARF_SVE_P0): Likewise.
6585 (AARCH64_DWARF_SVE_Z0): Likewise.
6587 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6589 * common/common-regcache.h (raw_compare): New function.
6590 * regcache.c (regcache::raw_compare): Likewise.
6591 * regcache.h (regcache::raw_compare): New declaration.
6593 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6595 * common/common-regcache.h (reg_buffer_common): New structure.
6596 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6597 (reg_buffer::raw_supply): Likewise.
6598 (reg_buffer::raw_supply_integer): Likewise.
6599 (reg_buffer::raw_supply_zeroed): Likewise.
6600 (reg_buffer::raw_collect): Likewise.
6601 (reg_buffer::raw_collect_integer): Likewise.
6602 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6603 (reg_buffer::raw_supply): Likewise.
6604 (reg_buffer::raw_supply_integer): Likewise.
6605 (reg_buffer::raw_supply_zeroed): Likewise.
6606 (reg_buffer::raw_collect): Likewise.
6607 (reg_buffer::raw_collect_integer): Likewise.
6609 2018-06-10 Tom Tromey <tom@tromey.com>
6611 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6612 (class remote_state) <stop_reply_queue>: Now std::vector.
6613 (remote_state::~remote_state)
6614 (remote_target::stop_reply_queue_length): Update.
6615 (struct queue_iter_param, remove_child_of_pending_fork)
6616 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6617 (check_pending_event_prevents_wildcard_vcont_callback)
6618 (remove_stop_reply_for_inferior)
6619 (remove_stop_reply_of_remote_state)
6620 (remote_notif_remove_once_on_match)
6621 (stop_reply_match_ptid_and_ws)
6622 (remote_kill_child_of_pending_fork): Remove.
6623 (remote_target::remove_new_fork_children)
6624 (remote_target::check_pending_events_prevent_wildcard_vcont)
6625 (remote_target::discard_pending_stop_replies)
6626 (remote_target::discard_pending_stop_replies_in_queue)
6627 (remote_target::remote_notif_remove_queued_reply)
6628 (remote_target::queued_stop_reply)
6629 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6630 (remote_target::wait, remote_target::kill_new_fork_children)
6631 (remote_target::async): Update.
6633 2018-06-10 Tom Tromey <tom@tromey.com>
6635 * record-full.c (record_full_arch_list_cleanups): Remove.
6636 (record_full_message): Use try/catch.
6637 (record_full_wait_cleanups): Remove.
6638 (record_full_wait_1): Use try/catch.
6639 (record_full_restore): Likewise.
6641 2018-06-10 Tom Tromey <tom@tromey.com>
6643 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6644 declare VEC. Add constructor.
6645 <in_target_beneath>: Now bool.
6646 (record_full_breakpoints): Now a std::vector, static.
6647 (record_full_sync_record_breakpoints)
6648 (record_full_init_record_breakpoints)
6649 (record_full_target::insert_breakpoint)
6650 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6652 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6654 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6655 * serial.c (serial_interface_lookup): Remove struct keyword.
6657 2018-06-10 Tom Tromey <tom@tromey.com>
6659 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6661 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6663 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6665 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6666 "beneath" as a method.
6667 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6668 Use "beneath" as a method.
6670 2018-06-10 Tom Tromey <tom@tromey.com>
6672 * tracefile.c (struct trace_file_writer_deleter): New.
6673 <operator()>: Rename from trace_file_writer_xfree.
6674 (trace_file_writer_up): New typedef.
6675 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6677 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6679 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6680 <m_registers, m_register_status>: Change type to
6682 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6685 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6687 * common/common-regcache.h (enum register_status): Add
6688 underlying type "signed char".
6689 * regcache.h (reg_buffer) <m_register_status>: Change type to
6691 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6692 register_status instead of signed char.
6693 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6694 (reg_buffer::get_register_status): Remove cast.
6695 (readable_regcache::raw_read): Remove cast.
6696 (readable_regcache::cooked_read): Remove cast.
6698 2018-06-09 Tom Tromey <tom@tromey.com>
6700 * source.c (reverse_search_command, forward_search_command): Use
6703 2018-06-09 Tom Tromey <tom@tromey.com>
6705 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6706 (serial_ops_list): Now static, std::vector.
6707 (serial_interface_lookup, serial_add_interface): Update.
6709 2018-06-09 Tom Tromey <tom@tromey.com>
6711 * dwarf2read.c (process_cu_includes): Update.
6712 (process_full_comp_unit): Update.
6713 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6716 2018-06-08 Paul Koning <paul_koning@dell.com>
6720 * python/python.c (do_start_initialization):
6721 Avoid call to internal Python API.
6722 (init__gdb_module): New function.
6724 2018-06-08 Gary Benson <gbenson@redhat.com>
6726 * linux-thread-db.c (valprint.h): New include.
6727 (struct check_thread_db_info): New structure.
6728 (check_thread_db_on_load, tdb_testinfo): New static globals.
6729 (check_thread_db, check_thread_db_callback): New functions.
6730 (try_thread_db_load_1): Run integrity checks if requested.
6731 (maintenance_check_libthread_db): New function.
6732 (_initialize_thread_db): Register "maint check libthread-db"
6733 and "maint set/show check-libthread-db".
6734 * NEWS: Mention the above new commands.
6736 2018-06-08 Tom Tromey <tom@tromey.com>
6738 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6741 2018-06-08 Tom Tromey <tom@tromey.com>
6743 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6745 2018-06-08 Tom Tromey <tom@tromey.com>
6747 * common/btrace-common.h (struct btrace_data): Add constructor,
6748 destructor, move assignment operator.
6749 <empty, clear, fini>: New methods.
6750 <format>: Initialize.
6751 (btrace_data_init, btrace_data_fini, btrace_data_clear)
6752 (btrace_data_empty): Don't declare.
6753 * common/btrace-common.c (btrace_data_init): Remove.
6754 (btrace_data::fini): Rename from btrace_data_fini.
6755 (btrace_data::empty): Rename from btrace_data_empty.
6756 (btrace_data::clear): Rename from btrace_data_clear. Return
6758 * btrace.h (make_cleanup_btrace_data): Don't declare.
6759 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6760 (parse_xml_btrace): Update.
6761 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6762 (maint_btrace_clear_packet_history_cmd): Update.
6764 2018-06-07 Pedro Alves <palves@redhat.com>
6766 * target.h (target_ops) <beneath>: Now a method. All references
6768 (class target_stack): New.
6769 * target.c (g_target_stack): New.
6770 (g_current_top_target): Delete.
6771 (current_top_target): Get the top target out of g_target_stack.
6772 (target_stack::push, target_stack::unpush): New.
6773 (push_target, unpush_target): Reimplement.
6774 (target_is_pushed): Reimplement in terms of g_target_stack.
6775 (target_ops::beneath, target_stack::find_beneath): New.
6777 2018-06-07 Pedro Alves <palves@redhat.com>
6779 * target.h (find_target_beneath): Delete declaration.
6780 * target.c (find_target_beneath): Delete definition.
6781 * aix-thread.c: All callers of find_target_beneath adjusted to
6782 call target_ops::beneath instead.
6783 * bsd-uthread.c: Likewise.
6784 * linux-thread-db.c: Likewise.
6785 * ravenscar-thread.c: Likewise.
6786 * sol-thread.c: Likewise.
6787 * spu-multiarch.c: Likewise.
6789 2018-06-07 Pedro Alves <palves@redhat.com>
6791 * target.h (target_ops) <beneath>: Now a method. All references
6793 (target_ops) <m_beneath>: New.
6794 * target.c (target_ops::beneath): New.
6795 * corelow.c: Adjust all references to target_ops::beneath.
6796 * linux-thread-db.c: Likewise.
6797 * make-target-delegates: Likewise.
6798 * record-btrace.c: Likewise.
6799 * record-full.c: Likewise.
6800 * remote.c: Likewise.
6801 * target.c: Likewise.
6802 * target-delegates.c: Regenerate.
6804 2018-06-07 Pedro Alves <palves@redhat.com>
6806 * target.h (target_stack): Delete.
6807 (current_top_target): Declare function.
6808 * target.c (target_stack): Delete.
6809 (g_current_top_target): New.
6810 (current_top_target): New function.
6811 * auxv.c: Use current_top_target instead of target_stack
6813 * avr-tdep.c: Likewise.
6814 * breakpoint.c: Likewise.
6815 * corefile.c: Likewise.
6816 * elfread.c: Likewise.
6818 * exceptions.c: Likewise.
6819 * frame.c: Likewise.
6820 * gdbarch-selftests.c: Likewise.
6821 * gnu-v3-abi.c: Likewise.
6822 * ia64-tdep.c: Likewise.
6823 * ia64-vms-tdep.c: Likewise.
6824 * infcall.c: Likewise.
6825 * infcmd.c: Likewise.
6826 * infrun.c: Likewise.
6827 * linespec.c: Likewise.
6828 * linux-tdep.c: Likewise.
6829 * minsyms.c: Likewise.
6830 * ppc-linux-nat.c: Likewise.
6831 * ppc-linux-tdep.c: Likewise.
6832 * procfs.c: Likewise.
6833 * regcache.c: Likewise.
6834 * remote.c: Likewise.
6835 * rs6000-tdep.c: Likewise.
6836 * s390-linux-nat.c: Likewise.
6837 * s390-tdep.c: Likewise.
6838 * solib-aix.c: Likewise.
6839 * solib-darwin.c: Likewise.
6840 * solib-dsbt.c: Likewise.
6841 * solib-spu.c: Likewise.
6842 * solib-svr4.c: Likewise.
6843 * solib-target.c: Likewise.
6844 * sparc-tdep.c: Likewise.
6845 * sparc64-tdep.c: Likewise.
6846 * spu-tdep.c: Likewise.
6847 * symfile.c: Likewise.
6848 * symtab.c: Likewise.
6849 * target-descriptions.c: Likewise.
6850 * target-memory.c: Likewise.
6851 * target.c: Likewise.
6852 * target.h: Likewise.
6853 * tracefile-tfile.c: Likewise.
6854 * tracepoint.c: Likewise.
6855 * valops.c: Likewise.
6856 * valprint.c: Likewise.
6857 * value.c: Likewise.
6858 * windows-tdep.c: Likewise.
6859 * mi/mi-main.c: Likewise.
6861 2018-06-07 Tom Tromey <tom@tromey.com>
6863 * valprint.h (build_address_symbolic): Declare.
6864 * printcmd.c (print_address_symbolic): Update.
6865 (build_address_symbolic): Change "name" and "filename" to
6867 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6869 * defs.h (build_address_symbolic): Remove declaration.
6871 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6873 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6874 (aarch64_vnv_type): Add function.
6875 (aarch64_pseudo_register_name): Add V regs for SVE.
6876 (aarch64_pseudo_register_type): Likewise.
6877 (aarch64_pseudo_register_reggroup_p): Likewise.
6878 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6879 (aarch64_pseudo_read_value): Add V regs for SVE.
6880 (aarch64_pseudo_write_2): Use V0 offset for SVE
6881 (aarch64_pseudo_write): Add V regs for SVE.
6882 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6884 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6886 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6887 (sve_vl_from_vq): Likewise.
6889 2018-06-05 Tom Tromey <tom@tromey.com>
6891 * cli/cli-cmds.c (show_version): Update.
6892 * top.c (print_gdb_version): Add "interactive" parameter.
6894 * main.c (captured_main_1): Update.
6895 * top.h (print_gdb_version): Add "interactive" parameter and a
6898 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6900 * common/enum-flags.h: Add trailing semicolon to example in
6903 2018-06-05 Tom Tromey <tom@tromey.com>
6906 * NEWS: Add entry about pager.
6907 * utils.c (pagination_disabled_for_command): New global.
6908 (prompt_for_continue): Allow "c" response to prompt.
6909 (reinitialize_more_filter): Clear
6910 pagination_disabled_for_command.
6911 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6913 2018-06-04 Tom Tromey <tom@tromey.com>
6915 * ada-lang.h (ada_lookup_symbol_list): Update.
6916 * ada-lang.c (resolve_subexp): Update.
6917 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6919 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6920 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6921 results parameter to std::vector.
6922 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6924 * ada-exp.y (block_lookup): Update.
6925 (select_possible_type_sym): Change type of syms. Remove nsyms
6927 (write_var_or_type, write_name_assoc): Update.
6929 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6931 * windows-nat.c (windows_nat_target::xfer_partial): Return
6932 TARGET_XFER_E_IO if we need to delegate to the target beneath
6933 but BENEATH is NULL.
6935 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6937 * Makefile.in (config.status): Add configure.nat as a
6940 2018-06-04 Tom Tromey <tom@tromey.com>
6942 * cp-name-parser.y (cpname_state): Add method declarations.
6943 (HANDLE_QUAL): Update.
6944 (cpname_state::d_grab, cpname_state::fill_comp)
6945 (cpname_state::make_operator, cpname_state::make_dtor)
6946 (cpname_state::make_builtin_type, cpname_state::make_name)
6947 (cpname_state::d_qualify, cpname_state::d_int_type)
6948 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6949 (%union): Move earlier.
6951 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6953 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6955 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6957 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6958 (aarch64_pseudo_write_1): Likewise.
6959 (aarch64_pseudo_read_value): Use helper.
6960 (aarch64_pseudo_write): Likewise.
6962 2018-06-04 Pedro Alves <palves@redhat.com>
6964 * darwin-nat.c (darwin_ops): Delete.
6965 (darwin_attach_pid): Use get_native_target.
6967 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6969 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6970 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6972 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6974 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6975 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6976 (aarch64_gdbarch_init): Check for SVE.
6977 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6979 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6981 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6982 * aarch64-tdep.h (aarch64_read_description): Likewise.
6983 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6984 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6985 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6986 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6987 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6989 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6991 * value.c (value_fetch_lazy_bitfield): New.
6992 (value_fetch_lazy_memory): New.
6993 (value_fetch_lazy_register): New.
6994 (value_fetch_lazy): Factor out to smaller functions.
6996 2018-06-01 Tom Tromey <tom@tromey.com>
6998 * cp-name-parser.y (backslashable, represented): Now const.
7000 2018-06-01 Tom Tromey <tom@tromey.com>
7002 * cp-name-parser.y: Include parser-defs.h.
7003 (parser_fprintf): Remove declaration.
7005 2018-06-01 Tom Tromey <tom@tromey.com>
7007 * cp-name-parser.y: Use %pure-parser, %lex-param, and
7009 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7010 (global_result): Remove globals.
7011 (struct cpname_state): New.
7012 (yyparse): Don't declare.
7013 (yylex, yyerror): Move declarations after %union.
7014 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7015 (make_name): Add state parameter.
7017 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7019 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7021 (yylex): Add lvalp, state parameters.
7022 (yyerror): Add state parameter.
7023 (cp_demangled_name_to_comp): Update.
7025 2018-06-01 Tom Tromey <tom@tromey.com>
7027 * cp-name-parser.y (parser_fprintf): Declare.
7028 (GDB_YY_REMAP_PREFIX): Define.
7029 Include yy-remap.h. Don't redefine yy* identifiers.
7031 2018-06-01 Tom Tromey <tom@tromey.com>
7033 * python/py-type.c (typy_legacy_template_argument): Update.
7034 * cp-support.h (cp_demangled_name_to_comp): Update.
7035 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7036 parameter to be a "std::string *".
7039 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
7041 * ada-lex.l: Include "diagnostics.h" instead of
7042 "common/diagnostics.h".
7043 * unittests/environ-selftests.c: Likewise.
7044 * common/diagnostics.h: Moved to ../include.
7046 2018-06-01 Joel Brobecker <brobecker@adacore.com>
7048 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7049 to language_mode_manual while calling breakpoint_re_set_one.
7051 2018-06-01 Tom Tromey <tom@tromey.com>
7053 * valops.c (value_cast_structs, destructor_name_p): Update.
7054 * symtab.c (gdb_mangle_name): Update.
7055 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7057 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7058 (pascal_object_print_value_fields, pascal_object_print_value):
7060 * p-typeprint.c (pascal_type_print_derivation_info): Update.
7061 * linespec.c (find_methods): Update.
7062 * gdbtypes.h (type_name_no_tag): Remove.
7063 (type_name_or_error): Rename from type_name_no_tag_or_error.
7064 * gdbtypes.c (type_name_no_tag): Remove.
7065 (type_name_or_error): Rename from type_name_no_tag_or_error.
7066 (lookup_struct_elt_type, check_typedef): Update.
7067 * expprint.c (print_subexp_standard): Update.
7068 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7069 * d-namespace.c (d_lookup_nested_symbol): Update.
7070 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7071 (cp_print_class_member): Update.
7072 * cp-namespace.c (cp_lookup_nested_symbol): Update.
7073 * completer.c (add_struct_fields): Update.
7074 * c-typeprint.c (cp_type_print_derivation_info)
7075 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7077 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7078 (ada_prefer_type, ada_is_exception_sym): Update.
7080 2018-06-01 Tom Tromey <tom@tromey.com>
7082 * valops.c (enum_constant_from_type, value_namespace_elt)
7083 (value_maybe_namespace_elt): Update.
7084 * valarith.c (find_size_for_pointer_math): Update.
7085 * target-descriptions.c (make_gdb_type): Update.
7086 * symmisc.c (print_symbol): Update.
7087 * stabsread.c (define_symbol, read_type)
7088 (complain_about_struct_wipeout, add_undefined_type)
7089 (cleanup_undefined_types_1): Update.
7090 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7091 (rust_range_type_p, val_print_struct, rust_print_struct_def)
7092 (rust_internal_print_type, rust_composite_type)
7093 (rust_evaluate_funcall, rust_evaluate_subexp)
7094 (rust_inclusive_range_type_p): Update.
7095 * python/py-type.c (typy_get_tag): Update.
7096 * p-typeprint.c (pascal_type_print_base): Update.
7097 * mdebugread.c (parse_symbol, parse_type): Update.
7098 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7100 * guile/scm-type.c (gdbscm_type_tag): Update.
7101 * go-lang.c (sixg_string_p): Update.
7102 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7104 * gdbtypes.h (struct main_type) <tag_name>: Remove.
7105 (TYPE_TAG_NAME): Remove.
7106 * gdbtypes.c (type_name_no_tag): Simplify.
7107 (check_typedef, check_types_equal, recursive_dump_type)
7108 (copy_type_recursive, arch_composite_type): Update.
7109 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
7110 in summary mode when needed.
7111 * eval.c (evaluate_funcall): Update.
7112 * dwarf2read.c (fixup_go_packaging, read_structure_type)
7113 (process_structure_scope, read_enumeration_type)
7114 (read_namespace_type, read_module_type, determine_prefix): Update.
7115 * cp-support.c (inspect_type): Update.
7116 * coffread.c (process_coff_symbol, decode_base_type): Update.
7117 * c-varobj.c (c_is_path_expr_parent): Update.
7118 * c-typeprint.c (c_type_print_base_struct_union): Update.
7119 (c_type_print_base_1): Update. Print struct/class/union/enum in
7120 summary when using C language.
7121 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7122 (gen_maybe_namespace_elt): Update.
7123 * ada-lang.c (ada_type_name): Simplify.
7124 (empty_record, ada_template_to_fixed_record_type_1)
7125 (template_to_static_fixed_type)
7126 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7128 2018-06-01 Tom Tromey <tom@tromey.com>
7130 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7132 * c-typeprint.c (c_print_type_1): Add "language" parameter.
7133 (c_print_type): Update.
7134 (c_print_type): New overload.
7135 (c_type_print_varspec_prefix, c_type_print_args)
7136 (c_type_print_varspec_suffix, c_print_type_no_offsets)
7137 (c_type_print_base_struct_union, c_type_print_base_1)
7138 (cp_type_print_method_args): Add "language" parameter.
7139 (c_type_print_base): Update.
7140 * c-lang.h (c_print_type): Add new overload.
7142 2018-06-01 Tom Tromey <tom@tromey.com>
7144 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7145 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7147 2018-06-01 Alan Hayward <alan.hayward@arm.com>
7149 * aarch64-tdep.c (aarch64_sve_register_names): New const
7151 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7152 (AARCH64_SVE_Z_REGS_NUM): New define.
7153 (AARCH64_SVE_P_REGS_NUM): Likewise.
7154 (AARCH64_SVE_NUM_REGS): Likewise.
7156 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7158 * nat/linux-ptrace.h [__alpha__]
7159 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7162 2018-05-31 Maciej W. Rozycki <macro@mips.com>
7164 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7165 the endianness selected.
7166 * NEWS: Document `set endian auto' mode operation update.
7168 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7170 * Makefile.in: Add new header.
7171 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7172 (sve_vl_from_vg): Likewise.
7173 (sve_vq_from_vl): Likewise.
7174 (sve_vl_from_vq): Likewise.
7175 (sve_vq_from_vg): Likewise.
7176 (sve_vg_from_vq): Likewise.
7177 * configure.nat: Add new c file.
7178 * nat/aarch64-sve-linux-ptrace.c: New file.
7179 * nat/aarch64-sve-linux-ptrace.h: New file.
7181 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7183 * aarch64-linux-nat.c (aarch64_linux_read_description):
7185 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7187 * aarch64-tdep.c (tdesc_aarch64_list): Add.
7188 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7189 (aarch64_gdbarch_init): Add parmeter zero.
7190 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7191 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7192 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7194 * doc/gdb.texinfo: Describe SVE feature
7195 * features/aarch64-sve.c: New file.
7197 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
7200 * gdbarch.sh (significant_addr_bit): Default to zero when
7201 not set by target architecture.
7202 * gdbarch.c: Re-generated.
7203 * utils.c (address_significant): Update.
7205 2018-05-30 Joel Brobecker <brobecker@adacore.com>
7207 * stack.c (func_command): Remove trailing newline in call to error.
7209 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7211 * regcache.h (regcache_raw_collect): Remove, update callers to
7212 use regcache::raw_collect.
7213 * regcache.c (regcache_raw_collect): Remove.
7215 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7217 * regcache.h (regcache_raw_supply): Remove, update callers to
7218 use detached_regcache::raw_supply.
7219 * regcache.c (regcache_raw_supply): Remove.
7221 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7223 * regcache.h (regcache_cooked_write_part): Remove, update
7224 callers to use regcache::cooked_write_part.
7225 * regcache.c (regcache_cooked_write_part): Remove.
7227 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7229 * regcache.h (regcache_cooked_read_part): Remove, update callers
7230 to use readable_regcache::cooked_read_part.
7231 * regcache.c (regcache_cooked_read_part): Remove.
7233 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7235 * regcache.h (regcache_cooked_read_value): Remove, update
7236 callers to use readable_regcache::cooked_read_value.
7237 * regcache.c (regcache_cooked_read_value): Remove.
7239 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7241 * regcache.h (regcache_cooked_write): Remove, update callers to
7242 use regcache::cooked_write.
7243 * regcache.c (regcache_cooked_write): Remove.
7245 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7247 * regcache.h (regcache_invalidate): Remove, update callers to
7248 use detached_regcache::invalidate instead.
7249 * regcache.c (regcache_invalidate): Remove.
7251 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7253 * regcache.h (regcache_raw_write_part): Remove, update callers
7254 to use regcache::raw_write_part instead.
7255 * regcache.c (regcache_raw_write_part): Remove.
7257 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7259 * regcache.h (regcache_raw_read_part): Remove, update callers to
7260 use readable_regcache::raw_read_part instead.
7261 * regcache.c (regcache_raw_read_part): Remove.
7263 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7265 * regcache.h (regcache_cooked_read): Remove, update callers to
7266 use readable_regcache::cooked_read instead.
7267 * regcache.c (regcache_cooked_read): Remove.
7269 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7271 * regcache.h (regcache_raw_write): Remove, update callers to use
7272 regcache::raw_write instead.
7273 * regcache.c (regcache_raw_write): Remove.
7275 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7277 * regcache.h (regcache_raw_read): Remove, update callers to use
7278 readable_regcache::raw_read instead.
7279 * regcache.c (regcache_raw_read): Remove.
7281 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7283 * regcache.h (regcache_raw_update): Remove, update callers to
7284 use readable_regcache::raw_update instead.
7285 * regcache.c (regcache_raw_update): Remove.
7287 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7289 * regcache.h (regcache_register_status): Remove, update callers
7290 to use reg_buffer::get_register_status directly instead.
7291 * regcache.c (regcache_register_status): Remove.
7293 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7295 * regcache.h (regcache_get_ptid): Remove, update all callers to
7296 call regcache::ptid instead.
7297 * regcache.c (regcache_get_ptid): Remove.
7299 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7301 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7303 2018-05-30 Pedro Alves <palves@redhat.com>
7305 * common/common-exceptions.h (exception_rethrow): Use
7308 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7310 * breakpoint.c (print_solib_event, check_status_catch_solib):
7311 Remove struct keyword in range-based for loops.
7312 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7313 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7315 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7317 * symfile.c (addr_info_make_relative): Likewise.
7318 * thread.c (value_in_thread_stack_temporaries): Likewise.
7320 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7323 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7324 aggregate type to get its real type before accessing it.
7326 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7328 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7329 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7330 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7331 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7332 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7333 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7334 * printcmd.c (info_address_command): Likewise.
7336 2018-05-29 Tom Tromey <tom@tromey.com>
7338 * windows-nat.c (handle_exception): Update fall-through comment.
7340 2018-05-29 Tom Tromey <tom@tromey.com>
7342 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7343 (struct program_space) <added_solibs>: Now a std::vector.
7344 * breakpoint.c (print_solib_event): Update.
7345 (check_status_catch_solib): Update.
7346 * progspace.c (clear_program_space_solib_cache): Update.
7347 * solib.c (update_solib_list): Update.
7349 2018-05-29 Tom Tromey <tom@tromey.com>
7351 * python/py-type.c (typy_richcompare): Update.
7352 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7353 * gdbtypes.h (types_deeply_equal): Return bool.
7354 (types_equal): Likewise.
7355 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7357 (check_types_equal): Change worklist to std::vector. Return
7359 (struct type_equality_entry): Add constructor.
7360 (compare_maybe_null_strings): Return bool.
7361 (check_types_worklist): Return bool. Change worklist to
7363 (types_deeply_equal): Use std::vector.
7364 (types_equal): Return bool.
7365 (compare_maybe_null_strings): Simplify.
7367 2018-05-29 Tom Tromey <tom@tromey.com>
7369 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7371 2018-05-29 Tom Tromey <tom@tromey.com>
7373 * objc-lang.h: Don't include cp-support.h.
7374 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7377 2018-05-27 Tom Tromey <tom@tromey.com>
7379 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7381 2018-05-25 Tom Tromey <tom@tromey.com>
7383 * value.c (value::location): Initialize.
7385 2018-05-25 Tom Tromey <tom@tromey.com>
7387 * dbxread.c (init_bincl_list): Remove.
7388 (bincl_list): Now a std::vector.
7389 (bincls_allocated, next_bincl): Remove.
7390 (free_bincl_list, do_free_bincl_list_cleanup)
7391 (make_cleanup_free_bincl_list): Remove.
7392 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7394 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7395 (struct header_file_location): Add constructor.
7396 (add_bincl_to_list): Remove.
7398 2018-05-25 Tom Tromey <tom@tromey.com>
7400 * tui/tui.c (tui_enable): Update.
7401 * mi/mi-interp.c (mi_interp::init): Update.
7402 * interps.h (class interp) <name>: New method.
7403 <m_name>: Rename from name.
7404 (~scoped_restore_interp): Update.
7405 * interps.c (interp::interp): Update.
7406 (interp_add, interp_set, interp_lookup_existing)
7407 (current_interp_named_p): Update.
7409 2018-05-25 Tom Tromey <tom@tromey.com>
7411 * interps.c (interp_name): Remove.
7412 * mi/mi-interp.c (mi_interp::init): Update.
7413 * interps.h (interp_name): Remove.
7414 (~scoped_restore_interp): Update.
7415 * tui/tui.c (tui_enable): Update.
7417 2018-05-25 Tom Tromey <tom@tromey.com>
7419 * utils.c (fputs_maybe_filtered): Update.
7420 * linespec.c (decode_line_full): Update.
7421 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7422 (mi_print_breakpoint_for_event, mi_solib_loaded)
7423 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7424 (mi_user_selected_context_changed): Update.
7425 * mi/mi-main.c (mi_execute_command): Update.
7426 * cli/cli-script.c (execute_control_command): Update.
7427 * python/python.c (execute_gdb_command): Update.
7428 * solib.c (info_sharedlibrary_command): Update.
7429 * interps.c (interp_ui_out): Remove.
7430 * interps.h (interp_ui_out): Remove.
7432 2018-05-25 Tom Tromey <tom@tromey.com>
7434 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7435 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7436 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7438 2018-05-25 Tom Tromey <tom@tromey.com>
7440 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7441 * interps.c (interp_exec): Use scoped_restore.
7443 2018-05-25 Tom Tromey <tom@tromey.com>
7445 * remote.c (remote_target::remote_file_get): Use
7447 (remote_target::remote_file_put): Likewise.
7449 2018-05-25 Tom Tromey <tom@tromey.com>
7451 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7453 (get_pe_section_index, add_pe_exported_sym): Update.
7454 (read_pe_exported_syms): Use gdb::def_vector.
7456 2018-05-25 Tom Tromey <tom@tromey.com>
7458 * frame.c (remove_prev_frame): Remove.
7459 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7461 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7463 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7465 * mips-linux-nat.c (supply_fpregset): Always call
7466 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7467 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7468 `mips_fill_fpregset'.
7469 * mips-linux-tdep.c (mips_supply_fpregset)
7470 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7471 (mips_fill_fpregset_wrapper): Remove functions.
7472 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7473 (mips_linux_fpregset): Remove variable.
7474 (mips_linux_iterate_over_regset_sections): Use
7475 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7476 (mips_linux_o32_sigframe_init): Remove comment.
7478 2018-05-25 Pedro Alves <palves@redhat.com>
7480 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7481 (struct readahead_cache, struct packet_reg, struct
7482 remote_arch_state, class remote_state): Move higher up in the
7484 (remote_target::m_remote_state): Now an object instead of a pointer.
7485 (remote_target::get_remote_state): Adjust.
7487 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7489 * stack.c (select_and_print_frame): Delete.
7490 (struct function_bounds): Move struct within function.
7491 (func_command): Most content moved into new function
7492 find_frame_for_function, use new function, print result, add
7494 (find_frame_for_function): New function, now returns a result.
7496 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7498 * stack.c (iterate_over_block_arg_vars): Fix comment.
7499 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7501 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7505 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7507 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7509 * frame.h (class scoped_restore_selected_frame): New class.
7510 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7511 of any exception, use scoped_restore_selected_frame to restore the
7514 2018-05-24 Pedro Alves <palves@redhat.com>
7516 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7519 2018-05-23 Tom Tromey <tom@tromey.com>
7521 * complaints.c (struct complaints): Remove.
7522 (symfile_complaint_book): Remove.
7523 (series): New global.
7524 (complaint_internal): Update.
7525 (clear_complaints): Update.
7527 2018-05-23 Tom Tromey <tom@tromey.com>
7529 * complaints.c (counters): New global.
7530 (struct complain): Remove.
7531 (struct complaints) <root>: Remove.
7532 (complaint_sentinel): Remove.
7533 (symfile_complaint_book): Update.
7534 (find_complaint) Remove.
7535 (complaint_internal, clear_complaints): Update.
7537 2018-05-23 Tom Tromey <tom@tromey.com>
7539 * complaints.c (struct complain) <file, line>: Remove.
7540 (find_complaint): Remove file, line parameters.
7541 (complaint_internal): Update.
7543 2018-05-23 Tom Tromey <tom@tromey.com>
7545 * complaints.c (vcomplaint): Remove.
7546 (complaint_internal) Merge in contents of vcomplaint.
7548 2018-05-23 Tom Tromey <tom@tromey.com>
7550 * complaints.c (struct complaints) <explanation>: Remove.
7551 (symfile_explanations): Remove.
7552 (symfile_complaint_book): Update.
7553 (vcomplaint): Update.
7554 (struct explanation): Remove.
7556 2018-05-23 Tom Tromey <tom@tromey.com>
7558 * complaints.c (symfile_complaints): Remove.
7559 (complaint_internal): Remove "complaints" parameter.
7560 (clear_complaints, vcomplaint): Remove "c" parameter.
7561 (get_complaints): Remove.
7562 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7563 (dwarf2_debug_line_missing_file_complaint)
7564 (dwarf2_debug_line_missing_end_sequence_complaint)
7565 (dwarf2_complex_location_expr_complaint)
7566 (dwarf2_const_value_length_mismatch_complaint)
7567 (dwarf2_section_buffer_overflow_complaint)
7568 (dwarf2_macro_malformed_definition_complaint)
7569 (dwarf2_invalid_attrib_class_complaint)
7570 (create_addrmap_from_index, dw2_symtab_iter_next)
7571 (dw2_expand_marked_cus)
7572 (dw2_debug_names_iterator::find_vec_in_debug_names)
7573 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7574 (create_debug_type_hash_table, init_cutu_and_read_dies)
7575 (partial_die_parent_scope, add_partial_enumeration)
7576 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7577 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7578 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7579 (create_cus_hash_table, create_dwp_hash_table)
7580 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7581 (dwarf2_rnglists_process, dwarf2_ranges_process)
7582 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7583 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7584 (handle_struct_member_die, process_structure_scope)
7585 (read_array_type, read_common_block, read_module_type)
7586 (read_tag_pointer_type, read_typedef, read_base_type)
7587 (read_subrange_type, load_partial_dies, partial_die_info::read)
7588 (partial_die_info::read, partial_die_info::read)
7589 (partial_die_info::read, read_checked_initial_length_and_offset)
7590 (dwarf2_string_attr, read_formatted_entries)
7591 (dwarf_decode_line_header)
7592 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7593 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7594 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7595 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7596 (get_signatured_type, get_DW_AT_signature_type)
7597 (decode_locdesc, file_file_name, consume_improper_spaces)
7598 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7599 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7600 (dwarf2_symbol_mark_computed, set_die_type)
7601 (read_attribute_value): Update.
7602 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7604 * dbxread.c (unknown_symtype_complaint)
7605 (lbrac_mismatch_complaint, repeated_header_complaint)
7606 (set_namestring, function_outside_compilation_unit_complaint)
7607 (read_dbx_symtab, process_one_symbol): Update.
7608 * gdbtypes.c (stub_noname_complaint): Update.
7609 * windows-nat.c (handle_unload_dll): Update.
7610 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7611 (decode_base_type): Update.
7612 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7613 (eb_complaint, record_include_begin, record_include_end)
7614 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7615 (process_xcoff_symbol, read_symbol)
7616 (function_outside_compilation_unit_complaint)
7617 (scan_xcoff_symtab): Update.
7618 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7619 * buildsym.c (finish_block_internal, make_blockvector)
7620 (end_symtab_get_static_block, augment_type_symtab): Update.
7621 * dtrace-probe.c (dtrace_process_dof)
7622 (dtrace_static_probe_ops::get_probes): Update.
7623 * complaints.h (struct complaint): Don't declare.
7624 (symfile_complaints): Remove.
7625 (complaint_internal): Remove "complaints" parameter.
7626 (complaint): Likewise.
7627 (clear_complaints): Likewise.
7628 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7629 (reread_symbols): Update.
7630 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7631 (dwarf2_frame_cache, decode_frame_entry): Update.
7632 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7633 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7634 (info_selectors_command): Update.
7635 * macrotab.c (macro_include, check_for_redefinition)
7636 (macro_undef): Update.
7637 * objfiles.c (filter_overlapping_sections): Update.
7638 * stabsread.c (invalid_cpp_abbrev_complaint)
7639 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7640 (define_symbol, error_type, read_type, rs6000_builtin_type)
7641 (stabs_method_name_from_physname, read_member_functions)
7642 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7643 (attach_fields_to_type, complain_about_struct_wipeout)
7644 (read_range_type, read_args, common_block_start)
7645 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7647 * mdebugread.c (index_complaint, unknown_ext_complaint)
7648 (basic_type_complaint, bad_tag_guess_complaint)
7649 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7650 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7651 (parse_procedure, parse_lines)
7652 (function_outside_compilation_unit_complaint)
7653 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7654 (bad_tag_guess_complaint, reg_value_complaint): Update.
7655 * cp-support.c (demangled_name_complaint): Update.
7656 * macroscope.c (sal_macro_scope): Update.
7657 * dwarf-index-write.c (class debug_names): Update.
7659 2018-05-23 Tom Tromey <tom@tromey.com>
7661 * complaints.c (clear_complaints): Remove "noisy" parameter.
7662 * complaints.h (clear_complaints): Update.
7663 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7664 (reread_symbols): Update.
7666 2018-05-23 Tom Tromey <tom@tromey.com>
7668 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7670 (vcomplaint, clear_complaints): Update.
7671 (symfile_explanations): Remove some messages.
7673 2018-05-23 Tom Tromey <tom@tromey.com>
7675 * complaints.c (internal_complaint): Remove.
7676 * complaints.h (internal_complaint): Remove.
7678 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7680 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7682 2018-05-22 Pedro Alves <palves@redhat.com>
7684 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7685 (remote_fileio_badfd, remote_fileio_return_errno)
7686 (remote_fileio_return_success, remote_fileio_func_open)
7687 (remote_fileio_func_open, remote_fileio_func_close)
7688 (remote_fileio_func_read, remote_fileio_func_write)
7689 (remote_fileio_func_lseek, remote_fileio_func_rename)
7690 (remote_fileio_func_unlink, remote_fileio_func_stat)
7691 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7692 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7693 remote_target parameter.
7694 (remote_fio_func_map) <func>: Add remote_target parameter.
7695 (do_remote_fileio_request, remote_fileio_request):
7696 * remote-fileio.h (remote_fileio_request):
7697 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7698 remote_target parameter.
7699 (remote_notif_process, handle_notification): Adjust to pass down
7701 (remote_notif_state_allocate): Add remote_target parameter. Save
7703 * remote-notif.h (struct remote_target): Forward declare.
7704 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7705 remote_target parameter.
7706 (struct remote_notif_state) <remote>: New field.
7707 (remote_notif_ack, remote_notif_parse): Add remote_target
7709 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7710 remote_target parameter.
7711 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7712 (threads_listing_context, rmt_thread_action, protocol_feature)
7713 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7714 (packet_result, struct threads_listing_context, remote_state):
7715 Move definitions and declarations higher up.
7716 (remote_target) <~remote_target>: Declare.
7717 (remote_download_command_source, remote_file_put, remote_file_get)
7718 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7719 (remote_hostio_pread_vFile, remote_hostio_send_command)
7720 (remote_hostio_set_filesystem, remote_hostio_open)
7721 (remote_hostio_close, remote_hostio_unlink, remote_state)
7722 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7723 (get_memory_write_packet_size, get_memory_read_packet_size)
7724 (append_pending_thread_resumptions, remote_detach_1)
7725 (append_resumption, remote_resume_with_vcont)
7726 (add_current_inferior_and_thread, wait_ns, wait_as)
7727 (process_stop_reply, remote_notice_new_inferior)
7728 (process_initial_stop_replies, remote_add_thread)
7729 (btrace_sync_conf, remote_btrace_maybe_reopen)
7730 (remove_new_fork_children, kill_new_fork_children)
7731 (discard_pending_stop_replies, stop_reply_queue_length)
7732 (check_pending_events_prevent_wildcard_vcont)
7733 (discard_pending_stop_replies_in_queue, stop_reply)
7734 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7735 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7736 (remote_interrupt_as, remote_interrupt_ns)
7737 (remote_get_noisy_reply, remote_query_attached)
7738 (remote_add_inferior, remote_current_thread, get_current_thread)
7739 (set_thread, set_general_thread, set_continue_thread)
7740 (set_general_process, write_ptid)
7741 (remote_unpack_thread_info_response, remote_get_threadinfo)
7742 (parse_threadlist_response, remote_get_threadlist)
7743 (remote_threadlist_iterator, remote_get_threads_with_ql)
7744 (remote_get_threads_with_qxfer)
7745 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7746 (get_offsets, remote_check_symbols, remote_supported_packet)
7747 (remote_query_supported, remote_packet_size)
7748 (remote_serial_quit_handler, remote_detach_pid)
7749 (remote_vcont_probe, remote_resume_with_hc)
7750 (send_interrupt_sequence, interrupt_query)
7751 (remote_notif_get_pending_events, fetch_register_using_p)
7752 (send_g_packet, process_g_packet, fetch_registers_using_g)
7753 (store_register_using_P, store_registers_using_G)
7754 (set_remote_traceframe, check_binary_download)
7755 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7756 (remote_xfer_live_readonly_partial, remote_read_bytes)
7757 (remote_send_printf, remote_flash_write, readchar)
7758 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7759 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7760 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7761 (extended_remote_disable_randomization, extended_remote_run)
7762 (send_environment_packet, extended_remote_environment_support)
7763 (extended_remote_set_inferior_cwd, remote_write_qxfer)
7764 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7765 (packet_command): Now methods of ...
7766 (remote_target): ... this class.
7767 (m_remote_state) <remote_target>: New field.
7768 (struct remote_state) <stop_reply_queue,
7769 remote_async_inferior_event_token, wait_forever_enabled_p>: New
7771 (remote_state::remote_state): Allocate stop_reply_queue.
7772 (remote_state): Delete global.
7773 (get_remote_state_raw): Delete.
7774 (remote_target::get_remote_state): Allocate m_remote_state on
7776 (get_current_remote_target): New.
7777 (remote_ops, extended_remote_ops): Delete.
7778 (wait_forever_enabled_p, remote_async_inferior_event_token):
7779 Delete, moved to struct remote_state.
7780 (remote_target::close): Delete self. Destruction bits split to
7782 (remote_target::~remote_target): ... this.
7783 (show_memory_packet_size): Adjust to use
7784 get_current_remote_target.
7785 (struct protocol_feature) <func>: Add remote_target parameter.
7786 All callers adjusted.
7787 (curr_quit_handler_target): New.
7788 (remote_serial_quit_handler): Reimplement.
7789 (remote_target::open_1): Adjust to use get_current_remote_target.
7790 Heap-allocate remote_target/extended_remote_target instances.
7791 (vcont_builder::vcont_builder): Add remote_target parameter, and
7792 save it in m_remote. All callers adjusted.
7793 (vcont_builder::m_remote): New field.
7794 (vcont_builder::restart, vcont_builder::flush)
7795 (vcont_builder::push_action): Use it.
7796 (remote_target::commit_resume): Use it.
7797 (struct queue_iter_param) <remote>: New field.
7798 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7799 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7800 (check_pending_event_prevents_wildcard_vcont_callback)
7801 (remote_target::check_pending_events_prevent_wildcard_vcont)
7802 (remote_target::discard_pending_stop_replies)
7803 (remote_target::discard_pending_stop_replies_in_queue)
7804 (remote_target::remote_notif_remove_queued_reply): Fill in
7806 (remote_notif_get_pending_events): New.
7807 (remote_target::readchar, remote_target::remote_serial_write):
7808 Save/restore curr_quit_handler_target.
7810 (kill_new_fork_children): Fill in 'remote' field.
7811 (packet_command): Use get_current_remote_target, defer to
7812 remote_target method of same name.
7813 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7814 parameter, and save it in m_remote. All callers adjusted.
7815 (scoped_remote_fd::release): Use m_remote.
7816 (scoped_remote_fd::m_remote): New field.
7817 (remote_file_put, remote_file_get, remote_file_delete): Use
7818 get_current_remote_target, defer to remote_target method of same
7820 (remote_btrace_reset): Add remote_state paremeter. Update all
7822 (remote_async_inferior_event_handler). Pass down 'data'.
7823 (remote_new_objfile): Use get_current_remote_target.
7824 (remote_target::vcont_r_supported): New.
7825 (set_range_stepping): Use get_current_remote_target and
7826 remote_target::vcont_r_supported.
7827 (_initialize_remote): Don't allocate 'remote_state' and
7828 'stop_reply_queue' globals.
7829 * remote.h (struct remote_target): Forward declare.
7830 (getpkt, putpkt, remote_notif_get_pending_events): Add
7831 'remote_target' parameter.
7833 2018-05-22 Pedro Alves <palves@redhat.com>
7835 * remote.c (vcont_builder): Now a class. Make all data members
7837 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7839 (vcont_builder_restart): Rename to ...
7840 (vcont_builder::restart): ... this.
7841 (vcont_builder_flush): Rename to ...
7842 (vcont_builder::flush): ... this.
7843 (vcont_builder_push_action): Rename to ...
7844 (vcont_builder::push_action): ... this.
7845 (remote_target::commit_resume): Adjust.
7847 2018-05-22 Pedro Alves <palves@redhat.com>
7849 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7850 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7851 (get_fixed_memory_packet_size): New.
7852 (get_memory_packet_size): Use it.
7853 (set_memory_packet_size): Don't override the config size with
7854 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7855 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7856 Don't refer to get_memory_packet_size if not connected to a remote
7857 target. Show "(default)" if configured size is 0.
7859 2018-05-22 Pedro Alves <palves@redhat.com>
7861 * remote.c (remote_target::mourn_inferior): Move
7862 discard_pending_stop_replies call here from ...
7863 (_initialize_remote): ... here.
7865 2018-05-22 Pedro Alves <palves@redhat.com>
7867 * remote.c (compare_section_command): Remove set_general_process
7870 2018-05-22 Pedro Alves <palves@redhat.com>
7872 * remote.c (struct packet_reg, struct remote_arch_state):
7873 Move higher up in the file.
7874 (remote_state) <m_arch_states>: Store remote_arch_state values
7875 instead of remote_arch_state pointers.
7876 (remote_state::get_remote_arch_state): Adjust.
7878 2018-05-22 Pedro Alves <palves@redhat.com>
7880 * remote.c: Include <unordered_map>.
7881 (remote_state): Now a class.
7882 (remote_state) <get_remote_arch_state>: Declare method.
7883 <get_remote_arch_state>: New field.
7884 (remote_arch_state) <remote_arch_state>: Declare ctor.
7885 <regs>: Now a unique_ptr.
7886 (remote_gdbarch_data_handle): Delete.
7887 (get_remote_arch_state): Delete.
7888 (remote_state::get_remote_arch_state): New.
7889 (get_remote_state): Adjust to call remote_state's
7890 get_remote_arch_state method.
7891 (init_remote_state): Delete, bits factored out to ...
7892 (remote_arch_state::remote_arch_state): ... this new method.
7893 (get_remote_packet_size, get_memory_packet_size)
7894 (process_g_packet, remote_target::fetch_registers)
7895 (remote_target::prepare_to_store, store_registers_using_G)
7896 (remote_target::store_registers, remote_target::get_trace_status):
7897 Adjust to call remote_state's method.
7898 (_initialize_remote): Remove reference to
7899 remote_gdbarch_data_handle.
7901 2018-05-22 Pedro Alves <palves@redhat.com>
7903 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7904 pread>: New method declarations.
7905 (remote_target::open_1): Adjust.
7906 (readahead_cache_invalidate): Rename to ...
7907 (readahead_cache::invalidate): ... this, and adjust to be a class
7909 (readahead_cache_invalidate_fd): Rename to ...
7910 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7912 (remote_hostio_pwrite): Adjust.
7913 (remote_hostio_pread_from_cache): Rename to ...
7914 (readahead_cache::pread): ... this, and adjust to be a class
7916 (remote_hostio_close): Adjust.
7918 2018-05-22 Pedro Alves <palves@redhat.com>
7920 * remote.c (remote_hostio_close_cleanup): Delete.
7921 (class scoped_remote_fd): New.
7922 (remote_file_put, remote_file_get): Use it.
7924 2018-05-22 Pedro Alves <palves@redhat.com>
7926 (struct vCont_action_support): Use bool and initialize all fields.
7927 (struct readahead_cache): Initialize all fields.
7928 (remote_state): Use bool and initialize all fields.
7929 (remote_state::remote_state, remote_state::~remote_state): New.
7930 (new_remote_state): Delete.
7931 (_initialize_remote): Use new to allocate remote_state.
7933 2018-05-22 Pedro Alves <palves@redhat.com>
7937 * c-exp.y: Include "c-support.h".
7938 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7939 of tolower. Use c_ident_is_alpha to scan names.
7940 * c-lang.c: Include "c-support.h".
7941 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7942 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7943 * c-support.h: New file, with bits factored out from ...
7944 * cp-name-parser.y: ... this file.
7945 Include "c-support.h".
7946 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7947 c-support.h and renamed.
7948 (symbol_end, yylex): Adjust.
7950 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7952 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7953 parameter type to CORE_ADDR.
7954 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7955 parameter type in declaration to CORE_ADDR.
7956 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7957 target_auxv_search to get AT_HWCAP and use the result to get the
7959 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7960 to CORE_ADDR. Remove the cast of the return value to unsigned
7961 long. Fix error predicate of target_auxv_search.
7962 (ppc_linux_nat_target::read_description): Change the type of the
7963 hwcap variable to CORE_ADDR.
7965 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7967 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7968 if the size of fpscr is larger than 32 bits.
7970 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7972 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7973 (ppc32_linux_vsxregmap): New global.
7974 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7975 regcache_supply_regset, and regcache_collect_regset.
7976 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7977 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7978 (fetch_vsx_register, store_vsx_register): Remove.
7979 (fetch_vsx_registers): Add regno parameter. Get regset using
7980 ppc_linux_vsxregset. Use regset to supply registers.
7981 (store_vsx_registers): Add regno parameter. Get regset using
7982 ppc_linux_vsxregset. Use regset to collect registers.
7983 (fetch_register): Call fetch_vsx_registers instead of
7985 (store_register): Call store_vsx_registers instead of
7987 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7988 new regno parameter.
7989 (store_ppc_registers): Call store_vsx_registers with -1 for the
7990 new regno parameter.
7991 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7992 (ppc_collect_vsxregset): Remove.
7994 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7996 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7998 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7999 for vector register offset fields.
8000 (ppc64_fbsd_reg_offsets): Likewise.
8001 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8002 to vector register offset fields.
8003 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8004 to vector register offset fields.
8005 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8006 vector register offset fields.
8007 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8008 initializers for vector register offset fields.
8009 (rs6000_aix64_reg_offsets): Likewise.
8010 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8011 (ppc_supply_vrregset): Remove.
8012 (ppc_collect_vrregset): Remove.
8013 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8014 (ppc_linux_vrregset) : New function.
8015 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8016 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8017 (ppc32_linux_vrregset): Remove.
8018 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8019 and use result instead of ppc32_linux_vrregset.
8020 (ppc32_linux_reg_offsets): Remove initializers for vector register
8022 (ppc64_linux_reg_offsets): Likewise.
8023 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8024 * ppc-linux-nat.c: Include regset.h.
8025 (gdb_vrregset_t): Adjust comment to account for little-endian
8027 (supply_vrregset, fill_vrregset): Remove.
8028 (fetch_altivec_register, store_altivec_register): Remove.
8029 (fetch_altivec_registers): Add regno parameter. Get regset using
8030 ppc_linux_vrregset. Use regset to supply registers.
8031 (store_altivec_registers): Add regno parameter. Get regset using
8032 ppc_linux_vrregset. Use regset to collect registers.
8033 (fetch_register): Call fetch_altivec_registers instead of
8034 fetch_altivec_register.
8035 (store_register): Call store_altivec_registers instead of
8036 store_altivec_register.
8037 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8038 the new regno parameter.
8039 (store_ppc_registers): Call store_altivec_registers with -1 for
8040 the new regno parameter.
8042 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8044 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8045 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8046 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8047 (gdb_vrregset_t): Change array type size to
8048 PPC_LINUX_SIZEOF_VRREGSET.
8049 (gdb_vsxregset_t): Change array type size to
8050 PPC_LINUX_SIZEOF_VSXREGSET.
8051 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8052 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8053 PPC_LINUX_SIZEOF_VSXREGSET.
8055 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8057 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8058 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8060 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8061 ppc_linux_target_wordsize with tid.
8062 (ppc_linux_nat_target::read_description): Call ppc_linux_target
8064 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8065 (ppc64_64bit_inferior_p): Add static and inline specifiers.
8066 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8067 tid parameter. Remove static specifier.
8068 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8069 (ppc_linux_target_wordsize): New declaration.
8071 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8073 * arch/ppc-linux-common.c: New file.
8074 * arch/ppc-linux-common.h: New file.
8075 * arch/ppc-linux-tdesc.h: New file.
8076 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8077 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8078 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8079 arch/ppc-linux-tdesc.h.
8080 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8081 arch/ppc-linux-tdesc.h.
8082 (ppc_linux_nat_target::read_description): Remove target
8083 description matching code. Fill a ppc_linux_features struct and
8084 call ppc_linux_match_description with it. Move comment about ISA
8085 2.05 to ppc-linux-common.c.
8086 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8087 arch/ppc-linux-tdesc.h.
8088 (ppc_linux_core_read_description): Remove target description
8089 matching code. Fill a ppc_linux_features struct and call
8090 ppc_linux_match_description with it.
8091 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8092 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8093 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8094 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8095 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8096 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8097 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8098 (tdesc_powerpc_e500l): Remove.
8100 2018-05-22 Joel Brobecker <brobecker@adacore.com>
8102 * ada-lang.c (catch_assert_command): Pass empty string instead
8103 of NULL for excep_string argument.
8105 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8107 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8108 the width of the requested register exceeds the width of the
8111 2018-05-21 Tom Tromey <tom@tromey.com>
8113 * printcmd.c (output_command): Remove.
8114 (output_command_const): Rename to output_command.
8115 * valprint.h (output_command): Rename from output_command_const.
8116 * tracepoint.c (trace_dump_actions): Call output_command.
8118 2018-05-21 Tom Tromey <tom@tromey.com>
8120 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8121 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8122 * ada-lang.h (create_ada_exception_catchpoint): Update.
8123 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8125 (create_excep_cond_exprs, ~ada_catchpoint)
8126 (should_stop_exception, print_one_exception)
8127 (print_mention_exception, print_recreate_exception): Update.
8128 (ada_get_next_arg): Remove.
8129 (catch_ada_exception_command_split): Use std::string. Change type
8130 of "excep_string", "cond_string".
8131 (catch_ada_exception_command): Update.
8132 (create_ada_exception_catchpoint): Change type of excep_string.
8133 (ada_exception_sal): Remove excep_string parameter.
8134 (~ada_catchpoint): Remove.
8136 2018-05-21 Tom Tromey <tom@tromey.com>
8138 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8141 2018-05-21 Tom Tromey <tom@tromey.com>
8143 * ada-lang.c (ada_exception_message_1, ada_exception_message):
8144 Return unique_xmalloc_ptr.
8145 (print_it_exception): Update.
8147 2018-05-21 Tom Tromey <tom@tromey.com>
8149 * tracepoint.c (trace_dump_actions): Use std::string.
8151 2018-05-21 Tom Tromey <tom@tromey.com>
8153 * symfile.c (reread_symbols): Use std::string for original_name.
8155 2018-05-21 Tom Tromey <tom@tromey.com>
8157 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8158 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
8161 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
8163 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8165 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8166 * objfiles.c (get_objfile_bfd_data): Allocate
8167 objfile_per_bfd_storage with obstack_new when allocating on
8170 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8172 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8174 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8175 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8176 * mdebugread.c (mdebug_build_psymtabs): Likewise.
8177 (add_pending): Likewise.
8178 (parse_symbol): Likewise.
8179 (parse_partial_symbols): Likewise.
8180 (psymtab_to_symtab_1): Likewise.
8181 (new_psymtab): Likewise.
8182 (elfmdebug_build_psymtabs): Likewise.
8183 * minsyms.c (terminate_minimal_symbol_table): Likewise.
8184 * objfiles.c (get_objfile_bfd_data): Likewise.
8185 (objfile_register_static_link): Likewise.
8186 * psymtab.c (allocate_psymtab): Likewise.
8187 * stabsread.c (read_member_functions): Likewise.
8188 * xcoffread.c (xcoff_end_psymtab): Likewise.
8190 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8192 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8193 compiler supports std::is_trivially_constructible.
8194 * common/poison.h: Include obstack.h.
8195 (IsMallocable): Define to is_trivially_constructible if the
8196 compiler supports it, define to true_type otherwise.
8200 (XOBNEWVEC): Redefine.
8201 * gdb_obstack.h (obstack_zalloc): New.
8202 (OBSTACK_ZALLOC): Redefine.
8203 (obstack_calloc): New.
8204 (OBSTACK_CALLOC): Redefine.
8206 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8207 (gdbarch_obstack): New declaration in gdbarch.h, definition in
8209 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8210 obstack_calloc/obstack_zalloc.
8211 (gdbarch_obstack_zalloc): Remove.
8212 * target-descriptions.c (tdesc_data_init): Use obstack_new.
8214 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8216 * stack.c (backtrace_command_1): Remove useless variable int i.
8218 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8220 * stack.c (print_frame_info): Fix comment.
8222 2018-05-18 Tom Tromey <tom@tromey.com>
8224 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8225 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8226 (~dwarf2_per_objfile): Update
8227 (dwarf2_get_dwz_file): Use new.
8228 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8231 2018-05-18 Tom Tromey <tom@tromey.com>
8233 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8235 * dwarf2read.c (struct dwp_file): Add constructor and
8237 (open_and_init_dwp_file): Return a unique_ptr.
8238 (dwarf2_per_objfile, create_dwp_hash_table)
8239 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8240 (lookup_dwo_unit_in_dwp): Update.
8241 (open_and_init_dwp_file, get_dwp_file): Update.
8243 2018-05-18 Tom Tromey <tom@tromey.com>
8245 * dwarf2read.c (dwarf2_per_objfile): Update.
8246 (struct mapped_index): Add initializers.
8247 (dwarf2_read_index): Use new.
8248 (dw2_symtab_iter_init): Update.
8249 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8252 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8254 * dwarf2read.c (mapped_index) <total_size>: Remove.
8256 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8258 * unittests/format_pieces-selftests.c (test_format_specifier):
8261 2018-05-18 Tom Tromey <tom@tromey.com>
8263 * c-typeprint.c (maybe_print_hole): New function.
8264 (c_print_type_struct_field_offset): Update.
8265 (c_type_print_base_struct_union): Call maybe_print_hole.
8267 2018-05-17 Keith Seitz <keiths@redhat.com>
8269 * breakpoint.c (build_bpstat_chain): New function, moved from
8271 (bpstat_stop_status): Add optional parameter, `stop_chain'.
8272 If no stop chain is passed, call build_bpstat_chain to build it.
8273 * breakpoint.h (build_bpstat_chain): Declare.
8274 (bpstat_stop_status): Move documentation here from breakpoint.c.
8275 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8276 build the stop chain and pass it to skip_inline_frames.
8277 Pass this stop chain to bpstat_stop_status.
8278 * inline-frame.c: Include breakpoint.h.
8279 (stopped_by_user_bp_inline_frame): New function.
8280 (skip_inline_frames): Add parameter `stop_chain'.
8281 Move documention to inline-frame.h.
8282 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8283 whether the frame should be elided.
8284 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8285 Add moved documentation and update for new parameter.
8287 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8290 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8291 unittests/format_pieces-selftests.c.
8292 * common/format.h (format_piece) <operator==>: New.
8293 (format_pieces) <operator[]>: Remove.
8294 * common/format.c (format_pieces::format_pieces): Handle \e.
8295 * unittests/format_pieces-selftests.c: New.
8297 2018-05-17 Tom Tromey <tom@tromey.com>
8300 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8301 (dw2_instantiate_symtab): Add skip_partial parameter.
8302 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8303 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8304 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8305 (dw2_expand_symtabs_matching_one)
8306 (dw2_find_pc_sect_compunit_symtab)
8307 (dw2_debug_names_lookup_symbol)
8308 (dw2_debug_names_expand_symtabs_for_function): Update.
8309 (init_cutu_and_read_dies): Add skip_partial parameter.
8310 (process_psymtab_comp_unit, build_type_psymtabs_1)
8311 (process_skeletonless_type_unit, load_partial_comp_unit)
8312 (psymtab_to_symtab_1): Update.
8313 (load_full_comp_unit): Add skip_partial parameter.
8314 (process_imported_unit_die, dwarf2_read_addr_index)
8315 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8316 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8317 (read_signatured_type): Update.
8319 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8321 * value.c (release_value): Remove unused variable.
8322 (record_latest_value): Likewise.
8323 (access_value_history): Likewise.
8324 (preserve_values): Likewise.
8326 2018-05-17 Tom Tromey <tom@tromey.com>
8328 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8331 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8334 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8335 Also handle registers whose width is not a multiple of
8337 (linux_nat_trad_target::store_register): Likewise.
8339 2018-05-16 Tom Tromey <tom@tromey.com>
8341 * gdbcore.h (core_bfd): Redefine.
8342 * corelow.c (core_target::close): Update.
8343 (core_target_open): Update.
8344 * progspace.h (struct program_space) <cbfd>: Now a
8347 2018-05-16 Tom Tromey <tom@tromey.com>
8350 * symfile-add-flags.h (enum symfile_add_flags)
8351 <SYMFILE_NOT_FILENAME>: New constant.
8352 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8353 objfile name from BFD.
8354 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8355 * minidebug.c (find_separate_debug_file_in_section): Put
8356 ".gnu_debugdata" into BFD's file name.
8358 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8360 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8363 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8366 * aarch64-tdep.c (aarch64_analyze_prologue,
8367 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8368 Indicate not interested in errors.
8370 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8372 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8373 Supply the MIPS_ZERO_REGNUM register.
8375 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8377 * mips-tdep.c (mask_address_var): Make variable static.
8379 2018-05-14 Tom Tromey <tom@tromey.com>
8381 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8383 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8385 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8386 FXSAVE_ADDR for the mxcsr register.
8388 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8390 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8392 2018-05-11 Pedro Alves <palves@redhat.com>
8394 * corelow.c (core_target) <core_target>: No longer inline.
8395 Initialize m_core_gdbarch, m_core_vec and build the section table
8397 <~core_target>: New.
8398 <core_gdbarch, get_core_register_section>: New methods.
8399 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8400 factored out from ...
8401 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8403 (sniff_core_bfd): Add gdbarch parameter.
8404 (core_close): Delete, merged into ...
8405 (core_target::close): ... here. Delete self.
8406 (core_close_cleanup): Delete.
8407 (core_target_open): Allocate a core_target on the heap. Use a
8408 unique_ptr instead of a cleanup. Bits moved into the core_target
8409 ctor. Adjust to use core_target methods instead of globals.
8410 (get_core_register_section): Rename to ...
8411 (core_target::get_core_register_section): ... this and adjust.
8412 (struct get_core_registers_cb_data): New.
8413 (get_core_registers_cb): Use it. Use bool.
8414 (core_target::fetch_registers, core_target::files_info)
8415 (core_target::xfer_partial, core_target::read_description)
8416 (core_target::pid_to, core_target::thread_name): Adjust to
8417 reference class fields instead of globals.
8418 * target.h (struct target_ops_deleter, target_ops_up): New.
8420 2018-05-11 Pedro Alves <palves@redhat.com>
8422 * corefile.c (core_file_command): Move to corelow.c.
8423 * corelow.c (the_core_target): Delete.
8424 (core_file_command): Moved from corefile.c. Check exec_bfd
8425 instead of the_core_target. Use target_detach instead of calling
8426 into the_core_target directly.
8427 (maybe_say_no_core_file_now): New.
8428 (core_target::detach): Use it.
8429 (_initialize_corelow): Remove references to the_core_target.
8430 * gdbcore.h (the_core_target): Delete.
8432 2018-05-11 Tom Tromey <tromey@redhat.com>
8433 Pedro Alves <palves@redhat.com>
8435 * corefile.c (core_bfd): Remove.
8436 * gdbcore.h (core_bfd): Now a macro.
8437 * progspace.h (struct program_space) <cbfd>: New field.
8439 2018-05-11 Tom Tromey <tom@tromey.com>
8441 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8444 2018-05-10 Tom Tromey <tom@tromey.com>
8446 * configure: Rebuild.
8447 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8449 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8452 * regformats/regdat.sh: Adjust script, following the addition
8453 of the new expedite_regs parameter to init_target_desc.
8455 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8458 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8459 set_gdbarch_significant_addr_bit.
8460 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8461 set_gdbarch_significant_addr_bit.
8462 * utils.c (address_significant): Update to sign extend addr.
8464 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8466 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8467 (xtensa_linux_init_abi): Limit tdep->num_regs by
8468 tdep->num_nopriv_regs.
8469 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8470 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8473 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8475 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8477 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8479 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8480 (I387_MXCSR_INIT_VAL): New constant.
8481 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8482 buffer if it was supplied by the inferior.
8483 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8484 (i387_xsave_get_clear_bv): New function.
8485 (i387_supply_xsave): Only read x87 control registers from the
8486 xsave buffer if the feature is enabled, and the state will have
8487 been written, otherwise, provide a suitable default.
8488 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8489 including x87 control registers. Update control registers if they
8490 have changed from the default value, and mark features as enabled
8492 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8494 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8496 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8498 2018-05-07 Tom Tromey <tom@tromey.com>
8500 * configure: Rebuild.
8501 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8503 2018-05-07 Tom Tromey <tom@tromey.com>
8506 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8507 bit. Use correct value for VDIV.
8509 2018-05-04 Tom Tromey <tom@tromey.com>
8511 * configure: Rebuild.
8512 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8514 2018-05-04 Tom Tromey <tom@tromey.com>
8516 * linux-record.c (record_linux_system_call) <case
8517 RECORD_SYS_RECVFROM>: Add "break".
8519 2018-05-04 Tom Tromey <tom@tromey.com>
8521 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8522 Add missing "break".
8523 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8524 Add missing "break".
8526 2018-05-04 Tom Tromey <tom@tromey.com>
8528 * rs6000-tdep.c (ppc_process_record_op4)
8529 (ppc_process_record_op63): Add fall-through comment.
8531 2018-05-04 Tom Tromey <tom@tromey.com>
8533 * i386-tdep.c (i386_process_record): Add fall-through comment.
8535 2018-05-04 Tom Tromey <tom@tromey.com>
8537 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8540 2018-05-04 Tom Tromey <tom@tromey.com>
8542 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8543 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8544 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8546 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8548 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8551 2018-05-04 Tom Tromey <tom@tromey.com>
8553 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8555 2018-05-04 Tom Tromey <tom@tromey.com>
8557 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8558 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8559 * symfile.c (section_is_mapped): Fix fall-through comment.
8560 * stabsread.c (define_symbol, read_member_functions): Fix
8561 fall-through comment.
8562 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8564 * remote.c (remote_wait_as): Fix fall-through comment.
8565 * p-exp.y (yylex): Fix fall-through comment.
8566 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8568 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8569 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8570 * jv-exp.y (yylex): Fix fall-through comment.
8571 * go-exp.y (lex_one_token): Fix fall-through comment.
8572 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8573 fall-through comment.
8574 * f-exp.y (yylex): Fix fall-through comment.
8575 * dwarf2read.c (process_die): Fix fall-through comments.
8576 * dbxread.c (process_one_symbol): Fix fall-through comment.
8577 * d-exp.y (lex_one_token): Fix fall-through comment.
8578 * cp-name-parser.y (yylex): Fix fall-through comment.
8579 * coffread.c (coff_symtab_read): Fix fall-through comment.
8580 * c-exp.y (lex_one_token): Fix fall-through comment.
8581 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8583 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8586 2018-05-04 Tom Tromey <tom@tromey.com>
8589 * NEWS: Mention gdb.execute change.
8590 * gdbcmd.h (execute_control_command): Don't declare.
8591 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8592 execute_control_commands, execute_control_commands_to_string.
8593 * cli/cli-script.h (execute_control_commands)
8594 (execute_control_commands_to_string): Declare.
8595 (execute_control_command): Add from_tty parameter.
8596 * cli/cli-script.c (execute_control_commands)
8597 (execute_control_commands_to_string): New functions.
8598 (execute_user_command): Use execute_control_commands.
8599 (execute_control_command_1): Add "from_tty" parameter. Update.
8600 (execute_control_command): Likewise.
8602 2018-05-04 Tom Tromey <tom@tromey.com>
8605 * NEWS: Mention that breakpoint commands are writable.
8606 * python/py-breakpoint.c (bppy_set_commands): New function.
8607 (breakpoint_object_getset) <"commands">: Use it.
8609 2018-05-04 Tom Tromey <tom@tromey.com>
8611 * tracepoint.c (actions_command): Update.
8612 * mi/mi-cmd-break.c (mi_command_line_array)
8613 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8614 (mi_read_next_line): Remove.
8615 (mi_cmd_break_commands): Update.
8616 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8618 * cli/cli-script.c (get_command_line): Update.
8619 (process_next_line): Use function_view. Constify.
8620 (recurse_read_control_structure, read_command_lines)
8621 (read_command_lines_1): Change argument types to function_view.
8622 (do_define_command, document_command): Update.
8623 * breakpoint.h (check_tracepoint_command): Don't declare.
8624 * breakpoint.c (check_tracepoint_command): Remove.
8625 (commands_command_1, create_tracepoint_from_upload): Update.
8627 2018-05-04 Tom Tromey <tom@tromey.com>
8630 * cli/cli-script.h (enum command_control_type) <define_control>:
8632 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8633 (build_command_line, execute_control_command_1)
8634 (process_next_line): Likewise.
8635 (do_define_command): New function, extracted from define_command.
8636 (define_command): Use it.
8638 2018-05-04 Tom Tromey <tom@tromey.com>
8640 * tracepoint.c (actions_command): Update.
8641 * cli/cli-script.h (read_command_lines): Update.
8642 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8643 (MAX_TMPBUF): Remove define.
8644 (define_command): Use string_printf.
8645 (document_command): Likewise.
8646 * breakpoint.c (commands_command_1): Update.
8648 2018-05-04 Tom Tromey <tom@tromey.com>
8650 * top.c (execute_command): Update.
8651 * cli/cli-script.h (print_command_lines): Now varargs.
8652 * cli/cli-script.c (print_command_lines): Now varargs.
8653 (execute_control_command_1) <case while_control, case if_control>:
8656 2018-05-04 Tom Tromey <tom@tromey.com>
8658 * tracepoint.c (all_tracepoint_actions): Rename from
8659 all_tracepoint_actions_and_cleanup. Change return type.
8660 (actions_command, encode_actions_1, encode_actions)
8661 (trace_dump_actions, tdump_command): Update.
8662 * remote.c (remote_download_command_source): Update.
8663 * python/python.c (gdbpy_eval_from_control_command)
8664 (python_command, python_interactive_command): Update.
8665 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8666 * guile/guile.c (guile_command)
8667 (gdbscm_eval_from_control_command, guile_command): Update.
8668 * compile/compile.c (compile_code_command)
8669 (compile_print_command, compile_to_object): Update.
8670 * cli/cli-script.h (struct command_lines_deleter): New.
8671 (counted_command_line): New typedef.
8672 (struct command_line): Add constructor, destructor.
8673 <body_list>: Remove.
8674 <body_list_0, body_list_1>: New members.
8675 (command_line_up): Remove typedef.
8676 (read_command_lines, read_command_lines_1, get_command_line):
8678 (copy_command_lines): Don't declare.
8679 * cli/cli-script.c (build_command_line): Use "new".
8680 (get_command_line): Return counted_command_line.
8681 (print_command_lines, execute_user_command)
8682 (execute_control_command_1, while_command, if_command): Update.
8683 (realloc_body_list): Remove.
8684 (process_next_line, recurse_read_control_structure): Update.
8685 (read_command_lines, read_command_lines_1): Return counted_command_line.
8686 (free_command_lines): Use "delete".
8687 (copy_command_lines): Remove.
8688 (define_command, document_command, show_user_1): Update.
8689 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8690 a counted_command_line.
8691 * breakpoint.h (counted_command_line): Remove typedef.
8692 (breakpoint_set_commands): Update.
8693 * breakpoint.c (check_no_tracepoint_commands)
8694 (validate_commands_for_breakpoint): Update.
8695 (breakpoint_set_commands): Change commands to be a
8696 counted_command_line.
8697 (commands_command_1, update_dprintf_command_list)
8698 (create_tracepoint_from_upload): Update.
8700 2018-05-04 Tom Tromey <tom@tromey.com>
8702 * cli/cli-decode.h (cmd_list_element): New constructor.
8703 (~cmd_list_element): New destructor.
8704 (struct cmd_list_element): Add initializers.
8705 * cli/cli-decode.c (do_add_cmd): Use "new".
8706 (delete_cmd): Use "delete".
8708 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8709 Pedro Alves <palves@redhat.com>
8711 PR breakpoints/19806 and support for PR external/20207.
8712 * NEWS: Mention Aarch64 watchpoint improvements.
8713 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8714 watchpoints and PR external/20207 watchpoints.
8715 * nat/aarch64-linux-hw-point.c
8716 (kernel_supports_any_contiguous_range): New.
8717 (aarch64_watchpoint_offset): New.
8718 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8719 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8720 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8721 (aarch64_align_watchpoint): New parameters aligned_offset_p and
8722 next_addr_orig_p. Support PR external/20207 watchpoints.
8723 (aarch64_downgrade_regs): New.
8724 (aarch64_dr_state_insert_one_point): New parameters offset and
8726 (aarch64_dr_state_remove_one_point): Likewise.
8727 (aarch64_handle_breakpoint): Update caller.
8728 (aarch64_handle_aligned_watchpoint): Likewise.
8729 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8731 (aarch64_linux_set_debug_regs): Remove const from state. Call
8732 aarch64_downgrade_regs.
8733 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8734 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8735 (DR_CONTROL_MASK): ... this.
8736 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8737 (unsigned int aarch64_watchpoint_offset): New prototype.
8738 (aarch64_linux_set_debug_regs): Remove const from state.
8739 * utils.c (align_up, align_down): Move to ...
8740 * common/common-utils.c (align_up, align_down): ... here.
8741 * utils.h (align_up, align_down): Move to ...
8742 * common/common-utils.h (align_up, align_down): ... here.
8744 2018-05-04 Joel Brobecker <brobecker@adacore.com>
8746 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8747 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8748 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8749 Re-implement to match the ABI as summarized in GCC's
8750 gcc/config/sparc/sparc.c. All callers updated.
8751 (sparc32_store_arguments): Remove assertion.
8753 2018-05-04 Tom Tromey <tom@tromey.com>
8755 * printcmd.c: Don't include tui.h.
8756 (decode_format): Use skip_spaces.
8758 2018-05-04 Tom Tromey <tom@tromey.com>
8761 * printcmd.c (last_count): New global.
8762 (x_command): Use saved count when repeating.
8764 2018-05-04 Tom Tromey <tom@tromey.com>
8766 * nto-procfs.c (do_closedir_cleanup): Remove.
8767 (procfs_pidlist): Use gdb_dir_up.
8768 * procfs.c (do_closedir_cleanup): Remove.
8769 (proc_update_threads): Use gdb_dir_up.
8770 * common/filestuff.h (struct gdb_dir_deleter): New.
8771 (gdb_dir_up): New typedef.
8773 2018-05-04 Tom Tromey <tom@tromey.com>
8775 * ada-lang.c (print_mention_exception): Use std::string.
8777 2018-05-04 Tom Tromey <tom@tromey.com>
8779 * ada-lang.c (create_excep_cond_exprs): Update.
8780 (ada_exception_catchpoint_cond_string): Use std::string.
8782 2018-05-04 Tom Tromey <tom@tromey.com>
8784 * ada-lang.c (xget_renaming_scope): Return std::string.
8785 (old_renaming_is_invisible): Update.
8787 2018-05-04 Tom Tromey <tom@tromey.com>
8789 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8790 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8792 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
8794 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8796 2018-05-04 Tom Tromey <tom@tromey.com>
8798 * remote.c (remote_query_supported_append): Change type.
8799 (remote_check_symbols): Update.
8801 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8804 * configure.ac: Prepend libpython.
8805 * python/python-config.py: Likewise.
8806 * configure: Regenerate.
8808 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8810 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8812 2018-05-03 Pedro Alves <palves@redhat.com>
8815 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8816 override. Write 'true' instead of '1'.
8817 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8820 2018-05-02 Pedro Alves <palves@redhat.com>
8822 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8823 add_inf_child_target.
8824 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8825 add_inf_child_target.
8826 * aix-thread.c (aix_thread_target_info): New.
8827 (aix_thread_target) <shortname, longname, doc>: Delete.
8829 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8830 add_inf_child_target.
8831 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8832 add_inf_child_target.
8833 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8834 add_inf_child_target.
8835 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8836 add_inf_child_target.
8837 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8838 add_inf_child_target.
8839 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8840 add_inf_child_target.
8841 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8842 add_inf_child_target.
8843 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8844 add_inf_child_target.
8845 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8846 add_inf_child_target.
8847 * bfd-target.c (target_bfd_target_info): New.
8848 (target_bfd) <shortname, longname, doc>: Delete.
8850 * bsd-kvm.c (bsd_kvm_target_info): New.
8851 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8853 (bsd_kvm_target::open): Rename to ...
8854 (bsd_kvm_target_open): ... this. Adjust.
8855 * bsd-uthread.c (bsd_uthread_target_info): New.
8856 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8858 * corefile.c (core_file_command): Adjust.
8859 * corelow.c (core_target_info): New.
8860 (core_target) <shortname, longname, doc>: Delete.
8862 (core_target::open): Rename to ...
8863 (core_target_open): ... this. Adjust.
8864 * ctf.c (ctf_target_info): New.
8865 (ctf_target) <shortname, longname, doc>: Delete.
8867 (ctf_target::open): Rename to ...
8868 (ctf_target_open): ... this.
8869 (_initialize_ctf): Adjust.
8870 * exec.c (exec_target_info): New.
8871 (exec_target) <shortname, longname, doc>: Delete.
8873 (exec_target::open): Rename to ...
8874 (exec_target_open): ... this.
8875 * gdbcore.h (core_target_open): Declare.
8876 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8877 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8878 add_inf_child_target.
8879 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8880 add_inf_child_target.
8881 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8882 add_inf_child_target.
8883 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8884 add_inf_child_target.
8885 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8886 add_inf_child_target.
8887 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8888 add_inf_child_target.
8889 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8890 add_inf_child_target.
8891 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8892 add_inf_child_target.
8893 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8894 add_inf_child_target.
8895 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8896 add_inf_child_target.
8897 * inf-child.c (inf_child_target_info): New.
8898 (inf_child_target::info): New.
8899 (inf_child_open_target): Remove 'target' parameter. Use
8900 get_native_target instead.
8901 (inf_child_target::open): Delete.
8902 (add_inf_child_target): New.
8903 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8906 (add_inf_child_target): Declare.
8907 (inf_child_open_target): Declare.
8908 * linux-thread-db.c (thread_db_target_info): New.
8909 (thread_db_target) <shortname, longname, doc>: Delete.
8911 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8912 add_inf_child_target.
8913 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8914 add_inf_child_target.
8915 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8916 add_inf_child_target.
8917 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8918 add_inf_child_target.
8919 * make-target-delegates (print_class): Adjust.
8920 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8921 add_inf_child_target.
8922 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8923 add_inf_child_target.
8924 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8925 add_inf_child_target.
8926 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8927 add_inf_child_target.
8928 * nto-procfs.c (nto_native_target_info): New.
8929 (nto_procfs_target_native) <shortname, longname, doc>:
8932 (nto_procfs_target_info): New.
8933 (nto_procfs_target_procfs) <shortname, longname, doc>:
8936 (init_procfs_targets): Adjust.
8937 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8938 add_inf_child_target.
8939 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8940 add_inf_child_target.
8941 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8942 add_inf_child_target.
8943 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8944 add_inf_child_target.
8945 * ravenscar-thread.c (ravenscar_target_info): New.
8946 (ravenscar_thread_target) <shortname, longname, doc>:
8949 * record-btrace.c (record_btrace_target_info):
8950 (record_btrace_target) <shortname, longname, doc>: Delete.
8952 (record_btrace_target::open): Rename to ...
8953 (record_btrace_target_open): ... this. Adjust.
8954 * record-full.c (record_longname, record_doc): New.
8955 (record_full_base_target) <shortname, longname, doc>: Delete.
8957 (record_full_target_info): New.
8958 (record_full_target): <shortname>: Delete.
8960 (record_full_core_open_1, record_full_open_1): Update comments.
8961 (record_full_base_target::open): Rename to ...
8962 (record_full_open): ... this.
8963 (cmd_record_full_restore): Update.
8964 (_initialize_record_full): Update.
8965 * remote-sim.c (remote_sim_target_info): New.
8966 (gdbsim_target) <shortname, longname, doc>: Delete.
8968 (gdbsim_target::open): Rename to ...
8969 (gdbsim_target_open): ... this.
8970 (_initialize_remote_sim): Adjust.
8971 * remote.c (remote_doc): New.
8972 (remote_target_info): New.
8973 (remote_target) <shortname, longname, doc>: Delete.
8975 (extended_remote_target_info): New.
8976 (extended_remote_target) <shortname, longname, doc>: Delete.
8978 (remote_target::open_1): Make static. Adjust.
8979 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8980 * s390-linux-nat.c (_initialize_s390_nat): Use
8981 add_inf_child_target.
8982 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8983 add_inf_child_target.
8984 * sol-thread.c (thread_db_target_info): New.
8985 (sol_thread_target) <shortname, longname, doc>: Delete.
8987 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8988 add_inf_child_target.
8989 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8990 add_inf_child_target.
8991 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8992 add_inf_child_target.
8993 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8994 add_inf_child_target.
8995 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8996 add_inf_child_target.
8997 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8998 add_inf_child_target.
8999 * spu-linux-nat.c (_initialize_spu_nat): Use
9000 add_inf_child_target.
9001 * spu-multiarch.c (spu_multiarch_target_info): New.
9002 (spu_multiarch_target) <shortname, longname, doc>: Delete.
9004 * target-delegates.c: Regenerate.
9005 * target.c: Include <unordered_map>.
9006 (target_ops_p): Delete.
9007 (DEF_VEC_P(target_ops_p)): Delete.
9008 (target_factories): New.
9009 (test_target_info): New.
9010 (test_target_ops::info): New.
9011 (open_target): Adjust to use target_factories.
9012 (add_target_with_completer): Rename to ...
9013 (add_target): ... this. Change prototype. Register target_info
9014 and open callback in target_factories. Register target_info in
9015 command context instead of target_ops.
9016 (add_target): Delete old implementation.
9017 (add_deprecated_target_alias): Change prototype. Adjust.
9018 (the_native_target): New.
9019 (set_native_target, get_native_target): New.
9020 (find_default_run_target): Use the_native_target.
9021 (find_attach_target, find_run_target): Simplify.
9022 (target_ops::open): Delete.
9023 (dummy_target_info): New.
9024 (dummy_target::shortname, dummy_target::longname)
9025 (dummy_target::doc): Delete.
9026 (dummy_target::info): New.
9027 (debug_target::shortname, debug_target::longname)
9028 (debug_target::doc): Delete.
9029 (debug_target::info): New.
9030 * target.h (struct target_info): New.
9031 (target_ops::~target_ops): Add comment.
9032 (target_ops::info): New.
9033 (target_ops::shortname, target_ops::longname, target_ops::doc): No
9034 longer virtual. Implement in terms of target_info.
9035 (set_native_target, get_native_target): Declare.
9036 (target_open_ftype): New.
9037 (add_target, add_target_with_completer)
9038 (add_deprecated_target_alias): Change prototype.
9039 (test_target) <shortname, longname, doc>: Delete.
9041 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9042 add_inf_child_target.
9043 * tracefile-tfile.c (tfile_target_info): New.
9044 (tfile_target) <shortname, longname, doc>: Delete.
9046 (tfile_target::open): Rename to ...
9047 (tfile_target_open): ... this.
9048 (_initialize_tracefile_tfile): Adjust.
9049 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9050 add_inf_child_target.
9051 * windows-nat.c (_initialize_windows_nat): Use
9052 add_inf_child_target.
9053 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9054 add_inf_child_target.
9056 2018-05-02 Pedro Alves <palves@redhat.com>
9058 * linux-nat.h (linux_nat_target) <low_new_thread,
9059 low_delete_thread, low_new_fork, low_forget_process,
9060 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9061 New virtual methods.
9062 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9063 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9064 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9065 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9066 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9068 * linux-fork.c (delete_fork): Adjust to call low method.
9069 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9070 (linux_nat_new_fork, linux_nat_forget_process_hook)
9071 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9072 (linux_nat_status_is_event):
9073 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9074 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9076 (sigtrap_is_event): Rename to ...
9077 (linux_nat_target::low_status_is_event): ... this.
9078 (linux_nat_set_status_is_event): Delete.
9079 (save_stop_reason, linux_nat_wait_1)
9080 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9082 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9083 (linux_nat_set_new_fork, linux_nat_set_forget_process)
9084 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9085 (linux_nat_set_prepare_to_resume): Delete.
9086 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9087 low virtual methods.
9088 * amd64-linux-nat.c: Likewise.
9089 * arm-linux-nat.c: Likewise.
9090 * i386-linux-nat.c: Likewise.
9091 * ia64-linux-nat.c: Likewise.
9092 * mips-linux-nat.c: Likewise.
9093 * ppc-linux-nat.c: Likewise.
9094 * s390-linux-nat.c: Likewise.
9095 * sparc64-linux-nat.c: Likewise.
9096 * x86-linux-nat.c: Likewise.
9097 * x86-linux-nat.h: Include "nat/x86-linux.h".
9098 (x86_linux_nat_target) <low_new_fork, low_forget_process,
9099 low_prepare_to_resume, low_new_thread, low_delete_thread>:
9102 2018-05-02 Pedro Alves <palves@redhat.com>
9104 * target.h (target_ops)
9105 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9106 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9107 stopped_by_watchpoint, have_continuable_watchpoint,
9108 stopped_data_address, watchpoint_addr_within_range,
9109 can_accel_watchpoint_condition, can_run, thread_alive,
9110 has_all_memory, has_memory, has_stack, has_registers,
9111 has_execution, can_async_p, is_async_p, supports_non_stop,
9112 always_non_stop_p, can_execute_reverse, supports_multi_process,
9113 supports_enable_disable_tracepoint,
9114 supports_disable_randomization, supports_string_tracing,
9115 supports_evaluation_of_breakpoint_conditions,
9116 can_run_breakpoint_commands, filesystem_is_local,
9117 can_download_tracepoint, get_trace_state_variable_value,
9118 set_trace_notes, get_tib_address, use_agent, can_use_agent,
9119 record_is_replaying, record_will_replay,
9120 augmented_libraries_svr4_read>: Adjust to return bool.
9121 * aarch64-linux-nat.c: All implementations adjusted.
9122 * aix-thread.c: All implementations adjusted.
9123 * arm-linux-nat.c: All implementations adjusted.
9124 * breakpoint.c: All implementations adjusted.
9125 * bsd-kvm.c: All implementations adjusted.
9126 * bsd-uthread.c: All implementations adjusted.
9127 * corelow.c: All implementations adjusted.
9128 * ctf.c: All implementations adjusted.
9129 * darwin-nat.c: All implementations adjusted.
9130 * darwin-nat.h: All implementations adjusted.
9131 * exec.c: All implementations adjusted.
9132 * fbsd-nat.c: All implementations adjusted.
9133 * fbsd-nat.h: All implementations adjusted.
9134 * gnu-nat.c: All implementations adjusted.
9135 * gnu-nat.h: All implementations adjusted.
9136 * go32-nat.c: All implementations adjusted.
9137 * ia64-linux-nat.c: All implementations adjusted.
9138 * inf-child.c: All implementations adjusted.
9139 * inf-child.h: All implementations adjusted.
9140 * inf-ptrace.c: All implementations adjusted.
9141 * inf-ptrace.h: All implementations adjusted.
9142 * linux-nat.c: All implementations adjusted.
9143 * linux-nat.h: All implementations adjusted.
9144 * mips-linux-nat.c: All implementations adjusted.
9145 * nto-procfs.c: All implementations adjusted.
9146 * ppc-linux-nat.c: All implementations adjusted.
9147 * procfs.c: All implementations adjusted.
9148 * ravenscar-thread.c: All implementations adjusted.
9149 * record-btrace.c: All implementations adjusted.
9150 * record-full.c: All implementations adjusted.
9151 * remote-sim.c: All implementations adjusted.
9152 * remote.c: All implementations adjusted.
9153 * s390-linux-nat.c: All implementations adjusted.
9154 * sol-thread.c: All implementations adjusted.
9155 * spu-multiarch.c: All implementations adjusted.
9156 * target-delegates.c: All implementations adjusted.
9157 * target.c: All implementations adjusted.
9158 * target.h: All implementations adjusted.
9159 * tracefile-tfile.c: All implementations adjusted.
9160 * tracefile.c: All implementations adjusted.
9161 * tracefile.h: All implementations adjusted.
9162 * windows-nat.c: All implementations adjusted.
9163 * x86-linux-nat.h: All implementations adjusted.
9164 * x86-nat.h: All implementations adjusted.
9166 2018-05-02 Pedro Alves <palves@redhat.com>
9168 * make-target-delegates (scan_target_h): Don't trim lines here.
9169 Replace sequences of tabs and/or whitespace with a single
9171 (top level, parsing methods): Trim each line before processing it
9174 2018-05-02 Pedro Alves <palves@redhat.com>
9175 John Baldwin <jhb@freebsd.org>
9177 * target.h (enum strata) <debug_stratum>: New.
9178 (struct target_ops) <all delegation methods>: Replace by C++
9179 virtual methods, and drop "to_" prefix. All references updated
9181 <to_shortname, to_longname, to_doc, to_data,
9182 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9183 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9184 virtual methods. All references updated throughout.
9185 <can_attach, supports_terminal_ours, can_create_inferior,
9186 get_thread_control_capabilities, attach_no_wait>: New
9188 <insert_breakpoint, remove_breakpoint>: Now
9189 TARGET_DEFAULT_NORETURN methods.
9190 <info_proc>: Now returns bool.
9192 (OPS_MAGIC): Delete.
9193 (current_target): Delete. All references replaced by references
9195 (target_stack): ... this. New.
9196 (target_shortname, target_longname): Adjust.
9197 (target_can_run): Now a function declaration.
9198 (default_child_has_all_memory, default_child_has_memory)
9199 (default_child_has_stack, default_child_has_registers)
9200 (default_child_has_execution): Remove target_ops parameter.
9201 (complete_target_initialization): Delete.
9202 (memory_breakpoint_target): New template class.
9203 (test_target_ops): Refactor as a C++ class with virtual methods.
9204 * make-target-delegates (NAME_PART): Tighten.
9205 (POINTER_PART, CP_SYMBOL): New.
9206 (SIMPLE_RETURN_PART): Reimplement.
9207 (VEC_RETURN_PART): Expect less.
9208 (RETURN_PART, VIRTUAL_PART): New.
9209 (METHOD): Adjust to C++ virtual methods.
9210 (scan_target_h): Remove reference to C99.
9211 (dname): Output "target_ops::" prefix.
9212 (write_function_header): Adjust to output a C++ class method.
9213 (write_declaration): New.
9214 (write_delegator): Adjust to output a C++ class method.
9215 (tdname): Output "dummy_target::" prefix.
9216 (write_tdefault, write_debugmethod): Adjust to output a C++ class
9218 (tdefault_names, debug_names): Delete.
9219 (return_types, tdefaults, styles, argtypes_array): New.
9220 (top level): All methods are delegators.
9222 (top level): Print dummy_target and debug_target classes.
9223 * target-delegates.c: Regenerate.
9224 * target-debug.h (target_debug_print_enum_info_proc_what)
9225 (target_debug_print_thread_control_capabilities)
9226 (target_debug_print_thread_info_p): New.
9227 * target.c (dummy_target): Delete.
9228 (the_dummy_target, the_debug_target): New.
9229 (target_stack): Now extern.
9230 (set_targetdebug): Push/unpush debug target.
9231 (default_child_has_all_memory, default_child_has_memory)
9232 (default_child_has_stack, default_child_has_registers)
9233 (default_child_has_execution): Remove target_ops parameter.
9234 (complete_target_initialization): Delete.
9235 (add_target_with_completer): No longer call
9236 complete_target_initialization.
9237 (target_supports_terminal_ours): Use regular delegation.
9238 (update_current_target): Delete.
9239 (push_target): No longer check magic number. Don't call
9240 update_current_target.
9241 (unpush_target): Don't call update_current_target.
9242 (target_is_pushed): No longer check magic number.
9243 (target_require_runnable): Skip for all stratums over
9245 (target_ops::info_proc): New.
9246 (target_info_proc): Use find_target_at and
9247 find_default_run_target.
9248 (target_supports_disable_randomization): Use regular delegation.
9249 (target_get_osdata): Use find_target_at.
9250 (target_ops::open, target_ops::close, target_ops::can_attach)
9251 (target_ops::attach, target_ops::can_create_inferior)
9252 (target_ops::create_inferior, target_ops::can_run)
9253 (target_can_run): New.
9254 (default_fileio_target): Use regular delegation.
9255 (target_ops::fileio_open, target_ops::fileio_pwrite)
9256 (target_ops::fileio_pread, target_ops::fileio_fstat)
9257 (target_ops::fileio_close, target_ops::fileio_unlink)
9258 (target_ops::fileio_readlink): New.
9259 (target_fileio_open_1, target_fileio_unlink)
9260 (target_fileio_readlink): Always call the target method. Handle
9262 (return_zero, return_zero_has_execution): Delete.
9263 (init_dummy_target): Delete.
9264 (dummy_target::dummy_target, dummy_target::shortname)
9265 (dummy_target::longname, dummy_target::doc)
9266 (debug_target::debug_target, debug_target::shortname)
9267 (debug_target::longname, debug_target::doc): New.
9268 (target_supports_delete_record): Use regular delegation.
9269 (setup_target_debug): Delete.
9270 (maintenance_print_target_stack): Skip debug_stratum.
9271 (initialize_targets): Instantiate the_dummy_target and
9273 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9275 (target_auxv_search, fprint_target_auxv): Adjust.
9276 (info_auxv_command): Adjust to use target_stack.
9277 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9278 * exceptions.c (print_flush): Handle a NULL target_stack.
9279 * regcache.c (target_ops_no_register): Refactor as class with
9282 * exec.c (exec_target): New class.
9283 (exec_ops): Now an exec_target.
9284 (exec_open, exec_close_1, exec_get_section_table)
9285 (exec_xfer_partial, exec_files_info, exec_has_memory)
9286 (exec_make_note_section): Refactor as exec_target methods.
9287 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9289 (exec_target::find_memory_regions): New.
9290 (_initialize_exec): Don't call init_exec_ops.
9291 * gdbcore.h (exec_file_clear): Delete.
9293 * corefile.c (core_target): Delete.
9294 (core_file_command): Adjust.
9295 * corelow.c (core_target): New class.
9296 (the_core_target): New.
9297 (core_close): Remove target_ops parameter.
9298 (core_close_cleanup): Adjust.
9299 (core_target::close): New.
9300 (core_open, core_detach, get_core_registers, core_files_info)
9301 (core_xfer_partial, core_thread_alive, core_read_description)
9302 (core_pid_to_str, core_thread_name, core_has_memory)
9303 (core_has_stack, core_has_registers, core_info_proc): Rework as
9304 core_target methods.
9305 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9306 (_initialize_corelow): Initialize the_core_target.
9307 * gdbcore.h (core_target): Delete.
9308 (the_core_target): New.
9310 * ctf.c: (ctf_target): New class.
9311 (ctf_ops): Now a ctf_target.
9312 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9313 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9314 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9316 (init_ctf_ops): Delete.
9317 (_initialize_ctf): Don't call it.
9318 * tracefile-tfile.c (tfile_target): New class.
9319 (tfile_ops): Now a tfile_target.
9320 (tfile_open, tfile_close, tfile_files_info)
9321 (tfile_get_tracepoint_status, tfile_trace_find)
9322 (tfile_fetch_registers, tfile_xfer_partial)
9323 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9324 Refactor as tfile_target methods.
9325 (tfile_xfer_partial_features): Remove target_ops parameter.
9326 (init_tfile_ops): Delete.
9327 (_initialize_tracefile_tfile): Don't call it.
9328 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9329 (tracefile_has_stack, tracefile_has_registers)
9330 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9331 tracefile_target methods.
9332 (init_tracefile_ops): Delete.
9333 (tracefile_target::tracefile_target): New.
9334 * tracefile.h: Include "target.h".
9335 (tracefile_target): New class.
9336 (init_tracefile_ops): Delete.
9338 * spu-multiarch.c (spu_multiarch_target): New class.
9339 (spu_ops): Now a spu_multiarch_target.
9340 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9341 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9342 (spu_search_memory, spu_mourn_inferior): Refactor as
9343 spu_multiarch_target methods.
9344 (init_spu_ops): Delete.
9345 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9346 complete_target_initialization.
9348 * ravenscar-thread.c (ravenscar_thread_target): New class.
9349 (ravenscar_ops): Now a ravenscar_thread_target.
9350 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9351 (ravenscar_thread_alive, ravenscar_pid_to_str)
9352 (ravenscar_fetch_registers, ravenscar_store_registers)
9353 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9354 (ravenscar_stopped_by_hw_breakpoint)
9355 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9356 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9357 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9359 (init_ravenscar_thread_ops): Delete.
9360 (_initialize_ravenscar): Remove references to
9361 init_ravenscar_thread_ops and complete_target_initialization.
9363 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9364 (bsd_uthread_target): New class.
9365 (bsd_uthread_ops): Now a bsd_uthread_target.
9366 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9367 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9368 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9369 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9370 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9371 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9372 (bsd_uthread_target): Delete function.
9373 (_initialize_bsd_uthread): Remove reference to
9374 complete_target_initialization.
9376 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9377 (target_bfd): ... this new class.
9378 (target_bfd_xfer_partial, target_bfd_get_section_table)
9379 (target_bfd_close): Refactor as target_bfd methods.
9380 (target_bfd::~target_bfd): New.
9381 (target_bfd_reopen): Adjust.
9382 (target_bfd::close): New.
9384 * record-btrace.c (record_btrace_target): New class.
9385 (record_btrace_ops): Now a record_btrace_target.
9386 (record_btrace_open, record_btrace_stop_recording)
9387 (record_btrace_disconnect, record_btrace_close)
9388 (record_btrace_async, record_btrace_info)
9389 (record_btrace_insn_history, record_btrace_insn_history_range)
9390 (record_btrace_insn_history_from, record_btrace_call_history)
9391 (record_btrace_call_history_range)
9392 (record_btrace_call_history_from, record_btrace_record_method)
9393 (record_btrace_is_replaying, record_btrace_will_replay)
9394 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9395 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9396 (record_btrace_store_registers, record_btrace_prepare_to_store)
9397 (record_btrace_to_get_unwinder)
9398 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9399 (record_btrace_commit_resume, record_btrace_wait)
9400 (record_btrace_stop, record_btrace_can_execute_reverse)
9401 (record_btrace_stopped_by_sw_breakpoint)
9402 (record_btrace_supports_stopped_by_sw_breakpoint)
9403 (record_btrace_stopped_by_hw_breakpoint)
9404 (record_btrace_supports_stopped_by_hw_breakpoint)
9405 (record_btrace_update_thread_list, record_btrace_thread_alive)
9406 (record_btrace_goto_begin, record_btrace_goto_end)
9407 (record_btrace_goto, record_btrace_stop_replaying_all)
9408 (record_btrace_execution_direction)
9409 (record_btrace_prepare_to_generate_core)
9410 (record_btrace_done_generating_core): Refactor as
9411 record_btrace_target methods.
9412 (init_record_btrace_ops): Delete.
9413 (_initialize_record_btrace): Remove reference to
9414 init_record_btrace_ops.
9415 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9416 the execution_direction global.
9417 (record_full_base_target, record_full_target)
9418 (record_full_core_target): New classes.
9419 (record_full_ops): Now a record_full_target.
9420 (record_full_core_ops): Now a record_full_core_target.
9421 (record_full_target::detach, record_full_target::disconnect)
9422 (record_full_core_target::disconnect)
9423 (record_full_target::mourn_inferior, record_full_target::kill):
9425 (record_full_open, record_full_close, record_full_async): Refactor
9426 as methods of the record_full_base_target class.
9427 (record_full_resume, record_full_commit_resume): Refactor
9428 as methods of the record_full_target class.
9429 (record_full_wait, record_full_stopped_by_watchpoint)
9430 (record_full_stopped_data_address)
9431 (record_full_stopped_by_sw_breakpoint)
9432 (record_full_supports_stopped_by_sw_breakpoint)
9433 (record_full_stopped_by_hw_breakpoint)
9434 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9435 methods of the record_full_base_target class.
9436 (record_full_store_registers, record_full_xfer_partial)
9437 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9438 Refactor as methods of the record_full_target class.
9439 (record_full_can_execute_reverse, record_full_get_bookmark)
9440 (record_full_goto_bookmark, record_full_execution_direction)
9441 (record_full_record_method, record_full_info, record_full_delete)
9442 (record_full_is_replaying, record_full_will_replay)
9443 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9444 (record_full_stop_replaying): Refactor as methods of the
9445 record_full_base_target class.
9446 (record_full_core_resume, record_full_core_kill)
9447 (record_full_core_fetch_registers)
9448 (record_full_core_prepare_to_store)
9449 (record_full_core_store_registers, record_full_core_xfer_partial)
9450 (record_full_core_insert_breakpoint)
9451 (record_full_core_remove_breakpoint)
9452 (record_full_core_has_execution): Refactor
9453 as methods of the record_full_core_target class.
9454 (record_full_base_target::supports_delete_record): New.
9455 (init_record_full_ops): Delete.
9456 (init_record_full_core_ops): Delete.
9457 (record_full_save): Refactor as method of the
9458 record_full_base_target class.
9459 (_initialize_record_full): Remove references to
9460 init_record_full_ops and init_record_full_core_ops.
9462 * remote.c (remote_target, extended_remote_target): New classes.
9463 (remote_ops): Now a remote_target.
9464 (extended_remote_ops): Now an extended_remote_target.
9465 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9466 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9467 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9468 (remote_pass_signals, remote_set_syscall_catchpoint)
9469 (remote_program_signals, )
9470 (remote_thread_always_alive): Remove target_ops parameter.
9471 (remote_thread_alive, remote_thread_name)
9472 (remote_update_thread_list, remote_threads_extra_info)
9473 (remote_static_tracepoint_marker_at)
9474 (remote_static_tracepoint_markers_by_strid)
9475 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9476 (remote_open): Refactor as methods of remote_target.
9477 (extended_remote_open, extended_remote_detach)
9478 (extended_remote_attach, extended_remote_post_attach):
9479 (extended_remote_supports_disable_randomization)
9480 (extended_remote_create_inferior): : Refactor as method of
9481 extended_remote_target.
9482 (remote_set_permissions, remote_open_1, remote_detach)
9483 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9484 (remote_resume, remote_commit_resume, remote_stop)
9485 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9486 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9487 (remote_prepare_to_store, remote_store_registers)
9488 (remote_flash_erase, remote_flash_done, remote_files_info)
9489 (remote_kill, remote_mourn, remote_insert_breakpoint)
9490 (remote_remove_breakpoint, remote_insert_watchpoint)
9491 (remote_watchpoint_addr_within_range)
9492 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9493 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9494 (remote_supports_stopped_by_sw_breakpoint)
9495 (remote_stopped_by_hw_breakpoint)
9496 (remote_supports_stopped_by_hw_breakpoint)
9497 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9498 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9499 (remote_verify_memory): Refactor as methods of remote_target.
9500 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9502 (remote_xfer_partial, remote_get_memory_xfer_limit)
9503 (remote_search_memory, remote_rcmd, remote_memory_map)
9504 (remote_pid_to_str, remote_get_thread_local_address)
9505 (remote_get_tib_address, remote_read_description): Refactor as
9506 methods of remote_target.
9507 (remote_target::fileio_open, remote_target::fileio_pwrite)
9508 (remote_target::fileio_pread, remote_target::fileio_close): New.
9509 (remote_hostio_readlink, remote_hostio_fstat)
9510 (remote_filesystem_is_local, remote_can_execute_reverse)
9511 (remote_supports_non_stop, remote_supports_disable_randomization)
9512 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9513 (remote_supports_enable_disable_tracepoint)
9514 (remote_supports_string_tracing)
9515 (remote_can_run_breakpoint_commands, remote_trace_init)
9516 (remote_download_tracepoint, remote_can_download_tracepoint)
9517 (remote_download_trace_state_variable, remote_enable_tracepoint)
9518 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9519 (remote_trace_start, remote_get_trace_status)
9520 (remote_get_tracepoint_status, remote_trace_stop)
9521 (remote_trace_find, remote_get_trace_state_variable_value)
9522 (remote_save_trace_data, remote_get_raw_trace_data)
9523 (remote_set_disconnected_tracing, remote_core_of_thread)
9524 (remote_set_circular_trace_buffer, remote_traceframe_info)
9525 (remote_get_min_fast_tracepoint_insn_len)
9526 (remote_set_trace_buffer_size, remote_set_trace_notes)
9527 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9528 (remote_disable_btrace, remote_teardown_btrace)
9529 (remote_read_btrace, remote_btrace_conf)
9530 (remote_augmented_libraries_svr4_read, remote_load)
9531 (remote_pid_to_exec_file, remote_can_do_single_step)
9532 (remote_execution_direction, remote_thread_handle_to_thread_info):
9533 Refactor as methods of remote_target.
9534 (init_remote_ops, init_extended_remote_ops): Delete.
9535 (remote_can_async_p, remote_is_async_p, remote_async)
9536 (remote_thread_events, remote_upload_tracepoints)
9537 (remote_upload_trace_state_variables): Refactor as methods of
9539 (_initialize_remote): Remove references to init_remote_ops and
9540 init_extended_remote_ops.
9542 * remote-sim.c (gdbsim_target): New class.
9543 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9544 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9545 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9546 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9547 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9548 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9549 Refactor as methods of gdbsim_target.
9550 (gdbsim_ops): Now a gdbsim_target.
9551 (init_gdbsim_ops): Delete.
9552 (gdbsim_cntrl_c): Adjust.
9553 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9555 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9556 (the_amd64_linux_nat_target): New.
9557 (amd64_linux_fetch_inferior_registers)
9558 (amd64_linux_store_inferior_registers): Refactor as methods of
9559 amd64_linux_nat_target.
9560 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9561 * i386-linux-nat.c: Don't include "linux-nat.h".
9562 (i386_linux_nat_target): New class.
9563 (the_i386_linux_nat_target): New.
9564 (i386_linux_fetch_inferior_registers)
9565 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9566 as methods of i386_linux_nat_target.
9567 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9568 * inf-child.c (inf_child_ops): Delete.
9569 (inf_child_fetch_inferior_registers)
9570 (inf_child_store_inferior_registers): Delete.
9571 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9572 methods of inf_child_target.
9573 (inf_child_target::supports_terminal_ours)
9574 (inf_child_target::terminal_init)
9575 (inf_child_target::terminal_inferior)
9576 (inf_child_target::terminal_ours_for_output)
9577 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9578 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9580 (inf_child_open, inf_child_disconnect, inf_child_close)
9581 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9582 (inf_child_post_startup_inferior, inf_child_can_run)
9583 (inf_child_pid_to_exec_file): Refactor as methods of
9585 (inf_child_follow_fork): Delete.
9586 (inf_child_target::can_create_inferior)
9587 (inf_child_target::can_attach): New.
9588 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9589 (inf_child_target::has_stack, inf_child_target::has_registers)
9590 (inf_child_target::has_execution): New.
9591 (inf_child_fileio_open, inf_child_fileio_pwrite)
9592 (inf_child_fileio_pread, inf_child_fileio_fstat)
9593 (inf_child_fileio_close, inf_child_fileio_unlink)
9594 (inf_child_fileio_readlink, inf_child_use_agent)
9595 (inf_child_can_use_agent): Refactor as methods of
9597 (return_zero, inf_child_target): Delete.
9598 (inf_child_target::inf_child_target): New.
9599 * inf-child.h: Include "target.h".
9600 (inf_child_target): Delete function prototype.
9601 (inf_child_target): New class.
9602 (inf_child_open_target, inf_child_mourn_inferior)
9603 (inf_child_maybe_unpush_target): Delete.
9604 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9605 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9606 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9607 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9608 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9609 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9610 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9611 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9612 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9613 methods of inf_ptrace_target.
9614 (inf_ptrace_target): Delete function.
9615 * inf-ptrace.h: Include "inf-child.h".
9616 (inf_ptrace_target): Delete function declaration.
9617 (inf_ptrace_target): New class.
9618 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9619 * linux-nat.c (linux_target): New.
9620 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9621 (linux_nat_target::~linux_nat_target): New.
9622 (linux_child_post_attach, linux_child_post_startup_inferior)
9623 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9624 (linux_child_remove_fork_catchpoint)
9625 (linux_child_insert_vfork_catchpoint)
9626 (linux_child_remove_vfork_catchpoint)
9627 (linux_child_insert_exec_catchpoint)
9628 (linux_child_remove_exec_catchpoint)
9629 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9630 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9631 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9632 (linux_nat_stopped_data_address)
9633 (linux_nat_stopped_by_sw_breakpoint)
9634 (linux_nat_supports_stopped_by_sw_breakpoint)
9635 (linux_nat_stopped_by_hw_breakpoint)
9636 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9637 (linux_nat_kill, linux_nat_mourn_inferior)
9638 (linux_nat_xfer_partial, linux_nat_thread_alive)
9639 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9640 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9641 (linux_child_static_tracepoint_markers_by_strid)
9642 (linux_nat_is_async_p, linux_nat_can_async_p)
9643 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9644 (linux_nat_supports_multi_process)
9645 (linux_nat_supports_disable_randomization, linux_nat_async)
9646 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9647 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9648 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9649 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9650 methods of linux_nat_target.
9651 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9652 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9654 (check_stopped_by_watchpoint): Adjust.
9655 (linux_xfer_partial): Delete.
9656 (linux_target_install_ops, linux_target, linux_nat_add_target):
9658 (linux_nat_target::linux_nat_target): New.
9659 * linux-nat.h: Include "inf-ptrace.h".
9660 (linux_nat_target): New.
9661 (linux_target, linux_target_install_ops, linux_nat_add_target):
9662 Delete function declarations.
9663 (linux_target): Declare global.
9664 * linux-thread-db.c (thread_db_target): New.
9665 (thread_db_target::thread_db_target): New.
9666 (thread_db_ops): Delete.
9667 (the_thread_db_target): New.
9668 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9669 (thread_db_update_thread_list, thread_db_pid_to_str)
9670 (thread_db_extra_thread_info)
9671 (thread_db_thread_handle_to_thread_info)
9672 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9673 (thread_db_resume): Refactor as methods of thread_db_target.
9674 (init_thread_db_ops): Delete.
9675 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9676 * x86-linux-nat.c: Don't include "linux-nat.h".
9677 (super_post_startup_inferior): Delete.
9678 (x86_linux_nat_target::~x86_linux_nat_target): New.
9679 (x86_linux_child_post_startup_inferior)
9680 (x86_linux_read_description, x86_linux_enable_btrace)
9681 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9682 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9683 methods of x86_linux_nat_target.
9684 (x86_linux_create_target): Delete. Bits folded ...
9685 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9687 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9688 (x86_linux_nat_target): New class.
9689 (x86_linux_create_target): Delete.
9690 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9691 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9692 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9693 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9694 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9695 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9697 (x86_use_watchpoints): Delete.
9698 * x86-nat.h: Include "breakpoint.h" and "target.h".
9699 (x86_use_watchpoints): Delete.
9700 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9701 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9702 (x86_insert_watchpoint, x86_remove_watchpoint)
9703 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9704 (x86_stopped_by_hw_breakpoint): New declarations.
9705 (x86_nat_target): New template class.
9707 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9708 (the_ppc_linux_nat_target): New.
9709 (ppc_linux_fetch_inferior_registers)
9710 (ppc_linux_can_use_hw_breakpoint)
9711 (ppc_linux_region_ok_for_hw_watchpoint)
9712 (ppc_linux_ranged_break_num_registers)
9713 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9714 (ppc_linux_insert_mask_watchpoint)
9715 (ppc_linux_remove_mask_watchpoint)
9716 (ppc_linux_can_accel_watchpoint_condition)
9717 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9718 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9719 (ppc_linux_watchpoint_addr_within_range)
9720 (ppc_linux_masked_watch_num_registers)
9721 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9722 (ppc_linux_read_description): Refactor as methods of
9723 ppc_linux_nat_target.
9724 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
9726 * procfs.c (procfs_xfer_partial): Delete forward declaration.
9727 (procfs_target): New class.
9728 (the_procfs_target): New.
9729 (procfs_target): Delete function.
9730 (procfs_auxv_parse, procfs_attach, procfs_detach)
9731 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9732 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9733 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9734 (procfs_create_inferior, procfs_update_thread_list)
9735 (procfs_thread_alive, procfs_pid_to_str)
9736 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9737 (procfs_stopped_data_address, procfs_insert_watchpoint)
9738 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9739 (proc_find_memory_regions, procfs_info_proc)
9740 (procfs_make_note_section): Refactor as methods of procfs_target.
9741 (_initialize_procfs): Adjust.
9742 * sol-thread.c (sol_thread_target): New class.
9743 (sol_thread_ops): Now a sol_thread_target.
9744 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9745 (sol_thread_fetch_registers, sol_thread_store_registers)
9746 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9747 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9748 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9749 (init_sol_thread_ops): Delete.
9750 (_initialize_sol_thread): Adjust. Remove references to
9751 init_sol_thread_ops and complete_target_initialization.
9753 * windows-nat.c (windows_nat_target): New class.
9754 (windows_fetch_inferior_registers)
9755 (windows_store_inferior_registers, windows_resume, windows_wait)
9756 (windows_attach, windows_detach, windows_pid_to_exec_file)
9757 (windows_files_info, windows_create_inferior)
9758 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9759 (windows_close, windows_pid_to_str, windows_xfer_partial)
9760 (windows_get_tib_address, windows_get_ada_task_ptid)
9761 (windows_thread_name, windows_thread_alive): Refactor as
9762 windows_nat_target methods.
9763 (do_initial_windows_stuff): Adjust.
9764 (windows_target): Delete function.
9765 (_initialize_windows_nat): Adjust.
9767 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9768 (darwin_mourn_inferior, darwin_kill_inferior)
9769 (darwin_create_inferior, darwin_attach, darwin_detach)
9770 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9771 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9772 (darwin_supports_multi_process): Refactor as darwin_nat_target
9774 (darwin_resume_to, darwin_files_info): Delete.
9775 (_initialize_darwin_inferior): Rename to ...
9776 (_initialize_darwin_nat): ... this. Adjust to C++ification.
9777 * darwin-nat.h: Include "inf-child.h".
9778 (darwin_nat_target): New class.
9779 (darwin_complete_target): Delete.
9780 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9781 (darwin_target): New.
9782 (i386_darwin_fetch_inferior_registers)
9783 (i386_darwin_store_inferior_registers): Refactor as methods of
9785 (darwin_complete_target): Delete, with ...
9786 (_initialize_i386_darwin_nat): ... bits factored out here.
9788 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9789 (the_alpha_linux_nat_target): New.
9790 (alpha_linux_register_u_offset): Refactor as
9791 alpha_linux_nat_target method.
9792 (_initialize_alpha_linux_nat): Adjust.
9793 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9794 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9795 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9796 methods of linux_nat_trad_target.
9797 (linux_trad_target): Delete.
9798 * linux-nat-trad.h (linux_trad_target): Delete function.
9799 (linux_nat_trad_target): New class.
9800 * mips-linux-nat.c (mips_linux_nat_target): New class.
9801 (super_fetch_registers, super_store_registers, super_close):
9803 (the_mips_linux_nat_target): New.
9804 (mips64_linux_regsets_fetch_registers)
9805 (mips64_linux_regsets_store_registers)
9806 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9807 (mips_linux_register_u_offset, mips_linux_read_description)
9808 (mips_linux_can_use_hw_breakpoint)
9809 (mips_linux_stopped_by_watchpoint)
9810 (mips_linux_stopped_data_address)
9811 (mips_linux_region_ok_for_hw_watchpoint)
9812 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9813 (mips_linux_close): Refactor as methods of mips_linux_nat.
9814 (_initialize_mips_linux_nat): Adjust to C++ification.
9816 * aix-thread.c (aix_thread_target): New class.
9817 (aix_thread_ops): Now an aix_thread_target.
9818 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9819 (aix_thread_fetch_registers, aix_thread_store_registers)
9820 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9821 (aix_thread_thread_alive, aix_thread_pid_to_str)
9822 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9823 Refactor as methods of aix_thread_target.
9824 (init_aix_thread_ops): Delete.
9825 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9826 and complete_target_initialization.
9827 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9828 (rs6000_nat_target): New class.
9829 (the_rs6000_nat_target): New.
9830 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9831 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9832 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9833 (super_create_inferior): Delete.
9834 (_initialize_rs6000_nat): Adjust to C++ification.
9836 * arm-linux-nat.c (arm_linux_nat_target): New class.
9837 (the_arm_linux_nat_target): New.
9838 (arm_linux_fetch_inferior_registers)
9839 (arm_linux_store_inferior_registers, arm_linux_read_description)
9840 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9841 (arm_linux_remove_hw_breakpoint)
9842 (arm_linux_region_ok_for_hw_watchpoint)
9843 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9844 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9845 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9846 arm_linux_nat_target.
9847 (_initialize_arm_linux_nat): Adjust to C++ification.
9849 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9850 (the_aarch64_linux_nat_target): New.
9851 (aarch64_linux_fetch_inferior_registers)
9852 (aarch64_linux_store_inferior_registers)
9853 (aarch64_linux_child_post_startup_inferior)
9854 (aarch64_linux_read_description)
9855 (aarch64_linux_can_use_hw_breakpoint)
9856 (aarch64_linux_insert_hw_breakpoint)
9857 (aarch64_linux_remove_hw_breakpoint)
9858 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9859 (aarch64_linux_region_ok_for_hw_watchpoint)
9860 (aarch64_linux_stopped_data_address)
9861 (aarch64_linux_stopped_by_watchpoint)
9862 (aarch64_linux_watchpoint_addr_within_range)
9863 (aarch64_linux_can_do_single_step): Refactor as methods of
9864 aarch64_linux_nat_target.
9865 (super_post_startup_inferior): Delete.
9866 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9868 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9869 (the_hppa_linux_nat_target): New.
9870 (hppa_linux_fetch_inferior_registers)
9871 (hppa_linux_store_inferior_registers): Refactor as methods of
9872 hppa_linux_nat_target.
9873 (_initialize_hppa_linux_nat): Adjust to C++ification.
9875 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9876 (the_ia64_linux_nat_target): New.
9877 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9878 (ia64_linux_stopped_data_address)
9879 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9880 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9881 ia64_linux_nat_target methods.
9882 (super_xfer_partial): Delete.
9883 (_initialize_ia64_linux_nat): Adjust to C++ification.
9885 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9886 (the_m32r_linux_nat_target): New.
9887 (m32r_linux_fetch_inferior_registers)
9888 (m32r_linux_store_inferior_registers): Refactor as
9889 m32r_linux_nat_target methods.
9890 (_initialize_m32r_linux_nat): Adjust to C++ification.
9892 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9893 (the_m68k_linux_nat_target): New.
9894 (m68k_linux_fetch_inferior_registers)
9895 (m68k_linux_store_inferior_registers): Refactor as
9896 m68k_linux_nat_target methods.
9897 (_initialize_m68k_linux_nat): Adjust to C++ification.
9899 * s390-linux-nat.c (s390_linux_nat_target): New class.
9900 (the_s390_linux_nat_target): New.
9901 (s390_linux_fetch_inferior_registers)
9902 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9903 (s390_insert_watchpoint, s390_remove_watchpoint)
9904 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9905 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9906 (s390_auxv_parse, s390_read_description): Refactor as methods of
9907 s390_linux_nat_target.
9908 (_initialize_s390_nat): Adjust to C++ification.
9910 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9911 (the_sparc_linux_nat_target): New.
9912 (_initialize_sparc_linux_nat): Adjust to C++ification.
9913 * sparc-nat.c (sparc_fetch_inferior_registers)
9914 (sparc_store_inferior_registers): Remove target_ops parameter.
9915 * sparc-nat.h (sparc_fetch_inferior_registers)
9916 (sparc_store_inferior_registers): Remove target_ops parameter.
9917 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9918 (the_sparc64_linux_nat_target): New.
9919 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9921 * spu-linux-nat.c (spu_linux_nat_target): New class.
9922 (the_spu_linux_nat_target): New.
9923 (spu_child_post_startup_inferior, spu_child_post_attach)
9924 (spu_child_wait, spu_fetch_inferior_registers)
9925 (spu_store_inferior_registers, spu_xfer_partial)
9926 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9928 (_initialize_spu_nat): Adjust to C++ification.
9930 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9931 (the_tilegx_linux_nat_target): New.
9932 (fetch_inferior_registers, store_inferior_registers):
9933 Refactor as methods.
9934 (_initialize_tile_linux_nat): Adjust to C++ification.
9936 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9937 (the_xtensa_linux_nat_target): New.
9938 (xtensa_linux_fetch_inferior_registers)
9939 (xtensa_linux_store_inferior_registers): Refactor as
9940 xtensa_linux_nat_target methods.
9941 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9943 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9944 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9945 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9946 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9947 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9948 (fbsd_stopped_by_sw_breakpoint)
9949 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9950 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9951 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9952 (fbsd_post_startup_inferior, fbsd_post_attach)
9953 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9954 (fbsd_set_syscall_catchpoint)
9955 (super_xfer_partial, super_resume, super_wait)
9956 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9957 (fbsd_handle_debug_trap): Remove target_ops parameter.
9958 (fbsd_nat_add_target): Delete.
9959 * fbsd-nat.h: Include "inf-ptrace.h".
9960 (fbsd_nat_add_target): Delete.
9961 (USE_SIGTRAP_SIGINFO): Define.
9962 (fbsd_nat_target): New class.
9964 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9965 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9966 (amd64bsd_target): Delete.
9967 * amd64-bsd-nat.h: New file.
9968 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9970 (amd64_fbsd_nat_target): New class.
9971 (the_amd64_fbsd_nat_target): New.
9972 (amd64fbsd_read_description): Refactor as method of
9973 amd64_fbsd_nat_target.
9974 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9975 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9976 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9977 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9978 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9979 (i386bsd_target): Delete.
9980 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9981 (i386bsd_fetch_inferior_registers)
9982 (i386bsd_store_inferior_registers): Declare.
9983 (i386_bsd_nat_target): New class.
9984 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9985 (the_i386_fbsd_nat_target): New.
9986 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9987 i386_fbsd_nat_target methods.
9988 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9989 (_initialize_i386fbsd_nat): Adjust to C++ification.
9990 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9991 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9992 (_initialize_x86_bsd_nat): Adjust to C++ification.
9993 * x86-bsd-nat.h: Include "x86-nat.h".
9994 (x86bsd_target): Delete declaration.
9995 (x86bsd_nat_target): New class.
9997 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9998 (the_aarch64_fbsd_nat_target): New.
9999 (aarch64_fbsd_fetch_inferior_registers)
10000 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10001 aarch64_fbsd_nat_target.
10002 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10003 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10004 (the_alpha_bsd_nat_target): New.
10005 (alphabsd_fetch_inferior_registers)
10006 (alphabsd_store_inferior_registers): Refactor as
10007 alpha_bsd_nat_target methods.
10008 (_initialize_alphabsd_nat): Refactor as methods of
10009 alpha_bsd_nat_target.
10010 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10011 (the_amd64_nbsd_nat_target): New.
10012 (_initialize_amd64nbsd_nat): Adjust to C++ification.
10013 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10014 (the_amd64_obsd_nat_target): New.
10015 (_initialize_amd64obsd_nat): Adjust to C++ification.
10016 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10017 (the_arm_fbsd_nat_target): New.
10018 (arm_fbsd_fetch_inferior_registers)
10019 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10020 (_initialize_arm_fbsd_nat): Refactor as methods of
10021 arm_fbsd_nat_target.
10022 (_initialize_arm_fbsd_nat): Adjust to C++ification.
10023 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10024 (the_arm_netbsd_nat_target): New.
10025 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10026 arm_netbsd_nat_target.
10027 (_initialize_arm_netbsd_nat): Adjust to C++ification.
10028 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10029 (the_hppa_nbsd_nat_target): New.
10030 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10031 hppa_nbsd_nat_target methods.
10032 (_initialize_hppanbsd_nat): Adjust to C++ification.
10033 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10034 (the_hppa_obsd_nat_target): New.
10035 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10036 methods of hppa_obsd_nat_target.
10037 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
10039 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10040 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
10042 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10043 (_initialize_i386obsd_nat): Use add_target.
10044 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10045 (the_m68k_bsd_nat_target): New.
10046 (m68kbsd_fetch_inferior_registers)
10047 (m68kbsd_store_inferior_registers): Refactor as methods of
10048 m68k_bsd_nat_target.
10049 (_initialize_m68kbsd_nat): Adjust to C++ification.
10050 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10051 (the_mips_fbsd_nat_target): New.
10052 (mips_fbsd_fetch_inferior_registers)
10053 (mips_fbsd_store_inferior_registers): Refactor as methods of
10054 mips_fbsd_nat_target.
10055 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
10057 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10058 (the_mips_nbsd_nat_target): New.
10059 (mipsnbsd_fetch_inferior_registers)
10060 (mipsnbsd_store_inferior_registers): Refactor as methods of
10061 mips_nbsd_nat_target.
10062 (_initialize_mipsnbsd_nat): Adjust to C++ification.
10063 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10064 (the_mips64_obsd_nat_target): New.
10065 (mips64obsd_fetch_inferior_registers)
10066 (mips64obsd_store_inferior_registers): Refactor as methods of
10067 mips64_obsd_nat_target.
10068 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
10070 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10072 * nbsd-nat.h: Include "inf-ptrace.h".
10073 (nbsd_nat_target): New class.
10074 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10075 (obsd_wait): Refactor as methods of obsd_nat_target.
10076 (obsd_add_target): Delete.
10077 * obsd-nat.h: Include "inf-ptrace.h".
10078 (obsd_nat_target): New class.
10079 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10080 (the_ppc_fbsd_nat_target): New.
10081 (ppcfbsd_fetch_inferior_registers)
10082 (ppcfbsd_store_inferior_registers): Refactor as methods of
10083 ppc_fbsd_nat_target.
10084 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
10086 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10087 (the_ppc_nbsd_nat_target): New.
10088 (ppcnbsd_fetch_inferior_registers)
10089 (ppcnbsd_store_inferior_registers): Refactor as methods of
10090 ppc_nbsd_nat_target.
10091 (_initialize_ppcnbsd_nat): Adjust to C++ification.
10092 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10093 (the_ppc_obsd_nat_target): New.
10094 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10095 methods of ppc_obsd_nat_target.
10096 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
10098 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10099 (the_sh_nbsd_nat_target): New.
10100 (shnbsd_fetch_inferior_registers)
10101 (shnbsd_store_inferior_registers): Refactor as methods of
10102 sh_nbsd_nat_target.
10103 (_initialize_shnbsd_nat): Adjust to C++ification.
10104 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10105 (inf_ptrace_xfer_partial): Delete.
10106 (sparc_xfer_partial, sparc_target): Delete.
10107 * sparc-nat.h (sparc_fetch_inferior_registers)
10108 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10109 (sparc_target): Delete function declaration.
10110 (sparc_target): New template class.
10111 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10112 (_initialize_sparcnbsd_nat): Adjust to C++ification.
10113 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10114 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
10116 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10117 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10118 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10119 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
10121 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10122 (the_vax_bsd_nat_target): New.
10123 (vaxbsd_fetch_inferior_registers)
10124 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10126 (_initialize_vaxbsd_nat): Adjust to C++ification.
10128 * bsd-kvm.c (bsd_kvm_target): New class.
10129 (bsd_kvm_ops): Now a bsd_kvm_target.
10130 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10131 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10132 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10134 (bsd_kvm_return_one): Delete.
10135 (bsd_kvm_add_target): Adjust to C++ification.
10137 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10138 (nto_procfs_target_procfs): New classes.
10139 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10140 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10141 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10142 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10143 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10144 (procfs_remove_hw_breakpoint, procfs_resume)
10145 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10146 (procfs_kill_inferior, procfs_store_registers)
10147 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10148 as methods of nto_procfs_target.
10149 (nto_procfs_ops): Now an nto_procfs_target_procfs.
10150 (nto_native_ops): Delete.
10151 (procfs_open, procfs_native_open): Delete.
10152 (nto_native_ops): Now an nto_procfs_target_native.
10153 (init_procfs_targets): Adjust to C++ification.
10154 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10155 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10156 Refactor as methods of nto_procfs_target.
10158 * go32-nat.c (go32_nat_target): New class.
10159 (the_go32_nat_target): New.
10160 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10161 (go32_store_registers, go32_xfer_partial, go32_files_info)
10162 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10163 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10164 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10165 (go32_pid_to_str): Refactor as methods of go32_nat_target.
10166 (go32_target): Delete.
10167 (_initialize_go32_nat): Adjust to C++ification.
10169 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10170 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10171 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10172 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10174 (gnu_target): Delete.
10175 * gnu-nat.h (gnu_target): Delete.
10176 (gnu_nat_target): New class.
10177 * i386-gnu-nat.c (gnu_base_target): New.
10178 (i386_gnu_nat_target): New class.
10179 (the_i386_gnu_nat_target): New.
10180 (_initialize_i386gnu_nat): Adjust to C++ification.
10182 2018-05-02 Pedro Alves <palves@redhat.com>
10184 * bfd-target.c (target_bfd_xclose): Rename to ...
10185 (target_bfd_close): ... this.
10186 (target_bfd_reopen): Adjust.
10187 * target.c (target_close): Remove references to to_xclose.
10188 * target.h (target_ops::to_xclose): Delete.
10189 (target_ops::to_close): Update comments.
10191 2018-05-02 Pedro Alves <palves@redhat.com>
10193 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10195 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10196 * inf-ptrace.c (inf_ptrace_register_u_offset)
10197 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10198 (inf_ptrace_store_register, inf_ptrace_store_registers)
10199 (inf_ptrace_trad_target): Move to ...
10200 * linux-nat-trad.c: ... this new file.
10201 * linux-nat-trad.h: New file.
10202 * linux-nat.c (linux_target_install_ops): Make extern.
10203 (linux_trad_target): Delete.
10204 * linux-nat.h (linux_trad_target): Delete declaration.
10205 (linux_target_install_ops): Declare.
10206 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10209 2018-05-02 Pedro Alves <palves@redhat.com>
10211 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10212 procfs_target/add_target here.
10213 * procfs.c (procfs_target): Make static.
10214 (_initialize_procfs): Call add_target here.
10215 * procfs.h (struct target_ops): Remove forward declaration.
10216 (procfs_target): Remove declaration.
10217 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10219 2018-05-02 Pedro Alves <palves@redhat.com>
10221 * procfs.c (procfs_stopped_by_watchpoint)
10222 (procfs_insert_watchpoint, procfs_remove_watchpoint)
10223 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10225 (procfs_use_watchpoints): Delete, move contents...
10226 (procfs_target): ... here.
10227 * procfs.h (procfs_use_watchpoints): Delete declaration.
10228 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10229 procfs_use_watchpoints.
10230 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10231 procfs_use_watchpoints.
10233 2018-05-02 Tom Tromey <tom@tromey.com>
10236 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10237 and var_zuinteger_unlimited.
10238 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10239 and PARAM_ZUINTEGER_UNLIMITED.
10240 (set_parameter_value): Handle var_zuinteger and
10241 var_zuinteger_unlimited.
10242 (add_setshow_generic): Likewise.
10243 (parmpy_init): Likewise.
10245 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
10248 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10249 pointer is not null before dereferencing it.
10251 2018-04-30 Tom Tromey <tom@tromey.com>
10253 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10256 2018-04-30 Tom Tromey <tom@tromey.com>
10258 * breakpoint.c (mention): Remove use of is_mi_like_p.
10259 (print_mention_ranged_breakpoint): Likewise.
10260 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10263 2018-04-30 Tom Tromey <tom@tromey.com>
10265 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10267 2018-04-30 Tom Tromey <tom@tromey.com>
10269 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10270 (info_spu_event_command): Remove some uses of is_mi_like_p.
10272 2018-04-30 Tom Tromey <tom@tromey.com>
10274 * python/py-framefilter.c (py_print_single_arg)
10275 (enumerate_locals, py_print_args, py_print_frame): Remove some
10276 uses of is_mi_like_p.
10278 2018-04-30 Tom Tromey <tom@tromey.com>
10280 * ui-out.c: Update.
10281 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10282 * ui-out.h (ui_out::is_mi_like_p): Now const.
10283 (ui_out::do_is_mi_like_p): Now const.
10284 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10286 2018-04-30 Tom Tromey <tom@tromey.com>
10288 * varobj.c (varobj_set_visualizer): Use new_reference.
10289 * python/python.c (gdbpy_decode_line): Use new_reference.
10290 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10293 2018-04-30 Tom Tromey <tom@tromey.com>
10295 * varobj.c (install_new_value): Use new_reference.
10296 * value.h (value_incref): Return void. Swap intro comment with
10298 * value.c (set_value_parent): Use new_reference.
10299 (value_incref): Return void. Update intro comment.
10300 (release_value): Use new_reference.
10301 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10303 2018-04-30 Tom Tromey <tom@tromey.com>
10305 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10306 * gdb_bfd.h (new_bfd_ref): Remove.
10307 (gdb_bfd_open): Update comment.
10308 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10309 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10310 (gdb_bfd_fdopenr): Use new_reference.
10311 * exec.c (exec_file_attach): Use new_reference.
10313 2018-04-30 Tom Tromey <tom@tromey.com>
10315 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10318 2018-04-30 Tom Tromey <tom@tromey.com>
10320 * jit.c (jit_read_code_entry): Use type_align.
10321 * i386-tdep.c (i386_gdbarch_init): Don't call
10322 set_gdbarch_long_long_align_bit.
10323 * gdbarch.sh: Remove long_long_align_bit.
10324 * gdbarch.c, gdbarch.h: Rebuild.
10325 * arc-tdep.c (arc_type_align): New function.
10326 (arc_gdbarch_init): Use arc_type_align. Don't call
10327 set_gdbarch_long_long_align_bit.
10329 2018-04-30 Tom Tromey <tom@tromey.com>
10331 * rust-lang.c (rust_type_alignment): Remove.
10332 (rust_composite_type): Use type_align.
10334 2018-04-30 Tom Tromey <tom@tromey.com>
10336 * NEWS: Mention Type.align.
10337 * python/py-type.c (typy_get_alignof): New function.
10338 (type_object_getset): Add "alignof".
10340 2018-04-30 Tom Tromey <tom@tromey.com>
10344 * std-operator.def (UNOP_ALIGNOF): New operator.
10345 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10347 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10348 * c-lang.c (c_op_print_tab): Add alignof.
10349 * c-exp.y (ALIGNOF): New token.
10350 (exp): Add "ALIGNOF" production.
10351 (ident_tokens): Add _Alignof and alignof.
10353 2018-04-30 Tom Tromey <tom@tromey.com>
10355 * i386-tdep.c (i386_type_align): New function.
10356 (i386_gdbarch_init): Update.
10357 * gdbarch.sh (type_align): New method.
10358 * gdbarch.c, gdbarch.h: Rebuild.
10359 * arch-utils.h (default_type_align): Declare.
10360 * arch-utils.c (default_type_align): New function.
10361 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10362 (struct type) <align_log2>: New field.
10363 <instance_flags>: Now a bitfield.
10364 (TYPE_RAW_ALIGN): New macro.
10365 (type_align, type_raw_align, set_type_align): Declare.
10366 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10368 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10369 (get_alignment, maybe_set_alignment): New functions.
10370 (read_structure_type, read_enumeration_type, read_array_type)
10371 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10372 (read_subrange_type, read_base_type): Set type alignment.
10374 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10376 * dwarf2read.c (read_index_from_section): Use bool.
10378 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10381 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10384 2018-04-29 John Reiser <jreiser@BitWagon.com>
10387 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10388 last step, and do it atomically.
10390 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10392 * compile/compile-c-types.c (convert_int, convert_float):
10393 Update for C FE v1.
10395 2018-04-27 Tom Tromey <tom@tromey.com>
10398 * rust-lang.c (rust_inclusive_range_type_p): New function.
10399 (rust_range): Handle inclusive ranges.
10400 (rust_compute_range): Likewise.
10401 * rust-exp.y (struct rust_op) <inclusive>: New field.
10402 (DOTDOTEQ): New constant.
10403 (range_expr): Add "..=" productions.
10404 (operator_tokens): Add "..=" token.
10405 (ast_range): Add "inclusive" parameter.
10406 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10408 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10410 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10411 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10413 * expprint.c (print_subexp_standard): Handle new bounds values.
10414 (dump_subexp_body_standard): Likewise.
10416 2018-04-27 Tom Tromey <tom@tromey.com>
10418 * configure: Rebuild.
10419 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10420 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10422 (class symbol_needs_eval_context): Likewise.
10423 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10424 (mock_mapped_index::symbol_name_at): Use "override". Remove
10426 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10428 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10429 * aarch64-tdep.c (instruction_reader::read): Use "override".
10430 (instruction_reader_test::read): Likewise.
10431 * arm-tdep.c (instruction_reader::read): Use "override".
10432 (instruction_reader_thumb::read): Likewise.
10434 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10437 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10438 instead of remote_send.
10439 (remote_send): Remove.
10441 2018-04-26 Pedro Alves <palves@redhat.com>
10443 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10444 find_function_start_sal instead of find_pc_line.
10446 2018-04-26 Pedro Alves <palves@redhat.com>
10448 * breakpoint.c (set_breakpoint_location_function): Handle
10449 mst_data_gnu_ifunc.
10450 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10451 * elfread.c (elf_symtab_read): Give data symbols with
10452 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10453 (elf_rel_plt_read): Update comment.
10454 * linespec.c (convert_linespec_to_sals): Handle
10455 mst_data_gnu_ifunc.
10456 (minsym_found): Handle mst_data_gnu_ifunc.
10457 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10458 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10459 * parse.c (find_minsym_type_and_address): Handle
10460 mst_data_gnu_ifunc.
10461 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10462 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10463 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10465 <mst_data_gnu_ifunc>: New enumerator.
10467 2018-04-26 Pedro Alves <palves@redhat.com>
10469 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10470 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10471 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10473 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10474 (lookup_minimal_symbol_by_pc): Adjust.
10475 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10476 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10477 * minsyms.h (lookup_msym_prefer): New enum.
10478 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10479 parameter by a lookup_msym_prefer parameter.
10481 2018-04-26 Pedro Alves <palves@redhat.com>
10483 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10484 ends in "@plt" instead of looking at the symbol's section.
10486 2018-04-26 Pedro Alves <palves@redhat.com>
10488 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10490 (find_pc_partial_function_gnu_ifunc): Rename to ...
10491 (find_pc_partial_function): ... this, and remove references to
10493 (find_pc_partial_function): Delete old implementation.
10494 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10496 2018-04-26 Pedro Alves <palves@redhat.com>
10498 * linespec.c (struct bound_minimal_symbol_search_key): New.
10499 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10500 skip first line if we found a GNU ifunc minimal symbol by name.
10501 (compare_msymbols): Change parameters to work with a destructured
10503 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10506 2018-04-26 Pedro Alves <palves@redhat.com>
10508 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10509 ifunc targets here. Instead, if we have an ifunc minsym, use its
10511 (add_location_to_breakpoint): Store the minsym and the objfile in
10512 the breakpoint location.
10513 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10514 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10515 Record the minsym in the sal.
10516 * symtab.h (symtab_and_line) <msymbol>: New field.
10518 2018-04-26 Pedro Alves <palves@redhat.com>
10520 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10521 unless we actually resolved the ifunc.
10523 2018-04-26 Pedro Alves <palves@redhat.com>
10525 * c-exp.y (variable production): Prefer ifunc minsyms over
10526 regular function symbols.
10527 * symtab.c (find_gnu_ifunc): New function.
10528 * minsyms.h (lookup_msym_prefer): New enum.
10529 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10530 parameter by a lookup_msym_prefer parameter.
10531 * symtab.h (find_gnu_ifunc): New declaration.
10533 2018-04-26 Pedro Alves <palves@redhat.com>
10535 * blockframe.c (find_gnu_ifunc_target_type): New function.
10536 (find_function_type): New.
10537 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10538 return a value with a memory address.
10539 (eval_call): For calls to GNU ifunc functions, try to find the
10540 type of the target function from the type that the resolver
10542 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10544 * infcall.c (find_function_return_type): Delete.
10545 (find_function_addr): Add 'function_type' parameter. For calls to
10546 GNU ifunc functions, try to find the type of the target function
10547 from the type that the resolver returns, and return it via
10549 (call_function_by_hand_dummy): Adjust to use the function type
10550 returned by find_function_addr.
10551 (find_function_addr): Add 'function_type' parameter and move
10553 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10556 2018-04-26 Pedro Alves <palves@redhat.com>
10558 * c-exp.y (variable production): Skip finding an alias for ifunc
10561 2018-04-26 Pedro Alves <palves@redhat.com>
10563 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10565 2018-04-25 Pedro Alves <palves@redhat.com>
10567 * infcmd.c (kill_command): Print the pid as string, not the whole
10568 thread's ptid. Add comment. s/has been killed/killed/ in output
10570 * remote.c (remote_detach_1): Print the pid as string, not the
10571 whole thread's ptid.
10573 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10574 Sergio Durigan Junior <sergiodj@redhat.com>
10575 Pedro Alves <palves@redhat.com>
10577 * infcmd.c (kill_command): Print message when inferior has
10579 * inferior.c (print_inferior_events): Remove 'static'. Set as
10581 (add_inferior): Improve message printed when
10582 'print_inferior_events' is on.
10583 (exit_inferior): Remove message printed when
10584 'print_inferior_events' is on.
10585 (detach_inferior): Improve message printed when
10586 'print_inferior_events' is on.
10587 (initialize_inferiors): Use 'add_inferior_silent' to set
10588 'current_inferior_'.
10589 * inferior.h (print_inferior_events): Declare here as
10591 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10592 '[Detaching...]' messages when 'print_inferior_events' is on.
10593 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10594 as prefix/suffix for messages. Remove periods. Fix erroneous
10595 'Detaching after fork from child...', replace it by '... from
10597 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10598 prefix/suffix when printing 'Detaching...' messages. Print
10599 them when 'print_inferior_events' is on.
10600 * remote.c (remote_detach_1): Print message when detaching
10601 from inferior and '!is_fork_parent'.
10603 2018-04-24 Tom Tromey <tom@tromey.com>
10605 * cli-out.h: Reindent.
10607 2018-04-24 Tom Tromey <tom@tromey.com>
10609 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10610 (cli_ui_out::do_field_string): Use fputs_filtered.
10611 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10613 2018-04-23 Tom Tromey <tom@tromey.com>
10615 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10616 gdb::unique_xmalloc_ptr.
10618 2018-04-23 Tom Tromey <tom@tromey.com>
10620 * configure: Rebuild.
10622 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10625 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10626 prepare_for_testing. Set normal_bp to r_debug_state if target
10629 2018-04-21 Pedro Alves <palves@redhat.com>
10630 Rajendra SY <rajendra.sy@gmail.com>
10632 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10633 * remote.c (extended_remote_attach): In all-stop mode, mark the
10634 thread as executing.
10636 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10638 * thread.c (thread_apply_all_command): Fix comment.
10639 (thread_command): Fix comment.
10641 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10643 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10645 * features/aarch64-core.c (create_feature_aarch64_core):
10647 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10649 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10651 * features/i386/32bit-avx512.c
10652 (create_feature_i386_32bit_avx512): Likewise.
10653 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10655 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10657 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10659 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10661 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10663 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10665 * features/i386/64bit-avx512.c
10666 (create_feature_i386_64bit_avx512): Likewise.
10667 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10669 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10671 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10673 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10675 * features/i386/64bit-segments.c
10676 (create_feature_i386_64bit_segments): Likewise.
10677 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10679 * features/i386/x32-core.c
10680 (create_feature_i386_x32_core): Likewise.
10681 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10682 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10683 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10684 * target-descriptions.c: In generated code, don't pass xml
10687 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10689 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10690 (print_xml_feature::visit_post): Likewise.
10691 (print_xml_feature::visit): Likewise.
10692 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10693 (print_xml_feature): Add new class.
10694 * regformats/regdat.sh: Null xmltarget on feature targets.
10695 * target-descriptions.c (struct target_desc): Add xmltarget.
10696 (maintenance_check_tdesc_xml_convert): Add unittest function.
10697 (tdesc_get_features_xml): Add function to get xml.
10698 (maintenance_check_xml_descriptions): Test xml generation.
10699 * xml-tdesc.c (string_read_description_xml): Add function.
10700 * xml-tdesc.h (string_read_description_xml): Add declaration.
10702 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10704 * features/Makefile: Add feature marker to targets with new style
10705 target descriptions.
10706 * regformats/aarch64.dat: Regenerate.
10707 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10708 * regformats/i386/amd64-avx-linux.dat: Likewise.
10709 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10710 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10711 * regformats/i386/amd64-linux.dat: Likewise.
10712 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10713 * regformats/i386/amd64.dat: Likewise.
10714 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10715 * regformats/i386/i386-avx-linux.dat: Likewise.
10716 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10717 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10718 * regformats/i386/i386-linux.dat: Likewise.
10719 * regformats/i386/i386-mmx-linux.dat: Likewise.
10720 * regformats/i386/i386-mpx-linux.dat: Likewise.
10721 * regformats/i386/i386.dat: Likewise.
10722 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10723 * regformats/i386/x32-avx-linux.dat: Likewise.
10724 * regformats/i386/x32-linux.dat: Likewise.
10725 * regformats/tic6x-c62x-linux.dat: Likewise.
10726 * regformats/tic6x-c64x-linux.dat: Likewise.
10727 * regformats/tic6x-c64xp-linux.dat: Likewise.
10728 * regformats/regdat.sh: Parse feature marker.
10730 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10732 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10733 (tdesc_osabi_name): Likewise.
10734 * target-descriptions.c (tdesc_architecture_name): Add new
10736 (tdesc_osabi_name): Likewise.
10738 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10740 * common/tdesc.c (tdesc_predefined_type): Move to here.
10741 (tdesc_named_type): Likewise.
10742 (tdesc_create_vector): Likewise.
10743 (tdesc_create_struct): Likewise.
10744 (tdesc_set_struct_size): Likewise.
10745 (tdesc_create_union): Likewise.
10746 (tdesc_create_flags): Likewise.
10747 (tdesc_create_enum): Likewise.
10748 (tdesc_add_field): Likewise.
10749 (tdesc_add_typed_bitfield): Likewise.
10750 (tdesc_add_bitfield): Likewise.
10751 (tdesc_add_flag): Likewise.
10752 (tdesc_add_enum_value): Likewise.
10753 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10754 (struct tdesc_type_vector): Likewise.
10755 (struct tdesc_type_field): Likewise.
10756 (struct tdesc_type_with_fields): Likewise.
10757 (tdesc_create_enum): Add declaration.
10758 (tdesc_add_typed_bitfield): Likewise.
10759 (tdesc_add_enum_value): Likewise.
10760 * target-descriptions.c (tdesc_type_field): Move from here.
10761 (tdesc_type_builtin): Likewise.
10762 (tdesc_type_vector): Likewise.
10763 (tdesc_type_with_fields): Likewise.
10764 (tdesc_predefined_types): Likewise.
10765 (tdesc_named_type): Likewise.
10766 (tdesc_create_vector): Likewise.
10767 (tdesc_create_struct): Likewise.
10768 (tdesc_set_struct_size): Likewise.
10769 (tdesc_create_union): Likewise.
10770 (tdesc_create_flags): Likewise.
10771 (tdesc_create_enum): Likewise.
10772 (tdesc_add_field): Likewise.
10773 (tdesc_add_typed_bitfield): Likewise.
10774 (tdesc_add_bitfield): Likewise.
10775 (tdesc_add_flag): Likewise.
10776 (tdesc_add_enum_value): Likewise.
10777 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10778 (tdesc_add_typed_bitfield): Likewise.
10779 (tdesc_add_enum_value): Likewise.
10781 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10783 * common/tdesc.c (tdesc_feature::accept): Move to here.
10784 (tdesc_feature::operator==): Likewise.
10785 (tdesc_create_reg): Likewise.
10786 * common/tdesc.h (tdesc_type_kind): Likewise.
10787 (struct tdesc_type): Likewise.
10788 (struct tdesc_feature): Likewise.
10789 * regformats/regdat.sh: Create a feature.
10790 * target-descriptions.c (tdesc_type_kind): Move from here.
10791 (tdesc_type): Likewise.
10792 (tdesc_type_up): Likewise.
10793 (tdesc_feature): Likewise.
10794 (tdesc_create_reg): Likewise.
10796 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10798 * Makefile.in: Add arch/tdesc.c
10799 * common/tdesc.c: New file.
10800 * common/tdesc.h (tdesc_element_visitor): Move to here.
10801 (tdesc_element): Likewise.
10802 (tdesc_reg): Likewise.
10803 (tdesc_reg_up): Likewise.
10804 * regformats/regdef.h (reg): Add offset to constructors.
10805 * target-descriptions.c (tdesc_element_visitor): Move from here.
10806 (tdesc_element): Likewise.
10807 (tdesc_reg): Likewise.
10808 (tdesc_reg_up): Likewise.
10810 2018-04-17 Tom Tromey <tom@tromey.com>
10812 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10813 discriminant field.
10815 2018-04-17 Tom Tromey <tom@tromey.com>
10817 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10819 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10821 * symtab.c (print_symbol_info): Skip printing filename and line
10822 number when `last' is NULL.
10823 (symtab_symbol_info): Use empty string instead of NULL for first
10824 invocation of print_symbol_info.
10825 (rbreak_command): Pass NULL to `last' parameter of
10828 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10830 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10831 instead of nullptr.
10833 2018-04-16 Pedro Alves <palves@redhat.com>
10835 * MAINTAINERS (sh): Remove.
10836 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10837 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10838 (ALLDEPFILES): Remove sh64-tdep.c.
10839 * NEWS: Mentions that support for SH-5/SH64 is removed.
10840 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10841 (sh*-*-openbsd*): Ditto.
10842 (sh64-*-elf*): Remove.
10844 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10845 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10846 * sh-tdep.c: No longer include "sh64-tdep.h".
10847 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10848 * sh64-tdep.c, sh64-tdep.h: Remove files.
10850 2018-04-16 Pedro Alves <palves@redhat.com>
10852 * MAINTAINERS: Remove m88k.
10853 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10854 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10855 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10856 * NEWS: Mention that support for m88k was removed.
10857 * configure.host (m88*-*-*): Remove support.
10858 * configure.nat (m88k-*-*): Remove support.
10859 * configure.tgt (m88*-*-openbsd*): Remove.
10860 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10862 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10864 * configure.tgt (x86_tobjs): New variable.
10865 (amd64_tobjs, i386_tobjs): Use it.
10867 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10869 * symtab.c (print_symbol_info): Precede the symbol definition by
10870 the line number when available.
10871 * NEWS: Advertise this enhancement.
10873 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10875 * NEWS (New options): announce set/show record btrace cpu.
10876 * btrace.c: Include record-btrace.h.
10877 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10878 the vendor is unknown.
10879 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10880 Maybe overwrite the btrace configuration's cpu.
10881 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10882 (btrace_fetch): Add cpu parameter. Update callers.
10883 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10884 Maybe overwrite the btrace configuration's cpu. Skip enabling
10885 errata workarounds if the vendor is unknown.
10886 * python/py-record-btrace.c: Include record-btrace.h.
10887 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10888 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10889 * record-btrace.c (record_btrace_cpu_state_kind): New.
10890 (record_btrace_cpu): New.
10891 (set_record_btrace_cpu_cmdlist): New.
10892 (record_btrace_get_cpu): New.
10893 (require_btrace_thread, record_btrace_info)
10894 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10895 (cmd_set_record_btrace_cpu_none): New.
10896 (cmd_set_record_btrace_cpu_auto): New.
10897 (cmd_set_record_btrace_cpu): New.
10898 (cmd_show_record_btrace_cpu): New.
10899 (_initialize_record_btrace): Initialize set/show record btrace cpu
10901 * record-btrace.h (record_btrace_get_cpu): New.
10903 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10905 * record.c (set_record_command): Fix typo in message.
10907 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10909 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10911 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10913 * infrun.c (process_event_stop_test): Call
10914 gdbarch_in_indirect_branch_thunk.
10915 * gdbarch.sh (in_indirect_branch_thunk): New.
10916 * gdbarch.c: Regenerated.
10917 * gdbarch.h: Regenerated.
10920 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10921 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10922 (ALLDEPFILES): Add x86-tdep.c.
10923 * arch-utils.h (default_in_indirect_branch_thunk): New.
10924 * arch-utils.c (default_in_indirect_branch_thunk): New.
10925 * i386-tdep: Include x86-tdep.h.
10926 (i386_in_indirect_branch_thunk): New.
10927 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10929 * amd64-tdep: Include x86-tdep.h.
10930 (amd64_in_indirect_branch_thunk): New.
10931 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10933 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10936 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10937 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10938 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10941 2018-04-12 Tom Tromey <tom@tromey.com>
10943 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10944 (rust_evaluate_subexp): Likewise.
10946 2018-04-12 Pedro Alves <palves@redhat.com>
10948 * procfs.c (procfs_detach): Make forward declaration's prototype
10949 match definition's protototype.
10950 (proc_get_LDT_entry): Remove stale do_cleanups call.
10952 2018-04-12 Pedro Alves <palves@redhat.com>
10954 * target.h (target_ops::to_has_exited): Delete.
10955 (target_has_exited): Delete.
10956 * target-delegates.c: Regenerate.
10958 2018-04-11 Pedro Alves <palves@redhat.com>
10960 * target.c (fileio_fh_t::t): Add comment.
10961 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10962 (target_fileio_close): Handle a NULL target.
10963 (invalidate_fileio_fh): New.
10964 (target_close): Call it.
10965 * remote.c (remote_hostio_send_command): No longer check whether
10966 remote_desc is open.
10968 2018-04-11 Pedro Alves <palves@redhat.com>
10970 * target.c (fileio_fh_t): Make it a named struct instead of a
10972 (fileio_fh_t::is_closed): New method.
10973 (DEF_VEC_O (fileio_fh_t)): Remove.
10974 (fileio_fhandles): Now a std::vector.
10975 (is_closed_fileio_fh): Delete.
10976 (acquire_fileio_fd): Adjust. Rename parameters.
10977 (release_fileio_fd): Adjust.
10978 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10979 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10980 (target_fileio_close): Adjust.
10982 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10984 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10987 2018-04-10 Pedro Alves <palves@redhat.com>
10989 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10990 (scoped_finish_thread_state): New class.
10991 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10993 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10994 (fetch_inferior_event, normal_stop): Likewise.
10995 * thread.c (finish_thread_state_cleanup): Delete.
10997 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10998 Pedro Alves <palves@redhat.com>
11000 * value.c: Include "selftest.h" and "common/array-view.h".
11001 (struct range) <operator ==>: New.
11002 (test_ranges_contain): New.
11003 (check_ranges_vector): New.
11004 (test_insert_into_bit_range_vector): New.
11005 (_initialize_values): Register selftests.
11006 * common/array-view.h (operator==, operator!=): New.
11008 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11010 * common/gdb_vecs.h (unordered_remove): Add overload that takes
11012 * inline-frame.c: Include <algorithm>.
11013 (struct inline_state): Add constructor.
11014 (inline_state_s): Remove.
11015 (DEF_VEC_O(inline_state_s)): Remove.
11016 (inline_states): Change type to std::vector.
11017 (find_inline_frame_state): Adjust to std::vector.
11018 (allocate_inline_frame_state): Remove.
11019 (clear_inline_frame_state): Adjust to std::vector.
11020 (skip_inline_frames): Adjust to std::vector.
11022 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11024 * tracepoint.h (struct trace_state_variable): Add constructor.
11025 <name>: Change type to std::string.
11026 * tracepoint.c (tsv_s): Remove.
11027 (DEF_VEC_O(tsv_s)): Remove.
11028 (tvariables): Change to std::vector.
11029 (create_trace_state_variable): Adjust to std::vector.
11030 (find_trace_state_variable): Likewise.
11031 (find_trace_state_variable_by_number): Likewise.
11032 (delete_trace_state_variable): Likewise.
11033 (trace_variable_command): Adjust to std::string.
11034 (delete_trace_variable_command): Likewise.
11035 (tvariables_info_1): Adjust to std::vector.
11036 (save_trace_state_variables): Likewise.
11037 (start_tracing): Likewise.
11038 (merge_uploaded_trace_state_variables): Adjust to std::vector
11040 * target.h (struct target_ops)
11041 <to_download_trace_state_variable>: Pass reference to
11042 trace_state_variable.
11043 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11044 * target-delegates.c: Re-generate.
11045 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11046 (mi_tsv_deleted): Likewise.
11047 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11048 * remote.c (remote_download_trace_state_variable): Change
11049 pointer to reference and adjust.
11050 * make-target-delegates (parse_argtypes): Handle references.
11051 (write_function_header): Likewise.
11052 (munge_type): Likewise.
11054 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11056 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11057 string_view-selftests.c.
11058 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11060 * unittests/basic_string_view/cons/char/1.cc: Likewise.
11061 * unittests/basic_string_view/cons/char/2.cc: Likewise.
11062 * unittests/basic_string_view/cons/char/3.cc: Likewise.
11063 * unittests/basic_string_view/element_access/char/1.cc:
11065 * unittests/basic_string_view/element_access/char/empty.cc:
11067 * unittests/basic_string_view/element_access/char/front_back.cc:
11069 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11070 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11072 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11074 * unittests/basic_string_view/modifiers/swap/char/1.cc:
11076 * unittests/basic_string_view/operations/compare/char/1.cc:
11078 * unittests/basic_string_view/operations/compare/char/13650.cc:
11080 * unittests/basic_string_view/operations/copy/char/1.cc:
11082 * unittests/basic_string_view/operations/data/char/1.cc:
11084 * unittests/basic_string_view/operations/find/char/1.cc:
11086 * unittests/basic_string_view/operations/find/char/2.cc:
11088 * unittests/basic_string_view/operations/find/char/3.cc:
11090 * unittests/basic_string_view/operations/find/char/4.cc:
11092 * unittests/basic_string_view/operations/rfind/char/1.cc:
11094 * unittests/basic_string_view/operations/rfind/char/2.cc:
11096 * unittests/basic_string_view/operations/rfind/char/3.cc:
11098 * unittests/basic_string_view/operations/substr/char/1.cc:
11100 * unittests/basic_string_view/operators/char/2.cc: Likewise.
11101 * unittests/string_view-selftests.c: New file.
11103 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11105 * unittests/basic_string_view/capacity/1.cc: New file.
11106 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11107 * unittests/basic_string_view/cons/char/1.cc: New file.
11108 * unittests/basic_string_view/cons/char/2.cc: New file.
11109 * unittests/basic_string_view/cons/char/3.cc: New file.
11110 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11111 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11112 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11113 * unittests/basic_string_view/element_access/char/1.cc: New file.
11114 * unittests/basic_string_view/element_access/char/2.cc: New file.
11115 * unittests/basic_string_view/element_access/char/empty.cc: New file.
11116 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11117 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11118 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11119 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11120 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11121 * unittests/basic_string_view/include.cc: New file.
11122 * unittests/basic_string_view/inserters/char/1.cc: New file.
11123 * unittests/basic_string_view/inserters/char/2.cc: New file.
11124 * unittests/basic_string_view/inserters/char/3.cc: New file.
11125 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11126 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11127 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11128 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11129 * unittests/basic_string_view/literals/types.cc: New file.
11130 * unittests/basic_string_view/literals/values.cc: New file.
11131 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11132 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11133 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11134 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11135 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11136 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11137 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11138 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11139 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11140 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11141 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11142 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11143 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11144 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11145 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11146 * unittests/basic_string_view/operations/data/char/1.cc: New file.
11147 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11148 * unittests/basic_string_view/operations/find/char/1.cc: New file.
11149 * unittests/basic_string_view/operations/find/char/2.cc: New file.
11150 * unittests/basic_string_view/operations/find/char/3.cc: New file.
11151 * unittests/basic_string_view/operations/find/char/4.cc: New file.
11152 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11153 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11154 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11155 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11156 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11157 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11158 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11159 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11160 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11161 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11162 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11163 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11164 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11165 * unittests/basic_string_view/operators/char/2.cc: New file.
11166 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11167 * unittests/basic_string_view/range_access/char/1.cc: New file.
11168 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11169 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11170 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11171 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11172 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11173 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11174 * unittests/basic_string_view/requirements/typedefs.cc: New file.
11175 * unittests/basic_string_view/typedefs.cc: New file.
11176 * unittests/basic_string_view/types/1.cc: New file.
11178 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11180 * common/gdb_string_view.h: Remove libstdc++ implementation
11181 details, adjust to gdb reality.
11182 * common/gdb_string_view.tcc: Likewise.
11183 * cli/cli-script.c (struct string_view): Remove.
11184 (user_args) <m_args>: Change element type to gdb::string_view.
11185 (user_args::insert_args): Adjust.
11187 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11189 * common/gdb_string_view.h: New file.
11190 * common/gdb_string_view.tcc: New file.
11192 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11194 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11195 * configure: Re-generate.
11197 2018-04-09 Pedro Alves <palves@redhat.com>
11199 * gdbarch.sh: Include "observable.h" instead of "observer.h".
11200 (set_target_gdbarch): Call
11201 gdb::observers::architecture_changed.notify instead of
11202 observer_notify_architecture_changed.
11204 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11206 * tracepoint.c (struct current_traceframe_cleanup): Remove.
11207 (do_restore_current_traceframe_cleanup): Remove.
11208 (restore_current_traceframe_cleanup_dtor): Remove.
11209 (make_cleanup_restore_current_traceframe): Remove.
11210 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11212 * tracepoint.h (struct scoped_restore_current_traceframe): New.
11213 * infrun.c (fetch_inferior_event): Use
11214 scoped_restore_current_traceframe.
11216 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11218 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11220 <n_allocated_type_units>: Remove.
11221 <all_type_units>: Change to std::vector.
11222 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11223 to std::vector change.
11224 (dwarf2_per_objfile::get_cutu): Likewise.
11225 (dwarf2_per_objfile::get_tu): Likewise.
11226 (create_signatured_type_table_from_index): Likewise.
11227 (create_signatured_type_table_from_debug_names): Likewise.
11228 (dw2_symtab_iter_next): Likewise.
11229 (dw2_print_stats): Likewise.
11230 (dw2_expand_all_symtabs): Likewise.
11231 (dw2_expand_marked_cus): Likewise.
11232 (dw2_debug_names_iterator::next): Likewise.
11233 (dwarf2_initialize_objfile): Likewise.
11234 (add_signatured_type_cu_to_table): Likewise.
11235 (create_all_type_units): Likewise.
11236 (add_type_unit): Likewise.
11237 (struct tu_abbrev_offset): Add constructor.
11238 (build_type_psymtabs_1): Adjust to std::vector change.
11239 (print_tu_stats): Likewise.
11240 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11241 (write_debug_names): Likewise.
11243 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11245 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11246 Make an std::vector.
11247 <n_comp_units>: Remove.
11248 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11249 to std::vector change.
11250 (dwarf2_per_objfile::get_cutu): Likewise.
11251 (dwarf2_per_objfile::get_cu): Likewise.
11252 (create_cus_from_index): Likewise.
11253 (create_addrmap_from_index): Likewise.
11254 (create_addrmap_from_aranges): Likewise.
11255 (dwarf2_read_index): Likewise.
11256 (dw2_find_last_source_symtab): Likewise.
11257 (dw2_map_symtabs_matching_filename): Likewise.
11258 (dw2_symtab_iter_next): Likewise.
11259 (dw2_print_stats): Likewise.
11260 (dw2_expand_all_symtabs): Likewise.
11261 (dw2_expand_symtabs_with_fullname): Likewise.
11262 (dw2_expand_marked_cus): Likewise.
11263 (dw2_map_symbol_filenames): Likewise.
11264 (create_cus_from_debug_names): Likewise.
11265 (dwarf2_read_debug_names): Likewise.
11266 (dw2_debug_names_iterator::next): Likewise.
11267 (dwarf2_initialize_objfile): Likewise.
11268 (set_partial_user): Likewise.
11269 (dwarf2_build_psymtabs_hard): Likewise.
11270 (read_comp_units_from_section): Remove arguments, adjust to
11271 std::vector change.
11272 (create_all_comp_units): Adjust to std::vector and
11273 read_comp_units_from_section changes.
11274 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11276 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11277 (psyms_seen_size): Likewise.
11278 (write_gdbindex): Likewise.
11279 (write_debug_names): Likewise.
11281 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11283 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11284 with dwarf2_per_objfile.
11285 (create_cus_from_index): Likewise.
11286 (create_signatured_type_table_from_index): Likewise.
11287 (dwarf2_read_index): Likewise.
11288 (dwarf2_initialize_objfile): Likewise.
11289 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11290 per_cu rather than get_dwarf2_per_objfile.
11292 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11294 * dwarf2read.h (struct signatured_type): Forward declare.
11295 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11297 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11298 (dw2_get_cutu): ...this.
11299 (dwarf2_per_objfile::get_cu): Rename from...
11300 (dw2_get_cu): ...this.
11301 (dwarf2_per_objfile::get_tu): New.
11302 (create_addrmap_from_index): Adjust.
11303 (create_addrmap_from_aranges): Adjust.
11304 (dw2_find_last_source_symtab): Adjust.
11305 (dw2_map_symtabs_matching_filename): Adjust.
11306 (dw2_symtab_iter_next): Adjust.
11307 (dw2_print_stats): Adjust.
11308 (dw2_expand_all_symtabs): Adjust.
11309 (dw2_expand_symtabs_with_fullname): Adjust.
11310 (dw2_expand_marked_cus): Adjust.
11311 (dw_expand_symtabs_matching_file_matcher): Adjust.
11312 (dw2_map_symbol_filenames): Adjust.
11313 (dw2_debug_names_iterator::next): Adjust.
11314 (dwarf2_initialize_objfile): Adjust.
11315 (set_partial_user): Adjust.
11316 (dwarf2_build_psymtabs_hard): Adjust.
11318 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11320 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11321 Remove unused variables.
11322 (dw2_map_symtabs_matching_filename): Likewise.
11323 (dwarf2_record_block_ranges): Likewise.
11324 (dwarf2_read_addr_index): Likewise.
11325 (follow_die_offset): Likewise.
11327 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11329 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11330 to symbol_file_add_main.
11332 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11335 * mi/mi-console.c (do_fputc_async_safe): New.
11336 (mi_console_file::write_async_safe): New.
11337 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11338 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11340 * ui-file.c (ui_file::putstrn): Adjust call to
11341 fputstrn_unfiltered.
11342 * utils.c (printchar): Replace do_fputs and do_fprintf
11343 parameters by do_fputc.
11344 (fputstr_filtered): Adjust call to printchar.
11345 (fputstr_unfiltered): Likewise.
11346 (fputstrn_filtered): Likewise.
11347 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11349 * utils.h (do_fputc_ftype): New typedef.
11350 (fputstrn_unfiltered): Add do_fputc parameter.
11352 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11354 * regformats/i386/i386-avx.dat: Remove.
11356 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11359 * amd64-tdep.c (amd64_none_init_abi): New function.
11360 (amd64_x32_none_init_abi): New function.
11361 (_initialize_amd64_tdep): Register handlers for x86-64 and
11362 x64_32 with GDB_OSABI_NONE.
11363 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11364 GDB_OSABI_NONE osabi.
11366 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11369 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11371 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11372 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11374 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11376 * common/byte-vector.h (char_vector): New type.
11377 * target.h (target_read_alloc): Return
11378 gdb::optional<byte_vector>.
11379 (target_read_stralloc): Return gdb::optional<char_vector>.
11380 (target_get_osdata): Return gdb::optional<char_vector>.
11381 * target.c (target_read_alloc_1): Templatize. Replacement
11382 manual memory management with vector.
11383 (target_read_alloc): Change return type, adjust.
11384 (target_read_stralloc): Change return type, adjust.
11385 (target_get_osdata): Change return type, adjust.
11386 * auxv.c (struct auxv_info) <length>: Remove.
11387 <data>: Change type to gdb::optional<byte_vector>.
11388 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11389 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11390 (target_auxv_search): Adjust.
11391 (fprint_target_auxv): Adjust.
11392 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11393 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11394 (linux_make_corefile_notes): Adjust.
11395 * osdata.c (get_osdata): Adjust.
11396 * remote.c (remote_get_threads_with_qxfer): Adjust.
11397 (remote_memory_map): Adjust.
11398 (remote_traceframe_info): Adjust.
11399 (btrace_read_config): Adjust.
11400 (remote_read_btrace): Adjust.
11401 (remote_pid_to_exec_file): Adjust.
11402 * solib-aix.c (solib_aix_get_library_list): Adjust.
11403 * solib-dsbt.c (decode_loadmap): Don't free buf.
11404 (dsbt_get_initial_loadmaps): Adjust.
11405 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11406 * solib-target.c (solib_target_current_sos): Adjust.
11407 * tracepoint.c (sdata_make_value): Adjust.
11408 * xml-support.c (xinclude_start_include): Adjust.
11409 (xml_fetch_content_from_file): Adjust.
11410 * xml-support.h (xml_fetch_another): Change return type.
11411 (xml_fetch_content_from_file): Change return type.
11412 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11413 * xml-tdesc.c (file_read_description_xml): Adjust.
11414 (fetch_available_features_from_target): Change return type.
11415 (target_fetch_description_xml): Adjust.
11416 (target_read_description_xml): Adjust.
11418 2018-04-06 Tom Tromey <tom@tromey.com>
11420 * value.c (~value): Update.
11421 (struct value) <contents>: Now unique_xmalloc_ptr.
11422 (value_contents_bits_eq, allocate_value_contents)
11423 (value_contents_raw, value_contents_all_raw)
11424 (value_contents_for_printing, value_contents_for_printing_const)
11425 (set_value_enclosing_type): Update.
11427 2018-04-06 Tom Tromey <tom@tromey.com>
11429 * value.c (range_s): Remove typedef, VEC.
11430 (struct range): Add operator<.
11431 (range_lessthan): Remove.
11432 (ranges_contain): Change type.
11434 (struct value) <unavailable, optimized_out>: Now std::vector.
11435 (value_entirely_available)
11436 (value_entirely_covered_by_range_vector)
11437 (value_entirely_unavailable, value_entirely_optimized_out):
11439 (insert_into_bit_range_vector): Change argument type.
11440 (find_first_range_overlap): Likewise.
11441 (struct ranges_and_idx, value_contents_bits_eq)
11442 (require_not_optimized_out, require_available): Update.
11443 (ranges_copy_adjusted): Change argument types.
11444 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11446 2018-04-06 Tom Tromey <tom@tromey.com>
11448 * value.c (~value): Update.
11449 (struct value) <parent>: Now a value_ref_ptr.
11450 (value_parent, set_value_parent, value_address, value_copy):
11453 2018-04-06 Tom Tromey <tom@tromey.com>
11455 * value.c (struct value): Add constructor, destructor, and member
11457 (allocate_value_lazy, value_decref): Update.
11459 2018-04-06 Tom Tromey <tom@tromey.com>
11461 * value.c (struct value) <released, next>: Remove.
11462 (all_values): Now a std::vector.
11463 (allocate_value_lazy): Update.
11464 (value_next): Remove.
11465 (value_mark, value_free_to_mark, release_value)
11466 (value_release_to_mark): Update.
11468 2018-04-06 Tom Tromey <tom@tromey.com>
11470 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11471 (free_value_chain): Remove.
11472 * value.c (free_value_chain): Remove.
11473 (value_release_to_mark): Return a std::vector.
11474 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11476 (check_condition): Update.
11477 * eval.c (fetch_subexp_value): Change "val_chain" to a
11479 * breakpoint.c (update_watchpoint): Update.
11480 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11482 2018-04-06 Tom Tromey <tom@tromey.com>
11484 * value.h (free_all_values): Remove.
11485 * value.c (free_all_values): Remove.
11487 2018-04-06 Tom Tromey <tom@tromey.com>
11489 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11490 (value_history_chain, value_history_count): Remove.
11491 (value_history): New global.
11492 (record_latest_value, access_value_history, show_values)
11493 (preserve_values): Update.
11495 2018-04-06 Tom Tromey <tom@tromey.com>
11497 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11498 * varobj.c (varobj_set_display_format, varobj_set_value)
11499 (install_default_visualizer, construct_visualizer)
11500 (install_new_value, ~varobj, varobj_get_value_type)
11501 (my_value_of_variable, varobj_editable_p): Update.
11502 * c-varobj.c (c_describe_child, c_value_of_variable)
11503 (cplus_number_of_children, cplus_describe_child): Update.
11504 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11505 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11506 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11508 2018-04-06 Tom Tromey <tom@tromey.com>
11510 * printcmd.c (last_examine_address): Change type to
11512 (do_examine, x_command): Update.
11514 2018-04-06 Tom Tromey <tom@tromey.com>
11516 * value.c (release_value): Update.
11517 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11518 (struct bpstats) <val>: Now a value_ref_ptr.
11519 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11520 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11521 (~watchpoint, print_it_watchpoint, watch_command_1)
11522 (invalidate_bp_value_on_memory_change): Update.
11524 2018-04-06 Tom Tromey <tom@tromey.com>
11526 * varobj.c (varobj_clear_saved_item)
11527 (update_dynamic_varobj_children, install_new_value, ~varobj):
11529 * value.h (value_incref): Move declaration earlier.
11530 (value_decref): Rename from value_free.
11531 (struct value_ref_policy): New.
11532 (value_ref_ptr): New typedef.
11533 (struct value_deleter): Remove.
11534 (gdb_value_up): Remove typedef.
11535 (release_value): Change return type.
11536 (release_value_or_incref): Remove.
11537 * value.c (set_value_parent): Update.
11538 (value_incref): Change return type.
11539 (value_decref): Rename from value_free.
11540 (value_free_to_mark, free_all_values, free_value_chain): Update.
11541 (release_value): Return value_ref_ptr.
11542 (release_value_or_incref): Remove.
11543 (record_latest_value, set_internalvar, clear_internalvar):
11545 * stack.c (info_frame_command): Don't call value_free.
11546 * python/py-value.c (valpy_dealloc, valpy_new)
11547 (value_to_value_object): Update.
11548 * printcmd.c (do_examine): Update.
11549 * opencl-lang.c (lval_func_free_closure): Update.
11550 * mi/mi-main.c (register_changed_p): Don't call value_free.
11551 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11552 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11553 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11555 * guile/scm-value.c (vlscm_free_value_smob)
11556 (vlscm_scm_from_value): Update.
11557 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11558 (frame_unwind_register_unsigned, get_frame_register_bytes)
11559 (put_frame_register_bytes): Don't call value_free.
11560 * findvar.c (address_from_register): Don't call value_free.
11561 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11562 * dwarf2loc.c (entry_data_value_free_closure)
11563 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11564 (dwarf2_evaluate_loc_desc_full): Update.
11565 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11566 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11567 (~watchpoint, watch_command_1)
11568 (invalidate_bp_value_on_memory_change): Update.
11569 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11571 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11574 * warning.m4: Add -Wno-error=deprecated-register.
11575 * configure: Re-generate.
11577 2018-04-05 Tom Tromey <tom@tromey.com>
11579 * linespec.h: Remove include of "vec.h".
11581 2018-04-05 Tom Tromey <tom@tromey.com>
11583 * linespec.c (typep): Remove typedef.
11584 (find_methods, find_superclass_methods): Take a std::vector.
11585 (find_method): Use std::vector.
11587 2018-04-05 Tom Tromey <tom@tromey.com>
11589 * utils.c (compare_strings): Remove.
11590 * utils.h (compare_strings): Remove.
11591 * objc-lang.h (find_imps): Update.
11592 * objc-lang.c (find_methods): Take a std::vector.
11593 (uniquify_strings, find_imps): Likewise.
11594 * linespec.c (find_methods): Take a std::vector.
11595 (decode_objc): Use std::vector.
11596 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11598 (find_method, find_function_symbols): Use std::vector.
11600 2018-04-05 Tom Tromey <tom@tromey.com>
11602 * completer.c (completion_tracker::completion_tracker): Remove
11604 (completion_tracker::discard_completions): Likewise.
11605 * breakpoint.c (ambiguous_names_p): Remove cast.
11606 * ada-lang.c (_initialize_ada_language): Remove cast.
11607 * utils.h (streq): Update.
11608 (streq_hash): Add new declaration.
11609 * utils.c (streq): Return bool.
11610 (streq_hash): New function.
11612 2018-04-05 Tom Tromey <tom@tromey.com>
11614 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11615 Remove a string copy.
11617 2018-04-05 Tom Tromey <tom@tromey.com>
11619 * linespec.c (filter_results): Use std::vector.
11620 (decode_line_2, decode_line_full): Update.
11622 2018-04-05 Tom Tromey <tom@tromey.com>
11624 * linespec.c (canonical_to_fullform): Return std::string.
11625 (filter_results): Update.
11626 (struct decode_line_2_item): Add constructor.
11627 <fullform, displayform>: Now std::string.
11628 (decode_line_2_compare_items): Now a std::sort comparator.
11629 (decode_line_2): Update.
11631 2018-04-05 Tom Tromey <tom@tromey.com>
11633 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11634 (unexpected_linespec_error): Update.
11635 (linespec_parse_basic, parse_linespec): Update.
11637 2018-04-05 Tom Tromey <tom@tromey.com>
11639 * linespec.c (linespec_parse_basic): Reindent.
11641 2018-04-05 Tom Tromey <tom@tromey.com>
11643 * minsyms.h (iterate_over_minimal_symbols): Update.
11644 * minsyms.c (iterate_over_minimal_symbols): Take a
11645 gdb::function_view.
11646 * linespec.c (struct collect_minsyms): Remove.
11647 (compare_msyms): Now a std::sort comparator.
11648 (add_minsym): Add parameters.
11649 (search_minsyms_for_name): Update. Use std::vector.
11651 2018-04-03 Tom Tromey <tom@tromey.com>
11653 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11656 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11658 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11660 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11663 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11664 printing static type.
11666 2018-04-01 Tom Tromey <tom@tromey.com>
11668 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11669 (rs6000_xfer_shared_libraries): Update.
11671 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11673 * common/gdb_vecs.h (char_ptr): Remove.
11674 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11676 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11678 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11680 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11682 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11684 * tracepoint.h (struct uploaded_tp): Initialize fields.
11685 <actions, step_actions, cmd_strings>: Change type to
11686 std::vector<char *>.
11687 * tracepoint.c (get_uploaded_tp): Allocate with new.
11688 (free_uploaded_tps): Free with delete.
11689 (parse_tracepoint_definition): Adjust to std::vector change.
11690 * breakpoint.c (read_uploaded_action): Likewise.
11691 (create_tracepoint_from_upload): Likewise.
11692 * ctf.c (ctf_write_uploaded_tp): Likewise.
11693 (SET_ARRAY_FIELD): Likewise.
11694 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11696 2018-03-30 Tom Tromey <tom@tromey.com>
11698 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11700 (svr4_keep_data_in_core): Update.
11701 (svr4_read_so_list): Update.
11703 2018-03-30 Tom Tromey <tom@tromey.com>
11705 * windows-nat.c (handle_output_debug_string, handle_exception):
11707 * target.h (target_read_string): Update.
11708 * target.c (target_read_string): Change "string" to
11709 unique_xmalloc_ptr.
11710 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11712 * solib-frv.c (frv_current_sos): Update.
11713 * solib-dsbt.c (dsbt_current_sos): Update.
11714 * solib-darwin.c (darwin_current_sos): Update.
11715 * linux-thread-db.c (inferior_has_bug): Update.
11716 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11717 Update. Remove alloca.
11718 * ada-lang.c (ada_main_name): Update.
11720 2018-03-30 Tom Tromey <tom@tromey.com>
11722 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11723 (struct dwo_file_deleter): New.
11724 (dwo_file_up): New typedef.
11725 (open_and_init_dwo_file): Use dwo_file_up.
11726 (free_dwo_file_cleanup): Remove.
11728 2018-03-30 Tom Tromey <tom@tromey.com>
11730 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11731 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11733 2018-03-30 Tom Tromey <tom@tromey.com>
11735 * dwarf2read.c (class free_cached_comp_units): New class.
11736 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11737 (free_cached_comp_units): Remove function.
11739 2018-03-30 Tom Tromey <tom@tromey.com>
11741 * utils.h (make_cleanup_unpush_target): Remove.
11742 * inf-ptrace.c (struct target_unpusher): New.
11743 (target_unpush_up) New typedef.
11744 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11746 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11748 2018-03-27 Tom Tromey <tom@tromey.com>
11750 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11752 2018-03-27 Pedro Alves <palves@redhat.com>
11753 Tom Tromey <tom@tromey.com>
11755 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11756 destructor. Now a class.
11757 (gdb_readline_wrapper_cleanup): Remove function.
11758 (gdb_readline_wrapper): Remove cleanups.
11760 2018-03-27 Tom Tromey <tom@tromey.com>
11762 * typeprint.h (struct type_print_options) <local_typedefs,
11763 global_typedefs>: Remove "struct" keyword.
11764 (class typedef_hash_table): New class.
11765 (recursively_update_typedef_hash, add_template_parameters)
11766 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11767 (find_typedef_in_hash): Don't declare.
11768 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11769 (typedef_hash_table::recursively_update): Rename from
11770 recursively_update_typedef_hash. Now a member.
11771 (typedef_hash_table::add_template_parameters): Rename from
11772 add_template_parameters. Now a member.
11773 (typedef_hash_table::typedef_hash_table): Now a constructor;
11774 rename from create_typedef_hash.
11775 (typedef_hash_table::~typedef_hash_table): Now a destructor;
11776 rename from free_typedef_hash.
11777 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11778 (do_free_global_table): Remove.
11779 (typedef_hash_table::typedef_hash_table): New constructor; renamed
11780 from copy_type_recursive.
11781 (create_global_typedef_table): Remove.
11782 (typedef_hash_table::find_global_typedef): Now a member of
11783 typedef_hash_table.
11784 (typedef_hash_table::find_typedef): Rename from
11785 find_typedef_in_hash; now a member.
11786 (whatis_exp): Update.
11787 * extension.h (struct ext_lang_type_printers): Add constructor and
11789 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11791 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11792 Now a constructor; rename from start_ext_lang_type_printers.
11793 (ext_lang_type_printers): Now a destructor; rename from
11794 free_ext_lang_type_printers.
11795 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11797 (c_type_print_base_struct_union): Update. Remove cleanups.
11799 2018-03-27 Tom Tromey <tom@tromey.com>
11801 * dwarf-index-write.c: Include <cmath>.
11803 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11805 * NEWS: Add entry describing new "set|show varsize-limit" command.
11806 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11808 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11811 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11813 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11814 dwarf-index-write.c
11815 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11816 * dwarf-index-common.c: New file.
11817 * dwarf-index-common.h: New file.
11818 * dwarf-index-write.c: New file.
11819 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11820 (struct dwarf2_section_info): Move from here.
11821 (dwarf2_section_info_def): Likewise.
11822 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11823 (offset_type): Likewise.
11824 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11825 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11826 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11827 (byte_swap): Likewise.
11828 (MAYBE_SWAP): Likewise.
11829 (dwarf2_per_cu_ptr): Likewise.
11830 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11831 (struct tu_stats): Likewise.
11832 (struct dwarf2_per_objfile): Likewise.
11833 (struct dwarf2_per_cu_data): Likewise.
11834 (struct signatured_type): Likewise.
11835 (sig_type_ptr): Likewise.
11836 (DEF_VEC_P (sig_type_ptr)): Likewise.
11837 (INDEX4_SUFFIX): Likewise.
11838 (INDEX5_SUFFIX): Likewise.
11839 (DEBUG_STR_SUFFIX): Likewise.
11840 (dwarf2_read_section): Make non-static.
11841 (mapped_index_string_hash): Move from here.
11842 (dwarf5_djb_hash): Likewise.
11843 (file_write): Likewise.
11844 (class data_buf): Likewise.
11845 (struct symtab_index_entry): Likewise.
11846 (struct mapped_symtab): Likewise.
11847 (find_slot): Likewise.
11848 (hash_expand): Likewise.
11849 (add_index_entry): Likewise.
11850 (uniquify_cu_indices): Likewise.
11851 (class c_str_view): Likewise.
11852 (class c_str_view_hasher): Likewise.
11853 (class vector_hasher): Likewise.
11854 (write_hash_table): Likewise.
11855 (psym_index_map): Likewise.
11856 (struct addrmap_index_data): Likewise.
11857 (add_address_entry): Likewise.
11858 (add_address_entry_worker): Likewise.
11859 (write_address_map): Likewise.
11860 (symbol_kind): Likewise.
11861 (write_psymbols): Likewise.
11862 (struct signatured_type_index_data): Likewise.
11863 (write_one_signatured_type): Likewise.
11864 (recursively_count_psymbols): Likewise.
11865 (recursively_write_psymbols): Likewise.
11866 (class debug_names): Likewise.
11867 (check_dwarf64_offsets): Likewise.
11868 (psyms_seen_size): Likewise.
11869 (write_gdbindex): Likewise.
11870 (write_debug_names): Likewise.
11871 (assert_file_size): Likewise.
11872 (write_psymtabs_to_index): Likewise.
11873 (save_gdb_index_command): Likewise.
11874 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11876 * dwarf2read.h: New file.
11878 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11881 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11882 symbol name if the CU's language stores symbol names in linkage
11884 * language.h (struct language_defn)
11885 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11886 all instances of this struct.
11888 2018-03-26 Tom Tromey <tom@tromey.com>
11890 * stack.c (backtrace_command_1): Remove verbose code.
11892 2018-03-26 Tom Tromey <tom@tromey.com>
11894 * python/py-framefilter.c (py_print_type): Don't catch
11895 exceptions. Return void.
11896 (py_print_value): Likewise.
11897 (py_print_single_arg): Likewise.
11898 (enumerate_args): Don't catch exceptions.
11899 (py_print_args): Likewise.
11900 (py_print_frame): Likewise.
11901 (gdbpy_apply_frame_filter): Catch exceptions here.
11903 2018-03-26 Tom Tromey <tom@tromey.com>
11905 * stack.c (_initialize_stack): Remove trailing newlines from help
11906 text. Add "Usage" line to "backtrace" help.
11908 2018-03-26 Tom Tromey <tom@tromey.com>
11911 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11913 2018-03-26 Tom Tromey <tom@tromey.com>
11915 * python/py-framefilter.c (py_print_single_arg): Return
11916 EXT_LANG_BT_ERROR from catch.
11918 2018-03-26 Tom Tromey <tom@tromey.com>
11920 PR backtrace/15584:
11921 * stack.c (backtrace_command_1): Move some code into no-filters
11924 2018-03-26 Tom Tromey <tom@tromey.com>
11926 * python/py-framefilter.c (throw_quit_or_print_exception): New
11928 (gdbpy_apply_frame_filter): Use it.
11930 2018-03-26 Tom Tromey <tom@tromey.com>
11933 * python/py-framefilter.c (py_print_type, py_print_value)
11934 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11937 2018-03-26 Tom Tromey <tom@tromey.com>
11939 * python/py-framefilter.c (enumerate_args): Use
11940 gdb::unique_xmalloc_ptr.
11942 2018-03-26 Tom Tromey <tom@tromey.com>
11944 * python/py-framefilter.c (py_print_frame): Return
11946 (gdbpy_apply_frame_filter): Update comment.
11947 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11949 <EXT_LANG_BT_NO_FILTERS>: Change value.
11951 2018-03-26 Tom Tromey <tom@tromey.com>
11953 PR backtrace/15582:
11954 * stack.c (backtrace_command): Parse "hide" argument.
11955 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11956 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11959 2018-03-26 Tom Tromey <tom@tromey.com>
11961 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11963 (backtrace_command): Remove "fulltrace", add "flags".
11965 2018-03-26 Tom Tromey <tom@tromey.com>
11967 * stack.c (backtrace_command): Rewrite command line parsing.
11969 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11971 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11973 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11975 * filename-seen-cache.h: Add include guard.
11977 2018-03-26 Keith Seitz <keiths@redhat.com>
11979 * symfile.c (place_section): Remove "struct" from section_addr_info
11981 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11982 "struct" keyword from section_addr_info.
11984 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11986 * regformats/regdef.h (reg): Add constructors.
11988 2018-03-25 Pedro Alves <palves@redhat.com>
11990 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11991 if then/else bodies in var_func_name extraction.
11993 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11995 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11996 lookup_minimal_symbol() to find symbol entry.
11997 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11999 2018-03-23 Keith Seitz <keiths@redhat.com>
12002 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12003 nested type definitions for C++, too.
12005 2018-03-23 Tom Tromey <tom@tromey.com>
12007 * machoread.c (struct oso_el): Add a constructor. Don't define as
12009 (macho_register_oso): Remove.
12010 (macho_symtab_read): Take a std::vector.
12011 (oso_el_compare_name): Now a std::sort comparator.
12012 (macho_symfile_read_all_oso): Take a std::vector.
12013 (macho_symfile_read): Use std::vector. Remove cleanups.
12015 2018-03-22 Tom Tromey <tom@tromey.com>
12017 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12018 (record_full_goto_bookmark): Use std::string.
12020 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12023 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12026 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12028 * rs6000-tdep.c (store_insn_p): New function.
12029 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12030 and cr_reg to their unshifted values. Use store_insn_p to
12031 match LR saves using either R1 or fdata->alloca_reg. Use
12032 store_insn_p to match CR saves. Set alloca_reg_offset
12033 when alloca_reg and framep are set. Remove lr_reg shift
12034 when assigning to fdata->lr_register.
12036 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
12038 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12039 command line args instead of emitting a warning.
12041 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12043 * tracepoint.h (struct static_tracepoint_marker): Initialize
12044 fields, define default constructor, move constructor and move
12045 assignment, disable the rest.
12046 <str_id, extra>: Make std::string.
12047 (release_static_tracepoint_marker): Remove.
12048 (free_current_marker): Remove.
12049 * tracepoint.c (free_current_marker): Remove.
12050 (parse_static_tracepoint_marker_definition): Adjust to
12051 std::string, use new hex2str overload.
12052 (release_static_tracepoint_marker): Remove.
12053 (print_one_static_tracepoint_marker): Get marker by reference
12054 and adjust to std::string.
12055 (info_static_tracepoint_markers_command): Adjust to std::vector
12057 * target.h (static_tracepoint_marker_p): Remove typedef.
12058 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12059 (struct target_ops) <to_static_tracepoint_marker_at>: Return
12061 <to_static_tracepoint_markers_by_strid>: Return std::vector.
12063 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12064 (target_debug_print_std_vector_static_tracepoint_marker): New.
12065 (target_debug_print_struct_static_tracepoint_marker_p): Rename
12067 (target_debug_print_static_tracepoint_marker_p): ... this.
12068 * target-delegates.c: Re-generate.
12069 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12071 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12072 (decode_static_tracepoint_spec): Adjust to std::vector.
12073 (tracepoint_print_one_detail): Adjust to std::string.
12074 (strace_marker_decode_location): Adjust to std::string.
12075 (update_static_tracepoint): Adjust to std::string, remove call
12076 to release_static_tracepoint_marker.
12077 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12078 Adjust to std::vector.
12079 * remote.c (remote_static_tracepoint_marker_at): Return bool.
12080 (remote_static_tracepoint_markers_by_strid): Adjust to
12082 * common/rsp-low.h (hex2str): New overload with explicit count
12084 * common/rsp-low.c (hex2str): New overload with explicit count
12086 * unittests/rsp-low-selftests.c (test_hex2str): New function.
12087 (_initialize_rsp_low_selftests): Add test_hex2str test.
12088 * unittests/tracepoint-selftests.c
12089 (test_parse_static_tracepoint_marker_definition): Adjust to
12092 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12094 * tracepoint.c (parse_static_tracepoint_marker_definition):
12095 Consider case where the definition is followed by more
12097 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12098 tracepoint-selftests.c.
12099 * unittests/tracepoint-selftests.c: New.
12101 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12103 * MAINTAINERS (Write After Approval): Add Pedro Franco de
12106 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12108 * symtab.c (find_pc_sect_line): fixed indentation.
12110 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12112 * symtab.c (find_pc_sect_line): now uses binary search.
12114 2018-03-19 Tom Tromey <tom@tromey.com>
12116 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12117 "IDENT" production.
12119 2018-03-19 Pedro Alves <palves@redhat.com>
12120 Tom Tromey <tom@tromey.com>
12122 * unittests/observable-selftests.c: New file.
12123 * common/observable.h: New file.
12124 * observable.h: New file.
12125 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12126 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12127 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12128 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12129 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12130 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12131 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12132 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12133 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12134 python/py-breakpoint.c, python/py-finishbreakpoint.c,
12135 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12136 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12137 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12138 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12139 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12140 tui/tui-interp.c, valops.c: Update all users.
12141 * tui/tui-hooks.c (tui_bp_created_observer)
12142 (tui_bp_deleted_observer, tui_bp_modified_observer)
12143 (tui_inferior_exit_observer, tui_before_prompt_observer)
12144 (tui_normal_stop_observer, tui_register_changed_observer):
12146 (tui_observers_token): New global.
12147 (attach_or_detach, tui_attach_detach_observers): New functions.
12148 (tui_install_hooks, tui_remove_hooks): Use
12149 tui_attach_detach_observers.
12150 * record-btrace.c (record_btrace_thread_observer): Remove.
12151 (record_btrace_thread_observer_token): New global.
12152 * observer.sh: Remove.
12153 * observer.c: Rename to observable.c.
12154 * observable.c (namespace gdb_observers): Define new objects.
12155 (observer_debug): Move into gdb_observers namespace.
12156 (struct observer, struct observer_list, xalloc_observer_list_node)
12157 (xfree_observer_list_node, generic_observer_attach)
12158 (generic_observer_detach, generic_observer_notify): Remove.
12159 (_initialize_observer): Update.
12160 Don't include observer.inc.
12161 * Makefile.in (generated_files): Remove observer.h, observer.inc.
12162 (clean mostlyclean): Likewise.
12163 (observer.h, observer.inc): Remove targets.
12164 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12165 (COMMON_SFILES): Use observable.c, not observer.c.
12166 * .gitignore: Remove observer.h.
12168 2018-03-18 Tom Tromey <tom@tromey.com>
12170 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12172 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12174 2018-03-17 Tom Tromey <tom@tromey.com>
12176 * auto-load.c (auto_load_objfile_script_1): Use std::string.
12178 2018-03-17 Tom Tromey <tom@tromey.com>
12180 * target.c (class scoped_target_fd): New.
12181 (target_fileio_close_cleanup): Remove.
12182 (target_fileio_read_alloc_1): Use scoped_target_fd.
12184 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12186 * silent-rules.mk: New.
12187 * Makefile.in: Include silent-rules.mk
12188 (srcdir, VPATH, top_srcdir): Move up.
12189 (COMPILE): Add ECHO_CXX.
12190 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12191 (init.c): Add ECHO_INIT_C.
12192 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12193 (version.c): Add ECHO_GEN.
12194 (printcmd.o): Add ECHO_CXX.
12195 (target-float.o): Add ECHO_CXX.
12196 (ada-exp.o): Add ECHO_CXX.
12197 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12198 (insight$(EXEEXT)): Add ECHO_CXXLD.
12199 * gnulib/configure.ac: Add AM_SILENT_RULES.
12200 * gnulib/aclocal.m4: Re-generate.
12201 * gnulib/configure: Re-generate.
12202 * gnulib/import/Makefile.in: Re-generate.
12204 2018-03-16 Tom Tromey <tom@tromey.com>
12206 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12207 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12208 * utils.c (do_free_section_addr_info)
12209 (make_cleanup_free_section_addr_info): Remove.
12210 * symfile.h (struct other_sections): Add constructor.
12211 (struct section_addr_info): Remove.
12212 (section_addr_info): New typedef.
12213 (struct sym_fns) <sym_offsets>: Change type of parameter.
12214 (build_section_addr_info_from_objfile)
12215 (relative_addr_info_to_section_offsets, addr_info_make_relative)
12216 (default_symfile_offsets, symbol_file_add)
12217 (symbol_file_add_from_bfd)
12218 (build_section_addr_info_from_section_table): Update.
12219 (alloc_section_addr_info, free_section_addr_info): Don't declare.
12220 * symfile.c (alloc_section_addr_info): Remove.
12221 (build_section_addr_info_from_section_table): Change return type.
12223 (build_section_addr_info_from_bfd)
12224 (build_section_addr_info_from_objfile): Likewise.
12225 (free_section_addr_info): Remove.
12226 (relative_addr_info_to_section_offsets): Change type of "addrs".
12227 (addrs_section_compar): Now a std::sort comparator.
12228 (addrs_section_sort): Change return type.
12229 (addr_info_make_relative): Change type of "addrs". Update.
12230 (default_symfile_offsets, syms_from_objfile_1)
12231 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12232 (symbol_file_add_separate): Update.
12233 (symbol_file_add): Change type of "addrs". Update.
12234 (add_symbol_file_command): Update. Remove cleanups.
12235 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
12237 * symfile-debug.c (debug_sym_offsets): Change type of "info".
12238 * solib.c (solib_read_symbols): Update.
12239 * objfiles.c (objfile_relocate): Update. Remove cleanups.
12240 * machoread.c (macho_symfile_offsets): Update.
12241 * jit.c (jit_bfd_try_read_symtab): Update.
12243 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
12245 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12246 unittests/utils-selftests.c.
12247 * unittests/utils-selftests.c: New file.
12249 2018-03-14 Tom Tromey <tom@tromey.com>
12252 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12255 2018-03-14 Tom Tromey <tom@tromey.com>
12258 * printcmd.c (printf_pointer): Allow "-" in format.
12260 2018-03-14 Tom Tromey <tom@tromey.com>
12262 * printcmd.c (_initialize_printcmd): Add usage to printf.
12264 2018-03-14 Yao Qi <qiyao@sourceware.org>
12266 * MAINTAINERS: Update my email address.
12268 2018-03-13 Tom Tromey <tom@tromey.com>
12270 * machoread.c (macho_check_dsym): Change filenamep to a
12272 (macho_symfile_read): Update.
12273 * symfile.c (load_command): Use std::string.
12275 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12277 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12278 to error message string.
12279 (riscv_register_name): Use xsnprintf instead of sprintf.
12280 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12282 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12284 (riscv_push_dummy_call): Likewise.
12286 2018-03-12 Tom Tromey <tom@tromey.com>
12288 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12289 Use gdb::byte_vector.
12290 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12292 2018-03-12 Yao Qi <yao.qi@linaro.org>
12294 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12295 parameter type to readable_regcache.
12296 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12299 2018-03-11 Tom Tromey <tom@tromey.com>
12301 * dwarf2read.c (struct nextfield): Add initializers.
12302 (struct nextfnfield): Remove.
12303 (struct fnfieldlist): Add initializers. Remove "length" and
12304 "head", use std::vector.
12305 (struct decl_field_list): Remove.
12306 (struct field_info): Add initializers.
12307 <fields, baseclasses>: Now std::vector.
12308 <nbaseclasses, nfnfields, typedef_field_list_count,
12309 nested_types_list_count>: Remove.
12310 (dwarf2_add_field, dwarf2_add_type_defn)
12311 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12312 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12313 (process_structure_scope): Update.
12315 2018-03-11 Tom Tromey <tom@tromey.com>
12317 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12318 for use by std::sort.
12319 (build_type_psymtabs_1): Use std::vector.
12321 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12323 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12324 and LIBMPFR in the printed configuration.
12326 2018-03-08 Tom Tromey <tom@tromey.com>
12328 * source.c (get_filename_and_charpos): Use scoped_fd.
12329 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12330 (procfs_pidlist): Likewise.
12331 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12332 (iterate_over_mappings): Likewise.
12334 2018-03-08 Tom Tromey <tom@tromey.com>
12336 * infcall.c (struct call_return_meta_info)
12337 <stack_temporaries_enabled>: Remove.
12338 (get_call_return_value, call_function_by_hand_dummy): Update.
12339 * thread.c (disable_thread_stack_temporaries): Remove.
12340 (enable_thread_stack_temporaries): Remove.
12341 (thread_stack_temporaries_enabled_p): Return bool.
12342 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12343 (get_last_thread_stack_temporary): Update.
12344 * eval.c (evaluate_subexp): Update.
12345 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12346 class, not a function.
12347 (value_ptr, value_vec): Remove typedefs.
12348 (class thread_info) <stack_temporaries_enabled>: Now bool.
12349 <stack_temporaries>: Now a std::vector.
12350 (thread_stack_temporaries_enabled_p)
12351 (value_in_thread_stack_temporaries): Return bool.
12353 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12355 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12356 (getpkt_or_notif_sane_1): Likewise.
12358 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12360 * build-id.c (build_id_to_debug_bfd): Use std::string.
12362 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12364 * build-id.c (find_separate_debug_file_by_buildid): Return
12366 * build-id.h (find_separate_debug_file_by_buildid): Return
12368 * coffread.c (coff_symfile_read): Adjust to std::string.
12369 * elfread.c (elf_symfile_read): Adjust to std::string.
12370 * symfile.c (separate_debug_file_exists): Change parameter to
12372 (find_separate_debug_file): Return std::string.
12373 (find_separate_debug_file_by_debuglink): Return std::string.
12374 * symfile.h (find_separate_debug_file_by_debuglink): Return
12377 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12379 * common/xml-utils.c (xml_escape_text): Move code to...
12380 (xml_escape_text_append): ... this new function.
12381 * common/xml-utils.h (xml_escape_text_append): New declaration.
12382 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12384 (_initialize_xml_utils): register test_xml_escape_text_append as
12387 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12389 * defs.h: Remove MAX_REGISTER_SIZE.
12390 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12392 * python/py-unwind.c (pyuw_sniffer): Likewise.
12394 2018-03-07 Tom Tromey <tom@tromey.com>
12396 * linux-tdep.c (linux_info_proc): Update.
12397 * target.h (struct target_ops) <to_fileio_readlink>: Return
12399 (target_fileio_readlink): Return optional<string>.
12400 * remote.c (remote_hostio_readlink): Return optional<string>.
12401 * inf-child.c (inf_child_fileio_readlink): Return
12403 * target.c (target_fileio_readlink): Return optional<string>.
12405 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12407 * regcache.c (cooked_read_test): Add riscv to the list of
12408 architectures that have a save_reggroup.
12410 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12412 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12413 value is not a dynamic class object.
12415 2018-03-06 Tom Tromey <tom@tromey.com>
12417 * rust-exp.y: Formatting fixes.
12419 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12421 * riscv-tdep.c (riscv_register_name): Remove target description
12423 (riscv_gdbarch_init): Remove target description check.
12425 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12427 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12429 * riscv-tdep.h: Likewise.
12431 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12433 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12434 (riscv_pseudo_register_write): Delete.
12435 (riscv_gdbarch_init): Remove all use of pseudo registers.
12437 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12439 * record-btrace.c (btrace_print_lines): Replace cleanup
12440 parameter with RAII equivalents.
12441 (btrace_insn_history): Replace cleanup with RAII equivalents.
12442 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12443 make_cleanup_ui_out_tuple_begin_end): Remove.
12444 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12445 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12446 make_cleanup_ui_out_list_begin_end): Remove.
12448 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12450 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12451 parameter types to std::vector. Use bool.
12452 (record_btrace_wait): Replace VEC(tp_t) with
12453 std::vector<thread_info *>.
12454 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12456 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12458 * record-btrace.c (record_btrace_disable_callback): Remove.
12459 (struct scoped_btrace_disable): New.
12460 (record_btrace_open): Use scoped_btrace_disable.
12462 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12464 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12465 reading values from registers.
12467 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12469 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12472 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12474 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12475 change parameter type. Use GDB's print functions, and use
12476 core_addr_to_string where appropriate.
12477 (riscv_push_dummy_call): Use core_addr_to_string where
12478 appropriate, update call to riscv_print_arg_location, and reindent
12480 (riscv_return_value): Update call to riscv_print_arg_location.
12482 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12483 Tim Newsome <tim@sifive.com>
12484 Albert Ou <a0u@eecs.berkeley.edu>
12485 Darius Rad <darius@bluespec.com>
12487 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12488 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12489 (ALLDEPFILES): Add riscv-tdep.c
12490 * configure.tgt: Add riscv support.
12491 * riscv-tdep.c: New file.
12492 * riscv-tdep.h: New file.
12493 * NEWS: Mention new target.
12494 * MAINTAINERS: Add entry for riscv.
12496 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12498 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12499 fields within aggregates.
12501 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12503 * record-btrace.c (btrace_print_lines): Change type of flags to
12504 gdb_disassembly_flags.
12506 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12508 * fbsd-nat.c: Include "inf-ptrace.h".
12509 (USE_SIGTRAP_SIGINFO): Conditionally define.
12510 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12511 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12512 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12514 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12516 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12518 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12519 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12520 "supports_stopped_by_hw_breakpoint" target methods.
12522 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12524 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12525 * fbsd-nat.c (debug_fbsd_nat): New variable.
12526 (show_fbsd_nat_debug): New function.
12527 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12528 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12530 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12532 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12533 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12535 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12536 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12539 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12541 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12542 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12544 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12546 * charset.c (struct charset_vector): New.
12547 (charsets): Change type to charset_vector.
12548 (find_charset_names): Adjust.
12550 (_initialize_charset): Adjust.
12552 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12554 * progspace.h (struct program_space) <deleted_solibs>: Change
12555 type to std::vector<std::string>.
12556 * progspace.c (clear_program_space_solib_cache): Adjust.
12557 * breakpoint.c (print_solib_event): Adjust.
12558 (check_status_catch_solib): Adjust.
12559 * solib.c (update_solib_list): Adjust.
12560 * ui-out.h (class ui_out) <field_string>: New overload.
12561 * ui-out.c (ui_out::field_string): New overload.
12563 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12565 * progspace.h (struct program_space): Add constructor and
12566 destructor, initialize fields.
12567 (add_program_space): Remove.
12568 * progspace.c (add_program_space): Rename to...
12569 (program_space::program_space): ... this.
12570 (release_program_space): Rename to...
12571 (program_space::~program_space): ... this.
12572 (delete_program_space): Use delete to delete program_space.
12573 (initialize_progspace): Use new to allocate program_space.
12574 * inferior.c (add_inferior_with_spaces): Likewise.
12575 (clone_inferior_command): Likewise.
12576 * infrun.c (follow_fork_inferior): Likewise.
12577 (handle_vfork_child_exec_or_exit): Likewise.
12579 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12581 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12582 (delim_string_to_char_ptr_vec): Return std::vector of
12583 gdb::unique_xmalloc_ptr.
12584 (dirnames_to_char_ptr_vec_append): Take std::vector of
12585 gdb::unique_xmalloc_ptr.
12586 (dirnames_to_char_ptr_vec): Return std::vector of
12587 gdb::unique_xmalloc_ptr.
12588 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12589 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12590 (delim_string_to_char_ptr_vec): Return an std::vector of
12591 gdb::unique_xmalloc_ptr, adjust the code.
12592 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12593 gdb::unique_xmalloc_ptr, adjust the code.
12594 (dirnames_to_char_ptr_vec): Return an std::vector of
12595 gdb::unique_xmalloc_ptr, adjust the code.
12596 * auto-load.c (auto_load_safe_path_vec): Change type to
12597 std::vector of gdb::unique_xmalloc_ptr.
12598 (auto_load_expand_dir_vars): Return an std::vector of
12599 gdb::unique_xmalloc_ptr, adjust the code.
12600 (auto_load_safe_path_vec_update): Adjust.
12601 (filename_is_in_auto_load_safe_path_vec): Adjust.
12602 (auto_load_objfile_script_1): Adjust.
12603 * build-id.c (build_id_to_debug_bfd): Adjust.
12604 * linux-thread-db.c (thread_db_load_search): Adjust.
12605 * source.c (add_path): Adjust.
12607 * symfile.c (find_separate_debug_file): Adjust.
12608 * utils.c (do_free_char_ptr_vec): Remove.
12609 (make_cleanup_free_char_ptr_vec): Remove.
12611 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12614 * common/pathstuff.c: Conditionally include "<windows.h>".
12616 2018-03-01 Georg Sauthoff <mail@georg.so>
12619 * gcore.in: Quote variables and switch interpreter to bash.
12621 2018-03-01 Tom Tromey <tom@tromey.com>
12623 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12624 assertion. Add assertion for discriminant_index.
12625 (quirk_rust_enum): Use correct base type name in univariant case.
12627 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12629 * record.c (get_call_history_modifiers): Return a
12630 record_print_flags.
12631 (cmd_record_call_history): Adjust.
12632 * record-btrace.c (record_btrace_call_history): Adjust.
12633 (record_btrace_call_history_range): Adjust.
12634 (record_btrace_call_history_from): Adjust.
12635 * target-debug.h (target_debug_print_record_print_flags): New.
12636 * target-delegates.c: Re-generate.
12637 * target.c (target_call_history): Change flags type.
12638 (target_call_history_from): Likewise.
12639 (target_call_history_range): Likewise.
12640 * target.h (struct target_ops) <target_call_history>: Likewise.
12641 (target_call_history_from): Likewise.
12642 (target_call_history_range): Likewise.
12644 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12645 Simon Marchi <simon.marchi@polymtl.ca>
12647 * common/common-utils.c: Include "sys/stat.h".
12648 (is_regular_file): Move here from "source.c"; change return
12650 * common/common-utils.h (is_regular_file): New prototype.
12651 * common/pathstuff.c (contains_dir_separator): New function.
12652 * common/pathstuff.h (contains_dir_separator): New prototype.
12653 * source.c: Don't include "sys/stat.h".
12654 (is_regular_file): Move to "common/common-utils.c".
12656 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12658 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12659 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12660 * auto-load.c: Include "common/pathstuff.h".
12661 * common/common-def.h (current_directory): Move here.
12662 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12664 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12666 * common/pathstuff.c: New file.
12667 * common/pathstuff.h: New file.
12668 * compile/compile.c: Include "common/pathstuff.h".
12669 * defs.h (current_directory): Move to "common/common-defs.h".
12670 * dwarf2read.c: Include "common/pathstuff.h".
12671 * exec.c: Likewise.
12672 * guile/scm-safe-call.c: Likewise.
12673 * linux-thread-db.c: Likewise.
12674 * main.c: Likewise.
12675 * nto-tdep.c: Likewise.
12676 * objfiles.c: Likewise.
12677 * source.c: Likewise.
12678 * symtab.c: Likewise.
12679 * utils.c: Include "common/pathstuff.h".
12680 (gdb_realpath): Move to "common/pathstuff.c".
12681 (gdb_realpath_keepfile): Likewise.
12682 (gdb_abspath): Likewise.
12683 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12684 (gdb_realpath_keepfile): Likewise.
12685 (gdb_abspath): Likewise.
12687 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12689 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12690 wildcard process pid for super_resume for kernels with a
12693 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12695 * compile/compile.c (get_args): Add additional comments
12696 explaining function.
12698 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12699 Tom Tromey <tom@tromey.com>
12701 * target.h (memory_write_request_s): Remove typedef. Don't define
12703 (target_write_memory_blocks): Change argument to std::vector.
12704 (struct memory_write_request): Add constructor.
12705 * target-memory.c (compare_block_starting_address): Return bool.
12706 Change argument types.
12707 (claim_memory): Change arguments to use std::vector.
12708 (split_regular_and_flash_blocks, blocks_to_erase)
12709 (compute_garbled_blocks): Likewise.
12710 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12711 (target_write_memory_blocks): Change argument to std::vector.
12712 * symfile.c (struct load_section_data): Add constructor and
12713 destructor. Use std::vector for "requests".
12714 (struct load_progress_data): Add initializers.
12715 (load_section_callback): Update. Use "new".
12716 (clear_memory_write_data): Remove.
12717 (generic_load): Update.
12719 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12721 * arch/aarch64.h: Use common/tdesc.h.
12723 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12725 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12726 architecture with a 64-bit ABI.
12728 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12730 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12731 ahead of target description loading.
12733 2018-02-26 Tom Tromey <tom@tromey.com>
12735 * stack.c (backtrace_command_1): Update.
12736 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12738 * python/py-framefilter.c (py_print_frame)
12739 (gdbpy_apply_frame_filter): Change type of "flags".
12740 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12742 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12743 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12744 * extension.h (enum frame_filter_flag): Rename from
12745 frame_filter_flags.
12746 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12747 (apply_ext_lang_frame_filter): Change type of "flags".
12748 * extension.c (apply_ext_lang_frame_filter): Change type of
12750 * extension-priv.h (struct extension_language_ops)
12751 <apply_frame_filter>: Change type of "flags".
12753 2018-02-26 Tom Tromey <tom@tromey.com>
12756 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
12757 off-by-one in py_end computation.
12758 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12760 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12763 2018-02-26 Tom Tromey <tom@tromey.com>
12765 * dwarf2read.c (struct variant_field): New.
12766 (struct nextfield) <variant>: New field.
12767 (dwarf2_add_field): Handle DW_TAG_variant_part.
12768 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12769 discriminated union.
12770 (read_structure_type): Handle DW_TAG_variant_part.
12771 (handle_struct_member_die): New function, extracted from
12772 process_structure_scope. Handle DW_TAG_variant.
12773 (process_structure_scope): Handle discriminated unions. Call
12774 handle_struct_member_die.
12776 2018-02-26 Tom Tromey <tom@tromey.com>
12778 * rust-lang.h (rust_last_path_segment): Declare.
12779 * rust-lang.c (rust_last_path_segment): Now public. Change
12781 (struct disr_info): Remove.
12782 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12783 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12784 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12785 (rust_enum_p, rust_enum_variant): New function.
12786 (rust_underscore_fields): Remove "offset" parameter.
12787 (rust_print_enum): New function.
12788 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12789 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12790 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
12792 (rust_internal_print_type): New function, from rust_print_type.
12794 (rust_print_type): Call rust_internal_print_type.
12795 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12796 Update enum handling.
12797 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12798 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12799 (rust_union_quirks): New functions.
12800 (process_full_comp_unit, process_full_type_unit): Call
12802 (process_structure_scope): Update rust_unions if necessary.
12804 2018-02-26 Tom Tromey <tom@tromey.com>
12806 * value.h (value_union_variant): Declare.
12807 * valops.c (value_union_variant): New function.
12808 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12809 (struct discriminant_info): New.
12810 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12812 (struct main_type) <flag_discriminated_union>: New field.
12814 2018-02-26 Tom Tromey <tom@tromey.com>
12816 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12817 unittests/unpack-selftests.c.
12818 * unittests/unpack-selftests.c: New file.
12819 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12821 2018-02-26 Yao Qi <yao.qi@linaro.org>
12823 * dwarf2read.c (struct partial_die_info) <read>: New method.
12824 (read_partial_die): Remove the declaration.
12825 (load_partial_dies): Update.
12826 (partial_die_info::partial_die_info):
12827 (read_partial_die): Change it to partial_die_info::read.
12829 2018-02-26 Yao Qi <yao.qi@linaro.org>
12831 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12832 (fixup_partial_die): Remove declaration.
12833 (scan_partial_symbols): Update.
12834 (partial_die_parent_scope): Likewise.
12835 (partial_die_full_name): Likewise.
12836 (fixup_partial_die): Change it to partial_die_info::fixup.
12838 2018-02-26 Yao Qi <yao.qi@linaro.org>
12840 * dwarf2read.c (read_partial_die): Update the declaration.
12841 (load_partial_dies): Caller update.
12842 (read_partial_die): Remove one argument abbrev_len.
12844 2018-02-26 Yao Qi <yao.qi@linaro.org>
12846 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12847 assignment operator.
12848 (load_partial_dies): Use ctor and copy ctor.
12849 (read_partial_die): Update.
12850 (dwarf2_cu::find_partial_die): Use ctor.
12852 2018-02-26 Yao Qi <yao.qi@linaro.org>
12854 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12855 (find_partial_die_in_comp_unit): Change it to
12856 dwarf2_cu::find_partial_die.
12857 (find_partial_die): Update.
12859 2018-02-26 Yao Qi <yao.qi@linaro.org>
12861 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12864 2018-02-26 Yao Qi <yao.qi@linaro.org>
12866 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12868 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12870 * arch/amd64.h: Use common/tdesc.h.
12871 * arch/i386.c: Likewise.
12872 * arch/i386.h: Likewise.
12873 * arch/tic6x.c: Likewise.
12874 * arch/tdesc.h: Move file from here...
12875 * common/tdesc.h: ...to here.
12876 * features/aarch64-core.c: Regenerate.
12877 * features/aarch64-fpu.c: Regenerate.
12878 * features/i386/32bit-avx.c: Regenerate.
12879 * features/i386/32bit-avx512.c: Regenerate.
12880 * features/i386/32bit-core.c: Regenerate.
12881 * features/i386/32bit-linux.c: Regenerate.
12882 * features/i386/32bit-mpx.c: Regenerate.
12883 * features/i386/32bit-pkeys.c: Regenerate.
12884 * features/i386/32bit-sse.c: Regenerate.
12885 * features/i386/64bit-avx.c: Regenerate.
12886 * features/i386/64bit-avx512.c: Regenerate.
12887 * features/i386/64bit-core.c: Regenerate.
12888 * features/i386/64bit-linux.c: Regenerate.
12889 * features/i386/64bit-mpx.c: Regenerate.
12890 * features/i386/64bit-pkeys.c: Regenerate.
12891 * features/i386/64bit-segments.c: Regenerate.
12892 * features/i386/64bit-sse.c: Regenerate.
12893 * features/i386/x32-core.c: Regenerate.
12894 * features/tic6x-c6xp.c: Regenerate.
12895 * features/tic6x-core.c: Regenerate.
12896 * features/tic6x-gp.c: Regenerate.
12897 * target-descriptions.c: Use common/tdesc.h.
12898 * target-descriptions.h: Likewise.
12900 2018-02-24 Tom Tromey <tom@tromey.com>
12902 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12903 (try_thread_db_load_from_dir, thread_db_load_search): Use
12905 (info_auto_load_libthread_db_compare): Return bool. Change
12907 (info_auto_load_libthread_db): Use std::vector, std::string.
12910 2018-02-24 Tom Tromey <tom@tromey.com>
12912 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12914 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12916 * gdbarch.c: Rebuild.
12917 * gdbarch.h: Rebuild.
12918 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12919 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12920 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12923 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12925 * gdbtypes.h (sect_offset): Change type to uint64_t.
12926 (sect_offset_str): New function.
12927 * dwarf2read.c (create_addrmap_from_aranges): Use
12929 (error_check_comp_unit_head): Likewise.
12930 (create_debug_type_hash_table): Likewise.
12931 (read_cutu_die_from_dwo): Likewise.
12932 (init_cutu_and_read_dies): Likewise.
12933 (init_cutu_and_read_dies_no_follow): Likewise.
12934 (process_psymtab_comp_unit_reader): Likewise.
12935 (partial_die_parent_scope): Likewise.
12936 (peek_die_abbrev): Likewise.
12937 (process_queue): Likewise.
12938 (dwarf2_physname): Likewise.
12939 (read_namespace_alias): Likewise.
12940 (read_import_statement): Likewise.
12941 (create_dwo_cu_reader): Likewise.
12942 (create_cus_hash_table): Likewise.
12943 (lookup_dwo_cutu): Likewise.
12944 (inherit_abstract_dies): Likewise.
12945 (read_func_scope): Likewise.
12946 (read_call_site_scope): Likewise.
12947 (dwarf2_add_member_fn): Likewise.
12948 (read_common_block): Likewise.
12949 (read_module_type): Likewise.
12950 (read_typedef): Likewise.
12951 (read_subrange_type): Likewise.
12952 (load_partial_dies): Likewise.
12953 (read_partial_die): Likewise.
12954 (find_partial_die): Likewise.
12955 (read_str_index): Likewise.
12956 (dwarf2_string_attr): Likewise.
12957 (build_error_marker_type): Likewise.
12958 (lookup_die_type): Likewise.
12959 (dump_die_shallow): Likewise.
12960 (follow_die_ref): Likewise.
12961 (dwarf2_fetch_die_loc_sect_off): Likewise.
12962 (dwarf2_fetch_constant_bytes): Likewise.
12963 (follow_die_sig): Likewise.
12964 (get_signatured_type): Likewise.
12965 (get_DW_AT_signature_type): Likewise.
12966 (dwarf2_find_containing_comp_unit): Likewise.
12967 (set_die_type): Likewise.
12969 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12971 * arch/aarch64.c: Include "common-defs.h".
12972 * arch/amd64.c: Likewise.
12973 * arch/i386.c: Likewise.
12975 2018-02-21 Tom Tromey <tom@tromey.com>
12977 * value.h: (extract_field_op): Update.
12978 * eval.c (extract_field_op): Return a const char *.
12979 * expression.h (parse_expression_for_completion): Update.
12980 * completer.c (complete_expression): Update.
12981 (add_struct_fields): Make fieldname const.
12982 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12983 (mark_completion_tag, parse_exp_in_context_1): Update.
12984 (parse_expression_for_completion): Change "name" to
12985 unique_xmalloc_ptr*.
12987 2018-02-21 Tom Tromey <tom@tromey.com>
12989 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12991 2018-02-21 Yao Qi <yao.qi@linaro.org>
12993 * avr-tdep.c (avr_read_pc): Change parameter type to
12995 * gdbarch.sh (read_pc): Likewise.
12996 * gdbarch.c: Re-generated.
12997 * gdbarch.h: Re-generated.
12998 * hppa-tdep.c (hppa_read_pc): Change parameter type to
13000 * ia64-tdep.c (ia64_read_pc): Likewise.
13001 * mips-tdep.c (mips_read_pc): Likewise.
13002 * spu-tdep.c (spu_read_pc): Likewise.
13004 2018-02-21 Yao Qi <yao.qi@linaro.org>
13006 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13007 * regcache-dump.c: New file.
13008 * regcache.c: Move register_dump to regcache-dump.c.
13009 (maintenance_print_registers): Likewise.
13010 (maintenance_print_raw_registers): Likewise.
13011 (maintenance_print_cooked_registers): Likewise.
13012 (maintenance_print_register_groups): Likewise.
13013 (maintenance_print_remote_registers): Likewise.
13014 (_initialize_regcache): Likewise.
13015 * regcache.h (register_dump): Moved from regcache.c.
13017 2018-02-21 Yao Qi <yao.qi@linaro.org>
13019 * regcache.c (regcache::regcache): Update.
13020 (regcache::invalidate): Move it to detached_regcache::invalidate.
13021 (get_thread_arch_aspace_regcache): Update.
13022 (regcache::raw_update): Update.
13023 (regcache::cooked_read): Remove some code.
13024 (regcache::cooked_read_value): Likewise.
13025 (regcache::raw_write): Remove assert on m_readonly_p.
13026 (regcache::raw_supply_integer): Move it to
13027 detached_regcache::raw_supply_integer.
13028 (regcache::raw_supply_zeroed): Likewise.
13029 * regcache.h (detached_regcache) <raw_supply_integer>: New
13031 <raw_supply_zeroed, invalidate>: Likewise.
13032 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13033 <invalidate>: Likewise.
13034 <m_readonly_p>: Removed.
13036 2018-02-21 Yao Qi <yao.qi@linaro.org>
13038 * infcmd.c (get_return_value): Let stop_regs point to
13039 get_current_regcache.
13040 * regcache.c (regcache::regcache): Remove.
13041 (register_dump_reg_buffer): New class.
13042 (regcache_print): Adjust.
13043 * regcache.h (regcache): Remove constructors.
13045 2018-02-21 Yao Qi <yao.qi@linaro.org>
13047 * regcache.c (class register_dump): New class.
13048 (register_dump_regcache, register_dump_none): New class.
13049 (register_dump_remote, register_dump_groups): New class.
13050 (regcache_print): Update.
13051 * regcache.h (regcache_dump_what): Move it to regcache.c.
13052 (regcache) <dump>: Remove.
13054 2018-02-21 Yao Qi <yao.qi@linaro.org>
13056 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13058 (jit_unwind_reg_set_impl): Call raw_supply.
13059 (jit_frame_sniffer): Use reg_buffer_rw.
13060 * record-full.c (record_full_core_regbuf): Change its type.
13061 (record_full_core_open_1): Use reg_buffer_rw.
13062 (record_full_close): Likewise.
13063 (record_full_core_fetch_registers): Use regcache->raw_supply.
13064 (record_full_core_store_registers): Likewise.
13065 * regcache.c (regcache::get_register_status): Move it to
13067 (regcache_raw_set_cached_value): Remove.
13068 (regcache::raw_set_cached_value): Remove.
13069 (regcache::raw_write): Call raw_supply.
13070 (regcache::raw_supply): Move it to reg_buffer_rw.
13071 * regcache.h (regcache_raw_set_cached_value): Remove.
13072 (reg_buffer_rw): New class.
13074 2018-02-21 Yao Qi <yao.qi@linaro.org>
13076 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13077 readonly_detached_regcache.
13078 (dummy_frame_prev_register): Use regcache->cooked_read.
13079 * frame.c (frame_save_as_regcache): Change return type.
13080 (frame_pop): Update.
13081 * frame.h (frame_save_as_regcache): Update declaration.
13082 * inferior.h (get_infcall_suspend_state_regcache): Update
13084 * infrun.c (infcall_suspend_state) <registers>: use
13085 readonly_detached_regcache.
13086 (save_infcall_suspend_state): Don't use regcache_dup.
13087 (get_infcall_suspend_state_regcache): Change return type.
13088 * linux-fork.c (struct fork_info) <savedregs>: Change to
13089 readonly_detached_regcache.
13091 (fork_save_infrun_state): Don't use regcache_dup.
13092 (info_checkpoints_command): Adjust.
13093 * mi/mi-main.c (register_changed_p): Update declaration.
13094 (mi_cmd_data_list_changed_registers): Use
13095 readonly_detached_regcache.
13096 (register_changed_p): Change parameter type to
13097 readonly_detached_regcache.
13098 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13099 readonly_detached_regcache.
13100 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13101 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13103 (regcache::save): Move it to reg_buffer.
13104 (regcache::restore): Change parameter type.
13105 (regcache_dup): Remove.
13106 * regcache.h (reg_buffer) <save>: New method.
13107 (readonly_detached_regcache): New class.
13108 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13109 readonly_detached_regcache.
13110 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13112 2018-02-21 Yao Qi <yao.qi@linaro.org>
13114 * frame.c (frame_save_as_regcache): Use regcache method save.
13115 (frame_pop): Use regcache method restore.
13116 * infrun.c (restore_infcall_suspend_state): Likewise.
13117 * linux-fork.c (fork_load_infrun_state): Likewise.
13118 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13120 * regcache.c (regcache_save): Remove.
13121 (regcache::restore): More asserts.
13122 (regcache_cpy): Remove.
13123 * regcache.h (regcache_save): Remove the declaration.
13124 (regcache::restore): Move from private to public.
13125 Remove the friend declaration of regcache_cpy.
13126 (regcache_cpy): Remove declaration.
13128 2018-02-21 Yao Qi <yao.qi@linaro.org>
13130 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13131 parameter type to 'readable_regcache *'.
13132 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13133 * arm-tdep.c (arm_neon_quad_read): Likewise.
13134 (arm_pseudo_read): Likewise.
13135 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13136 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13137 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13138 * gdbarch.c: Re-generated.
13139 * gdbarch.h: Re-generated.
13140 * gdbarch.sh (pseudo_register_read): Change parameter type to
13141 'readable_regcache *'.
13142 (pseudo_register_read_value): Likewise.
13143 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13144 (h8300_pseudo_register_read): Likewise.
13145 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13146 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13147 (i386_pseudo_register_read_into_value): Likewise.
13148 (i386_pseudo_register_read_value): Likewise.
13149 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13151 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13152 * m32c-tdep.c (m32c_raw_read): Likewise.
13153 (m32c_read_flg): Likewise.
13154 (m32c_banked_register): Likewise.
13155 (m32c_banked_read): Likewise.
13156 (m32c_sb_read): Likewise.
13157 (m32c_part_read): Likewise.
13158 (m32c_cat_read): Likewise.
13159 (m32c_r3r2r1r0_read): Likewise.
13160 (m32c_pseudo_register_read): Likewise.
13161 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13162 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13163 (mep_pseudo_cr64_read): Likewise.
13164 (mep_pseudo_register_read): Likewise.
13165 * mips-tdep.c (mips_pseudo_register_read): Likewise.
13166 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13167 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13168 * regcache.c (regcache::raw_read): Move it to readable_regcache.
13169 (regcache::cooked_read): Likewise.
13170 (regcache::cooked_read_value): Likewise.
13171 (regcache_cooked_read_signed):
13172 (regcache::cooked_read): Likewise.
13173 * regcache.h (readable_regcache): New class.
13174 (regcache): Inherit readable_regcache. Move some methods to
13176 * rl78-tdep.c (rl78_pseudo_register_read): Change
13177 parameter type to 'readable_regcache *'.
13178 * rs6000-tdep.c (do_regcache_raw_read): Remove.
13179 (e500_pseudo_register_read): Change parameter type to
13180 'readable_regcache *'.
13181 (dfp_pseudo_register_read): Likewise.
13182 (vsx_pseudo_register_read): Likewise.
13183 (efpr_pseudo_register_read): Likewise.
13184 * s390-tdep.c (s390_pseudo_register_read): Likewise.
13185 * sh-tdep.c (sh_pseudo_register_read): Likewise.
13186 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13187 (sh64_pseudo_register_read): Likewise.
13188 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13189 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13190 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13191 (spu_pseudo_register_read): Likewise.
13192 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13193 (xtensa_pseudo_register_read): Likewise.
13195 2018-02-21 Yao Qi <yao.qi@linaro.org>
13197 * regcache.c (regcache::regcache): Call reg_buffer ctor.
13198 (regcache::arch): Move it to reg_buffer::arch.
13199 (regcache::register_buffer): Likewise.
13200 (regcache::assert_regnum): Likewise.
13201 (regcache::num_raw_registers): Likewise.
13202 * regcache.h (reg_buffer): New class.
13203 (regcache): Inherit reg_buffer.
13205 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
13207 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13208 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13210 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
13212 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13214 2018-02-19 Alan Hayward <alan.hayward@arm.com>
13216 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13217 (SFILES): Remove common/*.c files.
13218 (COMMON_OBS): Remove some *.o files built from common/*.c files.
13219 * common/common.host: Add common reference.
13220 * configure.ac: Likewise.
13221 * configure: Regenerate.
13223 2018-02-16 Yao Qi <yao.qi@linaro.org>
13225 * block.c (block_namespace_info): Inherit allocate_on_obstack.
13226 (block_initialize_namespace): Use new.
13227 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13228 (dwarf2_free_objfile): Use delete.
13229 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13230 (copy_type_recursive): Use new.
13231 * gdb_obstack.h (allocate_on_obstack): New.
13233 2018-02-15 Yao Qi <yao.qi@linaro.org>
13236 * inferior.c (exit_inferior_1): Reset inf->control.
13238 2018-02-15 Joel Brobecker <brobecker@adacore.com>
13240 * ada-lang.c (ada_to_fixed_value_create): Delete advance
13243 2018-02-14 Pedro Alves <palves@redhat.com>
13245 * frame-unwind.c (frame_unwind_try_unwinder): Always call
13246 frame_cleanup_after_sniffer on exception.
13248 2018-02-14 Tom Tromey <tom@tromey.com>
13250 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13252 (solib_bfd_open): Make pathname const.
13253 * solib.c (solib_bfd_open): Make pathname const.
13254 * solib-spu.c (spu_bfd_fopen): Make name const.
13255 (spu_bfd_open): Make pathname const.
13256 * solib-darwin.c (darwin_bfd_open): Make pathname const.
13257 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13259 2018-02-14 Tom Tromey <tom@tromey.com>
13261 * symfile.c (symfile_bfd_open): Update.
13262 * source.h (openp, source_full_path_of, find_and_open_source):
13263 Change argument type to unique_xmalloc_ptr.
13264 * source.c (openp): Take a unique_xmalloc_ptr.
13265 (source_full_path_of, find_and_open_source): Likewise.
13266 (open_source_file, symtab_to_fullname): Update.
13267 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13268 unique_xmalloc_ptr.
13269 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13270 (exec_file_find): Update.
13271 * psymtab.c (psymtab_to_fullname): Update.
13272 * nto-tdep.h (nto_find_and_open_solib): Update.
13273 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13274 unique_xmalloc_ptr.
13275 * exec.c (exec_file_attach): Update.
13276 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13277 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13279 2018-02-14 Tom Tromey <tom@tromey.com>
13281 * solib.c: Include source.h.
13282 * nto-tdep.c: Include source.h.
13283 * mi/mi-cmd-env.c: Include source.h.
13284 * infcmd.c: Include source.h.
13285 * exec.c: Include source.h.
13286 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13287 (add_path, directory_switch, source_path, init_source_path): Move
13289 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13290 (add_path, directory_switch, source_path, init_source_path):
13293 2018-02-14 Tom Tromey <tom@tromey.com>
13295 * solist.h (exec_file_find, solib_find): Return
13296 unique_xmalloc_ptr.
13297 (solib_bfd_fopen): Take a const char *.
13298 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13299 (exec_file_find, solib_find): Likewise.
13300 (solib_bfd_fopen): Do not take ownership of "pathname".
13301 (solib_bfd_open): Use unique_xmalloc_ptr.
13302 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13303 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13304 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13305 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13307 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13309 * ada-lang.c (name_match_type_from_name): Remove reference to
13310 ada_name_for_lookup in function's documentation.
13311 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13313 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13315 * defs.h (enum openp_flags): New enum.
13316 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13317 Move to enum openp_flags.
13318 (openp_flags): New enum flags.
13319 (openp): Change parameter type to openp_flags.
13320 * source.c (openp): Change parameter type to openp_flags.
13321 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13322 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13324 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13326 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13329 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13331 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13333 (class dwarf2_queue_guard): ...the destructor of this new class.
13334 (dw2_do_instantiate_symtab): Create instance of the new class
13335 dwarf2_queue_guard, remove cleanup.
13337 2018-02-09 Tom Tromey <tom@tromey.com>
13339 * source.c (find_source_lines): Don't reference past the end of
13342 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13344 * remote.c (remote_btrace_maybe_reopen): Change error message.
13345 * btrace.c (btrace_enable): Likewise.
13346 (parse_xml_btrace): Likewise.
13347 (parse_xml_btrace_conf): Likewise.
13349 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13351 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13352 (linux_enable_pt, linux_enable_bts): Call
13353 diagnose_perf_event_open_fail.
13355 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13357 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13358 Remove parameter and change return type. Update callers. Move it.
13359 (linux_enable_bts, linux_enable_pt): Improve error message.
13360 (linux_enable_pt): Remove zero buffer size check.
13361 (linux_enable_btrace): Improve error messages. Remove NULL return
13364 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13366 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13367 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13368 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13369 (linux_supports_pt, linux_supports_btrace): Remove.
13370 (linux_enable_bts): Call cpu_supports_bts.
13371 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13372 * remote.c (remote_supports_btrace): Remove.
13373 (init_remote_ops): Remove remote_supports_btrace.
13374 * target-delegates.c: Regenerated.
13375 * target.c (target_supports_btrace): Remove.
13376 * target.h (target_ops) <to_supports_btrace>: Remove
13377 (target_supports_btrace): Remove.
13378 * x86-linux-nat.c (x86_linux_create_target): Remove
13379 linux_supports_btrace.
13381 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13383 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13385 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13386 exception and use message in own exception.
13388 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13390 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13391 (perf_event_pt_event_type): Use gdb_file_up.
13392 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13393 scoped_fd, and scoped_mmap.
13395 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13397 * common/scoped_mmap.h: New.
13398 * unittests/scoped_mmap-selftest.c: New.
13399 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13400 unittests/scoped_mmap-selftest.c.
13402 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13404 * common/scoped_fd.h: New.
13405 * unittests/scoped_fd-selftest.c: New.
13406 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13407 unittests/scoped_fd-selftest.c.
13409 2018-02-09 Tom Tromey <tom@tromey.com>
13411 * auto-load.c (auto_load_section_scripts): Use
13412 gdb::unique_xmalloc_ptr.
13414 2018-02-09 Tom Tromey <tom@tromey.com>
13416 * auto-load.c (execute_script_contents): Use std::string.
13418 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13420 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13421 Python function, rather than a new command.
13423 2018-02-08 Tom Tromey <tom@tromey.com>
13425 * solib.c (solib_find_1): Use std::string.
13426 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13428 2018-02-08 Tom Tromey <tom@tromey.com>
13430 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13432 2018-02-08 Tom Tromey <tom@tromey.com>
13434 * source.c (find_source_lines): Use gdb::def_vector.
13436 2018-02-08 Tom Tromey <tom@tromey.com>
13438 * macrocmd.c (struct temporary_macro_definition): New.
13439 (macro_define_command): Use temporary_macro_definition. Remove
13441 (free_macro_definition_ptr): Remove.
13443 2018-02-08 Tom Tromey <tom@tromey.com>
13445 * macroexp.c (maybe_expand): Use std::string.
13447 2018-02-08 Tom Tromey <tom@tromey.com>
13449 * macroexp.c (struct macro_buffer): Add initializers for some
13451 (init_buffer, init_shared_buffer, free_buffer)
13452 (free_buffer_return_text): Remove.
13453 (macro_buffer): New constructors.
13454 (~macro_buffer): New destructor.
13455 (macro_buffer::set_shared): New method.
13456 (macro_buffer::resize_buffer, macro_buffer::appendc)
13457 (macro_buffer::appendmem): Now methods, not free functions.
13458 (set_token, append_tokens_without_splicing, stringify)
13459 (macro_stringify): Update.
13460 (gather_arguments): Change return type. Remove argc_p argument,
13461 add args_ptr argument. Use std::vector.
13462 (substitute_args): Remove argc argument. Accept std::vector.
13463 (expand): Update. Use std::vector.
13464 (scan, macro_expand, macro_expand_next): Update.
13466 2018-02-08 Tom Tromey <tom@tromey.com>
13468 * symtab.c (default_collect_symbol_completion_matches_break_on):
13469 Use unique_xmalloc_ptr.
13470 * macroscope.h: (sal_macro_scope, user_macro_scope)
13471 (default_macro_scope): Return unique_xmalloc_ptr.
13472 * macroscope.c (sal_macro_scope, user_macro_scope)
13473 (default_macro_scope): Return unique_xmalloc_ptr.
13474 * macroexp.h (macro_expand, macro_expand_once): Return
13475 unique_xmalloc_ptr.
13476 * macroexp.c (macro_expand, macro_expand_once): Return
13477 unique_xmalloc_ptr.
13478 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13479 (info_macro_command, info_macros_command): Use
13480 unique_xmalloc_ptr.
13481 * compile/compile-c-support.c (write_macro_definitions): Use
13482 unique_xmalloc_ptr.
13483 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13485 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13487 * value.c (value_static_field): Assign field type instead of
13488 containing type when returning an optimized out value.
13490 2018-02-06 Yao Qi <yao.qi@linaro.org>
13492 * ft32-tdep.c (ft32_read_pc): Remove.
13493 (ft32_write_pc): Remove.
13494 (ft32_gdbarch_init): Update.
13495 * m32r-tdep.c (m32r_read_pc): Remove.
13496 (m32r_gdbarch_init): Update.
13497 * mep-tdep.c (mep_read_pc): Remove.
13498 (mep_gdbarch_init): Update.
13499 * microblaze-tdep.c (microblaze_write_pc): Remove.
13500 (microblaze_gdbarch_init): Update.
13501 * mn10300-tdep.c (mn10300_read_pc): Remove.
13502 (mn10300_write_pc): Remove.
13503 (mn10300_gdbarch_init): Update.
13504 * moxie-tdep.c (moxie_read_pc): Remove.
13505 (moxie_write_pc): Remove.
13506 (moxie_gdbarch_init): Update.
13508 2018-02-06 Yao Qi <yao.qi@linaro.org>
13510 * expprint.c (print_subexp_standard): Handle
13511 OP_F77_UNDETERMINED_ARGLIST.
13512 (dump_subexp_body_standard): Likewise.
13514 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13516 * target-descriptions.c (tdesc_element_visitor) Add empty
13518 (tdesc_type): Move make_gdb_type from here.
13519 (tdesc_type_builtin): Likewise.
13520 (tdesc_type_vector): Likewise.
13521 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13522 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13523 (make_gdb_type_union): Likewise.
13524 (make_gdb_type_flags): Likewise.
13525 (make_gdb_type_enum): Likewise.
13526 (make_gdb_type): New function.
13527 (tdesc_register_type): Use static make_gdb_type.
13529 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13531 * infcmd.c (default_print_one_register_info): Align natural-format
13532 column values consistently one under another.
13533 (pad_to_column): New function.
13535 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13537 * dwarf2read.c (dwarf2_physname): Move commment.
13539 2018-02-01 Leszek Swirski <leszeks@google.com>
13541 * varobj.c (varobj_formatted_print_options): Allow recursive
13542 pretty printing if pretty printing is enabled.
13544 2018-02-01 Leszek Swirski <leszeks@google.com>
13546 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13547 names after a structop as a filename.
13549 2018-02-01 Yao Qi <yao.qi@linaro.org>
13551 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13552 (arm_record_coproc_data_proc): Likewise.
13554 2018-02-01 Yao Qi <yao.qi@linaro.org>
13556 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13558 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13560 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13561 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13563 2018-01-31 Pedro Alves <palves@redhat.com>
13565 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13566 * inflow.c (child_terminal_save_inferior): Wrap reference to
13567 tcgetpgrp in HAVE_TERMIOS_H.
13568 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13570 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13571 always iterate over all inferiors.
13572 (gdbsim_cntrl_c): Adjust.
13573 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13575 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13577 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13578 index type is objfile-owned if the element type is as well.
13580 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13584 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13586 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13587 "features/s390x-linux64.c".
13588 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13589 s390_linux32 and s390x_linux64.
13590 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13592 * s390-tdep.c: Include "features/s390-linux32.c" and
13593 "features/s390x-linux64.c".
13594 (s390_tdesc_valid): Add check for tdesc_has_registers.
13595 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13596 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13597 tdesc_s390x_linux64.
13598 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13599 tdesc_s390x_linux64 to...
13600 * s390-tdep.h: ...here.
13602 2018-01-30 Pedro Alves <palves@redhat.com>
13605 * config.in, configure: Regenerate.
13606 * configure.ac: Check for getpgid.
13607 * go32-nat.c (go32_pass_ctrlc): New.
13608 (go32_target): Install it.
13609 * inf-child.c (inf_child_target): Install
13610 child_terminal_save_inferior, child_pass_ctrlc and
13612 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13613 (inf_ptrace_target): No longer install it.
13614 * infcmd.c (interrupt_target_1): Adjust.
13615 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13616 (child_interrupt): Declare.
13617 (inferior::terminal_state): New.
13618 * inflow.c (struct terminal_info): Update comments.
13619 (inferior_process_group): Delete.
13620 (terminal_is_ours): Delete.
13621 (gdb_tty_state): New.
13622 (child_terminal_init): Adjust.
13623 (is_gdb_terminal, sharing_input_terminal_1)
13624 (sharing_input_terminal): New functions.
13625 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13626 Set the process's actual process group in the foreground if
13627 possible. Handle is_ours_for_output/is_ours distinction. Don't
13628 mark terminal as the inferior's if not sharing GDB's terminal.
13629 Don't check attach_flag.
13630 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13631 pass down a target_terminal_state.
13632 (child_terminal_save_inferior): New, factored out from ...
13633 (child_terminal_ours_1): ... this. Handle
13634 target_terminal_state::is_ours_for_output.
13635 (child_interrupt, child_pass_ctrlc): New.
13636 (inflow_inferior_exit): Clear the inferior's terminal_state.
13637 (copy_terminal_info): Copy the inferior's terminal state.
13638 (_initialize_inflow): Remove reference to terminal_is_ours.
13639 * inflow.h (inferior_process_group): Delete.
13640 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13641 * procfs.c (procfs_target): Don't install procfs_interrupt.
13642 (procfs_interrupt): Delete.
13643 * remote.c (remote_serial_quit_handler): Adjust.
13644 (remote_interrupt): Remove ptid parameter. Adjust.
13645 * target-delegates.c: Regenerate.
13646 * target.c: Include "terminal.h".
13647 (target_terminal::terminal_state): Rename to ...
13648 (target_terminal::m_terminal_state): ... this.
13649 (target_terminal::init): Adjust.
13650 (target_terminal::inferior): Adjust to per-inferior
13652 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13653 (target_terminal::ours, target_terminal::ours_for_output): Use
13654 target_terminal_is_ours_kind.
13655 (target_interrupt): Remove ptid parameter. Adjust.
13656 (default_target_pass_ctrlc): Adjust.
13657 * target.h (target_ops::to_terminal_save_inferior): New field.
13658 (target_ops::to_interrupt): Remove ptid_t parameter.
13659 (target_interrupt): Remove ptid_t parameter. Update comment.
13660 (target_pass_ctrlc): Update comment.
13661 * target/target.h (target_terminal_state): New scoped enum,
13662 factored out of ...
13663 (target_terminal::terminal_state): ... here.
13664 (target_terminal::inferior): Update comments.
13665 (target_terminal::restore_inferior): New.
13666 (target_terminal::is_inferior, target_terminal::is_ours)
13667 (target_terminal::is_ours_for_output): Adjust.
13668 (target_terminal::scoped_restore_terminal_state): Adjust to
13669 rename, and call restore_inferior() instead of inferior().
13670 (target_terminal::scoped_restore_terminal_state::m_state): Change
13672 (target_terminal::terminal_state): Rename to ...
13673 (target_terminal::m_terminal_state): ... this and change type.
13675 2018-01-30 Pedro Alves <palves@redhat.com>
13677 * linux-nat.c (wait_for_signal): New function.
13678 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13680 (async_terminal_is_ours)
13681 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13682 (linux_nat_add_target): Don't override
13683 to_terminal_inferior/to_terminal_ours.
13685 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13687 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13689 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13691 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13692 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13693 dwarf2_per_objfile_free here.
13694 (dwarf2_per_objfile_free): Remove.
13695 (_initialize_dwarf2_read): Don't register
13696 dwarf2_per_objfile_free as a registry cleanup.
13698 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13700 Avoid compilation errors in MinGW native builds
13702 The error is triggered by including python-internal.h, and the
13705 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13706 from build-gnulib/import/math.h:27,
13707 from d:/usr/Python26/include/pyport.h:235,
13708 from d:/usr/Python26/include/Python.h:58,
13709 from python/python-internal.h:94,
13710 from python/py-arch.c:24:
13711 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13715 This happens because Python headers define 'hypot' to expand t
13716 '_hypot' in the Windows builds.
13717 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13718 'hypoth'. This avoids a compilation error.
13720 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13722 * MAINTAINERS (Write After Approval): Fix ordering.
13724 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13726 * MAINTAINERS (Write After Approval): Add Alan Hayward.
13728 2018-01-26 Alan Modra <amodra@gmail.com>
13730 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13731 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13732 Remove nop. Make const. Comment.
13733 (powerpc32_plt_stub_so_2): New.
13734 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13735 Correct count. Update uses.
13736 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13737 Move common code reading PLT entry word. Correct
13738 powerpc32_plt_stub PLT address calculation.
13739 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13740 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13741 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13742 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13743 (ppc64_standard_linkage8): Likewise.
13744 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13745 Correct insns description.
13746 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13748 2018-01-24 Pedro Alves <palves@redhat.com>
13750 GCC PR libstdc++/83906
13751 * gdbtypes.c (operator==(const dynamic_prop &,
13752 const dynamic_prop &)): New.
13753 (operator==(const range_bounds &, const range_bounds &)): New.
13754 (check_types_equal): Use them instead of memcmp.
13755 * gdbtypes.h (operator==(const dynamic_prop &,
13756 const dynamic_prop &)): Declare.
13757 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13758 (operator==(const range_bounds &, const range_bounds &)): Declare.
13759 (operator!=(const range_bounds &, const range_bounds &)): Declare.
13761 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13763 * s390-linux-tdep.c (s390_record_address_mask)
13764 (s390_record_calc_disp_common, s390_record_calc_disp)
13765 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13766 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13767 (s390_process_record): Move to s390-tdep.c.
13768 (s390_linux_init_abi_any): Adjust.
13769 * s390-tdep.c (s390_record_address_mask)
13770 (s390_record_calc_disp_common, s390_record_calc_disp)
13771 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13772 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13773 (s390_process_record): Moved from s390-linux-tdep.c
13774 (s390_gdbarch_init): Adjust.
13776 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13778 * s390-linux-nat.c (s390-tdep.h): New include.
13779 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13780 (HFILES_NO_SRCDIR): Add s390-tdep.h.
13781 (ALLDEPFILES): Add s390-tdep.c.
13782 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13783 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13784 * s390-tdep.h: ...this. New file.
13785 * s390-linux-tdep.c (s390-tdep.h): New include.
13786 (_initialize_s390_tdep): Rename to...
13787 (_initialize_s390_linux_tdep): ...this and adjust.
13788 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13789 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13791 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13792 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13793 (s390_is_partial_instruction, s390_software_single_step)
13794 (is_non_branch_ril, s390_displaced_step_copy_insn)
13795 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13796 (s390_prologue_data, s390_addr, s390_store, s390_load)
13797 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13798 (s390_register_call_saved, s390_guess_tracepoint_registers)
13799 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13800 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13801 (s390_pseudo_register_name, s390_pseudo_register_type)
13802 (s390_pseudo_register_read, s390_pseudo_register_write)
13803 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13804 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13805 (s390_addr_bits_remove, s390_address_class_type_flags)
13806 (s390_address_class_type_flags_to_name)
13807 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13808 (s390_function_arg_float, s390_function_arg_vector)
13809 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13810 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13811 (s390_frame_align, s390_register_return_value, s390_return_value)
13812 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13813 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13814 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13815 (s390_trad_frame_prev_register, s390_unwind_cache)
13816 (s390_prologue_frame_unwind_cache)
13817 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13818 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13819 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13820 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13821 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13822 (s390_frame_base_address, s390_local_base_address)
13823 (s390_frame_base, s390_gcc_target_options)
13824 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13825 (s390_validate_reg_range, s390_tdesc_valid)
13826 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13827 * s390-tdep.c: ...this. New file.
13829 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13831 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13832 (s390_process_record, s390_gdbarch_tdep_alloc)
13833 (s390_linux_init_abi_any): Use/set new hook.
13835 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13837 * s390-linux-tdep.c (osabi.h): New include.
13838 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13839 (s390_linux_init_abi_any): New functions.
13840 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13842 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13844 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13845 tdesc_has_registers check
13847 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13849 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13850 (s390_validate_reg_range): New macro.
13851 (s390_gdbarch_init): Adjust.
13853 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13855 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13856 (s390_gdbarch_tdep_alloc): Adjust.
13857 (s390_gdbarch_init): Adjust.
13859 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13861 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13862 <have_tdb>: Change type to bool.
13863 (s390_gdbarch_tdep_alloc): Adjust.
13864 (s390_gdbarch_init): Adjust.
13866 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13868 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13869 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13870 (s390_gdbarch_tdep_alloc): New function.
13871 (s390_gdbarch_init): Allocate tdep at start and use its fields
13872 instead of separate variables.
13874 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13876 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13877 when looking for cached gdbarch and add comment for remaining.
13879 2018-01-22 Pedro Alves <palves@redhat.com>
13880 Sergio Durigan Junior <sergiodj@redhat.com>
13882 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13885 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13887 * MAINTAINERS: Update my company e-mail address.
13889 2018-01-22 Yao Qi <yao.qi@linaro.org>
13891 * regcache.c (cooked_write_test): New function.
13892 (_initialize_regcache): Register the test.
13894 2018-01-22 Yao Qi <yao.qi@linaro.org>
13896 * ia64-tdep.c (ia64_pseudo_register_read): Call
13897 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13898 * m32c-tdep.c (m32c_cat_read): Likewise.
13899 (m32c_r3r2r1r0_read): Likewise.
13900 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13901 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13903 2018-01-22 Yao Qi <yao.qi@linaro.org>
13905 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13906 method raw_read instead of regcache_raw_read.
13907 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13908 * arm-tdep.c (arm_neon_quad_read): Likewise.
13909 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13910 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13911 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13912 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13913 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13914 (i386_pseudo_register_read_into_value): Likewise.
13915 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13916 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13917 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13918 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13919 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13920 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13921 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13922 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13923 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13925 2018-01-22 Yao Qi <yao.qi@linaro.org>
13927 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13928 * configure.tgt: Remove target mt.
13929 * mt-tdep.c: Remove.
13930 * regcache.c (cooked_read_test): Remove the check for mt.
13932 2018-01-22 Yao Qi <yao.qi@linaro.org>
13934 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13935 instead of gdbarch_pseudo_register_read_value.
13937 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13939 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13942 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13944 * linespec.c (create_sals_line_offset): Remove code that preserved
13945 the symtab_and_line's line number.
13947 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13949 * varobj.c (varobj_create): Don't set valid_block when creating a
13952 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13954 * varobj.c (varobj_create): Remove out of date comment.
13956 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13959 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13960 updating innermost block.
13961 * parse.c (innermost_block_tracker::update): Take extra type
13962 parameter, and check types match before updating innermost block.
13963 (write_dollar_variable): Update innermost block for registers.
13964 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13965 (innermost_block_tracker::innermost_block_tracker): Initialise
13967 (innermost_block_tracker::reset): Take type parameter.
13968 (innermost_block_tracker::update): Take type parameter, and pass
13969 type through as needed.
13970 (innermost_block_tracker::m_types): New member.
13971 * varobj.c (varobj_create): Pass type when reseting innermost
13974 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13976 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13977 * ada-lang.c (resolve_subexp): Likewise.
13978 * breakpoint.c (set_breakpoint_condition) Likewise.
13979 (watch_command_1) Likewise.
13980 * c-exp.y (variable): Likewise.
13981 * d-exp.y (PrimaryExpression): Likewise.
13982 * f-exp.y (variable): Likewise.
13983 * go-exp.y (variable): Likewise.
13984 * m2-exp.y (variable): Likewise.
13985 * objfiles.c (objfile::~objfile): Likewise.
13986 * p-exp.y (variable): Likewise.
13987 * parse.c (innermost_block): Change type.
13988 * parser-defs.h (class innermost_block_tracker): New.
13989 (innermost_block): Change to innermost_block_tracker.
13990 * printcmd.c (display_command): Switch to innermost_block API.
13991 (do_one_display): Likewise.
13992 * rust-exp.y (do_one_display): Likewise.
13993 * symfile.c (clear_symtab_users): Likewise.
13994 * varobj.c (varobj_create): Switch to innermost_block API, replace
13995 use of innermost_block with block stored on varobj object.
13997 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13999 * expression.h (innermost_block): Remove declaration.
14000 * varobj.c: Add 'parser-defs.h' include.
14002 2018-01-19 Tom Tromey <tom@tromey.com>
14004 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14005 symbols in the static and global blocks.
14007 2018-01-19 James Clarke <jrtc27@jrtc27.com>
14009 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14010 gdb_ptrace.h, and move including gdb_wait.h ...
14011 * nat/linux-ptrace.h: ... to here.
14013 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14015 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14016 inf_ptrace_detach_success.
14017 (inf_ptrace_detach_success): Add inferior parameter, use it
14018 instead of inferior_ptid, pass it to detach_inferior.
14019 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14021 * inferior.c (detach_inferior): Add overload that takes an
14023 * inferior.h (detach_inferior): Likewise.
14024 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14025 use inferior_ptid, adjust call to inf_ptrace_detach_success.
14026 * linux-thread-db.c (thread_db_detach): Use inf parameter.
14028 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14030 * target.h (struct target_ops) <to_detach>: Add inferior
14032 (target_detach): Likewise.
14033 * target.c (dispose_inferior): Pass inferior down.
14034 (target_detach): Pass inferior down. Assert that it is equal to
14035 the current inferior.
14036 * aix-thread.c (aix_thread_detach): Pass inferior down.
14037 * corefile.c (core_file_command): Pass current_inferior() down.
14038 * corelow.c (core_detach): Add inferior parameter.
14039 * darwin-nat.c (darwin_detach): Likewise.
14040 * gnu-nat.c (gnu_detach): Likewise.
14041 * inf-ptrace.c (inf_ptrace_detach): Likewise.
14042 * infcmd.c (detach_command): Pass current_inferior() down to
14044 * infrun.c (follow_fork_inferior): Pass parent_inf to
14046 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14048 * linux-nat.c (linux_nat_detach): Add inferior parameter.
14049 * linux-thread-db.c (thread_db_detach): Likewise.
14050 * nto-procfs.c (procfs_detach): Likewise.
14051 * procfs.c (procfs_detach): Likewise.
14052 * record.c (record_detach): Likewise.
14053 * record.h (struct inferior): Forward-declare.
14054 (record_detach): Add inferior parameter.
14055 * remote-sim.c (gdbsim_detach): Likewise.
14056 * remote.c (remote_detach_1): Likewise.
14057 (remote_detach): Likewise.
14058 (extended_remote_detach): Likewise.
14059 * sol-thread.c (sol_thread_detach): Likewise.
14060 * target-debug.h (target_debug_print_inferior_p): New macro.
14061 * target-delegates.c: Re-generate.
14062 * top.c (kill_or_detach): Pass inferior down to target_detach.
14063 * windows-nat.c (windows_detach): Add inferior parameter.
14065 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14067 * target.h (struct target_ops) <to_detach>: Remove args
14069 (target_detach): Likewise.
14070 * target.c (dispose_inferior): Adjust.
14071 (target_detach): Remove args parameter, adjust.
14072 * aix-thread.c (aix_thread_detach): Adjust.
14073 * corefile.c (core_file_command): Adjust.
14074 * corelow.c (core_detach): Adjust.
14075 * darwin-nat.c (darwin_detach): Adjust.
14076 * gnu-nat.c (gnu_detach): Adjust.
14077 * inf-ptrace.c (inf_ptrace_detach): Adjust.
14078 * infcmd.c (detach_command): Adjust
14079 * infrun.c (follow_fork_inferior): Adjust.
14080 (handle_vfork_child_exec_or_exit): Adjust.
14081 * linux-fork.c (linux_fork_detach): Remove args parameter.
14082 * linux-fork.h (linux_fork_detach): Likewise.
14083 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14084 * linux-thread-db.c (thread_db_detach): Likewise.
14085 * nto-procfs.c (procfs_detach): Likewise.
14086 * procfs.c (procfs_detach): Likewise.
14087 (do_detach): Remove signo parameter.
14088 * record.c (record_detach): Remove args parameter.
14089 * record.h (record_detach): Likewise.
14090 * remote-sim.c (gdbsim_detach): Likewise.
14091 * remote.c (remote_detach_1): Likewise.
14092 (remote_detach): Likewise.
14093 (extended_remote_detach): Likewise.
14094 * sol-thread.c (sol_thread_detach): Likewise.
14095 * target-delegates.c: Re-generate.
14096 * top.c (struct qt_args) <args>: Remove field.
14097 (kill_or_detach): Don't pass args.
14098 (quit_force): Don't set args.
14099 * windows-nat.c (windows_detach): Remove args parameter.
14101 2018-01-19 Yao Qi <yao.qi@linaro.org>
14103 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14104 (arm_linux_init_abi): Install it.
14106 2018-01-19 Yao Qi <yao.qi@linaro.org>
14108 * osabi.c (gdb_osabi_names): Extend the regexp for
14109 arm-linux-gnueabihf.
14111 2018-01-18 Yao Qi <yao.qi@linaro.org>
14113 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14115 (abbrev_table::add_abbrev): Update.
14116 (abbrev_table::lookup_abbrev): Update.
14118 2018-01-18 Yao Qi <yao.qi@linaro.org>
14120 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14122 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
14124 * compile/compile.c (compile_to_object): Convert "triplet_rx"
14127 2018-01-17 Tom Tromey <tom@tromey.com>
14129 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
14131 2018-01-17 Tom Tromey <tom@tromey.com>
14133 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14134 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14135 (create_array_type_with_stride): Update.
14136 * dwarf2read.c (set_die_type): Update.
14138 2018-01-17 Tom Tromey <tom@tromey.com>
14140 * dwarf2read.c (delayed_method_info): Remove typedef.
14141 (dwarf2_cu::method_info): Now a std::vector.
14142 (add_to_method_list): Update.
14143 (free_delayed_list): Remove.
14144 (compute_delayed_physnames): Update.
14145 (process_full_comp_unit, process_full_type_unit): Clear the method
14146 list. Remove cleanups.
14147 (psymtab_include_file_name): Add name_holder parameter. Use
14148 unique_xmalloc_ptr.
14149 (dwarf_decode_lines): Update.
14151 2018-01-17 Tom Tromey <tom@tromey.com>
14152 Simon Marchi <simon.marchi@ericsson.com>
14154 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14155 (dwarf2_per_objfile::free_cached_comp_units)
14156 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14157 (init_cutu_and_read_dies_no_follow): Update.
14158 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14159 (dwarf2_cu::~dwarf2_cu): New.
14160 (free_heap_comp_unit, free_stack_comp_unit): Remove.
14161 (age_cached_comp_units, free_one_cached_comp_unit): Update.
14163 2018-01-17 Tom Tromey <tom@tromey.com>
14164 Simon Marchi <simon.marchi@ericsson.com>
14166 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14167 (struct die_reader_specs) <abbrev_table>: New member.
14168 (struct abbrev_table): Add constructor.
14169 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14170 <abbrev_obstack>: Now an auto_obstack.
14171 (abbrev_table_up): New typedef.
14172 (init_cu_die_reader): Add abbrev_table parameter.
14173 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14174 Add result_dwo_abbrev_table.
14175 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14176 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14178 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14180 (skip_children): Update.
14181 (abbrev_table::alloc_abbrev): Rename from
14182 abbrev_table_alloc_abbrev.
14183 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14184 (abbrev_table::lookup_abbrev): Rename from
14185 abbrev_table_lookup_abbrev.
14186 (abbrev_table_read_table): Return abbrev_table_up.
14187 (abbrev_table_free, abbrev_table_free_cleanup)
14188 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14189 (load_partial_dies): Update.
14191 2018-01-17 Tom Tromey <tom@tromey.com>
14193 * dwarf2read.c (dwarf2_compute_name): Update comment.
14194 (read_func_scope, read_variable): Update.
14195 (new_symbol): Remove.
14196 (new_symbol_full): Rename to new_symbol.
14198 2018-01-17 Mike Gulick <mgulick@mathworks.com>
14201 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14202 a warning instead of throwing an error, set section size to 0 and return
14204 * gdb_bfd.h (gdb_bfd_map_section): Update description.
14206 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14208 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14210 (linux_ptrace_attach_fail_reason_string): Likewise.
14211 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14213 (linux_ptrace_attach_fail_reason_string): Likewise.
14214 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14216 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14218 * linux-nat.c (linux_nat_attach): Remove xstrdup.
14220 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
14223 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14224 checking for fs_base/gs_base fields in struct user_regs_struct.
14225 * configure: Regenerate.
14227 2018-01-17 Yao Qi <yao.qi@linaro.org>
14229 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14231 (aarch64_linux_init_abi): Install it to gdbarch hook
14232 gcc_target_options.
14234 2018-01-15 Pedro Alves <palves@redhat.com>
14236 * common/signals-state-save-restore.c
14237 (save_original_signals_state): Fix typos.
14239 2017-01-12 Tom Tromey <tom@tromey.com>
14240 Sergio Durigan Junior <sergiodj@redhat.com>
14242 * Makefile.in (install-only): Install gdb-add-index.
14244 2018-01-12 John Baldwin <jhb@FreeBSD.org>
14246 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14248 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
14250 * infrun.c (keep_going_pass_signal): Clear step-over info when
14251 insert_breakpoints fails.
14253 2018-01-11 Pedro Alves <palves@redhat.com>
14256 * infrun.c (resume): Rename to ...
14257 (resume_1): ... this.
14258 (resume): Reimplement as wrapper around resume_1.
14260 2018-01-11 Pedro Alves <palves@redhat.com>
14263 * remote.c (remote_parse_stop_reply): Default to the last-set
14264 general thread instead of to 'magic_null_ptid'.
14266 2018-01-10 Pedro Alves <palves@redhat.com>
14268 * language.h (language_get_symbol_name_matcher): Rename ...
14269 (get_symbol_name_matcher): ... this.
14270 * language.c (language_get_symbol_name_matcher): Ditto.
14271 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14274 2018-01-10 Pedro Alves <palves@redhat.com>
14278 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14279 Adjust to use language_get_symbol_name_matcher instead of
14280 language_defn::la_get_symbol_name_matcher.
14281 * language.c (language_get_symbol_name_matcher): If in Ada mode
14282 and the lookup name is a verbatim match, return Ada's matcher.
14283 * language.h (language_get_symbol_name_matcher): Adjust comment.
14284 (ada_lookup_name_info::verbatim_p):: New method.
14286 2018-01-10 Pedro Alves <palves@redhat.com>
14289 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14290 minsym's language is language_auto or language_cplus, pass down
14291 language_ada instead.
14292 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14294 2018-01-10 Pedro Alves <palves@redhat.com>
14297 * minsyms.c (linkage_name_str): New function.
14298 (iterate_over_minimal_symbols): Use it.
14300 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14302 * NEWS: Document that 'info proc' now works on FreeBSD.
14304 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14306 * configure.ac: Check for kinfo_getfile in libutil.
14307 * configure: Regenerate.
14308 * config.in: Regenerate.
14309 * fbsd-nat.c: Include "fbsd-tdep.h".
14310 (fbsd_fetch_cmdline): New.
14311 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14312 rather than calling error.
14313 (fbsd_info_proc): New.
14314 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14315 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14316 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14318 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14320 * fbsd-nat.c (struct free_deleter): Remove.
14321 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14323 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14325 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14326 NULL for an empty pathname.
14328 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14330 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14331 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14332 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14333 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14334 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14335 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14336 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14337 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14338 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14339 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14340 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14341 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14342 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14343 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14344 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14346 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14348 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14349 (gnu_xfer_auxv): New function.
14350 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14351 TARGET_OBJECT_AUXV.
14353 2018-01-08 Yao Qi <yao.qi@linaro.org>
14354 Simon Marchi <simon.marchi@ericsson.com>
14356 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14358 (COMMON_OBS): Remove selftest.o.
14359 * configure.ac: Append selftest-arch.c and common/selftest.c to
14360 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14361 * configure: Re-generated.
14362 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14364 (maintenance_info_selftests): Likewise.
14366 2018-01-08 Xavier Roirand <roirand@adacore.com>
14368 * ada-valprint.c (val_print_packed_array_elements): Use
14369 proper number of elements when printing an array indexed
14370 by an enumeration type.
14372 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14374 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14375 (dw2_get_file_names_reader): Adjust.
14376 (lookup_dwo_signatured_type): Adjust.
14377 (lookup_dwp_signatured_type): Adjust.
14378 (lookup_signatured_type): Adjust.
14379 (create_type_unit_group): Adjust.
14380 (get_type_unit_group): Adjust.
14381 (process_psymtab_comp_unit_reader): Adjust.
14382 (build_type_psymtabs_reader): Adjust.
14383 (scan_partial_symbols): Adjust.
14384 (add_partial_symbol): Adjust.
14385 (add_partial_subprogram): Adjust.
14386 (peek_die_abbrev): Adjust.
14387 (fixup_go_packaging): Adjust.
14388 (process_imported_unit_die): Adjust.
14389 (dwarf2_compute_name): Adjust.
14390 (dwarf2_physname): Adjust.
14391 (read_import_statement): Adjust.
14392 (handle_DW_AT_stmt_list): Adjust.
14393 (read_file_scope): Adjust.
14394 (read_func_scope): Adjust.
14395 (read_lexical_block_scope): Adjust.
14396 (read_call_site_scope): Adjust.
14397 (read_variable): Adjust.
14398 (dwarf2_rnglists_process): Adjust.
14399 (dwarf2_ranges_process): Adjust.
14400 (dwarf2_ranges_read): Adjust.
14401 (dwarf2_get_pc_bounds): Adjust.
14402 (dwarf2_record_block_ranges): Adjust.
14403 (dwarf2_add_field): Adjust.
14404 (dwarf2_add_member_fn): Adjust.
14405 (read_structure_type): Adjust.
14406 (process_structure_scope): Adjust.
14407 (read_enumeration_type): Adjust.
14408 (read_array_type): Adjust.
14409 (mark_common_block_symbol_computed): Adjust.
14410 (read_common_block): Adjust.
14411 (read_namespace_type): Adjust.
14412 (read_namespace): Adjust.
14413 (read_module_type): Adjust.
14414 (read_tag_pointer_type): Adjust.
14415 (read_tag_ptr_to_member_type): Adjust.
14416 (read_tag_string_type): Adjust.
14417 (read_subroutine_type): Adjust.
14418 (read_typedef): Adjust.
14419 (read_base_type): Adjust.
14420 (attr_to_dynamic_prop): Adjust.
14421 (read_subrange_type): Adjust.
14422 (read_unspecified_type): Adjust.
14423 (dwarf2_read_abbrevs): Adjust.
14424 (load_partial_dies): Adjust.
14425 (read_partial_die): Adjust.
14426 (find_partial_die): Adjust.
14427 (guess_partial_die_structure_name): Adjust.
14428 (fixup_partial_die): Adjust.
14429 (read_attribute_value): Adjust.
14430 (read_addr_index): Adjust.
14431 (read_addr_index_from_leb128): Adjust.
14432 (read_str_index): Adjust.
14433 (dwarf2_string_attr): Adjust.
14434 (get_debug_line_section): Adjust.
14435 (dwarf_decode_line_header): Adjust.
14436 (lnp_state_machine::check_line_address): Adjust.
14437 (dwarf_decode_lines_1): Adjust.
14438 (dwarf_decode_lines): Adjust.
14439 (dwarf2_start_symtab): Adjust.
14440 (var_decode_location): Adjust.
14441 (new_symbol_full): Adjust.
14442 (dwarf2_const_value_data): Adjust.
14443 (dwarf2_const_value_attr): Adjust.
14444 (dwarf2_const_value): Adjust.
14445 (die_type): Adjust.
14446 (die_containing_type): Adjust.
14447 (build_error_marker_type): Adjust.
14448 (lookup_die_type): Adjust.
14449 (guess_full_die_structure_name): Adjust.
14450 (anonymous_struct_prefix): Adjust.
14451 (determine_prefix): Adjust.
14452 (dwarf2_name): Adjust.
14453 (follow_die_ref_or_sig): Adjust.
14454 (follow_die_offset): Adjust.
14455 (follow_die_ref): Adjust.
14456 (follow_die_sig_1): Adjust.
14457 (follow_die_sig): Adjust.
14458 (get_signatured_type): Adjust.
14459 (get_DW_AT_signature_type): Adjust.
14460 (decode_locdesc): Adjust.
14461 (dwarf_decode_macros): Adjust.
14462 (cu_debug_loc_section): Adjust.
14463 (fill_in_loclist_baton): Adjust.
14464 (dwarf2_symbol_mark_computed): Adjust.
14465 (init_one_comp_unit): Don't assign
14466 dwarf2_cu::dwarf2_per_objfile.
14467 (set_die_type): Adjust.
14469 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14471 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14472 <dwarf2_per_objfile>: New field.
14473 (dwarf2_per_objfile): Remove global.
14474 (get_dwarf2_per_objfile): New function.
14475 (set_dwarf2_per_objfile): New function.
14476 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14477 dwarf2_per_objfile.
14478 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14479 (read_abbrev_offset): Likewise.
14480 (read_indirect_string): Likewise.
14481 (read_indirect_line_string): Likewise.
14482 (read_indirect_string_at_offset): Likewise.
14483 (read_indirect_string_from_dwz): Likewise.
14484 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14485 dwarf2_per_objfile.
14486 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14487 (create_all_comp_units): Change objfile parameter to
14488 dwarf2_per_objfile.
14489 (create_all_type_units): Likewise.
14490 (process_queue): Add dwarf2_per_objfile parameter.
14491 (read_and_check_comp_unit_head): Likewise.
14492 (lookup_dwo_unit_in_dwp): Likewise.
14493 (get_dwp_file): Likewise.
14494 (process_cu_includes): Likewise.
14495 (struct free_dwo_file_cleanup_data): New struct.
14496 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14497 set_dwarf2_per_objfile.
14498 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14499 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14500 context, adjust calls.
14501 (dw2_instantiate_symtab): Likewise.
14502 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14503 (dw2_get_cu): Likewise.
14504 (create_cu_from_index_list): Change objfile parameter to
14505 dwarf2_per_objfile.
14506 (create_cus_from_index_list): Get dwarf2_per_objfile from
14507 context, adjust calls.
14508 (create_cus_from_index): Likewise.
14509 (create_signatured_type_table_from_index): Change objfile
14510 parameter to dwarf2_per_objfile.
14511 (create_signatured_type_table_from_debug_names): Change objfile
14512 parameter to dwarf2_per_objfile.
14513 (create_addrmap_from_index): Likewise.
14514 (create_addrmap_from_aranges): Likewise.
14515 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14516 (dw2_setup): Remove.
14517 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14519 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14520 get_dwarf2_per_objfile.
14521 (dw2_forget_cached_source_info): Likewise.
14522 (dw2_map_symtabs_matching_filename): Likewise.
14523 (struct dw2_symtab_iterator) <index>: Remove.
14524 <dwarf2_per_objfile>: New field.
14525 (dw2_symtab_iter_init): Replace index parameter with
14526 dwarf2_per_objfile.
14527 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14528 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14529 (dw2_print_stats): Likewise.
14530 (dw2_dump): Likewise.
14531 (dw2_expand_symtabs_for_function): Likewise.
14532 (dw2_expand_all_symtabs): Likewise.
14533 (dw2_expand_symtabs_with_fullname): Likewise.
14534 (dw2_expand_marked_cus): Replace index and objfile parameters
14535 with dwarf2_per_objfile.
14536 (dw_expand_symtabs_matching_file_matcher): Add
14537 dwarf2_per_objfile parameter and adjust calls.
14538 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14540 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14541 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14543 (create_cus_from_debug_names_list): Replace objfile parameter
14544 with dwarf2_per_objfile and adjust calls.
14545 (create_cus_from_debug_names): Likewise.
14546 (dwarf2_read_debug_names): Likewise.
14547 (mapped_debug_names::namei_to_name): Adjust call.
14548 (dw2_debug_names_iterator::next): Likewise.
14549 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14550 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14551 (dw2_debug_names_dump): Likewise.
14552 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14553 (dw2_debug_names_expand_symtabs_matching): Likewise.
14554 (dwarf2_initialize_objfile): Likewise.
14555 (dwarf2_build_psymtabs): Likewise.
14556 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14558 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14559 (read_and_check_comp_unit_head): Likewise.
14560 (read_abbrev_offset): Likewise.
14561 (create_debug_type_hash_table): Likewise.
14562 (create_debug_types_hash_table): Likewise.
14563 (create_all_type_units): Replace objfile parameter with
14564 dwarf2_per_objfile.
14565 (add_type_unit): Add dwarf2_per_objfile parameter.
14566 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14567 with dwarf2_per_objfile.
14568 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14569 (lookup_dwp_signatured_type): Likewise.
14570 (lookup_signatured_type): Likewise.
14571 (read_cutu_die_from_dwo): Likewise.
14572 (init_tu_and_read_dwo_dies): Likewise.
14573 (init_cutu_and_read_dies): Likewise.
14574 (init_cutu_and_read_dies_no_follow): Likewise.
14575 (allocate_type_unit_groups_table): Add objfile parameter.
14576 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14577 (get_type_unit_group): Likewise.
14578 (process_psymtab_comp_unit): Update call.
14579 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14580 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14581 (print_tu_stats): Likewise.
14582 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14583 in void* parameter.
14584 (build_type_psymtabs): Change objfile parameter to
14585 dwarf2_per_objfile.
14586 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14587 passed in void* parameter.
14588 (process_skeletonless_type_units): Change objfile parameter to
14589 dwarf2_per_objfile.
14590 (set_partial_user): Likewise.
14591 (dwarf2_build_psymtabs_hard): Likewise.
14592 (read_comp_units_from_section): Likewise.
14593 (create_all_comp_units): Likewise.
14594 (scan_partial_symbols): Update calls.
14595 (add_partial_symbol): Likewise.
14596 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14597 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14598 (process_queue): Add dwarf2_per_objfile parameter.
14599 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14600 (compute_compunit_symtab_includes): Likewise.
14601 (process_cu_includes): Add dwarf2_per_objfile parameter.
14602 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14603 (process_full_type_unit): Likewise.
14604 (process_imported_unit_die): Update call.
14605 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14606 (read_file_scope): Likewise.
14607 (allocate_dwo_file_hash_table): Add objfile parameter.
14608 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14609 (create_cus_hash_table): Likewise.
14610 (create_dwp_hash_table): Likewise.
14611 (create_dwo_unit_in_dwp_v1): Likewise.
14612 (create_dwp_v2_section): Likewise.
14613 (create_dwo_unit_in_dwp_v2): Likewise.
14614 (lookup_dwo_unit_in_dwp): Likewise.
14615 (try_open_dwop_file): Likewise.
14616 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14617 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14618 cleanup to include a reference to dwarf2_per_objfile.
14619 (open_dwp_file): Add dwarf2_per_objfile parameter.
14620 (open_and_init_dwp_file): Likewise.
14621 (get_dwp_file): Likewise.
14622 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14623 (queue_and_load_all_dwo_tus): Update call.
14624 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14626 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14627 (dwarf2_ranges_process): Likewise.
14628 (dwarf2_get_pc_bounds): Likewise.
14629 (mark_common_block_symbol_computed): Likewise.
14630 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14631 (dwarf2_read_abbrevs): Update call.
14632 (read_partial_die): Use dwarf2_per_objfile from cu.
14633 (find_partial_die): Likewise.
14634 (fixup_partial_die): Likewise.
14635 (read_attribute_value): Likewise.
14636 (read_indirect_string_at_offset_from): Add objfile parameter.
14637 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14639 (read_indirect_string_from_dwz): Add objfile parameter.
14640 (read_indirect_string): Add objfile parameter.
14641 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14642 (read_addr_index): Use dwarf2_per_objfile from cu.
14643 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14645 (read_str_index): Use dwarf2_per_objfile from cu.
14646 (get_debug_line_section): Likewise.
14647 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14648 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14649 (new_symbol_full): Use dwarf2_per_objfile from cu.
14650 (build_error_marker_type): Likewise.
14651 (lookup_die_type): Likewise.
14652 (determine_prefix): Likewise.
14653 (follow_die_offset): Likewise.
14654 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14655 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14656 (dwarf2_fetch_die_type_sect_off): Likewise.
14657 (dwarf2_get_die_type): Likewise.
14658 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14659 (get_signatured_type): Likewise.
14660 (get_DW_AT_signature_type): Likewise.
14661 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14662 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14663 (cu_debug_loc_section): Likewise.
14664 (fill_in_loclist_baton): Likewise.
14665 (dwarf2_symbol_mark_computed): Likewise.
14666 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14667 dwarf2_per_objfile.
14668 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14670 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14671 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14672 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14673 (set_die_type): Use dwarf2_free_objfile from cu.
14674 (get_die_type_at_offset): Likewise.
14675 (dwarf2_per_objfile_free): Don't assign global variable.
14676 (debug_names) <constructor>: Add dwarf2_per_objfile
14677 parameter, update m_debugstrlookup construction.
14678 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14680 <m_dwarf2_per_objfile>: New field.
14681 <lookup>: Use m_dwarf2_per_objfile.
14682 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14683 (psyms_seen_size): Likewise.
14684 (write_gdbindex): Replace objfile parameter with
14685 dwarf2_per_objfile.
14686 (write_debug_names): Likewise.
14687 (write_psymtabs_to_index): Likewise.
14688 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14691 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14693 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14694 <dwarf2_per_objfile>: New field.
14695 (struct dwarf2_per_cu_data) <objfile>: Remove.
14696 <dwarf2_per_objfile>: New field.
14697 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14699 (create_signatured_type_table_from_index): Likewise.
14700 (create_debug_type_hash_table): Likewise.
14701 (fill_in_sig_entry_from_dwo_entry): Likewise.
14702 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14703 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14705 (create_partial_symtab): Access objfile through
14706 dwarf2_per_objfile.
14707 (process_psymtab_comp_unit_reader): Likewise.
14708 (read_comp_units_from_section): Likewise.
14709 (scan_partial_symbols): Likewise.
14710 (add_partial_symbol): Likewise.
14711 (add_partial_subprogram): Likewise.
14712 (peek_die_abbrev): Likewise.
14713 (fixup_go_packaging): Likewise.
14714 (process_full_comp_unit): Likewise.
14715 (process_full_type_unit): Likewise.
14716 (process_imported_unit_die): Likewise.
14717 (dwarf2_compute_name): Likewise.
14718 (dwarf2_physname): Likewise.
14719 (read_import_statement): Likewise.
14720 (create_cus_hash_table): Assign dwarf2_physname instead of
14722 (read_func_scope): Access objfile through dwarf2_per_objfile.
14723 (read_lexical_block_scope): Likewise.
14724 (read_call_site_scope): Likewise.
14725 (read_variable): Likewise.
14726 (dwarf2_rnglists_process): Likewise.
14727 (dwarf2_ranges_process): Likewise.
14728 (dwarf2_ranges_read): Likewise.
14729 (dwarf2_record_block_ranges): Likewise.
14730 (dwarf2_add_field): Likewise.
14731 (dwarf2_add_member_fn): Likewise.
14732 (read_structure_type): Likewise.
14733 (process_structure_scope): Likewise.
14734 (read_enumeration_type): Likewise.
14735 (read_array_type): Likewise.
14736 (read_common_block): Likewise.
14737 (read_namespace_type): Likewise.
14738 (read_namespace): Likewise.
14739 (read_module_type): Likewise.
14740 (read_tag_pointer_type): Likewise.
14741 (read_tag_ptr_to_member_type): Likewise.
14742 (read_tag_string_type): Likewise.
14743 (read_subroutine_type): Likewise.
14744 (read_typedef): Likewise.
14745 (read_base_type): Likewise.
14746 (attr_to_dynamic_prop): Likewise.
14747 (read_subrange_type): Likewise.
14748 (read_unspecified_type): Likewise.
14749 (load_partial_dies): Likewise.
14750 (read_partial_die): Likewise.
14751 (find_partial_die): Likewise.
14752 (guess_partial_die_structure_name): Likewise.
14753 (fixup_partial_die): Likewise.
14754 (read_attribute_value): Likewise.
14755 (read_addr_index_from_leb128): Likewise.
14756 (dwarf2_read_addr_index): Likewise.
14757 (dwarf2_string_attr): Likewise.
14758 (lnp_state_machine::check_line_address): Likewise.
14759 (dwarf_decode_lines_1): Likewise.
14760 (dwarf_decode_lines): Likewise.
14761 (dwarf2_start_symtab): Likewise.
14762 (var_decode_location): Likewise.
14763 (new_symbol_full): Likewise.
14764 (dwarf2_const_value_data): Likewise.
14765 (dwarf2_const_value_attr): Likewise.
14766 (dwarf2_const_value): Likewise.
14767 (die_type): Likewise.
14768 (die_containing_type): Likewise.
14769 (lookup_die_type): Likewise.
14770 (guess_full_die_structure_name): Likewise.
14771 (anonymous_struct_prefix): Likewise.
14772 (dwarf2_name): Likewise.
14773 (follow_die_ref_or_sig): Likewise.
14774 (follow_die_offset): Likewise.
14775 (follow_die_ref): Likewise.
14776 (dwarf2_fetch_die_loc_sect_off): Likewise.
14777 (dwarf2_fetch_constant_bytes): Likewise.
14778 (dwarf2_fetch_die_type_sect_off): Likewise.
14779 (dwarf2_get_die_type): Likewise.
14780 (follow_die_sig): Likewise.
14781 (decode_locdesc): Likewise.
14782 (dwarf2_per_cu_objfile): Likewise.
14783 (dwarf2_per_cu_text_offset): Likewise.
14784 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14786 (set_die_type): Access objfile through
14787 dwarf2_per_objfile.
14789 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14791 * valprint.c (converted_character_d): Remove typedef.
14792 (DEF_VEC_O (converted_character_d)): Remove.
14793 (count_next_character): Use std::vector.
14794 (print_converted_chars_to_obstack): Likewise.
14795 (generic_printstr): Likewise.
14797 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14799 * xml-support.h (struct gdb_xml_value): Add constructor.
14800 <value>: Change type to unique_xmalloc_ptr.
14801 (gdb_xml_value_s): Remove typedef.
14802 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14803 (gdb_xml_element_start_handler): Change parameter type to
14805 (xml_find_attribute): Likewise.
14806 * xml-support.c (xml_find_attribute): Change parameter type to
14807 std::vector and adjust.
14808 (gdb_xml_values_cleanup): Remove.
14809 (gdb_xml_parser::start_element): Adjust to std::vector.
14810 (xinclude_start_include): Change paraeter type to std::vector
14812 * btrace.c (check_xml_btrace_version): Likewise.
14813 (parse_xml_btrace_block): Likewise.
14814 (parse_xml_btrace_pt_config_cpu): Likewise.
14815 (parse_xml_btrace_pt): Likewise.
14816 (parse_xml_btrace_conf_bts): Likewise.
14817 (parse_xml_btrace_conf_pt): Likewise.
14818 * memory-map.c (memory_map_start_memory): Likewise.
14819 (memory_map_start_property): Likewise.
14820 * osdata.c (osdata_start_osdata): Likewise.
14821 (osdata_start_item): Likewise.
14822 (osdata_start_column): Likewise.
14823 * remote.c (start_thread): Likewise.
14824 * solib-aix.c (library_list_start_library): Likewise.
14825 (library_list_start_list): Likewise.
14826 * solib-svr4.c (library_list_start_library): Likewise.
14827 (svr4_library_list_start_list): Likewise.
14828 * solib-target.c (library_list_start_segment): Likewise.
14829 (library_list_start_section): Likewise.
14830 (library_list_start_library): Likewise.
14831 (library_list_start_list): Likewise.
14832 * tracepoint.c (traceframe_info_start_memory): Likewise.
14833 (traceframe_info_start_tvar): Likewise.
14834 * xml-syscall.c (syscall_start_syscall): Likewise.
14835 * xml-tdesc.c (tdesc_start_target): Likewise.
14836 (tdesc_start_feature): Likewise.
14837 (tdesc_start_reg): Likewise.
14838 (tdesc_start_union): Likewise.
14839 (tdesc_start_struct): Likewise.
14840 (tdesc_start_flags): Likewise.
14841 (tdesc_start_enum): Likewise.
14842 (tdesc_start_field): Likewise.
14843 (tdesc_start_enum_value): Likewise.
14844 (tdesc_start_vector): Likewise.
14846 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14848 * extension.h (struct xmethod_worker) <clone>: Remove.
14849 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14851 (python_xmethod_worker::clone): Remove.
14852 * valops.c (find_overload_match): Use std::move instead of
14855 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14857 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14858 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14859 <free_xmethod_worker_data>: Remove.
14860 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14861 <get_xmethod_arg_types>: Remove.
14862 <get_xmethod_result_type>: Remove.
14863 <invoke_xmethod>: Remove.
14864 * extension.c (new_xmethod_worker): Remove.
14865 (clone_xmethod_worker): Remove.
14866 (get_matching_xmethod_workers): Return void, pass std::vector by
14868 (get_xmethod_arg_types): Rename to...
14869 (xmethod_worker::get_arg_types): ... this, and adjust.
14870 (get_xmethod_result_type): Rename to...
14871 (xmethod_worker::get_result_type): ... this, and adjust.
14872 (invoke_xmethod): Remove.
14873 (free_xmethod_worker): Remove.
14874 (free_xmethod_worker_vec): Remove.
14875 * extension.h (enum ext_lang_rc): Move here from
14877 (struct xmethod_worker): Add constructor and destructor.
14880 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14881 virtual pure methods.
14882 <get_arg_types, get_result_type>: New methods.
14883 (xmethod_worker_ptr): Remove typedef.
14884 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14885 (xmethod_worker_vec): Remove typedef.
14886 (xmethod_worker_up): New typedef.
14887 (invoke_xmethod): Remove.
14888 (clone_xmethod_worker): Remove.
14889 (free_xmethod_worker): Remove.
14890 (free_xmethod_worker_vec): Remove.
14891 (get_xmethod_arg_types): Remove.
14892 (get_xmethod_result_type): Remove.
14893 * valops.c (find_method_list): Use std::vector, don't use
14894 intermediate vector.
14895 (value_find_oload_method_list): Use std::vector.
14896 (find_overload_match): Use std::vector.
14897 (find_oload_champ): Use std::vector.
14898 * value.c (value_free): Use operator delete.
14899 (value_of_xmethod): Rename to...
14900 (value_from_xmethod): ... this. Don't assign
14901 xmethod_worker::value, take rvalue-reference.
14902 (result_type_of_xmethod): Adjust.
14903 (call_xmethod): Adjust.
14904 * value.h: Include extension.h.
14905 (struct xmethod_worker): Don't forward-declare.
14906 (value_of_xmethod): Rename to...
14907 (value_from_xmethod): ... this, take rvalue-reference.
14908 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14909 (struct python_xmethod_worker): ... this, add constructor and
14911 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14912 (gdbpy_free_xmethod_worker_data): Rename to...
14913 (python_xmethod_worker::~python_xmethod_worker): ... this and
14915 (gdbpy_clone_xmethod_worker_data): Rename to...
14916 (python_xmethod_worker::clone): ... this and adjust.
14917 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14919 (gdbpy_get_xmethod_arg_types): Rename to...
14920 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14921 (gdbpy_get_xmethod_result_type): Rename to...
14922 (python_xmethod_worker::do_get_result_type): ... this and
14924 (gdbpy_invoke_xmethod): Rename to...
14925 (python_xmethod_worker::invoke): ... this and adjust.
14926 (new_python_xmethod_worker): Rename to...
14927 (python_xmethod_worker::python_xmethod_worker): ... this and
14929 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14931 (gdbpy_free_xmethod_worker_data): Remove.
14932 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14933 (gdbpy_get_xmethod_arg_types): Remove.
14934 (gdbpy_get_xmethod_result_type): Remove.
14935 (gdbpy_invoke_xmethod): Remove.
14936 * python/python.c (python_extension_ops): Remove obsolete
14939 2018-01-05 Pedro Alves <palves@redhat.com>
14942 * common/signals-state-save-restore.c
14943 (save_original_signals_state): New parameter 'quiet'. Warn if we
14944 find a custom handler preinstalled, instead of internal erroring.
14945 But only warn if !quiet.
14946 * common/signals-state-save-restore.h
14947 (save_original_signals_state): New parameter 'quiet'.
14948 * main.c (captured_main_1): Move save_original_signals_state call
14949 after option handling, and pass QUIET.
14951 2018-01-05 Pedro Alves <palves@redhat.com>
14953 * spu-tdep.c (spu_catch_start): Pass
14954 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14956 2018-01-05 Pedro Alves <palves@redhat.com>
14959 * ada-lang.c (literal_symbol_name_matcher): New function.
14960 (ada_get_symbol_name_matcher): Use it for
14961 symbol_name_match_type::SEARCH_NAME.
14962 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14963 it down instead of assuming symbol_name_match_type::FULL.
14964 * block.h (block_lookup_symbol): New parameter 'match_type'.
14965 * c-valprint.c (print_unpacked_pointer): Use
14966 lookup_symbol_search_name instead of lookup_symbol.
14967 * compile/compile-object-load.c (get_out_value_type): Pass down
14968 symbol_name_match_type::SEARCH_NAME.
14969 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14970 symbol_name_match_type::FULL.
14971 * cp-support.c (cp_get_symbol_name_matcher): Handle
14972 symbol_name_match_type::SEARCH_NAME.
14973 * infrun.c (insert_exception_resume_breakpoint): Use
14974 lookup_symbol_search_name.
14975 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14976 * psymtab.c (maintenance_check_psymtabs): Use
14977 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14978 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14979 SYMBOL_SEARCH_NAME.
14980 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14981 if symbol_name_match_type::SEARCH_NAME.
14982 (lookup_symbol_in_language): Pass down
14983 symbol_name_match_type::FULL.
14984 (lookup_symbol_search_name): New.
14985 (lookup_language_this): Pass down
14986 symbol_name_match_type::SEARCH_NAME.
14987 (lookup_symbol_aux, lookup_local_symbol): New parameter
14988 'match_type'. Pass it down.
14989 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14990 (lookup_symbol_search_name): New declaration.
14991 (lookup_symbol_in_block): New 'match_type' parameter.
14993 2018-01-05 Pedro Alves <palves@redhat.com>
14996 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14998 (ada_lookup_symbol): Reimplement in terms of
14999 ada_lookup_symbol_list, bits factored out from
15000 ada_lookup_encoded_symbol.
15002 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15004 * ada-exp.y (write_object_renaming): When subscripting an array
15005 using a symbol as the index, pass the block in call to
15006 ada_lookup_encoded_symbol when looking that symbol up.
15008 2018-01-05 Jerome Guitton <guitton@adacore.com>
15010 * ada-lang.c (ada_array_length): Use ada_index_type instead of
15013 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15015 * ada-lang.c (ada_to_fixed_value_create): Add handling of
15016 the case where VALUE_LVAL (val0) is not lval_memory.
15018 2018-01-05 Xavier Roirand <roirand@adacore.com>
15020 * ada-valprint.c (print_optional_low_bound): Handle
15021 character-indexed array printing like boolean-indexed array
15024 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15026 * NEWS: Create a new section for the next release branch.
15027 Rename the section of the current branch, now that it has
15030 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15032 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15033 * version.in: Bump version to 8.1.50.DATE-git.
15035 2018-01-03 Xavier Roirand <roirand@adacore.com>
15037 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15039 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15041 (default_exception_support_info) <catch_handlers_sym>: Add field.
15042 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15043 (ada_exception_name_addr_1): Add "catch handlers" handling.
15044 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15045 Update all callers.
15046 (create_excep_cond_exprs) <ex>: Add parameter.
15047 (re_set_exception): Update create_excep_cond_exprs call.
15048 (print_it_exception, print_one_exception, print_mention_exception)
15049 (print_recreate_exception): Add "catch handler" handling.
15050 (allocate_location_catch_handlers, re_set_catch_handlers)
15051 (check_status_catch_handlers, print_it_catch_handlers)
15052 (print_one_catch_handlers, print_mention_catch_handlers)
15053 (print_recreate_catch_handlers): New function.
15054 (catch_handlers_breakpoint_ops): New variable.
15055 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15056 Add parameter. Add "catch handler" handling.
15057 (ada_exception_sym_name, ada_exception_breakpoint_ops):
15058 Add "catch handler" handling.
15059 (ada_exception_catchpoint_cond_string): Add "catch handler"
15061 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15063 (catch_ada_handlers_command): New function.
15064 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15065 operations structure.
15066 (_initialize_ada_language): Add "catch handlers" command entry.
15067 * NEWS: Document "catch handlers" feature.
15069 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15071 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15072 account when creating the array type of the slice.
15073 (ada_value_slice): Likewise.
15075 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15077 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15079 (create_array_type_with_stride): Add byte_stride_prop parameter.
15080 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15081 New parameter. Update all callers in this file.
15082 (array_type_has_dynamic_stride): New function.
15083 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15084 of arrays with dynamic byte strides.
15085 * dwarf2read.c (read_array_type): Add support for dynamic
15086 DW_AT_byte_stride attributes.
15088 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15090 * dwarf2read.c (read_unspecified_type): Treat
15091 DW_TAG_enumeration_type DIEs from Ada units as stubs.
15093 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15095 Update copyright year range in all GDB files.
15097 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
15099 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15100 and gdb/testsuite/gdb.base/step-line.c.
15102 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15104 * copyright.py (main): Dump the contents of
15105 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15106 even if BY_HAND is empty.
15108 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15110 * top.c (print_gdb_version): Update Copyright year in version
15113 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15115 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15117 For older changes see ChangeLog-2017.
15123 version-control: never