Introduce find_function_entry_range_from_pc and use it in infrun.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2
3 * block.h (blockrange, blockranges): New struct declarations.
4 (struct block): Add new field named `ranges'.
5 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
6 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
7 macros for accessing ranges in struct block.
8 (make_blockranges): New declaration.
9 block.c (make_blockranges): New function.
10 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
11 for block.
12 * symtab.h (find_pc_partial_function): Add new parameter `block'.
13 * blockframe.c (cache_pc_function_block): New static global.
14 (clear_pc_function_cache): Clear cache_pc_function_block.
15 (find_pc_partial_function): Move comment to symtab.h. Add
16 support for non-contiguous blocks.
17 * cli/cli-cmds.c (block.h): Include.
18 (print_disassembly): Handle printing of non-contiguous blocks.
19 (disassemble_current_function): Likewise.
20 (disassemble_command): Likewise.
21
22 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
23 BLOCK_START.
24 * blockframe.c (get_pc_function_start): Likewise.
25 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
26 (gcc_symbol_address): Likewise.
27 * compile/compile-object-run.c (compile_object_run): Likewise.
28 * compile/compile.c (get_expr_block_and_pc): Likewise.
29 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
30 (func_addr_to_tail_call_list): Likewise.
31 * findvar.c (default_read_var_value): Likewise.
32 * inline-frame.c (inline_frame_this_id): Likewise.
33 (skip-inline_frames): Likewise.
34 * infcmd.c (until_next_command): Likewise.
35 * linespec.c (convert_linespec_to_sals): Likewise.
36 * parse.c (parse_exp_in_context_1): Likewise.
37 * printcmd.c (build_address_symbolic): likewise.
38 (info_address_command): Likewise.
39 symtab.c (find_function_start_sal): Likewise.
40 (skip_prologue_sal): Likewise.
41 (find_function_alias_target): Likewise.
42 (find_gnu_ifunc): Likewise.
43 * stack.c (find_frame_funname): Likewise.
44 * symtab.c (fixup_symbol_section): Likewise.
45 (find_function_start_sal): Likewise.
46 (skip_prologue_sal): Likewsie.
47 (find_function_alias_target): Likewise.
48 (find_gnu_ifunc): Likewise.
49 * tracepoint.c (info_scope_command): Likewise.
50 * value.c (value_fn_field): Likewise.
51
52 2018-08-23 Xavier Roirand <roirand@adacore.com>
53
54 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
55 incrementation.
56
57 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
58
59 * solib-svr4.c (read_program_headers_from_bfd): Return
60 gdb::optional<gdb::byte_vector>.
61 (svr4_exec_displacement): Adjust.
62
63 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
64
65 * solib-svr4.c (read_program_header): Return
66 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
67 (find_program_interpreter): Return
68 gdb::optional<gdb::byte_vector>.
69 (scan_dyntag_auxv): Adjust.
70 (enable_break): Adjust.
71 (svr4_exec_displacement): Adjust.
72
73 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
74
75 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
76 * inf-child.c (inf_child_target::terminal_save_inferior): New.
77
78 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
79
80 * guile/scm-string.c (gdbscm_scm_from_printf): Use
81 string_vprintf.
82 * guile/scm-utils.c (gdbscm_printf): Likewise.
83 * serial.c (serial_printf): Likewise.
84 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
85
86 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
87
88 * stack.c (print_frame): Print frame architecture when printing on
89 an MI output.
90 * NEWS: Mention new "arch" attribute in frame output.
91
92 2018-08-21 Alan Hayward <alan.hayward@arm.com>
93
94 * arch/aarch64.h (aarch64_regnum): Update comment.
95
96 2018-08-21 Alan Hayward <alan.hayward@arm.com>
97
98 * NEWS: Add SVE to 8.2 section.
99
100 2018-08-21 Pedro Alves <palves@redhat.com>
101
102 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
103 out from gdbscm_parse_function_args.
104 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
105 gdbscm_parse_function_args_1.
106
107 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
108
109 PR gdb/17816
110 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
111 operator.
112
113 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
114
115 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
116
117 2018-08-19 Michael Spang <spang@google.com>
118
119 PR gdb/11786
120 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
121 for PT_TLS segments.
122
123 2018-08-18 Kevin Buettner <kevinb@redhat.com>
124
125 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
126 dwarf_variable_value.
127 * dwarf2-frame.c (class dwarf_expr_executor):
128 Add override for dwarf_variable_value.
129 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
130 (class symbol_needs_eval_context): Likewise.
131 (indirect_synthetic_pointer): Add forward declaration.
132 (sect_variable_value): New function.
133 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
134 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
135 for DW_OP_GNU_variable_value.
136
137 2018-08-16 Tom Tromey <tom@tromey.com>
138
139 * top.c (read_command_file): Update.
140 (command_line_input): Remove "repeat" argument.
141 * ada-lang.c (get_selections): Update.
142 * linespec.c (decode_line_2): Update.
143 * defs.h (command_line_input): Remove argument.
144 * cli/cli-script.c (read_next_line): Update.
145 * python/py-gdb-readline.c: Update.
146
147 2018-08-17 Tom Tromey <tom@tromey.com>
148
149 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
150 command_line_input.
151
152 2018-08-15 Tom Tromey <tom@tromey.com>
153
154 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
155
156 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
157
158 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
159 If used, use find_pc_partial_function to find address range
160 to disassemble.
161 * mi/mi-main.c (mi_cmd_list_features): Report
162 "data-disassemble-a-option" feature.
163 * NEWS: Mention new -data-disassemble option -a.
164
165 2018-08-13 Tom Tromey <tom@tromey.com>
166
167 * common/common-defs.h (_FORTIFY_SOURCE): Define.
168
169 2018-08-13 Alan Hayward <alan.hayward@arm.com>
170
171 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
172 (aarch64_linux_collect_sve_regset): Likewise.
173 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
174 * regcache.h (regcache_map_entry_size): New function.
175
176 2018-08-13 Alan Hayward <alan.hayward@arm.com>
177
178 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
179 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
180 (SVE_HEADER_VL_LENGTH): Likewise.
181 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
182 (SVE_HEADER_FLAGS_LENGTH): Likewise.
183 (SVE_HEADER_RESERVED_LENGTH): Likewise.
184 (SVE_HEADER_SIZE_OFFSET): Likewise.
185 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
186 (SVE_HEADER_VL_OFFSET): Likewise.
187 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
188 (SVE_HEADER_FLAGS_OFFSET): Likewise.
189 (SVE_HEADER_RESERVED_OFFSET): Likewise.
190 (SVE_HEADER_SIZE): Likewise.
191 (aarch64_linux_core_read_vq): Add function.
192 (aarch64_linux_core_read_description): Check for SVE section.
193
194 2018-08-13 Alan Hayward <alan.hayward@arm.com>
195
196 * aarch64-fbsd-tdep.c
197 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
198 collect_size.
199 * aarch64-linux-tdep.c
200 (aarch64_linux_iterate_over_regset_sections): Likewise.
201 * alpha-linux-tdep.c
202 (alpha_linux_iterate_over_regset_sections):
203 * alpha-nbsd-tdep.c
204 (alphanbsd_iterate_over_regset_sections): Likewise.
205 * amd64-fbsd-tdep.c
206 (amd64fbsd_iterate_over_regset_sections): Likewise.
207 * amd64-linux-tdep.c
208 (amd64_linux_iterate_over_regset_sections): Likewise.
209 * arm-bsd-tdep.c
210 (armbsd_iterate_over_regset_sections): Likewise.
211 * arm-fbsd-tdep.c
212 (arm_fbsd_iterate_over_regset_sections): Likewise.
213 * arm-linux-tdep.c
214 (arm_linux_iterate_over_regset_sections): Likewise.
215 * corelow.c (get_core_registers_cb): Likewise.
216 (core_target::fetch_registers): Likewise.
217 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
218 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
219 * gdbarch.h (void): Regenerate.
220 * gdbarch.sh: Add supply_size and collect_size.
221 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
222 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
223 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
224 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
225 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
226 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
227 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
228 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
229 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
230 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
231 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
232 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
233 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
234 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
235 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
236 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
237 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
238 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
239 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
240 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
241 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
242 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
243 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
244 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
245 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
246 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
247 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
248 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
249 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
250 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
251
252 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
253
254 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
255 with string_printf.
256
257 2018-08-10 Keith Seitz <keiths@redhat.com>
258
259 * compile/compile-c-support.c (add_code_header, add_code_footer):
260 Move into policy class.
261 (c_push_user_expression, pop_user_expression_nop)
262 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
263 (compile_program): New host class.
264 (c_compile_program): New typedef.
265 (c_compute_porgram): Use c_compile_program.
266
267 2018-08-10 Keith Seitz <keiths@redhat.com>
268
269 * compile/compile-internal.h (compile_instance::~compile_instance):
270 Remove calls to htab_delete.
271 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
272 * compile.c (compile_instance::compile_instance): Initialize
273 htab unique pointers.
274 (compile_instance::get_cached_type, compile_instance::insert_type)
275 (compile_instance::error_symbol_once): Update for unique_ptr.
276
277 2018-08-10 Keith Seitz <keiths@redhat.com>
278
279 * compile/compile-c-symbols.c (struct symbol_error)
280 (hash_symbol_error, eq_symbol_error, del_symbol_error)
281 (compile_instance::insert_symbol_error)
282 (compile_instance::error_symbol_once): Move to ...
283 * compile/compile.c: ... here.
284
285 2018-08-10 Keith Seitz <keiths@redhat.com>
286
287 * compile/compile-c-support.c (c_get_compile_context): Use `new'
288 instead of `new_compile_instance'.
289 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
290 Update description.
291 If the symbol error map is not initialized, create it.
292 (generate_c_for_for_one_symbol): Do not check/initialize
293 the symbol error map.
294 * compile/compile-c-types.c (compile_c_instance): Make a class.
295 Update all callers.
296 (compile_instance::compile_instance): Initialize the type cache.
297 (get_cached_type): New function.
298 (insert_type): Update description.
299 (compile_c_instance::m_default_cflags): Define.
300 (convert_type): Update description. Use get_cached_type.
301 (delete_instance): Moved to destructor.
302 (new_compile_instance): Moved to constructor.
303 * compile/compile-c.h (compile_c_instance): Make class inheriting
304 from compile_instance.
305 <base>: Remove field.
306 <type_map, symbol_err_map>: Move to base class.
307 <c_plugin>: Rename to `m_plugin' and remove pointer type.
308 * compile/compile-internal.h (compile_instance): Make class.
309 <type_map_t, symbol_err_map_t>: Define.
310 <fe>: Rename to `m_gcc_fe'.
311 <scope, block, gcc_target_options>: Add `m_' prefix.
312 <m_type_map, m_symbol_err_map>: New fields, moved from
313 compile_c_instance.
314 <destroy>: Remove.
315 (convert_type, new_compile_instance): Remove.
316 * compile/compile.c (cleanup_compile_instance): Remove.
317 (compile_to_object): Use unique_ptr to eliminate cleanups.
318 (compile_instance::set_print_callback, compile_instance::version)
319 (compile_instance::set_verbose)
320 (compile_instance::set_driver_filename)
321 (compile_instance::set_triplet_regexp)
322 (compile_instance::set_arguments)
323 (compile_instance::set_source_file)
324 (compile_instance::compile): Define.
325
326 2018-08-10 Keith Seitz <keiths@redhat.com>
327
328 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
329 * compile/compile-c-types.c: Define GCC_METHODN macros and include
330 gcc-c-fe.def to define C plugin.
331 (delete_instance): Delete `c_plugin'.
332 (new_compile_instance): Initialize `c_plugin'.
333 * compile/compile-c.h: Include gcc_c_plugin.h.
334 (struct compile_c_instance) <c_plugin>: New member.
335 * gcc-c-plugin.h: New file.
336 Update all callers with API change.
337
338 2018-08-10 Keith Seitz <keiths@redhat.com>
339
340 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
341 (HFILES_NO_SRCDIR): ... to here.
342 Add compile-internal.h and compile-c.h.
343 * compile/compile-c-support.c: Include compile-c.h.
344 * compile/compile-c-symbols.c: Include compile-c.h.
345 (generate_c_for_variable_locations): Update comment.
346 * compile/compile-c-types.c: Include compile-c.h.
347 * compile/compile-c.h: New file -- moved C language declarations
348 from other files here.
349 * compile/compile-internal.h: Do not include hashtab.h or
350 common/enum-flags.h.
351 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
352 (gcc_convert_symbol, gcc_symbol_address)
353 (generate_c_for_variable_locations, c_get_mode_for_size)
354 (c_get_range_decl_name): Definitions moved to compile-c.h.
355 * compile/compile-loc2c.c: Include compile-c.h.
356
357 2018-08-10 Keith Seitz <keiths@redhat.com>
358
359 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
360 (c_symbol_substitution_name): ... this.
361 Update all callers.
362
363 2018-08-10 Keith Seitz <keiths@redhat.com>
364
365 * compile/compile-c-support.c (c_compute_program): Use
366 unique_xmalloc_ptr to eliminate cleanup.
367 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
368 Return a unique_xmalloc_ptr and eliminate cleanup.
369 * compile/compile-internal.h (generate_c_for_variable_locations):
370 Return unique_xmalloc_ptr and update description.
371
372 2018-08-10 Alan Hayward <alan.hayward@arm.com>
373
374 * corelow.c (core_target::get_core_register_section): Rename
375 min_size to section_min_size.
376
377 2018-08-09 Jim Wilson <jimw@sifive.com>
378
379 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
380 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
381 * NEWS: Mention new GNU/Linux RISC-V target.
382 * configure.host: Add riscv*-*-linux*.
383 * configure.nat: Add riscv*.
384 * configure.tgt: Add riscv*-*-linux*.
385 * riscv-linux-nat.c: New file.
386 * riscv-linux-tdep.c: New file.
387
388 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
389
390 * infrun.c (resume): Make static, add forward declaration.
391 (proceed): Update header comment.
392 * infrun.h (resume): Delete declaration.
393
394 2018-08-09 Tom Tromey <tom@tromey.com>
395
396 * riscv-tdep.h: Minor formatting fixes.
397
398 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
399
400 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
401 * dwarf-index-cache.c (create_dir_and_check): Likewise.
402 (test_mkdir_recursive): Likewise.
403 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
404
405 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
406
407 * valarith.c (value_subscripted_rvalue): If an array is not in
408 memory, and we don't know the upper bound, then we can't know that
409 the requested element exists or not.
410
411 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
412
413 * target.c (str_comma_list_concat_elem): Fix typo in comment.
414 (target_options_to_string): Add comment.
415
416 2018-08-08 Tom Tromey <tom@tromey.com>
417
418 * unittests/scoped_mmap-selftests.c: Check result of "write".
419
420 2018-08-08 Jim Wilson <jimw@sifive.com>
421
422 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
423 (decode_register_index_short): New.
424 (decode_j_type_insn, decode_cj_type_insn): New.
425 (decode_b_type_insn, decode_cb_type_insn): New.
426 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
427 local xlen. Check xlen when decoding ambiguous compressed insns. In
428 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
429 is_c_sw_insn instead of is_sw_insn.
430 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
431 (riscv_software_single_step): New.
432 * riscv-tdep.h (riscv_software_single_step): Declare.
433
434 * riscv-tdep.c (riscv_isa_xlen): Drop static.
435 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
436
437 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
438
439 PR gdb/18050:
440 * target.c (dispose_inferior): Don't dispose of inferiors that are
441 already killed.
442
443 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
444
445 * remote.c (remote_target::download_tracepoint): Change char* to
446 const char*.
447
448 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
449
450 * target.h (target_options_to_string): Return an std::string.
451 * target.c (str_comma_list_concat_elem): Return void, use
452 std::string.
453 (do_option): Likewise.
454 (target_options_to_string): Return an std::string.
455 * linux-nat.c (linux_nat_target::wait): Adjust.
456 * target-debug.h (target_debug_print_options): Adjust.
457
458 2018-08-07 Tom Tromey <tom@tromey.com>
459
460 * Makefile.in (CPPFLAGS): New variable.
461 (INTERNAL_CPPFLAGS): Use it.
462
463 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
464
465 * NEWS: Mention the index cache.
466
467 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
468
469 * common/pathstuff.h (get_standard_cache_dir): New.
470 * common/pathstuff.c (get_standard_cache_dir): New.
471 * build-id.h (build_id_to_string): New.
472 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
473 DEBUG_STR_SUFFIX): Move to here.
474 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
475 DEBUG_STR_SUFFIX): Move from there.
476 (write_psymtabs_to_index): Make non-static, add basename
477 parameter. Write to temporary files, rename when done.
478 (save_gdb_index_command): Adjust call to
479 write_psymtabs_to_index.
480 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
481 field.
482 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
483 (get_gdb_index_contents_from_cache): New.
484 (get_gdb_index_contents_from_cache_dwz): New.
485 (dwarf2_initialize_objfile): Read index from cache.
486 (dwarf2_build_psymtabs): Save to index.
487 * dwarf-index-cache.h: New file.
488 * dwarf-index-cache.c: New file.
489 * dwarf-index-write.h: New file.
490
491 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
492
493 * gnulib/aclocal.m4: Re-generate.
494 * gnulib/config.in: Re-generate.
495 * gnulib/configure: Re-generate.
496 * gnulib/import/Makefile.am: Re-generate.
497 * gnulib/import/Makefile.in: Re-generate.
498 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
499 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
500 * gnulib/import/m4/mkdir.m4: New file.
501 * gnulib/import/mkdir.c: New file.
502 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
503 module.
504
505 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
506
507 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
508 * common/scoped_mmap.c: New file.
509 * common/scoped_mmap.h (destroy): New method.
510 (~scoped_mmap, reset): Use destroy.
511 (scoped_mmap): New move constructor.
512 (mmap_file): New declaration.
513 * unittests/scoped_mmap-selftests.c (test_normal,
514 test_invalid_filename, run_tests): New functions.
515 (_initialize_scoped_mmap_selftests): Register selftest.
516
517 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
518
519 * dwarf2read.c (read_gdb_index_from_section): Rename to...
520 (read_gdb_index_from_buffer): ... this. Remove section
521 parameter, add buffer parameter.
522 (get_gdb_index_contents_ftype,
523 get_gdb_index_contents_dwz_ftype): New typedefs.
524 (dwarf2_read_gdb_index): Add callback parameters to get the
525 index contents.
526 (get_gdb_index_contents_from_section): New.
527 (dwarf2_initialize_objfile): Update call to
528 dwarf2_read_gdb_index.
529
530 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
531
532 * common/filestuff.h (gdb_fopen_cloexec): New overload.
533 (gdb_open_cloexec): Likewise.
534 * nat/linux-osdata.c (command_from_pid): Use string_printf.
535 (commandline_from_pid): Likewise.
536 (linux_xfer_osdata_threads): Likewise.
537 (linux_xfer_osdata_fds): Likewise.
538 * ada-lang.c (is_package_name): Likewise.
539 * auxv.c (procfs_xfer_auxv): Likewise.
540 * breakpoint.c (print_one_breakpoint_location): Use
541 uiout::field_fmt.
542 (print_one_catch_solib): Use string_printf.
543 * coff-pe-read.c (add_pe_exported_sym): Likewise.
544 (add_pe_forwarded_sym): Likewise.
545 * dwarf2read.c (create_type_unit_group): Likewise.
546 (build_error_marker_type): Likewise.
547 * infcall.c (get_function_name): Likewise.
548 * valprint.c (print_converted_chars_to_obstack): Likewise.
549 * xtensa-tdep.c (xtensa_register_type): Likewise.
550
551 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
552
553 * remote.c (remote_target::download_tracepoint): Fix format
554 string errors.
555
556 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
557
558 * tracefile.c: Include common/byte-vector.h.
559 (trace_save): Change type of buf to gdb::byte_vector. Initialize
560 with trace_regblock_size if needed. Update uses of buf.
561
562 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
563
564 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
565 std::vector<unsigned char>.
566 * tracepoint.c (collection_list::collection_list): Remove
567 m_regs_mask initializer from initializer list. Resize
568 m_regs_mask using the largest remote register number.
569 (collection_list::add_remote_register): Remove size check on
570 m_regs_mask. Use at to access element.
571 (collection_list::stringify): Change type of temp_buf to
572 gdb::char_vector. Update uses of temp_buf. Resize if needed to
573 stringify the register mask. Use pack_hex_byte for the register
574 mask.
575
576 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
577
578 * tracepoint.h (class collection_list) <add_register>: Remove.
579 <add_remote_register, add_ax_registers, add_local_register>:
580 Declare.
581 <add_memrange>: Add scope parameter.
582 * tracepoint.c (encode_actions_1): Likewise.
583 (collection_list::add_register): Rename to ...
584 (collection_list::add_remote_register): ... this. Update
585 comment.
586 (collection_list::add_ax_registers, add_local_register): New
587 methods.
588 (collection_list::add_memrange): Add scope parameter. Call
589 add_local_register instead of add_register.
590 (finalize_tracepoint_aexpr): New function.
591 (collection_list::collect_symbol): Update calls to add_memrange.
592 Call add_local_register instead of add_register. Call
593 add_ax_registers. Call finalize_tracepoint_aexpr.
594 (encode_actions_1): Get remote regnos for $reg action. Call
595 add_remote_register, add_ax_registers, and add_local_register.
596 Update call to add_memrange. Call finalize_tracepoint_aexpr.
597 (validate_actionline): Call finalize_tracepoint_aexpr.
598
599 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
600
601 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
602 Replace array buf with gdb::char_vector buf, of size
603 get_remote_packet_size (). Replace references to buf and
604 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
605 and xsnprintf with snprintf. Raise errors if the buffer is too
606 small.
607
608 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
609
610 * remote.c (remote_target::download_tracepoint): Fix the has_more
611 predicate in the QTDP action list iteration.
612
613 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
614
615 * remote.c (remote_target::download_tracepoint): Fix indentation
616 in for block.
617
618 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
619
620 * proc-api.c (_initialize_proc_api): Remove c, unused.
621 * procfs.c (procfs_init_inferior): Remove signals, unused.
622 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
623 unused.
624
625 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
626 Andrew Burgess <andrew.burgess@embecosm.com>
627
628 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
629 'W_STOPCODE (0)' as this could be ambiguous.
630
631 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
632
633 * ser-tcp.c (net_open): Fix thinko when deciding whether to
634 disable TCP's Nagle algorithm (use "ai_protocol" instead of
635 "ai_socktype").
636
637 2018-08-02 Tom Tromey <tom@tromey.com>
638
639 PR symtab/16842.
640 * dwarf2read.c (read_func_scope): Set symtab on template parameter
641 symbols.
642 (process_structure_scope): Likewise.
643
644 2018-08-02 Xavier Roirand <roirand@adacore.com>
645
646 PR gdb/22629:
647 * darwin-nat.c (darwin_kill_inferior): Fix handling of
648 kill inferior.
649
650 2018-08-02 Tom Tromey <tom@tromey.com>
651
652 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
653 (darwin_suspend_inferior, darwin_resume_inferior)
654 (darwin_decode_notify_message, darwin_resume_inferior_threads)
655 (darwin_check_new_threads): Check result of get_darwin_inferior.
656
657 2018-07-31 Joel Brobecker <brobecker@adacore.com>
658
659 GDB 8.1.1 released.
660
661 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
662
663 * varobj.c (varobj_get_path_expr_parent): Report an error if
664 parent is a dynamic varobj.
665
666 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
667
668 * gnulib/aclocal.m4: Re-generate.
669 * gnulib/config.in: Re-generate.
670 * gnulib/configure: Re-generate.
671 * gnulib/import/Makefile.in: Re-generate.
672 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
673 * gnulib/import/m4/onceonly.m4: Re-generate.
674
675 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
676
677 * target-descriptions.c (struct xml_test_tdesc): New.
678 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
679 (record_xml_tdesc): Update.
680 (maintenance_check_xml_descriptions): Update.
681 * target-descriptions.h (record_xml_tdesc): Update comment.
682
683 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
684
685 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
686 checking array bounds are defined.
687
688 2018-07-30 Tom Tromey <tom@tromey.com>
689
690 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
691 irreflexivity violation.
692
693 2018-07-30 Tom Tromey <tom@tromey.com>
694
695 * cli/cli-decode.c (lookup_cmd): Remove lint code.
696 * value.c (unpack_long): Remove lint code.
697 * valops.c (value_ind): Remove lint code.
698 * valarith.c (value_x_binop, value_x_unop, value_equal)
699 (value_pos): Remove lint code.
700
701 2018-07-28 Tom de Vries <tdevries@suse.de>
702
703 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
704 with undefined upper bound as <optimized out>.
705
706 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
707
708 * gcore.in: Rename variable "name" to "prefix". Expand
709 "usage" text.
710
711 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
712
713 * windows-nat.c (windows_nat_target::create_inferior): Update to
714 call close() in global namespace.
715
716 2018-07-26 Tom Tromey <tom@tromey.com>
717
718 * dwarf-index-write.c (add_address_entry): Don't add objfile
719 offsets.
720 * dbxread.c (find_stab_function): Rename from
721 find_stab_function_addr. Return a bound_minimal_symbol.
722 (read_dbx_symtab): Use raw_text_low, raw_text_high.
723 Don't add objfile offsets.
724 (end_psymtab): Use raw_text_low, raw_text_high,
725 MSYMBOL_VALUE_RAW_ADDRESS.
726 (read_ofile_symtab): Update.
727 (process_one_symbol): Update.
728 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
729 offsets.
730 (dw2_relocate): Remove.
731 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
732 searching addrmap.
733 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
734 Update.
735 (process_psymtab_comp_unit_reader, add_partial_symbol)
736 (add_partial_subprogram, dwarf2_ranges_read): Update.
737 (load_partial_dies): Update.
738 (add_address_entry): Don't add objfile offsets.
739 (dwarf2_build_include_psymtabs): Update.
740 (create_addrmap_from_aranges): Don't add objfile offsets.
741 (dw2_find_pc_sect_compunit_symtab): Update.
742 * mdebugread.c (parse_symbol): Don't add objfile offsets.
743 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
744 Update.
745 (parse_partial_symbols): Don't add objfile offsets. Use
746 raw_text_low, raw_text_high. Update.
747 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
748 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
749 or call 'relocate' quick function. Clear psymbol_map.
750 * psympriv.h (struct partial_symbol) <address>: Add section
751 offset.
752 <set_unrelocated_address>: Rename from set_address.
753 <raw_text_low, raw_text_high>: New methods.
754 <text_low, text_high>: Add objfile parameter.
755 (add_psymbol_to_bcache): Add 'section' parameter. Call
756 set_unrelocated_address.
757 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
758 (find_pc_psymbol): Update.
759 (fixup_psymbol_section, relocate_psymtabs): Remove.
760 (dump_psymtab, psym_functions): Update.
761 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
762 parameter.
763 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
764 (start_psymtab_common): Update.
765 * symfile-debug.c (debug_qf_relocate): Remove.
766 (debug_sym_quick_functions): Update.
767 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
768 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
769 Update.
770
771 2018-07-26 Tom Tromey <tromey@redhat.com>
772
773 * dbxread.c (end_psymtab): Use text_high_valid and
774 text_low_valid.
775 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
776 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
777 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
778 Update comment.
779 <text_low_valid, text_high_valid>: New fields.
780 <set_text_low, set_text_high>: Update.
781 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
782
783 2018-07-26 Tom Tromey <tom@tromey.com>
784
785 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
786 Update.
787 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
788 textlow and texthigh fields.
789 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
790 Update.
791 * mdebugread.c (parse_lines, parse_partial_symbols)
792 (psymtab_to_symtab_1): Update.
793 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
794 Rename fields. Update comment. Now private.
795 <text_low, text_high, set_text_low, set_text_high>: New methods.
796 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
797 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
798 (start_psymtab_common, maintenance_info_psymtabs)
799 (maintenance_check_psymtabs): Update.
800 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
801 texthigh fields.
802 (scan_xcoff_symtab): Update.
803
804 2018-07-26 Tom Tromey <tromey@redhat.com>
805
806 * psympriv.h (struct partial_symbol) <unrelocated_address,
807 address, set_address>: New methods.
808 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
809 (fixup_psymbol_section, relocate_psymtabs): Update.
810 (print_partial_symbols): Add 'objfile' parameter. Update.
811 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
812 Update.
813
814 2018-07-26 Tom Tromey <tom@tromey.com>
815
816 * dwarf-index-write.c (write_psymbols, debug_names::insert)
817 (debug_names::write_psymbols): Update.
818 * psympriv.h (struct partial_symbol): Derive from
819 general_symbol_info.
820 <obj_section>: New method.
821 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
822 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
823 (find_pc_sect_psymbol, fixup_psymbol_section)
824 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
825 (print_partial_symbols, recursively_search_psymtabs)
826 (compare_psymbols, psymbol_hash, psymbol_compare)
827 (add_psymbol_to_bcache, maintenance_check_psymtabs)
828 (psymbol_name_matches, psym_fill_psymbol_map): Update.
829
830 2018-07-26 Tom Tromey <tromey@redhat.com>
831
832 * dbxread.c (end_psymtab): Remove dead code.
833
834 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
835
836 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
837 DWARF unwinders are disabled.
838 * dwarf2-frame.c: Add dwarf2read.h include.
839 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
840 disabled.
841 (dwarf2_frame_unwinders_enabled_p): Define.
842 (show_dwarf_unwinders_enabled_p): New function.
843 (_initialize_dwarf2_frame): Register switch to control DWARF
844 unwinder use.
845 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
846 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
847 (show_dwarf_cmdlist): Remove static keyword.
848 * dwarf2read.h (set_dwarf_cmdlist): Declare.
849 (show_dwarf_cmdlist): Declare.
850 * NEWS: Document new feature.
851
852 2018-07-26 Tom de Vries <tdevries@suse.de>
853
854 PR breakpoints/23366
855 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
856
857 2018-07-26 Tom de Vries <tdevries@suse.de>
858
859 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
860 DW_AT_count can't be translated to a dynamic prop.
861
862 2018-07-25 Tom de Vries <tdevries@suse.de>
863
864 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
865 try/catch.
866
867 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
868
869 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
870
871 2018-07-25 Joel Brobecker <brobecker@adacore.com>
872
873 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
874
875 2018-07-24 Keith Seitz <keiths@redhat.comt
876
877 PR symtab/23010
878 * dwarf2read.c (dw2_add_symbol_to_list): New function.
879 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
880 instead of add_symbol_to_list.
881 (read_file_scope): Call prepare_one_comp_unit before reading
882 any other DIEs.
883
884 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
885
886 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
887
888 2018-07-24 Tom Tromey <tom@tromey.com>
889
890 * utils.c (malloc, realloc, free): Don't declare.
891 * configure, config.in: Rebuild.
892 * configure.ac: Don't check for declarations of free, malloc, or
893 realloc.
894
895 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
896
897 * aarch64-linux-nat.c
898 (aarch64_linux_nat_target::stopped_data_address): Remove unused
899 variable.
900 * arm-linux-nat.c (fetch_regs): Likewise.
901 (store_regs): Likewise.
902 (fetch_vfp_regs): Likewise.
903 (store_vfp_regs): Likewise.
904 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
905 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
906 (arm_linux_nat_target::insert_watchpoint): Likewise.
907 (arm_linux_nat_target::remove_watchpoint): Likewise.
908 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
909 Likewise.
910 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
911 Likewise.
912 * ppc-linux-nat.c (fetch_register): Likewise.
913 (fetch_all_gp_regs): Likewise.
914 (fetch_ppc_registers): Likewise.
915 (store_all_gp_regs): Likewise.
916 (store_ppc_registers): Likewise.
917 (hwdebug_insert_point): Likewise.
918 (can_use_watchpoint_cond_accel): Likewise.
919 * remote-sim.c (gdb_os_write_stdout): Likewise.
920
921 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
922 Tom Tromey <tom@tromey.com>
923
924 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
925 test for it.
926 * configure: Rebuild.
927
928 2018-07-22 Tom Tromey <tom@tromey.com>
929
930 * regformats/regdat.sh: Define xmltarget_${name} inside
931 #ifndef IN_PROCESS_AGENT.
932
933 2018-07-22 Tom Tromey <tom@tromey.com>
934
935 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
936
937 2018-07-22 Tom Tromey <tom@tromey.com>
938
939 * symfile.c (reread_symbols): Notify iter, not objfile.
940
941 2018-07-22 Tom Tromey <tom@tromey.com>
942
943 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
944 Use arch_ops.
945 (ravenscar_thread_target::prepare_to_store): Likewise.
946
947 2018-07-22 Tom Tromey <tom@tromey.com>
948
949 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
950 unused variable. Call value_fetch_lazy when needed.
951 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
952 Remove unused variable. Call value_fetch_lazy when needed.
953
954 2018-07-22 Tom Tromey <tom@tromey.com>
955
956 * m32c-tdep.c (mark_dma): Return void.
957 (make_regs): Remove unused declarations.
958
959 2018-07-22 Tom Tromey <tom@tromey.com>
960
961 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
962 cmdscm_get_valid_command_smob_arg_unsafe for effect.
963 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
964 bkscm_get_valid_block_smob_arg_unsafe for effect.
965
966 2018-07-22 Tom Tromey <tom@tromey.com>
967
968 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
969 value_type.
970
971 2018-07-22 Tom Tromey <tom@tromey.com>
972
973 * windows-nat.c (saved_context): Conditionally define.
974 * remote.c (remote_target::remote_btrace_maybe_reopen):
975 Conditionally declare "warned".
976 * inflow.c (sigquit_ours): Conditionally define.
977 (new_tty): Move "tty" declaration inside #if.
978 * guile/guile.c (guile_datadir): Conditionally define.
979 * charset.c (set_be_le_names): Move some declarations inside #if.
980 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
981 #if.
982 (parse_xml_btrace_conf): Likewise.
983
984 2018-07-22 Tom Tromey <tom@tromey.com>
985
986 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
987
988 2018-07-22 Tom Tromey <tom@tromey.com>
989
990 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
991 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
992 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
993 * buildsym-legacy.c (get_macro_table): Remove unused variable.
994 * stack.c (frame_apply_level_command): Remove unused variable.
995 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
996 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
997 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
998 unused variable.
999 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1000 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1001 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1002 variable.
1003 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1004 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1005 variable.
1006 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1007 Remove unused variable.
1008 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1009 variable.
1010 * common/tdesc.c (print_xml_feature::visit): Remove unused
1011 variable.
1012 * compile/compile-object-load.c (store_regs): Remove unused
1013 variables.
1014 * complaints.c (clear_complaints): Remove unused variable.
1015 * corelow.c (core_target_open): Remove unused variable.
1016 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1017 variable.
1018 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1019 variable.
1020 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1021 variable.
1022 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1023 variable.
1024 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1025 variable.
1026 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1027 variable.
1028 * ia64-tdep.c (examine_prologue): Remove unused variable.
1029 * infcall.c (run_inferior_call): Remove unused variable.
1030 * inferior.c (exit_inferior): Remove unused variable.
1031 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1032 * linespec.c (decode_line_2): Remove unused variable.
1033 * linux-nat.c (super_close): Remove.
1034 * linux-tdep.c (linux_info_proc): Remove unused variable.
1035 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1036 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1037 Remove unused variable.
1038 * parse.c (find_minsym_type_and_address): Remove unused variable.
1039 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1040 variable.
1041 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1042 variable.
1043 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1044 variables.
1045 * record-btrace.c (record_btrace_target::store_registers): Remove
1046 unused variable.
1047 (cmd_show_record_btrace_cpu): Remove unused variable.
1048 * riscv-tdep.c (riscv_register_reggroup_p)
1049 (riscv_push_dummy_call, riscv_return_value): Remove unused
1050 variable.
1051 * rust-exp.y (literal): Remove unused variable.
1052 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1053 unused variable.
1054 <STRUCTOP_ANONYMOUS>: Likewise.
1055 * s390-linux-tdep.c (s390_linux_init_abi_31)
1056 (s390_linux_init_abi_64): Remove unused variable.
1057 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1058 (file_select_thread, net_windows_open, _initialize_ser_windows):
1059 Remove unused variables.
1060 * symtab.c (find_pc_sect_line): Remove unused variable.
1061 * target-memory.c (compute_garbled_blocks): Remove unused
1062 variable.
1063 (target_write_memory_blocks): Remove unused variable.
1064 * target.c (target_stack::unpush): Remove unused variables.
1065 * tracepoint.c (start_tracing, all_tracepoint_actions)
1066 (merge_uploaded_trace_state_variables)
1067 (print_one_static_tracepoint_marker): Remove unused variable.
1068 * unittests/basic_string_view/element_access/char/1.cc (test01):
1069 Remove unused variable.
1070 * windows-nat.c (windows_continue, windows_add_all_dlls)
1071 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1072 Remove unused variables.
1073
1074 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1075
1076 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1077 attr_profile in HAVE_ELF.
1078 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1079 HAVE_ELF.
1080
1081 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1082
1083 * frame.c (frame_register_unwind): Change parameter name.
1084 (frame_unwind_register): Likewise.
1085 (frame_unwind_register_value): Likewise.
1086 (frame_unwind_register_signed): Likewise.
1087 (frame_unwind_register_unsigned): Likewise.
1088 * frame.h (frame_register_unwind): Likewise.
1089 (frame_unwind_register): Likewise.
1090 (frame_unwind_register_value): Likewise.
1091 (frame_unwind_register_signed): Likewise.
1092 (frame_unwind_register_unsigned): Likewise.
1093 (frame_unwind_arch): Likewise.
1094
1095 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1096
1097 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1098 ISA maintenance.
1099
1100 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1101
1102 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1103 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1104 hand.
1105
1106 2018-07-20 Keith Seitz <keiths@redhat.com>
1107
1108 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1109 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1110 m_compunit_symtab, m_language>: Add "m_" prefix.
1111 Update all uses.
1112 * buildsym.c: Update all uses.
1113
1114 2018-07-20 Tom Tromey <tom@tromey.com>
1115
1116 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1117 * buildsym.h (record_line_ftype): Remove typedef.
1118
1119 2018-07-20 Tom Tromey <tom@tromey.com>
1120
1121 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1122 (end_expandable_symtab): Likewise.
1123 (end_symtab_get_static_block): Likewise.
1124 (end_symtab_from_static_block): Likewise.
1125 * buildsym-legacy.c (augment_type_symtab): Remove.
1126 (end_expandable_symtab): Remove.
1127 (end_symtab_get_static_block): Remove.
1128 (end_symtab_from_static_block): Remove.
1129
1130 2018-07-20 Tom Tromey <tom@tromey.com>
1131
1132 * dwarf2read.c: Include buildsym.h.
1133 (struct dwarf2_cu) <builder>: New method.
1134 (fixup_go_packaging): Update.
1135 (process_full_comp_unit, process_full_type_unit): Update. Don't
1136 use scoped_free_pendings.
1137 (using_directives): Add "cu" parameter, remove "language".
1138 (read_import_statement, setup_type_unit_groups, )
1139 (read_func_scope, read_lexical_block_scope)
1140 (dwarf2_record_block_ranges, read_namespace): Update.
1141 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1142 (lnp_state_machine::handle_end_sequence): Update.
1143 (class lnp_state_machine) <m_cu>: New member.
1144 <m_record_line_callback>: Remove.
1145 <m_currently_recording_lines>: New member.
1146 (lnp_state_machine::handle_set_file): Update.
1147 (noop_record_line): Remove.
1148 (dwarf_record_line_p): Add cu parameter.
1149 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1150 (lnp_state_machine::record_line)
1151 (lnp_state_machine::lnp_state_machine)
1152 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1153 (dwarf_decode_lines): Update.
1154 (dwarf2_start_subfile): Add cu parameter.
1155 (dwarf2_start_symtab, new_symbol): Update.
1156 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1157 Remove dwarf2_per_objfile parameter.
1158 (dwarf_decode_macros): Update.
1159
1160 2018-07-20 Tom Tromey <tom@tromey.com>
1161
1162 * stabsread.c (define_symbol): Update.
1163 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1164 * dwarf2read.c (new_symbol): Update.
1165 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1166 * cp-namespace.c: Include buildsym.h.
1167 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1168 * buildsym-legacy.c (get_buildsym_compunit): New function.
1169
1170 2018-07-20 Tom Tromey <tom@tromey.com>
1171
1172 * xcoffread.c: Include buildsym-legacy.h.
1173 * windows-nat.c: Include buildsym-legacy.h.
1174 * stabsread.c: Include buildsym-legacy.h.
1175 * mdebugread.c: Include buildsym-legacy.h.
1176 * buildsym-legacy.h: New file.
1177 * buildsym-legacy.c: New file, from buildsym.c.
1178 * go32-nat.c: Include buildsym-legacy.h.
1179 * dwarf2read.c: Include buildsym-legacy.h.
1180 * dbxread.c: Include buildsym-legacy.h.
1181 * cp-namespace.c: Include buildsym-legacy.h.
1182 * coffread.c: Include buildsym-legacy.h.
1183 * buildsym.h: Move some contents to buildsym-legacy.h.
1184 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1185 buildsym-legacy.c.
1186 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1187
1188 2018-07-20 Tom Tromey <tom@tromey.com>
1189
1190 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1191 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1192 (buildsym_compunit::buildsym_compunit)
1193 (buildsym_compunit::~buildsym_compunit)
1194 (buildsym_compunit::get_macro_table): Define.
1195
1196 2018-07-20 Tom Tromey <tom@tromey.com>
1197
1198 * buildsym.c (reset_symtab_globals): Remove.
1199 (buildsym_compunit::end_symtab_from_static_block): Update.
1200 (buildsym_compunit::augment_type_symtab): Update.
1201 (end_symtab_from_static_block): Call free_buildsym_compunit.
1202 (augment_type_symtab, end_symtab, end_expandable_symtab):
1203 Likewise.
1204
1205 2018-07-20 Tom Tromey <tom@tromey.com>
1206
1207 * arch-utils.c: Do not include buildsym.h.
1208 * mipsread.c: Do not include buildsym.h.
1209 * machoread.c: Do not include buildsym.h.
1210 * elfread.c: Do not include buildsym.h.
1211
1212 2018-07-20 Tom Tromey <tom@tromey.com>
1213
1214 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1215 initialization.
1216 (buildsym_compunit): Add new constructor.
1217 (struct buildsym_compunit) <get_last_source_file, finish_block,
1218 record_block_range, start_subfile, patch_subfile_names,
1219 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1220 set_last_source_start_addr, get_last_source_start_addr,
1221 get_local_using_directives, set_local_using_directives,
1222 get_global_using_directives, outermost_context_p,
1223 get_current_context_stack, get_context_stack_depth,
1224 get_current_subfile, get_local_symbols, get_file_symbols,
1225 get_global_symbols, record_debugformat, record_producer,
1226 push_context, pop_context, end_symtab_get_static_block,
1227 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1228 New public methods.
1229 <record_pending_block, finish_block_internal, make_blockvector,
1230 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1231 private methods.
1232 Update all users.
1233
1234 2018-05-22 Tom Tromey <tom@tromey.com>
1235
1236 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1237 parameter.
1238 (finish_block_internal): Update.
1239
1240 2018-07-20 Tom Tromey <tom@tromey.com>
1241
1242 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1243 parameter.
1244 (finish_block_internal): Update.
1245
1246 2018-07-20 Tom Tromey <tom@tromey.com>
1247
1248 * buildsym.h (EXTERN): Don't define or undef.
1249 * buildsym.c (EXTERN): Don't define.
1250
1251 2018-07-20 Tom Tromey <tom@tromey.com>
1252
1253 * buildsym.c: Remove TODO comment.
1254
1255 2018-07-20 Tom Tromey <tom@tromey.com>
1256
1257 * coffread.c (coff_symtab_read): Update.
1258 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1259 (xcoff_new_init): Update.
1260 * mipsread.c (mipscoff_new_init): Update.
1261 * mdebugread.c (mdebug_build_psymtabs): Update.
1262 * elfread.c (elf_new_init): Update.
1263 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1264 Update.
1265 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1266 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1267 (stabsect_build_psymtabs): Update.
1268 * buildsym.h (buildsym_init): Don't declare.
1269 * buildsym.c: Update comment.
1270 (prepare_for_building): Remove.
1271 (start_symtab, restart_symtab): Update.
1272 (reset_symtab_globals): Update comment.
1273 (buildsym_init): Remove.
1274
1275 2018-07-20 Tom Tromey <tom@tromey.com>
1276
1277 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1278 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1279 (read_enum_type, common_block_start, common_block_end)
1280 (cleanup_undefined_types_1, finish_global_stabs): Update.
1281 * mdebugread.c (psymtab_to_symtab_1): Update.
1282 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1283 (read_lexical_block_scope, new_symbol): Update.
1284 * dbxread.c (process_one_symbol): Update.
1285 * coffread.c (coff_symtab_read, process_coff_symbol)
1286 (coff_read_enum_type): Update.
1287 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1288 declare.
1289 (get_local_symbols, get_file_symbols, get_global_symbols): New
1290 functions.
1291 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1292 m_global_symbols.
1293 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1294 (~scoped_free_pendings): Update.
1295 (finish_block, prepare_for_building, reset_symtab_globals)
1296 (end_symtab_get_static_block, end_symtab_with_blockvector)
1297 (augment_type_symtab, push_context): Update.
1298 (get_local_symbols, get_file_symbols, get_global_symbols): New
1299 functions.
1300 (buildsym_init): Update.
1301
1302 2018-07-20 Tom Tromey <tom@tromey.com>
1303
1304 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1305 (process_full_type_unit): Likewise.
1306 (dwarf2_start_symtab): Set list_in_scope.
1307
1308 2018-07-20 Tom Tromey <tom@tromey.com>
1309
1310 * dwarf2read.c (process_psymtab_comp_unit_reader)
1311 (build_type_psymtabs_reader): Do not set list_in_scope.
1312
1313 2018-07-20 Tom Tromey <tom@tromey.com>
1314
1315 * buildsym.c (free_pendings): Remove.
1316 (add_symbol_to_list, scoped_free_pendings)
1317 (finish_block_internal, buildsym_init): Update.
1318
1319 2018-07-20 Tom Tromey <tom@tromey.com>
1320
1321 * xcoffread.c (read_xcoff_symtab): Update.
1322 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1323 Update.
1324 * dbxread.c (process_one_symbol): Update.
1325 * coffread.c (coff_symtab_read): Update.
1326 * buildsym.h (finish_block): Update.
1327 * buildsym.c (finish_block): Remove "listhead" argument.
1328 (end_symtab_get_static_block): Update.
1329
1330 2018-07-20 Tom Tromey <tom@tromey.com>
1331
1332 * buildsym.h (class scoped_free_pendings): Remove constructor.
1333 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1334 method.
1335 <m_pending_block_obstack, m_pending_blocks>: New members.
1336 (pending_block_obstack, pending_blocks): Remove.
1337 (scoped_free_pendings::scoped_free_pendings): Default.
1338 (~scoped_free_pendings): Update.
1339 (free_pending_blocks): Remove.
1340 (finish_block_internal, record_pending_block, make_blockvector)
1341 (end_symtab_get_static_block, augment_type_symtab, push_context)
1342 (buildsym_init): Update.
1343
1344 2018-07-20 Tom Tromey <tom@tromey.com>
1345
1346 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1347 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1348 members.
1349 (pending_addrmap, pending_addrmap_obstack)
1350 (pending_addrmap_interesting): Remove.
1351 (scoped_free_pendings, record_block_range, make_blockvector)
1352 (prepare_for_building, reset_symtab_globals, buildsym_init):
1353 Update.
1354
1355 2018-07-20 Tom Tromey <tom@tromey.com>
1356
1357 * xcoffread.c (process_linenos): Update.
1358 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1359 * mdebugread.c (psymtab_to_symtab_1): Update.
1360 * dwarf2read.c (setup_type_unit_groups)
1361 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1362 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1363 * dbxread.c (process_one_symbol): Update.
1364 * coffread.c (coff_symtab_read, enter_linenos)
1365 (process_coff_symbol): Update.
1366 * buildsym.h (current_subfile): Don't declare.
1367 (get_current_subfile): Declare.
1368 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1369 member.
1370 (start_subfile, free_buildsym_compunit, push_subfile)
1371 (prepare_for_building, start_symtab): Update.
1372 (get_current_subfile): New function.
1373
1374 2018-07-20 Tom Tromey <tom@tromey.com>
1375
1376 * coffread.c (coff_symtab_read): Update.
1377 * xcoffread.c (read_xcoff_symtab): Update.
1378 * dwarf2read.c (new_symbol): Update.
1379 (read_func_scope, read_lexical_block_scope): Update.
1380 * dbxread.c (process_one_symbol): Update.
1381 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1382 (outermost_context_p): Remove macro.
1383 (outermost_context_p, get_current_context_stack)
1384 (get_context_stack_depth): Declare.
1385 (pop_context): Return struct context_stack.
1386 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1387 member.
1388 (context_stack_size): Remove.
1389 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1390 (prepare_for_building, end_symtab_get_static_block)
1391 (augment_type_symtab, push_context): Update.
1392 (pop_context): Return struct context_stack.
1393 (outermost_context_p, get_current_context_stack)
1394 (get_context_stack_depth): New functions.
1395 (buildsym_init): Update.
1396
1397 2018-07-20 Tom Tromey <tom@tromey.com>
1398
1399 * rust-exp.y: Now a pure parser. Update all rules.
1400 (%union): Move earlier.
1401 (current_parser, work_obstack): Remove globals.
1402 (rust_parser, ~rust_parser): Update.
1403 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1404 lex_character, lex_number, lex_string, lex_identifier,
1405 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1406 convert_name, convert_params_to_expression,
1407 convert_ast_to_expression, ast_basic_type, ast_operation,
1408 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1409 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1410 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1411 ast_array_type, ast_slice_type, ast_reference_type,
1412 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1413 (rust_parse): Update.
1414 (rustyyerror, rustyylex): Add parser parameter.
1415 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1416 (rust_lex_stringish_test, rust_lex_test_sequence)
1417 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1418 (rust_lex_test_push_back, rust_lex_tests): Update.
1419
1420 2018-07-19 Pedro Alves <palves@redhat.com>
1421
1422 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1423 gdb::unique_xmalloc_ptr.
1424 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1425 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1426 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1427 copy-initialization.
1428 * guile/scm-pretty-print.c (ppscm_print_children): Use
1429 gdb::unique_xmalloc_ptr instead of cleanups.
1430 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1431 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1432 gdb::unique_xmalloc_ptr.
1433 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1434 Adjust to use gdb::unique_xmalloc_ptr.
1435 * guile/scm-utils.c (extract_arg): Adjust.
1436 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1437 gdb::unique_xmalloc_ptr instead of a cleanup.
1438
1439 2018-07-19 Tom Tromey <tom@tromey.com>
1440
1441 * utils.c (do_value_free_to_mark)
1442 (make_cleanup_value_free_to_mark): Remove.
1443 * utils.h (make_cleanup_value_free_to_mark): Remove.
1444
1445 2018-07-19 Pedro Alves <palves@redhat.com>
1446
1447 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1448 forwarding reference.
1449
1450 2018-07-18 Pedro Alves <palves@redhat.com>
1451
1452 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1453 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1454 cleanup.
1455
1456 2018-07-18 Pedro Alves <palves@redhat.com>
1457
1458 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1459 exceptions.
1460 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1461 (gdbscm_wrap): New.
1462 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1463 directly instead of a cleanup.
1464 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1465 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1466 (vlscm_binop_gdbthrow): New, factored out from ...
1467 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1468 (vlscm_rich_compare): Use gdbscm_wrap.
1469 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1470 instead of a cleanup.
1471 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1472 cleanup.
1473 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1474 Use xfree directly instead of a cleanup.
1475 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1476 Adjust to use gdbscm_wrap and scoped_value_mark.
1477 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1478 (gdbscm_value_address, gdbscm_value_dereference)
1479 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1480 scoped_value_mark.
1481 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1482 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1483 scoped_value_mark.
1484 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1485 gdbscm_wrap and scoped_value_mark.
1486 (gdbscm_value_to_string): Use xfree directly instead of a
1487 cleanup. Move 'buffer' unique_ptr to TRY scope.
1488 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1489 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1490 scoped_value_mark.
1491 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1492 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1493 scoped_value_mark.
1494 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1495 gdbscm_wrap.
1496
1497 2018-07-18 Tom de Vries <tdevries@suse.de>
1498
1499 * findvar.c (default_read_var_value): Also resolve dynamic type for
1500 LOC_OPTIMIZED_OUT vars.
1501
1502 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1503
1504 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1505 decoding.
1506
1507 2018-07-17 Tom Tromey <tom@tromey.com>
1508
1509 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1510 (compute_enum_list, pascm_set_param_value_x)
1511 (gdbscm_parameter_value): Update.
1512 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1513 (gdbscm_scm_to_host_string): Update.
1514 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1515 Update.
1516 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1517 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1518 * guile/scm-string.c (gdbscm_scm_to_string): Return
1519 unique_xmalloc_ptr.
1520 (gdbscm_scm_to_host_string): Likewise.
1521
1522 2018-07-17 Tom Tromey <tom@tromey.com>
1523
1524 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1525 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1526 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1527 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1528 unique_xmalloc_ptr.
1529
1530 2018-07-17 Tom Tromey <tom@tromey.com>
1531
1532 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1533 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1534 Update.
1535 * guile/scm-cmd.c (cmdscm_function): Update.
1536 * guile/scm-pretty-print.c
1537 (ppscm_print_exception_unless_memory_error): Update.
1538 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1539 Return unique_xmalloc_ptr.
1540
1541 2018-07-17 Tom Tromey <tom@tromey.com>
1542
1543 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1544 Use string_printf.
1545
1546 2018-07-17 Jim Wilson <jimw@sifive.com>
1547
1548 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1549 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1550 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1551 unecessary braces after EF_RISCV_RVC test. Delete call to
1552 set_gdbarch_decr_pc_after_break.
1553
1554 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1555 RISCV_LAST_FP_REGNUM + 1.
1556 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1557
1558 2018-07-17 Tom Tromey <tom@tromey.com>
1559
1560 * configure.ac: Remove --disable-gdbcli.
1561 * configure: Rebuild.
1562 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1563 (SUBDIR_CLI_CFLAGS): Remove.
1564 (SFILES): Use SUBDIR_CLI_SRCS.
1565 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1566
1567 2018-07-17 Tom Tromey <tom@tromey.com>
1568
1569 PR gdb/18624:
1570 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1571
1572 2018-07-16 Jim Wilson <jimw@sifive.com>
1573
1574 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1575
1576 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1577
1578 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1579 variable.
1580 (libunwind_frame_sniffer): Likewise.
1581 (libunwind_frame_prev_register): Likewise.
1582 (libunwind_sigtramp_frame_sniffer): Likewise.
1583 * ia64-tdep.c (ia64_access_reg): Likewise.
1584 (ia64_access_rse_reg): Likewise.
1585 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1586 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1587
1588 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1589
1590 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1591
1592 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1593
1594 * remote-sim.c (gdbsim_target::close,
1595 gdbsim_target::mourn_inferior): Remove unused variables.
1596
1597 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1598
1599 * ia64-tdep.c (ktab_buf): New global.
1600 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1601 (get_kernel_table): Adjust.
1602
1603 2018-07-16 Tom Tromey <tom@tromey.com>
1604
1605 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1606 * dwarf2read.c (using_directives, new_symbol): Use
1607 outermost_context_p.
1608 * dbxread.c (process_one_symbol): Use outermost_context_p.
1609 * coffread.c (coff_symtab_read): Use outermost_context_p.
1610
1611 2018-07-16 Tom Tromey <tom@tromey.com>
1612
1613 * dwarf2read.c (using_directives, read_func_scope)
1614 (read_lexical_block_scope): Update.
1615 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1616 * buildsym.h (local_using_directives, global_using_directives):
1617 Don't declare.
1618 (get_local_using_directives, set_local_using_directives)
1619 (get_global_using_directives): Declare.
1620 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1621 m_global_using_directives>: New members.
1622 (finish_block_internal, prepare_for_building)
1623 (reset_symtab_globals, end_symtab_get_static_block)
1624 (push_context): Update.
1625 (get_local_using_directives, set_local_using_directives)
1626 (get_global_using_directives): New functions.
1627 (buildsym_init): Update.
1628
1629 2018-07-16 Tom Tromey <tom@tromey.com>
1630
1631 * xcoffread.c (xcoff_initial_scan): Don't call
1632 free_pending_blocks.
1633 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1634 * buildsym.h (class scoped_free_pendings): Add constructor.
1635 (free_pending_blocks): Don't declare.
1636 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1637 (free_pending_blocks): Now static.
1638
1639 2018-07-16 Tom Tromey <tom@tromey.com>
1640
1641 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1642 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1643 member.
1644 (struct subfile_stack): Remove.
1645 (subfile_stack): Remove.
1646 (push_subfile, pop_subfile, buildsym_init): Update.
1647
1648 2018-07-16 Tom Tromey <tom@tromey.com>
1649
1650 * buildsym.c (push_subfile): Use gdb_assert.
1651 (pop_subfile): Use gdb_assert.
1652
1653 2018-07-16 Tom Tromey <tom@tromey.com>
1654
1655 * buildsym.h (merge_symbol_lists): Remove.
1656 * buildsym.c (merge_symbol_lists): Remove.
1657
1658 2018-07-16 Tom Tromey <tom@tromey.com>
1659
1660 * stabsread.c (scan_file_globals): Update comment.
1661 * stabsread.h (scan_file_globals): Move from buildsym.h.
1662 * buildsym.h (scan_file_globals): Move to stabsread.h.
1663
1664 2018-07-16 Tom Tromey <tom@tromey.com>
1665
1666 * xcoffread.c (xcoff_new_init): Update.
1667 * mipsread.c (mipscoff_new_init): Update.
1668 * mdebugread.c (mdebug_build_psymtabs): Update.
1669 * elfread.c (elf_new_init): Update.
1670 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1671 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1672 * buildsym.h (buildsym_new_init): Don't declare.
1673 * buildsym.c (buildsym_new_init): Remove.
1674
1675 2018-07-16 Tom Tromey <tom@tromey.com>
1676
1677 * stabsread.h (within_function): Move from buildsym.h.
1678 * stabsread.c (start_stabs): Clear within_function.
1679 * coffread.c (coff_start_symtab): Clear within_function.
1680 * buildsym.h (within_function): Move to stabsread.h.
1681 * buildsym.c (prepare_for_building): Update.
1682
1683 2018-07-16 Tom Tromey <tom@tromey.com>
1684
1685 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1686 * dwarf2read.c (dwarf2_start_symtab): Don't set
1687 processing_gcc_compilation.
1688 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1689
1690 2018-07-16 Tom Tromey <tom@tromey.com>
1691
1692 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1693 (next_symbol_text_func): Move from buildsym.h.
1694 * stabsread.c (hashname): Move from buildsym.c.
1695 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1696 (next_symbol_text_func, hashname): Move to stabsread.h.
1697 * buildsym.c: Don't include bcache.h
1698 (hashname): Move to stasbread.c.
1699
1700 2018-07-16 Tom Tromey <tom@tromey.com>
1701
1702 * buildsym.h (context_stack_size): Don't declare.
1703 * buildsym.c (context_stack_size): New global.
1704
1705 2018-07-16 Tom Tromey <tom@tromey.com>
1706
1707 * dbxread.c (processing_acc_compilation): New global.
1708 * buildsym.h (processing_acc_compilation): Don't declare.
1709
1710 2018-07-16 Tom Tromey <tom@tromey.com>
1711
1712 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1713 * dbxread.c (read_ofile_symtab): Update.
1714 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1715 * buildsym.h (last_source_start_addr): Remove.
1716 (set_last_source_start_addr, get_last_source_start_addr):
1717 Declare.
1718 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1719 parameter.
1720 (struct buildsym_compunit) <m_last_source_start_addr>: New
1721 member.
1722 (prepare_for_building): Remove start_addr parameter.
1723 (start_symtab, restart_symtab, end_symtab_get_static_block)
1724 (end_symtab_with_blockvector): Update.
1725 (set_last_source_start_addr, get_last_source_start_addr): New
1726 functions.
1727
1728 2018-07-16 Tom Tromey <tom@tromey.com>
1729
1730 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1731 member.
1732 (have_line_numbers): Remove.
1733 (record_line, prepare_for_building, end_symtab_get_static_block)
1734 (augment_type_symtab): Update.
1735
1736 2018-07-16 Tom Tromey <tom@tromey.com>
1737
1738 * buildsym.c (~buildsym_compunit): Free the macro table.
1739 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1740 methods.
1741 <m_pending_macros>: New member.
1742 (pending_macros): Remove.
1743 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1744 (reset_symtab_globals, end_symtab_get_static_block)
1745 (end_symtab_with_blockvector, augment_type_symtab)
1746 (buildsym_init): Update.
1747
1748 2018-07-16 Tom Tromey <tom@tromey.com>
1749
1750 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1751 parameter.
1752 (buildsym_compunit::set_last_source_file): New method.
1753 <m_last_source_file>: New member.
1754 (prepare_for_building): Remove "name" parameter.
1755 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1756 (last_source_file): Remove.
1757 (set_last_source_file, get_last_source_file): Update.
1758
1759 2018-07-16 Tom Tromey <tom@tromey.com>
1760
1761 * buildsym.c (prepare_for_building): Add assert.
1762
1763 2018-07-16 Tom Tromey <tom@tromey.com>
1764
1765 * buildsym.c (~buildsym_compunit): Update.
1766 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1767 (start_subfile, patch_subfile_names)
1768 (end_symtab_with_blockvector): Update.
1769
1770 2018-07-16 Tom Tromey <tom@tromey.com>
1771
1772 * buildsym.c (struct buildsym_compunit): Add constructor,
1773 destructor, initializers.
1774 (start_buildsym_compunit): Remove.
1775 (free_buildsym_compunit): Use "delete".
1776 (start_symtab, restart_symtab): Use "new".
1777
1778 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * symfile.c (set_objfile_default_section_offset): Remove struct
1781 keyword.
1782
1783 2018-07-14 Stafford Horne <shorne@gmail.com>
1784
1785 * (Responsible Maintainers): Add myself as or1k maintainer.
1786
1787 2018-07-13 Tom Tromey <tom@tromey.com>
1788
1789 * symfile.c (set_objfile_default_section_offset): Use extra braces
1790 around initializer.
1791
1792 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1793
1794 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1795 non-branching basr.
1796
1797 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1798
1799 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1800 unittests/cli-utils-selftests.c
1801 * unittests/cli-utils-selftests.c: New file.
1802
1803 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1804
1805 * NEWS: Mention new commands. Mention change to 'thread apply'.
1806
1807 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1808
1809 * thread.c (thr_try_catch_cmd): New function.
1810 (thread_apply_all_command): Handle qcs flags.
1811 (thread_apply_command): Handle qcs flags.
1812 (taas_command): New function.
1813 (tfaas_command): New function.
1814 (_initialize_thread): Update to setup the new commands 'taas
1815 and 'tfaas'. Change doc string for 'thread apply'.
1816
1817 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1818
1819 * stack.c: (trailing_outermost_frame): New function, mostly
1820 extracted from backtrace_command_1.
1821 (leading_innermost_frame): New function.
1822 (backtrace_command_1): Update to call trailing_outermost_frame.
1823 (frame_apply_command_count): New function.
1824 (frame_apply_level_command): New function.
1825 (frame_apply_all_command): New function.
1826 (frame_apply_command): New function.
1827 (faas_command): New function.
1828 (frame_cmd_list): New variable.
1829 (_initialize_stack): Update to setup the new commands 'frame apply'
1830 and 'faas'.
1831
1832 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1833
1834 * cli-utils.c (number_or_range_parser::get_number): Only handle
1835 numbers or convenience var as numbers.
1836 (parse_flags): New function.
1837 (parse_flags_qcs): New function.
1838 (number_or_range_parser::finished): Ensure parsing end is detected
1839 before end of string.
1840 * cli-utils.h (parse_flags): New function.
1841 (parse_flags_qcs): New function.
1842 (number_or_range_parser): Remove m_finished bool.
1843 (number_or_range_parser::skip_range): Set m_in_range to false.
1844
1845 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1846
1847 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1848 on Windows.
1849
1850 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1851 Jan Kratochvil <jan.kratochvil@redhat.com>
1852 Paul Fertser <fercerpav@gmail.com>
1853 Tsutomu Seki <sekiriki@gmail.com>
1854 Pedro Alves <palves@redhat.com>
1855
1856 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1857 'unittests/parse-connection-spec-selftests.c'.
1858 (COMMON_SFILES): Add 'common/netstuff.c'.
1859 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1860 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1861 * common/netstuff.c: New file.
1862 * common/netstuff.h: New file.
1863 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1864 (wait_for_connect): Update comment. New parameter
1865 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1866 Use 'sock' directly instead of 'scb->fd'.
1867 (try_connect): New function, with code from 'net_open'.
1868 (net_open): Rewrite main loop to deal with multiple
1869 sockets/addresses. Handle IPv6-style hostnames; implement
1870 support for IPv6 connections.
1871 * unittests/parse-connection-spec-selftests.c: New file.
1872
1873 2018-07-11 Pedro Alves <palves@redhat.com>
1874
1875 PR gdb/23377
1876 * remote.c (remote_target::remote_detach_pid): Call
1877 set_current_process.
1878
1879 2018-07-11 Pedro Alves <palves@redhat.com>
1880
1881 * h8300-tdep.c (h8300_gdbarch_init): Remove
1882 set_gdbarch_ecoff_reg_to_regnum calls.
1883
1884 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1885
1886 PR c++/23373
1887 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1888 offsets/sizes for static members of a class/struct.
1889
1890 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1891
1892 * target-descriptions.c (tdesc_register_bitsize): Rename.
1893 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1894 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1895 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1896
1897 2018-07-10 Tom Tromey <tom@tromey.com>
1898
1899 * breakpoint.c (moribund_locations): Now static and a
1900 std::vector.
1901 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1902 (build_bpstat_chain, update_global_location_list)
1903 (breakpoint_retire_moribund): Update.
1904 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1905 VEC.
1906
1907 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1908
1909 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1910 (riscv_register_reggroup_p): Use new function, remove unneeded
1911 parenthesis.
1912 (riscv_push_dummy_call): Extend assert to compare against xlen or
1913 flen based on register type.
1914
1915 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1916
1917 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1918
1919 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1920
1921 * remote.c (show_hardware_watchpoint_limit): New function.
1922 (show_hardware_watchpoint_length_limit): New function.
1923 (show_hardware_breakpoint_limit): New function.
1924 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1925 where appropriate, update help text.
1926
1927 2018-07-09 Tom Tromey <tom@tromey.com>
1928
1929 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1930 (CLIBS): Don't mention NAT_CLIBS.
1931
1932 2018-07-09 Tom Tromey <tom@tromey.com>
1933
1934 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1935 (LIBGDB_OBS, clean mostlyclean): Update.
1936 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1937
1938 2018-07-09 Tom Tromey <tom@tromey.com>
1939
1940 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1941 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1942 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1943
1944 2018-07-09 Tom Tromey <tom@tromey.com>
1945
1946 * Makefile.in (ALLDEPFILES): Remove exec.c.
1947 (COMMON_OBS): Remove exec.o.
1948 (COMMON_SFILES): Add exec.c.
1949
1950 2018-07-09 Tom Tromey <tom@tromey.com>
1951
1952 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1953
1954 2018-07-09 Tom Tromey <tom@tromey.com>
1955
1956 * Makefile.in (clean mostlyclean): Remove stamp-version.
1957 (version.c): Depend on stamp-version.
1958 (stamp-version): New rule, from version.c rule.
1959
1960 2018-07-09 Tom Tromey <tom@tromey.com>
1961
1962 * Makefile.in (init.c): Depend on stamp-init.
1963 (stamp-init): New rule, from init.c rule.
1964 (clean mostlyclean): Remove stamp-init.
1965
1966 2018-07-09 Tom Tromey <tom@tromey.com>
1967
1968 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1969 SUBDIR_GCC_COMPILE_SRCS.
1970
1971 2018-07-09 Tom Tromey <tom@tromey.com>
1972
1973 * Makefile.in (init.c): Remove some unused sed rules.
1974
1975 2018-07-09 Tom Tromey <tom@tromey.com>
1976
1977 * Makefile.in (TSOBS): Remove.
1978 (INIT_FILES): Update.
1979 (LIBGDB_OBS): Update.
1980 (COMMON_SFILES): Add inflow.c.
1981 (SFILES): Remove inflow.c.
1982
1983 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1984
1985 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1986
1987 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1988
1989 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1990 get_saveloc_name, is_signal_frame_name, step_name,
1991 init_remote_name, create_addr_space_name,
1992 destroy_addr_space_name, search_unwind_table_name,
1993 find_dyn_list_name): Constify.
1994
1995 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1996
1997 * darwin-nat.c (darwin_pthread_kill): New function.
1998 (darwin_resume_thread): Use darwin_pthread_kill.
1999
2000 2018-07-05 Tom de Vries <tdevries@suse.de>
2001
2002 * macroexp.c (macro_buffer) <operator=>: New member function.
2003
2004 2018-07-04 Tom Tromey <tom@tromey.com>
2005
2006 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2007
2008 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2009
2010 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2011 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2012 * maint.c: Likewise.
2013 * top.c: Likewise.
2014
2015 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2016
2017 * NEWS: Create a new section for the next release branch.
2018 Rename the section of the current branch, now that it has
2019 been cut.
2020
2021 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2022
2023 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2024 * version.in: Bump version to 8.2.50.DATE-git.
2025
2026 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2027 Pedro Alves <palves@redhat.com>
2028
2029 * linux-nat.c (linux_init_ptrace): Rename to ...
2030 (linux_init_ptrace_procfs): ... this. Call
2031 linux_proc_init_warnings.
2032 (linux_nat_target::post_attach)
2033 (linux_nat_target::post_startup_inferior): Adjust.
2034 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2035 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2036
2037 2018-07-04 Tom de Vries <tdevries@suse.de>
2038
2039 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2040 check ...
2041 (read_comp_unit_head): ... here.
2042
2043 2018-07-03 Tom Tromey <tom@tromey.com>
2044
2045 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2046 (stop_tracing, tstatus_command)
2047 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2048 (print_one_static_tracepoint_marker): Update.
2049 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2050 std::vector.
2051 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2052 VEC.
2053 (all_tracepoints, static_tracepoints_here): Return std::vector.
2054
2055 2018-07-03 Tom Tromey <tom@tromey.com>
2056
2057 * common/ptid.c (ptid_equal): Remove.
2058 * common/ptid.h (ptid_equal): Don't declare.
2059 * ada-tasks.c: Update.
2060 * breakpoint.c: Update.
2061 * common/agent.c: Update.
2062 * corelow.c: Update.
2063 * darwin-nat-info.c: Update.
2064 * darwin-nat.c: Update.
2065 * dcache.c: Update.
2066 * dtrace-probe.c: Update.
2067 * dummy-frame.c: Update.
2068 * fbsd-nat.c: Update.
2069 * frame.c: Update.
2070 * gdbthread.h: Update.
2071 * gnu-nat.c: Update.
2072 * go32-nat.c: Update.
2073 * inf-loop.c: Update.
2074 * inf-ptrace.c: Update.
2075 * infcall.c: Update.
2076 * infcmd.c: Update.
2077 * inflow.c: Update.
2078 * infrun.c: Update.
2079 * linux-fork.c: Update.
2080 * linux-nat.c: Update.
2081 * linux-thread-db.c: Update.
2082 * mi/mi-cmd-var.c: Update.
2083 * mi/mi-interp.c: Update.
2084 * mi/mi-main.c: Update.
2085 * nto-procfs.c: Update.
2086 * ppc-linux-tdep.c: Update.
2087 * procfs.c: Update.
2088 * python/py-inferior.c: Update.
2089 * python/py-record-btrace.c: Update.
2090 * python/py-record.c: Update.
2091 * ravenscar-thread.c: Update.
2092 * regcache.c: Update.
2093 * remote-sim.c: Update.
2094 * remote.c: Update.
2095 * sol-thread.c: Update.
2096 * solib.c: Update.
2097 * target.c: Update.
2098 * tui/tui-stack.c: Update.
2099 * varobj.c: Update.
2100 * windows-nat.c: Update.
2101 * windows-tdep.c: Update.
2102
2103 2018-07-03 Tom Tromey <tom@tromey.com>
2104
2105 * common/ptid.c (ptid_match): Remove.
2106 * common/ptid.h (ptid_match): Don't declare.
2107 * fbsd-nat.c: Update.
2108 * infcmd.c: Update.
2109 * infrun.c: Update.
2110 * linux-nat.c: Update.
2111 * record-btrace.c: Update.
2112 * regcache.c: Update.
2113 * remote.c: Update.
2114
2115 2018-07-03 Tom Tromey <tom@tromey.com>
2116
2117 * common/ptid.c (ptid_tid_p): Remove.
2118 * common/ptid.h (ptid_tid_p): Don't declare.
2119 * sol-thread.c: Update.
2120
2121 2018-07-03 Tom Tromey <tom@tromey.com>
2122
2123 * common/ptid.c (ptid_lwp_p): Remove.
2124 * common/ptid.h (ptid_lwp_p): Don't declare.
2125 * fbsd-nat.c: Update.
2126 * linux-nat.c: Update.
2127 * nat/linux-procfs.c: Update.
2128 * nat/x86-linux-dregs.c: Update.
2129 * sol-thread.c: Update.
2130
2131 2018-07-03 Tom Tromey <tom@tromey.com>
2132
2133 * common/ptid.c (ptid_is_pid): Remove.
2134 * common/ptid.h (ptid_is_pid): Don't declare.
2135 * infrun.c: Update.
2136 * linux-nat.c: Update.
2137 * mi/mi-interp.c: Update.
2138 * remote.c: Update.
2139 * thread.c: Update.
2140
2141 2018-07-03 Tom Tromey <tom@tromey.com>
2142
2143 * common/ptid.c (ptid_get_tid): Remove.
2144 * common/ptid.h (ptid_get_tid): Don't declare.
2145 * ada-tasks.c: Update.
2146 * aix-thread.c: Update.
2147 * bsd-uthread.c: Update.
2148 * darwin-nat.c: Update.
2149 * fbsd-nat.c: Update.
2150 * i386-darwin-nat.c: Update.
2151 * infrun.c: Update.
2152 * linux-tdep.c: Update.
2153 * nto-procfs.c: Update.
2154 * ppc-ravenscar-thread.c: Update.
2155 * python/py-infthread.c: Update.
2156 * ravenscar-thread.c: Update.
2157 * sol-thread.c: Update.
2158 * sparc-ravenscar-thread.c: Update.
2159 * windows-nat.c: Update.
2160
2161 2018-07-03 Tom Tromey <tom@tromey.com>
2162
2163 * common/ptid.c (ptid_get_lwp): Remove.
2164 * common/ptid.h (ptid_get_lwp): Don't declare.
2165 * aarch64-linux-nat.c: Update.
2166 * ada-tasks.c: Update.
2167 * aix-thread.c: Update.
2168 * amd64-linux-nat.c: Update.
2169 * arm-linux-nat.c: Update.
2170 * corelow.c: Update.
2171 * fbsd-nat.c: Update.
2172 * fbsd-tdep.c: Update.
2173 * gnu-nat.c: Update.
2174 * i386-cygwin-tdep.c: Update.
2175 * i386-gnu-nat.c: Update.
2176 * i386-linux-nat.c: Update.
2177 * ia64-linux-nat.c: Update.
2178 * inf-ptrace.c: Update.
2179 * infrun.c: Update.
2180 * linux-fork.c: Update.
2181 * linux-nat.c: Update.
2182 * linux-tdep.c: Update.
2183 * linux-thread-db.c: Update.
2184 * mips-linux-nat.c: Update.
2185 * nat/aarch64-linux-hw-point.c: Update.
2186 * nat/aarch64-linux.c: Update.
2187 * nat/linux-btrace.c: Update.
2188 * nat/linux-osdata.c: Update.
2189 * nat/linux-procfs.c: Update.
2190 * nat/x86-linux-dregs.c: Update.
2191 * obsd-nat.c: Update.
2192 * ppc-fbsd-nat.c: Update.
2193 * ppc-linux-nat.c: Update.
2194 * procfs.c: Update.
2195 * python/py-infthread.c: Update.
2196 * ravenscar-thread.c: Update.
2197 * remote.c: Update.
2198 * s390-linux-nat.c: Update.
2199 * sol-thread.c: Update.
2200 * sol2-tdep.c: Update.
2201 * spu-linux-nat.c: Update.
2202 * x86-linux-nat.c: Update.
2203 * xtensa-linux-nat.c: Update.
2204
2205 2018-07-03 Tom Tromey <tom@tromey.com>
2206
2207 * common/ptid.c (ptid_get_pid): Remove.
2208 * common/ptid.h (ptid_get_pid): Don't declare.
2209 * aarch64-linux-nat.c: Update.
2210 * ada-lang.c: Update.
2211 * aix-thread.c: Update.
2212 * alpha-bsd-nat.c: Update.
2213 * amd64-fbsd-nat.c: Update.
2214 * amd64-linux-nat.c: Update.
2215 * arm-linux-nat.c: Update.
2216 * arm-nbsd-nat.c: Update.
2217 * auxv.c: Update.
2218 * break-catch-syscall.c: Update.
2219 * breakpoint.c: Update.
2220 * bsd-uthread.c: Update.
2221 * corelow.c: Update.
2222 * ctf.c: Update.
2223 * darwin-nat.c: Update.
2224 * fbsd-nat.c: Update.
2225 * fbsd-tdep.c: Update.
2226 * gcore.c: Update.
2227 * gnu-nat.c: Update.
2228 * hppa-nbsd-nat.c: Update.
2229 * hppa-obsd-nat.c: Update.
2230 * i386-fbsd-nat.c: Update.
2231 * ia64-linux-nat.c: Update.
2232 * inf-ptrace.c: Update.
2233 * infcmd.c: Update.
2234 * inferior.c: Update.
2235 * inferior.h: Update.
2236 * inflow.c: Update.
2237 * infrun.c: Update.
2238 * linux-fork.c: Update.
2239 * linux-nat.c: Update.
2240 * linux-tdep.c: Update.
2241 * linux-thread-db.c: Update.
2242 * m68k-bsd-nat.c: Update.
2243 * mi/mi-interp.c: Update.
2244 * mi/mi-main.c: Update.
2245 * mips-linux-nat.c: Update.
2246 * mips-nbsd-nat.c: Update.
2247 * mips64-obsd-nat.c: Update.
2248 * nat/aarch64-linux-hw-point.c: Update.
2249 * nat/aarch64-linux.c: Update.
2250 * nat/linux-btrace.c: Update.
2251 * nat/linux-osdata.c: Update.
2252 * nat/linux-procfs.c: Update.
2253 * nat/x86-linux-dregs.c: Update.
2254 * nto-procfs.c: Update.
2255 * obsd-nat.c: Update.
2256 * ppc-linux-nat.c: Update.
2257 * ppc-nbsd-nat.c: Update.
2258 * ppc-obsd-nat.c: Update.
2259 * proc-service.c: Update.
2260 * procfs.c: Update.
2261 * python/py-inferior.c: Update.
2262 * python/py-infthread.c: Update.
2263 * ravenscar-thread.c: Update.
2264 * record.c: Update.
2265 * remote-sim.c: Update.
2266 * remote.c: Update.
2267 * rs6000-nat.c: Update.
2268 * s390-linux-nat.c: Update.
2269 * sh-nbsd-nat.c: Update.
2270 * sol-thread.c: Update.
2271 * sparc-nat.c: Update.
2272 * sparc64-tdep.c: Update.
2273 * spu-linux-nat.c: Update.
2274 * spu-tdep.c: Update.
2275 * target-debug.h: Update.
2276 * target.c: Update.
2277 * thread.c: Update.
2278 * tid-parse.c: Update.
2279 * tracefile-tfile.c: Update.
2280 * vax-bsd-nat.c: Update.
2281 * windows-nat.c: Update.
2282 * x86-linux-nat.c: Update.
2283 * x86-nat.c: Update.
2284
2285 2018-07-03 Tom Tromey <tom@tromey.com>
2286
2287 * common/ptid.c (pid_to_ptid): Remove.
2288 * common/ptid.h (pid_to_ptid): Don't declare.
2289 * aix-thread.c: Update.
2290 * arm-linux-nat.c: Update.
2291 * common/ptid.c: Update.
2292 * common/ptid.h: Update.
2293 * corelow.c: Update.
2294 * ctf.c: Update.
2295 * darwin-nat.c: Update.
2296 * fbsd-nat.c: Update.
2297 * fork-child.c: Update.
2298 * gnu-nat.c: Update.
2299 * go32-nat.c: Update.
2300 * inf-ptrace.c: Update.
2301 * infcmd.c: Update.
2302 * inferior.c: Update.
2303 * infrun.c: Update.
2304 * linux-fork.c: Update.
2305 * linux-nat.c: Update.
2306 * nat/aarch64-linux-hw-point.c: Update.
2307 * nat/fork-inferior.c: Update.
2308 * nat/x86-linux-dregs.c: Update.
2309 * nto-procfs.c: Update.
2310 * obsd-nat.c: Update.
2311 * procfs.c: Update.
2312 * progspace.c: Update.
2313 * remote.c: Update.
2314 * rs6000-nat.c: Update.
2315 * s390-linux-nat.c: Update.
2316 * sol-thread.c: Update.
2317 * spu-linux-nat.c: Update.
2318 * target.c: Update.
2319 * top.c: Update.
2320 * tracefile-tfile.c: Update.
2321 * windows-nat.c: Update.
2322
2323 2018-07-03 Tom Tromey <tom@tromey.com>
2324
2325 * common/ptid.h (ptid_build): Don't declare.
2326 * common/ptid.c (ptid_build): Remove.
2327 * aix-thread.c: Update.
2328 * bsd-kvm.c: Update.
2329 * bsd-uthread.c: Update.
2330 * common/agent.c: Update.
2331 * common/ptid.c: Update.
2332 * common/ptid.h: Update.
2333 * corelow.c: Update.
2334 * darwin-nat.c: Update.
2335 * fbsd-nat.c: Update.
2336 * gnu-nat.c: Update.
2337 * linux-fork.c: Update.
2338 * linux-nat.c: Update.
2339 * linux-thread-db.c: Update.
2340 * nat/linux-osdata.c: Update.
2341 * nat/linux-procfs.c: Update.
2342 * nto-procfs.c: Update.
2343 * obsd-nat.c: Update.
2344 * proc-service.c: Update.
2345 * procfs.c: Update.
2346 * ravenscar-thread.c: Update.
2347 * remote-sim.c: Update.
2348 * remote.c: Update.
2349 * sol-thread.c: Update.
2350 * target.c: Update.
2351 * windows-nat.c: Update.
2352
2353 2018-07-03 Tom Tromey <tom@tromey.com>
2354
2355 * infrun.c (follow_exec): Use exit_inferior_silent.
2356 * inferior.c (exit_inferior_num_silent): Remove.
2357 * inferior.h (exit_inferior_num_silent): Don't declare.
2358
2359 2018-07-03 Tom Tromey <tom@tromey.com>
2360
2361 PR cli/23340:
2362 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2363 inferior_ptid on error.
2364
2365 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2366 Simon Marchi <simon.marchi@polymtl.ca>
2367
2368 PR tdep/8282
2369 * disasm.h (gdb_disassembler): Add
2370 `m_disassembler_options_holder'. member
2371 * disasm.c (get_all_disassembler_options): New function.
2372 (gdb_disassembler::gdb_disassembler): Use it.
2373 (gdb_buffered_insn_length_init_dis): Likewise.
2374 (gdb_buffered_insn_length): Adjust accordingly.
2375 (set_disassembler_options): Handle options with arguments.
2376 (show_disassembler_options_sfunc): Likewise. Add a leading new
2377 line if showing options with descriptions.
2378 (disassembler_options_completer): Adapt to using the
2379 `disasm_options_and_args_t' structure.
2380 * mips-tdep.c (mips_disassembler_options): New variable.
2381 (mips_disassembler_options_o32): Likewise.
2382 (mips_disassembler_options_n32): Likewise.
2383 (mips_disassembler_options_n64): Likewise.
2384 (gdb_print_insn_mips): Don't set `disassembler_options'.
2385 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2386 functions.
2387 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2388 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2389 `gdbarch_disassembler_options_implicit' and
2390 `gdbarch_valid_disassembler_options'.
2391 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2392 `disasm_options_and_args_t' structure.
2393 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2394 method.
2395 (valid_disassembler_options): Switch from `disasm_options_t' to
2396 the `disasm_options_and_args_t' structure.
2397 * NEWS: Document `set disassembler-options' support for the MIPS
2398 target.
2399 * gdbarch.h: Regenerate.
2400 * gdbarch.c: Regenerate.
2401
2402 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2403
2404 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2405
2406 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2407
2408 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2409 parameter in call to amd64_target_description.
2410 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2411 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2412 (amd64fbsd_init_abi): Likewise.
2413 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2414 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2415 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2416 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2417
2418 2018-06-29 Pedro Alves <palves@redhat.com>
2419
2420 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2421 "segments" parameter.
2422 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2423 (_initialize_amd64_tdep): Update call to
2424 amd64_create_target_description.
2425 (amd64_target_description): Add "segments" parameter. Adjust
2426 the implementation to use it.
2427 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2428 call to amd64_create_target_description.
2429 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2430 * gdb/arch/amd64.h (amd64_create_target_description): Add
2431 "segments" register.
2432 * gdb/arch/amd64.c (amd64_create_target_description): Add
2433 "segments" parameter. Call create_feature_i386_64bit_segments
2434 only if SEGMENTS is true.
2435 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2436 call to amd64_create_target_description.
2437
2438 2018-06-29 Pedro Alves <palves@redhat.com>
2439
2440 * thread.c (thread_target_id_str): New, factored out from ...
2441 (print_thread_info_1): ... here. Use it to compute the max
2442 "Target Id" column width.
2443
2444 2018-06-29 Pedro Alves <palves@redhat.com>
2445
2446 * remote.c (remote_target::extra_thread_info): Delete
2447 'display_buf' and 'n' locals. from the cache, regardless of
2448 packet mechanims is in use. Use cache for qThreadExtra and qP
2449 methods too.
2450
2451 2018-06-29 Pedro Alves <palves@redhat.com>
2452
2453 * blockframe.c (find_pc_sect_containing_function): New function.
2454 * breakpoint.c (print_breakpoint_location): Don't call
2455 find_pc_sect_function.
2456 * linespec.c (create_sals_line_offset): Record the location's
2457 symbol in the sal.
2458 * linespec.c (convert_address_location_to_sals): Fill in sal's
2459 symbol with find_pc_sect_containing_function.
2460 * symtab.c (find_function_start_sal): Rename to ...
2461 (find_function_start_sal_1): ... this.
2462 (find_function_start_sal): Reimplement as wrapper around
2463 find_function_start_sal_1, and use
2464 find_pc_sect_containing_function to fill in the sal's symbol.
2465 (find_function_start_sal(symbol*, bool)): Adjust.
2466 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2467 comments.
2468 (find_pc_sect_containing_function): Declare.
2469
2470 2018-06-29 Pedro Alves <palves@redhat.com>
2471
2472 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2473 true if the the location has no symbol.
2474
2475 2018-06-28 Tom Tromey <tom@tromey.com>
2476
2477 * NEWS: Mention --enable-codesign.
2478 * silent-rules.mk (ECHO_SIGN): New variable.
2479 * configure.ac: Add --enable-codesign.
2480 * configure: Rebuild.
2481 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2482 (gdb$(EXEEXT)): Optionally invoke codesign.
2483
2484 2018-06-28 Pedro Alves <palves@redhat.com>
2485
2486 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2487 comments.
2488 (switch_to_thread_no_regs): Adjust comment.
2489 * infcmd.c (stop_pc): Delete.
2490 (post_create_inferior, info_program_command): Replace references
2491 to stop_pc with references to thread_info->suspend.stop_pc.
2492 * inferior.h (stop_pc): Delete declaration.
2493 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2494 (handle_inferior_event_1, handle_signal_stop)
2495 (process_event_stop_test, keep_going_stepped_thread)
2496 (handle_step_into_function, handle_step_into_function_backward)
2497 (print_stop_location): Replace references to stop_pc with
2498 references to thread_info->suspend.stop_pc.
2499 (struct infcall_suspend_state) <stop_pc>: Delete field.
2500 (save_infcall_suspend_state, restore_infcall_suspend_state):
2501 Remove references to inf_stat->stop_pc.
2502 * linux-fork.c (fork_load_infrun_state): Likewise.
2503 * record-btrace.c (record_btrace_set_replay): Likewise.
2504 * record-full.c (record_full_goto_entry): Likewise.
2505 * remote.c (print_one_stopped_thread): Likewise.
2506 * target.c (target_resume): Extend comment.
2507 * thread.c (set_executing_thread): New.
2508 (set_executing): Use it.
2509 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2510 Remove references to stop_pc.
2511
2512 2018-06-28 Pedro Alves <palves@redhat.com>
2513
2514 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2515 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2516
2517 2018-06-28 Tom Tromey <tom@tromey.com>
2518
2519 * coffread.c (coff_symfile_finish): Update.
2520 * xcoffread.c (xcoff_symfile_finish): Update.
2521 * elfread.c (elf_symfile_finish): Update.
2522 * symfile.h (dwarf2_free_objfile): Don't declare.
2523 * dwarf2read.c (_initialize_dwarf2_read): Use
2524 register_objfile_data_with_cleanup.
2525 (dwarf2_free_objfile): Now static. Change signature.
2526
2527 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2528
2529 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2530 option "-o" to add-symbol-file-load to add an offset to each
2531 section's load address.
2532 * symfile.c (set_objfile_default_section_offset): New function.
2533
2534 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2535
2536 * symfile.c (add_symbol_file_command): Make sure that sections
2537 with the same name are sorted in the same order.
2538
2539 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2540
2541 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2542 require the second argument. If omitted, load sections at the
2543 addresses specified in the file.
2544
2545 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2546
2547 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2548 (_initialize_symfile): Add option "-o" to symbol-file to add an
2549 offset to each section of the symbol file.
2550
2551 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2552
2553 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2554
2555 2018-06-27 Tom Tromey <tom@tromey.com>
2556
2557 * stack.c (_initialize_stack): Update "func" help text.
2558
2559 2018-06-27 Tom Tromey <tom@tromey.com>
2560
2561 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2562 std::vector.
2563 (unwind_infopy_str, pyuw_create_unwind_info)
2564 (unwind_infopy_add_saved_register, pyuw_sniffer)
2565 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2566 Update.
2567 (struct saved_reg): Add constructor.
2568 <value>: Now a gdbpy_ref<>.
2569
2570 2018-06-27 Tom Tromey <tom@tromey.com>
2571
2572 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2573
2574 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2575
2576 * gdb-gdb.py.in: Format using autopep8.
2577
2578 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2579
2580 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2581 (type_lookup_function): Recognize CORE_ADDR values.
2582
2583 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2584
2585 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2586 print tag_name.
2587
2588 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2589
2590 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2591 <__lt__>: Add.
2592
2593 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2594
2595 * gdb-gdb.py: Move to...
2596 * gdb-gdb.py.in: ... here.
2597 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2598 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2599 dependencies.
2600 (distclean): Remove gdb-gdb.py when cleaning.
2601 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2602 * configure: Re-generate.
2603
2604 2018-06-27 Pedro Alves <palves@redhat.com>
2605
2606 * proc-service.c (get_ps_regcache): New.
2607 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2608 (ps_lsetfpregs): Use it.
2609
2610 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2611
2612 PR gdb/21695
2613 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2614 (dwarf_decode_lines_1): Adjust.
2615
2616 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2619 override.
2620 <info_proc>: Likewise.
2621
2622 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2623
2624 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2625 to windows_fetch_one_register, and only handle the case of
2626 fetching one register. Move the code that reloads the context
2627 and iterates over all registers if R is negative to...
2628 (windows_nat_target::fetch_registers): ... here.
2629 (do_windows_store_inferior_registers): Rename to
2630 windows_store_one_register, and only handle the case of storing
2631 one register. Move the code that handles the case where r is
2632 negative to...
2633 (windows_nat_target::store_registers) ... here.
2634
2635 2018-06-26 Tom Tromey <tom@tromey.com>
2636
2637 PR rust/22574:
2638 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2639 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2640 Update.
2641 (rust_internal_print_type): Add podata parameter.
2642 (rust_print_type): Update.
2643
2644 2018-06-26 Tom Tromey <tom@tromey.com>
2645
2646 * typeprint.h (struct print_offset_data) <update, finish,
2647 maybe_print_hole>: New methods.
2648 <indentation>: New constant.
2649 * typeprint.c (print_offset_data::indentation): Define.
2650 (print_offset_data::maybe_print_hole, print_offset_data::update)
2651 (print_offset_data::finish): Move from c-typeprint.c and rename.
2652 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2653 (print_spaces_filtered_with_print_options): Update.
2654 (c_print_type_union_field_offset, maybe_print_hole)
2655 (c_print_type_struct_field_offset): Move to typeprint.c and
2656 rename.
2657 (c_type_print_base_struct_union): Update.
2658
2659 2018-06-25 Pedro Alves <palves@redhat.com>
2660
2661 * gdbthread.h (thread_info_ref, delete_thread)
2662 (delete_thread_silent, first_thread_of_inferior)
2663 (any_thread_of_inferior, switch_to_thread)
2664 (enable_thread_stack_temporaries)
2665 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2666 (get_last_thread_stack_temporary)
2667 (value_in_thread_stack_temporaries, can_access_registers_thread):
2668 Spell out "struct thread_info" instead of just "thread_info".
2669 * inferior.h (notice_new_inferior): Likewise.
2670
2671 2018-06-25 Pedro Alves <palves@redhat.com>
2672
2673 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2674 pass thread_info pointer to delete_thread.
2675 (windows_nat_target::detach): Pass inferior pointer to
2676 detach_inferior.
2677 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2678 delete_thread.
2679 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2680 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2681 and pass a thread_info pointer to delete_thread.
2682 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2683 pass thread_info pointer to delete_thread.
2684 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2685 delete_thread_silent call.
2686 * procfs.c (procfs_target::detach): Pass inferior pointer to
2687 detach_inferior.
2688 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2689 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2690 delete_thread_silent call.
2691 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2692 pass thread_info pointer to delete_thread.
2693 (windows_nat_target::detach): Pass inferior pointer to
2694 delete_inferior.
2695
2696 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2697
2698 * regcache.c (readable_regcache::read_part): Fix asserts.
2699 (reg_buffer::raw_collect_part): New function.
2700 (regcache::write_part): Fix asserts.
2701 (reg_buffer::raw_supply_part): New function.
2702 (regcache::transfer_regset_register): New helper function.
2703 (regcache::transfer_regset): Call new functions.
2704 (regcache_supply_regset): Use gdb_byte*.
2705 (regcache::supply_regset): Likewise.
2706 (regcache_collect_regset): Likewise.
2707 (regcache::collect_regset): Likewise.
2708 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2709 (reg_buffer::raw_supply_part): Likewise.
2710 (regcache::transfer_regset_register): Likewise.
2711 (regcache::transfer_regset): Use gdb_byte*.
2712
2713 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2714
2715 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2716
2717 2018-06-21 Pedro Alves <palves@redhat.com>
2718
2719 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2720 instead of a ptid_t. All callers adjusted.
2721 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2722 adjusted.
2723 (print_ada_task_info, display_current_task_id, task_command_1):
2724 Adjust.
2725 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2726 inferior_thread.
2727 (breakpoint_kind): Adjust.
2728 (remove_breakpoints_pid): Rename to ...
2729 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2730 pointer. All callers adjusted.
2731 (bpstat_clear_actions): Use inferior_thread.
2732 (get_bpstat_thread): New.
2733 (bpstat_do_actions): Use it.
2734 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2735 to take a thread_info pointer. All callers adjusted.
2736 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2737 (breakpoint_re_set_thread): Use inferior_thread.
2738 * breakpoint.h (struct inferior): Forward declare.
2739 (bpstat_stop_status): Update.
2740 (remove_breakpoints_pid): Delete.
2741 (remove_breakpoints_inf): New.
2742 * bsd-uthread.c (bsd_uthread_target::wait)
2743 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2744 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2745 (maint_btrace_packet_history_cmd)
2746 (maint_btrace_clear_packet_history_cmd): Adjust.
2747 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2748 inferior_thread.
2749 * cli/cli-interp.c: Include "inferior.h".
2750 * common/refcounted-object.h (struct
2751 refcounted_object_ref_policy): New.
2752 * compile/compile-object-load.c: Include gdbthread.h.
2753 (store_regs): Use inferior_thread.
2754 * corelow.c (core_target::close): Use current_inferior.
2755 (core_target_open): Adjust to use first_thread_of_inferior and use
2756 the current inferior.
2757 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2758 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2759 <thread>: ... this new field. All references adjusted.
2760 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2761 Take a thread_info pointer instead of a ptid_t.
2762 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2763 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2764 thread_info pointer instead of a ptid_t.
2765 * elfread.c: Include "inferior.h".
2766 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2767 Use inferior_thread.
2768 * eval.c (evaluate_subexp): Likewise.
2769 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2770 inferior_thread.
2771 * gdb_proc_service.h (struct thread_info): Forward declare.
2772 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2773 <thread>: ... this new field. All references adjusted.
2774 * gdbarch.h, gdbarch.c: Regenerate.
2775 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2776 'thread' parameter. All implementations and callers adjusted.
2777 * gdbthread.h (thread_info) <set_running>: New method.
2778 (delete_thread, delete_thread_silent): Take a thread_info pointer
2779 instead of a ptid.
2780 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2781 (first_thread_of_process): Delete, replaced by ...
2782 (first_thread_of_inferior): ... this new function. All callers
2783 adjusted.
2784 (any_live_thread_of_process): Delete, replaced by ...
2785 (any_live_thread_of_inferior): ... this new function. All callers
2786 adjusted.
2787 (switch_to_thread, switch_to_no_thread): Declare.
2788 (is_executing): Delete.
2789 (enable_thread_stack_temporaries): Update comment.
2790 <enable_thread_stack_temporaries>: Take a thread_info pointer
2791 instead of a ptid_t. Incref the thread.
2792 <~enable_thread_stack_temporaries>: Decref the thread.
2793 <m_ptid>: Delete
2794 <m_thr>: New.
2795 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2796 (get_last_thread_stack_temporary)
2797 (value_in_thread_stack_temporaries, can_access_registers_thread):
2798 Take a thread_info pointer instead of a ptid_t. All callers
2799 adjusted.
2800 * infcall.c (get_call_return_value): Use inferior_thread.
2801 (run_inferior_call): Work with thread pointers instead of ptid_t.
2802 (call_function_by_hand_dummy): Work with thread pointers instead
2803 of ptid_t. Use thread_info_ref.
2804 * infcmd.c (proceed_thread_callback): Access thread's state
2805 directly.
2806 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2807 access thread's state directly.
2808 (continue_command): Use inferior_thread.
2809 (info_program_command): Use find_thread_ptid and access thread
2810 state directly.
2811 (proceed_after_attach_callback): Use thread state directly.
2812 (notice_new_inferior): Take a thread_info pointer instead of a
2813 ptid_t. All callers adjusted.
2814 (exit_inferior): Take an inferior pointer instead of a pid. All
2815 callers adjusted.
2816 (exit_inferior_silent): New.
2817 (detach_inferior): Delete.
2818 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2819 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2820 (detach_inferior_command, kill_inferior_command): Use
2821 find_inferior_id instead of valid_gdb_inferior_id and
2822 gdb_inferior_id_to_pid.
2823 (inferior_command): Use inferior and thread pointers.
2824 * inferior.h (struct thread_info): Forward declare.
2825 (notice_new_inferior): Take a thread_info pointer instead of a
2826 ptid_t. All callers adjusted.
2827 (detach_inferior): Delete declaration.
2828 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2829 instead of a pid. All callers adjusted.
2830 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2831 (valid_gdb_inferior_id): Delete.
2832 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2833 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2834 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2835 ...
2836 <inf>: ... this new field.
2837 <step_ptid>: Delete, replaced by ...
2838 <step_thread>: ... this new field.
2839 (get_displaced_stepping_state): Take an inferior pointer instead
2840 of a pid. All callers adjusted.
2841 (displaced_step_in_progress_any_inferior): Adjust.
2842 (displaced_step_in_progress_thread): Take a thread pointer instead
2843 of a ptid_t. All callers adjusted.
2844 (displaced_step_in_progress, add_displaced_stepping_state): Take
2845 an inferior pointer instead of a pid. All callers adjusted.
2846 (get_displaced_step_closure_by_addr): Adjust.
2847 (remove_displaced_stepping_state): Take an inferior pointer
2848 instead of a pid. All callers adjusted.
2849 (displaced_step_prepare_throw, displaced_step_prepare)
2850 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2851 All callers adjusted.
2852 (start_step_over): Adjust.
2853 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2854 displaced step queue.
2855 (do_target_resume): Adjust.
2856 (fetch_inferior_event): Use inferior_thread.
2857 (context_switch, get_inferior_stop_soon): Take an
2858 execution_control_state pointer instead of a ptid_t. All callers
2859 adjusted.
2860 (switch_to_thread_cleanup): Delete.
2861 (stop_all_threads): Use scoped_restore_current_thread.
2862 * inline-frame.c: Include "gdbthread.h".
2863 (inline_state) <inline_state>: Take a thread pointer instead of a
2864 ptid_t. All callers adjusted.
2865 <ptid>: Delete, replaced by ...
2866 <thread>: ... this new field.
2867 (find_inline_frame_state): Take a thread pointer instead of a
2868 ptid_t. All callers adjusted.
2869 (skip_inline_frames, step_into_inline_frame)
2870 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2871 pointer instead of a ptid_t. All callers adjusted.
2872 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2873 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2874 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2875 pointers directly.
2876 * linux-nat.c (get_detach_signal): Likewise.
2877 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2878 (thread_db_notice_clone): Adjust.
2879 (thread_db_find_new_threads_silently)
2880 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2881 a thread pointer instead of a ptid_t. All callers adjusted.
2882 * mi/mi-cmd-var.c: Include "inferior.h".
2883 (mi_cmd_var_update_iter): Update to use thread pointers.
2884 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2885 inferior directly.
2886 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2887 out to ...
2888 (mi_output_running): ... this new function.
2889 (mi_on_resume_1): Adjust to use it.
2890 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2891 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2892 directly.
2893 (interrupt_thread_callback): : Adjust to use thread and inferior
2894 pointers.
2895 * proc-service.c: Include "gdbthread.h".
2896 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2897 * progspace-and-thread.c: Include "inferior.h".
2898 * progspace.c: Include "inferior.h".
2899 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2900 hold a reference to an inferior_object.
2901 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2902 inferior_thread.
2903 * python/py-inferior.c (struct inferior_object): Give the type a
2904 tag name instead of a typedef.
2905 (python_on_normal_stop): No need to check if the current thread is
2906 listed.
2907 (inferior_to_inferior_object): Change return type to
2908 inferior_object. All callers adjusted.
2909 (find_thread_object): Delete, bits factored out to ...
2910 (thread_to_thread_object): ... this new function.
2911 * python/py-infthread.c (create_thread_object): Use
2912 inferior_to_inferior_object.
2913 (thpy_is_stopped): Use thread pointer directly.
2914 (gdbpy_selected_thread): Use inferior_thread.
2915 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2916 field, replaced with ...
2917 <thread>: ... this new field. All users adjusted.
2918 (btpy_insn_or_gap_new): Drop const.
2919 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2920 callers adjusted.
2921 * python/py-record.c: Include "gdbthread.h".
2922 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2923 a ptid_t. All callers adjusted.
2924 (gdbpy_current_recording): Use inferior_thread.
2925 * python/py-record.h (recpy_record_object) <ptid>: Delete
2926 field, replaced with ...
2927 <thread>: ... this new field. All users adjusted.
2928 (recpy_element_object) <ptid>: Delete
2929 field, replaced with ...
2930 <thread>: ... this new field. All users adjusted.
2931 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2932 a ptid_t. All callers adjusted.
2933 * python/py-threadevent.c: Include "gdbthread.h".
2934 (get_event_thread): Use thread_to_thread_object.
2935 * python/python-internal.h (struct inferior_object): Forward
2936 declare.
2937 (find_thread_object, find_inferior_object): Delete declarations.
2938 (thread_to_thread_object, inferior_to_inferior_object): New
2939 declarations.
2940 * record-btrace.c: Include "inferior.h".
2941 (require_btrace_thread): Use inferior_thread.
2942 (record_btrace_frame_sniffer)
2943 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2944 (get_thread_current_frame): Use scoped_restore_current_thread and
2945 switch_to_thread.
2946 (get_thread_current_frame): Use thread pointer directly.
2947 (record_btrace_replay_at_breakpoint): Use thread's inferior
2948 pointer directly.
2949 * record-full.c: Include "inferior.h".
2950 * regcache.c: Include "gdbthread.h".
2951 (get_thread_arch_regcache): Use the inferior's address space
2952 directly.
2953 (get_thread_regcache, registers_changed_thread): New.
2954 * regcache.h (get_thread_regcache(thread_info *thread)): New
2955 overload.
2956 (registers_changed_thread): New.
2957 (remote_target) <remote_detach_1>: Swap order of parameters.
2958 (remote_add_thread): <remote_add_thread>: Return the new thread.
2959 (get_remote_thread_info(ptid_t)): New overload.
2960 (remote_target::remote_notice_new_inferior): Use thread pointers
2961 directly.
2962 (remote_target::process_initial_stop_replies): Use
2963 thread_info::set_running.
2964 (remote_target::remote_detach_1, remote_target::detach)
2965 (extended_remote_target::detach): Adjust.
2966 * stack.c (frame_show_address): Use inferior_thread.
2967 * target-debug.h (target_debug_print_thread_info_pp): New.
2968 * target-delegates.c: Regenerate.
2969 * target.c (default_thread_address_space): Delete.
2970 (memory_xfer_partial_1): Use current_inferior.
2971 (target_detach): Use current_inferior.
2972 (target_thread_address_space): Delete.
2973 (generic_mourn_inferior): Use current_inferior.
2974 * target.h (struct target_ops) <thread_address_space>: Delete.
2975 (target_thread_address_space): Delete.
2976 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2977 pointers directly.
2978 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2979 thread pointer instead of a ptid_t. Adjust all callers.
2980 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2981 (first_thread_of_process): Delete, replaced by ...
2982 (first_thread_of_inferior): ... this new function. All callers
2983 adjusted.
2984 (any_thread_of_process): Rename to ...
2985 (any_thread_of_inferior): ... this, and take an inferior pointer.
2986 (any_live_thread_of_process): Rename to ...
2987 (any_live_thread_of_inferior): ... this, and take an inferior
2988 pointer.
2989 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2990 (value_in_thread_stack_temporaries)
2991 (get_last_thread_stack_temporary): Take a thread pointer instead
2992 of a ptid_t. Adjust all callers.
2993 (thread_info::set_running): New.
2994 (validate_registers_access): Use inferior_thread.
2995 (can_access_registers_ptid): Rename to ...
2996 (can_access_registers_thread): ... this, and take a thread
2997 pointer.
2998 (print_thread_info_1): Adjust to compare thread pointers instead
2999 of ptids.
3000 (switch_to_no_thread, switch_to_thread): Make extern.
3001 (scoped_restore_current_thread::~scoped_restore_current_thread):
3002 Use m_thread pointer directly.
3003 (scoped_restore_current_thread::scoped_restore_current_thread):
3004 Use inferior_thread.
3005 (thread_command): Use thread pointer directly.
3006 (thread_num_make_value_helper): Use inferior_thread.
3007 * top.c (execute_command): Use inferior_thread.
3008 * tui/tui-interp.c: Include "inferior.h".
3009 * varobj.c (varobj_create): Use inferior_thread.
3010 (value_of_root_1): Use find_thread_global_id instead of
3011 global_thread_id_to_ptid.
3012
3013 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3014
3015 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3016 possible.
3017 (regcache::write_part): Likewise.
3018 (readable_regcache::cooked_read_part): Update comment.
3019 (readable_regcache::cooked_write_part): Likewise.
3020 * regcache.h: (readable_regcache::read_part): Likewise.
3021 (regcache::write_part): Likewise.
3022
3023 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3024 Dirk Schubert <dirk.schubert@arm.com>
3025
3026 * aarch64-linux-nat.c (post_attach): New.
3027 (aarch64_linux_nat_target::post_attach): Override post_attach to
3028 record the number of hardware debug registers.
3029
3030 2018-06-20 Tom Tromey <tom@tromey.com>
3031
3032 * python/py-param.c (add_setshow_generic): Make parameters const.
3033 (parmpy_init): Update.
3034
3035 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3036
3037 * regcache.h (regcache_cooked_read_ftype): Rename to...
3038 (register_read_ftype): ...this, change type to function_view.
3039 (class reg_buffer) <save>: Remove src parameter.
3040 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3041 parameter non-const in first overload. Remove src parameter in
3042 second overload.
3043 * regcache.c (do_cooked_read): Remove.
3044 (readonly_detached_regcache::readonly_detached_regcache): Make
3045 parameter non-const, adjust call to other constructor.
3046 (reg_buffer::save): Remove src parameter.
3047 * frame.c (do_frame_register_read): Remove.
3048 (frame_save_as_regcache): Use lambda function.
3049 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3050 parameter to ppu2spu_data *.
3051 (ppu2spu_sniffer): Use lambda function.
3052
3053 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3054
3055 * record-full.c (record_full_target::insert_breakpoint): Remove
3056 "struct" keyword, add const.
3057
3058 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3059
3060 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3061 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3062 * configure.ac: Remove AC_PREREQ, add missing quoting.
3063 * gnulib/configure.ac: Modernize usage of
3064 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3065 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3066 (AUTOMAKE_VERSION): Bump to 1.15.1.
3067 * configure: Re-generate.
3068 * config.in: Re-generate.
3069 * aclocal.m4: Re-generate.
3070 * gnulib/aclocal.m4: Re-generate.
3071 * gnulib/config.in: Re-generate.
3072 * gnulib/configure: Re-generate.
3073 * gnulib/import/Makefile.in: Re-generate.
3074
3075 2018-06-19 Pedro Alves <palves@redhat.com>
3076
3077 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3078 (lookup_minimal_symbol_by_pc_section): ... here with
3079 gdb_assert_not_reached added.
3080
3081 2018-06-19 Pedro Alves <palves@redhat.com>
3082
3083 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3084 parameter with a block parameter. Compare location's block symbol
3085 with the frame's block instead of addresses.
3086 (skip_inline_frames): Pass the current block instead of the
3087 frame's address. Break out as soon as we determine the frame
3088 should not be skipped.
3089
3090 2018-06-18 Tom Tromey <tom@tromey.com>
3091
3092 * solib-aix.c (solib_aix_get_section_offsets): Return
3093 unique_xmalloc_ptr.
3094 (solib_aix_solib_create_inferior_hook): Update.
3095
3096 2018-06-18 Tom Tromey <tom@tromey.com>
3097
3098 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3099
3100 2018-06-18 Tom Tromey <tom@tromey.com>
3101
3102 * solib-frv.c (frv_relocate_main_executable): Use
3103 unique_xmalloc_ptr.
3104 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3105 unique_xmalloc_ptr.
3106
3107 2018-06-18 Tom Tromey <tom@tromey.com>
3108
3109 * objfiles.h (inhibit_section_map_updates): Update.
3110 (resume_section_map_updates, resume_section_map_updates_cleanup):
3111 Remove.
3112 * solib-svr4.c (svr4_handle_solib_event): Update.
3113 * objfiles.c (inhibit_section_map_updates): Return
3114 scoped_restore_tmpl<int>.
3115 (resume_section_map_updates, resume_section_map_updates_cleanup):
3116 Remove.
3117
3118 2018-06-18 Tom Tromey <tom@tromey.com>
3119
3120 * valprint.h (read_string): Update.
3121 * valprint.c (read_string): Change type of "buffer".
3122 (val_print_string): Update.
3123 * python/py-value.c (valpy_string): Update.
3124 * language.h (struct language_defn) <la_get_string>: Change
3125 type of "buffer".
3126 (default_get_string, c_get_string): Update.
3127 * language.c (default_get_string): Change type of "buffer".
3128 * guile/scm-value.c (gdbscm_value_to_string): Update.
3129 * c-lang.c (c_get_string): Change type of "buffer".
3130
3131 2018-06-18 Tom Tromey <tom@tromey.com>
3132
3133 * ser-mingw.c (struct pipe_state_destroyer): New.
3134 (pipe_state_up): New typedef.
3135 (cleanup_pipe_state): Remove.
3136 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3137
3138 2018-06-18 Tom Tromey <tom@tromey.com>
3139
3140 * rust-lang.h (rust_yyerror): Don't declare.
3141 * rust-lang.c (rust_language_defn): Update.
3142 * rust-exp.y (yyerror): Now static.
3143 * parse.c (parse_exp_in_context_1): Update.
3144 * p-lang.h (p_yyerror): Don't declare.
3145 * p-lang.c (p_language_defn): Update.
3146 * p-exp.y (yyerror): Now static.
3147 * opencl-lang.c (opencl_language_defn): Update.
3148 * objc-lang.c (objc_language_defn): Update.
3149 * m2-lang.h (m2_yyerror): Don't declare.
3150 * m2-lang.c (m2_language_defn): Update.
3151 * m2-exp.y (yyerror): Now static.
3152 * language.h (struct language_defn) <la_error>: Remove.
3153 * language.c (unk_lang_error): Remove.
3154 (unknown_language_defn, auto_language_defn): Remove.
3155 * go-lang.h (go_yyerror): Don't declare.
3156 * go-lang.c (go_language_defn): Update.
3157 * go-exp.y (yyerror): Now static.
3158 * f-lang.h (f_yyerror): Don't declare.
3159 * f-lang.c (f_language_defn): Update.
3160 * f-exp.y (yyerror): Now static.
3161 * d-lang.h (d_yyerror): Don't declare.
3162 * d-lang.c (d_language_defn): Update.
3163 * d-exp.y (yyerror): Now static.
3164 * c-lang.h (c_yyerror): Don't declare.
3165 * c-lang.c (c_language_defn, cplus_language_defn)
3166 (asm_language_defn, minimal_language_defn): Update.
3167 * c-exp.y (yyerror): Now static.
3168 * ada-lang.h (ada_yyerror): Don't declare.
3169 * ada-lang.c (ada_language_defn): Update.
3170 * ada-exp.y (yyerror): Now static.
3171
3172 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3173
3174 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3175 (store_sveregs_to_thread): Likewise.
3176 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3177 (aarch64_linux_store_inferior_registers): Likewise.
3178 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3179 function.
3180 (aarch64_sve_regs_copy_to_regcache): Likewise.
3181 (aarch64_sve_regs_copy_from_regcache): Likewise.
3182 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3183 declaration.
3184 (aarch64_sve_regs_copy_to_regcache): Likewise.
3185 (aarch64_sve_regs_copy_from_regcache): Likewise.
3186 (sve_context): Structure from Linux headers.
3187 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3188 (SVE_SIG_ZREG_SIZE): Likewise.
3189 (SVE_SIG_PREG_SIZE): Likewise.
3190 (SVE_SIG_FFR_SIZE): Likewise.
3191 (SVE_SIG_REGS_OFFSET): Likewise.
3192 (SVE_SIG_ZREGS_OFFSET): Likewise.
3193 (SVE_SIG_ZREG_OFFSET): Likewise.
3194 (SVE_SIG_ZREGS_SIZE): Likewise.
3195 (SVE_SIG_PREGS_OFFSET): Likewise.
3196 (SVE_SIG_PREG_OFFSET): Likewise.
3197 (SVE_SIG_PREGS_SIZE): Likewise.
3198 (SVE_SIG_FFR_OFFSET): Likewise.
3199 (SVE_SIG_REGS_SIZE): Likewise.
3200 (SVE_SIG_CONTEXT_SIZE): Likewise.
3201 (SVE_PT_REGS_MASK): Likewise.
3202 (SVE_PT_REGS_FPSIMD): Likewise.
3203 (SVE_PT_REGS_SVE): Likewise.
3204 (SVE_PT_VL_INHERIT): Likewise.
3205 (SVE_PT_VL_ONEXEC): Likewise.
3206 (SVE_PT_REGS_OFFSET): Likewise.
3207 (SVE_PT_FPSIMD_OFFSET): Likewise.
3208 (SVE_PT_FPSIMD_SIZE): Likewise.
3209 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3210 (SVE_PT_SVE_PREG_SIZE): Likewise.
3211 (SVE_PT_SVE_FFR_SIZE): Likewise.
3212 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3213 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3214 (__SVE_SIG_TO_PT): Likewise.
3215 (SVE_PT_SVE_OFFSET): Likewise.
3216 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3217 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3218 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3219 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3220 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3221 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3222 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3223 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3224 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3225 (SVE_PT_SVE_SIZE): Likewise.
3226 (SVE_PT_SIZE): Likewise.
3227 (HAS_SVE_STATE): New define.
3228
3229 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3230
3231 * nat/aarch64-sve-linux-sigcontext.h: New file.
3232 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3233 new files.
3234 (SVE_VQ_MIN): Likewise.
3235 (SVE_VQ_MAX): Likewise.
3236 (SVE_VL_MIN): Likewise.
3237 (SVE_VL_MAX): Likewise.
3238 (SVE_NUM_ZREGS): Likewise.
3239 (SVE_NUM_PREGS): Likewise.
3240 (sve_vl_valid): Likewise.
3241 (struct user_sve_header): Likewise.
3242
3243 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3244 Richard Bunt <Richard.Bunt@arm.com>
3245
3246 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3247 was requested by GDB.
3248
3249 2018-06-15 Tom de Vries <tdevries@suse.de>
3250
3251 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3252
3253 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3254
3255 * gnulib/update-gnulib.sh: Print expected versions of
3256 autoconf/aclocal.
3257
3258 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3259
3260 * arch-utils.c (default_type_align): Use type_length_units.
3261 * gdbtypes.c (type_align): Use type_length_units.
3262
3263 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3264
3265 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3266 of 'define' command.
3267
3268 2018-06-14 Tom de Vries <tdevries@suse.de>
3269
3270 PR cli/22573
3271 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3272 get_no_prettyformat_print_options.
3273
3274 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3275
3276 * sparc-nat.h: Include target.h.
3277 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3278 <fetch_registers>: Remove this argument in function call.
3279 <store_registers>: Remove this argument in function call, remove
3280 extra semicolon.
3281 <low_forget_process>: Call sparc64_forget_process instead of
3282 sparc_forget_process.
3283
3284 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3285
3286 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3287 (procfs_target::make_corefile_notes): Adjust to new
3288 target_read_alloc return type.
3289
3290 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3291 Stephen Roberts <stephen.roberts@arm.com>
3292
3293 PR gdb/22882
3294 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3295 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3296 Move should_notify_stop local into more inner scope.
3297
3298 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3299 Stephen Roberts <stephen.roberts@arm.com>
3300
3301 PR gdb/22882
3302 * infrun.c (resume_1): Add call to mark_async_event_handler.
3303
3304 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3305
3306 * infrun.c (do_target_wait): Change old version of $pc printed.
3307
3308 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3309
3310 * dwarf2read.c (read_index_from_section): Rename to...
3311 (read_gdb_index_from_section): ... this, update all callers.
3312 (dwarf2_read_index): Rename to...
3313 (dwarf2_read_gdb_index): ... this, update all callers.
3314
3315 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3316
3317 * gdb/hppa-linux-nat.c
3318 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3319 hppa_linux_nat_target::fetch_registers.
3320
3321 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3322
3323 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3324 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3325 (AARCH64_DWARF_SVE_FFR): Likewise.
3326 (AARCH64_DWARF_SVE_P0): Likewise.
3327 (AARCH64_DWARF_SVE_Z0): Likewise.
3328
3329 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3330
3331 * common/common-regcache.h (raw_compare): New function.
3332 * regcache.c (regcache::raw_compare): Likewise.
3333 * regcache.h (regcache::raw_compare): New declaration.
3334
3335 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3336
3337 * common/common-regcache.h (reg_buffer_common): New structure.
3338 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3339 (reg_buffer::raw_supply): Likewise.
3340 (reg_buffer::raw_supply_integer): Likewise.
3341 (reg_buffer::raw_supply_zeroed): Likewise.
3342 (reg_buffer::raw_collect): Likewise.
3343 (reg_buffer::raw_collect_integer): Likewise.
3344 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3345 (reg_buffer::raw_supply): Likewise.
3346 (reg_buffer::raw_supply_integer): Likewise.
3347 (reg_buffer::raw_supply_zeroed): Likewise.
3348 (reg_buffer::raw_collect): Likewise.
3349 (reg_buffer::raw_collect_integer): Likewise.
3350
3351 2018-06-10 Tom Tromey <tom@tromey.com>
3352
3353 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3354 (class remote_state) <stop_reply_queue>: Now std::vector.
3355 (remote_state::~remote_state)
3356 (remote_target::stop_reply_queue_length): Update.
3357 (struct queue_iter_param, remove_child_of_pending_fork)
3358 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3359 (check_pending_event_prevents_wildcard_vcont_callback)
3360 (remove_stop_reply_for_inferior)
3361 (remove_stop_reply_of_remote_state)
3362 (remote_notif_remove_once_on_match)
3363 (stop_reply_match_ptid_and_ws)
3364 (remote_kill_child_of_pending_fork): Remove.
3365 (remote_target::remove_new_fork_children)
3366 (remote_target::check_pending_events_prevent_wildcard_vcont)
3367 (remote_target::discard_pending_stop_replies)
3368 (remote_target::discard_pending_stop_replies_in_queue)
3369 (remote_target::remote_notif_remove_queued_reply)
3370 (remote_target::queued_stop_reply)
3371 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3372 (remote_target::wait, remote_target::kill_new_fork_children)
3373 (remote_target::async): Update.
3374
3375 2018-06-10 Tom Tromey <tom@tromey.com>
3376
3377 * record-full.c (record_full_arch_list_cleanups): Remove.
3378 (record_full_message): Use try/catch.
3379 (record_full_wait_cleanups): Remove.
3380 (record_full_wait_1): Use try/catch.
3381 (record_full_restore): Likewise.
3382
3383 2018-06-10 Tom Tromey <tom@tromey.com>
3384
3385 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3386 declare VEC. Add constructor.
3387 <in_target_beneath>: Now bool.
3388 (record_full_breakpoints): Now a std::vector, static.
3389 (record_full_sync_record_breakpoints)
3390 (record_full_init_record_breakpoints)
3391 (record_full_target::insert_breakpoint)
3392 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3393
3394 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3395
3396 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3397 * serial.c (serial_interface_lookup): Remove struct keyword.
3398
3399 2018-06-10 Tom Tromey <tom@tromey.com>
3400
3401 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3402 method.
3403 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3404 a method.
3405 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3406 method.
3407 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3408 "beneath" as a method.
3409 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3410 Use "beneath" as a method.
3411
3412 2018-06-10 Tom Tromey <tom@tromey.com>
3413
3414 * tracefile.c (struct trace_file_writer_deleter): New.
3415 <operator()>: Rename from trace_file_writer_xfree.
3416 (trace_file_writer_up): New typedef.
3417 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3418
3419 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3420
3421 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3422 <m_registers, m_register_status>: Change type to
3423 std::unique_ptr.
3424 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3425 XCNEWVEC.
3426
3427 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3428
3429 * common/common-regcache.h (enum register_status): Add
3430 underlying type "signed char".
3431 * regcache.h (reg_buffer) <m_register_status>: Change type to
3432 register_status *.
3433 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3434 register_status instead of signed char.
3435 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3436 (reg_buffer::get_register_status): Remove cast.
3437 (readable_regcache::raw_read): Remove cast.
3438 (readable_regcache::cooked_read): Remove cast.
3439
3440 2018-06-09 Tom Tromey <tom@tromey.com>
3441
3442 * source.c (reverse_search_command, forward_search_command): Use
3443 scoped_fd.
3444
3445 2018-06-09 Tom Tromey <tom@tromey.com>
3446
3447 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3448 (serial_ops_list): Now static, std::vector.
3449 (serial_interface_lookup, serial_add_interface): Update.
3450
3451 2018-06-09 Tom Tromey <tom@tromey.com>
3452
3453 * dwarf2read.c (process_cu_includes): Update.
3454 (process_full_comp_unit): Update.
3455 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3456 std::vector.
3457
3458 2018-06-08 Paul Koning <paul_koning@dell.com>
3459
3460 PR gdb/23252
3461
3462 * python/python.c (do_start_initialization):
3463 Avoid call to internal Python API.
3464 (init__gdb_module): New function.
3465
3466 2018-06-08 Gary Benson <gbenson@redhat.com>
3467
3468 * linux-thread-db.c (valprint.h): New include.
3469 (struct check_thread_db_info): New structure.
3470 (check_thread_db_on_load, tdb_testinfo): New static globals.
3471 (check_thread_db, check_thread_db_callback): New functions.
3472 (try_thread_db_load_1): Run integrity checks if requested.
3473 (maintenance_check_libthread_db): New function.
3474 (_initialize_thread_db): Register "maint check libthread-db"
3475 and "maint set/show check-libthread-db".
3476 * NEWS: Mention the above new commands.
3477
3478 2018-06-08 Tom Tromey <tom@tromey.com>
3479
3480 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3481 now a method.
3482
3483 2018-06-08 Tom Tromey <tom@tromey.com>
3484
3485 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3486
3487 2018-06-08 Tom Tromey <tom@tromey.com>
3488
3489 * common/btrace-common.h (struct btrace_data): Add constructor,
3490 destructor, move assignment operator.
3491 <empty, clear, fini>: New methods.
3492 <format>: Initialize.
3493 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3494 (btrace_data_empty): Don't declare.
3495 * common/btrace-common.c (btrace_data_init): Remove.
3496 (btrace_data::fini): Rename from btrace_data_fini.
3497 (btrace_data::empty): Rename from btrace_data_empty.
3498 (btrace_data::clear): Rename from btrace_data_clear. Return
3499 bool.
3500 * btrace.h (make_cleanup_btrace_data): Don't declare.
3501 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3502 (parse_xml_btrace): Update.
3503 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3504 (maint_btrace_clear_packet_history_cmd): Update.
3505
3506 2018-06-07 Pedro Alves <palves@redhat.com>
3507
3508 * target.h (target_ops) <beneath>: Now a method. All references
3509 updated.
3510 (class target_stack): New.
3511 * target.c (g_target_stack): New.
3512 (g_current_top_target): Delete.
3513 (current_top_target): Get the top target out of g_target_stack.
3514 (target_stack::push, target_stack::unpush): New.
3515 (push_target, unpush_target): Reimplement.
3516 (target_is_pushed): Reimplement in terms of g_target_stack.
3517 (target_ops::beneath, target_stack::find_beneath): New.
3518
3519 2018-06-07 Pedro Alves <palves@redhat.com>
3520
3521 * target.h (find_target_beneath): Delete declaration.
3522 * target.c (find_target_beneath): Delete definition.
3523 * aix-thread.c: All callers of find_target_beneath adjusted to
3524 call target_ops::beneath instead.
3525 * bsd-uthread.c: Likewise.
3526 * linux-thread-db.c: Likewise.
3527 * ravenscar-thread.c: Likewise.
3528 * sol-thread.c: Likewise.
3529 * spu-multiarch.c: Likewise.
3530
3531 2018-06-07 Pedro Alves <palves@redhat.com>
3532
3533 * target.h (target_ops) <beneath>: Now a method. All references
3534 updated.
3535 (target_ops) <m_beneath>: New.
3536 * target.c (target_ops::beneath): New.
3537 * corelow.c: Adjust all references to target_ops::beneath.
3538 * linux-thread-db.c: Likewise.
3539 * make-target-delegates: Likewise.
3540 * record-btrace.c: Likewise.
3541 * record-full.c: Likewise.
3542 * remote.c: Likewise.
3543 * target.c: Likewise.
3544 * target-delegates.c: Regenerate.
3545
3546 2018-06-07 Pedro Alves <palves@redhat.com>
3547
3548 * target.h (target_stack): Delete.
3549 (current_top_target): Declare function.
3550 * target.c (target_stack): Delete.
3551 (g_current_top_target): New.
3552 (current_top_target): New function.
3553 * auxv.c: Use current_top_target instead of target_stack
3554 throughout.
3555 * avr-tdep.c: Likewise.
3556 * breakpoint.c: Likewise.
3557 * corefile.c: Likewise.
3558 * elfread.c: Likewise.
3559 * eval.c: Likewise.
3560 * exceptions.c: Likewise.
3561 * frame.c: Likewise.
3562 * gdbarch-selftests.c: Likewise.
3563 * gnu-v3-abi.c: Likewise.
3564 * ia64-tdep.c: Likewise.
3565 * ia64-vms-tdep.c: Likewise.
3566 * infcall.c: Likewise.
3567 * infcmd.c: Likewise.
3568 * infrun.c: Likewise.
3569 * linespec.c: Likewise.
3570 * linux-tdep.c: Likewise.
3571 * minsyms.c: Likewise.
3572 * ppc-linux-nat.c: Likewise.
3573 * ppc-linux-tdep.c: Likewise.
3574 * procfs.c: Likewise.
3575 * regcache.c: Likewise.
3576 * remote.c: Likewise.
3577 * rs6000-tdep.c: Likewise.
3578 * s390-linux-nat.c: Likewise.
3579 * s390-tdep.c: Likewise.
3580 * solib-aix.c: Likewise.
3581 * solib-darwin.c: Likewise.
3582 * solib-dsbt.c: Likewise.
3583 * solib-spu.c: Likewise.
3584 * solib-svr4.c: Likewise.
3585 * solib-target.c: Likewise.
3586 * sparc-tdep.c: Likewise.
3587 * sparc64-tdep.c: Likewise.
3588 * spu-tdep.c: Likewise.
3589 * symfile.c: Likewise.
3590 * symtab.c: Likewise.
3591 * target-descriptions.c: Likewise.
3592 * target-memory.c: Likewise.
3593 * target.c: Likewise.
3594 * target.h: Likewise.
3595 * tracefile-tfile.c: Likewise.
3596 * tracepoint.c: Likewise.
3597 * valops.c: Likewise.
3598 * valprint.c: Likewise.
3599 * value.c: Likewise.
3600 * windows-tdep.c: Likewise.
3601 * mi/mi-main.c: Likewise.
3602
3603 2018-06-07 Tom Tromey <tom@tromey.com>
3604
3605 * valprint.h (build_address_symbolic): Declare.
3606 * printcmd.c (print_address_symbolic): Update.
3607 (build_address_symbolic): Change "name" and "filename" to
3608 std::string.
3609 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3610 Update.
3611 * defs.h (build_address_symbolic): Remove declaration.
3612
3613 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3614
3615 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3616 (aarch64_vnv_type): Add function.
3617 (aarch64_pseudo_register_name): Add V regs for SVE.
3618 (aarch64_pseudo_register_type): Likewise.
3619 (aarch64_pseudo_register_reggroup_p): Likewise.
3620 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3621 (aarch64_pseudo_read_value): Add V regs for SVE.
3622 (aarch64_pseudo_write_2): Use V0 offset for SVE
3623 (aarch64_pseudo_write): Add V regs for SVE.
3624 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3625
3626 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3627
3628 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3629 (sve_vl_from_vq): Likewise.
3630
3631 2018-06-05 Tom Tromey <tom@tromey.com>
3632
3633 * cli/cli-cmds.c (show_version): Update.
3634 * top.c (print_gdb_version): Add "interactive" parameter.
3635 Update.
3636 * main.c (captured_main_1): Update.
3637 * top.h (print_gdb_version): Add "interactive" parameter and a
3638 comment.
3639
3640 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3641
3642 * common/enum-flags.h: Add trailing semicolon to example in
3643 comment.
3644
3645 2018-06-05 Tom Tromey <tom@tromey.com>
3646
3647 PR cli/12326:
3648 * NEWS: Add entry about pager.
3649 * utils.c (pagination_disabled_for_command): New global.
3650 (prompt_for_continue): Allow "c" response to prompt.
3651 (reinitialize_more_filter): Clear
3652 pagination_disabled_for_command.
3653 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3654
3655 2018-06-04 Tom Tromey <tom@tromey.com>
3656
3657 * ada-lang.h (ada_lookup_symbol_list): Update.
3658 * ada-lang.c (resolve_subexp): Update.
3659 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3660 parameter.
3661 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3662 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3663 results parameter to std::vector.
3664 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3665 Update.
3666 * ada-exp.y (block_lookup): Update.
3667 (select_possible_type_sym): Change type of syms. Remove nsyms
3668 parameter.
3669 (write_var_or_type, write_name_assoc): Update.
3670
3671 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3672
3673 * windows-nat.c (windows_nat_target::xfer_partial): Return
3674 TARGET_XFER_E_IO if we need to delegate to the target beneath
3675 but BENEATH is NULL.
3676
3677 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3678
3679 * Makefile.in (config.status): Add configure.nat as a
3680 dependency.
3681
3682 2018-06-04 Tom Tromey <tom@tromey.com>
3683
3684 * cp-name-parser.y (cpname_state): Add method declarations.
3685 (HANDLE_QUAL): Update.
3686 (cpname_state::d_grab, cpname_state::fill_comp)
3687 (cpname_state::make_operator, cpname_state::make_dtor)
3688 (cpname_state::make_builtin_type, cpname_state::make_name)
3689 (cpname_state::d_qualify, cpname_state::d_int_type)
3690 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3691 (%union): Move earlier.
3692
3693 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3694
3695 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3696
3697 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3698
3699 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3700 (aarch64_pseudo_write_1): Likewise.
3701 (aarch64_pseudo_read_value): Use helper.
3702 (aarch64_pseudo_write): Likewise.
3703
3704 2018-06-04 Pedro Alves <palves@redhat.com>
3705
3706 * darwin-nat.c (darwin_ops): Delete.
3707 (darwin_attach_pid): Use get_native_target.
3708
3709 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3710
3711 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3712 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3713
3714 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3715
3716 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3717 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3718 (aarch64_gdbarch_init): Check for SVE.
3719 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3720
3721 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3722
3723 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3724 * aarch64-tdep.h (aarch64_read_description): Likewise.
3725 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3726 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3727 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3728 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3729 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3730
3731 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3732
3733 * value.c (value_fetch_lazy_bitfield): New.
3734 (value_fetch_lazy_memory): New.
3735 (value_fetch_lazy_register): New.
3736 (value_fetch_lazy): Factor out to smaller functions.
3737
3738 2018-06-01 Tom Tromey <tom@tromey.com>
3739
3740 * cp-name-parser.y (backslashable, represented): Now const.
3741
3742 2018-06-01 Tom Tromey <tom@tromey.com>
3743
3744 * cp-name-parser.y: Include parser-defs.h.
3745 (parser_fprintf): Remove declaration.
3746
3747 2018-06-01 Tom Tromey <tom@tromey.com>
3748
3749 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3750 %parse-param.
3751 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3752 (global_result): Remove globals.
3753 (struct cpname_state): New.
3754 (yyparse): Don't declare.
3755 (yylex, yyerror): Move declarations after %union.
3756 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3757 (make_name): Add state parameter.
3758 Update all callers.
3759 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3760 parameter.
3761 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3762 Update.
3763 (yylex): Add lvalp, state parameters.
3764 (yyerror): Add state parameter.
3765 (cp_demangled_name_to_comp): Update.
3766
3767 2018-06-01 Tom Tromey <tom@tromey.com>
3768
3769 * cp-name-parser.y (parser_fprintf): Declare.
3770 (GDB_YY_REMAP_PREFIX): Define.
3771 Include yy-remap.h. Don't redefine yy* identifiers.
3772
3773 2018-06-01 Tom Tromey <tom@tromey.com>
3774
3775 * python/py-type.c (typy_legacy_template_argument): Update.
3776 * cp-support.h (cp_demangled_name_to_comp): Update.
3777 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3778 parameter to be a "std::string *".
3779 (main): Update.
3780
3781 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3782
3783 * ada-lex.l: Include "diagnostics.h" instead of
3784 "common/diagnostics.h".
3785 * unittests/environ-selftests.c: Likewise.
3786 * common/diagnostics.h: Moved to ../include.
3787
3788 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3789
3790 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3791 to language_mode_manual while calling breakpoint_re_set_one.
3792
3793 2018-06-01 Tom Tromey <tom@tromey.com>
3794
3795 * valops.c (value_cast_structs, destructor_name_p): Update.
3796 * symtab.c (gdb_mangle_name): Update.
3797 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3798 Update.
3799 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3800 (pascal_object_print_value_fields, pascal_object_print_value):
3801 Update.
3802 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3803 * linespec.c (find_methods): Update.
3804 * gdbtypes.h (type_name_no_tag): Remove.
3805 (type_name_or_error): Rename from type_name_no_tag_or_error.
3806 * gdbtypes.c (type_name_no_tag): Remove.
3807 (type_name_or_error): Rename from type_name_no_tag_or_error.
3808 (lookup_struct_elt_type, check_typedef): Update.
3809 * expprint.c (print_subexp_standard): Update.
3810 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3811 * d-namespace.c (d_lookup_nested_symbol): Update.
3812 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3813 (cp_print_class_member): Update.
3814 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3815 * completer.c (add_struct_fields): Update.
3816 * c-typeprint.c (cp_type_print_derivation_info)
3817 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3818 Update.
3819 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3820 (ada_prefer_type, ada_is_exception_sym): Update.
3821
3822 2018-06-01 Tom Tromey <tom@tromey.com>
3823
3824 * valops.c (enum_constant_from_type, value_namespace_elt)
3825 (value_maybe_namespace_elt): Update.
3826 * valarith.c (find_size_for_pointer_math): Update.
3827 * target-descriptions.c (make_gdb_type): Update.
3828 * symmisc.c (print_symbol): Update.
3829 * stabsread.c (define_symbol, read_type)
3830 (complain_about_struct_wipeout, add_undefined_type)
3831 (cleanup_undefined_types_1): Update.
3832 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3833 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3834 (rust_internal_print_type, rust_composite_type)
3835 (rust_evaluate_funcall, rust_evaluate_subexp)
3836 (rust_inclusive_range_type_p): Update.
3837 * python/py-type.c (typy_get_tag): Update.
3838 * p-typeprint.c (pascal_type_print_base): Update.
3839 * mdebugread.c (parse_symbol, parse_type): Update.
3840 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3841 Update.
3842 * guile/scm-type.c (gdbscm_type_tag): Update.
3843 * go-lang.c (sixg_string_p): Update.
3844 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3845 Update.
3846 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3847 (TYPE_TAG_NAME): Remove.
3848 * gdbtypes.c (type_name_no_tag): Simplify.
3849 (check_typedef, check_types_equal, recursive_dump_type)
3850 (copy_type_recursive, arch_composite_type): Update.
3851 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3852 in summary mode when needed.
3853 * eval.c (evaluate_funcall): Update.
3854 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3855 (process_structure_scope, read_enumeration_type)
3856 (read_namespace_type, read_module_type, determine_prefix): Update.
3857 * cp-support.c (inspect_type): Update.
3858 * coffread.c (process_coff_symbol, decode_base_type): Update.
3859 * c-varobj.c (c_is_path_expr_parent): Update.
3860 * c-typeprint.c (c_type_print_base_struct_union): Update.
3861 (c_type_print_base_1): Update. Print struct/class/union/enum in
3862 summary when using C language.
3863 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3864 (gen_maybe_namespace_elt): Update.
3865 * ada-lang.c (ada_type_name): Simplify.
3866 (empty_record, ada_template_to_fixed_record_type_1)
3867 (template_to_static_fixed_type)
3868 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3869
3870 2018-06-01 Tom Tromey <tom@tromey.com>
3871
3872 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3873 c_print_type.
3874 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3875 (c_print_type): Update.
3876 (c_print_type): New overload.
3877 (c_type_print_varspec_prefix, c_type_print_args)
3878 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3879 (c_type_print_base_struct_union, c_type_print_base_1)
3880 (cp_type_print_method_args): Add "language" parameter.
3881 (c_type_print_base): Update.
3882 * c-lang.h (c_print_type): Add new overload.
3883
3884 2018-06-01 Tom Tromey <tom@tromey.com>
3885
3886 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3887 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3888
3889 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3890
3891 * aarch64-tdep.c (aarch64_sve_register_names): New const
3892 var.
3893 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3894 (AARCH64_SVE_Z_REGS_NUM): New define.
3895 (AARCH64_SVE_P_REGS_NUM): Likewise.
3896 (AARCH64_SVE_NUM_REGS): Likewise.
3897
3898 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3899
3900 * nat/linux-ptrace.h [__alpha__]
3901 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3902 definitions.
3903
3904 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3905
3906 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3907 the endianness selected.
3908 * NEWS: Document `set endian auto' mode operation update.
3909
3910 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3911
3912 * Makefile.in: Add new header.
3913 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3914 (sve_vl_from_vg): Likewise.
3915 (sve_vq_from_vl): Likewise.
3916 (sve_vl_from_vq): Likewise.
3917 (sve_vq_from_vg): Likewise.
3918 (sve_vg_from_vq): Likewise.
3919 * configure.nat: Add new c file.
3920 * nat/aarch64-sve-linux-ptrace.c: New file.
3921 * nat/aarch64-sve-linux-ptrace.h: New file.
3922
3923 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3924
3925 * aarch64-linux-nat.c (aarch64_linux_read_description):
3926 Add parmeter zero.
3927 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3928 Likewise.
3929 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3930 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3931 (aarch64_gdbarch_init): Add parmeter zero.
3932 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3933 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3934 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3935 parmeter.
3936 * doc/gdb.texinfo: Describe SVE feature
3937 * features/aarch64-sve.c: New file.
3938
3939 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3940
3941 PR gdb/23210
3942 * gdbarch.sh (significant_addr_bit): Default to zero when
3943 not set by target architecture.
3944 * gdbarch.c: Re-generated.
3945 * utils.c (address_significant): Update.
3946
3947 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3948
3949 * stack.c (func_command): Remove trailing newline in call to error.
3950
3951 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3952
3953 * regcache.h (regcache_raw_collect): Remove, update callers to
3954 use regcache::raw_collect.
3955 * regcache.c (regcache_raw_collect): Remove.
3956
3957 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3958
3959 * regcache.h (regcache_raw_supply): Remove, update callers to
3960 use detached_regcache::raw_supply.
3961 * regcache.c (regcache_raw_supply): Remove.
3962
3963 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3964
3965 * regcache.h (regcache_cooked_write_part): Remove, update
3966 callers to use regcache::cooked_write_part.
3967 * regcache.c (regcache_cooked_write_part): Remove.
3968
3969 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3970
3971 * regcache.h (regcache_cooked_read_part): Remove, update callers
3972 to use readable_regcache::cooked_read_part.
3973 * regcache.c (regcache_cooked_read_part): Remove.
3974
3975 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3976
3977 * regcache.h (regcache_cooked_read_value): Remove, update
3978 callers to use readable_regcache::cooked_read_value.
3979 * regcache.c (regcache_cooked_read_value): Remove.
3980
3981 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3982
3983 * regcache.h (regcache_cooked_write): Remove, update callers to
3984 use regcache::cooked_write.
3985 * regcache.c (regcache_cooked_write): Remove.
3986
3987 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3988
3989 * regcache.h (regcache_invalidate): Remove, update callers to
3990 use detached_regcache::invalidate instead.
3991 * regcache.c (regcache_invalidate): Remove.
3992
3993 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3994
3995 * regcache.h (regcache_raw_write_part): Remove, update callers
3996 to use regcache::raw_write_part instead.
3997 * regcache.c (regcache_raw_write_part): Remove.
3998
3999 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4000
4001 * regcache.h (regcache_raw_read_part): Remove, update callers to
4002 use readable_regcache::raw_read_part instead.
4003 * regcache.c (regcache_raw_read_part): Remove.
4004
4005 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4006
4007 * regcache.h (regcache_cooked_read): Remove, update callers to
4008 use readable_regcache::cooked_read instead.
4009 * regcache.c (regcache_cooked_read): Remove.
4010
4011 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4012
4013 * regcache.h (regcache_raw_write): Remove, update callers to use
4014 regcache::raw_write instead.
4015 * regcache.c (regcache_raw_write): Remove.
4016
4017 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4018
4019 * regcache.h (regcache_raw_read): Remove, update callers to use
4020 readable_regcache::raw_read instead.
4021 * regcache.c (regcache_raw_read): Remove.
4022
4023 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4024
4025 * regcache.h (regcache_raw_update): Remove, update callers to
4026 use readable_regcache::raw_update instead.
4027 * regcache.c (regcache_raw_update): Remove.
4028
4029 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4030
4031 * regcache.h (regcache_register_status): Remove, update callers
4032 to use reg_buffer::get_register_status directly instead.
4033 * regcache.c (regcache_register_status): Remove.
4034
4035 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4036
4037 * regcache.h (regcache_get_ptid): Remove, update all callers to
4038 call regcache::ptid instead.
4039 * regcache.c (regcache_get_ptid): Remove.
4040
4041 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4042
4043 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4044
4045 2018-05-30 Pedro Alves <palves@redhat.com>
4046
4047 * common/common-exceptions.h (exception_rethrow): Use
4048 ATTRIBUTE_NORETURN.
4049
4050 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4051
4052 * breakpoint.c (print_solib_event, check_status_catch_solib):
4053 Remove struct keyword in range-based for loops.
4054 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4055 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4056 Likewise.
4057 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4058 Likewise.
4059 * symfile.c (addr_info_make_relative): Likewise.
4060 * thread.c (value_in_thread_stack_temporaries): Likewise.
4061
4062 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4063
4064 PR gdb/16841
4065 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4066 aggregate type to get its real type before accessing it.
4067
4068 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4069
4070 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4071 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4072 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4073 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4074 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4075 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4076 * printcmd.c (info_address_command): Likewise.
4077
4078 2018-05-29 Tom Tromey <tom@tromey.com>
4079
4080 * windows-nat.c (handle_exception): Update fall-through comment.
4081
4082 2018-05-29 Tom Tromey <tom@tromey.com>
4083
4084 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4085 (struct program_space) <added_solibs>: Now a std::vector.
4086 * breakpoint.c (print_solib_event): Update.
4087 (check_status_catch_solib): Update.
4088 * progspace.c (clear_program_space_solib_cache): Update.
4089 * solib.c (update_solib_list): Update.
4090
4091 2018-05-29 Tom Tromey <tom@tromey.com>
4092
4093 * python/py-type.c (typy_richcompare): Update.
4094 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4095 * gdbtypes.h (types_deeply_equal): Return bool.
4096 (types_equal): Likewise.
4097 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4098 declare VEC.
4099 (check_types_equal): Change worklist to std::vector. Return
4100 bool.
4101 (struct type_equality_entry): Add constructor.
4102 (compare_maybe_null_strings): Return bool.
4103 (check_types_worklist): Return bool. Change worklist to
4104 std::vector.
4105 (types_deeply_equal): Use std::vector.
4106 (types_equal): Return bool.
4107 (compare_maybe_null_strings): Simplify.
4108
4109 2018-05-29 Tom Tromey <tom@tromey.com>
4110
4111 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4112
4113 2018-05-29 Tom Tromey <tom@tromey.com>
4114
4115 * objc-lang.h: Don't include cp-support.h.
4116 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4117 declare VEC.
4118
4119 2018-05-27 Tom Tromey <tom@tromey.com>
4120
4121 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4122
4123 2018-05-25 Tom Tromey <tom@tromey.com>
4124
4125 * value.c (value::location): Initialize.
4126
4127 2018-05-25 Tom Tromey <tom@tromey.com>
4128
4129 * dbxread.c (init_bincl_list): Remove.
4130 (bincl_list): Now a std::vector.
4131 (bincls_allocated, next_bincl): Remove.
4132 (free_bincl_list, do_free_bincl_list_cleanup)
4133 (make_cleanup_free_bincl_list): Remove.
4134 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4135 unique_xmalloc_ptr.
4136 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4137 (struct header_file_location): Add constructor.
4138 (add_bincl_to_list): Remove.
4139
4140 2018-05-25 Tom Tromey <tom@tromey.com>
4141
4142 * tui/tui.c (tui_enable): Update.
4143 * mi/mi-interp.c (mi_interp::init): Update.
4144 * interps.h (class interp) <name>: New method.
4145 <m_name>: Rename from name.
4146 (~scoped_restore_interp): Update.
4147 * interps.c (interp::interp): Update.
4148 (interp_add, interp_set, interp_lookup_existing)
4149 (current_interp_named_p): Update.
4150
4151 2018-05-25 Tom Tromey <tom@tromey.com>
4152
4153 * interps.c (interp_name): Remove.
4154 * mi/mi-interp.c (mi_interp::init): Update.
4155 * interps.h (interp_name): Remove.
4156 (~scoped_restore_interp): Update.
4157 * tui/tui.c (tui_enable): Update.
4158
4159 2018-05-25 Tom Tromey <tom@tromey.com>
4160
4161 * utils.c (fputs_maybe_filtered): Update.
4162 * linespec.c (decode_line_full): Update.
4163 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4164 (mi_print_breakpoint_for_event, mi_solib_loaded)
4165 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4166 (mi_user_selected_context_changed): Update.
4167 * mi/mi-main.c (mi_execute_command): Update.
4168 * cli/cli-script.c (execute_control_command): Update.
4169 * python/python.c (execute_gdb_command): Update.
4170 * solib.c (info_sharedlibrary_command): Update.
4171 * interps.c (interp_ui_out): Remove.
4172 * interps.h (interp_ui_out): Remove.
4173
4174 2018-05-25 Tom Tromey <tom@tromey.com>
4175
4176 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4177 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4178 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4179
4180 2018-05-25 Tom Tromey <tom@tromey.com>
4181
4182 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4183 * interps.c (interp_exec): Use scoped_restore.
4184
4185 2018-05-25 Tom Tromey <tom@tromey.com>
4186
4187 * remote.c (remote_target::remote_file_get): Use
4188 gdb::byte_vector.
4189 (remote_target::remote_file_put): Likewise.
4190
4191 2018-05-25 Tom Tromey <tom@tromey.com>
4192
4193 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4194 a std::string.
4195 (get_pe_section_index, add_pe_exported_sym): Update.
4196 (read_pe_exported_syms): Use gdb::def_vector.
4197
4198 2018-05-25 Tom Tromey <tom@tromey.com>
4199
4200 * frame.c (remove_prev_frame): Remove.
4201 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4202
4203 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4204
4205 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4206 Remove prototypes.
4207 * mips-linux-nat.c (supply_fpregset): Always call
4208 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4209 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4210 `mips_fill_fpregset'.
4211 * mips-linux-tdep.c (mips_supply_fpregset)
4212 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4213 (mips_fill_fpregset_wrapper): Remove functions.
4214 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4215 (mips_linux_fpregset): Remove variable.
4216 (mips_linux_iterate_over_regset_sections): Use
4217 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4218 (mips_linux_o32_sigframe_init): Remove comment.
4219
4220 2018-05-25 Pedro Alves <palves@redhat.com>
4221
4222 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4223 (struct readahead_cache, struct packet_reg, struct
4224 remote_arch_state, class remote_state): Move higher up in the
4225 file.
4226 (remote_target::m_remote_state): Now an object instead of a pointer.
4227 (remote_target::get_remote_state): Adjust.
4228
4229 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4230
4231 * stack.c (select_and_print_frame): Delete.
4232 (struct function_bounds): Move struct within function.
4233 (func_command): Most content moved into new function
4234 find_frame_for_function, use new function, print result, add
4235 function comment.
4236 (find_frame_for_function): New function, now returns a result.
4237
4238 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4239
4240 * stack.c (iterate_over_block_arg_vars): Fix comment.
4241 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4242
4243 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4244
4245 PR gdb/23203
4246 * frame.c
4247 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4248 Define.
4249 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4250 Define.
4251 * frame.h (class scoped_restore_selected_frame): New class.
4252 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4253 of any exception, use scoped_restore_selected_frame to restore the
4254 frame instead.
4255
4256 2018-05-24 Pedro Alves <palves@redhat.com>
4257
4258 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4259 override.
4260
4261 2018-05-23 Tom Tromey <tom@tromey.com>
4262
4263 * complaints.c (struct complaints): Remove.
4264 (symfile_complaint_book): Remove.
4265 (series): New global.
4266 (complaint_internal): Update.
4267 (clear_complaints): Update.
4268
4269 2018-05-23 Tom Tromey <tom@tromey.com>
4270
4271 * complaints.c (counters): New global.
4272 (struct complain): Remove.
4273 (struct complaints) <root>: Remove.
4274 (complaint_sentinel): Remove.
4275 (symfile_complaint_book): Update.
4276 (find_complaint) Remove.
4277 (complaint_internal, clear_complaints): Update.
4278
4279 2018-05-23 Tom Tromey <tom@tromey.com>
4280
4281 * complaints.c (struct complain) <file, line>: Remove.
4282 (find_complaint): Remove file, line parameters.
4283 (complaint_internal): Update.
4284
4285 2018-05-23 Tom Tromey <tom@tromey.com>
4286
4287 * complaints.c (vcomplaint): Remove.
4288 (complaint_internal) Merge in contents of vcomplaint.
4289
4290 2018-05-23 Tom Tromey <tom@tromey.com>
4291
4292 * complaints.c (struct complaints) <explanation>: Remove.
4293 (symfile_explanations): Remove.
4294 (symfile_complaint_book): Update.
4295 (vcomplaint): Update.
4296 (struct explanation): Remove.
4297
4298 2018-05-23 Tom Tromey <tom@tromey.com>
4299
4300 * complaints.c (symfile_complaints): Remove.
4301 (complaint_internal): Remove "complaints" parameter.
4302 (clear_complaints, vcomplaint): Remove "c" parameter.
4303 (get_complaints): Remove.
4304 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4305 (dwarf2_debug_line_missing_file_complaint)
4306 (dwarf2_debug_line_missing_end_sequence_complaint)
4307 (dwarf2_complex_location_expr_complaint)
4308 (dwarf2_const_value_length_mismatch_complaint)
4309 (dwarf2_section_buffer_overflow_complaint)
4310 (dwarf2_macro_malformed_definition_complaint)
4311 (dwarf2_invalid_attrib_class_complaint)
4312 (create_addrmap_from_index, dw2_symtab_iter_next)
4313 (dw2_expand_marked_cus)
4314 (dw2_debug_names_iterator::find_vec_in_debug_names)
4315 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4316 (create_debug_type_hash_table, init_cutu_and_read_dies)
4317 (partial_die_parent_scope, add_partial_enumeration)
4318 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4319 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4320 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4321 (create_cus_hash_table, create_dwp_hash_table)
4322 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4323 (dwarf2_rnglists_process, dwarf2_ranges_process)
4324 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4325 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4326 (handle_struct_member_die, process_structure_scope)
4327 (read_array_type, read_common_block, read_module_type)
4328 (read_tag_pointer_type, read_typedef, read_base_type)
4329 (read_subrange_type, load_partial_dies, partial_die_info::read)
4330 (partial_die_info::read, partial_die_info::read)
4331 (partial_die_info::read, read_checked_initial_length_and_offset)
4332 (dwarf2_string_attr, read_formatted_entries)
4333 (dwarf_decode_line_header)
4334 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4335 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4336 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4337 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4338 (get_signatured_type, get_DW_AT_signature_type)
4339 (decode_locdesc, file_file_name, consume_improper_spaces)
4340 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4341 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4342 (dwarf2_symbol_mark_computed, set_die_type)
4343 (read_attribute_value): Update.
4344 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4345 Update.
4346 * dbxread.c (unknown_symtype_complaint)
4347 (lbrac_mismatch_complaint, repeated_header_complaint)
4348 (set_namestring, function_outside_compilation_unit_complaint)
4349 (read_dbx_symtab, process_one_symbol): Update.
4350 * gdbtypes.c (stub_noname_complaint): Update.
4351 * windows-nat.c (handle_unload_dll): Update.
4352 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4353 (decode_base_type): Update.
4354 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4355 (eb_complaint, record_include_begin, record_include_end)
4356 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4357 (process_xcoff_symbol, read_symbol)
4358 (function_outside_compilation_unit_complaint)
4359 (scan_xcoff_symtab): Update.
4360 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4361 * buildsym.c (finish_block_internal, make_blockvector)
4362 (end_symtab_get_static_block, augment_type_symtab): Update.
4363 * dtrace-probe.c (dtrace_process_dof)
4364 (dtrace_static_probe_ops::get_probes): Update.
4365 * complaints.h (struct complaint): Don't declare.
4366 (symfile_complaints): Remove.
4367 (complaint_internal): Remove "complaints" parameter.
4368 (complaint): Likewise.
4369 (clear_complaints): Likewise.
4370 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4371 (reread_symbols): Update.
4372 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4373 (dwarf2_frame_cache, decode_frame_entry): Update.
4374 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4375 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4376 (info_selectors_command): Update.
4377 * macrotab.c (macro_include, check_for_redefinition)
4378 (macro_undef): Update.
4379 * objfiles.c (filter_overlapping_sections): Update.
4380 * stabsread.c (invalid_cpp_abbrev_complaint)
4381 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4382 (define_symbol, error_type, read_type, rs6000_builtin_type)
4383 (stabs_method_name_from_physname, read_member_functions)
4384 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4385 (attach_fields_to_type, complain_about_struct_wipeout)
4386 (read_range_type, read_args, common_block_start)
4387 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4388 Update.
4389 * mdebugread.c (index_complaint, unknown_ext_complaint)
4390 (basic_type_complaint, bad_tag_guess_complaint)
4391 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4392 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4393 (parse_procedure, parse_lines)
4394 (function_outside_compilation_unit_complaint)
4395 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4396 (bad_tag_guess_complaint, reg_value_complaint): Update.
4397 * cp-support.c (demangled_name_complaint): Update.
4398 * macroscope.c (sal_macro_scope): Update.
4399 * dwarf-index-write.c (class debug_names): Update.
4400
4401 2018-05-23 Tom Tromey <tom@tromey.com>
4402
4403 * complaints.c (clear_complaints): Remove "noisy" parameter.
4404 * complaints.h (clear_complaints): Update.
4405 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4406 (reread_symbols): Update.
4407
4408 2018-05-23 Tom Tromey <tom@tromey.com>
4409
4410 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4411 SUBSEQUENT_MESSAGE.
4412 (vcomplaint, clear_complaints): Update.
4413 (symfile_explanations): Remove some messages.
4414
4415 2018-05-23 Tom Tromey <tom@tromey.com>
4416
4417 * complaints.c (internal_complaint): Remove.
4418 * complaints.h (internal_complaint): Remove.
4419
4420 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4421
4422 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4423
4424 2018-05-22 Pedro Alves <palves@redhat.com>
4425
4426 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4427 (remote_fileio_badfd, remote_fileio_return_errno)
4428 (remote_fileio_return_success, remote_fileio_func_open)
4429 (remote_fileio_func_open, remote_fileio_func_close)
4430 (remote_fileio_func_read, remote_fileio_func_write)
4431 (remote_fileio_func_lseek, remote_fileio_func_rename)
4432 (remote_fileio_func_unlink, remote_fileio_func_stat)
4433 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4434 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4435 remote_target parameter.
4436 (remote_fio_func_map) <func>: Add remote_target parameter.
4437 (do_remote_fileio_request, remote_fileio_request):
4438 * remote-fileio.h (remote_fileio_request):
4439 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4440 remote_target parameter.
4441 (remote_notif_process, handle_notification): Adjust to pass down
4442 the remote.
4443 (remote_notif_state_allocate): Add remote_target parameter. Save
4444 it.
4445 * remote-notif.h (struct remote_target): Forward declare.
4446 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4447 remote_target parameter.
4448 (struct remote_notif_state) <remote>: New field.
4449 (remote_notif_ack, remote_notif_parse): Add remote_target
4450 parameter.
4451 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4452 remote_target parameter.
4453 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4454 (threads_listing_context, rmt_thread_action, protocol_feature)
4455 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4456 (packet_result, struct threads_listing_context, remote_state):
4457 Move definitions and declarations higher up.
4458 (remote_target) <~remote_target>: Declare.
4459 (remote_download_command_source, remote_file_put, remote_file_get)
4460 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4461 (remote_hostio_pread_vFile, remote_hostio_send_command)
4462 (remote_hostio_set_filesystem, remote_hostio_open)
4463 (remote_hostio_close, remote_hostio_unlink, remote_state)
4464 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4465 (get_memory_write_packet_size, get_memory_read_packet_size)
4466 (append_pending_thread_resumptions, remote_detach_1)
4467 (append_resumption, remote_resume_with_vcont)
4468 (add_current_inferior_and_thread, wait_ns, wait_as)
4469 (process_stop_reply, remote_notice_new_inferior)
4470 (process_initial_stop_replies, remote_add_thread)
4471 (btrace_sync_conf, remote_btrace_maybe_reopen)
4472 (remove_new_fork_children, kill_new_fork_children)
4473 (discard_pending_stop_replies, stop_reply_queue_length)
4474 (check_pending_events_prevent_wildcard_vcont)
4475 (discard_pending_stop_replies_in_queue, stop_reply)
4476 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4477 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4478 (remote_interrupt_as, remote_interrupt_ns)
4479 (remote_get_noisy_reply, remote_query_attached)
4480 (remote_add_inferior, remote_current_thread, get_current_thread)
4481 (set_thread, set_general_thread, set_continue_thread)
4482 (set_general_process, write_ptid)
4483 (remote_unpack_thread_info_response, remote_get_threadinfo)
4484 (parse_threadlist_response, remote_get_threadlist)
4485 (remote_threadlist_iterator, remote_get_threads_with_ql)
4486 (remote_get_threads_with_qxfer)
4487 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4488 (get_offsets, remote_check_symbols, remote_supported_packet)
4489 (remote_query_supported, remote_packet_size)
4490 (remote_serial_quit_handler, remote_detach_pid)
4491 (remote_vcont_probe, remote_resume_with_hc)
4492 (send_interrupt_sequence, interrupt_query)
4493 (remote_notif_get_pending_events, fetch_register_using_p)
4494 (send_g_packet, process_g_packet, fetch_registers_using_g)
4495 (store_register_using_P, store_registers_using_G)
4496 (set_remote_traceframe, check_binary_download)
4497 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4498 (remote_xfer_live_readonly_partial, remote_read_bytes)
4499 (remote_send_printf, remote_flash_write, readchar)
4500 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4501 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4502 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4503 (extended_remote_disable_randomization, extended_remote_run)
4504 (send_environment_packet, extended_remote_environment_support)
4505 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4506 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4507 (packet_command): Now methods of ...
4508 (remote_target): ... this class.
4509 (m_remote_state) <remote_target>: New field.
4510 (struct remote_state) <stop_reply_queue,
4511 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4512 fields.
4513 (remote_state::remote_state): Allocate stop_reply_queue.
4514 (remote_state): Delete global.
4515 (get_remote_state_raw): Delete.
4516 (remote_target::get_remote_state): Allocate m_remote_state on
4517 demand.
4518 (get_current_remote_target): New.
4519 (remote_ops, extended_remote_ops): Delete.
4520 (wait_forever_enabled_p, remote_async_inferior_event_token):
4521 Delete, moved to struct remote_state.
4522 (remote_target::close): Delete self. Destruction bits split to
4523 ...
4524 (remote_target::~remote_target): ... this.
4525 (show_memory_packet_size): Adjust to use
4526 get_current_remote_target.
4527 (struct protocol_feature) <func>: Add remote_target parameter.
4528 All callers adjusted.
4529 (curr_quit_handler_target): New.
4530 (remote_serial_quit_handler): Reimplement.
4531 (remote_target::open_1): Adjust to use get_current_remote_target.
4532 Heap-allocate remote_target/extended_remote_target instances.
4533 (vcont_builder::vcont_builder): Add remote_target parameter, and
4534 save it in m_remote. All callers adjusted.
4535 (vcont_builder::m_remote): New field.
4536 (vcont_builder::restart, vcont_builder::flush)
4537 (vcont_builder::push_action): Use it.
4538 (remote_target::commit_resume): Use it.
4539 (struct queue_iter_param) <remote>: New field.
4540 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4541 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4542 (check_pending_event_prevents_wildcard_vcont_callback)
4543 (remote_target::check_pending_events_prevent_wildcard_vcont)
4544 (remote_target::discard_pending_stop_replies)
4545 (remote_target::discard_pending_stop_replies_in_queue)
4546 (remote_target::remote_notif_remove_queued_reply): Fill in
4547 'remote' field.
4548 (remote_notif_get_pending_events): New.
4549 (remote_target::readchar, remote_target::remote_serial_write):
4550 Save/restore curr_quit_handler_target.
4551 (putpkt): New.
4552 (kill_new_fork_children): Fill in 'remote' field.
4553 (packet_command): Use get_current_remote_target, defer to
4554 remote_target method of same name.
4555 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4556 parameter, and save it in m_remote. All callers adjusted.
4557 (scoped_remote_fd::release): Use m_remote.
4558 (scoped_remote_fd::m_remote): New field.
4559 (remote_file_put, remote_file_get, remote_file_delete): Use
4560 get_current_remote_target, defer to remote_target method of same
4561 name.
4562 (remote_btrace_reset): Add remote_state paremeter. Update all
4563 callers.
4564 (remote_async_inferior_event_handler). Pass down 'data'.
4565 (remote_new_objfile): Use get_current_remote_target.
4566 (remote_target::vcont_r_supported): New.
4567 (set_range_stepping): Use get_current_remote_target and
4568 remote_target::vcont_r_supported.
4569 (_initialize_remote): Don't allocate 'remote_state' and
4570 'stop_reply_queue' globals.
4571 * remote.h (struct remote_target): Forward declare.
4572 (getpkt, putpkt, remote_notif_get_pending_events): Add
4573 'remote_target' parameter.
4574
4575 2018-05-22 Pedro Alves <palves@redhat.com>
4576
4577 * remote.c (vcont_builder): Now a class. Make all data members
4578 private.
4579 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4580 Declare methods.
4581 (vcont_builder_restart): Rename to ...
4582 (vcont_builder::restart): ... this.
4583 (vcont_builder_flush): Rename to ...
4584 (vcont_builder::flush): ... this.
4585 (vcont_builder_push_action): Rename to ...
4586 (vcont_builder::push_action): ... this.
4587 (remote_target::commit_resume): Adjust.
4588
4589 2018-05-22 Pedro Alves <palves@redhat.com>
4590
4591 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4592 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4593 (get_fixed_memory_packet_size): New.
4594 (get_memory_packet_size): Use it.
4595 (set_memory_packet_size): Don't override the config size with
4596 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4597 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4598 Don't refer to get_memory_packet_size if not connected to a remote
4599 target. Show "(default)" if configured size is 0.
4600
4601 2018-05-22 Pedro Alves <palves@redhat.com>
4602
4603 * remote.c (remote_target::mourn_inferior): Move
4604 discard_pending_stop_replies call here from ...
4605 (_initialize_remote): ... here.
4606
4607 2018-05-22 Pedro Alves <palves@redhat.com>
4608
4609 * remote.c (compare_section_command): Remove set_general_process
4610 call.
4611
4612 2018-05-22 Pedro Alves <palves@redhat.com>
4613
4614 * remote.c (struct packet_reg, struct remote_arch_state):
4615 Move higher up in the file.
4616 (remote_state) <m_arch_states>: Store remote_arch_state values
4617 instead of remote_arch_state pointers.
4618 (remote_state::get_remote_arch_state): Adjust.
4619
4620 2018-05-22 Pedro Alves <palves@redhat.com>
4621
4622 * remote.c: Include <unordered_map>.
4623 (remote_state): Now a class.
4624 (remote_state) <get_remote_arch_state>: Declare method.
4625 <get_remote_arch_state>: New field.
4626 (remote_arch_state) <remote_arch_state>: Declare ctor.
4627 <regs>: Now a unique_ptr.
4628 (remote_gdbarch_data_handle): Delete.
4629 (get_remote_arch_state): Delete.
4630 (remote_state::get_remote_arch_state): New.
4631 (get_remote_state): Adjust to call remote_state's
4632 get_remote_arch_state method.
4633 (init_remote_state): Delete, bits factored out to ...
4634 (remote_arch_state::remote_arch_state): ... this new method.
4635 (get_remote_packet_size, get_memory_packet_size)
4636 (process_g_packet, remote_target::fetch_registers)
4637 (remote_target::prepare_to_store, store_registers_using_G)
4638 (remote_target::store_registers, remote_target::get_trace_status):
4639 Adjust to call remote_state's method.
4640 (_initialize_remote): Remove reference to
4641 remote_gdbarch_data_handle.
4642
4643 2018-05-22 Pedro Alves <palves@redhat.com>
4644
4645 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4646 pread>: New method declarations.
4647 (remote_target::open_1): Adjust.
4648 (readahead_cache_invalidate): Rename to ...
4649 (readahead_cache::invalidate): ... this, and adjust to be a class
4650 method.
4651 (readahead_cache_invalidate_fd): Rename to ...
4652 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4653 class method.
4654 (remote_hostio_pwrite): Adjust.
4655 (remote_hostio_pread_from_cache): Rename to ...
4656 (readahead_cache::pread): ... this, and adjust to be a class
4657 method.
4658 (remote_hostio_close): Adjust.
4659
4660 2018-05-22 Pedro Alves <palves@redhat.com>
4661
4662 * remote.c (remote_hostio_close_cleanup): Delete.
4663 (class scoped_remote_fd): New.
4664 (remote_file_put, remote_file_get): Use it.
4665
4666 2018-05-22 Pedro Alves <palves@redhat.com>
4667
4668 (struct vCont_action_support): Use bool and initialize all fields.
4669 (struct readahead_cache): Initialize all fields.
4670 (remote_state): Use bool and initialize all fields.
4671 (remote_state::remote_state, remote_state::~remote_state): New.
4672 (new_remote_state): Delete.
4673 (_initialize_remote): Use new to allocate remote_state.
4674
4675 2018-05-22 Pedro Alves <palves@redhat.com>
4676 張俊芝 <zjz@zjz.name>
4677
4678 PR gdb/22973
4679 * c-exp.y: Include "c-support.h".
4680 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4681 of tolower. Use c_ident_is_alpha to scan names.
4682 * c-lang.c: Include "c-support.h".
4683 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4684 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4685 * c-support.h: New file, with bits factored out from ...
4686 * cp-name-parser.y: ... this file.
4687 Include "c-support.h".
4688 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4689 c-support.h and renamed.
4690 (symbol_end, yylex): Adjust.
4691
4692 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4693
4694 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4695 parameter type to CORE_ADDR.
4696 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4697 parameter type in declaration to CORE_ADDR.
4698 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4699 target_auxv_search to get AT_HWCAP and use the result to get the
4700 target description.
4701 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4702 to CORE_ADDR. Remove the cast of the return value to unsigned
4703 long. Fix error predicate of target_auxv_search.
4704 (ppc_linux_nat_target::read_description): Change the type of the
4705 hwcap variable to CORE_ADDR.
4706
4707 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4708
4709 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4710 if the size of fpscr is larger than 32 bits.
4711
4712 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4713
4714 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4715 (ppc32_linux_vsxregmap): New global.
4716 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4717 regcache_supply_regset, and regcache_collect_regset.
4718 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4719 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4720 (fetch_vsx_register, store_vsx_register): Remove.
4721 (fetch_vsx_registers): Add regno parameter. Get regset using
4722 ppc_linux_vsxregset. Use regset to supply registers.
4723 (store_vsx_registers): Add regno parameter. Get regset using
4724 ppc_linux_vsxregset. Use regset to collect registers.
4725 (fetch_register): Call fetch_vsx_registers instead of
4726 fetch_vsx_register.
4727 (store_register): Call store_vsx_registers instead of
4728 store_vsx_register.
4729 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4730 new regno parameter.
4731 (store_ppc_registers): Call store_vsx_registers with -1 for the
4732 new regno parameter.
4733 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4734 (ppc_collect_vsxregset): Remove.
4735
4736 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4737
4738 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4739 offset fields.
4740 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4741 for vector register offset fields.
4742 (ppc64_fbsd_reg_offsets): Likewise.
4743 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4744 to vector register offset fields.
4745 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4746 to vector register offset fields.
4747 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4748 vector register offset fields.
4749 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4750 initializers for vector register offset fields.
4751 (rs6000_aix64_reg_offsets): Likewise.
4752 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4753 (ppc_supply_vrregset): Remove.
4754 (ppc_collect_vrregset): Remove.
4755 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4756 (ppc_linux_vrregset) : New function.
4757 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4758 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4759 (ppc32_linux_vrregset): Remove.
4760 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4761 and use result instead of ppc32_linux_vrregset.
4762 (ppc32_linux_reg_offsets): Remove initializers for vector register
4763 offset fields.
4764 (ppc64_linux_reg_offsets): Likewise.
4765 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4766 * ppc-linux-nat.c: Include regset.h.
4767 (gdb_vrregset_t): Adjust comment to account for little-endian
4768 mode.
4769 (supply_vrregset, fill_vrregset): Remove.
4770 (fetch_altivec_register, store_altivec_register): Remove.
4771 (fetch_altivec_registers): Add regno parameter. Get regset using
4772 ppc_linux_vrregset. Use regset to supply registers.
4773 (store_altivec_registers): Add regno parameter. Get regset using
4774 ppc_linux_vrregset. Use regset to collect registers.
4775 (fetch_register): Call fetch_altivec_registers instead of
4776 fetch_altivec_register.
4777 (store_register): Call store_altivec_registers instead of
4778 store_altivec_register.
4779 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4780 the new regno parameter.
4781 (store_ppc_registers): Call store_altivec_registers with -1 for
4782 the new regno parameter.
4783
4784 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4785
4786 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4787 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4788 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4789 (gdb_vrregset_t): Change array type size to
4790 PPC_LINUX_SIZEOF_VRREGSET.
4791 (gdb_vsxregset_t): Change array type size to
4792 PPC_LINUX_SIZEOF_VSXREGSET.
4793 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4794 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4795 PPC_LINUX_SIZEOF_VSXREGSET.
4796
4797 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4798
4799 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4800 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4801 nat/ppc-linux.c.
4802 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4803 ppc_linux_target_wordsize with tid.
4804 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4805 wordsize with tid.
4806 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4807 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4808 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4809 tid parameter. Remove static specifier.
4810 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4811 (ppc_linux_target_wordsize): New declaration.
4812
4813 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4814
4815 * arch/ppc-linux-common.c: New file.
4816 * arch/ppc-linux-common.h: New file.
4817 * arch/ppc-linux-tdesc.h: New file.
4818 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4819 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4820 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4821 arch/ppc-linux-tdesc.h.
4822 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4823 arch/ppc-linux-tdesc.h.
4824 (ppc_linux_nat_target::read_description): Remove target
4825 description matching code. Fill a ppc_linux_features struct and
4826 call ppc_linux_match_description with it. Move comment about ISA
4827 2.05 to ppc-linux-common.c.
4828 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4829 arch/ppc-linux-tdesc.h.
4830 (ppc_linux_core_read_description): Remove target description
4831 matching code. Fill a ppc_linux_features struct and call
4832 ppc_linux_match_description with it.
4833 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4834 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4835 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4836 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4837 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4838 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4839 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4840 (tdesc_powerpc_e500l): Remove.
4841
4842 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4843
4844 * ada-lang.c (catch_assert_command): Pass empty string instead
4845 of NULL for excep_string argument.
4846
4847 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4848
4849 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4850 the width of the requested register exceeds the width of the
4851 `ptrace' data type.
4852
4853 2018-05-21 Tom Tromey <tom@tromey.com>
4854
4855 * printcmd.c (output_command): Remove.
4856 (output_command_const): Rename to output_command.
4857 * valprint.h (output_command): Rename from output_command_const.
4858 * tracepoint.c (trace_dump_actions): Call output_command.
4859
4860 2018-05-21 Tom Tromey <tom@tromey.com>
4861
4862 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4863 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4864 * ada-lang.h (create_ada_exception_catchpoint): Update.
4865 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4866 std::string.
4867 (create_excep_cond_exprs, ~ada_catchpoint)
4868 (should_stop_exception, print_one_exception)
4869 (print_mention_exception, print_recreate_exception): Update.
4870 (ada_get_next_arg): Remove.
4871 (catch_ada_exception_command_split): Use std::string. Change type
4872 of "excep_string", "cond_string".
4873 (catch_ada_exception_command): Update.
4874 (create_ada_exception_catchpoint): Change type of excep_string.
4875 (ada_exception_sal): Remove excep_string parameter.
4876 (~ada_catchpoint): Remove.
4877
4878 2018-05-21 Tom Tromey <tom@tromey.com>
4879
4880 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4881 cleanup.
4882
4883 2018-05-21 Tom Tromey <tom@tromey.com>
4884
4885 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4886 Return unique_xmalloc_ptr.
4887 (print_it_exception): Update.
4888
4889 2018-05-21 Tom Tromey <tom@tromey.com>
4890
4891 * tracepoint.c (trace_dump_actions): Use std::string.
4892
4893 2018-05-21 Tom Tromey <tom@tromey.com>
4894
4895 * symfile.c (reread_symbols): Use std::string for original_name.
4896
4897 2018-05-21 Tom Tromey <tom@tromey.com>
4898
4899 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4900 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4901 constructor.
4902
4903 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4904
4905 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4906 instance to...
4907 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4908 * objfiles.c (get_objfile_bfd_data): Allocate
4909 objfile_per_bfd_storage with obstack_new when allocating on
4910 obstack.
4911
4912 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4913
4914 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4915 OBSTACK_ZALLOC.
4916 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4917 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4918 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4919 (add_pending): Likewise.
4920 (parse_symbol): Likewise.
4921 (parse_partial_symbols): Likewise.
4922 (psymtab_to_symtab_1): Likewise.
4923 (new_psymtab): Likewise.
4924 (elfmdebug_build_psymtabs): Likewise.
4925 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4926 * objfiles.c (get_objfile_bfd_data): Likewise.
4927 (objfile_register_static_link): Likewise.
4928 * psymtab.c (allocate_psymtab): Likewise.
4929 * stabsread.c (read_member_functions): Likewise.
4930 * xcoffread.c (xcoff_end_psymtab): Likewise.
4931
4932 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4933
4934 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4935 compiler supports std::is_trivially_constructible.
4936 * common/poison.h: Include obstack.h.
4937 (IsMallocable): Define to is_trivially_constructible if the
4938 compiler supports it, define to true_type otherwise.
4939 (xobnew): New.
4940 (XOBNEW): Redefine.
4941 (xobnewvec): New.
4942 (XOBNEWVEC): Redefine.
4943 * gdb_obstack.h (obstack_zalloc): New.
4944 (OBSTACK_ZALLOC): Redefine.
4945 (obstack_calloc): New.
4946 (OBSTACK_CALLOC): Redefine.
4947 (obstack_new): New.
4948 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4949 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4950 gdbarch.c.
4951 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4952 obstack_calloc/obstack_zalloc.
4953 (gdbarch_obstack_zalloc): Remove.
4954 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4955
4956 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4957
4958 * stack.c (backtrace_command_1): Remove useless variable int i.
4959
4960 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4961
4962 * stack.c (print_frame_info): Fix comment.
4963
4964 2018-05-18 Tom Tromey <tom@tromey.com>
4965
4966 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4967 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4968 (~dwarf2_per_objfile): Update
4969 (dwarf2_get_dwz_file): Use new.
4970 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4971 unique_ptr.
4972
4973 2018-05-18 Tom Tromey <tom@tromey.com>
4974
4975 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4976 unique_ptr.
4977 * dwarf2read.c (struct dwp_file): Add constructor and
4978 initializers.
4979 (open_and_init_dwp_file): Return a unique_ptr.
4980 (dwarf2_per_objfile, create_dwp_hash_table)
4981 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4982 (lookup_dwo_unit_in_dwp): Update.
4983 (open_and_init_dwp_file, get_dwp_file): Update.
4984
4985 2018-05-18 Tom Tromey <tom@tromey.com>
4986
4987 * dwarf2read.c (dwarf2_per_objfile): Update.
4988 (struct mapped_index): Add initializers.
4989 (dwarf2_read_index): Use new.
4990 (dw2_symtab_iter_init): Update.
4991 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4992 unique_ptr.
4993
4994 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4995
4996 * dwarf2read.c (mapped_index) <total_size>: Remove.
4997
4998 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4999
5000 * unittests/format_pieces-selftests.c (test_format_specifier):
5001 Add ARI comments.
5002
5003 2018-05-18 Tom Tromey <tom@tromey.com>
5004
5005 * c-typeprint.c (maybe_print_hole): New function.
5006 (c_print_type_struct_field_offset): Update.
5007 (c_type_print_base_struct_union): Call maybe_print_hole.
5008
5009 2018-05-17 Keith Seitz <keiths@redhat.com>
5010
5011 * breakpoint.c (build_bpstat_chain): New function, moved from
5012 bpstat_stop_status.
5013 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5014 If no stop chain is passed, call build_bpstat_chain to build it.
5015 * breakpoint.h (build_bpstat_chain): Declare.
5016 (bpstat_stop_status): Move documentation here from breakpoint.c.
5017 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5018 build the stop chain and pass it to skip_inline_frames.
5019 Pass this stop chain to bpstat_stop_status.
5020 * inline-frame.c: Include breakpoint.h.
5021 (stopped_by_user_bp_inline_frame): New function.
5022 (skip_inline_frames): Add parameter `stop_chain'.
5023 Move documention to inline-frame.h.
5024 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5025 whether the frame should be elided.
5026 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5027 Add moved documentation and update for new parameter.
5028
5029 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5030
5031 PR cli/14975
5032 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5033 unittests/format_pieces-selftests.c.
5034 * common/format.h (format_piece) <operator==>: New.
5035 (format_pieces) <operator[]>: Remove.
5036 * common/format.c (format_pieces::format_pieces): Handle \e.
5037 * unittests/format_pieces-selftests.c: New.
5038
5039 2018-05-17 Tom Tromey <tom@tromey.com>
5040
5041 PR symtab/23010:
5042 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5043 (dw2_instantiate_symtab): Add skip_partial parameter.
5044 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5045 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5046 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5047 (dw2_expand_symtabs_matching_one)
5048 (dw2_find_pc_sect_compunit_symtab)
5049 (dw2_debug_names_lookup_symbol)
5050 (dw2_debug_names_expand_symtabs_for_function): Update.
5051 (init_cutu_and_read_dies): Add skip_partial parameter.
5052 (process_psymtab_comp_unit, build_type_psymtabs_1)
5053 (process_skeletonless_type_unit, load_partial_comp_unit)
5054 (psymtab_to_symtab_1): Update.
5055 (load_full_comp_unit): Add skip_partial parameter.
5056 (process_imported_unit_die, dwarf2_read_addr_index)
5057 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5058 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5059 (read_signatured_type): Update.
5060
5061 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5062
5063 * value.c (release_value): Remove unused variable.
5064 (record_latest_value): Likewise.
5065 (access_value_history): Likewise.
5066 (preserve_values): Likewise.
5067
5068 2018-05-17 Tom Tromey <tom@tromey.com>
5069
5070 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5071 Initialize.
5072
5073 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5074
5075 PR gdb/22286
5076 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5077 Also handle registers whose width is not a multiple of
5078 PTRACE_TYPE_RET.
5079 (linux_nat_trad_target::store_register): Likewise.
5080
5081 2018-05-16 Tom Tromey <tom@tromey.com>
5082
5083 * gdbcore.h (core_bfd): Redefine.
5084 * corelow.c (core_target::close): Update.
5085 (core_target_open): Update.
5086 * progspace.h (struct program_space) <cbfd>: Now a
5087 gdb_bfd_ref_ptr.
5088
5089 2018-05-16 Tom Tromey <tom@tromey.com>
5090
5091 PR cli/19551:
5092 * symfile-add-flags.h (enum symfile_add_flags)
5093 <SYMFILE_NOT_FILENAME>: New constant.
5094 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5095 objfile name from BFD.
5096 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5097 * minidebug.c (find_separate_debug_file_in_section): Put
5098 ".gnu_debugdata" into BFD's file name.
5099
5100 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5101
5102 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5103 Remove.
5104
5105 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5106
5107 PR binutils/21446
5108 * aarch64-tdep.c (aarch64_analyze_prologue,
5109 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5110 Indicate not interested in errors.
5111
5112 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5113
5114 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5115 Supply the MIPS_ZERO_REGNUM register.
5116
5117 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5118
5119 * mips-tdep.c (mask_address_var): Make variable static.
5120
5121 2018-05-14 Tom Tromey <tom@tromey.com>
5122
5123 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5124
5125 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5126
5127 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5128 FXSAVE_ADDR for the mxcsr register.
5129
5130 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5131
5132 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5133
5134 2018-05-11 Pedro Alves <palves@redhat.com>
5135
5136 * corelow.c (core_target) <core_target>: No longer inline.
5137 Initialize m_core_gdbarch, m_core_vec and build the section table
5138 here.
5139 <~core_target>: New.
5140 <core_gdbarch, get_core_register_section>: New methods.
5141 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5142 factored out from ...
5143 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5144 (core_ops): Delete.
5145 (sniff_core_bfd): Add gdbarch parameter.
5146 (core_close): Delete, merged into ...
5147 (core_target::close): ... here. Delete self.
5148 (core_close_cleanup): Delete.
5149 (core_target_open): Allocate a core_target on the heap. Use a
5150 unique_ptr instead of a cleanup. Bits moved into the core_target
5151 ctor. Adjust to use core_target methods instead of globals.
5152 (get_core_register_section): Rename to ...
5153 (core_target::get_core_register_section): ... this and adjust.
5154 (struct get_core_registers_cb_data): New.
5155 (get_core_registers_cb): Use it. Use bool.
5156 (core_target::fetch_registers, core_target::files_info)
5157 (core_target::xfer_partial, core_target::read_description)
5158 (core_target::pid_to, core_target::thread_name): Adjust to
5159 reference class fields instead of globals.
5160 * target.h (struct target_ops_deleter, target_ops_up): New.
5161
5162 2018-05-11 Pedro Alves <palves@redhat.com>
5163
5164 * corefile.c (core_file_command): Move to corelow.c.
5165 * corelow.c (the_core_target): Delete.
5166 (core_file_command): Moved from corefile.c. Check exec_bfd
5167 instead of the_core_target. Use target_detach instead of calling
5168 into the_core_target directly.
5169 (maybe_say_no_core_file_now): New.
5170 (core_target::detach): Use it.
5171 (_initialize_corelow): Remove references to the_core_target.
5172 * gdbcore.h (the_core_target): Delete.
5173
5174 2018-05-11 Tom Tromey <tromey@redhat.com>
5175 Pedro Alves <palves@redhat.com>
5176
5177 * corefile.c (core_bfd): Remove.
5178 * gdbcore.h (core_bfd): Now a macro.
5179 * progspace.h (struct program_space) <cbfd>: New field.
5180
5181 2018-05-11 Tom Tromey <tom@tromey.com>
5182
5183 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5184 gdb::def_vector.
5185
5186 2018-05-10 Tom Tromey <tom@tromey.com>
5187
5188 * configure: Rebuild.
5189 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5190
5191 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5192
5193 PR server/23158:
5194 * regformats/regdat.sh: Adjust script, following the addition
5195 of the new expedite_regs parameter to init_target_desc.
5196
5197 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5198
5199 PR gdb/23127
5200 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5201 set_gdbarch_significant_addr_bit.
5202 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5203 set_gdbarch_significant_addr_bit.
5204 * utils.c (address_significant): Update to sign extend addr.
5205
5206 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5207
5208 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5209 (xtensa_linux_init_abi): Limit tdep->num_regs by
5210 tdep->num_nopriv_regs.
5211 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5212 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5213 not initialized.
5214
5215 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5216
5217 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5218
5219 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5220
5221 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5222 (I387_MXCSR_INIT_VAL): New constant.
5223 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5224 buffer if it was supplied by the inferior.
5225 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5226 (i387_xsave_get_clear_bv): New function.
5227 (i387_supply_xsave): Only read x87 control registers from the
5228 xsave buffer if the feature is enabled, and the state will have
5229 been written, otherwise, provide a suitable default.
5230 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5231 including x87 control registers. Update control registers if they
5232 have changed from the default value, and mark features as enabled
5233 as required.
5234 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5235
5236 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5237
5238 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5239
5240 2018-05-07 Tom Tromey <tom@tromey.com>
5241
5242 * configure: Rebuild.
5243 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5244
5245 2018-05-07 Tom Tromey <tom@tromey.com>
5246
5247 PR tdep/20362:
5248 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5249 bit. Use correct value for VDIV.
5250
5251 2018-05-04 Tom Tromey <tom@tromey.com>
5252
5253 * configure: Rebuild.
5254 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5255
5256 2018-05-04 Tom Tromey <tom@tromey.com>
5257
5258 * linux-record.c (record_linux_system_call) <case
5259 RECORD_SYS_RECVFROM>: Add "break".
5260
5261 2018-05-04 Tom Tromey <tom@tromey.com>
5262
5263 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5264 Add missing "break".
5265 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5266 Add missing "break".
5267
5268 2018-05-04 Tom Tromey <tom@tromey.com>
5269
5270 * rs6000-tdep.c (ppc_process_record_op4)
5271 (ppc_process_record_op63): Add fall-through comment.
5272
5273 2018-05-04 Tom Tromey <tom@tromey.com>
5274
5275 * i386-tdep.c (i386_process_record): Add fall-through comment.
5276
5277 2018-05-04 Tom Tromey <tom@tromey.com>
5278
5279 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5280 comment.
5281
5282 2018-05-04 Tom Tromey <tom@tromey.com>
5283
5284 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5285 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5286 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5287 comment.
5288 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5289 comment.
5290 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5291 comment.
5292
5293 2018-05-04 Tom Tromey <tom@tromey.com>
5294
5295 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5296
5297 2018-05-04 Tom Tromey <tom@tromey.com>
5298
5299 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5300 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5301 * symfile.c (section_is_mapped): Fix fall-through comment.
5302 * stabsread.c (define_symbol, read_member_functions): Fix
5303 fall-through comment.
5304 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5305 comment.
5306 * remote.c (remote_wait_as): Fix fall-through comment.
5307 * p-exp.y (yylex): Fix fall-through comment.
5308 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5309 comment.
5310 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5311 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5312 * jv-exp.y (yylex): Fix fall-through comment.
5313 * go-exp.y (lex_one_token): Fix fall-through comment.
5314 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5315 fall-through comment.
5316 * f-exp.y (yylex): Fix fall-through comment.
5317 * dwarf2read.c (process_die): Fix fall-through comments.
5318 * dbxread.c (process_one_symbol): Fix fall-through comment.
5319 * d-exp.y (lex_one_token): Fix fall-through comment.
5320 * cp-name-parser.y (yylex): Fix fall-through comment.
5321 * coffread.c (coff_symtab_read): Fix fall-through comment.
5322 * c-exp.y (lex_one_token): Fix fall-through comment.
5323 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5324 comment.
5325 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5326 comment.
5327
5328 2018-05-04 Tom Tromey <tom@tromey.com>
5329
5330 PR python/22730:
5331 * NEWS: Mention gdb.execute change.
5332 * gdbcmd.h (execute_control_command): Don't declare.
5333 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5334 execute_control_commands, execute_control_commands_to_string.
5335 * cli/cli-script.h (execute_control_commands)
5336 (execute_control_commands_to_string): Declare.
5337 (execute_control_command): Add from_tty parameter.
5338 * cli/cli-script.c (execute_control_commands)
5339 (execute_control_commands_to_string): New functions.
5340 (execute_user_command): Use execute_control_commands.
5341 (execute_control_command_1): Add "from_tty" parameter. Update.
5342 (execute_control_command): Likewise.
5343
5344 2018-05-04 Tom Tromey <tom@tromey.com>
5345
5346 PR python/22731:
5347 * NEWS: Mention that breakpoint commands are writable.
5348 * python/py-breakpoint.c (bppy_set_commands): New function.
5349 (breakpoint_object_getset) <"commands">: Use it.
5350
5351 2018-05-04 Tom Tromey <tom@tromey.com>
5352
5353 * tracepoint.c (actions_command): Update.
5354 * mi/mi-cmd-break.c (mi_command_line_array)
5355 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5356 (mi_read_next_line): Remove.
5357 (mi_cmd_break_commands): Update.
5358 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5359 function_view.
5360 * cli/cli-script.c (get_command_line): Update.
5361 (process_next_line): Use function_view. Constify.
5362 (recurse_read_control_structure, read_command_lines)
5363 (read_command_lines_1): Change argument types to function_view.
5364 (do_define_command, document_command): Update.
5365 * breakpoint.h (check_tracepoint_command): Don't declare.
5366 * breakpoint.c (check_tracepoint_command): Remove.
5367 (commands_command_1, create_tracepoint_from_upload): Update.
5368
5369 2018-05-04 Tom Tromey <tom@tromey.com>
5370
5371 PR gdb/11750:
5372 * cli/cli-script.h (enum command_control_type) <define_control>:
5373 New constant.
5374 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5375 (build_command_line, execute_control_command_1)
5376 (process_next_line): Likewise.
5377 (do_define_command): New function, extracted from define_command.
5378 (define_command): Use it.
5379
5380 2018-05-04 Tom Tromey <tom@tromey.com>
5381
5382 * tracepoint.c (actions_command): Update.
5383 * cli/cli-script.h (read_command_lines): Update.
5384 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5385 (MAX_TMPBUF): Remove define.
5386 (define_command): Use string_printf.
5387 (document_command): Likewise.
5388 * breakpoint.c (commands_command_1): Update.
5389
5390 2018-05-04 Tom Tromey <tom@tromey.com>
5391
5392 * top.c (execute_command): Update.
5393 * cli/cli-script.h (print_command_lines): Now varargs.
5394 * cli/cli-script.c (print_command_lines): Now varargs.
5395 (execute_control_command_1) <case while_control, case if_control>:
5396 Update.
5397
5398 2018-05-04 Tom Tromey <tom@tromey.com>
5399
5400 * tracepoint.c (all_tracepoint_actions): Rename from
5401 all_tracepoint_actions_and_cleanup. Change return type.
5402 (actions_command, encode_actions_1, encode_actions)
5403 (trace_dump_actions, tdump_command): Update.
5404 * remote.c (remote_download_command_source): Update.
5405 * python/python.c (gdbpy_eval_from_control_command)
5406 (python_command, python_interactive_command): Update.
5407 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5408 * guile/guile.c (guile_command)
5409 (gdbscm_eval_from_control_command, guile_command): Update.
5410 * compile/compile.c (compile_code_command)
5411 (compile_print_command, compile_to_object): Update.
5412 * cli/cli-script.h (struct command_lines_deleter): New.
5413 (counted_command_line): New typedef.
5414 (struct command_line): Add constructor, destructor.
5415 <body_list>: Remove.
5416 <body_list_0, body_list_1>: New members.
5417 (command_line_up): Remove typedef.
5418 (read_command_lines, read_command_lines_1, get_command_line):
5419 Update.
5420 (copy_command_lines): Don't declare.
5421 * cli/cli-script.c (build_command_line): Use "new".
5422 (get_command_line): Return counted_command_line.
5423 (print_command_lines, execute_user_command)
5424 (execute_control_command_1, while_command, if_command): Update.
5425 (realloc_body_list): Remove.
5426 (process_next_line, recurse_read_control_structure): Update.
5427 (read_command_lines, read_command_lines_1): Return counted_command_line.
5428 (free_command_lines): Use "delete".
5429 (copy_command_lines): Remove.
5430 (define_command, document_command, show_user_1): Update.
5431 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5432 a counted_command_line.
5433 * breakpoint.h (counted_command_line): Remove typedef.
5434 (breakpoint_set_commands): Update.
5435 * breakpoint.c (check_no_tracepoint_commands)
5436 (validate_commands_for_breakpoint): Update.
5437 (breakpoint_set_commands): Change commands to be a
5438 counted_command_line.
5439 (commands_command_1, update_dprintf_command_list)
5440 (create_tracepoint_from_upload): Update.
5441
5442 2018-05-04 Tom Tromey <tom@tromey.com>
5443
5444 * cli/cli-decode.h (cmd_list_element): New constructor.
5445 (~cmd_list_element): New destructor.
5446 (struct cmd_list_element): Add initializers.
5447 * cli/cli-decode.c (do_add_cmd): Use "new".
5448 (delete_cmd): Use "delete".
5449
5450 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5451 Pedro Alves <palves@redhat.com>
5452
5453 PR breakpoints/19806 and support for PR external/20207.
5454 * NEWS: Mention Aarch64 watchpoint improvements.
5455 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5456 watchpoints and PR external/20207 watchpoints.
5457 * nat/aarch64-linux-hw-point.c
5458 (kernel_supports_any_contiguous_range): New.
5459 (aarch64_watchpoint_offset): New.
5460 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5461 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5462 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5463 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5464 next_addr_orig_p. Support PR external/20207 watchpoints.
5465 (aarch64_downgrade_regs): New.
5466 (aarch64_dr_state_insert_one_point): New parameters offset and
5467 addr_orig.
5468 (aarch64_dr_state_remove_one_point): Likewise.
5469 (aarch64_handle_breakpoint): Update caller.
5470 (aarch64_handle_aligned_watchpoint): Likewise.
5471 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5472 aligned_offset.
5473 (aarch64_linux_set_debug_regs): Remove const from state. Call
5474 aarch64_downgrade_regs.
5475 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5476 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5477 (DR_CONTROL_MASK): ... this.
5478 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5479 (unsigned int aarch64_watchpoint_offset): New prototype.
5480 (aarch64_linux_set_debug_regs): Remove const from state.
5481 * utils.c (align_up, align_down): Move to ...
5482 * common/common-utils.c (align_up, align_down): ... here.
5483 * utils.h (align_up, align_down): Move to ...
5484 * common/common-utils.h (align_up, align_down): ... here.
5485
5486 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5487
5488 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5489 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5490 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5491 Re-implement to match the ABI as summarized in GCC's
5492 gcc/config/sparc/sparc.c. All callers updated.
5493 (sparc32_store_arguments): Remove assertion.
5494
5495 2018-05-04 Tom Tromey <tom@tromey.com>
5496
5497 * printcmd.c: Don't include tui.h.
5498 (decode_format): Use skip_spaces.
5499
5500 2018-05-04 Tom Tromey <tom@tromey.com>
5501
5502 PR gdb/22619:
5503 * printcmd.c (last_count): New global.
5504 (x_command): Use saved count when repeating.
5505
5506 2018-05-04 Tom Tromey <tom@tromey.com>
5507
5508 * nto-procfs.c (do_closedir_cleanup): Remove.
5509 (procfs_pidlist): Use gdb_dir_up.
5510 * procfs.c (do_closedir_cleanup): Remove.
5511 (proc_update_threads): Use gdb_dir_up.
5512 * common/filestuff.h (struct gdb_dir_deleter): New.
5513 (gdb_dir_up): New typedef.
5514
5515 2018-05-04 Tom Tromey <tom@tromey.com>
5516
5517 * ada-lang.c (print_mention_exception): Use std::string.
5518
5519 2018-05-04 Tom Tromey <tom@tromey.com>
5520
5521 * ada-lang.c (create_excep_cond_exprs): Update.
5522 (ada_exception_catchpoint_cond_string): Use std::string.
5523
5524 2018-05-04 Tom Tromey <tom@tromey.com>
5525
5526 * ada-lang.c (xget_renaming_scope): Return std::string.
5527 (old_renaming_is_invisible): Update.
5528
5529 2018-05-04 Tom Tromey <tom@tromey.com>
5530
5531 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5532 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5533
5534 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5535
5536 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5537
5538 2018-05-04 Tom Tromey <tom@tromey.com>
5539
5540 * remote.c (remote_query_supported_append): Change type.
5541 (remote_check_symbols): Update.
5542
5543 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5544
5545 PR gdb/11420
5546 * configure.ac: Prepend libpython.
5547 * python/python-config.py: Likewise.
5548 * configure: Regenerate.
5549
5550 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5551
5552 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5553
5554 2018-05-03 Pedro Alves <palves@redhat.com>
5555
5556 * s390-linux-nat.c
5557 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5558 override. Write 'true' instead of '1'.
5559 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5560 declaration.
5561
5562 2018-05-02 Pedro Alves <palves@redhat.com>
5563
5564 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5565 add_inf_child_target.
5566 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5567 add_inf_child_target.
5568 * aix-thread.c (aix_thread_target_info): New.
5569 (aix_thread_target) <shortname, longname, doc>: Delete.
5570 <info>: New.
5571 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5572 add_inf_child_target.
5573 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5574 add_inf_child_target.
5575 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5576 add_inf_child_target.
5577 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5578 add_inf_child_target.
5579 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5580 add_inf_child_target.
5581 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5582 add_inf_child_target.
5583 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5584 add_inf_child_target.
5585 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5586 add_inf_child_target.
5587 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5588 add_inf_child_target.
5589 * bfd-target.c (target_bfd_target_info): New.
5590 (target_bfd) <shortname, longname, doc>: Delete.
5591 <info>: New.
5592 * bsd-kvm.c (bsd_kvm_target_info): New.
5593 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5594 <info>: New.
5595 (bsd_kvm_target::open): Rename to ...
5596 (bsd_kvm_target_open): ... this. Adjust.
5597 * bsd-uthread.c (bsd_uthread_target_info): New.
5598 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5599 <info>: New.
5600 * corefile.c (core_file_command): Adjust.
5601 * corelow.c (core_target_info): New.
5602 (core_target) <shortname, longname, doc>: Delete.
5603 <info>: New.
5604 (core_target::open): Rename to ...
5605 (core_target_open): ... this. Adjust.
5606 * ctf.c (ctf_target_info): New.
5607 (ctf_target) <shortname, longname, doc>: Delete.
5608 <info>: New.
5609 (ctf_target::open): Rename to ...
5610 (ctf_target_open): ... this.
5611 (_initialize_ctf): Adjust.
5612 * exec.c (exec_target_info): New.
5613 (exec_target) <shortname, longname, doc>: Delete.
5614 <info>: New.
5615 (exec_target::open): Rename to ...
5616 (exec_target_open): ... this.
5617 * gdbcore.h (core_target_open): Declare.
5618 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5619 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5620 add_inf_child_target.
5621 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5622 add_inf_child_target.
5623 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5624 add_inf_child_target.
5625 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5626 add_inf_child_target.
5627 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5628 add_inf_child_target.
5629 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5630 add_inf_child_target.
5631 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5632 add_inf_child_target.
5633 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5634 add_inf_child_target.
5635 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5636 add_inf_child_target.
5637 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5638 add_inf_child_target.
5639 * inf-child.c (inf_child_target_info): New.
5640 (inf_child_target::info): New.
5641 (inf_child_open_target): Remove 'target' parameter. Use
5642 get_native_target instead.
5643 (inf_child_target::open): Delete.
5644 (add_inf_child_target): New.
5645 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5646 Delete.
5647 <info>: New.
5648 (add_inf_child_target): Declare.
5649 (inf_child_open_target): Declare.
5650 * linux-thread-db.c (thread_db_target_info): New.
5651 (thread_db_target) <shortname, longname, doc>: Delete.
5652 <info>: New.
5653 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5654 add_inf_child_target.
5655 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5656 add_inf_child_target.
5657 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5658 add_inf_child_target.
5659 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5660 add_inf_child_target.
5661 * make-target-delegates (print_class): Adjust.
5662 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5663 add_inf_child_target.
5664 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5665 add_inf_child_target.
5666 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5667 add_inf_child_target.
5668 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5669 add_inf_child_target.
5670 * nto-procfs.c (nto_native_target_info): New.
5671 (nto_procfs_target_native) <shortname, longname, doc>:
5672 Delete.
5673 <info>: New.
5674 (nto_procfs_target_info): New.
5675 (nto_procfs_target_procfs) <shortname, longname, doc>:
5676 Delete.
5677 <info>: New.
5678 (init_procfs_targets): Adjust.
5679 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5680 add_inf_child_target.
5681 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5682 add_inf_child_target.
5683 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5684 add_inf_child_target.
5685 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5686 add_inf_child_target.
5687 * ravenscar-thread.c (ravenscar_target_info): New.
5688 (ravenscar_thread_target) <shortname, longname, doc>:
5689 Delete.
5690 <info>: New.
5691 * record-btrace.c (record_btrace_target_info):
5692 (record_btrace_target) <shortname, longname, doc>: Delete.
5693 <info>: New.
5694 (record_btrace_target::open): Rename to ...
5695 (record_btrace_target_open): ... this. Adjust.
5696 * record-full.c (record_longname, record_doc): New.
5697 (record_full_base_target) <shortname, longname, doc>: Delete.
5698 <info>: New.
5699 (record_full_target_info): New.
5700 (record_full_target): <shortname>: Delete.
5701 <info>: New.
5702 (record_full_core_open_1, record_full_open_1): Update comments.
5703 (record_full_base_target::open): Rename to ...
5704 (record_full_open): ... this.
5705 (cmd_record_full_restore): Update.
5706 (_initialize_record_full): Update.
5707 * remote-sim.c (remote_sim_target_info): New.
5708 (gdbsim_target) <shortname, longname, doc>: Delete.
5709 <info>: New.
5710 (gdbsim_target::open): Rename to ...
5711 (gdbsim_target_open): ... this.
5712 (_initialize_remote_sim): Adjust.
5713 * remote.c (remote_doc): New.
5714 (remote_target_info): New.
5715 (remote_target) <shortname, longname, doc>: Delete.
5716 <info>: New.
5717 (extended_remote_target_info): New.
5718 (extended_remote_target) <shortname, longname, doc>: Delete.
5719 <info>: New.
5720 (remote_target::open_1): Make static. Adjust.
5721 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5722 * s390-linux-nat.c (_initialize_s390_nat): Use
5723 add_inf_child_target.
5724 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5725 add_inf_child_target.
5726 * sol-thread.c (thread_db_target_info): New.
5727 (sol_thread_target) <shortname, longname, doc>: Delete.
5728 <info>: New.
5729 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5730 add_inf_child_target.
5731 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5732 add_inf_child_target.
5733 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5734 add_inf_child_target.
5735 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5736 add_inf_child_target.
5737 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5738 add_inf_child_target.
5739 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5740 add_inf_child_target.
5741 * spu-linux-nat.c (_initialize_spu_nat): Use
5742 add_inf_child_target.
5743 * spu-multiarch.c (spu_multiarch_target_info): New.
5744 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5745 <info>: New.
5746 * target-delegates.c: Regenerate.
5747 * target.c: Include <unordered_map>.
5748 (target_ops_p): Delete.
5749 (DEF_VEC_P(target_ops_p)): Delete.
5750 (target_factories): New.
5751 (test_target_info): New.
5752 (test_target_ops::info): New.
5753 (open_target): Adjust to use target_factories.
5754 (add_target_with_completer): Rename to ...
5755 (add_target): ... this. Change prototype. Register target_info
5756 and open callback in target_factories. Register target_info in
5757 command context instead of target_ops.
5758 (add_target): Delete old implementation.
5759 (add_deprecated_target_alias): Change prototype. Adjust.
5760 (the_native_target): New.
5761 (set_native_target, get_native_target): New.
5762 (find_default_run_target): Use the_native_target.
5763 (find_attach_target, find_run_target): Simplify.
5764 (target_ops::open): Delete.
5765 (dummy_target_info): New.
5766 (dummy_target::shortname, dummy_target::longname)
5767 (dummy_target::doc): Delete.
5768 (dummy_target::info): New.
5769 (debug_target::shortname, debug_target::longname)
5770 (debug_target::doc): Delete.
5771 (debug_target::info): New.
5772 * target.h (struct target_info): New.
5773 (target_ops::~target_ops): Add comment.
5774 (target_ops::info): New.
5775 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5776 longer virtual. Implement in terms of target_info.
5777 (set_native_target, get_native_target): Declare.
5778 (target_open_ftype): New.
5779 (add_target, add_target_with_completer)
5780 (add_deprecated_target_alias): Change prototype.
5781 (test_target) <shortname, longname, doc>: Delete.
5782 <info>: New.
5783 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5784 add_inf_child_target.
5785 * tracefile-tfile.c (tfile_target_info): New.
5786 (tfile_target) <shortname, longname, doc>: Delete.
5787 <info>: New.
5788 (tfile_target::open): Rename to ...
5789 (tfile_target_open): ... this.
5790 (_initialize_tracefile_tfile): Adjust.
5791 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5792 add_inf_child_target.
5793 * windows-nat.c (_initialize_windows_nat): Use
5794 add_inf_child_target.
5795 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5796 add_inf_child_target.
5797
5798 2018-05-02 Pedro Alves <palves@redhat.com>
5799
5800 * linux-nat.h (linux_nat_target) <low_new_thread,
5801 low_delete_thread, low_new_fork, low_forget_process,
5802 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5803 New virtual methods.
5804 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5805 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5806 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5807 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5808 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5809 Delete.
5810 * linux-fork.c (delete_fork): Adjust to call low method.
5811 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5812 (linux_nat_new_fork, linux_nat_forget_process_hook)
5813 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5814 (linux_nat_status_is_event):
5815 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5816 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5817 to call low method.
5818 (sigtrap_is_event): Rename to ...
5819 (linux_nat_target::low_status_is_event): ... this.
5820 (linux_nat_set_status_is_event): Delete.
5821 (save_stop_reason, linux_nat_wait_1)
5822 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5823 low methods.
5824 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5825 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5826 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5827 (linux_nat_set_prepare_to_resume): Delete.
5828 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5829 low virtual methods.
5830 * amd64-linux-nat.c: Likewise.
5831 * arm-linux-nat.c: Likewise.
5832 * i386-linux-nat.c: Likewise.
5833 * ia64-linux-nat.c: Likewise.
5834 * mips-linux-nat.c: Likewise.
5835 * ppc-linux-nat.c: Likewise.
5836 * s390-linux-nat.c: Likewise.
5837 * sparc64-linux-nat.c: Likewise.
5838 * x86-linux-nat.c: Likewise.
5839 * x86-linux-nat.h: Include "nat/x86-linux.h".
5840 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5841 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5842 Override methods.
5843
5844 2018-05-02 Pedro Alves <palves@redhat.com>
5845
5846 * target.h (target_ops)
5847 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5848 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5849 stopped_by_watchpoint, have_continuable_watchpoint,
5850 stopped_data_address, watchpoint_addr_within_range,
5851 can_accel_watchpoint_condition, can_run, thread_alive,
5852 has_all_memory, has_memory, has_stack, has_registers,
5853 has_execution, can_async_p, is_async_p, supports_non_stop,
5854 always_non_stop_p, can_execute_reverse, supports_multi_process,
5855 supports_enable_disable_tracepoint,
5856 supports_disable_randomization, supports_string_tracing,
5857 supports_evaluation_of_breakpoint_conditions,
5858 can_run_breakpoint_commands, filesystem_is_local,
5859 can_download_tracepoint, get_trace_state_variable_value,
5860 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5861 record_is_replaying, record_will_replay,
5862 augmented_libraries_svr4_read>: Adjust to return bool.
5863 * aarch64-linux-nat.c: All implementations adjusted.
5864 * aix-thread.c: All implementations adjusted.
5865 * arm-linux-nat.c: All implementations adjusted.
5866 * breakpoint.c: All implementations adjusted.
5867 * bsd-kvm.c: All implementations adjusted.
5868 * bsd-uthread.c: All implementations adjusted.
5869 * corelow.c: All implementations adjusted.
5870 * ctf.c: All implementations adjusted.
5871 * darwin-nat.c: All implementations adjusted.
5872 * darwin-nat.h: All implementations adjusted.
5873 * exec.c: All implementations adjusted.
5874 * fbsd-nat.c: All implementations adjusted.
5875 * fbsd-nat.h: All implementations adjusted.
5876 * gnu-nat.c: All implementations adjusted.
5877 * gnu-nat.h: All implementations adjusted.
5878 * go32-nat.c: All implementations adjusted.
5879 * ia64-linux-nat.c: All implementations adjusted.
5880 * inf-child.c: All implementations adjusted.
5881 * inf-child.h: All implementations adjusted.
5882 * inf-ptrace.c: All implementations adjusted.
5883 * inf-ptrace.h: All implementations adjusted.
5884 * linux-nat.c: All implementations adjusted.
5885 * linux-nat.h: All implementations adjusted.
5886 * mips-linux-nat.c: All implementations adjusted.
5887 * nto-procfs.c: All implementations adjusted.
5888 * ppc-linux-nat.c: All implementations adjusted.
5889 * procfs.c: All implementations adjusted.
5890 * ravenscar-thread.c: All implementations adjusted.
5891 * record-btrace.c: All implementations adjusted.
5892 * record-full.c: All implementations adjusted.
5893 * remote-sim.c: All implementations adjusted.
5894 * remote.c: All implementations adjusted.
5895 * s390-linux-nat.c: All implementations adjusted.
5896 * sol-thread.c: All implementations adjusted.
5897 * spu-multiarch.c: All implementations adjusted.
5898 * target-delegates.c: All implementations adjusted.
5899 * target.c: All implementations adjusted.
5900 * target.h: All implementations adjusted.
5901 * tracefile-tfile.c: All implementations adjusted.
5902 * tracefile.c: All implementations adjusted.
5903 * tracefile.h: All implementations adjusted.
5904 * windows-nat.c: All implementations adjusted.
5905 * x86-linux-nat.h: All implementations adjusted.
5906 * x86-nat.h: All implementations adjusted.
5907
5908 2018-05-02 Pedro Alves <palves@redhat.com>
5909
5910 * make-target-delegates (scan_target_h): Don't trim lines here.
5911 Replace sequences of tabs and/or whitespace with a single
5912 whitespace.
5913 (top level, parsing methods): Trim each line before processing it
5914 here.
5915
5916 2018-05-02 Pedro Alves <palves@redhat.com>
5917 John Baldwin <jhb@freebsd.org>
5918
5919 * target.h (enum strata) <debug_stratum>: New.
5920 (struct target_ops) <all delegation methods>: Replace by C++
5921 virtual methods, and drop "to_" prefix. All references updated
5922 throughout.
5923 <to_shortname, to_longname, to_doc, to_data,
5924 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5925 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5926 virtual methods. All references updated throughout.
5927 <can_attach, supports_terminal_ours, can_create_inferior,
5928 get_thread_control_capabilities, attach_no_wait>: New
5929 virtual methods.
5930 <insert_breakpoint, remove_breakpoint>: Now
5931 TARGET_DEFAULT_NORETURN methods.
5932 <info_proc>: Now returns bool.
5933 <to_magic>: Delete.
5934 (OPS_MAGIC): Delete.
5935 (current_target): Delete. All references replaced by references
5936 to ...
5937 (target_stack): ... this. New.
5938 (target_shortname, target_longname): Adjust.
5939 (target_can_run): Now a function declaration.
5940 (default_child_has_all_memory, default_child_has_memory)
5941 (default_child_has_stack, default_child_has_registers)
5942 (default_child_has_execution): Remove target_ops parameter.
5943 (complete_target_initialization): Delete.
5944 (memory_breakpoint_target): New template class.
5945 (test_target_ops): Refactor as a C++ class with virtual methods.
5946 * make-target-delegates (NAME_PART): Tighten.
5947 (POINTER_PART, CP_SYMBOL): New.
5948 (SIMPLE_RETURN_PART): Reimplement.
5949 (VEC_RETURN_PART): Expect less.
5950 (RETURN_PART, VIRTUAL_PART): New.
5951 (METHOD): Adjust to C++ virtual methods.
5952 (scan_target_h): Remove reference to C99.
5953 (dname): Output "target_ops::" prefix.
5954 (write_function_header): Adjust to output a C++ class method.
5955 (write_declaration): New.
5956 (write_delegator): Adjust to output a C++ class method.
5957 (tdname): Output "dummy_target::" prefix.
5958 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5959 method.
5960 (tdefault_names, debug_names): Delete.
5961 (return_types, tdefaults, styles, argtypes_array): New.
5962 (top level): All methods are delegators.
5963 (print_class): New.
5964 (top level): Print dummy_target and debug_target classes.
5965 * target-delegates.c: Regenerate.
5966 * target-debug.h (target_debug_print_enum_info_proc_what)
5967 (target_debug_print_thread_control_capabilities)
5968 (target_debug_print_thread_info_p): New.
5969 * target.c (dummy_target): Delete.
5970 (the_dummy_target, the_debug_target): New.
5971 (target_stack): Now extern.
5972 (set_targetdebug): Push/unpush debug target.
5973 (default_child_has_all_memory, default_child_has_memory)
5974 (default_child_has_stack, default_child_has_registers)
5975 (default_child_has_execution): Remove target_ops parameter.
5976 (complete_target_initialization): Delete.
5977 (add_target_with_completer): No longer call
5978 complete_target_initialization.
5979 (target_supports_terminal_ours): Use regular delegation.
5980 (update_current_target): Delete.
5981 (push_target): No longer check magic number. Don't call
5982 update_current_target.
5983 (unpush_target): Don't call update_current_target.
5984 (target_is_pushed): No longer check magic number.
5985 (target_require_runnable): Skip for all stratums over
5986 process_stratum.
5987 (target_ops::info_proc): New.
5988 (target_info_proc): Use find_target_at and
5989 find_default_run_target.
5990 (target_supports_disable_randomization): Use regular delegation.
5991 (target_get_osdata): Use find_target_at.
5992 (target_ops::open, target_ops::close, target_ops::can_attach)
5993 (target_ops::attach, target_ops::can_create_inferior)
5994 (target_ops::create_inferior, target_ops::can_run)
5995 (target_can_run): New.
5996 (default_fileio_target): Use regular delegation.
5997 (target_ops::fileio_open, target_ops::fileio_pwrite)
5998 (target_ops::fileio_pread, target_ops::fileio_fstat)
5999 (target_ops::fileio_close, target_ops::fileio_unlink)
6000 (target_ops::fileio_readlink): New.
6001 (target_fileio_open_1, target_fileio_unlink)
6002 (target_fileio_readlink): Always call the target method. Handle
6003 FILEIO_ENOSYS.
6004 (return_zero, return_zero_has_execution): Delete.
6005 (init_dummy_target): Delete.
6006 (dummy_target::dummy_target, dummy_target::shortname)
6007 (dummy_target::longname, dummy_target::doc)
6008 (debug_target::debug_target, debug_target::shortname)
6009 (debug_target::longname, debug_target::doc): New.
6010 (target_supports_delete_record): Use regular delegation.
6011 (setup_target_debug): Delete.
6012 (maintenance_print_target_stack): Skip debug_stratum.
6013 (initialize_targets): Instantiate the_dummy_target and
6014 the_debug_target.
6015 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6016 use target_stack.
6017 (target_auxv_search, fprint_target_auxv): Adjust.
6018 (info_auxv_command): Adjust to use target_stack.
6019 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6020 * exceptions.c (print_flush): Handle a NULL target_stack.
6021 * regcache.c (target_ops_no_register): Refactor as class with
6022 virtual methods.
6023
6024 * exec.c (exec_target): New class.
6025 (exec_ops): Now an exec_target.
6026 (exec_open, exec_close_1, exec_get_section_table)
6027 (exec_xfer_partial, exec_files_info, exec_has_memory)
6028 (exec_make_note_section): Refactor as exec_target methods.
6029 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6030 Delete.
6031 (exec_target::find_memory_regions): New.
6032 (_initialize_exec): Don't call init_exec_ops.
6033 * gdbcore.h (exec_file_clear): Delete.
6034
6035 * corefile.c (core_target): Delete.
6036 (core_file_command): Adjust.
6037 * corelow.c (core_target): New class.
6038 (the_core_target): New.
6039 (core_close): Remove target_ops parameter.
6040 (core_close_cleanup): Adjust.
6041 (core_target::close): New.
6042 (core_open, core_detach, get_core_registers, core_files_info)
6043 (core_xfer_partial, core_thread_alive, core_read_description)
6044 (core_pid_to_str, core_thread_name, core_has_memory)
6045 (core_has_stack, core_has_registers, core_info_proc): Rework as
6046 core_target methods.
6047 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6048 (_initialize_corelow): Initialize the_core_target.
6049 * gdbcore.h (core_target): Delete.
6050 (the_core_target): New.
6051
6052 * ctf.c: (ctf_target): New class.
6053 (ctf_ops): Now a ctf_target.
6054 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6055 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6056 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6057 methods.
6058 (init_ctf_ops): Delete.
6059 (_initialize_ctf): Don't call it.
6060 * tracefile-tfile.c (tfile_target): New class.
6061 (tfile_ops): Now a tfile_target.
6062 (tfile_open, tfile_close, tfile_files_info)
6063 (tfile_get_tracepoint_status, tfile_trace_find)
6064 (tfile_fetch_registers, tfile_xfer_partial)
6065 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6066 Refactor as tfile_target methods.
6067 (tfile_xfer_partial_features): Remove target_ops parameter.
6068 (init_tfile_ops): Delete.
6069 (_initialize_tracefile_tfile): Don't call it.
6070 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6071 (tracefile_has_stack, tracefile_has_registers)
6072 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6073 tracefile_target methods.
6074 (init_tracefile_ops): Delete.
6075 (tracefile_target::tracefile_target): New.
6076 * tracefile.h: Include "target.h".
6077 (tracefile_target): New class.
6078 (init_tracefile_ops): Delete.
6079
6080 * spu-multiarch.c (spu_multiarch_target): New class.
6081 (spu_ops): Now a spu_multiarch_target.
6082 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6083 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6084 (spu_search_memory, spu_mourn_inferior): Refactor as
6085 spu_multiarch_target methods.
6086 (init_spu_ops): Delete.
6087 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6088 complete_target_initialization.
6089
6090 * ravenscar-thread.c (ravenscar_thread_target): New class.
6091 (ravenscar_ops): Now a ravenscar_thread_target.
6092 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6093 (ravenscar_thread_alive, ravenscar_pid_to_str)
6094 (ravenscar_fetch_registers, ravenscar_store_registers)
6095 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6096 (ravenscar_stopped_by_hw_breakpoint)
6097 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6098 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6099 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6100 methods.
6101 (init_ravenscar_thread_ops): Delete.
6102 (_initialize_ravenscar): Remove references to
6103 init_ravenscar_thread_ops and complete_target_initialization.
6104
6105 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6106 (bsd_uthread_target): New class.
6107 (bsd_uthread_ops): Now a bsd_uthread_target.
6108 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6109 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6110 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6111 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6112 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6113 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6114 (bsd_uthread_target): Delete function.
6115 (_initialize_bsd_uthread): Remove reference to
6116 complete_target_initialization.
6117
6118 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6119 (target_bfd): ... this new class.
6120 (target_bfd_xfer_partial, target_bfd_get_section_table)
6121 (target_bfd_close): Refactor as target_bfd methods.
6122 (target_bfd::~target_bfd): New.
6123 (target_bfd_reopen): Adjust.
6124 (target_bfd::close): New.
6125
6126 * record-btrace.c (record_btrace_target): New class.
6127 (record_btrace_ops): Now a record_btrace_target.
6128 (record_btrace_open, record_btrace_stop_recording)
6129 (record_btrace_disconnect, record_btrace_close)
6130 (record_btrace_async, record_btrace_info)
6131 (record_btrace_insn_history, record_btrace_insn_history_range)
6132 (record_btrace_insn_history_from, record_btrace_call_history)
6133 (record_btrace_call_history_range)
6134 (record_btrace_call_history_from, record_btrace_record_method)
6135 (record_btrace_is_replaying, record_btrace_will_replay)
6136 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6137 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6138 (record_btrace_store_registers, record_btrace_prepare_to_store)
6139 (record_btrace_to_get_unwinder)
6140 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6141 (record_btrace_commit_resume, record_btrace_wait)
6142 (record_btrace_stop, record_btrace_can_execute_reverse)
6143 (record_btrace_stopped_by_sw_breakpoint)
6144 (record_btrace_supports_stopped_by_sw_breakpoint)
6145 (record_btrace_stopped_by_hw_breakpoint)
6146 (record_btrace_supports_stopped_by_hw_breakpoint)
6147 (record_btrace_update_thread_list, record_btrace_thread_alive)
6148 (record_btrace_goto_begin, record_btrace_goto_end)
6149 (record_btrace_goto, record_btrace_stop_replaying_all)
6150 (record_btrace_execution_direction)
6151 (record_btrace_prepare_to_generate_core)
6152 (record_btrace_done_generating_core): Refactor as
6153 record_btrace_target methods.
6154 (init_record_btrace_ops): Delete.
6155 (_initialize_record_btrace): Remove reference to
6156 init_record_btrace_ops.
6157 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6158 the execution_direction global.
6159 (record_full_base_target, record_full_target)
6160 (record_full_core_target): New classes.
6161 (record_full_ops): Now a record_full_target.
6162 (record_full_core_ops): Now a record_full_core_target.
6163 (record_full_target::detach, record_full_target::disconnect)
6164 (record_full_core_target::disconnect)
6165 (record_full_target::mourn_inferior, record_full_target::kill):
6166 New.
6167 (record_full_open, record_full_close, record_full_async): Refactor
6168 as methods of the record_full_base_target class.
6169 (record_full_resume, record_full_commit_resume): Refactor
6170 as methods of the record_full_target class.
6171 (record_full_wait, record_full_stopped_by_watchpoint)
6172 (record_full_stopped_data_address)
6173 (record_full_stopped_by_sw_breakpoint)
6174 (record_full_supports_stopped_by_sw_breakpoint)
6175 (record_full_stopped_by_hw_breakpoint)
6176 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6177 methods of the record_full_base_target class.
6178 (record_full_store_registers, record_full_xfer_partial)
6179 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6180 Refactor as methods of the record_full_target class.
6181 (record_full_can_execute_reverse, record_full_get_bookmark)
6182 (record_full_goto_bookmark, record_full_execution_direction)
6183 (record_full_record_method, record_full_info, record_full_delete)
6184 (record_full_is_replaying, record_full_will_replay)
6185 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6186 (record_full_stop_replaying): Refactor as methods of the
6187 record_full_base_target class.
6188 (record_full_core_resume, record_full_core_kill)
6189 (record_full_core_fetch_registers)
6190 (record_full_core_prepare_to_store)
6191 (record_full_core_store_registers, record_full_core_xfer_partial)
6192 (record_full_core_insert_breakpoint)
6193 (record_full_core_remove_breakpoint)
6194 (record_full_core_has_execution): Refactor
6195 as methods of the record_full_core_target class.
6196 (record_full_base_target::supports_delete_record): New.
6197 (init_record_full_ops): Delete.
6198 (init_record_full_core_ops): Delete.
6199 (record_full_save): Refactor as method of the
6200 record_full_base_target class.
6201 (_initialize_record_full): Remove references to
6202 init_record_full_ops and init_record_full_core_ops.
6203
6204 * remote.c (remote_target, extended_remote_target): New classes.
6205 (remote_ops): Now a remote_target.
6206 (extended_remote_ops): Now an extended_remote_target.
6207 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6208 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6209 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6210 (remote_pass_signals, remote_set_syscall_catchpoint)
6211 (remote_program_signals, )
6212 (remote_thread_always_alive): Remove target_ops parameter.
6213 (remote_thread_alive, remote_thread_name)
6214 (remote_update_thread_list, remote_threads_extra_info)
6215 (remote_static_tracepoint_marker_at)
6216 (remote_static_tracepoint_markers_by_strid)
6217 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6218 (remote_open): Refactor as methods of remote_target.
6219 (extended_remote_open, extended_remote_detach)
6220 (extended_remote_attach, extended_remote_post_attach):
6221 (extended_remote_supports_disable_randomization)
6222 (extended_remote_create_inferior): : Refactor as method of
6223 extended_remote_target.
6224 (remote_set_permissions, remote_open_1, remote_detach)
6225 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6226 (remote_resume, remote_commit_resume, remote_stop)
6227 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6228 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6229 (remote_prepare_to_store, remote_store_registers)
6230 (remote_flash_erase, remote_flash_done, remote_files_info)
6231 (remote_kill, remote_mourn, remote_insert_breakpoint)
6232 (remote_remove_breakpoint, remote_insert_watchpoint)
6233 (remote_watchpoint_addr_within_range)
6234 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6235 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6236 (remote_supports_stopped_by_sw_breakpoint)
6237 (remote_stopped_by_hw_breakpoint)
6238 (remote_supports_stopped_by_hw_breakpoint)
6239 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6240 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6241 (remote_verify_memory): Refactor as methods of remote_target.
6242 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6243 parameter.
6244 (remote_xfer_partial, remote_get_memory_xfer_limit)
6245 (remote_search_memory, remote_rcmd, remote_memory_map)
6246 (remote_pid_to_str, remote_get_thread_local_address)
6247 (remote_get_tib_address, remote_read_description): Refactor as
6248 methods of remote_target.
6249 (remote_target::fileio_open, remote_target::fileio_pwrite)
6250 (remote_target::fileio_pread, remote_target::fileio_close): New.
6251 (remote_hostio_readlink, remote_hostio_fstat)
6252 (remote_filesystem_is_local, remote_can_execute_reverse)
6253 (remote_supports_non_stop, remote_supports_disable_randomization)
6254 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6255 (remote_supports_enable_disable_tracepoint)
6256 (remote_supports_string_tracing)
6257 (remote_can_run_breakpoint_commands, remote_trace_init)
6258 (remote_download_tracepoint, remote_can_download_tracepoint)
6259 (remote_download_trace_state_variable, remote_enable_tracepoint)
6260 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6261 (remote_trace_start, remote_get_trace_status)
6262 (remote_get_tracepoint_status, remote_trace_stop)
6263 (remote_trace_find, remote_get_trace_state_variable_value)
6264 (remote_save_trace_data, remote_get_raw_trace_data)
6265 (remote_set_disconnected_tracing, remote_core_of_thread)
6266 (remote_set_circular_trace_buffer, remote_traceframe_info)
6267 (remote_get_min_fast_tracepoint_insn_len)
6268 (remote_set_trace_buffer_size, remote_set_trace_notes)
6269 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6270 (remote_disable_btrace, remote_teardown_btrace)
6271 (remote_read_btrace, remote_btrace_conf)
6272 (remote_augmented_libraries_svr4_read, remote_load)
6273 (remote_pid_to_exec_file, remote_can_do_single_step)
6274 (remote_execution_direction, remote_thread_handle_to_thread_info):
6275 Refactor as methods of remote_target.
6276 (init_remote_ops, init_extended_remote_ops): Delete.
6277 (remote_can_async_p, remote_is_async_p, remote_async)
6278 (remote_thread_events, remote_upload_tracepoints)
6279 (remote_upload_trace_state_variables): Refactor as methods of
6280 remote_target.
6281 (_initialize_remote): Remove references to init_remote_ops and
6282 init_extended_remote_ops.
6283
6284 * remote-sim.c (gdbsim_target): New class.
6285 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6286 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6287 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6288 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6289 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6290 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6291 Refactor as methods of gdbsim_target.
6292 (gdbsim_ops): Now a gdbsim_target.
6293 (init_gdbsim_ops): Delete.
6294 (gdbsim_cntrl_c): Adjust.
6295 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6296
6297 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6298 (the_amd64_linux_nat_target): New.
6299 (amd64_linux_fetch_inferior_registers)
6300 (amd64_linux_store_inferior_registers): Refactor as methods of
6301 amd64_linux_nat_target.
6302 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6303 * i386-linux-nat.c: Don't include "linux-nat.h".
6304 (i386_linux_nat_target): New class.
6305 (the_i386_linux_nat_target): New.
6306 (i386_linux_fetch_inferior_registers)
6307 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6308 as methods of i386_linux_nat_target.
6309 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6310 * inf-child.c (inf_child_ops): Delete.
6311 (inf_child_fetch_inferior_registers)
6312 (inf_child_store_inferior_registers): Delete.
6313 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6314 methods of inf_child_target.
6315 (inf_child_target::supports_terminal_ours)
6316 (inf_child_target::terminal_init)
6317 (inf_child_target::terminal_inferior)
6318 (inf_child_target::terminal_ours_for_output)
6319 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6320 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6321 New.
6322 (inf_child_open, inf_child_disconnect, inf_child_close)
6323 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6324 (inf_child_post_startup_inferior, inf_child_can_run)
6325 (inf_child_pid_to_exec_file): Refactor as methods of
6326 inf_child_target.
6327 (inf_child_follow_fork): Delete.
6328 (inf_child_target::can_create_inferior)
6329 (inf_child_target::can_attach): New.
6330 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6331 (inf_child_target::has_stack, inf_child_target::has_registers)
6332 (inf_child_target::has_execution): New.
6333 (inf_child_fileio_open, inf_child_fileio_pwrite)
6334 (inf_child_fileio_pread, inf_child_fileio_fstat)
6335 (inf_child_fileio_close, inf_child_fileio_unlink)
6336 (inf_child_fileio_readlink, inf_child_use_agent)
6337 (inf_child_can_use_agent): Refactor as methods of
6338 inf_child_target.
6339 (return_zero, inf_child_target): Delete.
6340 (inf_child_target::inf_child_target): New.
6341 * inf-child.h: Include "target.h".
6342 (inf_child_target): Delete function prototype.
6343 (inf_child_target): New class.
6344 (inf_child_open_target, inf_child_mourn_inferior)
6345 (inf_child_maybe_unpush_target): Delete.
6346 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6347 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6348 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6349 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6350 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6351 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6352 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6353 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6354 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6355 methods of inf_ptrace_target.
6356 (inf_ptrace_target): Delete function.
6357 * inf-ptrace.h: Include "inf-child.h".
6358 (inf_ptrace_target): Delete function declaration.
6359 (inf_ptrace_target): New class.
6360 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6361 * linux-nat.c (linux_target): New.
6362 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6363 (linux_nat_target::~linux_nat_target): New.
6364 (linux_child_post_attach, linux_child_post_startup_inferior)
6365 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6366 (linux_child_remove_fork_catchpoint)
6367 (linux_child_insert_vfork_catchpoint)
6368 (linux_child_remove_vfork_catchpoint)
6369 (linux_child_insert_exec_catchpoint)
6370 (linux_child_remove_exec_catchpoint)
6371 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6372 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6373 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6374 (linux_nat_stopped_data_address)
6375 (linux_nat_stopped_by_sw_breakpoint)
6376 (linux_nat_supports_stopped_by_sw_breakpoint)
6377 (linux_nat_stopped_by_hw_breakpoint)
6378 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6379 (linux_nat_kill, linux_nat_mourn_inferior)
6380 (linux_nat_xfer_partial, linux_nat_thread_alive)
6381 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6382 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6383 (linux_child_static_tracepoint_markers_by_strid)
6384 (linux_nat_is_async_p, linux_nat_can_async_p)
6385 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6386 (linux_nat_supports_multi_process)
6387 (linux_nat_supports_disable_randomization, linux_nat_async)
6388 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6389 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6390 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6391 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6392 methods of linux_nat_target.
6393 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6394 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6395 parameter.
6396 (check_stopped_by_watchpoint): Adjust.
6397 (linux_xfer_partial): Delete.
6398 (linux_target_install_ops, linux_target, linux_nat_add_target):
6399 Delete.
6400 (linux_nat_target::linux_nat_target): New.
6401 * linux-nat.h: Include "inf-ptrace.h".
6402 (linux_nat_target): New.
6403 (linux_target, linux_target_install_ops, linux_nat_add_target):
6404 Delete function declarations.
6405 (linux_target): Declare global.
6406 * linux-thread-db.c (thread_db_target): New.
6407 (thread_db_target::thread_db_target): New.
6408 (thread_db_ops): Delete.
6409 (the_thread_db_target): New.
6410 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6411 (thread_db_update_thread_list, thread_db_pid_to_str)
6412 (thread_db_extra_thread_info)
6413 (thread_db_thread_handle_to_thread_info)
6414 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6415 (thread_db_resume): Refactor as methods of thread_db_target.
6416 (init_thread_db_ops): Delete.
6417 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6418 * x86-linux-nat.c: Don't include "linux-nat.h".
6419 (super_post_startup_inferior): Delete.
6420 (x86_linux_nat_target::~x86_linux_nat_target): New.
6421 (x86_linux_child_post_startup_inferior)
6422 (x86_linux_read_description, x86_linux_enable_btrace)
6423 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6424 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6425 methods of x86_linux_nat_target.
6426 (x86_linux_create_target): Delete. Bits folded ...
6427 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6428 pointer.
6429 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6430 (x86_linux_nat_target): New class.
6431 (x86_linux_create_target): Delete.
6432 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6433 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6434 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6435 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6436 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6437 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6438 make extern.
6439 (x86_use_watchpoints): Delete.
6440 * x86-nat.h: Include "breakpoint.h" and "target.h".
6441 (x86_use_watchpoints): Delete.
6442 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6443 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6444 (x86_insert_watchpoint, x86_remove_watchpoint)
6445 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6446 (x86_stopped_by_hw_breakpoint): New declarations.
6447 (x86_nat_target): New template class.
6448
6449 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6450 (the_ppc_linux_nat_target): New.
6451 (ppc_linux_fetch_inferior_registers)
6452 (ppc_linux_can_use_hw_breakpoint)
6453 (ppc_linux_region_ok_for_hw_watchpoint)
6454 (ppc_linux_ranged_break_num_registers)
6455 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6456 (ppc_linux_insert_mask_watchpoint)
6457 (ppc_linux_remove_mask_watchpoint)
6458 (ppc_linux_can_accel_watchpoint_condition)
6459 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6460 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6461 (ppc_linux_watchpoint_addr_within_range)
6462 (ppc_linux_masked_watch_num_registers)
6463 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6464 (ppc_linux_read_description): Refactor as methods of
6465 ppc_linux_nat_target.
6466 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6467
6468 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6469 (procfs_target): New class.
6470 (the_procfs_target): New.
6471 (procfs_target): Delete function.
6472 (procfs_auxv_parse, procfs_attach, procfs_detach)
6473 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6474 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6475 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6476 (procfs_create_inferior, procfs_update_thread_list)
6477 (procfs_thread_alive, procfs_pid_to_str)
6478 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6479 (procfs_stopped_data_address, procfs_insert_watchpoint)
6480 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6481 (proc_find_memory_regions, procfs_info_proc)
6482 (procfs_make_note_section): Refactor as methods of procfs_target.
6483 (_initialize_procfs): Adjust.
6484 * sol-thread.c (sol_thread_target): New class.
6485 (sol_thread_ops): Now a sol_thread_target.
6486 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6487 (sol_thread_fetch_registers, sol_thread_store_registers)
6488 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6489 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6490 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6491 (init_sol_thread_ops): Delete.
6492 (_initialize_sol_thread): Adjust. Remove references to
6493 init_sol_thread_ops and complete_target_initialization.
6494
6495 * windows-nat.c (windows_nat_target): New class.
6496 (windows_fetch_inferior_registers)
6497 (windows_store_inferior_registers, windows_resume, windows_wait)
6498 (windows_attach, windows_detach, windows_pid_to_exec_file)
6499 (windows_files_info, windows_create_inferior)
6500 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6501 (windows_close, windows_pid_to_str, windows_xfer_partial)
6502 (windows_get_tib_address, windows_get_ada_task_ptid)
6503 (windows_thread_name, windows_thread_alive): Refactor as
6504 windows_nat_target methods.
6505 (do_initial_windows_stuff): Adjust.
6506 (windows_target): Delete function.
6507 (_initialize_windows_nat): Adjust.
6508
6509 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6510 (darwin_mourn_inferior, darwin_kill_inferior)
6511 (darwin_create_inferior, darwin_attach, darwin_detach)
6512 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6513 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6514 (darwin_supports_multi_process): Refactor as darwin_nat_target
6515 methods.
6516 (darwin_resume_to, darwin_files_info): Delete.
6517 (_initialize_darwin_inferior): Rename to ...
6518 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6519 * darwin-nat.h: Include "inf-child.h".
6520 (darwin_nat_target): New class.
6521 (darwin_complete_target): Delete.
6522 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6523 (darwin_target): New.
6524 (i386_darwin_fetch_inferior_registers)
6525 (i386_darwin_store_inferior_registers): Refactor as methods of
6526 darwin_nat_target.
6527 (darwin_complete_target): Delete, with ...
6528 (_initialize_i386_darwin_nat): ... bits factored out here.
6529
6530 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6531 (the_alpha_linux_nat_target): New.
6532 (alpha_linux_register_u_offset): Refactor as
6533 alpha_linux_nat_target method.
6534 (_initialize_alpha_linux_nat): Adjust.
6535 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6536 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6537 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6538 methods of linux_nat_trad_target.
6539 (linux_trad_target): Delete.
6540 * linux-nat-trad.h (linux_trad_target): Delete function.
6541 (linux_nat_trad_target): New class.
6542 * mips-linux-nat.c (mips_linux_nat_target): New class.
6543 (super_fetch_registers, super_store_registers, super_close):
6544 Delete.
6545 (the_mips_linux_nat_target): New.
6546 (mips64_linux_regsets_fetch_registers)
6547 (mips64_linux_regsets_store_registers)
6548 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6549 (mips_linux_register_u_offset, mips_linux_read_description)
6550 (mips_linux_can_use_hw_breakpoint)
6551 (mips_linux_stopped_by_watchpoint)
6552 (mips_linux_stopped_data_address)
6553 (mips_linux_region_ok_for_hw_watchpoint)
6554 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6555 (mips_linux_close): Refactor as methods of mips_linux_nat.
6556 (_initialize_mips_linux_nat): Adjust to C++ification.
6557
6558 * aix-thread.c (aix_thread_target): New class.
6559 (aix_thread_ops): Now an aix_thread_target.
6560 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6561 (aix_thread_fetch_registers, aix_thread_store_registers)
6562 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6563 (aix_thread_thread_alive, aix_thread_pid_to_str)
6564 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6565 Refactor as methods of aix_thread_target.
6566 (init_aix_thread_ops): Delete.
6567 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6568 and complete_target_initialization.
6569 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6570 (rs6000_nat_target): New class.
6571 (the_rs6000_nat_target): New.
6572 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6573 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6574 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6575 (super_create_inferior): Delete.
6576 (_initialize_rs6000_nat): Adjust to C++ification.
6577
6578 * arm-linux-nat.c (arm_linux_nat_target): New class.
6579 (the_arm_linux_nat_target): New.
6580 (arm_linux_fetch_inferior_registers)
6581 (arm_linux_store_inferior_registers, arm_linux_read_description)
6582 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6583 (arm_linux_remove_hw_breakpoint)
6584 (arm_linux_region_ok_for_hw_watchpoint)
6585 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6586 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6587 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6588 arm_linux_nat_target.
6589 (_initialize_arm_linux_nat): Adjust to C++ification.
6590
6591 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6592 (the_aarch64_linux_nat_target): New.
6593 (aarch64_linux_fetch_inferior_registers)
6594 (aarch64_linux_store_inferior_registers)
6595 (aarch64_linux_child_post_startup_inferior)
6596 (aarch64_linux_read_description)
6597 (aarch64_linux_can_use_hw_breakpoint)
6598 (aarch64_linux_insert_hw_breakpoint)
6599 (aarch64_linux_remove_hw_breakpoint)
6600 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6601 (aarch64_linux_region_ok_for_hw_watchpoint)
6602 (aarch64_linux_stopped_data_address)
6603 (aarch64_linux_stopped_by_watchpoint)
6604 (aarch64_linux_watchpoint_addr_within_range)
6605 (aarch64_linux_can_do_single_step): Refactor as methods of
6606 aarch64_linux_nat_target.
6607 (super_post_startup_inferior): Delete.
6608 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6609
6610 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6611 (the_hppa_linux_nat_target): New.
6612 (hppa_linux_fetch_inferior_registers)
6613 (hppa_linux_store_inferior_registers): Refactor as methods of
6614 hppa_linux_nat_target.
6615 (_initialize_hppa_linux_nat): Adjust to C++ification.
6616
6617 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6618 (the_ia64_linux_nat_target): New.
6619 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6620 (ia64_linux_stopped_data_address)
6621 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6622 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6623 ia64_linux_nat_target methods.
6624 (super_xfer_partial): Delete.
6625 (_initialize_ia64_linux_nat): Adjust to C++ification.
6626
6627 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6628 (the_m32r_linux_nat_target): New.
6629 (m32r_linux_fetch_inferior_registers)
6630 (m32r_linux_store_inferior_registers): Refactor as
6631 m32r_linux_nat_target methods.
6632 (_initialize_m32r_linux_nat): Adjust to C++ification.
6633
6634 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6635 (the_m68k_linux_nat_target): New.
6636 (m68k_linux_fetch_inferior_registers)
6637 (m68k_linux_store_inferior_registers): Refactor as
6638 m68k_linux_nat_target methods.
6639 (_initialize_m68k_linux_nat): Adjust to C++ification.
6640
6641 * s390-linux-nat.c (s390_linux_nat_target): New class.
6642 (the_s390_linux_nat_target): New.
6643 (s390_linux_fetch_inferior_registers)
6644 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6645 (s390_insert_watchpoint, s390_remove_watchpoint)
6646 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6647 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6648 (s390_auxv_parse, s390_read_description): Refactor as methods of
6649 s390_linux_nat_target.
6650 (_initialize_s390_nat): Adjust to C++ification.
6651
6652 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6653 (the_sparc_linux_nat_target): New.
6654 (_initialize_sparc_linux_nat): Adjust to C++ification.
6655 * sparc-nat.c (sparc_fetch_inferior_registers)
6656 (sparc_store_inferior_registers): Remove target_ops parameter.
6657 * sparc-nat.h (sparc_fetch_inferior_registers)
6658 (sparc_store_inferior_registers): Remove target_ops parameter.
6659 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6660 (the_sparc64_linux_nat_target): New.
6661 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6662
6663 * spu-linux-nat.c (spu_linux_nat_target): New class.
6664 (the_spu_linux_nat_target): New.
6665 (spu_child_post_startup_inferior, spu_child_post_attach)
6666 (spu_child_wait, spu_fetch_inferior_registers)
6667 (spu_store_inferior_registers, spu_xfer_partial)
6668 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6669 methods.
6670 (_initialize_spu_nat): Adjust to C++ification.
6671
6672 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6673 (the_tilegx_linux_nat_target): New.
6674 (fetch_inferior_registers, store_inferior_registers):
6675 Refactor as methods.
6676 (_initialize_tile_linux_nat): Adjust to C++ification.
6677
6678 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6679 (the_xtensa_linux_nat_target): New.
6680 (xtensa_linux_fetch_inferior_registers)
6681 (xtensa_linux_store_inferior_registers): Refactor as
6682 xtensa_linux_nat_target methods.
6683 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6684
6685 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6686 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6687 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6688 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6689 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6690 (fbsd_stopped_by_sw_breakpoint)
6691 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6692 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6693 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6694 (fbsd_post_startup_inferior, fbsd_post_attach)
6695 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6696 (fbsd_set_syscall_catchpoint)
6697 (super_xfer_partial, super_resume, super_wait)
6698 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6699 (fbsd_handle_debug_trap): Remove target_ops parameter.
6700 (fbsd_nat_add_target): Delete.
6701 * fbsd-nat.h: Include "inf-ptrace.h".
6702 (fbsd_nat_add_target): Delete.
6703 (USE_SIGTRAP_SIGINFO): Define.
6704 (fbsd_nat_target): New class.
6705
6706 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6707 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6708 (amd64bsd_target): Delete.
6709 * amd64-bsd-nat.h: New file.
6710 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6711 "x86-bsd-nat.h".
6712 (amd64_fbsd_nat_target): New class.
6713 (the_amd64_fbsd_nat_target): New.
6714 (amd64fbsd_read_description): Refactor as method of
6715 amd64_fbsd_nat_target.
6716 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6717 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6718 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6719 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6720 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6721 (i386bsd_target): Delete.
6722 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6723 (i386bsd_fetch_inferior_registers)
6724 (i386bsd_store_inferior_registers): Declare.
6725 (i386_bsd_nat_target): New class.
6726 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6727 (the_i386_fbsd_nat_target): New.
6728 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6729 i386_fbsd_nat_target methods.
6730 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6731 (_initialize_i386fbsd_nat): Adjust to C++ification.
6732 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6733 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6734 (_initialize_x86_bsd_nat): Adjust to C++ification.
6735 * x86-bsd-nat.h: Include "x86-nat.h".
6736 (x86bsd_target): Delete declaration.
6737 (x86bsd_nat_target): New class.
6738
6739 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6740 (the_aarch64_fbsd_nat_target): New.
6741 (aarch64_fbsd_fetch_inferior_registers)
6742 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6743 aarch64_fbsd_nat_target.
6744 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6745 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6746 (the_alpha_bsd_nat_target): New.
6747 (alphabsd_fetch_inferior_registers)
6748 (alphabsd_store_inferior_registers): Refactor as
6749 alpha_bsd_nat_target methods.
6750 (_initialize_alphabsd_nat): Refactor as methods of
6751 alpha_bsd_nat_target.
6752 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6753 (the_amd64_nbsd_nat_target): New.
6754 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6755 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6756 (the_amd64_obsd_nat_target): New.
6757 (_initialize_amd64obsd_nat): Adjust to C++ification.
6758 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6759 (the_arm_fbsd_nat_target): New.
6760 (arm_fbsd_fetch_inferior_registers)
6761 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6762 (_initialize_arm_fbsd_nat): Refactor as methods of
6763 arm_fbsd_nat_target.
6764 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6765 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6766 (the_arm_netbsd_nat_target): New.
6767 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6768 arm_netbsd_nat_target.
6769 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6770 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6771 (the_hppa_nbsd_nat_target): New.
6772 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6773 hppa_nbsd_nat_target methods.
6774 (_initialize_hppanbsd_nat): Adjust to C++ification.
6775 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6776 (the_hppa_obsd_nat_target): New.
6777 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6778 methods of hppa_obsd_nat_target.
6779 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6780 add_target.
6781 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6782 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6783 add_target.
6784 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6785 (_initialize_i386obsd_nat): Use add_target.
6786 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6787 (the_m68k_bsd_nat_target): New.
6788 (m68kbsd_fetch_inferior_registers)
6789 (m68kbsd_store_inferior_registers): Refactor as methods of
6790 m68k_bsd_nat_target.
6791 (_initialize_m68kbsd_nat): Adjust to C++ification.
6792 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6793 (the_mips_fbsd_nat_target): New.
6794 (mips_fbsd_fetch_inferior_registers)
6795 (mips_fbsd_store_inferior_registers): Refactor as methods of
6796 mips_fbsd_nat_target.
6797 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6798 add_target.
6799 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6800 (the_mips_nbsd_nat_target): New.
6801 (mipsnbsd_fetch_inferior_registers)
6802 (mipsnbsd_store_inferior_registers): Refactor as methods of
6803 mips_nbsd_nat_target.
6804 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6805 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6806 (the_mips64_obsd_nat_target): New.
6807 (mips64obsd_fetch_inferior_registers)
6808 (mips64obsd_store_inferior_registers): Refactor as methods of
6809 mips64_obsd_nat_target.
6810 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6811 add_target.
6812 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6813 nbsd_nat_target.
6814 * nbsd-nat.h: Include "inf-ptrace.h".
6815 (nbsd_nat_target): New class.
6816 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6817 (obsd_wait): Refactor as methods of obsd_nat_target.
6818 (obsd_add_target): Delete.
6819 * obsd-nat.h: Include "inf-ptrace.h".
6820 (obsd_nat_target): New class.
6821 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6822 (the_ppc_fbsd_nat_target): New.
6823 (ppcfbsd_fetch_inferior_registers)
6824 (ppcfbsd_store_inferior_registers): Refactor as methods of
6825 ppc_fbsd_nat_target.
6826 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6827 add_target.
6828 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6829 (the_ppc_nbsd_nat_target): New.
6830 (ppcnbsd_fetch_inferior_registers)
6831 (ppcnbsd_store_inferior_registers): Refactor as methods of
6832 ppc_nbsd_nat_target.
6833 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6834 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6835 (the_ppc_obsd_nat_target): New.
6836 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6837 methods of ppc_obsd_nat_target.
6838 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6839 add_target.
6840 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6841 (the_sh_nbsd_nat_target): New.
6842 (shnbsd_fetch_inferior_registers)
6843 (shnbsd_store_inferior_registers): Refactor as methods of
6844 sh_nbsd_nat_target.
6845 (_initialize_shnbsd_nat): Adjust to C++ification.
6846 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6847 (inf_ptrace_xfer_partial): Delete.
6848 (sparc_xfer_partial, sparc_target): Delete.
6849 * sparc-nat.h (sparc_fetch_inferior_registers)
6850 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6851 (sparc_target): Delete function declaration.
6852 (sparc_target): New template class.
6853 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6854 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6855 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6856 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6857 add_target.
6858 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6859 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6860 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6861 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6862 add_target.
6863 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6864 (the_vax_bsd_nat_target): New.
6865 (vaxbsd_fetch_inferior_registers)
6866 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6867 methods.
6868 (_initialize_vaxbsd_nat): Adjust to C++ification.
6869
6870 * bsd-kvm.c (bsd_kvm_target): New class.
6871 (bsd_kvm_ops): Now a bsd_kvm_target.
6872 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6873 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6874 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6875 bsd_kvm_target.
6876 (bsd_kvm_return_one): Delete.
6877 (bsd_kvm_add_target): Adjust to C++ification.
6878
6879 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6880 (nto_procfs_target_procfs): New classes.
6881 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6882 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6883 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6884 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6885 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6886 (procfs_remove_hw_breakpoint, procfs_resume)
6887 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6888 (procfs_kill_inferior, procfs_store_registers)
6889 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6890 as methods of nto_procfs_target.
6891 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6892 (nto_native_ops): Delete.
6893 (procfs_open, procfs_native_open): Delete.
6894 (nto_native_ops): Now an nto_procfs_target_native.
6895 (init_procfs_targets): Adjust to C++ification.
6896 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6897 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6898 Refactor as methods of nto_procfs_target.
6899
6900 * go32-nat.c (go32_nat_target): New class.
6901 (the_go32_nat_target): New.
6902 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6903 (go32_store_registers, go32_xfer_partial, go32_files_info)
6904 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6905 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6906 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6907 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6908 (go32_target): Delete.
6909 (_initialize_go32_nat): Adjust to C++ification.
6910
6911 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6912 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6913 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6914 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6915 gnu_nat_target.
6916 (gnu_target): Delete.
6917 * gnu-nat.h (gnu_target): Delete.
6918 (gnu_nat_target): New class.
6919 * i386-gnu-nat.c (gnu_base_target): New.
6920 (i386_gnu_nat_target): New class.
6921 (the_i386_gnu_nat_target): New.
6922 (_initialize_i386gnu_nat): Adjust to C++ification.
6923
6924 2018-05-02 Pedro Alves <palves@redhat.com>
6925
6926 * bfd-target.c (target_bfd_xclose): Rename to ...
6927 (target_bfd_close): ... this.
6928 (target_bfd_reopen): Adjust.
6929 * target.c (target_close): Remove references to to_xclose.
6930 * target.h (target_ops::to_xclose): Delete.
6931 (target_ops::to_close): Update comments.
6932
6933 2018-05-02 Pedro Alves <palves@redhat.com>
6934
6935 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6936 "linux-nat.h".
6937 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6938 * inf-ptrace.c (inf_ptrace_register_u_offset)
6939 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6940 (inf_ptrace_store_register, inf_ptrace_store_registers)
6941 (inf_ptrace_trad_target): Move to ...
6942 * linux-nat-trad.c: ... this new file.
6943 * linux-nat-trad.h: New file.
6944 * linux-nat.c (linux_target_install_ops): Make extern.
6945 (linux_trad_target): Delete.
6946 * linux-nat.h (linux_trad_target): Delete declaration.
6947 (linux_target_install_ops): Declare.
6948 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6949 "linux-nat.h".
6950
6951 2018-05-02 Pedro Alves <palves@redhat.com>
6952
6953 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6954 procfs_target/add_target here.
6955 * procfs.c (procfs_target): Make static.
6956 (_initialize_procfs): Call add_target here.
6957 * procfs.h (struct target_ops): Remove forward declaration.
6958 (procfs_target): Remove declaration.
6959 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6960
6961 2018-05-02 Pedro Alves <palves@redhat.com>
6962
6963 * procfs.c (procfs_stopped_by_watchpoint)
6964 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6965 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6966 Forward declare.
6967 (procfs_use_watchpoints): Delete, move contents...
6968 (procfs_target): ... here.
6969 * procfs.h (procfs_use_watchpoints): Delete declaration.
6970 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6971 procfs_use_watchpoints.
6972 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6973 procfs_use_watchpoints.
6974
6975 2018-05-02 Tom Tromey <tom@tromey.com>
6976
6977 PR python/20084:
6978 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6979 and var_zuinteger_unlimited.
6980 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6981 and PARAM_ZUINTEGER_UNLIMITED.
6982 (set_parameter_value): Handle var_zuinteger and
6983 var_zuinteger_unlimited.
6984 (add_setshow_generic): Likewise.
6985 (parmpy_init): Likewise.
6986
6987 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6988
6989 PR rust/23124
6990 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6991 pointer is not null before dereferencing it.
6992
6993 2018-04-30 Tom Tromey <tom@tromey.com>
6994
6995 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6996 is_mi_like_p.
6997
6998 2018-04-30 Tom Tromey <tom@tromey.com>
6999
7000 * breakpoint.c (mention): Remove use of is_mi_like_p.
7001 (print_mention_ranged_breakpoint): Likewise.
7002 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7003 of is_mi_like_p.
7004
7005 2018-04-30 Tom Tromey <tom@tromey.com>
7006
7007 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7008
7009 2018-04-30 Tom Tromey <tom@tromey.com>
7010
7011 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7012 (info_spu_event_command): Remove some uses of is_mi_like_p.
7013
7014 2018-04-30 Tom Tromey <tom@tromey.com>
7015
7016 * python/py-framefilter.c (py_print_single_arg)
7017 (enumerate_locals, py_print_args, py_print_frame): Remove some
7018 uses of is_mi_like_p.
7019
7020 2018-04-30 Tom Tromey <tom@tromey.com>
7021
7022 * ui-out.c: Update.
7023 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7024 * ui-out.h (ui_out::is_mi_like_p): Now const.
7025 (ui_out::do_is_mi_like_p): Now const.
7026 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7027
7028 2018-04-30 Tom Tromey <tom@tromey.com>
7029
7030 * varobj.c (varobj_set_visualizer): Use new_reference.
7031 * python/python.c (gdbpy_decode_line): Use new_reference.
7032 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7033 new_reference.
7034
7035 2018-04-30 Tom Tromey <tom@tromey.com>
7036
7037 * varobj.c (install_new_value): Use new_reference.
7038 * value.h (value_incref): Return void. Swap intro comment with
7039 value_decref.
7040 * value.c (set_value_parent): Use new_reference.
7041 (value_incref): Return void. Update intro comment.
7042 (release_value): Use new_reference.
7043 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7044
7045 2018-04-30 Tom Tromey <tom@tromey.com>
7046
7047 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7048 * gdb_bfd.h (new_bfd_ref): Remove.
7049 (gdb_bfd_open): Update comment.
7050 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7051 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7052 (gdb_bfd_fdopenr): Use new_reference.
7053 * exec.c (exec_file_attach): Use new_reference.
7054
7055 2018-04-30 Tom Tromey <tom@tromey.com>
7056
7057 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7058 method.
7059
7060 2018-04-30 Tom Tromey <tom@tromey.com>
7061
7062 * jit.c (jit_read_code_entry): Use type_align.
7063 * i386-tdep.c (i386_gdbarch_init): Don't call
7064 set_gdbarch_long_long_align_bit.
7065 * gdbarch.sh: Remove long_long_align_bit.
7066 * gdbarch.c, gdbarch.h: Rebuild.
7067 * arc-tdep.c (arc_type_align): New function.
7068 (arc_gdbarch_init): Use arc_type_align. Don't call
7069 set_gdbarch_long_long_align_bit.
7070
7071 2018-04-30 Tom Tromey <tom@tromey.com>
7072
7073 * rust-lang.c (rust_type_alignment): Remove.
7074 (rust_composite_type): Use type_align.
7075
7076 2018-04-30 Tom Tromey <tom@tromey.com>
7077
7078 * NEWS: Mention Type.align.
7079 * python/py-type.c (typy_get_alignof): New function.
7080 (type_object_getset): Add "alignof".
7081
7082 2018-04-30 Tom Tromey <tom@tromey.com>
7083
7084 PR exp/17095:
7085 * NEWS: Update.
7086 * std-operator.def (UNOP_ALIGNOF): New operator.
7087 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7088 New.
7089 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7090 * c-lang.c (c_op_print_tab): Add alignof.
7091 * c-exp.y (ALIGNOF): New token.
7092 (exp): Add "ALIGNOF" production.
7093 (ident_tokens): Add _Alignof and alignof.
7094
7095 2018-04-30 Tom Tromey <tom@tromey.com>
7096
7097 * i386-tdep.c (i386_type_align): New function.
7098 (i386_gdbarch_init): Update.
7099 * gdbarch.sh (type_align): New method.
7100 * gdbarch.c, gdbarch.h: Rebuild.
7101 * arch-utils.h (default_type_align): Declare.
7102 * arch-utils.c (default_type_align): New function.
7103 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7104 (struct type) <align_log2>: New field.
7105 <instance_flags>: Now a bitfield.
7106 (TYPE_RAW_ALIGN): New macro.
7107 (type_align, type_raw_align, set_type_align): Declare.
7108 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7109 functions.
7110 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7111 (get_alignment, maybe_set_alignment): New functions.
7112 (read_structure_type, read_enumeration_type, read_array_type)
7113 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7114 (read_subrange_type, read_base_type): Set type alignment.
7115
7116 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7117
7118 * dwarf2read.c (read_index_from_section): Use bool.
7119
7120 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7121
7122 PR gdb/22950
7123 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7124 with #ifdef.
7125
7126 2018-04-29 John Reiser <jreiser@BitWagon.com>
7127
7128 PR build/22873
7129 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7130 last step, and do it atomically.
7131
7132 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7133
7134 * compile/compile-c-types.c (convert_int, convert_float):
7135 Update for C FE v1.
7136
7137 2018-04-27 Tom Tromey <tom@tromey.com>
7138
7139 PR rust/22545:
7140 * rust-lang.c (rust_inclusive_range_type_p): New function.
7141 (rust_range): Handle inclusive ranges.
7142 (rust_compute_range): Likewise.
7143 * rust-exp.y (struct rust_op) <inclusive>: New field.
7144 (DOTDOTEQ): New constant.
7145 (range_expr): Add "..=" productions.
7146 (operator_tokens): Add "..=" token.
7147 (ast_range): Add "inclusive" parameter.
7148 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7149 ranges.
7150 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7151 bounds values.
7152 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7153 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7154 Update comments.
7155 * expprint.c (print_subexp_standard): Handle new bounds values.
7156 (dump_subexp_body_standard): Likewise.
7157
7158 2018-04-27 Tom Tromey <tom@tromey.com>
7159
7160 * configure: Rebuild.
7161 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7162 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7163 "OVERRIDE".
7164 (class symbol_needs_eval_context): Likewise.
7165 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7166 (mock_mapped_index::symbol_name_at): Use "override". Remove
7167 "virtual".
7168 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7169 "override".
7170 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7171 * aarch64-tdep.c (instruction_reader::read): Use "override".
7172 (instruction_reader_test::read): Likewise.
7173 * arm-tdep.c (instruction_reader::read): Use "override".
7174 (instruction_reader_thumb::read): Likewise.
7175
7176 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7177
7178 PR remote/9665
7179 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7180 instead of remote_send.
7181 (remote_send): Remove.
7182
7183 2018-04-26 Pedro Alves <palves@redhat.com>
7184
7185 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7186 find_function_start_sal instead of find_pc_line.
7187
7188 2018-04-26 Pedro Alves <palves@redhat.com>
7189
7190 * breakpoint.c (set_breakpoint_location_function): Handle
7191 mst_data_gnu_ifunc.
7192 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7193 * elfread.c (elf_symtab_read): Give data symbols with
7194 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7195 (elf_rel_plt_read): Update comment.
7196 * linespec.c (convert_linespec_to_sals): Handle
7197 mst_data_gnu_ifunc.
7198 (minsym_found): Handle mst_data_gnu_ifunc.
7199 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7200 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7201 * parse.c (find_minsym_type_and_address): Handle
7202 mst_data_gnu_ifunc.
7203 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7204 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7205 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7206 comment.
7207 <mst_data_gnu_ifunc>: New enumerator.
7208
7209 2018-04-26 Pedro Alves <palves@redhat.com>
7210
7211 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7212 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7213 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7214 Handle it.
7215 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7216 (lookup_minimal_symbol_by_pc): Adjust.
7217 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7218 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7219 * minsyms.h (lookup_msym_prefer): New enum.
7220 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7221 parameter by a lookup_msym_prefer parameter.
7222
7223 2018-04-26 Pedro Alves <palves@redhat.com>
7224
7225 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7226 ends in "@plt" instead of looking at the symbol's section.
7227
7228 2018-04-26 Pedro Alves <palves@redhat.com>
7229
7230 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7231 all references.
7232 (find_pc_partial_function_gnu_ifunc): Rename to ...
7233 (find_pc_partial_function): ... this, and remove references to
7234 'is_gnu_ifunc_p'.
7235 (find_pc_partial_function): Delete old implementation.
7236 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7237
7238 2018-04-26 Pedro Alves <palves@redhat.com>
7239
7240 * linespec.c (struct bound_minimal_symbol_search_key): New.
7241 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7242 skip first line if we found a GNU ifunc minimal symbol by name.
7243 (compare_msymbols): Change parameters to work with a destructured
7244 lhs minsym.
7245 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7246 functions.
7247
7248 2018-04-26 Pedro Alves <palves@redhat.com>
7249
7250 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7251 ifunc targets here. Instead, if we have an ifunc minsym, use its
7252 address/name.
7253 (add_location_to_breakpoint): Store the minsym and the objfile in
7254 the breakpoint location.
7255 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7256 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7257 Record the minsym in the sal.
7258 * symtab.h (symtab_and_line) <msymbol>: New field.
7259
7260 2018-04-26 Pedro Alves <palves@redhat.com>
7261
7262 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7263 unless we actually resolved the ifunc.
7264
7265 2018-04-26 Pedro Alves <palves@redhat.com>
7266
7267 * c-exp.y (variable production): Prefer ifunc minsyms over
7268 regular function symbols.
7269 * symtab.c (find_gnu_ifunc): New function.
7270 * minsyms.h (lookup_msym_prefer): New enum.
7271 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7272 parameter by a lookup_msym_prefer parameter.
7273 * symtab.h (find_gnu_ifunc): New declaration.
7274
7275 2018-04-26 Pedro Alves <palves@redhat.com>
7276
7277 * blockframe.c (find_gnu_ifunc_target_type): New function.
7278 (find_function_type): New.
7279 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7280 return a value with a memory address.
7281 (eval_call): For calls to GNU ifunc functions, try to find the
7282 type of the target function from the type that the resolver
7283 returns.
7284 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7285 symbols.
7286 * infcall.c (find_function_return_type): Delete.
7287 (find_function_addr): Add 'function_type' parameter. For calls to
7288 GNU ifunc functions, try to find the type of the target function
7289 from the type that the resolver returns, and return it via
7290 FUNCTION_TYPE.
7291 (call_function_by_hand_dummy): Adjust to use the function type
7292 returned by find_function_addr.
7293 (find_function_addr): Add 'function_type' parameter and move
7294 description here.
7295 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7296 declarations.
7297
7298 2018-04-26 Pedro Alves <palves@redhat.com>
7299
7300 * c-exp.y (variable production): Skip finding an alias for ifunc
7301 symbols.
7302
7303 2018-04-26 Pedro Alves <palves@redhat.com>
7304
7305 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7306
7307 2018-04-25 Pedro Alves <palves@redhat.com>
7308
7309 * infcmd.c (kill_command): Print the pid as string, not the whole
7310 thread's ptid. Add comment. s/has been killed/killed/ in output
7311 message.
7312 * remote.c (remote_detach_1): Print the pid as string, not the
7313 whole thread's ptid.
7314
7315 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7316 Sergio Durigan Junior <sergiodj@redhat.com>
7317 Pedro Alves <palves@redhat.com>
7318
7319 * infcmd.c (kill_command): Print message when inferior has
7320 been killed.
7321 * inferior.c (print_inferior_events): Remove 'static'. Set as
7322 '1'.
7323 (add_inferior): Improve message printed when
7324 'print_inferior_events' is on.
7325 (exit_inferior): Remove message printed when
7326 'print_inferior_events' is on.
7327 (detach_inferior): Improve message printed when
7328 'print_inferior_events' is on.
7329 (initialize_inferiors): Use 'add_inferior_silent' to set
7330 'current_inferior_'.
7331 * inferior.h (print_inferior_events): Declare here as
7332 'extern'.
7333 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7334 '[Detaching...]' messages when 'print_inferior_events' is on.
7335 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7336 as prefix/suffix for messages. Remove periods. Fix erroneous
7337 'Detaching after fork from child...', replace it by '... from
7338 parent...'.
7339 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7340 prefix/suffix when printing 'Detaching...' messages. Print
7341 them when 'print_inferior_events' is on.
7342 * remote.c (remote_detach_1): Print message when detaching
7343 from inferior and '!is_fork_parent'.
7344
7345 2018-04-24 Tom Tromey <tom@tromey.com>
7346
7347 * cli-out.h: Reindent.
7348
7349 2018-04-24 Tom Tromey <tom@tromey.com>
7350
7351 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7352 (cli_ui_out::do_field_string): Use fputs_filtered.
7353 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7354
7355 2018-04-23 Tom Tromey <tom@tromey.com>
7356
7357 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7358 gdb::unique_xmalloc_ptr.
7359
7360 2018-04-23 Tom Tromey <tom@tromey.com>
7361
7362 * configure: Rebuild.
7363
7364 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7365
7366 PR gdb/23095
7367 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7368 prepare_for_testing. Set normal_bp to r_debug_state if target
7369 is bsd.
7370
7371 2018-04-21 Pedro Alves <palves@redhat.com>
7372 Rajendra SY <rajendra.sy@gmail.com>
7373
7374 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7375 * remote.c (extended_remote_attach): In all-stop mode, mark the
7376 thread as executing.
7377
7378 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7379
7380 * thread.c (thread_apply_all_command): Fix comment.
7381 (thread_command): Fix comment.
7382
7383 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7384
7385 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7386 parameter.
7387 * features/aarch64-core.c (create_feature_aarch64_core):
7388 Regenerate.
7389 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7390 Likewise.
7391 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7392 Likewise.
7393 * features/i386/32bit-avx512.c
7394 (create_feature_i386_32bit_avx512): Likewise.
7395 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7396 Likewise.
7397 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7398 Likewise.
7399 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7400 Likewise.
7401 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7402 Likewise.
7403 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7404 Likewise.
7405 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7406 Likewise.
7407 * features/i386/64bit-avx512.c
7408 (create_feature_i386_64bit_avx512): Likewise.
7409 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7410 Likewise.
7411 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7412 Likewise.
7413 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7414 Likewise.
7415 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7416 Likewise.
7417 * features/i386/64bit-segments.c
7418 (create_feature_i386_64bit_segments): Likewise.
7419 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7420 Likewise.
7421 * features/i386/x32-core.c
7422 (create_feature_i386_x32_core): Likewise.
7423 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7424 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7425 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7426 * target-descriptions.c: In generated code, don't pass xml
7427 filename.
7428
7429 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7430
7431 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7432 (print_xml_feature::visit_post): Likewise.
7433 (print_xml_feature::visit): Likewise.
7434 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7435 (print_xml_feature): Add new class.
7436 * regformats/regdat.sh: Null xmltarget on feature targets.
7437 * target-descriptions.c (struct target_desc): Add xmltarget.
7438 (maintenance_check_tdesc_xml_convert): Add unittest function.
7439 (tdesc_get_features_xml): Add function to get xml.
7440 (maintenance_check_xml_descriptions): Test xml generation.
7441 * xml-tdesc.c (string_read_description_xml): Add function.
7442 * xml-tdesc.h (string_read_description_xml): Add declaration.
7443
7444 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7445
7446 * features/Makefile: Add feature marker to targets with new style
7447 target descriptions.
7448 * regformats/aarch64.dat: Regenerate.
7449 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7450 * regformats/i386/amd64-avx-linux.dat: Likewise.
7451 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7452 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7453 * regformats/i386/amd64-linux.dat: Likewise.
7454 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7455 * regformats/i386/amd64.dat: Likewise.
7456 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7457 * regformats/i386/i386-avx-linux.dat: Likewise.
7458 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7459 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7460 * regformats/i386/i386-linux.dat: Likewise.
7461 * regformats/i386/i386-mmx-linux.dat: Likewise.
7462 * regformats/i386/i386-mpx-linux.dat: Likewise.
7463 * regformats/i386/i386.dat: Likewise.
7464 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7465 * regformats/i386/x32-avx-linux.dat: Likewise.
7466 * regformats/i386/x32-linux.dat: Likewise.
7467 * regformats/tic6x-c62x-linux.dat: Likewise.
7468 * regformats/tic6x-c64x-linux.dat: Likewise.
7469 * regformats/tic6x-c64xp-linux.dat: Likewise.
7470 * regformats/regdat.sh: Parse feature marker.
7471
7472 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7473
7474 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7475 (tdesc_osabi_name): Likewise.
7476 * target-descriptions.c (tdesc_architecture_name): Add new
7477 function.
7478 (tdesc_osabi_name): Likewise.
7479
7480 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7481
7482 * common/tdesc.c (tdesc_predefined_type): Move to here.
7483 (tdesc_named_type): Likewise.
7484 (tdesc_create_vector): Likewise.
7485 (tdesc_create_struct): Likewise.
7486 (tdesc_set_struct_size): Likewise.
7487 (tdesc_create_union): Likewise.
7488 (tdesc_create_flags): Likewise.
7489 (tdesc_create_enum): Likewise.
7490 (tdesc_add_field): Likewise.
7491 (tdesc_add_typed_bitfield): Likewise.
7492 (tdesc_add_bitfield): Likewise.
7493 (tdesc_add_flag): Likewise.
7494 (tdesc_add_enum_value): Likewise.
7495 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7496 (struct tdesc_type_vector): Likewise.
7497 (struct tdesc_type_field): Likewise.
7498 (struct tdesc_type_with_fields): Likewise.
7499 (tdesc_create_enum): Add declaration.
7500 (tdesc_add_typed_bitfield): Likewise.
7501 (tdesc_add_enum_value): Likewise.
7502 * target-descriptions.c (tdesc_type_field): Move from here.
7503 (tdesc_type_builtin): Likewise.
7504 (tdesc_type_vector): Likewise.
7505 (tdesc_type_with_fields): Likewise.
7506 (tdesc_predefined_types): Likewise.
7507 (tdesc_named_type): Likewise.
7508 (tdesc_create_vector): Likewise.
7509 (tdesc_create_struct): Likewise.
7510 (tdesc_set_struct_size): Likewise.
7511 (tdesc_create_union): Likewise.
7512 (tdesc_create_flags): Likewise.
7513 (tdesc_create_enum): Likewise.
7514 (tdesc_add_field): Likewise.
7515 (tdesc_add_typed_bitfield): Likewise.
7516 (tdesc_add_bitfield): Likewise.
7517 (tdesc_add_flag): Likewise.
7518 (tdesc_add_enum_value): Likewise.
7519 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7520 (tdesc_add_typed_bitfield): Likewise.
7521 (tdesc_add_enum_value): Likewise.
7522
7523 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7524
7525 * common/tdesc.c (tdesc_feature::accept): Move to here.
7526 (tdesc_feature::operator==): Likewise.
7527 (tdesc_create_reg): Likewise.
7528 * common/tdesc.h (tdesc_type_kind): Likewise.
7529 (struct tdesc_type): Likewise.
7530 (struct tdesc_feature): Likewise.
7531 * regformats/regdat.sh: Create a feature.
7532 * target-descriptions.c (tdesc_type_kind): Move from here.
7533 (tdesc_type): Likewise.
7534 (tdesc_type_up): Likewise.
7535 (tdesc_feature): Likewise.
7536 (tdesc_create_reg): Likewise.
7537
7538 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7539
7540 * Makefile.in: Add arch/tdesc.c
7541 * common/tdesc.c: New file.
7542 * common/tdesc.h (tdesc_element_visitor): Move to here.
7543 (tdesc_element): Likewise.
7544 (tdesc_reg): Likewise.
7545 (tdesc_reg_up): Likewise.
7546 * regformats/regdef.h (reg): Add offset to constructors.
7547 * target-descriptions.c (tdesc_element_visitor): Move from here.
7548 (tdesc_element): Likewise.
7549 (tdesc_reg): Likewise.
7550 (tdesc_reg_up): Likewise.
7551
7552 2018-04-17 Tom Tromey <tom@tromey.com>
7553
7554 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7555 discriminant field.
7556
7557 2018-04-17 Tom Tromey <tom@tromey.com>
7558
7559 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7560
7561 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7562
7563 * symtab.c (print_symbol_info): Skip printing filename and line
7564 number when `last' is NULL.
7565 (symtab_symbol_info): Use empty string instead of NULL for first
7566 invocation of print_symbol_info.
7567 (rbreak_command): Pass NULL to `last' parameter of
7568 print_symbol_info.
7569
7570 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7571
7572 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7573 instead of nullptr.
7574
7575 2018-04-16 Pedro Alves <palves@redhat.com>
7576
7577 * MAINTAINERS (sh): Remove.
7578 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7579 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7580 (ALLDEPFILES): Remove sh64-tdep.c.
7581 * NEWS: Mentions that support for SH-5/SH64 is removed.
7582 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7583 (sh*-*-openbsd*): Ditto.
7584 (sh64-*-elf*): Remove.
7585 (sh*): Remove.
7586 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7587 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7588 * sh-tdep.c: No longer include "sh64-tdep.h".
7589 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7590 * sh64-tdep.c, sh64-tdep.h: Remove files.
7591
7592 2018-04-16 Pedro Alves <palves@redhat.com>
7593
7594 * MAINTAINERS: Remove m88k.
7595 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7596 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7597 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7598 * NEWS: Mention that support for m88k was removed.
7599 * configure.host (m88*-*-*): Remove support.
7600 * configure.nat (m88k-*-*): Remove support.
7601 * configure.tgt (m88*-*-openbsd*): Remove.
7602 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7603
7604 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7605
7606 * configure.tgt (x86_tobjs): New variable.
7607 (amd64_tobjs, i386_tobjs): Use it.
7608
7609 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7610
7611 * symtab.c (print_symbol_info): Precede the symbol definition by
7612 the line number when available.
7613 * NEWS: Advertise this enhancement.
7614
7615 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7616
7617 * NEWS (New options): announce set/show record btrace cpu.
7618 * btrace.c: Include record-btrace.h.
7619 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7620 the vendor is unknown.
7621 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7622 Maybe overwrite the btrace configuration's cpu.
7623 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7624 (btrace_fetch): Add cpu parameter. Update callers.
7625 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7626 Maybe overwrite the btrace configuration's cpu. Skip enabling
7627 errata workarounds if the vendor is unknown.
7628 * python/py-record-btrace.c: Include record-btrace.h.
7629 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7630 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7631 * record-btrace.c (record_btrace_cpu_state_kind): New.
7632 (record_btrace_cpu): New.
7633 (set_record_btrace_cpu_cmdlist): New.
7634 (record_btrace_get_cpu): New.
7635 (require_btrace_thread, record_btrace_info)
7636 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7637 (cmd_set_record_btrace_cpu_none): New.
7638 (cmd_set_record_btrace_cpu_auto): New.
7639 (cmd_set_record_btrace_cpu): New.
7640 (cmd_show_record_btrace_cpu): New.
7641 (_initialize_record_btrace): Initialize set/show record btrace cpu
7642 commands.
7643 * record-btrace.h (record_btrace_get_cpu): New.
7644
7645 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7646
7647 * record.c (set_record_command): Fix typo in message.
7648
7649 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7650
7651 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7652
7653 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7654
7655 * infrun.c (process_event_stop_test): Call
7656 gdbarch_in_indirect_branch_thunk.
7657 * gdbarch.sh (in_indirect_branch_thunk): New.
7658 * gdbarch.c: Regenerated.
7659 * gdbarch.h: Regenerated.
7660 * x86-tdep.h: New.
7661 * x86-tdep.c: New.
7662 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7663 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7664 (ALLDEPFILES): Add x86-tdep.c.
7665 * arch-utils.h (default_in_indirect_branch_thunk): New.
7666 * arch-utils.c (default_in_indirect_branch_thunk): New.
7667 * i386-tdep: Include x86-tdep.h.
7668 (i386_in_indirect_branch_thunk): New.
7669 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7670 function.
7671 * amd64-tdep: Include x86-tdep.h.
7672 (amd64_in_indirect_branch_thunk): New.
7673 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7674
7675 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7676
7677 PR gdb/23053
7678 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7679 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7680 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7681 regression.
7682
7683 2018-04-12 Tom Tromey <tom@tromey.com>
7684
7685 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7686 (rust_evaluate_subexp): Likewise.
7687
7688 2018-04-12 Pedro Alves <palves@redhat.com>
7689
7690 * procfs.c (procfs_detach): Make forward declaration's prototype
7691 match definition's protototype.
7692 (proc_get_LDT_entry): Remove stale do_cleanups call.
7693
7694 2018-04-12 Pedro Alves <palves@redhat.com>
7695
7696 * target.h (target_ops::to_has_exited): Delete.
7697 (target_has_exited): Delete.
7698 * target-delegates.c: Regenerate.
7699
7700 2018-04-11 Pedro Alves <palves@redhat.com>
7701
7702 * target.c (fileio_fh_t::t): Add comment.
7703 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7704 (target_fileio_close): Handle a NULL target.
7705 (invalidate_fileio_fh): New.
7706 (target_close): Call it.
7707 * remote.c (remote_hostio_send_command): No longer check whether
7708 remote_desc is open.
7709
7710 2018-04-11 Pedro Alves <palves@redhat.com>
7711
7712 * target.c (fileio_fh_t): Make it a named struct instead of a
7713 typedef.
7714 (fileio_fh_t::is_closed): New method.
7715 (DEF_VEC_O (fileio_fh_t)): Remove.
7716 (fileio_fhandles): Now a std::vector.
7717 (is_closed_fileio_fh): Delete.
7718 (acquire_fileio_fd): Adjust. Rename parameters.
7719 (release_fileio_fd): Adjust.
7720 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7721 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7722 (target_fileio_close): Adjust.
7723
7724 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7725
7726 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7727 index.
7728
7729 2018-04-10 Pedro Alves <palves@redhat.com>
7730
7731 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7732 (scoped_finish_thread_state): New class.
7733 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7734 cleanup.
7735 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7736 (fetch_inferior_event, normal_stop): Likewise.
7737 * thread.c (finish_thread_state_cleanup): Delete.
7738
7739 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7740 Pedro Alves <palves@redhat.com>
7741
7742 * value.c: Include "selftest.h" and "common/array-view.h".
7743 (struct range) <operator ==>: New.
7744 (test_ranges_contain): New.
7745 (check_ranges_vector): New.
7746 (test_insert_into_bit_range_vector): New.
7747 (_initialize_values): Register selftests.
7748 * common/array-view.h (operator==, operator!=): New.
7749
7750 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7751
7752 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7753 an iterator.
7754 * inline-frame.c: Include <algorithm>.
7755 (struct inline_state): Add constructor.
7756 (inline_state_s): Remove.
7757 (DEF_VEC_O(inline_state_s)): Remove.
7758 (inline_states): Change type to std::vector.
7759 (find_inline_frame_state): Adjust to std::vector.
7760 (allocate_inline_frame_state): Remove.
7761 (clear_inline_frame_state): Adjust to std::vector.
7762 (skip_inline_frames): Adjust to std::vector.
7763
7764 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7765
7766 * tracepoint.h (struct trace_state_variable): Add constructor.
7767 <name>: Change type to std::string.
7768 * tracepoint.c (tsv_s): Remove.
7769 (DEF_VEC_O(tsv_s)): Remove.
7770 (tvariables): Change to std::vector.
7771 (create_trace_state_variable): Adjust to std::vector.
7772 (find_trace_state_variable): Likewise.
7773 (find_trace_state_variable_by_number): Likewise.
7774 (delete_trace_state_variable): Likewise.
7775 (trace_variable_command): Adjust to std::string.
7776 (delete_trace_variable_command): Likewise.
7777 (tvariables_info_1): Adjust to std::vector.
7778 (save_trace_state_variables): Likewise.
7779 (start_tracing): Likewise.
7780 (merge_uploaded_trace_state_variables): Adjust to std::vector
7781 and std::string.
7782 * target.h (struct target_ops)
7783 <to_download_trace_state_variable>: Pass reference to
7784 trace_state_variable.
7785 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7786 * target-delegates.c: Re-generate.
7787 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7788 (mi_tsv_deleted): Likewise.
7789 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7790 * remote.c (remote_download_trace_state_variable): Change
7791 pointer to reference and adjust.
7792 * make-target-delegates (parse_argtypes): Handle references.
7793 (write_function_header): Likewise.
7794 (munge_type): Likewise.
7795
7796 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7797
7798 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7799 string_view-selftests.c.
7800 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7801 testsuite.
7802 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7803 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7804 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7805 * unittests/basic_string_view/element_access/char/1.cc:
7806 Likewise.
7807 * unittests/basic_string_view/element_access/char/empty.cc:
7808 Likewise.
7809 * unittests/basic_string_view/element_access/char/front_back.cc:
7810 Likewise.
7811 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7812 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7813 Likewise.
7814 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7815 Likewise.
7816 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7817 Likewise.
7818 * unittests/basic_string_view/operations/compare/char/1.cc:
7819 Likewise.
7820 * unittests/basic_string_view/operations/compare/char/13650.cc:
7821 Likewise.
7822 * unittests/basic_string_view/operations/copy/char/1.cc:
7823 Likewise.
7824 * unittests/basic_string_view/operations/data/char/1.cc:
7825 Likewise.
7826 * unittests/basic_string_view/operations/find/char/1.cc:
7827 Likewise.
7828 * unittests/basic_string_view/operations/find/char/2.cc:
7829 Likewise.
7830 * unittests/basic_string_view/operations/find/char/3.cc:
7831 Likewise.
7832 * unittests/basic_string_view/operations/find/char/4.cc:
7833 Likewise.
7834 * unittests/basic_string_view/operations/rfind/char/1.cc:
7835 Likewise.
7836 * unittests/basic_string_view/operations/rfind/char/2.cc:
7837 Likewise.
7838 * unittests/basic_string_view/operations/rfind/char/3.cc:
7839 Likewise.
7840 * unittests/basic_string_view/operations/substr/char/1.cc:
7841 Likewise.
7842 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7843 * unittests/string_view-selftests.c: New file.
7844
7845 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7846
7847 * unittests/basic_string_view/capacity/1.cc: New file.
7848 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7849 * unittests/basic_string_view/cons/char/1.cc: New file.
7850 * unittests/basic_string_view/cons/char/2.cc: New file.
7851 * unittests/basic_string_view/cons/char/3.cc: New file.
7852 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7853 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7854 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7855 * unittests/basic_string_view/element_access/char/1.cc: New file.
7856 * unittests/basic_string_view/element_access/char/2.cc: New file.
7857 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7858 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7859 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7860 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7861 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7862 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7863 * unittests/basic_string_view/include.cc: New file.
7864 * unittests/basic_string_view/inserters/char/1.cc: New file.
7865 * unittests/basic_string_view/inserters/char/2.cc: New file.
7866 * unittests/basic_string_view/inserters/char/3.cc: New file.
7867 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7868 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7869 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7870 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7871 * unittests/basic_string_view/literals/types.cc: New file.
7872 * unittests/basic_string_view/literals/values.cc: New file.
7873 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7874 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7875 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7876 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7877 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7878 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7879 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7880 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7881 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7882 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7883 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7884 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7885 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7886 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7887 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7888 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7889 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7890 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7891 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7892 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7893 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7894 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7895 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7896 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7897 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7898 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7899 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7900 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7901 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7902 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7903 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7904 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7905 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7906 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7907 * unittests/basic_string_view/operators/char/2.cc: New file.
7908 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7909 * unittests/basic_string_view/range_access/char/1.cc: New file.
7910 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7911 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7912 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7913 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7914 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7915 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7916 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7917 * unittests/basic_string_view/typedefs.cc: New file.
7918 * unittests/basic_string_view/types/1.cc: New file.
7919
7920 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7921
7922 * common/gdb_string_view.h: Remove libstdc++ implementation
7923 details, adjust to gdb reality.
7924 * common/gdb_string_view.tcc: Likewise.
7925 * cli/cli-script.c (struct string_view): Remove.
7926 (user_args) <m_args>: Change element type to gdb::string_view.
7927 (user_args::insert_args): Adjust.
7928
7929 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7930
7931 * common/gdb_string_view.h: New file.
7932 * common/gdb_string_view.tcc: New file.
7933
7934 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7935
7936 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7937 * configure: Re-generate.
7938
7939 2018-04-09 Pedro Alves <palves@redhat.com>
7940
7941 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7942 (set_target_gdbarch): Call
7943 gdb::observers::architecture_changed.notify instead of
7944 observer_notify_architecture_changed.
7945
7946 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7947
7948 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7949 (do_restore_current_traceframe_cleanup): Remove.
7950 (restore_current_traceframe_cleanup_dtor): Remove.
7951 (make_cleanup_restore_current_traceframe): Remove.
7952 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7953 New.
7954 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7955 * infrun.c (fetch_inferior_event): Use
7956 scoped_restore_current_traceframe.
7957
7958 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7959
7960 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7961 Remove.
7962 <n_allocated_type_units>: Remove.
7963 <all_type_units>: Change to std::vector.
7964 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7965 to std::vector change.
7966 (dwarf2_per_objfile::get_cutu): Likewise.
7967 (dwarf2_per_objfile::get_tu): Likewise.
7968 (create_signatured_type_table_from_index): Likewise.
7969 (create_signatured_type_table_from_debug_names): Likewise.
7970 (dw2_symtab_iter_next): Likewise.
7971 (dw2_print_stats): Likewise.
7972 (dw2_expand_all_symtabs): Likewise.
7973 (dw2_expand_marked_cus): Likewise.
7974 (dw2_debug_names_iterator::next): Likewise.
7975 (dwarf2_initialize_objfile): Likewise.
7976 (add_signatured_type_cu_to_table): Likewise.
7977 (create_all_type_units): Likewise.
7978 (add_type_unit): Likewise.
7979 (struct tu_abbrev_offset): Add constructor.
7980 (build_type_psymtabs_1): Adjust to std::vector change.
7981 (print_tu_stats): Likewise.
7982 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7983 (write_debug_names): Likewise.
7984
7985 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7986
7987 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7988 Make an std::vector.
7989 <n_comp_units>: Remove.
7990 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7991 to std::vector change.
7992 (dwarf2_per_objfile::get_cutu): Likewise.
7993 (dwarf2_per_objfile::get_cu): Likewise.
7994 (create_cus_from_index): Likewise.
7995 (create_addrmap_from_index): Likewise.
7996 (create_addrmap_from_aranges): Likewise.
7997 (dwarf2_read_index): Likewise.
7998 (dw2_find_last_source_symtab): Likewise.
7999 (dw2_map_symtabs_matching_filename): Likewise.
8000 (dw2_symtab_iter_next): Likewise.
8001 (dw2_print_stats): Likewise.
8002 (dw2_expand_all_symtabs): Likewise.
8003 (dw2_expand_symtabs_with_fullname): Likewise.
8004 (dw2_expand_marked_cus): Likewise.
8005 (dw2_map_symbol_filenames): Likewise.
8006 (create_cus_from_debug_names): Likewise.
8007 (dwarf2_read_debug_names): Likewise.
8008 (dw2_debug_names_iterator::next): Likewise.
8009 (dwarf2_initialize_objfile): Likewise.
8010 (set_partial_user): Likewise.
8011 (dwarf2_build_psymtabs_hard): Likewise.
8012 (read_comp_units_from_section): Remove arguments, adjust to
8013 std::vector change.
8014 (create_all_comp_units): Adjust to std::vector and
8015 read_comp_units_from_section changes.
8016 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8017 change.
8018 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8019 (psyms_seen_size): Likewise.
8020 (write_gdbindex): Likewise.
8021 (write_debug_names): Likewise.
8022
8023 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8024
8025 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8026 with dwarf2_per_objfile.
8027 (create_cus_from_index): Likewise.
8028 (create_signatured_type_table_from_index): Likewise.
8029 (dwarf2_read_index): Likewise.
8030 (dwarf2_initialize_objfile): Likewise.
8031 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8032 per_cu rather than get_dwarf2_per_objfile.
8033
8034 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8035
8036 * dwarf2read.h (struct signatured_type): Forward declare.
8037 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8038 New methods.
8039 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8040 (dw2_get_cutu): ...this.
8041 (dwarf2_per_objfile::get_cu): Rename from...
8042 (dw2_get_cu): ...this.
8043 (dwarf2_per_objfile::get_tu): New.
8044 (create_addrmap_from_index): Adjust.
8045 (create_addrmap_from_aranges): Adjust.
8046 (dw2_find_last_source_symtab): Adjust.
8047 (dw2_map_symtabs_matching_filename): Adjust.
8048 (dw2_symtab_iter_next): Adjust.
8049 (dw2_print_stats): Adjust.
8050 (dw2_expand_all_symtabs): Adjust.
8051 (dw2_expand_symtabs_with_fullname): Adjust.
8052 (dw2_expand_marked_cus): Adjust.
8053 (dw_expand_symtabs_matching_file_matcher): Adjust.
8054 (dw2_map_symbol_filenames): Adjust.
8055 (dw2_debug_names_iterator::next): Adjust.
8056 (dwarf2_initialize_objfile): Adjust.
8057 (set_partial_user): Adjust.
8058 (dwarf2_build_psymtabs_hard): Adjust.
8059
8060 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8061
8062 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8063 Remove unused variables.
8064 (dw2_map_symtabs_matching_filename): Likewise.
8065 (dwarf2_record_block_ranges): Likewise.
8066 (dwarf2_read_addr_index): Likewise.
8067 (follow_die_offset): Likewise.
8068
8069 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8070
8071 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8072 to symbol_file_add_main.
8073
8074 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8075
8076 PR mi/22299
8077 * mi/mi-console.c (do_fputc_async_safe): New.
8078 (mi_console_file::write_async_safe): New.
8079 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8080 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8081 New.
8082 * ui-file.c (ui_file::putstrn): Adjust call to
8083 fputstrn_unfiltered.
8084 * utils.c (printchar): Replace do_fputs and do_fprintf
8085 parameters by do_fputc.
8086 (fputstr_filtered): Adjust call to printchar.
8087 (fputstr_unfiltered): Likewise.
8088 (fputstrn_filtered): Likewise.
8089 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8090 printchar.
8091 * utils.h (do_fputc_ftype): New typedef.
8092 (fputstrn_unfiltered): Add do_fputc parameter.
8093
8094 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8095
8096 * regformats/i386/i386-avx.dat: Remove.
8097
8098 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8099
8100 PR gdb/22979
8101 * amd64-tdep.c (amd64_none_init_abi): New function.
8102 (amd64_x32_none_init_abi): New function.
8103 (_initialize_amd64_tdep): Register handlers for x86-64 and
8104 x64_32 with GDB_OSABI_NONE.
8105 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8106 GDB_OSABI_NONE osabi.
8107
8108 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8109
8110 PR gdb/22980
8111 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8112 GDB_OSABI_NONE.
8113 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8114 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8115
8116 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8117
8118 * common/byte-vector.h (char_vector): New type.
8119 * target.h (target_read_alloc): Return
8120 gdb::optional<byte_vector>.
8121 (target_read_stralloc): Return gdb::optional<char_vector>.
8122 (target_get_osdata): Return gdb::optional<char_vector>.
8123 * target.c (target_read_alloc_1): Templatize. Replacement
8124 manual memory management with vector.
8125 (target_read_alloc): Change return type, adjust.
8126 (target_read_stralloc): Change return type, adjust.
8127 (target_get_osdata): Change return type, adjust.
8128 * auxv.c (struct auxv_info) <length>: Remove.
8129 <data>: Change type to gdb::optional<byte_vector>.
8130 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8131 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8132 (target_auxv_search): Adjust.
8133 (fprint_target_auxv): Adjust.
8134 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8135 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8136 (linux_make_corefile_notes): Adjust.
8137 * osdata.c (get_osdata): Adjust.
8138 * remote.c (remote_get_threads_with_qxfer): Adjust.
8139 (remote_memory_map): Adjust.
8140 (remote_traceframe_info): Adjust.
8141 (btrace_read_config): Adjust.
8142 (remote_read_btrace): Adjust.
8143 (remote_pid_to_exec_file): Adjust.
8144 * solib-aix.c (solib_aix_get_library_list): Adjust.
8145 * solib-dsbt.c (decode_loadmap): Don't free buf.
8146 (dsbt_get_initial_loadmaps): Adjust.
8147 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8148 * solib-target.c (solib_target_current_sos): Adjust.
8149 * tracepoint.c (sdata_make_value): Adjust.
8150 * xml-support.c (xinclude_start_include): Adjust.
8151 (xml_fetch_content_from_file): Adjust.
8152 * xml-support.h (xml_fetch_another): Change return type.
8153 (xml_fetch_content_from_file): Change return type.
8154 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8155 * xml-tdesc.c (file_read_description_xml): Adjust.
8156 (fetch_available_features_from_target): Change return type.
8157 (target_fetch_description_xml): Adjust.
8158 (target_read_description_xml): Adjust.
8159
8160 2018-04-06 Tom Tromey <tom@tromey.com>
8161
8162 * value.c (~value): Update.
8163 (struct value) <contents>: Now unique_xmalloc_ptr.
8164 (value_contents_bits_eq, allocate_value_contents)
8165 (value_contents_raw, value_contents_all_raw)
8166 (value_contents_for_printing, value_contents_for_printing_const)
8167 (set_value_enclosing_type): Update.
8168
8169 2018-04-06 Tom Tromey <tom@tromey.com>
8170
8171 * value.c (range_s): Remove typedef, VEC.
8172 (struct range): Add operator<.
8173 (range_lessthan): Remove.
8174 (ranges_contain): Change type.
8175 (~value): Update.
8176 (struct value) <unavailable, optimized_out>: Now std::vector.
8177 (value_entirely_available)
8178 (value_entirely_covered_by_range_vector)
8179 (value_entirely_unavailable, value_entirely_optimized_out):
8180 Update.
8181 (insert_into_bit_range_vector): Change argument type.
8182 (find_first_range_overlap): Likewise.
8183 (struct ranges_and_idx, value_contents_bits_eq)
8184 (require_not_optimized_out, require_available): Update.
8185 (ranges_copy_adjusted): Change argument types.
8186 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8187
8188 2018-04-06 Tom Tromey <tom@tromey.com>
8189
8190 * value.c (~value): Update.
8191 (struct value) <parent>: Now a value_ref_ptr.
8192 (value_parent, set_value_parent, value_address, value_copy):
8193 Update.
8194
8195 2018-04-06 Tom Tromey <tom@tromey.com>
8196
8197 * value.c (struct value): Add constructor, destructor, and member
8198 initializers.
8199 (allocate_value_lazy, value_decref): Update.
8200
8201 2018-04-06 Tom Tromey <tom@tromey.com>
8202
8203 * value.c (struct value) <released, next>: Remove.
8204 (all_values): Now a std::vector.
8205 (allocate_value_lazy): Update.
8206 (value_next): Remove.
8207 (value_mark, value_free_to_mark, release_value)
8208 (value_release_to_mark): Update.
8209
8210 2018-04-06 Tom Tromey <tom@tromey.com>
8211
8212 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8213 (free_value_chain): Remove.
8214 * value.c (free_value_chain): Remove.
8215 (value_release_to_mark): Return a std::vector.
8216 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8217 std::vector.
8218 (check_condition): Update.
8219 * eval.c (fetch_subexp_value): Change "val_chain" to a
8220 std::vector.
8221 * breakpoint.c (update_watchpoint): Update.
8222 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8223
8224 2018-04-06 Tom Tromey <tom@tromey.com>
8225
8226 * value.h (free_all_values): Remove.
8227 * value.c (free_all_values): Remove.
8228
8229 2018-04-06 Tom Tromey <tom@tromey.com>
8230
8231 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8232 (value_history_chain, value_history_count): Remove.
8233 (value_history): New global.
8234 (record_latest_value, access_value_history, show_values)
8235 (preserve_values): Update.
8236
8237 2018-04-06 Tom Tromey <tom@tromey.com>
8238
8239 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8240 * varobj.c (varobj_set_display_format, varobj_set_value)
8241 (install_default_visualizer, construct_visualizer)
8242 (install_new_value, ~varobj, varobj_get_value_type)
8243 (my_value_of_variable, varobj_editable_p): Update.
8244 * c-varobj.c (c_describe_child, c_value_of_variable)
8245 (cplus_number_of_children, cplus_describe_child): Update.
8246 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8247 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8248 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8249
8250 2018-04-06 Tom Tromey <tom@tromey.com>
8251
8252 * printcmd.c (last_examine_address): Change type to
8253 value_ref_ptr.
8254 (do_examine, x_command): Update.
8255
8256 2018-04-06 Tom Tromey <tom@tromey.com>
8257
8258 * value.c (release_value): Update.
8259 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8260 (struct bpstats) <val>: Now a value_ref_ptr.
8261 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8262 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8263 (~watchpoint, print_it_watchpoint, watch_command_1)
8264 (invalidate_bp_value_on_memory_change): Update.
8265
8266 2018-04-06 Tom Tromey <tom@tromey.com>
8267
8268 * varobj.c (varobj_clear_saved_item)
8269 (update_dynamic_varobj_children, install_new_value, ~varobj):
8270 Update.
8271 * value.h (value_incref): Move declaration earlier.
8272 (value_decref): Rename from value_free.
8273 (struct value_ref_policy): New.
8274 (value_ref_ptr): New typedef.
8275 (struct value_deleter): Remove.
8276 (gdb_value_up): Remove typedef.
8277 (release_value): Change return type.
8278 (release_value_or_incref): Remove.
8279 * value.c (set_value_parent): Update.
8280 (value_incref): Change return type.
8281 (value_decref): Rename from value_free.
8282 (value_free_to_mark, free_all_values, free_value_chain): Update.
8283 (release_value): Return value_ref_ptr.
8284 (release_value_or_incref): Remove.
8285 (record_latest_value, set_internalvar, clear_internalvar):
8286 Update.
8287 * stack.c (info_frame_command): Don't call value_free.
8288 * python/py-value.c (valpy_dealloc, valpy_new)
8289 (value_to_value_object): Update.
8290 * printcmd.c (do_examine): Update.
8291 * opencl-lang.c (lval_func_free_closure): Update.
8292 * mi/mi-main.c (register_changed_p): Don't call value_free.
8293 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8294 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8295 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8296 value_free.
8297 * guile/scm-value.c (vlscm_free_value_smob)
8298 (vlscm_scm_from_value): Update.
8299 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8300 (frame_unwind_register_unsigned, get_frame_register_bytes)
8301 (put_frame_register_bytes): Don't call value_free.
8302 * findvar.c (address_from_register): Don't call value_free.
8303 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8304 * dwarf2loc.c (entry_data_value_free_closure)
8305 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8306 (dwarf2_evaluate_loc_desc_full): Update.
8307 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8308 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8309 (~watchpoint, watch_command_1)
8310 (invalidate_bp_value_on_memory_change): Update.
8311 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8312
8313 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8314
8315 PR gdb/23022
8316 * warning.m4: Add -Wno-error=deprecated-register.
8317 * configure: Re-generate.
8318
8319 2018-04-05 Tom Tromey <tom@tromey.com>
8320
8321 * linespec.h: Remove include of "vec.h".
8322
8323 2018-04-05 Tom Tromey <tom@tromey.com>
8324
8325 * linespec.c (typep): Remove typedef.
8326 (find_methods, find_superclass_methods): Take a std::vector.
8327 (find_method): Use std::vector.
8328
8329 2018-04-05 Tom Tromey <tom@tromey.com>
8330
8331 * utils.c (compare_strings): Remove.
8332 * utils.h (compare_strings): Remove.
8333 * objc-lang.h (find_imps): Update.
8334 * objc-lang.c (find_methods): Take a std::vector.
8335 (uniquify_strings, find_imps): Likewise.
8336 * linespec.c (find_methods): Take a std::vector.
8337 (decode_objc): Use std::vector.
8338 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8339 a std::vector.
8340 (find_method, find_function_symbols): Use std::vector.
8341
8342 2018-04-05 Tom Tromey <tom@tromey.com>
8343
8344 * completer.c (completion_tracker::completion_tracker): Remove
8345 cast.
8346 (completion_tracker::discard_completions): Likewise.
8347 * breakpoint.c (ambiguous_names_p): Remove cast.
8348 * ada-lang.c (_initialize_ada_language): Remove cast.
8349 * utils.h (streq): Update.
8350 (streq_hash): Add new declaration.
8351 * utils.c (streq): Return bool.
8352 (streq_hash): New function.
8353
8354 2018-04-05 Tom Tromey <tom@tromey.com>
8355
8356 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8357 Remove a string copy.
8358
8359 2018-04-05 Tom Tromey <tom@tromey.com>
8360
8361 * linespec.c (filter_results): Use std::vector.
8362 (decode_line_2, decode_line_full): Update.
8363
8364 2018-04-05 Tom Tromey <tom@tromey.com>
8365
8366 * linespec.c (canonical_to_fullform): Return std::string.
8367 (filter_results): Update.
8368 (struct decode_line_2_item): Add constructor.
8369 <fullform, displayform>: Now std::string.
8370 (decode_line_2_compare_items): Now a std::sort comparator.
8371 (decode_line_2): Update.
8372
8373 2018-04-05 Tom Tromey <tom@tromey.com>
8374
8375 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8376 (unexpected_linespec_error): Update.
8377 (linespec_parse_basic, parse_linespec): Update.
8378
8379 2018-04-05 Tom Tromey <tom@tromey.com>
8380
8381 * linespec.c (linespec_parse_basic): Reindent.
8382
8383 2018-04-05 Tom Tromey <tom@tromey.com>
8384
8385 * minsyms.h (iterate_over_minimal_symbols): Update.
8386 * minsyms.c (iterate_over_minimal_symbols): Take a
8387 gdb::function_view.
8388 * linespec.c (struct collect_minsyms): Remove.
8389 (compare_msyms): Now a std::sort comparator.
8390 (add_minsym): Add parameters.
8391 (search_minsyms_for_name): Update. Use std::vector.
8392
8393 2018-04-03 Tom Tromey <tom@tromey.com>
8394
8395 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8396 gdb::byte_vector.
8397
8398 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8399
8400 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8401
8402 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8403
8404 PR gdb/16959
8405 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8406 printing static type.
8407
8408 2018-04-01 Tom Tromey <tom@tromey.com>
8409
8410 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8411 (rs6000_xfer_shared_libraries): Update.
8412
8413 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8414
8415 * common/gdb_vecs.h (char_ptr): Remove.
8416 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8417
8418 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8419
8420 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8421 with std::vector.
8422 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8423
8424 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8425
8426 * tracepoint.h (struct uploaded_tp): Initialize fields.
8427 <actions, step_actions, cmd_strings>: Change type to
8428 std::vector<char *>.
8429 * tracepoint.c (get_uploaded_tp): Allocate with new.
8430 (free_uploaded_tps): Free with delete.
8431 (parse_tracepoint_definition): Adjust to std::vector change.
8432 * breakpoint.c (read_uploaded_action): Likewise.
8433 (create_tracepoint_from_upload): Likewise.
8434 * ctf.c (ctf_write_uploaded_tp): Likewise.
8435 (SET_ARRAY_FIELD): Likewise.
8436 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8437
8438 2018-03-30 Tom Tromey <tom@tromey.com>
8439
8440 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8441 std::unique_ptr.
8442 (svr4_keep_data_in_core): Update.
8443 (svr4_read_so_list): Update.
8444
8445 2018-03-30 Tom Tromey <tom@tromey.com>
8446
8447 * windows-nat.c (handle_output_debug_string, handle_exception):
8448 Update.
8449 * target.h (target_read_string): Update.
8450 * target.c (target_read_string): Change "string" to
8451 unique_xmalloc_ptr.
8452 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8453 Update.
8454 * solib-frv.c (frv_current_sos): Update.
8455 * solib-dsbt.c (dsbt_current_sos): Update.
8456 * solib-darwin.c (darwin_current_sos): Update.
8457 * linux-thread-db.c (inferior_has_bug): Update.
8458 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8459 Update. Remove alloca.
8460 * ada-lang.c (ada_main_name): Update.
8461
8462 2018-03-30 Tom Tromey <tom@tromey.com>
8463
8464 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8465 (struct dwo_file_deleter): New.
8466 (dwo_file_up): New typedef.
8467 (open_and_init_dwo_file): Use dwo_file_up.
8468 (free_dwo_file_cleanup): Remove.
8469
8470 2018-03-30 Tom Tromey <tom@tromey.com>
8471
8472 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8473 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8474
8475 2018-03-30 Tom Tromey <tom@tromey.com>
8476
8477 * dwarf2read.c (class free_cached_comp_units): New class.
8478 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8479 (free_cached_comp_units): Remove function.
8480
8481 2018-03-30 Tom Tromey <tom@tromey.com>
8482
8483 * utils.h (make_cleanup_unpush_target): Remove.
8484 * inf-ptrace.c (struct target_unpusher): New.
8485 (target_unpush_up) New typedef.
8486 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8487 target_unpush_up.
8488 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8489
8490 2018-03-27 Tom Tromey <tom@tromey.com>
8491
8492 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8493
8494 2018-03-27 Pedro Alves <palves@redhat.com>
8495 Tom Tromey <tom@tromey.com>
8496
8497 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8498 destructor. Now a class.
8499 (gdb_readline_wrapper_cleanup): Remove function.
8500 (gdb_readline_wrapper): Remove cleanups.
8501
8502 2018-03-27 Tom Tromey <tom@tromey.com>
8503
8504 * typeprint.h (struct type_print_options) <local_typedefs,
8505 global_typedefs>: Remove "struct" keyword.
8506 (class typedef_hash_table): New class.
8507 (recursively_update_typedef_hash, add_template_parameters)
8508 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8509 (find_typedef_in_hash): Don't declare.
8510 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8511 (typedef_hash_table::recursively_update): Rename from
8512 recursively_update_typedef_hash. Now a member.
8513 (typedef_hash_table::add_template_parameters): Rename from
8514 add_template_parameters. Now a member.
8515 (typedef_hash_table::typedef_hash_table): Now a constructor;
8516 rename from create_typedef_hash.
8517 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8518 rename from free_typedef_hash.
8519 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8520 (do_free_global_table): Remove.
8521 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8522 from copy_type_recursive.
8523 (create_global_typedef_table): Remove.
8524 (typedef_hash_table::find_global_typedef): Now a member of
8525 typedef_hash_table.
8526 (typedef_hash_table::find_typedef): Rename from
8527 find_typedef_in_hash; now a member.
8528 (whatis_exp): Update.
8529 * extension.h (struct ext_lang_type_printers): Add constructor and
8530 destructor.
8531 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8532 declare.
8533 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8534 Now a constructor; rename from start_ext_lang_type_printers.
8535 (ext_lang_type_printers): Now a destructor; rename from
8536 free_ext_lang_type_printers.
8537 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8538 Update.
8539 (c_type_print_base_struct_union): Update. Remove cleanups.
8540
8541 2018-03-27 Tom Tromey <tom@tromey.com>
8542
8543 * dwarf-index-write.c: Include <cmath>.
8544
8545 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8546
8547 * NEWS: Add entry describing new "set|show varsize-limit" command.
8548 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8549 command.
8550 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8551 "set variable".
8552
8553 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8554
8555 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8556 dwarf-index-write.c
8557 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8558 * dwarf-index-common.c: New file.
8559 * dwarf-index-common.h: New file.
8560 * dwarf-index-write.c: New file.
8561 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8562 (struct dwarf2_section_info): Move from here.
8563 (dwarf2_section_info_def): Likewise.
8564 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8565 (offset_type): Likewise.
8566 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8567 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8568 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8569 (byte_swap): Likewise.
8570 (MAYBE_SWAP): Likewise.
8571 (dwarf2_per_cu_ptr): Likewise.
8572 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8573 (struct tu_stats): Likewise.
8574 (struct dwarf2_per_objfile): Likewise.
8575 (struct dwarf2_per_cu_data): Likewise.
8576 (struct signatured_type): Likewise.
8577 (sig_type_ptr): Likewise.
8578 (DEF_VEC_P (sig_type_ptr)): Likewise.
8579 (INDEX4_SUFFIX): Likewise.
8580 (INDEX5_SUFFIX): Likewise.
8581 (DEBUG_STR_SUFFIX): Likewise.
8582 (dwarf2_read_section): Make non-static.
8583 (mapped_index_string_hash): Move from here.
8584 (dwarf5_djb_hash): Likewise.
8585 (file_write): Likewise.
8586 (class data_buf): Likewise.
8587 (struct symtab_index_entry): Likewise.
8588 (struct mapped_symtab): Likewise.
8589 (find_slot): Likewise.
8590 (hash_expand): Likewise.
8591 (add_index_entry): Likewise.
8592 (uniquify_cu_indices): Likewise.
8593 (class c_str_view): Likewise.
8594 (class c_str_view_hasher): Likewise.
8595 (class vector_hasher): Likewise.
8596 (write_hash_table): Likewise.
8597 (psym_index_map): Likewise.
8598 (struct addrmap_index_data): Likewise.
8599 (add_address_entry): Likewise.
8600 (add_address_entry_worker): Likewise.
8601 (write_address_map): Likewise.
8602 (symbol_kind): Likewise.
8603 (write_psymbols): Likewise.
8604 (struct signatured_type_index_data): Likewise.
8605 (write_one_signatured_type): Likewise.
8606 (recursively_count_psymbols): Likewise.
8607 (recursively_write_psymbols): Likewise.
8608 (class debug_names): Likewise.
8609 (check_dwarf64_offsets): Likewise.
8610 (psyms_seen_size): Likewise.
8611 (write_gdbindex): Likewise.
8612 (write_debug_names): Likewise.
8613 (assert_file_size): Likewise.
8614 (write_psymtabs_to_index): Likewise.
8615 (save_gdb_index_command): Likewise.
8616 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8617 command.
8618 * dwarf2read.h: New file.
8619
8620 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8621
8622 PR gdb/22670
8623 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8624 symbol name if the CU's language stores symbol names in linkage
8625 format.
8626 * language.h (struct language_defn)
8627 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8628 all instances of this struct.
8629
8630 2018-03-26 Tom Tromey <tom@tromey.com>
8631
8632 * stack.c (backtrace_command_1): Remove verbose code.
8633
8634 2018-03-26 Tom Tromey <tom@tromey.com>
8635
8636 * python/py-framefilter.c (py_print_type): Don't catch
8637 exceptions. Return void.
8638 (py_print_value): Likewise.
8639 (py_print_single_arg): Likewise.
8640 (enumerate_args): Don't catch exceptions.
8641 (py_print_args): Likewise.
8642 (py_print_frame): Likewise.
8643 (gdbpy_apply_frame_filter): Catch exceptions here.
8644
8645 2018-03-26 Tom Tromey <tom@tromey.com>
8646
8647 * stack.c (_initialize_stack): Remove trailing newlines from help
8648 text. Add "Usage" line to "backtrace" help.
8649
8650 2018-03-26 Tom Tromey <tom@tromey.com>
8651
8652 PR python/16486:
8653 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8654
8655 2018-03-26 Tom Tromey <tom@tromey.com>
8656
8657 * python/py-framefilter.c (py_print_single_arg): Return
8658 EXT_LANG_BT_ERROR from catch.
8659
8660 2018-03-26 Tom Tromey <tom@tromey.com>
8661
8662 PR backtrace/15584:
8663 * stack.c (backtrace_command_1): Move some code into no-filters
8664 "if".
8665
8666 2018-03-26 Tom Tromey <tom@tromey.com>
8667
8668 * python/py-framefilter.c (throw_quit_or_print_exception): New
8669 function.
8670 (gdbpy_apply_frame_filter): Use it.
8671
8672 2018-03-26 Tom Tromey <tom@tromey.com>
8673
8674 PR cli/17716:
8675 * python/py-framefilter.c (py_print_type, py_print_value)
8676 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8677 RETURN_MASK_ERROR.
8678
8679 2018-03-26 Tom Tromey <tom@tromey.com>
8680
8681 * python/py-framefilter.c (enumerate_args): Use
8682 gdb::unique_xmalloc_ptr.
8683
8684 2018-03-26 Tom Tromey <tom@tromey.com>
8685
8686 * python/py-framefilter.c (py_print_frame): Return
8687 EXT_LANG_BT_OK.
8688 (gdbpy_apply_frame_filter): Update comment.
8689 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8690 Remove.
8691 <EXT_LANG_BT_NO_FILTERS>: Change value.
8692
8693 2018-03-26 Tom Tromey <tom@tromey.com>
8694
8695 PR backtrace/15582:
8696 * stack.c (backtrace_command): Parse "hide" argument.
8697 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8698 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8699 constant.
8700
8701 2018-03-26 Tom Tromey <tom@tromey.com>
8702
8703 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8704 add "flags".
8705 (backtrace_command): Remove "fulltrace", add "flags".
8706
8707 2018-03-26 Tom Tromey <tom@tromey.com>
8708
8709 * stack.c (backtrace_command): Rewrite command line parsing.
8710
8711 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8712
8713 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8714
8715 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8716
8717 * filename-seen-cache.h: Add include guard.
8718
8719 2018-03-26 Keith Seitz <keiths@redhat.com>
8720
8721 * symfile.c (place_section): Remove "struct" from section_addr_info
8722 in comment.
8723 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8724 "struct" keyword from section_addr_info.
8725
8726 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8727
8728 * regformats/regdef.h (reg): Add constructors.
8729
8730 2018-03-25 Pedro Alves <palves@redhat.com>
8731
8732 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8733 if then/else bodies in var_func_name extraction.
8734
8735 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8736
8737 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8738 lookup_minimal_symbol() to find symbol entry.
8739 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8740
8741 2018-03-23 Keith Seitz <keiths@redhat.com>
8742
8743 PR c++/22968
8744 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8745 nested type definitions for C++, too.
8746
8747 2018-03-23 Tom Tromey <tom@tromey.com>
8748
8749 * machoread.c (struct oso_el): Add a constructor. Don't define as
8750 a typedef.
8751 (macho_register_oso): Remove.
8752 (macho_symtab_read): Take a std::vector.
8753 (oso_el_compare_name): Now a std::sort comparator.
8754 (macho_symfile_read_all_oso): Take a std::vector.
8755 (macho_symfile_read): Use std::vector. Remove cleanups.
8756
8757 2018-03-22 Tom Tromey <tom@tromey.com>
8758
8759 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8760 (record_full_goto_bookmark): Use std::string.
8761
8762 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8763
8764 PR tdep/18295
8765 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8766 a single mask.
8767
8768 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8769
8770 * rs6000-tdep.c (store_insn_p): New function.
8771 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8772 and cr_reg to their unshifted values. Use store_insn_p to
8773 match LR saves using either R1 or fdata->alloca_reg. Use
8774 store_insn_p to match CR saves. Set alloca_reg_offset
8775 when alloca_reg and framep are set. Remove lr_reg shift
8776 when assigning to fdata->lr_register.
8777
8778 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8779
8780 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8781 command line args instead of emitting a warning.
8782
8783 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8784
8785 * tracepoint.h (struct static_tracepoint_marker): Initialize
8786 fields, define default constructor, move constructor and move
8787 assignment, disable the rest.
8788 <str_id, extra>: Make std::string.
8789 (release_static_tracepoint_marker): Remove.
8790 (free_current_marker): Remove.
8791 * tracepoint.c (free_current_marker): Remove.
8792 (parse_static_tracepoint_marker_definition): Adjust to
8793 std::string, use new hex2str overload.
8794 (release_static_tracepoint_marker): Remove.
8795 (print_one_static_tracepoint_marker): Get marker by reference
8796 and adjust to std::string.
8797 (info_static_tracepoint_markers_command): Adjust to std::vector
8798 changes
8799 * target.h (static_tracepoint_marker_p): Remove typedef.
8800 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8801 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8802 bool.
8803 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8804 * target-debug.h
8805 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8806 (target_debug_print_std_vector_static_tracepoint_marker): New.
8807 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8808 to...
8809 (target_debug_print_static_tracepoint_marker_p): ... this.
8810 * target-delegates.c: Re-generate.
8811 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8812 Make std::string.
8813 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8814 (decode_static_tracepoint_spec): Adjust to std::vector.
8815 (tracepoint_print_one_detail): Adjust to std::string.
8816 (strace_marker_decode_location): Adjust to std::string.
8817 (update_static_tracepoint): Adjust to std::string, remove call
8818 to release_static_tracepoint_marker.
8819 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8820 Adjust to std::vector.
8821 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8822 (remote_static_tracepoint_markers_by_strid): Adjust to
8823 std::vector.
8824 * common/rsp-low.h (hex2str): New overload with explicit count
8825 of bytes.
8826 * common/rsp-low.c (hex2str): New overload with explicit count
8827 of bytes.
8828 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8829 (_initialize_rsp_low_selftests): Add test_hex2str test.
8830 * unittests/tracepoint-selftests.c
8831 (test_parse_static_tracepoint_marker_definition): Adjust to
8832 std::string.
8833
8834 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8835
8836 * tracepoint.c (parse_static_tracepoint_marker_definition):
8837 Consider case where the definition is followed by more
8838 definitions.
8839 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8840 tracepoint-selftests.c.
8841 * unittests/tracepoint-selftests.c: New.
8842
8843 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8844
8845 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8846 Carvalho.
8847
8848 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8849
8850 * symtab.c (find_pc_sect_line): fixed indentation.
8851
8852 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8853
8854 * symtab.c (find_pc_sect_line): now uses binary search.
8855
8856 2018-03-19 Tom Tromey <tom@tromey.com>
8857
8858 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8859 "IDENT" production.
8860
8861 2018-03-19 Pedro Alves <palves@redhat.com>
8862 Tom Tromey <tom@tromey.com>
8863
8864 * unittests/observable-selftests.c: New file.
8865 * common/observable.h: New file.
8866 * observable.h: New file.
8867 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8868 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8869 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8870 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8871 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8872 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8873 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8874 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8875 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8876 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8877 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8878 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8879 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8880 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8881 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8882 tui/tui-interp.c, valops.c: Update all users.
8883 * tui/tui-hooks.c (tui_bp_created_observer)
8884 (tui_bp_deleted_observer, tui_bp_modified_observer)
8885 (tui_inferior_exit_observer, tui_before_prompt_observer)
8886 (tui_normal_stop_observer, tui_register_changed_observer):
8887 Remove.
8888 (tui_observers_token): New global.
8889 (attach_or_detach, tui_attach_detach_observers): New functions.
8890 (tui_install_hooks, tui_remove_hooks): Use
8891 tui_attach_detach_observers.
8892 * record-btrace.c (record_btrace_thread_observer): Remove.
8893 (record_btrace_thread_observer_token): New global.
8894 * observer.sh: Remove.
8895 * observer.c: Rename to observable.c.
8896 * observable.c (namespace gdb_observers): Define new objects.
8897 (observer_debug): Move into gdb_observers namespace.
8898 (struct observer, struct observer_list, xalloc_observer_list_node)
8899 (xfree_observer_list_node, generic_observer_attach)
8900 (generic_observer_detach, generic_observer_notify): Remove.
8901 (_initialize_observer): Update.
8902 Don't include observer.inc.
8903 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8904 (clean mostlyclean): Likewise.
8905 (observer.h, observer.inc): Remove targets.
8906 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8907 (COMMON_SFILES): Use observable.c, not observer.c.
8908 * .gitignore: Remove observer.h.
8909
8910 2018-03-18 Tom Tromey <tom@tromey.com>
8911
8912 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8913 gdb::def_vector.
8914 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8915
8916 2018-03-17 Tom Tromey <tom@tromey.com>
8917
8918 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8919
8920 2018-03-17 Tom Tromey <tom@tromey.com>
8921
8922 * target.c (class scoped_target_fd): New.
8923 (target_fileio_close_cleanup): Remove.
8924 (target_fileio_read_alloc_1): Use scoped_target_fd.
8925
8926 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8927
8928 * silent-rules.mk: New.
8929 * Makefile.in: Include silent-rules.mk
8930 (srcdir, VPATH, top_srcdir): Move up.
8931 (COMPILE): Add ECHO_CXX.
8932 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8933 (init.c): Add ECHO_INIT_C.
8934 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8935 (version.c): Add ECHO_GEN.
8936 (printcmd.o): Add ECHO_CXX.
8937 (target-float.o): Add ECHO_CXX.
8938 (ada-exp.o): Add ECHO_CXX.
8939 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8940 (insight$(EXEEXT)): Add ECHO_CXXLD.
8941 * gnulib/configure.ac: Add AM_SILENT_RULES.
8942 * gnulib/aclocal.m4: Re-generate.
8943 * gnulib/configure: Re-generate.
8944 * gnulib/import/Makefile.in: Re-generate.
8945
8946 2018-03-16 Tom Tromey <tom@tromey.com>
8947
8948 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8949 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8950 * utils.c (do_free_section_addr_info)
8951 (make_cleanup_free_section_addr_info): Remove.
8952 * symfile.h (struct other_sections): Add constructor.
8953 (struct section_addr_info): Remove.
8954 (section_addr_info): New typedef.
8955 (struct sym_fns) <sym_offsets>: Change type of parameter.
8956 (build_section_addr_info_from_objfile)
8957 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8958 (default_symfile_offsets, symbol_file_add)
8959 (symbol_file_add_from_bfd)
8960 (build_section_addr_info_from_section_table): Update.
8961 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8962 * symfile.c (alloc_section_addr_info): Remove.
8963 (build_section_addr_info_from_section_table): Change return type.
8964 Update.
8965 (build_section_addr_info_from_bfd)
8966 (build_section_addr_info_from_objfile): Likewise.
8967 (free_section_addr_info): Remove.
8968 (relative_addr_info_to_section_offsets): Change type of "addrs".
8969 (addrs_section_compar): Now a std::sort comparator.
8970 (addrs_section_sort): Change return type.
8971 (addr_info_make_relative): Change type of "addrs". Update.
8972 (default_symfile_offsets, syms_from_objfile_1)
8973 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8974 (symbol_file_add_separate): Update.
8975 (symbol_file_add): Change type of "addrs". Update.
8976 (add_symbol_file_command): Update. Remove cleanups.
8977 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8978 cleanups.
8979 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8980 * solib.c (solib_read_symbols): Update.
8981 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8982 * machoread.c (macho_symfile_offsets): Update.
8983 * jit.c (jit_bfd_try_read_symtab): Update.
8984
8985 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8986
8987 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8988 unittests/utils-selftests.c.
8989 * unittests/utils-selftests.c: New file.
8990
8991 2018-03-14 Tom Tromey <tom@tromey.com>
8992
8993 PR cli/14977:
8994 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8995 for NULL.
8996
8997 2018-03-14 Tom Tromey <tom@tromey.com>
8998
8999 PR cli/19918:
9000 * printcmd.c (printf_pointer): Allow "-" in format.
9001
9002 2018-03-14 Tom Tromey <tom@tromey.com>
9003
9004 * printcmd.c (_initialize_printcmd): Add usage to printf.
9005
9006 2018-03-14 Yao Qi <qiyao@sourceware.org>
9007
9008 * MAINTAINERS: Update my email address.
9009
9010 2018-03-13 Tom Tromey <tom@tromey.com>
9011
9012 * machoread.c (macho_check_dsym): Change filenamep to a
9013 std::string*.
9014 (macho_symfile_read): Update.
9015 * symfile.c (load_command): Use std::string.
9016
9017 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9018
9019 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9020 to error message string.
9021 (riscv_register_name): Use xsnprintf instead of sprintf.
9022 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9023 internal_error.
9024 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9025 error.
9026 (riscv_push_dummy_call): Likewise.
9027
9028 2018-03-12 Tom Tromey <tom@tromey.com>
9029
9030 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9031 Use gdb::byte_vector.
9032 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9033
9034 2018-03-12 Yao Qi <yao.qi@linaro.org>
9035
9036 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9037 parameter type to readable_regcache.
9038 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9039 the declaration.
9040
9041 2018-03-11 Tom Tromey <tom@tromey.com>
9042
9043 * dwarf2read.c (struct nextfield): Add initializers.
9044 (struct nextfnfield): Remove.
9045 (struct fnfieldlist): Add initializers. Remove "length" and
9046 "head", use std::vector.
9047 (struct decl_field_list): Remove.
9048 (struct field_info): Add initializers.
9049 <fields, baseclasses>: Now std::vector.
9050 <nbaseclasses, nfnfields, typedef_field_list_count,
9051 nested_types_list_count>: Remove.
9052 (dwarf2_add_field, dwarf2_add_type_defn)
9053 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9054 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9055 (process_structure_scope): Update.
9056
9057 2018-03-11 Tom Tromey <tom@tromey.com>
9058
9059 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9060 for use by std::sort.
9061 (build_type_psymtabs_1): Use std::vector.
9062
9063 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9064
9065 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9066 and LIBMPFR in the printed configuration.
9067
9068 2018-03-08 Tom Tromey <tom@tromey.com>
9069
9070 * source.c (get_filename_and_charpos): Use scoped_fd.
9071 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9072 (procfs_pidlist): Likewise.
9073 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9074 (iterate_over_mappings): Likewise.
9075
9076 2018-03-08 Tom Tromey <tom@tromey.com>
9077
9078 * infcall.c (struct call_return_meta_info)
9079 <stack_temporaries_enabled>: Remove.
9080 (get_call_return_value, call_function_by_hand_dummy): Update.
9081 * thread.c (disable_thread_stack_temporaries): Remove.
9082 (enable_thread_stack_temporaries): Remove.
9083 (thread_stack_temporaries_enabled_p): Return bool.
9084 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9085 (get_last_thread_stack_temporary): Update.
9086 * eval.c (evaluate_subexp): Update.
9087 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9088 class, not a function.
9089 (value_ptr, value_vec): Remove typedefs.
9090 (class thread_info) <stack_temporaries_enabled>: Now bool.
9091 <stack_temporaries>: Now a std::vector.
9092 (thread_stack_temporaries_enabled_p)
9093 (value_in_thread_stack_temporaries): Return bool.
9094
9095 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9096
9097 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9098 (getpkt_or_notif_sane_1): Likewise.
9099
9100 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9101
9102 * build-id.c (build_id_to_debug_bfd): Use std::string.
9103
9104 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9105
9106 * build-id.c (find_separate_debug_file_by_buildid): Return
9107 std::string.
9108 * build-id.h (find_separate_debug_file_by_buildid): Return
9109 std::string.
9110 * coffread.c (coff_symfile_read): Adjust to std::string.
9111 * elfread.c (elf_symfile_read): Adjust to std::string.
9112 * symfile.c (separate_debug_file_exists): Change parameter to
9113 std::string.
9114 (find_separate_debug_file): Return std::string.
9115 (find_separate_debug_file_by_debuglink): Return std::string.
9116 * symfile.h (find_separate_debug_file_by_debuglink): Return
9117 std::string.
9118
9119 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9120
9121 * common/xml-utils.c (xml_escape_text): Move code to...
9122 (xml_escape_text_append): ... this new function.
9123 * common/xml-utils.h (xml_escape_text_append): New declaration.
9124 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9125 New function.
9126 (_initialize_xml_utils): register test_xml_escape_text_append as
9127 a selftest.
9128
9129 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9130
9131 * defs.h: Remove MAX_REGISTER_SIZE.
9132 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9133 asserts.
9134 * python/py-unwind.c (pyuw_sniffer): Likewise.
9135
9136 2018-03-07 Tom Tromey <tom@tromey.com>
9137
9138 * linux-tdep.c (linux_info_proc): Update.
9139 * target.h (struct target_ops) <to_fileio_readlink>: Return
9140 optional<string>.
9141 (target_fileio_readlink): Return optional<string>.
9142 * remote.c (remote_hostio_readlink): Return optional<string>.
9143 * inf-child.c (inf_child_fileio_readlink): Return
9144 optional<string>.
9145 * target.c (target_fileio_readlink): Return optional<string>.
9146
9147 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9148
9149 * regcache.c (cooked_read_test): Add riscv to the list of
9150 architectures that have a save_reggroup.
9151
9152 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9153
9154 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9155 value is not a dynamic class object.
9156
9157 2018-03-06 Tom Tromey <tom@tromey.com>
9158
9159 * rust-exp.y: Formatting fixes.
9160
9161 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9162
9163 * riscv-tdep.c (riscv_register_name): Remove target description
9164 support.
9165 (riscv_gdbarch_init): Remove target description check.
9166
9167 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9168
9169 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9170 comment.
9171 * riscv-tdep.h: Likewise.
9172
9173 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9174
9175 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9176 (riscv_pseudo_register_write): Delete.
9177 (riscv_gdbarch_init): Remove all use of pseudo registers.
9178
9179 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9180
9181 * record-btrace.c (btrace_print_lines): Replace cleanup
9182 parameter with RAII equivalents.
9183 (btrace_insn_history): Replace cleanup with RAII equivalents.
9184 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9185 make_cleanup_ui_out_tuple_begin_end): Remove.
9186 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9187 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9188 make_cleanup_ui_out_list_begin_end): Remove.
9189
9190 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9191
9192 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9193 parameter types to std::vector. Use bool.
9194 (record_btrace_wait): Replace VEC(tp_t) with
9195 std::vector<thread_info *>.
9196 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9197
9198 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9199
9200 * record-btrace.c (record_btrace_disable_callback): Remove.
9201 (struct scoped_btrace_disable): New.
9202 (record_btrace_open): Use scoped_btrace_disable.
9203
9204 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9205
9206 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9207 reading values from registers.
9208
9209 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9210
9211 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9212 where appropriate.
9213
9214 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9215
9216 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9217 change parameter type. Use GDB's print functions, and use
9218 core_addr_to_string where appropriate.
9219 (riscv_push_dummy_call): Use core_addr_to_string where
9220 appropriate, update call to riscv_print_arg_location, and reindent
9221 a few lines.
9222 (riscv_return_value): Update call to riscv_print_arg_location.
9223
9224 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9225 Tim Newsome <tim@sifive.com>
9226 Albert Ou <a0u@eecs.berkeley.edu>
9227 Darius Rad <darius@bluespec.com>
9228
9229 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9230 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9231 (ALLDEPFILES): Add riscv-tdep.c
9232 * configure.tgt: Add riscv support.
9233 * riscv-tdep.c: New file.
9234 * riscv-tdep.h: New file.
9235 * NEWS: Mention new target.
9236 * MAINTAINERS: Add entry for riscv.
9237
9238 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9239
9240 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9241 fields within aggregates.
9242
9243 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9244
9245 * record-btrace.c (btrace_print_lines): Change type of flags to
9246 gdb_disassembly_flags.
9247
9248 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9249
9250 * fbsd-nat.c: Include "inf-ptrace.h".
9251 (USE_SIGTRAP_SIGINFO): Conditionally define.
9252 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9253 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9254 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9255 function.
9256 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9257 Likewise.
9258 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9259 Likewise.
9260 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9261 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9262 "supports_stopped_by_hw_breakpoint" target methods.
9263
9264 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9265
9266 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9267 * fbsd-nat.c (debug_fbsd_nat): New variable.
9268 (show_fbsd_nat_debug): New function.
9269 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9270 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9271
9272 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9273
9274 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9275 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9276 prototype.
9277 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9278 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9279 method.
9280
9281 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9282
9283 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9284 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9285
9286 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9287
9288 * charset.c (struct charset_vector): New.
9289 (charsets): Change type to charset_vector.
9290 (find_charset_names): Adjust.
9291 (add_one): Adjust.
9292 (_initialize_charset): Adjust.
9293
9294 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9295
9296 * progspace.h (struct program_space) <deleted_solibs>: Change
9297 type to std::vector<std::string>.
9298 * progspace.c (clear_program_space_solib_cache): Adjust.
9299 * breakpoint.c (print_solib_event): Adjust.
9300 (check_status_catch_solib): Adjust.
9301 * solib.c (update_solib_list): Adjust.
9302 * ui-out.h (class ui_out) <field_string>: New overload.
9303 * ui-out.c (ui_out::field_string): New overload.
9304
9305 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9306
9307 * progspace.h (struct program_space): Add constructor and
9308 destructor, initialize fields.
9309 (add_program_space): Remove.
9310 * progspace.c (add_program_space): Rename to...
9311 (program_space::program_space): ... this.
9312 (release_program_space): Rename to...
9313 (program_space::~program_space): ... this.
9314 (delete_program_space): Use delete to delete program_space.
9315 (initialize_progspace): Use new to allocate program_space.
9316 * inferior.c (add_inferior_with_spaces): Likewise.
9317 (clone_inferior_command): Likewise.
9318 * infrun.c (follow_fork_inferior): Likewise.
9319 (handle_vfork_child_exec_or_exit): Likewise.
9320
9321 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9322
9323 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9324 (delim_string_to_char_ptr_vec): Return std::vector of
9325 gdb::unique_xmalloc_ptr.
9326 (dirnames_to_char_ptr_vec_append): Take std::vector of
9327 gdb::unique_xmalloc_ptr.
9328 (dirnames_to_char_ptr_vec): Return std::vector of
9329 gdb::unique_xmalloc_ptr.
9330 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9331 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9332 (delim_string_to_char_ptr_vec): Return an std::vector of
9333 gdb::unique_xmalloc_ptr, adjust the code.
9334 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9335 gdb::unique_xmalloc_ptr, adjust the code.
9336 (dirnames_to_char_ptr_vec): Return an std::vector of
9337 gdb::unique_xmalloc_ptr, adjust the code.
9338 * auto-load.c (auto_load_safe_path_vec): Change type to
9339 std::vector of gdb::unique_xmalloc_ptr.
9340 (auto_load_expand_dir_vars): Return an std::vector of
9341 gdb::unique_xmalloc_ptr, adjust the code.
9342 (auto_load_safe_path_vec_update): Adjust.
9343 (filename_is_in_auto_load_safe_path_vec): Adjust.
9344 (auto_load_objfile_script_1): Adjust.
9345 * build-id.c (build_id_to_debug_bfd): Adjust.
9346 * linux-thread-db.c (thread_db_load_search): Adjust.
9347 * source.c (add_path): Adjust.
9348 (openp): Adjust.
9349 * symfile.c (find_separate_debug_file): Adjust.
9350 * utils.c (do_free_char_ptr_vec): Remove.
9351 (make_cleanup_free_char_ptr_vec): Remove.
9352
9353 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9354
9355 PR gdb/22907
9356 * common/pathstuff.c: Conditionally include "<windows.h>".
9357
9358 2018-03-01 Georg Sauthoff <mail@georg.so>
9359
9360 PR gdb/22888
9361 * gcore.in: Quote variables and switch interpreter to bash.
9362
9363 2018-03-01 Tom Tromey <tom@tromey.com>
9364
9365 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9366 assertion. Add assertion for discriminant_index.
9367 (quirk_rust_enum): Use correct base type name in univariant case.
9368
9369 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9370
9371 * record.c (get_call_history_modifiers): Return a
9372 record_print_flags.
9373 (cmd_record_call_history): Adjust.
9374 * record-btrace.c (record_btrace_call_history): Adjust.
9375 (record_btrace_call_history_range): Adjust.
9376 (record_btrace_call_history_from): Adjust.
9377 * target-debug.h (target_debug_print_record_print_flags): New.
9378 * target-delegates.c: Re-generate.
9379 * target.c (target_call_history): Change flags type.
9380 (target_call_history_from): Likewise.
9381 (target_call_history_range): Likewise.
9382 * target.h (struct target_ops) <target_call_history>: Likewise.
9383 (target_call_history_from): Likewise.
9384 (target_call_history_range): Likewise.
9385
9386 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9387 Simon Marchi <simon.marchi@polymtl.ca>
9388
9389 * common/common-utils.c: Include "sys/stat.h".
9390 (is_regular_file): Move here from "source.c"; change return
9391 type to "bool".
9392 * common/common-utils.h (is_regular_file): New prototype.
9393 * common/pathstuff.c (contains_dir_separator): New function.
9394 * common/pathstuff.h (contains_dir_separator): New prototype.
9395 * source.c: Don't include "sys/stat.h".
9396 (is_regular_file): Move to "common/common-utils.c".
9397
9398 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9399
9400 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9401 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9402 * auto-load.c: Include "common/pathstuff.h".
9403 * common/common-def.h (current_directory): Move here.
9404 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9405 function.
9406 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9407 prototype.
9408 * common/pathstuff.c: New file.
9409 * common/pathstuff.h: New file.
9410 * compile/compile.c: Include "common/pathstuff.h".
9411 * defs.h (current_directory): Move to "common/common-defs.h".
9412 * dwarf2read.c: Include "common/pathstuff.h".
9413 * exec.c: Likewise.
9414 * guile/scm-safe-call.c: Likewise.
9415 * linux-thread-db.c: Likewise.
9416 * main.c: Likewise.
9417 * nto-tdep.c: Likewise.
9418 * objfiles.c: Likewise.
9419 * source.c: Likewise.
9420 * symtab.c: Likewise.
9421 * utils.c: Include "common/pathstuff.h".
9422 (gdb_realpath): Move to "common/pathstuff.c".
9423 (gdb_realpath_keepfile): Likewise.
9424 (gdb_abspath): Likewise.
9425 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9426 (gdb_realpath_keepfile): Likewise.
9427 (gdb_abspath): Likewise.
9428
9429 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9430
9431 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9432 wildcard process pid for super_resume for kernels with a
9433 specific bug.
9434
9435 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9436
9437 * compile/compile.c (get_args): Add additional comments
9438 explaining function.
9439
9440 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9441 Tom Tromey <tom@tromey.com>
9442
9443 * target.h (memory_write_request_s): Remove typedef. Don't define
9444 VEC.
9445 (target_write_memory_blocks): Change argument to std::vector.
9446 (struct memory_write_request): Add constructor.
9447 * target-memory.c (compare_block_starting_address): Return bool.
9448 Change argument types.
9449 (claim_memory): Change arguments to use std::vector.
9450 (split_regular_and_flash_blocks, blocks_to_erase)
9451 (compute_garbled_blocks): Likewise.
9452 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9453 (target_write_memory_blocks): Change argument to std::vector.
9454 * symfile.c (struct load_section_data): Add constructor and
9455 destructor. Use std::vector for "requests".
9456 (struct load_progress_data): Add initializers.
9457 (load_section_callback): Update. Use "new".
9458 (clear_memory_write_data): Remove.
9459 (generic_load): Update.
9460
9461 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9462
9463 * arch/aarch64.h: Use common/tdesc.h.
9464
9465 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9466
9467 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9468 architecture with a 64-bit ABI.
9469
9470 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9471
9472 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9473 ahead of target description loading.
9474
9475 2018-02-26 Tom Tromey <tom@tromey.com>
9476
9477 * stack.c (backtrace_command_1): Update.
9478 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9479 of "flags".
9480 * python/py-framefilter.c (py_print_frame)
9481 (gdbpy_apply_frame_filter): Change type of "flags".
9482 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9483 of "flags".
9484 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9485 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9486 * extension.h (enum frame_filter_flag): Rename from
9487 frame_filter_flags.
9488 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9489 (apply_ext_lang_frame_filter): Change type of "flags".
9490 * extension.c (apply_ext_lang_frame_filter): Change type of
9491 "flags".
9492 * extension-priv.h (struct extension_language_ops)
9493 <apply_frame_filter>: Change type of "flags".
9494
9495 2018-02-26 Tom Tromey <tom@tromey.com>
9496
9497 PR python/16497:
9498 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9499 off-by-one in py_end computation.
9500 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9501 PRINT_MORE_FRAMES.
9502 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9503 constant.
9504
9505 2018-02-26 Tom Tromey <tom@tromey.com>
9506
9507 * dwarf2read.c (struct variant_field): New.
9508 (struct nextfield) <variant>: New field.
9509 (dwarf2_add_field): Handle DW_TAG_variant_part.
9510 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9511 discriminated union.
9512 (read_structure_type): Handle DW_TAG_variant_part.
9513 (handle_struct_member_die): New function, extracted from
9514 process_structure_scope. Handle DW_TAG_variant.
9515 (process_structure_scope): Handle discriminated unions. Call
9516 handle_struct_member_die.
9517
9518 2018-02-26 Tom Tromey <tom@tromey.com>
9519
9520 * rust-lang.h (rust_last_path_segment): Declare.
9521 * rust-lang.c (rust_last_path_segment): Now public. Change
9522 contract.
9523 (struct disr_info): Remove.
9524 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9525 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9526 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9527 (rust_enum_p, rust_enum_variant): New function.
9528 (rust_underscore_fields): Remove "offset" parameter.
9529 (rust_print_enum): New function.
9530 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9531 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9532 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9533 enums.
9534 (rust_internal_print_type): New function, from rust_print_type.
9535 Remove enum code.
9536 (rust_print_type): Call rust_internal_print_type.
9537 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9538 Update enum handling.
9539 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9540 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9541 (rust_union_quirks): New functions.
9542 (process_full_comp_unit, process_full_type_unit): Call
9543 rust_union_quirks.
9544 (process_structure_scope): Update rust_unions if necessary.
9545
9546 2018-02-26 Tom Tromey <tom@tromey.com>
9547
9548 * value.h (value_union_variant): Declare.
9549 * valops.c (value_union_variant): New function.
9550 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9551 (struct discriminant_info): New.
9552 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9553 enumerator.
9554 (struct main_type) <flag_discriminated_union>: New field.
9555
9556 2018-02-26 Tom Tromey <tom@tromey.com>
9557
9558 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9559 unittests/unpack-selftests.c.
9560 * unittests/unpack-selftests.c: New file.
9561 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9562
9563 2018-02-26 Yao Qi <yao.qi@linaro.org>
9564
9565 * dwarf2read.c (struct partial_die_info) <read>: New method.
9566 (read_partial_die): Remove the declaration.
9567 (load_partial_dies): Update.
9568 (partial_die_info::partial_die_info):
9569 (read_partial_die): Change it to partial_die_info::read.
9570
9571 2018-02-26 Yao Qi <yao.qi@linaro.org>
9572
9573 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9574 (fixup_partial_die): Remove declaration.
9575 (scan_partial_symbols): Update.
9576 (partial_die_parent_scope): Likewise.
9577 (partial_die_full_name): Likewise.
9578 (fixup_partial_die): Change it to partial_die_info::fixup.
9579
9580 2018-02-26 Yao Qi <yao.qi@linaro.org>
9581
9582 * dwarf2read.c (read_partial_die): Update the declaration.
9583 (load_partial_dies): Caller update.
9584 (read_partial_die): Remove one argument abbrev_len.
9585
9586 2018-02-26 Yao Qi <yao.qi@linaro.org>
9587
9588 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9589 assignment operator.
9590 (load_partial_dies): Use ctor and copy ctor.
9591 (read_partial_die): Update.
9592 (dwarf2_cu::find_partial_die): Use ctor.
9593
9594 2018-02-26 Yao Qi <yao.qi@linaro.org>
9595
9596 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9597 (find_partial_die_in_comp_unit): Change it to
9598 dwarf2_cu::find_partial_die.
9599 (find_partial_die): Update.
9600
9601 2018-02-26 Yao Qi <yao.qi@linaro.org>
9602
9603 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9604 is NULL.
9605
9606 2018-02-26 Yao Qi <yao.qi@linaro.org>
9607
9608 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9609
9610 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9611
9612 * arch/amd64.h: Use common/tdesc.h.
9613 * arch/i386.c: Likewise.
9614 * arch/i386.h: Likewise.
9615 * arch/tic6x.c: Likewise.
9616 * arch/tdesc.h: Move file from here...
9617 * common/tdesc.h: ...to here.
9618 * features/aarch64-core.c: Regenerate.
9619 * features/aarch64-fpu.c: Regenerate.
9620 * features/i386/32bit-avx.c: Regenerate.
9621 * features/i386/32bit-avx512.c: Regenerate.
9622 * features/i386/32bit-core.c: Regenerate.
9623 * features/i386/32bit-linux.c: Regenerate.
9624 * features/i386/32bit-mpx.c: Regenerate.
9625 * features/i386/32bit-pkeys.c: Regenerate.
9626 * features/i386/32bit-sse.c: Regenerate.
9627 * features/i386/64bit-avx.c: Regenerate.
9628 * features/i386/64bit-avx512.c: Regenerate.
9629 * features/i386/64bit-core.c: Regenerate.
9630 * features/i386/64bit-linux.c: Regenerate.
9631 * features/i386/64bit-mpx.c: Regenerate.
9632 * features/i386/64bit-pkeys.c: Regenerate.
9633 * features/i386/64bit-segments.c: Regenerate.
9634 * features/i386/64bit-sse.c: Regenerate.
9635 * features/i386/x32-core.c: Regenerate.
9636 * features/tic6x-c6xp.c: Regenerate.
9637 * features/tic6x-core.c: Regenerate.
9638 * features/tic6x-gp.c: Regenerate.
9639 * target-descriptions.c: Use common/tdesc.h.
9640 * target-descriptions.h: Likewise.
9641
9642 2018-02-24 Tom Tromey <tom@tromey.com>
9643
9644 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9645 (try_thread_db_load_from_dir, thread_db_load_search): Use
9646 std::string.
9647 (info_auto_load_libthread_db_compare): Return bool. Change
9648 argument types.
9649 (info_auto_load_libthread_db): Use std::vector, std::string.
9650 Remove cleanups.
9651
9652 2018-02-24 Tom Tromey <tom@tromey.com>
9653
9654 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9655 std::string.
9656 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9657 std::string*.
9658 * gdbarch.c: Rebuild.
9659 * gdbarch.h: Rebuild.
9660 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9661 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9662 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9663 std::string*.
9664
9665 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9666
9667 * gdbtypes.h (sect_offset): Change type to uint64_t.
9668 (sect_offset_str): New function.
9669 * dwarf2read.c (create_addrmap_from_aranges): Use
9670 sect_offset_str.
9671 (error_check_comp_unit_head): Likewise.
9672 (create_debug_type_hash_table): Likewise.
9673 (read_cutu_die_from_dwo): Likewise.
9674 (init_cutu_and_read_dies): Likewise.
9675 (init_cutu_and_read_dies_no_follow): Likewise.
9676 (process_psymtab_comp_unit_reader): Likewise.
9677 (partial_die_parent_scope): Likewise.
9678 (peek_die_abbrev): Likewise.
9679 (process_queue): Likewise.
9680 (dwarf2_physname): Likewise.
9681 (read_namespace_alias): Likewise.
9682 (read_import_statement): Likewise.
9683 (create_dwo_cu_reader): Likewise.
9684 (create_cus_hash_table): Likewise.
9685 (lookup_dwo_cutu): Likewise.
9686 (inherit_abstract_dies): Likewise.
9687 (read_func_scope): Likewise.
9688 (read_call_site_scope): Likewise.
9689 (dwarf2_add_member_fn): Likewise.
9690 (read_common_block): Likewise.
9691 (read_module_type): Likewise.
9692 (read_typedef): Likewise.
9693 (read_subrange_type): Likewise.
9694 (load_partial_dies): Likewise.
9695 (read_partial_die): Likewise.
9696 (find_partial_die): Likewise.
9697 (read_str_index): Likewise.
9698 (dwarf2_string_attr): Likewise.
9699 (build_error_marker_type): Likewise.
9700 (lookup_die_type): Likewise.
9701 (dump_die_shallow): Likewise.
9702 (follow_die_ref): Likewise.
9703 (dwarf2_fetch_die_loc_sect_off): Likewise.
9704 (dwarf2_fetch_constant_bytes): Likewise.
9705 (follow_die_sig): Likewise.
9706 (get_signatured_type): Likewise.
9707 (get_DW_AT_signature_type): Likewise.
9708 (dwarf2_find_containing_comp_unit): Likewise.
9709 (set_die_type): Likewise.
9710
9711 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9712
9713 * arch/aarch64.c: Include "common-defs.h".
9714 * arch/amd64.c: Likewise.
9715 * arch/i386.c: Likewise.
9716
9717 2018-02-21 Tom Tromey <tom@tromey.com>
9718
9719 * value.h: (extract_field_op): Update.
9720 * eval.c (extract_field_op): Return a const char *.
9721 * expression.h (parse_expression_for_completion): Update.
9722 * completer.c (complete_expression): Update.
9723 (add_struct_fields): Make fieldname const.
9724 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9725 (mark_completion_tag, parse_exp_in_context_1): Update.
9726 (parse_expression_for_completion): Change "name" to
9727 unique_xmalloc_ptr*.
9728
9729 2018-02-21 Tom Tromey <tom@tromey.com>
9730
9731 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9732
9733 2018-02-21 Yao Qi <yao.qi@linaro.org>
9734
9735 * avr-tdep.c (avr_read_pc): Change parameter type to
9736 readable_regcache.
9737 * gdbarch.sh (read_pc): Likewise.
9738 * gdbarch.c: Re-generated.
9739 * gdbarch.h: Re-generated.
9740 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9741 readable_regcache.
9742 * ia64-tdep.c (ia64_read_pc): Likewise.
9743 * mips-tdep.c (mips_read_pc): Likewise.
9744 * spu-tdep.c (spu_read_pc): Likewise.
9745
9746 2018-02-21 Yao Qi <yao.qi@linaro.org>
9747
9748 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9749 * regcache-dump.c: New file.
9750 * regcache.c: Move register_dump to regcache-dump.c.
9751 (maintenance_print_registers): Likewise.
9752 (maintenance_print_raw_registers): Likewise.
9753 (maintenance_print_cooked_registers): Likewise.
9754 (maintenance_print_register_groups): Likewise.
9755 (maintenance_print_remote_registers): Likewise.
9756 (_initialize_regcache): Likewise.
9757 * regcache.h (register_dump): Moved from regcache.c.
9758
9759 2018-02-21 Yao Qi <yao.qi@linaro.org>
9760
9761 * regcache.c (regcache::regcache): Update.
9762 (regcache::invalidate): Move it to detached_regcache::invalidate.
9763 (get_thread_arch_aspace_regcache): Update.
9764 (regcache::raw_update): Update.
9765 (regcache::cooked_read): Remove some code.
9766 (regcache::cooked_read_value): Likewise.
9767 (regcache::raw_write): Remove assert on m_readonly_p.
9768 (regcache::raw_supply_integer): Move it to
9769 detached_regcache::raw_supply_integer.
9770 (regcache::raw_supply_zeroed): Likewise.
9771 * regcache.h (detached_regcache) <raw_supply_integer>: New
9772 declaration.
9773 <raw_supply_zeroed, invalidate>: Likewise.
9774 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9775 <invalidate>: Likewise.
9776 <m_readonly_p>: Removed.
9777
9778 2018-02-21 Yao Qi <yao.qi@linaro.org>
9779
9780 * infcmd.c (get_return_value): Let stop_regs point to
9781 get_current_regcache.
9782 * regcache.c (regcache::regcache): Remove.
9783 (register_dump_reg_buffer): New class.
9784 (regcache_print): Adjust.
9785 * regcache.h (regcache): Remove constructors.
9786
9787 2018-02-21 Yao Qi <yao.qi@linaro.org>
9788
9789 * regcache.c (class register_dump): New class.
9790 (register_dump_regcache, register_dump_none): New class.
9791 (register_dump_remote, register_dump_groups): New class.
9792 (regcache_print): Update.
9793 * regcache.h (regcache_dump_what): Move it to regcache.c.
9794 (regcache) <dump>: Remove.
9795
9796 2018-02-21 Yao Qi <yao.qi@linaro.org>
9797
9798 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9799 reg_buffer_rw *.
9800 (jit_unwind_reg_set_impl): Call raw_supply.
9801 (jit_frame_sniffer): Use reg_buffer_rw.
9802 * record-full.c (record_full_core_regbuf): Change its type.
9803 (record_full_core_open_1): Use reg_buffer_rw.
9804 (record_full_close): Likewise.
9805 (record_full_core_fetch_registers): Use regcache->raw_supply.
9806 (record_full_core_store_registers): Likewise.
9807 * regcache.c (regcache::get_register_status): Move it to
9808 reg_buffer.
9809 (regcache_raw_set_cached_value): Remove.
9810 (regcache::raw_set_cached_value): Remove.
9811 (regcache::raw_write): Call raw_supply.
9812 (regcache::raw_supply): Move it to reg_buffer_rw.
9813 * regcache.h (regcache_raw_set_cached_value): Remove.
9814 (reg_buffer_rw): New class.
9815
9816 2018-02-21 Yao Qi <yao.qi@linaro.org>
9817
9818 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9819 readonly_detached_regcache.
9820 (dummy_frame_prev_register): Use regcache->cooked_read.
9821 * frame.c (frame_save_as_regcache): Change return type.
9822 (frame_pop): Update.
9823 * frame.h (frame_save_as_regcache): Update declaration.
9824 * inferior.h (get_infcall_suspend_state_regcache): Update
9825 declaration.
9826 * infrun.c (infcall_suspend_state) <registers>: use
9827 readonly_detached_regcache.
9828 (save_infcall_suspend_state): Don't use regcache_dup.
9829 (get_infcall_suspend_state_regcache): Change return type.
9830 * linux-fork.c (struct fork_info) <savedregs>: Change to
9831 readonly_detached_regcache.
9832 <pc>: New field.
9833 (fork_save_infrun_state): Don't use regcache_dup.
9834 (info_checkpoints_command): Adjust.
9835 * mi/mi-main.c (register_changed_p): Update declaration.
9836 (mi_cmd_data_list_changed_registers): Use
9837 readonly_detached_regcache.
9838 (register_changed_p): Change parameter type to
9839 readonly_detached_regcache.
9840 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9841 readonly_detached_regcache.
9842 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9843 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9844 New.
9845 (regcache::save): Move it to reg_buffer.
9846 (regcache::restore): Change parameter type.
9847 (regcache_dup): Remove.
9848 * regcache.h (reg_buffer) <save>: New method.
9849 (readonly_detached_regcache): New class.
9850 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9851 readonly_detached_regcache.
9852 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9853
9854 2018-02-21 Yao Qi <yao.qi@linaro.org>
9855
9856 * frame.c (frame_save_as_regcache): Use regcache method save.
9857 (frame_pop): Use regcache method restore.
9858 * infrun.c (restore_infcall_suspend_state): Likewise.
9859 * linux-fork.c (fork_load_infrun_state): Likewise.
9860 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9861 save.
9862 * regcache.c (regcache_save): Remove.
9863 (regcache::restore): More asserts.
9864 (regcache_cpy): Remove.
9865 * regcache.h (regcache_save): Remove the declaration.
9866 (regcache::restore): Move from private to public.
9867 Remove the friend declaration of regcache_cpy.
9868 (regcache_cpy): Remove declaration.
9869
9870 2018-02-21 Yao Qi <yao.qi@linaro.org>
9871
9872 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9873 parameter type to 'readable_regcache *'.
9874 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9875 * arm-tdep.c (arm_neon_quad_read): Likewise.
9876 (arm_pseudo_read): Likewise.
9877 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9878 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9879 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9880 * gdbarch.c: Re-generated.
9881 * gdbarch.h: Re-generated.
9882 * gdbarch.sh (pseudo_register_read): Change parameter type to
9883 'readable_regcache *'.
9884 (pseudo_register_read_value): Likewise.
9885 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9886 (h8300_pseudo_register_read): Likewise.
9887 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9888 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9889 (i386_pseudo_register_read_into_value): Likewise.
9890 (i386_pseudo_register_read_value): Likewise.
9891 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9892 declaration.
9893 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9894 * m32c-tdep.c (m32c_raw_read): Likewise.
9895 (m32c_read_flg): Likewise.
9896 (m32c_banked_register): Likewise.
9897 (m32c_banked_read): Likewise.
9898 (m32c_sb_read): Likewise.
9899 (m32c_part_read): Likewise.
9900 (m32c_cat_read): Likewise.
9901 (m32c_r3r2r1r0_read): Likewise.
9902 (m32c_pseudo_register_read): Likewise.
9903 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9904 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9905 (mep_pseudo_cr64_read): Likewise.
9906 (mep_pseudo_register_read): Likewise.
9907 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9908 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9909 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9910 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9911 (regcache::cooked_read): Likewise.
9912 (regcache::cooked_read_value): Likewise.
9913 (regcache_cooked_read_signed):
9914 (regcache::cooked_read): Likewise.
9915 * regcache.h (readable_regcache): New class.
9916 (regcache): Inherit readable_regcache. Move some methods to
9917 readable_regcache.
9918 * rl78-tdep.c (rl78_pseudo_register_read): Change
9919 parameter type to 'readable_regcache *'.
9920 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9921 (e500_pseudo_register_read): Change parameter type to
9922 'readable_regcache *'.
9923 (dfp_pseudo_register_read): Likewise.
9924 (vsx_pseudo_register_read): Likewise.
9925 (efpr_pseudo_register_read): Likewise.
9926 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9927 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9928 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9929 (sh64_pseudo_register_read): Likewise.
9930 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9931 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9932 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9933 (spu_pseudo_register_read): Likewise.
9934 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9935 (xtensa_pseudo_register_read): Likewise.
9936
9937 2018-02-21 Yao Qi <yao.qi@linaro.org>
9938
9939 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9940 (regcache::arch): Move it to reg_buffer::arch.
9941 (regcache::register_buffer): Likewise.
9942 (regcache::assert_regnum): Likewise.
9943 (regcache::num_raw_registers): Likewise.
9944 * regcache.h (reg_buffer): New class.
9945 (regcache): Inherit reg_buffer.
9946
9947 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9948
9949 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9950 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9951
9952 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9953
9954 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9955
9956 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9957
9958 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9959 (SFILES): Remove common/*.c files.
9960 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9961 * common/common.host: Add common reference.
9962 * configure.ac: Likewise.
9963 * configure: Regenerate.
9964
9965 2018-02-16 Yao Qi <yao.qi@linaro.org>
9966
9967 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9968 (block_initialize_namespace): Use new.
9969 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9970 (dwarf2_free_objfile): Use delete.
9971 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9972 (copy_type_recursive): Use new.
9973 * gdb_obstack.h (allocate_on_obstack): New.
9974
9975 2018-02-15 Yao Qi <yao.qi@linaro.org>
9976
9977 PR gdb/22849
9978 * inferior.c (exit_inferior_1): Reset inf->control.
9979
9980 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9981
9982 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9983 declaration.
9984
9985 2018-02-14 Pedro Alves <palves@redhat.com>
9986
9987 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9988 frame_cleanup_after_sniffer on exception.
9989
9990 2018-02-14 Tom Tromey <tom@tromey.com>
9991
9992 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9993 const.
9994 (solib_bfd_open): Make pathname const.
9995 * solib.c (solib_bfd_open): Make pathname const.
9996 * solib-spu.c (spu_bfd_fopen): Make name const.
9997 (spu_bfd_open): Make pathname const.
9998 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9999 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10000
10001 2018-02-14 Tom Tromey <tom@tromey.com>
10002
10003 * symfile.c (symfile_bfd_open): Update.
10004 * source.h (openp, source_full_path_of, find_and_open_source):
10005 Change argument type to unique_xmalloc_ptr.
10006 * source.c (openp): Take a unique_xmalloc_ptr.
10007 (source_full_path_of, find_and_open_source): Likewise.
10008 (open_source_file, symtab_to_fullname): Update.
10009 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10010 unique_xmalloc_ptr.
10011 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10012 (exec_file_find): Update.
10013 * psymtab.c (psymtab_to_fullname): Update.
10014 * nto-tdep.h (nto_find_and_open_solib): Update.
10015 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10016 unique_xmalloc_ptr.
10017 * exec.c (exec_file_attach): Update.
10018 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10019 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10020
10021 2018-02-14 Tom Tromey <tom@tromey.com>
10022
10023 * solib.c: Include source.h.
10024 * nto-tdep.c: Include source.h.
10025 * mi/mi-cmd-env.c: Include source.h.
10026 * infcmd.c: Include source.h.
10027 * exec.c: Include source.h.
10028 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10029 (add_path, directory_switch, source_path, init_source_path): Move
10030 declarations...
10031 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10032 (add_path, directory_switch, source_path, init_source_path):
10033 ...here.
10034
10035 2018-02-14 Tom Tromey <tom@tromey.com>
10036
10037 * solist.h (exec_file_find, solib_find): Return
10038 unique_xmalloc_ptr.
10039 (solib_bfd_fopen): Take a const char *.
10040 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10041 (exec_file_find, solib_find): Likewise.
10042 (solib_bfd_fopen): Do not take ownership of "pathname".
10043 (solib_bfd_open): Use unique_xmalloc_ptr.
10044 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10045 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10046 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10047 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10048
10049 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10050
10051 * ada-lang.c (name_match_type_from_name): Remove reference to
10052 ada_name_for_lookup in function's documentation.
10053 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10054
10055 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10056
10057 * defs.h (enum openp_flags): New enum.
10058 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10059 Move to enum openp_flags.
10060 (openp_flags): New enum flags.
10061 (openp): Change parameter type to openp_flags.
10062 * source.c (openp): Change parameter type to openp_flags.
10063 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10064 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10065
10066 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10067
10068 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10069 per-command.
10070
10071 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10072
10073 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10074 into...
10075 (class dwarf2_queue_guard): ...the destructor of this new class.
10076 (dw2_do_instantiate_symtab): Create instance of the new class
10077 dwarf2_queue_guard, remove cleanup.
10078
10079 2018-02-09 Tom Tromey <tom@tromey.com>
10080
10081 * source.c (find_source_lines): Don't reference past the end of
10082 the vector.
10083
10084 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10085
10086 * remote.c (remote_btrace_maybe_reopen): Change error message.
10087 * btrace.c (btrace_enable): Likewise.
10088 (parse_xml_btrace): Likewise.
10089 (parse_xml_btrace_conf): Likewise.
10090
10091 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10092
10093 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10094 (linux_enable_pt, linux_enable_bts): Call
10095 diagnose_perf_event_open_fail.
10096
10097 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10098
10099 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10100 Remove parameter and change return type. Update callers. Move it.
10101 (linux_enable_bts, linux_enable_pt): Improve error message.
10102 (linux_enable_pt): Remove zero buffer size check.
10103 (linux_enable_btrace): Improve error messages. Remove NULL return
10104 check.
10105
10106 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10107
10108 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10109 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10110 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10111 (linux_supports_pt, linux_supports_btrace): Remove.
10112 (linux_enable_bts): Call cpu_supports_bts.
10113 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10114 * remote.c (remote_supports_btrace): Remove.
10115 (init_remote_ops): Remove remote_supports_btrace.
10116 * target-delegates.c: Regenerated.
10117 * target.c (target_supports_btrace): Remove.
10118 * target.h (target_ops) <to_supports_btrace>: Remove
10119 (target_supports_btrace): Remove.
10120 * x86-linux-nat.c (x86_linux_create_target): Remove
10121 linux_supports_btrace.
10122
10123 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10124
10125 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10126 btrace failed.
10127 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10128 exception and use message in own exception.
10129
10130 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10131
10132 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10133 (perf_event_pt_event_type): Use gdb_file_up.
10134 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10135 scoped_fd, and scoped_mmap.
10136
10137 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10138
10139 * common/scoped_mmap.h: New.
10140 * unittests/scoped_mmap-selftest.c: New.
10141 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10142 unittests/scoped_mmap-selftest.c.
10143
10144 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10145
10146 * common/scoped_fd.h: New.
10147 * unittests/scoped_fd-selftest.c: New.
10148 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10149 unittests/scoped_fd-selftest.c.
10150
10151 2018-02-09 Tom Tromey <tom@tromey.com>
10152
10153 * auto-load.c (auto_load_section_scripts): Use
10154 gdb::unique_xmalloc_ptr.
10155
10156 2018-02-09 Tom Tromey <tom@tromey.com>
10157
10158 * auto-load.c (execute_script_contents): Use std::string.
10159
10160 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10161
10162 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10163 Python function, rather than a new command.
10164
10165 2018-02-08 Tom Tromey <tom@tromey.com>
10166
10167 * solib.c (solib_find_1): Use std::string.
10168 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10169
10170 2018-02-08 Tom Tromey <tom@tromey.com>
10171
10172 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10173
10174 2018-02-08 Tom Tromey <tom@tromey.com>
10175
10176 * source.c (find_source_lines): Use gdb::def_vector.
10177
10178 2018-02-08 Tom Tromey <tom@tromey.com>
10179
10180 * macrocmd.c (struct temporary_macro_definition): New.
10181 (macro_define_command): Use temporary_macro_definition. Remove
10182 cleanups.
10183 (free_macro_definition_ptr): Remove.
10184
10185 2018-02-08 Tom Tromey <tom@tromey.com>
10186
10187 * macroexp.c (maybe_expand): Use std::string.
10188
10189 2018-02-08 Tom Tromey <tom@tromey.com>
10190
10191 * macroexp.c (struct macro_buffer): Add initializers for some
10192 members.
10193 (init_buffer, init_shared_buffer, free_buffer)
10194 (free_buffer_return_text): Remove.
10195 (macro_buffer): New constructors.
10196 (~macro_buffer): New destructor.
10197 (macro_buffer::set_shared): New method.
10198 (macro_buffer::resize_buffer, macro_buffer::appendc)
10199 (macro_buffer::appendmem): Now methods, not free functions.
10200 (set_token, append_tokens_without_splicing, stringify)
10201 (macro_stringify): Update.
10202 (gather_arguments): Change return type. Remove argc_p argument,
10203 add args_ptr argument. Use std::vector.
10204 (substitute_args): Remove argc argument. Accept std::vector.
10205 (expand): Update. Use std::vector.
10206 (scan, macro_expand, macro_expand_next): Update.
10207
10208 2018-02-08 Tom Tromey <tom@tromey.com>
10209
10210 * symtab.c (default_collect_symbol_completion_matches_break_on):
10211 Use unique_xmalloc_ptr.
10212 * macroscope.h: (sal_macro_scope, user_macro_scope)
10213 (default_macro_scope): Return unique_xmalloc_ptr.
10214 * macroscope.c (sal_macro_scope, user_macro_scope)
10215 (default_macro_scope): Return unique_xmalloc_ptr.
10216 * macroexp.h (macro_expand, macro_expand_once): Return
10217 unique_xmalloc_ptr.
10218 * macroexp.c (macro_expand, macro_expand_once): Return
10219 unique_xmalloc_ptr.
10220 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10221 (info_macro_command, info_macros_command): Use
10222 unique_xmalloc_ptr.
10223 * compile/compile-c-support.c (write_macro_definitions): Use
10224 unique_xmalloc_ptr.
10225 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10226
10227 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10228
10229 * value.c (value_static_field): Assign field type instead of
10230 containing type when returning an optimized out value.
10231
10232 2018-02-06 Yao Qi <yao.qi@linaro.org>
10233
10234 * ft32-tdep.c (ft32_read_pc): Remove.
10235 (ft32_write_pc): Remove.
10236 (ft32_gdbarch_init): Update.
10237 * m32r-tdep.c (m32r_read_pc): Remove.
10238 (m32r_gdbarch_init): Update.
10239 * mep-tdep.c (mep_read_pc): Remove.
10240 (mep_gdbarch_init): Update.
10241 * microblaze-tdep.c (microblaze_write_pc): Remove.
10242 (microblaze_gdbarch_init): Update.
10243 * mn10300-tdep.c (mn10300_read_pc): Remove.
10244 (mn10300_write_pc): Remove.
10245 (mn10300_gdbarch_init): Update.
10246 * moxie-tdep.c (moxie_read_pc): Remove.
10247 (moxie_write_pc): Remove.
10248 (moxie_gdbarch_init): Update.
10249
10250 2018-02-06 Yao Qi <yao.qi@linaro.org>
10251
10252 * expprint.c (print_subexp_standard): Handle
10253 OP_F77_UNDETERMINED_ARGLIST.
10254 (dump_subexp_body_standard): Likewise.
10255
10256 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10257
10258 * target-descriptions.c (tdesc_element_visitor) Add empty
10259 implementations.
10260 (tdesc_type): Move make_gdb_type from here.
10261 (tdesc_type_builtin): Likewise.
10262 (tdesc_type_vector): Likewise.
10263 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10264 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10265 (make_gdb_type_union): Likewise.
10266 (make_gdb_type_flags): Likewise.
10267 (make_gdb_type_enum): Likewise.
10268 (make_gdb_type): New function.
10269 (tdesc_register_type): Use static make_gdb_type.
10270
10271 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10272
10273 * infcmd.c (default_print_one_register_info): Align natural-format
10274 column values consistently one under another.
10275 (pad_to_column): New function.
10276
10277 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10278
10279 * dwarf2read.c (dwarf2_physname): Move commment.
10280
10281 2018-02-01 Leszek Swirski <leszeks@google.com>
10282
10283 * varobj.c (varobj_formatted_print_options): Allow recursive
10284 pretty printing if pretty printing is enabled.
10285
10286 2018-02-01 Leszek Swirski <leszeks@google.com>
10287
10288 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10289 names after a structop as a filename.
10290
10291 2018-02-01 Yao Qi <yao.qi@linaro.org>
10292
10293 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10294 (arm_record_coproc_data_proc): Likewise.
10295
10296 2018-02-01 Yao Qi <yao.qi@linaro.org>
10297
10298 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10299
10300 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10301
10302 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10303 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10304
10305 2018-01-31 Pedro Alves <palves@redhat.com>
10306
10307 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10308 * inflow.c (child_terminal_save_inferior): Wrap reference to
10309 tcgetpgrp in HAVE_TERMIOS_H.
10310 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10311 _WIN32.
10312 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10313 always iterate over all inferiors.
10314 (gdbsim_cntrl_c): Adjust.
10315 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10316
10317 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10318
10319 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10320 index type is objfile-owned if the element type is as well.
10321
10322 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10323
10324 GDB 8.1 released.
10325
10326 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10327
10328 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10329 "features/s390x-linux64.c".
10330 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10331 s390_linux32 and s390x_linux64.
10332 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10333 default tdesc.
10334 * s390-tdep.c: Include "features/s390-linux32.c" and
10335 "features/s390x-linux64.c".
10336 (s390_tdesc_valid): Add check for tdesc_has_registers.
10337 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10338 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10339 tdesc_s390x_linux64.
10340 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10341 tdesc_s390x_linux64 to...
10342 * s390-tdep.h: ...here.
10343
10344 2018-01-30 Pedro Alves <palves@redhat.com>
10345
10346 PR gdb/13211
10347 * config.in, configure: Regenerate.
10348 * configure.ac: Check for getpgid.
10349 * go32-nat.c (go32_pass_ctrlc): New.
10350 (go32_target): Install it.
10351 * inf-child.c (inf_child_target): Install
10352 child_terminal_save_inferior, child_pass_ctrlc and
10353 child_interrupt.
10354 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10355 (inf_ptrace_target): No longer install it.
10356 * infcmd.c (interrupt_target_1): Adjust.
10357 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10358 (child_interrupt): Declare.
10359 (inferior::terminal_state): New.
10360 * inflow.c (struct terminal_info): Update comments.
10361 (inferior_process_group): Delete.
10362 (terminal_is_ours): Delete.
10363 (gdb_tty_state): New.
10364 (child_terminal_init): Adjust.
10365 (is_gdb_terminal, sharing_input_terminal_1)
10366 (sharing_input_terminal): New functions.
10367 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10368 Set the process's actual process group in the foreground if
10369 possible. Handle is_ours_for_output/is_ours distinction. Don't
10370 mark terminal as the inferior's if not sharing GDB's terminal.
10371 Don't check attach_flag.
10372 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10373 pass down a target_terminal_state.
10374 (child_terminal_save_inferior): New, factored out from ...
10375 (child_terminal_ours_1): ... this. Handle
10376 target_terminal_state::is_ours_for_output.
10377 (child_interrupt, child_pass_ctrlc): New.
10378 (inflow_inferior_exit): Clear the inferior's terminal_state.
10379 (copy_terminal_info): Copy the inferior's terminal state.
10380 (_initialize_inflow): Remove reference to terminal_is_ours.
10381 * inflow.h (inferior_process_group): Delete.
10382 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10383 * procfs.c (procfs_target): Don't install procfs_interrupt.
10384 (procfs_interrupt): Delete.
10385 * remote.c (remote_serial_quit_handler): Adjust.
10386 (remote_interrupt): Remove ptid parameter. Adjust.
10387 * target-delegates.c: Regenerate.
10388 * target.c: Include "terminal.h".
10389 (target_terminal::terminal_state): Rename to ...
10390 (target_terminal::m_terminal_state): ... this.
10391 (target_terminal::init): Adjust.
10392 (target_terminal::inferior): Adjust to per-inferior
10393 terminal_state.
10394 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10395 (target_terminal::ours, target_terminal::ours_for_output): Use
10396 target_terminal_is_ours_kind.
10397 (target_interrupt): Remove ptid parameter. Adjust.
10398 (default_target_pass_ctrlc): Adjust.
10399 * target.h (target_ops::to_terminal_save_inferior): New field.
10400 (target_ops::to_interrupt): Remove ptid_t parameter.
10401 (target_interrupt): Remove ptid_t parameter. Update comment.
10402 (target_pass_ctrlc): Update comment.
10403 * target/target.h (target_terminal_state): New scoped enum,
10404 factored out of ...
10405 (target_terminal::terminal_state): ... here.
10406 (target_terminal::inferior): Update comments.
10407 (target_terminal::restore_inferior): New.
10408 (target_terminal::is_inferior, target_terminal::is_ours)
10409 (target_terminal::is_ours_for_output): Adjust.
10410 (target_terminal::scoped_restore_terminal_state): Adjust to
10411 rename, and call restore_inferior() instead of inferior().
10412 (target_terminal::scoped_restore_terminal_state::m_state): Change
10413 type.
10414 (target_terminal::terminal_state): Rename to ...
10415 (target_terminal::m_terminal_state): ... this and change type.
10416
10417 2018-01-30 Pedro Alves <palves@redhat.com>
10418
10419 * linux-nat.c (wait_for_signal): New function.
10420 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10421 directly.
10422 (async_terminal_is_ours)
10423 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10424 (linux_nat_add_target): Don't override
10425 to_terminal_inferior/to_terminal_ours.
10426
10427 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10428
10429 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10430
10431 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10432
10433 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10434 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10435 dwarf2_per_objfile_free here.
10436 (dwarf2_per_objfile_free): Remove.
10437 (_initialize_dwarf2_read): Don't register
10438 dwarf2_per_objfile_free as a registry cleanup.
10439
10440 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10441
10442 Avoid compilation errors in MinGW native builds
10443
10444 The error is triggered by including python-internal.h, and the
10445 error message is:
10446
10447 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10448 from build-gnulib/import/math.h:27,
10449 from d:/usr/Python26/include/pyport.h:235,
10450 from d:/usr/Python26/include/Python.h:58,
10451 from python/python-internal.h:94,
10452 from python/py-arch.c:24:
10453 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10454 using ::hypot;
10455 ^~~~~
10456
10457 This happens because Python headers define 'hypot' to expand t
10458 '_hypot' in the Windows builds.
10459 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10460 'hypoth'. This avoids a compilation error.
10461
10462 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10463
10464 * MAINTAINERS (Write After Approval): Fix ordering.
10465
10466 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10467
10468 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10469
10470 2018-01-26 Alan Modra <amodra@gmail.com>
10471
10472 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10473 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10474 Remove nop. Make const. Comment.
10475 (powerpc32_plt_stub_so_2): New.
10476 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10477 Correct count. Update uses.
10478 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10479 Move common code reading PLT entry word. Correct
10480 powerpc32_plt_stub PLT address calculation.
10481 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10482 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10483 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10484 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10485 (ppc64_standard_linkage8): Likewise.
10486 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10487 Correct insns description.
10488 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10489
10490 2018-01-24 Pedro Alves <palves@redhat.com>
10491
10492 GCC PR libstdc++/83906
10493 * gdbtypes.c (operator==(const dynamic_prop &,
10494 const dynamic_prop &)): New.
10495 (operator==(const range_bounds &, const range_bounds &)): New.
10496 (check_types_equal): Use them instead of memcmp.
10497 * gdbtypes.h (operator==(const dynamic_prop &,
10498 const dynamic_prop &)): Declare.
10499 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10500 (operator==(const range_bounds &, const range_bounds &)): Declare.
10501 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10502
10503 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10504
10505 * s390-linux-tdep.c (s390_record_address_mask)
10506 (s390_record_calc_disp_common, s390_record_calc_disp)
10507 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10508 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10509 (s390_process_record): Move to s390-tdep.c.
10510 (s390_linux_init_abi_any): Adjust.
10511 * s390-tdep.c (s390_record_address_mask)
10512 (s390_record_calc_disp_common, s390_record_calc_disp)
10513 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10514 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10515 (s390_process_record): Moved from s390-linux-tdep.c
10516 (s390_gdbarch_init): Adjust.
10517
10518 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10519
10520 * s390-linux-nat.c (s390-tdep.h): New include.
10521 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10522 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10523 (ALLDEPFILES): Add s390-tdep.c.
10524 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10525 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10526 * s390-tdep.h: ...this. New file.
10527 * s390-linux-tdep.c (s390-tdep.h): New include.
10528 (_initialize_s390_tdep): Rename to...
10529 (_initialize_s390_linux_tdep): ...this and adjust.
10530 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10531 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10532 s390-tdep.h.
10533 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10534 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10535 (s390_is_partial_instruction, s390_software_single_step)
10536 (is_non_branch_ril, s390_displaced_step_copy_insn)
10537 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10538 (s390_prologue_data, s390_addr, s390_store, s390_load)
10539 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10540 (s390_register_call_saved, s390_guess_tracepoint_registers)
10541 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10542 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10543 (s390_pseudo_register_name, s390_pseudo_register_type)
10544 (s390_pseudo_register_read, s390_pseudo_register_write)
10545 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10546 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10547 (s390_addr_bits_remove, s390_address_class_type_flags)
10548 (s390_address_class_type_flags_to_name)
10549 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10550 (s390_function_arg_float, s390_function_arg_vector)
10551 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10552 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10553 (s390_frame_align, s390_register_return_value, s390_return_value)
10554 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10555 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10556 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10557 (s390_trad_frame_prev_register, s390_unwind_cache)
10558 (s390_prologue_frame_unwind_cache)
10559 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10560 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10561 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10562 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10563 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10564 (s390_frame_base_address, s390_local_base_address)
10565 (s390_frame_base, s390_gcc_target_options)
10566 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10567 (s390_validate_reg_range, s390_tdesc_valid)
10568 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10569 * s390-tdep.c: ...this. New file.
10570
10571 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10572
10573 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10574 (s390_process_record, s390_gdbarch_tdep_alloc)
10575 (s390_linux_init_abi_any): Use/set new hook.
10576
10577 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10578
10579 * s390-linux-tdep.c (osabi.h): New include.
10580 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10581 (s390_linux_init_abi_any): New functions.
10582 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10583
10584 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10585
10586 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10587 tdesc_has_registers check
10588
10589 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10590
10591 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10592 (s390_validate_reg_range): New macro.
10593 (s390_gdbarch_init): Adjust.
10594
10595 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10596
10597 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10598 (s390_gdbarch_tdep_alloc): Adjust.
10599 (s390_gdbarch_init): Adjust.
10600
10601 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10602
10603 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10604 <have_tdb>: Change type to bool.
10605 (s390_gdbarch_tdep_alloc): Adjust.
10606 (s390_gdbarch_init): Adjust.
10607
10608 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10609
10610 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10611 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10612 (s390_gdbarch_tdep_alloc): New function.
10613 (s390_gdbarch_init): Allocate tdep at start and use its fields
10614 instead of separate variables.
10615
10616 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10617
10618 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10619 when looking for cached gdbarch and add comment for remaining.
10620
10621 2018-01-22 Pedro Alves <palves@redhat.com>
10622 Sergio Durigan Junior <sergiodj@redhat.com>
10623
10624 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10625 case.
10626
10627 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10628
10629 * MAINTAINERS: Update my company e-mail address.
10630
10631 2018-01-22 Yao Qi <yao.qi@linaro.org>
10632
10633 * regcache.c (cooked_write_test): New function.
10634 (_initialize_regcache): Register the test.
10635
10636 2018-01-22 Yao Qi <yao.qi@linaro.org>
10637
10638 * ia64-tdep.c (ia64_pseudo_register_read): Call
10639 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10640 * m32c-tdep.c (m32c_cat_read): Likewise.
10641 (m32c_r3r2r1r0_read): Likewise.
10642 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10643 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10644
10645 2018-01-22 Yao Qi <yao.qi@linaro.org>
10646
10647 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10648 method raw_read instead of regcache_raw_read.
10649 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10650 * arm-tdep.c (arm_neon_quad_read): Likewise.
10651 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10652 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10653 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10654 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10655 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10656 (i386_pseudo_register_read_into_value): Likewise.
10657 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10658 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10659 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10660 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10661 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10662 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10663 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10664 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10665 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10666
10667 2018-01-22 Yao Qi <yao.qi@linaro.org>
10668
10669 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10670 * configure.tgt: Remove target mt.
10671 * mt-tdep.c: Remove.
10672 * regcache.c (cooked_read_test): Remove the check for mt.
10673
10674 2018-01-22 Yao Qi <yao.qi@linaro.org>
10675
10676 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10677 instead of gdbarch_pseudo_register_read_value.
10678
10679 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10680
10681 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10682 language is Ada.
10683
10684 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10685
10686 * linespec.c (create_sals_line_offset): Remove code that preserved
10687 the symtab_and_line's line number.
10688
10689 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10690
10691 * varobj.c (varobj_create): Don't set valid_block when creating a
10692 floating varobj.
10693
10694 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10695
10696 * varobj.c (varobj_create): Remove out of date comment.
10697
10698 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10699
10700 PR mi/20395
10701 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10702 updating innermost block.
10703 * parse.c (innermost_block_tracker::update): Take extra type
10704 parameter, and check types match before updating innermost block.
10705 (write_dollar_variable): Update innermost block for registers.
10706 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10707 (innermost_block_tracker::innermost_block_tracker): Initialise
10708 m_types member.
10709 (innermost_block_tracker::reset): Take type parameter.
10710 (innermost_block_tracker::update): Take type parameter, and pass
10711 type through as needed.
10712 (innermost_block_tracker::m_types): New member.
10713 * varobj.c (varobj_create): Pass type when reseting innermost
10714 block.
10715
10716 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10717
10718 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10719 * ada-lang.c (resolve_subexp): Likewise.
10720 * breakpoint.c (set_breakpoint_condition) Likewise.
10721 (watch_command_1) Likewise.
10722 * c-exp.y (variable): Likewise.
10723 * d-exp.y (PrimaryExpression): Likewise.
10724 * f-exp.y (variable): Likewise.
10725 * go-exp.y (variable): Likewise.
10726 * m2-exp.y (variable): Likewise.
10727 * objfiles.c (objfile::~objfile): Likewise.
10728 * p-exp.y (variable): Likewise.
10729 * parse.c (innermost_block): Change type.
10730 * parser-defs.h (class innermost_block_tracker): New.
10731 (innermost_block): Change to innermost_block_tracker.
10732 * printcmd.c (display_command): Switch to innermost_block API.
10733 (do_one_display): Likewise.
10734 * rust-exp.y (do_one_display): Likewise.
10735 * symfile.c (clear_symtab_users): Likewise.
10736 * varobj.c (varobj_create): Switch to innermost_block API, replace
10737 use of innermost_block with block stored on varobj object.
10738
10739 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10740
10741 * expression.h (innermost_block): Remove declaration.
10742 * varobj.c: Add 'parser-defs.h' include.
10743
10744 2018-01-19 Tom Tromey <tom@tromey.com>
10745
10746 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10747 symbols in the static and global blocks.
10748
10749 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10750
10751 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10752 gdb_ptrace.h, and move including gdb_wait.h ...
10753 * nat/linux-ptrace.h: ... to here.
10754
10755 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10756
10757 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10758 inf_ptrace_detach_success.
10759 (inf_ptrace_detach_success): Add inferior parameter, use it
10760 instead of inferior_ptid, pass it to detach_inferior.
10761 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10762 parameter.
10763 * inferior.c (detach_inferior): Add overload that takes an
10764 inferior object.
10765 * inferior.h (detach_inferior): Likewise.
10766 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10767 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10768 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10769
10770 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10771
10772 * target.h (struct target_ops) <to_detach>: Add inferior
10773 parameter.
10774 (target_detach): Likewise.
10775 * target.c (dispose_inferior): Pass inferior down.
10776 (target_detach): Pass inferior down. Assert that it is equal to
10777 the current inferior.
10778 * aix-thread.c (aix_thread_detach): Pass inferior down.
10779 * corefile.c (core_file_command): Pass current_inferior() down.
10780 * corelow.c (core_detach): Add inferior parameter.
10781 * darwin-nat.c (darwin_detach): Likewise.
10782 * gnu-nat.c (gnu_detach): Likewise.
10783 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10784 * infcmd.c (detach_command): Pass current_inferior() down to
10785 target_detach.
10786 * infrun.c (follow_fork_inferior): Pass parent_inf to
10787 target_detach.
10788 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10789 target_detach.
10790 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10791 * linux-thread-db.c (thread_db_detach): Likewise.
10792 * nto-procfs.c (procfs_detach): Likewise.
10793 * procfs.c (procfs_detach): Likewise.
10794 * record.c (record_detach): Likewise.
10795 * record.h (struct inferior): Forward-declare.
10796 (record_detach): Add inferior parameter.
10797 * remote-sim.c (gdbsim_detach): Likewise.
10798 * remote.c (remote_detach_1): Likewise.
10799 (remote_detach): Likewise.
10800 (extended_remote_detach): Likewise.
10801 * sol-thread.c (sol_thread_detach): Likewise.
10802 * target-debug.h (target_debug_print_inferior_p): New macro.
10803 * target-delegates.c: Re-generate.
10804 * top.c (kill_or_detach): Pass inferior down to target_detach.
10805 * windows-nat.c (windows_detach): Add inferior parameter.
10806
10807 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10808
10809 * target.h (struct target_ops) <to_detach>: Remove args
10810 parameter.
10811 (target_detach): Likewise.
10812 * target.c (dispose_inferior): Adjust.
10813 (target_detach): Remove args parameter, adjust.
10814 * aix-thread.c (aix_thread_detach): Adjust.
10815 * corefile.c (core_file_command): Adjust.
10816 * corelow.c (core_detach): Adjust.
10817 * darwin-nat.c (darwin_detach): Adjust.
10818 * gnu-nat.c (gnu_detach): Adjust.
10819 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10820 * infcmd.c (detach_command): Adjust
10821 * infrun.c (follow_fork_inferior): Adjust.
10822 (handle_vfork_child_exec_or_exit): Adjust.
10823 * linux-fork.c (linux_fork_detach): Remove args parameter.
10824 * linux-fork.h (linux_fork_detach): Likewise.
10825 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10826 * linux-thread-db.c (thread_db_detach): Likewise.
10827 * nto-procfs.c (procfs_detach): Likewise.
10828 * procfs.c (procfs_detach): Likewise.
10829 (do_detach): Remove signo parameter.
10830 * record.c (record_detach): Remove args parameter.
10831 * record.h (record_detach): Likewise.
10832 * remote-sim.c (gdbsim_detach): Likewise.
10833 * remote.c (remote_detach_1): Likewise.
10834 (remote_detach): Likewise.
10835 (extended_remote_detach): Likewise.
10836 * sol-thread.c (sol_thread_detach): Likewise.
10837 * target-delegates.c: Re-generate.
10838 * top.c (struct qt_args) <args>: Remove field.
10839 (kill_or_detach): Don't pass args.
10840 (quit_force): Don't set args.
10841 * windows-nat.c (windows_detach): Remove args parameter.
10842
10843 2018-01-19 Yao Qi <yao.qi@linaro.org>
10844
10845 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10846 (arm_linux_init_abi): Install it.
10847
10848 2018-01-19 Yao Qi <yao.qi@linaro.org>
10849
10850 * osabi.c (gdb_osabi_names): Extend the regexp for
10851 arm-linux-gnueabihf.
10852
10853 2018-01-18 Yao Qi <yao.qi@linaro.org>
10854
10855 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10856 m_abbrevs.
10857 (abbrev_table::add_abbrev): Update.
10858 (abbrev_table::lookup_abbrev): Update.
10859
10860 2018-01-18 Yao Qi <yao.qi@linaro.org>
10861
10862 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10863
10864 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10865
10866 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10867 to "std::string".
10868
10869 2018-01-17 Tom Tromey <tom@tromey.com>
10870
10871 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10872
10873 2018-01-17 Tom Tromey <tom@tromey.com>
10874
10875 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10876 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10877 (create_array_type_with_stride): Update.
10878 * dwarf2read.c (set_die_type): Update.
10879
10880 2018-01-17 Tom Tromey <tom@tromey.com>
10881
10882 * dwarf2read.c (delayed_method_info): Remove typedef.
10883 (dwarf2_cu::method_info): Now a std::vector.
10884 (add_to_method_list): Update.
10885 (free_delayed_list): Remove.
10886 (compute_delayed_physnames): Update.
10887 (process_full_comp_unit, process_full_type_unit): Clear the method
10888 list. Remove cleanups.
10889 (psymtab_include_file_name): Add name_holder parameter. Use
10890 unique_xmalloc_ptr.
10891 (dwarf_decode_lines): Update.
10892
10893 2018-01-17 Tom Tromey <tom@tromey.com>
10894 Simon Marchi <simon.marchi@ericsson.com>
10895
10896 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10897 (dwarf2_per_objfile::free_cached_comp_units)
10898 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10899 (init_cutu_and_read_dies_no_follow): Update.
10900 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10901 (dwarf2_cu::~dwarf2_cu): New.
10902 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10903 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10904
10905 2018-01-17 Tom Tromey <tom@tromey.com>
10906 Simon Marchi <simon.marchi@ericsson.com>
10907
10908 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10909 (struct die_reader_specs) <abbrev_table>: New member.
10910 (struct abbrev_table): Add constructor.
10911 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10912 <abbrev_obstack>: Now an auto_obstack.
10913 (abbrev_table_up): New typedef.
10914 (init_cu_die_reader): Add abbrev_table parameter.
10915 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10916 Add result_dwo_abbrev_table.
10917 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10918 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10919 Update.
10920 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10921 parameter.
10922 (skip_children): Update.
10923 (abbrev_table::alloc_abbrev): Rename from
10924 abbrev_table_alloc_abbrev.
10925 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10926 (abbrev_table::lookup_abbrev): Rename from
10927 abbrev_table_lookup_abbrev.
10928 (abbrev_table_read_table): Return abbrev_table_up.
10929 (abbrev_table_free, abbrev_table_free_cleanup)
10930 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10931 (load_partial_dies): Update.
10932
10933 2018-01-17 Tom Tromey <tom@tromey.com>
10934
10935 * dwarf2read.c (dwarf2_compute_name): Update comment.
10936 (read_func_scope, read_variable): Update.
10937 (new_symbol): Remove.
10938 (new_symbol_full): Rename to new_symbol.
10939
10940 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10941
10942 PR gdb/16577
10943 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10944 a warning instead of throwing an error, set section size to 0 and return
10945 NULL.
10946 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10947
10948 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10949
10950 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10951 std::string.
10952 (linux_ptrace_attach_fail_reason_string): Likewise.
10953 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10954 Likewise.
10955 (linux_ptrace_attach_fail_reason_string): Likewise.
10956 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10957
10958 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10959
10960 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10961
10962 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10963
10964 PR gdb/21559
10965 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10966 checking for fs_base/gs_base fields in struct user_regs_struct.
10967 * configure: Regenerate.
10968
10969 2018-01-17 Yao Qi <yao.qi@linaro.org>
10970
10971 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10972 function.
10973 (aarch64_linux_init_abi): Install it to gdbarch hook
10974 gcc_target_options.
10975
10976 2018-01-15 Pedro Alves <palves@redhat.com>
10977
10978 * common/signals-state-save-restore.c
10979 (save_original_signals_state): Fix typos.
10980
10981 2017-01-12 Tom Tromey <tom@tromey.com>
10982 Sergio Durigan Junior <sergiodj@redhat.com>
10983
10984 * Makefile.in (install-only): Install gdb-add-index.
10985
10986 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10987
10988 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10989
10990 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10991
10992 * infrun.c (keep_going_pass_signal): Clear step-over info when
10993 insert_breakpoints fails.
10994
10995 2018-01-11 Pedro Alves <palves@redhat.com>
10996
10997 PR gdb/22583
10998 * infrun.c (resume): Rename to ...
10999 (resume_1): ... this.
11000 (resume): Reimplement as wrapper around resume_1.
11001
11002 2018-01-11 Pedro Alves <palves@redhat.com>
11003
11004 PR remote/22597
11005 * remote.c (remote_parse_stop_reply): Default to the last-set
11006 general thread instead of to 'magic_null_ptid'.
11007
11008 2018-01-10 Pedro Alves <palves@redhat.com>
11009
11010 * language.h (language_get_symbol_name_matcher): Rename ...
11011 (get_symbol_name_matcher): ... this.
11012 * language.c (language_get_symbol_name_matcher): Ditto.
11013 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11014 callers adjusted.
11015
11016 2018-01-10 Pedro Alves <palves@redhat.com>
11017
11018 PR gdb/22670
11019 * dwarf2read.c
11020 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11021 Adjust to use language_get_symbol_name_matcher instead of
11022 language_defn::la_get_symbol_name_matcher.
11023 * language.c (language_get_symbol_name_matcher): If in Ada mode
11024 and the lookup name is a verbatim match, return Ada's matcher.
11025 * language.h (language_get_symbol_name_matcher): Adjust comment.
11026 (ada_lookup_name_info::verbatim_p):: New method.
11027
11028 2018-01-10 Pedro Alves <palves@redhat.com>
11029
11030 PR gdb/22670
11031 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11032 minsym's language is language_auto or language_cplus, pass down
11033 language_ada instead.
11034 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11035
11036 2018-01-10 Pedro Alves <palves@redhat.com>
11037
11038 PR gdb/22670
11039 * minsyms.c (linkage_name_str): New function.
11040 (iterate_over_minimal_symbols): Use it.
11041
11042 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11043
11044 * NEWS: Document that 'info proc' now works on FreeBSD.
11045
11046 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11047
11048 * configure.ac: Check for kinfo_getfile in libutil.
11049 * configure: Regenerate.
11050 * config.in: Regenerate.
11051 * fbsd-nat.c: Include "fbsd-tdep.h".
11052 (fbsd_fetch_cmdline): New.
11053 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11054 rather than calling error.
11055 (fbsd_info_proc): New.
11056 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11057 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11058 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11059
11060 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11061
11062 * fbsd-nat.c (struct free_deleter): Remove.
11063 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11064
11065 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11066
11067 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11068 NULL for an empty pathname.
11069
11070 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11071
11072 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11073 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11074 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11075 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11076 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11077 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11078 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11079 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11080 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11081 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11082 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11083 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11084 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11085 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11086 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11087
11088 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11089
11090 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11091 (gnu_xfer_auxv): New function.
11092 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11093 TARGET_OBJECT_AUXV.
11094
11095 2018-01-08 Yao Qi <yao.qi@linaro.org>
11096 Simon Marchi <simon.marchi@ericsson.com>
11097
11098 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11099 common/selftest.c.
11100 (COMMON_OBS): Remove selftest.o.
11101 * configure.ac: Append selftest-arch.c and common/selftest.c to
11102 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11103 * configure: Re-generated.
11104 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11105 GDB_SELF_TEST.
11106 (maintenance_info_selftests): Likewise.
11107
11108 2018-01-08 Xavier Roirand <roirand@adacore.com>
11109
11110 * ada-valprint.c (val_print_packed_array_elements): Use
11111 proper number of elements when printing an array indexed
11112 by an enumeration type.
11113
11114 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11115
11116 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11117 (dw2_get_file_names_reader): Adjust.
11118 (lookup_dwo_signatured_type): Adjust.
11119 (lookup_dwp_signatured_type): Adjust.
11120 (lookup_signatured_type): Adjust.
11121 (create_type_unit_group): Adjust.
11122 (get_type_unit_group): Adjust.
11123 (process_psymtab_comp_unit_reader): Adjust.
11124 (build_type_psymtabs_reader): Adjust.
11125 (scan_partial_symbols): Adjust.
11126 (add_partial_symbol): Adjust.
11127 (add_partial_subprogram): Adjust.
11128 (peek_die_abbrev): Adjust.
11129 (fixup_go_packaging): Adjust.
11130 (process_imported_unit_die): Adjust.
11131 (dwarf2_compute_name): Adjust.
11132 (dwarf2_physname): Adjust.
11133 (read_import_statement): Adjust.
11134 (handle_DW_AT_stmt_list): Adjust.
11135 (read_file_scope): Adjust.
11136 (read_func_scope): Adjust.
11137 (read_lexical_block_scope): Adjust.
11138 (read_call_site_scope): Adjust.
11139 (read_variable): Adjust.
11140 (dwarf2_rnglists_process): Adjust.
11141 (dwarf2_ranges_process): Adjust.
11142 (dwarf2_ranges_read): Adjust.
11143 (dwarf2_get_pc_bounds): Adjust.
11144 (dwarf2_record_block_ranges): Adjust.
11145 (dwarf2_add_field): Adjust.
11146 (dwarf2_add_member_fn): Adjust.
11147 (read_structure_type): Adjust.
11148 (process_structure_scope): Adjust.
11149 (read_enumeration_type): Adjust.
11150 (read_array_type): Adjust.
11151 (mark_common_block_symbol_computed): Adjust.
11152 (read_common_block): Adjust.
11153 (read_namespace_type): Adjust.
11154 (read_namespace): Adjust.
11155 (read_module_type): Adjust.
11156 (read_tag_pointer_type): Adjust.
11157 (read_tag_ptr_to_member_type): Adjust.
11158 (read_tag_string_type): Adjust.
11159 (read_subroutine_type): Adjust.
11160 (read_typedef): Adjust.
11161 (read_base_type): Adjust.
11162 (attr_to_dynamic_prop): Adjust.
11163 (read_subrange_type): Adjust.
11164 (read_unspecified_type): Adjust.
11165 (dwarf2_read_abbrevs): Adjust.
11166 (load_partial_dies): Adjust.
11167 (read_partial_die): Adjust.
11168 (find_partial_die): Adjust.
11169 (guess_partial_die_structure_name): Adjust.
11170 (fixup_partial_die): Adjust.
11171 (read_attribute_value): Adjust.
11172 (read_addr_index): Adjust.
11173 (read_addr_index_from_leb128): Adjust.
11174 (read_str_index): Adjust.
11175 (dwarf2_string_attr): Adjust.
11176 (get_debug_line_section): Adjust.
11177 (dwarf_decode_line_header): Adjust.
11178 (lnp_state_machine::check_line_address): Adjust.
11179 (dwarf_decode_lines_1): Adjust.
11180 (dwarf_decode_lines): Adjust.
11181 (dwarf2_start_symtab): Adjust.
11182 (var_decode_location): Adjust.
11183 (new_symbol_full): Adjust.
11184 (dwarf2_const_value_data): Adjust.
11185 (dwarf2_const_value_attr): Adjust.
11186 (dwarf2_const_value): Adjust.
11187 (die_type): Adjust.
11188 (die_containing_type): Adjust.
11189 (build_error_marker_type): Adjust.
11190 (lookup_die_type): Adjust.
11191 (guess_full_die_structure_name): Adjust.
11192 (anonymous_struct_prefix): Adjust.
11193 (determine_prefix): Adjust.
11194 (dwarf2_name): Adjust.
11195 (follow_die_ref_or_sig): Adjust.
11196 (follow_die_offset): Adjust.
11197 (follow_die_ref): Adjust.
11198 (follow_die_sig_1): Adjust.
11199 (follow_die_sig): Adjust.
11200 (get_signatured_type): Adjust.
11201 (get_DW_AT_signature_type): Adjust.
11202 (decode_locdesc): Adjust.
11203 (dwarf_decode_macros): Adjust.
11204 (cu_debug_loc_section): Adjust.
11205 (fill_in_loclist_baton): Adjust.
11206 (dwarf2_symbol_mark_computed): Adjust.
11207 (init_one_comp_unit): Don't assign
11208 dwarf2_cu::dwarf2_per_objfile.
11209 (set_die_type): Adjust.
11210
11211 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11212
11213 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11214 <dwarf2_per_objfile>: New field.
11215 (dwarf2_per_objfile): Remove global.
11216 (get_dwarf2_per_objfile): New function.
11217 (set_dwarf2_per_objfile): New function.
11218 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11219 dwarf2_per_objfile.
11220 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11221 (read_abbrev_offset): Likewise.
11222 (read_indirect_string): Likewise.
11223 (read_indirect_line_string): Likewise.
11224 (read_indirect_string_at_offset): Likewise.
11225 (read_indirect_string_from_dwz): Likewise.
11226 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11227 dwarf2_per_objfile.
11228 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11229 (create_all_comp_units): Change objfile parameter to
11230 dwarf2_per_objfile.
11231 (create_all_type_units): Likewise.
11232 (process_queue): Add dwarf2_per_objfile parameter.
11233 (read_and_check_comp_unit_head): Likewise.
11234 (lookup_dwo_unit_in_dwp): Likewise.
11235 (get_dwp_file): Likewise.
11236 (process_cu_includes): Likewise.
11237 (struct free_dwo_file_cleanup_data): New struct.
11238 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11239 set_dwarf2_per_objfile.
11240 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11241 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11242 context, adjust calls.
11243 (dw2_instantiate_symtab): Likewise.
11244 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11245 (dw2_get_cu): Likewise.
11246 (create_cu_from_index_list): Change objfile parameter to
11247 dwarf2_per_objfile.
11248 (create_cus_from_index_list): Get dwarf2_per_objfile from
11249 context, adjust calls.
11250 (create_cus_from_index): Likewise.
11251 (create_signatured_type_table_from_index): Change objfile
11252 parameter to dwarf2_per_objfile.
11253 (create_signatured_type_table_from_debug_names): Change objfile
11254 parameter to dwarf2_per_objfile.
11255 (create_addrmap_from_index): Likewise.
11256 (create_addrmap_from_aranges): Likewise.
11257 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11258 (dw2_setup): Remove.
11259 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11260 context.
11261 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11262 get_dwarf2_per_objfile.
11263 (dw2_forget_cached_source_info): Likewise.
11264 (dw2_map_symtabs_matching_filename): Likewise.
11265 (struct dw2_symtab_iterator) <index>: Remove.
11266 <dwarf2_per_objfile>: New field.
11267 (dw2_symtab_iter_init): Replace index parameter with
11268 dwarf2_per_objfile.
11269 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11270 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11271 (dw2_print_stats): Likewise.
11272 (dw2_dump): Likewise.
11273 (dw2_expand_symtabs_for_function): Likewise.
11274 (dw2_expand_all_symtabs): Likewise.
11275 (dw2_expand_symtabs_with_fullname): Likewise.
11276 (dw2_expand_marked_cus): Replace index and objfile parameters
11277 with dwarf2_per_objfile.
11278 (dw_expand_symtabs_matching_file_matcher): Add
11279 dwarf2_per_objfile parameter and adjust calls.
11280 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11281 adjust calls.
11282 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11283 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11284 adjust calls.
11285 (create_cus_from_debug_names_list): Replace objfile parameter
11286 with dwarf2_per_objfile and adjust calls.
11287 (create_cus_from_debug_names): Likewise.
11288 (dwarf2_read_debug_names): Likewise.
11289 (mapped_debug_names::namei_to_name): Adjust call.
11290 (dw2_debug_names_iterator::next): Likewise.
11291 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11292 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11293 (dw2_debug_names_dump): Likewise.
11294 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11295 (dw2_debug_names_expand_symtabs_matching): Likewise.
11296 (dwarf2_initialize_objfile): Likewise.
11297 (dwarf2_build_psymtabs): Likewise.
11298 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11299 this_cu.
11300 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11301 (read_and_check_comp_unit_head): Likewise.
11302 (read_abbrev_offset): Likewise.
11303 (create_debug_type_hash_table): Likewise.
11304 (create_debug_types_hash_table): Likewise.
11305 (create_all_type_units): Replace objfile parameter with
11306 dwarf2_per_objfile.
11307 (add_type_unit): Add dwarf2_per_objfile parameter.
11308 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11309 with dwarf2_per_objfile.
11310 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11311 (lookup_dwp_signatured_type): Likewise.
11312 (lookup_signatured_type): Likewise.
11313 (read_cutu_die_from_dwo): Likewise.
11314 (init_tu_and_read_dwo_dies): Likewise.
11315 (init_cutu_and_read_dies): Likewise.
11316 (init_cutu_and_read_dies_no_follow): Likewise.
11317 (allocate_type_unit_groups_table): Add objfile parameter.
11318 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11319 (get_type_unit_group): Likewise.
11320 (process_psymtab_comp_unit): Update call.
11321 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11322 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11323 (print_tu_stats): Likewise.
11324 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11325 in void* parameter.
11326 (build_type_psymtabs): Change objfile parameter to
11327 dwarf2_per_objfile.
11328 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11329 passed in void* parameter.
11330 (process_skeletonless_type_units): Change objfile parameter to
11331 dwarf2_per_objfile.
11332 (set_partial_user): Likewise.
11333 (dwarf2_build_psymtabs_hard): Likewise.
11334 (read_comp_units_from_section): Likewise.
11335 (create_all_comp_units): Likewise.
11336 (scan_partial_symbols): Update calls.
11337 (add_partial_symbol): Likewise.
11338 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11339 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11340 (process_queue): Add dwarf2_per_objfile parameter.
11341 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11342 (compute_compunit_symtab_includes): Likewise.
11343 (process_cu_includes): Add dwarf2_per_objfile parameter.
11344 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11345 (process_full_type_unit): Likewise.
11346 (process_imported_unit_die): Update call.
11347 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11348 (read_file_scope): Likewise.
11349 (allocate_dwo_file_hash_table): Add objfile parameter.
11350 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11351 (create_cus_hash_table): Likewise.
11352 (create_dwp_hash_table): Likewise.
11353 (create_dwo_unit_in_dwp_v1): Likewise.
11354 (create_dwp_v2_section): Likewise.
11355 (create_dwo_unit_in_dwp_v2): Likewise.
11356 (lookup_dwo_unit_in_dwp): Likewise.
11357 (try_open_dwop_file): Likewise.
11358 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11359 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11360 cleanup to include a reference to dwarf2_per_objfile.
11361 (open_dwp_file): Add dwarf2_per_objfile parameter.
11362 (open_and_init_dwp_file): Likewise.
11363 (get_dwp_file): Likewise.
11364 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11365 (queue_and_load_all_dwo_tus): Update call.
11366 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11367 data.
11368 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11369 (dwarf2_ranges_process): Likewise.
11370 (dwarf2_get_pc_bounds): Likewise.
11371 (mark_common_block_symbol_computed): Likewise.
11372 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11373 (dwarf2_read_abbrevs): Update call.
11374 (read_partial_die): Use dwarf2_per_objfile from cu.
11375 (find_partial_die): Likewise.
11376 (fixup_partial_die): Likewise.
11377 (read_attribute_value): Likewise.
11378 (read_indirect_string_at_offset_from): Add objfile parameter.
11379 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11380 parameter.
11381 (read_indirect_string_from_dwz): Add objfile parameter.
11382 (read_indirect_string): Add objfile parameter.
11383 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11384 (read_addr_index): Use dwarf2_per_objfile from cu.
11385 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11386 call dw2_setup.
11387 (read_str_index): Use dwarf2_per_objfile from cu.
11388 (get_debug_line_section): Likewise.
11389 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11390 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11391 (new_symbol_full): Use dwarf2_per_objfile from cu.
11392 (build_error_marker_type): Likewise.
11393 (lookup_die_type): Likewise.
11394 (determine_prefix): Likewise.
11395 (follow_die_offset): Likewise.
11396 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11397 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11398 (dwarf2_fetch_die_type_sect_off): Likewise.
11399 (dwarf2_get_die_type): Likewise.
11400 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11401 (get_signatured_type): Likewise.
11402 (get_DW_AT_signature_type): Likewise.
11403 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11404 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11405 (cu_debug_loc_section): Likewise.
11406 (fill_in_loclist_baton): Likewise.
11407 (dwarf2_symbol_mark_computed): Likewise.
11408 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11409 dwarf2_per_objfile.
11410 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11411 parameter.
11412 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11413 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11414 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11415 (set_die_type): Use dwarf2_free_objfile from cu.
11416 (get_die_type_at_offset): Likewise.
11417 (dwarf2_per_objfile_free): Don't assign global variable.
11418 (debug_names) <constructor>: Add dwarf2_per_objfile
11419 parameter, update m_debugstrlookup construction.
11420 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11421 parameter.
11422 <m_dwarf2_per_objfile>: New field.
11423 <lookup>: Use m_dwarf2_per_objfile.
11424 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11425 (psyms_seen_size): Likewise.
11426 (write_gdbindex): Replace objfile parameter with
11427 dwarf2_per_objfile.
11428 (write_debug_names): Likewise.
11429 (write_psymtabs_to_index): Likewise.
11430 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11431 calls.
11432
11433 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11434
11435 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11436 <dwarf2_per_objfile>: New field.
11437 (struct dwarf2_per_cu_data) <objfile>: Remove.
11438 <dwarf2_per_objfile>: New field.
11439 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11440 of objfile.
11441 (create_signatured_type_table_from_index): Likewise.
11442 (create_debug_type_hash_table): Likewise.
11443 (fill_in_sig_entry_from_dwo_entry): Likewise.
11444 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11445 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11446 objfile.
11447 (create_partial_symtab): Access objfile through
11448 dwarf2_per_objfile.
11449 (process_psymtab_comp_unit_reader): Likewise.
11450 (read_comp_units_from_section): Likewise.
11451 (scan_partial_symbols): Likewise.
11452 (add_partial_symbol): Likewise.
11453 (add_partial_subprogram): Likewise.
11454 (peek_die_abbrev): Likewise.
11455 (fixup_go_packaging): Likewise.
11456 (process_full_comp_unit): Likewise.
11457 (process_full_type_unit): Likewise.
11458 (process_imported_unit_die): Likewise.
11459 (dwarf2_compute_name): Likewise.
11460 (dwarf2_physname): Likewise.
11461 (read_import_statement): Likewise.
11462 (create_cus_hash_table): Assign dwarf2_physname instead of
11463 objfile.
11464 (read_func_scope): Access objfile through dwarf2_per_objfile.
11465 (read_lexical_block_scope): Likewise.
11466 (read_call_site_scope): Likewise.
11467 (read_variable): Likewise.
11468 (dwarf2_rnglists_process): Likewise.
11469 (dwarf2_ranges_process): Likewise.
11470 (dwarf2_ranges_read): Likewise.
11471 (dwarf2_record_block_ranges): Likewise.
11472 (dwarf2_add_field): Likewise.
11473 (dwarf2_add_member_fn): Likewise.
11474 (read_structure_type): Likewise.
11475 (process_structure_scope): Likewise.
11476 (read_enumeration_type): Likewise.
11477 (read_array_type): Likewise.
11478 (read_common_block): Likewise.
11479 (read_namespace_type): Likewise.
11480 (read_namespace): Likewise.
11481 (read_module_type): Likewise.
11482 (read_tag_pointer_type): Likewise.
11483 (read_tag_ptr_to_member_type): Likewise.
11484 (read_tag_string_type): Likewise.
11485 (read_subroutine_type): Likewise.
11486 (read_typedef): Likewise.
11487 (read_base_type): Likewise.
11488 (attr_to_dynamic_prop): Likewise.
11489 (read_subrange_type): Likewise.
11490 (read_unspecified_type): Likewise.
11491 (load_partial_dies): Likewise.
11492 (read_partial_die): Likewise.
11493 (find_partial_die): Likewise.
11494 (guess_partial_die_structure_name): Likewise.
11495 (fixup_partial_die): Likewise.
11496 (read_attribute_value): Likewise.
11497 (read_addr_index_from_leb128): Likewise.
11498 (dwarf2_read_addr_index): Likewise.
11499 (dwarf2_string_attr): Likewise.
11500 (lnp_state_machine::check_line_address): Likewise.
11501 (dwarf_decode_lines_1): Likewise.
11502 (dwarf_decode_lines): Likewise.
11503 (dwarf2_start_symtab): Likewise.
11504 (var_decode_location): Likewise.
11505 (new_symbol_full): Likewise.
11506 (dwarf2_const_value_data): Likewise.
11507 (dwarf2_const_value_attr): Likewise.
11508 (dwarf2_const_value): Likewise.
11509 (die_type): Likewise.
11510 (die_containing_type): Likewise.
11511 (lookup_die_type): Likewise.
11512 (guess_full_die_structure_name): Likewise.
11513 (anonymous_struct_prefix): Likewise.
11514 (dwarf2_name): Likewise.
11515 (follow_die_ref_or_sig): Likewise.
11516 (follow_die_offset): Likewise.
11517 (follow_die_ref): Likewise.
11518 (dwarf2_fetch_die_loc_sect_off): Likewise.
11519 (dwarf2_fetch_constant_bytes): Likewise.
11520 (dwarf2_fetch_die_type_sect_off): Likewise.
11521 (dwarf2_get_die_type): Likewise.
11522 (follow_die_sig): Likewise.
11523 (decode_locdesc): Likewise.
11524 (dwarf2_per_cu_objfile): Likewise.
11525 (dwarf2_per_cu_text_offset): Likewise.
11526 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11527 objfile.
11528 (set_die_type): Access objfile through
11529 dwarf2_per_objfile.
11530
11531 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11532
11533 * valprint.c (converted_character_d): Remove typedef.
11534 (DEF_VEC_O (converted_character_d)): Remove.
11535 (count_next_character): Use std::vector.
11536 (print_converted_chars_to_obstack): Likewise.
11537 (generic_printstr): Likewise.
11538
11539 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11540
11541 * xml-support.h (struct gdb_xml_value): Add constructor.
11542 <value>: Change type to unique_xmalloc_ptr.
11543 (gdb_xml_value_s): Remove typedef.
11544 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11545 (gdb_xml_element_start_handler): Change parameter type to
11546 std::vector.
11547 (xml_find_attribute): Likewise.
11548 * xml-support.c (xml_find_attribute): Change parameter type to
11549 std::vector and adjust.
11550 (gdb_xml_values_cleanup): Remove.
11551 (gdb_xml_parser::start_element): Adjust to std::vector.
11552 (xinclude_start_include): Change paraeter type to std::vector
11553 and adjust.
11554 * btrace.c (check_xml_btrace_version): Likewise.
11555 (parse_xml_btrace_block): Likewise.
11556 (parse_xml_btrace_pt_config_cpu): Likewise.
11557 (parse_xml_btrace_pt): Likewise.
11558 (parse_xml_btrace_conf_bts): Likewise.
11559 (parse_xml_btrace_conf_pt): Likewise.
11560 * memory-map.c (memory_map_start_memory): Likewise.
11561 (memory_map_start_property): Likewise.
11562 * osdata.c (osdata_start_osdata): Likewise.
11563 (osdata_start_item): Likewise.
11564 (osdata_start_column): Likewise.
11565 * remote.c (start_thread): Likewise.
11566 * solib-aix.c (library_list_start_library): Likewise.
11567 (library_list_start_list): Likewise.
11568 * solib-svr4.c (library_list_start_library): Likewise.
11569 (svr4_library_list_start_list): Likewise.
11570 * solib-target.c (library_list_start_segment): Likewise.
11571 (library_list_start_section): Likewise.
11572 (library_list_start_library): Likewise.
11573 (library_list_start_list): Likewise.
11574 * tracepoint.c (traceframe_info_start_memory): Likewise.
11575 (traceframe_info_start_tvar): Likewise.
11576 * xml-syscall.c (syscall_start_syscall): Likewise.
11577 * xml-tdesc.c (tdesc_start_target): Likewise.
11578 (tdesc_start_feature): Likewise.
11579 (tdesc_start_reg): Likewise.
11580 (tdesc_start_union): Likewise.
11581 (tdesc_start_struct): Likewise.
11582 (tdesc_start_flags): Likewise.
11583 (tdesc_start_enum): Likewise.
11584 (tdesc_start_field): Likewise.
11585 (tdesc_start_enum_value): Likewise.
11586 (tdesc_start_vector): Likewise.
11587
11588 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11589
11590 * extension.h (struct xmethod_worker) <clone>: Remove.
11591 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11592 Remove.
11593 (python_xmethod_worker::clone): Remove.
11594 * valops.c (find_overload_match): Use std::move instead of
11595 clone.
11596
11597 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11598
11599 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11600 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11601 <free_xmethod_worker_data>: Remove.
11602 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11603 <get_xmethod_arg_types>: Remove.
11604 <get_xmethod_result_type>: Remove.
11605 <invoke_xmethod>: Remove.
11606 * extension.c (new_xmethod_worker): Remove.
11607 (clone_xmethod_worker): Remove.
11608 (get_matching_xmethod_workers): Return void, pass std::vector by
11609 pointer.
11610 (get_xmethod_arg_types): Rename to...
11611 (xmethod_worker::get_arg_types): ... this, and adjust.
11612 (get_xmethod_result_type): Rename to...
11613 (xmethod_worker::get_result_type): ... this, and adjust.
11614 (invoke_xmethod): Remove.
11615 (free_xmethod_worker): Remove.
11616 (free_xmethod_worker_vec): Remove.
11617 * extension.h (enum ext_lang_rc): Move here from
11618 extension-priv.h.
11619 (struct xmethod_worker): Add constructor and destructor.
11620 <data>: Remove.
11621 <value>: Remove.
11622 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11623 virtual pure methods.
11624 <get_arg_types, get_result_type>: New methods.
11625 (xmethod_worker_ptr): Remove typedef.
11626 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11627 (xmethod_worker_vec): Remove typedef.
11628 (xmethod_worker_up): New typedef.
11629 (invoke_xmethod): Remove.
11630 (clone_xmethod_worker): Remove.
11631 (free_xmethod_worker): Remove.
11632 (free_xmethod_worker_vec): Remove.
11633 (get_xmethod_arg_types): Remove.
11634 (get_xmethod_result_type): Remove.
11635 * valops.c (find_method_list): Use std::vector, don't use
11636 intermediate vector.
11637 (value_find_oload_method_list): Use std::vector.
11638 (find_overload_match): Use std::vector.
11639 (find_oload_champ): Use std::vector.
11640 * value.c (value_free): Use operator delete.
11641 (value_of_xmethod): Rename to...
11642 (value_from_xmethod): ... this. Don't assign
11643 xmethod_worker::value, take rvalue-reference.
11644 (result_type_of_xmethod): Adjust.
11645 (call_xmethod): Adjust.
11646 * value.h: Include extension.h.
11647 (struct xmethod_worker): Don't forward-declare.
11648 (value_of_xmethod): Rename to...
11649 (value_from_xmethod): ... this, take rvalue-reference.
11650 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11651 (struct python_xmethod_worker): ... this, add constructor and
11652 destructor.
11653 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11654 (gdbpy_free_xmethod_worker_data): Rename to...
11655 (python_xmethod_worker::~python_xmethod_worker): ... this and
11656 adjust.
11657 (gdbpy_clone_xmethod_worker_data): Rename to...
11658 (python_xmethod_worker::clone): ... this and adjust.
11659 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11660 temporary vector.
11661 (gdbpy_get_xmethod_arg_types): Rename to...
11662 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11663 (gdbpy_get_xmethod_result_type): Rename to...
11664 (python_xmethod_worker::do_get_result_type): ... this and
11665 adjust.
11666 (gdbpy_invoke_xmethod): Rename to...
11667 (python_xmethod_worker::invoke): ... this and adjust.
11668 (new_python_xmethod_worker): Rename to...
11669 (python_xmethod_worker::python_xmethod_worker): ... this and
11670 adjust.
11671 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11672 Remove.
11673 (gdbpy_free_xmethod_worker_data): Remove.
11674 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11675 (gdbpy_get_xmethod_arg_types): Remove.
11676 (gdbpy_get_xmethod_result_type): Remove.
11677 (gdbpy_invoke_xmethod): Remove.
11678 * python/python.c (python_extension_ops): Remove obsolete
11679 callbacks.
11680
11681 2018-01-05 Pedro Alves <palves@redhat.com>
11682
11683 PR gdb/18653
11684 * common/signals-state-save-restore.c
11685 (save_original_signals_state): New parameter 'quiet'. Warn if we
11686 find a custom handler preinstalled, instead of internal erroring.
11687 But only warn if !quiet.
11688 * common/signals-state-save-restore.h
11689 (save_original_signals_state): New parameter 'quiet'.
11690 * main.c (captured_main_1): Move save_original_signals_state call
11691 after option handling, and pass QUIET.
11692
11693 2018-01-05 Pedro Alves <palves@redhat.com>
11694
11695 * spu-tdep.c (spu_catch_start): Pass
11696 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11697
11698 2018-01-05 Pedro Alves <palves@redhat.com>
11699
11700 PR gdb/22670
11701 * ada-lang.c (literal_symbol_name_matcher): New function.
11702 (ada_get_symbol_name_matcher): Use it for
11703 symbol_name_match_type::SEARCH_NAME.
11704 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11705 it down instead of assuming symbol_name_match_type::FULL.
11706 * block.h (block_lookup_symbol): New parameter 'match_type'.
11707 * c-valprint.c (print_unpacked_pointer): Use
11708 lookup_symbol_search_name instead of lookup_symbol.
11709 * compile/compile-object-load.c (get_out_value_type): Pass down
11710 symbol_name_match_type::SEARCH_NAME.
11711 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11712 symbol_name_match_type::FULL.
11713 * cp-support.c (cp_get_symbol_name_matcher): Handle
11714 symbol_name_match_type::SEARCH_NAME.
11715 * infrun.c (insert_exception_resume_breakpoint): Use
11716 lookup_symbol_search_name.
11717 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11718 * psymtab.c (maintenance_check_psymtabs): Use
11719 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11720 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11721 SYMBOL_SEARCH_NAME.
11722 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11723 if symbol_name_match_type::SEARCH_NAME.
11724 (lookup_symbol_in_language): Pass down
11725 symbol_name_match_type::FULL.
11726 (lookup_symbol_search_name): New.
11727 (lookup_language_this): Pass down
11728 symbol_name_match_type::SEARCH_NAME.
11729 (lookup_symbol_aux, lookup_local_symbol): New parameter
11730 'match_type'. Pass it down.
11731 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11732 (lookup_symbol_search_name): New declaration.
11733 (lookup_symbol_in_block): New 'match_type' parameter.
11734
11735 2018-01-05 Pedro Alves <palves@redhat.com>
11736
11737 PR gdb/22670
11738 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11739 ada_lookup_symbol.
11740 (ada_lookup_symbol): Reimplement in terms of
11741 ada_lookup_symbol_list, bits factored out from
11742 ada_lookup_encoded_symbol.
11743
11744 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11745
11746 * ada-exp.y (write_object_renaming): When subscripting an array
11747 using a symbol as the index, pass the block in call to
11748 ada_lookup_encoded_symbol when looking that symbol up.
11749
11750 2018-01-05 Jerome Guitton <guitton@adacore.com>
11751
11752 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11753 TYPE_INDEX_TYPE.
11754
11755 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11756
11757 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11758 the case where VALUE_LVAL (val0) is not lval_memory.
11759
11760 2018-01-05 Xavier Roirand <roirand@adacore.com>
11761
11762 * ada-valprint.c (print_optional_low_bound): Handle
11763 character-indexed array printing like boolean-indexed array
11764 printing.
11765
11766 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11767
11768 * NEWS: Create a new section for the next release branch.
11769 Rename the section of the current branch, now that it has
11770 been cut.
11771
11772 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11773
11774 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11775 * version.in: Bump version to 8.1.50.DATE-git.
11776
11777 2018-01-03 Xavier Roirand <roirand@adacore.com>
11778
11779 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11780 Add field.
11781 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11782 Add field.
11783 (default_exception_support_info) <catch_handlers_sym>: Add field.
11784 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11785 (ada_exception_name_addr_1): Add "catch handlers" handling.
11786 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11787 Update all callers.
11788 (create_excep_cond_exprs) <ex>: Add parameter.
11789 (re_set_exception): Update create_excep_cond_exprs call.
11790 (print_it_exception, print_one_exception, print_mention_exception)
11791 (print_recreate_exception): Add "catch handler" handling.
11792 (allocate_location_catch_handlers, re_set_catch_handlers)
11793 (check_status_catch_handlers, print_it_catch_handlers)
11794 (print_one_catch_handlers, print_mention_catch_handlers)
11795 (print_recreate_catch_handlers): New function.
11796 (catch_handlers_breakpoint_ops): New variable.
11797 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11798 Add parameter. Add "catch handler" handling.
11799 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11800 Add "catch handler" handling.
11801 (ada_exception_catchpoint_cond_string): Add "catch handler"
11802 handling.
11803 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11804 call.
11805 (catch_ada_handlers_command): New function.
11806 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11807 operations structure.
11808 (_initialize_ada_language): Add "catch handlers" command entry.
11809 * NEWS: Document "catch handlers" feature.
11810
11811 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11812
11813 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11814 account when creating the array type of the slice.
11815 (ada_value_slice): Likewise.
11816
11817 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11818
11819 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11820 New enum value.
11821 (create_array_type_with_stride): Add byte_stride_prop parameter.
11822 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11823 New parameter. Update all callers in this file.
11824 (array_type_has_dynamic_stride): New function.
11825 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11826 of arrays with dynamic byte strides.
11827 * dwarf2read.c (read_array_type): Add support for dynamic
11828 DW_AT_byte_stride attributes.
11829
11830 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11831
11832 * dwarf2read.c (read_unspecified_type): Treat
11833 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11834
11835 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11836
11837 Update copyright year range in all GDB files.
11838
11839 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11840
11841 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11842 and gdb/testsuite/gdb.base/step-line.c.
11843
11844 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11845
11846 * copyright.py (main): Dump the contents of
11847 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11848 even if BY_HAND is empty.
11849
11850 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11851
11852 * top.c (print_gdb_version): Update Copyright year in version
11853 message.
11854
11855 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11856
11857 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11858
11859 For older changes see ChangeLog-2017.
11860 \f
11861 Local Variables:
11862 mode: change-log
11863 left-margin: 8
11864 fill-column: 74
11865 version-control: never
11866 coding: utf-8
11867 End:
This page took 0.273447 seconds and 5 git commands to generate.