[PowerPC] Add support for PPR and DSCR
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3
4 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
5 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
6 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
7 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
8 (struct ppc_linux_features) <ppr_dscr>: New field.
9 (ppc_linux_no_features): Add initializer for ppr_dscr field.
10 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
11 new tdescs.
12 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
13 Define if not already defined.
14 * features/Makefile (WHICH): Add
15 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
16 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
17 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
18 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
19 * features/rs6000/power-dscr.xml: New file.
20 * features/rs6000/power-ppr.xml: New file.
21 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
22 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
23 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
24 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
25 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
26 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
27 * ppc-linux-nat.c: Include <sys/uio.h>.
28 (fetch_regset, store_regset, check_regset): New functions.
29 (fetch_register, fetch_ppc_registers): Call fetch_regset with
30 DSCR and PPR regsets.
31 (store_register, store_ppc_registers): Call store_regset with
32 DSCR and PPR regsets.
33 (ppc_linux_get_hwcap2): New function.
34 (ppc_linux_nat_target::read_description): Call
35 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
36 features struct if needed.
37 * ppc-linux-tdep.c: Include
38 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
39 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
40 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
41 (ppc32_linux_dscrregset): New globals.
42 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
43 and dscr regsets.
44 (ppc_linux_core_read_description): Check if the ppr and dscr
45 sections are present and set ppr_dscr in the features struct.
46 (_initialize_ppc_linux_tdep): Call
47 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
48 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
49 * ppc-linux-tdep.h (ppc32_linux_pprregset)
50 (ppc32_linux_dscrregset): Declare.
51 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
52 <ppc_dscr_regnum>: New field.
53 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
54 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
55 and dscr features.
56 (ppc_process_record_op31): Record changes to PPR and DSCR.
57
58 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
59
60 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
61 second initializer line for the have_* variables. Initialize
62 have_fpu to 0 instead of 1.
63
64 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
65
66 * arch/ppc-linux-common.c (ppc_linux_match_description):
67 Parenthesize tdesc assignements and indent them properly.
68
69 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
70
71 * ppc-linux-nat.c (fetch_register): Change if statement to else
72 if.
73 (store_register): Likewise.
74
75 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
76
77 * rs6000-tdep.c: Remove reggroups.h include.
78 (rs6000_pseudo_register_reggroup_p): Remove.
79 (rs6000_gdbarch_init): Remove call to
80 set_tdesc_pseudo_register_reggroup_p.
81
82 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
83
84 * reggroups.c (default_register_reggroup_p): Return true for
85 decfloat registers and float_reggroup.
86
87 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
88
89 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
90 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
91 ppc_linux_collect_vrregset by regcache_collect_regset.
92
93 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
94
95 * linux-tdep.c (linux_collect_regset_section_cb): Use
96 std::vector<gdb_byte> instead of char * and malloc for buf.
97 Remove xfree.
98
99 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
100
101 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
102 symtab_start instead of always using language_unknown.
103
104 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
105
106 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
107 READ_P parameter, catch and ignore register access errors from
108 either the old or new MISA location.
109 (riscv_has_feature): Update call to riscv_read_misa_reg.
110
111 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
112
113 * python/py-function.c (convert_values_to_python): Return
114 gdbpy_ref<>. Add header comment.
115 (fnpy_call): Adjust.
116
117 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
118
119 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
120 (cmdpy_completer_handle_brkchars): Adjust.
121 (cmdpy_completer): Adjust.
122
123 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
124
125 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
126 Pass correct regnum to raw_supply_zeroed.
127
128 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
129
130 * regcache.c (cooked_read_test): Add CSKY to the list of
131 architectures with a save_reggroup
132
133 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
134
135 PR gdb/23368
136 * infrun.c (follow_exec): In the follow_exec_mode_new case,
137 transfer terminal state from old new new inferior.
138 * terminal.h (swap_terminal_info): New function.
139 * inflow.c (swap_terminal_info): New function.
140
141 2018-10-23 Tom Tromey <tom@tromey.com>
142
143 * record-btrace.c (get_thread_current_frame_id): Rename from
144 get_thread_current_frame. Return a frame_id.
145 (record_btrace_start_replaying): Update.
146
147 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
148
149 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
150 for CSRs.
151
152 2018-10-23 Joel Brobecker <brobecker@adacore.com>
153
154 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
155 have_nonsteppable_watchpoint attribute to 1.
156
157 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
158
159 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
160 register names.
161 (struct register_alias): Rename to...
162 (struct riscv_register_alias): ...this, and update comment.
163 (riscv_register_aliases): Update type, and alias names. Remove
164 CSR names from this list.
165 (riscv_register_name): Use riscv_gdb_reg_names for int and float
166 register names. Add an extra assertion.
167 (riscv_is_regnum_a_named_csr): New function.
168 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
169
170 2018-10-22 Jim Wilson <jimw@sifive.com>
171
172 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
173 FP reg smaller than FP reg size, and fill with -1 instead of 0.
174
175 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
176 (riscv_register_type): Use them.
177 (riscv_print_one_register_info): Handle union of floats same as float.
178 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
179 riscv_fpreg_q_type fields.
180
181 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
182
183 * gdbarch.sh (gdbarch_num_cooked_regs): New.
184 * gdbarch.h: Re-generate.
185 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
186 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
187 * eval.c (evaluate_subexp_standard): Likewise.
188 * findvar.c (value_of_register): Likewise.
189 (value_of_register_lazy): Likewise.
190 (address_from_register): Likewise.
191 * frame.c (get_frame_register_bytes): Likewise.
192 * gdbarch-selftests.c (register_to_value_test): Likewise.
193 * h8300-tdep.c (h8300_register_type): Likewise.
194 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
195 (i386_svr4_reg_to_regnum): Likewise.
196 * infcmd.c (default_print_registers_info): Likewise.
197 (registers_info): Likewise.
198 (print_vector_info): Likewise.
199 (default_print_float_info): Likewise.
200 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
201 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
202 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
203 (mi_cmd_data_list_changed_registers): Likewise.
204 (mi_cmd_data_list_register_values): Likewise.
205 (mi_cmd_data_write_register_values): Likewise.
206 (mi_cmd_trace_frame_collected): Likewise.
207 * mips-tdep.c (print_gp_register_row): Likewise.
208 (mips_print_registers_info): Likewise.
209 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
210 * regcache.c (init_regcache_descr): Likewise.
211 (register_size): Likewise.
212 (register_dump::dump): Likewise.
213 (cooked_read_test): Likewise.
214 (cooked_write_test): Likewise.
215 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
216 (rs6000_gdbarch_init): Likewise.
217 * stabsread.c (stab_reg_to_regnum): Likewise.
218 * stack.c (info_frame_command): Likewise.
219 * target-descriptions.c (tdesc_register_name): Likewise.
220 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
221 * tui/tui-regs.c (tui_show_register_group): Likewise.
222 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
223 (user_reg_map_regnum_to_name): Likewise.
224 (value_of_user_reg): Likewise.
225 (maintenance_print_user_registers): Likewise.
226 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
227 (xtensa_register_name): Likewise.
228 (xtensa_register_type): Likewise.
229 (xtensa_reg_to_regnum): Likewise.
230 (xtensa_pseudo_register_read): Likewise.
231 (xtensa_pseudo_register_write): Likewise.
232
233 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
234
235 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
236 correctly-sized buffer with raw_read.
237 (amd64_pseudo_register_write): Use correctly-sized buffer for
238 raw_read/raw_write.
239
240 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
241
242 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
243 in add_prefix_cmd of set print type.
244
245 2018-10-19 Tom Tromey <tom@tromey.com>
246
247 PR tui/18388:
248 * NEWS: Mention tabset deprecation.
249 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
250 (update_tab_width): New function.
251 (tui_set_tab_width, tui_show_tab_width): New functions.
252 (tui_set_tab_width_command): Use update_tab_width.
253 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
254 Add new "set tui tab-width" command.
255 * tui/tui-source.c (tui_set_source_content): Update.
256 * tui/tui-disasm.c (tui_set_disassem_content): Update.
257 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
258 Don't declare.
259 (tui_tab_width): Declare.
260 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
261 (tui_set_default_tab_len): Remove.
262
263 2018-10-19 Tom Tromey <tom@tromey.com>
264
265 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
266 (key_is_backspace, tui_getc): Don't declare.
267 * tui/tui-io.c (key_is_start_sequence): Now static.
268 (key_is_end_sequence, key_is_backspace): Remove.
269 (tui_getc): Now static.
270
271 2018-10-19 Tom Tromey <tom@tromey.com>
272
273 * symfile.c (reread_symbols): Clear "static_links".
274
275 2018-10-19 Alan Hayward <alan.hayward@arm.com>
276
277 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
278 define.
279 (aarch64_linux_sigframe_init): Extra boundary checks.
280
281 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
282
283 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
284 the possibly non-existent tdesc type 'vec128', but the type of raw
285 register v16 instead.
286
287 2018-10-19 Gary Benson <gbenson@redhat.com>
288
289 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
290
291 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
292
293 PR cli/23785
294 * cli/cli-dump.c (restore_binary_file): Check if "file" is
295 NULL.
296
297 2018-10-17 Paul Koning <paul_koning@dell.com>
298
299 * charset.c (convert_between_encodings): Fix unsigned overflow.
300
301 2018-10-17 John Baldwin <jhb@FreeBSD.org>
302
303 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
304 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
305 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
306 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
307 New functions.
308 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
309 and fbsd_info_proc_mappings_header.
310 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
311 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
312 New.
313
314 2018-10-17 Joel Brobecker <brobecker@adacore.com>
315
316 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
317 Solaris Maintainer.
318
319 2018-10-15 Tom Tromey <tom@tromey.com>
320
321 * tui/tui.c (strcat_to_buf): Remove casts.
322 * tui/tui-winsource.c (tui_show_source_line)
323 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
324 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
325 * tui/tui-windata.c (tui_first_data_item_displayed)
326 (tui_delete_data_content_windows, tui_erase_data_content)
327 (tui_display_all_data, tui_display_data_from)
328 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
329 * tui/tui-win.c (tui_set_win_height)
330 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
331 casts.
332 * tui/tui-win.c (tui_resize_all): Remove casts.
333 (tui_scroll_backward_command, tui_set_focus)
334 (tui_set_tab_width_command): Likewise.
335 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
336 * tui/tui-regs.c (tui_show_register_group): Remove cast.
337 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
338 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
339 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
340 Remove casts.
341
342 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
343
344 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
345 AArch64/ARM maintainer.
346
347 2018-10-11 Gary Benson <gbenson@redhat.com>
348
349 * interps.h (interp::m_name): Make private and mutable.
350 * interps.c (interp::~interp): Free m_name.
351
352 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
353 Simon Marchi <simark@simark.ca>
354
355 * README (`configure' options): Add documentation for new
356 "--enable-unit-tests" option.
357 * acinclude.m4: Include "selftest.m4".
358 * configure: Regenerate.
359 * configure.ac: Use "GDB_AC_SELFTEST".
360 * maint.c (maintenance_selftest): Update message informing
361 that selftests have been disabled.
362 (maintenance_info_selftests): Likewise.
363 * selftest.m4: New file.
364
365 2018-10-10 Gary Benson <gbenson@redhat.com>
366
367 * remote.c (remote_target::remote_send_printf): Add
368 missing va_end found by Coverity.
369
370 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
371
372 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
373
374 2018-10-09 Tom Tromey <tom@tromey.com>
375
376 * configure: Rebuild.
377 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
378 * NEWS: Update --enable-ubsan documentation.
379
380 2018-10-09 Gary Benson <gbenson@redhat.com>
381
382 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
383 found by Coverity.
384
385 2018-10-08 Tom Tromey <tom@tromey.com>
386
387 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
388 variable.
389 (riscv_fbsd_init_abi): Likewise.
390
391 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
392 * valops.c (value_struct_elt_for_reference): Rename local variable
393 to work around the shadowing a previous local warning.
394
395 2018-10-08 John Baldwin <jhb@FreeBSD.org>
396
397 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
398 * NEWS: Mention new FreeBSD/riscv native configuration.
399 * configure.host: Add riscv*-*-freebsd*.
400 * configure.nat: Likewise.
401 * riscv-fbsd-nat.c: New file.
402
403 2018-10-08 John Baldwin <jhb@FreeBSD.org>
404
405 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
406 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
407 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
408 * NEWS: Mention new FreeBSD/riscv target.
409 * configure.tgt: Add riscv*-*-freebsd*.
410 * riscv-fbsd-tdep.c: New file.
411 * riscv-fbsd-tdep.h: New file.
412
413 2018-10-08 John Baldwin <jhb@FreeBSD.org>
414
415 * regcache.h (struct regcache_map_entry): Note that this type can
416 be used with traditional frame caches.
417 * trad-frame.c (trad_frame_set_reg_regmap): New.
418 * trad-frame.h (trad_frame_set_reg_regmap): New.
419
420 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
421
422 PR c++/16841
423 * valops.c (get_virtual_base_offset): New function.
424 (value_struct_elt_for_reference): Use it to get virtual base offset
425 and add it in calculating class member address.
426
427 2018-10-08 John Darrington <john@darrington.wattle.id.au>
428
429 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
430 (check_producer): Check if the producer is codewarrior.
431 (producer_is_codewarrior): New function.
432 (lnp_state_machine::record_line): Ignore is_stmt flag for records
433 produced by codewarrior.
434 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
435
436 2018-10-06 Tom Tromey <tom@tromey.com>
437
438 PR python/19399:
439 * python/py-inferior.c: Add "architecture" entry.
440 (infpy_architecture): New function.
441
442 2018-10-06 Tom Tromey <tom@tromey.com>
443
444 PR python/21765:
445 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
446 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
447 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
448 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
449
450 2018-10-06 Tom Tromey <tom@tromey.com>
451
452 PR build/17077:
453 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
454 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
455 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
456 #include.
457
458 2018-10-06 Tom Tromey <tom@tromey.com>
459
460 * python/py-breakpoint.c (bppy_get_location): Handle a
461 bp_breakpoint without a location.
462
463 2018-10-06 Tom Tromey <tom@tromey.com>
464
465 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
466 (_RegEx): Reformat help text.
467 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
468 (AnyCallerIs, AnyCallerMatches): Reformat help text.
469 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
470 text.
471 * python/lib/gdb/command/xmethods.py (InfoXMethod)
472 (EnableXMethod, DisableXMethod): Remove help indentation.
473 Capitalize meta-syntactic variables.
474 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
475 (EnableUnwinder, DisableUnwinder): Remove help indentation.
476 Capitalize meta-syntactic variables.
477 * python/lib/gdb/command/explore.py (ExploreCommand)
478 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
479 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
480 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
481 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
482 Remove help indentation.
483 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
484 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
485 (DisableFrameFilter, SetFrameFilterPriority)
486 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
487
488 2018-10-06 Tom Tromey <tom@tromey.com>
489
490 PR tui/28819:
491 * tui/tui-io.c (gdb_wgetch): New function.
492 (tui_mld_getc, tui_getc): Use it.
493
494 2018-10-05 Tom Tromey <tom@tromey.com>
495
496 * sol-thread.c (sol_thread_target::wait): Rename inner
497 "save_ptid".
498
499 2018-10-04 Tom Tromey <tom@tromey.com>
500
501 * configure: Rebuild.
502 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
503
504 2018-10-04 Tom Tromey <tom@tromey.com>
505
506 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
507 declaration of "block".
508
509 2018-10-04 Tom Tromey <tom@tromey.com>
510
511 * common/filestuff.c (fdwalk): Remove inner declaration of
512 "result".
513
514 2018-10-04 Tom Tromey <tom@tromey.com>
515
516 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
517 "structs_addr" and hoist declaration.
518
519 2018-10-04 Tom Tromey <tom@tromey.com>
520
521 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
522 variable "size".
523
524 2018-10-04 Tom Tromey <tom@tromey.com>
525
526 * mdebugread.c (parse_partial_symbols): Use std::string.
527
528 2018-10-04 Tom Tromey <tom@tromey.com>
529
530 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
531 * p-valprint.c (pascal_val_print): Split inner "i" variable.
532 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
533 header.
534 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
535 more inner scope.
536 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
537 * varobj.c (varobj_update): Rename inner "newobj",
538 "type_changed".
539 * valprint.c (generic_emit_char): Rename inner "buf".
540 * valops.c (find_overload_match): Rename inner "temp".
541 (value_struct_elt_for_reference): Declare "v" in more inner
542 scope.
543 * v850-tdep.c (v850_push_dummy_call): Rename "len".
544 * unittests/array-view-selftests.c (run_tests): Rename inner
545 "vec".
546 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
547 header.
548 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
549 "tsv" in more inner scope.
550 (print_one_static_tracepoint_marker): Rename inner
551 "tuple_emitter".
552 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
553 (tic6x_push_dummy_call): Don't redeclare "addr".
554 * target-float.c: Declare "dto" lower.
555 * symtab.c (lookup_local_symbol): Rename inner "sym".
556 (find_pc_sect_line): Rename inner "pc".
557 * stack.c (print_frame): Don't redeclare "gdbarch".
558 (return_command): Rename inner "gdbarch".
559 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
560 "sp".
561 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
562 header.
563 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
564 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
565 scope.
566 * remote.c (remote_target::update_thread_list): Don't redeclare
567 "tp".
568 (remote_target::process_initial_stop_replies): Rename inner
569 "thread".
570 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
571 (remote_target::wait_as): Don't redeclare "stop_reply".
572 (remote_target::get_thread_local_address): Rename inner
573 "result".
574 (remote_target::get_tib_address): Likewise.
575
576 * regcache.c (cooked_read_test): Rename "regnum".
577 * record-btrace.c (cmd_record_btrace_start): Rename inner
578 "exception".
579 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
580 loop header.
581 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
582 header.
583 (ppu2spu_sniffer): Rename inner "buf".
584 * parse.c (operator_check_standard): Rename inner "type",
585 "objfile".
586 * p-valprint.c (pascal_val_print): Introduce new scope for
587 "low_bound", "high_bound".
588 * p-exp.y (yylex): Declare "i" in loop header.
589 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
590 Lower declaration of "s".
591 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
592 header.
593 (nios2_push_dummy_call): Rename "len".
594 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
595 "buf".
596 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
597 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
598 (linux_xfer_osdata_modules): Likewise.
599 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
600 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
601 (mips_o64_push_dummy_call): Likewise.
602 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
603 "op".
604 * mi/mi-main.c (list_available_thread_groups): Rename inner
605 "tuple_emitter".
606 (mi_cmd_data_read_memory): Rename inner "opts".
607 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
608 "tuple_emitter".
609 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
610 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
611 more inner scope.
612 (parse_partial_symbols): Rename inner "pst", "p", "name"
613 * main.c (captured_main_1): Rename inner "i"s.
614 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
615 "oso2".
616 * linux-tdep.c (linux_info_proc): Rename inner "filename".
617 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
618 * infrun.c (handle_no_resumed): Don't redeclare "thread".
619 (handle_signal_stop): Rename inner "gdbarch".
620 (handle_command): Declare "signum" in loop header.
621 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
622 "status".
623 (examine_prologue): Rename inner "sol" and "sof".
624 (ia64_extract_return_value): Rename inner "val". Declare another
625 "val" in a more inner scope.
626 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
627 inner scope.
628 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
629 "except".
630 * findvar.c (default_read_var_value): Don't redeclare "addr".
631 * f-exp.y (yylex): Declare "i" in loop header.
632 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
633 Rename inner "type", "expect_type".
634 (evaluate_subexp_for_sizeof): Rename inner "pc".
635 * elfread.c (elf_symfile_read): Rename inner "abfd".
636 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
637 "bytes_read".
638 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
639 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
640 (dwarf_decode_line_header): Rename inner "lh".
641 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
642 "offset". Declare "i" in loop header.
643 (disassemble_dwarf_expression): Rename inner "addr_size".
644 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
645 inner "result".
646 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
647 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
648 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
649 "inner_list_emitter".
650 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
651 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
652 declaration in a block.
653 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
654 * cp-valprint.c (cp_print_value_fields): Don't redeclare
655 "obstack_final_size".
656 * cp-support.c (inspect_type): Declare "i" in loop header.
657 * compile/compile.c (compile_instance::insert_symbol_error):
658 Rename inner "e".
659 * common/agent.c (agent_run_command): Remove inner "ret"
660 declaration.
661 * coffread.c (coff_symfile_read): Rename inner "name".
662 (coff_symfile_read): Rename inner "abfd".
663 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
664 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
665 "high".
666 * c-exp.y (lex_one_token): Move "len" declaration lower.
667 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
668 "gdbarch".
669 (create_exception_master_breakpoint): Likewise. Don't redeclare
670 "b".
671 (watch_command_1): Declare "mark" later.
672 (clear_command): Don't shadow "a" or "b".
673 (delete_command): Rename inner "b".
674 (delete_trace_command): Likewise.
675 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
676 "op".
677 (arm_gdbarch_init): Remove inner "e_flags".
678 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
679 "offset" in inner blocks.
680
681 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
682
683 * dwarf-index-write.c (file_write): Don't write if the vector is
684 empty.
685
686 2018-10-05 Tom de Vries <tdevries@suse.de>
687
688 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
689 PyArg_ParseTuple call.
690
691 2018-10-05 Tom de Vries <tdevries@suse.de>
692
693 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
694 PyArg_ParseTuple call.
695
696 2018-10-04 Joel Brobecker <brobecker@adacore.com>
697
698 * psymtab.c (recursively_search_psymtabs): Reformat parameters
699 to avoid exceeding 80 characters per line limit.
700
701 2018-10-04 Tom Tromey <tom@tromey.com>
702
703 * symfile.c (syms_from_objfile_1, finish_new_objfile)
704 (reread_symbols): Update.
705 * complaints.h (clear_complaints): Remove argument.
706 * complaints.c (enum complaint_series): Remove.
707 (series): Remove global.
708 (complaint_internal): Update.
709 (clear_complaints): Remove argument.
710
711 2018-10-04 Tom Tromey <tom@tromey.com>
712
713 * symfile.c (symbol_file_add_with_addrs): Do not print "no
714 debugging symbols" message if there is a separate debug objfile.
715
716 2018-10-04 Tom Tromey <tom@tromey.com>
717
718 PR cli/19551:
719 * symfile.c (symbol_file_add_with_addrs): Update output.
720 * psymtab.c (require_partial_symbols): Update output.
721
722 2018-10-04 Tom Tromey <tom@tromey.com>
723
724 PR cli/22234:
725 * complaints.c: Emit \n.
726
727 2018-10-04 Tom Tromey <tom@tromey.com>
728
729 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
730 (separate_debug_file_exists, find_separate_debug_file)
731 (add_symbol_file_command, reread_symbols, allocate_symtab)
732 (allocate_compunit_symtab): Use filtered printing, not
733 unfiltered.
734 * psymtab.c (require_partial_symbols, dump_psymtab)
735 (allocate_psymtab): Use filtered printing, not unfiltered.
736
737 2018-10-04 Tom Tromey <tom@tromey.com>
738
739 * complaints.c (complaint_internal): Correctly check complaint
740 count.
741
742 2018-10-04 Tom Tromey <tom@tromey.com>
743
744 * complaints.h (struct complaints): Remove declaration.
745 * complaints.c (clear_complaints): Remove an unused variable.
746
747 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
748
749 * MAINTAINERS (Write After Approval): Add self.
750
751 2018-10-03 Tom Tromey <tom@tromey.com>
752
753 * guile/scm-value.c (gdbscm_value_to_string): Initialize
754 "buffer_contents".
755 * coffread.c (coff_symtab_read): Initialize "newobj".
756
757 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
758
759 * dwarf2read.c (read_func_scope): Remove struct keyword in
760 range-based for.
761
762 2018-10-03 Tom Tromey <tom@tromey.com>
763
764 * README: Mention --enable-ubsan.
765 * NEWS: Mention --enable-ubsan.
766 * acinclude.m4: Include sanitize.m4.
767 * configure: Rebuild.
768 * configure.ac: Call AM_GDB_UBSAN.
769 * sanitize.m4: New file.
770
771 2018-10-03 Tom Tromey <tom@tromey.com>
772
773 * expression.h (enum exp_opcode): Use uint8_t as base type.
774 * expprint.c (op_name): Handle invalid opcodes.
775
776 2018-10-03 Tom Tromey <tom@tromey.com>
777
778 * parse.c (prefixify_expression): Add assert.
779 (parse_exp_in_context_1): Throw exception if the expression is
780 empty.
781
782 2018-10-03 Tom Tromey <tom@tromey.com>
783
784 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
785
786 2018-10-03 Tom Tromey <tom@tromey.com>
787
788 * c-exp.y (parse_number): Work in unsigned. Remove casts.
789
790 2018-10-03 Tom Tromey <tom@tromey.com>
791
792 * dwarf2read.c (read_subrange_type): Make "negative_mask"
793 unsigned.
794
795 2018-10-03 Tom Tromey <tom@tromey.com>
796
797 * findvar.c (extract_integer): Do work in an unsigned type.
798
799 2018-10-03 Tom Tromey <tom@tromey.com>
800
801 * common/enum-flags.h (enum_flags::operator~): Add static assert.
802 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
803 base type.
804 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
805 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
806 type.
807 * c-lang.h (enum c_string_type_values): Use unsigned as base
808 type.
809 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
810
811 2018-10-03 Tom Tromey <tom@tromey.com>
812
813 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
814 <~dwarf2_frame_state_reg_info>: Update.
815 <dwarf2_frame_state_reg_info>: Update.
816 <alloc_regs>: Add assertion. Update.
817 <reg>: Now a std::vector.
818 <num_regs>: Remove.
819 <swap>: Update.
820 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
821 (execute_cfa_program_test, dwarf2_frame_cache): Update.
822
823 2018-10-03 Tom Tromey <tom@tromey.com>
824
825 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
826
827 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
828
829 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
830
831 2018-10-02 Tom Tromey <tom@tromey.com>
832
833 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
834
835 2018-10-02 John Darrington <john@darrington.wattle.id.au>
836
837 * NEWS: Mention changed commands.
838 * ser-uds.c: New file.
839 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
840 * configure: Regenerate.
841 * Makefile.in: Add new file.
842 * serial.c (serial_open): Check if filename is a socket
843 and lookup the appropriate interface accordingly.
844
845 2018-10-01 Alan Hayward <alan.hayward@arm.com>
846
847 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
848 define.
849 (AARCH64_EXTRA_MAGIC): Likewise.
850 (AARCH64_FPSIMD_MAGIC): Likewise.
851 (AARCH64_SVE_MAGIC): Likewise.
852 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
853 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
854 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
855 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
856 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
857 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
858 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
859 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
860 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
861 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
862 (read_aarch64_ctx): Add function.
863 (aarch64_linux_sigframe_init): Detect FP registers.
864
865 2018-10-01 Alan Hayward <alan.hayward@arm.com>
866
867 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
868 (AARCH64_D0_REGNUM): Likewise.
869 (AARCH64_S0_REGNUM): Likewise.
870 (AARCH64_H0_REGNUM): Likewise.
871 (AARCH64_B0_REGNUM): Likewise.
872 (AARCH64_SVE_V0_REGNUM): Likewise.
873 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
874 (AARCH64_D0_REGNUM): Likewise.
875 (AARCH64_S0_REGNUM): Likewise.
876 (AARCH64_H0_REGNUM): Likewise.
877 (AARCH64_B0_REGNUM): Likewise.
878 (AARCH64_SVE_V0_REGNUM): Likewise.
879
880 2018-10-01 Gary Benson <gbenson@redhat.com>
881
882 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
883 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
884 prfpregset_t instead of gdb_prfpregset_t.
885 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
886 * configure, config.in: Rebuild.
887
888 2018-10-01 Gary Benson <gbenson@redhat.com>
889
890 * common/gdb_proc_service.h: New file, factored out from...
891 * gdb_proc_service.h: Moved common code to the above file.
892 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
893
894 2018-10-01 Gary Benson <gbenson@redhat.com>
895
896 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
897 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
898
899 2018-10-01 Gary Benson <gbenson@redhat.com>
900
901 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
902 (AC_CHECK_HEADERS): Check for linux/elf.h.
903 * configure, config.in: Rebuild.
904 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
905 doesn't define elf_fpregset_t.
906
907 2018-10-01 Gary Benson <gbenson@redhat.com>
908
909 * gdb_proc_service.h: Whitespace change.
910
911 2018-10-01 Tom Tromey <tom@tromey.com>
912
913 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
914 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
915 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
916
917 2018-10-01 Tom Tromey <tom@tromey.com>
918
919 * README: Minor change.
920
921 2018-09-30 Pedro Alves <palves@redhat.com>
922
923 * darwin-nat-info.c (darwin_debug_regions_recurse)
924 (info_mach_exceptions_command): Remove unused local variables.
925 * darwin-nat.c (darwin_decode_notify_message)
926 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
927 (darwin_stop_inferior, darwin_setup_exceptions)
928 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
929 (darwin_nat_target::attach, darwin_nat_target::detach)
930 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
931 local variables.
932 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
933 variables.
934
935 2018-09-29 Tom Tromey <tom@tromey.com>
936
937 * README: Remove some leftover text.
938
939 2018-09-29 Tom Tromey <tom@tromey.com>
940
941 * PROBLEMS: Rewrite.
942 * README: Update.
943
944 2018-09-28 John Baldwin <jhb@FreeBSD.org>
945
946 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
947 case with explicit breakpoint kind.
948 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
949 'additional_info' and related logic.
950 (riscv_debug_breakpoints): New variable.
951 (riscv_breakpoint_kind_from_pc): Use the length of the existing
952 instruction to determine the breakpoint kind.
953 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
954 flag. Update description of 'set/show riscv
955 use-compressed-breakpoints' flag.
956
957 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
958
959 (NEWS): Mention changes to frame related commands.
960 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
961 (add_prefix_cmd_suppress_notification): New function.
962 (add_com_suppress_notification): Call
963 add_cmd_suppress_notification.
964 * command.h (add_cmd_suppress_notification): Declare.
965 (add_prefix_cmd_suppress_notification): Declare.
966 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
967 (parse_frame_specification): Moved from stack.c, with
968 simplification to handle a single argument.
969 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
970 switch to the selected frame. Add a header comment.
971 * stack.c: Remove 'safe-ctype.h' include.
972 (find_frame_for_function): Add declaration.
973 (find_frame_for_address): New function.
974 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
975 (frame_selection_by_function_completer): New function.
976 (info_frame_command): Rename to...
977 (info_frame_command_core): ...this, and update parameter types.
978 (select_frame_command): Rename to...
979 (select_frame_command_core): ...this, and update parameter types.
980 (frame_command): Rename to...
981 (frame_command_core): ...this, and update parameter types.
982 (class frame_command_helper): New class to wrap implementations of
983 frame related sub-commands.
984 (frame_apply_cmd_list): New static global.
985 (frame_cmd_list): Make static.
986 (select_frame_cmd_list): New global for sub-commands.
987 (info_frame_cmd_list): New global for sub-commands.
988 (_initialize_stack): Register sub-commands for 'frame',
989 'select-frame', and 'info frame'. Update 'frame apply' commands
990 to use frame_apply_cmd_list. Move function local static
991 frame_apply_list to file static frame_apply_cmd_list for
992 consistency.
993 * stack.h (select_frame_command): Delete declarationn.
994 (select_frame_for_mi): Declare new function.
995
996 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
997
998 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
999 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1000 and NOP.
1001
1002 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
1003
1004 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1005
1006 2018-09-26 Tom Tromey <tom@tromey.com>
1007
1008 * valops.c (auto_abandon): Remove dead code.
1009
1010 2018-09-26 Tom Tromey <tom@tromey.com>
1011
1012 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1013
1014 2018-09-24 Tom Tromey <tom@tromey.com>
1015
1016 * common/pathstuff.c (get_standard_cache_dir): Make
1017 "xdg_cache_home" and "home" const.
1018 * top.c (init_history): Make "tmpenv" const.
1019 * main.c (get_init_files): Make "homedir" const.
1020
1021 2018-09-23 Tom Tromey <tom@tromey.com>
1022
1023 PR python/18852:
1024 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1025
1026 2018-09-23 Tom Tromey <tom@tromey.com>
1027
1028 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1029 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1030 * python/python-internal.h (gdbpy_handle_exception): Declare.
1031 * python/py-utils.c (gdbpy_handle_exception): New function.
1032
1033 2018-09-23 Tom Tromey <tom@tromey.com>
1034
1035 PR python/17284:
1036 * python/py-type.c (typy_template_argument): Check for negative
1037 argument number.
1038
1039 2018-09-23 Tom Tromey <tom@tromey.com>
1040
1041 PR python/14062:
1042 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1043
1044 2018-09-23 Tom Tromey <tom@tromey.com>
1045
1046 PR python/18170:
1047 * python/py-value.c (valpy_int): Allow conversion from pointer
1048 type.
1049
1050 2018-09-23 Tom Tromey <tom@tromey.com>
1051
1052 PR python/20126:
1053 * python/py-value.c (valpy_int): Respect type sign.
1054
1055 2018-09-23 Tom Tromey <tom@tromey.com>
1056
1057 PR python/18352;
1058 * python/py-value.c (valpy_float): Allow conversions from int or
1059 char.
1060 (valpy_int, valpy_long): Allow conversions from float.
1061
1062 2018-09-23 Tom Tromey <tom@tromey.com>
1063
1064 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1065 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1066
1067 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1068
1069 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1070 __sighndlr.
1071 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1072
1073 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
1074
1075 * windows-nat.c (windows_nat_target::wait): Remove a spurious
1076 target_terminal::ours().
1077
1078 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
1079
1080 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1081 of vl to ULONGEST.
1082
1083 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
1084
1085 * breakpoint.c (update_inserted_breakpoint_locations): Remove
1086 redundant condition.
1087
1088 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1089
1090 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1091
1092 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1093 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
1094 * sol-thread.c (ps_pdmodel): Don't guard definition.
1095
1096 * procfs.c: Fix formatting.
1097
1098 * procfs.c (sysset_t_alloc): Remove.
1099 (create_procinfo): Use XNEW instead of sysset_t_alloc.
1100 (procfs_debug_inferior): Likewise.
1101 (procfs_set_exec_trap): Likewise.
1102 (proc_set_traced_sysentry): Don't allocate argp dynamically.
1103 (proc_set_traced_sysexit): Likewise.
1104
1105 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1106 (dead_procinfo): Likewise.
1107 (proc_warn): Likewise.
1108 (proc_error): Likewise.
1109 (proc_get_LDT_entry): Likewise.
1110 (do_attach): Likewise.
1111 (procfs_target::pid_to_str): Likewise.
1112 (iterate_over_mappings): Likewise.
1113
1114 * procfs.c (create_procinfo): Fix ARI warning.
1115 (proc_get_status): Likewise.
1116 (proc_stop_process): Likewise.
1117 (proc_run_process): Likewise.
1118 (proc_kill): Likewise.
1119 (proc_get_LDT_entry): Likewise.
1120 (procfs_find_LDT_entry): Likewise.
1121 (proc_update_threads): Likewise.
1122 (proc_iterate_over_threads): Likewise.
1123 (do_attach): Likewise.
1124 (procfs_xfer_memory): Likewise.
1125 (invalidate_cache): Likewise.
1126 (procfs_target::resume): Likewise.
1127 (procfs_init_inferior): Likewise.
1128 (procfs_set_exec_trap): Likewise.
1129 (procfs_target::thread_alive): Likewise.
1130 (procfs_target::pid_to_exec_file): Likewise.
1131 (iterate_over_mappings): Likewise.
1132 (procfs_target::make_corefile_notes): Likewise.
1133 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1134
1135 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1136 (procfs_find_LDT_entry): Likewise.
1137 * sol-thread.c (ps_lgetLDT): Likewise.
1138
1139 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1140
1141 PR tdep/17903
1142 * procfs.c (procfs_target): Declare pid_to_exec_file.
1143 (procfs_target::pid_to_exec_file): New.
1144
1145 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1146
1147 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1148 renaming.
1149 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1150 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1151
1152 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1153
1154 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1155 (supply_fpregset, fill_fpregset): Move ...
1156 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1157 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1158 Remove references to ioctl-based procfs.
1159 Include <sys/reg.h>.
1160 Remove PR_MODEL_NATIVE guards.
1161 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1162 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1163
1164 2018-09-19 Xavier Roirand <roirand@adacore.com>
1165
1166 PR gdb/20981:
1167 * solib-darwin.c (darwin_get_dyld_bfd): New function.
1168 (darwin_solib_get_all_image_info_addr_at_init): Update call.
1169 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1170
1171 2018-09-19 John Baldwin <jhb@FreeBSD.org>
1172
1173 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1174 (fbsd_print_sockaddr_in6): Likewise.
1175
1176 2018-09-19 Richard Bunt <richard.bunt@arm.com>
1177 Chris January <chris.january@arm.com>
1178
1179 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1180 (evaluate_subexp_standard): Return a dummy type when
1181 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1182 OP_F77_UNDETERMINED_ARGLIST case.
1183 * expression.h (enum noside): Update comment.
1184
1185 2018-09-19 George Vasick <george.vasick@oracle.com>
1186
1187 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1188
1189 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1190 April Chin <april.chin@oracle.com>
1191 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1192
1193 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1194 uint_t lwpid_t.
1195 (create_procinfo): Print pids in /proc without leading zeros.
1196
1197 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1198
1199 * nios2-tdep.c (nios2_gcc_target_options): New.
1200 (nios2_gdb_arch_init): Install new hook.
1201
1202 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1203
1204 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1205 New file.
1206 * update-gnulib.sh: Apply patch.
1207 * configure: Re-generate.
1208
1209 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1210
1211 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1212 description. Make "info proc" command descriptions more
1213 consistent.
1214
1215 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1216
1217 * NEWS: Mention 'info proc files' command.
1218
1219 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1220
1221 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1222 descriptors for IP_FILES and IP_ALL.
1223
1224 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1225
1226 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1227 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1228 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1229 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1230 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1231 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1232 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1233 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1234 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1235 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1236 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1237 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1238 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1239 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1240 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1241 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1242 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1243 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1244 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1245 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1246 (struct fbsd_sockaddr_un): New types.
1247 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1248 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1249 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1250 (fbsd_core_info_proc_files): New functions.
1251 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1252 IP_ALL.
1253 * fbsd-tdep.h (fbsd_info_proc_files_header)
1254 (fbsd_info_proc_files_entry): New.
1255
1256 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1257
1258 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1259 * infcmd.c (info_proc_cmd_files): New function.
1260 (_initialize_infcmd): Register 'info proc files' command.
1261
1262 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1263
1264 * gnulib/aclocal-m4-deps.mk: Re-generate.
1265 * gnulib/aclocal.m4: Re-generate.
1266 * gnulib/config.in: Re-generate.
1267 * gnulib/configure: Re-generate.
1268 * gnulib/import/Makefile.am: Re-generate.
1269 * gnulib/import/Makefile.in: Re-generate.
1270 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1271 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1272 * gnulib/import/arpa_inet.in.h: New file.
1273 * gnulib/import/inet_ntop.c: New file.
1274 * gnulib/import/m4/arpa_inet_h.m4: New file.
1275 * gnulib/import/m4/inet_ntop.m4: New file.
1276 * gnulib/import/m4/netinet_in_h.m4: New file.
1277 * gnulib/import/m4/socklen.m4: New file.
1278 * gnulib/import/m4/sockpfaf.m4: New file.
1279 * gnulib/import/m4/stdalign.m4: New file.
1280 * gnulib/import/m4/sys_uio_h.m4: New file.
1281 * gnulib/import/netinet_in.in.h: New file.
1282 * gnulib/import/stdalign.in.h: New file.
1283 * gnulib/import/sys_socket.c: New file.
1284 * gnulib/import/sys_socket.in.h: New file.
1285 * gnulib/import/sys_uio.in.h: New file.
1286 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1287 module.
1288
1289 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1290
1291 * gnulib/aclocal-m4-deps.mk: New file.
1292 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1293 deterministically.
1294
1295 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1296
1297 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1298 KVE_PATH.
1299
1300 2018-09-18 Tom Tromey <tom@tromey.com>
1301
1302 * compile/compile-object-load.c (struct
1303 link_hash_table_cleanup_data): Add constructor and destructor.
1304 Use DISABLE_COPY_AND_ASSIGN.
1305 (~link_hash_table_cleanup_data): Rename from
1306 link_hash_table_free. Now a destructor.
1307 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1308
1309 2018-09-18 Tom Tromey <tom@tromey.com>
1310
1311 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1312 * compile/compile-object-load.c (struct munmap_list): Move to
1313 header file.
1314 (munmap_list::add): Rename from munmap_list_add; rewrite.
1315 (munmap_list::~munmap_list): Rename from munmap_list_free.
1316 (munmap_listp_free_cleanup): Remove.
1317 (compile_object_load): Update.
1318 * compile/compile-object-load.h (struct munmap_list): Move from
1319 compile-object-load.c. Rewrite.
1320
1321 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1322
1323 * aarch64-tdep.c (pass_in_v): Use register size.
1324 (aarch64_extract_return_value): Likewise.
1325 (aarch64_store_return_value): Likewise.
1326
1327 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1328
1329 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1330 rlim_t.
1331
1332 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1333
1334 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1335 Fix short help line.
1336
1337 2018-09-17 Tom Tromey <tom@tromey.com>
1338
1339 PR python/20445:
1340 * configure: Rebuild.
1341 * configure.ac: Conditionally use -DNDEBUG for Python.
1342
1343 2018-09-17 Tom Tromey <tom@tromey.com>
1344
1345 * configure: Rebuild.
1346 * configure.ac: Use gmp as a library dependency when checking for
1347 mpfr.
1348
1349 2018-09-17 Pedro Alves <palves@redhat.com>
1350
1351 * python/py-inferior.c (find_inferior_object): Delete.
1352
1353 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1354
1355 * compile/compile-cplus-types.c
1356 (compile_cplus_instance::enter_scope): Don't use new_scope after
1357 std::move.
1358
1359 2018-09-17 Tom Tromey <tom@tromey.com>
1360
1361 * common/pathstuff.c (get_standard_cache_dir): Use
1362 ~/Library/Caches on macOS.
1363 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1364
1365 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1366
1367 PR python/23669
1368 * breakpoint.c (commands_cmd_element): New.
1369 (_initialize_breakpoint): Assign commands_cmd_element.
1370 * breakpoint.h (commands_cmd_element): New.
1371 * cli/cli-script.c (while_cmd_element, if_command,
1372 define_cmd_element): New.
1373 (command_name_equals): Remove.
1374 (process_next_line): Compare commands by pointer, not by name.
1375 (_initialize_cli_script): Assign the various cmd_list_element
1376 variables.
1377 * compile/compile.c (compile_cmd_element): New.
1378 (_initialize_compile): Assign compile_cmd_element.
1379 * compile/compile.h (compile_cmd_element): New.
1380 * guile/guile.c (guile_cmd_element): New.
1381 (install_gdb_commands): Assign guile_cmd_element.
1382 * guile/guile.h (guile_cmd_element): New.
1383 * python/python.c (python_cmd_element): New.
1384 (_initialize_python): Assign python_cmd_element.
1385 * python/python.h (python_cmd_element): New.
1386 * tracepoint.c (while_stepping_cmd_element): New.
1387 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1388 * tracepoint.h (while_stepping_cmd_element): New.
1389
1390 2018-09-17 Tom Tromey <tom@tromey.com>
1391
1392 * infrun.c (save_infcall_suspend_state): Return
1393 infcall_suspend_state_up.
1394 (save_infcall_control_state): Return infcall_control_state_up.
1395 * inferior.h (save_infcall_suspend_state)
1396 (save_infcall_control_state): Declare later. Return unique
1397 pointers.
1398
1399 2018-09-17 Tom Tromey <tom@tromey.com>
1400
1401 * infrun.c (struct stop_context): Declare constructor,
1402 destructor, "changed" method.
1403 (stop_context::stop_context): Rename from save_stop_context.
1404 (stop_context::~stop_context): Rename from
1405 release_stop_context_cleanup.
1406 (normal_stop): Update.
1407 (stop_context::changed): Rename from stop_context_changed. Return
1408 bool.
1409
1410 2018-09-17 Tom Tromey <tom@tromey.com>
1411
1412 * inferior.h (struct infcall_suspend_state_deleter): New.
1413 (infcall_suspend_state_up): New typedef.
1414 (struct infcall_control_state_deleter): New.
1415 (infcall_control_state_up): New typedef.
1416 (make_cleanup_restore_infcall_suspend_state)
1417 (make_cleanup_restore_infcall_control_state): Don't declare.
1418 * infcall.c (call_function_by_hand_dummy): Update.
1419 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1420 (make_cleanup_restore_infcall_suspend_state): Remove.
1421 (do_restore_infcall_control_state_cleanup)
1422 (make_cleanup_restore_infcall_control_state): Remove.
1423
1424 2018-09-17 Tom Tromey <tom@tromey.com>
1425
1426 * gdbthread.h (struct thread_control_state): Add initializer.
1427 (class thread_info) <control>: Remove initializer.
1428 * inferior.h (struct inferior_control_state): Add initializer.
1429 (class inferior) <control>: Remove initializer.
1430 (exit_inferior_1): Update.
1431 * infrun.c (struct infcall_control_state): Add constructors.
1432 (save_infcall_control_state): Use new.
1433 (restore_infcall_control_state, discard_infcall_control_state):
1434 Use delete.
1435
1436 2018-09-17 Tom Tromey <tom@tromey.com>
1437
1438 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1439 unique_ptr.
1440 <siginfo_data>: Now a unique_xmalloc_ptr.
1441 (save_infcall_suspend_state, restore_infcall_suspend_state)
1442 (discard_infcall_suspend_state)
1443 (get_infcall_suspend_state_regcache): Update.
1444
1445 2018-09-17 Tom Tromey <tom@tromey.com>
1446
1447 * gdbthread.h (struct thread_suspend_state): Add initializers.
1448 (class thread_info) <suspend>: Remove initializer.
1449 * infrun.c (struct infcall_suspend_state): Add initializers.
1450 (save_infcall_suspend_state): Use new.
1451 (discard_infcall_suspend_state): Use delete.
1452
1453 2018-09-16 Tom Tromey <tom@tromey.com>
1454
1455 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1456 Remove.
1457 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1458 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1459 (py_varobj_iter_new): Likewise.
1460 (py_varobj_get_iterator): Use gdbpy_ref.
1461
1462 2018-09-16 Tom Tromey <tom@tromey.com>
1463
1464 * python/py-threadevent.c (py_get_event_thread): Simplify.
1465 * python/py-inferior.c (infpy_thread_from_thread_handle):
1466 Return immediately after calling thread_to_thread_object. Use
1467 Py_RETURN_NONE.
1468 (thread_to_thread_object): Set the exception on a NULL return.
1469
1470 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1471
1472 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1473
1474 2018-09-16 Tom Tromey <tom@tromey.com>
1475
1476 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1477 Remove.
1478
1479 2018-09-16 Tom Tromey <tom@tromey.com>
1480
1481 * python/python-internal.h (thread_to_thread_object): Change
1482 return type.
1483 * python/py-inferior.c (thread_to_thread_object): Return a new
1484 reference.
1485 (infpy_thread_from_thread_handle): Update.
1486 * python/py-infthread.c (gdbpy_selected_thread): Update.
1487 * python/py-stopevent.c (create_stop_event_object): Update.
1488 * python/py-threadevent.c (py_get_event_thread): Return a new
1489 reference.
1490 (py_get_event_thread): Update.
1491 * python/py-event.h (py_get_event_thread): Change return type.
1492 * python/py-continueevent.c (create_continue_event_object):
1493 Update.
1494
1495 2018-09-16 Tom Tromey <tom@tromey.com>
1496
1497 * python/py-progspace.c (pspy_get_objfiles): Update.
1498 * python/python-internal.h (objfile_to_objfile_object): Change
1499 return type.
1500 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1501 Update.
1502 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1503 Update.
1504 * python/python.c (gdbpy_get_current_objfile): Update.
1505 (gdbpy_objfiles): Update.
1506 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1507 Update.
1508 (objfile_to_objfile_object): Return a new reference.
1509 * python/py-symtab.c (stpy_get_objfile): Update.
1510 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1511 Update.
1512
1513 2018-09-16 Tom Tromey <tom@tromey.com>
1514
1515 * python/py-inferior.c (infpy_get_progspace): Update.
1516 * python/python-internal.h (pspace_to_pspace_object): Change
1517 return type.
1518 * python/py-newobjfileevent.c
1519 (create_clear_objfiles_event_object): Update.
1520 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1521 Update.
1522 * python/python.c (gdbpy_get_current_progspace): Update.
1523 (gdbpy_progspaces): Update.
1524 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1525 reference.
1526 * python/py-objfile.c (objfpy_get_progspace): Update.
1527 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1528 Update.
1529
1530 2018-09-16 Tom Tromey <tom@tromey.com>
1531
1532 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1533 (solib_name, block_for_pc, find_pc_line): New functions.
1534 (execute_unwinders): Update.
1535 * python/py-block.c (gdbpy_block_for_pc): Remove.
1536 * python/py-inferior.c (infpy_get_progspace): New function.
1537 (inferior_object_getset) <progspace>: Add.
1538 * python/py-progspace.c (pspy_objfiles): Rewrite.
1539 (pspy_solib_name, pspy_block_for_pc)
1540 (pspy_find_pc_line, pspy_is_valid): New functions.
1541 (progspace_object_methods): Add entries for solib_name,
1542 block_for_pc, find_pc_line, is_valid.
1543 * python/python-internal.h (gdbpy_block_for_pc)
1544 (build_objfiles_list): Don't declare.
1545 * python/python.c: Don't include solib.h.
1546 (gdbpy_solib_name, gdbpy_find_pc_line)
1547 (gdbpy_get_current_progspace, build_objfiles_list)
1548 (gdbpy_objfiles): Remove.
1549 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1550 solib_name, find_pc_line>: Remove entries.
1551
1552 2018-09-16 Tom Tromey <tom@tromey.com>
1553
1554 * top.c (new_ui_command): Use GNU style for metasyntactic
1555 variables.
1556 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1557 variables.
1558 * maint.c (maintenance_translate_address): Remove "<>" around
1559 text.
1560 * interps.c (interpreter_exec_cmd): Use GNU style for
1561 metasyntactic variables.
1562 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1563 metasyntactic variables.
1564 * tracepoint.c (tfind_range_command): Use GNU style for
1565 metasyntactic variables.
1566 (tfind_outside_command): Likewise.
1567 (_initialize_tracepoint): Likewise.
1568 * remote.c (extended_remote_target::create_inferior): Use GNU
1569 style for metasyntactic variables.
1570 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1571 metasyntactic variables.
1572 (adi_assign_command): Likewise.
1573
1574 2018-09-16 Tom Tromey <tom@tromey.com>
1575
1576 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1577 metasyntactic variables. Print message if no disassembler options
1578 are available.
1579
1580 2018-09-15 Tom Tromey <tom@tromey.com>
1581
1582 * infcmd.c (get_inferior_args): Return const char *.
1583 * inferior.h (get_inferior_args): Return type now const.
1584 * linux-tdep.c (linux_fill_prpsinfo): Update.
1585 * procfs.c (procfs_target::make_corefile_notes): Update.
1586
1587 2018-09-07 Tom Tromey <tom@tromey.com>
1588
1589 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1590 inside the TRY.
1591
1592 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1593
1594 * nios2-tdep.c (nios2_type_align): New.
1595 (nios2_gdb_arch_init): Install type_align hook.
1596
1597 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1598
1599 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1600 type that is neither object file owned, nor gdbarch owned.
1601 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1602 gdbarch is non-NULL.
1603 (alloc_type_instance): Allocate non-objfile owned types on the
1604 gdbarch obstack.
1605 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1606 using TYPE_ALLOC to ensure memory is allocated on the correct
1607 obstack.
1608 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1609 obstack, or the gdbarch obstack.
1610 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1611
1612 2018-09-14 Tom Tromey <tom@tromey.com>
1613
1614 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1615 block.
1616
1617 2018-09-14 Tom Tromey <tom@tromey.com>
1618
1619 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1620
1621 2018-09-13 Tom Tromey <tom@tromey.com>
1622
1623 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1624 static.
1625
1626 2018-09-13 Tom Tromey <tom@tromey.com>
1627
1628 * exec.c (try_open_exec_file): Use std::string.
1629
1630 2018-09-13 Tom Tromey <tom@tromey.com>
1631
1632 * utils.h (gdb_bfd_errmsg): Return std::string.
1633 * exec.c (exec_file_attach): Update.
1634 * compile/compile-object-load.c (compile_object_load): Update.
1635 * utils.c (gdb_bfd_errmsg): Return std::string.
1636
1637 2018-09-13 Tom Tromey <tom@tromey.com>
1638
1639 * procfs.c (struct procinfo_deleter): New.
1640 (procinfo_up): New typedef.
1641 (do_destroy_procinfo_cleanup): Remove.
1642 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
1643
1644 2018-09-13 Tom Tromey <tom@tromey.com>
1645
1646 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1647
1648 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1649 2018-09-13 Tom Tromey <tom@tromey.com>
1650
1651 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1652 (pspy_get_objfiles): New function.
1653 (progspace_object_methods): New.
1654 (pspace_object_type): Add tp_methods callback.
1655 * python/python-internal.h (build_objfiles_list): New
1656 declaration.
1657 * python/python.c (build_objfiles_list): New function.
1658 (gdbpy_objfiles): Implement using build_objfiles_list.
1659 * NEWS: Mention the Progspace.objfiles method.
1660
1661 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1662
1663 * python/py-inferior.c (infpy_get_progspace): New function.
1664 (inferior_object_getset): Add progspace property.
1665 * NEWS: Mention the new property.
1666
1667 2018-09-13 Tom Tromey <tom@tromey.com>
1668
1669 PR rust/23650:
1670 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1671
1672 2018-09-13 Tom Tromey <tom@tromey.com>
1673
1674 PR rust/23626:
1675 * rust-lang.c (rust_enum_variant): Now static.
1676 (rust_empty_enum_p): New function.
1677 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1678 Handle empty enum.
1679
1680 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1681
1682 * python/py-inferior.c (infpy_repr): New.
1683 (inferior_object_type): Register infpy_repr.
1684 * python/py-objfile.c (objfpy_repr): New.
1685 (objfile_object_type): Register objfpy_repr.
1686
1687 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1688
1689 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1690
1691 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1692
1693 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1694 typo.
1695
1696 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
1697
1698 * common/common-utils.c: Don't include '<sys/stat.h>'.
1699 (is_regular_file): Move to...
1700 * common/filestuff.c (is_regular_file): ... here.
1701 * common/common-utils.h (is_regular_file): Move to...
1702 * common/filestuff.h (is_regular_file): ... here.
1703
1704 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1705
1706 * skip.c (debug_skip): New variable.
1707 (skiplist_entry::do_skip_file_p): Add debug output.
1708 (skiplist_entry::do_skip_gfile_p): Likewise.
1709 (skiplist_entry::skip_function_p): Likewise.
1710 (_initialize_step_skip): Create debug command.
1711 * NEWS: Mention set/show debug skip.
1712
1713 2018-09-11 Xavier Roirand <roirand@adacore.com>
1714
1715 * darwin-nat.c (should_disable_startup_with_shell):
1716 New function.
1717 (darwin_nat_target::create_inferior): Add call.
1718
1719 2018-09-11 Xavier Roirand <roirand@adacore.com>
1720
1721 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1722 inf_port, msg_state>: Initialize.
1723 (struct darwin_thread_info) <signaled, single_step>: Change
1724 type and initialize.
1725 (struct darwin_thread_info) <event>: Initialize.
1726
1727 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1728
1729 PR gdb/23555
1730 PR gdb/23558
1731 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1732 guesses.
1733
1734 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1735
1736 Revert:
1737 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1738
1739 PR gdb/23555
1740 PR gdb/23558
1741 * gnulib/aclocal.m4: Regenerate.
1742 * gnulib/config.in: Regenerate.
1743 * gnulib/configure: Regenerate.
1744 * gnulib/import/Makefile.am: Update.
1745 * gnulib/import/Makefile.in: Update.
1746 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1747 * gnulib/import/_Noreturn.h: ... this.
1748 * gnulib/import/alloca.in.h: Update.
1749 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1750 * gnulib/import/arg-nonnull.h: ... this.
1751 * gnulib/import/assure.h: Update.
1752 * gnulib/import/at-func.c: Update.
1753 * gnulib/import/basename-lgpl.c: Update.
1754 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1755 * gnulib/import/c++defs.h: ... this.
1756 * gnulib/import/canonicalize-lgpl.c: Update.
1757 * gnulib/import/cdefs.h: Update.
1758 * gnulib/import/chdir-long.c: Update.
1759 * gnulib/import/chdir-long.h: Update.
1760 * gnulib/import/cloexec.c: Update.
1761 * gnulib/import/cloexec.h: Update.
1762 * gnulib/import/close.c: Update.
1763 * gnulib/import/closedir.c: Update.
1764 * gnulib/import/config.charset: Update.
1765 * gnulib/import/dirent-private.h: Update.
1766 * gnulib/import/dirent.in.h: Update.
1767 * gnulib/import/dirfd.c: Update.
1768 * gnulib/import/dirname-lgpl.c: Update.
1769 * gnulib/import/dirname.h: Update.
1770 * gnulib/import/dosname.h: Update.
1771 * gnulib/import/dup-safer-flag.c: Update.
1772 * gnulib/import/dup-safer.c: Update.
1773 * gnulib/import/dup.c: Update.
1774 * gnulib/import/dup2.c: Update.
1775 * gnulib/import/errno.in.h: Update.
1776 * gnulib/import/error.c: Update.
1777 * gnulib/import/error.h: Update.
1778 * gnulib/import/exitfail.c: Update.
1779 * gnulib/import/exitfail.h: Update.
1780 * gnulib/import/extra/update-copyright: Update.
1781 * gnulib/import/fchdir.c: Update.
1782 * gnulib/import/fcntl.c: Update.
1783 * gnulib/import/fcntl.in.h: Update.
1784 * gnulib/import/fd-hook.c: Update.
1785 * gnulib/import/fd-hook.h: Update.
1786 * gnulib/import/fd-safer-flag.c: Update.
1787 * gnulib/import/fd-safer.c: Update.
1788 * gnulib/import/fdopendir.c: Update.
1789 * gnulib/import/filename.h: Update.
1790 * gnulib/import/filenamecat-lgpl.c: Update.
1791 * gnulib/import/filenamecat.h: Update.
1792 * gnulib/import/flexmember.h: Update.
1793 * gnulib/import/float+.h: Update.
1794 * gnulib/import/float.c: Update.
1795 * gnulib/import/float.in.h: Update.
1796 * gnulib/import/fnmatch.c: Update.
1797 * gnulib/import/fnmatch.in.h: Update.
1798 * gnulib/import/fnmatch_loop.c: Update.
1799 * gnulib/import/fpucw.h: Update.
1800 * gnulib/import/frexp.c: Update.
1801 * gnulib/import/frexpl.c: Update.
1802 * gnulib/import/fstat.c: Update.
1803 * gnulib/import/fstatat.c: Update.
1804 * gnulib/import/getcwd-lgpl.c: Update.
1805 * gnulib/import/getcwd.c: Update.
1806 * gnulib/import/getdtablesize.c: Update.
1807 * gnulib/import/getlogin_r.c: Update.
1808 * gnulib/import/getprogname.c: Update.
1809 * gnulib/import/getprogname.h: Update.
1810 * gnulib/import/gettext.h: Update.
1811 * gnulib/import/gettimeofday.c: Update.
1812 * gnulib/import/glob-libc.h: Update.
1813 * gnulib/import/glob.c: Update.
1814 * gnulib/import/glob.in.h: Update.
1815 * gnulib/import/glob_internal.h: Update.
1816 * gnulib/import/glob_pattern_p.c: Update.
1817 * gnulib/import/globfree.c: Update.
1818 * gnulib/import/hard-locale.c: Update.
1819 * gnulib/import/hard-locale.h: Update.
1820 * gnulib/import/intprops.h: Update.
1821 * gnulib/import/inttypes.in.h: Update.
1822 * gnulib/import/isnan.c: Update.
1823 * gnulib/import/isnand-nolibm.h: Update.
1824 * gnulib/import/isnand.c: Update.
1825 * gnulib/import/isnanl-nolibm.h: Update.
1826 * gnulib/import/isnanl.c: Update.
1827 * gnulib/import/itold.c: Update.
1828 * gnulib/import/libc-config.h: Update.
1829 * gnulib/import/limits.in.h: Update.
1830 * gnulib/import/localcharset.c: Update.
1831 * gnulib/import/localcharset.h: Update.
1832 * gnulib/import/localtime-buffer.c: Update.
1833 * gnulib/import/localtime-buffer.h: Update.
1834 * gnulib/import/lstat.c: Update.
1835 * gnulib/import/m4/00gnulib.m4: Update.
1836 * gnulib/import/m4/__inline.m4: Update.
1837 * gnulib/import/m4/absolute-header.m4: Update.
1838 * gnulib/import/m4/alloca.m4: Update.
1839 * gnulib/import/m4/builtin-expect.m4: Update.
1840 * gnulib/import/m4/canonicalize.m4: Update.
1841 * gnulib/import/m4/chdir-long.m4: Update.
1842 * gnulib/import/m4/close.m4: Update.
1843 * gnulib/import/m4/closedir.m4: Update.
1844 * gnulib/import/m4/configmake.m4: Update.
1845 * gnulib/import/m4/d-ino.m4: Update.
1846 * gnulib/import/m4/d-type.m4: Update.
1847 * gnulib/import/m4/dirent_h.m4: Update.
1848 * gnulib/import/m4/dirfd.m4: Update.
1849 * gnulib/import/m4/dirname.m4: Update.
1850 * gnulib/import/m4/double-slash-root.m4: Update.
1851 * gnulib/import/m4/dup.m4: Update.
1852 * gnulib/import/m4/dup2.m4: Update.
1853 * gnulib/import/m4/eealloc.m4: Update.
1854 * gnulib/import/m4/environ.m4: Update.
1855 * gnulib/import/m4/errno_h.m4: Update.
1856 * gnulib/import/m4/error.m4: Update.
1857 * gnulib/import/m4/exponentd.m4: Update.
1858 * gnulib/import/m4/exponentl.m4: Update.
1859 * gnulib/import/m4/extensions.m4: Update.
1860 * gnulib/import/m4/extern-inline.m4: Update.
1861 * gnulib/import/m4/fchdir.m4: Update.
1862 * gnulib/import/m4/fcntl-o.m4: Update.
1863 * gnulib/import/m4/fcntl.m4: Update.
1864 * gnulib/import/m4/fcntl_h.m4: Update.
1865 * gnulib/import/m4/fdopendir.m4: Update.
1866 * gnulib/import/m4/filenamecat.m4: Update.
1867 * gnulib/import/m4/flexmember.m4: Update.
1868 * gnulib/import/m4/float_h.m4: Update.
1869 * gnulib/import/m4/fnmatch.m4: Update.
1870 * gnulib/import/m4/fnmatch_h.m4: Update.
1871 * gnulib/import/m4/fpieee.m4: Update.
1872 * gnulib/import/m4/frexp.m4: Update.
1873 * gnulib/import/m4/frexpl.m4: Update.
1874 * gnulib/import/m4/fstat.m4: Update.
1875 * gnulib/import/m4/fstatat.m4: Update.
1876 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1877 * gnulib/import/m4/getcwd-path-max.m4: Update.
1878 * gnulib/import/m4/getcwd.m4: Update.
1879 * gnulib/import/m4/getdtablesize.m4: Update.
1880 * gnulib/import/m4/getlogin.m4: Update.
1881 * gnulib/import/m4/getlogin_r.m4: Update.
1882 * gnulib/import/m4/getpagesize.m4: Update.
1883 * gnulib/import/m4/getprogname.m4: Update.
1884 * gnulib/import/m4/gettimeofday.m4: Update.
1885 * gnulib/import/m4/glibc21.m4: Update.
1886 * gnulib/import/m4/glob.m4: Update.
1887 * gnulib/import/m4/glob_h.m4: Update.
1888 * gnulib/import/m4/gnulib-cache.m4: Update.
1889 * gnulib/import/m4/gnulib-common.m4: Update.
1890 * gnulib/import/m4/gnulib-comp.m4: Update.
1891 * gnulib/import/m4/gnulib-tool.m4: Update.
1892 * gnulib/import/m4/hard-locale.m4: Update.
1893 * gnulib/import/m4/include_next.m4: Update.
1894 * gnulib/import/m4/inttypes-pri.m4: Update.
1895 * gnulib/import/m4/inttypes.m4: Update.
1896 * gnulib/import/m4/isnand.m4: Update.
1897 * gnulib/import/m4/isnanl.m4: Update.
1898 * gnulib/import/m4/largefile.m4: Update.
1899 * gnulib/import/m4/limits-h.m4: Update.
1900 * gnulib/import/m4/localcharset.m4: Update.
1901 * gnulib/import/m4/locale-fr.m4: Update.
1902 * gnulib/import/m4/locale-ja.m4: Update.
1903 * gnulib/import/m4/locale-zh.m4: Update.
1904 * gnulib/import/m4/localtime-buffer.m4: Update.
1905 * gnulib/import/m4/longlong.m4: Update.
1906 * gnulib/import/m4/lstat.m4: Update.
1907 * gnulib/import/m4/malloc.m4: Update.
1908 * gnulib/import/m4/malloca.m4: Update.
1909 * gnulib/import/m4/math_h.m4: Update.
1910 * gnulib/import/m4/mbrtowc.m4: Update.
1911 * gnulib/import/m4/mbsinit.m4: Update.
1912 * gnulib/import/m4/mbsrtowcs.m4: Update.
1913 * gnulib/import/m4/mbstate_t.m4: Update.
1914 * gnulib/import/m4/memchr.m4: Update.
1915 * gnulib/import/m4/memmem.m4: Update.
1916 * gnulib/import/m4/mempcpy.m4: Update.
1917 * gnulib/import/m4/memrchr.m4: Update.
1918 * gnulib/import/m4/mkdir.m4: Update.
1919 * gnulib/import/m4/mkstemp.m4: Update.
1920 * gnulib/import/m4/mmap-anon.m4: Update.
1921 * gnulib/import/m4/mode_t.m4: Update.
1922 * gnulib/import/m4/msvc-inval.m4: Update.
1923 * gnulib/import/m4/msvc-nothrow.m4: Update.
1924 * gnulib/import/m4/multiarch.m4: Update.
1925 * gnulib/import/m4/nocrash.m4: Update.
1926 * gnulib/import/m4/off_t.m4: Update.
1927 * gnulib/import/m4/onceonly.m4: Update.
1928 * gnulib/import/m4/open-cloexec.m4: Update.
1929 * gnulib/import/m4/open.m4: Update.
1930 * gnulib/import/m4/openat.m4: Update.
1931 * gnulib/import/m4/opendir.m4: Update.
1932 * gnulib/import/m4/pathmax.m4: Update.
1933 * gnulib/import/m4/rawmemchr.m4: Update.
1934 * gnulib/import/m4/readdir.m4: Update.
1935 * gnulib/import/m4/readlink.m4: Update.
1936 * gnulib/import/m4/realloc.m4: Update.
1937 * gnulib/import/m4/rename.m4: Update.
1938 * gnulib/import/m4/rewinddir.m4: Update.
1939 * gnulib/import/m4/rmdir.m4: Update.
1940 * gnulib/import/m4/save-cwd.m4: Update.
1941 * gnulib/import/m4/secure_getenv.m4: Update.
1942 * gnulib/import/m4/setenv.m4: Update.
1943 * gnulib/import/m4/signal_h.m4: Update.
1944 * gnulib/import/m4/ssize_t.m4: Update.
1945 * gnulib/import/m4/stat-time.m4: Update.
1946 * gnulib/import/m4/stat.m4: Update.
1947 * gnulib/import/m4/std-gnu11.m4: Update.
1948 * gnulib/import/m4/stdbool.m4: Update.
1949 * gnulib/import/m4/stddef_h.m4: Update.
1950 * gnulib/import/m4/stdint.m4: Update.
1951 * gnulib/import/m4/stdio_h.m4: Update.
1952 * gnulib/import/m4/stdlib_h.m4: Update.
1953 * gnulib/import/m4/strchrnul.m4: Update.
1954 * gnulib/import/m4/strdup.m4: Update.
1955 * gnulib/import/m4/strerror.m4: Update.
1956 * gnulib/import/m4/string_h.m4: Update.
1957 * gnulib/import/m4/strstr.m4: Update.
1958 * gnulib/import/m4/strtok_r.m4: Update.
1959 * gnulib/import/m4/sys_socket_h.m4: Update.
1960 * gnulib/import/m4/sys_stat_h.m4: Update.
1961 * gnulib/import/m4/sys_time_h.m4: Update.
1962 * gnulib/import/m4/sys_types_h.m4: Update.
1963 * gnulib/import/m4/tempname.m4: Update.
1964 * gnulib/import/m4/time_h.m4: Update.
1965 * gnulib/import/m4/unistd-safer.m4: Update.
1966 * gnulib/import/m4/unistd_h.m4: Update.
1967 * gnulib/import/m4/warn-on-use.m4: Update.
1968 * gnulib/import/m4/wchar_h.m4: Update.
1969 * gnulib/import/m4/wchar_t.m4: Update.
1970 * gnulib/import/m4/wctype_h.m4: Update.
1971 * gnulib/import/m4/wint_t.m4: Update.
1972 * gnulib/import/malloc.c: Update.
1973 * gnulib/import/malloc/scratch_buffer.h: Update.
1974 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1975 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1976 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1977 * gnulib/import/malloca.c: Update.
1978 * gnulib/import/malloca.h: Update.
1979 * gnulib/import/malloca.valgrind: Update.
1980 * gnulib/import/math.in.h: Update.
1981 * gnulib/import/mbrtowc.c: Update.
1982 * gnulib/import/mbsinit.c: Update.
1983 * gnulib/import/mbsrtowcs-impl.h: Update.
1984 * gnulib/import/mbsrtowcs-state.c: Update.
1985 * gnulib/import/mbsrtowcs.c: Update.
1986 * gnulib/import/memchr.c: Update.
1987 * gnulib/import/memmem.c: Update.
1988 * gnulib/import/mempcpy.c: Update.
1989 * gnulib/import/memrchr.c: Update.
1990 * gnulib/import/mkdir.c: Update.
1991 * gnulib/import/mkstemp.c: Update.
1992 * gnulib/import/msvc-inval.c: Update.
1993 * gnulib/import/msvc-inval.h: Update.
1994 * gnulib/import/msvc-nothrow.c: Update.
1995 * gnulib/import/msvc-nothrow.h: Update.
1996 * gnulib/import/open.c: Update.
1997 * gnulib/import/openat-die.c: Update.
1998 * gnulib/import/openat-priv.h: Update.
1999 * gnulib/import/openat-proc.c: Update.
2000 * gnulib/import/openat.c: Update.
2001 * gnulib/import/openat.h: Update.
2002 * gnulib/import/opendir.c: Update.
2003 * gnulib/import/pathmax.h: Update.
2004 * gnulib/import/pipe-safer.c: Update.
2005 * gnulib/import/rawmemchr.c: Update.
2006 * gnulib/import/readdir.c: Update.
2007 * gnulib/import/readlink.c: Update.
2008 * gnulib/import/realloc.c: Update.
2009 * gnulib/import/ref-add.sin: Update.
2010 * gnulib/import/ref-del.sin: Update.
2011 * gnulib/import/rename.c: Update.
2012 * gnulib/import/rewinddir.c: Update.
2013 * gnulib/import/rmdir.c: Update.
2014 * gnulib/import/same-inode.h: Update.
2015 * gnulib/import/save-cwd.c: Update.
2016 * gnulib/import/save-cwd.h: Update.
2017 * gnulib/import/scratch_buffer.h: Update.
2018 * gnulib/import/secure_getenv.c: Update.
2019 * gnulib/import/setenv.c: Update.
2020 * gnulib/import/signal.in.h: Update.
2021 * gnulib/import/stat-time.c: Update.
2022 * gnulib/import/stat-time.h: Update.
2023 * gnulib/import/stat-w32.c: Update.
2024 * gnulib/import/stat-w32.h: Update.
2025 * gnulib/import/stat.c: Update.
2026 * gnulib/import/stdbool.in.h: Update.
2027 * gnulib/import/stddef.in.h: Update.
2028 * gnulib/import/stdint.in.h: Update.
2029 * gnulib/import/stdio.in.h: Update.
2030 * gnulib/import/stdlib.in.h: Update.
2031 * gnulib/import/str-two-way.h: Update.
2032 * gnulib/import/strchrnul.c: Update.
2033 * gnulib/import/strdup.c: Update.
2034 * gnulib/import/streq.h: Update.
2035 * gnulib/import/strerror-override.c: Update.
2036 * gnulib/import/strerror-override.h: Update.
2037 * gnulib/import/strerror.c: Update.
2038 * gnulib/import/string.in.h: Update.
2039 * gnulib/import/stripslash.c: Update.
2040 * gnulib/import/strnlen1.c: Update.
2041 * gnulib/import/strnlen1.h: Update.
2042 * gnulib/import/strstr.c: Update.
2043 * gnulib/import/strtok_r.c: Update.
2044 * gnulib/import/sys_stat.in.h: Update.
2045 * gnulib/import/sys_time.in.h: Update.
2046 * gnulib/import/sys_types.in.h: Update.
2047 * gnulib/import/tempname.c: Update.
2048 * gnulib/import/tempname.h: Update.
2049 * gnulib/import/time.in.h: Update.
2050 * gnulib/import/unistd--.h: Update.
2051 * gnulib/import/unistd-safer.h: Update.
2052 * gnulib/import/unistd.in.h: Update.
2053 * gnulib/import/unsetenv.c: Update.
2054 * gnulib/import/verify.h: Update.
2055 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2056 * gnulib/import/wchar.in.h: Update.
2057 * gnulib/import/wctype.in.h: Update.
2058 * gnulib/import/xalloc-oversized.h: Update.
2059 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2060 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2061
2062 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
2063
2064 * record-btrace.c (get_thread_current_frame): Remove
2065 old_inferior_ptid.
2066
2067 2018-09-10 Jerome Guitton <guitton@adacore.com>
2068
2069 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2070 with check_tag to 1 if and only if the type is tagged and the
2071 component being searched cannot been found in the current
2072 view. Otherwise, always call ada_to_fixed_type with
2073 check_tag to 0.
2074
2075 2018-09-10 Xavier Roirand <roirand@adacore.com>
2076
2077 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2078 declaration.
2079 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2080 * ada-varobj.c (ada_varobj_get_number_of_children,
2081 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2082
2083 2018-09-10 Xavier Roirand <roirand@adacore.com>
2084
2085 * ada-valprint.c (ada_value_print): Use type instead of
2086 enclosing type.
2087
2088 2018-09-10 Xavier Roirand <roirand@adacore.com>
2089
2090 * ada-lang.c (ada_value_subscript): Handle case when parameter is
2091 an array of access to unconstrained array.
2092
2093 2018-09-10 Xavier Roirand <roirand@adacore.com>
2094
2095 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2096 (ada_check_typedef): Use it.
2097
2098 2018-09-10 Xavier Roirand <roirand@adacore.com>
2099
2100 * ada-varobj.c (ada_varobj_describe_struct_child)
2101 (ada_varobj_describe_child): Handle union case like struct one.
2102
2103 2018-09-10 Tom Tromey <tom@tromey.com>
2104
2105 PR python/18380:
2106 * python/python.c (_initialize_python): Make example in "python"
2107 help work in Python 3.
2108
2109 2018-09-10 Eli Zaretskii <eliz@gnu.org>
2110
2111 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2112 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
2113 $(EXEEXT) to the script, as it is not a program.
2114
2115 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
2116
2117 * python/py-prettyprint.c (pretty_print_one_value): Return
2118 gdbpy_ref<>.
2119 (print_string_repr): Adjust.
2120 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2121 * python/python-internal.h (apply_varobj_pretty_printer): Return
2122 gdbpy_ref<>.
2123 * varobj.c (varobj_value_get_print_value): Adjust.
2124
2125 2018-09-08 Tom Tromey <tom@tromey.com>
2126
2127 PR python/16047:
2128 * python/py-prettyprint.c (pretty_print_one_value): Check for
2129 to_string method.
2130
2131 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2132
2133 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2134 replace_operator_with_call.
2135
2136 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2137
2138 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2139
2140 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2141
2142 * ada-typeprint.c (print_range): Print the bounds using TYPE
2143 rather than its TYPE_TARGET_TYPE.
2144
2145 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2146
2147 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2148 call to ada_to_fixed_value_create.
2149
2150 2018-09-08 Jerome Guitton <guitton@adacore.com>
2151
2152 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2153
2154 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2155
2156 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2157 by calls to error.
2158
2159 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2160
2161 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2162 Move update of loop variable "fi".
2163
2164 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2165
2166 * ada-lang.c (value_assign_to_component): In the case of
2167 big-endian targets, extract the bits of the given VAL
2168 using an src_offset of zero if container is not a scalar.
2169
2170 2018-09-06 Simon Ser <contact@emersion.fr>
2171
2172 PR gdb/23105
2173 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2174 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2175 * fbsd-tdep.c (fbsd_make_note_desc): New.
2176 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2177 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2178 * target.h (enum target_object) Add FreeBSD-specific
2179 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2180
2181 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2182
2183 * compile/compile-c.h (generate_c_for_variable_locations):
2184 Change reference to pointer.
2185 * compile/compile-c-support.c (compile_program) <compute>:
2186 Likewise.
2187 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2188 (generate_c_for_for_one_variable): Likewise
2189 (generate_c_for_variable_locations): Likewise
2190 * compile/compile-c-types.c (compile_c_instance::convert_type):
2191 Likewise
2192 * compile/compile-cplus-symbols.c (convert_one_symbol):
2193 std::move the scope passed to enter_scope.
2194 * compile/compile-cplus-types.c
2195 (compile_cplus_instance::enter_scope): Make parameter
2196 rvalue-reference.
2197 (compile_cplus_instance::new_scope): Change reference to
2198 pointer.
2199 (compile_cplus_instance::convert_type): Likewise
2200 (compile_cplus_convert_typedef): std::move the scope passed to
2201 enter_scope.
2202 (compile_cplus_convert_struct_or_union): Likewise.
2203 (compile_cplus_convert_enum): Likewise.
2204 (compile_cplus_convert_namespace): Likewise.
2205 * compile/compile-cplus.h (compile_cplus_instance)
2206 <enter_scope>: Make parameter rvalue-reference.
2207 * compile/compile-internal.h (compile_instance)
2208 <get_cached_type>: Likewise
2209 * compile/compile-loc2c.c (push): Likewise
2210 (pushf): Likewise
2211 (unary): Likewise
2212 (binary): Likewise
2213 (print_label): Likewise
2214 (pushf_register_address): Likewise
2215 (pushf_register): Likewise
2216 (do_compile_dwarf_expr_to_c): Likewise
2217 (compile_dwarf_expr_to_c): Likewise
2218 (compile_dwarf_bounds_to_c): Likewise
2219 * compile/compile.c (compile_instance::get_cached_type):
2220 Likewise
2221 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2222 (compile_dwarf_bounds_to_c): Likewise
2223 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2224 (dwarf2_compile_property_to_c): Likewise
2225 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2226 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2227 Likewise
2228
2229 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2230
2231 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2232 * tui/tui-data.c (init_content_element): Don't initialize it.
2233
2234 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2235
2236 * tui/tui-data.h (struct tui_win_info)
2237 <detail::opaque>: Remove.
2238 * tui/tui-data.c (init_win_info): Remove assignment.
2239
2240 2018-09-05 Tom Tromey <tom@tromey.com>
2241
2242 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2243 -Wformat-nonliteral.
2244 * target-float.c (host_float_ops<T>::to_string)
2245 (host_float_ops<T>::from_string): Use
2246 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2247 * configure: Rebuild.
2248
2249 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2250
2251 * printcmd.c (printf_c_string): Use
2252 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2253 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2254
2255 2018-09-05 Tom Tromey <tom@tromey.com>
2256
2257 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2258
2259 2018-09-05 Tom de Vries <tdevries@suse.de>
2260
2261 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2262 with resolve_abstract_p == true.
2263 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2264 defaulting to false. Propagate resolve_abstract_p to
2265 dwarf2_fetch_die_loc_sect_off.
2266 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2267 parameter, defaulting to false.
2268 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2269 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2270 parameter.
2271 * dwarf2read.h (struct die_info): Forward-declare.
2272 (die_info_ptr): New typedef.
2273 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2274
2275 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2276
2277 GDB 8.2 released.
2278
2279 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2280 Pedro Alves <palves@redhat.com>
2281
2282 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2283 "aclocal-m4-deps.mk". Include file here.
2284 $(srcdir)/aclocal.m4: Add "configure.ac".
2285 * gnulib/aclocal-m4-deps.mk: New file.
2286 * gnulib/update-gnulib.sh: Automatically update
2287 "aclocal-m4-deps.mk".
2288
2289 2018-09-04 Tom Tromey <tom@tromey.com>
2290
2291 * configure: Rebuild.
2292 * configure.ac: Remove multi-ice code.
2293
2294 2018-09-04 Tom Tromey <tom@tromey.com>
2295
2296 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2297 (ada-exp.o): Update.
2298
2299 2018-09-04 Tom Tromey <tom@tromey.com>
2300
2301 * Makefile.in (printcmd.o, target-float.o): Remove.
2302 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2303
2304 2018-09-04 Tom Tromey <tom@tromey.com>
2305
2306 * gnulib/Makefile.in: Remove obsolete comment.
2307 * Makefile.in: Remove obsolete comment.
2308
2309 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2310
2311 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2312 line with '+'.
2313
2314 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2315
2316 * riscv-tdep.c: Add 'prologue-value.h' include.
2317 (struct riscv_unwind_cache): New struct.
2318 (riscv_debug_unwinder): New global.
2319 (riscv_scan_prologue): Update arguments, capture register details
2320 from prologue scan.
2321 (riscv_skip_prologue): Reformat arguments line, move end of
2322 prologue calculation into riscv_scan_prologue.
2323 (riscv_frame_cache): Update return type, create
2324 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2325 details.
2326 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2327 (riscv_frame_prev_register): Use the trad_frame within the
2328 riscv_unwind_cache.
2329 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2330 flag.
2331
2332 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2333
2334 * trad-frame.h (trad_frame_set_realreg): Declare.
2335 (trad_frame_set_addr): Declare.
2336 * trad-frame.c (trad_frame_set_realreg): Define new function.
2337 (trad_frame_set_addr): Define new function.
2338 (trad_frame_set_reg_realreg): Use new function.
2339 (trad_frame_set_reg_addr): Use new function.
2340
2341 2018-09-01 Keith Seitz <keiths@redhat.com>
2342
2343 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2344 pulongest instead of "%lld".
2345 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2346 ATTRIBUTE_UNUSED.
2347
2348 2018-08-31 Tom Tromey <tom@tromey.com>
2349
2350 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2351 variant part type.
2352
2353 2018-08-31 Pedro Alves <palves@redhat.com>
2354
2355 * gdbarch.h: Regenerate.
2356
2357 2018-08-31 Pedro Alves <palves@redhat.com>
2358
2359 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2360 * target.h (Hardware watchpoint interfaces): Describe
2361 continuable/steppable/non-steppable watchpoints.
2362 * gdbarch.h, gdbarch.c: Regenerate.
2363
2364 2018-08-31 Pedro Alves <palves@redhat.com>
2365
2366 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2367 Delete.
2368 * s390-linux-nat.c
2369 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2370 * target.h (target_ops::have_continuable_watchpoint): Delete.
2371 (target_have_continuable_watchpoint): Delete.
2372 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2373 * target-delegates.c: Regenerate.
2374
2375 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2376
2377 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2378 the files present in "gnulib/import/m4/".
2379
2380 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2381
2382 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2383 c.sw, c.swsp, and c.sdsp.
2384
2385 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2386
2387 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2388 (riscv_read_misa_reg): Don't cache value read into inferior data.
2389 (riscv_new_inferior_data): Delete.
2390 (riscv_inferior_data_cleanup): Delete.
2391 (riscv_inferior_data): Delete.
2392 (riscv_invalidate_inferior_data): Delete.
2393 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2394
2395 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2396
2397 * compile/compile-cplus-types.c
2398 (compile_cplus_instance::leave_scope): Take the address of scope
2399 object.
2400 (compile_cplus_instance::convert_qualified_base): Compare quals
2401 to 0.
2402
2403 2018-08-30 Keith Seitz <keiths@redhat.com>
2404
2405 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2406 Use "%s" and host_address_to_string instead of "%p" in printf.
2407
2408 2018-08-29 Keith Seitz <keiths@redhat.com>
2409
2410 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2411 and compile-cplus-types.c.
2412 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2413 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2414 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2415 Declare.
2416 * compile/compile-c-support.c: Include compile-cplus.h.
2417 (load_libcompile): Templatize.
2418 (get_compile_context): "New" function.
2419 (c_get_compile_context): Use get_compile_context.
2420 (cplus_get_compile_context): New function.
2421 (cplus_push_user_expression, cplus_pop_user_expression)
2422 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2423 (cplus_compute_program): Define new structs/functions.
2424 * compile/compile-cplus-symmbols.c: New file.
2425 * compile/compile-cplus-types.c: New file.
2426 * compile/compile-cplus.h: New file.
2427 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2428 Declare.
2429 * compile/compile-object-load.c (get_out_value_type): Use
2430 strncmp_iw when comparing symbol names.
2431 (compile_object_load): Add mst_bss and mst_data.
2432 * compile/compile.c (_initialize_compile): Remove
2433 -Wno-implicit-function-declaration from `compile_args'.
2434 * compile/gcc-cp-plugin.h: New file.
2435 * NEWS: Mention C++ compile support and new debug options.
2436
2437 2018-08-29 Keith Seitz <keiths@redhat.com>
2438
2439 * linespec.c (collect_info::add_symbol): Make virtual.
2440 (struct symbol_searcher_collect_info): New struct.
2441 (symbol_searcher::find_all_symbols): New method.
2442 * symtab.h (class symbol_searcher): New class.
2443
2444 2018-08-29 Keith Seitz <keiths@redhat.com>
2445
2446 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2447 Change to vector of block_symbol. Update all users.
2448 (struct collect_info) <symbols>: Likewise.
2449 (collect_info::add_symbol): Take block_symbol as argument.
2450 Update all callers.
2451 (decode_compound_collector) <m_symbols>: Change type to vector
2452 of block_symbol. Update all users.
2453 (decode_compound_collector::operator ()): Change parameter type
2454 to block_symbol.
2455 (find_method, find_function_symbols, find_linespec_symbols)
2456 (find_label_symbols_in_block, find_label_symbols): Change symbol
2457 vectors to block_symbol vectors.
2458 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2459 block_symbol.
2460
2461 2018-08-29 Keith Seitz <keiths@redhat.com>
2462
2463 * linespec.c (symbolp): Remove typedef and VEC definitions.
2464 (bound_minimal_symbol_d): Likewise.
2465
2466 2018-08-29 Keith Seitz <keiths@redhat.com>
2467
2468 * linespec.c (decode_compound_collector::decode_compound_collector):
2469 Remove initialization for `m_symtabs'.
2470 (decode_compound_collector::release_symbols): Change return type
2471 to std::vector. Update all callers.
2472 (class decode_compound_collector) <m_symbols>: Change type to
2473 std::vector.
2474 (lookup_prefix_sym): Change return type to std::vector. Update all
2475 callers.
2476 (compare_symbols): Remove.
2477 (std_compare_symbols): Rename to `compare_symbols'.
2478 (find_method): Change `sym_classes' parameter to std::vector.
2479 Update all callers. Use std::sort to sort sym_classes.
2480 (find_linespec_symbols): Remove cleanup.
2481
2482 2018-08-29 Keith Seitz <keiths@redhat.com>
2483
2484 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2485 std::vector. Update all users.
2486 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2487 (struct collect_info) <minimal_symbols>: Likewise.
2488 (compare_msymbols): Return bool. Change parameters to const
2489 bound_minimal_symbol references.
2490 (find_method, find_function_symbols, find_linespec_symbols): Change
2491 `minsyms' parameter to std::vector. Update all callers.
2492
2493 2018-08-29 Keith Seitz <keiths@redhat.com>
2494
2495 * linespec.c (struct linespec) <label_symbols>: Change type to
2496 std::vector. Update all users.
2497 (find_label_symbols_in_block): Change `result' parameter to
2498 std::vector. Update all callers.
2499 (find_label_symbols): Return std::vector. Update all callers.
2500
2501 2018-08-29 Keith Seitz <keiths@redhat.com>
2502
2503 * linespec.c (struct linespec) <function_symbols>: Change type to
2504 std::vector. Update all users.
2505 (struct collect_info) <function_symbols>: Likewise.
2506 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2507 (std_compare_symbols): New function.
2508 (find_method, find_function_symbols, find_linespec_symbols)
2509 (find_label_symbols_in_block): Change `symbols' parameter to
2510 std::vector. Update all callers.
2511 (find_label_symbols): Likewise for `function_symbols' and
2512 `label_funcs_ret'.
2513
2514 2018-08-29 Keith Seitz <keiths@redhat.com>
2515
2516 * linespec.c (symtab_vector_up): Define.
2517 (struct linespec) <file_symtabs>: Change type to std::vector *.
2518 Update all uses.
2519 (struct collect_info) <file_symtabs>: Likewise.
2520 (collect_symtabs_from_filename): Return symtab_vector_up.
2521 Update all callers.
2522 (decode_objc): Remove cleanup.
2523 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2524 (symtab_collector::release_symtabs): Return symtab_vector_up.
2525 Update all callers.
2526 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2527 Update all users.
2528 (collect_symtabs_from_filename, symtabs_from_filename): Return
2529 symtab_vector_up. Update all callers.
2530
2531 2018-08-29 Tom Tromey <tom@tromey.com>
2532
2533 * csky-tdep.c (csky_analyze_prologue): Use
2534 core_addr_to_string_nz.
2535
2536 2018-08-29 Tom Tromey <tom@tromey.com>
2537
2538 * windows-nat.c (struct xlate_exception) <them>: Change type to
2539 DWORD.
2540 (xlate): Fix formatting. Remove last entry.
2541 (struct xlate_exception, xlate): Comment out.
2542 (windows_nat_target::resume): Use ranged for.
2543
2544 2018-08-29 Jim Wilson <jimw@sifive.com>
2545
2546 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2547 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2548 of NT_PRFPREG.
2549 (riscv_linux_nat_target::store_registers): Likewise.
2550
2551 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2552
2553 PR gdb/23555
2554 PR gdb/23558
2555 * gnulib/aclocal.m4: Regenerate.
2556 * gnulib/config.in: Regenerate.
2557 * gnulib/configure: Regenerate.
2558 * gnulib/import/Makefile.am: Update.
2559 * gnulib/import/Makefile.in: Update.
2560 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2561 * gnulib/import/_Noreturn.h: ... this.
2562 * gnulib/import/alloca.in.h: Update.
2563 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2564 * gnulib/import/arg-nonnull.h: ... this.
2565 * gnulib/import/assure.h: Update.
2566 * gnulib/import/at-func.c: Update.
2567 * gnulib/import/basename-lgpl.c: Update.
2568 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2569 * gnulib/import/c++defs.h: ... this.
2570 * gnulib/import/canonicalize-lgpl.c: Update.
2571 * gnulib/import/cdefs.h: Update.
2572 * gnulib/import/chdir-long.c: Update.
2573 * gnulib/import/chdir-long.h: Update.
2574 * gnulib/import/cloexec.c: Update.
2575 * gnulib/import/cloexec.h: Update.
2576 * gnulib/import/close.c: Update.
2577 * gnulib/import/closedir.c: Update.
2578 * gnulib/import/config.charset: Update.
2579 * gnulib/import/dirent-private.h: Update.
2580 * gnulib/import/dirent.in.h: Update.
2581 * gnulib/import/dirfd.c: Update.
2582 * gnulib/import/dirname-lgpl.c: Update.
2583 * gnulib/import/dirname.h: Update.
2584 * gnulib/import/dosname.h: Update.
2585 * gnulib/import/dup-safer-flag.c: Update.
2586 * gnulib/import/dup-safer.c: Update.
2587 * gnulib/import/dup.c: Update.
2588 * gnulib/import/dup2.c: Update.
2589 * gnulib/import/errno.in.h: Update.
2590 * gnulib/import/error.c: Update.
2591 * gnulib/import/error.h: Update.
2592 * gnulib/import/exitfail.c: Update.
2593 * gnulib/import/exitfail.h: Update.
2594 * gnulib/import/extra/update-copyright: Update.
2595 * gnulib/import/fchdir.c: Update.
2596 * gnulib/import/fcntl.c: Update.
2597 * gnulib/import/fcntl.in.h: Update.
2598 * gnulib/import/fd-hook.c: Update.
2599 * gnulib/import/fd-hook.h: Update.
2600 * gnulib/import/fd-safer-flag.c: Update.
2601 * gnulib/import/fd-safer.c: Update.
2602 * gnulib/import/fdopendir.c: Update.
2603 * gnulib/import/filename.h: Update.
2604 * gnulib/import/filenamecat-lgpl.c: Update.
2605 * gnulib/import/filenamecat.h: Update.
2606 * gnulib/import/flexmember.h: Update.
2607 * gnulib/import/float+.h: Update.
2608 * gnulib/import/float.c: Update.
2609 * gnulib/import/float.in.h: Update.
2610 * gnulib/import/fnmatch.c: Update.
2611 * gnulib/import/fnmatch.in.h: Update.
2612 * gnulib/import/fnmatch_loop.c: Update.
2613 * gnulib/import/fpucw.h: Update.
2614 * gnulib/import/frexp.c: Update.
2615 * gnulib/import/frexpl.c: Update.
2616 * gnulib/import/fstat.c: Update.
2617 * gnulib/import/fstatat.c: Update.
2618 * gnulib/import/getcwd-lgpl.c: Update.
2619 * gnulib/import/getcwd.c: Update.
2620 * gnulib/import/getdtablesize.c: Update.
2621 * gnulib/import/getlogin_r.c: Update.
2622 * gnulib/import/getprogname.c: Update.
2623 * gnulib/import/getprogname.h: Update.
2624 * gnulib/import/gettext.h: Update.
2625 * gnulib/import/gettimeofday.c: Update.
2626 * gnulib/import/glob-libc.h: Update.
2627 * gnulib/import/glob.c: Update.
2628 * gnulib/import/glob.in.h: Update.
2629 * gnulib/import/glob_internal.h: Update.
2630 * gnulib/import/glob_pattern_p.c: Update.
2631 * gnulib/import/globfree.c: Update.
2632 * gnulib/import/hard-locale.c: Update.
2633 * gnulib/import/hard-locale.h: Update.
2634 * gnulib/import/intprops.h: Update.
2635 * gnulib/import/inttypes.in.h: Update.
2636 * gnulib/import/isnan.c: Update.
2637 * gnulib/import/isnand-nolibm.h: Update.
2638 * gnulib/import/isnand.c: Update.
2639 * gnulib/import/isnanl-nolibm.h: Update.
2640 * gnulib/import/isnanl.c: Update.
2641 * gnulib/import/itold.c: Update.
2642 * gnulib/import/libc-config.h: Update.
2643 * gnulib/import/limits.in.h: Update.
2644 * gnulib/import/localcharset.c: Update.
2645 * gnulib/import/localcharset.h: Update.
2646 * gnulib/import/localtime-buffer.c: Update.
2647 * gnulib/import/localtime-buffer.h: Update.
2648 * gnulib/import/lstat.c: Update.
2649 * gnulib/import/m4/00gnulib.m4: Update.
2650 * gnulib/import/m4/__inline.m4: Update.
2651 * gnulib/import/m4/absolute-header.m4: Update.
2652 * gnulib/import/m4/alloca.m4: Update.
2653 * gnulib/import/m4/builtin-expect.m4: Update.
2654 * gnulib/import/m4/canonicalize.m4: Update.
2655 * gnulib/import/m4/chdir-long.m4: Update.
2656 * gnulib/import/m4/close.m4: Update.
2657 * gnulib/import/m4/closedir.m4: Update.
2658 * gnulib/import/m4/configmake.m4: Update.
2659 * gnulib/import/m4/d-ino.m4: Update.
2660 * gnulib/import/m4/d-type.m4: Update.
2661 * gnulib/import/m4/dirent_h.m4: Update.
2662 * gnulib/import/m4/dirfd.m4: Update.
2663 * gnulib/import/m4/dirname.m4: Update.
2664 * gnulib/import/m4/double-slash-root.m4: Update.
2665 * gnulib/import/m4/dup.m4: Update.
2666 * gnulib/import/m4/dup2.m4: Update.
2667 * gnulib/import/m4/eealloc.m4: Update.
2668 * gnulib/import/m4/environ.m4: Update.
2669 * gnulib/import/m4/errno_h.m4: Update.
2670 * gnulib/import/m4/error.m4: Update.
2671 * gnulib/import/m4/exponentd.m4: Update.
2672 * gnulib/import/m4/exponentl.m4: Update.
2673 * gnulib/import/m4/extensions.m4: Update.
2674 * gnulib/import/m4/extern-inline.m4: Update.
2675 * gnulib/import/m4/fchdir.m4: Update.
2676 * gnulib/import/m4/fcntl-o.m4: Update.
2677 * gnulib/import/m4/fcntl.m4: Update.
2678 * gnulib/import/m4/fcntl_h.m4: Update.
2679 * gnulib/import/m4/fdopendir.m4: Update.
2680 * gnulib/import/m4/filenamecat.m4: Update.
2681 * gnulib/import/m4/flexmember.m4: Update.
2682 * gnulib/import/m4/float_h.m4: Update.
2683 * gnulib/import/m4/fnmatch.m4: Update.
2684 * gnulib/import/m4/fnmatch_h.m4: Update.
2685 * gnulib/import/m4/fpieee.m4: Update.
2686 * gnulib/import/m4/frexp.m4: Update.
2687 * gnulib/import/m4/frexpl.m4: Update.
2688 * gnulib/import/m4/fstat.m4: Update.
2689 * gnulib/import/m4/fstatat.m4: Update.
2690 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2691 * gnulib/import/m4/getcwd-path-max.m4: Update.
2692 * gnulib/import/m4/getcwd.m4: Update.
2693 * gnulib/import/m4/getdtablesize.m4: Update.
2694 * gnulib/import/m4/getlogin.m4: Update.
2695 * gnulib/import/m4/getlogin_r.m4: Update.
2696 * gnulib/import/m4/getpagesize.m4: Update.
2697 * gnulib/import/m4/getprogname.m4: Update.
2698 * gnulib/import/m4/gettimeofday.m4: Update.
2699 * gnulib/import/m4/glibc21.m4: Update.
2700 * gnulib/import/m4/glob.m4: Update.
2701 * gnulib/import/m4/glob_h.m4: Update.
2702 * gnulib/import/m4/gnulib-cache.m4: Update.
2703 * gnulib/import/m4/gnulib-common.m4: Update.
2704 * gnulib/import/m4/gnulib-comp.m4: Update.
2705 * gnulib/import/m4/gnulib-tool.m4: Update.
2706 * gnulib/import/m4/hard-locale.m4: Update.
2707 * gnulib/import/m4/include_next.m4: Update.
2708 * gnulib/import/m4/inttypes-pri.m4: Update.
2709 * gnulib/import/m4/inttypes.m4: Update.
2710 * gnulib/import/m4/isnand.m4: Update.
2711 * gnulib/import/m4/isnanl.m4: Update.
2712 * gnulib/import/m4/largefile.m4: Update.
2713 * gnulib/import/m4/limits-h.m4: Update.
2714 * gnulib/import/m4/localcharset.m4: Update.
2715 * gnulib/import/m4/locale-fr.m4: Update.
2716 * gnulib/import/m4/locale-ja.m4: Update.
2717 * gnulib/import/m4/locale-zh.m4: Update.
2718 * gnulib/import/m4/localtime-buffer.m4: Update.
2719 * gnulib/import/m4/longlong.m4: Update.
2720 * gnulib/import/m4/lstat.m4: Update.
2721 * gnulib/import/m4/malloc.m4: Update.
2722 * gnulib/import/m4/malloca.m4: Update.
2723 * gnulib/import/m4/math_h.m4: Update.
2724 * gnulib/import/m4/mbrtowc.m4: Update.
2725 * gnulib/import/m4/mbsinit.m4: Update.
2726 * gnulib/import/m4/mbsrtowcs.m4: Update.
2727 * gnulib/import/m4/mbstate_t.m4: Update.
2728 * gnulib/import/m4/memchr.m4: Update.
2729 * gnulib/import/m4/memmem.m4: Update.
2730 * gnulib/import/m4/mempcpy.m4: Update.
2731 * gnulib/import/m4/memrchr.m4: Update.
2732 * gnulib/import/m4/mkdir.m4: Update.
2733 * gnulib/import/m4/mkstemp.m4: Update.
2734 * gnulib/import/m4/mmap-anon.m4: Update.
2735 * gnulib/import/m4/mode_t.m4: Update.
2736 * gnulib/import/m4/msvc-inval.m4: Update.
2737 * gnulib/import/m4/msvc-nothrow.m4: Update.
2738 * gnulib/import/m4/multiarch.m4: Update.
2739 * gnulib/import/m4/nocrash.m4: Update.
2740 * gnulib/import/m4/off_t.m4: Update.
2741 * gnulib/import/m4/onceonly.m4: Update.
2742 * gnulib/import/m4/open-cloexec.m4: Update.
2743 * gnulib/import/m4/open.m4: Update.
2744 * gnulib/import/m4/openat.m4: Update.
2745 * gnulib/import/m4/opendir.m4: Update.
2746 * gnulib/import/m4/pathmax.m4: Update.
2747 * gnulib/import/m4/rawmemchr.m4: Update.
2748 * gnulib/import/m4/readdir.m4: Update.
2749 * gnulib/import/m4/readlink.m4: Update.
2750 * gnulib/import/m4/realloc.m4: Update.
2751 * gnulib/import/m4/rename.m4: Update.
2752 * gnulib/import/m4/rewinddir.m4: Update.
2753 * gnulib/import/m4/rmdir.m4: Update.
2754 * gnulib/import/m4/save-cwd.m4: Update.
2755 * gnulib/import/m4/secure_getenv.m4: Update.
2756 * gnulib/import/m4/setenv.m4: Update.
2757 * gnulib/import/m4/signal_h.m4: Update.
2758 * gnulib/import/m4/ssize_t.m4: Update.
2759 * gnulib/import/m4/stat-time.m4: Update.
2760 * gnulib/import/m4/stat.m4: Update.
2761 * gnulib/import/m4/std-gnu11.m4: Update.
2762 * gnulib/import/m4/stdbool.m4: Update.
2763 * gnulib/import/m4/stddef_h.m4: Update.
2764 * gnulib/import/m4/stdint.m4: Update.
2765 * gnulib/import/m4/stdio_h.m4: Update.
2766 * gnulib/import/m4/stdlib_h.m4: Update.
2767 * gnulib/import/m4/strchrnul.m4: Update.
2768 * gnulib/import/m4/strdup.m4: Update.
2769 * gnulib/import/m4/strerror.m4: Update.
2770 * gnulib/import/m4/string_h.m4: Update.
2771 * gnulib/import/m4/strstr.m4: Update.
2772 * gnulib/import/m4/strtok_r.m4: Update.
2773 * gnulib/import/m4/sys_socket_h.m4: Update.
2774 * gnulib/import/m4/sys_stat_h.m4: Update.
2775 * gnulib/import/m4/sys_time_h.m4: Update.
2776 * gnulib/import/m4/sys_types_h.m4: Update.
2777 * gnulib/import/m4/tempname.m4: Update.
2778 * gnulib/import/m4/time_h.m4: Update.
2779 * gnulib/import/m4/unistd-safer.m4: Update.
2780 * gnulib/import/m4/unistd_h.m4: Update.
2781 * gnulib/import/m4/warn-on-use.m4: Update.
2782 * gnulib/import/m4/wchar_h.m4: Update.
2783 * gnulib/import/m4/wchar_t.m4: Update.
2784 * gnulib/import/m4/wctype_h.m4: Update.
2785 * gnulib/import/m4/wint_t.m4: Update.
2786 * gnulib/import/malloc.c: Update.
2787 * gnulib/import/malloc/scratch_buffer.h: Update.
2788 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2789 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2790 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2791 * gnulib/import/malloca.c: Update.
2792 * gnulib/import/malloca.h: Update.
2793 * gnulib/import/malloca.valgrind: Update.
2794 * gnulib/import/math.in.h: Update.
2795 * gnulib/import/mbrtowc.c: Update.
2796 * gnulib/import/mbsinit.c: Update.
2797 * gnulib/import/mbsrtowcs-impl.h: Update.
2798 * gnulib/import/mbsrtowcs-state.c: Update.
2799 * gnulib/import/mbsrtowcs.c: Update.
2800 * gnulib/import/memchr.c: Update.
2801 * gnulib/import/memmem.c: Update.
2802 * gnulib/import/mempcpy.c: Update.
2803 * gnulib/import/memrchr.c: Update.
2804 * gnulib/import/mkdir.c: Update.
2805 * gnulib/import/mkstemp.c: Update.
2806 * gnulib/import/msvc-inval.c: Update.
2807 * gnulib/import/msvc-inval.h: Update.
2808 * gnulib/import/msvc-nothrow.c: Update.
2809 * gnulib/import/msvc-nothrow.h: Update.
2810 * gnulib/import/open.c: Update.
2811 * gnulib/import/openat-die.c: Update.
2812 * gnulib/import/openat-priv.h: Update.
2813 * gnulib/import/openat-proc.c: Update.
2814 * gnulib/import/openat.c: Update.
2815 * gnulib/import/openat.h: Update.
2816 * gnulib/import/opendir.c: Update.
2817 * gnulib/import/pathmax.h: Update.
2818 * gnulib/import/pipe-safer.c: Update.
2819 * gnulib/import/rawmemchr.c: Update.
2820 * gnulib/import/readdir.c: Update.
2821 * gnulib/import/readlink.c: Update.
2822 * gnulib/import/realloc.c: Update.
2823 * gnulib/import/ref-add.sin: Update.
2824 * gnulib/import/ref-del.sin: Update.
2825 * gnulib/import/rename.c: Update.
2826 * gnulib/import/rewinddir.c: Update.
2827 * gnulib/import/rmdir.c: Update.
2828 * gnulib/import/same-inode.h: Update.
2829 * gnulib/import/save-cwd.c: Update.
2830 * gnulib/import/save-cwd.h: Update.
2831 * gnulib/import/scratch_buffer.h: Update.
2832 * gnulib/import/secure_getenv.c: Update.
2833 * gnulib/import/setenv.c: Update.
2834 * gnulib/import/signal.in.h: Update.
2835 * gnulib/import/stat-time.c: Update.
2836 * gnulib/import/stat-time.h: Update.
2837 * gnulib/import/stat-w32.c: Update.
2838 * gnulib/import/stat-w32.h: Update.
2839 * gnulib/import/stat.c: Update.
2840 * gnulib/import/stdbool.in.h: Update.
2841 * gnulib/import/stddef.in.h: Update.
2842 * gnulib/import/stdint.in.h: Update.
2843 * gnulib/import/stdio.in.h: Update.
2844 * gnulib/import/stdlib.in.h: Update.
2845 * gnulib/import/str-two-way.h: Update.
2846 * gnulib/import/strchrnul.c: Update.
2847 * gnulib/import/strdup.c: Update.
2848 * gnulib/import/streq.h: Update.
2849 * gnulib/import/strerror-override.c: Update.
2850 * gnulib/import/strerror-override.h: Update.
2851 * gnulib/import/strerror.c: Update.
2852 * gnulib/import/string.in.h: Update.
2853 * gnulib/import/stripslash.c: Update.
2854 * gnulib/import/strnlen1.c: Update.
2855 * gnulib/import/strnlen1.h: Update.
2856 * gnulib/import/strstr.c: Update.
2857 * gnulib/import/strtok_r.c: Update.
2858 * gnulib/import/sys_stat.in.h: Update.
2859 * gnulib/import/sys_time.in.h: Update.
2860 * gnulib/import/sys_types.in.h: Update.
2861 * gnulib/import/tempname.c: Update.
2862 * gnulib/import/tempname.h: Update.
2863 * gnulib/import/time.in.h: Update.
2864 * gnulib/import/unistd--.h: Update.
2865 * gnulib/import/unistd-safer.h: Update.
2866 * gnulib/import/unistd.in.h: Update.
2867 * gnulib/import/unsetenv.c: Update.
2868 * gnulib/import/verify.h: Update.
2869 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2870 * gnulib/import/wchar.in.h: Update.
2871 * gnulib/import/wctype.in.h: Update.
2872 * gnulib/import/xalloc-oversized.h: Update.
2873 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2874 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2875
2876 2018-08-16 Gary Benson <gbenson@redhat.com>
2877
2878 PR gdb/13000:
2879 * gdb/main.c (captured_main_1): Exit with nonzero status
2880 in batch mode if the last command to be executed failed.
2881 * NEWS: Mention the above.
2882
2883 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2884
2885 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2886 end of warning message.
2887
2888 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2889
2890 PR gdb/22943:
2891 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2892 (aarch64_extract_return_value): Use
2893 aapcs_is_vfp_call_or_return_candidate.
2894 (aarch64_return_in_memory): Likewise.
2895 (aarch64_store_return_value): Likewise.
2896
2897 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2898
2899 * aarch64-tdep.c
2900 (aapcs_is_vfp_call_or_return_candidate): Make static
2901 (pass_in_v_or_stack): Remove function.
2902 (pass_in_v_vfp_candidate): New function.
2903 (aarch64_push_dummy_call): Check for float register candidates.
2904
2905 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2906
2907 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2908 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2909 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2910
2911 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2912
2913 PR build/23399
2914 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2915 (struct ipa_sym_addresses): Rename to...
2916 (struct ipa_sym_addresses_common): ... this.
2917 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2918
2919 2018-08-28 Tom Tromey <tom@tromey.com>
2920
2921 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2922 (token_fifo): Now a std::vector.
2923 (yylex, c_parse): Update.
2924 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2925 (token_fifo): Now a std::vector.
2926 (yylex, d_parse): Update.
2927 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2928 (token_fifo): Now a std::vector.
2929 (yylex, go_parse): Update.
2930
2931 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2932
2933 * parser-defs.h (struct type_stack) <elements>: Change type to
2934 std::vector<union type_stack_elt>.
2935 <depth, size>: Remove.
2936 * parse.c (parse_exp_in_context_1): Adjust.
2937 (type_stack_reserve): Remove.
2938 (check_type_stack_depth): Remove.
2939 (insert_into_type_stack): Adjust to std::vector.
2940 (insert_type): Likewise.
2941 (push_type): Likewise.
2942 (push_type_int): Likewise.
2943 (insert_type_address_space): Likewise.
2944 (pop_type): Likewise.
2945 (pop_type_int): Likewise.
2946 (pop_typelist): Likewise.
2947 (pop_type_stack): Likewise.
2948 (append_type_stack): Likewise.
2949 (push_type_stack): Likewise.
2950 (get_type_stack): Likewise.
2951 (type_stack_cleanup): Likewise.
2952 (push_typelist): Likewise.
2953 (follow_types): Likewise.
2954 (_initialize_parse): Likewise.
2955
2956 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2957
2958 * NEWS: Mention csky target.
2959
2960 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2961 Hafiz Abid Qadeer <abidh@codesourcery.com>
2962 Don Breazeal <donb@codesourcery.com>
2963
2964 * csky-linux-tdep.c: New file.
2965 * csky-tdep.c: Likewise.
2966 * csky-tdep.h: Likewise.
2967 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2968 csky-tdep.o.
2969 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2970 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2971 * configure.tgt: Add csky support.
2972
2973 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2974
2975 * python/py-framefilter.c (py_print_frame): Print frame architecture
2976 when printing on an MI output.
2977
2978 2018-08-27 Tom Tromey <tom@tromey.com>
2979
2980 PR build/23087:
2981 * configure: Rebuild.
2982 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2983
2984 2018-08-27 Tom Tromey <tom@tromey.com>
2985
2986 * aarch64-linux-tdep.c
2987 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2988 casts to int.
2989
2990 2018-08-27 Tom Tromey <tom@tromey.com>
2991
2992 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2993 unsigned.
2994 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2995 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2996 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2997 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2998 unsigned.
2999
3000 2018-08-27 Tom Tromey <tom@tromey.com>
3001
3002 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3003 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3004
3005 2018-08-27 Tom Tromey <tom@tromey.com>
3006
3007 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3008 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3009 ULONGEST_MAX.
3010 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3011 ULONGEST_MAX.
3012 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3013 ULONGEST_MAX.
3014 * sparc-linux-tdep.c (sparc32_linux_sigframe)
3015 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3016 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3017 ULONGEST_MAX.
3018 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3019 (ppc64_linux_sigaction_tramp_frame)
3020 (ppc32_linux_sighandler_tramp_frame)
3021 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3022 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3023 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3024 * mn10300-linux-tdep.c (am33_linux_sigframe)
3025 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3026 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3027 * mips-linux-tdep.c (mips_linux_o32_sigframe)
3028 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3029 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3030 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3031 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3032 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3033 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3034 * microblaze-linux-tdep.c
3035 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3036 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3037 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3038 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3039 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3040 * common/common-types.h (ULONGEST_MAX): New define.
3041 (CORE_ADDR_MAX): Fix formatting.
3042 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3043 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3044 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3045 (arm_linux_rt_sigreturn_tramp_frame)
3046 (arm_eabi_linux_sigreturn_tramp_frame)
3047 (arm_eabi_linux_rt_sigreturn_tramp_frame)
3048 (thumb2_eabi_linux_sigreturn_tramp_frame)
3049 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3050 (arm_linux_restart_syscall_tramp_frame)
3051 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3052 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3053 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3054 ULONGEST_MAX.
3055 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3056
3057 2018-08-27 Tom Tromey <tom@tromey.com>
3058
3059 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3060 CORE_ADDR_MAX.
3061 * mips-tdep.c (mips_deal_with_atomic_sequence)
3062 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3063 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3064 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3065 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3066 CORE_ADDR_MAX.
3067 * aarch64-tdep.c (aarch64_software_single_step): Use
3068 CORE_ADDR_MAX.
3069
3070 2018-08-27 Tom Tromey <tom@tromey.com>
3071
3072 * linespec.c (complete_linespec_component): Add cast to "char".
3073 * completer.c (completion_tracker::build_completion_result): Add
3074 cast to "char".
3075
3076 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3077
3078 * solist.h (struct solist, struct target_so_ops): Fix
3079 indentation.
3080
3081 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3082
3083 * ada-tasks.c (ada_task_info_s): Remove typedef.
3084 (DEF_VEC_O(ada_task_info_s)): Remove.
3085 (struct ada_tasks_inferior_data): Initialize fields.
3086 <task_list>: Make an std::vector.
3087 (get_ada_tasks_inferior_data): Allocate with new.
3088 (ada_get_task_number): Adjust.
3089 (get_task_number_from_id): Likewise.
3090 (valid_task_id): Likewise.
3091 (ada_get_task_info_from_ptid): Likewise.
3092 (iterate_over_live_ada_tasks): Likewise.
3093 (add_ada_task): Likewise.
3094 (read_known_tasks): Likewise.
3095 (ada_build_task_list): Likewise.
3096 (print_ada_task_info): Likewise.
3097 (info_task): Likewise.
3098 (task_command_1): Likewise.
3099
3100 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3101
3102 * ada-lang.c (add_angle_brackets): Return std::string.
3103
3104 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
3105
3106 * python/py-threadevent.c (py_get_event_thread): Initialize
3107 pythread.
3108
3109 2018-08-24 Pedro Alves <palves@redhat.com>
3110
3111 * python/py-bpevent.c (create_breakpoint_event_object): Use
3112 copy-initialization.
3113 * python/py-continueevent.c (emit_continue_event): Use
3114 copy-initialization.
3115 * python/py-exitedevent.c (create_exited_event_object): Return a
3116 gdbpy_ref<>.
3117 (emit_exited_event): Use copy-initialization.
3118 * python/py-inferior.c (python_new_inferior)
3119 (python_inferior_deleted, add_thread_object): Use
3120 copy-initialization.
3121 * python/py-infevents.c (create_inferior_call_event_object)
3122 (create_register_changed_event_object)
3123 (create_memory_changed_event_object): Return a gdbpy_ref<>.
3124 (emit_inferior_call_event, emit_memory_changed_event)
3125 (emit_register_changed_event): Use copy-initialization.
3126 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3127 Return a gdbpy_ref<>.
3128 (emit_new_objfile_event): Use copy-initialization.
3129 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3130 (emit_clear_objfiles_event): Use copy-initialization.
3131 * python/py-signalevent.c (create_signal_event_object): Use
3132 copy-initialization.
3133 * python/py-threadevent.c (create_thread_event_object): Use
3134 copy-initialization.
3135
3136 2018-08-24 Pedro Alves <palves@redhat.com>
3137 Simon Marchi <simon.marchi@ericsson.com>
3138
3139 PR gdb/23379
3140 * python/py-continueevent.c: Include "gdbthread.h".
3141 (create_continue_event_object): Add intro comment. Add 'ptid'
3142 parameter. Use it to find thread to pass to
3143 create_thread_event_object.
3144 (emit_continue_event): Pass PTID down to
3145 create_continue_event_object.
3146 * python/py-event.h (py_get_event_thread): Declare.
3147 (create_thread_event_object): Remove default from 'thread'
3148 parameter.
3149 * python/py-stopevent.c (create_stop_event_object): Use
3150 py_get_event_thread.
3151 * python/py-threadevent.c (get_event_thread): Rename to ...
3152 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3153 and use it to find the thread.
3154 (create_thread_event_object): Assert that THREAD isn't null.
3155 Don't find the event thread here.
3156
3157 2018-08-23 Kevin Buettner <kevinb@redhat.com>
3158
3159 * block.h (blockrange, blockranges): New struct declarations.
3160 (struct block): Add new field named `ranges'.
3161 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3162 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3163 macros for accessing ranges in struct block.
3164 (make_blockranges): New declaration.
3165 block.c (make_blockranges): New function.
3166 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3167 for block.
3168 * symtab.h (find_pc_partial_function): Add new parameter `block'.
3169 * blockframe.c (cache_pc_function_block): New static global.
3170 (clear_pc_function_cache): Clear cache_pc_function_block.
3171 (find_pc_partial_function): Move comment to symtab.h. Add
3172 support for non-contiguous blocks.
3173 * cli/cli-cmds.c (block.h): Include.
3174 (print_disassembly): Handle printing of non-contiguous blocks.
3175 (disassemble_current_function): Likewise.
3176 (disassemble_command): Likewise.
3177
3178 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3179 BLOCK_START.
3180 * blockframe.c (get_pc_function_start): Likewise.
3181 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3182 (gcc_symbol_address): Likewise.
3183 * compile/compile-object-run.c (compile_object_run): Likewise.
3184 * compile/compile.c (get_expr_block_and_pc): Likewise.
3185 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3186 (func_addr_to_tail_call_list): Likewise.
3187 * findvar.c (default_read_var_value): Likewise.
3188 * inline-frame.c (inline_frame_this_id): Likewise.
3189 (skip-inline_frames): Likewise.
3190 * infcmd.c (until_next_command): Likewise.
3191 * linespec.c (convert_linespec_to_sals): Likewise.
3192 * parse.c (parse_exp_in_context_1): Likewise.
3193 * printcmd.c (build_address_symbolic): likewise.
3194 (info_address_command): Likewise.
3195 symtab.c (find_function_start_sal): Likewise.
3196 (skip_prologue_sal): Likewise.
3197 (find_function_alias_target): Likewise.
3198 (find_gnu_ifunc): Likewise.
3199 * stack.c (find_frame_funname): Likewise.
3200 * symtab.c (fixup_symbol_section): Likewise.
3201 (find_function_start_sal): Likewise.
3202 (skip_prologue_sal): Likewsie.
3203 (find_function_alias_target): Likewise.
3204 (find_gnu_ifunc): Likewise.
3205 * tracepoint.c (info_scope_command): Likewise.
3206 * value.c (value_fn_field): Likewise.
3207
3208 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3209 in place of find_pc_partial_function.
3210 * blockframe.c (find_function_entry_range_from_pc): New function.
3211 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3212 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3213 for each range in a block.
3214
3215
3216 2018-08-23 Xavier Roirand <roirand@adacore.com>
3217
3218 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3219 incrementation.
3220
3221 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3222
3223 * solib-svr4.c (read_program_headers_from_bfd): Return
3224 gdb::optional<gdb::byte_vector>.
3225 (svr4_exec_displacement): Adjust.
3226
3227 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3228
3229 * solib-svr4.c (read_program_header): Return
3230 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3231 (find_program_interpreter): Return
3232 gdb::optional<gdb::byte_vector>.
3233 (scan_dyntag_auxv): Adjust.
3234 (enable_break): Adjust.
3235 (svr4_exec_displacement): Adjust.
3236
3237 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3238
3239 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3240 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3241
3242 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3243
3244 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3245 string_vprintf.
3246 * guile/scm-utils.c (gdbscm_printf): Likewise.
3247 * serial.c (serial_printf): Likewise.
3248 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3249
3250 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3251
3252 * stack.c (print_frame): Print frame architecture when printing on
3253 an MI output.
3254 * NEWS: Mention new "arch" attribute in frame output.
3255
3256 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3257
3258 * arch/aarch64.h (aarch64_regnum): Update comment.
3259
3260 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3261
3262 * NEWS: Add SVE to 8.2 section.
3263
3264 2018-08-21 Pedro Alves <palves@redhat.com>
3265
3266 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3267 out from gdbscm_parse_function_args.
3268 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3269 gdbscm_parse_function_args_1.
3270
3271 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3272
3273 PR gdb/17816
3274 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3275 operator.
3276
3277 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3278
3279 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3280
3281 2018-08-19 Michael Spang <spang@google.com>
3282
3283 PR gdb/11786
3284 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3285 for PT_TLS segments.
3286
3287 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3288
3289 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3290 dwarf_variable_value.
3291 * dwarf2-frame.c (class dwarf_expr_executor):
3292 Add override for dwarf_variable_value.
3293 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3294 (class symbol_needs_eval_context): Likewise.
3295 (indirect_synthetic_pointer): Add forward declaration.
3296 (sect_variable_value): New function.
3297 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3298 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3299 for DW_OP_GNU_variable_value.
3300
3301 2018-08-16 Tom Tromey <tom@tromey.com>
3302
3303 * top.c (read_command_file): Update.
3304 (command_line_input): Remove "repeat" argument.
3305 * ada-lang.c (get_selections): Update.
3306 * linespec.c (decode_line_2): Update.
3307 * defs.h (command_line_input): Remove argument.
3308 * cli/cli-script.c (read_next_line): Update.
3309 * python/py-gdb-readline.c: Update.
3310
3311 2018-08-17 Tom Tromey <tom@tromey.com>
3312
3313 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3314 command_line_input.
3315
3316 2018-08-15 Tom Tromey <tom@tromey.com>
3317
3318 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3319
3320 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3321
3322 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3323 If used, use find_pc_partial_function to find address range
3324 to disassemble.
3325 * mi/mi-main.c (mi_cmd_list_features): Report
3326 "data-disassemble-a-option" feature.
3327 * NEWS: Mention new -data-disassemble option -a.
3328
3329 2018-08-13 Tom Tromey <tom@tromey.com>
3330
3331 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3332
3333 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3334
3335 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3336 (aarch64_linux_collect_sve_regset): Likewise.
3337 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3338 * regcache.h (regcache_map_entry_size): New function.
3339
3340 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3341
3342 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3343 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3344 (SVE_HEADER_VL_LENGTH): Likewise.
3345 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3346 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3347 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3348 (SVE_HEADER_SIZE_OFFSET): Likewise.
3349 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3350 (SVE_HEADER_VL_OFFSET): Likewise.
3351 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3352 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3353 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3354 (SVE_HEADER_SIZE): Likewise.
3355 (aarch64_linux_core_read_vq): Add function.
3356 (aarch64_linux_core_read_description): Check for SVE section.
3357
3358 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3359
3360 * aarch64-fbsd-tdep.c
3361 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3362 collect_size.
3363 * aarch64-linux-tdep.c
3364 (aarch64_linux_iterate_over_regset_sections): Likewise.
3365 * alpha-linux-tdep.c
3366 (alpha_linux_iterate_over_regset_sections):
3367 * alpha-nbsd-tdep.c
3368 (alphanbsd_iterate_over_regset_sections): Likewise.
3369 * amd64-fbsd-tdep.c
3370 (amd64fbsd_iterate_over_regset_sections): Likewise.
3371 * amd64-linux-tdep.c
3372 (amd64_linux_iterate_over_regset_sections): Likewise.
3373 * arm-bsd-tdep.c
3374 (armbsd_iterate_over_regset_sections): Likewise.
3375 * arm-fbsd-tdep.c
3376 (arm_fbsd_iterate_over_regset_sections): Likewise.
3377 * arm-linux-tdep.c
3378 (arm_linux_iterate_over_regset_sections): Likewise.
3379 * corelow.c (get_core_registers_cb): Likewise.
3380 (core_target::fetch_registers): Likewise.
3381 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3382 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3383 * gdbarch.h (void): Regenerate.
3384 * gdbarch.sh: Add supply_size and collect_size.
3385 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3386 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3387 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3388 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3389 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3390 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3391 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3392 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3393 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3394 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3395 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3396 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3397 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3398 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3399 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3400 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3401 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3402 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3403 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3404 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3405 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3406 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3407 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3408 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3409 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3410 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3411 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3412 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3413 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3414 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3415
3416 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3417
3418 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3419 with string_printf.
3420
3421 2018-08-10 Keith Seitz <keiths@redhat.com>
3422
3423 * compile/compile-c-support.c (add_code_header, add_code_footer):
3424 Move into policy class.
3425 (c_push_user_expression, pop_user_expression_nop)
3426 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3427 (compile_program): New host class.
3428 (c_compile_program): New typedef.
3429 (c_compute_porgram): Use c_compile_program.
3430
3431 2018-08-10 Keith Seitz <keiths@redhat.com>
3432
3433 * compile/compile-internal.h (compile_instance::~compile_instance):
3434 Remove calls to htab_delete.
3435 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3436 * compile.c (compile_instance::compile_instance): Initialize
3437 htab unique pointers.
3438 (compile_instance::get_cached_type, compile_instance::insert_type)
3439 (compile_instance::error_symbol_once): Update for unique_ptr.
3440
3441 2018-08-10 Keith Seitz <keiths@redhat.com>
3442
3443 * compile/compile-c-symbols.c (struct symbol_error)
3444 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3445 (compile_instance::insert_symbol_error)
3446 (compile_instance::error_symbol_once): Move to ...
3447 * compile/compile.c: ... here.
3448
3449 2018-08-10 Keith Seitz <keiths@redhat.com>
3450
3451 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3452 instead of `new_compile_instance'.
3453 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3454 Update description.
3455 If the symbol error map is not initialized, create it.
3456 (generate_c_for_for_one_symbol): Do not check/initialize
3457 the symbol error map.
3458 * compile/compile-c-types.c (compile_c_instance): Make a class.
3459 Update all callers.
3460 (compile_instance::compile_instance): Initialize the type cache.
3461 (get_cached_type): New function.
3462 (insert_type): Update description.
3463 (compile_c_instance::m_default_cflags): Define.
3464 (convert_type): Update description. Use get_cached_type.
3465 (delete_instance): Moved to destructor.
3466 (new_compile_instance): Moved to constructor.
3467 * compile/compile-c.h (compile_c_instance): Make class inheriting
3468 from compile_instance.
3469 <base>: Remove field.
3470 <type_map, symbol_err_map>: Move to base class.
3471 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3472 * compile/compile-internal.h (compile_instance): Make class.
3473 <type_map_t, symbol_err_map_t>: Define.
3474 <fe>: Rename to `m_gcc_fe'.
3475 <scope, block, gcc_target_options>: Add `m_' prefix.
3476 <m_type_map, m_symbol_err_map>: New fields, moved from
3477 compile_c_instance.
3478 <destroy>: Remove.
3479 (convert_type, new_compile_instance): Remove.
3480 * compile/compile.c (cleanup_compile_instance): Remove.
3481 (compile_to_object): Use unique_ptr to eliminate cleanups.
3482 (compile_instance::set_print_callback, compile_instance::version)
3483 (compile_instance::set_verbose)
3484 (compile_instance::set_driver_filename)
3485 (compile_instance::set_triplet_regexp)
3486 (compile_instance::set_arguments)
3487 (compile_instance::set_source_file)
3488 (compile_instance::compile): Define.
3489
3490 2018-08-10 Keith Seitz <keiths@redhat.com>
3491
3492 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3493 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3494 gcc-c-fe.def to define C plugin.
3495 (delete_instance): Delete `c_plugin'.
3496 (new_compile_instance): Initialize `c_plugin'.
3497 * compile/compile-c.h: Include gcc_c_plugin.h.
3498 (struct compile_c_instance) <c_plugin>: New member.
3499 * gcc-c-plugin.h: New file.
3500 Update all callers with API change.
3501
3502 2018-08-10 Keith Seitz <keiths@redhat.com>
3503
3504 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3505 (HFILES_NO_SRCDIR): ... to here.
3506 Add compile-internal.h and compile-c.h.
3507 * compile/compile-c-support.c: Include compile-c.h.
3508 * compile/compile-c-symbols.c: Include compile-c.h.
3509 (generate_c_for_variable_locations): Update comment.
3510 * compile/compile-c-types.c: Include compile-c.h.
3511 * compile/compile-c.h: New file -- moved C language declarations
3512 from other files here.
3513 * compile/compile-internal.h: Do not include hashtab.h or
3514 common/enum-flags.h.
3515 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3516 (gcc_convert_symbol, gcc_symbol_address)
3517 (generate_c_for_variable_locations, c_get_mode_for_size)
3518 (c_get_range_decl_name): Definitions moved to compile-c.h.
3519 * compile/compile-loc2c.c: Include compile-c.h.
3520
3521 2018-08-10 Keith Seitz <keiths@redhat.com>
3522
3523 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3524 (c_symbol_substitution_name): ... this.
3525 Update all callers.
3526
3527 2018-08-10 Keith Seitz <keiths@redhat.com>
3528
3529 * compile/compile-c-support.c (c_compute_program): Use
3530 unique_xmalloc_ptr to eliminate cleanup.
3531 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3532 Return a unique_xmalloc_ptr and eliminate cleanup.
3533 * compile/compile-internal.h (generate_c_for_variable_locations):
3534 Return unique_xmalloc_ptr and update description.
3535
3536 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3537
3538 * corelow.c (core_target::get_core_register_section): Rename
3539 min_size to section_min_size.
3540
3541 2018-08-09 Jim Wilson <jimw@sifive.com>
3542
3543 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3544 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3545 * NEWS: Mention new GNU/Linux RISC-V target.
3546 * configure.host: Add riscv*-*-linux*.
3547 * configure.nat: Add riscv*.
3548 * configure.tgt: Add riscv*-*-linux*.
3549 * riscv-linux-nat.c: New file.
3550 * riscv-linux-tdep.c: New file.
3551
3552 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3553
3554 * infrun.c (resume): Make static, add forward declaration.
3555 (proceed): Update header comment.
3556 * infrun.h (resume): Delete declaration.
3557
3558 2018-08-09 Tom Tromey <tom@tromey.com>
3559
3560 * riscv-tdep.h: Minor formatting fixes.
3561
3562 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3563
3564 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3565 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3566 (test_mkdir_recursive): Likewise.
3567 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3568
3569 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3570
3571 * valarith.c (value_subscripted_rvalue): If an array is not in
3572 memory, and we don't know the upper bound, then we can't know that
3573 the requested element exists or not.
3574
3575 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3576
3577 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3578 (target_options_to_string): Add comment.
3579
3580 2018-08-08 Tom Tromey <tom@tromey.com>
3581
3582 * unittests/scoped_mmap-selftests.c: Check result of "write".
3583
3584 2018-08-08 Jim Wilson <jimw@sifive.com>
3585
3586 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3587 (decode_register_index_short): New.
3588 (decode_j_type_insn, decode_cj_type_insn): New.
3589 (decode_b_type_insn, decode_cb_type_insn): New.
3590 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3591 local xlen. Check xlen when decoding ambiguous compressed insns. In
3592 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3593 is_c_sw_insn instead of is_sw_insn.
3594 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3595 (riscv_software_single_step): New.
3596 * riscv-tdep.h (riscv_software_single_step): Declare.
3597
3598 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3599 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3600
3601 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3602
3603 PR gdb/18050:
3604 * target.c (dispose_inferior): Don't dispose of inferiors that are
3605 already killed.
3606
3607 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3608
3609 * remote.c (remote_target::download_tracepoint): Change char* to
3610 const char*.
3611
3612 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3613
3614 * target.h (target_options_to_string): Return an std::string.
3615 * target.c (str_comma_list_concat_elem): Return void, use
3616 std::string.
3617 (do_option): Likewise.
3618 (target_options_to_string): Return an std::string.
3619 * linux-nat.c (linux_nat_target::wait): Adjust.
3620 * target-debug.h (target_debug_print_options): Adjust.
3621
3622 2018-08-07 Tom Tromey <tom@tromey.com>
3623
3624 * Makefile.in (CPPFLAGS): New variable.
3625 (INTERNAL_CPPFLAGS): Use it.
3626
3627 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3628
3629 * NEWS: Mention the index cache.
3630
3631 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3632
3633 * common/pathstuff.h (get_standard_cache_dir): New.
3634 * common/pathstuff.c (get_standard_cache_dir): New.
3635 * build-id.h (build_id_to_string): New.
3636 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3637 DEBUG_STR_SUFFIX): Move to here.
3638 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3639 DEBUG_STR_SUFFIX): Move from there.
3640 (write_psymtabs_to_index): Make non-static, add basename
3641 parameter. Write to temporary files, rename when done.
3642 (save_gdb_index_command): Adjust call to
3643 write_psymtabs_to_index.
3644 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3645 field.
3646 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3647 (get_gdb_index_contents_from_cache): New.
3648 (get_gdb_index_contents_from_cache_dwz): New.
3649 (dwarf2_initialize_objfile): Read index from cache.
3650 (dwarf2_build_psymtabs): Save to index.
3651 * dwarf-index-cache.h: New file.
3652 * dwarf-index-cache.c: New file.
3653 * dwarf-index-write.h: New file.
3654
3655 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3656
3657 * gnulib/aclocal.m4: Re-generate.
3658 * gnulib/config.in: Re-generate.
3659 * gnulib/configure: Re-generate.
3660 * gnulib/import/Makefile.am: Re-generate.
3661 * gnulib/import/Makefile.in: Re-generate.
3662 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3663 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3664 * gnulib/import/m4/mkdir.m4: New file.
3665 * gnulib/import/mkdir.c: New file.
3666 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3667 module.
3668
3669 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3670
3671 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3672 * common/scoped_mmap.c: New file.
3673 * common/scoped_mmap.h (destroy): New method.
3674 (~scoped_mmap, reset): Use destroy.
3675 (scoped_mmap): New move constructor.
3676 (mmap_file): New declaration.
3677 * unittests/scoped_mmap-selftests.c (test_normal,
3678 test_invalid_filename, run_tests): New functions.
3679 (_initialize_scoped_mmap_selftests): Register selftest.
3680
3681 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3682
3683 * dwarf2read.c (read_gdb_index_from_section): Rename to...
3684 (read_gdb_index_from_buffer): ... this. Remove section
3685 parameter, add buffer parameter.
3686 (get_gdb_index_contents_ftype,
3687 get_gdb_index_contents_dwz_ftype): New typedefs.
3688 (dwarf2_read_gdb_index): Add callback parameters to get the
3689 index contents.
3690 (get_gdb_index_contents_from_section): New.
3691 (dwarf2_initialize_objfile): Update call to
3692 dwarf2_read_gdb_index.
3693
3694 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3695
3696 * common/filestuff.h (gdb_fopen_cloexec): New overload.
3697 (gdb_open_cloexec): Likewise.
3698 * nat/linux-osdata.c (command_from_pid): Use string_printf.
3699 (commandline_from_pid): Likewise.
3700 (linux_xfer_osdata_threads): Likewise.
3701 (linux_xfer_osdata_fds): Likewise.
3702 * ada-lang.c (is_package_name): Likewise.
3703 * auxv.c (procfs_xfer_auxv): Likewise.
3704 * breakpoint.c (print_one_breakpoint_location): Use
3705 uiout::field_fmt.
3706 (print_one_catch_solib): Use string_printf.
3707 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3708 (add_pe_forwarded_sym): Likewise.
3709 * dwarf2read.c (create_type_unit_group): Likewise.
3710 (build_error_marker_type): Likewise.
3711 * infcall.c (get_function_name): Likewise.
3712 * valprint.c (print_converted_chars_to_obstack): Likewise.
3713 * xtensa-tdep.c (xtensa_register_type): Likewise.
3714
3715 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3716
3717 * remote.c (remote_target::download_tracepoint): Fix format
3718 string errors.
3719
3720 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3721
3722 * tracefile.c: Include common/byte-vector.h.
3723 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3724 with trace_regblock_size if needed. Update uses of buf.
3725
3726 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3727
3728 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3729 std::vector<unsigned char>.
3730 * tracepoint.c (collection_list::collection_list): Remove
3731 m_regs_mask initializer from initializer list. Resize
3732 m_regs_mask using the largest remote register number.
3733 (collection_list::add_remote_register): Remove size check on
3734 m_regs_mask. Use at to access element.
3735 (collection_list::stringify): Change type of temp_buf to
3736 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3737 stringify the register mask. Use pack_hex_byte for the register
3738 mask.
3739
3740 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3741
3742 * tracepoint.h (class collection_list) <add_register>: Remove.
3743 <add_remote_register, add_ax_registers, add_local_register>:
3744 Declare.
3745 <add_memrange>: Add scope parameter.
3746 * tracepoint.c (encode_actions_1): Likewise.
3747 (collection_list::add_register): Rename to ...
3748 (collection_list::add_remote_register): ... this. Update
3749 comment.
3750 (collection_list::add_ax_registers, add_local_register): New
3751 methods.
3752 (collection_list::add_memrange): Add scope parameter. Call
3753 add_local_register instead of add_register.
3754 (finalize_tracepoint_aexpr): New function.
3755 (collection_list::collect_symbol): Update calls to add_memrange.
3756 Call add_local_register instead of add_register. Call
3757 add_ax_registers. Call finalize_tracepoint_aexpr.
3758 (encode_actions_1): Get remote regnos for $reg action. Call
3759 add_remote_register, add_ax_registers, and add_local_register.
3760 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3761 (validate_actionline): Call finalize_tracepoint_aexpr.
3762
3763 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3764
3765 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3766 Replace array buf with gdb::char_vector buf, of size
3767 get_remote_packet_size (). Replace references to buf and
3768 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3769 and xsnprintf with snprintf. Raise errors if the buffer is too
3770 small.
3771
3772 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3773
3774 * remote.c (remote_target::download_tracepoint): Fix the has_more
3775 predicate in the QTDP action list iteration.
3776
3777 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3778
3779 * remote.c (remote_target::download_tracepoint): Fix indentation
3780 in for block.
3781
3782 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3783
3784 * proc-api.c (_initialize_proc_api): Remove c, unused.
3785 * procfs.c (procfs_init_inferior): Remove signals, unused.
3786 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3787 unused.
3788
3789 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3790 Andrew Burgess <andrew.burgess@embecosm.com>
3791
3792 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3793 'W_STOPCODE (0)' as this could be ambiguous.
3794
3795 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3796
3797 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3798 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3799 "ai_socktype").
3800
3801 2018-08-02 Tom Tromey <tom@tromey.com>
3802
3803 PR symtab/16842.
3804 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3805 symbols.
3806 (process_structure_scope): Likewise.
3807
3808 2018-08-02 Xavier Roirand <roirand@adacore.com>
3809
3810 PR gdb/22629:
3811 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3812 kill inferior.
3813
3814 2018-08-02 Tom Tromey <tom@tromey.com>
3815
3816 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3817 (darwin_suspend_inferior, darwin_resume_inferior)
3818 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3819 (darwin_check_new_threads): Check result of get_darwin_inferior.
3820
3821 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3822
3823 GDB 8.1.1 released.
3824
3825 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3826
3827 * varobj.c (varobj_get_path_expr_parent): Report an error if
3828 parent is a dynamic varobj.
3829
3830 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3831
3832 * gnulib/aclocal.m4: Re-generate.
3833 * gnulib/config.in: Re-generate.
3834 * gnulib/configure: Re-generate.
3835 * gnulib/import/Makefile.in: Re-generate.
3836 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3837 * gnulib/import/m4/onceonly.m4: Re-generate.
3838
3839 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3840
3841 * target-descriptions.c (struct xml_test_tdesc): New.
3842 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3843 (record_xml_tdesc): Update.
3844 (maintenance_check_xml_descriptions): Update.
3845 * target-descriptions.h (record_xml_tdesc): Update comment.
3846
3847 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3848
3849 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3850 checking array bounds are defined.
3851
3852 2018-07-30 Tom Tromey <tom@tromey.com>
3853
3854 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3855 irreflexivity violation.
3856
3857 2018-07-30 Tom Tromey <tom@tromey.com>
3858
3859 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3860 * value.c (unpack_long): Remove lint code.
3861 * valops.c (value_ind): Remove lint code.
3862 * valarith.c (value_x_binop, value_x_unop, value_equal)
3863 (value_pos): Remove lint code.
3864
3865 2018-07-28 Tom de Vries <tdevries@suse.de>
3866
3867 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3868 with undefined upper bound as <optimized out>.
3869
3870 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3871
3872 * gcore.in: Rename variable "name" to "prefix". Expand
3873 "usage" text.
3874
3875 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3876
3877 * windows-nat.c (windows_nat_target::create_inferior): Update to
3878 call close() in global namespace.
3879
3880 2018-07-26 Tom Tromey <tom@tromey.com>
3881
3882 * dwarf-index-write.c (add_address_entry): Don't add objfile
3883 offsets.
3884 * dbxread.c (find_stab_function): Rename from
3885 find_stab_function_addr. Return a bound_minimal_symbol.
3886 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3887 Don't add objfile offsets.
3888 (end_psymtab): Use raw_text_low, raw_text_high,
3889 MSYMBOL_VALUE_RAW_ADDRESS.
3890 (read_ofile_symtab): Update.
3891 (process_one_symbol): Update.
3892 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3893 offsets.
3894 (dw2_relocate): Remove.
3895 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3896 searching addrmap.
3897 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3898 Update.
3899 (process_psymtab_comp_unit_reader, add_partial_symbol)
3900 (add_partial_subprogram, dwarf2_ranges_read): Update.
3901 (load_partial_dies): Update.
3902 (add_address_entry): Don't add objfile offsets.
3903 (dwarf2_build_include_psymtabs): Update.
3904 (create_addrmap_from_aranges): Don't add objfile offsets.
3905 (dw2_find_pc_sect_compunit_symtab): Update.
3906 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3907 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3908 Update.
3909 (parse_partial_symbols): Don't add objfile offsets. Use
3910 raw_text_low, raw_text_high. Update.
3911 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3912 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3913 or call 'relocate' quick function. Clear psymbol_map.
3914 * psympriv.h (struct partial_symbol) <address>: Add section
3915 offset.
3916 <set_unrelocated_address>: Rename from set_address.
3917 <raw_text_low, raw_text_high>: New methods.
3918 <text_low, text_high>: Add objfile parameter.
3919 (add_psymbol_to_bcache): Add 'section' parameter. Call
3920 set_unrelocated_address.
3921 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3922 (find_pc_psymbol): Update.
3923 (fixup_psymbol_section, relocate_psymtabs): Remove.
3924 (dump_psymtab, psym_functions): Update.
3925 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3926 parameter.
3927 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3928 (start_psymtab_common): Update.
3929 * symfile-debug.c (debug_qf_relocate): Remove.
3930 (debug_sym_quick_functions): Update.
3931 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3932 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3933 Update.
3934
3935 2018-07-26 Tom Tromey <tromey@redhat.com>
3936
3937 * dbxread.c (end_psymtab): Use text_high_valid and
3938 text_low_valid.
3939 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3940 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3941 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3942 Update comment.
3943 <text_low_valid, text_high_valid>: New fields.
3944 <set_text_low, set_text_high>: Update.
3945 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3946
3947 2018-07-26 Tom Tromey <tom@tromey.com>
3948
3949 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3950 Update.
3951 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3952 textlow and texthigh fields.
3953 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3954 Update.
3955 * mdebugread.c (parse_lines, parse_partial_symbols)
3956 (psymtab_to_symtab_1): Update.
3957 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3958 Rename fields. Update comment. Now private.
3959 <text_low, text_high, set_text_low, set_text_high>: New methods.
3960 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3961 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3962 (start_psymtab_common, maintenance_info_psymtabs)
3963 (maintenance_check_psymtabs): Update.
3964 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3965 texthigh fields.
3966 (scan_xcoff_symtab): Update.
3967
3968 2018-07-26 Tom Tromey <tromey@redhat.com>
3969
3970 * psympriv.h (struct partial_symbol) <unrelocated_address,
3971 address, set_address>: New methods.
3972 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3973 (fixup_psymbol_section, relocate_psymtabs): Update.
3974 (print_partial_symbols): Add 'objfile' parameter. Update.
3975 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3976 Update.
3977
3978 2018-07-26 Tom Tromey <tom@tromey.com>
3979
3980 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3981 (debug_names::write_psymbols): Update.
3982 * psympriv.h (struct partial_symbol): Derive from
3983 general_symbol_info.
3984 <obj_section>: New method.
3985 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3986 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3987 (find_pc_sect_psymbol, fixup_psymbol_section)
3988 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3989 (print_partial_symbols, recursively_search_psymtabs)
3990 (compare_psymbols, psymbol_hash, psymbol_compare)
3991 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3992 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3993
3994 2018-07-26 Tom Tromey <tromey@redhat.com>
3995
3996 * dbxread.c (end_psymtab): Remove dead code.
3997
3998 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3999
4000 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4001 DWARF unwinders are disabled.
4002 * dwarf2-frame.c: Add dwarf2read.h include.
4003 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4004 disabled.
4005 (dwarf2_frame_unwinders_enabled_p): Define.
4006 (show_dwarf_unwinders_enabled_p): New function.
4007 (_initialize_dwarf2_frame): Register switch to control DWARF
4008 unwinder use.
4009 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4010 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4011 (show_dwarf_cmdlist): Remove static keyword.
4012 * dwarf2read.h (set_dwarf_cmdlist): Declare.
4013 (show_dwarf_cmdlist): Declare.
4014 * NEWS: Document new feature.
4015
4016 2018-07-26 Tom de Vries <tdevries@suse.de>
4017
4018 PR breakpoints/23366
4019 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4020
4021 2018-07-26 Tom de Vries <tdevries@suse.de>
4022
4023 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4024 DW_AT_count can't be translated to a dynamic prop.
4025
4026 2018-07-25 Tom de Vries <tdevries@suse.de>
4027
4028 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4029 try/catch.
4030
4031 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
4032
4033 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4034
4035 2018-07-25 Joel Brobecker <brobecker@adacore.com>
4036
4037 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4038
4039 2018-07-24 Keith Seitz <keiths@redhat.comt
4040
4041 PR symtab/23010
4042 * dwarf2read.c (dw2_add_symbol_to_list): New function.
4043 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4044 instead of add_symbol_to_list.
4045 (read_file_scope): Call prepare_one_comp_unit before reading
4046 any other DIEs.
4047
4048 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
4049
4050 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4051
4052 2018-07-24 Tom Tromey <tom@tromey.com>
4053
4054 * utils.c (malloc, realloc, free): Don't declare.
4055 * configure, config.in: Rebuild.
4056 * configure.ac: Don't check for declarations of free, malloc, or
4057 realloc.
4058
4059 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4060
4061 * aarch64-linux-nat.c
4062 (aarch64_linux_nat_target::stopped_data_address): Remove unused
4063 variable.
4064 * arm-linux-nat.c (fetch_regs): Likewise.
4065 (store_regs): Likewise.
4066 (fetch_vfp_regs): Likewise.
4067 (store_vfp_regs): Likewise.
4068 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4069 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4070 (arm_linux_nat_target::insert_watchpoint): Likewise.
4071 (arm_linux_nat_target::remove_watchpoint): Likewise.
4072 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4073 Likewise.
4074 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4075 Likewise.
4076 * ppc-linux-nat.c (fetch_register): Likewise.
4077 (fetch_all_gp_regs): Likewise.
4078 (fetch_ppc_registers): Likewise.
4079 (store_all_gp_regs): Likewise.
4080 (store_ppc_registers): Likewise.
4081 (hwdebug_insert_point): Likewise.
4082 (can_use_watchpoint_cond_accel): Likewise.
4083 * remote-sim.c (gdb_os_write_stdout): Likewise.
4084
4085 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4086 Tom Tromey <tom@tromey.com>
4087
4088 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4089 test for it.
4090 * configure: Rebuild.
4091
4092 2018-07-22 Tom Tromey <tom@tromey.com>
4093
4094 * regformats/regdat.sh: Define xmltarget_${name} inside
4095 #ifndef IN_PROCESS_AGENT.
4096
4097 2018-07-22 Tom Tromey <tom@tromey.com>
4098
4099 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4100
4101 2018-07-22 Tom Tromey <tom@tromey.com>
4102
4103 * symfile.c (reread_symbols): Notify iter, not objfile.
4104
4105 2018-07-22 Tom Tromey <tom@tromey.com>
4106
4107 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4108 Use arch_ops.
4109 (ravenscar_thread_target::prepare_to_store): Likewise.
4110
4111 2018-07-22 Tom Tromey <tom@tromey.com>
4112
4113 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4114 unused variable. Call value_fetch_lazy when needed.
4115 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4116 Remove unused variable. Call value_fetch_lazy when needed.
4117
4118 2018-07-22 Tom Tromey <tom@tromey.com>
4119
4120 * m32c-tdep.c (mark_dma): Return void.
4121 (make_regs): Remove unused declarations.
4122
4123 2018-07-22 Tom Tromey <tom@tromey.com>
4124
4125 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4126 cmdscm_get_valid_command_smob_arg_unsafe for effect.
4127 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4128 bkscm_get_valid_block_smob_arg_unsafe for effect.
4129
4130 2018-07-22 Tom Tromey <tom@tromey.com>
4131
4132 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4133 value_type.
4134
4135 2018-07-22 Tom Tromey <tom@tromey.com>
4136
4137 * windows-nat.c (saved_context): Conditionally define.
4138 * remote.c (remote_target::remote_btrace_maybe_reopen):
4139 Conditionally declare "warned".
4140 * inflow.c (sigquit_ours): Conditionally define.
4141 (new_tty): Move "tty" declaration inside #if.
4142 * guile/guile.c (guile_datadir): Conditionally define.
4143 * charset.c (set_be_le_names): Move some declarations inside #if.
4144 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4145 #if.
4146 (parse_xml_btrace_conf): Likewise.
4147
4148 2018-07-22 Tom Tromey <tom@tromey.com>
4149
4150 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4151
4152 2018-07-22 Tom Tromey <tom@tromey.com>
4153
4154 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4155 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4156 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4157 * buildsym-legacy.c (get_macro_table): Remove unused variable.
4158 * stack.c (frame_apply_level_command): Remove unused variable.
4159 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4160 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4161 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4162 unused variable.
4163 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4164 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4165 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4166 variable.
4167 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4168 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4169 variable.
4170 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4171 Remove unused variable.
4172 * cli/cli-script.c (recurse_read_control_structure): Remove unused
4173 variable.
4174 * common/tdesc.c (print_xml_feature::visit): Remove unused
4175 variable.
4176 * compile/compile-object-load.c (store_regs): Remove unused
4177 variables.
4178 * complaints.c (clear_complaints): Remove unused variable.
4179 * corelow.c (core_target_open): Remove unused variable.
4180 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4181 variable.
4182 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4183 variable.
4184 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4185 variable.
4186 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4187 variable.
4188 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4189 variable.
4190 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4191 variable.
4192 * ia64-tdep.c (examine_prologue): Remove unused variable.
4193 * infcall.c (run_inferior_call): Remove unused variable.
4194 * inferior.c (exit_inferior): Remove unused variable.
4195 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4196 * linespec.c (decode_line_2): Remove unused variable.
4197 * linux-nat.c (super_close): Remove.
4198 * linux-tdep.c (linux_info_proc): Remove unused variable.
4199 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4200 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4201 Remove unused variable.
4202 * parse.c (find_minsym_type_and_address): Remove unused variable.
4203 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4204 variable.
4205 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4206 variable.
4207 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4208 variables.
4209 * record-btrace.c (record_btrace_target::store_registers): Remove
4210 unused variable.
4211 (cmd_show_record_btrace_cpu): Remove unused variable.
4212 * riscv-tdep.c (riscv_register_reggroup_p)
4213 (riscv_push_dummy_call, riscv_return_value): Remove unused
4214 variable.
4215 * rust-exp.y (literal): Remove unused variable.
4216 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4217 unused variable.
4218 <STRUCTOP_ANONYMOUS>: Likewise.
4219 * s390-linux-tdep.c (s390_linux_init_abi_31)
4220 (s390_linux_init_abi_64): Remove unused variable.
4221 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4222 (file_select_thread, net_windows_open, _initialize_ser_windows):
4223 Remove unused variables.
4224 * symtab.c (find_pc_sect_line): Remove unused variable.
4225 * target-memory.c (compute_garbled_blocks): Remove unused
4226 variable.
4227 (target_write_memory_blocks): Remove unused variable.
4228 * target.c (target_stack::unpush): Remove unused variables.
4229 * tracepoint.c (start_tracing, all_tracepoint_actions)
4230 (merge_uploaded_trace_state_variables)
4231 (print_one_static_tracepoint_marker): Remove unused variable.
4232 * unittests/basic_string_view/element_access/char/1.cc (test01):
4233 Remove unused variable.
4234 * windows-nat.c (windows_continue, windows_add_all_dlls)
4235 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4236 Remove unused variables.
4237
4238 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4239
4240 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4241 attr_profile in HAVE_ELF.
4242 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4243 HAVE_ELF.
4244
4245 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4246
4247 * frame.c (frame_register_unwind): Change parameter name.
4248 (frame_unwind_register): Likewise.
4249 (frame_unwind_register_value): Likewise.
4250 (frame_unwind_register_signed): Likewise.
4251 (frame_unwind_register_unsigned): Likewise.
4252 * frame.h (frame_register_unwind): Likewise.
4253 (frame_unwind_register): Likewise.
4254 (frame_unwind_register_value): Likewise.
4255 (frame_unwind_register_signed): Likewise.
4256 (frame_unwind_register_unsigned): Likewise.
4257 (frame_unwind_arch): Likewise.
4258
4259 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4260
4261 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4262 ISA maintenance.
4263
4264 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4265
4266 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4267 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4268 hand.
4269
4270 2018-07-20 Keith Seitz <keiths@redhat.com>
4271
4272 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4273 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4274 m_compunit_symtab, m_language>: Add "m_" prefix.
4275 Update all uses.
4276 * buildsym.c: Update all uses.
4277
4278 2018-07-20 Tom Tromey <tom@tromey.com>
4279
4280 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4281 * buildsym.h (record_line_ftype): Remove typedef.
4282
4283 2018-07-20 Tom Tromey <tom@tromey.com>
4284
4285 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4286 (end_expandable_symtab): Likewise.
4287 (end_symtab_get_static_block): Likewise.
4288 (end_symtab_from_static_block): Likewise.
4289 * buildsym-legacy.c (augment_type_symtab): Remove.
4290 (end_expandable_symtab): Remove.
4291 (end_symtab_get_static_block): Remove.
4292 (end_symtab_from_static_block): Remove.
4293
4294 2018-07-20 Tom Tromey <tom@tromey.com>
4295
4296 * dwarf2read.c: Include buildsym.h.
4297 (struct dwarf2_cu) <builder>: New method.
4298 (fixup_go_packaging): Update.
4299 (process_full_comp_unit, process_full_type_unit): Update. Don't
4300 use scoped_free_pendings.
4301 (using_directives): Add "cu" parameter, remove "language".
4302 (read_import_statement, setup_type_unit_groups, )
4303 (read_func_scope, read_lexical_block_scope)
4304 (dwarf2_record_block_ranges, read_namespace): Update.
4305 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4306 (lnp_state_machine::handle_end_sequence): Update.
4307 (class lnp_state_machine) <m_cu>: New member.
4308 <m_record_line_callback>: Remove.
4309 <m_currently_recording_lines>: New member.
4310 (lnp_state_machine::handle_set_file): Update.
4311 (noop_record_line): Remove.
4312 (dwarf_record_line_p): Add cu parameter.
4313 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4314 (lnp_state_machine::record_line)
4315 (lnp_state_machine::lnp_state_machine)
4316 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4317 (dwarf_decode_lines): Update.
4318 (dwarf2_start_subfile): Add cu parameter.
4319 (dwarf2_start_symtab, new_symbol): Update.
4320 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4321 Remove dwarf2_per_objfile parameter.
4322 (dwarf_decode_macros): Update.
4323
4324 2018-07-20 Tom Tromey <tom@tromey.com>
4325
4326 * stabsread.c (define_symbol): Update.
4327 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4328 * dwarf2read.c (new_symbol): Update.
4329 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4330 * cp-namespace.c: Include buildsym.h.
4331 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4332 * buildsym-legacy.c (get_buildsym_compunit): New function.
4333
4334 2018-07-20 Tom Tromey <tom@tromey.com>
4335
4336 * xcoffread.c: Include buildsym-legacy.h.
4337 * windows-nat.c: Include buildsym-legacy.h.
4338 * stabsread.c: Include buildsym-legacy.h.
4339 * mdebugread.c: Include buildsym-legacy.h.
4340 * buildsym-legacy.h: New file.
4341 * buildsym-legacy.c: New file, from buildsym.c.
4342 * go32-nat.c: Include buildsym-legacy.h.
4343 * dwarf2read.c: Include buildsym-legacy.h.
4344 * dbxread.c: Include buildsym-legacy.h.
4345 * cp-namespace.c: Include buildsym-legacy.h.
4346 * coffread.c: Include buildsym-legacy.h.
4347 * buildsym.h: Move some contents to buildsym-legacy.h.
4348 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4349 buildsym-legacy.c.
4350 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4351
4352 2018-07-20 Tom Tromey <tom@tromey.com>
4353
4354 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4355 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4356 (buildsym_compunit::buildsym_compunit)
4357 (buildsym_compunit::~buildsym_compunit)
4358 (buildsym_compunit::get_macro_table): Define.
4359
4360 2018-07-20 Tom Tromey <tom@tromey.com>
4361
4362 * buildsym.c (reset_symtab_globals): Remove.
4363 (buildsym_compunit::end_symtab_from_static_block): Update.
4364 (buildsym_compunit::augment_type_symtab): Update.
4365 (end_symtab_from_static_block): Call free_buildsym_compunit.
4366 (augment_type_symtab, end_symtab, end_expandable_symtab):
4367 Likewise.
4368
4369 2018-07-20 Tom Tromey <tom@tromey.com>
4370
4371 * arch-utils.c: Do not include buildsym.h.
4372 * mipsread.c: Do not include buildsym.h.
4373 * machoread.c: Do not include buildsym.h.
4374 * elfread.c: Do not include buildsym.h.
4375
4376 2018-07-20 Tom Tromey <tom@tromey.com>
4377
4378 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4379 initialization.
4380 (buildsym_compunit): Add new constructor.
4381 (struct buildsym_compunit) <get_last_source_file, finish_block,
4382 record_block_range, start_subfile, patch_subfile_names,
4383 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4384 set_last_source_start_addr, get_last_source_start_addr,
4385 get_local_using_directives, set_local_using_directives,
4386 get_global_using_directives, outermost_context_p,
4387 get_current_context_stack, get_context_stack_depth,
4388 get_current_subfile, get_local_symbols, get_file_symbols,
4389 get_global_symbols, record_debugformat, record_producer,
4390 push_context, pop_context, end_symtab_get_static_block,
4391 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4392 New public methods.
4393 <record_pending_block, finish_block_internal, make_blockvector,
4394 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4395 private methods.
4396 Update all users.
4397
4398 2018-05-22 Tom Tromey <tom@tromey.com>
4399
4400 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4401 parameter.
4402 (finish_block_internal): Update.
4403
4404 2018-07-20 Tom Tromey <tom@tromey.com>
4405
4406 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4407 parameter.
4408 (finish_block_internal): Update.
4409
4410 2018-07-20 Tom Tromey <tom@tromey.com>
4411
4412 * buildsym.h (EXTERN): Don't define or undef.
4413 * buildsym.c (EXTERN): Don't define.
4414
4415 2018-07-20 Tom Tromey <tom@tromey.com>
4416
4417 * buildsym.c: Remove TODO comment.
4418
4419 2018-07-20 Tom Tromey <tom@tromey.com>
4420
4421 * coffread.c (coff_symtab_read): Update.
4422 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4423 (xcoff_new_init): Update.
4424 * mipsread.c (mipscoff_new_init): Update.
4425 * mdebugread.c (mdebug_build_psymtabs): Update.
4426 * elfread.c (elf_new_init): Update.
4427 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4428 Update.
4429 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4430 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4431 (stabsect_build_psymtabs): Update.
4432 * buildsym.h (buildsym_init): Don't declare.
4433 * buildsym.c: Update comment.
4434 (prepare_for_building): Remove.
4435 (start_symtab, restart_symtab): Update.
4436 (reset_symtab_globals): Update comment.
4437 (buildsym_init): Remove.
4438
4439 2018-07-20 Tom Tromey <tom@tromey.com>
4440
4441 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4442 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4443 (read_enum_type, common_block_start, common_block_end)
4444 (cleanup_undefined_types_1, finish_global_stabs): Update.
4445 * mdebugread.c (psymtab_to_symtab_1): Update.
4446 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4447 (read_lexical_block_scope, new_symbol): Update.
4448 * dbxread.c (process_one_symbol): Update.
4449 * coffread.c (coff_symtab_read, process_coff_symbol)
4450 (coff_read_enum_type): Update.
4451 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4452 declare.
4453 (get_local_symbols, get_file_symbols, get_global_symbols): New
4454 functions.
4455 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4456 m_global_symbols.
4457 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4458 (~scoped_free_pendings): Update.
4459 (finish_block, prepare_for_building, reset_symtab_globals)
4460 (end_symtab_get_static_block, end_symtab_with_blockvector)
4461 (augment_type_symtab, push_context): Update.
4462 (get_local_symbols, get_file_symbols, get_global_symbols): New
4463 functions.
4464 (buildsym_init): Update.
4465
4466 2018-07-20 Tom Tromey <tom@tromey.com>
4467
4468 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4469 (process_full_type_unit): Likewise.
4470 (dwarf2_start_symtab): Set list_in_scope.
4471
4472 2018-07-20 Tom Tromey <tom@tromey.com>
4473
4474 * dwarf2read.c (process_psymtab_comp_unit_reader)
4475 (build_type_psymtabs_reader): Do not set list_in_scope.
4476
4477 2018-07-20 Tom Tromey <tom@tromey.com>
4478
4479 * buildsym.c (free_pendings): Remove.
4480 (add_symbol_to_list, scoped_free_pendings)
4481 (finish_block_internal, buildsym_init): Update.
4482
4483 2018-07-20 Tom Tromey <tom@tromey.com>
4484
4485 * xcoffread.c (read_xcoff_symtab): Update.
4486 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4487 Update.
4488 * dbxread.c (process_one_symbol): Update.
4489 * coffread.c (coff_symtab_read): Update.
4490 * buildsym.h (finish_block): Update.
4491 * buildsym.c (finish_block): Remove "listhead" argument.
4492 (end_symtab_get_static_block): Update.
4493
4494 2018-07-20 Tom Tromey <tom@tromey.com>
4495
4496 * buildsym.h (class scoped_free_pendings): Remove constructor.
4497 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4498 method.
4499 <m_pending_block_obstack, m_pending_blocks>: New members.
4500 (pending_block_obstack, pending_blocks): Remove.
4501 (scoped_free_pendings::scoped_free_pendings): Default.
4502 (~scoped_free_pendings): Update.
4503 (free_pending_blocks): Remove.
4504 (finish_block_internal, record_pending_block, make_blockvector)
4505 (end_symtab_get_static_block, augment_type_symtab, push_context)
4506 (buildsym_init): Update.
4507
4508 2018-07-20 Tom Tromey <tom@tromey.com>
4509
4510 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4511 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4512 members.
4513 (pending_addrmap, pending_addrmap_obstack)
4514 (pending_addrmap_interesting): Remove.
4515 (scoped_free_pendings, record_block_range, make_blockvector)
4516 (prepare_for_building, reset_symtab_globals, buildsym_init):
4517 Update.
4518
4519 2018-07-20 Tom Tromey <tom@tromey.com>
4520
4521 * xcoffread.c (process_linenos): Update.
4522 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4523 * mdebugread.c (psymtab_to_symtab_1): Update.
4524 * dwarf2read.c (setup_type_unit_groups)
4525 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4526 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4527 * dbxread.c (process_one_symbol): Update.
4528 * coffread.c (coff_symtab_read, enter_linenos)
4529 (process_coff_symbol): Update.
4530 * buildsym.h (current_subfile): Don't declare.
4531 (get_current_subfile): Declare.
4532 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4533 member.
4534 (start_subfile, free_buildsym_compunit, push_subfile)
4535 (prepare_for_building, start_symtab): Update.
4536 (get_current_subfile): New function.
4537
4538 2018-07-20 Tom Tromey <tom@tromey.com>
4539
4540 * coffread.c (coff_symtab_read): Update.
4541 * xcoffread.c (read_xcoff_symtab): Update.
4542 * dwarf2read.c (new_symbol): Update.
4543 (read_func_scope, read_lexical_block_scope): Update.
4544 * dbxread.c (process_one_symbol): Update.
4545 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4546 (outermost_context_p): Remove macro.
4547 (outermost_context_p, get_current_context_stack)
4548 (get_context_stack_depth): Declare.
4549 (pop_context): Return struct context_stack.
4550 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4551 member.
4552 (context_stack_size): Remove.
4553 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4554 (prepare_for_building, end_symtab_get_static_block)
4555 (augment_type_symtab, push_context): Update.
4556 (pop_context): Return struct context_stack.
4557 (outermost_context_p, get_current_context_stack)
4558 (get_context_stack_depth): New functions.
4559 (buildsym_init): Update.
4560
4561 2018-07-20 Tom Tromey <tom@tromey.com>
4562
4563 * rust-exp.y: Now a pure parser. Update all rules.
4564 (%union): Move earlier.
4565 (current_parser, work_obstack): Remove globals.
4566 (rust_parser, ~rust_parser): Update.
4567 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4568 lex_character, lex_number, lex_string, lex_identifier,
4569 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4570 convert_name, convert_params_to_expression,
4571 convert_ast_to_expression, ast_basic_type, ast_operation,
4572 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4573 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4574 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4575 ast_array_type, ast_slice_type, ast_reference_type,
4576 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4577 (rust_parse): Update.
4578 (rustyyerror, rustyylex): Add parser parameter.
4579 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4580 (rust_lex_stringish_test, rust_lex_test_sequence)
4581 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4582 (rust_lex_test_push_back, rust_lex_tests): Update.
4583
4584 2018-07-19 Pedro Alves <palves@redhat.com>
4585
4586 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4587 gdb::unique_xmalloc_ptr.
4588 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4589 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4590 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4591 copy-initialization.
4592 * guile/scm-pretty-print.c (ppscm_print_children): Use
4593 gdb::unique_xmalloc_ptr instead of cleanups.
4594 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4595 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4596 gdb::unique_xmalloc_ptr.
4597 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4598 Adjust to use gdb::unique_xmalloc_ptr.
4599 * guile/scm-utils.c (extract_arg): Adjust.
4600 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4601 gdb::unique_xmalloc_ptr instead of a cleanup.
4602
4603 2018-07-19 Tom Tromey <tom@tromey.com>
4604
4605 * utils.c (do_value_free_to_mark)
4606 (make_cleanup_value_free_to_mark): Remove.
4607 * utils.h (make_cleanup_value_free_to_mark): Remove.
4608
4609 2018-07-19 Pedro Alves <palves@redhat.com>
4610
4611 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4612 forwarding reference.
4613
4614 2018-07-18 Pedro Alves <palves@redhat.com>
4615
4616 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4617 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4618 cleanup.
4619
4620 2018-07-18 Pedro Alves <palves@redhat.com>
4621
4622 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4623 exceptions.
4624 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4625 (gdbscm_wrap): New.
4626 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4627 directly instead of a cleanup.
4628 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4629 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
4630 (vlscm_binop_gdbthrow): New, factored out from ...
4631 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
4632 (vlscm_rich_compare): Use gdbscm_wrap.
4633 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4634 instead of a cleanup.
4635 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4636 cleanup.
4637 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4638 Use xfree directly instead of a cleanup.
4639 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4640 Adjust to use gdbscm_wrap and scoped_value_mark.
4641 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4642 (gdbscm_value_address, gdbscm_value_dereference)
4643 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4644 scoped_value_mark.
4645 (gdbscm_value_dynamic_type): Use scoped_value_mark.
4646 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4647 scoped_value_mark.
4648 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4649 gdbscm_wrap and scoped_value_mark.
4650 (gdbscm_value_to_string): Use xfree directly instead of a
4651 cleanup. Move 'buffer' unique_ptr to TRY scope.
4652 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4653 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
4654 scoped_value_mark.
4655 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4656 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4657 scoped_value_mark.
4658 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4659 gdbscm_wrap.
4660
4661 2018-07-18 Tom de Vries <tdevries@suse.de>
4662
4663 * findvar.c (default_read_var_value): Also resolve dynamic type for
4664 LOC_OPTIMIZED_OUT vars.
4665
4666 2018-07-18 Maciej W. Rozycki <macro@mips.com>
4667
4668 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4669 decoding.
4670
4671 2018-07-17 Tom Tromey <tom@tromey.com>
4672
4673 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4674 (compute_enum_list, pascm_set_param_value_x)
4675 (gdbscm_parameter_value): Update.
4676 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4677 (gdbscm_scm_to_host_string): Update.
4678 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4679 Update.
4680 * guile/scm-cmd.c (cmdscm_add_completion): Update.
4681 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4682 * guile/scm-string.c (gdbscm_scm_to_string): Return
4683 unique_xmalloc_ptr.
4684 (gdbscm_scm_to_host_string): Likewise.
4685
4686 2018-07-17 Tom Tromey <tom@tromey.com>
4687
4688 * guile/guile.c (gdbscm_eval_from_control_command): Update.
4689 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4690 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4691 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4692 unique_xmalloc_ptr.
4693
4694 2018-07-17 Tom Tromey <tom@tromey.com>
4695
4696 * guile/scm-param.c (pascm_signal_setshow_error): Update.
4697 * guile/guile-internal.h (gdbscm_exception_message_to_string):
4698 Update.
4699 * guile/scm-cmd.c (cmdscm_function): Update.
4700 * guile/scm-pretty-print.c
4701 (ppscm_print_exception_unless_memory_error): Update.
4702 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4703 Return unique_xmalloc_ptr.
4704
4705 2018-07-17 Tom Tromey <tom@tromey.com>
4706
4707 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4708 Use string_printf.
4709
4710 2018-07-17 Jim Wilson <jimw@sifive.com>
4711
4712 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4713 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4714 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4715 unecessary braces after EF_RISCV_RVC test. Delete call to
4716 set_gdbarch_decr_pc_after_break.
4717
4718 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4719 RISCV_LAST_FP_REGNUM + 1.
4720 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4721
4722 2018-07-17 Tom Tromey <tom@tromey.com>
4723
4724 * configure.ac: Remove --disable-gdbcli.
4725 * configure: Rebuild.
4726 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4727 (SUBDIR_CLI_CFLAGS): Remove.
4728 (SFILES): Use SUBDIR_CLI_SRCS.
4729 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4730
4731 2018-07-17 Tom Tromey <tom@tromey.com>
4732
4733 PR gdb/18624:
4734 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4735
4736 2018-07-16 Jim Wilson <jimw@sifive.com>
4737
4738 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4739
4740 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4741
4742 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4743 variable.
4744 (libunwind_frame_sniffer): Likewise.
4745 (libunwind_frame_prev_register): Likewise.
4746 (libunwind_sigtramp_frame_sniffer): Likewise.
4747 * ia64-tdep.c (ia64_access_reg): Likewise.
4748 (ia64_access_rse_reg): Likewise.
4749 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4750 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4751
4752 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4753
4754 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4755
4756 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4757
4758 * remote-sim.c (gdbsim_target::close,
4759 gdbsim_target::mourn_inferior): Remove unused variables.
4760
4761 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4762
4763 * ia64-tdep.c (ktab_buf): New global.
4764 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4765 (get_kernel_table): Adjust.
4766
4767 2018-07-16 Tom Tromey <tom@tromey.com>
4768
4769 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4770 * dwarf2read.c (using_directives, new_symbol): Use
4771 outermost_context_p.
4772 * dbxread.c (process_one_symbol): Use outermost_context_p.
4773 * coffread.c (coff_symtab_read): Use outermost_context_p.
4774
4775 2018-07-16 Tom Tromey <tom@tromey.com>
4776
4777 * dwarf2read.c (using_directives, read_func_scope)
4778 (read_lexical_block_scope): Update.
4779 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4780 * buildsym.h (local_using_directives, global_using_directives):
4781 Don't declare.
4782 (get_local_using_directives, set_local_using_directives)
4783 (get_global_using_directives): Declare.
4784 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4785 m_global_using_directives>: New members.
4786 (finish_block_internal, prepare_for_building)
4787 (reset_symtab_globals, end_symtab_get_static_block)
4788 (push_context): Update.
4789 (get_local_using_directives, set_local_using_directives)
4790 (get_global_using_directives): New functions.
4791 (buildsym_init): Update.
4792
4793 2018-07-16 Tom Tromey <tom@tromey.com>
4794
4795 * xcoffread.c (xcoff_initial_scan): Don't call
4796 free_pending_blocks.
4797 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4798 * buildsym.h (class scoped_free_pendings): Add constructor.
4799 (free_pending_blocks): Don't declare.
4800 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4801 (free_pending_blocks): Now static.
4802
4803 2018-07-16 Tom Tromey <tom@tromey.com>
4804
4805 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4806 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4807 member.
4808 (struct subfile_stack): Remove.
4809 (subfile_stack): Remove.
4810 (push_subfile, pop_subfile, buildsym_init): Update.
4811
4812 2018-07-16 Tom Tromey <tom@tromey.com>
4813
4814 * buildsym.c (push_subfile): Use gdb_assert.
4815 (pop_subfile): Use gdb_assert.
4816
4817 2018-07-16 Tom Tromey <tom@tromey.com>
4818
4819 * buildsym.h (merge_symbol_lists): Remove.
4820 * buildsym.c (merge_symbol_lists): Remove.
4821
4822 2018-07-16 Tom Tromey <tom@tromey.com>
4823
4824 * stabsread.c (scan_file_globals): Update comment.
4825 * stabsread.h (scan_file_globals): Move from buildsym.h.
4826 * buildsym.h (scan_file_globals): Move to stabsread.h.
4827
4828 2018-07-16 Tom Tromey <tom@tromey.com>
4829
4830 * xcoffread.c (xcoff_new_init): Update.
4831 * mipsread.c (mipscoff_new_init): Update.
4832 * mdebugread.c (mdebug_build_psymtabs): Update.
4833 * elfread.c (elf_new_init): Update.
4834 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4835 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4836 * buildsym.h (buildsym_new_init): Don't declare.
4837 * buildsym.c (buildsym_new_init): Remove.
4838
4839 2018-07-16 Tom Tromey <tom@tromey.com>
4840
4841 * stabsread.h (within_function): Move from buildsym.h.
4842 * stabsread.c (start_stabs): Clear within_function.
4843 * coffread.c (coff_start_symtab): Clear within_function.
4844 * buildsym.h (within_function): Move to stabsread.h.
4845 * buildsym.c (prepare_for_building): Update.
4846
4847 2018-07-16 Tom Tromey <tom@tromey.com>
4848
4849 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4850 * dwarf2read.c (dwarf2_start_symtab): Don't set
4851 processing_gcc_compilation.
4852 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4853
4854 2018-07-16 Tom Tromey <tom@tromey.com>
4855
4856 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4857 (next_symbol_text_func): Move from buildsym.h.
4858 * stabsread.c (hashname): Move from buildsym.c.
4859 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4860 (next_symbol_text_func, hashname): Move to stabsread.h.
4861 * buildsym.c: Don't include bcache.h
4862 (hashname): Move to stasbread.c.
4863
4864 2018-07-16 Tom Tromey <tom@tromey.com>
4865
4866 * buildsym.h (context_stack_size): Don't declare.
4867 * buildsym.c (context_stack_size): New global.
4868
4869 2018-07-16 Tom Tromey <tom@tromey.com>
4870
4871 * dbxread.c (processing_acc_compilation): New global.
4872 * buildsym.h (processing_acc_compilation): Don't declare.
4873
4874 2018-07-16 Tom Tromey <tom@tromey.com>
4875
4876 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4877 * dbxread.c (read_ofile_symtab): Update.
4878 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4879 * buildsym.h (last_source_start_addr): Remove.
4880 (set_last_source_start_addr, get_last_source_start_addr):
4881 Declare.
4882 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4883 parameter.
4884 (struct buildsym_compunit) <m_last_source_start_addr>: New
4885 member.
4886 (prepare_for_building): Remove start_addr parameter.
4887 (start_symtab, restart_symtab, end_symtab_get_static_block)
4888 (end_symtab_with_blockvector): Update.
4889 (set_last_source_start_addr, get_last_source_start_addr): New
4890 functions.
4891
4892 2018-07-16 Tom Tromey <tom@tromey.com>
4893
4894 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4895 member.
4896 (have_line_numbers): Remove.
4897 (record_line, prepare_for_building, end_symtab_get_static_block)
4898 (augment_type_symtab): Update.
4899
4900 2018-07-16 Tom Tromey <tom@tromey.com>
4901
4902 * buildsym.c (~buildsym_compunit): Free the macro table.
4903 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4904 methods.
4905 <m_pending_macros>: New member.
4906 (pending_macros): Remove.
4907 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4908 (reset_symtab_globals, end_symtab_get_static_block)
4909 (end_symtab_with_blockvector, augment_type_symtab)
4910 (buildsym_init): Update.
4911
4912 2018-07-16 Tom Tromey <tom@tromey.com>
4913
4914 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4915 parameter.
4916 (buildsym_compunit::set_last_source_file): New method.
4917 <m_last_source_file>: New member.
4918 (prepare_for_building): Remove "name" parameter.
4919 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4920 (last_source_file): Remove.
4921 (set_last_source_file, get_last_source_file): Update.
4922
4923 2018-07-16 Tom Tromey <tom@tromey.com>
4924
4925 * buildsym.c (prepare_for_building): Add assert.
4926
4927 2018-07-16 Tom Tromey <tom@tromey.com>
4928
4929 * buildsym.c (~buildsym_compunit): Update.
4930 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4931 (start_subfile, patch_subfile_names)
4932 (end_symtab_with_blockvector): Update.
4933
4934 2018-07-16 Tom Tromey <tom@tromey.com>
4935
4936 * buildsym.c (struct buildsym_compunit): Add constructor,
4937 destructor, initializers.
4938 (start_buildsym_compunit): Remove.
4939 (free_buildsym_compunit): Use "delete".
4940 (start_symtab, restart_symtab): Use "new".
4941
4942 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4943
4944 * symfile.c (set_objfile_default_section_offset): Remove struct
4945 keyword.
4946
4947 2018-07-14 Stafford Horne <shorne@gmail.com>
4948
4949 * (Responsible Maintainers): Add myself as or1k maintainer.
4950
4951 2018-07-13 Tom Tromey <tom@tromey.com>
4952
4953 * symfile.c (set_objfile_default_section_offset): Use extra braces
4954 around initializer.
4955
4956 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4957
4958 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4959 non-branching basr.
4960
4961 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4962
4963 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4964 unittests/cli-utils-selftests.c
4965 * unittests/cli-utils-selftests.c: New file.
4966
4967 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4968
4969 * NEWS: Mention new commands. Mention change to 'thread apply'.
4970
4971 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4972
4973 * thread.c (thr_try_catch_cmd): New function.
4974 (thread_apply_all_command): Handle qcs flags.
4975 (thread_apply_command): Handle qcs flags.
4976 (taas_command): New function.
4977 (tfaas_command): New function.
4978 (_initialize_thread): Update to setup the new commands 'taas
4979 and 'tfaas'. Change doc string for 'thread apply'.
4980
4981 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4982
4983 * stack.c: (trailing_outermost_frame): New function, mostly
4984 extracted from backtrace_command_1.
4985 (leading_innermost_frame): New function.
4986 (backtrace_command_1): Update to call trailing_outermost_frame.
4987 (frame_apply_command_count): New function.
4988 (frame_apply_level_command): New function.
4989 (frame_apply_all_command): New function.
4990 (frame_apply_command): New function.
4991 (faas_command): New function.
4992 (frame_cmd_list): New variable.
4993 (_initialize_stack): Update to setup the new commands 'frame apply'
4994 and 'faas'.
4995
4996 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4997
4998 * cli-utils.c (number_or_range_parser::get_number): Only handle
4999 numbers or convenience var as numbers.
5000 (parse_flags): New function.
5001 (parse_flags_qcs): New function.
5002 (number_or_range_parser::finished): Ensure parsing end is detected
5003 before end of string.
5004 * cli-utils.h (parse_flags): New function.
5005 (parse_flags_qcs): New function.
5006 (number_or_range_parser): Remove m_finished bool.
5007 (number_or_range_parser::skip_range): Set m_in_range to false.
5008
5009 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
5010
5011 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5012 on Windows.
5013
5014 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5015 Jan Kratochvil <jan.kratochvil@redhat.com>
5016 Paul Fertser <fercerpav@gmail.com>
5017 Tsutomu Seki <sekiriki@gmail.com>
5018 Pedro Alves <palves@redhat.com>
5019
5020 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5021 'unittests/parse-connection-spec-selftests.c'.
5022 (COMMON_SFILES): Add 'common/netstuff.c'.
5023 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5024 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5025 * common/netstuff.c: New file.
5026 * common/netstuff.h: New file.
5027 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5028 (wait_for_connect): Update comment. New parameter
5029 'gdb::optional<int> sock' instead of 'struct serial *scb'.
5030 Use 'sock' directly instead of 'scb->fd'.
5031 (try_connect): New function, with code from 'net_open'.
5032 (net_open): Rewrite main loop to deal with multiple
5033 sockets/addresses. Handle IPv6-style hostnames; implement
5034 support for IPv6 connections.
5035 * unittests/parse-connection-spec-selftests.c: New file.
5036
5037 2018-07-11 Pedro Alves <palves@redhat.com>
5038
5039 PR gdb/23377
5040 * remote.c (remote_target::remote_detach_pid): Call
5041 set_current_process.
5042
5043 2018-07-11 Pedro Alves <palves@redhat.com>
5044
5045 * h8300-tdep.c (h8300_gdbarch_init): Remove
5046 set_gdbarch_ecoff_reg_to_regnum calls.
5047
5048 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5049
5050 PR c++/23373
5051 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5052 offsets/sizes for static members of a class/struct.
5053
5054 2018-07-11 Alan Hayward <alan.hayward@arm.com>
5055
5056 * target-descriptions.c (tdesc_register_bitsize): Rename.
5057 * target-descriptions.h (tdesc_register_bitsize): Likewise.
5058 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5059 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5060
5061 2018-07-10 Tom Tromey <tom@tromey.com>
5062
5063 * breakpoint.c (moribund_locations): Now static and a
5064 std::vector.
5065 (breakpoint_init_inferior, moribund_breakpoint_here_p)
5066 (build_bpstat_chain, update_global_location_list)
5067 (breakpoint_retire_moribund): Update.
5068 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
5069 VEC.
5070
5071 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5072
5073 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5074 (riscv_register_reggroup_p): Use new function, remove unneeded
5075 parenthesis.
5076 (riscv_push_dummy_call): Extend assert to compare against xlen or
5077 flen based on register type.
5078
5079 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5080
5081 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5082
5083 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
5084
5085 * remote.c (show_hardware_watchpoint_limit): New function.
5086 (show_hardware_watchpoint_length_limit): New function.
5087 (show_hardware_breakpoint_limit): New function.
5088 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5089 where appropriate, update help text.
5090
5091 2018-07-09 Tom Tromey <tom@tromey.com>
5092
5093 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5094 (CLIBS): Don't mention NAT_CLIBS.
5095
5096 2018-07-09 Tom Tromey <tom@tromey.com>
5097
5098 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5099 (LIBGDB_OBS, clean mostlyclean): Update.
5100 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5101
5102 2018-07-09 Tom Tromey <tom@tromey.com>
5103
5104 * Makefile.in (%.c: %.y): Use ECHO_YACC.
5105 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
5106 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5107
5108 2018-07-09 Tom Tromey <tom@tromey.com>
5109
5110 * Makefile.in (ALLDEPFILES): Remove exec.c.
5111 (COMMON_OBS): Remove exec.o.
5112 (COMMON_SFILES): Add exec.c.
5113
5114 2018-07-09 Tom Tromey <tom@tromey.com>
5115
5116 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5117
5118 2018-07-09 Tom Tromey <tom@tromey.com>
5119
5120 * Makefile.in (clean mostlyclean): Remove stamp-version.
5121 (version.c): Depend on stamp-version.
5122 (stamp-version): New rule, from version.c rule.
5123
5124 2018-07-09 Tom Tromey <tom@tromey.com>
5125
5126 * Makefile.in (init.c): Depend on stamp-init.
5127 (stamp-init): New rule, from init.c rule.
5128 (clean mostlyclean): Remove stamp-init.
5129
5130 2018-07-09 Tom Tromey <tom@tromey.com>
5131
5132 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5133 SUBDIR_GCC_COMPILE_SRCS.
5134
5135 2018-07-09 Tom Tromey <tom@tromey.com>
5136
5137 * Makefile.in (init.c): Remove some unused sed rules.
5138
5139 2018-07-09 Tom Tromey <tom@tromey.com>
5140
5141 * Makefile.in (TSOBS): Remove.
5142 (INIT_FILES): Update.
5143 (LIBGDB_OBS): Update.
5144 (COMMON_SFILES): Add inflow.c.
5145 (SFILES): Remove inflow.c.
5146
5147 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5148
5149 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5150
5151 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
5152
5153 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5154 get_saveloc_name, is_signal_frame_name, step_name,
5155 init_remote_name, create_addr_space_name,
5156 destroy_addr_space_name, search_unwind_table_name,
5157 find_dyn_list_name): Constify.
5158
5159 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
5160
5161 * darwin-nat.c (darwin_pthread_kill): New function.
5162 (darwin_resume_thread): Use darwin_pthread_kill.
5163
5164 2018-07-05 Tom de Vries <tdevries@suse.de>
5165
5166 * macroexp.c (macro_buffer) <operator=>: New member function.
5167
5168 2018-07-04 Tom Tromey <tom@tromey.com>
5169
5170 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5171
5172 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
5173
5174 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5175 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5176 * maint.c: Likewise.
5177 * top.c: Likewise.
5178
5179 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5180
5181 * NEWS: Create a new section for the next release branch.
5182 Rename the section of the current branch, now that it has
5183 been cut.
5184
5185 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5186
5187 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5188 * version.in: Bump version to 8.2.50.DATE-git.
5189
5190 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5191 Pedro Alves <palves@redhat.com>
5192
5193 * linux-nat.c (linux_init_ptrace): Rename to ...
5194 (linux_init_ptrace_procfs): ... this. Call
5195 linux_proc_init_warnings.
5196 (linux_nat_target::post_attach)
5197 (linux_nat_target::post_startup_inferior): Adjust.
5198 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5199 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5200
5201 2018-07-04 Tom de Vries <tdevries@suse.de>
5202
5203 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5204 check ...
5205 (read_comp_unit_head): ... here.
5206
5207 2018-07-03 Tom Tromey <tom@tromey.com>
5208
5209 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5210 (stop_tracing, tstatus_command)
5211 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5212 (print_one_static_tracepoint_marker): Update.
5213 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5214 std::vector.
5215 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5216 VEC.
5217 (all_tracepoints, static_tracepoints_here): Return std::vector.
5218
5219 2018-07-03 Tom Tromey <tom@tromey.com>
5220
5221 * common/ptid.c (ptid_equal): Remove.
5222 * common/ptid.h (ptid_equal): Don't declare.
5223 * ada-tasks.c: Update.
5224 * breakpoint.c: Update.
5225 * common/agent.c: Update.
5226 * corelow.c: Update.
5227 * darwin-nat-info.c: Update.
5228 * darwin-nat.c: Update.
5229 * dcache.c: Update.
5230 * dtrace-probe.c: Update.
5231 * dummy-frame.c: Update.
5232 * fbsd-nat.c: Update.
5233 * frame.c: Update.
5234 * gdbthread.h: Update.
5235 * gnu-nat.c: Update.
5236 * go32-nat.c: Update.
5237 * inf-loop.c: Update.
5238 * inf-ptrace.c: Update.
5239 * infcall.c: Update.
5240 * infcmd.c: Update.
5241 * inflow.c: Update.
5242 * infrun.c: Update.
5243 * linux-fork.c: Update.
5244 * linux-nat.c: Update.
5245 * linux-thread-db.c: Update.
5246 * mi/mi-cmd-var.c: Update.
5247 * mi/mi-interp.c: Update.
5248 * mi/mi-main.c: Update.
5249 * nto-procfs.c: Update.
5250 * ppc-linux-tdep.c: Update.
5251 * procfs.c: Update.
5252 * python/py-inferior.c: Update.
5253 * python/py-record-btrace.c: Update.
5254 * python/py-record.c: Update.
5255 * ravenscar-thread.c: Update.
5256 * regcache.c: Update.
5257 * remote-sim.c: Update.
5258 * remote.c: Update.
5259 * sol-thread.c: Update.
5260 * solib.c: Update.
5261 * target.c: Update.
5262 * tui/tui-stack.c: Update.
5263 * varobj.c: Update.
5264 * windows-nat.c: Update.
5265 * windows-tdep.c: Update.
5266
5267 2018-07-03 Tom Tromey <tom@tromey.com>
5268
5269 * common/ptid.c (ptid_match): Remove.
5270 * common/ptid.h (ptid_match): Don't declare.
5271 * fbsd-nat.c: Update.
5272 * infcmd.c: Update.
5273 * infrun.c: Update.
5274 * linux-nat.c: Update.
5275 * record-btrace.c: Update.
5276 * regcache.c: Update.
5277 * remote.c: Update.
5278
5279 2018-07-03 Tom Tromey <tom@tromey.com>
5280
5281 * common/ptid.c (ptid_tid_p): Remove.
5282 * common/ptid.h (ptid_tid_p): Don't declare.
5283 * sol-thread.c: Update.
5284
5285 2018-07-03 Tom Tromey <tom@tromey.com>
5286
5287 * common/ptid.c (ptid_lwp_p): Remove.
5288 * common/ptid.h (ptid_lwp_p): Don't declare.
5289 * fbsd-nat.c: Update.
5290 * linux-nat.c: Update.
5291 * nat/linux-procfs.c: Update.
5292 * nat/x86-linux-dregs.c: Update.
5293 * sol-thread.c: Update.
5294
5295 2018-07-03 Tom Tromey <tom@tromey.com>
5296
5297 * common/ptid.c (ptid_is_pid): Remove.
5298 * common/ptid.h (ptid_is_pid): Don't declare.
5299 * infrun.c: Update.
5300 * linux-nat.c: Update.
5301 * mi/mi-interp.c: Update.
5302 * remote.c: Update.
5303 * thread.c: Update.
5304
5305 2018-07-03 Tom Tromey <tom@tromey.com>
5306
5307 * common/ptid.c (ptid_get_tid): Remove.
5308 * common/ptid.h (ptid_get_tid): Don't declare.
5309 * ada-tasks.c: Update.
5310 * aix-thread.c: Update.
5311 * bsd-uthread.c: Update.
5312 * darwin-nat.c: Update.
5313 * fbsd-nat.c: Update.
5314 * i386-darwin-nat.c: Update.
5315 * infrun.c: Update.
5316 * linux-tdep.c: Update.
5317 * nto-procfs.c: Update.
5318 * ppc-ravenscar-thread.c: Update.
5319 * python/py-infthread.c: Update.
5320 * ravenscar-thread.c: Update.
5321 * sol-thread.c: Update.
5322 * sparc-ravenscar-thread.c: Update.
5323 * windows-nat.c: Update.
5324
5325 2018-07-03 Tom Tromey <tom@tromey.com>
5326
5327 * common/ptid.c (ptid_get_lwp): Remove.
5328 * common/ptid.h (ptid_get_lwp): Don't declare.
5329 * aarch64-linux-nat.c: Update.
5330 * ada-tasks.c: Update.
5331 * aix-thread.c: Update.
5332 * amd64-linux-nat.c: Update.
5333 * arm-linux-nat.c: Update.
5334 * corelow.c: Update.
5335 * fbsd-nat.c: Update.
5336 * fbsd-tdep.c: Update.
5337 * gnu-nat.c: Update.
5338 * i386-cygwin-tdep.c: Update.
5339 * i386-gnu-nat.c: Update.
5340 * i386-linux-nat.c: Update.
5341 * ia64-linux-nat.c: Update.
5342 * inf-ptrace.c: Update.
5343 * infrun.c: Update.
5344 * linux-fork.c: Update.
5345 * linux-nat.c: Update.
5346 * linux-tdep.c: Update.
5347 * linux-thread-db.c: Update.
5348 * mips-linux-nat.c: Update.
5349 * nat/aarch64-linux-hw-point.c: Update.
5350 * nat/aarch64-linux.c: Update.
5351 * nat/linux-btrace.c: Update.
5352 * nat/linux-osdata.c: Update.
5353 * nat/linux-procfs.c: Update.
5354 * nat/x86-linux-dregs.c: Update.
5355 * obsd-nat.c: Update.
5356 * ppc-fbsd-nat.c: Update.
5357 * ppc-linux-nat.c: Update.
5358 * procfs.c: Update.
5359 * python/py-infthread.c: Update.
5360 * ravenscar-thread.c: Update.
5361 * remote.c: Update.
5362 * s390-linux-nat.c: Update.
5363 * sol-thread.c: Update.
5364 * sol2-tdep.c: Update.
5365 * spu-linux-nat.c: Update.
5366 * x86-linux-nat.c: Update.
5367 * xtensa-linux-nat.c: Update.
5368
5369 2018-07-03 Tom Tromey <tom@tromey.com>
5370
5371 * common/ptid.c (ptid_get_pid): Remove.
5372 * common/ptid.h (ptid_get_pid): Don't declare.
5373 * aarch64-linux-nat.c: Update.
5374 * ada-lang.c: Update.
5375 * aix-thread.c: Update.
5376 * alpha-bsd-nat.c: Update.
5377 * amd64-fbsd-nat.c: Update.
5378 * amd64-linux-nat.c: Update.
5379 * arm-linux-nat.c: Update.
5380 * arm-nbsd-nat.c: Update.
5381 * auxv.c: Update.
5382 * break-catch-syscall.c: Update.
5383 * breakpoint.c: Update.
5384 * bsd-uthread.c: Update.
5385 * corelow.c: Update.
5386 * ctf.c: Update.
5387 * darwin-nat.c: Update.
5388 * fbsd-nat.c: Update.
5389 * fbsd-tdep.c: Update.
5390 * gcore.c: Update.
5391 * gnu-nat.c: Update.
5392 * hppa-nbsd-nat.c: Update.
5393 * hppa-obsd-nat.c: Update.
5394 * i386-fbsd-nat.c: Update.
5395 * ia64-linux-nat.c: Update.
5396 * inf-ptrace.c: Update.
5397 * infcmd.c: Update.
5398 * inferior.c: Update.
5399 * inferior.h: Update.
5400 * inflow.c: Update.
5401 * infrun.c: Update.
5402 * linux-fork.c: Update.
5403 * linux-nat.c: Update.
5404 * linux-tdep.c: Update.
5405 * linux-thread-db.c: Update.
5406 * m68k-bsd-nat.c: Update.
5407 * mi/mi-interp.c: Update.
5408 * mi/mi-main.c: Update.
5409 * mips-linux-nat.c: Update.
5410 * mips-nbsd-nat.c: Update.
5411 * mips64-obsd-nat.c: Update.
5412 * nat/aarch64-linux-hw-point.c: Update.
5413 * nat/aarch64-linux.c: Update.
5414 * nat/linux-btrace.c: Update.
5415 * nat/linux-osdata.c: Update.
5416 * nat/linux-procfs.c: Update.
5417 * nat/x86-linux-dregs.c: Update.
5418 * nto-procfs.c: Update.
5419 * obsd-nat.c: Update.
5420 * ppc-linux-nat.c: Update.
5421 * ppc-nbsd-nat.c: Update.
5422 * ppc-obsd-nat.c: Update.
5423 * proc-service.c: Update.
5424 * procfs.c: Update.
5425 * python/py-inferior.c: Update.
5426 * python/py-infthread.c: Update.
5427 * ravenscar-thread.c: Update.
5428 * record.c: Update.
5429 * remote-sim.c: Update.
5430 * remote.c: Update.
5431 * rs6000-nat.c: Update.
5432 * s390-linux-nat.c: Update.
5433 * sh-nbsd-nat.c: Update.
5434 * sol-thread.c: Update.
5435 * sparc-nat.c: Update.
5436 * sparc64-tdep.c: Update.
5437 * spu-linux-nat.c: Update.
5438 * spu-tdep.c: Update.
5439 * target-debug.h: Update.
5440 * target.c: Update.
5441 * thread.c: Update.
5442 * tid-parse.c: Update.
5443 * tracefile-tfile.c: Update.
5444 * vax-bsd-nat.c: Update.
5445 * windows-nat.c: Update.
5446 * x86-linux-nat.c: Update.
5447 * x86-nat.c: Update.
5448
5449 2018-07-03 Tom Tromey <tom@tromey.com>
5450
5451 * common/ptid.c (pid_to_ptid): Remove.
5452 * common/ptid.h (pid_to_ptid): Don't declare.
5453 * aix-thread.c: Update.
5454 * arm-linux-nat.c: Update.
5455 * common/ptid.c: Update.
5456 * common/ptid.h: Update.
5457 * corelow.c: Update.
5458 * ctf.c: Update.
5459 * darwin-nat.c: Update.
5460 * fbsd-nat.c: Update.
5461 * fork-child.c: Update.
5462 * gnu-nat.c: Update.
5463 * go32-nat.c: Update.
5464 * inf-ptrace.c: Update.
5465 * infcmd.c: Update.
5466 * inferior.c: Update.
5467 * infrun.c: Update.
5468 * linux-fork.c: Update.
5469 * linux-nat.c: Update.
5470 * nat/aarch64-linux-hw-point.c: Update.
5471 * nat/fork-inferior.c: Update.
5472 * nat/x86-linux-dregs.c: Update.
5473 * nto-procfs.c: Update.
5474 * obsd-nat.c: Update.
5475 * procfs.c: Update.
5476 * progspace.c: Update.
5477 * remote.c: Update.
5478 * rs6000-nat.c: Update.
5479 * s390-linux-nat.c: Update.
5480 * sol-thread.c: Update.
5481 * spu-linux-nat.c: Update.
5482 * target.c: Update.
5483 * top.c: Update.
5484 * tracefile-tfile.c: Update.
5485 * windows-nat.c: Update.
5486
5487 2018-07-03 Tom Tromey <tom@tromey.com>
5488
5489 * common/ptid.h (ptid_build): Don't declare.
5490 * common/ptid.c (ptid_build): Remove.
5491 * aix-thread.c: Update.
5492 * bsd-kvm.c: Update.
5493 * bsd-uthread.c: Update.
5494 * common/agent.c: Update.
5495 * common/ptid.c: Update.
5496 * common/ptid.h: Update.
5497 * corelow.c: Update.
5498 * darwin-nat.c: Update.
5499 * fbsd-nat.c: Update.
5500 * gnu-nat.c: Update.
5501 * linux-fork.c: Update.
5502 * linux-nat.c: Update.
5503 * linux-thread-db.c: Update.
5504 * nat/linux-osdata.c: Update.
5505 * nat/linux-procfs.c: Update.
5506 * nto-procfs.c: Update.
5507 * obsd-nat.c: Update.
5508 * proc-service.c: Update.
5509 * procfs.c: Update.
5510 * ravenscar-thread.c: Update.
5511 * remote-sim.c: Update.
5512 * remote.c: Update.
5513 * sol-thread.c: Update.
5514 * target.c: Update.
5515 * windows-nat.c: Update.
5516
5517 2018-07-03 Tom Tromey <tom@tromey.com>
5518
5519 * infrun.c (follow_exec): Use exit_inferior_silent.
5520 * inferior.c (exit_inferior_num_silent): Remove.
5521 * inferior.h (exit_inferior_num_silent): Don't declare.
5522
5523 2018-07-03 Tom Tromey <tom@tromey.com>
5524
5525 PR cli/23340:
5526 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5527 inferior_ptid on error.
5528
5529 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5530 Simon Marchi <simon.marchi@polymtl.ca>
5531
5532 PR tdep/8282
5533 * disasm.h (gdb_disassembler): Add
5534 `m_disassembler_options_holder'. member
5535 * disasm.c (get_all_disassembler_options): New function.
5536 (gdb_disassembler::gdb_disassembler): Use it.
5537 (gdb_buffered_insn_length_init_dis): Likewise.
5538 (gdb_buffered_insn_length): Adjust accordingly.
5539 (set_disassembler_options): Handle options with arguments.
5540 (show_disassembler_options_sfunc): Likewise. Add a leading new
5541 line if showing options with descriptions.
5542 (disassembler_options_completer): Adapt to using the
5543 `disasm_options_and_args_t' structure.
5544 * mips-tdep.c (mips_disassembler_options): New variable.
5545 (mips_disassembler_options_o32): Likewise.
5546 (mips_disassembler_options_n32): Likewise.
5547 (mips_disassembler_options_n64): Likewise.
5548 (gdb_print_insn_mips): Don't set `disassembler_options'.
5549 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5550 functions.
5551 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5552 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5553 `gdbarch_disassembler_options_implicit' and
5554 `gdbarch_valid_disassembler_options'.
5555 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5556 `disasm_options_and_args_t' structure.
5557 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5558 method.
5559 (valid_disassembler_options): Switch from `disasm_options_t' to
5560 the `disasm_options_and_args_t' structure.
5561 * NEWS: Document `set disassembler-options' support for the MIPS
5562 target.
5563 * gdbarch.h: Regenerate.
5564 * gdbarch.c: Regenerate.
5565
5566 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5567
5568 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5569
5570 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5571
5572 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5573 parameter in call to amd64_target_description.
5574 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5575 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5576 (amd64fbsd_init_abi): Likewise.
5577 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5578 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5579 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5580 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5581
5582 2018-06-29 Pedro Alves <palves@redhat.com>
5583
5584 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5585 "segments" parameter.
5586 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5587 (_initialize_amd64_tdep): Update call to
5588 amd64_create_target_description.
5589 (amd64_target_description): Add "segments" parameter. Adjust
5590 the implementation to use it.
5591 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5592 call to amd64_create_target_description.
5593 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5594 * gdb/arch/amd64.h (amd64_create_target_description): Add
5595 "segments" register.
5596 * gdb/arch/amd64.c (amd64_create_target_description): Add
5597 "segments" parameter. Call create_feature_i386_64bit_segments
5598 only if SEGMENTS is true.
5599 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5600 call to amd64_create_target_description.
5601
5602 2018-06-29 Pedro Alves <palves@redhat.com>
5603
5604 * thread.c (thread_target_id_str): New, factored out from ...
5605 (print_thread_info_1): ... here. Use it to compute the max
5606 "Target Id" column width.
5607
5608 2018-06-29 Pedro Alves <palves@redhat.com>
5609
5610 * remote.c (remote_target::extra_thread_info): Delete
5611 'display_buf' and 'n' locals. from the cache, regardless of
5612 packet mechanims is in use. Use cache for qThreadExtra and qP
5613 methods too.
5614
5615 2018-06-29 Pedro Alves <palves@redhat.com>
5616
5617 * blockframe.c (find_pc_sect_containing_function): New function.
5618 * breakpoint.c (print_breakpoint_location): Don't call
5619 find_pc_sect_function.
5620 * linespec.c (create_sals_line_offset): Record the location's
5621 symbol in the sal.
5622 * linespec.c (convert_address_location_to_sals): Fill in sal's
5623 symbol with find_pc_sect_containing_function.
5624 * symtab.c (find_function_start_sal): Rename to ...
5625 (find_function_start_sal_1): ... this.
5626 (find_function_start_sal): Reimplement as wrapper around
5627 find_function_start_sal_1, and use
5628 find_pc_sect_containing_function to fill in the sal's symbol.
5629 (find_function_start_sal(symbol*, bool)): Adjust.
5630 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5631 comments.
5632 (find_pc_sect_containing_function): Declare.
5633
5634 2018-06-29 Pedro Alves <palves@redhat.com>
5635
5636 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5637 true if the the location has no symbol.
5638
5639 2018-06-28 Tom Tromey <tom@tromey.com>
5640
5641 * NEWS: Mention --enable-codesign.
5642 * silent-rules.mk (ECHO_SIGN): New variable.
5643 * configure.ac: Add --enable-codesign.
5644 * configure: Rebuild.
5645 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5646 (gdb$(EXEEXT)): Optionally invoke codesign.
5647
5648 2018-06-28 Pedro Alves <palves@redhat.com>
5649
5650 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5651 comments.
5652 (switch_to_thread_no_regs): Adjust comment.
5653 * infcmd.c (stop_pc): Delete.
5654 (post_create_inferior, info_program_command): Replace references
5655 to stop_pc with references to thread_info->suspend.stop_pc.
5656 * inferior.h (stop_pc): Delete declaration.
5657 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5658 (handle_inferior_event_1, handle_signal_stop)
5659 (process_event_stop_test, keep_going_stepped_thread)
5660 (handle_step_into_function, handle_step_into_function_backward)
5661 (print_stop_location): Replace references to stop_pc with
5662 references to thread_info->suspend.stop_pc.
5663 (struct infcall_suspend_state) <stop_pc>: Delete field.
5664 (save_infcall_suspend_state, restore_infcall_suspend_state):
5665 Remove references to inf_stat->stop_pc.
5666 * linux-fork.c (fork_load_infrun_state): Likewise.
5667 * record-btrace.c (record_btrace_set_replay): Likewise.
5668 * record-full.c (record_full_goto_entry): Likewise.
5669 * remote.c (print_one_stopped_thread): Likewise.
5670 * target.c (target_resume): Extend comment.
5671 * thread.c (set_executing_thread): New.
5672 (set_executing): Use it.
5673 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5674 Remove references to stop_pc.
5675
5676 2018-06-28 Pedro Alves <palves@redhat.com>
5677
5678 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5679 Moving fetching stop_pc until after ecs->event_thread is refreshed.
5680
5681 2018-06-28 Tom Tromey <tom@tromey.com>
5682
5683 * coffread.c (coff_symfile_finish): Update.
5684 * xcoffread.c (xcoff_symfile_finish): Update.
5685 * elfread.c (elf_symfile_finish): Update.
5686 * symfile.h (dwarf2_free_objfile): Don't declare.
5687 * dwarf2read.c (_initialize_dwarf2_read): Use
5688 register_objfile_data_with_cleanup.
5689 (dwarf2_free_objfile): Now static. Change signature.
5690
5691 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5692
5693 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5694 option "-o" to add-symbol-file-load to add an offset to each
5695 section's load address.
5696 * symfile.c (set_objfile_default_section_offset): New function.
5697
5698 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5699
5700 * symfile.c (add_symbol_file_command): Make sure that sections
5701 with the same name are sorted in the same order.
5702
5703 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5704
5705 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5706 require the second argument. If omitted, load sections at the
5707 addresses specified in the file.
5708
5709 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5710
5711 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5712 (_initialize_symfile): Add option "-o" to symbol-file to add an
5713 offset to each section of the symbol file.
5714
5715 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5716
5717 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5718
5719 2018-06-27 Tom Tromey <tom@tromey.com>
5720
5721 * stack.c (_initialize_stack): Update "func" help text.
5722
5723 2018-06-27 Tom Tromey <tom@tromey.com>
5724
5725 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5726 std::vector.
5727 (unwind_infopy_str, pyuw_create_unwind_info)
5728 (unwind_infopy_add_saved_register, pyuw_sniffer)
5729 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5730 Update.
5731 (struct saved_reg): Add constructor.
5732 <value>: Now a gdbpy_ref<>.
5733
5734 2018-06-27 Tom Tromey <tom@tromey.com>
5735
5736 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5737
5738 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5739
5740 * gdb-gdb.py.in: Format using autopep8.
5741
5742 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5743
5744 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5745 (type_lookup_function): Recognize CORE_ADDR values.
5746
5747 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5748
5749 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5750 print tag_name.
5751
5752 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5753
5754 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5755 <__lt__>: Add.
5756
5757 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5758
5759 * gdb-gdb.py: Move to...
5760 * gdb-gdb.py.in: ... here.
5761 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5762 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5763 dependencies.
5764 (distclean): Remove gdb-gdb.py when cleaning.
5765 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5766 * configure: Re-generate.
5767
5768 2018-06-27 Pedro Alves <palves@redhat.com>
5769
5770 * proc-service.c (get_ps_regcache): New.
5771 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5772 (ps_lsetfpregs): Use it.
5773
5774 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5775
5776 PR gdb/21695
5777 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5778 (dwarf_decode_lines_1): Adjust.
5779
5780 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5781
5782 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5783 override.
5784 <info_proc>: Likewise.
5785
5786 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5787
5788 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5789 to windows_fetch_one_register, and only handle the case of
5790 fetching one register. Move the code that reloads the context
5791 and iterates over all registers if R is negative to...
5792 (windows_nat_target::fetch_registers): ... here.
5793 (do_windows_store_inferior_registers): Rename to
5794 windows_store_one_register, and only handle the case of storing
5795 one register. Move the code that handles the case where r is
5796 negative to...
5797 (windows_nat_target::store_registers) ... here.
5798
5799 2018-06-26 Tom Tromey <tom@tromey.com>
5800
5801 PR rust/22574:
5802 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5803 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5804 Update.
5805 (rust_internal_print_type): Add podata parameter.
5806 (rust_print_type): Update.
5807
5808 2018-06-26 Tom Tromey <tom@tromey.com>
5809
5810 * typeprint.h (struct print_offset_data) <update, finish,
5811 maybe_print_hole>: New methods.
5812 <indentation>: New constant.
5813 * typeprint.c (print_offset_data::indentation): Define.
5814 (print_offset_data::maybe_print_hole, print_offset_data::update)
5815 (print_offset_data::finish): Move from c-typeprint.c and rename.
5816 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5817 (print_spaces_filtered_with_print_options): Update.
5818 (c_print_type_union_field_offset, maybe_print_hole)
5819 (c_print_type_struct_field_offset): Move to typeprint.c and
5820 rename.
5821 (c_type_print_base_struct_union): Update.
5822
5823 2018-06-25 Pedro Alves <palves@redhat.com>
5824
5825 * gdbthread.h (thread_info_ref, delete_thread)
5826 (delete_thread_silent, first_thread_of_inferior)
5827 (any_thread_of_inferior, switch_to_thread)
5828 (enable_thread_stack_temporaries)
5829 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5830 (get_last_thread_stack_temporary)
5831 (value_in_thread_stack_temporaries, can_access_registers_thread):
5832 Spell out "struct thread_info" instead of just "thread_info".
5833 * inferior.h (notice_new_inferior): Likewise.
5834
5835 2018-06-25 Pedro Alves <palves@redhat.com>
5836
5837 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5838 pass thread_info pointer to delete_thread.
5839 (windows_nat_target::detach): Pass inferior pointer to
5840 detach_inferior.
5841 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5842 delete_thread.
5843 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5844 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5845 and pass a thread_info pointer to delete_thread.
5846 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5847 pass thread_info pointer to delete_thread.
5848 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5849 delete_thread_silent call.
5850 * procfs.c (procfs_target::detach): Pass inferior pointer to
5851 detach_inferior.
5852 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5853 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5854 delete_thread_silent call.
5855 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5856 pass thread_info pointer to delete_thread.
5857 (windows_nat_target::detach): Pass inferior pointer to
5858 delete_inferior.
5859
5860 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5861
5862 * regcache.c (readable_regcache::read_part): Fix asserts.
5863 (reg_buffer::raw_collect_part): New function.
5864 (regcache::write_part): Fix asserts.
5865 (reg_buffer::raw_supply_part): New function.
5866 (regcache::transfer_regset_register): New helper function.
5867 (regcache::transfer_regset): Call new functions.
5868 (regcache_supply_regset): Use gdb_byte*.
5869 (regcache::supply_regset): Likewise.
5870 (regcache_collect_regset): Likewise.
5871 (regcache::collect_regset): Likewise.
5872 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5873 (reg_buffer::raw_supply_part): Likewise.
5874 (regcache::transfer_regset_register): Likewise.
5875 (regcache::transfer_regset): Use gdb_byte*.
5876
5877 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5878
5879 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5880
5881 2018-06-21 Pedro Alves <palves@redhat.com>
5882
5883 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5884 instead of a ptid_t. All callers adjusted.
5885 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5886 adjusted.
5887 (print_ada_task_info, display_current_task_id, task_command_1):
5888 Adjust.
5889 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5890 inferior_thread.
5891 (breakpoint_kind): Adjust.
5892 (remove_breakpoints_pid): Rename to ...
5893 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5894 pointer. All callers adjusted.
5895 (bpstat_clear_actions): Use inferior_thread.
5896 (get_bpstat_thread): New.
5897 (bpstat_do_actions): Use it.
5898 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5899 to take a thread_info pointer. All callers adjusted.
5900 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5901 (breakpoint_re_set_thread): Use inferior_thread.
5902 * breakpoint.h (struct inferior): Forward declare.
5903 (bpstat_stop_status): Update.
5904 (remove_breakpoints_pid): Delete.
5905 (remove_breakpoints_inf): New.
5906 * bsd-uthread.c (bsd_uthread_target::wait)
5907 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5908 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5909 (maint_btrace_packet_history_cmd)
5910 (maint_btrace_clear_packet_history_cmd): Adjust.
5911 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5912 inferior_thread.
5913 * cli/cli-interp.c: Include "inferior.h".
5914 * common/refcounted-object.h (struct
5915 refcounted_object_ref_policy): New.
5916 * compile/compile-object-load.c: Include gdbthread.h.
5917 (store_regs): Use inferior_thread.
5918 * corelow.c (core_target::close): Use current_inferior.
5919 (core_target_open): Adjust to use first_thread_of_inferior and use
5920 the current inferior.
5921 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5922 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5923 <thread>: ... this new field. All references adjusted.
5924 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5925 Take a thread_info pointer instead of a ptid_t.
5926 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5927 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5928 thread_info pointer instead of a ptid_t.
5929 * elfread.c: Include "inferior.h".
5930 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5931 Use inferior_thread.
5932 * eval.c (evaluate_subexp): Likewise.
5933 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5934 inferior_thread.
5935 * gdb_proc_service.h (struct thread_info): Forward declare.
5936 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5937 <thread>: ... this new field. All references adjusted.
5938 * gdbarch.h, gdbarch.c: Regenerate.
5939 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5940 'thread' parameter. All implementations and callers adjusted.
5941 * gdbthread.h (thread_info) <set_running>: New method.
5942 (delete_thread, delete_thread_silent): Take a thread_info pointer
5943 instead of a ptid.
5944 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5945 (first_thread_of_process): Delete, replaced by ...
5946 (first_thread_of_inferior): ... this new function. All callers
5947 adjusted.
5948 (any_live_thread_of_process): Delete, replaced by ...
5949 (any_live_thread_of_inferior): ... this new function. All callers
5950 adjusted.
5951 (switch_to_thread, switch_to_no_thread): Declare.
5952 (is_executing): Delete.
5953 (enable_thread_stack_temporaries): Update comment.
5954 <enable_thread_stack_temporaries>: Take a thread_info pointer
5955 instead of a ptid_t. Incref the thread.
5956 <~enable_thread_stack_temporaries>: Decref the thread.
5957 <m_ptid>: Delete
5958 <m_thr>: New.
5959 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5960 (get_last_thread_stack_temporary)
5961 (value_in_thread_stack_temporaries, can_access_registers_thread):
5962 Take a thread_info pointer instead of a ptid_t. All callers
5963 adjusted.
5964 * infcall.c (get_call_return_value): Use inferior_thread.
5965 (run_inferior_call): Work with thread pointers instead of ptid_t.
5966 (call_function_by_hand_dummy): Work with thread pointers instead
5967 of ptid_t. Use thread_info_ref.
5968 * infcmd.c (proceed_thread_callback): Access thread's state
5969 directly.
5970 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5971 access thread's state directly.
5972 (continue_command): Use inferior_thread.
5973 (info_program_command): Use find_thread_ptid and access thread
5974 state directly.
5975 (proceed_after_attach_callback): Use thread state directly.
5976 (notice_new_inferior): Take a thread_info pointer instead of a
5977 ptid_t. All callers adjusted.
5978 (exit_inferior): Take an inferior pointer instead of a pid. All
5979 callers adjusted.
5980 (exit_inferior_silent): New.
5981 (detach_inferior): Delete.
5982 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5983 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5984 (detach_inferior_command, kill_inferior_command): Use
5985 find_inferior_id instead of valid_gdb_inferior_id and
5986 gdb_inferior_id_to_pid.
5987 (inferior_command): Use inferior and thread pointers.
5988 * inferior.h (struct thread_info): Forward declare.
5989 (notice_new_inferior): Take a thread_info pointer instead of a
5990 ptid_t. All callers adjusted.
5991 (detach_inferior): Delete declaration.
5992 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5993 instead of a pid. All callers adjusted.
5994 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5995 (valid_gdb_inferior_id): Delete.
5996 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5997 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5998 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5999 ...
6000 <inf>: ... this new field.
6001 <step_ptid>: Delete, replaced by ...
6002 <step_thread>: ... this new field.
6003 (get_displaced_stepping_state): Take an inferior pointer instead
6004 of a pid. All callers adjusted.
6005 (displaced_step_in_progress_any_inferior): Adjust.
6006 (displaced_step_in_progress_thread): Take a thread pointer instead
6007 of a ptid_t. All callers adjusted.
6008 (displaced_step_in_progress, add_displaced_stepping_state): Take
6009 an inferior pointer instead of a pid. All callers adjusted.
6010 (get_displaced_step_closure_by_addr): Adjust.
6011 (remove_displaced_stepping_state): Take an inferior pointer
6012 instead of a pid. All callers adjusted.
6013 (displaced_step_prepare_throw, displaced_step_prepare)
6014 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6015 All callers adjusted.
6016 (start_step_over): Adjust.
6017 (infrun_thread_ptid_changed): Remove bit updating ptids in the
6018 displaced step queue.
6019 (do_target_resume): Adjust.
6020 (fetch_inferior_event): Use inferior_thread.
6021 (context_switch, get_inferior_stop_soon): Take an
6022 execution_control_state pointer instead of a ptid_t. All callers
6023 adjusted.
6024 (switch_to_thread_cleanup): Delete.
6025 (stop_all_threads): Use scoped_restore_current_thread.
6026 * inline-frame.c: Include "gdbthread.h".
6027 (inline_state) <inline_state>: Take a thread pointer instead of a
6028 ptid_t. All callers adjusted.
6029 <ptid>: Delete, replaced by ...
6030 <thread>: ... this new field.
6031 (find_inline_frame_state): Take a thread pointer instead of a
6032 ptid_t. All callers adjusted.
6033 (skip_inline_frames, step_into_inline_frame)
6034 (inline_skipped_frames, inline_skipped_symbol): Take a thread
6035 pointer instead of a ptid_t. All callers adjusted.
6036 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6037 (inline_skipped_frames, inline_skipped_symbol): Likewise.
6038 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6039 pointers directly.
6040 * linux-nat.c (get_detach_signal): Likewise.
6041 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6042 (thread_db_notice_clone): Adjust.
6043 (thread_db_find_new_threads_silently)
6044 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6045 a thread pointer instead of a ptid_t. All callers adjusted.
6046 * mi/mi-cmd-var.c: Include "inferior.h".
6047 (mi_cmd_var_update_iter): Update to use thread pointers.
6048 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6049 inferior directly.
6050 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6051 out to ...
6052 (mi_output_running): ... this new function.
6053 (mi_on_resume_1): Adjust to use it.
6054 (mi_user_selected_context_changed): Adjust to use inferior_thread.
6055 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6056 directly.
6057 (interrupt_thread_callback): : Adjust to use thread and inferior
6058 pointers.
6059 * proc-service.c: Include "gdbthread.h".
6060 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6061 * progspace-and-thread.c: Include "inferior.h".
6062 * progspace.c: Include "inferior.h".
6063 * python/py-exitedevent.c (create_exited_event_object): Adjust to
6064 hold a reference to an inferior_object.
6065 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6066 inferior_thread.
6067 * python/py-inferior.c (struct inferior_object): Give the type a
6068 tag name instead of a typedef.
6069 (python_on_normal_stop): No need to check if the current thread is
6070 listed.
6071 (inferior_to_inferior_object): Change return type to
6072 inferior_object. All callers adjusted.
6073 (find_thread_object): Delete, bits factored out to ...
6074 (thread_to_thread_object): ... this new function.
6075 * python/py-infthread.c (create_thread_object): Use
6076 inferior_to_inferior_object.
6077 (thpy_is_stopped): Use thread pointer directly.
6078 (gdbpy_selected_thread): Use inferior_thread.
6079 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6080 field, replaced with ...
6081 <thread>: ... this new field. All users adjusted.
6082 (btpy_insn_or_gap_new): Drop const.
6083 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
6084 callers adjusted.
6085 * python/py-record.c: Include "gdbthread.h".
6086 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6087 a ptid_t. All callers adjusted.
6088 (gdbpy_current_recording): Use inferior_thread.
6089 * python/py-record.h (recpy_record_object) <ptid>: Delete
6090 field, replaced with ...
6091 <thread>: ... this new field. All users adjusted.
6092 (recpy_element_object) <ptid>: Delete
6093 field, replaced with ...
6094 <thread>: ... this new field. All users adjusted.
6095 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6096 a ptid_t. All callers adjusted.
6097 * python/py-threadevent.c: Include "gdbthread.h".
6098 (get_event_thread): Use thread_to_thread_object.
6099 * python/python-internal.h (struct inferior_object): Forward
6100 declare.
6101 (find_thread_object, find_inferior_object): Delete declarations.
6102 (thread_to_thread_object, inferior_to_inferior_object): New
6103 declarations.
6104 * record-btrace.c: Include "inferior.h".
6105 (require_btrace_thread): Use inferior_thread.
6106 (record_btrace_frame_sniffer)
6107 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6108 (get_thread_current_frame): Use scoped_restore_current_thread and
6109 switch_to_thread.
6110 (get_thread_current_frame): Use thread pointer directly.
6111 (record_btrace_replay_at_breakpoint): Use thread's inferior
6112 pointer directly.
6113 * record-full.c: Include "inferior.h".
6114 * regcache.c: Include "gdbthread.h".
6115 (get_thread_arch_regcache): Use the inferior's address space
6116 directly.
6117 (get_thread_regcache, registers_changed_thread): New.
6118 * regcache.h (get_thread_regcache(thread_info *thread)): New
6119 overload.
6120 (registers_changed_thread): New.
6121 (remote_target) <remote_detach_1>: Swap order of parameters.
6122 (remote_add_thread): <remote_add_thread>: Return the new thread.
6123 (get_remote_thread_info(ptid_t)): New overload.
6124 (remote_target::remote_notice_new_inferior): Use thread pointers
6125 directly.
6126 (remote_target::process_initial_stop_replies): Use
6127 thread_info::set_running.
6128 (remote_target::remote_detach_1, remote_target::detach)
6129 (extended_remote_target::detach): Adjust.
6130 * stack.c (frame_show_address): Use inferior_thread.
6131 * target-debug.h (target_debug_print_thread_info_pp): New.
6132 * target-delegates.c: Regenerate.
6133 * target.c (default_thread_address_space): Delete.
6134 (memory_xfer_partial_1): Use current_inferior.
6135 (target_detach): Use current_inferior.
6136 (target_thread_address_space): Delete.
6137 (generic_mourn_inferior): Use current_inferior.
6138 * target.h (struct target_ops) <thread_address_space>: Delete.
6139 (target_thread_address_space): Delete.
6140 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
6141 pointers directly.
6142 (delete_thread_1, delete_thread, delete_thread_silent): Take a
6143 thread pointer instead of a ptid_t. Adjust all callers.
6144 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6145 (first_thread_of_process): Delete, replaced by ...
6146 (first_thread_of_inferior): ... this new function. All callers
6147 adjusted.
6148 (any_thread_of_process): Rename to ...
6149 (any_thread_of_inferior): ... this, and take an inferior pointer.
6150 (any_live_thread_of_process): Rename to ...
6151 (any_live_thread_of_inferior): ... this, and take an inferior
6152 pointer.
6153 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6154 (value_in_thread_stack_temporaries)
6155 (get_last_thread_stack_temporary): Take a thread pointer instead
6156 of a ptid_t. Adjust all callers.
6157 (thread_info::set_running): New.
6158 (validate_registers_access): Use inferior_thread.
6159 (can_access_registers_ptid): Rename to ...
6160 (can_access_registers_thread): ... this, and take a thread
6161 pointer.
6162 (print_thread_info_1): Adjust to compare thread pointers instead
6163 of ptids.
6164 (switch_to_no_thread, switch_to_thread): Make extern.
6165 (scoped_restore_current_thread::~scoped_restore_current_thread):
6166 Use m_thread pointer directly.
6167 (scoped_restore_current_thread::scoped_restore_current_thread):
6168 Use inferior_thread.
6169 (thread_command): Use thread pointer directly.
6170 (thread_num_make_value_helper): Use inferior_thread.
6171 * top.c (execute_command): Use inferior_thread.
6172 * tui/tui-interp.c: Include "inferior.h".
6173 * varobj.c (varobj_create): Use inferior_thread.
6174 (value_of_root_1): Use find_thread_global_id instead of
6175 global_thread_id_to_ptid.
6176
6177 2018-06-21 Alan Hayward <alan.hayward@arm.com>
6178
6179 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6180 possible.
6181 (regcache::write_part): Likewise.
6182 (readable_regcache::cooked_read_part): Update comment.
6183 (readable_regcache::cooked_write_part): Likewise.
6184 * regcache.h: (readable_regcache::read_part): Likewise.
6185 (regcache::write_part): Likewise.
6186
6187 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6188 Dirk Schubert <dirk.schubert@arm.com>
6189
6190 * aarch64-linux-nat.c (post_attach): New.
6191 (aarch64_linux_nat_target::post_attach): Override post_attach to
6192 record the number of hardware debug registers.
6193
6194 2018-06-20 Tom Tromey <tom@tromey.com>
6195
6196 * python/py-param.c (add_setshow_generic): Make parameters const.
6197 (parmpy_init): Update.
6198
6199 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6200
6201 * regcache.h (regcache_cooked_read_ftype): Rename to...
6202 (register_read_ftype): ...this, change type to function_view.
6203 (class reg_buffer) <save>: Remove src parameter.
6204 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6205 parameter non-const in first overload. Remove src parameter in
6206 second overload.
6207 * regcache.c (do_cooked_read): Remove.
6208 (readonly_detached_regcache::readonly_detached_regcache): Make
6209 parameter non-const, adjust call to other constructor.
6210 (reg_buffer::save): Remove src parameter.
6211 * frame.c (do_frame_register_read): Remove.
6212 (frame_save_as_regcache): Use lambda function.
6213 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6214 parameter to ppu2spu_data *.
6215 (ppu2spu_sniffer): Use lambda function.
6216
6217 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6218
6219 * record-full.c (record_full_target::insert_breakpoint): Remove
6220 "struct" keyword, add const.
6221
6222 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6223
6224 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6225 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6226 * configure.ac: Remove AC_PREREQ, add missing quoting.
6227 * gnulib/configure.ac: Modernize usage of
6228 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6229 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6230 (AUTOMAKE_VERSION): Bump to 1.15.1.
6231 * configure: Re-generate.
6232 * config.in: Re-generate.
6233 * aclocal.m4: Re-generate.
6234 * gnulib/aclocal.m4: Re-generate.
6235 * gnulib/config.in: Re-generate.
6236 * gnulib/configure: Re-generate.
6237 * gnulib/import/Makefile.in: Re-generate.
6238
6239 2018-06-19 Pedro Alves <palves@redhat.com>
6240
6241 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6242 (lookup_minimal_symbol_by_pc_section): ... here with
6243 gdb_assert_not_reached added.
6244
6245 2018-06-19 Pedro Alves <palves@redhat.com>
6246
6247 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6248 parameter with a block parameter. Compare location's block symbol
6249 with the frame's block instead of addresses.
6250 (skip_inline_frames): Pass the current block instead of the
6251 frame's address. Break out as soon as we determine the frame
6252 should not be skipped.
6253
6254 2018-06-18 Tom Tromey <tom@tromey.com>
6255
6256 * solib-aix.c (solib_aix_get_section_offsets): Return
6257 unique_xmalloc_ptr.
6258 (solib_aix_solib_create_inferior_hook): Update.
6259
6260 2018-06-18 Tom Tromey <tom@tromey.com>
6261
6262 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6263
6264 2018-06-18 Tom Tromey <tom@tromey.com>
6265
6266 * solib-frv.c (frv_relocate_main_executable): Use
6267 unique_xmalloc_ptr.
6268 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6269 unique_xmalloc_ptr.
6270
6271 2018-06-18 Tom Tromey <tom@tromey.com>
6272
6273 * objfiles.h (inhibit_section_map_updates): Update.
6274 (resume_section_map_updates, resume_section_map_updates_cleanup):
6275 Remove.
6276 * solib-svr4.c (svr4_handle_solib_event): Update.
6277 * objfiles.c (inhibit_section_map_updates): Return
6278 scoped_restore_tmpl<int>.
6279 (resume_section_map_updates, resume_section_map_updates_cleanup):
6280 Remove.
6281
6282 2018-06-18 Tom Tromey <tom@tromey.com>
6283
6284 * valprint.h (read_string): Update.
6285 * valprint.c (read_string): Change type of "buffer".
6286 (val_print_string): Update.
6287 * python/py-value.c (valpy_string): Update.
6288 * language.h (struct language_defn) <la_get_string>: Change
6289 type of "buffer".
6290 (default_get_string, c_get_string): Update.
6291 * language.c (default_get_string): Change type of "buffer".
6292 * guile/scm-value.c (gdbscm_value_to_string): Update.
6293 * c-lang.c (c_get_string): Change type of "buffer".
6294
6295 2018-06-18 Tom Tromey <tom@tromey.com>
6296
6297 * ser-mingw.c (struct pipe_state_destroyer): New.
6298 (pipe_state_up): New typedef.
6299 (cleanup_pipe_state): Remove.
6300 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6301
6302 2018-06-18 Tom Tromey <tom@tromey.com>
6303
6304 * rust-lang.h (rust_yyerror): Don't declare.
6305 * rust-lang.c (rust_language_defn): Update.
6306 * rust-exp.y (yyerror): Now static.
6307 * parse.c (parse_exp_in_context_1): Update.
6308 * p-lang.h (p_yyerror): Don't declare.
6309 * p-lang.c (p_language_defn): Update.
6310 * p-exp.y (yyerror): Now static.
6311 * opencl-lang.c (opencl_language_defn): Update.
6312 * objc-lang.c (objc_language_defn): Update.
6313 * m2-lang.h (m2_yyerror): Don't declare.
6314 * m2-lang.c (m2_language_defn): Update.
6315 * m2-exp.y (yyerror): Now static.
6316 * language.h (struct language_defn) <la_error>: Remove.
6317 * language.c (unk_lang_error): Remove.
6318 (unknown_language_defn, auto_language_defn): Remove.
6319 * go-lang.h (go_yyerror): Don't declare.
6320 * go-lang.c (go_language_defn): Update.
6321 * go-exp.y (yyerror): Now static.
6322 * f-lang.h (f_yyerror): Don't declare.
6323 * f-lang.c (f_language_defn): Update.
6324 * f-exp.y (yyerror): Now static.
6325 * d-lang.h (d_yyerror): Don't declare.
6326 * d-lang.c (d_language_defn): Update.
6327 * d-exp.y (yyerror): Now static.
6328 * c-lang.h (c_yyerror): Don't declare.
6329 * c-lang.c (c_language_defn, cplus_language_defn)
6330 (asm_language_defn, minimal_language_defn): Update.
6331 * c-exp.y (yyerror): Now static.
6332 * ada-lang.h (ada_yyerror): Don't declare.
6333 * ada-lang.c (ada_language_defn): Update.
6334 * ada-exp.y (yyerror): Now static.
6335
6336 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6337
6338 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6339 (store_sveregs_to_thread): Likewise.
6340 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6341 (aarch64_linux_store_inferior_registers): Likewise.
6342 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6343 function.
6344 (aarch64_sve_regs_copy_to_regcache): Likewise.
6345 (aarch64_sve_regs_copy_from_regcache): Likewise.
6346 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6347 declaration.
6348 (aarch64_sve_regs_copy_to_regcache): Likewise.
6349 (aarch64_sve_regs_copy_from_regcache): Likewise.
6350 (sve_context): Structure from Linux headers.
6351 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6352 (SVE_SIG_ZREG_SIZE): Likewise.
6353 (SVE_SIG_PREG_SIZE): Likewise.
6354 (SVE_SIG_FFR_SIZE): Likewise.
6355 (SVE_SIG_REGS_OFFSET): Likewise.
6356 (SVE_SIG_ZREGS_OFFSET): Likewise.
6357 (SVE_SIG_ZREG_OFFSET): Likewise.
6358 (SVE_SIG_ZREGS_SIZE): Likewise.
6359 (SVE_SIG_PREGS_OFFSET): Likewise.
6360 (SVE_SIG_PREG_OFFSET): Likewise.
6361 (SVE_SIG_PREGS_SIZE): Likewise.
6362 (SVE_SIG_FFR_OFFSET): Likewise.
6363 (SVE_SIG_REGS_SIZE): Likewise.
6364 (SVE_SIG_CONTEXT_SIZE): Likewise.
6365 (SVE_PT_REGS_MASK): Likewise.
6366 (SVE_PT_REGS_FPSIMD): Likewise.
6367 (SVE_PT_REGS_SVE): Likewise.
6368 (SVE_PT_VL_INHERIT): Likewise.
6369 (SVE_PT_VL_ONEXEC): Likewise.
6370 (SVE_PT_REGS_OFFSET): Likewise.
6371 (SVE_PT_FPSIMD_OFFSET): Likewise.
6372 (SVE_PT_FPSIMD_SIZE): Likewise.
6373 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6374 (SVE_PT_SVE_PREG_SIZE): Likewise.
6375 (SVE_PT_SVE_FFR_SIZE): Likewise.
6376 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6377 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6378 (__SVE_SIG_TO_PT): Likewise.
6379 (SVE_PT_SVE_OFFSET): Likewise.
6380 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6381 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6382 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6383 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6384 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6385 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6386 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6387 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6388 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6389 (SVE_PT_SVE_SIZE): Likewise.
6390 (SVE_PT_SIZE): Likewise.
6391 (HAS_SVE_STATE): New define.
6392
6393 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6394
6395 * nat/aarch64-sve-linux-sigcontext.h: New file.
6396 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6397 new files.
6398 (SVE_VQ_MIN): Likewise.
6399 (SVE_VQ_MAX): Likewise.
6400 (SVE_VL_MIN): Likewise.
6401 (SVE_VL_MAX): Likewise.
6402 (SVE_NUM_ZREGS): Likewise.
6403 (SVE_NUM_PREGS): Likewise.
6404 (sve_vl_valid): Likewise.
6405 (struct user_sve_header): Likewise.
6406
6407 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6408 Richard Bunt <Richard.Bunt@arm.com>
6409
6410 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6411 was requested by GDB.
6412
6413 2018-06-15 Tom de Vries <tdevries@suse.de>
6414
6415 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6416
6417 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6418
6419 * gnulib/update-gnulib.sh: Print expected versions of
6420 autoconf/aclocal.
6421
6422 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6423
6424 * arch-utils.c (default_type_align): Use type_length_units.
6425 * gdbtypes.c (type_align): Use type_length_units.
6426
6427 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6428
6429 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6430 of 'define' command.
6431
6432 2018-06-14 Tom de Vries <tdevries@suse.de>
6433
6434 PR cli/22573
6435 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6436 get_no_prettyformat_print_options.
6437
6438 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6439
6440 * sparc-nat.h: Include target.h.
6441 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6442 <fetch_registers>: Remove this argument in function call.
6443 <store_registers>: Remove this argument in function call, remove
6444 extra semicolon.
6445 <low_forget_process>: Call sparc64_forget_process instead of
6446 sparc_forget_process.
6447
6448 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6449
6450 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6451 (procfs_target::make_corefile_notes): Adjust to new
6452 target_read_alloc return type.
6453
6454 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6455 Stephen Roberts <stephen.roberts@arm.com>
6456
6457 PR gdb/22882
6458 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6459 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6460 Move should_notify_stop local into more inner scope.
6461
6462 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6463 Stephen Roberts <stephen.roberts@arm.com>
6464
6465 PR gdb/22882
6466 * infrun.c (resume_1): Add call to mark_async_event_handler.
6467
6468 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6469
6470 * infrun.c (do_target_wait): Change old version of $pc printed.
6471
6472 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6473
6474 * dwarf2read.c (read_index_from_section): Rename to...
6475 (read_gdb_index_from_section): ... this, update all callers.
6476 (dwarf2_read_index): Rename to...
6477 (dwarf2_read_gdb_index): ... this, update all callers.
6478
6479 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6480
6481 * gdb/hppa-linux-nat.c
6482 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6483 hppa_linux_nat_target::fetch_registers.
6484
6485 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6486
6487 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6488 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6489 (AARCH64_DWARF_SVE_FFR): Likewise.
6490 (AARCH64_DWARF_SVE_P0): Likewise.
6491 (AARCH64_DWARF_SVE_Z0): Likewise.
6492
6493 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6494
6495 * common/common-regcache.h (raw_compare): New function.
6496 * regcache.c (regcache::raw_compare): Likewise.
6497 * regcache.h (regcache::raw_compare): New declaration.
6498
6499 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6500
6501 * common/common-regcache.h (reg_buffer_common): New structure.
6502 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6503 (reg_buffer::raw_supply): Likewise.
6504 (reg_buffer::raw_supply_integer): Likewise.
6505 (reg_buffer::raw_supply_zeroed): Likewise.
6506 (reg_buffer::raw_collect): Likewise.
6507 (reg_buffer::raw_collect_integer): Likewise.
6508 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6509 (reg_buffer::raw_supply): Likewise.
6510 (reg_buffer::raw_supply_integer): Likewise.
6511 (reg_buffer::raw_supply_zeroed): Likewise.
6512 (reg_buffer::raw_collect): Likewise.
6513 (reg_buffer::raw_collect_integer): Likewise.
6514
6515 2018-06-10 Tom Tromey <tom@tromey.com>
6516
6517 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6518 (class remote_state) <stop_reply_queue>: Now std::vector.
6519 (remote_state::~remote_state)
6520 (remote_target::stop_reply_queue_length): Update.
6521 (struct queue_iter_param, remove_child_of_pending_fork)
6522 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6523 (check_pending_event_prevents_wildcard_vcont_callback)
6524 (remove_stop_reply_for_inferior)
6525 (remove_stop_reply_of_remote_state)
6526 (remote_notif_remove_once_on_match)
6527 (stop_reply_match_ptid_and_ws)
6528 (remote_kill_child_of_pending_fork): Remove.
6529 (remote_target::remove_new_fork_children)
6530 (remote_target::check_pending_events_prevent_wildcard_vcont)
6531 (remote_target::discard_pending_stop_replies)
6532 (remote_target::discard_pending_stop_replies_in_queue)
6533 (remote_target::remote_notif_remove_queued_reply)
6534 (remote_target::queued_stop_reply)
6535 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6536 (remote_target::wait, remote_target::kill_new_fork_children)
6537 (remote_target::async): Update.
6538
6539 2018-06-10 Tom Tromey <tom@tromey.com>
6540
6541 * record-full.c (record_full_arch_list_cleanups): Remove.
6542 (record_full_message): Use try/catch.
6543 (record_full_wait_cleanups): Remove.
6544 (record_full_wait_1): Use try/catch.
6545 (record_full_restore): Likewise.
6546
6547 2018-06-10 Tom Tromey <tom@tromey.com>
6548
6549 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6550 declare VEC. Add constructor.
6551 <in_target_beneath>: Now bool.
6552 (record_full_breakpoints): Now a std::vector, static.
6553 (record_full_sync_record_breakpoints)
6554 (record_full_init_record_breakpoints)
6555 (record_full_target::insert_breakpoint)
6556 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6557
6558 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6559
6560 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6561 * serial.c (serial_interface_lookup): Remove struct keyword.
6562
6563 2018-06-10 Tom Tromey <tom@tromey.com>
6564
6565 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6566 method.
6567 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6568 a method.
6569 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6570 method.
6571 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6572 "beneath" as a method.
6573 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6574 Use "beneath" as a method.
6575
6576 2018-06-10 Tom Tromey <tom@tromey.com>
6577
6578 * tracefile.c (struct trace_file_writer_deleter): New.
6579 <operator()>: Rename from trace_file_writer_xfree.
6580 (trace_file_writer_up): New typedef.
6581 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6582
6583 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6584
6585 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6586 <m_registers, m_register_status>: Change type to
6587 std::unique_ptr.
6588 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6589 XCNEWVEC.
6590
6591 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6592
6593 * common/common-regcache.h (enum register_status): Add
6594 underlying type "signed char".
6595 * regcache.h (reg_buffer) <m_register_status>: Change type to
6596 register_status *.
6597 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6598 register_status instead of signed char.
6599 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6600 (reg_buffer::get_register_status): Remove cast.
6601 (readable_regcache::raw_read): Remove cast.
6602 (readable_regcache::cooked_read): Remove cast.
6603
6604 2018-06-09 Tom Tromey <tom@tromey.com>
6605
6606 * source.c (reverse_search_command, forward_search_command): Use
6607 scoped_fd.
6608
6609 2018-06-09 Tom Tromey <tom@tromey.com>
6610
6611 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6612 (serial_ops_list): Now static, std::vector.
6613 (serial_interface_lookup, serial_add_interface): Update.
6614
6615 2018-06-09 Tom Tromey <tom@tromey.com>
6616
6617 * dwarf2read.c (process_cu_includes): Update.
6618 (process_full_comp_unit): Update.
6619 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6620 std::vector.
6621
6622 2018-06-08 Paul Koning <paul_koning@dell.com>
6623
6624 PR gdb/23252
6625
6626 * python/python.c (do_start_initialization):
6627 Avoid call to internal Python API.
6628 (init__gdb_module): New function.
6629
6630 2018-06-08 Gary Benson <gbenson@redhat.com>
6631
6632 * linux-thread-db.c (valprint.h): New include.
6633 (struct check_thread_db_info): New structure.
6634 (check_thread_db_on_load, tdb_testinfo): New static globals.
6635 (check_thread_db, check_thread_db_callback): New functions.
6636 (try_thread_db_load_1): Run integrity checks if requested.
6637 (maintenance_check_libthread_db): New function.
6638 (_initialize_thread_db): Register "maint check libthread-db"
6639 and "maint set/show check-libthread-db".
6640 * NEWS: Mention the above new commands.
6641
6642 2018-06-08 Tom Tromey <tom@tromey.com>
6643
6644 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6645 now a method.
6646
6647 2018-06-08 Tom Tromey <tom@tromey.com>
6648
6649 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6650
6651 2018-06-08 Tom Tromey <tom@tromey.com>
6652
6653 * common/btrace-common.h (struct btrace_data): Add constructor,
6654 destructor, move assignment operator.
6655 <empty, clear, fini>: New methods.
6656 <format>: Initialize.
6657 (btrace_data_init, btrace_data_fini, btrace_data_clear)
6658 (btrace_data_empty): Don't declare.
6659 * common/btrace-common.c (btrace_data_init): Remove.
6660 (btrace_data::fini): Rename from btrace_data_fini.
6661 (btrace_data::empty): Rename from btrace_data_empty.
6662 (btrace_data::clear): Rename from btrace_data_clear. Return
6663 bool.
6664 * btrace.h (make_cleanup_btrace_data): Don't declare.
6665 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6666 (parse_xml_btrace): Update.
6667 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6668 (maint_btrace_clear_packet_history_cmd): Update.
6669
6670 2018-06-07 Pedro Alves <palves@redhat.com>
6671
6672 * target.h (target_ops) <beneath>: Now a method. All references
6673 updated.
6674 (class target_stack): New.
6675 * target.c (g_target_stack): New.
6676 (g_current_top_target): Delete.
6677 (current_top_target): Get the top target out of g_target_stack.
6678 (target_stack::push, target_stack::unpush): New.
6679 (push_target, unpush_target): Reimplement.
6680 (target_is_pushed): Reimplement in terms of g_target_stack.
6681 (target_ops::beneath, target_stack::find_beneath): New.
6682
6683 2018-06-07 Pedro Alves <palves@redhat.com>
6684
6685 * target.h (find_target_beneath): Delete declaration.
6686 * target.c (find_target_beneath): Delete definition.
6687 * aix-thread.c: All callers of find_target_beneath adjusted to
6688 call target_ops::beneath instead.
6689 * bsd-uthread.c: Likewise.
6690 * linux-thread-db.c: Likewise.
6691 * ravenscar-thread.c: Likewise.
6692 * sol-thread.c: Likewise.
6693 * spu-multiarch.c: Likewise.
6694
6695 2018-06-07 Pedro Alves <palves@redhat.com>
6696
6697 * target.h (target_ops) <beneath>: Now a method. All references
6698 updated.
6699 (target_ops) <m_beneath>: New.
6700 * target.c (target_ops::beneath): New.
6701 * corelow.c: Adjust all references to target_ops::beneath.
6702 * linux-thread-db.c: Likewise.
6703 * make-target-delegates: Likewise.
6704 * record-btrace.c: Likewise.
6705 * record-full.c: Likewise.
6706 * remote.c: Likewise.
6707 * target.c: Likewise.
6708 * target-delegates.c: Regenerate.
6709
6710 2018-06-07 Pedro Alves <palves@redhat.com>
6711
6712 * target.h (target_stack): Delete.
6713 (current_top_target): Declare function.
6714 * target.c (target_stack): Delete.
6715 (g_current_top_target): New.
6716 (current_top_target): New function.
6717 * auxv.c: Use current_top_target instead of target_stack
6718 throughout.
6719 * avr-tdep.c: Likewise.
6720 * breakpoint.c: Likewise.
6721 * corefile.c: Likewise.
6722 * elfread.c: Likewise.
6723 * eval.c: Likewise.
6724 * exceptions.c: Likewise.
6725 * frame.c: Likewise.
6726 * gdbarch-selftests.c: Likewise.
6727 * gnu-v3-abi.c: Likewise.
6728 * ia64-tdep.c: Likewise.
6729 * ia64-vms-tdep.c: Likewise.
6730 * infcall.c: Likewise.
6731 * infcmd.c: Likewise.
6732 * infrun.c: Likewise.
6733 * linespec.c: Likewise.
6734 * linux-tdep.c: Likewise.
6735 * minsyms.c: Likewise.
6736 * ppc-linux-nat.c: Likewise.
6737 * ppc-linux-tdep.c: Likewise.
6738 * procfs.c: Likewise.
6739 * regcache.c: Likewise.
6740 * remote.c: Likewise.
6741 * rs6000-tdep.c: Likewise.
6742 * s390-linux-nat.c: Likewise.
6743 * s390-tdep.c: Likewise.
6744 * solib-aix.c: Likewise.
6745 * solib-darwin.c: Likewise.
6746 * solib-dsbt.c: Likewise.
6747 * solib-spu.c: Likewise.
6748 * solib-svr4.c: Likewise.
6749 * solib-target.c: Likewise.
6750 * sparc-tdep.c: Likewise.
6751 * sparc64-tdep.c: Likewise.
6752 * spu-tdep.c: Likewise.
6753 * symfile.c: Likewise.
6754 * symtab.c: Likewise.
6755 * target-descriptions.c: Likewise.
6756 * target-memory.c: Likewise.
6757 * target.c: Likewise.
6758 * target.h: Likewise.
6759 * tracefile-tfile.c: Likewise.
6760 * tracepoint.c: Likewise.
6761 * valops.c: Likewise.
6762 * valprint.c: Likewise.
6763 * value.c: Likewise.
6764 * windows-tdep.c: Likewise.
6765 * mi/mi-main.c: Likewise.
6766
6767 2018-06-07 Tom Tromey <tom@tromey.com>
6768
6769 * valprint.h (build_address_symbolic): Declare.
6770 * printcmd.c (print_address_symbolic): Update.
6771 (build_address_symbolic): Change "name" and "filename" to
6772 std::string.
6773 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6774 Update.
6775 * defs.h (build_address_symbolic): Remove declaration.
6776
6777 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6778
6779 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6780 (aarch64_vnv_type): Add function.
6781 (aarch64_pseudo_register_name): Add V regs for SVE.
6782 (aarch64_pseudo_register_type): Likewise.
6783 (aarch64_pseudo_register_reggroup_p): Likewise.
6784 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6785 (aarch64_pseudo_read_value): Add V regs for SVE.
6786 (aarch64_pseudo_write_2): Use V0 offset for SVE
6787 (aarch64_pseudo_write): Add V regs for SVE.
6788 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6789
6790 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6791
6792 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6793 (sve_vl_from_vq): Likewise.
6794
6795 2018-06-05 Tom Tromey <tom@tromey.com>
6796
6797 * cli/cli-cmds.c (show_version): Update.
6798 * top.c (print_gdb_version): Add "interactive" parameter.
6799 Update.
6800 * main.c (captured_main_1): Update.
6801 * top.h (print_gdb_version): Add "interactive" parameter and a
6802 comment.
6803
6804 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6805
6806 * common/enum-flags.h: Add trailing semicolon to example in
6807 comment.
6808
6809 2018-06-05 Tom Tromey <tom@tromey.com>
6810
6811 PR cli/12326:
6812 * NEWS: Add entry about pager.
6813 * utils.c (pagination_disabled_for_command): New global.
6814 (prompt_for_continue): Allow "c" response to prompt.
6815 (reinitialize_more_filter): Clear
6816 pagination_disabled_for_command.
6817 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6818
6819 2018-06-04 Tom Tromey <tom@tromey.com>
6820
6821 * ada-lang.h (ada_lookup_symbol_list): Update.
6822 * ada-lang.c (resolve_subexp): Update.
6823 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6824 parameter.
6825 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6826 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6827 results parameter to std::vector.
6828 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6829 Update.
6830 * ada-exp.y (block_lookup): Update.
6831 (select_possible_type_sym): Change type of syms. Remove nsyms
6832 parameter.
6833 (write_var_or_type, write_name_assoc): Update.
6834
6835 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6836
6837 * windows-nat.c (windows_nat_target::xfer_partial): Return
6838 TARGET_XFER_E_IO if we need to delegate to the target beneath
6839 but BENEATH is NULL.
6840
6841 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6842
6843 * Makefile.in (config.status): Add configure.nat as a
6844 dependency.
6845
6846 2018-06-04 Tom Tromey <tom@tromey.com>
6847
6848 * cp-name-parser.y (cpname_state): Add method declarations.
6849 (HANDLE_QUAL): Update.
6850 (cpname_state::d_grab, cpname_state::fill_comp)
6851 (cpname_state::make_operator, cpname_state::make_dtor)
6852 (cpname_state::make_builtin_type, cpname_state::make_name)
6853 (cpname_state::d_qualify, cpname_state::d_int_type)
6854 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6855 (%union): Move earlier.
6856
6857 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6858
6859 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6860
6861 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6862
6863 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6864 (aarch64_pseudo_write_1): Likewise.
6865 (aarch64_pseudo_read_value): Use helper.
6866 (aarch64_pseudo_write): Likewise.
6867
6868 2018-06-04 Pedro Alves <palves@redhat.com>
6869
6870 * darwin-nat.c (darwin_ops): Delete.
6871 (darwin_attach_pid): Use get_native_target.
6872
6873 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6874
6875 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6876 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6877
6878 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6879
6880 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6881 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6882 (aarch64_gdbarch_init): Check for SVE.
6883 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6884
6885 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6886
6887 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6888 * aarch64-tdep.h (aarch64_read_description): Likewise.
6889 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6890 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6891 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6892 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6893 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6894
6895 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6896
6897 * value.c (value_fetch_lazy_bitfield): New.
6898 (value_fetch_lazy_memory): New.
6899 (value_fetch_lazy_register): New.
6900 (value_fetch_lazy): Factor out to smaller functions.
6901
6902 2018-06-01 Tom Tromey <tom@tromey.com>
6903
6904 * cp-name-parser.y (backslashable, represented): Now const.
6905
6906 2018-06-01 Tom Tromey <tom@tromey.com>
6907
6908 * cp-name-parser.y: Include parser-defs.h.
6909 (parser_fprintf): Remove declaration.
6910
6911 2018-06-01 Tom Tromey <tom@tromey.com>
6912
6913 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6914 %parse-param.
6915 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6916 (global_result): Remove globals.
6917 (struct cpname_state): New.
6918 (yyparse): Don't declare.
6919 (yylex, yyerror): Move declarations after %union.
6920 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6921 (make_name): Add state parameter.
6922 Update all callers.
6923 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6924 parameter.
6925 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6926 Update.
6927 (yylex): Add lvalp, state parameters.
6928 (yyerror): Add state parameter.
6929 (cp_demangled_name_to_comp): Update.
6930
6931 2018-06-01 Tom Tromey <tom@tromey.com>
6932
6933 * cp-name-parser.y (parser_fprintf): Declare.
6934 (GDB_YY_REMAP_PREFIX): Define.
6935 Include yy-remap.h. Don't redefine yy* identifiers.
6936
6937 2018-06-01 Tom Tromey <tom@tromey.com>
6938
6939 * python/py-type.c (typy_legacy_template_argument): Update.
6940 * cp-support.h (cp_demangled_name_to_comp): Update.
6941 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6942 parameter to be a "std::string *".
6943 (main): Update.
6944
6945 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6946
6947 * ada-lex.l: Include "diagnostics.h" instead of
6948 "common/diagnostics.h".
6949 * unittests/environ-selftests.c: Likewise.
6950 * common/diagnostics.h: Moved to ../include.
6951
6952 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6953
6954 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6955 to language_mode_manual while calling breakpoint_re_set_one.
6956
6957 2018-06-01 Tom Tromey <tom@tromey.com>
6958
6959 * valops.c (value_cast_structs, destructor_name_p): Update.
6960 * symtab.c (gdb_mangle_name): Update.
6961 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6962 Update.
6963 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6964 (pascal_object_print_value_fields, pascal_object_print_value):
6965 Update.
6966 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6967 * linespec.c (find_methods): Update.
6968 * gdbtypes.h (type_name_no_tag): Remove.
6969 (type_name_or_error): Rename from type_name_no_tag_or_error.
6970 * gdbtypes.c (type_name_no_tag): Remove.
6971 (type_name_or_error): Rename from type_name_no_tag_or_error.
6972 (lookup_struct_elt_type, check_typedef): Update.
6973 * expprint.c (print_subexp_standard): Update.
6974 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6975 * d-namespace.c (d_lookup_nested_symbol): Update.
6976 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6977 (cp_print_class_member): Update.
6978 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6979 * completer.c (add_struct_fields): Update.
6980 * c-typeprint.c (cp_type_print_derivation_info)
6981 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6982 Update.
6983 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6984 (ada_prefer_type, ada_is_exception_sym): Update.
6985
6986 2018-06-01 Tom Tromey <tom@tromey.com>
6987
6988 * valops.c (enum_constant_from_type, value_namespace_elt)
6989 (value_maybe_namespace_elt): Update.
6990 * valarith.c (find_size_for_pointer_math): Update.
6991 * target-descriptions.c (make_gdb_type): Update.
6992 * symmisc.c (print_symbol): Update.
6993 * stabsread.c (define_symbol, read_type)
6994 (complain_about_struct_wipeout, add_undefined_type)
6995 (cleanup_undefined_types_1): Update.
6996 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6997 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6998 (rust_internal_print_type, rust_composite_type)
6999 (rust_evaluate_funcall, rust_evaluate_subexp)
7000 (rust_inclusive_range_type_p): Update.
7001 * python/py-type.c (typy_get_tag): Update.
7002 * p-typeprint.c (pascal_type_print_base): Update.
7003 * mdebugread.c (parse_symbol, parse_type): Update.
7004 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7005 Update.
7006 * guile/scm-type.c (gdbscm_type_tag): Update.
7007 * go-lang.c (sixg_string_p): Update.
7008 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7009 Update.
7010 * gdbtypes.h (struct main_type) <tag_name>: Remove.
7011 (TYPE_TAG_NAME): Remove.
7012 * gdbtypes.c (type_name_no_tag): Simplify.
7013 (check_typedef, check_types_equal, recursive_dump_type)
7014 (copy_type_recursive, arch_composite_type): Update.
7015 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
7016 in summary mode when needed.
7017 * eval.c (evaluate_funcall): Update.
7018 * dwarf2read.c (fixup_go_packaging, read_structure_type)
7019 (process_structure_scope, read_enumeration_type)
7020 (read_namespace_type, read_module_type, determine_prefix): Update.
7021 * cp-support.c (inspect_type): Update.
7022 * coffread.c (process_coff_symbol, decode_base_type): Update.
7023 * c-varobj.c (c_is_path_expr_parent): Update.
7024 * c-typeprint.c (c_type_print_base_struct_union): Update.
7025 (c_type_print_base_1): Update. Print struct/class/union/enum in
7026 summary when using C language.
7027 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7028 (gen_maybe_namespace_elt): Update.
7029 * ada-lang.c (ada_type_name): Simplify.
7030 (empty_record, ada_template_to_fixed_record_type_1)
7031 (template_to_static_fixed_type)
7032 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7033
7034 2018-06-01 Tom Tromey <tom@tromey.com>
7035
7036 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7037 c_print_type.
7038 * c-typeprint.c (c_print_type_1): Add "language" parameter.
7039 (c_print_type): Update.
7040 (c_print_type): New overload.
7041 (c_type_print_varspec_prefix, c_type_print_args)
7042 (c_type_print_varspec_suffix, c_print_type_no_offsets)
7043 (c_type_print_base_struct_union, c_type_print_base_1)
7044 (cp_type_print_method_args): Add "language" parameter.
7045 (c_type_print_base): Update.
7046 * c-lang.h (c_print_type): Add new overload.
7047
7048 2018-06-01 Tom Tromey <tom@tromey.com>
7049
7050 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7051 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7052
7053 2018-06-01 Alan Hayward <alan.hayward@arm.com>
7054
7055 * aarch64-tdep.c (aarch64_sve_register_names): New const
7056 var.
7057 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7058 (AARCH64_SVE_Z_REGS_NUM): New define.
7059 (AARCH64_SVE_P_REGS_NUM): Likewise.
7060 (AARCH64_SVE_NUM_REGS): Likewise.
7061
7062 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7063
7064 * nat/linux-ptrace.h [__alpha__]
7065 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7066 definitions.
7067
7068 2018-05-31 Maciej W. Rozycki <macro@mips.com>
7069
7070 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7071 the endianness selected.
7072 * NEWS: Document `set endian auto' mode operation update.
7073
7074 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7075
7076 * Makefile.in: Add new header.
7077 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7078 (sve_vl_from_vg): Likewise.
7079 (sve_vq_from_vl): Likewise.
7080 (sve_vl_from_vq): Likewise.
7081 (sve_vq_from_vg): Likewise.
7082 (sve_vg_from_vq): Likewise.
7083 * configure.nat: Add new c file.
7084 * nat/aarch64-sve-linux-ptrace.c: New file.
7085 * nat/aarch64-sve-linux-ptrace.h: New file.
7086
7087 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7088
7089 * aarch64-linux-nat.c (aarch64_linux_read_description):
7090 Add parmeter zero.
7091 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7092 Likewise.
7093 * aarch64-tdep.c (tdesc_aarch64_list): Add.
7094 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7095 (aarch64_gdbarch_init): Add parmeter zero.
7096 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7097 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7098 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7099 parmeter.
7100 * doc/gdb.texinfo: Describe SVE feature
7101 * features/aarch64-sve.c: New file.
7102
7103 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
7104
7105 PR gdb/23210
7106 * gdbarch.sh (significant_addr_bit): Default to zero when
7107 not set by target architecture.
7108 * gdbarch.c: Re-generated.
7109 * utils.c (address_significant): Update.
7110
7111 2018-05-30 Joel Brobecker <brobecker@adacore.com>
7112
7113 * stack.c (func_command): Remove trailing newline in call to error.
7114
7115 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7116
7117 * regcache.h (regcache_raw_collect): Remove, update callers to
7118 use regcache::raw_collect.
7119 * regcache.c (regcache_raw_collect): Remove.
7120
7121 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7122
7123 * regcache.h (regcache_raw_supply): Remove, update callers to
7124 use detached_regcache::raw_supply.
7125 * regcache.c (regcache_raw_supply): Remove.
7126
7127 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7128
7129 * regcache.h (regcache_cooked_write_part): Remove, update
7130 callers to use regcache::cooked_write_part.
7131 * regcache.c (regcache_cooked_write_part): Remove.
7132
7133 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7134
7135 * regcache.h (regcache_cooked_read_part): Remove, update callers
7136 to use readable_regcache::cooked_read_part.
7137 * regcache.c (regcache_cooked_read_part): Remove.
7138
7139 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7140
7141 * regcache.h (regcache_cooked_read_value): Remove, update
7142 callers to use readable_regcache::cooked_read_value.
7143 * regcache.c (regcache_cooked_read_value): Remove.
7144
7145 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7146
7147 * regcache.h (regcache_cooked_write): Remove, update callers to
7148 use regcache::cooked_write.
7149 * regcache.c (regcache_cooked_write): Remove.
7150
7151 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7152
7153 * regcache.h (regcache_invalidate): Remove, update callers to
7154 use detached_regcache::invalidate instead.
7155 * regcache.c (regcache_invalidate): Remove.
7156
7157 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7158
7159 * regcache.h (regcache_raw_write_part): Remove, update callers
7160 to use regcache::raw_write_part instead.
7161 * regcache.c (regcache_raw_write_part): Remove.
7162
7163 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7164
7165 * regcache.h (regcache_raw_read_part): Remove, update callers to
7166 use readable_regcache::raw_read_part instead.
7167 * regcache.c (regcache_raw_read_part): Remove.
7168
7169 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7170
7171 * regcache.h (regcache_cooked_read): Remove, update callers to
7172 use readable_regcache::cooked_read instead.
7173 * regcache.c (regcache_cooked_read): Remove.
7174
7175 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7176
7177 * regcache.h (regcache_raw_write): Remove, update callers to use
7178 regcache::raw_write instead.
7179 * regcache.c (regcache_raw_write): Remove.
7180
7181 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7182
7183 * regcache.h (regcache_raw_read): Remove, update callers to use
7184 readable_regcache::raw_read instead.
7185 * regcache.c (regcache_raw_read): Remove.
7186
7187 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7188
7189 * regcache.h (regcache_raw_update): Remove, update callers to
7190 use readable_regcache::raw_update instead.
7191 * regcache.c (regcache_raw_update): Remove.
7192
7193 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7194
7195 * regcache.h (regcache_register_status): Remove, update callers
7196 to use reg_buffer::get_register_status directly instead.
7197 * regcache.c (regcache_register_status): Remove.
7198
7199 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7200
7201 * regcache.h (regcache_get_ptid): Remove, update all callers to
7202 call regcache::ptid instead.
7203 * regcache.c (regcache_get_ptid): Remove.
7204
7205 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7206
7207 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7208
7209 2018-05-30 Pedro Alves <palves@redhat.com>
7210
7211 * common/common-exceptions.h (exception_rethrow): Use
7212 ATTRIBUTE_NORETURN.
7213
7214 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7215
7216 * breakpoint.c (print_solib_event, check_status_catch_solib):
7217 Remove struct keyword in range-based for loops.
7218 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7219 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7220 Likewise.
7221 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7222 Likewise.
7223 * symfile.c (addr_info_make_relative): Likewise.
7224 * thread.c (value_in_thread_stack_temporaries): Likewise.
7225
7226 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7227
7228 PR gdb/16841
7229 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7230 aggregate type to get its real type before accessing it.
7231
7232 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7233
7234 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7235 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7236 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7237 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7238 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7239 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7240 * printcmd.c (info_address_command): Likewise.
7241
7242 2018-05-29 Tom Tromey <tom@tromey.com>
7243
7244 * windows-nat.c (handle_exception): Update fall-through comment.
7245
7246 2018-05-29 Tom Tromey <tom@tromey.com>
7247
7248 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7249 (struct program_space) <added_solibs>: Now a std::vector.
7250 * breakpoint.c (print_solib_event): Update.
7251 (check_status_catch_solib): Update.
7252 * progspace.c (clear_program_space_solib_cache): Update.
7253 * solib.c (update_solib_list): Update.
7254
7255 2018-05-29 Tom Tromey <tom@tromey.com>
7256
7257 * python/py-type.c (typy_richcompare): Update.
7258 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7259 * gdbtypes.h (types_deeply_equal): Return bool.
7260 (types_equal): Likewise.
7261 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7262 declare VEC.
7263 (check_types_equal): Change worklist to std::vector. Return
7264 bool.
7265 (struct type_equality_entry): Add constructor.
7266 (compare_maybe_null_strings): Return bool.
7267 (check_types_worklist): Return bool. Change worklist to
7268 std::vector.
7269 (types_deeply_equal): Use std::vector.
7270 (types_equal): Return bool.
7271 (compare_maybe_null_strings): Simplify.
7272
7273 2018-05-29 Tom Tromey <tom@tromey.com>
7274
7275 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7276
7277 2018-05-29 Tom Tromey <tom@tromey.com>
7278
7279 * objc-lang.h: Don't include cp-support.h.
7280 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7281 declare VEC.
7282
7283 2018-05-27 Tom Tromey <tom@tromey.com>
7284
7285 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7286
7287 2018-05-25 Tom Tromey <tom@tromey.com>
7288
7289 * value.c (value::location): Initialize.
7290
7291 2018-05-25 Tom Tromey <tom@tromey.com>
7292
7293 * dbxread.c (init_bincl_list): Remove.
7294 (bincl_list): Now a std::vector.
7295 (bincls_allocated, next_bincl): Remove.
7296 (free_bincl_list, do_free_bincl_list_cleanup)
7297 (make_cleanup_free_bincl_list): Remove.
7298 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7299 unique_xmalloc_ptr.
7300 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7301 (struct header_file_location): Add constructor.
7302 (add_bincl_to_list): Remove.
7303
7304 2018-05-25 Tom Tromey <tom@tromey.com>
7305
7306 * tui/tui.c (tui_enable): Update.
7307 * mi/mi-interp.c (mi_interp::init): Update.
7308 * interps.h (class interp) <name>: New method.
7309 <m_name>: Rename from name.
7310 (~scoped_restore_interp): Update.
7311 * interps.c (interp::interp): Update.
7312 (interp_add, interp_set, interp_lookup_existing)
7313 (current_interp_named_p): Update.
7314
7315 2018-05-25 Tom Tromey <tom@tromey.com>
7316
7317 * interps.c (interp_name): Remove.
7318 * mi/mi-interp.c (mi_interp::init): Update.
7319 * interps.h (interp_name): Remove.
7320 (~scoped_restore_interp): Update.
7321 * tui/tui.c (tui_enable): Update.
7322
7323 2018-05-25 Tom Tromey <tom@tromey.com>
7324
7325 * utils.c (fputs_maybe_filtered): Update.
7326 * linespec.c (decode_line_full): Update.
7327 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7328 (mi_print_breakpoint_for_event, mi_solib_loaded)
7329 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7330 (mi_user_selected_context_changed): Update.
7331 * mi/mi-main.c (mi_execute_command): Update.
7332 * cli/cli-script.c (execute_control_command): Update.
7333 * python/python.c (execute_gdb_command): Update.
7334 * solib.c (info_sharedlibrary_command): Update.
7335 * interps.c (interp_ui_out): Remove.
7336 * interps.h (interp_ui_out): Remove.
7337
7338 2018-05-25 Tom Tromey <tom@tromey.com>
7339
7340 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7341 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7342 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7343
7344 2018-05-25 Tom Tromey <tom@tromey.com>
7345
7346 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7347 * interps.c (interp_exec): Use scoped_restore.
7348
7349 2018-05-25 Tom Tromey <tom@tromey.com>
7350
7351 * remote.c (remote_target::remote_file_get): Use
7352 gdb::byte_vector.
7353 (remote_target::remote_file_put): Likewise.
7354
7355 2018-05-25 Tom Tromey <tom@tromey.com>
7356
7357 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7358 a std::string.
7359 (get_pe_section_index, add_pe_exported_sym): Update.
7360 (read_pe_exported_syms): Use gdb::def_vector.
7361
7362 2018-05-25 Tom Tromey <tom@tromey.com>
7363
7364 * frame.c (remove_prev_frame): Remove.
7365 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7366
7367 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7368
7369 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7370 Remove prototypes.
7371 * mips-linux-nat.c (supply_fpregset): Always call
7372 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7373 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7374 `mips_fill_fpregset'.
7375 * mips-linux-tdep.c (mips_supply_fpregset)
7376 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7377 (mips_fill_fpregset_wrapper): Remove functions.
7378 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7379 (mips_linux_fpregset): Remove variable.
7380 (mips_linux_iterate_over_regset_sections): Use
7381 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7382 (mips_linux_o32_sigframe_init): Remove comment.
7383
7384 2018-05-25 Pedro Alves <palves@redhat.com>
7385
7386 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7387 (struct readahead_cache, struct packet_reg, struct
7388 remote_arch_state, class remote_state): Move higher up in the
7389 file.
7390 (remote_target::m_remote_state): Now an object instead of a pointer.
7391 (remote_target::get_remote_state): Adjust.
7392
7393 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7394
7395 * stack.c (select_and_print_frame): Delete.
7396 (struct function_bounds): Move struct within function.
7397 (func_command): Most content moved into new function
7398 find_frame_for_function, use new function, print result, add
7399 function comment.
7400 (find_frame_for_function): New function, now returns a result.
7401
7402 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7403
7404 * stack.c (iterate_over_block_arg_vars): Fix comment.
7405 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7406
7407 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7408
7409 PR gdb/23203
7410 * frame.c
7411 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7412 Define.
7413 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7414 Define.
7415 * frame.h (class scoped_restore_selected_frame): New class.
7416 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7417 of any exception, use scoped_restore_selected_frame to restore the
7418 frame instead.
7419
7420 2018-05-24 Pedro Alves <palves@redhat.com>
7421
7422 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7423 override.
7424
7425 2018-05-23 Tom Tromey <tom@tromey.com>
7426
7427 * complaints.c (struct complaints): Remove.
7428 (symfile_complaint_book): Remove.
7429 (series): New global.
7430 (complaint_internal): Update.
7431 (clear_complaints): Update.
7432
7433 2018-05-23 Tom Tromey <tom@tromey.com>
7434
7435 * complaints.c (counters): New global.
7436 (struct complain): Remove.
7437 (struct complaints) <root>: Remove.
7438 (complaint_sentinel): Remove.
7439 (symfile_complaint_book): Update.
7440 (find_complaint) Remove.
7441 (complaint_internal, clear_complaints): Update.
7442
7443 2018-05-23 Tom Tromey <tom@tromey.com>
7444
7445 * complaints.c (struct complain) <file, line>: Remove.
7446 (find_complaint): Remove file, line parameters.
7447 (complaint_internal): Update.
7448
7449 2018-05-23 Tom Tromey <tom@tromey.com>
7450
7451 * complaints.c (vcomplaint): Remove.
7452 (complaint_internal) Merge in contents of vcomplaint.
7453
7454 2018-05-23 Tom Tromey <tom@tromey.com>
7455
7456 * complaints.c (struct complaints) <explanation>: Remove.
7457 (symfile_explanations): Remove.
7458 (symfile_complaint_book): Update.
7459 (vcomplaint): Update.
7460 (struct explanation): Remove.
7461
7462 2018-05-23 Tom Tromey <tom@tromey.com>
7463
7464 * complaints.c (symfile_complaints): Remove.
7465 (complaint_internal): Remove "complaints" parameter.
7466 (clear_complaints, vcomplaint): Remove "c" parameter.
7467 (get_complaints): Remove.
7468 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7469 (dwarf2_debug_line_missing_file_complaint)
7470 (dwarf2_debug_line_missing_end_sequence_complaint)
7471 (dwarf2_complex_location_expr_complaint)
7472 (dwarf2_const_value_length_mismatch_complaint)
7473 (dwarf2_section_buffer_overflow_complaint)
7474 (dwarf2_macro_malformed_definition_complaint)
7475 (dwarf2_invalid_attrib_class_complaint)
7476 (create_addrmap_from_index, dw2_symtab_iter_next)
7477 (dw2_expand_marked_cus)
7478 (dw2_debug_names_iterator::find_vec_in_debug_names)
7479 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7480 (create_debug_type_hash_table, init_cutu_and_read_dies)
7481 (partial_die_parent_scope, add_partial_enumeration)
7482 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7483 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7484 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7485 (create_cus_hash_table, create_dwp_hash_table)
7486 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7487 (dwarf2_rnglists_process, dwarf2_ranges_process)
7488 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7489 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7490 (handle_struct_member_die, process_structure_scope)
7491 (read_array_type, read_common_block, read_module_type)
7492 (read_tag_pointer_type, read_typedef, read_base_type)
7493 (read_subrange_type, load_partial_dies, partial_die_info::read)
7494 (partial_die_info::read, partial_die_info::read)
7495 (partial_die_info::read, read_checked_initial_length_and_offset)
7496 (dwarf2_string_attr, read_formatted_entries)
7497 (dwarf_decode_line_header)
7498 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7499 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7500 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7501 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7502 (get_signatured_type, get_DW_AT_signature_type)
7503 (decode_locdesc, file_file_name, consume_improper_spaces)
7504 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7505 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7506 (dwarf2_symbol_mark_computed, set_die_type)
7507 (read_attribute_value): Update.
7508 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7509 Update.
7510 * dbxread.c (unknown_symtype_complaint)
7511 (lbrac_mismatch_complaint, repeated_header_complaint)
7512 (set_namestring, function_outside_compilation_unit_complaint)
7513 (read_dbx_symtab, process_one_symbol): Update.
7514 * gdbtypes.c (stub_noname_complaint): Update.
7515 * windows-nat.c (handle_unload_dll): Update.
7516 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7517 (decode_base_type): Update.
7518 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7519 (eb_complaint, record_include_begin, record_include_end)
7520 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7521 (process_xcoff_symbol, read_symbol)
7522 (function_outside_compilation_unit_complaint)
7523 (scan_xcoff_symtab): Update.
7524 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7525 * buildsym.c (finish_block_internal, make_blockvector)
7526 (end_symtab_get_static_block, augment_type_symtab): Update.
7527 * dtrace-probe.c (dtrace_process_dof)
7528 (dtrace_static_probe_ops::get_probes): Update.
7529 * complaints.h (struct complaint): Don't declare.
7530 (symfile_complaints): Remove.
7531 (complaint_internal): Remove "complaints" parameter.
7532 (complaint): Likewise.
7533 (clear_complaints): Likewise.
7534 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7535 (reread_symbols): Update.
7536 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7537 (dwarf2_frame_cache, decode_frame_entry): Update.
7538 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7539 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7540 (info_selectors_command): Update.
7541 * macrotab.c (macro_include, check_for_redefinition)
7542 (macro_undef): Update.
7543 * objfiles.c (filter_overlapping_sections): Update.
7544 * stabsread.c (invalid_cpp_abbrev_complaint)
7545 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7546 (define_symbol, error_type, read_type, rs6000_builtin_type)
7547 (stabs_method_name_from_physname, read_member_functions)
7548 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7549 (attach_fields_to_type, complain_about_struct_wipeout)
7550 (read_range_type, read_args, common_block_start)
7551 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7552 Update.
7553 * mdebugread.c (index_complaint, unknown_ext_complaint)
7554 (basic_type_complaint, bad_tag_guess_complaint)
7555 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7556 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7557 (parse_procedure, parse_lines)
7558 (function_outside_compilation_unit_complaint)
7559 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7560 (bad_tag_guess_complaint, reg_value_complaint): Update.
7561 * cp-support.c (demangled_name_complaint): Update.
7562 * macroscope.c (sal_macro_scope): Update.
7563 * dwarf-index-write.c (class debug_names): Update.
7564
7565 2018-05-23 Tom Tromey <tom@tromey.com>
7566
7567 * complaints.c (clear_complaints): Remove "noisy" parameter.
7568 * complaints.h (clear_complaints): Update.
7569 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7570 (reread_symbols): Update.
7571
7572 2018-05-23 Tom Tromey <tom@tromey.com>
7573
7574 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7575 SUBSEQUENT_MESSAGE.
7576 (vcomplaint, clear_complaints): Update.
7577 (symfile_explanations): Remove some messages.
7578
7579 2018-05-23 Tom Tromey <tom@tromey.com>
7580
7581 * complaints.c (internal_complaint): Remove.
7582 * complaints.h (internal_complaint): Remove.
7583
7584 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7585
7586 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7587
7588 2018-05-22 Pedro Alves <palves@redhat.com>
7589
7590 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7591 (remote_fileio_badfd, remote_fileio_return_errno)
7592 (remote_fileio_return_success, remote_fileio_func_open)
7593 (remote_fileio_func_open, remote_fileio_func_close)
7594 (remote_fileio_func_read, remote_fileio_func_write)
7595 (remote_fileio_func_lseek, remote_fileio_func_rename)
7596 (remote_fileio_func_unlink, remote_fileio_func_stat)
7597 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7598 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7599 remote_target parameter.
7600 (remote_fio_func_map) <func>: Add remote_target parameter.
7601 (do_remote_fileio_request, remote_fileio_request):
7602 * remote-fileio.h (remote_fileio_request):
7603 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7604 remote_target parameter.
7605 (remote_notif_process, handle_notification): Adjust to pass down
7606 the remote.
7607 (remote_notif_state_allocate): Add remote_target parameter. Save
7608 it.
7609 * remote-notif.h (struct remote_target): Forward declare.
7610 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7611 remote_target parameter.
7612 (struct remote_notif_state) <remote>: New field.
7613 (remote_notif_ack, remote_notif_parse): Add remote_target
7614 parameter.
7615 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7616 remote_target parameter.
7617 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7618 (threads_listing_context, rmt_thread_action, protocol_feature)
7619 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7620 (packet_result, struct threads_listing_context, remote_state):
7621 Move definitions and declarations higher up.
7622 (remote_target) <~remote_target>: Declare.
7623 (remote_download_command_source, remote_file_put, remote_file_get)
7624 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7625 (remote_hostio_pread_vFile, remote_hostio_send_command)
7626 (remote_hostio_set_filesystem, remote_hostio_open)
7627 (remote_hostio_close, remote_hostio_unlink, remote_state)
7628 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7629 (get_memory_write_packet_size, get_memory_read_packet_size)
7630 (append_pending_thread_resumptions, remote_detach_1)
7631 (append_resumption, remote_resume_with_vcont)
7632 (add_current_inferior_and_thread, wait_ns, wait_as)
7633 (process_stop_reply, remote_notice_new_inferior)
7634 (process_initial_stop_replies, remote_add_thread)
7635 (btrace_sync_conf, remote_btrace_maybe_reopen)
7636 (remove_new_fork_children, kill_new_fork_children)
7637 (discard_pending_stop_replies, stop_reply_queue_length)
7638 (check_pending_events_prevent_wildcard_vcont)
7639 (discard_pending_stop_replies_in_queue, stop_reply)
7640 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7641 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7642 (remote_interrupt_as, remote_interrupt_ns)
7643 (remote_get_noisy_reply, remote_query_attached)
7644 (remote_add_inferior, remote_current_thread, get_current_thread)
7645 (set_thread, set_general_thread, set_continue_thread)
7646 (set_general_process, write_ptid)
7647 (remote_unpack_thread_info_response, remote_get_threadinfo)
7648 (parse_threadlist_response, remote_get_threadlist)
7649 (remote_threadlist_iterator, remote_get_threads_with_ql)
7650 (remote_get_threads_with_qxfer)
7651 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7652 (get_offsets, remote_check_symbols, remote_supported_packet)
7653 (remote_query_supported, remote_packet_size)
7654 (remote_serial_quit_handler, remote_detach_pid)
7655 (remote_vcont_probe, remote_resume_with_hc)
7656 (send_interrupt_sequence, interrupt_query)
7657 (remote_notif_get_pending_events, fetch_register_using_p)
7658 (send_g_packet, process_g_packet, fetch_registers_using_g)
7659 (store_register_using_P, store_registers_using_G)
7660 (set_remote_traceframe, check_binary_download)
7661 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7662 (remote_xfer_live_readonly_partial, remote_read_bytes)
7663 (remote_send_printf, remote_flash_write, readchar)
7664 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7665 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7666 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7667 (extended_remote_disable_randomization, extended_remote_run)
7668 (send_environment_packet, extended_remote_environment_support)
7669 (extended_remote_set_inferior_cwd, remote_write_qxfer)
7670 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7671 (packet_command): Now methods of ...
7672 (remote_target): ... this class.
7673 (m_remote_state) <remote_target>: New field.
7674 (struct remote_state) <stop_reply_queue,
7675 remote_async_inferior_event_token, wait_forever_enabled_p>: New
7676 fields.
7677 (remote_state::remote_state): Allocate stop_reply_queue.
7678 (remote_state): Delete global.
7679 (get_remote_state_raw): Delete.
7680 (remote_target::get_remote_state): Allocate m_remote_state on
7681 demand.
7682 (get_current_remote_target): New.
7683 (remote_ops, extended_remote_ops): Delete.
7684 (wait_forever_enabled_p, remote_async_inferior_event_token):
7685 Delete, moved to struct remote_state.
7686 (remote_target::close): Delete self. Destruction bits split to
7687 ...
7688 (remote_target::~remote_target): ... this.
7689 (show_memory_packet_size): Adjust to use
7690 get_current_remote_target.
7691 (struct protocol_feature) <func>: Add remote_target parameter.
7692 All callers adjusted.
7693 (curr_quit_handler_target): New.
7694 (remote_serial_quit_handler): Reimplement.
7695 (remote_target::open_1): Adjust to use get_current_remote_target.
7696 Heap-allocate remote_target/extended_remote_target instances.
7697 (vcont_builder::vcont_builder): Add remote_target parameter, and
7698 save it in m_remote. All callers adjusted.
7699 (vcont_builder::m_remote): New field.
7700 (vcont_builder::restart, vcont_builder::flush)
7701 (vcont_builder::push_action): Use it.
7702 (remote_target::commit_resume): Use it.
7703 (struct queue_iter_param) <remote>: New field.
7704 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7705 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7706 (check_pending_event_prevents_wildcard_vcont_callback)
7707 (remote_target::check_pending_events_prevent_wildcard_vcont)
7708 (remote_target::discard_pending_stop_replies)
7709 (remote_target::discard_pending_stop_replies_in_queue)
7710 (remote_target::remote_notif_remove_queued_reply): Fill in
7711 'remote' field.
7712 (remote_notif_get_pending_events): New.
7713 (remote_target::readchar, remote_target::remote_serial_write):
7714 Save/restore curr_quit_handler_target.
7715 (putpkt): New.
7716 (kill_new_fork_children): Fill in 'remote' field.
7717 (packet_command): Use get_current_remote_target, defer to
7718 remote_target method of same name.
7719 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7720 parameter, and save it in m_remote. All callers adjusted.
7721 (scoped_remote_fd::release): Use m_remote.
7722 (scoped_remote_fd::m_remote): New field.
7723 (remote_file_put, remote_file_get, remote_file_delete): Use
7724 get_current_remote_target, defer to remote_target method of same
7725 name.
7726 (remote_btrace_reset): Add remote_state paremeter. Update all
7727 callers.
7728 (remote_async_inferior_event_handler). Pass down 'data'.
7729 (remote_new_objfile): Use get_current_remote_target.
7730 (remote_target::vcont_r_supported): New.
7731 (set_range_stepping): Use get_current_remote_target and
7732 remote_target::vcont_r_supported.
7733 (_initialize_remote): Don't allocate 'remote_state' and
7734 'stop_reply_queue' globals.
7735 * remote.h (struct remote_target): Forward declare.
7736 (getpkt, putpkt, remote_notif_get_pending_events): Add
7737 'remote_target' parameter.
7738
7739 2018-05-22 Pedro Alves <palves@redhat.com>
7740
7741 * remote.c (vcont_builder): Now a class. Make all data members
7742 private.
7743 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7744 Declare methods.
7745 (vcont_builder_restart): Rename to ...
7746 (vcont_builder::restart): ... this.
7747 (vcont_builder_flush): Rename to ...
7748 (vcont_builder::flush): ... this.
7749 (vcont_builder_push_action): Rename to ...
7750 (vcont_builder::push_action): ... this.
7751 (remote_target::commit_resume): Adjust.
7752
7753 2018-05-22 Pedro Alves <palves@redhat.com>
7754
7755 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7756 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7757 (get_fixed_memory_packet_size): New.
7758 (get_memory_packet_size): Use it.
7759 (set_memory_packet_size): Don't override the config size with
7760 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7761 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7762 Don't refer to get_memory_packet_size if not connected to a remote
7763 target. Show "(default)" if configured size is 0.
7764
7765 2018-05-22 Pedro Alves <palves@redhat.com>
7766
7767 * remote.c (remote_target::mourn_inferior): Move
7768 discard_pending_stop_replies call here from ...
7769 (_initialize_remote): ... here.
7770
7771 2018-05-22 Pedro Alves <palves@redhat.com>
7772
7773 * remote.c (compare_section_command): Remove set_general_process
7774 call.
7775
7776 2018-05-22 Pedro Alves <palves@redhat.com>
7777
7778 * remote.c (struct packet_reg, struct remote_arch_state):
7779 Move higher up in the file.
7780 (remote_state) <m_arch_states>: Store remote_arch_state values
7781 instead of remote_arch_state pointers.
7782 (remote_state::get_remote_arch_state): Adjust.
7783
7784 2018-05-22 Pedro Alves <palves@redhat.com>
7785
7786 * remote.c: Include <unordered_map>.
7787 (remote_state): Now a class.
7788 (remote_state) <get_remote_arch_state>: Declare method.
7789 <get_remote_arch_state>: New field.
7790 (remote_arch_state) <remote_arch_state>: Declare ctor.
7791 <regs>: Now a unique_ptr.
7792 (remote_gdbarch_data_handle): Delete.
7793 (get_remote_arch_state): Delete.
7794 (remote_state::get_remote_arch_state): New.
7795 (get_remote_state): Adjust to call remote_state's
7796 get_remote_arch_state method.
7797 (init_remote_state): Delete, bits factored out to ...
7798 (remote_arch_state::remote_arch_state): ... this new method.
7799 (get_remote_packet_size, get_memory_packet_size)
7800 (process_g_packet, remote_target::fetch_registers)
7801 (remote_target::prepare_to_store, store_registers_using_G)
7802 (remote_target::store_registers, remote_target::get_trace_status):
7803 Adjust to call remote_state's method.
7804 (_initialize_remote): Remove reference to
7805 remote_gdbarch_data_handle.
7806
7807 2018-05-22 Pedro Alves <palves@redhat.com>
7808
7809 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7810 pread>: New method declarations.
7811 (remote_target::open_1): Adjust.
7812 (readahead_cache_invalidate): Rename to ...
7813 (readahead_cache::invalidate): ... this, and adjust to be a class
7814 method.
7815 (readahead_cache_invalidate_fd): Rename to ...
7816 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7817 class method.
7818 (remote_hostio_pwrite): Adjust.
7819 (remote_hostio_pread_from_cache): Rename to ...
7820 (readahead_cache::pread): ... this, and adjust to be a class
7821 method.
7822 (remote_hostio_close): Adjust.
7823
7824 2018-05-22 Pedro Alves <palves@redhat.com>
7825
7826 * remote.c (remote_hostio_close_cleanup): Delete.
7827 (class scoped_remote_fd): New.
7828 (remote_file_put, remote_file_get): Use it.
7829
7830 2018-05-22 Pedro Alves <palves@redhat.com>
7831
7832 (struct vCont_action_support): Use bool and initialize all fields.
7833 (struct readahead_cache): Initialize all fields.
7834 (remote_state): Use bool and initialize all fields.
7835 (remote_state::remote_state, remote_state::~remote_state): New.
7836 (new_remote_state): Delete.
7837 (_initialize_remote): Use new to allocate remote_state.
7838
7839 2018-05-22 Pedro Alves <palves@redhat.com>
7840 張俊芝 <zjz@zjz.name>
7841
7842 PR gdb/22973
7843 * c-exp.y: Include "c-support.h".
7844 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7845 of tolower. Use c_ident_is_alpha to scan names.
7846 * c-lang.c: Include "c-support.h".
7847 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7848 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7849 * c-support.h: New file, with bits factored out from ...
7850 * cp-name-parser.y: ... this file.
7851 Include "c-support.h".
7852 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7853 c-support.h and renamed.
7854 (symbol_end, yylex): Adjust.
7855
7856 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7857
7858 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7859 parameter type to CORE_ADDR.
7860 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7861 parameter type in declaration to CORE_ADDR.
7862 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7863 target_auxv_search to get AT_HWCAP and use the result to get the
7864 target description.
7865 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7866 to CORE_ADDR. Remove the cast of the return value to unsigned
7867 long. Fix error predicate of target_auxv_search.
7868 (ppc_linux_nat_target::read_description): Change the type of the
7869 hwcap variable to CORE_ADDR.
7870
7871 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7872
7873 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7874 if the size of fpscr is larger than 32 bits.
7875
7876 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7877
7878 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7879 (ppc32_linux_vsxregmap): New global.
7880 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7881 regcache_supply_regset, and regcache_collect_regset.
7882 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7883 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7884 (fetch_vsx_register, store_vsx_register): Remove.
7885 (fetch_vsx_registers): Add regno parameter. Get regset using
7886 ppc_linux_vsxregset. Use regset to supply registers.
7887 (store_vsx_registers): Add regno parameter. Get regset using
7888 ppc_linux_vsxregset. Use regset to collect registers.
7889 (fetch_register): Call fetch_vsx_registers instead of
7890 fetch_vsx_register.
7891 (store_register): Call store_vsx_registers instead of
7892 store_vsx_register.
7893 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7894 new regno parameter.
7895 (store_ppc_registers): Call store_vsx_registers with -1 for the
7896 new regno parameter.
7897 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7898 (ppc_collect_vsxregset): Remove.
7899
7900 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7901
7902 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7903 offset fields.
7904 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7905 for vector register offset fields.
7906 (ppc64_fbsd_reg_offsets): Likewise.
7907 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7908 to vector register offset fields.
7909 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7910 to vector register offset fields.
7911 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7912 vector register offset fields.
7913 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7914 initializers for vector register offset fields.
7915 (rs6000_aix64_reg_offsets): Likewise.
7916 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7917 (ppc_supply_vrregset): Remove.
7918 (ppc_collect_vrregset): Remove.
7919 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7920 (ppc_linux_vrregset) : New function.
7921 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7922 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7923 (ppc32_linux_vrregset): Remove.
7924 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7925 and use result instead of ppc32_linux_vrregset.
7926 (ppc32_linux_reg_offsets): Remove initializers for vector register
7927 offset fields.
7928 (ppc64_linux_reg_offsets): Likewise.
7929 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7930 * ppc-linux-nat.c: Include regset.h.
7931 (gdb_vrregset_t): Adjust comment to account for little-endian
7932 mode.
7933 (supply_vrregset, fill_vrregset): Remove.
7934 (fetch_altivec_register, store_altivec_register): Remove.
7935 (fetch_altivec_registers): Add regno parameter. Get regset using
7936 ppc_linux_vrregset. Use regset to supply registers.
7937 (store_altivec_registers): Add regno parameter. Get regset using
7938 ppc_linux_vrregset. Use regset to collect registers.
7939 (fetch_register): Call fetch_altivec_registers instead of
7940 fetch_altivec_register.
7941 (store_register): Call store_altivec_registers instead of
7942 store_altivec_register.
7943 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7944 the new regno parameter.
7945 (store_ppc_registers): Call store_altivec_registers with -1 for
7946 the new regno parameter.
7947
7948 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7949
7950 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7951 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7952 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7953 (gdb_vrregset_t): Change array type size to
7954 PPC_LINUX_SIZEOF_VRREGSET.
7955 (gdb_vsxregset_t): Change array type size to
7956 PPC_LINUX_SIZEOF_VSXREGSET.
7957 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7958 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7959 PPC_LINUX_SIZEOF_VSXREGSET.
7960
7961 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7962
7963 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7964 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7965 nat/ppc-linux.c.
7966 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7967 ppc_linux_target_wordsize with tid.
7968 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7969 wordsize with tid.
7970 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7971 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7972 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7973 tid parameter. Remove static specifier.
7974 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7975 (ppc_linux_target_wordsize): New declaration.
7976
7977 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7978
7979 * arch/ppc-linux-common.c: New file.
7980 * arch/ppc-linux-common.h: New file.
7981 * arch/ppc-linux-tdesc.h: New file.
7982 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7983 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7984 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7985 arch/ppc-linux-tdesc.h.
7986 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7987 arch/ppc-linux-tdesc.h.
7988 (ppc_linux_nat_target::read_description): Remove target
7989 description matching code. Fill a ppc_linux_features struct and
7990 call ppc_linux_match_description with it. Move comment about ISA
7991 2.05 to ppc-linux-common.c.
7992 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7993 arch/ppc-linux-tdesc.h.
7994 (ppc_linux_core_read_description): Remove target description
7995 matching code. Fill a ppc_linux_features struct and call
7996 ppc_linux_match_description with it.
7997 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7998 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7999 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8000 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8001 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8002 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8003 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8004 (tdesc_powerpc_e500l): Remove.
8005
8006 2018-05-22 Joel Brobecker <brobecker@adacore.com>
8007
8008 * ada-lang.c (catch_assert_command): Pass empty string instead
8009 of NULL for excep_string argument.
8010
8011 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8012
8013 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8014 the width of the requested register exceeds the width of the
8015 `ptrace' data type.
8016
8017 2018-05-21 Tom Tromey <tom@tromey.com>
8018
8019 * printcmd.c (output_command): Remove.
8020 (output_command_const): Rename to output_command.
8021 * valprint.h (output_command): Rename from output_command_const.
8022 * tracepoint.c (trace_dump_actions): Call output_command.
8023
8024 2018-05-21 Tom Tromey <tom@tromey.com>
8025
8026 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8027 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8028 * ada-lang.h (create_ada_exception_catchpoint): Update.
8029 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8030 std::string.
8031 (create_excep_cond_exprs, ~ada_catchpoint)
8032 (should_stop_exception, print_one_exception)
8033 (print_mention_exception, print_recreate_exception): Update.
8034 (ada_get_next_arg): Remove.
8035 (catch_ada_exception_command_split): Use std::string. Change type
8036 of "excep_string", "cond_string".
8037 (catch_ada_exception_command): Update.
8038 (create_ada_exception_catchpoint): Change type of excep_string.
8039 (ada_exception_sal): Remove excep_string parameter.
8040 (~ada_catchpoint): Remove.
8041
8042 2018-05-21 Tom Tromey <tom@tromey.com>
8043
8044 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8045 cleanup.
8046
8047 2018-05-21 Tom Tromey <tom@tromey.com>
8048
8049 * ada-lang.c (ada_exception_message_1, ada_exception_message):
8050 Return unique_xmalloc_ptr.
8051 (print_it_exception): Update.
8052
8053 2018-05-21 Tom Tromey <tom@tromey.com>
8054
8055 * tracepoint.c (trace_dump_actions): Use std::string.
8056
8057 2018-05-21 Tom Tromey <tom@tromey.com>
8058
8059 * symfile.c (reread_symbols): Use std::string for original_name.
8060
8061 2018-05-21 Tom Tromey <tom@tromey.com>
8062
8063 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8064 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
8065 constructor.
8066
8067 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
8068
8069 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8070 instance to...
8071 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8072 * objfiles.c (get_objfile_bfd_data): Allocate
8073 objfile_per_bfd_storage with obstack_new when allocating on
8074 obstack.
8075
8076 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8077
8078 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8079 OBSTACK_ZALLOC.
8080 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8081 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8082 * mdebugread.c (mdebug_build_psymtabs): Likewise.
8083 (add_pending): Likewise.
8084 (parse_symbol): Likewise.
8085 (parse_partial_symbols): Likewise.
8086 (psymtab_to_symtab_1): Likewise.
8087 (new_psymtab): Likewise.
8088 (elfmdebug_build_psymtabs): Likewise.
8089 * minsyms.c (terminate_minimal_symbol_table): Likewise.
8090 * objfiles.c (get_objfile_bfd_data): Likewise.
8091 (objfile_register_static_link): Likewise.
8092 * psymtab.c (allocate_psymtab): Likewise.
8093 * stabsread.c (read_member_functions): Likewise.
8094 * xcoffread.c (xcoff_end_psymtab): Likewise.
8095
8096 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8097
8098 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8099 compiler supports std::is_trivially_constructible.
8100 * common/poison.h: Include obstack.h.
8101 (IsMallocable): Define to is_trivially_constructible if the
8102 compiler supports it, define to true_type otherwise.
8103 (xobnew): New.
8104 (XOBNEW): Redefine.
8105 (xobnewvec): New.
8106 (XOBNEWVEC): Redefine.
8107 * gdb_obstack.h (obstack_zalloc): New.
8108 (OBSTACK_ZALLOC): Redefine.
8109 (obstack_calloc): New.
8110 (OBSTACK_CALLOC): Redefine.
8111 (obstack_new): New.
8112 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8113 (gdbarch_obstack): New declaration in gdbarch.h, definition in
8114 gdbarch.c.
8115 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8116 obstack_calloc/obstack_zalloc.
8117 (gdbarch_obstack_zalloc): Remove.
8118 * target-descriptions.c (tdesc_data_init): Use obstack_new.
8119
8120 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8121
8122 * stack.c (backtrace_command_1): Remove useless variable int i.
8123
8124 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8125
8126 * stack.c (print_frame_info): Fix comment.
8127
8128 2018-05-18 Tom Tromey <tom@tromey.com>
8129
8130 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8131 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8132 (~dwarf2_per_objfile): Update
8133 (dwarf2_get_dwz_file): Use new.
8134 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8135 unique_ptr.
8136
8137 2018-05-18 Tom Tromey <tom@tromey.com>
8138
8139 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8140 unique_ptr.
8141 * dwarf2read.c (struct dwp_file): Add constructor and
8142 initializers.
8143 (open_and_init_dwp_file): Return a unique_ptr.
8144 (dwarf2_per_objfile, create_dwp_hash_table)
8145 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8146 (lookup_dwo_unit_in_dwp): Update.
8147 (open_and_init_dwp_file, get_dwp_file): Update.
8148
8149 2018-05-18 Tom Tromey <tom@tromey.com>
8150
8151 * dwarf2read.c (dwarf2_per_objfile): Update.
8152 (struct mapped_index): Add initializers.
8153 (dwarf2_read_index): Use new.
8154 (dw2_symtab_iter_init): Update.
8155 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8156 unique_ptr.
8157
8158 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8159
8160 * dwarf2read.c (mapped_index) <total_size>: Remove.
8161
8162 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8163
8164 * unittests/format_pieces-selftests.c (test_format_specifier):
8165 Add ARI comments.
8166
8167 2018-05-18 Tom Tromey <tom@tromey.com>
8168
8169 * c-typeprint.c (maybe_print_hole): New function.
8170 (c_print_type_struct_field_offset): Update.
8171 (c_type_print_base_struct_union): Call maybe_print_hole.
8172
8173 2018-05-17 Keith Seitz <keiths@redhat.com>
8174
8175 * breakpoint.c (build_bpstat_chain): New function, moved from
8176 bpstat_stop_status.
8177 (bpstat_stop_status): Add optional parameter, `stop_chain'.
8178 If no stop chain is passed, call build_bpstat_chain to build it.
8179 * breakpoint.h (build_bpstat_chain): Declare.
8180 (bpstat_stop_status): Move documentation here from breakpoint.c.
8181 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8182 build the stop chain and pass it to skip_inline_frames.
8183 Pass this stop chain to bpstat_stop_status.
8184 * inline-frame.c: Include breakpoint.h.
8185 (stopped_by_user_bp_inline_frame): New function.
8186 (skip_inline_frames): Add parameter `stop_chain'.
8187 Move documention to inline-frame.h.
8188 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8189 whether the frame should be elided.
8190 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8191 Add moved documentation and update for new parameter.
8192
8193 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8194
8195 PR cli/14975
8196 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8197 unittests/format_pieces-selftests.c.
8198 * common/format.h (format_piece) <operator==>: New.
8199 (format_pieces) <operator[]>: Remove.
8200 * common/format.c (format_pieces::format_pieces): Handle \e.
8201 * unittests/format_pieces-selftests.c: New.
8202
8203 2018-05-17 Tom Tromey <tom@tromey.com>
8204
8205 PR symtab/23010:
8206 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8207 (dw2_instantiate_symtab): Add skip_partial parameter.
8208 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8209 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8210 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8211 (dw2_expand_symtabs_matching_one)
8212 (dw2_find_pc_sect_compunit_symtab)
8213 (dw2_debug_names_lookup_symbol)
8214 (dw2_debug_names_expand_symtabs_for_function): Update.
8215 (init_cutu_and_read_dies): Add skip_partial parameter.
8216 (process_psymtab_comp_unit, build_type_psymtabs_1)
8217 (process_skeletonless_type_unit, load_partial_comp_unit)
8218 (psymtab_to_symtab_1): Update.
8219 (load_full_comp_unit): Add skip_partial parameter.
8220 (process_imported_unit_die, dwarf2_read_addr_index)
8221 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8222 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8223 (read_signatured_type): Update.
8224
8225 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8226
8227 * value.c (release_value): Remove unused variable.
8228 (record_latest_value): Likewise.
8229 (access_value_history): Likewise.
8230 (preserve_values): Likewise.
8231
8232 2018-05-17 Tom Tromey <tom@tromey.com>
8233
8234 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8235 Initialize.
8236
8237 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8238
8239 PR gdb/22286
8240 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8241 Also handle registers whose width is not a multiple of
8242 PTRACE_TYPE_RET.
8243 (linux_nat_trad_target::store_register): Likewise.
8244
8245 2018-05-16 Tom Tromey <tom@tromey.com>
8246
8247 * gdbcore.h (core_bfd): Redefine.
8248 * corelow.c (core_target::close): Update.
8249 (core_target_open): Update.
8250 * progspace.h (struct program_space) <cbfd>: Now a
8251 gdb_bfd_ref_ptr.
8252
8253 2018-05-16 Tom Tromey <tom@tromey.com>
8254
8255 PR cli/19551:
8256 * symfile-add-flags.h (enum symfile_add_flags)
8257 <SYMFILE_NOT_FILENAME>: New constant.
8258 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8259 objfile name from BFD.
8260 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8261 * minidebug.c (find_separate_debug_file_in_section): Put
8262 ".gnu_debugdata" into BFD's file name.
8263
8264 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8265
8266 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8267 Remove.
8268
8269 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8270
8271 PR binutils/21446
8272 * aarch64-tdep.c (aarch64_analyze_prologue,
8273 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8274 Indicate not interested in errors.
8275
8276 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8277
8278 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8279 Supply the MIPS_ZERO_REGNUM register.
8280
8281 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8282
8283 * mips-tdep.c (mask_address_var): Make variable static.
8284
8285 2018-05-14 Tom Tromey <tom@tromey.com>
8286
8287 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8288
8289 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8290
8291 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8292 FXSAVE_ADDR for the mxcsr register.
8293
8294 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8295
8296 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8297
8298 2018-05-11 Pedro Alves <palves@redhat.com>
8299
8300 * corelow.c (core_target) <core_target>: No longer inline.
8301 Initialize m_core_gdbarch, m_core_vec and build the section table
8302 here.
8303 <~core_target>: New.
8304 <core_gdbarch, get_core_register_section>: New methods.
8305 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8306 factored out from ...
8307 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8308 (core_ops): Delete.
8309 (sniff_core_bfd): Add gdbarch parameter.
8310 (core_close): Delete, merged into ...
8311 (core_target::close): ... here. Delete self.
8312 (core_close_cleanup): Delete.
8313 (core_target_open): Allocate a core_target on the heap. Use a
8314 unique_ptr instead of a cleanup. Bits moved into the core_target
8315 ctor. Adjust to use core_target methods instead of globals.
8316 (get_core_register_section): Rename to ...
8317 (core_target::get_core_register_section): ... this and adjust.
8318 (struct get_core_registers_cb_data): New.
8319 (get_core_registers_cb): Use it. Use bool.
8320 (core_target::fetch_registers, core_target::files_info)
8321 (core_target::xfer_partial, core_target::read_description)
8322 (core_target::pid_to, core_target::thread_name): Adjust to
8323 reference class fields instead of globals.
8324 * target.h (struct target_ops_deleter, target_ops_up): New.
8325
8326 2018-05-11 Pedro Alves <palves@redhat.com>
8327
8328 * corefile.c (core_file_command): Move to corelow.c.
8329 * corelow.c (the_core_target): Delete.
8330 (core_file_command): Moved from corefile.c. Check exec_bfd
8331 instead of the_core_target. Use target_detach instead of calling
8332 into the_core_target directly.
8333 (maybe_say_no_core_file_now): New.
8334 (core_target::detach): Use it.
8335 (_initialize_corelow): Remove references to the_core_target.
8336 * gdbcore.h (the_core_target): Delete.
8337
8338 2018-05-11 Tom Tromey <tromey@redhat.com>
8339 Pedro Alves <palves@redhat.com>
8340
8341 * corefile.c (core_bfd): Remove.
8342 * gdbcore.h (core_bfd): Now a macro.
8343 * progspace.h (struct program_space) <cbfd>: New field.
8344
8345 2018-05-11 Tom Tromey <tom@tromey.com>
8346
8347 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8348 gdb::def_vector.
8349
8350 2018-05-10 Tom Tromey <tom@tromey.com>
8351
8352 * configure: Rebuild.
8353 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8354
8355 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8356
8357 PR server/23158:
8358 * regformats/regdat.sh: Adjust script, following the addition
8359 of the new expedite_regs parameter to init_target_desc.
8360
8361 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8362
8363 PR gdb/23127
8364 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8365 set_gdbarch_significant_addr_bit.
8366 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8367 set_gdbarch_significant_addr_bit.
8368 * utils.c (address_significant): Update to sign extend addr.
8369
8370 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8371
8372 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8373 (xtensa_linux_init_abi): Limit tdep->num_regs by
8374 tdep->num_nopriv_regs.
8375 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8376 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8377 not initialized.
8378
8379 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8380
8381 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8382
8383 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8384
8385 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8386 (I387_MXCSR_INIT_VAL): New constant.
8387 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8388 buffer if it was supplied by the inferior.
8389 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8390 (i387_xsave_get_clear_bv): New function.
8391 (i387_supply_xsave): Only read x87 control registers from the
8392 xsave buffer if the feature is enabled, and the state will have
8393 been written, otherwise, provide a suitable default.
8394 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8395 including x87 control registers. Update control registers if they
8396 have changed from the default value, and mark features as enabled
8397 as required.
8398 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8399
8400 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8401
8402 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8403
8404 2018-05-07 Tom Tromey <tom@tromey.com>
8405
8406 * configure: Rebuild.
8407 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8408
8409 2018-05-07 Tom Tromey <tom@tromey.com>
8410
8411 PR tdep/20362:
8412 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8413 bit. Use correct value for VDIV.
8414
8415 2018-05-04 Tom Tromey <tom@tromey.com>
8416
8417 * configure: Rebuild.
8418 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8419
8420 2018-05-04 Tom Tromey <tom@tromey.com>
8421
8422 * linux-record.c (record_linux_system_call) <case
8423 RECORD_SYS_RECVFROM>: Add "break".
8424
8425 2018-05-04 Tom Tromey <tom@tromey.com>
8426
8427 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8428 Add missing "break".
8429 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8430 Add missing "break".
8431
8432 2018-05-04 Tom Tromey <tom@tromey.com>
8433
8434 * rs6000-tdep.c (ppc_process_record_op4)
8435 (ppc_process_record_op63): Add fall-through comment.
8436
8437 2018-05-04 Tom Tromey <tom@tromey.com>
8438
8439 * i386-tdep.c (i386_process_record): Add fall-through comment.
8440
8441 2018-05-04 Tom Tromey <tom@tromey.com>
8442
8443 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8444 comment.
8445
8446 2018-05-04 Tom Tromey <tom@tromey.com>
8447
8448 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8449 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8450 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8451 comment.
8452 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8453 comment.
8454 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8455 comment.
8456
8457 2018-05-04 Tom Tromey <tom@tromey.com>
8458
8459 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8460
8461 2018-05-04 Tom Tromey <tom@tromey.com>
8462
8463 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8464 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8465 * symfile.c (section_is_mapped): Fix fall-through comment.
8466 * stabsread.c (define_symbol, read_member_functions): Fix
8467 fall-through comment.
8468 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8469 comment.
8470 * remote.c (remote_wait_as): Fix fall-through comment.
8471 * p-exp.y (yylex): Fix fall-through comment.
8472 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8473 comment.
8474 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8475 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8476 * jv-exp.y (yylex): Fix fall-through comment.
8477 * go-exp.y (lex_one_token): Fix fall-through comment.
8478 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8479 fall-through comment.
8480 * f-exp.y (yylex): Fix fall-through comment.
8481 * dwarf2read.c (process_die): Fix fall-through comments.
8482 * dbxread.c (process_one_symbol): Fix fall-through comment.
8483 * d-exp.y (lex_one_token): Fix fall-through comment.
8484 * cp-name-parser.y (yylex): Fix fall-through comment.
8485 * coffread.c (coff_symtab_read): Fix fall-through comment.
8486 * c-exp.y (lex_one_token): Fix fall-through comment.
8487 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8488 comment.
8489 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8490 comment.
8491
8492 2018-05-04 Tom Tromey <tom@tromey.com>
8493
8494 PR python/22730:
8495 * NEWS: Mention gdb.execute change.
8496 * gdbcmd.h (execute_control_command): Don't declare.
8497 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8498 execute_control_commands, execute_control_commands_to_string.
8499 * cli/cli-script.h (execute_control_commands)
8500 (execute_control_commands_to_string): Declare.
8501 (execute_control_command): Add from_tty parameter.
8502 * cli/cli-script.c (execute_control_commands)
8503 (execute_control_commands_to_string): New functions.
8504 (execute_user_command): Use execute_control_commands.
8505 (execute_control_command_1): Add "from_tty" parameter. Update.
8506 (execute_control_command): Likewise.
8507
8508 2018-05-04 Tom Tromey <tom@tromey.com>
8509
8510 PR python/22731:
8511 * NEWS: Mention that breakpoint commands are writable.
8512 * python/py-breakpoint.c (bppy_set_commands): New function.
8513 (breakpoint_object_getset) <"commands">: Use it.
8514
8515 2018-05-04 Tom Tromey <tom@tromey.com>
8516
8517 * tracepoint.c (actions_command): Update.
8518 * mi/mi-cmd-break.c (mi_command_line_array)
8519 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8520 (mi_read_next_line): Remove.
8521 (mi_cmd_break_commands): Update.
8522 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8523 function_view.
8524 * cli/cli-script.c (get_command_line): Update.
8525 (process_next_line): Use function_view. Constify.
8526 (recurse_read_control_structure, read_command_lines)
8527 (read_command_lines_1): Change argument types to function_view.
8528 (do_define_command, document_command): Update.
8529 * breakpoint.h (check_tracepoint_command): Don't declare.
8530 * breakpoint.c (check_tracepoint_command): Remove.
8531 (commands_command_1, create_tracepoint_from_upload): Update.
8532
8533 2018-05-04 Tom Tromey <tom@tromey.com>
8534
8535 PR gdb/11750:
8536 * cli/cli-script.h (enum command_control_type) <define_control>:
8537 New constant.
8538 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8539 (build_command_line, execute_control_command_1)
8540 (process_next_line): Likewise.
8541 (do_define_command): New function, extracted from define_command.
8542 (define_command): Use it.
8543
8544 2018-05-04 Tom Tromey <tom@tromey.com>
8545
8546 * tracepoint.c (actions_command): Update.
8547 * cli/cli-script.h (read_command_lines): Update.
8548 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8549 (MAX_TMPBUF): Remove define.
8550 (define_command): Use string_printf.
8551 (document_command): Likewise.
8552 * breakpoint.c (commands_command_1): Update.
8553
8554 2018-05-04 Tom Tromey <tom@tromey.com>
8555
8556 * top.c (execute_command): Update.
8557 * cli/cli-script.h (print_command_lines): Now varargs.
8558 * cli/cli-script.c (print_command_lines): Now varargs.
8559 (execute_control_command_1) <case while_control, case if_control>:
8560 Update.
8561
8562 2018-05-04 Tom Tromey <tom@tromey.com>
8563
8564 * tracepoint.c (all_tracepoint_actions): Rename from
8565 all_tracepoint_actions_and_cleanup. Change return type.
8566 (actions_command, encode_actions_1, encode_actions)
8567 (trace_dump_actions, tdump_command): Update.
8568 * remote.c (remote_download_command_source): Update.
8569 * python/python.c (gdbpy_eval_from_control_command)
8570 (python_command, python_interactive_command): Update.
8571 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8572 * guile/guile.c (guile_command)
8573 (gdbscm_eval_from_control_command, guile_command): Update.
8574 * compile/compile.c (compile_code_command)
8575 (compile_print_command, compile_to_object): Update.
8576 * cli/cli-script.h (struct command_lines_deleter): New.
8577 (counted_command_line): New typedef.
8578 (struct command_line): Add constructor, destructor.
8579 <body_list>: Remove.
8580 <body_list_0, body_list_1>: New members.
8581 (command_line_up): Remove typedef.
8582 (read_command_lines, read_command_lines_1, get_command_line):
8583 Update.
8584 (copy_command_lines): Don't declare.
8585 * cli/cli-script.c (build_command_line): Use "new".
8586 (get_command_line): Return counted_command_line.
8587 (print_command_lines, execute_user_command)
8588 (execute_control_command_1, while_command, if_command): Update.
8589 (realloc_body_list): Remove.
8590 (process_next_line, recurse_read_control_structure): Update.
8591 (read_command_lines, read_command_lines_1): Return counted_command_line.
8592 (free_command_lines): Use "delete".
8593 (copy_command_lines): Remove.
8594 (define_command, document_command, show_user_1): Update.
8595 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8596 a counted_command_line.
8597 * breakpoint.h (counted_command_line): Remove typedef.
8598 (breakpoint_set_commands): Update.
8599 * breakpoint.c (check_no_tracepoint_commands)
8600 (validate_commands_for_breakpoint): Update.
8601 (breakpoint_set_commands): Change commands to be a
8602 counted_command_line.
8603 (commands_command_1, update_dprintf_command_list)
8604 (create_tracepoint_from_upload): Update.
8605
8606 2018-05-04 Tom Tromey <tom@tromey.com>
8607
8608 * cli/cli-decode.h (cmd_list_element): New constructor.
8609 (~cmd_list_element): New destructor.
8610 (struct cmd_list_element): Add initializers.
8611 * cli/cli-decode.c (do_add_cmd): Use "new".
8612 (delete_cmd): Use "delete".
8613
8614 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8615 Pedro Alves <palves@redhat.com>
8616
8617 PR breakpoints/19806 and support for PR external/20207.
8618 * NEWS: Mention Aarch64 watchpoint improvements.
8619 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8620 watchpoints and PR external/20207 watchpoints.
8621 * nat/aarch64-linux-hw-point.c
8622 (kernel_supports_any_contiguous_range): New.
8623 (aarch64_watchpoint_offset): New.
8624 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8625 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8626 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8627 (aarch64_align_watchpoint): New parameters aligned_offset_p and
8628 next_addr_orig_p. Support PR external/20207 watchpoints.
8629 (aarch64_downgrade_regs): New.
8630 (aarch64_dr_state_insert_one_point): New parameters offset and
8631 addr_orig.
8632 (aarch64_dr_state_remove_one_point): Likewise.
8633 (aarch64_handle_breakpoint): Update caller.
8634 (aarch64_handle_aligned_watchpoint): Likewise.
8635 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8636 aligned_offset.
8637 (aarch64_linux_set_debug_regs): Remove const from state. Call
8638 aarch64_downgrade_regs.
8639 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8640 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8641 (DR_CONTROL_MASK): ... this.
8642 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8643 (unsigned int aarch64_watchpoint_offset): New prototype.
8644 (aarch64_linux_set_debug_regs): Remove const from state.
8645 * utils.c (align_up, align_down): Move to ...
8646 * common/common-utils.c (align_up, align_down): ... here.
8647 * utils.h (align_up, align_down): Move to ...
8648 * common/common-utils.h (align_up, align_down): ... here.
8649
8650 2018-05-04 Joel Brobecker <brobecker@adacore.com>
8651
8652 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8653 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8654 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8655 Re-implement to match the ABI as summarized in GCC's
8656 gcc/config/sparc/sparc.c. All callers updated.
8657 (sparc32_store_arguments): Remove assertion.
8658
8659 2018-05-04 Tom Tromey <tom@tromey.com>
8660
8661 * printcmd.c: Don't include tui.h.
8662 (decode_format): Use skip_spaces.
8663
8664 2018-05-04 Tom Tromey <tom@tromey.com>
8665
8666 PR gdb/22619:
8667 * printcmd.c (last_count): New global.
8668 (x_command): Use saved count when repeating.
8669
8670 2018-05-04 Tom Tromey <tom@tromey.com>
8671
8672 * nto-procfs.c (do_closedir_cleanup): Remove.
8673 (procfs_pidlist): Use gdb_dir_up.
8674 * procfs.c (do_closedir_cleanup): Remove.
8675 (proc_update_threads): Use gdb_dir_up.
8676 * common/filestuff.h (struct gdb_dir_deleter): New.
8677 (gdb_dir_up): New typedef.
8678
8679 2018-05-04 Tom Tromey <tom@tromey.com>
8680
8681 * ada-lang.c (print_mention_exception): Use std::string.
8682
8683 2018-05-04 Tom Tromey <tom@tromey.com>
8684
8685 * ada-lang.c (create_excep_cond_exprs): Update.
8686 (ada_exception_catchpoint_cond_string): Use std::string.
8687
8688 2018-05-04 Tom Tromey <tom@tromey.com>
8689
8690 * ada-lang.c (xget_renaming_scope): Return std::string.
8691 (old_renaming_is_invisible): Update.
8692
8693 2018-05-04 Tom Tromey <tom@tromey.com>
8694
8695 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8696 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8697
8698 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
8699
8700 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8701
8702 2018-05-04 Tom Tromey <tom@tromey.com>
8703
8704 * remote.c (remote_query_supported_append): Change type.
8705 (remote_check_symbols): Update.
8706
8707 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8708
8709 PR gdb/11420
8710 * configure.ac: Prepend libpython.
8711 * python/python-config.py: Likewise.
8712 * configure: Regenerate.
8713
8714 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8715
8716 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8717
8718 2018-05-03 Pedro Alves <palves@redhat.com>
8719
8720 * s390-linux-nat.c
8721 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8722 override. Write 'true' instead of '1'.
8723 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8724 declaration.
8725
8726 2018-05-02 Pedro Alves <palves@redhat.com>
8727
8728 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8729 add_inf_child_target.
8730 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8731 add_inf_child_target.
8732 * aix-thread.c (aix_thread_target_info): New.
8733 (aix_thread_target) <shortname, longname, doc>: Delete.
8734 <info>: New.
8735 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8736 add_inf_child_target.
8737 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8738 add_inf_child_target.
8739 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8740 add_inf_child_target.
8741 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8742 add_inf_child_target.
8743 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8744 add_inf_child_target.
8745 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8746 add_inf_child_target.
8747 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8748 add_inf_child_target.
8749 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8750 add_inf_child_target.
8751 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8752 add_inf_child_target.
8753 * bfd-target.c (target_bfd_target_info): New.
8754 (target_bfd) <shortname, longname, doc>: Delete.
8755 <info>: New.
8756 * bsd-kvm.c (bsd_kvm_target_info): New.
8757 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8758 <info>: New.
8759 (bsd_kvm_target::open): Rename to ...
8760 (bsd_kvm_target_open): ... this. Adjust.
8761 * bsd-uthread.c (bsd_uthread_target_info): New.
8762 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8763 <info>: New.
8764 * corefile.c (core_file_command): Adjust.
8765 * corelow.c (core_target_info): New.
8766 (core_target) <shortname, longname, doc>: Delete.
8767 <info>: New.
8768 (core_target::open): Rename to ...
8769 (core_target_open): ... this. Adjust.
8770 * ctf.c (ctf_target_info): New.
8771 (ctf_target) <shortname, longname, doc>: Delete.
8772 <info>: New.
8773 (ctf_target::open): Rename to ...
8774 (ctf_target_open): ... this.
8775 (_initialize_ctf): Adjust.
8776 * exec.c (exec_target_info): New.
8777 (exec_target) <shortname, longname, doc>: Delete.
8778 <info>: New.
8779 (exec_target::open): Rename to ...
8780 (exec_target_open): ... this.
8781 * gdbcore.h (core_target_open): Declare.
8782 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8783 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8784 add_inf_child_target.
8785 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8786 add_inf_child_target.
8787 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8788 add_inf_child_target.
8789 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8790 add_inf_child_target.
8791 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8792 add_inf_child_target.
8793 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8794 add_inf_child_target.
8795 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8796 add_inf_child_target.
8797 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8798 add_inf_child_target.
8799 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8800 add_inf_child_target.
8801 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8802 add_inf_child_target.
8803 * inf-child.c (inf_child_target_info): New.
8804 (inf_child_target::info): New.
8805 (inf_child_open_target): Remove 'target' parameter. Use
8806 get_native_target instead.
8807 (inf_child_target::open): Delete.
8808 (add_inf_child_target): New.
8809 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8810 Delete.
8811 <info>: New.
8812 (add_inf_child_target): Declare.
8813 (inf_child_open_target): Declare.
8814 * linux-thread-db.c (thread_db_target_info): New.
8815 (thread_db_target) <shortname, longname, doc>: Delete.
8816 <info>: New.
8817 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8818 add_inf_child_target.
8819 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8820 add_inf_child_target.
8821 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8822 add_inf_child_target.
8823 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8824 add_inf_child_target.
8825 * make-target-delegates (print_class): Adjust.
8826 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8827 add_inf_child_target.
8828 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8829 add_inf_child_target.
8830 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8831 add_inf_child_target.
8832 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8833 add_inf_child_target.
8834 * nto-procfs.c (nto_native_target_info): New.
8835 (nto_procfs_target_native) <shortname, longname, doc>:
8836 Delete.
8837 <info>: New.
8838 (nto_procfs_target_info): New.
8839 (nto_procfs_target_procfs) <shortname, longname, doc>:
8840 Delete.
8841 <info>: New.
8842 (init_procfs_targets): Adjust.
8843 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8844 add_inf_child_target.
8845 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8846 add_inf_child_target.
8847 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8848 add_inf_child_target.
8849 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8850 add_inf_child_target.
8851 * ravenscar-thread.c (ravenscar_target_info): New.
8852 (ravenscar_thread_target) <shortname, longname, doc>:
8853 Delete.
8854 <info>: New.
8855 * record-btrace.c (record_btrace_target_info):
8856 (record_btrace_target) <shortname, longname, doc>: Delete.
8857 <info>: New.
8858 (record_btrace_target::open): Rename to ...
8859 (record_btrace_target_open): ... this. Adjust.
8860 * record-full.c (record_longname, record_doc): New.
8861 (record_full_base_target) <shortname, longname, doc>: Delete.
8862 <info>: New.
8863 (record_full_target_info): New.
8864 (record_full_target): <shortname>: Delete.
8865 <info>: New.
8866 (record_full_core_open_1, record_full_open_1): Update comments.
8867 (record_full_base_target::open): Rename to ...
8868 (record_full_open): ... this.
8869 (cmd_record_full_restore): Update.
8870 (_initialize_record_full): Update.
8871 * remote-sim.c (remote_sim_target_info): New.
8872 (gdbsim_target) <shortname, longname, doc>: Delete.
8873 <info>: New.
8874 (gdbsim_target::open): Rename to ...
8875 (gdbsim_target_open): ... this.
8876 (_initialize_remote_sim): Adjust.
8877 * remote.c (remote_doc): New.
8878 (remote_target_info): New.
8879 (remote_target) <shortname, longname, doc>: Delete.
8880 <info>: New.
8881 (extended_remote_target_info): New.
8882 (extended_remote_target) <shortname, longname, doc>: Delete.
8883 <info>: New.
8884 (remote_target::open_1): Make static. Adjust.
8885 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8886 * s390-linux-nat.c (_initialize_s390_nat): Use
8887 add_inf_child_target.
8888 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8889 add_inf_child_target.
8890 * sol-thread.c (thread_db_target_info): New.
8891 (sol_thread_target) <shortname, longname, doc>: Delete.
8892 <info>: New.
8893 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8894 add_inf_child_target.
8895 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8896 add_inf_child_target.
8897 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8898 add_inf_child_target.
8899 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8900 add_inf_child_target.
8901 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8902 add_inf_child_target.
8903 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8904 add_inf_child_target.
8905 * spu-linux-nat.c (_initialize_spu_nat): Use
8906 add_inf_child_target.
8907 * spu-multiarch.c (spu_multiarch_target_info): New.
8908 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8909 <info>: New.
8910 * target-delegates.c: Regenerate.
8911 * target.c: Include <unordered_map>.
8912 (target_ops_p): Delete.
8913 (DEF_VEC_P(target_ops_p)): Delete.
8914 (target_factories): New.
8915 (test_target_info): New.
8916 (test_target_ops::info): New.
8917 (open_target): Adjust to use target_factories.
8918 (add_target_with_completer): Rename to ...
8919 (add_target): ... this. Change prototype. Register target_info
8920 and open callback in target_factories. Register target_info in
8921 command context instead of target_ops.
8922 (add_target): Delete old implementation.
8923 (add_deprecated_target_alias): Change prototype. Adjust.
8924 (the_native_target): New.
8925 (set_native_target, get_native_target): New.
8926 (find_default_run_target): Use the_native_target.
8927 (find_attach_target, find_run_target): Simplify.
8928 (target_ops::open): Delete.
8929 (dummy_target_info): New.
8930 (dummy_target::shortname, dummy_target::longname)
8931 (dummy_target::doc): Delete.
8932 (dummy_target::info): New.
8933 (debug_target::shortname, debug_target::longname)
8934 (debug_target::doc): Delete.
8935 (debug_target::info): New.
8936 * target.h (struct target_info): New.
8937 (target_ops::~target_ops): Add comment.
8938 (target_ops::info): New.
8939 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8940 longer virtual. Implement in terms of target_info.
8941 (set_native_target, get_native_target): Declare.
8942 (target_open_ftype): New.
8943 (add_target, add_target_with_completer)
8944 (add_deprecated_target_alias): Change prototype.
8945 (test_target) <shortname, longname, doc>: Delete.
8946 <info>: New.
8947 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8948 add_inf_child_target.
8949 * tracefile-tfile.c (tfile_target_info): New.
8950 (tfile_target) <shortname, longname, doc>: Delete.
8951 <info>: New.
8952 (tfile_target::open): Rename to ...
8953 (tfile_target_open): ... this.
8954 (_initialize_tracefile_tfile): Adjust.
8955 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8956 add_inf_child_target.
8957 * windows-nat.c (_initialize_windows_nat): Use
8958 add_inf_child_target.
8959 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8960 add_inf_child_target.
8961
8962 2018-05-02 Pedro Alves <palves@redhat.com>
8963
8964 * linux-nat.h (linux_nat_target) <low_new_thread,
8965 low_delete_thread, low_new_fork, low_forget_process,
8966 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8967 New virtual methods.
8968 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8969 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8970 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8971 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8972 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8973 Delete.
8974 * linux-fork.c (delete_fork): Adjust to call low method.
8975 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8976 (linux_nat_new_fork, linux_nat_forget_process_hook)
8977 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8978 (linux_nat_status_is_event):
8979 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8980 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8981 to call low method.
8982 (sigtrap_is_event): Rename to ...
8983 (linux_nat_target::low_status_is_event): ... this.
8984 (linux_nat_set_status_is_event): Delete.
8985 (save_stop_reason, linux_nat_wait_1)
8986 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8987 low methods.
8988 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8989 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8990 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8991 (linux_nat_set_prepare_to_resume): Delete.
8992 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8993 low virtual methods.
8994 * amd64-linux-nat.c: Likewise.
8995 * arm-linux-nat.c: Likewise.
8996 * i386-linux-nat.c: Likewise.
8997 * ia64-linux-nat.c: Likewise.
8998 * mips-linux-nat.c: Likewise.
8999 * ppc-linux-nat.c: Likewise.
9000 * s390-linux-nat.c: Likewise.
9001 * sparc64-linux-nat.c: Likewise.
9002 * x86-linux-nat.c: Likewise.
9003 * x86-linux-nat.h: Include "nat/x86-linux.h".
9004 (x86_linux_nat_target) <low_new_fork, low_forget_process,
9005 low_prepare_to_resume, low_new_thread, low_delete_thread>:
9006 Override methods.
9007
9008 2018-05-02 Pedro Alves <palves@redhat.com>
9009
9010 * target.h (target_ops)
9011 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9012 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9013 stopped_by_watchpoint, have_continuable_watchpoint,
9014 stopped_data_address, watchpoint_addr_within_range,
9015 can_accel_watchpoint_condition, can_run, thread_alive,
9016 has_all_memory, has_memory, has_stack, has_registers,
9017 has_execution, can_async_p, is_async_p, supports_non_stop,
9018 always_non_stop_p, can_execute_reverse, supports_multi_process,
9019 supports_enable_disable_tracepoint,
9020 supports_disable_randomization, supports_string_tracing,
9021 supports_evaluation_of_breakpoint_conditions,
9022 can_run_breakpoint_commands, filesystem_is_local,
9023 can_download_tracepoint, get_trace_state_variable_value,
9024 set_trace_notes, get_tib_address, use_agent, can_use_agent,
9025 record_is_replaying, record_will_replay,
9026 augmented_libraries_svr4_read>: Adjust to return bool.
9027 * aarch64-linux-nat.c: All implementations adjusted.
9028 * aix-thread.c: All implementations adjusted.
9029 * arm-linux-nat.c: All implementations adjusted.
9030 * breakpoint.c: All implementations adjusted.
9031 * bsd-kvm.c: All implementations adjusted.
9032 * bsd-uthread.c: All implementations adjusted.
9033 * corelow.c: All implementations adjusted.
9034 * ctf.c: All implementations adjusted.
9035 * darwin-nat.c: All implementations adjusted.
9036 * darwin-nat.h: All implementations adjusted.
9037 * exec.c: All implementations adjusted.
9038 * fbsd-nat.c: All implementations adjusted.
9039 * fbsd-nat.h: All implementations adjusted.
9040 * gnu-nat.c: All implementations adjusted.
9041 * gnu-nat.h: All implementations adjusted.
9042 * go32-nat.c: All implementations adjusted.
9043 * ia64-linux-nat.c: All implementations adjusted.
9044 * inf-child.c: All implementations adjusted.
9045 * inf-child.h: All implementations adjusted.
9046 * inf-ptrace.c: All implementations adjusted.
9047 * inf-ptrace.h: All implementations adjusted.
9048 * linux-nat.c: All implementations adjusted.
9049 * linux-nat.h: All implementations adjusted.
9050 * mips-linux-nat.c: All implementations adjusted.
9051 * nto-procfs.c: All implementations adjusted.
9052 * ppc-linux-nat.c: All implementations adjusted.
9053 * procfs.c: All implementations adjusted.
9054 * ravenscar-thread.c: All implementations adjusted.
9055 * record-btrace.c: All implementations adjusted.
9056 * record-full.c: All implementations adjusted.
9057 * remote-sim.c: All implementations adjusted.
9058 * remote.c: All implementations adjusted.
9059 * s390-linux-nat.c: All implementations adjusted.
9060 * sol-thread.c: All implementations adjusted.
9061 * spu-multiarch.c: All implementations adjusted.
9062 * target-delegates.c: All implementations adjusted.
9063 * target.c: All implementations adjusted.
9064 * target.h: All implementations adjusted.
9065 * tracefile-tfile.c: All implementations adjusted.
9066 * tracefile.c: All implementations adjusted.
9067 * tracefile.h: All implementations adjusted.
9068 * windows-nat.c: All implementations adjusted.
9069 * x86-linux-nat.h: All implementations adjusted.
9070 * x86-nat.h: All implementations adjusted.
9071
9072 2018-05-02 Pedro Alves <palves@redhat.com>
9073
9074 * make-target-delegates (scan_target_h): Don't trim lines here.
9075 Replace sequences of tabs and/or whitespace with a single
9076 whitespace.
9077 (top level, parsing methods): Trim each line before processing it
9078 here.
9079
9080 2018-05-02 Pedro Alves <palves@redhat.com>
9081 John Baldwin <jhb@freebsd.org>
9082
9083 * target.h (enum strata) <debug_stratum>: New.
9084 (struct target_ops) <all delegation methods>: Replace by C++
9085 virtual methods, and drop "to_" prefix. All references updated
9086 throughout.
9087 <to_shortname, to_longname, to_doc, to_data,
9088 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9089 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9090 virtual methods. All references updated throughout.
9091 <can_attach, supports_terminal_ours, can_create_inferior,
9092 get_thread_control_capabilities, attach_no_wait>: New
9093 virtual methods.
9094 <insert_breakpoint, remove_breakpoint>: Now
9095 TARGET_DEFAULT_NORETURN methods.
9096 <info_proc>: Now returns bool.
9097 <to_magic>: Delete.
9098 (OPS_MAGIC): Delete.
9099 (current_target): Delete. All references replaced by references
9100 to ...
9101 (target_stack): ... this. New.
9102 (target_shortname, target_longname): Adjust.
9103 (target_can_run): Now a function declaration.
9104 (default_child_has_all_memory, default_child_has_memory)
9105 (default_child_has_stack, default_child_has_registers)
9106 (default_child_has_execution): Remove target_ops parameter.
9107 (complete_target_initialization): Delete.
9108 (memory_breakpoint_target): New template class.
9109 (test_target_ops): Refactor as a C++ class with virtual methods.
9110 * make-target-delegates (NAME_PART): Tighten.
9111 (POINTER_PART, CP_SYMBOL): New.
9112 (SIMPLE_RETURN_PART): Reimplement.
9113 (VEC_RETURN_PART): Expect less.
9114 (RETURN_PART, VIRTUAL_PART): New.
9115 (METHOD): Adjust to C++ virtual methods.
9116 (scan_target_h): Remove reference to C99.
9117 (dname): Output "target_ops::" prefix.
9118 (write_function_header): Adjust to output a C++ class method.
9119 (write_declaration): New.
9120 (write_delegator): Adjust to output a C++ class method.
9121 (tdname): Output "dummy_target::" prefix.
9122 (write_tdefault, write_debugmethod): Adjust to output a C++ class
9123 method.
9124 (tdefault_names, debug_names): Delete.
9125 (return_types, tdefaults, styles, argtypes_array): New.
9126 (top level): All methods are delegators.
9127 (print_class): New.
9128 (top level): Print dummy_target and debug_target classes.
9129 * target-delegates.c: Regenerate.
9130 * target-debug.h (target_debug_print_enum_info_proc_what)
9131 (target_debug_print_thread_control_capabilities)
9132 (target_debug_print_thread_info_p): New.
9133 * target.c (dummy_target): Delete.
9134 (the_dummy_target, the_debug_target): New.
9135 (target_stack): Now extern.
9136 (set_targetdebug): Push/unpush debug target.
9137 (default_child_has_all_memory, default_child_has_memory)
9138 (default_child_has_stack, default_child_has_registers)
9139 (default_child_has_execution): Remove target_ops parameter.
9140 (complete_target_initialization): Delete.
9141 (add_target_with_completer): No longer call
9142 complete_target_initialization.
9143 (target_supports_terminal_ours): Use regular delegation.
9144 (update_current_target): Delete.
9145 (push_target): No longer check magic number. Don't call
9146 update_current_target.
9147 (unpush_target): Don't call update_current_target.
9148 (target_is_pushed): No longer check magic number.
9149 (target_require_runnable): Skip for all stratums over
9150 process_stratum.
9151 (target_ops::info_proc): New.
9152 (target_info_proc): Use find_target_at and
9153 find_default_run_target.
9154 (target_supports_disable_randomization): Use regular delegation.
9155 (target_get_osdata): Use find_target_at.
9156 (target_ops::open, target_ops::close, target_ops::can_attach)
9157 (target_ops::attach, target_ops::can_create_inferior)
9158 (target_ops::create_inferior, target_ops::can_run)
9159 (target_can_run): New.
9160 (default_fileio_target): Use regular delegation.
9161 (target_ops::fileio_open, target_ops::fileio_pwrite)
9162 (target_ops::fileio_pread, target_ops::fileio_fstat)
9163 (target_ops::fileio_close, target_ops::fileio_unlink)
9164 (target_ops::fileio_readlink): New.
9165 (target_fileio_open_1, target_fileio_unlink)
9166 (target_fileio_readlink): Always call the target method. Handle
9167 FILEIO_ENOSYS.
9168 (return_zero, return_zero_has_execution): Delete.
9169 (init_dummy_target): Delete.
9170 (dummy_target::dummy_target, dummy_target::shortname)
9171 (dummy_target::longname, dummy_target::doc)
9172 (debug_target::debug_target, debug_target::shortname)
9173 (debug_target::longname, debug_target::doc): New.
9174 (target_supports_delete_record): Use regular delegation.
9175 (setup_target_debug): Delete.
9176 (maintenance_print_target_stack): Skip debug_stratum.
9177 (initialize_targets): Instantiate the_dummy_target and
9178 the_debug_target.
9179 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9180 use target_stack.
9181 (target_auxv_search, fprint_target_auxv): Adjust.
9182 (info_auxv_command): Adjust to use target_stack.
9183 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9184 * exceptions.c (print_flush): Handle a NULL target_stack.
9185 * regcache.c (target_ops_no_register): Refactor as class with
9186 virtual methods.
9187
9188 * exec.c (exec_target): New class.
9189 (exec_ops): Now an exec_target.
9190 (exec_open, exec_close_1, exec_get_section_table)
9191 (exec_xfer_partial, exec_files_info, exec_has_memory)
9192 (exec_make_note_section): Refactor as exec_target methods.
9193 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9194 Delete.
9195 (exec_target::find_memory_regions): New.
9196 (_initialize_exec): Don't call init_exec_ops.
9197 * gdbcore.h (exec_file_clear): Delete.
9198
9199 * corefile.c (core_target): Delete.
9200 (core_file_command): Adjust.
9201 * corelow.c (core_target): New class.
9202 (the_core_target): New.
9203 (core_close): Remove target_ops parameter.
9204 (core_close_cleanup): Adjust.
9205 (core_target::close): New.
9206 (core_open, core_detach, get_core_registers, core_files_info)
9207 (core_xfer_partial, core_thread_alive, core_read_description)
9208 (core_pid_to_str, core_thread_name, core_has_memory)
9209 (core_has_stack, core_has_registers, core_info_proc): Rework as
9210 core_target methods.
9211 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9212 (_initialize_corelow): Initialize the_core_target.
9213 * gdbcore.h (core_target): Delete.
9214 (the_core_target): New.
9215
9216 * ctf.c: (ctf_target): New class.
9217 (ctf_ops): Now a ctf_target.
9218 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9219 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9220 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9221 methods.
9222 (init_ctf_ops): Delete.
9223 (_initialize_ctf): Don't call it.
9224 * tracefile-tfile.c (tfile_target): New class.
9225 (tfile_ops): Now a tfile_target.
9226 (tfile_open, tfile_close, tfile_files_info)
9227 (tfile_get_tracepoint_status, tfile_trace_find)
9228 (tfile_fetch_registers, tfile_xfer_partial)
9229 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9230 Refactor as tfile_target methods.
9231 (tfile_xfer_partial_features): Remove target_ops parameter.
9232 (init_tfile_ops): Delete.
9233 (_initialize_tracefile_tfile): Don't call it.
9234 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9235 (tracefile_has_stack, tracefile_has_registers)
9236 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9237 tracefile_target methods.
9238 (init_tracefile_ops): Delete.
9239 (tracefile_target::tracefile_target): New.
9240 * tracefile.h: Include "target.h".
9241 (tracefile_target): New class.
9242 (init_tracefile_ops): Delete.
9243
9244 * spu-multiarch.c (spu_multiarch_target): New class.
9245 (spu_ops): Now a spu_multiarch_target.
9246 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9247 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9248 (spu_search_memory, spu_mourn_inferior): Refactor as
9249 spu_multiarch_target methods.
9250 (init_spu_ops): Delete.
9251 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9252 complete_target_initialization.
9253
9254 * ravenscar-thread.c (ravenscar_thread_target): New class.
9255 (ravenscar_ops): Now a ravenscar_thread_target.
9256 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9257 (ravenscar_thread_alive, ravenscar_pid_to_str)
9258 (ravenscar_fetch_registers, ravenscar_store_registers)
9259 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9260 (ravenscar_stopped_by_hw_breakpoint)
9261 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9262 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9263 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9264 methods.
9265 (init_ravenscar_thread_ops): Delete.
9266 (_initialize_ravenscar): Remove references to
9267 init_ravenscar_thread_ops and complete_target_initialization.
9268
9269 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9270 (bsd_uthread_target): New class.
9271 (bsd_uthread_ops): Now a bsd_uthread_target.
9272 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9273 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9274 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9275 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9276 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9277 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9278 (bsd_uthread_target): Delete function.
9279 (_initialize_bsd_uthread): Remove reference to
9280 complete_target_initialization.
9281
9282 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9283 (target_bfd): ... this new class.
9284 (target_bfd_xfer_partial, target_bfd_get_section_table)
9285 (target_bfd_close): Refactor as target_bfd methods.
9286 (target_bfd::~target_bfd): New.
9287 (target_bfd_reopen): Adjust.
9288 (target_bfd::close): New.
9289
9290 * record-btrace.c (record_btrace_target): New class.
9291 (record_btrace_ops): Now a record_btrace_target.
9292 (record_btrace_open, record_btrace_stop_recording)
9293 (record_btrace_disconnect, record_btrace_close)
9294 (record_btrace_async, record_btrace_info)
9295 (record_btrace_insn_history, record_btrace_insn_history_range)
9296 (record_btrace_insn_history_from, record_btrace_call_history)
9297 (record_btrace_call_history_range)
9298 (record_btrace_call_history_from, record_btrace_record_method)
9299 (record_btrace_is_replaying, record_btrace_will_replay)
9300 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9301 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9302 (record_btrace_store_registers, record_btrace_prepare_to_store)
9303 (record_btrace_to_get_unwinder)
9304 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9305 (record_btrace_commit_resume, record_btrace_wait)
9306 (record_btrace_stop, record_btrace_can_execute_reverse)
9307 (record_btrace_stopped_by_sw_breakpoint)
9308 (record_btrace_supports_stopped_by_sw_breakpoint)
9309 (record_btrace_stopped_by_hw_breakpoint)
9310 (record_btrace_supports_stopped_by_hw_breakpoint)
9311 (record_btrace_update_thread_list, record_btrace_thread_alive)
9312 (record_btrace_goto_begin, record_btrace_goto_end)
9313 (record_btrace_goto, record_btrace_stop_replaying_all)
9314 (record_btrace_execution_direction)
9315 (record_btrace_prepare_to_generate_core)
9316 (record_btrace_done_generating_core): Refactor as
9317 record_btrace_target methods.
9318 (init_record_btrace_ops): Delete.
9319 (_initialize_record_btrace): Remove reference to
9320 init_record_btrace_ops.
9321 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9322 the execution_direction global.
9323 (record_full_base_target, record_full_target)
9324 (record_full_core_target): New classes.
9325 (record_full_ops): Now a record_full_target.
9326 (record_full_core_ops): Now a record_full_core_target.
9327 (record_full_target::detach, record_full_target::disconnect)
9328 (record_full_core_target::disconnect)
9329 (record_full_target::mourn_inferior, record_full_target::kill):
9330 New.
9331 (record_full_open, record_full_close, record_full_async): Refactor
9332 as methods of the record_full_base_target class.
9333 (record_full_resume, record_full_commit_resume): Refactor
9334 as methods of the record_full_target class.
9335 (record_full_wait, record_full_stopped_by_watchpoint)
9336 (record_full_stopped_data_address)
9337 (record_full_stopped_by_sw_breakpoint)
9338 (record_full_supports_stopped_by_sw_breakpoint)
9339 (record_full_stopped_by_hw_breakpoint)
9340 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9341 methods of the record_full_base_target class.
9342 (record_full_store_registers, record_full_xfer_partial)
9343 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9344 Refactor as methods of the record_full_target class.
9345 (record_full_can_execute_reverse, record_full_get_bookmark)
9346 (record_full_goto_bookmark, record_full_execution_direction)
9347 (record_full_record_method, record_full_info, record_full_delete)
9348 (record_full_is_replaying, record_full_will_replay)
9349 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9350 (record_full_stop_replaying): Refactor as methods of the
9351 record_full_base_target class.
9352 (record_full_core_resume, record_full_core_kill)
9353 (record_full_core_fetch_registers)
9354 (record_full_core_prepare_to_store)
9355 (record_full_core_store_registers, record_full_core_xfer_partial)
9356 (record_full_core_insert_breakpoint)
9357 (record_full_core_remove_breakpoint)
9358 (record_full_core_has_execution): Refactor
9359 as methods of the record_full_core_target class.
9360 (record_full_base_target::supports_delete_record): New.
9361 (init_record_full_ops): Delete.
9362 (init_record_full_core_ops): Delete.
9363 (record_full_save): Refactor as method of the
9364 record_full_base_target class.
9365 (_initialize_record_full): Remove references to
9366 init_record_full_ops and init_record_full_core_ops.
9367
9368 * remote.c (remote_target, extended_remote_target): New classes.
9369 (remote_ops): Now a remote_target.
9370 (extended_remote_ops): Now an extended_remote_target.
9371 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9372 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9373 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9374 (remote_pass_signals, remote_set_syscall_catchpoint)
9375 (remote_program_signals, )
9376 (remote_thread_always_alive): Remove target_ops parameter.
9377 (remote_thread_alive, remote_thread_name)
9378 (remote_update_thread_list, remote_threads_extra_info)
9379 (remote_static_tracepoint_marker_at)
9380 (remote_static_tracepoint_markers_by_strid)
9381 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9382 (remote_open): Refactor as methods of remote_target.
9383 (extended_remote_open, extended_remote_detach)
9384 (extended_remote_attach, extended_remote_post_attach):
9385 (extended_remote_supports_disable_randomization)
9386 (extended_remote_create_inferior): : Refactor as method of
9387 extended_remote_target.
9388 (remote_set_permissions, remote_open_1, remote_detach)
9389 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9390 (remote_resume, remote_commit_resume, remote_stop)
9391 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9392 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9393 (remote_prepare_to_store, remote_store_registers)
9394 (remote_flash_erase, remote_flash_done, remote_files_info)
9395 (remote_kill, remote_mourn, remote_insert_breakpoint)
9396 (remote_remove_breakpoint, remote_insert_watchpoint)
9397 (remote_watchpoint_addr_within_range)
9398 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9399 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9400 (remote_supports_stopped_by_sw_breakpoint)
9401 (remote_stopped_by_hw_breakpoint)
9402 (remote_supports_stopped_by_hw_breakpoint)
9403 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9404 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9405 (remote_verify_memory): Refactor as methods of remote_target.
9406 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9407 parameter.
9408 (remote_xfer_partial, remote_get_memory_xfer_limit)
9409 (remote_search_memory, remote_rcmd, remote_memory_map)
9410 (remote_pid_to_str, remote_get_thread_local_address)
9411 (remote_get_tib_address, remote_read_description): Refactor as
9412 methods of remote_target.
9413 (remote_target::fileio_open, remote_target::fileio_pwrite)
9414 (remote_target::fileio_pread, remote_target::fileio_close): New.
9415 (remote_hostio_readlink, remote_hostio_fstat)
9416 (remote_filesystem_is_local, remote_can_execute_reverse)
9417 (remote_supports_non_stop, remote_supports_disable_randomization)
9418 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9419 (remote_supports_enable_disable_tracepoint)
9420 (remote_supports_string_tracing)
9421 (remote_can_run_breakpoint_commands, remote_trace_init)
9422 (remote_download_tracepoint, remote_can_download_tracepoint)
9423 (remote_download_trace_state_variable, remote_enable_tracepoint)
9424 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9425 (remote_trace_start, remote_get_trace_status)
9426 (remote_get_tracepoint_status, remote_trace_stop)
9427 (remote_trace_find, remote_get_trace_state_variable_value)
9428 (remote_save_trace_data, remote_get_raw_trace_data)
9429 (remote_set_disconnected_tracing, remote_core_of_thread)
9430 (remote_set_circular_trace_buffer, remote_traceframe_info)
9431 (remote_get_min_fast_tracepoint_insn_len)
9432 (remote_set_trace_buffer_size, remote_set_trace_notes)
9433 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9434 (remote_disable_btrace, remote_teardown_btrace)
9435 (remote_read_btrace, remote_btrace_conf)
9436 (remote_augmented_libraries_svr4_read, remote_load)
9437 (remote_pid_to_exec_file, remote_can_do_single_step)
9438 (remote_execution_direction, remote_thread_handle_to_thread_info):
9439 Refactor as methods of remote_target.
9440 (init_remote_ops, init_extended_remote_ops): Delete.
9441 (remote_can_async_p, remote_is_async_p, remote_async)
9442 (remote_thread_events, remote_upload_tracepoints)
9443 (remote_upload_trace_state_variables): Refactor as methods of
9444 remote_target.
9445 (_initialize_remote): Remove references to init_remote_ops and
9446 init_extended_remote_ops.
9447
9448 * remote-sim.c (gdbsim_target): New class.
9449 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9450 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9451 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9452 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9453 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9454 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9455 Refactor as methods of gdbsim_target.
9456 (gdbsim_ops): Now a gdbsim_target.
9457 (init_gdbsim_ops): Delete.
9458 (gdbsim_cntrl_c): Adjust.
9459 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9460
9461 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9462 (the_amd64_linux_nat_target): New.
9463 (amd64_linux_fetch_inferior_registers)
9464 (amd64_linux_store_inferior_registers): Refactor as methods of
9465 amd64_linux_nat_target.
9466 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9467 * i386-linux-nat.c: Don't include "linux-nat.h".
9468 (i386_linux_nat_target): New class.
9469 (the_i386_linux_nat_target): New.
9470 (i386_linux_fetch_inferior_registers)
9471 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9472 as methods of i386_linux_nat_target.
9473 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9474 * inf-child.c (inf_child_ops): Delete.
9475 (inf_child_fetch_inferior_registers)
9476 (inf_child_store_inferior_registers): Delete.
9477 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9478 methods of inf_child_target.
9479 (inf_child_target::supports_terminal_ours)
9480 (inf_child_target::terminal_init)
9481 (inf_child_target::terminal_inferior)
9482 (inf_child_target::terminal_ours_for_output)
9483 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9484 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9485 New.
9486 (inf_child_open, inf_child_disconnect, inf_child_close)
9487 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9488 (inf_child_post_startup_inferior, inf_child_can_run)
9489 (inf_child_pid_to_exec_file): Refactor as methods of
9490 inf_child_target.
9491 (inf_child_follow_fork): Delete.
9492 (inf_child_target::can_create_inferior)
9493 (inf_child_target::can_attach): New.
9494 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9495 (inf_child_target::has_stack, inf_child_target::has_registers)
9496 (inf_child_target::has_execution): New.
9497 (inf_child_fileio_open, inf_child_fileio_pwrite)
9498 (inf_child_fileio_pread, inf_child_fileio_fstat)
9499 (inf_child_fileio_close, inf_child_fileio_unlink)
9500 (inf_child_fileio_readlink, inf_child_use_agent)
9501 (inf_child_can_use_agent): Refactor as methods of
9502 inf_child_target.
9503 (return_zero, inf_child_target): Delete.
9504 (inf_child_target::inf_child_target): New.
9505 * inf-child.h: Include "target.h".
9506 (inf_child_target): Delete function prototype.
9507 (inf_child_target): New class.
9508 (inf_child_open_target, inf_child_mourn_inferior)
9509 (inf_child_maybe_unpush_target): Delete.
9510 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9511 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9512 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9513 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9514 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9515 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9516 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9517 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9518 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9519 methods of inf_ptrace_target.
9520 (inf_ptrace_target): Delete function.
9521 * inf-ptrace.h: Include "inf-child.h".
9522 (inf_ptrace_target): Delete function declaration.
9523 (inf_ptrace_target): New class.
9524 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9525 * linux-nat.c (linux_target): New.
9526 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9527 (linux_nat_target::~linux_nat_target): New.
9528 (linux_child_post_attach, linux_child_post_startup_inferior)
9529 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9530 (linux_child_remove_fork_catchpoint)
9531 (linux_child_insert_vfork_catchpoint)
9532 (linux_child_remove_vfork_catchpoint)
9533 (linux_child_insert_exec_catchpoint)
9534 (linux_child_remove_exec_catchpoint)
9535 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9536 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9537 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9538 (linux_nat_stopped_data_address)
9539 (linux_nat_stopped_by_sw_breakpoint)
9540 (linux_nat_supports_stopped_by_sw_breakpoint)
9541 (linux_nat_stopped_by_hw_breakpoint)
9542 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9543 (linux_nat_kill, linux_nat_mourn_inferior)
9544 (linux_nat_xfer_partial, linux_nat_thread_alive)
9545 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9546 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9547 (linux_child_static_tracepoint_markers_by_strid)
9548 (linux_nat_is_async_p, linux_nat_can_async_p)
9549 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9550 (linux_nat_supports_multi_process)
9551 (linux_nat_supports_disable_randomization, linux_nat_async)
9552 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9553 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9554 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9555 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9556 methods of linux_nat_target.
9557 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9558 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9559 parameter.
9560 (check_stopped_by_watchpoint): Adjust.
9561 (linux_xfer_partial): Delete.
9562 (linux_target_install_ops, linux_target, linux_nat_add_target):
9563 Delete.
9564 (linux_nat_target::linux_nat_target): New.
9565 * linux-nat.h: Include "inf-ptrace.h".
9566 (linux_nat_target): New.
9567 (linux_target, linux_target_install_ops, linux_nat_add_target):
9568 Delete function declarations.
9569 (linux_target): Declare global.
9570 * linux-thread-db.c (thread_db_target): New.
9571 (thread_db_target::thread_db_target): New.
9572 (thread_db_ops): Delete.
9573 (the_thread_db_target): New.
9574 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9575 (thread_db_update_thread_list, thread_db_pid_to_str)
9576 (thread_db_extra_thread_info)
9577 (thread_db_thread_handle_to_thread_info)
9578 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9579 (thread_db_resume): Refactor as methods of thread_db_target.
9580 (init_thread_db_ops): Delete.
9581 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9582 * x86-linux-nat.c: Don't include "linux-nat.h".
9583 (super_post_startup_inferior): Delete.
9584 (x86_linux_nat_target::~x86_linux_nat_target): New.
9585 (x86_linux_child_post_startup_inferior)
9586 (x86_linux_read_description, x86_linux_enable_btrace)
9587 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9588 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9589 methods of x86_linux_nat_target.
9590 (x86_linux_create_target): Delete. Bits folded ...
9591 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9592 pointer.
9593 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9594 (x86_linux_nat_target): New class.
9595 (x86_linux_create_target): Delete.
9596 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9597 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9598 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9599 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9600 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9601 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9602 make extern.
9603 (x86_use_watchpoints): Delete.
9604 * x86-nat.h: Include "breakpoint.h" and "target.h".
9605 (x86_use_watchpoints): Delete.
9606 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9607 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9608 (x86_insert_watchpoint, x86_remove_watchpoint)
9609 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9610 (x86_stopped_by_hw_breakpoint): New declarations.
9611 (x86_nat_target): New template class.
9612
9613 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9614 (the_ppc_linux_nat_target): New.
9615 (ppc_linux_fetch_inferior_registers)
9616 (ppc_linux_can_use_hw_breakpoint)
9617 (ppc_linux_region_ok_for_hw_watchpoint)
9618 (ppc_linux_ranged_break_num_registers)
9619 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9620 (ppc_linux_insert_mask_watchpoint)
9621 (ppc_linux_remove_mask_watchpoint)
9622 (ppc_linux_can_accel_watchpoint_condition)
9623 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9624 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9625 (ppc_linux_watchpoint_addr_within_range)
9626 (ppc_linux_masked_watch_num_registers)
9627 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9628 (ppc_linux_read_description): Refactor as methods of
9629 ppc_linux_nat_target.
9630 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
9631
9632 * procfs.c (procfs_xfer_partial): Delete forward declaration.
9633 (procfs_target): New class.
9634 (the_procfs_target): New.
9635 (procfs_target): Delete function.
9636 (procfs_auxv_parse, procfs_attach, procfs_detach)
9637 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9638 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9639 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9640 (procfs_create_inferior, procfs_update_thread_list)
9641 (procfs_thread_alive, procfs_pid_to_str)
9642 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9643 (procfs_stopped_data_address, procfs_insert_watchpoint)
9644 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9645 (proc_find_memory_regions, procfs_info_proc)
9646 (procfs_make_note_section): Refactor as methods of procfs_target.
9647 (_initialize_procfs): Adjust.
9648 * sol-thread.c (sol_thread_target): New class.
9649 (sol_thread_ops): Now a sol_thread_target.
9650 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9651 (sol_thread_fetch_registers, sol_thread_store_registers)
9652 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9653 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9654 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9655 (init_sol_thread_ops): Delete.
9656 (_initialize_sol_thread): Adjust. Remove references to
9657 init_sol_thread_ops and complete_target_initialization.
9658
9659 * windows-nat.c (windows_nat_target): New class.
9660 (windows_fetch_inferior_registers)
9661 (windows_store_inferior_registers, windows_resume, windows_wait)
9662 (windows_attach, windows_detach, windows_pid_to_exec_file)
9663 (windows_files_info, windows_create_inferior)
9664 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9665 (windows_close, windows_pid_to_str, windows_xfer_partial)
9666 (windows_get_tib_address, windows_get_ada_task_ptid)
9667 (windows_thread_name, windows_thread_alive): Refactor as
9668 windows_nat_target methods.
9669 (do_initial_windows_stuff): Adjust.
9670 (windows_target): Delete function.
9671 (_initialize_windows_nat): Adjust.
9672
9673 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9674 (darwin_mourn_inferior, darwin_kill_inferior)
9675 (darwin_create_inferior, darwin_attach, darwin_detach)
9676 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9677 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9678 (darwin_supports_multi_process): Refactor as darwin_nat_target
9679 methods.
9680 (darwin_resume_to, darwin_files_info): Delete.
9681 (_initialize_darwin_inferior): Rename to ...
9682 (_initialize_darwin_nat): ... this. Adjust to C++ification.
9683 * darwin-nat.h: Include "inf-child.h".
9684 (darwin_nat_target): New class.
9685 (darwin_complete_target): Delete.
9686 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9687 (darwin_target): New.
9688 (i386_darwin_fetch_inferior_registers)
9689 (i386_darwin_store_inferior_registers): Refactor as methods of
9690 darwin_nat_target.
9691 (darwin_complete_target): Delete, with ...
9692 (_initialize_i386_darwin_nat): ... bits factored out here.
9693
9694 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9695 (the_alpha_linux_nat_target): New.
9696 (alpha_linux_register_u_offset): Refactor as
9697 alpha_linux_nat_target method.
9698 (_initialize_alpha_linux_nat): Adjust.
9699 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9700 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9701 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9702 methods of linux_nat_trad_target.
9703 (linux_trad_target): Delete.
9704 * linux-nat-trad.h (linux_trad_target): Delete function.
9705 (linux_nat_trad_target): New class.
9706 * mips-linux-nat.c (mips_linux_nat_target): New class.
9707 (super_fetch_registers, super_store_registers, super_close):
9708 Delete.
9709 (the_mips_linux_nat_target): New.
9710 (mips64_linux_regsets_fetch_registers)
9711 (mips64_linux_regsets_store_registers)
9712 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9713 (mips_linux_register_u_offset, mips_linux_read_description)
9714 (mips_linux_can_use_hw_breakpoint)
9715 (mips_linux_stopped_by_watchpoint)
9716 (mips_linux_stopped_data_address)
9717 (mips_linux_region_ok_for_hw_watchpoint)
9718 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9719 (mips_linux_close): Refactor as methods of mips_linux_nat.
9720 (_initialize_mips_linux_nat): Adjust to C++ification.
9721
9722 * aix-thread.c (aix_thread_target): New class.
9723 (aix_thread_ops): Now an aix_thread_target.
9724 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9725 (aix_thread_fetch_registers, aix_thread_store_registers)
9726 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9727 (aix_thread_thread_alive, aix_thread_pid_to_str)
9728 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9729 Refactor as methods of aix_thread_target.
9730 (init_aix_thread_ops): Delete.
9731 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9732 and complete_target_initialization.
9733 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9734 (rs6000_nat_target): New class.
9735 (the_rs6000_nat_target): New.
9736 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9737 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9738 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9739 (super_create_inferior): Delete.
9740 (_initialize_rs6000_nat): Adjust to C++ification.
9741
9742 * arm-linux-nat.c (arm_linux_nat_target): New class.
9743 (the_arm_linux_nat_target): New.
9744 (arm_linux_fetch_inferior_registers)
9745 (arm_linux_store_inferior_registers, arm_linux_read_description)
9746 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9747 (arm_linux_remove_hw_breakpoint)
9748 (arm_linux_region_ok_for_hw_watchpoint)
9749 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9750 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9751 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9752 arm_linux_nat_target.
9753 (_initialize_arm_linux_nat): Adjust to C++ification.
9754
9755 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9756 (the_aarch64_linux_nat_target): New.
9757 (aarch64_linux_fetch_inferior_registers)
9758 (aarch64_linux_store_inferior_registers)
9759 (aarch64_linux_child_post_startup_inferior)
9760 (aarch64_linux_read_description)
9761 (aarch64_linux_can_use_hw_breakpoint)
9762 (aarch64_linux_insert_hw_breakpoint)
9763 (aarch64_linux_remove_hw_breakpoint)
9764 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9765 (aarch64_linux_region_ok_for_hw_watchpoint)
9766 (aarch64_linux_stopped_data_address)
9767 (aarch64_linux_stopped_by_watchpoint)
9768 (aarch64_linux_watchpoint_addr_within_range)
9769 (aarch64_linux_can_do_single_step): Refactor as methods of
9770 aarch64_linux_nat_target.
9771 (super_post_startup_inferior): Delete.
9772 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9773
9774 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9775 (the_hppa_linux_nat_target): New.
9776 (hppa_linux_fetch_inferior_registers)
9777 (hppa_linux_store_inferior_registers): Refactor as methods of
9778 hppa_linux_nat_target.
9779 (_initialize_hppa_linux_nat): Adjust to C++ification.
9780
9781 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9782 (the_ia64_linux_nat_target): New.
9783 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9784 (ia64_linux_stopped_data_address)
9785 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9786 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9787 ia64_linux_nat_target methods.
9788 (super_xfer_partial): Delete.
9789 (_initialize_ia64_linux_nat): Adjust to C++ification.
9790
9791 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9792 (the_m32r_linux_nat_target): New.
9793 (m32r_linux_fetch_inferior_registers)
9794 (m32r_linux_store_inferior_registers): Refactor as
9795 m32r_linux_nat_target methods.
9796 (_initialize_m32r_linux_nat): Adjust to C++ification.
9797
9798 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9799 (the_m68k_linux_nat_target): New.
9800 (m68k_linux_fetch_inferior_registers)
9801 (m68k_linux_store_inferior_registers): Refactor as
9802 m68k_linux_nat_target methods.
9803 (_initialize_m68k_linux_nat): Adjust to C++ification.
9804
9805 * s390-linux-nat.c (s390_linux_nat_target): New class.
9806 (the_s390_linux_nat_target): New.
9807 (s390_linux_fetch_inferior_registers)
9808 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9809 (s390_insert_watchpoint, s390_remove_watchpoint)
9810 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9811 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9812 (s390_auxv_parse, s390_read_description): Refactor as methods of
9813 s390_linux_nat_target.
9814 (_initialize_s390_nat): Adjust to C++ification.
9815
9816 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9817 (the_sparc_linux_nat_target): New.
9818 (_initialize_sparc_linux_nat): Adjust to C++ification.
9819 * sparc-nat.c (sparc_fetch_inferior_registers)
9820 (sparc_store_inferior_registers): Remove target_ops parameter.
9821 * sparc-nat.h (sparc_fetch_inferior_registers)
9822 (sparc_store_inferior_registers): Remove target_ops parameter.
9823 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9824 (the_sparc64_linux_nat_target): New.
9825 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9826
9827 * spu-linux-nat.c (spu_linux_nat_target): New class.
9828 (the_spu_linux_nat_target): New.
9829 (spu_child_post_startup_inferior, spu_child_post_attach)
9830 (spu_child_wait, spu_fetch_inferior_registers)
9831 (spu_store_inferior_registers, spu_xfer_partial)
9832 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9833 methods.
9834 (_initialize_spu_nat): Adjust to C++ification.
9835
9836 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9837 (the_tilegx_linux_nat_target): New.
9838 (fetch_inferior_registers, store_inferior_registers):
9839 Refactor as methods.
9840 (_initialize_tile_linux_nat): Adjust to C++ification.
9841
9842 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9843 (the_xtensa_linux_nat_target): New.
9844 (xtensa_linux_fetch_inferior_registers)
9845 (xtensa_linux_store_inferior_registers): Refactor as
9846 xtensa_linux_nat_target methods.
9847 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9848
9849 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9850 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9851 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9852 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9853 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9854 (fbsd_stopped_by_sw_breakpoint)
9855 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9856 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9857 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9858 (fbsd_post_startup_inferior, fbsd_post_attach)
9859 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9860 (fbsd_set_syscall_catchpoint)
9861 (super_xfer_partial, super_resume, super_wait)
9862 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9863 (fbsd_handle_debug_trap): Remove target_ops parameter.
9864 (fbsd_nat_add_target): Delete.
9865 * fbsd-nat.h: Include "inf-ptrace.h".
9866 (fbsd_nat_add_target): Delete.
9867 (USE_SIGTRAP_SIGINFO): Define.
9868 (fbsd_nat_target): New class.
9869
9870 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9871 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9872 (amd64bsd_target): Delete.
9873 * amd64-bsd-nat.h: New file.
9874 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9875 "x86-bsd-nat.h".
9876 (amd64_fbsd_nat_target): New class.
9877 (the_amd64_fbsd_nat_target): New.
9878 (amd64fbsd_read_description): Refactor as method of
9879 amd64_fbsd_nat_target.
9880 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9881 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9882 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9883 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9884 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9885 (i386bsd_target): Delete.
9886 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9887 (i386bsd_fetch_inferior_registers)
9888 (i386bsd_store_inferior_registers): Declare.
9889 (i386_bsd_nat_target): New class.
9890 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9891 (the_i386_fbsd_nat_target): New.
9892 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9893 i386_fbsd_nat_target methods.
9894 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9895 (_initialize_i386fbsd_nat): Adjust to C++ification.
9896 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9897 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9898 (_initialize_x86_bsd_nat): Adjust to C++ification.
9899 * x86-bsd-nat.h: Include "x86-nat.h".
9900 (x86bsd_target): Delete declaration.
9901 (x86bsd_nat_target): New class.
9902
9903 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9904 (the_aarch64_fbsd_nat_target): New.
9905 (aarch64_fbsd_fetch_inferior_registers)
9906 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9907 aarch64_fbsd_nat_target.
9908 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9909 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9910 (the_alpha_bsd_nat_target): New.
9911 (alphabsd_fetch_inferior_registers)
9912 (alphabsd_store_inferior_registers): Refactor as
9913 alpha_bsd_nat_target methods.
9914 (_initialize_alphabsd_nat): Refactor as methods of
9915 alpha_bsd_nat_target.
9916 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9917 (the_amd64_nbsd_nat_target): New.
9918 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9919 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9920 (the_amd64_obsd_nat_target): New.
9921 (_initialize_amd64obsd_nat): Adjust to C++ification.
9922 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9923 (the_arm_fbsd_nat_target): New.
9924 (arm_fbsd_fetch_inferior_registers)
9925 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9926 (_initialize_arm_fbsd_nat): Refactor as methods of
9927 arm_fbsd_nat_target.
9928 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9929 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9930 (the_arm_netbsd_nat_target): New.
9931 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9932 arm_netbsd_nat_target.
9933 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9934 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9935 (the_hppa_nbsd_nat_target): New.
9936 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9937 hppa_nbsd_nat_target methods.
9938 (_initialize_hppanbsd_nat): Adjust to C++ification.
9939 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9940 (the_hppa_obsd_nat_target): New.
9941 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9942 methods of hppa_obsd_nat_target.
9943 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9944 add_target.
9945 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9946 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9947 add_target.
9948 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9949 (_initialize_i386obsd_nat): Use add_target.
9950 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9951 (the_m68k_bsd_nat_target): New.
9952 (m68kbsd_fetch_inferior_registers)
9953 (m68kbsd_store_inferior_registers): Refactor as methods of
9954 m68k_bsd_nat_target.
9955 (_initialize_m68kbsd_nat): Adjust to C++ification.
9956 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9957 (the_mips_fbsd_nat_target): New.
9958 (mips_fbsd_fetch_inferior_registers)
9959 (mips_fbsd_store_inferior_registers): Refactor as methods of
9960 mips_fbsd_nat_target.
9961 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9962 add_target.
9963 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9964 (the_mips_nbsd_nat_target): New.
9965 (mipsnbsd_fetch_inferior_registers)
9966 (mipsnbsd_store_inferior_registers): Refactor as methods of
9967 mips_nbsd_nat_target.
9968 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9969 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9970 (the_mips64_obsd_nat_target): New.
9971 (mips64obsd_fetch_inferior_registers)
9972 (mips64obsd_store_inferior_registers): Refactor as methods of
9973 mips64_obsd_nat_target.
9974 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9975 add_target.
9976 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9977 nbsd_nat_target.
9978 * nbsd-nat.h: Include "inf-ptrace.h".
9979 (nbsd_nat_target): New class.
9980 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9981 (obsd_wait): Refactor as methods of obsd_nat_target.
9982 (obsd_add_target): Delete.
9983 * obsd-nat.h: Include "inf-ptrace.h".
9984 (obsd_nat_target): New class.
9985 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9986 (the_ppc_fbsd_nat_target): New.
9987 (ppcfbsd_fetch_inferior_registers)
9988 (ppcfbsd_store_inferior_registers): Refactor as methods of
9989 ppc_fbsd_nat_target.
9990 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9991 add_target.
9992 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9993 (the_ppc_nbsd_nat_target): New.
9994 (ppcnbsd_fetch_inferior_registers)
9995 (ppcnbsd_store_inferior_registers): Refactor as methods of
9996 ppc_nbsd_nat_target.
9997 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9998 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9999 (the_ppc_obsd_nat_target): New.
10000 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10001 methods of ppc_obsd_nat_target.
10002 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
10003 add_target.
10004 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10005 (the_sh_nbsd_nat_target): New.
10006 (shnbsd_fetch_inferior_registers)
10007 (shnbsd_store_inferior_registers): Refactor as methods of
10008 sh_nbsd_nat_target.
10009 (_initialize_shnbsd_nat): Adjust to C++ification.
10010 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10011 (inf_ptrace_xfer_partial): Delete.
10012 (sparc_xfer_partial, sparc_target): Delete.
10013 * sparc-nat.h (sparc_fetch_inferior_registers)
10014 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10015 (sparc_target): Delete function declaration.
10016 (sparc_target): New template class.
10017 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10018 (_initialize_sparcnbsd_nat): Adjust to C++ification.
10019 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10020 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
10021 add_target.
10022 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10023 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10024 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10025 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
10026 add_target.
10027 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10028 (the_vax_bsd_nat_target): New.
10029 (vaxbsd_fetch_inferior_registers)
10030 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10031 methods.
10032 (_initialize_vaxbsd_nat): Adjust to C++ification.
10033
10034 * bsd-kvm.c (bsd_kvm_target): New class.
10035 (bsd_kvm_ops): Now a bsd_kvm_target.
10036 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10037 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10038 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10039 bsd_kvm_target.
10040 (bsd_kvm_return_one): Delete.
10041 (bsd_kvm_add_target): Adjust to C++ification.
10042
10043 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10044 (nto_procfs_target_procfs): New classes.
10045 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10046 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10047 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10048 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10049 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10050 (procfs_remove_hw_breakpoint, procfs_resume)
10051 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10052 (procfs_kill_inferior, procfs_store_registers)
10053 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10054 as methods of nto_procfs_target.
10055 (nto_procfs_ops): Now an nto_procfs_target_procfs.
10056 (nto_native_ops): Delete.
10057 (procfs_open, procfs_native_open): Delete.
10058 (nto_native_ops): Now an nto_procfs_target_native.
10059 (init_procfs_targets): Adjust to C++ification.
10060 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10061 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10062 Refactor as methods of nto_procfs_target.
10063
10064 * go32-nat.c (go32_nat_target): New class.
10065 (the_go32_nat_target): New.
10066 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10067 (go32_store_registers, go32_xfer_partial, go32_files_info)
10068 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10069 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10070 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10071 (go32_pid_to_str): Refactor as methods of go32_nat_target.
10072 (go32_target): Delete.
10073 (_initialize_go32_nat): Adjust to C++ification.
10074
10075 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10076 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10077 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10078 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10079 gnu_nat_target.
10080 (gnu_target): Delete.
10081 * gnu-nat.h (gnu_target): Delete.
10082 (gnu_nat_target): New class.
10083 * i386-gnu-nat.c (gnu_base_target): New.
10084 (i386_gnu_nat_target): New class.
10085 (the_i386_gnu_nat_target): New.
10086 (_initialize_i386gnu_nat): Adjust to C++ification.
10087
10088 2018-05-02 Pedro Alves <palves@redhat.com>
10089
10090 * bfd-target.c (target_bfd_xclose): Rename to ...
10091 (target_bfd_close): ... this.
10092 (target_bfd_reopen): Adjust.
10093 * target.c (target_close): Remove references to to_xclose.
10094 * target.h (target_ops::to_xclose): Delete.
10095 (target_ops::to_close): Update comments.
10096
10097 2018-05-02 Pedro Alves <palves@redhat.com>
10098
10099 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10100 "linux-nat.h".
10101 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10102 * inf-ptrace.c (inf_ptrace_register_u_offset)
10103 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10104 (inf_ptrace_store_register, inf_ptrace_store_registers)
10105 (inf_ptrace_trad_target): Move to ...
10106 * linux-nat-trad.c: ... this new file.
10107 * linux-nat-trad.h: New file.
10108 * linux-nat.c (linux_target_install_ops): Make extern.
10109 (linux_trad_target): Delete.
10110 * linux-nat.h (linux_trad_target): Delete declaration.
10111 (linux_target_install_ops): Declare.
10112 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10113 "linux-nat.h".
10114
10115 2018-05-02 Pedro Alves <palves@redhat.com>
10116
10117 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10118 procfs_target/add_target here.
10119 * procfs.c (procfs_target): Make static.
10120 (_initialize_procfs): Call add_target here.
10121 * procfs.h (struct target_ops): Remove forward declaration.
10122 (procfs_target): Remove declaration.
10123 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10124
10125 2018-05-02 Pedro Alves <palves@redhat.com>
10126
10127 * procfs.c (procfs_stopped_by_watchpoint)
10128 (procfs_insert_watchpoint, procfs_remove_watchpoint)
10129 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10130 Forward declare.
10131 (procfs_use_watchpoints): Delete, move contents...
10132 (procfs_target): ... here.
10133 * procfs.h (procfs_use_watchpoints): Delete declaration.
10134 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10135 procfs_use_watchpoints.
10136 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10137 procfs_use_watchpoints.
10138
10139 2018-05-02 Tom Tromey <tom@tromey.com>
10140
10141 PR python/20084:
10142 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10143 and var_zuinteger_unlimited.
10144 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10145 and PARAM_ZUINTEGER_UNLIMITED.
10146 (set_parameter_value): Handle var_zuinteger and
10147 var_zuinteger_unlimited.
10148 (add_setshow_generic): Likewise.
10149 (parmpy_init): Likewise.
10150
10151 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
10152
10153 PR rust/23124
10154 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10155 pointer is not null before dereferencing it.
10156
10157 2018-04-30 Tom Tromey <tom@tromey.com>
10158
10159 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10160 is_mi_like_p.
10161
10162 2018-04-30 Tom Tromey <tom@tromey.com>
10163
10164 * breakpoint.c (mention): Remove use of is_mi_like_p.
10165 (print_mention_ranged_breakpoint): Likewise.
10166 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10167 of is_mi_like_p.
10168
10169 2018-04-30 Tom Tromey <tom@tromey.com>
10170
10171 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10172
10173 2018-04-30 Tom Tromey <tom@tromey.com>
10174
10175 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10176 (info_spu_event_command): Remove some uses of is_mi_like_p.
10177
10178 2018-04-30 Tom Tromey <tom@tromey.com>
10179
10180 * python/py-framefilter.c (py_print_single_arg)
10181 (enumerate_locals, py_print_args, py_print_frame): Remove some
10182 uses of is_mi_like_p.
10183
10184 2018-04-30 Tom Tromey <tom@tromey.com>
10185
10186 * ui-out.c: Update.
10187 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10188 * ui-out.h (ui_out::is_mi_like_p): Now const.
10189 (ui_out::do_is_mi_like_p): Now const.
10190 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10191
10192 2018-04-30 Tom Tromey <tom@tromey.com>
10193
10194 * varobj.c (varobj_set_visualizer): Use new_reference.
10195 * python/python.c (gdbpy_decode_line): Use new_reference.
10196 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10197 new_reference.
10198
10199 2018-04-30 Tom Tromey <tom@tromey.com>
10200
10201 * varobj.c (install_new_value): Use new_reference.
10202 * value.h (value_incref): Return void. Swap intro comment with
10203 value_decref.
10204 * value.c (set_value_parent): Use new_reference.
10205 (value_incref): Return void. Update intro comment.
10206 (release_value): Use new_reference.
10207 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10208
10209 2018-04-30 Tom Tromey <tom@tromey.com>
10210
10211 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10212 * gdb_bfd.h (new_bfd_ref): Remove.
10213 (gdb_bfd_open): Update comment.
10214 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10215 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10216 (gdb_bfd_fdopenr): Use new_reference.
10217 * exec.c (exec_file_attach): Use new_reference.
10218
10219 2018-04-30 Tom Tromey <tom@tromey.com>
10220
10221 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10222 method.
10223
10224 2018-04-30 Tom Tromey <tom@tromey.com>
10225
10226 * jit.c (jit_read_code_entry): Use type_align.
10227 * i386-tdep.c (i386_gdbarch_init): Don't call
10228 set_gdbarch_long_long_align_bit.
10229 * gdbarch.sh: Remove long_long_align_bit.
10230 * gdbarch.c, gdbarch.h: Rebuild.
10231 * arc-tdep.c (arc_type_align): New function.
10232 (arc_gdbarch_init): Use arc_type_align. Don't call
10233 set_gdbarch_long_long_align_bit.
10234
10235 2018-04-30 Tom Tromey <tom@tromey.com>
10236
10237 * rust-lang.c (rust_type_alignment): Remove.
10238 (rust_composite_type): Use type_align.
10239
10240 2018-04-30 Tom Tromey <tom@tromey.com>
10241
10242 * NEWS: Mention Type.align.
10243 * python/py-type.c (typy_get_alignof): New function.
10244 (type_object_getset): Add "alignof".
10245
10246 2018-04-30 Tom Tromey <tom@tromey.com>
10247
10248 PR exp/17095:
10249 * NEWS: Update.
10250 * std-operator.def (UNOP_ALIGNOF): New operator.
10251 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10252 New.
10253 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10254 * c-lang.c (c_op_print_tab): Add alignof.
10255 * c-exp.y (ALIGNOF): New token.
10256 (exp): Add "ALIGNOF" production.
10257 (ident_tokens): Add _Alignof and alignof.
10258
10259 2018-04-30 Tom Tromey <tom@tromey.com>
10260
10261 * i386-tdep.c (i386_type_align): New function.
10262 (i386_gdbarch_init): Update.
10263 * gdbarch.sh (type_align): New method.
10264 * gdbarch.c, gdbarch.h: Rebuild.
10265 * arch-utils.h (default_type_align): Declare.
10266 * arch-utils.c (default_type_align): New function.
10267 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10268 (struct type) <align_log2>: New field.
10269 <instance_flags>: Now a bitfield.
10270 (TYPE_RAW_ALIGN): New macro.
10271 (type_align, type_raw_align, set_type_align): Declare.
10272 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10273 functions.
10274 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10275 (get_alignment, maybe_set_alignment): New functions.
10276 (read_structure_type, read_enumeration_type, read_array_type)
10277 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10278 (read_subrange_type, read_base_type): Set type alignment.
10279
10280 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10281
10282 * dwarf2read.c (read_index_from_section): Use bool.
10283
10284 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10285
10286 PR gdb/22950
10287 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10288 with #ifdef.
10289
10290 2018-04-29 John Reiser <jreiser@BitWagon.com>
10291
10292 PR build/22873
10293 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10294 last step, and do it atomically.
10295
10296 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10297
10298 * compile/compile-c-types.c (convert_int, convert_float):
10299 Update for C FE v1.
10300
10301 2018-04-27 Tom Tromey <tom@tromey.com>
10302
10303 PR rust/22545:
10304 * rust-lang.c (rust_inclusive_range_type_p): New function.
10305 (rust_range): Handle inclusive ranges.
10306 (rust_compute_range): Likewise.
10307 * rust-exp.y (struct rust_op) <inclusive>: New field.
10308 (DOTDOTEQ): New constant.
10309 (range_expr): Add "..=" productions.
10310 (operator_tokens): Add "..=" token.
10311 (ast_range): Add "inclusive" parameter.
10312 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10313 ranges.
10314 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10315 bounds values.
10316 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10317 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10318 Update comments.
10319 * expprint.c (print_subexp_standard): Handle new bounds values.
10320 (dump_subexp_body_standard): Likewise.
10321
10322 2018-04-27 Tom Tromey <tom@tromey.com>
10323
10324 * configure: Rebuild.
10325 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10326 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10327 "OVERRIDE".
10328 (class symbol_needs_eval_context): Likewise.
10329 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10330 (mock_mapped_index::symbol_name_at): Use "override". Remove
10331 "virtual".
10332 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10333 "override".
10334 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10335 * aarch64-tdep.c (instruction_reader::read): Use "override".
10336 (instruction_reader_test::read): Likewise.
10337 * arm-tdep.c (instruction_reader::read): Use "override".
10338 (instruction_reader_thumb::read): Likewise.
10339
10340 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10341
10342 PR remote/9665
10343 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10344 instead of remote_send.
10345 (remote_send): Remove.
10346
10347 2018-04-26 Pedro Alves <palves@redhat.com>
10348
10349 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10350 find_function_start_sal instead of find_pc_line.
10351
10352 2018-04-26 Pedro Alves <palves@redhat.com>
10353
10354 * breakpoint.c (set_breakpoint_location_function): Handle
10355 mst_data_gnu_ifunc.
10356 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10357 * elfread.c (elf_symtab_read): Give data symbols with
10358 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10359 (elf_rel_plt_read): Update comment.
10360 * linespec.c (convert_linespec_to_sals): Handle
10361 mst_data_gnu_ifunc.
10362 (minsym_found): Handle mst_data_gnu_ifunc.
10363 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10364 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10365 * parse.c (find_minsym_type_and_address): Handle
10366 mst_data_gnu_ifunc.
10367 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10368 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10369 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10370 comment.
10371 <mst_data_gnu_ifunc>: New enumerator.
10372
10373 2018-04-26 Pedro Alves <palves@redhat.com>
10374
10375 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10376 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10377 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10378 Handle it.
10379 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10380 (lookup_minimal_symbol_by_pc): Adjust.
10381 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10382 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10383 * minsyms.h (lookup_msym_prefer): New enum.
10384 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10385 parameter by a lookup_msym_prefer parameter.
10386
10387 2018-04-26 Pedro Alves <palves@redhat.com>
10388
10389 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10390 ends in "@plt" instead of looking at the symbol's section.
10391
10392 2018-04-26 Pedro Alves <palves@redhat.com>
10393
10394 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10395 all references.
10396 (find_pc_partial_function_gnu_ifunc): Rename to ...
10397 (find_pc_partial_function): ... this, and remove references to
10398 'is_gnu_ifunc_p'.
10399 (find_pc_partial_function): Delete old implementation.
10400 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10401
10402 2018-04-26 Pedro Alves <palves@redhat.com>
10403
10404 * linespec.c (struct bound_minimal_symbol_search_key): New.
10405 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10406 skip first line if we found a GNU ifunc minimal symbol by name.
10407 (compare_msymbols): Change parameters to work with a destructured
10408 lhs minsym.
10409 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10410 functions.
10411
10412 2018-04-26 Pedro Alves <palves@redhat.com>
10413
10414 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10415 ifunc targets here. Instead, if we have an ifunc minsym, use its
10416 address/name.
10417 (add_location_to_breakpoint): Store the minsym and the objfile in
10418 the breakpoint location.
10419 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10420 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10421 Record the minsym in the sal.
10422 * symtab.h (symtab_and_line) <msymbol>: New field.
10423
10424 2018-04-26 Pedro Alves <palves@redhat.com>
10425
10426 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10427 unless we actually resolved the ifunc.
10428
10429 2018-04-26 Pedro Alves <palves@redhat.com>
10430
10431 * c-exp.y (variable production): Prefer ifunc minsyms over
10432 regular function symbols.
10433 * symtab.c (find_gnu_ifunc): New function.
10434 * minsyms.h (lookup_msym_prefer): New enum.
10435 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10436 parameter by a lookup_msym_prefer parameter.
10437 * symtab.h (find_gnu_ifunc): New declaration.
10438
10439 2018-04-26 Pedro Alves <palves@redhat.com>
10440
10441 * blockframe.c (find_gnu_ifunc_target_type): New function.
10442 (find_function_type): New.
10443 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10444 return a value with a memory address.
10445 (eval_call): For calls to GNU ifunc functions, try to find the
10446 type of the target function from the type that the resolver
10447 returns.
10448 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10449 symbols.
10450 * infcall.c (find_function_return_type): Delete.
10451 (find_function_addr): Add 'function_type' parameter. For calls to
10452 GNU ifunc functions, try to find the type of the target function
10453 from the type that the resolver returns, and return it via
10454 FUNCTION_TYPE.
10455 (call_function_by_hand_dummy): Adjust to use the function type
10456 returned by find_function_addr.
10457 (find_function_addr): Add 'function_type' parameter and move
10458 description here.
10459 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10460 declarations.
10461
10462 2018-04-26 Pedro Alves <palves@redhat.com>
10463
10464 * c-exp.y (variable production): Skip finding an alias for ifunc
10465 symbols.
10466
10467 2018-04-26 Pedro Alves <palves@redhat.com>
10468
10469 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10470
10471 2018-04-25 Pedro Alves <palves@redhat.com>
10472
10473 * infcmd.c (kill_command): Print the pid as string, not the whole
10474 thread's ptid. Add comment. s/has been killed/killed/ in output
10475 message.
10476 * remote.c (remote_detach_1): Print the pid as string, not the
10477 whole thread's ptid.
10478
10479 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10480 Sergio Durigan Junior <sergiodj@redhat.com>
10481 Pedro Alves <palves@redhat.com>
10482
10483 * infcmd.c (kill_command): Print message when inferior has
10484 been killed.
10485 * inferior.c (print_inferior_events): Remove 'static'. Set as
10486 '1'.
10487 (add_inferior): Improve message printed when
10488 'print_inferior_events' is on.
10489 (exit_inferior): Remove message printed when
10490 'print_inferior_events' is on.
10491 (detach_inferior): Improve message printed when
10492 'print_inferior_events' is on.
10493 (initialize_inferiors): Use 'add_inferior_silent' to set
10494 'current_inferior_'.
10495 * inferior.h (print_inferior_events): Declare here as
10496 'extern'.
10497 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10498 '[Detaching...]' messages when 'print_inferior_events' is on.
10499 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10500 as prefix/suffix for messages. Remove periods. Fix erroneous
10501 'Detaching after fork from child...', replace it by '... from
10502 parent...'.
10503 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10504 prefix/suffix when printing 'Detaching...' messages. Print
10505 them when 'print_inferior_events' is on.
10506 * remote.c (remote_detach_1): Print message when detaching
10507 from inferior and '!is_fork_parent'.
10508
10509 2018-04-24 Tom Tromey <tom@tromey.com>
10510
10511 * cli-out.h: Reindent.
10512
10513 2018-04-24 Tom Tromey <tom@tromey.com>
10514
10515 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10516 (cli_ui_out::do_field_string): Use fputs_filtered.
10517 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10518
10519 2018-04-23 Tom Tromey <tom@tromey.com>
10520
10521 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10522 gdb::unique_xmalloc_ptr.
10523
10524 2018-04-23 Tom Tromey <tom@tromey.com>
10525
10526 * configure: Rebuild.
10527
10528 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10529
10530 PR gdb/23095
10531 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10532 prepare_for_testing. Set normal_bp to r_debug_state if target
10533 is bsd.
10534
10535 2018-04-21 Pedro Alves <palves@redhat.com>
10536 Rajendra SY <rajendra.sy@gmail.com>
10537
10538 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10539 * remote.c (extended_remote_attach): In all-stop mode, mark the
10540 thread as executing.
10541
10542 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10543
10544 * thread.c (thread_apply_all_command): Fix comment.
10545 (thread_command): Fix comment.
10546
10547 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10548
10549 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10550 parameter.
10551 * features/aarch64-core.c (create_feature_aarch64_core):
10552 Regenerate.
10553 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10554 Likewise.
10555 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10556 Likewise.
10557 * features/i386/32bit-avx512.c
10558 (create_feature_i386_32bit_avx512): Likewise.
10559 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10560 Likewise.
10561 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10562 Likewise.
10563 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10564 Likewise.
10565 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10566 Likewise.
10567 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10568 Likewise.
10569 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10570 Likewise.
10571 * features/i386/64bit-avx512.c
10572 (create_feature_i386_64bit_avx512): Likewise.
10573 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10574 Likewise.
10575 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10576 Likewise.
10577 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10578 Likewise.
10579 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10580 Likewise.
10581 * features/i386/64bit-segments.c
10582 (create_feature_i386_64bit_segments): Likewise.
10583 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10584 Likewise.
10585 * features/i386/x32-core.c
10586 (create_feature_i386_x32_core): Likewise.
10587 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10588 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10589 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10590 * target-descriptions.c: In generated code, don't pass xml
10591 filename.
10592
10593 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10594
10595 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10596 (print_xml_feature::visit_post): Likewise.
10597 (print_xml_feature::visit): Likewise.
10598 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10599 (print_xml_feature): Add new class.
10600 * regformats/regdat.sh: Null xmltarget on feature targets.
10601 * target-descriptions.c (struct target_desc): Add xmltarget.
10602 (maintenance_check_tdesc_xml_convert): Add unittest function.
10603 (tdesc_get_features_xml): Add function to get xml.
10604 (maintenance_check_xml_descriptions): Test xml generation.
10605 * xml-tdesc.c (string_read_description_xml): Add function.
10606 * xml-tdesc.h (string_read_description_xml): Add declaration.
10607
10608 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10609
10610 * features/Makefile: Add feature marker to targets with new style
10611 target descriptions.
10612 * regformats/aarch64.dat: Regenerate.
10613 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10614 * regformats/i386/amd64-avx-linux.dat: Likewise.
10615 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10616 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10617 * regformats/i386/amd64-linux.dat: Likewise.
10618 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10619 * regformats/i386/amd64.dat: Likewise.
10620 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10621 * regformats/i386/i386-avx-linux.dat: Likewise.
10622 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10623 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10624 * regformats/i386/i386-linux.dat: Likewise.
10625 * regformats/i386/i386-mmx-linux.dat: Likewise.
10626 * regformats/i386/i386-mpx-linux.dat: Likewise.
10627 * regformats/i386/i386.dat: Likewise.
10628 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10629 * regformats/i386/x32-avx-linux.dat: Likewise.
10630 * regformats/i386/x32-linux.dat: Likewise.
10631 * regformats/tic6x-c62x-linux.dat: Likewise.
10632 * regformats/tic6x-c64x-linux.dat: Likewise.
10633 * regformats/tic6x-c64xp-linux.dat: Likewise.
10634 * regformats/regdat.sh: Parse feature marker.
10635
10636 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10637
10638 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10639 (tdesc_osabi_name): Likewise.
10640 * target-descriptions.c (tdesc_architecture_name): Add new
10641 function.
10642 (tdesc_osabi_name): Likewise.
10643
10644 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10645
10646 * common/tdesc.c (tdesc_predefined_type): Move to here.
10647 (tdesc_named_type): Likewise.
10648 (tdesc_create_vector): Likewise.
10649 (tdesc_create_struct): Likewise.
10650 (tdesc_set_struct_size): Likewise.
10651 (tdesc_create_union): Likewise.
10652 (tdesc_create_flags): Likewise.
10653 (tdesc_create_enum): Likewise.
10654 (tdesc_add_field): Likewise.
10655 (tdesc_add_typed_bitfield): Likewise.
10656 (tdesc_add_bitfield): Likewise.
10657 (tdesc_add_flag): Likewise.
10658 (tdesc_add_enum_value): Likewise.
10659 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10660 (struct tdesc_type_vector): Likewise.
10661 (struct tdesc_type_field): Likewise.
10662 (struct tdesc_type_with_fields): Likewise.
10663 (tdesc_create_enum): Add declaration.
10664 (tdesc_add_typed_bitfield): Likewise.
10665 (tdesc_add_enum_value): Likewise.
10666 * target-descriptions.c (tdesc_type_field): Move from here.
10667 (tdesc_type_builtin): Likewise.
10668 (tdesc_type_vector): Likewise.
10669 (tdesc_type_with_fields): Likewise.
10670 (tdesc_predefined_types): Likewise.
10671 (tdesc_named_type): Likewise.
10672 (tdesc_create_vector): Likewise.
10673 (tdesc_create_struct): Likewise.
10674 (tdesc_set_struct_size): Likewise.
10675 (tdesc_create_union): Likewise.
10676 (tdesc_create_flags): Likewise.
10677 (tdesc_create_enum): Likewise.
10678 (tdesc_add_field): Likewise.
10679 (tdesc_add_typed_bitfield): Likewise.
10680 (tdesc_add_bitfield): Likewise.
10681 (tdesc_add_flag): Likewise.
10682 (tdesc_add_enum_value): Likewise.
10683 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10684 (tdesc_add_typed_bitfield): Likewise.
10685 (tdesc_add_enum_value): Likewise.
10686
10687 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10688
10689 * common/tdesc.c (tdesc_feature::accept): Move to here.
10690 (tdesc_feature::operator==): Likewise.
10691 (tdesc_create_reg): Likewise.
10692 * common/tdesc.h (tdesc_type_kind): Likewise.
10693 (struct tdesc_type): Likewise.
10694 (struct tdesc_feature): Likewise.
10695 * regformats/regdat.sh: Create a feature.
10696 * target-descriptions.c (tdesc_type_kind): Move from here.
10697 (tdesc_type): Likewise.
10698 (tdesc_type_up): Likewise.
10699 (tdesc_feature): Likewise.
10700 (tdesc_create_reg): Likewise.
10701
10702 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10703
10704 * Makefile.in: Add arch/tdesc.c
10705 * common/tdesc.c: New file.
10706 * common/tdesc.h (tdesc_element_visitor): Move to here.
10707 (tdesc_element): Likewise.
10708 (tdesc_reg): Likewise.
10709 (tdesc_reg_up): Likewise.
10710 * regformats/regdef.h (reg): Add offset to constructors.
10711 * target-descriptions.c (tdesc_element_visitor): Move from here.
10712 (tdesc_element): Likewise.
10713 (tdesc_reg): Likewise.
10714 (tdesc_reg_up): Likewise.
10715
10716 2018-04-17 Tom Tromey <tom@tromey.com>
10717
10718 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10719 discriminant field.
10720
10721 2018-04-17 Tom Tromey <tom@tromey.com>
10722
10723 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10724
10725 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10726
10727 * symtab.c (print_symbol_info): Skip printing filename and line
10728 number when `last' is NULL.
10729 (symtab_symbol_info): Use empty string instead of NULL for first
10730 invocation of print_symbol_info.
10731 (rbreak_command): Pass NULL to `last' parameter of
10732 print_symbol_info.
10733
10734 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10735
10736 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10737 instead of nullptr.
10738
10739 2018-04-16 Pedro Alves <palves@redhat.com>
10740
10741 * MAINTAINERS (sh): Remove.
10742 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10743 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10744 (ALLDEPFILES): Remove sh64-tdep.c.
10745 * NEWS: Mentions that support for SH-5/SH64 is removed.
10746 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10747 (sh*-*-openbsd*): Ditto.
10748 (sh64-*-elf*): Remove.
10749 (sh*): Remove.
10750 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10751 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10752 * sh-tdep.c: No longer include "sh64-tdep.h".
10753 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10754 * sh64-tdep.c, sh64-tdep.h: Remove files.
10755
10756 2018-04-16 Pedro Alves <palves@redhat.com>
10757
10758 * MAINTAINERS: Remove m88k.
10759 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10760 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10761 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10762 * NEWS: Mention that support for m88k was removed.
10763 * configure.host (m88*-*-*): Remove support.
10764 * configure.nat (m88k-*-*): Remove support.
10765 * configure.tgt (m88*-*-openbsd*): Remove.
10766 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10767
10768 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10769
10770 * configure.tgt (x86_tobjs): New variable.
10771 (amd64_tobjs, i386_tobjs): Use it.
10772
10773 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10774
10775 * symtab.c (print_symbol_info): Precede the symbol definition by
10776 the line number when available.
10777 * NEWS: Advertise this enhancement.
10778
10779 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10780
10781 * NEWS (New options): announce set/show record btrace cpu.
10782 * btrace.c: Include record-btrace.h.
10783 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10784 the vendor is unknown.
10785 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10786 Maybe overwrite the btrace configuration's cpu.
10787 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10788 (btrace_fetch): Add cpu parameter. Update callers.
10789 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10790 Maybe overwrite the btrace configuration's cpu. Skip enabling
10791 errata workarounds if the vendor is unknown.
10792 * python/py-record-btrace.c: Include record-btrace.h.
10793 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10794 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10795 * record-btrace.c (record_btrace_cpu_state_kind): New.
10796 (record_btrace_cpu): New.
10797 (set_record_btrace_cpu_cmdlist): New.
10798 (record_btrace_get_cpu): New.
10799 (require_btrace_thread, record_btrace_info)
10800 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10801 (cmd_set_record_btrace_cpu_none): New.
10802 (cmd_set_record_btrace_cpu_auto): New.
10803 (cmd_set_record_btrace_cpu): New.
10804 (cmd_show_record_btrace_cpu): New.
10805 (_initialize_record_btrace): Initialize set/show record btrace cpu
10806 commands.
10807 * record-btrace.h (record_btrace_get_cpu): New.
10808
10809 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10810
10811 * record.c (set_record_command): Fix typo in message.
10812
10813 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10814
10815 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10816
10817 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10818
10819 * infrun.c (process_event_stop_test): Call
10820 gdbarch_in_indirect_branch_thunk.
10821 * gdbarch.sh (in_indirect_branch_thunk): New.
10822 * gdbarch.c: Regenerated.
10823 * gdbarch.h: Regenerated.
10824 * x86-tdep.h: New.
10825 * x86-tdep.c: New.
10826 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10827 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10828 (ALLDEPFILES): Add x86-tdep.c.
10829 * arch-utils.h (default_in_indirect_branch_thunk): New.
10830 * arch-utils.c (default_in_indirect_branch_thunk): New.
10831 * i386-tdep: Include x86-tdep.h.
10832 (i386_in_indirect_branch_thunk): New.
10833 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10834 function.
10835 * amd64-tdep: Include x86-tdep.h.
10836 (amd64_in_indirect_branch_thunk): New.
10837 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10838
10839 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10840
10841 PR gdb/23053
10842 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10843 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10844 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10845 regression.
10846
10847 2018-04-12 Tom Tromey <tom@tromey.com>
10848
10849 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10850 (rust_evaluate_subexp): Likewise.
10851
10852 2018-04-12 Pedro Alves <palves@redhat.com>
10853
10854 * procfs.c (procfs_detach): Make forward declaration's prototype
10855 match definition's protototype.
10856 (proc_get_LDT_entry): Remove stale do_cleanups call.
10857
10858 2018-04-12 Pedro Alves <palves@redhat.com>
10859
10860 * target.h (target_ops::to_has_exited): Delete.
10861 (target_has_exited): Delete.
10862 * target-delegates.c: Regenerate.
10863
10864 2018-04-11 Pedro Alves <palves@redhat.com>
10865
10866 * target.c (fileio_fh_t::t): Add comment.
10867 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10868 (target_fileio_close): Handle a NULL target.
10869 (invalidate_fileio_fh): New.
10870 (target_close): Call it.
10871 * remote.c (remote_hostio_send_command): No longer check whether
10872 remote_desc is open.
10873
10874 2018-04-11 Pedro Alves <palves@redhat.com>
10875
10876 * target.c (fileio_fh_t): Make it a named struct instead of a
10877 typedef.
10878 (fileio_fh_t::is_closed): New method.
10879 (DEF_VEC_O (fileio_fh_t)): Remove.
10880 (fileio_fhandles): Now a std::vector.
10881 (is_closed_fileio_fh): Delete.
10882 (acquire_fileio_fd): Adjust. Rename parameters.
10883 (release_fileio_fd): Adjust.
10884 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10885 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10886 (target_fileio_close): Adjust.
10887
10888 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10889
10890 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10891 index.
10892
10893 2018-04-10 Pedro Alves <palves@redhat.com>
10894
10895 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10896 (scoped_finish_thread_state): New class.
10897 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10898 cleanup.
10899 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10900 (fetch_inferior_event, normal_stop): Likewise.
10901 * thread.c (finish_thread_state_cleanup): Delete.
10902
10903 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10904 Pedro Alves <palves@redhat.com>
10905
10906 * value.c: Include "selftest.h" and "common/array-view.h".
10907 (struct range) <operator ==>: New.
10908 (test_ranges_contain): New.
10909 (check_ranges_vector): New.
10910 (test_insert_into_bit_range_vector): New.
10911 (_initialize_values): Register selftests.
10912 * common/array-view.h (operator==, operator!=): New.
10913
10914 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10915
10916 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10917 an iterator.
10918 * inline-frame.c: Include <algorithm>.
10919 (struct inline_state): Add constructor.
10920 (inline_state_s): Remove.
10921 (DEF_VEC_O(inline_state_s)): Remove.
10922 (inline_states): Change type to std::vector.
10923 (find_inline_frame_state): Adjust to std::vector.
10924 (allocate_inline_frame_state): Remove.
10925 (clear_inline_frame_state): Adjust to std::vector.
10926 (skip_inline_frames): Adjust to std::vector.
10927
10928 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10929
10930 * tracepoint.h (struct trace_state_variable): Add constructor.
10931 <name>: Change type to std::string.
10932 * tracepoint.c (tsv_s): Remove.
10933 (DEF_VEC_O(tsv_s)): Remove.
10934 (tvariables): Change to std::vector.
10935 (create_trace_state_variable): Adjust to std::vector.
10936 (find_trace_state_variable): Likewise.
10937 (find_trace_state_variable_by_number): Likewise.
10938 (delete_trace_state_variable): Likewise.
10939 (trace_variable_command): Adjust to std::string.
10940 (delete_trace_variable_command): Likewise.
10941 (tvariables_info_1): Adjust to std::vector.
10942 (save_trace_state_variables): Likewise.
10943 (start_tracing): Likewise.
10944 (merge_uploaded_trace_state_variables): Adjust to std::vector
10945 and std::string.
10946 * target.h (struct target_ops)
10947 <to_download_trace_state_variable>: Pass reference to
10948 trace_state_variable.
10949 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10950 * target-delegates.c: Re-generate.
10951 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10952 (mi_tsv_deleted): Likewise.
10953 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10954 * remote.c (remote_download_trace_state_variable): Change
10955 pointer to reference and adjust.
10956 * make-target-delegates (parse_argtypes): Handle references.
10957 (write_function_header): Likewise.
10958 (munge_type): Likewise.
10959
10960 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10961
10962 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10963 string_view-selftests.c.
10964 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10965 testsuite.
10966 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10967 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10968 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10969 * unittests/basic_string_view/element_access/char/1.cc:
10970 Likewise.
10971 * unittests/basic_string_view/element_access/char/empty.cc:
10972 Likewise.
10973 * unittests/basic_string_view/element_access/char/front_back.cc:
10974 Likewise.
10975 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10976 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10977 Likewise.
10978 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10979 Likewise.
10980 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10981 Likewise.
10982 * unittests/basic_string_view/operations/compare/char/1.cc:
10983 Likewise.
10984 * unittests/basic_string_view/operations/compare/char/13650.cc:
10985 Likewise.
10986 * unittests/basic_string_view/operations/copy/char/1.cc:
10987 Likewise.
10988 * unittests/basic_string_view/operations/data/char/1.cc:
10989 Likewise.
10990 * unittests/basic_string_view/operations/find/char/1.cc:
10991 Likewise.
10992 * unittests/basic_string_view/operations/find/char/2.cc:
10993 Likewise.
10994 * unittests/basic_string_view/operations/find/char/3.cc:
10995 Likewise.
10996 * unittests/basic_string_view/operations/find/char/4.cc:
10997 Likewise.
10998 * unittests/basic_string_view/operations/rfind/char/1.cc:
10999 Likewise.
11000 * unittests/basic_string_view/operations/rfind/char/2.cc:
11001 Likewise.
11002 * unittests/basic_string_view/operations/rfind/char/3.cc:
11003 Likewise.
11004 * unittests/basic_string_view/operations/substr/char/1.cc:
11005 Likewise.
11006 * unittests/basic_string_view/operators/char/2.cc: Likewise.
11007 * unittests/string_view-selftests.c: New file.
11008
11009 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11010
11011 * unittests/basic_string_view/capacity/1.cc: New file.
11012 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11013 * unittests/basic_string_view/cons/char/1.cc: New file.
11014 * unittests/basic_string_view/cons/char/2.cc: New file.
11015 * unittests/basic_string_view/cons/char/3.cc: New file.
11016 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11017 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11018 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11019 * unittests/basic_string_view/element_access/char/1.cc: New file.
11020 * unittests/basic_string_view/element_access/char/2.cc: New file.
11021 * unittests/basic_string_view/element_access/char/empty.cc: New file.
11022 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11023 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11024 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11025 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11026 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11027 * unittests/basic_string_view/include.cc: New file.
11028 * unittests/basic_string_view/inserters/char/1.cc: New file.
11029 * unittests/basic_string_view/inserters/char/2.cc: New file.
11030 * unittests/basic_string_view/inserters/char/3.cc: New file.
11031 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11032 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11033 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11034 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11035 * unittests/basic_string_view/literals/types.cc: New file.
11036 * unittests/basic_string_view/literals/values.cc: New file.
11037 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11038 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11039 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11040 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11041 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11042 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11043 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11044 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11045 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11046 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11047 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11048 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11049 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11050 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11051 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11052 * unittests/basic_string_view/operations/data/char/1.cc: New file.
11053 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11054 * unittests/basic_string_view/operations/find/char/1.cc: New file.
11055 * unittests/basic_string_view/operations/find/char/2.cc: New file.
11056 * unittests/basic_string_view/operations/find/char/3.cc: New file.
11057 * unittests/basic_string_view/operations/find/char/4.cc: New file.
11058 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11059 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11060 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11061 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11062 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11063 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11064 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11065 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11066 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11067 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11068 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11069 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11070 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11071 * unittests/basic_string_view/operators/char/2.cc: New file.
11072 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11073 * unittests/basic_string_view/range_access/char/1.cc: New file.
11074 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11075 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11076 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11077 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11078 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11079 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11080 * unittests/basic_string_view/requirements/typedefs.cc: New file.
11081 * unittests/basic_string_view/typedefs.cc: New file.
11082 * unittests/basic_string_view/types/1.cc: New file.
11083
11084 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11085
11086 * common/gdb_string_view.h: Remove libstdc++ implementation
11087 details, adjust to gdb reality.
11088 * common/gdb_string_view.tcc: Likewise.
11089 * cli/cli-script.c (struct string_view): Remove.
11090 (user_args) <m_args>: Change element type to gdb::string_view.
11091 (user_args::insert_args): Adjust.
11092
11093 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11094
11095 * common/gdb_string_view.h: New file.
11096 * common/gdb_string_view.tcc: New file.
11097
11098 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11099
11100 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11101 * configure: Re-generate.
11102
11103 2018-04-09 Pedro Alves <palves@redhat.com>
11104
11105 * gdbarch.sh: Include "observable.h" instead of "observer.h".
11106 (set_target_gdbarch): Call
11107 gdb::observers::architecture_changed.notify instead of
11108 observer_notify_architecture_changed.
11109
11110 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11111
11112 * tracepoint.c (struct current_traceframe_cleanup): Remove.
11113 (do_restore_current_traceframe_cleanup): Remove.
11114 (restore_current_traceframe_cleanup_dtor): Remove.
11115 (make_cleanup_restore_current_traceframe): Remove.
11116 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11117 New.
11118 * tracepoint.h (struct scoped_restore_current_traceframe): New.
11119 * infrun.c (fetch_inferior_event): Use
11120 scoped_restore_current_traceframe.
11121
11122 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11123
11124 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11125 Remove.
11126 <n_allocated_type_units>: Remove.
11127 <all_type_units>: Change to std::vector.
11128 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11129 to std::vector change.
11130 (dwarf2_per_objfile::get_cutu): Likewise.
11131 (dwarf2_per_objfile::get_tu): Likewise.
11132 (create_signatured_type_table_from_index): Likewise.
11133 (create_signatured_type_table_from_debug_names): Likewise.
11134 (dw2_symtab_iter_next): Likewise.
11135 (dw2_print_stats): Likewise.
11136 (dw2_expand_all_symtabs): Likewise.
11137 (dw2_expand_marked_cus): Likewise.
11138 (dw2_debug_names_iterator::next): Likewise.
11139 (dwarf2_initialize_objfile): Likewise.
11140 (add_signatured_type_cu_to_table): Likewise.
11141 (create_all_type_units): Likewise.
11142 (add_type_unit): Likewise.
11143 (struct tu_abbrev_offset): Add constructor.
11144 (build_type_psymtabs_1): Adjust to std::vector change.
11145 (print_tu_stats): Likewise.
11146 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11147 (write_debug_names): Likewise.
11148
11149 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11150
11151 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11152 Make an std::vector.
11153 <n_comp_units>: Remove.
11154 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11155 to std::vector change.
11156 (dwarf2_per_objfile::get_cutu): Likewise.
11157 (dwarf2_per_objfile::get_cu): Likewise.
11158 (create_cus_from_index): Likewise.
11159 (create_addrmap_from_index): Likewise.
11160 (create_addrmap_from_aranges): Likewise.
11161 (dwarf2_read_index): Likewise.
11162 (dw2_find_last_source_symtab): Likewise.
11163 (dw2_map_symtabs_matching_filename): Likewise.
11164 (dw2_symtab_iter_next): Likewise.
11165 (dw2_print_stats): Likewise.
11166 (dw2_expand_all_symtabs): Likewise.
11167 (dw2_expand_symtabs_with_fullname): Likewise.
11168 (dw2_expand_marked_cus): Likewise.
11169 (dw2_map_symbol_filenames): Likewise.
11170 (create_cus_from_debug_names): Likewise.
11171 (dwarf2_read_debug_names): Likewise.
11172 (dw2_debug_names_iterator::next): Likewise.
11173 (dwarf2_initialize_objfile): Likewise.
11174 (set_partial_user): Likewise.
11175 (dwarf2_build_psymtabs_hard): Likewise.
11176 (read_comp_units_from_section): Remove arguments, adjust to
11177 std::vector change.
11178 (create_all_comp_units): Adjust to std::vector and
11179 read_comp_units_from_section changes.
11180 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11181 change.
11182 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11183 (psyms_seen_size): Likewise.
11184 (write_gdbindex): Likewise.
11185 (write_debug_names): Likewise.
11186
11187 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11188
11189 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11190 with dwarf2_per_objfile.
11191 (create_cus_from_index): Likewise.
11192 (create_signatured_type_table_from_index): Likewise.
11193 (dwarf2_read_index): Likewise.
11194 (dwarf2_initialize_objfile): Likewise.
11195 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11196 per_cu rather than get_dwarf2_per_objfile.
11197
11198 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11199
11200 * dwarf2read.h (struct signatured_type): Forward declare.
11201 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11202 New methods.
11203 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11204 (dw2_get_cutu): ...this.
11205 (dwarf2_per_objfile::get_cu): Rename from...
11206 (dw2_get_cu): ...this.
11207 (dwarf2_per_objfile::get_tu): New.
11208 (create_addrmap_from_index): Adjust.
11209 (create_addrmap_from_aranges): Adjust.
11210 (dw2_find_last_source_symtab): Adjust.
11211 (dw2_map_symtabs_matching_filename): Adjust.
11212 (dw2_symtab_iter_next): Adjust.
11213 (dw2_print_stats): Adjust.
11214 (dw2_expand_all_symtabs): Adjust.
11215 (dw2_expand_symtabs_with_fullname): Adjust.
11216 (dw2_expand_marked_cus): Adjust.
11217 (dw_expand_symtabs_matching_file_matcher): Adjust.
11218 (dw2_map_symbol_filenames): Adjust.
11219 (dw2_debug_names_iterator::next): Adjust.
11220 (dwarf2_initialize_objfile): Adjust.
11221 (set_partial_user): Adjust.
11222 (dwarf2_build_psymtabs_hard): Adjust.
11223
11224 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11225
11226 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11227 Remove unused variables.
11228 (dw2_map_symtabs_matching_filename): Likewise.
11229 (dwarf2_record_block_ranges): Likewise.
11230 (dwarf2_read_addr_index): Likewise.
11231 (follow_die_offset): Likewise.
11232
11233 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11234
11235 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11236 to symbol_file_add_main.
11237
11238 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11239
11240 PR mi/22299
11241 * mi/mi-console.c (do_fputc_async_safe): New.
11242 (mi_console_file::write_async_safe): New.
11243 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11244 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11245 New.
11246 * ui-file.c (ui_file::putstrn): Adjust call to
11247 fputstrn_unfiltered.
11248 * utils.c (printchar): Replace do_fputs and do_fprintf
11249 parameters by do_fputc.
11250 (fputstr_filtered): Adjust call to printchar.
11251 (fputstr_unfiltered): Likewise.
11252 (fputstrn_filtered): Likewise.
11253 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11254 printchar.
11255 * utils.h (do_fputc_ftype): New typedef.
11256 (fputstrn_unfiltered): Add do_fputc parameter.
11257
11258 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11259
11260 * regformats/i386/i386-avx.dat: Remove.
11261
11262 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11263
11264 PR gdb/22979
11265 * amd64-tdep.c (amd64_none_init_abi): New function.
11266 (amd64_x32_none_init_abi): New function.
11267 (_initialize_amd64_tdep): Register handlers for x86-64 and
11268 x64_32 with GDB_OSABI_NONE.
11269 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11270 GDB_OSABI_NONE osabi.
11271
11272 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11273
11274 PR gdb/22980
11275 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11276 GDB_OSABI_NONE.
11277 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11278 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11279
11280 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11281
11282 * common/byte-vector.h (char_vector): New type.
11283 * target.h (target_read_alloc): Return
11284 gdb::optional<byte_vector>.
11285 (target_read_stralloc): Return gdb::optional<char_vector>.
11286 (target_get_osdata): Return gdb::optional<char_vector>.
11287 * target.c (target_read_alloc_1): Templatize. Replacement
11288 manual memory management with vector.
11289 (target_read_alloc): Change return type, adjust.
11290 (target_read_stralloc): Change return type, adjust.
11291 (target_get_osdata): Change return type, adjust.
11292 * auxv.c (struct auxv_info) <length>: Remove.
11293 <data>: Change type to gdb::optional<byte_vector>.
11294 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11295 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11296 (target_auxv_search): Adjust.
11297 (fprint_target_auxv): Adjust.
11298 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11299 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11300 (linux_make_corefile_notes): Adjust.
11301 * osdata.c (get_osdata): Adjust.
11302 * remote.c (remote_get_threads_with_qxfer): Adjust.
11303 (remote_memory_map): Adjust.
11304 (remote_traceframe_info): Adjust.
11305 (btrace_read_config): Adjust.
11306 (remote_read_btrace): Adjust.
11307 (remote_pid_to_exec_file): Adjust.
11308 * solib-aix.c (solib_aix_get_library_list): Adjust.
11309 * solib-dsbt.c (decode_loadmap): Don't free buf.
11310 (dsbt_get_initial_loadmaps): Adjust.
11311 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11312 * solib-target.c (solib_target_current_sos): Adjust.
11313 * tracepoint.c (sdata_make_value): Adjust.
11314 * xml-support.c (xinclude_start_include): Adjust.
11315 (xml_fetch_content_from_file): Adjust.
11316 * xml-support.h (xml_fetch_another): Change return type.
11317 (xml_fetch_content_from_file): Change return type.
11318 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11319 * xml-tdesc.c (file_read_description_xml): Adjust.
11320 (fetch_available_features_from_target): Change return type.
11321 (target_fetch_description_xml): Adjust.
11322 (target_read_description_xml): Adjust.
11323
11324 2018-04-06 Tom Tromey <tom@tromey.com>
11325
11326 * value.c (~value): Update.
11327 (struct value) <contents>: Now unique_xmalloc_ptr.
11328 (value_contents_bits_eq, allocate_value_contents)
11329 (value_contents_raw, value_contents_all_raw)
11330 (value_contents_for_printing, value_contents_for_printing_const)
11331 (set_value_enclosing_type): Update.
11332
11333 2018-04-06 Tom Tromey <tom@tromey.com>
11334
11335 * value.c (range_s): Remove typedef, VEC.
11336 (struct range): Add operator<.
11337 (range_lessthan): Remove.
11338 (ranges_contain): Change type.
11339 (~value): Update.
11340 (struct value) <unavailable, optimized_out>: Now std::vector.
11341 (value_entirely_available)
11342 (value_entirely_covered_by_range_vector)
11343 (value_entirely_unavailable, value_entirely_optimized_out):
11344 Update.
11345 (insert_into_bit_range_vector): Change argument type.
11346 (find_first_range_overlap): Likewise.
11347 (struct ranges_and_idx, value_contents_bits_eq)
11348 (require_not_optimized_out, require_available): Update.
11349 (ranges_copy_adjusted): Change argument types.
11350 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11351
11352 2018-04-06 Tom Tromey <tom@tromey.com>
11353
11354 * value.c (~value): Update.
11355 (struct value) <parent>: Now a value_ref_ptr.
11356 (value_parent, set_value_parent, value_address, value_copy):
11357 Update.
11358
11359 2018-04-06 Tom Tromey <tom@tromey.com>
11360
11361 * value.c (struct value): Add constructor, destructor, and member
11362 initializers.
11363 (allocate_value_lazy, value_decref): Update.
11364
11365 2018-04-06 Tom Tromey <tom@tromey.com>
11366
11367 * value.c (struct value) <released, next>: Remove.
11368 (all_values): Now a std::vector.
11369 (allocate_value_lazy): Update.
11370 (value_next): Remove.
11371 (value_mark, value_free_to_mark, release_value)
11372 (value_release_to_mark): Update.
11373
11374 2018-04-06 Tom Tromey <tom@tromey.com>
11375
11376 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11377 (free_value_chain): Remove.
11378 * value.c (free_value_chain): Remove.
11379 (value_release_to_mark): Return a std::vector.
11380 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11381 std::vector.
11382 (check_condition): Update.
11383 * eval.c (fetch_subexp_value): Change "val_chain" to a
11384 std::vector.
11385 * breakpoint.c (update_watchpoint): Update.
11386 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11387
11388 2018-04-06 Tom Tromey <tom@tromey.com>
11389
11390 * value.h (free_all_values): Remove.
11391 * value.c (free_all_values): Remove.
11392
11393 2018-04-06 Tom Tromey <tom@tromey.com>
11394
11395 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11396 (value_history_chain, value_history_count): Remove.
11397 (value_history): New global.
11398 (record_latest_value, access_value_history, show_values)
11399 (preserve_values): Update.
11400
11401 2018-04-06 Tom Tromey <tom@tromey.com>
11402
11403 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11404 * varobj.c (varobj_set_display_format, varobj_set_value)
11405 (install_default_visualizer, construct_visualizer)
11406 (install_new_value, ~varobj, varobj_get_value_type)
11407 (my_value_of_variable, varobj_editable_p): Update.
11408 * c-varobj.c (c_describe_child, c_value_of_variable)
11409 (cplus_number_of_children, cplus_describe_child): Update.
11410 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11411 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11412 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11413
11414 2018-04-06 Tom Tromey <tom@tromey.com>
11415
11416 * printcmd.c (last_examine_address): Change type to
11417 value_ref_ptr.
11418 (do_examine, x_command): Update.
11419
11420 2018-04-06 Tom Tromey <tom@tromey.com>
11421
11422 * value.c (release_value): Update.
11423 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11424 (struct bpstats) <val>: Now a value_ref_ptr.
11425 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11426 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11427 (~watchpoint, print_it_watchpoint, watch_command_1)
11428 (invalidate_bp_value_on_memory_change): Update.
11429
11430 2018-04-06 Tom Tromey <tom@tromey.com>
11431
11432 * varobj.c (varobj_clear_saved_item)
11433 (update_dynamic_varobj_children, install_new_value, ~varobj):
11434 Update.
11435 * value.h (value_incref): Move declaration earlier.
11436 (value_decref): Rename from value_free.
11437 (struct value_ref_policy): New.
11438 (value_ref_ptr): New typedef.
11439 (struct value_deleter): Remove.
11440 (gdb_value_up): Remove typedef.
11441 (release_value): Change return type.
11442 (release_value_or_incref): Remove.
11443 * value.c (set_value_parent): Update.
11444 (value_incref): Change return type.
11445 (value_decref): Rename from value_free.
11446 (value_free_to_mark, free_all_values, free_value_chain): Update.
11447 (release_value): Return value_ref_ptr.
11448 (release_value_or_incref): Remove.
11449 (record_latest_value, set_internalvar, clear_internalvar):
11450 Update.
11451 * stack.c (info_frame_command): Don't call value_free.
11452 * python/py-value.c (valpy_dealloc, valpy_new)
11453 (value_to_value_object): Update.
11454 * printcmd.c (do_examine): Update.
11455 * opencl-lang.c (lval_func_free_closure): Update.
11456 * mi/mi-main.c (register_changed_p): Don't call value_free.
11457 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11458 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11459 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11460 value_free.
11461 * guile/scm-value.c (vlscm_free_value_smob)
11462 (vlscm_scm_from_value): Update.
11463 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11464 (frame_unwind_register_unsigned, get_frame_register_bytes)
11465 (put_frame_register_bytes): Don't call value_free.
11466 * findvar.c (address_from_register): Don't call value_free.
11467 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11468 * dwarf2loc.c (entry_data_value_free_closure)
11469 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11470 (dwarf2_evaluate_loc_desc_full): Update.
11471 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11472 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11473 (~watchpoint, watch_command_1)
11474 (invalidate_bp_value_on_memory_change): Update.
11475 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11476
11477 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11478
11479 PR gdb/23022
11480 * warning.m4: Add -Wno-error=deprecated-register.
11481 * configure: Re-generate.
11482
11483 2018-04-05 Tom Tromey <tom@tromey.com>
11484
11485 * linespec.h: Remove include of "vec.h".
11486
11487 2018-04-05 Tom Tromey <tom@tromey.com>
11488
11489 * linespec.c (typep): Remove typedef.
11490 (find_methods, find_superclass_methods): Take a std::vector.
11491 (find_method): Use std::vector.
11492
11493 2018-04-05 Tom Tromey <tom@tromey.com>
11494
11495 * utils.c (compare_strings): Remove.
11496 * utils.h (compare_strings): Remove.
11497 * objc-lang.h (find_imps): Update.
11498 * objc-lang.c (find_methods): Take a std::vector.
11499 (uniquify_strings, find_imps): Likewise.
11500 * linespec.c (find_methods): Take a std::vector.
11501 (decode_objc): Use std::vector.
11502 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11503 a std::vector.
11504 (find_method, find_function_symbols): Use std::vector.
11505
11506 2018-04-05 Tom Tromey <tom@tromey.com>
11507
11508 * completer.c (completion_tracker::completion_tracker): Remove
11509 cast.
11510 (completion_tracker::discard_completions): Likewise.
11511 * breakpoint.c (ambiguous_names_p): Remove cast.
11512 * ada-lang.c (_initialize_ada_language): Remove cast.
11513 * utils.h (streq): Update.
11514 (streq_hash): Add new declaration.
11515 * utils.c (streq): Return bool.
11516 (streq_hash): New function.
11517
11518 2018-04-05 Tom Tromey <tom@tromey.com>
11519
11520 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11521 Remove a string copy.
11522
11523 2018-04-05 Tom Tromey <tom@tromey.com>
11524
11525 * linespec.c (filter_results): Use std::vector.
11526 (decode_line_2, decode_line_full): Update.
11527
11528 2018-04-05 Tom Tromey <tom@tromey.com>
11529
11530 * linespec.c (canonical_to_fullform): Return std::string.
11531 (filter_results): Update.
11532 (struct decode_line_2_item): Add constructor.
11533 <fullform, displayform>: Now std::string.
11534 (decode_line_2_compare_items): Now a std::sort comparator.
11535 (decode_line_2): Update.
11536
11537 2018-04-05 Tom Tromey <tom@tromey.com>
11538
11539 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11540 (unexpected_linespec_error): Update.
11541 (linespec_parse_basic, parse_linespec): Update.
11542
11543 2018-04-05 Tom Tromey <tom@tromey.com>
11544
11545 * linespec.c (linespec_parse_basic): Reindent.
11546
11547 2018-04-05 Tom Tromey <tom@tromey.com>
11548
11549 * minsyms.h (iterate_over_minimal_symbols): Update.
11550 * minsyms.c (iterate_over_minimal_symbols): Take a
11551 gdb::function_view.
11552 * linespec.c (struct collect_minsyms): Remove.
11553 (compare_msyms): Now a std::sort comparator.
11554 (add_minsym): Add parameters.
11555 (search_minsyms_for_name): Update. Use std::vector.
11556
11557 2018-04-03 Tom Tromey <tom@tromey.com>
11558
11559 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11560 gdb::byte_vector.
11561
11562 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11563
11564 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11565
11566 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11567
11568 PR gdb/16959
11569 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11570 printing static type.
11571
11572 2018-04-01 Tom Tromey <tom@tromey.com>
11573
11574 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11575 (rs6000_xfer_shared_libraries): Update.
11576
11577 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11578
11579 * common/gdb_vecs.h (char_ptr): Remove.
11580 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11581
11582 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11583
11584 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11585 with std::vector.
11586 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11587
11588 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11589
11590 * tracepoint.h (struct uploaded_tp): Initialize fields.
11591 <actions, step_actions, cmd_strings>: Change type to
11592 std::vector<char *>.
11593 * tracepoint.c (get_uploaded_tp): Allocate with new.
11594 (free_uploaded_tps): Free with delete.
11595 (parse_tracepoint_definition): Adjust to std::vector change.
11596 * breakpoint.c (read_uploaded_action): Likewise.
11597 (create_tracepoint_from_upload): Likewise.
11598 * ctf.c (ctf_write_uploaded_tp): Likewise.
11599 (SET_ARRAY_FIELD): Likewise.
11600 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11601
11602 2018-03-30 Tom Tromey <tom@tromey.com>
11603
11604 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11605 std::unique_ptr.
11606 (svr4_keep_data_in_core): Update.
11607 (svr4_read_so_list): Update.
11608
11609 2018-03-30 Tom Tromey <tom@tromey.com>
11610
11611 * windows-nat.c (handle_output_debug_string, handle_exception):
11612 Update.
11613 * target.h (target_read_string): Update.
11614 * target.c (target_read_string): Change "string" to
11615 unique_xmalloc_ptr.
11616 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11617 Update.
11618 * solib-frv.c (frv_current_sos): Update.
11619 * solib-dsbt.c (dsbt_current_sos): Update.
11620 * solib-darwin.c (darwin_current_sos): Update.
11621 * linux-thread-db.c (inferior_has_bug): Update.
11622 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11623 Update. Remove alloca.
11624 * ada-lang.c (ada_main_name): Update.
11625
11626 2018-03-30 Tom Tromey <tom@tromey.com>
11627
11628 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11629 (struct dwo_file_deleter): New.
11630 (dwo_file_up): New typedef.
11631 (open_and_init_dwo_file): Use dwo_file_up.
11632 (free_dwo_file_cleanup): Remove.
11633
11634 2018-03-30 Tom Tromey <tom@tromey.com>
11635
11636 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11637 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11638
11639 2018-03-30 Tom Tromey <tom@tromey.com>
11640
11641 * dwarf2read.c (class free_cached_comp_units): New class.
11642 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11643 (free_cached_comp_units): Remove function.
11644
11645 2018-03-30 Tom Tromey <tom@tromey.com>
11646
11647 * utils.h (make_cleanup_unpush_target): Remove.
11648 * inf-ptrace.c (struct target_unpusher): New.
11649 (target_unpush_up) New typedef.
11650 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11651 target_unpush_up.
11652 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11653
11654 2018-03-27 Tom Tromey <tom@tromey.com>
11655
11656 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11657
11658 2018-03-27 Pedro Alves <palves@redhat.com>
11659 Tom Tromey <tom@tromey.com>
11660
11661 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11662 destructor. Now a class.
11663 (gdb_readline_wrapper_cleanup): Remove function.
11664 (gdb_readline_wrapper): Remove cleanups.
11665
11666 2018-03-27 Tom Tromey <tom@tromey.com>
11667
11668 * typeprint.h (struct type_print_options) <local_typedefs,
11669 global_typedefs>: Remove "struct" keyword.
11670 (class typedef_hash_table): New class.
11671 (recursively_update_typedef_hash, add_template_parameters)
11672 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11673 (find_typedef_in_hash): Don't declare.
11674 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11675 (typedef_hash_table::recursively_update): Rename from
11676 recursively_update_typedef_hash. Now a member.
11677 (typedef_hash_table::add_template_parameters): Rename from
11678 add_template_parameters. Now a member.
11679 (typedef_hash_table::typedef_hash_table): Now a constructor;
11680 rename from create_typedef_hash.
11681 (typedef_hash_table::~typedef_hash_table): Now a destructor;
11682 rename from free_typedef_hash.
11683 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11684 (do_free_global_table): Remove.
11685 (typedef_hash_table::typedef_hash_table): New constructor; renamed
11686 from copy_type_recursive.
11687 (create_global_typedef_table): Remove.
11688 (typedef_hash_table::find_global_typedef): Now a member of
11689 typedef_hash_table.
11690 (typedef_hash_table::find_typedef): Rename from
11691 find_typedef_in_hash; now a member.
11692 (whatis_exp): Update.
11693 * extension.h (struct ext_lang_type_printers): Add constructor and
11694 destructor.
11695 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11696 declare.
11697 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11698 Now a constructor; rename from start_ext_lang_type_printers.
11699 (ext_lang_type_printers): Now a destructor; rename from
11700 free_ext_lang_type_printers.
11701 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11702 Update.
11703 (c_type_print_base_struct_union): Update. Remove cleanups.
11704
11705 2018-03-27 Tom Tromey <tom@tromey.com>
11706
11707 * dwarf-index-write.c: Include <cmath>.
11708
11709 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11710
11711 * NEWS: Add entry describing new "set|show varsize-limit" command.
11712 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11713 command.
11714 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11715 "set variable".
11716
11717 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11718
11719 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11720 dwarf-index-write.c
11721 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11722 * dwarf-index-common.c: New file.
11723 * dwarf-index-common.h: New file.
11724 * dwarf-index-write.c: New file.
11725 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11726 (struct dwarf2_section_info): Move from here.
11727 (dwarf2_section_info_def): Likewise.
11728 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11729 (offset_type): Likewise.
11730 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11731 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11732 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11733 (byte_swap): Likewise.
11734 (MAYBE_SWAP): Likewise.
11735 (dwarf2_per_cu_ptr): Likewise.
11736 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11737 (struct tu_stats): Likewise.
11738 (struct dwarf2_per_objfile): Likewise.
11739 (struct dwarf2_per_cu_data): Likewise.
11740 (struct signatured_type): Likewise.
11741 (sig_type_ptr): Likewise.
11742 (DEF_VEC_P (sig_type_ptr)): Likewise.
11743 (INDEX4_SUFFIX): Likewise.
11744 (INDEX5_SUFFIX): Likewise.
11745 (DEBUG_STR_SUFFIX): Likewise.
11746 (dwarf2_read_section): Make non-static.
11747 (mapped_index_string_hash): Move from here.
11748 (dwarf5_djb_hash): Likewise.
11749 (file_write): Likewise.
11750 (class data_buf): Likewise.
11751 (struct symtab_index_entry): Likewise.
11752 (struct mapped_symtab): Likewise.
11753 (find_slot): Likewise.
11754 (hash_expand): Likewise.
11755 (add_index_entry): Likewise.
11756 (uniquify_cu_indices): Likewise.
11757 (class c_str_view): Likewise.
11758 (class c_str_view_hasher): Likewise.
11759 (class vector_hasher): Likewise.
11760 (write_hash_table): Likewise.
11761 (psym_index_map): Likewise.
11762 (struct addrmap_index_data): Likewise.
11763 (add_address_entry): Likewise.
11764 (add_address_entry_worker): Likewise.
11765 (write_address_map): Likewise.
11766 (symbol_kind): Likewise.
11767 (write_psymbols): Likewise.
11768 (struct signatured_type_index_data): Likewise.
11769 (write_one_signatured_type): Likewise.
11770 (recursively_count_psymbols): Likewise.
11771 (recursively_write_psymbols): Likewise.
11772 (class debug_names): Likewise.
11773 (check_dwarf64_offsets): Likewise.
11774 (psyms_seen_size): Likewise.
11775 (write_gdbindex): Likewise.
11776 (write_debug_names): Likewise.
11777 (assert_file_size): Likewise.
11778 (write_psymtabs_to_index): Likewise.
11779 (save_gdb_index_command): Likewise.
11780 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11781 command.
11782 * dwarf2read.h: New file.
11783
11784 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11785
11786 PR gdb/22670
11787 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11788 symbol name if the CU's language stores symbol names in linkage
11789 format.
11790 * language.h (struct language_defn)
11791 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11792 all instances of this struct.
11793
11794 2018-03-26 Tom Tromey <tom@tromey.com>
11795
11796 * stack.c (backtrace_command_1): Remove verbose code.
11797
11798 2018-03-26 Tom Tromey <tom@tromey.com>
11799
11800 * python/py-framefilter.c (py_print_type): Don't catch
11801 exceptions. Return void.
11802 (py_print_value): Likewise.
11803 (py_print_single_arg): Likewise.
11804 (enumerate_args): Don't catch exceptions.
11805 (py_print_args): Likewise.
11806 (py_print_frame): Likewise.
11807 (gdbpy_apply_frame_filter): Catch exceptions here.
11808
11809 2018-03-26 Tom Tromey <tom@tromey.com>
11810
11811 * stack.c (_initialize_stack): Remove trailing newlines from help
11812 text. Add "Usage" line to "backtrace" help.
11813
11814 2018-03-26 Tom Tromey <tom@tromey.com>
11815
11816 PR python/16486:
11817 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11818
11819 2018-03-26 Tom Tromey <tom@tromey.com>
11820
11821 * python/py-framefilter.c (py_print_single_arg): Return
11822 EXT_LANG_BT_ERROR from catch.
11823
11824 2018-03-26 Tom Tromey <tom@tromey.com>
11825
11826 PR backtrace/15584:
11827 * stack.c (backtrace_command_1): Move some code into no-filters
11828 "if".
11829
11830 2018-03-26 Tom Tromey <tom@tromey.com>
11831
11832 * python/py-framefilter.c (throw_quit_or_print_exception): New
11833 function.
11834 (gdbpy_apply_frame_filter): Use it.
11835
11836 2018-03-26 Tom Tromey <tom@tromey.com>
11837
11838 PR cli/17716:
11839 * python/py-framefilter.c (py_print_type, py_print_value)
11840 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11841 RETURN_MASK_ERROR.
11842
11843 2018-03-26 Tom Tromey <tom@tromey.com>
11844
11845 * python/py-framefilter.c (enumerate_args): Use
11846 gdb::unique_xmalloc_ptr.
11847
11848 2018-03-26 Tom Tromey <tom@tromey.com>
11849
11850 * python/py-framefilter.c (py_print_frame): Return
11851 EXT_LANG_BT_OK.
11852 (gdbpy_apply_frame_filter): Update comment.
11853 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11854 Remove.
11855 <EXT_LANG_BT_NO_FILTERS>: Change value.
11856
11857 2018-03-26 Tom Tromey <tom@tromey.com>
11858
11859 PR backtrace/15582:
11860 * stack.c (backtrace_command): Parse "hide" argument.
11861 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11862 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11863 constant.
11864
11865 2018-03-26 Tom Tromey <tom@tromey.com>
11866
11867 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11868 add "flags".
11869 (backtrace_command): Remove "fulltrace", add "flags".
11870
11871 2018-03-26 Tom Tromey <tom@tromey.com>
11872
11873 * stack.c (backtrace_command): Rewrite command line parsing.
11874
11875 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11876
11877 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11878
11879 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11880
11881 * filename-seen-cache.h: Add include guard.
11882
11883 2018-03-26 Keith Seitz <keiths@redhat.com>
11884
11885 * symfile.c (place_section): Remove "struct" from section_addr_info
11886 in comment.
11887 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11888 "struct" keyword from section_addr_info.
11889
11890 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11891
11892 * regformats/regdef.h (reg): Add constructors.
11893
11894 2018-03-25 Pedro Alves <palves@redhat.com>
11895
11896 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11897 if then/else bodies in var_func_name extraction.
11898
11899 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11900
11901 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11902 lookup_minimal_symbol() to find symbol entry.
11903 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11904
11905 2018-03-23 Keith Seitz <keiths@redhat.com>
11906
11907 PR c++/22968
11908 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11909 nested type definitions for C++, too.
11910
11911 2018-03-23 Tom Tromey <tom@tromey.com>
11912
11913 * machoread.c (struct oso_el): Add a constructor. Don't define as
11914 a typedef.
11915 (macho_register_oso): Remove.
11916 (macho_symtab_read): Take a std::vector.
11917 (oso_el_compare_name): Now a std::sort comparator.
11918 (macho_symfile_read_all_oso): Take a std::vector.
11919 (macho_symfile_read): Use std::vector. Remove cleanups.
11920
11921 2018-03-22 Tom Tromey <tom@tromey.com>
11922
11923 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11924 (record_full_goto_bookmark): Use std::string.
11925
11926 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11927
11928 PR tdep/18295
11929 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11930 a single mask.
11931
11932 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11933
11934 * rs6000-tdep.c (store_insn_p): New function.
11935 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11936 and cr_reg to their unshifted values. Use store_insn_p to
11937 match LR saves using either R1 or fdata->alloca_reg. Use
11938 store_insn_p to match CR saves. Set alloca_reg_offset
11939 when alloca_reg and framep are set. Remove lr_reg shift
11940 when assigning to fdata->lr_register.
11941
11942 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11943
11944 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11945 command line args instead of emitting a warning.
11946
11947 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11948
11949 * tracepoint.h (struct static_tracepoint_marker): Initialize
11950 fields, define default constructor, move constructor and move
11951 assignment, disable the rest.
11952 <str_id, extra>: Make std::string.
11953 (release_static_tracepoint_marker): Remove.
11954 (free_current_marker): Remove.
11955 * tracepoint.c (free_current_marker): Remove.
11956 (parse_static_tracepoint_marker_definition): Adjust to
11957 std::string, use new hex2str overload.
11958 (release_static_tracepoint_marker): Remove.
11959 (print_one_static_tracepoint_marker): Get marker by reference
11960 and adjust to std::string.
11961 (info_static_tracepoint_markers_command): Adjust to std::vector
11962 changes
11963 * target.h (static_tracepoint_marker_p): Remove typedef.
11964 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11965 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11966 bool.
11967 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11968 * target-debug.h
11969 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11970 (target_debug_print_std_vector_static_tracepoint_marker): New.
11971 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11972 to...
11973 (target_debug_print_static_tracepoint_marker_p): ... this.
11974 * target-delegates.c: Re-generate.
11975 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11976 Make std::string.
11977 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11978 (decode_static_tracepoint_spec): Adjust to std::vector.
11979 (tracepoint_print_one_detail): Adjust to std::string.
11980 (strace_marker_decode_location): Adjust to std::string.
11981 (update_static_tracepoint): Adjust to std::string, remove call
11982 to release_static_tracepoint_marker.
11983 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11984 Adjust to std::vector.
11985 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11986 (remote_static_tracepoint_markers_by_strid): Adjust to
11987 std::vector.
11988 * common/rsp-low.h (hex2str): New overload with explicit count
11989 of bytes.
11990 * common/rsp-low.c (hex2str): New overload with explicit count
11991 of bytes.
11992 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11993 (_initialize_rsp_low_selftests): Add test_hex2str test.
11994 * unittests/tracepoint-selftests.c
11995 (test_parse_static_tracepoint_marker_definition): Adjust to
11996 std::string.
11997
11998 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11999
12000 * tracepoint.c (parse_static_tracepoint_marker_definition):
12001 Consider case where the definition is followed by more
12002 definitions.
12003 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12004 tracepoint-selftests.c.
12005 * unittests/tracepoint-selftests.c: New.
12006
12007 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12008
12009 * MAINTAINERS (Write After Approval): Add Pedro Franco de
12010 Carvalho.
12011
12012 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12013
12014 * symtab.c (find_pc_sect_line): fixed indentation.
12015
12016 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12017
12018 * symtab.c (find_pc_sect_line): now uses binary search.
12019
12020 2018-03-19 Tom Tromey <tom@tromey.com>
12021
12022 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12023 "IDENT" production.
12024
12025 2018-03-19 Pedro Alves <palves@redhat.com>
12026 Tom Tromey <tom@tromey.com>
12027
12028 * unittests/observable-selftests.c: New file.
12029 * common/observable.h: New file.
12030 * observable.h: New file.
12031 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12032 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12033 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12034 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12035 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12036 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12037 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12038 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12039 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12040 python/py-breakpoint.c, python/py-finishbreakpoint.c,
12041 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12042 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12043 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12044 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12045 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12046 tui/tui-interp.c, valops.c: Update all users.
12047 * tui/tui-hooks.c (tui_bp_created_observer)
12048 (tui_bp_deleted_observer, tui_bp_modified_observer)
12049 (tui_inferior_exit_observer, tui_before_prompt_observer)
12050 (tui_normal_stop_observer, tui_register_changed_observer):
12051 Remove.
12052 (tui_observers_token): New global.
12053 (attach_or_detach, tui_attach_detach_observers): New functions.
12054 (tui_install_hooks, tui_remove_hooks): Use
12055 tui_attach_detach_observers.
12056 * record-btrace.c (record_btrace_thread_observer): Remove.
12057 (record_btrace_thread_observer_token): New global.
12058 * observer.sh: Remove.
12059 * observer.c: Rename to observable.c.
12060 * observable.c (namespace gdb_observers): Define new objects.
12061 (observer_debug): Move into gdb_observers namespace.
12062 (struct observer, struct observer_list, xalloc_observer_list_node)
12063 (xfree_observer_list_node, generic_observer_attach)
12064 (generic_observer_detach, generic_observer_notify): Remove.
12065 (_initialize_observer): Update.
12066 Don't include observer.inc.
12067 * Makefile.in (generated_files): Remove observer.h, observer.inc.
12068 (clean mostlyclean): Likewise.
12069 (observer.h, observer.inc): Remove targets.
12070 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12071 (COMMON_SFILES): Use observable.c, not observer.c.
12072 * .gitignore: Remove observer.h.
12073
12074 2018-03-18 Tom Tromey <tom@tromey.com>
12075
12076 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12077 gdb::def_vector.
12078 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12079
12080 2018-03-17 Tom Tromey <tom@tromey.com>
12081
12082 * auto-load.c (auto_load_objfile_script_1): Use std::string.
12083
12084 2018-03-17 Tom Tromey <tom@tromey.com>
12085
12086 * target.c (class scoped_target_fd): New.
12087 (target_fileio_close_cleanup): Remove.
12088 (target_fileio_read_alloc_1): Use scoped_target_fd.
12089
12090 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12091
12092 * silent-rules.mk: New.
12093 * Makefile.in: Include silent-rules.mk
12094 (srcdir, VPATH, top_srcdir): Move up.
12095 (COMPILE): Add ECHO_CXX.
12096 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12097 (init.c): Add ECHO_INIT_C.
12098 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12099 (version.c): Add ECHO_GEN.
12100 (printcmd.o): Add ECHO_CXX.
12101 (target-float.o): Add ECHO_CXX.
12102 (ada-exp.o): Add ECHO_CXX.
12103 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12104 (insight$(EXEEXT)): Add ECHO_CXXLD.
12105 * gnulib/configure.ac: Add AM_SILENT_RULES.
12106 * gnulib/aclocal.m4: Re-generate.
12107 * gnulib/configure: Re-generate.
12108 * gnulib/import/Makefile.in: Re-generate.
12109
12110 2018-03-16 Tom Tromey <tom@tromey.com>
12111
12112 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12113 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12114 * utils.c (do_free_section_addr_info)
12115 (make_cleanup_free_section_addr_info): Remove.
12116 * symfile.h (struct other_sections): Add constructor.
12117 (struct section_addr_info): Remove.
12118 (section_addr_info): New typedef.
12119 (struct sym_fns) <sym_offsets>: Change type of parameter.
12120 (build_section_addr_info_from_objfile)
12121 (relative_addr_info_to_section_offsets, addr_info_make_relative)
12122 (default_symfile_offsets, symbol_file_add)
12123 (symbol_file_add_from_bfd)
12124 (build_section_addr_info_from_section_table): Update.
12125 (alloc_section_addr_info, free_section_addr_info): Don't declare.
12126 * symfile.c (alloc_section_addr_info): Remove.
12127 (build_section_addr_info_from_section_table): Change return type.
12128 Update.
12129 (build_section_addr_info_from_bfd)
12130 (build_section_addr_info_from_objfile): Likewise.
12131 (free_section_addr_info): Remove.
12132 (relative_addr_info_to_section_offsets): Change type of "addrs".
12133 (addrs_section_compar): Now a std::sort comparator.
12134 (addrs_section_sort): Change return type.
12135 (addr_info_make_relative): Change type of "addrs". Update.
12136 (default_symfile_offsets, syms_from_objfile_1)
12137 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12138 (symbol_file_add_separate): Update.
12139 (symbol_file_add): Change type of "addrs". Update.
12140 (add_symbol_file_command): Update. Remove cleanups.
12141 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
12142 cleanups.
12143 * symfile-debug.c (debug_sym_offsets): Change type of "info".
12144 * solib.c (solib_read_symbols): Update.
12145 * objfiles.c (objfile_relocate): Update. Remove cleanups.
12146 * machoread.c (macho_symfile_offsets): Update.
12147 * jit.c (jit_bfd_try_read_symtab): Update.
12148
12149 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
12150
12151 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12152 unittests/utils-selftests.c.
12153 * unittests/utils-selftests.c: New file.
12154
12155 2018-03-14 Tom Tromey <tom@tromey.com>
12156
12157 PR cli/14977:
12158 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12159 for NULL.
12160
12161 2018-03-14 Tom Tromey <tom@tromey.com>
12162
12163 PR cli/19918:
12164 * printcmd.c (printf_pointer): Allow "-" in format.
12165
12166 2018-03-14 Tom Tromey <tom@tromey.com>
12167
12168 * printcmd.c (_initialize_printcmd): Add usage to printf.
12169
12170 2018-03-14 Yao Qi <qiyao@sourceware.org>
12171
12172 * MAINTAINERS: Update my email address.
12173
12174 2018-03-13 Tom Tromey <tom@tromey.com>
12175
12176 * machoread.c (macho_check_dsym): Change filenamep to a
12177 std::string*.
12178 (macho_symfile_read): Update.
12179 * symfile.c (load_command): Use std::string.
12180
12181 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12182
12183 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12184 to error message string.
12185 (riscv_register_name): Use xsnprintf instead of sprintf.
12186 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12187 internal_error.
12188 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12189 error.
12190 (riscv_push_dummy_call): Likewise.
12191
12192 2018-03-12 Tom Tromey <tom@tromey.com>
12193
12194 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12195 Use gdb::byte_vector.
12196 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12197
12198 2018-03-12 Yao Qi <yao.qi@linaro.org>
12199
12200 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12201 parameter type to readable_regcache.
12202 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12203 the declaration.
12204
12205 2018-03-11 Tom Tromey <tom@tromey.com>
12206
12207 * dwarf2read.c (struct nextfield): Add initializers.
12208 (struct nextfnfield): Remove.
12209 (struct fnfieldlist): Add initializers. Remove "length" and
12210 "head", use std::vector.
12211 (struct decl_field_list): Remove.
12212 (struct field_info): Add initializers.
12213 <fields, baseclasses>: Now std::vector.
12214 <nbaseclasses, nfnfields, typedef_field_list_count,
12215 nested_types_list_count>: Remove.
12216 (dwarf2_add_field, dwarf2_add_type_defn)
12217 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12218 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12219 (process_structure_scope): Update.
12220
12221 2018-03-11 Tom Tromey <tom@tromey.com>
12222
12223 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12224 for use by std::sort.
12225 (build_type_psymtabs_1): Use std::vector.
12226
12227 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12228
12229 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12230 and LIBMPFR in the printed configuration.
12231
12232 2018-03-08 Tom Tromey <tom@tromey.com>
12233
12234 * source.c (get_filename_and_charpos): Use scoped_fd.
12235 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12236 (procfs_pidlist): Likewise.
12237 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12238 (iterate_over_mappings): Likewise.
12239
12240 2018-03-08 Tom Tromey <tom@tromey.com>
12241
12242 * infcall.c (struct call_return_meta_info)
12243 <stack_temporaries_enabled>: Remove.
12244 (get_call_return_value, call_function_by_hand_dummy): Update.
12245 * thread.c (disable_thread_stack_temporaries): Remove.
12246 (enable_thread_stack_temporaries): Remove.
12247 (thread_stack_temporaries_enabled_p): Return bool.
12248 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12249 (get_last_thread_stack_temporary): Update.
12250 * eval.c (evaluate_subexp): Update.
12251 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12252 class, not a function.
12253 (value_ptr, value_vec): Remove typedefs.
12254 (class thread_info) <stack_temporaries_enabled>: Now bool.
12255 <stack_temporaries>: Now a std::vector.
12256 (thread_stack_temporaries_enabled_p)
12257 (value_in_thread_stack_temporaries): Return bool.
12258
12259 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12260
12261 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12262 (getpkt_or_notif_sane_1): Likewise.
12263
12264 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12265
12266 * build-id.c (build_id_to_debug_bfd): Use std::string.
12267
12268 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12269
12270 * build-id.c (find_separate_debug_file_by_buildid): Return
12271 std::string.
12272 * build-id.h (find_separate_debug_file_by_buildid): Return
12273 std::string.
12274 * coffread.c (coff_symfile_read): Adjust to std::string.
12275 * elfread.c (elf_symfile_read): Adjust to std::string.
12276 * symfile.c (separate_debug_file_exists): Change parameter to
12277 std::string.
12278 (find_separate_debug_file): Return std::string.
12279 (find_separate_debug_file_by_debuglink): Return std::string.
12280 * symfile.h (find_separate_debug_file_by_debuglink): Return
12281 std::string.
12282
12283 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12284
12285 * common/xml-utils.c (xml_escape_text): Move code to...
12286 (xml_escape_text_append): ... this new function.
12287 * common/xml-utils.h (xml_escape_text_append): New declaration.
12288 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12289 New function.
12290 (_initialize_xml_utils): register test_xml_escape_text_append as
12291 a selftest.
12292
12293 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12294
12295 * defs.h: Remove MAX_REGISTER_SIZE.
12296 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12297 asserts.
12298 * python/py-unwind.c (pyuw_sniffer): Likewise.
12299
12300 2018-03-07 Tom Tromey <tom@tromey.com>
12301
12302 * linux-tdep.c (linux_info_proc): Update.
12303 * target.h (struct target_ops) <to_fileio_readlink>: Return
12304 optional<string>.
12305 (target_fileio_readlink): Return optional<string>.
12306 * remote.c (remote_hostio_readlink): Return optional<string>.
12307 * inf-child.c (inf_child_fileio_readlink): Return
12308 optional<string>.
12309 * target.c (target_fileio_readlink): Return optional<string>.
12310
12311 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12312
12313 * regcache.c (cooked_read_test): Add riscv to the list of
12314 architectures that have a save_reggroup.
12315
12316 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12317
12318 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12319 value is not a dynamic class object.
12320
12321 2018-03-06 Tom Tromey <tom@tromey.com>
12322
12323 * rust-exp.y: Formatting fixes.
12324
12325 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12326
12327 * riscv-tdep.c (riscv_register_name): Remove target description
12328 support.
12329 (riscv_gdbarch_init): Remove target description check.
12330
12331 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12332
12333 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12334 comment.
12335 * riscv-tdep.h: Likewise.
12336
12337 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12338
12339 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12340 (riscv_pseudo_register_write): Delete.
12341 (riscv_gdbarch_init): Remove all use of pseudo registers.
12342
12343 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12344
12345 * record-btrace.c (btrace_print_lines): Replace cleanup
12346 parameter with RAII equivalents.
12347 (btrace_insn_history): Replace cleanup with RAII equivalents.
12348 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12349 make_cleanup_ui_out_tuple_begin_end): Remove.
12350 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12351 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12352 make_cleanup_ui_out_list_begin_end): Remove.
12353
12354 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12355
12356 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12357 parameter types to std::vector. Use bool.
12358 (record_btrace_wait): Replace VEC(tp_t) with
12359 std::vector<thread_info *>.
12360 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12361
12362 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12363
12364 * record-btrace.c (record_btrace_disable_callback): Remove.
12365 (struct scoped_btrace_disable): New.
12366 (record_btrace_open): Use scoped_btrace_disable.
12367
12368 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12369
12370 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12371 reading values from registers.
12372
12373 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12374
12375 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12376 where appropriate.
12377
12378 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12379
12380 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12381 change parameter type. Use GDB's print functions, and use
12382 core_addr_to_string where appropriate.
12383 (riscv_push_dummy_call): Use core_addr_to_string where
12384 appropriate, update call to riscv_print_arg_location, and reindent
12385 a few lines.
12386 (riscv_return_value): Update call to riscv_print_arg_location.
12387
12388 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12389 Tim Newsome <tim@sifive.com>
12390 Albert Ou <a0u@eecs.berkeley.edu>
12391 Darius Rad <darius@bluespec.com>
12392
12393 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12394 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12395 (ALLDEPFILES): Add riscv-tdep.c
12396 * configure.tgt: Add riscv support.
12397 * riscv-tdep.c: New file.
12398 * riscv-tdep.h: New file.
12399 * NEWS: Mention new target.
12400 * MAINTAINERS: Add entry for riscv.
12401
12402 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12403
12404 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12405 fields within aggregates.
12406
12407 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12408
12409 * record-btrace.c (btrace_print_lines): Change type of flags to
12410 gdb_disassembly_flags.
12411
12412 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12413
12414 * fbsd-nat.c: Include "inf-ptrace.h".
12415 (USE_SIGTRAP_SIGINFO): Conditionally define.
12416 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12417 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12418 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12419 function.
12420 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12421 Likewise.
12422 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12423 Likewise.
12424 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12425 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12426 "supports_stopped_by_hw_breakpoint" target methods.
12427
12428 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12429
12430 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12431 * fbsd-nat.c (debug_fbsd_nat): New variable.
12432 (show_fbsd_nat_debug): New function.
12433 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12434 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12435
12436 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12437
12438 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12439 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12440 prototype.
12441 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12442 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12443 method.
12444
12445 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12446
12447 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12448 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12449
12450 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12451
12452 * charset.c (struct charset_vector): New.
12453 (charsets): Change type to charset_vector.
12454 (find_charset_names): Adjust.
12455 (add_one): Adjust.
12456 (_initialize_charset): Adjust.
12457
12458 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12459
12460 * progspace.h (struct program_space) <deleted_solibs>: Change
12461 type to std::vector<std::string>.
12462 * progspace.c (clear_program_space_solib_cache): Adjust.
12463 * breakpoint.c (print_solib_event): Adjust.
12464 (check_status_catch_solib): Adjust.
12465 * solib.c (update_solib_list): Adjust.
12466 * ui-out.h (class ui_out) <field_string>: New overload.
12467 * ui-out.c (ui_out::field_string): New overload.
12468
12469 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12470
12471 * progspace.h (struct program_space): Add constructor and
12472 destructor, initialize fields.
12473 (add_program_space): Remove.
12474 * progspace.c (add_program_space): Rename to...
12475 (program_space::program_space): ... this.
12476 (release_program_space): Rename to...
12477 (program_space::~program_space): ... this.
12478 (delete_program_space): Use delete to delete program_space.
12479 (initialize_progspace): Use new to allocate program_space.
12480 * inferior.c (add_inferior_with_spaces): Likewise.
12481 (clone_inferior_command): Likewise.
12482 * infrun.c (follow_fork_inferior): Likewise.
12483 (handle_vfork_child_exec_or_exit): Likewise.
12484
12485 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12486
12487 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12488 (delim_string_to_char_ptr_vec): Return std::vector of
12489 gdb::unique_xmalloc_ptr.
12490 (dirnames_to_char_ptr_vec_append): Take std::vector of
12491 gdb::unique_xmalloc_ptr.
12492 (dirnames_to_char_ptr_vec): Return std::vector of
12493 gdb::unique_xmalloc_ptr.
12494 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12495 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12496 (delim_string_to_char_ptr_vec): Return an std::vector of
12497 gdb::unique_xmalloc_ptr, adjust the code.
12498 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12499 gdb::unique_xmalloc_ptr, adjust the code.
12500 (dirnames_to_char_ptr_vec): Return an std::vector of
12501 gdb::unique_xmalloc_ptr, adjust the code.
12502 * auto-load.c (auto_load_safe_path_vec): Change type to
12503 std::vector of gdb::unique_xmalloc_ptr.
12504 (auto_load_expand_dir_vars): Return an std::vector of
12505 gdb::unique_xmalloc_ptr, adjust the code.
12506 (auto_load_safe_path_vec_update): Adjust.
12507 (filename_is_in_auto_load_safe_path_vec): Adjust.
12508 (auto_load_objfile_script_1): Adjust.
12509 * build-id.c (build_id_to_debug_bfd): Adjust.
12510 * linux-thread-db.c (thread_db_load_search): Adjust.
12511 * source.c (add_path): Adjust.
12512 (openp): Adjust.
12513 * symfile.c (find_separate_debug_file): Adjust.
12514 * utils.c (do_free_char_ptr_vec): Remove.
12515 (make_cleanup_free_char_ptr_vec): Remove.
12516
12517 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12518
12519 PR gdb/22907
12520 * common/pathstuff.c: Conditionally include "<windows.h>".
12521
12522 2018-03-01 Georg Sauthoff <mail@georg.so>
12523
12524 PR gdb/22888
12525 * gcore.in: Quote variables and switch interpreter to bash.
12526
12527 2018-03-01 Tom Tromey <tom@tromey.com>
12528
12529 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12530 assertion. Add assertion for discriminant_index.
12531 (quirk_rust_enum): Use correct base type name in univariant case.
12532
12533 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12534
12535 * record.c (get_call_history_modifiers): Return a
12536 record_print_flags.
12537 (cmd_record_call_history): Adjust.
12538 * record-btrace.c (record_btrace_call_history): Adjust.
12539 (record_btrace_call_history_range): Adjust.
12540 (record_btrace_call_history_from): Adjust.
12541 * target-debug.h (target_debug_print_record_print_flags): New.
12542 * target-delegates.c: Re-generate.
12543 * target.c (target_call_history): Change flags type.
12544 (target_call_history_from): Likewise.
12545 (target_call_history_range): Likewise.
12546 * target.h (struct target_ops) <target_call_history>: Likewise.
12547 (target_call_history_from): Likewise.
12548 (target_call_history_range): Likewise.
12549
12550 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12551 Simon Marchi <simon.marchi@polymtl.ca>
12552
12553 * common/common-utils.c: Include "sys/stat.h".
12554 (is_regular_file): Move here from "source.c"; change return
12555 type to "bool".
12556 * common/common-utils.h (is_regular_file): New prototype.
12557 * common/pathstuff.c (contains_dir_separator): New function.
12558 * common/pathstuff.h (contains_dir_separator): New prototype.
12559 * source.c: Don't include "sys/stat.h".
12560 (is_regular_file): Move to "common/common-utils.c".
12561
12562 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12563
12564 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12565 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12566 * auto-load.c: Include "common/pathstuff.h".
12567 * common/common-def.h (current_directory): Move here.
12568 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12569 function.
12570 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12571 prototype.
12572 * common/pathstuff.c: New file.
12573 * common/pathstuff.h: New file.
12574 * compile/compile.c: Include "common/pathstuff.h".
12575 * defs.h (current_directory): Move to "common/common-defs.h".
12576 * dwarf2read.c: Include "common/pathstuff.h".
12577 * exec.c: Likewise.
12578 * guile/scm-safe-call.c: Likewise.
12579 * linux-thread-db.c: Likewise.
12580 * main.c: Likewise.
12581 * nto-tdep.c: Likewise.
12582 * objfiles.c: Likewise.
12583 * source.c: Likewise.
12584 * symtab.c: Likewise.
12585 * utils.c: Include "common/pathstuff.h".
12586 (gdb_realpath): Move to "common/pathstuff.c".
12587 (gdb_realpath_keepfile): Likewise.
12588 (gdb_abspath): Likewise.
12589 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12590 (gdb_realpath_keepfile): Likewise.
12591 (gdb_abspath): Likewise.
12592
12593 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12594
12595 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12596 wildcard process pid for super_resume for kernels with a
12597 specific bug.
12598
12599 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12600
12601 * compile/compile.c (get_args): Add additional comments
12602 explaining function.
12603
12604 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12605 Tom Tromey <tom@tromey.com>
12606
12607 * target.h (memory_write_request_s): Remove typedef. Don't define
12608 VEC.
12609 (target_write_memory_blocks): Change argument to std::vector.
12610 (struct memory_write_request): Add constructor.
12611 * target-memory.c (compare_block_starting_address): Return bool.
12612 Change argument types.
12613 (claim_memory): Change arguments to use std::vector.
12614 (split_regular_and_flash_blocks, blocks_to_erase)
12615 (compute_garbled_blocks): Likewise.
12616 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12617 (target_write_memory_blocks): Change argument to std::vector.
12618 * symfile.c (struct load_section_data): Add constructor and
12619 destructor. Use std::vector for "requests".
12620 (struct load_progress_data): Add initializers.
12621 (load_section_callback): Update. Use "new".
12622 (clear_memory_write_data): Remove.
12623 (generic_load): Update.
12624
12625 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12626
12627 * arch/aarch64.h: Use common/tdesc.h.
12628
12629 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12630
12631 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12632 architecture with a 64-bit ABI.
12633
12634 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12635
12636 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12637 ahead of target description loading.
12638
12639 2018-02-26 Tom Tromey <tom@tromey.com>
12640
12641 * stack.c (backtrace_command_1): Update.
12642 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12643 of "flags".
12644 * python/py-framefilter.c (py_print_frame)
12645 (gdbpy_apply_frame_filter): Change type of "flags".
12646 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12647 of "flags".
12648 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12649 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12650 * extension.h (enum frame_filter_flag): Rename from
12651 frame_filter_flags.
12652 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12653 (apply_ext_lang_frame_filter): Change type of "flags".
12654 * extension.c (apply_ext_lang_frame_filter): Change type of
12655 "flags".
12656 * extension-priv.h (struct extension_language_ops)
12657 <apply_frame_filter>: Change type of "flags".
12658
12659 2018-02-26 Tom Tromey <tom@tromey.com>
12660
12661 PR python/16497:
12662 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
12663 off-by-one in py_end computation.
12664 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12665 PRINT_MORE_FRAMES.
12666 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12667 constant.
12668
12669 2018-02-26 Tom Tromey <tom@tromey.com>
12670
12671 * dwarf2read.c (struct variant_field): New.
12672 (struct nextfield) <variant>: New field.
12673 (dwarf2_add_field): Handle DW_TAG_variant_part.
12674 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12675 discriminated union.
12676 (read_structure_type): Handle DW_TAG_variant_part.
12677 (handle_struct_member_die): New function, extracted from
12678 process_structure_scope. Handle DW_TAG_variant.
12679 (process_structure_scope): Handle discriminated unions. Call
12680 handle_struct_member_die.
12681
12682 2018-02-26 Tom Tromey <tom@tromey.com>
12683
12684 * rust-lang.h (rust_last_path_segment): Declare.
12685 * rust-lang.c (rust_last_path_segment): Now public. Change
12686 contract.
12687 (struct disr_info): Remove.
12688 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12689 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12690 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12691 (rust_enum_p, rust_enum_variant): New function.
12692 (rust_underscore_fields): Remove "offset" parameter.
12693 (rust_print_enum): New function.
12694 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12695 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12696 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
12697 enums.
12698 (rust_internal_print_type): New function, from rust_print_type.
12699 Remove enum code.
12700 (rust_print_type): Call rust_internal_print_type.
12701 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12702 Update enum handling.
12703 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12704 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12705 (rust_union_quirks): New functions.
12706 (process_full_comp_unit, process_full_type_unit): Call
12707 rust_union_quirks.
12708 (process_structure_scope): Update rust_unions if necessary.
12709
12710 2018-02-26 Tom Tromey <tom@tromey.com>
12711
12712 * value.h (value_union_variant): Declare.
12713 * valops.c (value_union_variant): New function.
12714 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12715 (struct discriminant_info): New.
12716 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12717 enumerator.
12718 (struct main_type) <flag_discriminated_union>: New field.
12719
12720 2018-02-26 Tom Tromey <tom@tromey.com>
12721
12722 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12723 unittests/unpack-selftests.c.
12724 * unittests/unpack-selftests.c: New file.
12725 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12726
12727 2018-02-26 Yao Qi <yao.qi@linaro.org>
12728
12729 * dwarf2read.c (struct partial_die_info) <read>: New method.
12730 (read_partial_die): Remove the declaration.
12731 (load_partial_dies): Update.
12732 (partial_die_info::partial_die_info):
12733 (read_partial_die): Change it to partial_die_info::read.
12734
12735 2018-02-26 Yao Qi <yao.qi@linaro.org>
12736
12737 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12738 (fixup_partial_die): Remove declaration.
12739 (scan_partial_symbols): Update.
12740 (partial_die_parent_scope): Likewise.
12741 (partial_die_full_name): Likewise.
12742 (fixup_partial_die): Change it to partial_die_info::fixup.
12743
12744 2018-02-26 Yao Qi <yao.qi@linaro.org>
12745
12746 * dwarf2read.c (read_partial_die): Update the declaration.
12747 (load_partial_dies): Caller update.
12748 (read_partial_die): Remove one argument abbrev_len.
12749
12750 2018-02-26 Yao Qi <yao.qi@linaro.org>
12751
12752 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12753 assignment operator.
12754 (load_partial_dies): Use ctor and copy ctor.
12755 (read_partial_die): Update.
12756 (dwarf2_cu::find_partial_die): Use ctor.
12757
12758 2018-02-26 Yao Qi <yao.qi@linaro.org>
12759
12760 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12761 (find_partial_die_in_comp_unit): Change it to
12762 dwarf2_cu::find_partial_die.
12763 (find_partial_die): Update.
12764
12765 2018-02-26 Yao Qi <yao.qi@linaro.org>
12766
12767 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12768 is NULL.
12769
12770 2018-02-26 Yao Qi <yao.qi@linaro.org>
12771
12772 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12773
12774 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12775
12776 * arch/amd64.h: Use common/tdesc.h.
12777 * arch/i386.c: Likewise.
12778 * arch/i386.h: Likewise.
12779 * arch/tic6x.c: Likewise.
12780 * arch/tdesc.h: Move file from here...
12781 * common/tdesc.h: ...to here.
12782 * features/aarch64-core.c: Regenerate.
12783 * features/aarch64-fpu.c: Regenerate.
12784 * features/i386/32bit-avx.c: Regenerate.
12785 * features/i386/32bit-avx512.c: Regenerate.
12786 * features/i386/32bit-core.c: Regenerate.
12787 * features/i386/32bit-linux.c: Regenerate.
12788 * features/i386/32bit-mpx.c: Regenerate.
12789 * features/i386/32bit-pkeys.c: Regenerate.
12790 * features/i386/32bit-sse.c: Regenerate.
12791 * features/i386/64bit-avx.c: Regenerate.
12792 * features/i386/64bit-avx512.c: Regenerate.
12793 * features/i386/64bit-core.c: Regenerate.
12794 * features/i386/64bit-linux.c: Regenerate.
12795 * features/i386/64bit-mpx.c: Regenerate.
12796 * features/i386/64bit-pkeys.c: Regenerate.
12797 * features/i386/64bit-segments.c: Regenerate.
12798 * features/i386/64bit-sse.c: Regenerate.
12799 * features/i386/x32-core.c: Regenerate.
12800 * features/tic6x-c6xp.c: Regenerate.
12801 * features/tic6x-core.c: Regenerate.
12802 * features/tic6x-gp.c: Regenerate.
12803 * target-descriptions.c: Use common/tdesc.h.
12804 * target-descriptions.h: Likewise.
12805
12806 2018-02-24 Tom Tromey <tom@tromey.com>
12807
12808 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12809 (try_thread_db_load_from_dir, thread_db_load_search): Use
12810 std::string.
12811 (info_auto_load_libthread_db_compare): Return bool. Change
12812 argument types.
12813 (info_auto_load_libthread_db): Use std::vector, std::string.
12814 Remove cleanups.
12815
12816 2018-02-24 Tom Tromey <tom@tromey.com>
12817
12818 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12819 std::string.
12820 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12821 std::string*.
12822 * gdbarch.c: Rebuild.
12823 * gdbarch.h: Rebuild.
12824 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12825 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12826 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12827 std::string*.
12828
12829 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12830
12831 * gdbtypes.h (sect_offset): Change type to uint64_t.
12832 (sect_offset_str): New function.
12833 * dwarf2read.c (create_addrmap_from_aranges): Use
12834 sect_offset_str.
12835 (error_check_comp_unit_head): Likewise.
12836 (create_debug_type_hash_table): Likewise.
12837 (read_cutu_die_from_dwo): Likewise.
12838 (init_cutu_and_read_dies): Likewise.
12839 (init_cutu_and_read_dies_no_follow): Likewise.
12840 (process_psymtab_comp_unit_reader): Likewise.
12841 (partial_die_parent_scope): Likewise.
12842 (peek_die_abbrev): Likewise.
12843 (process_queue): Likewise.
12844 (dwarf2_physname): Likewise.
12845 (read_namespace_alias): Likewise.
12846 (read_import_statement): Likewise.
12847 (create_dwo_cu_reader): Likewise.
12848 (create_cus_hash_table): Likewise.
12849 (lookup_dwo_cutu): Likewise.
12850 (inherit_abstract_dies): Likewise.
12851 (read_func_scope): Likewise.
12852 (read_call_site_scope): Likewise.
12853 (dwarf2_add_member_fn): Likewise.
12854 (read_common_block): Likewise.
12855 (read_module_type): Likewise.
12856 (read_typedef): Likewise.
12857 (read_subrange_type): Likewise.
12858 (load_partial_dies): Likewise.
12859 (read_partial_die): Likewise.
12860 (find_partial_die): Likewise.
12861 (read_str_index): Likewise.
12862 (dwarf2_string_attr): Likewise.
12863 (build_error_marker_type): Likewise.
12864 (lookup_die_type): Likewise.
12865 (dump_die_shallow): Likewise.
12866 (follow_die_ref): Likewise.
12867 (dwarf2_fetch_die_loc_sect_off): Likewise.
12868 (dwarf2_fetch_constant_bytes): Likewise.
12869 (follow_die_sig): Likewise.
12870 (get_signatured_type): Likewise.
12871 (get_DW_AT_signature_type): Likewise.
12872 (dwarf2_find_containing_comp_unit): Likewise.
12873 (set_die_type): Likewise.
12874
12875 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12876
12877 * arch/aarch64.c: Include "common-defs.h".
12878 * arch/amd64.c: Likewise.
12879 * arch/i386.c: Likewise.
12880
12881 2018-02-21 Tom Tromey <tom@tromey.com>
12882
12883 * value.h: (extract_field_op): Update.
12884 * eval.c (extract_field_op): Return a const char *.
12885 * expression.h (parse_expression_for_completion): Update.
12886 * completer.c (complete_expression): Update.
12887 (add_struct_fields): Make fieldname const.
12888 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12889 (mark_completion_tag, parse_exp_in_context_1): Update.
12890 (parse_expression_for_completion): Change "name" to
12891 unique_xmalloc_ptr*.
12892
12893 2018-02-21 Tom Tromey <tom@tromey.com>
12894
12895 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12896
12897 2018-02-21 Yao Qi <yao.qi@linaro.org>
12898
12899 * avr-tdep.c (avr_read_pc): Change parameter type to
12900 readable_regcache.
12901 * gdbarch.sh (read_pc): Likewise.
12902 * gdbarch.c: Re-generated.
12903 * gdbarch.h: Re-generated.
12904 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12905 readable_regcache.
12906 * ia64-tdep.c (ia64_read_pc): Likewise.
12907 * mips-tdep.c (mips_read_pc): Likewise.
12908 * spu-tdep.c (spu_read_pc): Likewise.
12909
12910 2018-02-21 Yao Qi <yao.qi@linaro.org>
12911
12912 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12913 * regcache-dump.c: New file.
12914 * regcache.c: Move register_dump to regcache-dump.c.
12915 (maintenance_print_registers): Likewise.
12916 (maintenance_print_raw_registers): Likewise.
12917 (maintenance_print_cooked_registers): Likewise.
12918 (maintenance_print_register_groups): Likewise.
12919 (maintenance_print_remote_registers): Likewise.
12920 (_initialize_regcache): Likewise.
12921 * regcache.h (register_dump): Moved from regcache.c.
12922
12923 2018-02-21 Yao Qi <yao.qi@linaro.org>
12924
12925 * regcache.c (regcache::regcache): Update.
12926 (regcache::invalidate): Move it to detached_regcache::invalidate.
12927 (get_thread_arch_aspace_regcache): Update.
12928 (regcache::raw_update): Update.
12929 (regcache::cooked_read): Remove some code.
12930 (regcache::cooked_read_value): Likewise.
12931 (regcache::raw_write): Remove assert on m_readonly_p.
12932 (regcache::raw_supply_integer): Move it to
12933 detached_regcache::raw_supply_integer.
12934 (regcache::raw_supply_zeroed): Likewise.
12935 * regcache.h (detached_regcache) <raw_supply_integer>: New
12936 declaration.
12937 <raw_supply_zeroed, invalidate>: Likewise.
12938 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12939 <invalidate>: Likewise.
12940 <m_readonly_p>: Removed.
12941
12942 2018-02-21 Yao Qi <yao.qi@linaro.org>
12943
12944 * infcmd.c (get_return_value): Let stop_regs point to
12945 get_current_regcache.
12946 * regcache.c (regcache::regcache): Remove.
12947 (register_dump_reg_buffer): New class.
12948 (regcache_print): Adjust.
12949 * regcache.h (regcache): Remove constructors.
12950
12951 2018-02-21 Yao Qi <yao.qi@linaro.org>
12952
12953 * regcache.c (class register_dump): New class.
12954 (register_dump_regcache, register_dump_none): New class.
12955 (register_dump_remote, register_dump_groups): New class.
12956 (regcache_print): Update.
12957 * regcache.h (regcache_dump_what): Move it to regcache.c.
12958 (regcache) <dump>: Remove.
12959
12960 2018-02-21 Yao Qi <yao.qi@linaro.org>
12961
12962 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12963 reg_buffer_rw *.
12964 (jit_unwind_reg_set_impl): Call raw_supply.
12965 (jit_frame_sniffer): Use reg_buffer_rw.
12966 * record-full.c (record_full_core_regbuf): Change its type.
12967 (record_full_core_open_1): Use reg_buffer_rw.
12968 (record_full_close): Likewise.
12969 (record_full_core_fetch_registers): Use regcache->raw_supply.
12970 (record_full_core_store_registers): Likewise.
12971 * regcache.c (regcache::get_register_status): Move it to
12972 reg_buffer.
12973 (regcache_raw_set_cached_value): Remove.
12974 (regcache::raw_set_cached_value): Remove.
12975 (regcache::raw_write): Call raw_supply.
12976 (regcache::raw_supply): Move it to reg_buffer_rw.
12977 * regcache.h (regcache_raw_set_cached_value): Remove.
12978 (reg_buffer_rw): New class.
12979
12980 2018-02-21 Yao Qi <yao.qi@linaro.org>
12981
12982 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12983 readonly_detached_regcache.
12984 (dummy_frame_prev_register): Use regcache->cooked_read.
12985 * frame.c (frame_save_as_regcache): Change return type.
12986 (frame_pop): Update.
12987 * frame.h (frame_save_as_regcache): Update declaration.
12988 * inferior.h (get_infcall_suspend_state_regcache): Update
12989 declaration.
12990 * infrun.c (infcall_suspend_state) <registers>: use
12991 readonly_detached_regcache.
12992 (save_infcall_suspend_state): Don't use regcache_dup.
12993 (get_infcall_suspend_state_regcache): Change return type.
12994 * linux-fork.c (struct fork_info) <savedregs>: Change to
12995 readonly_detached_regcache.
12996 <pc>: New field.
12997 (fork_save_infrun_state): Don't use regcache_dup.
12998 (info_checkpoints_command): Adjust.
12999 * mi/mi-main.c (register_changed_p): Update declaration.
13000 (mi_cmd_data_list_changed_registers): Use
13001 readonly_detached_regcache.
13002 (register_changed_p): Change parameter type to
13003 readonly_detached_regcache.
13004 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13005 readonly_detached_regcache.
13006 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13007 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13008 New.
13009 (regcache::save): Move it to reg_buffer.
13010 (regcache::restore): Change parameter type.
13011 (regcache_dup): Remove.
13012 * regcache.h (reg_buffer) <save>: New method.
13013 (readonly_detached_regcache): New class.
13014 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13015 readonly_detached_regcache.
13016 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13017
13018 2018-02-21 Yao Qi <yao.qi@linaro.org>
13019
13020 * frame.c (frame_save_as_regcache): Use regcache method save.
13021 (frame_pop): Use regcache method restore.
13022 * infrun.c (restore_infcall_suspend_state): Likewise.
13023 * linux-fork.c (fork_load_infrun_state): Likewise.
13024 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13025 save.
13026 * regcache.c (regcache_save): Remove.
13027 (regcache::restore): More asserts.
13028 (regcache_cpy): Remove.
13029 * regcache.h (regcache_save): Remove the declaration.
13030 (regcache::restore): Move from private to public.
13031 Remove the friend declaration of regcache_cpy.
13032 (regcache_cpy): Remove declaration.
13033
13034 2018-02-21 Yao Qi <yao.qi@linaro.org>
13035
13036 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13037 parameter type to 'readable_regcache *'.
13038 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13039 * arm-tdep.c (arm_neon_quad_read): Likewise.
13040 (arm_pseudo_read): Likewise.
13041 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13042 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13043 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13044 * gdbarch.c: Re-generated.
13045 * gdbarch.h: Re-generated.
13046 * gdbarch.sh (pseudo_register_read): Change parameter type to
13047 'readable_regcache *'.
13048 (pseudo_register_read_value): Likewise.
13049 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13050 (h8300_pseudo_register_read): Likewise.
13051 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13052 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13053 (i386_pseudo_register_read_into_value): Likewise.
13054 (i386_pseudo_register_read_value): Likewise.
13055 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13056 declaration.
13057 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13058 * m32c-tdep.c (m32c_raw_read): Likewise.
13059 (m32c_read_flg): Likewise.
13060 (m32c_banked_register): Likewise.
13061 (m32c_banked_read): Likewise.
13062 (m32c_sb_read): Likewise.
13063 (m32c_part_read): Likewise.
13064 (m32c_cat_read): Likewise.
13065 (m32c_r3r2r1r0_read): Likewise.
13066 (m32c_pseudo_register_read): Likewise.
13067 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13068 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13069 (mep_pseudo_cr64_read): Likewise.
13070 (mep_pseudo_register_read): Likewise.
13071 * mips-tdep.c (mips_pseudo_register_read): Likewise.
13072 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13073 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13074 * regcache.c (regcache::raw_read): Move it to readable_regcache.
13075 (regcache::cooked_read): Likewise.
13076 (regcache::cooked_read_value): Likewise.
13077 (regcache_cooked_read_signed):
13078 (regcache::cooked_read): Likewise.
13079 * regcache.h (readable_regcache): New class.
13080 (regcache): Inherit readable_regcache. Move some methods to
13081 readable_regcache.
13082 * rl78-tdep.c (rl78_pseudo_register_read): Change
13083 parameter type to 'readable_regcache *'.
13084 * rs6000-tdep.c (do_regcache_raw_read): Remove.
13085 (e500_pseudo_register_read): Change parameter type to
13086 'readable_regcache *'.
13087 (dfp_pseudo_register_read): Likewise.
13088 (vsx_pseudo_register_read): Likewise.
13089 (efpr_pseudo_register_read): Likewise.
13090 * s390-tdep.c (s390_pseudo_register_read): Likewise.
13091 * sh-tdep.c (sh_pseudo_register_read): Likewise.
13092 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13093 (sh64_pseudo_register_read): Likewise.
13094 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13095 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13096 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13097 (spu_pseudo_register_read): Likewise.
13098 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13099 (xtensa_pseudo_register_read): Likewise.
13100
13101 2018-02-21 Yao Qi <yao.qi@linaro.org>
13102
13103 * regcache.c (regcache::regcache): Call reg_buffer ctor.
13104 (regcache::arch): Move it to reg_buffer::arch.
13105 (regcache::register_buffer): Likewise.
13106 (regcache::assert_regnum): Likewise.
13107 (regcache::num_raw_registers): Likewise.
13108 * regcache.h (reg_buffer): New class.
13109 (regcache): Inherit reg_buffer.
13110
13111 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
13112
13113 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13114 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13115
13116 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
13117
13118 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13119
13120 2018-02-19 Alan Hayward <alan.hayward@arm.com>
13121
13122 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13123 (SFILES): Remove common/*.c files.
13124 (COMMON_OBS): Remove some *.o files built from common/*.c files.
13125 * common/common.host: Add common reference.
13126 * configure.ac: Likewise.
13127 * configure: Regenerate.
13128
13129 2018-02-16 Yao Qi <yao.qi@linaro.org>
13130
13131 * block.c (block_namespace_info): Inherit allocate_on_obstack.
13132 (block_initialize_namespace): Use new.
13133 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13134 (dwarf2_free_objfile): Use delete.
13135 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13136 (copy_type_recursive): Use new.
13137 * gdb_obstack.h (allocate_on_obstack): New.
13138
13139 2018-02-15 Yao Qi <yao.qi@linaro.org>
13140
13141 PR gdb/22849
13142 * inferior.c (exit_inferior_1): Reset inf->control.
13143
13144 2018-02-15 Joel Brobecker <brobecker@adacore.com>
13145
13146 * ada-lang.c (ada_to_fixed_value_create): Delete advance
13147 declaration.
13148
13149 2018-02-14 Pedro Alves <palves@redhat.com>
13150
13151 * frame-unwind.c (frame_unwind_try_unwinder): Always call
13152 frame_cleanup_after_sniffer on exception.
13153
13154 2018-02-14 Tom Tromey <tom@tromey.com>
13155
13156 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13157 const.
13158 (solib_bfd_open): Make pathname const.
13159 * solib.c (solib_bfd_open): Make pathname const.
13160 * solib-spu.c (spu_bfd_fopen): Make name const.
13161 (spu_bfd_open): Make pathname const.
13162 * solib-darwin.c (darwin_bfd_open): Make pathname const.
13163 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13164
13165 2018-02-14 Tom Tromey <tom@tromey.com>
13166
13167 * symfile.c (symfile_bfd_open): Update.
13168 * source.h (openp, source_full_path_of, find_and_open_source):
13169 Change argument type to unique_xmalloc_ptr.
13170 * source.c (openp): Take a unique_xmalloc_ptr.
13171 (source_full_path_of, find_and_open_source): Likewise.
13172 (open_source_file, symtab_to_fullname): Update.
13173 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13174 unique_xmalloc_ptr.
13175 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13176 (exec_file_find): Update.
13177 * psymtab.c (psymtab_to_fullname): Update.
13178 * nto-tdep.h (nto_find_and_open_solib): Update.
13179 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13180 unique_xmalloc_ptr.
13181 * exec.c (exec_file_attach): Update.
13182 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13183 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13184
13185 2018-02-14 Tom Tromey <tom@tromey.com>
13186
13187 * solib.c: Include source.h.
13188 * nto-tdep.c: Include source.h.
13189 * mi/mi-cmd-env.c: Include source.h.
13190 * infcmd.c: Include source.h.
13191 * exec.c: Include source.h.
13192 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13193 (add_path, directory_switch, source_path, init_source_path): Move
13194 declarations...
13195 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13196 (add_path, directory_switch, source_path, init_source_path):
13197 ...here.
13198
13199 2018-02-14 Tom Tromey <tom@tromey.com>
13200
13201 * solist.h (exec_file_find, solib_find): Return
13202 unique_xmalloc_ptr.
13203 (solib_bfd_fopen): Take a const char *.
13204 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13205 (exec_file_find, solib_find): Likewise.
13206 (solib_bfd_fopen): Do not take ownership of "pathname".
13207 (solib_bfd_open): Use unique_xmalloc_ptr.
13208 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13209 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13210 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13211 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13212
13213 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13214
13215 * ada-lang.c (name_match_type_from_name): Remove reference to
13216 ada_name_for_lookup in function's documentation.
13217 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13218
13219 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13220
13221 * defs.h (enum openp_flags): New enum.
13222 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13223 Move to enum openp_flags.
13224 (openp_flags): New enum flags.
13225 (openp): Change parameter type to openp_flags.
13226 * source.c (openp): Change parameter type to openp_flags.
13227 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13228 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13229
13230 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13231
13232 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13233 per-command.
13234
13235 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13236
13237 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13238 into...
13239 (class dwarf2_queue_guard): ...the destructor of this new class.
13240 (dw2_do_instantiate_symtab): Create instance of the new class
13241 dwarf2_queue_guard, remove cleanup.
13242
13243 2018-02-09 Tom Tromey <tom@tromey.com>
13244
13245 * source.c (find_source_lines): Don't reference past the end of
13246 the vector.
13247
13248 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13249
13250 * remote.c (remote_btrace_maybe_reopen): Change error message.
13251 * btrace.c (btrace_enable): Likewise.
13252 (parse_xml_btrace): Likewise.
13253 (parse_xml_btrace_conf): Likewise.
13254
13255 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13256
13257 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13258 (linux_enable_pt, linux_enable_bts): Call
13259 diagnose_perf_event_open_fail.
13260
13261 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13262
13263 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13264 Remove parameter and change return type. Update callers. Move it.
13265 (linux_enable_bts, linux_enable_pt): Improve error message.
13266 (linux_enable_pt): Remove zero buffer size check.
13267 (linux_enable_btrace): Improve error messages. Remove NULL return
13268 check.
13269
13270 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13271
13272 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13273 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13274 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13275 (linux_supports_pt, linux_supports_btrace): Remove.
13276 (linux_enable_bts): Call cpu_supports_bts.
13277 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13278 * remote.c (remote_supports_btrace): Remove.
13279 (init_remote_ops): Remove remote_supports_btrace.
13280 * target-delegates.c: Regenerated.
13281 * target.c (target_supports_btrace): Remove.
13282 * target.h (target_ops) <to_supports_btrace>: Remove
13283 (target_supports_btrace): Remove.
13284 * x86-linux-nat.c (x86_linux_create_target): Remove
13285 linux_supports_btrace.
13286
13287 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13288
13289 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13290 btrace failed.
13291 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13292 exception and use message in own exception.
13293
13294 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13295
13296 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13297 (perf_event_pt_event_type): Use gdb_file_up.
13298 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13299 scoped_fd, and scoped_mmap.
13300
13301 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13302
13303 * common/scoped_mmap.h: New.
13304 * unittests/scoped_mmap-selftest.c: New.
13305 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13306 unittests/scoped_mmap-selftest.c.
13307
13308 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13309
13310 * common/scoped_fd.h: New.
13311 * unittests/scoped_fd-selftest.c: New.
13312 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13313 unittests/scoped_fd-selftest.c.
13314
13315 2018-02-09 Tom Tromey <tom@tromey.com>
13316
13317 * auto-load.c (auto_load_section_scripts): Use
13318 gdb::unique_xmalloc_ptr.
13319
13320 2018-02-09 Tom Tromey <tom@tromey.com>
13321
13322 * auto-load.c (execute_script_contents): Use std::string.
13323
13324 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13325
13326 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13327 Python function, rather than a new command.
13328
13329 2018-02-08 Tom Tromey <tom@tromey.com>
13330
13331 * solib.c (solib_find_1): Use std::string.
13332 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13333
13334 2018-02-08 Tom Tromey <tom@tromey.com>
13335
13336 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13337
13338 2018-02-08 Tom Tromey <tom@tromey.com>
13339
13340 * source.c (find_source_lines): Use gdb::def_vector.
13341
13342 2018-02-08 Tom Tromey <tom@tromey.com>
13343
13344 * macrocmd.c (struct temporary_macro_definition): New.
13345 (macro_define_command): Use temporary_macro_definition. Remove
13346 cleanups.
13347 (free_macro_definition_ptr): Remove.
13348
13349 2018-02-08 Tom Tromey <tom@tromey.com>
13350
13351 * macroexp.c (maybe_expand): Use std::string.
13352
13353 2018-02-08 Tom Tromey <tom@tromey.com>
13354
13355 * macroexp.c (struct macro_buffer): Add initializers for some
13356 members.
13357 (init_buffer, init_shared_buffer, free_buffer)
13358 (free_buffer_return_text): Remove.
13359 (macro_buffer): New constructors.
13360 (~macro_buffer): New destructor.
13361 (macro_buffer::set_shared): New method.
13362 (macro_buffer::resize_buffer, macro_buffer::appendc)
13363 (macro_buffer::appendmem): Now methods, not free functions.
13364 (set_token, append_tokens_without_splicing, stringify)
13365 (macro_stringify): Update.
13366 (gather_arguments): Change return type. Remove argc_p argument,
13367 add args_ptr argument. Use std::vector.
13368 (substitute_args): Remove argc argument. Accept std::vector.
13369 (expand): Update. Use std::vector.
13370 (scan, macro_expand, macro_expand_next): Update.
13371
13372 2018-02-08 Tom Tromey <tom@tromey.com>
13373
13374 * symtab.c (default_collect_symbol_completion_matches_break_on):
13375 Use unique_xmalloc_ptr.
13376 * macroscope.h: (sal_macro_scope, user_macro_scope)
13377 (default_macro_scope): Return unique_xmalloc_ptr.
13378 * macroscope.c (sal_macro_scope, user_macro_scope)
13379 (default_macro_scope): Return unique_xmalloc_ptr.
13380 * macroexp.h (macro_expand, macro_expand_once): Return
13381 unique_xmalloc_ptr.
13382 * macroexp.c (macro_expand, macro_expand_once): Return
13383 unique_xmalloc_ptr.
13384 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13385 (info_macro_command, info_macros_command): Use
13386 unique_xmalloc_ptr.
13387 * compile/compile-c-support.c (write_macro_definitions): Use
13388 unique_xmalloc_ptr.
13389 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13390
13391 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13392
13393 * value.c (value_static_field): Assign field type instead of
13394 containing type when returning an optimized out value.
13395
13396 2018-02-06 Yao Qi <yao.qi@linaro.org>
13397
13398 * ft32-tdep.c (ft32_read_pc): Remove.
13399 (ft32_write_pc): Remove.
13400 (ft32_gdbarch_init): Update.
13401 * m32r-tdep.c (m32r_read_pc): Remove.
13402 (m32r_gdbarch_init): Update.
13403 * mep-tdep.c (mep_read_pc): Remove.
13404 (mep_gdbarch_init): Update.
13405 * microblaze-tdep.c (microblaze_write_pc): Remove.
13406 (microblaze_gdbarch_init): Update.
13407 * mn10300-tdep.c (mn10300_read_pc): Remove.
13408 (mn10300_write_pc): Remove.
13409 (mn10300_gdbarch_init): Update.
13410 * moxie-tdep.c (moxie_read_pc): Remove.
13411 (moxie_write_pc): Remove.
13412 (moxie_gdbarch_init): Update.
13413
13414 2018-02-06 Yao Qi <yao.qi@linaro.org>
13415
13416 * expprint.c (print_subexp_standard): Handle
13417 OP_F77_UNDETERMINED_ARGLIST.
13418 (dump_subexp_body_standard): Likewise.
13419
13420 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13421
13422 * target-descriptions.c (tdesc_element_visitor) Add empty
13423 implementations.
13424 (tdesc_type): Move make_gdb_type from here.
13425 (tdesc_type_builtin): Likewise.
13426 (tdesc_type_vector): Likewise.
13427 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13428 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13429 (make_gdb_type_union): Likewise.
13430 (make_gdb_type_flags): Likewise.
13431 (make_gdb_type_enum): Likewise.
13432 (make_gdb_type): New function.
13433 (tdesc_register_type): Use static make_gdb_type.
13434
13435 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13436
13437 * infcmd.c (default_print_one_register_info): Align natural-format
13438 column values consistently one under another.
13439 (pad_to_column): New function.
13440
13441 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13442
13443 * dwarf2read.c (dwarf2_physname): Move commment.
13444
13445 2018-02-01 Leszek Swirski <leszeks@google.com>
13446
13447 * varobj.c (varobj_formatted_print_options): Allow recursive
13448 pretty printing if pretty printing is enabled.
13449
13450 2018-02-01 Leszek Swirski <leszeks@google.com>
13451
13452 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13453 names after a structop as a filename.
13454
13455 2018-02-01 Yao Qi <yao.qi@linaro.org>
13456
13457 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13458 (arm_record_coproc_data_proc): Likewise.
13459
13460 2018-02-01 Yao Qi <yao.qi@linaro.org>
13461
13462 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13463
13464 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13465
13466 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13467 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13468
13469 2018-01-31 Pedro Alves <palves@redhat.com>
13470
13471 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13472 * inflow.c (child_terminal_save_inferior): Wrap reference to
13473 tcgetpgrp in HAVE_TERMIOS_H.
13474 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13475 _WIN32.
13476 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13477 always iterate over all inferiors.
13478 (gdbsim_cntrl_c): Adjust.
13479 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13480
13481 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13482
13483 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13484 index type is objfile-owned if the element type is as well.
13485
13486 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13487
13488 GDB 8.1 released.
13489
13490 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13491
13492 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13493 "features/s390x-linux64.c".
13494 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13495 s390_linux32 and s390x_linux64.
13496 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13497 default tdesc.
13498 * s390-tdep.c: Include "features/s390-linux32.c" and
13499 "features/s390x-linux64.c".
13500 (s390_tdesc_valid): Add check for tdesc_has_registers.
13501 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13502 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13503 tdesc_s390x_linux64.
13504 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13505 tdesc_s390x_linux64 to...
13506 * s390-tdep.h: ...here.
13507
13508 2018-01-30 Pedro Alves <palves@redhat.com>
13509
13510 PR gdb/13211
13511 * config.in, configure: Regenerate.
13512 * configure.ac: Check for getpgid.
13513 * go32-nat.c (go32_pass_ctrlc): New.
13514 (go32_target): Install it.
13515 * inf-child.c (inf_child_target): Install
13516 child_terminal_save_inferior, child_pass_ctrlc and
13517 child_interrupt.
13518 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13519 (inf_ptrace_target): No longer install it.
13520 * infcmd.c (interrupt_target_1): Adjust.
13521 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13522 (child_interrupt): Declare.
13523 (inferior::terminal_state): New.
13524 * inflow.c (struct terminal_info): Update comments.
13525 (inferior_process_group): Delete.
13526 (terminal_is_ours): Delete.
13527 (gdb_tty_state): New.
13528 (child_terminal_init): Adjust.
13529 (is_gdb_terminal, sharing_input_terminal_1)
13530 (sharing_input_terminal): New functions.
13531 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13532 Set the process's actual process group in the foreground if
13533 possible. Handle is_ours_for_output/is_ours distinction. Don't
13534 mark terminal as the inferior's if not sharing GDB's terminal.
13535 Don't check attach_flag.
13536 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13537 pass down a target_terminal_state.
13538 (child_terminal_save_inferior): New, factored out from ...
13539 (child_terminal_ours_1): ... this. Handle
13540 target_terminal_state::is_ours_for_output.
13541 (child_interrupt, child_pass_ctrlc): New.
13542 (inflow_inferior_exit): Clear the inferior's terminal_state.
13543 (copy_terminal_info): Copy the inferior's terminal state.
13544 (_initialize_inflow): Remove reference to terminal_is_ours.
13545 * inflow.h (inferior_process_group): Delete.
13546 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13547 * procfs.c (procfs_target): Don't install procfs_interrupt.
13548 (procfs_interrupt): Delete.
13549 * remote.c (remote_serial_quit_handler): Adjust.
13550 (remote_interrupt): Remove ptid parameter. Adjust.
13551 * target-delegates.c: Regenerate.
13552 * target.c: Include "terminal.h".
13553 (target_terminal::terminal_state): Rename to ...
13554 (target_terminal::m_terminal_state): ... this.
13555 (target_terminal::init): Adjust.
13556 (target_terminal::inferior): Adjust to per-inferior
13557 terminal_state.
13558 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13559 (target_terminal::ours, target_terminal::ours_for_output): Use
13560 target_terminal_is_ours_kind.
13561 (target_interrupt): Remove ptid parameter. Adjust.
13562 (default_target_pass_ctrlc): Adjust.
13563 * target.h (target_ops::to_terminal_save_inferior): New field.
13564 (target_ops::to_interrupt): Remove ptid_t parameter.
13565 (target_interrupt): Remove ptid_t parameter. Update comment.
13566 (target_pass_ctrlc): Update comment.
13567 * target/target.h (target_terminal_state): New scoped enum,
13568 factored out of ...
13569 (target_terminal::terminal_state): ... here.
13570 (target_terminal::inferior): Update comments.
13571 (target_terminal::restore_inferior): New.
13572 (target_terminal::is_inferior, target_terminal::is_ours)
13573 (target_terminal::is_ours_for_output): Adjust.
13574 (target_terminal::scoped_restore_terminal_state): Adjust to
13575 rename, and call restore_inferior() instead of inferior().
13576 (target_terminal::scoped_restore_terminal_state::m_state): Change
13577 type.
13578 (target_terminal::terminal_state): Rename to ...
13579 (target_terminal::m_terminal_state): ... this and change type.
13580
13581 2018-01-30 Pedro Alves <palves@redhat.com>
13582
13583 * linux-nat.c (wait_for_signal): New function.
13584 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13585 directly.
13586 (async_terminal_is_ours)
13587 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13588 (linux_nat_add_target): Don't override
13589 to_terminal_inferior/to_terminal_ours.
13590
13591 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13592
13593 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13594
13595 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13596
13597 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13598 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13599 dwarf2_per_objfile_free here.
13600 (dwarf2_per_objfile_free): Remove.
13601 (_initialize_dwarf2_read): Don't register
13602 dwarf2_per_objfile_free as a registry cleanup.
13603
13604 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13605
13606 Avoid compilation errors in MinGW native builds
13607
13608 The error is triggered by including python-internal.h, and the
13609 error message is:
13610
13611 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13612 from build-gnulib/import/math.h:27,
13613 from d:/usr/Python26/include/pyport.h:235,
13614 from d:/usr/Python26/include/Python.h:58,
13615 from python/python-internal.h:94,
13616 from python/py-arch.c:24:
13617 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13618 using ::hypot;
13619 ^~~~~
13620
13621 This happens because Python headers define 'hypot' to expand t
13622 '_hypot' in the Windows builds.
13623 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13624 'hypoth'. This avoids a compilation error.
13625
13626 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13627
13628 * MAINTAINERS (Write After Approval): Fix ordering.
13629
13630 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13631
13632 * MAINTAINERS (Write After Approval): Add Alan Hayward.
13633
13634 2018-01-26 Alan Modra <amodra@gmail.com>
13635
13636 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13637 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13638 Remove nop. Make const. Comment.
13639 (powerpc32_plt_stub_so_2): New.
13640 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13641 Correct count. Update uses.
13642 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13643 Move common code reading PLT entry word. Correct
13644 powerpc32_plt_stub PLT address calculation.
13645 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13646 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13647 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13648 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13649 (ppc64_standard_linkage8): Likewise.
13650 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13651 Correct insns description.
13652 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13653
13654 2018-01-24 Pedro Alves <palves@redhat.com>
13655
13656 GCC PR libstdc++/83906
13657 * gdbtypes.c (operator==(const dynamic_prop &,
13658 const dynamic_prop &)): New.
13659 (operator==(const range_bounds &, const range_bounds &)): New.
13660 (check_types_equal): Use them instead of memcmp.
13661 * gdbtypes.h (operator==(const dynamic_prop &,
13662 const dynamic_prop &)): Declare.
13663 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13664 (operator==(const range_bounds &, const range_bounds &)): Declare.
13665 (operator!=(const range_bounds &, const range_bounds &)): Declare.
13666
13667 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13668
13669 * s390-linux-tdep.c (s390_record_address_mask)
13670 (s390_record_calc_disp_common, s390_record_calc_disp)
13671 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13672 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13673 (s390_process_record): Move to s390-tdep.c.
13674 (s390_linux_init_abi_any): Adjust.
13675 * s390-tdep.c (s390_record_address_mask)
13676 (s390_record_calc_disp_common, s390_record_calc_disp)
13677 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13678 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13679 (s390_process_record): Moved from s390-linux-tdep.c
13680 (s390_gdbarch_init): Adjust.
13681
13682 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13683
13684 * s390-linux-nat.c (s390-tdep.h): New include.
13685 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13686 (HFILES_NO_SRCDIR): Add s390-tdep.h.
13687 (ALLDEPFILES): Add s390-tdep.c.
13688 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13689 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13690 * s390-tdep.h: ...this. New file.
13691 * s390-linux-tdep.c (s390-tdep.h): New include.
13692 (_initialize_s390_tdep): Rename to...
13693 (_initialize_s390_linux_tdep): ...this and adjust.
13694 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13695 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13696 s390-tdep.h.
13697 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13698 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13699 (s390_is_partial_instruction, s390_software_single_step)
13700 (is_non_branch_ril, s390_displaced_step_copy_insn)
13701 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13702 (s390_prologue_data, s390_addr, s390_store, s390_load)
13703 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13704 (s390_register_call_saved, s390_guess_tracepoint_registers)
13705 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13706 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13707 (s390_pseudo_register_name, s390_pseudo_register_type)
13708 (s390_pseudo_register_read, s390_pseudo_register_write)
13709 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13710 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13711 (s390_addr_bits_remove, s390_address_class_type_flags)
13712 (s390_address_class_type_flags_to_name)
13713 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13714 (s390_function_arg_float, s390_function_arg_vector)
13715 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13716 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13717 (s390_frame_align, s390_register_return_value, s390_return_value)
13718 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13719 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13720 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13721 (s390_trad_frame_prev_register, s390_unwind_cache)
13722 (s390_prologue_frame_unwind_cache)
13723 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13724 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13725 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13726 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13727 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13728 (s390_frame_base_address, s390_local_base_address)
13729 (s390_frame_base, s390_gcc_target_options)
13730 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13731 (s390_validate_reg_range, s390_tdesc_valid)
13732 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13733 * s390-tdep.c: ...this. New file.
13734
13735 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13736
13737 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13738 (s390_process_record, s390_gdbarch_tdep_alloc)
13739 (s390_linux_init_abi_any): Use/set new hook.
13740
13741 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13742
13743 * s390-linux-tdep.c (osabi.h): New include.
13744 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13745 (s390_linux_init_abi_any): New functions.
13746 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13747
13748 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13749
13750 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13751 tdesc_has_registers check
13752
13753 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13754
13755 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13756 (s390_validate_reg_range): New macro.
13757 (s390_gdbarch_init): Adjust.
13758
13759 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13760
13761 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13762 (s390_gdbarch_tdep_alloc): Adjust.
13763 (s390_gdbarch_init): Adjust.
13764
13765 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13766
13767 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13768 <have_tdb>: Change type to bool.
13769 (s390_gdbarch_tdep_alloc): Adjust.
13770 (s390_gdbarch_init): Adjust.
13771
13772 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13773
13774 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13775 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13776 (s390_gdbarch_tdep_alloc): New function.
13777 (s390_gdbarch_init): Allocate tdep at start and use its fields
13778 instead of separate variables.
13779
13780 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13781
13782 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13783 when looking for cached gdbarch and add comment for remaining.
13784
13785 2018-01-22 Pedro Alves <palves@redhat.com>
13786 Sergio Durigan Junior <sergiodj@redhat.com>
13787
13788 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13789 case.
13790
13791 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13792
13793 * MAINTAINERS: Update my company e-mail address.
13794
13795 2018-01-22 Yao Qi <yao.qi@linaro.org>
13796
13797 * regcache.c (cooked_write_test): New function.
13798 (_initialize_regcache): Register the test.
13799
13800 2018-01-22 Yao Qi <yao.qi@linaro.org>
13801
13802 * ia64-tdep.c (ia64_pseudo_register_read): Call
13803 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13804 * m32c-tdep.c (m32c_cat_read): Likewise.
13805 (m32c_r3r2r1r0_read): Likewise.
13806 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13807 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13808
13809 2018-01-22 Yao Qi <yao.qi@linaro.org>
13810
13811 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13812 method raw_read instead of regcache_raw_read.
13813 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13814 * arm-tdep.c (arm_neon_quad_read): Likewise.
13815 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13816 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13817 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13818 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13819 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13820 (i386_pseudo_register_read_into_value): Likewise.
13821 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13822 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13823 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13824 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13825 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13826 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13827 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13828 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13829 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13830
13831 2018-01-22 Yao Qi <yao.qi@linaro.org>
13832
13833 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13834 * configure.tgt: Remove target mt.
13835 * mt-tdep.c: Remove.
13836 * regcache.c (cooked_read_test): Remove the check for mt.
13837
13838 2018-01-22 Yao Qi <yao.qi@linaro.org>
13839
13840 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13841 instead of gdbarch_pseudo_register_read_value.
13842
13843 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13844
13845 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13846 language is Ada.
13847
13848 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13849
13850 * linespec.c (create_sals_line_offset): Remove code that preserved
13851 the symtab_and_line's line number.
13852
13853 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13854
13855 * varobj.c (varobj_create): Don't set valid_block when creating a
13856 floating varobj.
13857
13858 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13859
13860 * varobj.c (varobj_create): Remove out of date comment.
13861
13862 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13863
13864 PR mi/20395
13865 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13866 updating innermost block.
13867 * parse.c (innermost_block_tracker::update): Take extra type
13868 parameter, and check types match before updating innermost block.
13869 (write_dollar_variable): Update innermost block for registers.
13870 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13871 (innermost_block_tracker::innermost_block_tracker): Initialise
13872 m_types member.
13873 (innermost_block_tracker::reset): Take type parameter.
13874 (innermost_block_tracker::update): Take type parameter, and pass
13875 type through as needed.
13876 (innermost_block_tracker::m_types): New member.
13877 * varobj.c (varobj_create): Pass type when reseting innermost
13878 block.
13879
13880 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13881
13882 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13883 * ada-lang.c (resolve_subexp): Likewise.
13884 * breakpoint.c (set_breakpoint_condition) Likewise.
13885 (watch_command_1) Likewise.
13886 * c-exp.y (variable): Likewise.
13887 * d-exp.y (PrimaryExpression): Likewise.
13888 * f-exp.y (variable): Likewise.
13889 * go-exp.y (variable): Likewise.
13890 * m2-exp.y (variable): Likewise.
13891 * objfiles.c (objfile::~objfile): Likewise.
13892 * p-exp.y (variable): Likewise.
13893 * parse.c (innermost_block): Change type.
13894 * parser-defs.h (class innermost_block_tracker): New.
13895 (innermost_block): Change to innermost_block_tracker.
13896 * printcmd.c (display_command): Switch to innermost_block API.
13897 (do_one_display): Likewise.
13898 * rust-exp.y (do_one_display): Likewise.
13899 * symfile.c (clear_symtab_users): Likewise.
13900 * varobj.c (varobj_create): Switch to innermost_block API, replace
13901 use of innermost_block with block stored on varobj object.
13902
13903 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13904
13905 * expression.h (innermost_block): Remove declaration.
13906 * varobj.c: Add 'parser-defs.h' include.
13907
13908 2018-01-19 Tom Tromey <tom@tromey.com>
13909
13910 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13911 symbols in the static and global blocks.
13912
13913 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13914
13915 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13916 gdb_ptrace.h, and move including gdb_wait.h ...
13917 * nat/linux-ptrace.h: ... to here.
13918
13919 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13920
13921 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13922 inf_ptrace_detach_success.
13923 (inf_ptrace_detach_success): Add inferior parameter, use it
13924 instead of inferior_ptid, pass it to detach_inferior.
13925 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13926 parameter.
13927 * inferior.c (detach_inferior): Add overload that takes an
13928 inferior object.
13929 * inferior.h (detach_inferior): Likewise.
13930 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13931 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13932 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13933
13934 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13935
13936 * target.h (struct target_ops) <to_detach>: Add inferior
13937 parameter.
13938 (target_detach): Likewise.
13939 * target.c (dispose_inferior): Pass inferior down.
13940 (target_detach): Pass inferior down. Assert that it is equal to
13941 the current inferior.
13942 * aix-thread.c (aix_thread_detach): Pass inferior down.
13943 * corefile.c (core_file_command): Pass current_inferior() down.
13944 * corelow.c (core_detach): Add inferior parameter.
13945 * darwin-nat.c (darwin_detach): Likewise.
13946 * gnu-nat.c (gnu_detach): Likewise.
13947 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13948 * infcmd.c (detach_command): Pass current_inferior() down to
13949 target_detach.
13950 * infrun.c (follow_fork_inferior): Pass parent_inf to
13951 target_detach.
13952 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13953 target_detach.
13954 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13955 * linux-thread-db.c (thread_db_detach): Likewise.
13956 * nto-procfs.c (procfs_detach): Likewise.
13957 * procfs.c (procfs_detach): Likewise.
13958 * record.c (record_detach): Likewise.
13959 * record.h (struct inferior): Forward-declare.
13960 (record_detach): Add inferior parameter.
13961 * remote-sim.c (gdbsim_detach): Likewise.
13962 * remote.c (remote_detach_1): Likewise.
13963 (remote_detach): Likewise.
13964 (extended_remote_detach): Likewise.
13965 * sol-thread.c (sol_thread_detach): Likewise.
13966 * target-debug.h (target_debug_print_inferior_p): New macro.
13967 * target-delegates.c: Re-generate.
13968 * top.c (kill_or_detach): Pass inferior down to target_detach.
13969 * windows-nat.c (windows_detach): Add inferior parameter.
13970
13971 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13972
13973 * target.h (struct target_ops) <to_detach>: Remove args
13974 parameter.
13975 (target_detach): Likewise.
13976 * target.c (dispose_inferior): Adjust.
13977 (target_detach): Remove args parameter, adjust.
13978 * aix-thread.c (aix_thread_detach): Adjust.
13979 * corefile.c (core_file_command): Adjust.
13980 * corelow.c (core_detach): Adjust.
13981 * darwin-nat.c (darwin_detach): Adjust.
13982 * gnu-nat.c (gnu_detach): Adjust.
13983 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13984 * infcmd.c (detach_command): Adjust
13985 * infrun.c (follow_fork_inferior): Adjust.
13986 (handle_vfork_child_exec_or_exit): Adjust.
13987 * linux-fork.c (linux_fork_detach): Remove args parameter.
13988 * linux-fork.h (linux_fork_detach): Likewise.
13989 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13990 * linux-thread-db.c (thread_db_detach): Likewise.
13991 * nto-procfs.c (procfs_detach): Likewise.
13992 * procfs.c (procfs_detach): Likewise.
13993 (do_detach): Remove signo parameter.
13994 * record.c (record_detach): Remove args parameter.
13995 * record.h (record_detach): Likewise.
13996 * remote-sim.c (gdbsim_detach): Likewise.
13997 * remote.c (remote_detach_1): Likewise.
13998 (remote_detach): Likewise.
13999 (extended_remote_detach): Likewise.
14000 * sol-thread.c (sol_thread_detach): Likewise.
14001 * target-delegates.c: Re-generate.
14002 * top.c (struct qt_args) <args>: Remove field.
14003 (kill_or_detach): Don't pass args.
14004 (quit_force): Don't set args.
14005 * windows-nat.c (windows_detach): Remove args parameter.
14006
14007 2018-01-19 Yao Qi <yao.qi@linaro.org>
14008
14009 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14010 (arm_linux_init_abi): Install it.
14011
14012 2018-01-19 Yao Qi <yao.qi@linaro.org>
14013
14014 * osabi.c (gdb_osabi_names): Extend the regexp for
14015 arm-linux-gnueabihf.
14016
14017 2018-01-18 Yao Qi <yao.qi@linaro.org>
14018
14019 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14020 m_abbrevs.
14021 (abbrev_table::add_abbrev): Update.
14022 (abbrev_table::lookup_abbrev): Update.
14023
14024 2018-01-18 Yao Qi <yao.qi@linaro.org>
14025
14026 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14027
14028 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
14029
14030 * compile/compile.c (compile_to_object): Convert "triplet_rx"
14031 to "std::string".
14032
14033 2018-01-17 Tom Tromey <tom@tromey.com>
14034
14035 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
14036
14037 2018-01-17 Tom Tromey <tom@tromey.com>
14038
14039 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14040 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14041 (create_array_type_with_stride): Update.
14042 * dwarf2read.c (set_die_type): Update.
14043
14044 2018-01-17 Tom Tromey <tom@tromey.com>
14045
14046 * dwarf2read.c (delayed_method_info): Remove typedef.
14047 (dwarf2_cu::method_info): Now a std::vector.
14048 (add_to_method_list): Update.
14049 (free_delayed_list): Remove.
14050 (compute_delayed_physnames): Update.
14051 (process_full_comp_unit, process_full_type_unit): Clear the method
14052 list. Remove cleanups.
14053 (psymtab_include_file_name): Add name_holder parameter. Use
14054 unique_xmalloc_ptr.
14055 (dwarf_decode_lines): Update.
14056
14057 2018-01-17 Tom Tromey <tom@tromey.com>
14058 Simon Marchi <simon.marchi@ericsson.com>
14059
14060 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14061 (dwarf2_per_objfile::free_cached_comp_units)
14062 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14063 (init_cutu_and_read_dies_no_follow): Update.
14064 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14065 (dwarf2_cu::~dwarf2_cu): New.
14066 (free_heap_comp_unit, free_stack_comp_unit): Remove.
14067 (age_cached_comp_units, free_one_cached_comp_unit): Update.
14068
14069 2018-01-17 Tom Tromey <tom@tromey.com>
14070 Simon Marchi <simon.marchi@ericsson.com>
14071
14072 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14073 (struct die_reader_specs) <abbrev_table>: New member.
14074 (struct abbrev_table): Add constructor.
14075 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14076 <abbrev_obstack>: Now an auto_obstack.
14077 (abbrev_table_up): New typedef.
14078 (init_cu_die_reader): Add abbrev_table parameter.
14079 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14080 Add result_dwo_abbrev_table.
14081 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14082 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14083 Update.
14084 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14085 parameter.
14086 (skip_children): Update.
14087 (abbrev_table::alloc_abbrev): Rename from
14088 abbrev_table_alloc_abbrev.
14089 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14090 (abbrev_table::lookup_abbrev): Rename from
14091 abbrev_table_lookup_abbrev.
14092 (abbrev_table_read_table): Return abbrev_table_up.
14093 (abbrev_table_free, abbrev_table_free_cleanup)
14094 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14095 (load_partial_dies): Update.
14096
14097 2018-01-17 Tom Tromey <tom@tromey.com>
14098
14099 * dwarf2read.c (dwarf2_compute_name): Update comment.
14100 (read_func_scope, read_variable): Update.
14101 (new_symbol): Remove.
14102 (new_symbol_full): Rename to new_symbol.
14103
14104 2018-01-17 Mike Gulick <mgulick@mathworks.com>
14105
14106 PR gdb/16577
14107 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14108 a warning instead of throwing an error, set section size to 0 and return
14109 NULL.
14110 * gdb_bfd.h (gdb_bfd_map_section): Update description.
14111
14112 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14113
14114 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14115 std::string.
14116 (linux_ptrace_attach_fail_reason_string): Likewise.
14117 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14118 Likewise.
14119 (linux_ptrace_attach_fail_reason_string): Likewise.
14120 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14121
14122 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14123
14124 * linux-nat.c (linux_nat_attach): Remove xstrdup.
14125
14126 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
14127
14128 PR gdb/21559
14129 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14130 checking for fs_base/gs_base fields in struct user_regs_struct.
14131 * configure: Regenerate.
14132
14133 2018-01-17 Yao Qi <yao.qi@linaro.org>
14134
14135 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14136 function.
14137 (aarch64_linux_init_abi): Install it to gdbarch hook
14138 gcc_target_options.
14139
14140 2018-01-15 Pedro Alves <palves@redhat.com>
14141
14142 * common/signals-state-save-restore.c
14143 (save_original_signals_state): Fix typos.
14144
14145 2017-01-12 Tom Tromey <tom@tromey.com>
14146 Sergio Durigan Junior <sergiodj@redhat.com>
14147
14148 * Makefile.in (install-only): Install gdb-add-index.
14149
14150 2018-01-12 John Baldwin <jhb@FreeBSD.org>
14151
14152 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14153
14154 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
14155
14156 * infrun.c (keep_going_pass_signal): Clear step-over info when
14157 insert_breakpoints fails.
14158
14159 2018-01-11 Pedro Alves <palves@redhat.com>
14160
14161 PR gdb/22583
14162 * infrun.c (resume): Rename to ...
14163 (resume_1): ... this.
14164 (resume): Reimplement as wrapper around resume_1.
14165
14166 2018-01-11 Pedro Alves <palves@redhat.com>
14167
14168 PR remote/22597
14169 * remote.c (remote_parse_stop_reply): Default to the last-set
14170 general thread instead of to 'magic_null_ptid'.
14171
14172 2018-01-10 Pedro Alves <palves@redhat.com>
14173
14174 * language.h (language_get_symbol_name_matcher): Rename ...
14175 (get_symbol_name_matcher): ... this.
14176 * language.c (language_get_symbol_name_matcher): Ditto.
14177 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14178 callers adjusted.
14179
14180 2018-01-10 Pedro Alves <palves@redhat.com>
14181
14182 PR gdb/22670
14183 * dwarf2read.c
14184 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14185 Adjust to use language_get_symbol_name_matcher instead of
14186 language_defn::la_get_symbol_name_matcher.
14187 * language.c (language_get_symbol_name_matcher): If in Ada mode
14188 and the lookup name is a verbatim match, return Ada's matcher.
14189 * language.h (language_get_symbol_name_matcher): Adjust comment.
14190 (ada_lookup_name_info::verbatim_p):: New method.
14191
14192 2018-01-10 Pedro Alves <palves@redhat.com>
14193
14194 PR gdb/22670
14195 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14196 minsym's language is language_auto or language_cplus, pass down
14197 language_ada instead.
14198 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14199
14200 2018-01-10 Pedro Alves <palves@redhat.com>
14201
14202 PR gdb/22670
14203 * minsyms.c (linkage_name_str): New function.
14204 (iterate_over_minimal_symbols): Use it.
14205
14206 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14207
14208 * NEWS: Document that 'info proc' now works on FreeBSD.
14209
14210 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14211
14212 * configure.ac: Check for kinfo_getfile in libutil.
14213 * configure: Regenerate.
14214 * config.in: Regenerate.
14215 * fbsd-nat.c: Include "fbsd-tdep.h".
14216 (fbsd_fetch_cmdline): New.
14217 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14218 rather than calling error.
14219 (fbsd_info_proc): New.
14220 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14221 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14222 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14223
14224 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14225
14226 * fbsd-nat.c (struct free_deleter): Remove.
14227 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14228
14229 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14230
14231 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14232 NULL for an empty pathname.
14233
14234 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14235
14236 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14237 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14238 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14239 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14240 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14241 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14242 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14243 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14244 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14245 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14246 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14247 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14248 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14249 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14250 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14251
14252 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14253
14254 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14255 (gnu_xfer_auxv): New function.
14256 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14257 TARGET_OBJECT_AUXV.
14258
14259 2018-01-08 Yao Qi <yao.qi@linaro.org>
14260 Simon Marchi <simon.marchi@ericsson.com>
14261
14262 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14263 common/selftest.c.
14264 (COMMON_OBS): Remove selftest.o.
14265 * configure.ac: Append selftest-arch.c and common/selftest.c to
14266 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14267 * configure: Re-generated.
14268 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14269 GDB_SELF_TEST.
14270 (maintenance_info_selftests): Likewise.
14271
14272 2018-01-08 Xavier Roirand <roirand@adacore.com>
14273
14274 * ada-valprint.c (val_print_packed_array_elements): Use
14275 proper number of elements when printing an array indexed
14276 by an enumeration type.
14277
14278 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14279
14280 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14281 (dw2_get_file_names_reader): Adjust.
14282 (lookup_dwo_signatured_type): Adjust.
14283 (lookup_dwp_signatured_type): Adjust.
14284 (lookup_signatured_type): Adjust.
14285 (create_type_unit_group): Adjust.
14286 (get_type_unit_group): Adjust.
14287 (process_psymtab_comp_unit_reader): Adjust.
14288 (build_type_psymtabs_reader): Adjust.
14289 (scan_partial_symbols): Adjust.
14290 (add_partial_symbol): Adjust.
14291 (add_partial_subprogram): Adjust.
14292 (peek_die_abbrev): Adjust.
14293 (fixup_go_packaging): Adjust.
14294 (process_imported_unit_die): Adjust.
14295 (dwarf2_compute_name): Adjust.
14296 (dwarf2_physname): Adjust.
14297 (read_import_statement): Adjust.
14298 (handle_DW_AT_stmt_list): Adjust.
14299 (read_file_scope): Adjust.
14300 (read_func_scope): Adjust.
14301 (read_lexical_block_scope): Adjust.
14302 (read_call_site_scope): Adjust.
14303 (read_variable): Adjust.
14304 (dwarf2_rnglists_process): Adjust.
14305 (dwarf2_ranges_process): Adjust.
14306 (dwarf2_ranges_read): Adjust.
14307 (dwarf2_get_pc_bounds): Adjust.
14308 (dwarf2_record_block_ranges): Adjust.
14309 (dwarf2_add_field): Adjust.
14310 (dwarf2_add_member_fn): Adjust.
14311 (read_structure_type): Adjust.
14312 (process_structure_scope): Adjust.
14313 (read_enumeration_type): Adjust.
14314 (read_array_type): Adjust.
14315 (mark_common_block_symbol_computed): Adjust.
14316 (read_common_block): Adjust.
14317 (read_namespace_type): Adjust.
14318 (read_namespace): Adjust.
14319 (read_module_type): Adjust.
14320 (read_tag_pointer_type): Adjust.
14321 (read_tag_ptr_to_member_type): Adjust.
14322 (read_tag_string_type): Adjust.
14323 (read_subroutine_type): Adjust.
14324 (read_typedef): Adjust.
14325 (read_base_type): Adjust.
14326 (attr_to_dynamic_prop): Adjust.
14327 (read_subrange_type): Adjust.
14328 (read_unspecified_type): Adjust.
14329 (dwarf2_read_abbrevs): Adjust.
14330 (load_partial_dies): Adjust.
14331 (read_partial_die): Adjust.
14332 (find_partial_die): Adjust.
14333 (guess_partial_die_structure_name): Adjust.
14334 (fixup_partial_die): Adjust.
14335 (read_attribute_value): Adjust.
14336 (read_addr_index): Adjust.
14337 (read_addr_index_from_leb128): Adjust.
14338 (read_str_index): Adjust.
14339 (dwarf2_string_attr): Adjust.
14340 (get_debug_line_section): Adjust.
14341 (dwarf_decode_line_header): Adjust.
14342 (lnp_state_machine::check_line_address): Adjust.
14343 (dwarf_decode_lines_1): Adjust.
14344 (dwarf_decode_lines): Adjust.
14345 (dwarf2_start_symtab): Adjust.
14346 (var_decode_location): Adjust.
14347 (new_symbol_full): Adjust.
14348 (dwarf2_const_value_data): Adjust.
14349 (dwarf2_const_value_attr): Adjust.
14350 (dwarf2_const_value): Adjust.
14351 (die_type): Adjust.
14352 (die_containing_type): Adjust.
14353 (build_error_marker_type): Adjust.
14354 (lookup_die_type): Adjust.
14355 (guess_full_die_structure_name): Adjust.
14356 (anonymous_struct_prefix): Adjust.
14357 (determine_prefix): Adjust.
14358 (dwarf2_name): Adjust.
14359 (follow_die_ref_or_sig): Adjust.
14360 (follow_die_offset): Adjust.
14361 (follow_die_ref): Adjust.
14362 (follow_die_sig_1): Adjust.
14363 (follow_die_sig): Adjust.
14364 (get_signatured_type): Adjust.
14365 (get_DW_AT_signature_type): Adjust.
14366 (decode_locdesc): Adjust.
14367 (dwarf_decode_macros): Adjust.
14368 (cu_debug_loc_section): Adjust.
14369 (fill_in_loclist_baton): Adjust.
14370 (dwarf2_symbol_mark_computed): Adjust.
14371 (init_one_comp_unit): Don't assign
14372 dwarf2_cu::dwarf2_per_objfile.
14373 (set_die_type): Adjust.
14374
14375 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14376
14377 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14378 <dwarf2_per_objfile>: New field.
14379 (dwarf2_per_objfile): Remove global.
14380 (get_dwarf2_per_objfile): New function.
14381 (set_dwarf2_per_objfile): New function.
14382 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14383 dwarf2_per_objfile.
14384 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14385 (read_abbrev_offset): Likewise.
14386 (read_indirect_string): Likewise.
14387 (read_indirect_line_string): Likewise.
14388 (read_indirect_string_at_offset): Likewise.
14389 (read_indirect_string_from_dwz): Likewise.
14390 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14391 dwarf2_per_objfile.
14392 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14393 (create_all_comp_units): Change objfile parameter to
14394 dwarf2_per_objfile.
14395 (create_all_type_units): Likewise.
14396 (process_queue): Add dwarf2_per_objfile parameter.
14397 (read_and_check_comp_unit_head): Likewise.
14398 (lookup_dwo_unit_in_dwp): Likewise.
14399 (get_dwp_file): Likewise.
14400 (process_cu_includes): Likewise.
14401 (struct free_dwo_file_cleanup_data): New struct.
14402 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14403 set_dwarf2_per_objfile.
14404 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14405 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14406 context, adjust calls.
14407 (dw2_instantiate_symtab): Likewise.
14408 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14409 (dw2_get_cu): Likewise.
14410 (create_cu_from_index_list): Change objfile parameter to
14411 dwarf2_per_objfile.
14412 (create_cus_from_index_list): Get dwarf2_per_objfile from
14413 context, adjust calls.
14414 (create_cus_from_index): Likewise.
14415 (create_signatured_type_table_from_index): Change objfile
14416 parameter to dwarf2_per_objfile.
14417 (create_signatured_type_table_from_debug_names): Change objfile
14418 parameter to dwarf2_per_objfile.
14419 (create_addrmap_from_index): Likewise.
14420 (create_addrmap_from_aranges): Likewise.
14421 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14422 (dw2_setup): Remove.
14423 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14424 context.
14425 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14426 get_dwarf2_per_objfile.
14427 (dw2_forget_cached_source_info): Likewise.
14428 (dw2_map_symtabs_matching_filename): Likewise.
14429 (struct dw2_symtab_iterator) <index>: Remove.
14430 <dwarf2_per_objfile>: New field.
14431 (dw2_symtab_iter_init): Replace index parameter with
14432 dwarf2_per_objfile.
14433 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14434 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14435 (dw2_print_stats): Likewise.
14436 (dw2_dump): Likewise.
14437 (dw2_expand_symtabs_for_function): Likewise.
14438 (dw2_expand_all_symtabs): Likewise.
14439 (dw2_expand_symtabs_with_fullname): Likewise.
14440 (dw2_expand_marked_cus): Replace index and objfile parameters
14441 with dwarf2_per_objfile.
14442 (dw_expand_symtabs_matching_file_matcher): Add
14443 dwarf2_per_objfile parameter and adjust calls.
14444 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14445 adjust calls.
14446 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14447 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14448 adjust calls.
14449 (create_cus_from_debug_names_list): Replace objfile parameter
14450 with dwarf2_per_objfile and adjust calls.
14451 (create_cus_from_debug_names): Likewise.
14452 (dwarf2_read_debug_names): Likewise.
14453 (mapped_debug_names::namei_to_name): Adjust call.
14454 (dw2_debug_names_iterator::next): Likewise.
14455 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14456 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14457 (dw2_debug_names_dump): Likewise.
14458 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14459 (dw2_debug_names_expand_symtabs_matching): Likewise.
14460 (dwarf2_initialize_objfile): Likewise.
14461 (dwarf2_build_psymtabs): Likewise.
14462 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14463 this_cu.
14464 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14465 (read_and_check_comp_unit_head): Likewise.
14466 (read_abbrev_offset): Likewise.
14467 (create_debug_type_hash_table): Likewise.
14468 (create_debug_types_hash_table): Likewise.
14469 (create_all_type_units): Replace objfile parameter with
14470 dwarf2_per_objfile.
14471 (add_type_unit): Add dwarf2_per_objfile parameter.
14472 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14473 with dwarf2_per_objfile.
14474 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14475 (lookup_dwp_signatured_type): Likewise.
14476 (lookup_signatured_type): Likewise.
14477 (read_cutu_die_from_dwo): Likewise.
14478 (init_tu_and_read_dwo_dies): Likewise.
14479 (init_cutu_and_read_dies): Likewise.
14480 (init_cutu_and_read_dies_no_follow): Likewise.
14481 (allocate_type_unit_groups_table): Add objfile parameter.
14482 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14483 (get_type_unit_group): Likewise.
14484 (process_psymtab_comp_unit): Update call.
14485 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14486 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14487 (print_tu_stats): Likewise.
14488 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14489 in void* parameter.
14490 (build_type_psymtabs): Change objfile parameter to
14491 dwarf2_per_objfile.
14492 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14493 passed in void* parameter.
14494 (process_skeletonless_type_units): Change objfile parameter to
14495 dwarf2_per_objfile.
14496 (set_partial_user): Likewise.
14497 (dwarf2_build_psymtabs_hard): Likewise.
14498 (read_comp_units_from_section): Likewise.
14499 (create_all_comp_units): Likewise.
14500 (scan_partial_symbols): Update calls.
14501 (add_partial_symbol): Likewise.
14502 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14503 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14504 (process_queue): Add dwarf2_per_objfile parameter.
14505 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14506 (compute_compunit_symtab_includes): Likewise.
14507 (process_cu_includes): Add dwarf2_per_objfile parameter.
14508 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14509 (process_full_type_unit): Likewise.
14510 (process_imported_unit_die): Update call.
14511 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14512 (read_file_scope): Likewise.
14513 (allocate_dwo_file_hash_table): Add objfile parameter.
14514 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14515 (create_cus_hash_table): Likewise.
14516 (create_dwp_hash_table): Likewise.
14517 (create_dwo_unit_in_dwp_v1): Likewise.
14518 (create_dwp_v2_section): Likewise.
14519 (create_dwo_unit_in_dwp_v2): Likewise.
14520 (lookup_dwo_unit_in_dwp): Likewise.
14521 (try_open_dwop_file): Likewise.
14522 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14523 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14524 cleanup to include a reference to dwarf2_per_objfile.
14525 (open_dwp_file): Add dwarf2_per_objfile parameter.
14526 (open_and_init_dwp_file): Likewise.
14527 (get_dwp_file): Likewise.
14528 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14529 (queue_and_load_all_dwo_tus): Update call.
14530 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14531 data.
14532 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14533 (dwarf2_ranges_process): Likewise.
14534 (dwarf2_get_pc_bounds): Likewise.
14535 (mark_common_block_symbol_computed): Likewise.
14536 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14537 (dwarf2_read_abbrevs): Update call.
14538 (read_partial_die): Use dwarf2_per_objfile from cu.
14539 (find_partial_die): Likewise.
14540 (fixup_partial_die): Likewise.
14541 (read_attribute_value): Likewise.
14542 (read_indirect_string_at_offset_from): Add objfile parameter.
14543 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14544 parameter.
14545 (read_indirect_string_from_dwz): Add objfile parameter.
14546 (read_indirect_string): Add objfile parameter.
14547 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14548 (read_addr_index): Use dwarf2_per_objfile from cu.
14549 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14550 call dw2_setup.
14551 (read_str_index): Use dwarf2_per_objfile from cu.
14552 (get_debug_line_section): Likewise.
14553 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14554 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14555 (new_symbol_full): Use dwarf2_per_objfile from cu.
14556 (build_error_marker_type): Likewise.
14557 (lookup_die_type): Likewise.
14558 (determine_prefix): Likewise.
14559 (follow_die_offset): Likewise.
14560 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14561 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14562 (dwarf2_fetch_die_type_sect_off): Likewise.
14563 (dwarf2_get_die_type): Likewise.
14564 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14565 (get_signatured_type): Likewise.
14566 (get_DW_AT_signature_type): Likewise.
14567 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14568 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14569 (cu_debug_loc_section): Likewise.
14570 (fill_in_loclist_baton): Likewise.
14571 (dwarf2_symbol_mark_computed): Likewise.
14572 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14573 dwarf2_per_objfile.
14574 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14575 parameter.
14576 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14577 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14578 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14579 (set_die_type): Use dwarf2_free_objfile from cu.
14580 (get_die_type_at_offset): Likewise.
14581 (dwarf2_per_objfile_free): Don't assign global variable.
14582 (debug_names) <constructor>: Add dwarf2_per_objfile
14583 parameter, update m_debugstrlookup construction.
14584 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14585 parameter.
14586 <m_dwarf2_per_objfile>: New field.
14587 <lookup>: Use m_dwarf2_per_objfile.
14588 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14589 (psyms_seen_size): Likewise.
14590 (write_gdbindex): Replace objfile parameter with
14591 dwarf2_per_objfile.
14592 (write_debug_names): Likewise.
14593 (write_psymtabs_to_index): Likewise.
14594 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14595 calls.
14596
14597 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14598
14599 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14600 <dwarf2_per_objfile>: New field.
14601 (struct dwarf2_per_cu_data) <objfile>: Remove.
14602 <dwarf2_per_objfile>: New field.
14603 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14604 of objfile.
14605 (create_signatured_type_table_from_index): Likewise.
14606 (create_debug_type_hash_table): Likewise.
14607 (fill_in_sig_entry_from_dwo_entry): Likewise.
14608 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14609 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14610 objfile.
14611 (create_partial_symtab): Access objfile through
14612 dwarf2_per_objfile.
14613 (process_psymtab_comp_unit_reader): Likewise.
14614 (read_comp_units_from_section): Likewise.
14615 (scan_partial_symbols): Likewise.
14616 (add_partial_symbol): Likewise.
14617 (add_partial_subprogram): Likewise.
14618 (peek_die_abbrev): Likewise.
14619 (fixup_go_packaging): Likewise.
14620 (process_full_comp_unit): Likewise.
14621 (process_full_type_unit): Likewise.
14622 (process_imported_unit_die): Likewise.
14623 (dwarf2_compute_name): Likewise.
14624 (dwarf2_physname): Likewise.
14625 (read_import_statement): Likewise.
14626 (create_cus_hash_table): Assign dwarf2_physname instead of
14627 objfile.
14628 (read_func_scope): Access objfile through dwarf2_per_objfile.
14629 (read_lexical_block_scope): Likewise.
14630 (read_call_site_scope): Likewise.
14631 (read_variable): Likewise.
14632 (dwarf2_rnglists_process): Likewise.
14633 (dwarf2_ranges_process): Likewise.
14634 (dwarf2_ranges_read): Likewise.
14635 (dwarf2_record_block_ranges): Likewise.
14636 (dwarf2_add_field): Likewise.
14637 (dwarf2_add_member_fn): Likewise.
14638 (read_structure_type): Likewise.
14639 (process_structure_scope): Likewise.
14640 (read_enumeration_type): Likewise.
14641 (read_array_type): Likewise.
14642 (read_common_block): Likewise.
14643 (read_namespace_type): Likewise.
14644 (read_namespace): Likewise.
14645 (read_module_type): Likewise.
14646 (read_tag_pointer_type): Likewise.
14647 (read_tag_ptr_to_member_type): Likewise.
14648 (read_tag_string_type): Likewise.
14649 (read_subroutine_type): Likewise.
14650 (read_typedef): Likewise.
14651 (read_base_type): Likewise.
14652 (attr_to_dynamic_prop): Likewise.
14653 (read_subrange_type): Likewise.
14654 (read_unspecified_type): Likewise.
14655 (load_partial_dies): Likewise.
14656 (read_partial_die): Likewise.
14657 (find_partial_die): Likewise.
14658 (guess_partial_die_structure_name): Likewise.
14659 (fixup_partial_die): Likewise.
14660 (read_attribute_value): Likewise.
14661 (read_addr_index_from_leb128): Likewise.
14662 (dwarf2_read_addr_index): Likewise.
14663 (dwarf2_string_attr): Likewise.
14664 (lnp_state_machine::check_line_address): Likewise.
14665 (dwarf_decode_lines_1): Likewise.
14666 (dwarf_decode_lines): Likewise.
14667 (dwarf2_start_symtab): Likewise.
14668 (var_decode_location): Likewise.
14669 (new_symbol_full): Likewise.
14670 (dwarf2_const_value_data): Likewise.
14671 (dwarf2_const_value_attr): Likewise.
14672 (dwarf2_const_value): Likewise.
14673 (die_type): Likewise.
14674 (die_containing_type): Likewise.
14675 (lookup_die_type): Likewise.
14676 (guess_full_die_structure_name): Likewise.
14677 (anonymous_struct_prefix): Likewise.
14678 (dwarf2_name): Likewise.
14679 (follow_die_ref_or_sig): Likewise.
14680 (follow_die_offset): Likewise.
14681 (follow_die_ref): Likewise.
14682 (dwarf2_fetch_die_loc_sect_off): Likewise.
14683 (dwarf2_fetch_constant_bytes): Likewise.
14684 (dwarf2_fetch_die_type_sect_off): Likewise.
14685 (dwarf2_get_die_type): Likewise.
14686 (follow_die_sig): Likewise.
14687 (decode_locdesc): Likewise.
14688 (dwarf2_per_cu_objfile): Likewise.
14689 (dwarf2_per_cu_text_offset): Likewise.
14690 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14691 objfile.
14692 (set_die_type): Access objfile through
14693 dwarf2_per_objfile.
14694
14695 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14696
14697 * valprint.c (converted_character_d): Remove typedef.
14698 (DEF_VEC_O (converted_character_d)): Remove.
14699 (count_next_character): Use std::vector.
14700 (print_converted_chars_to_obstack): Likewise.
14701 (generic_printstr): Likewise.
14702
14703 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14704
14705 * xml-support.h (struct gdb_xml_value): Add constructor.
14706 <value>: Change type to unique_xmalloc_ptr.
14707 (gdb_xml_value_s): Remove typedef.
14708 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14709 (gdb_xml_element_start_handler): Change parameter type to
14710 std::vector.
14711 (xml_find_attribute): Likewise.
14712 * xml-support.c (xml_find_attribute): Change parameter type to
14713 std::vector and adjust.
14714 (gdb_xml_values_cleanup): Remove.
14715 (gdb_xml_parser::start_element): Adjust to std::vector.
14716 (xinclude_start_include): Change paraeter type to std::vector
14717 and adjust.
14718 * btrace.c (check_xml_btrace_version): Likewise.
14719 (parse_xml_btrace_block): Likewise.
14720 (parse_xml_btrace_pt_config_cpu): Likewise.
14721 (parse_xml_btrace_pt): Likewise.
14722 (parse_xml_btrace_conf_bts): Likewise.
14723 (parse_xml_btrace_conf_pt): Likewise.
14724 * memory-map.c (memory_map_start_memory): Likewise.
14725 (memory_map_start_property): Likewise.
14726 * osdata.c (osdata_start_osdata): Likewise.
14727 (osdata_start_item): Likewise.
14728 (osdata_start_column): Likewise.
14729 * remote.c (start_thread): Likewise.
14730 * solib-aix.c (library_list_start_library): Likewise.
14731 (library_list_start_list): Likewise.
14732 * solib-svr4.c (library_list_start_library): Likewise.
14733 (svr4_library_list_start_list): Likewise.
14734 * solib-target.c (library_list_start_segment): Likewise.
14735 (library_list_start_section): Likewise.
14736 (library_list_start_library): Likewise.
14737 (library_list_start_list): Likewise.
14738 * tracepoint.c (traceframe_info_start_memory): Likewise.
14739 (traceframe_info_start_tvar): Likewise.
14740 * xml-syscall.c (syscall_start_syscall): Likewise.
14741 * xml-tdesc.c (tdesc_start_target): Likewise.
14742 (tdesc_start_feature): Likewise.
14743 (tdesc_start_reg): Likewise.
14744 (tdesc_start_union): Likewise.
14745 (tdesc_start_struct): Likewise.
14746 (tdesc_start_flags): Likewise.
14747 (tdesc_start_enum): Likewise.
14748 (tdesc_start_field): Likewise.
14749 (tdesc_start_enum_value): Likewise.
14750 (tdesc_start_vector): Likewise.
14751
14752 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14753
14754 * extension.h (struct xmethod_worker) <clone>: Remove.
14755 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14756 Remove.
14757 (python_xmethod_worker::clone): Remove.
14758 * valops.c (find_overload_match): Use std::move instead of
14759 clone.
14760
14761 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14762
14763 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14764 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14765 <free_xmethod_worker_data>: Remove.
14766 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14767 <get_xmethod_arg_types>: Remove.
14768 <get_xmethod_result_type>: Remove.
14769 <invoke_xmethod>: Remove.
14770 * extension.c (new_xmethod_worker): Remove.
14771 (clone_xmethod_worker): Remove.
14772 (get_matching_xmethod_workers): Return void, pass std::vector by
14773 pointer.
14774 (get_xmethod_arg_types): Rename to...
14775 (xmethod_worker::get_arg_types): ... this, and adjust.
14776 (get_xmethod_result_type): Rename to...
14777 (xmethod_worker::get_result_type): ... this, and adjust.
14778 (invoke_xmethod): Remove.
14779 (free_xmethod_worker): Remove.
14780 (free_xmethod_worker_vec): Remove.
14781 * extension.h (enum ext_lang_rc): Move here from
14782 extension-priv.h.
14783 (struct xmethod_worker): Add constructor and destructor.
14784 <data>: Remove.
14785 <value>: Remove.
14786 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14787 virtual pure methods.
14788 <get_arg_types, get_result_type>: New methods.
14789 (xmethod_worker_ptr): Remove typedef.
14790 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14791 (xmethod_worker_vec): Remove typedef.
14792 (xmethod_worker_up): New typedef.
14793 (invoke_xmethod): Remove.
14794 (clone_xmethod_worker): Remove.
14795 (free_xmethod_worker): Remove.
14796 (free_xmethod_worker_vec): Remove.
14797 (get_xmethod_arg_types): Remove.
14798 (get_xmethod_result_type): Remove.
14799 * valops.c (find_method_list): Use std::vector, don't use
14800 intermediate vector.
14801 (value_find_oload_method_list): Use std::vector.
14802 (find_overload_match): Use std::vector.
14803 (find_oload_champ): Use std::vector.
14804 * value.c (value_free): Use operator delete.
14805 (value_of_xmethod): Rename to...
14806 (value_from_xmethod): ... this. Don't assign
14807 xmethod_worker::value, take rvalue-reference.
14808 (result_type_of_xmethod): Adjust.
14809 (call_xmethod): Adjust.
14810 * value.h: Include extension.h.
14811 (struct xmethod_worker): Don't forward-declare.
14812 (value_of_xmethod): Rename to...
14813 (value_from_xmethod): ... this, take rvalue-reference.
14814 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14815 (struct python_xmethod_worker): ... this, add constructor and
14816 destructor.
14817 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14818 (gdbpy_free_xmethod_worker_data): Rename to...
14819 (python_xmethod_worker::~python_xmethod_worker): ... this and
14820 adjust.
14821 (gdbpy_clone_xmethod_worker_data): Rename to...
14822 (python_xmethod_worker::clone): ... this and adjust.
14823 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14824 temporary vector.
14825 (gdbpy_get_xmethod_arg_types): Rename to...
14826 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14827 (gdbpy_get_xmethod_result_type): Rename to...
14828 (python_xmethod_worker::do_get_result_type): ... this and
14829 adjust.
14830 (gdbpy_invoke_xmethod): Rename to...
14831 (python_xmethod_worker::invoke): ... this and adjust.
14832 (new_python_xmethod_worker): Rename to...
14833 (python_xmethod_worker::python_xmethod_worker): ... this and
14834 adjust.
14835 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14836 Remove.
14837 (gdbpy_free_xmethod_worker_data): Remove.
14838 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14839 (gdbpy_get_xmethod_arg_types): Remove.
14840 (gdbpy_get_xmethod_result_type): Remove.
14841 (gdbpy_invoke_xmethod): Remove.
14842 * python/python.c (python_extension_ops): Remove obsolete
14843 callbacks.
14844
14845 2018-01-05 Pedro Alves <palves@redhat.com>
14846
14847 PR gdb/18653
14848 * common/signals-state-save-restore.c
14849 (save_original_signals_state): New parameter 'quiet'. Warn if we
14850 find a custom handler preinstalled, instead of internal erroring.
14851 But only warn if !quiet.
14852 * common/signals-state-save-restore.h
14853 (save_original_signals_state): New parameter 'quiet'.
14854 * main.c (captured_main_1): Move save_original_signals_state call
14855 after option handling, and pass QUIET.
14856
14857 2018-01-05 Pedro Alves <palves@redhat.com>
14858
14859 * spu-tdep.c (spu_catch_start): Pass
14860 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14861
14862 2018-01-05 Pedro Alves <palves@redhat.com>
14863
14864 PR gdb/22670
14865 * ada-lang.c (literal_symbol_name_matcher): New function.
14866 (ada_get_symbol_name_matcher): Use it for
14867 symbol_name_match_type::SEARCH_NAME.
14868 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14869 it down instead of assuming symbol_name_match_type::FULL.
14870 * block.h (block_lookup_symbol): New parameter 'match_type'.
14871 * c-valprint.c (print_unpacked_pointer): Use
14872 lookup_symbol_search_name instead of lookup_symbol.
14873 * compile/compile-object-load.c (get_out_value_type): Pass down
14874 symbol_name_match_type::SEARCH_NAME.
14875 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14876 symbol_name_match_type::FULL.
14877 * cp-support.c (cp_get_symbol_name_matcher): Handle
14878 symbol_name_match_type::SEARCH_NAME.
14879 * infrun.c (insert_exception_resume_breakpoint): Use
14880 lookup_symbol_search_name.
14881 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14882 * psymtab.c (maintenance_check_psymtabs): Use
14883 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14884 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14885 SYMBOL_SEARCH_NAME.
14886 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14887 if symbol_name_match_type::SEARCH_NAME.
14888 (lookup_symbol_in_language): Pass down
14889 symbol_name_match_type::FULL.
14890 (lookup_symbol_search_name): New.
14891 (lookup_language_this): Pass down
14892 symbol_name_match_type::SEARCH_NAME.
14893 (lookup_symbol_aux, lookup_local_symbol): New parameter
14894 'match_type'. Pass it down.
14895 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14896 (lookup_symbol_search_name): New declaration.
14897 (lookup_symbol_in_block): New 'match_type' parameter.
14898
14899 2018-01-05 Pedro Alves <palves@redhat.com>
14900
14901 PR gdb/22670
14902 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14903 ada_lookup_symbol.
14904 (ada_lookup_symbol): Reimplement in terms of
14905 ada_lookup_symbol_list, bits factored out from
14906 ada_lookup_encoded_symbol.
14907
14908 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14909
14910 * ada-exp.y (write_object_renaming): When subscripting an array
14911 using a symbol as the index, pass the block in call to
14912 ada_lookup_encoded_symbol when looking that symbol up.
14913
14914 2018-01-05 Jerome Guitton <guitton@adacore.com>
14915
14916 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14917 TYPE_INDEX_TYPE.
14918
14919 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14920
14921 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14922 the case where VALUE_LVAL (val0) is not lval_memory.
14923
14924 2018-01-05 Xavier Roirand <roirand@adacore.com>
14925
14926 * ada-valprint.c (print_optional_low_bound): Handle
14927 character-indexed array printing like boolean-indexed array
14928 printing.
14929
14930 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14931
14932 * NEWS: Create a new section for the next release branch.
14933 Rename the section of the current branch, now that it has
14934 been cut.
14935
14936 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14937
14938 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14939 * version.in: Bump version to 8.1.50.DATE-git.
14940
14941 2018-01-03 Xavier Roirand <roirand@adacore.com>
14942
14943 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14944 Add field.
14945 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14946 Add field.
14947 (default_exception_support_info) <catch_handlers_sym>: Add field.
14948 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14949 (ada_exception_name_addr_1): Add "catch handlers" handling.
14950 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14951 Update all callers.
14952 (create_excep_cond_exprs) <ex>: Add parameter.
14953 (re_set_exception): Update create_excep_cond_exprs call.
14954 (print_it_exception, print_one_exception, print_mention_exception)
14955 (print_recreate_exception): Add "catch handler" handling.
14956 (allocate_location_catch_handlers, re_set_catch_handlers)
14957 (check_status_catch_handlers, print_it_catch_handlers)
14958 (print_one_catch_handlers, print_mention_catch_handlers)
14959 (print_recreate_catch_handlers): New function.
14960 (catch_handlers_breakpoint_ops): New variable.
14961 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14962 Add parameter. Add "catch handler" handling.
14963 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14964 Add "catch handler" handling.
14965 (ada_exception_catchpoint_cond_string): Add "catch handler"
14966 handling.
14967 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14968 call.
14969 (catch_ada_handlers_command): New function.
14970 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14971 operations structure.
14972 (_initialize_ada_language): Add "catch handlers" command entry.
14973 * NEWS: Document "catch handlers" feature.
14974
14975 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14976
14977 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14978 account when creating the array type of the slice.
14979 (ada_value_slice): Likewise.
14980
14981 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14982
14983 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14984 New enum value.
14985 (create_array_type_with_stride): Add byte_stride_prop parameter.
14986 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14987 New parameter. Update all callers in this file.
14988 (array_type_has_dynamic_stride): New function.
14989 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14990 of arrays with dynamic byte strides.
14991 * dwarf2read.c (read_array_type): Add support for dynamic
14992 DW_AT_byte_stride attributes.
14993
14994 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14995
14996 * dwarf2read.c (read_unspecified_type): Treat
14997 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14998
14999 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15000
15001 Update copyright year range in all GDB files.
15002
15003 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
15004
15005 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15006 and gdb/testsuite/gdb.base/step-line.c.
15007
15008 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15009
15010 * copyright.py (main): Dump the contents of
15011 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15012 even if BY_HAND is empty.
15013
15014 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15015
15016 * top.c (print_gdb_version): Update Copyright year in version
15017 message.
15018
15019 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15020
15021 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15022
15023 For older changes see ChangeLog-2017.
15024 \f
15025 Local Variables:
15026 mode: change-log
15027 left-margin: 8
15028 fill-column: 74
15029 version-control: never
15030 coding: utf-8
15031 End:
This page took 0.356162 seconds and 4 git commands to generate.