9d226c11b1de485046d05128a71eca68a6cda62d
[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
18 2018-08-23 Xavier Roirand <roirand@adacore.com>
19
20 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
21 incrementation.
22
23 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
24
25 * solib-svr4.c (read_program_headers_from_bfd): Return
26 gdb::optional<gdb::byte_vector>.
27 (svr4_exec_displacement): Adjust.
28
29 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
30
31 * solib-svr4.c (read_program_header): Return
32 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
33 (find_program_interpreter): Return
34 gdb::optional<gdb::byte_vector>.
35 (scan_dyntag_auxv): Adjust.
36 (enable_break): Adjust.
37 (svr4_exec_displacement): Adjust.
38
39 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
40
41 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
42 * inf-child.c (inf_child_target::terminal_save_inferior): New.
43
44 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
45
46 * guile/scm-string.c (gdbscm_scm_from_printf): Use
47 string_vprintf.
48 * guile/scm-utils.c (gdbscm_printf): Likewise.
49 * serial.c (serial_printf): Likewise.
50 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
51
52 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
53
54 * stack.c (print_frame): Print frame architecture when printing on
55 an MI output.
56 * NEWS: Mention new "arch" attribute in frame output.
57
58 2018-08-21 Alan Hayward <alan.hayward@arm.com>
59
60 * arch/aarch64.h (aarch64_regnum): Update comment.
61
62 2018-08-21 Alan Hayward <alan.hayward@arm.com>
63
64 * NEWS: Add SVE to 8.2 section.
65
66 2018-08-21 Pedro Alves <palves@redhat.com>
67
68 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
69 out from gdbscm_parse_function_args.
70 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
71 gdbscm_parse_function_args_1.
72
73 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
74
75 PR gdb/17816
76 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
77 operator.
78
79 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
80
81 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
82
83 2018-08-19 Michael Spang <spang@google.com>
84
85 PR gdb/11786
86 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
87 for PT_TLS segments.
88
89 2018-08-18 Kevin Buettner <kevinb@redhat.com>
90
91 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
92 dwarf_variable_value.
93 * dwarf2-frame.c (class dwarf_expr_executor):
94 Add override for dwarf_variable_value.
95 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
96 (class symbol_needs_eval_context): Likewise.
97 (indirect_synthetic_pointer): Add forward declaration.
98 (sect_variable_value): New function.
99 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
100 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
101 for DW_OP_GNU_variable_value.
102
103 2018-08-16 Tom Tromey <tom@tromey.com>
104
105 * top.c (read_command_file): Update.
106 (command_line_input): Remove "repeat" argument.
107 * ada-lang.c (get_selections): Update.
108 * linespec.c (decode_line_2): Update.
109 * defs.h (command_line_input): Remove argument.
110 * cli/cli-script.c (read_next_line): Update.
111 * python/py-gdb-readline.c: Update.
112
113 2018-08-17 Tom Tromey <tom@tromey.com>
114
115 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
116 command_line_input.
117
118 2018-08-15 Tom Tromey <tom@tromey.com>
119
120 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
121
122 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
123
124 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
125 If used, use find_pc_partial_function to find address range
126 to disassemble.
127 * mi/mi-main.c (mi_cmd_list_features): Report
128 "data-disassemble-a-option" feature.
129 * NEWS: Mention new -data-disassemble option -a.
130
131 2018-08-13 Tom Tromey <tom@tromey.com>
132
133 * common/common-defs.h (_FORTIFY_SOURCE): Define.
134
135 2018-08-13 Alan Hayward <alan.hayward@arm.com>
136
137 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
138 (aarch64_linux_collect_sve_regset): Likewise.
139 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
140 * regcache.h (regcache_map_entry_size): New function.
141
142 2018-08-13 Alan Hayward <alan.hayward@arm.com>
143
144 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
145 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
146 (SVE_HEADER_VL_LENGTH): Likewise.
147 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
148 (SVE_HEADER_FLAGS_LENGTH): Likewise.
149 (SVE_HEADER_RESERVED_LENGTH): Likewise.
150 (SVE_HEADER_SIZE_OFFSET): Likewise.
151 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
152 (SVE_HEADER_VL_OFFSET): Likewise.
153 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
154 (SVE_HEADER_FLAGS_OFFSET): Likewise.
155 (SVE_HEADER_RESERVED_OFFSET): Likewise.
156 (SVE_HEADER_SIZE): Likewise.
157 (aarch64_linux_core_read_vq): Add function.
158 (aarch64_linux_core_read_description): Check for SVE section.
159
160 2018-08-13 Alan Hayward <alan.hayward@arm.com>
161
162 * aarch64-fbsd-tdep.c
163 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
164 collect_size.
165 * aarch64-linux-tdep.c
166 (aarch64_linux_iterate_over_regset_sections): Likewise.
167 * alpha-linux-tdep.c
168 (alpha_linux_iterate_over_regset_sections):
169 * alpha-nbsd-tdep.c
170 (alphanbsd_iterate_over_regset_sections): Likewise.
171 * amd64-fbsd-tdep.c
172 (amd64fbsd_iterate_over_regset_sections): Likewise.
173 * amd64-linux-tdep.c
174 (amd64_linux_iterate_over_regset_sections): Likewise.
175 * arm-bsd-tdep.c
176 (armbsd_iterate_over_regset_sections): Likewise.
177 * arm-fbsd-tdep.c
178 (arm_fbsd_iterate_over_regset_sections): Likewise.
179 * arm-linux-tdep.c
180 (arm_linux_iterate_over_regset_sections): Likewise.
181 * corelow.c (get_core_registers_cb): Likewise.
182 (core_target::fetch_registers): Likewise.
183 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
184 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
185 * gdbarch.h (void): Regenerate.
186 * gdbarch.sh: Add supply_size and collect_size.
187 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
188 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
189 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
190 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
191 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
192 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
193 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
194 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
195 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
196 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
197 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
198 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
199 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
200 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
201 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
202 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
203 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
204 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
205 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
206 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
207 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
208 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
209 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
210 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
211 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
212 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
213 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
214 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
215 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
216 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
217
218 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
219
220 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
221 with string_printf.
222
223 2018-08-10 Keith Seitz <keiths@redhat.com>
224
225 * compile/compile-c-support.c (add_code_header, add_code_footer):
226 Move into policy class.
227 (c_push_user_expression, pop_user_expression_nop)
228 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
229 (compile_program): New host class.
230 (c_compile_program): New typedef.
231 (c_compute_porgram): Use c_compile_program.
232
233 2018-08-10 Keith Seitz <keiths@redhat.com>
234
235 * compile/compile-internal.h (compile_instance::~compile_instance):
236 Remove calls to htab_delete.
237 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
238 * compile.c (compile_instance::compile_instance): Initialize
239 htab unique pointers.
240 (compile_instance::get_cached_type, compile_instance::insert_type)
241 (compile_instance::error_symbol_once): Update for unique_ptr.
242
243 2018-08-10 Keith Seitz <keiths@redhat.com>
244
245 * compile/compile-c-symbols.c (struct symbol_error)
246 (hash_symbol_error, eq_symbol_error, del_symbol_error)
247 (compile_instance::insert_symbol_error)
248 (compile_instance::error_symbol_once): Move to ...
249 * compile/compile.c: ... here.
250
251 2018-08-10 Keith Seitz <keiths@redhat.com>
252
253 * compile/compile-c-support.c (c_get_compile_context): Use `new'
254 instead of `new_compile_instance'.
255 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
256 Update description.
257 If the symbol error map is not initialized, create it.
258 (generate_c_for_for_one_symbol): Do not check/initialize
259 the symbol error map.
260 * compile/compile-c-types.c (compile_c_instance): Make a class.
261 Update all callers.
262 (compile_instance::compile_instance): Initialize the type cache.
263 (get_cached_type): New function.
264 (insert_type): Update description.
265 (compile_c_instance::m_default_cflags): Define.
266 (convert_type): Update description. Use get_cached_type.
267 (delete_instance): Moved to destructor.
268 (new_compile_instance): Moved to constructor.
269 * compile/compile-c.h (compile_c_instance): Make class inheriting
270 from compile_instance.
271 <base>: Remove field.
272 <type_map, symbol_err_map>: Move to base class.
273 <c_plugin>: Rename to `m_plugin' and remove pointer type.
274 * compile/compile-internal.h (compile_instance): Make class.
275 <type_map_t, symbol_err_map_t>: Define.
276 <fe>: Rename to `m_gcc_fe'.
277 <scope, block, gcc_target_options>: Add `m_' prefix.
278 <m_type_map, m_symbol_err_map>: New fields, moved from
279 compile_c_instance.
280 <destroy>: Remove.
281 (convert_type, new_compile_instance): Remove.
282 * compile/compile.c (cleanup_compile_instance): Remove.
283 (compile_to_object): Use unique_ptr to eliminate cleanups.
284 (compile_instance::set_print_callback, compile_instance::version)
285 (compile_instance::set_verbose)
286 (compile_instance::set_driver_filename)
287 (compile_instance::set_triplet_regexp)
288 (compile_instance::set_arguments)
289 (compile_instance::set_source_file)
290 (compile_instance::compile): Define.
291
292 2018-08-10 Keith Seitz <keiths@redhat.com>
293
294 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
295 * compile/compile-c-types.c: Define GCC_METHODN macros and include
296 gcc-c-fe.def to define C plugin.
297 (delete_instance): Delete `c_plugin'.
298 (new_compile_instance): Initialize `c_plugin'.
299 * compile/compile-c.h: Include gcc_c_plugin.h.
300 (struct compile_c_instance) <c_plugin>: New member.
301 * gcc-c-plugin.h: New file.
302 Update all callers with API change.
303
304 2018-08-10 Keith Seitz <keiths@redhat.com>
305
306 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
307 (HFILES_NO_SRCDIR): ... to here.
308 Add compile-internal.h and compile-c.h.
309 * compile/compile-c-support.c: Include compile-c.h.
310 * compile/compile-c-symbols.c: Include compile-c.h.
311 (generate_c_for_variable_locations): Update comment.
312 * compile/compile-c-types.c: Include compile-c.h.
313 * compile/compile-c.h: New file -- moved C language declarations
314 from other files here.
315 * compile/compile-internal.h: Do not include hashtab.h or
316 common/enum-flags.h.
317 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
318 (gcc_convert_symbol, gcc_symbol_address)
319 (generate_c_for_variable_locations, c_get_mode_for_size)
320 (c_get_range_decl_name): Definitions moved to compile-c.h.
321 * compile/compile-loc2c.c: Include compile-c.h.
322
323 2018-08-10 Keith Seitz <keiths@redhat.com>
324
325 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
326 (c_symbol_substitution_name): ... this.
327 Update all callers.
328
329 2018-08-10 Keith Seitz <keiths@redhat.com>
330
331 * compile/compile-c-support.c (c_compute_program): Use
332 unique_xmalloc_ptr to eliminate cleanup.
333 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
334 Return a unique_xmalloc_ptr and eliminate cleanup.
335 * compile/compile-internal.h (generate_c_for_variable_locations):
336 Return unique_xmalloc_ptr and update description.
337
338 2018-08-10 Alan Hayward <alan.hayward@arm.com>
339
340 * corelow.c (core_target::get_core_register_section): Rename
341 min_size to section_min_size.
342
343 2018-08-09 Jim Wilson <jimw@sifive.com>
344
345 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
346 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
347 * NEWS: Mention new GNU/Linux RISC-V target.
348 * configure.host: Add riscv*-*-linux*.
349 * configure.nat: Add riscv*.
350 * configure.tgt: Add riscv*-*-linux*.
351 * riscv-linux-nat.c: New file.
352 * riscv-linux-tdep.c: New file.
353
354 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
355
356 * infrun.c (resume): Make static, add forward declaration.
357 (proceed): Update header comment.
358 * infrun.h (resume): Delete declaration.
359
360 2018-08-09 Tom Tromey <tom@tromey.com>
361
362 * riscv-tdep.h: Minor formatting fixes.
363
364 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
365
366 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
367 * dwarf-index-cache.c (create_dir_and_check): Likewise.
368 (test_mkdir_recursive): Likewise.
369 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
370
371 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
372
373 * valarith.c (value_subscripted_rvalue): If an array is not in
374 memory, and we don't know the upper bound, then we can't know that
375 the requested element exists or not.
376
377 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
378
379 * target.c (str_comma_list_concat_elem): Fix typo in comment.
380 (target_options_to_string): Add comment.
381
382 2018-08-08 Tom Tromey <tom@tromey.com>
383
384 * unittests/scoped_mmap-selftests.c: Check result of "write".
385
386 2018-08-08 Jim Wilson <jimw@sifive.com>
387
388 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
389 (decode_register_index_short): New.
390 (decode_j_type_insn, decode_cj_type_insn): New.
391 (decode_b_type_insn, decode_cb_type_insn): New.
392 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
393 local xlen. Check xlen when decoding ambiguous compressed insns. In
394 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
395 is_c_sw_insn instead of is_sw_insn.
396 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
397 (riscv_software_single_step): New.
398 * riscv-tdep.h (riscv_software_single_step): Declare.
399
400 * riscv-tdep.c (riscv_isa_xlen): Drop static.
401 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
402
403 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
404
405 PR gdb/18050:
406 * target.c (dispose_inferior): Don't dispose of inferiors that are
407 already killed.
408
409 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
410
411 * remote.c (remote_target::download_tracepoint): Change char* to
412 const char*.
413
414 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
415
416 * target.h (target_options_to_string): Return an std::string.
417 * target.c (str_comma_list_concat_elem): Return void, use
418 std::string.
419 (do_option): Likewise.
420 (target_options_to_string): Return an std::string.
421 * linux-nat.c (linux_nat_target::wait): Adjust.
422 * target-debug.h (target_debug_print_options): Adjust.
423
424 2018-08-07 Tom Tromey <tom@tromey.com>
425
426 * Makefile.in (CPPFLAGS): New variable.
427 (INTERNAL_CPPFLAGS): Use it.
428
429 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
430
431 * NEWS: Mention the index cache.
432
433 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
434
435 * common/pathstuff.h (get_standard_cache_dir): New.
436 * common/pathstuff.c (get_standard_cache_dir): New.
437 * build-id.h (build_id_to_string): New.
438 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
439 DEBUG_STR_SUFFIX): Move to here.
440 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
441 DEBUG_STR_SUFFIX): Move from there.
442 (write_psymtabs_to_index): Make non-static, add basename
443 parameter. Write to temporary files, rename when done.
444 (save_gdb_index_command): Adjust call to
445 write_psymtabs_to_index.
446 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
447 field.
448 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
449 (get_gdb_index_contents_from_cache): New.
450 (get_gdb_index_contents_from_cache_dwz): New.
451 (dwarf2_initialize_objfile): Read index from cache.
452 (dwarf2_build_psymtabs): Save to index.
453 * dwarf-index-cache.h: New file.
454 * dwarf-index-cache.c: New file.
455 * dwarf-index-write.h: New file.
456
457 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
458
459 * gnulib/aclocal.m4: Re-generate.
460 * gnulib/config.in: Re-generate.
461 * gnulib/configure: Re-generate.
462 * gnulib/import/Makefile.am: Re-generate.
463 * gnulib/import/Makefile.in: Re-generate.
464 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
465 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
466 * gnulib/import/m4/mkdir.m4: New file.
467 * gnulib/import/mkdir.c: New file.
468 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
469 module.
470
471 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
472
473 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
474 * common/scoped_mmap.c: New file.
475 * common/scoped_mmap.h (destroy): New method.
476 (~scoped_mmap, reset): Use destroy.
477 (scoped_mmap): New move constructor.
478 (mmap_file): New declaration.
479 * unittests/scoped_mmap-selftests.c (test_normal,
480 test_invalid_filename, run_tests): New functions.
481 (_initialize_scoped_mmap_selftests): Register selftest.
482
483 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
484
485 * dwarf2read.c (read_gdb_index_from_section): Rename to...
486 (read_gdb_index_from_buffer): ... this. Remove section
487 parameter, add buffer parameter.
488 (get_gdb_index_contents_ftype,
489 get_gdb_index_contents_dwz_ftype): New typedefs.
490 (dwarf2_read_gdb_index): Add callback parameters to get the
491 index contents.
492 (get_gdb_index_contents_from_section): New.
493 (dwarf2_initialize_objfile): Update call to
494 dwarf2_read_gdb_index.
495
496 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
497
498 * common/filestuff.h (gdb_fopen_cloexec): New overload.
499 (gdb_open_cloexec): Likewise.
500 * nat/linux-osdata.c (command_from_pid): Use string_printf.
501 (commandline_from_pid): Likewise.
502 (linux_xfer_osdata_threads): Likewise.
503 (linux_xfer_osdata_fds): Likewise.
504 * ada-lang.c (is_package_name): Likewise.
505 * auxv.c (procfs_xfer_auxv): Likewise.
506 * breakpoint.c (print_one_breakpoint_location): Use
507 uiout::field_fmt.
508 (print_one_catch_solib): Use string_printf.
509 * coff-pe-read.c (add_pe_exported_sym): Likewise.
510 (add_pe_forwarded_sym): Likewise.
511 * dwarf2read.c (create_type_unit_group): Likewise.
512 (build_error_marker_type): Likewise.
513 * infcall.c (get_function_name): Likewise.
514 * valprint.c (print_converted_chars_to_obstack): Likewise.
515 * xtensa-tdep.c (xtensa_register_type): Likewise.
516
517 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
518
519 * remote.c (remote_target::download_tracepoint): Fix format
520 string errors.
521
522 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
523
524 * tracefile.c: Include common/byte-vector.h.
525 (trace_save): Change type of buf to gdb::byte_vector. Initialize
526 with trace_regblock_size if needed. Update uses of buf.
527
528 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
529
530 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
531 std::vector<unsigned char>.
532 * tracepoint.c (collection_list::collection_list): Remove
533 m_regs_mask initializer from initializer list. Resize
534 m_regs_mask using the largest remote register number.
535 (collection_list::add_remote_register): Remove size check on
536 m_regs_mask. Use at to access element.
537 (collection_list::stringify): Change type of temp_buf to
538 gdb::char_vector. Update uses of temp_buf. Resize if needed to
539 stringify the register mask. Use pack_hex_byte for the register
540 mask.
541
542 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
543
544 * tracepoint.h (class collection_list) <add_register>: Remove.
545 <add_remote_register, add_ax_registers, add_local_register>:
546 Declare.
547 <add_memrange>: Add scope parameter.
548 * tracepoint.c (encode_actions_1): Likewise.
549 (collection_list::add_register): Rename to ...
550 (collection_list::add_remote_register): ... this. Update
551 comment.
552 (collection_list::add_ax_registers, add_local_register): New
553 methods.
554 (collection_list::add_memrange): Add scope parameter. Call
555 add_local_register instead of add_register.
556 (finalize_tracepoint_aexpr): New function.
557 (collection_list::collect_symbol): Update calls to add_memrange.
558 Call add_local_register instead of add_register. Call
559 add_ax_registers. Call finalize_tracepoint_aexpr.
560 (encode_actions_1): Get remote regnos for $reg action. Call
561 add_remote_register, add_ax_registers, and add_local_register.
562 Update call to add_memrange. Call finalize_tracepoint_aexpr.
563 (validate_actionline): Call finalize_tracepoint_aexpr.
564
565 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
566
567 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
568 Replace array buf with gdb::char_vector buf, of size
569 get_remote_packet_size (). Replace references to buf and
570 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
571 and xsnprintf with snprintf. Raise errors if the buffer is too
572 small.
573
574 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
575
576 * remote.c (remote_target::download_tracepoint): Fix the has_more
577 predicate in the QTDP action list iteration.
578
579 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
580
581 * remote.c (remote_target::download_tracepoint): Fix indentation
582 in for block.
583
584 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
585
586 * proc-api.c (_initialize_proc_api): Remove c, unused.
587 * procfs.c (procfs_init_inferior): Remove signals, unused.
588 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
589 unused.
590
591 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
592 Andrew Burgess <andrew.burgess@embecosm.com>
593
594 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
595 'W_STOPCODE (0)' as this could be ambiguous.
596
597 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
598
599 * ser-tcp.c (net_open): Fix thinko when deciding whether to
600 disable TCP's Nagle algorithm (use "ai_protocol" instead of
601 "ai_socktype").
602
603 2018-08-02 Tom Tromey <tom@tromey.com>
604
605 PR symtab/16842.
606 * dwarf2read.c (read_func_scope): Set symtab on template parameter
607 symbols.
608 (process_structure_scope): Likewise.
609
610 2018-08-02 Xavier Roirand <roirand@adacore.com>
611
612 PR gdb/22629:
613 * darwin-nat.c (darwin_kill_inferior): Fix handling of
614 kill inferior.
615
616 2018-08-02 Tom Tromey <tom@tromey.com>
617
618 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
619 (darwin_suspend_inferior, darwin_resume_inferior)
620 (darwin_decode_notify_message, darwin_resume_inferior_threads)
621 (darwin_check_new_threads): Check result of get_darwin_inferior.
622
623 2018-07-31 Joel Brobecker <brobecker@adacore.com>
624
625 GDB 8.1.1 released.
626
627 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
628
629 * varobj.c (varobj_get_path_expr_parent): Report an error if
630 parent is a dynamic varobj.
631
632 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
633
634 * gnulib/aclocal.m4: Re-generate.
635 * gnulib/config.in: Re-generate.
636 * gnulib/configure: Re-generate.
637 * gnulib/import/Makefile.in: Re-generate.
638 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
639 * gnulib/import/m4/onceonly.m4: Re-generate.
640
641 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
642
643 * target-descriptions.c (struct xml_test_tdesc): New.
644 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
645 (record_xml_tdesc): Update.
646 (maintenance_check_xml_descriptions): Update.
647 * target-descriptions.h (record_xml_tdesc): Update comment.
648
649 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
650
651 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
652 checking array bounds are defined.
653
654 2018-07-30 Tom Tromey <tom@tromey.com>
655
656 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
657 irreflexivity violation.
658
659 2018-07-30 Tom Tromey <tom@tromey.com>
660
661 * cli/cli-decode.c (lookup_cmd): Remove lint code.
662 * value.c (unpack_long): Remove lint code.
663 * valops.c (value_ind): Remove lint code.
664 * valarith.c (value_x_binop, value_x_unop, value_equal)
665 (value_pos): Remove lint code.
666
667 2018-07-28 Tom de Vries <tdevries@suse.de>
668
669 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
670 with undefined upper bound as <optimized out>.
671
672 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
673
674 * gcore.in: Rename variable "name" to "prefix". Expand
675 "usage" text.
676
677 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
678
679 * windows-nat.c (windows_nat_target::create_inferior): Update to
680 call close() in global namespace.
681
682 2018-07-26 Tom Tromey <tom@tromey.com>
683
684 * dwarf-index-write.c (add_address_entry): Don't add objfile
685 offsets.
686 * dbxread.c (find_stab_function): Rename from
687 find_stab_function_addr. Return a bound_minimal_symbol.
688 (read_dbx_symtab): Use raw_text_low, raw_text_high.
689 Don't add objfile offsets.
690 (end_psymtab): Use raw_text_low, raw_text_high,
691 MSYMBOL_VALUE_RAW_ADDRESS.
692 (read_ofile_symtab): Update.
693 (process_one_symbol): Update.
694 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
695 offsets.
696 (dw2_relocate): Remove.
697 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
698 searching addrmap.
699 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
700 Update.
701 (process_psymtab_comp_unit_reader, add_partial_symbol)
702 (add_partial_subprogram, dwarf2_ranges_read): Update.
703 (load_partial_dies): Update.
704 (add_address_entry): Don't add objfile offsets.
705 (dwarf2_build_include_psymtabs): Update.
706 (create_addrmap_from_aranges): Don't add objfile offsets.
707 (dw2_find_pc_sect_compunit_symtab): Update.
708 * mdebugread.c (parse_symbol): Don't add objfile offsets.
709 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
710 Update.
711 (parse_partial_symbols): Don't add objfile offsets. Use
712 raw_text_low, raw_text_high. Update.
713 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
714 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
715 or call 'relocate' quick function. Clear psymbol_map.
716 * psympriv.h (struct partial_symbol) <address>: Add section
717 offset.
718 <set_unrelocated_address>: Rename from set_address.
719 <raw_text_low, raw_text_high>: New methods.
720 <text_low, text_high>: Add objfile parameter.
721 (add_psymbol_to_bcache): Add 'section' parameter. Call
722 set_unrelocated_address.
723 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
724 (find_pc_psymbol): Update.
725 (fixup_psymbol_section, relocate_psymtabs): Remove.
726 (dump_psymtab, psym_functions): Update.
727 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
728 parameter.
729 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
730 (start_psymtab_common): Update.
731 * symfile-debug.c (debug_qf_relocate): Remove.
732 (debug_sym_quick_functions): Update.
733 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
734 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
735 Update.
736
737 2018-07-26 Tom Tromey <tromey@redhat.com>
738
739 * dbxread.c (end_psymtab): Use text_high_valid and
740 text_low_valid.
741 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
742 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
743 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
744 Update comment.
745 <text_low_valid, text_high_valid>: New fields.
746 <set_text_low, set_text_high>: Update.
747 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
748
749 2018-07-26 Tom Tromey <tom@tromey.com>
750
751 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
752 Update.
753 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
754 textlow and texthigh fields.
755 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
756 Update.
757 * mdebugread.c (parse_lines, parse_partial_symbols)
758 (psymtab_to_symtab_1): Update.
759 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
760 Rename fields. Update comment. Now private.
761 <text_low, text_high, set_text_low, set_text_high>: New methods.
762 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
763 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
764 (start_psymtab_common, maintenance_info_psymtabs)
765 (maintenance_check_psymtabs): Update.
766 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
767 texthigh fields.
768 (scan_xcoff_symtab): Update.
769
770 2018-07-26 Tom Tromey <tromey@redhat.com>
771
772 * psympriv.h (struct partial_symbol) <unrelocated_address,
773 address, set_address>: New methods.
774 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
775 (fixup_psymbol_section, relocate_psymtabs): Update.
776 (print_partial_symbols): Add 'objfile' parameter. Update.
777 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
778 Update.
779
780 2018-07-26 Tom Tromey <tom@tromey.com>
781
782 * dwarf-index-write.c (write_psymbols, debug_names::insert)
783 (debug_names::write_psymbols): Update.
784 * psympriv.h (struct partial_symbol): Derive from
785 general_symbol_info.
786 <obj_section>: New method.
787 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
788 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
789 (find_pc_sect_psymbol, fixup_psymbol_section)
790 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
791 (print_partial_symbols, recursively_search_psymtabs)
792 (compare_psymbols, psymbol_hash, psymbol_compare)
793 (add_psymbol_to_bcache, maintenance_check_psymtabs)
794 (psymbol_name_matches, psym_fill_psymbol_map): Update.
795
796 2018-07-26 Tom Tromey <tromey@redhat.com>
797
798 * dbxread.c (end_psymtab): Remove dead code.
799
800 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
801
802 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
803 DWARF unwinders are disabled.
804 * dwarf2-frame.c: Add dwarf2read.h include.
805 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
806 disabled.
807 (dwarf2_frame_unwinders_enabled_p): Define.
808 (show_dwarf_unwinders_enabled_p): New function.
809 (_initialize_dwarf2_frame): Register switch to control DWARF
810 unwinder use.
811 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
812 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
813 (show_dwarf_cmdlist): Remove static keyword.
814 * dwarf2read.h (set_dwarf_cmdlist): Declare.
815 (show_dwarf_cmdlist): Declare.
816 * NEWS: Document new feature.
817
818 2018-07-26 Tom de Vries <tdevries@suse.de>
819
820 PR breakpoints/23366
821 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
822
823 2018-07-26 Tom de Vries <tdevries@suse.de>
824
825 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
826 DW_AT_count can't be translated to a dynamic prop.
827
828 2018-07-25 Tom de Vries <tdevries@suse.de>
829
830 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
831 try/catch.
832
833 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
834
835 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
836
837 2018-07-25 Joel Brobecker <brobecker@adacore.com>
838
839 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
840
841 2018-07-24 Keith Seitz <keiths@redhat.comt
842
843 PR symtab/23010
844 * dwarf2read.c (dw2_add_symbol_to_list): New function.
845 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
846 instead of add_symbol_to_list.
847 (read_file_scope): Call prepare_one_comp_unit before reading
848 any other DIEs.
849
850 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
851
852 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
853
854 2018-07-24 Tom Tromey <tom@tromey.com>
855
856 * utils.c (malloc, realloc, free): Don't declare.
857 * configure, config.in: Rebuild.
858 * configure.ac: Don't check for declarations of free, malloc, or
859 realloc.
860
861 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
862
863 * aarch64-linux-nat.c
864 (aarch64_linux_nat_target::stopped_data_address): Remove unused
865 variable.
866 * arm-linux-nat.c (fetch_regs): Likewise.
867 (store_regs): Likewise.
868 (fetch_vfp_regs): Likewise.
869 (store_vfp_regs): Likewise.
870 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
871 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
872 (arm_linux_nat_target::insert_watchpoint): Likewise.
873 (arm_linux_nat_target::remove_watchpoint): Likewise.
874 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
875 Likewise.
876 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
877 Likewise.
878 * ppc-linux-nat.c (fetch_register): Likewise.
879 (fetch_all_gp_regs): Likewise.
880 (fetch_ppc_registers): Likewise.
881 (store_all_gp_regs): Likewise.
882 (store_ppc_registers): Likewise.
883 (hwdebug_insert_point): Likewise.
884 (can_use_watchpoint_cond_accel): Likewise.
885 * remote-sim.c (gdb_os_write_stdout): Likewise.
886
887 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
888 Tom Tromey <tom@tromey.com>
889
890 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
891 test for it.
892 * configure: Rebuild.
893
894 2018-07-22 Tom Tromey <tom@tromey.com>
895
896 * regformats/regdat.sh: Define xmltarget_${name} inside
897 #ifndef IN_PROCESS_AGENT.
898
899 2018-07-22 Tom Tromey <tom@tromey.com>
900
901 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
902
903 2018-07-22 Tom Tromey <tom@tromey.com>
904
905 * symfile.c (reread_symbols): Notify iter, not objfile.
906
907 2018-07-22 Tom Tromey <tom@tromey.com>
908
909 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
910 Use arch_ops.
911 (ravenscar_thread_target::prepare_to_store): Likewise.
912
913 2018-07-22 Tom Tromey <tom@tromey.com>
914
915 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
916 unused variable. Call value_fetch_lazy when needed.
917 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
918 Remove unused variable. Call value_fetch_lazy when needed.
919
920 2018-07-22 Tom Tromey <tom@tromey.com>
921
922 * m32c-tdep.c (mark_dma): Return void.
923 (make_regs): Remove unused declarations.
924
925 2018-07-22 Tom Tromey <tom@tromey.com>
926
927 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
928 cmdscm_get_valid_command_smob_arg_unsafe for effect.
929 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
930 bkscm_get_valid_block_smob_arg_unsafe for effect.
931
932 2018-07-22 Tom Tromey <tom@tromey.com>
933
934 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
935 value_type.
936
937 2018-07-22 Tom Tromey <tom@tromey.com>
938
939 * windows-nat.c (saved_context): Conditionally define.
940 * remote.c (remote_target::remote_btrace_maybe_reopen):
941 Conditionally declare "warned".
942 * inflow.c (sigquit_ours): Conditionally define.
943 (new_tty): Move "tty" declaration inside #if.
944 * guile/guile.c (guile_datadir): Conditionally define.
945 * charset.c (set_be_le_names): Move some declarations inside #if.
946 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
947 #if.
948 (parse_xml_btrace_conf): Likewise.
949
950 2018-07-22 Tom Tromey <tom@tromey.com>
951
952 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
953
954 2018-07-22 Tom Tromey <tom@tromey.com>
955
956 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
957 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
958 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
959 * buildsym-legacy.c (get_macro_table): Remove unused variable.
960 * stack.c (frame_apply_level_command): Remove unused variable.
961 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
962 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
963 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
964 unused variable.
965 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
966 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
967 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
968 variable.
969 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
970 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
971 variable.
972 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
973 Remove unused variable.
974 * cli/cli-script.c (recurse_read_control_structure): Remove unused
975 variable.
976 * common/tdesc.c (print_xml_feature::visit): Remove unused
977 variable.
978 * compile/compile-object-load.c (store_regs): Remove unused
979 variables.
980 * complaints.c (clear_complaints): Remove unused variable.
981 * corelow.c (core_target_open): Remove unused variable.
982 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
983 variable.
984 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
985 variable.
986 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
987 variable.
988 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
989 variable.
990 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
991 variable.
992 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
993 variable.
994 * ia64-tdep.c (examine_prologue): Remove unused variable.
995 * infcall.c (run_inferior_call): Remove unused variable.
996 * inferior.c (exit_inferior): Remove unused variable.
997 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
998 * linespec.c (decode_line_2): Remove unused variable.
999 * linux-nat.c (super_close): Remove.
1000 * linux-tdep.c (linux_info_proc): Remove unused variable.
1001 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1002 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1003 Remove unused variable.
1004 * parse.c (find_minsym_type_and_address): Remove unused variable.
1005 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1006 variable.
1007 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1008 variable.
1009 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1010 variables.
1011 * record-btrace.c (record_btrace_target::store_registers): Remove
1012 unused variable.
1013 (cmd_show_record_btrace_cpu): Remove unused variable.
1014 * riscv-tdep.c (riscv_register_reggroup_p)
1015 (riscv_push_dummy_call, riscv_return_value): Remove unused
1016 variable.
1017 * rust-exp.y (literal): Remove unused variable.
1018 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1019 unused variable.
1020 <STRUCTOP_ANONYMOUS>: Likewise.
1021 * s390-linux-tdep.c (s390_linux_init_abi_31)
1022 (s390_linux_init_abi_64): Remove unused variable.
1023 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1024 (file_select_thread, net_windows_open, _initialize_ser_windows):
1025 Remove unused variables.
1026 * symtab.c (find_pc_sect_line): Remove unused variable.
1027 * target-memory.c (compute_garbled_blocks): Remove unused
1028 variable.
1029 (target_write_memory_blocks): Remove unused variable.
1030 * target.c (target_stack::unpush): Remove unused variables.
1031 * tracepoint.c (start_tracing, all_tracepoint_actions)
1032 (merge_uploaded_trace_state_variables)
1033 (print_one_static_tracepoint_marker): Remove unused variable.
1034 * unittests/basic_string_view/element_access/char/1.cc (test01):
1035 Remove unused variable.
1036 * windows-nat.c (windows_continue, windows_add_all_dlls)
1037 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1038 Remove unused variables.
1039
1040 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1041
1042 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1043 attr_profile in HAVE_ELF.
1044 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1045 HAVE_ELF.
1046
1047 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1048
1049 * frame.c (frame_register_unwind): Change parameter name.
1050 (frame_unwind_register): Likewise.
1051 (frame_unwind_register_value): Likewise.
1052 (frame_unwind_register_signed): Likewise.
1053 (frame_unwind_register_unsigned): Likewise.
1054 * frame.h (frame_register_unwind): Likewise.
1055 (frame_unwind_register): Likewise.
1056 (frame_unwind_register_value): Likewise.
1057 (frame_unwind_register_signed): Likewise.
1058 (frame_unwind_register_unsigned): Likewise.
1059 (frame_unwind_arch): Likewise.
1060
1061 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1062
1063 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1064 ISA maintenance.
1065
1066 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1067
1068 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1069 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1070 hand.
1071
1072 2018-07-20 Keith Seitz <keiths@redhat.com>
1073
1074 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1075 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1076 m_compunit_symtab, m_language>: Add "m_" prefix.
1077 Update all uses.
1078 * buildsym.c: Update all uses.
1079
1080 2018-07-20 Tom Tromey <tom@tromey.com>
1081
1082 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1083 * buildsym.h (record_line_ftype): Remove typedef.
1084
1085 2018-07-20 Tom Tromey <tom@tromey.com>
1086
1087 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1088 (end_expandable_symtab): Likewise.
1089 (end_symtab_get_static_block): Likewise.
1090 (end_symtab_from_static_block): Likewise.
1091 * buildsym-legacy.c (augment_type_symtab): Remove.
1092 (end_expandable_symtab): Remove.
1093 (end_symtab_get_static_block): Remove.
1094 (end_symtab_from_static_block): Remove.
1095
1096 2018-07-20 Tom Tromey <tom@tromey.com>
1097
1098 * dwarf2read.c: Include buildsym.h.
1099 (struct dwarf2_cu) <builder>: New method.
1100 (fixup_go_packaging): Update.
1101 (process_full_comp_unit, process_full_type_unit): Update. Don't
1102 use scoped_free_pendings.
1103 (using_directives): Add "cu" parameter, remove "language".
1104 (read_import_statement, setup_type_unit_groups, )
1105 (read_func_scope, read_lexical_block_scope)
1106 (dwarf2_record_block_ranges, read_namespace): Update.
1107 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1108 (lnp_state_machine::handle_end_sequence): Update.
1109 (class lnp_state_machine) <m_cu>: New member.
1110 <m_record_line_callback>: Remove.
1111 <m_currently_recording_lines>: New member.
1112 (lnp_state_machine::handle_set_file): Update.
1113 (noop_record_line): Remove.
1114 (dwarf_record_line_p): Add cu parameter.
1115 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1116 (lnp_state_machine::record_line)
1117 (lnp_state_machine::lnp_state_machine)
1118 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1119 (dwarf_decode_lines): Update.
1120 (dwarf2_start_subfile): Add cu parameter.
1121 (dwarf2_start_symtab, new_symbol): Update.
1122 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1123 Remove dwarf2_per_objfile parameter.
1124 (dwarf_decode_macros): Update.
1125
1126 2018-07-20 Tom Tromey <tom@tromey.com>
1127
1128 * stabsread.c (define_symbol): Update.
1129 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1130 * dwarf2read.c (new_symbol): Update.
1131 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1132 * cp-namespace.c: Include buildsym.h.
1133 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1134 * buildsym-legacy.c (get_buildsym_compunit): New function.
1135
1136 2018-07-20 Tom Tromey <tom@tromey.com>
1137
1138 * xcoffread.c: Include buildsym-legacy.h.
1139 * windows-nat.c: Include buildsym-legacy.h.
1140 * stabsread.c: Include buildsym-legacy.h.
1141 * mdebugread.c: Include buildsym-legacy.h.
1142 * buildsym-legacy.h: New file.
1143 * buildsym-legacy.c: New file, from buildsym.c.
1144 * go32-nat.c: Include buildsym-legacy.h.
1145 * dwarf2read.c: Include buildsym-legacy.h.
1146 * dbxread.c: Include buildsym-legacy.h.
1147 * cp-namespace.c: Include buildsym-legacy.h.
1148 * coffread.c: Include buildsym-legacy.h.
1149 * buildsym.h: Move some contents to buildsym-legacy.h.
1150 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1151 buildsym-legacy.c.
1152 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1153
1154 2018-07-20 Tom Tromey <tom@tromey.com>
1155
1156 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1157 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1158 (buildsym_compunit::buildsym_compunit)
1159 (buildsym_compunit::~buildsym_compunit)
1160 (buildsym_compunit::get_macro_table): Define.
1161
1162 2018-07-20 Tom Tromey <tom@tromey.com>
1163
1164 * buildsym.c (reset_symtab_globals): Remove.
1165 (buildsym_compunit::end_symtab_from_static_block): Update.
1166 (buildsym_compunit::augment_type_symtab): Update.
1167 (end_symtab_from_static_block): Call free_buildsym_compunit.
1168 (augment_type_symtab, end_symtab, end_expandable_symtab):
1169 Likewise.
1170
1171 2018-07-20 Tom Tromey <tom@tromey.com>
1172
1173 * arch-utils.c: Do not include buildsym.h.
1174 * mipsread.c: Do not include buildsym.h.
1175 * machoread.c: Do not include buildsym.h.
1176 * elfread.c: Do not include buildsym.h.
1177
1178 2018-07-20 Tom Tromey <tom@tromey.com>
1179
1180 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1181 initialization.
1182 (buildsym_compunit): Add new constructor.
1183 (struct buildsym_compunit) <get_last_source_file, finish_block,
1184 record_block_range, start_subfile, patch_subfile_names,
1185 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1186 set_last_source_start_addr, get_last_source_start_addr,
1187 get_local_using_directives, set_local_using_directives,
1188 get_global_using_directives, outermost_context_p,
1189 get_current_context_stack, get_context_stack_depth,
1190 get_current_subfile, get_local_symbols, get_file_symbols,
1191 get_global_symbols, record_debugformat, record_producer,
1192 push_context, pop_context, end_symtab_get_static_block,
1193 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1194 New public methods.
1195 <record_pending_block, finish_block_internal, make_blockvector,
1196 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1197 private methods.
1198 Update all users.
1199
1200 2018-05-22 Tom Tromey <tom@tromey.com>
1201
1202 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1203 parameter.
1204 (finish_block_internal): Update.
1205
1206 2018-07-20 Tom Tromey <tom@tromey.com>
1207
1208 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1209 parameter.
1210 (finish_block_internal): Update.
1211
1212 2018-07-20 Tom Tromey <tom@tromey.com>
1213
1214 * buildsym.h (EXTERN): Don't define or undef.
1215 * buildsym.c (EXTERN): Don't define.
1216
1217 2018-07-20 Tom Tromey <tom@tromey.com>
1218
1219 * buildsym.c: Remove TODO comment.
1220
1221 2018-07-20 Tom Tromey <tom@tromey.com>
1222
1223 * coffread.c (coff_symtab_read): Update.
1224 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1225 (xcoff_new_init): Update.
1226 * mipsread.c (mipscoff_new_init): Update.
1227 * mdebugread.c (mdebug_build_psymtabs): Update.
1228 * elfread.c (elf_new_init): Update.
1229 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1230 Update.
1231 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1232 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1233 (stabsect_build_psymtabs): Update.
1234 * buildsym.h (buildsym_init): Don't declare.
1235 * buildsym.c: Update comment.
1236 (prepare_for_building): Remove.
1237 (start_symtab, restart_symtab): Update.
1238 (reset_symtab_globals): Update comment.
1239 (buildsym_init): Remove.
1240
1241 2018-07-20 Tom Tromey <tom@tromey.com>
1242
1243 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1244 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1245 (read_enum_type, common_block_start, common_block_end)
1246 (cleanup_undefined_types_1, finish_global_stabs): Update.
1247 * mdebugread.c (psymtab_to_symtab_1): Update.
1248 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1249 (read_lexical_block_scope, new_symbol): Update.
1250 * dbxread.c (process_one_symbol): Update.
1251 * coffread.c (coff_symtab_read, process_coff_symbol)
1252 (coff_read_enum_type): Update.
1253 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1254 declare.
1255 (get_local_symbols, get_file_symbols, get_global_symbols): New
1256 functions.
1257 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1258 m_global_symbols.
1259 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1260 (~scoped_free_pendings): Update.
1261 (finish_block, prepare_for_building, reset_symtab_globals)
1262 (end_symtab_get_static_block, end_symtab_with_blockvector)
1263 (augment_type_symtab, push_context): Update.
1264 (get_local_symbols, get_file_symbols, get_global_symbols): New
1265 functions.
1266 (buildsym_init): Update.
1267
1268 2018-07-20 Tom Tromey <tom@tromey.com>
1269
1270 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1271 (process_full_type_unit): Likewise.
1272 (dwarf2_start_symtab): Set list_in_scope.
1273
1274 2018-07-20 Tom Tromey <tom@tromey.com>
1275
1276 * dwarf2read.c (process_psymtab_comp_unit_reader)
1277 (build_type_psymtabs_reader): Do not set list_in_scope.
1278
1279 2018-07-20 Tom Tromey <tom@tromey.com>
1280
1281 * buildsym.c (free_pendings): Remove.
1282 (add_symbol_to_list, scoped_free_pendings)
1283 (finish_block_internal, buildsym_init): Update.
1284
1285 2018-07-20 Tom Tromey <tom@tromey.com>
1286
1287 * xcoffread.c (read_xcoff_symtab): Update.
1288 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1289 Update.
1290 * dbxread.c (process_one_symbol): Update.
1291 * coffread.c (coff_symtab_read): Update.
1292 * buildsym.h (finish_block): Update.
1293 * buildsym.c (finish_block): Remove "listhead" argument.
1294 (end_symtab_get_static_block): Update.
1295
1296 2018-07-20 Tom Tromey <tom@tromey.com>
1297
1298 * buildsym.h (class scoped_free_pendings): Remove constructor.
1299 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1300 method.
1301 <m_pending_block_obstack, m_pending_blocks>: New members.
1302 (pending_block_obstack, pending_blocks): Remove.
1303 (scoped_free_pendings::scoped_free_pendings): Default.
1304 (~scoped_free_pendings): Update.
1305 (free_pending_blocks): Remove.
1306 (finish_block_internal, record_pending_block, make_blockvector)
1307 (end_symtab_get_static_block, augment_type_symtab, push_context)
1308 (buildsym_init): Update.
1309
1310 2018-07-20 Tom Tromey <tom@tromey.com>
1311
1312 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1313 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1314 members.
1315 (pending_addrmap, pending_addrmap_obstack)
1316 (pending_addrmap_interesting): Remove.
1317 (scoped_free_pendings, record_block_range, make_blockvector)
1318 (prepare_for_building, reset_symtab_globals, buildsym_init):
1319 Update.
1320
1321 2018-07-20 Tom Tromey <tom@tromey.com>
1322
1323 * xcoffread.c (process_linenos): Update.
1324 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1325 * mdebugread.c (psymtab_to_symtab_1): Update.
1326 * dwarf2read.c (setup_type_unit_groups)
1327 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1328 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1329 * dbxread.c (process_one_symbol): Update.
1330 * coffread.c (coff_symtab_read, enter_linenos)
1331 (process_coff_symbol): Update.
1332 * buildsym.h (current_subfile): Don't declare.
1333 (get_current_subfile): Declare.
1334 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1335 member.
1336 (start_subfile, free_buildsym_compunit, push_subfile)
1337 (prepare_for_building, start_symtab): Update.
1338 (get_current_subfile): New function.
1339
1340 2018-07-20 Tom Tromey <tom@tromey.com>
1341
1342 * coffread.c (coff_symtab_read): Update.
1343 * xcoffread.c (read_xcoff_symtab): Update.
1344 * dwarf2read.c (new_symbol): Update.
1345 (read_func_scope, read_lexical_block_scope): Update.
1346 * dbxread.c (process_one_symbol): Update.
1347 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1348 (outermost_context_p): Remove macro.
1349 (outermost_context_p, get_current_context_stack)
1350 (get_context_stack_depth): Declare.
1351 (pop_context): Return struct context_stack.
1352 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1353 member.
1354 (context_stack_size): Remove.
1355 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1356 (prepare_for_building, end_symtab_get_static_block)
1357 (augment_type_symtab, push_context): Update.
1358 (pop_context): Return struct context_stack.
1359 (outermost_context_p, get_current_context_stack)
1360 (get_context_stack_depth): New functions.
1361 (buildsym_init): Update.
1362
1363 2018-07-20 Tom Tromey <tom@tromey.com>
1364
1365 * rust-exp.y: Now a pure parser. Update all rules.
1366 (%union): Move earlier.
1367 (current_parser, work_obstack): Remove globals.
1368 (rust_parser, ~rust_parser): Update.
1369 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1370 lex_character, lex_number, lex_string, lex_identifier,
1371 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1372 convert_name, convert_params_to_expression,
1373 convert_ast_to_expression, ast_basic_type, ast_operation,
1374 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1375 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1376 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1377 ast_array_type, ast_slice_type, ast_reference_type,
1378 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1379 (rust_parse): Update.
1380 (rustyyerror, rustyylex): Add parser parameter.
1381 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1382 (rust_lex_stringish_test, rust_lex_test_sequence)
1383 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1384 (rust_lex_test_push_back, rust_lex_tests): Update.
1385
1386 2018-07-19 Pedro Alves <palves@redhat.com>
1387
1388 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1389 gdb::unique_xmalloc_ptr.
1390 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1391 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1392 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1393 copy-initialization.
1394 * guile/scm-pretty-print.c (ppscm_print_children): Use
1395 gdb::unique_xmalloc_ptr instead of cleanups.
1396 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1397 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1398 gdb::unique_xmalloc_ptr.
1399 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1400 Adjust to use gdb::unique_xmalloc_ptr.
1401 * guile/scm-utils.c (extract_arg): Adjust.
1402 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1403 gdb::unique_xmalloc_ptr instead of a cleanup.
1404
1405 2018-07-19 Tom Tromey <tom@tromey.com>
1406
1407 * utils.c (do_value_free_to_mark)
1408 (make_cleanup_value_free_to_mark): Remove.
1409 * utils.h (make_cleanup_value_free_to_mark): Remove.
1410
1411 2018-07-19 Pedro Alves <palves@redhat.com>
1412
1413 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1414 forwarding reference.
1415
1416 2018-07-18 Pedro Alves <palves@redhat.com>
1417
1418 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1419 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1420 cleanup.
1421
1422 2018-07-18 Pedro Alves <palves@redhat.com>
1423
1424 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1425 exceptions.
1426 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1427 (gdbscm_wrap): New.
1428 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1429 directly instead of a cleanup.
1430 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1431 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1432 (vlscm_binop_gdbthrow): New, factored out from ...
1433 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1434 (vlscm_rich_compare): Use gdbscm_wrap.
1435 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1436 instead of a cleanup.
1437 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1438 cleanup.
1439 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1440 Use xfree directly instead of a cleanup.
1441 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1442 Adjust to use gdbscm_wrap and scoped_value_mark.
1443 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1444 (gdbscm_value_address, gdbscm_value_dereference)
1445 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1446 scoped_value_mark.
1447 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1448 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1449 scoped_value_mark.
1450 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1451 gdbscm_wrap and scoped_value_mark.
1452 (gdbscm_value_to_string): Use xfree directly instead of a
1453 cleanup. Move 'buffer' unique_ptr to TRY scope.
1454 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1455 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1456 scoped_value_mark.
1457 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1458 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1459 scoped_value_mark.
1460 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1461 gdbscm_wrap.
1462
1463 2018-07-18 Tom de Vries <tdevries@suse.de>
1464
1465 * findvar.c (default_read_var_value): Also resolve dynamic type for
1466 LOC_OPTIMIZED_OUT vars.
1467
1468 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1469
1470 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1471 decoding.
1472
1473 2018-07-17 Tom Tromey <tom@tromey.com>
1474
1475 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1476 (compute_enum_list, pascm_set_param_value_x)
1477 (gdbscm_parameter_value): Update.
1478 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1479 (gdbscm_scm_to_host_string): Update.
1480 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1481 Update.
1482 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1483 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1484 * guile/scm-string.c (gdbscm_scm_to_string): Return
1485 unique_xmalloc_ptr.
1486 (gdbscm_scm_to_host_string): Likewise.
1487
1488 2018-07-17 Tom Tromey <tom@tromey.com>
1489
1490 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1491 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1492 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1493 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1494 unique_xmalloc_ptr.
1495
1496 2018-07-17 Tom Tromey <tom@tromey.com>
1497
1498 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1499 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1500 Update.
1501 * guile/scm-cmd.c (cmdscm_function): Update.
1502 * guile/scm-pretty-print.c
1503 (ppscm_print_exception_unless_memory_error): Update.
1504 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1505 Return unique_xmalloc_ptr.
1506
1507 2018-07-17 Tom Tromey <tom@tromey.com>
1508
1509 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1510 Use string_printf.
1511
1512 2018-07-17 Jim Wilson <jimw@sifive.com>
1513
1514 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1515 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1516 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1517 unecessary braces after EF_RISCV_RVC test. Delete call to
1518 set_gdbarch_decr_pc_after_break.
1519
1520 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1521 RISCV_LAST_FP_REGNUM + 1.
1522 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1523
1524 2018-07-17 Tom Tromey <tom@tromey.com>
1525
1526 * configure.ac: Remove --disable-gdbcli.
1527 * configure: Rebuild.
1528 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1529 (SUBDIR_CLI_CFLAGS): Remove.
1530 (SFILES): Use SUBDIR_CLI_SRCS.
1531 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1532
1533 2018-07-17 Tom Tromey <tom@tromey.com>
1534
1535 PR gdb/18624:
1536 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1537
1538 2018-07-16 Jim Wilson <jimw@sifive.com>
1539
1540 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1541
1542 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1543
1544 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1545 variable.
1546 (libunwind_frame_sniffer): Likewise.
1547 (libunwind_frame_prev_register): Likewise.
1548 (libunwind_sigtramp_frame_sniffer): Likewise.
1549 * ia64-tdep.c (ia64_access_reg): Likewise.
1550 (ia64_access_rse_reg): Likewise.
1551 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1552 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1553
1554 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1555
1556 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1557
1558 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1559
1560 * remote-sim.c (gdbsim_target::close,
1561 gdbsim_target::mourn_inferior): Remove unused variables.
1562
1563 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1564
1565 * ia64-tdep.c (ktab_buf): New global.
1566 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1567 (get_kernel_table): Adjust.
1568
1569 2018-07-16 Tom Tromey <tom@tromey.com>
1570
1571 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1572 * dwarf2read.c (using_directives, new_symbol): Use
1573 outermost_context_p.
1574 * dbxread.c (process_one_symbol): Use outermost_context_p.
1575 * coffread.c (coff_symtab_read): Use outermost_context_p.
1576
1577 2018-07-16 Tom Tromey <tom@tromey.com>
1578
1579 * dwarf2read.c (using_directives, read_func_scope)
1580 (read_lexical_block_scope): Update.
1581 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1582 * buildsym.h (local_using_directives, global_using_directives):
1583 Don't declare.
1584 (get_local_using_directives, set_local_using_directives)
1585 (get_global_using_directives): Declare.
1586 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1587 m_global_using_directives>: New members.
1588 (finish_block_internal, prepare_for_building)
1589 (reset_symtab_globals, end_symtab_get_static_block)
1590 (push_context): Update.
1591 (get_local_using_directives, set_local_using_directives)
1592 (get_global_using_directives): New functions.
1593 (buildsym_init): Update.
1594
1595 2018-07-16 Tom Tromey <tom@tromey.com>
1596
1597 * xcoffread.c (xcoff_initial_scan): Don't call
1598 free_pending_blocks.
1599 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1600 * buildsym.h (class scoped_free_pendings): Add constructor.
1601 (free_pending_blocks): Don't declare.
1602 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1603 (free_pending_blocks): Now static.
1604
1605 2018-07-16 Tom Tromey <tom@tromey.com>
1606
1607 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1608 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1609 member.
1610 (struct subfile_stack): Remove.
1611 (subfile_stack): Remove.
1612 (push_subfile, pop_subfile, buildsym_init): Update.
1613
1614 2018-07-16 Tom Tromey <tom@tromey.com>
1615
1616 * buildsym.c (push_subfile): Use gdb_assert.
1617 (pop_subfile): Use gdb_assert.
1618
1619 2018-07-16 Tom Tromey <tom@tromey.com>
1620
1621 * buildsym.h (merge_symbol_lists): Remove.
1622 * buildsym.c (merge_symbol_lists): Remove.
1623
1624 2018-07-16 Tom Tromey <tom@tromey.com>
1625
1626 * stabsread.c (scan_file_globals): Update comment.
1627 * stabsread.h (scan_file_globals): Move from buildsym.h.
1628 * buildsym.h (scan_file_globals): Move to stabsread.h.
1629
1630 2018-07-16 Tom Tromey <tom@tromey.com>
1631
1632 * xcoffread.c (xcoff_new_init): Update.
1633 * mipsread.c (mipscoff_new_init): Update.
1634 * mdebugread.c (mdebug_build_psymtabs): Update.
1635 * elfread.c (elf_new_init): Update.
1636 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1637 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1638 * buildsym.h (buildsym_new_init): Don't declare.
1639 * buildsym.c (buildsym_new_init): Remove.
1640
1641 2018-07-16 Tom Tromey <tom@tromey.com>
1642
1643 * stabsread.h (within_function): Move from buildsym.h.
1644 * stabsread.c (start_stabs): Clear within_function.
1645 * coffread.c (coff_start_symtab): Clear within_function.
1646 * buildsym.h (within_function): Move to stabsread.h.
1647 * buildsym.c (prepare_for_building): Update.
1648
1649 2018-07-16 Tom Tromey <tom@tromey.com>
1650
1651 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1652 * dwarf2read.c (dwarf2_start_symtab): Don't set
1653 processing_gcc_compilation.
1654 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1655
1656 2018-07-16 Tom Tromey <tom@tromey.com>
1657
1658 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1659 (next_symbol_text_func): Move from buildsym.h.
1660 * stabsread.c (hashname): Move from buildsym.c.
1661 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1662 (next_symbol_text_func, hashname): Move to stabsread.h.
1663 * buildsym.c: Don't include bcache.h
1664 (hashname): Move to stasbread.c.
1665
1666 2018-07-16 Tom Tromey <tom@tromey.com>
1667
1668 * buildsym.h (context_stack_size): Don't declare.
1669 * buildsym.c (context_stack_size): New global.
1670
1671 2018-07-16 Tom Tromey <tom@tromey.com>
1672
1673 * dbxread.c (processing_acc_compilation): New global.
1674 * buildsym.h (processing_acc_compilation): Don't declare.
1675
1676 2018-07-16 Tom Tromey <tom@tromey.com>
1677
1678 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1679 * dbxread.c (read_ofile_symtab): Update.
1680 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1681 * buildsym.h (last_source_start_addr): Remove.
1682 (set_last_source_start_addr, get_last_source_start_addr):
1683 Declare.
1684 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1685 parameter.
1686 (struct buildsym_compunit) <m_last_source_start_addr>: New
1687 member.
1688 (prepare_for_building): Remove start_addr parameter.
1689 (start_symtab, restart_symtab, end_symtab_get_static_block)
1690 (end_symtab_with_blockvector): Update.
1691 (set_last_source_start_addr, get_last_source_start_addr): New
1692 functions.
1693
1694 2018-07-16 Tom Tromey <tom@tromey.com>
1695
1696 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1697 member.
1698 (have_line_numbers): Remove.
1699 (record_line, prepare_for_building, end_symtab_get_static_block)
1700 (augment_type_symtab): Update.
1701
1702 2018-07-16 Tom Tromey <tom@tromey.com>
1703
1704 * buildsym.c (~buildsym_compunit): Free the macro table.
1705 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1706 methods.
1707 <m_pending_macros>: New member.
1708 (pending_macros): Remove.
1709 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1710 (reset_symtab_globals, end_symtab_get_static_block)
1711 (end_symtab_with_blockvector, augment_type_symtab)
1712 (buildsym_init): Update.
1713
1714 2018-07-16 Tom Tromey <tom@tromey.com>
1715
1716 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1717 parameter.
1718 (buildsym_compunit::set_last_source_file): New method.
1719 <m_last_source_file>: New member.
1720 (prepare_for_building): Remove "name" parameter.
1721 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1722 (last_source_file): Remove.
1723 (set_last_source_file, get_last_source_file): Update.
1724
1725 2018-07-16 Tom Tromey <tom@tromey.com>
1726
1727 * buildsym.c (prepare_for_building): Add assert.
1728
1729 2018-07-16 Tom Tromey <tom@tromey.com>
1730
1731 * buildsym.c (~buildsym_compunit): Update.
1732 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1733 (start_subfile, patch_subfile_names)
1734 (end_symtab_with_blockvector): Update.
1735
1736 2018-07-16 Tom Tromey <tom@tromey.com>
1737
1738 * buildsym.c (struct buildsym_compunit): Add constructor,
1739 destructor, initializers.
1740 (start_buildsym_compunit): Remove.
1741 (free_buildsym_compunit): Use "delete".
1742 (start_symtab, restart_symtab): Use "new".
1743
1744 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1745
1746 * symfile.c (set_objfile_default_section_offset): Remove struct
1747 keyword.
1748
1749 2018-07-14 Stafford Horne <shorne@gmail.com>
1750
1751 * (Responsible Maintainers): Add myself as or1k maintainer.
1752
1753 2018-07-13 Tom Tromey <tom@tromey.com>
1754
1755 * symfile.c (set_objfile_default_section_offset): Use extra braces
1756 around initializer.
1757
1758 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1759
1760 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1761 non-branching basr.
1762
1763 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1764
1765 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1766 unittests/cli-utils-selftests.c
1767 * unittests/cli-utils-selftests.c: New file.
1768
1769 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1770
1771 * NEWS: Mention new commands. Mention change to 'thread apply'.
1772
1773 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1774
1775 * thread.c (thr_try_catch_cmd): New function.
1776 (thread_apply_all_command): Handle qcs flags.
1777 (thread_apply_command): Handle qcs flags.
1778 (taas_command): New function.
1779 (tfaas_command): New function.
1780 (_initialize_thread): Update to setup the new commands 'taas
1781 and 'tfaas'. Change doc string for 'thread apply'.
1782
1783 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1784
1785 * stack.c: (trailing_outermost_frame): New function, mostly
1786 extracted from backtrace_command_1.
1787 (leading_innermost_frame): New function.
1788 (backtrace_command_1): Update to call trailing_outermost_frame.
1789 (frame_apply_command_count): New function.
1790 (frame_apply_level_command): New function.
1791 (frame_apply_all_command): New function.
1792 (frame_apply_command): New function.
1793 (faas_command): New function.
1794 (frame_cmd_list): New variable.
1795 (_initialize_stack): Update to setup the new commands 'frame apply'
1796 and 'faas'.
1797
1798 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1799
1800 * cli-utils.c (number_or_range_parser::get_number): Only handle
1801 numbers or convenience var as numbers.
1802 (parse_flags): New function.
1803 (parse_flags_qcs): New function.
1804 (number_or_range_parser::finished): Ensure parsing end is detected
1805 before end of string.
1806 * cli-utils.h (parse_flags): New function.
1807 (parse_flags_qcs): New function.
1808 (number_or_range_parser): Remove m_finished bool.
1809 (number_or_range_parser::skip_range): Set m_in_range to false.
1810
1811 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1812
1813 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1814 on Windows.
1815
1816 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1817 Jan Kratochvil <jan.kratochvil@redhat.com>
1818 Paul Fertser <fercerpav@gmail.com>
1819 Tsutomu Seki <sekiriki@gmail.com>
1820 Pedro Alves <palves@redhat.com>
1821
1822 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1823 'unittests/parse-connection-spec-selftests.c'.
1824 (COMMON_SFILES): Add 'common/netstuff.c'.
1825 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1826 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1827 * common/netstuff.c: New file.
1828 * common/netstuff.h: New file.
1829 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1830 (wait_for_connect): Update comment. New parameter
1831 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1832 Use 'sock' directly instead of 'scb->fd'.
1833 (try_connect): New function, with code from 'net_open'.
1834 (net_open): Rewrite main loop to deal with multiple
1835 sockets/addresses. Handle IPv6-style hostnames; implement
1836 support for IPv6 connections.
1837 * unittests/parse-connection-spec-selftests.c: New file.
1838
1839 2018-07-11 Pedro Alves <palves@redhat.com>
1840
1841 PR gdb/23377
1842 * remote.c (remote_target::remote_detach_pid): Call
1843 set_current_process.
1844
1845 2018-07-11 Pedro Alves <palves@redhat.com>
1846
1847 * h8300-tdep.c (h8300_gdbarch_init): Remove
1848 set_gdbarch_ecoff_reg_to_regnum calls.
1849
1850 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1851
1852 PR c++/23373
1853 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1854 offsets/sizes for static members of a class/struct.
1855
1856 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1857
1858 * target-descriptions.c (tdesc_register_bitsize): Rename.
1859 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1860 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1861 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1862
1863 2018-07-10 Tom Tromey <tom@tromey.com>
1864
1865 * breakpoint.c (moribund_locations): Now static and a
1866 std::vector.
1867 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1868 (build_bpstat_chain, update_global_location_list)
1869 (breakpoint_retire_moribund): Update.
1870 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1871 VEC.
1872
1873 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1874
1875 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1876 (riscv_register_reggroup_p): Use new function, remove unneeded
1877 parenthesis.
1878 (riscv_push_dummy_call): Extend assert to compare against xlen or
1879 flen based on register type.
1880
1881 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1882
1883 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1884
1885 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1886
1887 * remote.c (show_hardware_watchpoint_limit): New function.
1888 (show_hardware_watchpoint_length_limit): New function.
1889 (show_hardware_breakpoint_limit): New function.
1890 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1891 where appropriate, update help text.
1892
1893 2018-07-09 Tom Tromey <tom@tromey.com>
1894
1895 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1896 (CLIBS): Don't mention NAT_CLIBS.
1897
1898 2018-07-09 Tom Tromey <tom@tromey.com>
1899
1900 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1901 (LIBGDB_OBS, clean mostlyclean): Update.
1902 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1903
1904 2018-07-09 Tom Tromey <tom@tromey.com>
1905
1906 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1907 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1908 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1909
1910 2018-07-09 Tom Tromey <tom@tromey.com>
1911
1912 * Makefile.in (ALLDEPFILES): Remove exec.c.
1913 (COMMON_OBS): Remove exec.o.
1914 (COMMON_SFILES): Add exec.c.
1915
1916 2018-07-09 Tom Tromey <tom@tromey.com>
1917
1918 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1919
1920 2018-07-09 Tom Tromey <tom@tromey.com>
1921
1922 * Makefile.in (clean mostlyclean): Remove stamp-version.
1923 (version.c): Depend on stamp-version.
1924 (stamp-version): New rule, from version.c rule.
1925
1926 2018-07-09 Tom Tromey <tom@tromey.com>
1927
1928 * Makefile.in (init.c): Depend on stamp-init.
1929 (stamp-init): New rule, from init.c rule.
1930 (clean mostlyclean): Remove stamp-init.
1931
1932 2018-07-09 Tom Tromey <tom@tromey.com>
1933
1934 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1935 SUBDIR_GCC_COMPILE_SRCS.
1936
1937 2018-07-09 Tom Tromey <tom@tromey.com>
1938
1939 * Makefile.in (init.c): Remove some unused sed rules.
1940
1941 2018-07-09 Tom Tromey <tom@tromey.com>
1942
1943 * Makefile.in (TSOBS): Remove.
1944 (INIT_FILES): Update.
1945 (LIBGDB_OBS): Update.
1946 (COMMON_SFILES): Add inflow.c.
1947 (SFILES): Remove inflow.c.
1948
1949 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1950
1951 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1952
1953 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1954
1955 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1956 get_saveloc_name, is_signal_frame_name, step_name,
1957 init_remote_name, create_addr_space_name,
1958 destroy_addr_space_name, search_unwind_table_name,
1959 find_dyn_list_name): Constify.
1960
1961 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1962
1963 * darwin-nat.c (darwin_pthread_kill): New function.
1964 (darwin_resume_thread): Use darwin_pthread_kill.
1965
1966 2018-07-05 Tom de Vries <tdevries@suse.de>
1967
1968 * macroexp.c (macro_buffer) <operator=>: New member function.
1969
1970 2018-07-04 Tom Tromey <tom@tromey.com>
1971
1972 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1973
1974 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1975
1976 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1977 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1978 * maint.c: Likewise.
1979 * top.c: Likewise.
1980
1981 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1982
1983 * NEWS: Create a new section for the next release branch.
1984 Rename the section of the current branch, now that it has
1985 been cut.
1986
1987 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1988
1989 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1990 * version.in: Bump version to 8.2.50.DATE-git.
1991
1992 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1993 Pedro Alves <palves@redhat.com>
1994
1995 * linux-nat.c (linux_init_ptrace): Rename to ...
1996 (linux_init_ptrace_procfs): ... this. Call
1997 linux_proc_init_warnings.
1998 (linux_nat_target::post_attach)
1999 (linux_nat_target::post_startup_inferior): Adjust.
2000 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2001 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2002
2003 2018-07-04 Tom de Vries <tdevries@suse.de>
2004
2005 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2006 check ...
2007 (read_comp_unit_head): ... here.
2008
2009 2018-07-03 Tom Tromey <tom@tromey.com>
2010
2011 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2012 (stop_tracing, tstatus_command)
2013 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2014 (print_one_static_tracepoint_marker): Update.
2015 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2016 std::vector.
2017 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2018 VEC.
2019 (all_tracepoints, static_tracepoints_here): Return std::vector.
2020
2021 2018-07-03 Tom Tromey <tom@tromey.com>
2022
2023 * common/ptid.c (ptid_equal): Remove.
2024 * common/ptid.h (ptid_equal): Don't declare.
2025 * ada-tasks.c: Update.
2026 * breakpoint.c: Update.
2027 * common/agent.c: Update.
2028 * corelow.c: Update.
2029 * darwin-nat-info.c: Update.
2030 * darwin-nat.c: Update.
2031 * dcache.c: Update.
2032 * dtrace-probe.c: Update.
2033 * dummy-frame.c: Update.
2034 * fbsd-nat.c: Update.
2035 * frame.c: Update.
2036 * gdbthread.h: Update.
2037 * gnu-nat.c: Update.
2038 * go32-nat.c: Update.
2039 * inf-loop.c: Update.
2040 * inf-ptrace.c: Update.
2041 * infcall.c: Update.
2042 * infcmd.c: Update.
2043 * inflow.c: Update.
2044 * infrun.c: Update.
2045 * linux-fork.c: Update.
2046 * linux-nat.c: Update.
2047 * linux-thread-db.c: Update.
2048 * mi/mi-cmd-var.c: Update.
2049 * mi/mi-interp.c: Update.
2050 * mi/mi-main.c: Update.
2051 * nto-procfs.c: Update.
2052 * ppc-linux-tdep.c: Update.
2053 * procfs.c: Update.
2054 * python/py-inferior.c: Update.
2055 * python/py-record-btrace.c: Update.
2056 * python/py-record.c: Update.
2057 * ravenscar-thread.c: Update.
2058 * regcache.c: Update.
2059 * remote-sim.c: Update.
2060 * remote.c: Update.
2061 * sol-thread.c: Update.
2062 * solib.c: Update.
2063 * target.c: Update.
2064 * tui/tui-stack.c: Update.
2065 * varobj.c: Update.
2066 * windows-nat.c: Update.
2067 * windows-tdep.c: Update.
2068
2069 2018-07-03 Tom Tromey <tom@tromey.com>
2070
2071 * common/ptid.c (ptid_match): Remove.
2072 * common/ptid.h (ptid_match): Don't declare.
2073 * fbsd-nat.c: Update.
2074 * infcmd.c: Update.
2075 * infrun.c: Update.
2076 * linux-nat.c: Update.
2077 * record-btrace.c: Update.
2078 * regcache.c: Update.
2079 * remote.c: Update.
2080
2081 2018-07-03 Tom Tromey <tom@tromey.com>
2082
2083 * common/ptid.c (ptid_tid_p): Remove.
2084 * common/ptid.h (ptid_tid_p): Don't declare.
2085 * sol-thread.c: Update.
2086
2087 2018-07-03 Tom Tromey <tom@tromey.com>
2088
2089 * common/ptid.c (ptid_lwp_p): Remove.
2090 * common/ptid.h (ptid_lwp_p): Don't declare.
2091 * fbsd-nat.c: Update.
2092 * linux-nat.c: Update.
2093 * nat/linux-procfs.c: Update.
2094 * nat/x86-linux-dregs.c: Update.
2095 * sol-thread.c: Update.
2096
2097 2018-07-03 Tom Tromey <tom@tromey.com>
2098
2099 * common/ptid.c (ptid_is_pid): Remove.
2100 * common/ptid.h (ptid_is_pid): Don't declare.
2101 * infrun.c: Update.
2102 * linux-nat.c: Update.
2103 * mi/mi-interp.c: Update.
2104 * remote.c: Update.
2105 * thread.c: Update.
2106
2107 2018-07-03 Tom Tromey <tom@tromey.com>
2108
2109 * common/ptid.c (ptid_get_tid): Remove.
2110 * common/ptid.h (ptid_get_tid): Don't declare.
2111 * ada-tasks.c: Update.
2112 * aix-thread.c: Update.
2113 * bsd-uthread.c: Update.
2114 * darwin-nat.c: Update.
2115 * fbsd-nat.c: Update.
2116 * i386-darwin-nat.c: Update.
2117 * infrun.c: Update.
2118 * linux-tdep.c: Update.
2119 * nto-procfs.c: Update.
2120 * ppc-ravenscar-thread.c: Update.
2121 * python/py-infthread.c: Update.
2122 * ravenscar-thread.c: Update.
2123 * sol-thread.c: Update.
2124 * sparc-ravenscar-thread.c: Update.
2125 * windows-nat.c: Update.
2126
2127 2018-07-03 Tom Tromey <tom@tromey.com>
2128
2129 * common/ptid.c (ptid_get_lwp): Remove.
2130 * common/ptid.h (ptid_get_lwp): Don't declare.
2131 * aarch64-linux-nat.c: Update.
2132 * ada-tasks.c: Update.
2133 * aix-thread.c: Update.
2134 * amd64-linux-nat.c: Update.
2135 * arm-linux-nat.c: Update.
2136 * corelow.c: Update.
2137 * fbsd-nat.c: Update.
2138 * fbsd-tdep.c: Update.
2139 * gnu-nat.c: Update.
2140 * i386-cygwin-tdep.c: Update.
2141 * i386-gnu-nat.c: Update.
2142 * i386-linux-nat.c: Update.
2143 * ia64-linux-nat.c: Update.
2144 * inf-ptrace.c: Update.
2145 * infrun.c: Update.
2146 * linux-fork.c: Update.
2147 * linux-nat.c: Update.
2148 * linux-tdep.c: Update.
2149 * linux-thread-db.c: Update.
2150 * mips-linux-nat.c: Update.
2151 * nat/aarch64-linux-hw-point.c: Update.
2152 * nat/aarch64-linux.c: Update.
2153 * nat/linux-btrace.c: Update.
2154 * nat/linux-osdata.c: Update.
2155 * nat/linux-procfs.c: Update.
2156 * nat/x86-linux-dregs.c: Update.
2157 * obsd-nat.c: Update.
2158 * ppc-fbsd-nat.c: Update.
2159 * ppc-linux-nat.c: Update.
2160 * procfs.c: Update.
2161 * python/py-infthread.c: Update.
2162 * ravenscar-thread.c: Update.
2163 * remote.c: Update.
2164 * s390-linux-nat.c: Update.
2165 * sol-thread.c: Update.
2166 * sol2-tdep.c: Update.
2167 * spu-linux-nat.c: Update.
2168 * x86-linux-nat.c: Update.
2169 * xtensa-linux-nat.c: Update.
2170
2171 2018-07-03 Tom Tromey <tom@tromey.com>
2172
2173 * common/ptid.c (ptid_get_pid): Remove.
2174 * common/ptid.h (ptid_get_pid): Don't declare.
2175 * aarch64-linux-nat.c: Update.
2176 * ada-lang.c: Update.
2177 * aix-thread.c: Update.
2178 * alpha-bsd-nat.c: Update.
2179 * amd64-fbsd-nat.c: Update.
2180 * amd64-linux-nat.c: Update.
2181 * arm-linux-nat.c: Update.
2182 * arm-nbsd-nat.c: Update.
2183 * auxv.c: Update.
2184 * break-catch-syscall.c: Update.
2185 * breakpoint.c: Update.
2186 * bsd-uthread.c: Update.
2187 * corelow.c: Update.
2188 * ctf.c: Update.
2189 * darwin-nat.c: Update.
2190 * fbsd-nat.c: Update.
2191 * fbsd-tdep.c: Update.
2192 * gcore.c: Update.
2193 * gnu-nat.c: Update.
2194 * hppa-nbsd-nat.c: Update.
2195 * hppa-obsd-nat.c: Update.
2196 * i386-fbsd-nat.c: Update.
2197 * ia64-linux-nat.c: Update.
2198 * inf-ptrace.c: Update.
2199 * infcmd.c: Update.
2200 * inferior.c: Update.
2201 * inferior.h: Update.
2202 * inflow.c: Update.
2203 * infrun.c: Update.
2204 * linux-fork.c: Update.
2205 * linux-nat.c: Update.
2206 * linux-tdep.c: Update.
2207 * linux-thread-db.c: Update.
2208 * m68k-bsd-nat.c: Update.
2209 * mi/mi-interp.c: Update.
2210 * mi/mi-main.c: Update.
2211 * mips-linux-nat.c: Update.
2212 * mips-nbsd-nat.c: Update.
2213 * mips64-obsd-nat.c: Update.
2214 * nat/aarch64-linux-hw-point.c: Update.
2215 * nat/aarch64-linux.c: Update.
2216 * nat/linux-btrace.c: Update.
2217 * nat/linux-osdata.c: Update.
2218 * nat/linux-procfs.c: Update.
2219 * nat/x86-linux-dregs.c: Update.
2220 * nto-procfs.c: Update.
2221 * obsd-nat.c: Update.
2222 * ppc-linux-nat.c: Update.
2223 * ppc-nbsd-nat.c: Update.
2224 * ppc-obsd-nat.c: Update.
2225 * proc-service.c: Update.
2226 * procfs.c: Update.
2227 * python/py-inferior.c: Update.
2228 * python/py-infthread.c: Update.
2229 * ravenscar-thread.c: Update.
2230 * record.c: Update.
2231 * remote-sim.c: Update.
2232 * remote.c: Update.
2233 * rs6000-nat.c: Update.
2234 * s390-linux-nat.c: Update.
2235 * sh-nbsd-nat.c: Update.
2236 * sol-thread.c: Update.
2237 * sparc-nat.c: Update.
2238 * sparc64-tdep.c: Update.
2239 * spu-linux-nat.c: Update.
2240 * spu-tdep.c: Update.
2241 * target-debug.h: Update.
2242 * target.c: Update.
2243 * thread.c: Update.
2244 * tid-parse.c: Update.
2245 * tracefile-tfile.c: Update.
2246 * vax-bsd-nat.c: Update.
2247 * windows-nat.c: Update.
2248 * x86-linux-nat.c: Update.
2249 * x86-nat.c: Update.
2250
2251 2018-07-03 Tom Tromey <tom@tromey.com>
2252
2253 * common/ptid.c (pid_to_ptid): Remove.
2254 * common/ptid.h (pid_to_ptid): Don't declare.
2255 * aix-thread.c: Update.
2256 * arm-linux-nat.c: Update.
2257 * common/ptid.c: Update.
2258 * common/ptid.h: Update.
2259 * corelow.c: Update.
2260 * ctf.c: Update.
2261 * darwin-nat.c: Update.
2262 * fbsd-nat.c: Update.
2263 * fork-child.c: Update.
2264 * gnu-nat.c: Update.
2265 * go32-nat.c: Update.
2266 * inf-ptrace.c: Update.
2267 * infcmd.c: Update.
2268 * inferior.c: Update.
2269 * infrun.c: Update.
2270 * linux-fork.c: Update.
2271 * linux-nat.c: Update.
2272 * nat/aarch64-linux-hw-point.c: Update.
2273 * nat/fork-inferior.c: Update.
2274 * nat/x86-linux-dregs.c: Update.
2275 * nto-procfs.c: Update.
2276 * obsd-nat.c: Update.
2277 * procfs.c: Update.
2278 * progspace.c: Update.
2279 * remote.c: Update.
2280 * rs6000-nat.c: Update.
2281 * s390-linux-nat.c: Update.
2282 * sol-thread.c: Update.
2283 * spu-linux-nat.c: Update.
2284 * target.c: Update.
2285 * top.c: Update.
2286 * tracefile-tfile.c: Update.
2287 * windows-nat.c: Update.
2288
2289 2018-07-03 Tom Tromey <tom@tromey.com>
2290
2291 * common/ptid.h (ptid_build): Don't declare.
2292 * common/ptid.c (ptid_build): Remove.
2293 * aix-thread.c: Update.
2294 * bsd-kvm.c: Update.
2295 * bsd-uthread.c: Update.
2296 * common/agent.c: Update.
2297 * common/ptid.c: Update.
2298 * common/ptid.h: Update.
2299 * corelow.c: Update.
2300 * darwin-nat.c: Update.
2301 * fbsd-nat.c: Update.
2302 * gnu-nat.c: Update.
2303 * linux-fork.c: Update.
2304 * linux-nat.c: Update.
2305 * linux-thread-db.c: Update.
2306 * nat/linux-osdata.c: Update.
2307 * nat/linux-procfs.c: Update.
2308 * nto-procfs.c: Update.
2309 * obsd-nat.c: Update.
2310 * proc-service.c: Update.
2311 * procfs.c: Update.
2312 * ravenscar-thread.c: Update.
2313 * remote-sim.c: Update.
2314 * remote.c: Update.
2315 * sol-thread.c: Update.
2316 * target.c: Update.
2317 * windows-nat.c: Update.
2318
2319 2018-07-03 Tom Tromey <tom@tromey.com>
2320
2321 * infrun.c (follow_exec): Use exit_inferior_silent.
2322 * inferior.c (exit_inferior_num_silent): Remove.
2323 * inferior.h (exit_inferior_num_silent): Don't declare.
2324
2325 2018-07-03 Tom Tromey <tom@tromey.com>
2326
2327 PR cli/23340:
2328 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2329 inferior_ptid on error.
2330
2331 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2332 Simon Marchi <simon.marchi@polymtl.ca>
2333
2334 PR tdep/8282
2335 * disasm.h (gdb_disassembler): Add
2336 `m_disassembler_options_holder'. member
2337 * disasm.c (get_all_disassembler_options): New function.
2338 (gdb_disassembler::gdb_disassembler): Use it.
2339 (gdb_buffered_insn_length_init_dis): Likewise.
2340 (gdb_buffered_insn_length): Adjust accordingly.
2341 (set_disassembler_options): Handle options with arguments.
2342 (show_disassembler_options_sfunc): Likewise. Add a leading new
2343 line if showing options with descriptions.
2344 (disassembler_options_completer): Adapt to using the
2345 `disasm_options_and_args_t' structure.
2346 * mips-tdep.c (mips_disassembler_options): New variable.
2347 (mips_disassembler_options_o32): Likewise.
2348 (mips_disassembler_options_n32): Likewise.
2349 (mips_disassembler_options_n64): Likewise.
2350 (gdb_print_insn_mips): Don't set `disassembler_options'.
2351 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2352 functions.
2353 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2354 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2355 `gdbarch_disassembler_options_implicit' and
2356 `gdbarch_valid_disassembler_options'.
2357 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2358 `disasm_options_and_args_t' structure.
2359 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2360 method.
2361 (valid_disassembler_options): Switch from `disasm_options_t' to
2362 the `disasm_options_and_args_t' structure.
2363 * NEWS: Document `set disassembler-options' support for the MIPS
2364 target.
2365 * gdbarch.h: Regenerate.
2366 * gdbarch.c: Regenerate.
2367
2368 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2369
2370 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2371
2372 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2373
2374 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2375 parameter in call to amd64_target_description.
2376 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2377 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2378 (amd64fbsd_init_abi): Likewise.
2379 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2380 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2381 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2382 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2383
2384 2018-06-29 Pedro Alves <palves@redhat.com>
2385
2386 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2387 "segments" parameter.
2388 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2389 (_initialize_amd64_tdep): Update call to
2390 amd64_create_target_description.
2391 (amd64_target_description): Add "segments" parameter. Adjust
2392 the implementation to use it.
2393 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2394 call to amd64_create_target_description.
2395 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2396 * gdb/arch/amd64.h (amd64_create_target_description): Add
2397 "segments" register.
2398 * gdb/arch/amd64.c (amd64_create_target_description): Add
2399 "segments" parameter. Call create_feature_i386_64bit_segments
2400 only if SEGMENTS is true.
2401 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2402 call to amd64_create_target_description.
2403
2404 2018-06-29 Pedro Alves <palves@redhat.com>
2405
2406 * thread.c (thread_target_id_str): New, factored out from ...
2407 (print_thread_info_1): ... here. Use it to compute the max
2408 "Target Id" column width.
2409
2410 2018-06-29 Pedro Alves <palves@redhat.com>
2411
2412 * remote.c (remote_target::extra_thread_info): Delete
2413 'display_buf' and 'n' locals. from the cache, regardless of
2414 packet mechanims is in use. Use cache for qThreadExtra and qP
2415 methods too.
2416
2417 2018-06-29 Pedro Alves <palves@redhat.com>
2418
2419 * blockframe.c (find_pc_sect_containing_function): New function.
2420 * breakpoint.c (print_breakpoint_location): Don't call
2421 find_pc_sect_function.
2422 * linespec.c (create_sals_line_offset): Record the location's
2423 symbol in the sal.
2424 * linespec.c (convert_address_location_to_sals): Fill in sal's
2425 symbol with find_pc_sect_containing_function.
2426 * symtab.c (find_function_start_sal): Rename to ...
2427 (find_function_start_sal_1): ... this.
2428 (find_function_start_sal): Reimplement as wrapper around
2429 find_function_start_sal_1, and use
2430 find_pc_sect_containing_function to fill in the sal's symbol.
2431 (find_function_start_sal(symbol*, bool)): Adjust.
2432 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2433 comments.
2434 (find_pc_sect_containing_function): Declare.
2435
2436 2018-06-29 Pedro Alves <palves@redhat.com>
2437
2438 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2439 true if the the location has no symbol.
2440
2441 2018-06-28 Tom Tromey <tom@tromey.com>
2442
2443 * NEWS: Mention --enable-codesign.
2444 * silent-rules.mk (ECHO_SIGN): New variable.
2445 * configure.ac: Add --enable-codesign.
2446 * configure: Rebuild.
2447 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2448 (gdb$(EXEEXT)): Optionally invoke codesign.
2449
2450 2018-06-28 Pedro Alves <palves@redhat.com>
2451
2452 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2453 comments.
2454 (switch_to_thread_no_regs): Adjust comment.
2455 * infcmd.c (stop_pc): Delete.
2456 (post_create_inferior, info_program_command): Replace references
2457 to stop_pc with references to thread_info->suspend.stop_pc.
2458 * inferior.h (stop_pc): Delete declaration.
2459 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2460 (handle_inferior_event_1, handle_signal_stop)
2461 (process_event_stop_test, keep_going_stepped_thread)
2462 (handle_step_into_function, handle_step_into_function_backward)
2463 (print_stop_location): Replace references to stop_pc with
2464 references to thread_info->suspend.stop_pc.
2465 (struct infcall_suspend_state) <stop_pc>: Delete field.
2466 (save_infcall_suspend_state, restore_infcall_suspend_state):
2467 Remove references to inf_stat->stop_pc.
2468 * linux-fork.c (fork_load_infrun_state): Likewise.
2469 * record-btrace.c (record_btrace_set_replay): Likewise.
2470 * record-full.c (record_full_goto_entry): Likewise.
2471 * remote.c (print_one_stopped_thread): Likewise.
2472 * target.c (target_resume): Extend comment.
2473 * thread.c (set_executing_thread): New.
2474 (set_executing): Use it.
2475 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2476 Remove references to stop_pc.
2477
2478 2018-06-28 Pedro Alves <palves@redhat.com>
2479
2480 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2481 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2482
2483 2018-06-28 Tom Tromey <tom@tromey.com>
2484
2485 * coffread.c (coff_symfile_finish): Update.
2486 * xcoffread.c (xcoff_symfile_finish): Update.
2487 * elfread.c (elf_symfile_finish): Update.
2488 * symfile.h (dwarf2_free_objfile): Don't declare.
2489 * dwarf2read.c (_initialize_dwarf2_read): Use
2490 register_objfile_data_with_cleanup.
2491 (dwarf2_free_objfile): Now static. Change signature.
2492
2493 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2494
2495 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2496 option "-o" to add-symbol-file-load to add an offset to each
2497 section's load address.
2498 * symfile.c (set_objfile_default_section_offset): New function.
2499
2500 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2501
2502 * symfile.c (add_symbol_file_command): Make sure that sections
2503 with the same name are sorted in the same order.
2504
2505 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2506
2507 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2508 require the second argument. If omitted, load sections at the
2509 addresses specified in the file.
2510
2511 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2512
2513 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2514 (_initialize_symfile): Add option "-o" to symbol-file to add an
2515 offset to each section of the symbol file.
2516
2517 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2518
2519 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2520
2521 2018-06-27 Tom Tromey <tom@tromey.com>
2522
2523 * stack.c (_initialize_stack): Update "func" help text.
2524
2525 2018-06-27 Tom Tromey <tom@tromey.com>
2526
2527 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2528 std::vector.
2529 (unwind_infopy_str, pyuw_create_unwind_info)
2530 (unwind_infopy_add_saved_register, pyuw_sniffer)
2531 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2532 Update.
2533 (struct saved_reg): Add constructor.
2534 <value>: Now a gdbpy_ref<>.
2535
2536 2018-06-27 Tom Tromey <tom@tromey.com>
2537
2538 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2539
2540 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2541
2542 * gdb-gdb.py.in: Format using autopep8.
2543
2544 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2545
2546 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2547 (type_lookup_function): Recognize CORE_ADDR values.
2548
2549 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2550
2551 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2552 print tag_name.
2553
2554 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2555
2556 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2557 <__lt__>: Add.
2558
2559 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2560
2561 * gdb-gdb.py: Move to...
2562 * gdb-gdb.py.in: ... here.
2563 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2564 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2565 dependencies.
2566 (distclean): Remove gdb-gdb.py when cleaning.
2567 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2568 * configure: Re-generate.
2569
2570 2018-06-27 Pedro Alves <palves@redhat.com>
2571
2572 * proc-service.c (get_ps_regcache): New.
2573 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2574 (ps_lsetfpregs): Use it.
2575
2576 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2577
2578 PR gdb/21695
2579 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2580 (dwarf_decode_lines_1): Adjust.
2581
2582 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2583
2584 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2585 override.
2586 <info_proc>: Likewise.
2587
2588 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2589
2590 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2591 to windows_fetch_one_register, and only handle the case of
2592 fetching one register. Move the code that reloads the context
2593 and iterates over all registers if R is negative to...
2594 (windows_nat_target::fetch_registers): ... here.
2595 (do_windows_store_inferior_registers): Rename to
2596 windows_store_one_register, and only handle the case of storing
2597 one register. Move the code that handles the case where r is
2598 negative to...
2599 (windows_nat_target::store_registers) ... here.
2600
2601 2018-06-26 Tom Tromey <tom@tromey.com>
2602
2603 PR rust/22574:
2604 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2605 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2606 Update.
2607 (rust_internal_print_type): Add podata parameter.
2608 (rust_print_type): Update.
2609
2610 2018-06-26 Tom Tromey <tom@tromey.com>
2611
2612 * typeprint.h (struct print_offset_data) <update, finish,
2613 maybe_print_hole>: New methods.
2614 <indentation>: New constant.
2615 * typeprint.c (print_offset_data::indentation): Define.
2616 (print_offset_data::maybe_print_hole, print_offset_data::update)
2617 (print_offset_data::finish): Move from c-typeprint.c and rename.
2618 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2619 (print_spaces_filtered_with_print_options): Update.
2620 (c_print_type_union_field_offset, maybe_print_hole)
2621 (c_print_type_struct_field_offset): Move to typeprint.c and
2622 rename.
2623 (c_type_print_base_struct_union): Update.
2624
2625 2018-06-25 Pedro Alves <palves@redhat.com>
2626
2627 * gdbthread.h (thread_info_ref, delete_thread)
2628 (delete_thread_silent, first_thread_of_inferior)
2629 (any_thread_of_inferior, switch_to_thread)
2630 (enable_thread_stack_temporaries)
2631 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2632 (get_last_thread_stack_temporary)
2633 (value_in_thread_stack_temporaries, can_access_registers_thread):
2634 Spell out "struct thread_info" instead of just "thread_info".
2635 * inferior.h (notice_new_inferior): Likewise.
2636
2637 2018-06-25 Pedro Alves <palves@redhat.com>
2638
2639 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2640 pass thread_info pointer to delete_thread.
2641 (windows_nat_target::detach): Pass inferior pointer to
2642 detach_inferior.
2643 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2644 delete_thread.
2645 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2646 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2647 and pass a thread_info pointer to delete_thread.
2648 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2649 pass thread_info pointer to delete_thread.
2650 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2651 delete_thread_silent call.
2652 * procfs.c (procfs_target::detach): Pass inferior pointer to
2653 detach_inferior.
2654 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2655 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2656 delete_thread_silent call.
2657 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2658 pass thread_info pointer to delete_thread.
2659 (windows_nat_target::detach): Pass inferior pointer to
2660 delete_inferior.
2661
2662 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2663
2664 * regcache.c (readable_regcache::read_part): Fix asserts.
2665 (reg_buffer::raw_collect_part): New function.
2666 (regcache::write_part): Fix asserts.
2667 (reg_buffer::raw_supply_part): New function.
2668 (regcache::transfer_regset_register): New helper function.
2669 (regcache::transfer_regset): Call new functions.
2670 (regcache_supply_regset): Use gdb_byte*.
2671 (regcache::supply_regset): Likewise.
2672 (regcache_collect_regset): Likewise.
2673 (regcache::collect_regset): Likewise.
2674 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2675 (reg_buffer::raw_supply_part): Likewise.
2676 (regcache::transfer_regset_register): Likewise.
2677 (regcache::transfer_regset): Use gdb_byte*.
2678
2679 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2680
2681 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2682
2683 2018-06-21 Pedro Alves <palves@redhat.com>
2684
2685 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2686 instead of a ptid_t. All callers adjusted.
2687 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2688 adjusted.
2689 (print_ada_task_info, display_current_task_id, task_command_1):
2690 Adjust.
2691 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2692 inferior_thread.
2693 (breakpoint_kind): Adjust.
2694 (remove_breakpoints_pid): Rename to ...
2695 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2696 pointer. All callers adjusted.
2697 (bpstat_clear_actions): Use inferior_thread.
2698 (get_bpstat_thread): New.
2699 (bpstat_do_actions): Use it.
2700 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2701 to take a thread_info pointer. All callers adjusted.
2702 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2703 (breakpoint_re_set_thread): Use inferior_thread.
2704 * breakpoint.h (struct inferior): Forward declare.
2705 (bpstat_stop_status): Update.
2706 (remove_breakpoints_pid): Delete.
2707 (remove_breakpoints_inf): New.
2708 * bsd-uthread.c (bsd_uthread_target::wait)
2709 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2710 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2711 (maint_btrace_packet_history_cmd)
2712 (maint_btrace_clear_packet_history_cmd): Adjust.
2713 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2714 inferior_thread.
2715 * cli/cli-interp.c: Include "inferior.h".
2716 * common/refcounted-object.h (struct
2717 refcounted_object_ref_policy): New.
2718 * compile/compile-object-load.c: Include gdbthread.h.
2719 (store_regs): Use inferior_thread.
2720 * corelow.c (core_target::close): Use current_inferior.
2721 (core_target_open): Adjust to use first_thread_of_inferior and use
2722 the current inferior.
2723 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2724 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2725 <thread>: ... this new field. All references adjusted.
2726 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2727 Take a thread_info pointer instead of a ptid_t.
2728 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2729 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2730 thread_info pointer instead of a ptid_t.
2731 * elfread.c: Include "inferior.h".
2732 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2733 Use inferior_thread.
2734 * eval.c (evaluate_subexp): Likewise.
2735 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2736 inferior_thread.
2737 * gdb_proc_service.h (struct thread_info): Forward declare.
2738 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2739 <thread>: ... this new field. All references adjusted.
2740 * gdbarch.h, gdbarch.c: Regenerate.
2741 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2742 'thread' parameter. All implementations and callers adjusted.
2743 * gdbthread.h (thread_info) <set_running>: New method.
2744 (delete_thread, delete_thread_silent): Take a thread_info pointer
2745 instead of a ptid.
2746 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2747 (first_thread_of_process): Delete, replaced by ...
2748 (first_thread_of_inferior): ... this new function. All callers
2749 adjusted.
2750 (any_live_thread_of_process): Delete, replaced by ...
2751 (any_live_thread_of_inferior): ... this new function. All callers
2752 adjusted.
2753 (switch_to_thread, switch_to_no_thread): Declare.
2754 (is_executing): Delete.
2755 (enable_thread_stack_temporaries): Update comment.
2756 <enable_thread_stack_temporaries>: Take a thread_info pointer
2757 instead of a ptid_t. Incref the thread.
2758 <~enable_thread_stack_temporaries>: Decref the thread.
2759 <m_ptid>: Delete
2760 <m_thr>: New.
2761 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2762 (get_last_thread_stack_temporary)
2763 (value_in_thread_stack_temporaries, can_access_registers_thread):
2764 Take a thread_info pointer instead of a ptid_t. All callers
2765 adjusted.
2766 * infcall.c (get_call_return_value): Use inferior_thread.
2767 (run_inferior_call): Work with thread pointers instead of ptid_t.
2768 (call_function_by_hand_dummy): Work with thread pointers instead
2769 of ptid_t. Use thread_info_ref.
2770 * infcmd.c (proceed_thread_callback): Access thread's state
2771 directly.
2772 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2773 access thread's state directly.
2774 (continue_command): Use inferior_thread.
2775 (info_program_command): Use find_thread_ptid and access thread
2776 state directly.
2777 (proceed_after_attach_callback): Use thread state directly.
2778 (notice_new_inferior): Take a thread_info pointer instead of a
2779 ptid_t. All callers adjusted.
2780 (exit_inferior): Take an inferior pointer instead of a pid. All
2781 callers adjusted.
2782 (exit_inferior_silent): New.
2783 (detach_inferior): Delete.
2784 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2785 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2786 (detach_inferior_command, kill_inferior_command): Use
2787 find_inferior_id instead of valid_gdb_inferior_id and
2788 gdb_inferior_id_to_pid.
2789 (inferior_command): Use inferior and thread pointers.
2790 * inferior.h (struct thread_info): Forward declare.
2791 (notice_new_inferior): Take a thread_info pointer instead of a
2792 ptid_t. All callers adjusted.
2793 (detach_inferior): Delete declaration.
2794 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2795 instead of a pid. All callers adjusted.
2796 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2797 (valid_gdb_inferior_id): Delete.
2798 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2799 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2800 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2801 ...
2802 <inf>: ... this new field.
2803 <step_ptid>: Delete, replaced by ...
2804 <step_thread>: ... this new field.
2805 (get_displaced_stepping_state): Take an inferior pointer instead
2806 of a pid. All callers adjusted.
2807 (displaced_step_in_progress_any_inferior): Adjust.
2808 (displaced_step_in_progress_thread): Take a thread pointer instead
2809 of a ptid_t. All callers adjusted.
2810 (displaced_step_in_progress, add_displaced_stepping_state): Take
2811 an inferior pointer instead of a pid. All callers adjusted.
2812 (get_displaced_step_closure_by_addr): Adjust.
2813 (remove_displaced_stepping_state): Take an inferior pointer
2814 instead of a pid. All callers adjusted.
2815 (displaced_step_prepare_throw, displaced_step_prepare)
2816 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2817 All callers adjusted.
2818 (start_step_over): Adjust.
2819 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2820 displaced step queue.
2821 (do_target_resume): Adjust.
2822 (fetch_inferior_event): Use inferior_thread.
2823 (context_switch, get_inferior_stop_soon): Take an
2824 execution_control_state pointer instead of a ptid_t. All callers
2825 adjusted.
2826 (switch_to_thread_cleanup): Delete.
2827 (stop_all_threads): Use scoped_restore_current_thread.
2828 * inline-frame.c: Include "gdbthread.h".
2829 (inline_state) <inline_state>: Take a thread pointer instead of a
2830 ptid_t. All callers adjusted.
2831 <ptid>: Delete, replaced by ...
2832 <thread>: ... this new field.
2833 (find_inline_frame_state): Take a thread pointer instead of a
2834 ptid_t. All callers adjusted.
2835 (skip_inline_frames, step_into_inline_frame)
2836 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2837 pointer instead of a ptid_t. All callers adjusted.
2838 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2839 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2840 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2841 pointers directly.
2842 * linux-nat.c (get_detach_signal): Likewise.
2843 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2844 (thread_db_notice_clone): Adjust.
2845 (thread_db_find_new_threads_silently)
2846 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2847 a thread pointer instead of a ptid_t. All callers adjusted.
2848 * mi/mi-cmd-var.c: Include "inferior.h".
2849 (mi_cmd_var_update_iter): Update to use thread pointers.
2850 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2851 inferior directly.
2852 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2853 out to ...
2854 (mi_output_running): ... this new function.
2855 (mi_on_resume_1): Adjust to use it.
2856 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2857 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2858 directly.
2859 (interrupt_thread_callback): : Adjust to use thread and inferior
2860 pointers.
2861 * proc-service.c: Include "gdbthread.h".
2862 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2863 * progspace-and-thread.c: Include "inferior.h".
2864 * progspace.c: Include "inferior.h".
2865 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2866 hold a reference to an inferior_object.
2867 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2868 inferior_thread.
2869 * python/py-inferior.c (struct inferior_object): Give the type a
2870 tag name instead of a typedef.
2871 (python_on_normal_stop): No need to check if the current thread is
2872 listed.
2873 (inferior_to_inferior_object): Change return type to
2874 inferior_object. All callers adjusted.
2875 (find_thread_object): Delete, bits factored out to ...
2876 (thread_to_thread_object): ... this new function.
2877 * python/py-infthread.c (create_thread_object): Use
2878 inferior_to_inferior_object.
2879 (thpy_is_stopped): Use thread pointer directly.
2880 (gdbpy_selected_thread): Use inferior_thread.
2881 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2882 field, replaced with ...
2883 <thread>: ... this new field. All users adjusted.
2884 (btpy_insn_or_gap_new): Drop const.
2885 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2886 callers adjusted.
2887 * python/py-record.c: Include "gdbthread.h".
2888 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2889 a ptid_t. All callers adjusted.
2890 (gdbpy_current_recording): Use inferior_thread.
2891 * python/py-record.h (recpy_record_object) <ptid>: Delete
2892 field, replaced with ...
2893 <thread>: ... this new field. All users adjusted.
2894 (recpy_element_object) <ptid>: Delete
2895 field, replaced with ...
2896 <thread>: ... this new field. All users adjusted.
2897 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2898 a ptid_t. All callers adjusted.
2899 * python/py-threadevent.c: Include "gdbthread.h".
2900 (get_event_thread): Use thread_to_thread_object.
2901 * python/python-internal.h (struct inferior_object): Forward
2902 declare.
2903 (find_thread_object, find_inferior_object): Delete declarations.
2904 (thread_to_thread_object, inferior_to_inferior_object): New
2905 declarations.
2906 * record-btrace.c: Include "inferior.h".
2907 (require_btrace_thread): Use inferior_thread.
2908 (record_btrace_frame_sniffer)
2909 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2910 (get_thread_current_frame): Use scoped_restore_current_thread and
2911 switch_to_thread.
2912 (get_thread_current_frame): Use thread pointer directly.
2913 (record_btrace_replay_at_breakpoint): Use thread's inferior
2914 pointer directly.
2915 * record-full.c: Include "inferior.h".
2916 * regcache.c: Include "gdbthread.h".
2917 (get_thread_arch_regcache): Use the inferior's address space
2918 directly.
2919 (get_thread_regcache, registers_changed_thread): New.
2920 * regcache.h (get_thread_regcache(thread_info *thread)): New
2921 overload.
2922 (registers_changed_thread): New.
2923 (remote_target) <remote_detach_1>: Swap order of parameters.
2924 (remote_add_thread): <remote_add_thread>: Return the new thread.
2925 (get_remote_thread_info(ptid_t)): New overload.
2926 (remote_target::remote_notice_new_inferior): Use thread pointers
2927 directly.
2928 (remote_target::process_initial_stop_replies): Use
2929 thread_info::set_running.
2930 (remote_target::remote_detach_1, remote_target::detach)
2931 (extended_remote_target::detach): Adjust.
2932 * stack.c (frame_show_address): Use inferior_thread.
2933 * target-debug.h (target_debug_print_thread_info_pp): New.
2934 * target-delegates.c: Regenerate.
2935 * target.c (default_thread_address_space): Delete.
2936 (memory_xfer_partial_1): Use current_inferior.
2937 (target_detach): Use current_inferior.
2938 (target_thread_address_space): Delete.
2939 (generic_mourn_inferior): Use current_inferior.
2940 * target.h (struct target_ops) <thread_address_space>: Delete.
2941 (target_thread_address_space): Delete.
2942 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2943 pointers directly.
2944 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2945 thread pointer instead of a ptid_t. Adjust all callers.
2946 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2947 (first_thread_of_process): Delete, replaced by ...
2948 (first_thread_of_inferior): ... this new function. All callers
2949 adjusted.
2950 (any_thread_of_process): Rename to ...
2951 (any_thread_of_inferior): ... this, and take an inferior pointer.
2952 (any_live_thread_of_process): Rename to ...
2953 (any_live_thread_of_inferior): ... this, and take an inferior
2954 pointer.
2955 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2956 (value_in_thread_stack_temporaries)
2957 (get_last_thread_stack_temporary): Take a thread pointer instead
2958 of a ptid_t. Adjust all callers.
2959 (thread_info::set_running): New.
2960 (validate_registers_access): Use inferior_thread.
2961 (can_access_registers_ptid): Rename to ...
2962 (can_access_registers_thread): ... this, and take a thread
2963 pointer.
2964 (print_thread_info_1): Adjust to compare thread pointers instead
2965 of ptids.
2966 (switch_to_no_thread, switch_to_thread): Make extern.
2967 (scoped_restore_current_thread::~scoped_restore_current_thread):
2968 Use m_thread pointer directly.
2969 (scoped_restore_current_thread::scoped_restore_current_thread):
2970 Use inferior_thread.
2971 (thread_command): Use thread pointer directly.
2972 (thread_num_make_value_helper): Use inferior_thread.
2973 * top.c (execute_command): Use inferior_thread.
2974 * tui/tui-interp.c: Include "inferior.h".
2975 * varobj.c (varobj_create): Use inferior_thread.
2976 (value_of_root_1): Use find_thread_global_id instead of
2977 global_thread_id_to_ptid.
2978
2979 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2980
2981 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2982 possible.
2983 (regcache::write_part): Likewise.
2984 (readable_regcache::cooked_read_part): Update comment.
2985 (readable_regcache::cooked_write_part): Likewise.
2986 * regcache.h: (readable_regcache::read_part): Likewise.
2987 (regcache::write_part): Likewise.
2988
2989 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2990 Dirk Schubert <dirk.schubert@arm.com>
2991
2992 * aarch64-linux-nat.c (post_attach): New.
2993 (aarch64_linux_nat_target::post_attach): Override post_attach to
2994 record the number of hardware debug registers.
2995
2996 2018-06-20 Tom Tromey <tom@tromey.com>
2997
2998 * python/py-param.c (add_setshow_generic): Make parameters const.
2999 (parmpy_init): Update.
3000
3001 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3002
3003 * regcache.h (regcache_cooked_read_ftype): Rename to...
3004 (register_read_ftype): ...this, change type to function_view.
3005 (class reg_buffer) <save>: Remove src parameter.
3006 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3007 parameter non-const in first overload. Remove src parameter in
3008 second overload.
3009 * regcache.c (do_cooked_read): Remove.
3010 (readonly_detached_regcache::readonly_detached_regcache): Make
3011 parameter non-const, adjust call to other constructor.
3012 (reg_buffer::save): Remove src parameter.
3013 * frame.c (do_frame_register_read): Remove.
3014 (frame_save_as_regcache): Use lambda function.
3015 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3016 parameter to ppu2spu_data *.
3017 (ppu2spu_sniffer): Use lambda function.
3018
3019 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3020
3021 * record-full.c (record_full_target::insert_breakpoint): Remove
3022 "struct" keyword, add const.
3023
3024 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3025
3026 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3027 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3028 * configure.ac: Remove AC_PREREQ, add missing quoting.
3029 * gnulib/configure.ac: Modernize usage of
3030 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3031 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3032 (AUTOMAKE_VERSION): Bump to 1.15.1.
3033 * configure: Re-generate.
3034 * config.in: Re-generate.
3035 * aclocal.m4: Re-generate.
3036 * gnulib/aclocal.m4: Re-generate.
3037 * gnulib/config.in: Re-generate.
3038 * gnulib/configure: Re-generate.
3039 * gnulib/import/Makefile.in: Re-generate.
3040
3041 2018-06-19 Pedro Alves <palves@redhat.com>
3042
3043 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3044 (lookup_minimal_symbol_by_pc_section): ... here with
3045 gdb_assert_not_reached added.
3046
3047 2018-06-19 Pedro Alves <palves@redhat.com>
3048
3049 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3050 parameter with a block parameter. Compare location's block symbol
3051 with the frame's block instead of addresses.
3052 (skip_inline_frames): Pass the current block instead of the
3053 frame's address. Break out as soon as we determine the frame
3054 should not be skipped.
3055
3056 2018-06-18 Tom Tromey <tom@tromey.com>
3057
3058 * solib-aix.c (solib_aix_get_section_offsets): Return
3059 unique_xmalloc_ptr.
3060 (solib_aix_solib_create_inferior_hook): Update.
3061
3062 2018-06-18 Tom Tromey <tom@tromey.com>
3063
3064 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3065
3066 2018-06-18 Tom Tromey <tom@tromey.com>
3067
3068 * solib-frv.c (frv_relocate_main_executable): Use
3069 unique_xmalloc_ptr.
3070 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3071 unique_xmalloc_ptr.
3072
3073 2018-06-18 Tom Tromey <tom@tromey.com>
3074
3075 * objfiles.h (inhibit_section_map_updates): Update.
3076 (resume_section_map_updates, resume_section_map_updates_cleanup):
3077 Remove.
3078 * solib-svr4.c (svr4_handle_solib_event): Update.
3079 * objfiles.c (inhibit_section_map_updates): Return
3080 scoped_restore_tmpl<int>.
3081 (resume_section_map_updates, resume_section_map_updates_cleanup):
3082 Remove.
3083
3084 2018-06-18 Tom Tromey <tom@tromey.com>
3085
3086 * valprint.h (read_string): Update.
3087 * valprint.c (read_string): Change type of "buffer".
3088 (val_print_string): Update.
3089 * python/py-value.c (valpy_string): Update.
3090 * language.h (struct language_defn) <la_get_string>: Change
3091 type of "buffer".
3092 (default_get_string, c_get_string): Update.
3093 * language.c (default_get_string): Change type of "buffer".
3094 * guile/scm-value.c (gdbscm_value_to_string): Update.
3095 * c-lang.c (c_get_string): Change type of "buffer".
3096
3097 2018-06-18 Tom Tromey <tom@tromey.com>
3098
3099 * ser-mingw.c (struct pipe_state_destroyer): New.
3100 (pipe_state_up): New typedef.
3101 (cleanup_pipe_state): Remove.
3102 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3103
3104 2018-06-18 Tom Tromey <tom@tromey.com>
3105
3106 * rust-lang.h (rust_yyerror): Don't declare.
3107 * rust-lang.c (rust_language_defn): Update.
3108 * rust-exp.y (yyerror): Now static.
3109 * parse.c (parse_exp_in_context_1): Update.
3110 * p-lang.h (p_yyerror): Don't declare.
3111 * p-lang.c (p_language_defn): Update.
3112 * p-exp.y (yyerror): Now static.
3113 * opencl-lang.c (opencl_language_defn): Update.
3114 * objc-lang.c (objc_language_defn): Update.
3115 * m2-lang.h (m2_yyerror): Don't declare.
3116 * m2-lang.c (m2_language_defn): Update.
3117 * m2-exp.y (yyerror): Now static.
3118 * language.h (struct language_defn) <la_error>: Remove.
3119 * language.c (unk_lang_error): Remove.
3120 (unknown_language_defn, auto_language_defn): Remove.
3121 * go-lang.h (go_yyerror): Don't declare.
3122 * go-lang.c (go_language_defn): Update.
3123 * go-exp.y (yyerror): Now static.
3124 * f-lang.h (f_yyerror): Don't declare.
3125 * f-lang.c (f_language_defn): Update.
3126 * f-exp.y (yyerror): Now static.
3127 * d-lang.h (d_yyerror): Don't declare.
3128 * d-lang.c (d_language_defn): Update.
3129 * d-exp.y (yyerror): Now static.
3130 * c-lang.h (c_yyerror): Don't declare.
3131 * c-lang.c (c_language_defn, cplus_language_defn)
3132 (asm_language_defn, minimal_language_defn): Update.
3133 * c-exp.y (yyerror): Now static.
3134 * ada-lang.h (ada_yyerror): Don't declare.
3135 * ada-lang.c (ada_language_defn): Update.
3136 * ada-exp.y (yyerror): Now static.
3137
3138 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3139
3140 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3141 (store_sveregs_to_thread): Likewise.
3142 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3143 (aarch64_linux_store_inferior_registers): Likewise.
3144 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3145 function.
3146 (aarch64_sve_regs_copy_to_regcache): Likewise.
3147 (aarch64_sve_regs_copy_from_regcache): Likewise.
3148 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3149 declaration.
3150 (aarch64_sve_regs_copy_to_regcache): Likewise.
3151 (aarch64_sve_regs_copy_from_regcache): Likewise.
3152 (sve_context): Structure from Linux headers.
3153 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3154 (SVE_SIG_ZREG_SIZE): Likewise.
3155 (SVE_SIG_PREG_SIZE): Likewise.
3156 (SVE_SIG_FFR_SIZE): Likewise.
3157 (SVE_SIG_REGS_OFFSET): Likewise.
3158 (SVE_SIG_ZREGS_OFFSET): Likewise.
3159 (SVE_SIG_ZREG_OFFSET): Likewise.
3160 (SVE_SIG_ZREGS_SIZE): Likewise.
3161 (SVE_SIG_PREGS_OFFSET): Likewise.
3162 (SVE_SIG_PREG_OFFSET): Likewise.
3163 (SVE_SIG_PREGS_SIZE): Likewise.
3164 (SVE_SIG_FFR_OFFSET): Likewise.
3165 (SVE_SIG_REGS_SIZE): Likewise.
3166 (SVE_SIG_CONTEXT_SIZE): Likewise.
3167 (SVE_PT_REGS_MASK): Likewise.
3168 (SVE_PT_REGS_FPSIMD): Likewise.
3169 (SVE_PT_REGS_SVE): Likewise.
3170 (SVE_PT_VL_INHERIT): Likewise.
3171 (SVE_PT_VL_ONEXEC): Likewise.
3172 (SVE_PT_REGS_OFFSET): Likewise.
3173 (SVE_PT_FPSIMD_OFFSET): Likewise.
3174 (SVE_PT_FPSIMD_SIZE): Likewise.
3175 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3176 (SVE_PT_SVE_PREG_SIZE): Likewise.
3177 (SVE_PT_SVE_FFR_SIZE): Likewise.
3178 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3179 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3180 (__SVE_SIG_TO_PT): Likewise.
3181 (SVE_PT_SVE_OFFSET): Likewise.
3182 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3183 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3184 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3185 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3186 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3187 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3188 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3189 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3190 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3191 (SVE_PT_SVE_SIZE): Likewise.
3192 (SVE_PT_SIZE): Likewise.
3193 (HAS_SVE_STATE): New define.
3194
3195 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3196
3197 * nat/aarch64-sve-linux-sigcontext.h: New file.
3198 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3199 new files.
3200 (SVE_VQ_MIN): Likewise.
3201 (SVE_VQ_MAX): Likewise.
3202 (SVE_VL_MIN): Likewise.
3203 (SVE_VL_MAX): Likewise.
3204 (SVE_NUM_ZREGS): Likewise.
3205 (SVE_NUM_PREGS): Likewise.
3206 (sve_vl_valid): Likewise.
3207 (struct user_sve_header): Likewise.
3208
3209 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3210 Richard Bunt <Richard.Bunt@arm.com>
3211
3212 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3213 was requested by GDB.
3214
3215 2018-06-15 Tom de Vries <tdevries@suse.de>
3216
3217 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3218
3219 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3220
3221 * gnulib/update-gnulib.sh: Print expected versions of
3222 autoconf/aclocal.
3223
3224 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3225
3226 * arch-utils.c (default_type_align): Use type_length_units.
3227 * gdbtypes.c (type_align): Use type_length_units.
3228
3229 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3230
3231 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3232 of 'define' command.
3233
3234 2018-06-14 Tom de Vries <tdevries@suse.de>
3235
3236 PR cli/22573
3237 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3238 get_no_prettyformat_print_options.
3239
3240 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3241
3242 * sparc-nat.h: Include target.h.
3243 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3244 <fetch_registers>: Remove this argument in function call.
3245 <store_registers>: Remove this argument in function call, remove
3246 extra semicolon.
3247 <low_forget_process>: Call sparc64_forget_process instead of
3248 sparc_forget_process.
3249
3250 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3251
3252 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3253 (procfs_target::make_corefile_notes): Adjust to new
3254 target_read_alloc return type.
3255
3256 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3257 Stephen Roberts <stephen.roberts@arm.com>
3258
3259 PR gdb/22882
3260 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3261 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3262 Move should_notify_stop local into more inner scope.
3263
3264 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3265 Stephen Roberts <stephen.roberts@arm.com>
3266
3267 PR gdb/22882
3268 * infrun.c (resume_1): Add call to mark_async_event_handler.
3269
3270 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3271
3272 * infrun.c (do_target_wait): Change old version of $pc printed.
3273
3274 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3275
3276 * dwarf2read.c (read_index_from_section): Rename to...
3277 (read_gdb_index_from_section): ... this, update all callers.
3278 (dwarf2_read_index): Rename to...
3279 (dwarf2_read_gdb_index): ... this, update all callers.
3280
3281 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3282
3283 * gdb/hppa-linux-nat.c
3284 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3285 hppa_linux_nat_target::fetch_registers.
3286
3287 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3288
3289 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3290 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3291 (AARCH64_DWARF_SVE_FFR): Likewise.
3292 (AARCH64_DWARF_SVE_P0): Likewise.
3293 (AARCH64_DWARF_SVE_Z0): Likewise.
3294
3295 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3296
3297 * common/common-regcache.h (raw_compare): New function.
3298 * regcache.c (regcache::raw_compare): Likewise.
3299 * regcache.h (regcache::raw_compare): New declaration.
3300
3301 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3302
3303 * common/common-regcache.h (reg_buffer_common): New structure.
3304 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3305 (reg_buffer::raw_supply): Likewise.
3306 (reg_buffer::raw_supply_integer): Likewise.
3307 (reg_buffer::raw_supply_zeroed): Likewise.
3308 (reg_buffer::raw_collect): Likewise.
3309 (reg_buffer::raw_collect_integer): Likewise.
3310 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3311 (reg_buffer::raw_supply): Likewise.
3312 (reg_buffer::raw_supply_integer): Likewise.
3313 (reg_buffer::raw_supply_zeroed): Likewise.
3314 (reg_buffer::raw_collect): Likewise.
3315 (reg_buffer::raw_collect_integer): Likewise.
3316
3317 2018-06-10 Tom Tromey <tom@tromey.com>
3318
3319 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3320 (class remote_state) <stop_reply_queue>: Now std::vector.
3321 (remote_state::~remote_state)
3322 (remote_target::stop_reply_queue_length): Update.
3323 (struct queue_iter_param, remove_child_of_pending_fork)
3324 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3325 (check_pending_event_prevents_wildcard_vcont_callback)
3326 (remove_stop_reply_for_inferior)
3327 (remove_stop_reply_of_remote_state)
3328 (remote_notif_remove_once_on_match)
3329 (stop_reply_match_ptid_and_ws)
3330 (remote_kill_child_of_pending_fork): Remove.
3331 (remote_target::remove_new_fork_children)
3332 (remote_target::check_pending_events_prevent_wildcard_vcont)
3333 (remote_target::discard_pending_stop_replies)
3334 (remote_target::discard_pending_stop_replies_in_queue)
3335 (remote_target::remote_notif_remove_queued_reply)
3336 (remote_target::queued_stop_reply)
3337 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3338 (remote_target::wait, remote_target::kill_new_fork_children)
3339 (remote_target::async): Update.
3340
3341 2018-06-10 Tom Tromey <tom@tromey.com>
3342
3343 * record-full.c (record_full_arch_list_cleanups): Remove.
3344 (record_full_message): Use try/catch.
3345 (record_full_wait_cleanups): Remove.
3346 (record_full_wait_1): Use try/catch.
3347 (record_full_restore): Likewise.
3348
3349 2018-06-10 Tom Tromey <tom@tromey.com>
3350
3351 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3352 declare VEC. Add constructor.
3353 <in_target_beneath>: Now bool.
3354 (record_full_breakpoints): Now a std::vector, static.
3355 (record_full_sync_record_breakpoints)
3356 (record_full_init_record_breakpoints)
3357 (record_full_target::insert_breakpoint)
3358 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3359
3360 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3361
3362 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3363 * serial.c (serial_interface_lookup): Remove struct keyword.
3364
3365 2018-06-10 Tom Tromey <tom@tromey.com>
3366
3367 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3368 method.
3369 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3370 a method.
3371 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3372 method.
3373 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3374 "beneath" as a method.
3375 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3376 Use "beneath" as a method.
3377
3378 2018-06-10 Tom Tromey <tom@tromey.com>
3379
3380 * tracefile.c (struct trace_file_writer_deleter): New.
3381 <operator()>: Rename from trace_file_writer_xfree.
3382 (trace_file_writer_up): New typedef.
3383 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3384
3385 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3386
3387 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3388 <m_registers, m_register_status>: Change type to
3389 std::unique_ptr.
3390 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3391 XCNEWVEC.
3392
3393 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3394
3395 * common/common-regcache.h (enum register_status): Add
3396 underlying type "signed char".
3397 * regcache.h (reg_buffer) <m_register_status>: Change type to
3398 register_status *.
3399 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3400 register_status instead of signed char.
3401 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3402 (reg_buffer::get_register_status): Remove cast.
3403 (readable_regcache::raw_read): Remove cast.
3404 (readable_regcache::cooked_read): Remove cast.
3405
3406 2018-06-09 Tom Tromey <tom@tromey.com>
3407
3408 * source.c (reverse_search_command, forward_search_command): Use
3409 scoped_fd.
3410
3411 2018-06-09 Tom Tromey <tom@tromey.com>
3412
3413 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3414 (serial_ops_list): Now static, std::vector.
3415 (serial_interface_lookup, serial_add_interface): Update.
3416
3417 2018-06-09 Tom Tromey <tom@tromey.com>
3418
3419 * dwarf2read.c (process_cu_includes): Update.
3420 (process_full_comp_unit): Update.
3421 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3422 std::vector.
3423
3424 2018-06-08 Paul Koning <paul_koning@dell.com>
3425
3426 PR gdb/23252
3427
3428 * python/python.c (do_start_initialization):
3429 Avoid call to internal Python API.
3430 (init__gdb_module): New function.
3431
3432 2018-06-08 Gary Benson <gbenson@redhat.com>
3433
3434 * linux-thread-db.c (valprint.h): New include.
3435 (struct check_thread_db_info): New structure.
3436 (check_thread_db_on_load, tdb_testinfo): New static globals.
3437 (check_thread_db, check_thread_db_callback): New functions.
3438 (try_thread_db_load_1): Run integrity checks if requested.
3439 (maintenance_check_libthread_db): New function.
3440 (_initialize_thread_db): Register "maint check libthread-db"
3441 and "maint set/show check-libthread-db".
3442 * NEWS: Mention the above new commands.
3443
3444 2018-06-08 Tom Tromey <tom@tromey.com>
3445
3446 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3447 now a method.
3448
3449 2018-06-08 Tom Tromey <tom@tromey.com>
3450
3451 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3452
3453 2018-06-08 Tom Tromey <tom@tromey.com>
3454
3455 * common/btrace-common.h (struct btrace_data): Add constructor,
3456 destructor, move assignment operator.
3457 <empty, clear, fini>: New methods.
3458 <format>: Initialize.
3459 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3460 (btrace_data_empty): Don't declare.
3461 * common/btrace-common.c (btrace_data_init): Remove.
3462 (btrace_data::fini): Rename from btrace_data_fini.
3463 (btrace_data::empty): Rename from btrace_data_empty.
3464 (btrace_data::clear): Rename from btrace_data_clear. Return
3465 bool.
3466 * btrace.h (make_cleanup_btrace_data): Don't declare.
3467 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3468 (parse_xml_btrace): Update.
3469 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3470 (maint_btrace_clear_packet_history_cmd): Update.
3471
3472 2018-06-07 Pedro Alves <palves@redhat.com>
3473
3474 * target.h (target_ops) <beneath>: Now a method. All references
3475 updated.
3476 (class target_stack): New.
3477 * target.c (g_target_stack): New.
3478 (g_current_top_target): Delete.
3479 (current_top_target): Get the top target out of g_target_stack.
3480 (target_stack::push, target_stack::unpush): New.
3481 (push_target, unpush_target): Reimplement.
3482 (target_is_pushed): Reimplement in terms of g_target_stack.
3483 (target_ops::beneath, target_stack::find_beneath): New.
3484
3485 2018-06-07 Pedro Alves <palves@redhat.com>
3486
3487 * target.h (find_target_beneath): Delete declaration.
3488 * target.c (find_target_beneath): Delete definition.
3489 * aix-thread.c: All callers of find_target_beneath adjusted to
3490 call target_ops::beneath instead.
3491 * bsd-uthread.c: Likewise.
3492 * linux-thread-db.c: Likewise.
3493 * ravenscar-thread.c: Likewise.
3494 * sol-thread.c: Likewise.
3495 * spu-multiarch.c: Likewise.
3496
3497 2018-06-07 Pedro Alves <palves@redhat.com>
3498
3499 * target.h (target_ops) <beneath>: Now a method. All references
3500 updated.
3501 (target_ops) <m_beneath>: New.
3502 * target.c (target_ops::beneath): New.
3503 * corelow.c: Adjust all references to target_ops::beneath.
3504 * linux-thread-db.c: Likewise.
3505 * make-target-delegates: Likewise.
3506 * record-btrace.c: Likewise.
3507 * record-full.c: Likewise.
3508 * remote.c: Likewise.
3509 * target.c: Likewise.
3510 * target-delegates.c: Regenerate.
3511
3512 2018-06-07 Pedro Alves <palves@redhat.com>
3513
3514 * target.h (target_stack): Delete.
3515 (current_top_target): Declare function.
3516 * target.c (target_stack): Delete.
3517 (g_current_top_target): New.
3518 (current_top_target): New function.
3519 * auxv.c: Use current_top_target instead of target_stack
3520 throughout.
3521 * avr-tdep.c: Likewise.
3522 * breakpoint.c: Likewise.
3523 * corefile.c: Likewise.
3524 * elfread.c: Likewise.
3525 * eval.c: Likewise.
3526 * exceptions.c: Likewise.
3527 * frame.c: Likewise.
3528 * gdbarch-selftests.c: Likewise.
3529 * gnu-v3-abi.c: Likewise.
3530 * ia64-tdep.c: Likewise.
3531 * ia64-vms-tdep.c: Likewise.
3532 * infcall.c: Likewise.
3533 * infcmd.c: Likewise.
3534 * infrun.c: Likewise.
3535 * linespec.c: Likewise.
3536 * linux-tdep.c: Likewise.
3537 * minsyms.c: Likewise.
3538 * ppc-linux-nat.c: Likewise.
3539 * ppc-linux-tdep.c: Likewise.
3540 * procfs.c: Likewise.
3541 * regcache.c: Likewise.
3542 * remote.c: Likewise.
3543 * rs6000-tdep.c: Likewise.
3544 * s390-linux-nat.c: Likewise.
3545 * s390-tdep.c: Likewise.
3546 * solib-aix.c: Likewise.
3547 * solib-darwin.c: Likewise.
3548 * solib-dsbt.c: Likewise.
3549 * solib-spu.c: Likewise.
3550 * solib-svr4.c: Likewise.
3551 * solib-target.c: Likewise.
3552 * sparc-tdep.c: Likewise.
3553 * sparc64-tdep.c: Likewise.
3554 * spu-tdep.c: Likewise.
3555 * symfile.c: Likewise.
3556 * symtab.c: Likewise.
3557 * target-descriptions.c: Likewise.
3558 * target-memory.c: Likewise.
3559 * target.c: Likewise.
3560 * target.h: Likewise.
3561 * tracefile-tfile.c: Likewise.
3562 * tracepoint.c: Likewise.
3563 * valops.c: Likewise.
3564 * valprint.c: Likewise.
3565 * value.c: Likewise.
3566 * windows-tdep.c: Likewise.
3567 * mi/mi-main.c: Likewise.
3568
3569 2018-06-07 Tom Tromey <tom@tromey.com>
3570
3571 * valprint.h (build_address_symbolic): Declare.
3572 * printcmd.c (print_address_symbolic): Update.
3573 (build_address_symbolic): Change "name" and "filename" to
3574 std::string.
3575 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3576 Update.
3577 * defs.h (build_address_symbolic): Remove declaration.
3578
3579 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3580
3581 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3582 (aarch64_vnv_type): Add function.
3583 (aarch64_pseudo_register_name): Add V regs for SVE.
3584 (aarch64_pseudo_register_type): Likewise.
3585 (aarch64_pseudo_register_reggroup_p): Likewise.
3586 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3587 (aarch64_pseudo_read_value): Add V regs for SVE.
3588 (aarch64_pseudo_write_2): Use V0 offset for SVE
3589 (aarch64_pseudo_write): Add V regs for SVE.
3590 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3591
3592 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3593
3594 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3595 (sve_vl_from_vq): Likewise.
3596
3597 2018-06-05 Tom Tromey <tom@tromey.com>
3598
3599 * cli/cli-cmds.c (show_version): Update.
3600 * top.c (print_gdb_version): Add "interactive" parameter.
3601 Update.
3602 * main.c (captured_main_1): Update.
3603 * top.h (print_gdb_version): Add "interactive" parameter and a
3604 comment.
3605
3606 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3607
3608 * common/enum-flags.h: Add trailing semicolon to example in
3609 comment.
3610
3611 2018-06-05 Tom Tromey <tom@tromey.com>
3612
3613 PR cli/12326:
3614 * NEWS: Add entry about pager.
3615 * utils.c (pagination_disabled_for_command): New global.
3616 (prompt_for_continue): Allow "c" response to prompt.
3617 (reinitialize_more_filter): Clear
3618 pagination_disabled_for_command.
3619 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3620
3621 2018-06-04 Tom Tromey <tom@tromey.com>
3622
3623 * ada-lang.h (ada_lookup_symbol_list): Update.
3624 * ada-lang.c (resolve_subexp): Update.
3625 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3626 parameter.
3627 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3628 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3629 results parameter to std::vector.
3630 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3631 Update.
3632 * ada-exp.y (block_lookup): Update.
3633 (select_possible_type_sym): Change type of syms. Remove nsyms
3634 parameter.
3635 (write_var_or_type, write_name_assoc): Update.
3636
3637 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3638
3639 * windows-nat.c (windows_nat_target::xfer_partial): Return
3640 TARGET_XFER_E_IO if we need to delegate to the target beneath
3641 but BENEATH is NULL.
3642
3643 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3644
3645 * Makefile.in (config.status): Add configure.nat as a
3646 dependency.
3647
3648 2018-06-04 Tom Tromey <tom@tromey.com>
3649
3650 * cp-name-parser.y (cpname_state): Add method declarations.
3651 (HANDLE_QUAL): Update.
3652 (cpname_state::d_grab, cpname_state::fill_comp)
3653 (cpname_state::make_operator, cpname_state::make_dtor)
3654 (cpname_state::make_builtin_type, cpname_state::make_name)
3655 (cpname_state::d_qualify, cpname_state::d_int_type)
3656 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3657 (%union): Move earlier.
3658
3659 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3660
3661 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3662
3663 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3664
3665 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3666 (aarch64_pseudo_write_1): Likewise.
3667 (aarch64_pseudo_read_value): Use helper.
3668 (aarch64_pseudo_write): Likewise.
3669
3670 2018-06-04 Pedro Alves <palves@redhat.com>
3671
3672 * darwin-nat.c (darwin_ops): Delete.
3673 (darwin_attach_pid): Use get_native_target.
3674
3675 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3676
3677 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3678 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3679
3680 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3681
3682 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3683 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3684 (aarch64_gdbarch_init): Check for SVE.
3685 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3686
3687 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3688
3689 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3690 * aarch64-tdep.h (aarch64_read_description): Likewise.
3691 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3692 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3693 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3694 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3695 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3696
3697 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3698
3699 * value.c (value_fetch_lazy_bitfield): New.
3700 (value_fetch_lazy_memory): New.
3701 (value_fetch_lazy_register): New.
3702 (value_fetch_lazy): Factor out to smaller functions.
3703
3704 2018-06-01 Tom Tromey <tom@tromey.com>
3705
3706 * cp-name-parser.y (backslashable, represented): Now const.
3707
3708 2018-06-01 Tom Tromey <tom@tromey.com>
3709
3710 * cp-name-parser.y: Include parser-defs.h.
3711 (parser_fprintf): Remove declaration.
3712
3713 2018-06-01 Tom Tromey <tom@tromey.com>
3714
3715 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3716 %parse-param.
3717 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3718 (global_result): Remove globals.
3719 (struct cpname_state): New.
3720 (yyparse): Don't declare.
3721 (yylex, yyerror): Move declarations after %union.
3722 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3723 (make_name): Add state parameter.
3724 Update all callers.
3725 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3726 parameter.
3727 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3728 Update.
3729 (yylex): Add lvalp, state parameters.
3730 (yyerror): Add state parameter.
3731 (cp_demangled_name_to_comp): Update.
3732
3733 2018-06-01 Tom Tromey <tom@tromey.com>
3734
3735 * cp-name-parser.y (parser_fprintf): Declare.
3736 (GDB_YY_REMAP_PREFIX): Define.
3737 Include yy-remap.h. Don't redefine yy* identifiers.
3738
3739 2018-06-01 Tom Tromey <tom@tromey.com>
3740
3741 * python/py-type.c (typy_legacy_template_argument): Update.
3742 * cp-support.h (cp_demangled_name_to_comp): Update.
3743 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3744 parameter to be a "std::string *".
3745 (main): Update.
3746
3747 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3748
3749 * ada-lex.l: Include "diagnostics.h" instead of
3750 "common/diagnostics.h".
3751 * unittests/environ-selftests.c: Likewise.
3752 * common/diagnostics.h: Moved to ../include.
3753
3754 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3755
3756 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3757 to language_mode_manual while calling breakpoint_re_set_one.
3758
3759 2018-06-01 Tom Tromey <tom@tromey.com>
3760
3761 * valops.c (value_cast_structs, destructor_name_p): Update.
3762 * symtab.c (gdb_mangle_name): Update.
3763 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3764 Update.
3765 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3766 (pascal_object_print_value_fields, pascal_object_print_value):
3767 Update.
3768 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3769 * linespec.c (find_methods): Update.
3770 * gdbtypes.h (type_name_no_tag): Remove.
3771 (type_name_or_error): Rename from type_name_no_tag_or_error.
3772 * gdbtypes.c (type_name_no_tag): Remove.
3773 (type_name_or_error): Rename from type_name_no_tag_or_error.
3774 (lookup_struct_elt_type, check_typedef): Update.
3775 * expprint.c (print_subexp_standard): Update.
3776 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3777 * d-namespace.c (d_lookup_nested_symbol): Update.
3778 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3779 (cp_print_class_member): Update.
3780 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3781 * completer.c (add_struct_fields): Update.
3782 * c-typeprint.c (cp_type_print_derivation_info)
3783 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3784 Update.
3785 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3786 (ada_prefer_type, ada_is_exception_sym): Update.
3787
3788 2018-06-01 Tom Tromey <tom@tromey.com>
3789
3790 * valops.c (enum_constant_from_type, value_namespace_elt)
3791 (value_maybe_namespace_elt): Update.
3792 * valarith.c (find_size_for_pointer_math): Update.
3793 * target-descriptions.c (make_gdb_type): Update.
3794 * symmisc.c (print_symbol): Update.
3795 * stabsread.c (define_symbol, read_type)
3796 (complain_about_struct_wipeout, add_undefined_type)
3797 (cleanup_undefined_types_1): Update.
3798 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3799 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3800 (rust_internal_print_type, rust_composite_type)
3801 (rust_evaluate_funcall, rust_evaluate_subexp)
3802 (rust_inclusive_range_type_p): Update.
3803 * python/py-type.c (typy_get_tag): Update.
3804 * p-typeprint.c (pascal_type_print_base): Update.
3805 * mdebugread.c (parse_symbol, parse_type): Update.
3806 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3807 Update.
3808 * guile/scm-type.c (gdbscm_type_tag): Update.
3809 * go-lang.c (sixg_string_p): Update.
3810 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3811 Update.
3812 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3813 (TYPE_TAG_NAME): Remove.
3814 * gdbtypes.c (type_name_no_tag): Simplify.
3815 (check_typedef, check_types_equal, recursive_dump_type)
3816 (copy_type_recursive, arch_composite_type): Update.
3817 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3818 in summary mode when needed.
3819 * eval.c (evaluate_funcall): Update.
3820 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3821 (process_structure_scope, read_enumeration_type)
3822 (read_namespace_type, read_module_type, determine_prefix): Update.
3823 * cp-support.c (inspect_type): Update.
3824 * coffread.c (process_coff_symbol, decode_base_type): Update.
3825 * c-varobj.c (c_is_path_expr_parent): Update.
3826 * c-typeprint.c (c_type_print_base_struct_union): Update.
3827 (c_type_print_base_1): Update. Print struct/class/union/enum in
3828 summary when using C language.
3829 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3830 (gen_maybe_namespace_elt): Update.
3831 * ada-lang.c (ada_type_name): Simplify.
3832 (empty_record, ada_template_to_fixed_record_type_1)
3833 (template_to_static_fixed_type)
3834 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3835
3836 2018-06-01 Tom Tromey <tom@tromey.com>
3837
3838 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3839 c_print_type.
3840 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3841 (c_print_type): Update.
3842 (c_print_type): New overload.
3843 (c_type_print_varspec_prefix, c_type_print_args)
3844 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3845 (c_type_print_base_struct_union, c_type_print_base_1)
3846 (cp_type_print_method_args): Add "language" parameter.
3847 (c_type_print_base): Update.
3848 * c-lang.h (c_print_type): Add new overload.
3849
3850 2018-06-01 Tom Tromey <tom@tromey.com>
3851
3852 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3853 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3854
3855 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3856
3857 * aarch64-tdep.c (aarch64_sve_register_names): New const
3858 var.
3859 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3860 (AARCH64_SVE_Z_REGS_NUM): New define.
3861 (AARCH64_SVE_P_REGS_NUM): Likewise.
3862 (AARCH64_SVE_NUM_REGS): Likewise.
3863
3864 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3865
3866 * nat/linux-ptrace.h [__alpha__]
3867 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3868 definitions.
3869
3870 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3871
3872 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3873 the endianness selected.
3874 * NEWS: Document `set endian auto' mode operation update.
3875
3876 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3877
3878 * Makefile.in: Add new header.
3879 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3880 (sve_vl_from_vg): Likewise.
3881 (sve_vq_from_vl): Likewise.
3882 (sve_vl_from_vq): Likewise.
3883 (sve_vq_from_vg): Likewise.
3884 (sve_vg_from_vq): Likewise.
3885 * configure.nat: Add new c file.
3886 * nat/aarch64-sve-linux-ptrace.c: New file.
3887 * nat/aarch64-sve-linux-ptrace.h: New file.
3888
3889 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3890
3891 * aarch64-linux-nat.c (aarch64_linux_read_description):
3892 Add parmeter zero.
3893 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3894 Likewise.
3895 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3896 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3897 (aarch64_gdbarch_init): Add parmeter zero.
3898 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3899 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3900 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3901 parmeter.
3902 * doc/gdb.texinfo: Describe SVE feature
3903 * features/aarch64-sve.c: New file.
3904
3905 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3906
3907 PR gdb/23210
3908 * gdbarch.sh (significant_addr_bit): Default to zero when
3909 not set by target architecture.
3910 * gdbarch.c: Re-generated.
3911 * utils.c (address_significant): Update.
3912
3913 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3914
3915 * stack.c (func_command): Remove trailing newline in call to error.
3916
3917 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3918
3919 * regcache.h (regcache_raw_collect): Remove, update callers to
3920 use regcache::raw_collect.
3921 * regcache.c (regcache_raw_collect): Remove.
3922
3923 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3924
3925 * regcache.h (regcache_raw_supply): Remove, update callers to
3926 use detached_regcache::raw_supply.
3927 * regcache.c (regcache_raw_supply): Remove.
3928
3929 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3930
3931 * regcache.h (regcache_cooked_write_part): Remove, update
3932 callers to use regcache::cooked_write_part.
3933 * regcache.c (regcache_cooked_write_part): Remove.
3934
3935 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3936
3937 * regcache.h (regcache_cooked_read_part): Remove, update callers
3938 to use readable_regcache::cooked_read_part.
3939 * regcache.c (regcache_cooked_read_part): Remove.
3940
3941 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3942
3943 * regcache.h (regcache_cooked_read_value): Remove, update
3944 callers to use readable_regcache::cooked_read_value.
3945 * regcache.c (regcache_cooked_read_value): Remove.
3946
3947 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3948
3949 * regcache.h (regcache_cooked_write): Remove, update callers to
3950 use regcache::cooked_write.
3951 * regcache.c (regcache_cooked_write): Remove.
3952
3953 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3954
3955 * regcache.h (regcache_invalidate): Remove, update callers to
3956 use detached_regcache::invalidate instead.
3957 * regcache.c (regcache_invalidate): Remove.
3958
3959 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3960
3961 * regcache.h (regcache_raw_write_part): Remove, update callers
3962 to use regcache::raw_write_part instead.
3963 * regcache.c (regcache_raw_write_part): Remove.
3964
3965 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3966
3967 * regcache.h (regcache_raw_read_part): Remove, update callers to
3968 use readable_regcache::raw_read_part instead.
3969 * regcache.c (regcache_raw_read_part): Remove.
3970
3971 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3972
3973 * regcache.h (regcache_cooked_read): Remove, update callers to
3974 use readable_regcache::cooked_read instead.
3975 * regcache.c (regcache_cooked_read): Remove.
3976
3977 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3978
3979 * regcache.h (regcache_raw_write): Remove, update callers to use
3980 regcache::raw_write instead.
3981 * regcache.c (regcache_raw_write): Remove.
3982
3983 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3984
3985 * regcache.h (regcache_raw_read): Remove, update callers to use
3986 readable_regcache::raw_read instead.
3987 * regcache.c (regcache_raw_read): Remove.
3988
3989 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3990
3991 * regcache.h (regcache_raw_update): Remove, update callers to
3992 use readable_regcache::raw_update instead.
3993 * regcache.c (regcache_raw_update): Remove.
3994
3995 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3996
3997 * regcache.h (regcache_register_status): Remove, update callers
3998 to use reg_buffer::get_register_status directly instead.
3999 * regcache.c (regcache_register_status): Remove.
4000
4001 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4002
4003 * regcache.h (regcache_get_ptid): Remove, update all callers to
4004 call regcache::ptid instead.
4005 * regcache.c (regcache_get_ptid): Remove.
4006
4007 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4008
4009 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4010
4011 2018-05-30 Pedro Alves <palves@redhat.com>
4012
4013 * common/common-exceptions.h (exception_rethrow): Use
4014 ATTRIBUTE_NORETURN.
4015
4016 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4017
4018 * breakpoint.c (print_solib_event, check_status_catch_solib):
4019 Remove struct keyword in range-based for loops.
4020 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4021 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4022 Likewise.
4023 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4024 Likewise.
4025 * symfile.c (addr_info_make_relative): Likewise.
4026 * thread.c (value_in_thread_stack_temporaries): Likewise.
4027
4028 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4029
4030 PR gdb/16841
4031 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4032 aggregate type to get its real type before accessing it.
4033
4034 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4035
4036 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4037 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4038 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4039 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4040 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4041 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4042 * printcmd.c (info_address_command): Likewise.
4043
4044 2018-05-29 Tom Tromey <tom@tromey.com>
4045
4046 * windows-nat.c (handle_exception): Update fall-through comment.
4047
4048 2018-05-29 Tom Tromey <tom@tromey.com>
4049
4050 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4051 (struct program_space) <added_solibs>: Now a std::vector.
4052 * breakpoint.c (print_solib_event): Update.
4053 (check_status_catch_solib): Update.
4054 * progspace.c (clear_program_space_solib_cache): Update.
4055 * solib.c (update_solib_list): Update.
4056
4057 2018-05-29 Tom Tromey <tom@tromey.com>
4058
4059 * python/py-type.c (typy_richcompare): Update.
4060 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4061 * gdbtypes.h (types_deeply_equal): Return bool.
4062 (types_equal): Likewise.
4063 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4064 declare VEC.
4065 (check_types_equal): Change worklist to std::vector. Return
4066 bool.
4067 (struct type_equality_entry): Add constructor.
4068 (compare_maybe_null_strings): Return bool.
4069 (check_types_worklist): Return bool. Change worklist to
4070 std::vector.
4071 (types_deeply_equal): Use std::vector.
4072 (types_equal): Return bool.
4073 (compare_maybe_null_strings): Simplify.
4074
4075 2018-05-29 Tom Tromey <tom@tromey.com>
4076
4077 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4078
4079 2018-05-29 Tom Tromey <tom@tromey.com>
4080
4081 * objc-lang.h: Don't include cp-support.h.
4082 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4083 declare VEC.
4084
4085 2018-05-27 Tom Tromey <tom@tromey.com>
4086
4087 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4088
4089 2018-05-25 Tom Tromey <tom@tromey.com>
4090
4091 * value.c (value::location): Initialize.
4092
4093 2018-05-25 Tom Tromey <tom@tromey.com>
4094
4095 * dbxread.c (init_bincl_list): Remove.
4096 (bincl_list): Now a std::vector.
4097 (bincls_allocated, next_bincl): Remove.
4098 (free_bincl_list, do_free_bincl_list_cleanup)
4099 (make_cleanup_free_bincl_list): Remove.
4100 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4101 unique_xmalloc_ptr.
4102 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4103 (struct header_file_location): Add constructor.
4104 (add_bincl_to_list): Remove.
4105
4106 2018-05-25 Tom Tromey <tom@tromey.com>
4107
4108 * tui/tui.c (tui_enable): Update.
4109 * mi/mi-interp.c (mi_interp::init): Update.
4110 * interps.h (class interp) <name>: New method.
4111 <m_name>: Rename from name.
4112 (~scoped_restore_interp): Update.
4113 * interps.c (interp::interp): Update.
4114 (interp_add, interp_set, interp_lookup_existing)
4115 (current_interp_named_p): Update.
4116
4117 2018-05-25 Tom Tromey <tom@tromey.com>
4118
4119 * interps.c (interp_name): Remove.
4120 * mi/mi-interp.c (mi_interp::init): Update.
4121 * interps.h (interp_name): Remove.
4122 (~scoped_restore_interp): Update.
4123 * tui/tui.c (tui_enable): Update.
4124
4125 2018-05-25 Tom Tromey <tom@tromey.com>
4126
4127 * utils.c (fputs_maybe_filtered): Update.
4128 * linespec.c (decode_line_full): Update.
4129 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4130 (mi_print_breakpoint_for_event, mi_solib_loaded)
4131 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4132 (mi_user_selected_context_changed): Update.
4133 * mi/mi-main.c (mi_execute_command): Update.
4134 * cli/cli-script.c (execute_control_command): Update.
4135 * python/python.c (execute_gdb_command): Update.
4136 * solib.c (info_sharedlibrary_command): Update.
4137 * interps.c (interp_ui_out): Remove.
4138 * interps.h (interp_ui_out): Remove.
4139
4140 2018-05-25 Tom Tromey <tom@tromey.com>
4141
4142 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4143 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4144 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4145
4146 2018-05-25 Tom Tromey <tom@tromey.com>
4147
4148 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4149 * interps.c (interp_exec): Use scoped_restore.
4150
4151 2018-05-25 Tom Tromey <tom@tromey.com>
4152
4153 * remote.c (remote_target::remote_file_get): Use
4154 gdb::byte_vector.
4155 (remote_target::remote_file_put): Likewise.
4156
4157 2018-05-25 Tom Tromey <tom@tromey.com>
4158
4159 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4160 a std::string.
4161 (get_pe_section_index, add_pe_exported_sym): Update.
4162 (read_pe_exported_syms): Use gdb::def_vector.
4163
4164 2018-05-25 Tom Tromey <tom@tromey.com>
4165
4166 * frame.c (remove_prev_frame): Remove.
4167 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4168
4169 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4170
4171 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4172 Remove prototypes.
4173 * mips-linux-nat.c (supply_fpregset): Always call
4174 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4175 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4176 `mips_fill_fpregset'.
4177 * mips-linux-tdep.c (mips_supply_fpregset)
4178 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4179 (mips_fill_fpregset_wrapper): Remove functions.
4180 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4181 (mips_linux_fpregset): Remove variable.
4182 (mips_linux_iterate_over_regset_sections): Use
4183 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4184 (mips_linux_o32_sigframe_init): Remove comment.
4185
4186 2018-05-25 Pedro Alves <palves@redhat.com>
4187
4188 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4189 (struct readahead_cache, struct packet_reg, struct
4190 remote_arch_state, class remote_state): Move higher up in the
4191 file.
4192 (remote_target::m_remote_state): Now an object instead of a pointer.
4193 (remote_target::get_remote_state): Adjust.
4194
4195 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4196
4197 * stack.c (select_and_print_frame): Delete.
4198 (struct function_bounds): Move struct within function.
4199 (func_command): Most content moved into new function
4200 find_frame_for_function, use new function, print result, add
4201 function comment.
4202 (find_frame_for_function): New function, now returns a result.
4203
4204 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4205
4206 * stack.c (iterate_over_block_arg_vars): Fix comment.
4207 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4208
4209 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4210
4211 PR gdb/23203
4212 * frame.c
4213 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4214 Define.
4215 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4216 Define.
4217 * frame.h (class scoped_restore_selected_frame): New class.
4218 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4219 of any exception, use scoped_restore_selected_frame to restore the
4220 frame instead.
4221
4222 2018-05-24 Pedro Alves <palves@redhat.com>
4223
4224 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4225 override.
4226
4227 2018-05-23 Tom Tromey <tom@tromey.com>
4228
4229 * complaints.c (struct complaints): Remove.
4230 (symfile_complaint_book): Remove.
4231 (series): New global.
4232 (complaint_internal): Update.
4233 (clear_complaints): Update.
4234
4235 2018-05-23 Tom Tromey <tom@tromey.com>
4236
4237 * complaints.c (counters): New global.
4238 (struct complain): Remove.
4239 (struct complaints) <root>: Remove.
4240 (complaint_sentinel): Remove.
4241 (symfile_complaint_book): Update.
4242 (find_complaint) Remove.
4243 (complaint_internal, clear_complaints): Update.
4244
4245 2018-05-23 Tom Tromey <tom@tromey.com>
4246
4247 * complaints.c (struct complain) <file, line>: Remove.
4248 (find_complaint): Remove file, line parameters.
4249 (complaint_internal): Update.
4250
4251 2018-05-23 Tom Tromey <tom@tromey.com>
4252
4253 * complaints.c (vcomplaint): Remove.
4254 (complaint_internal) Merge in contents of vcomplaint.
4255
4256 2018-05-23 Tom Tromey <tom@tromey.com>
4257
4258 * complaints.c (struct complaints) <explanation>: Remove.
4259 (symfile_explanations): Remove.
4260 (symfile_complaint_book): Update.
4261 (vcomplaint): Update.
4262 (struct explanation): Remove.
4263
4264 2018-05-23 Tom Tromey <tom@tromey.com>
4265
4266 * complaints.c (symfile_complaints): Remove.
4267 (complaint_internal): Remove "complaints" parameter.
4268 (clear_complaints, vcomplaint): Remove "c" parameter.
4269 (get_complaints): Remove.
4270 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4271 (dwarf2_debug_line_missing_file_complaint)
4272 (dwarf2_debug_line_missing_end_sequence_complaint)
4273 (dwarf2_complex_location_expr_complaint)
4274 (dwarf2_const_value_length_mismatch_complaint)
4275 (dwarf2_section_buffer_overflow_complaint)
4276 (dwarf2_macro_malformed_definition_complaint)
4277 (dwarf2_invalid_attrib_class_complaint)
4278 (create_addrmap_from_index, dw2_symtab_iter_next)
4279 (dw2_expand_marked_cus)
4280 (dw2_debug_names_iterator::find_vec_in_debug_names)
4281 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4282 (create_debug_type_hash_table, init_cutu_and_read_dies)
4283 (partial_die_parent_scope, add_partial_enumeration)
4284 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4285 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4286 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4287 (create_cus_hash_table, create_dwp_hash_table)
4288 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4289 (dwarf2_rnglists_process, dwarf2_ranges_process)
4290 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4291 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4292 (handle_struct_member_die, process_structure_scope)
4293 (read_array_type, read_common_block, read_module_type)
4294 (read_tag_pointer_type, read_typedef, read_base_type)
4295 (read_subrange_type, load_partial_dies, partial_die_info::read)
4296 (partial_die_info::read, partial_die_info::read)
4297 (partial_die_info::read, read_checked_initial_length_and_offset)
4298 (dwarf2_string_attr, read_formatted_entries)
4299 (dwarf_decode_line_header)
4300 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4301 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4302 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4303 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4304 (get_signatured_type, get_DW_AT_signature_type)
4305 (decode_locdesc, file_file_name, consume_improper_spaces)
4306 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4307 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4308 (dwarf2_symbol_mark_computed, set_die_type)
4309 (read_attribute_value): Update.
4310 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4311 Update.
4312 * dbxread.c (unknown_symtype_complaint)
4313 (lbrac_mismatch_complaint, repeated_header_complaint)
4314 (set_namestring, function_outside_compilation_unit_complaint)
4315 (read_dbx_symtab, process_one_symbol): Update.
4316 * gdbtypes.c (stub_noname_complaint): Update.
4317 * windows-nat.c (handle_unload_dll): Update.
4318 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4319 (decode_base_type): Update.
4320 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4321 (eb_complaint, record_include_begin, record_include_end)
4322 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4323 (process_xcoff_symbol, read_symbol)
4324 (function_outside_compilation_unit_complaint)
4325 (scan_xcoff_symtab): Update.
4326 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4327 * buildsym.c (finish_block_internal, make_blockvector)
4328 (end_symtab_get_static_block, augment_type_symtab): Update.
4329 * dtrace-probe.c (dtrace_process_dof)
4330 (dtrace_static_probe_ops::get_probes): Update.
4331 * complaints.h (struct complaint): Don't declare.
4332 (symfile_complaints): Remove.
4333 (complaint_internal): Remove "complaints" parameter.
4334 (complaint): Likewise.
4335 (clear_complaints): Likewise.
4336 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4337 (reread_symbols): Update.
4338 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4339 (dwarf2_frame_cache, decode_frame_entry): Update.
4340 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4341 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4342 (info_selectors_command): Update.
4343 * macrotab.c (macro_include, check_for_redefinition)
4344 (macro_undef): Update.
4345 * objfiles.c (filter_overlapping_sections): Update.
4346 * stabsread.c (invalid_cpp_abbrev_complaint)
4347 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4348 (define_symbol, error_type, read_type, rs6000_builtin_type)
4349 (stabs_method_name_from_physname, read_member_functions)
4350 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4351 (attach_fields_to_type, complain_about_struct_wipeout)
4352 (read_range_type, read_args, common_block_start)
4353 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4354 Update.
4355 * mdebugread.c (index_complaint, unknown_ext_complaint)
4356 (basic_type_complaint, bad_tag_guess_complaint)
4357 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4358 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4359 (parse_procedure, parse_lines)
4360 (function_outside_compilation_unit_complaint)
4361 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4362 (bad_tag_guess_complaint, reg_value_complaint): Update.
4363 * cp-support.c (demangled_name_complaint): Update.
4364 * macroscope.c (sal_macro_scope): Update.
4365 * dwarf-index-write.c (class debug_names): Update.
4366
4367 2018-05-23 Tom Tromey <tom@tromey.com>
4368
4369 * complaints.c (clear_complaints): Remove "noisy" parameter.
4370 * complaints.h (clear_complaints): Update.
4371 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4372 (reread_symbols): Update.
4373
4374 2018-05-23 Tom Tromey <tom@tromey.com>
4375
4376 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4377 SUBSEQUENT_MESSAGE.
4378 (vcomplaint, clear_complaints): Update.
4379 (symfile_explanations): Remove some messages.
4380
4381 2018-05-23 Tom Tromey <tom@tromey.com>
4382
4383 * complaints.c (internal_complaint): Remove.
4384 * complaints.h (internal_complaint): Remove.
4385
4386 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4387
4388 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4389
4390 2018-05-22 Pedro Alves <palves@redhat.com>
4391
4392 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4393 (remote_fileio_badfd, remote_fileio_return_errno)
4394 (remote_fileio_return_success, remote_fileio_func_open)
4395 (remote_fileio_func_open, remote_fileio_func_close)
4396 (remote_fileio_func_read, remote_fileio_func_write)
4397 (remote_fileio_func_lseek, remote_fileio_func_rename)
4398 (remote_fileio_func_unlink, remote_fileio_func_stat)
4399 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4400 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4401 remote_target parameter.
4402 (remote_fio_func_map) <func>: Add remote_target parameter.
4403 (do_remote_fileio_request, remote_fileio_request):
4404 * remote-fileio.h (remote_fileio_request):
4405 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4406 remote_target parameter.
4407 (remote_notif_process, handle_notification): Adjust to pass down
4408 the remote.
4409 (remote_notif_state_allocate): Add remote_target parameter. Save
4410 it.
4411 * remote-notif.h (struct remote_target): Forward declare.
4412 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4413 remote_target parameter.
4414 (struct remote_notif_state) <remote>: New field.
4415 (remote_notif_ack, remote_notif_parse): Add remote_target
4416 parameter.
4417 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4418 remote_target parameter.
4419 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4420 (threads_listing_context, rmt_thread_action, protocol_feature)
4421 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4422 (packet_result, struct threads_listing_context, remote_state):
4423 Move definitions and declarations higher up.
4424 (remote_target) <~remote_target>: Declare.
4425 (remote_download_command_source, remote_file_put, remote_file_get)
4426 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4427 (remote_hostio_pread_vFile, remote_hostio_send_command)
4428 (remote_hostio_set_filesystem, remote_hostio_open)
4429 (remote_hostio_close, remote_hostio_unlink, remote_state)
4430 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4431 (get_memory_write_packet_size, get_memory_read_packet_size)
4432 (append_pending_thread_resumptions, remote_detach_1)
4433 (append_resumption, remote_resume_with_vcont)
4434 (add_current_inferior_and_thread, wait_ns, wait_as)
4435 (process_stop_reply, remote_notice_new_inferior)
4436 (process_initial_stop_replies, remote_add_thread)
4437 (btrace_sync_conf, remote_btrace_maybe_reopen)
4438 (remove_new_fork_children, kill_new_fork_children)
4439 (discard_pending_stop_replies, stop_reply_queue_length)
4440 (check_pending_events_prevent_wildcard_vcont)
4441 (discard_pending_stop_replies_in_queue, stop_reply)
4442 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4443 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4444 (remote_interrupt_as, remote_interrupt_ns)
4445 (remote_get_noisy_reply, remote_query_attached)
4446 (remote_add_inferior, remote_current_thread, get_current_thread)
4447 (set_thread, set_general_thread, set_continue_thread)
4448 (set_general_process, write_ptid)
4449 (remote_unpack_thread_info_response, remote_get_threadinfo)
4450 (parse_threadlist_response, remote_get_threadlist)
4451 (remote_threadlist_iterator, remote_get_threads_with_ql)
4452 (remote_get_threads_with_qxfer)
4453 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4454 (get_offsets, remote_check_symbols, remote_supported_packet)
4455 (remote_query_supported, remote_packet_size)
4456 (remote_serial_quit_handler, remote_detach_pid)
4457 (remote_vcont_probe, remote_resume_with_hc)
4458 (send_interrupt_sequence, interrupt_query)
4459 (remote_notif_get_pending_events, fetch_register_using_p)
4460 (send_g_packet, process_g_packet, fetch_registers_using_g)
4461 (store_register_using_P, store_registers_using_G)
4462 (set_remote_traceframe, check_binary_download)
4463 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4464 (remote_xfer_live_readonly_partial, remote_read_bytes)
4465 (remote_send_printf, remote_flash_write, readchar)
4466 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4467 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4468 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4469 (extended_remote_disable_randomization, extended_remote_run)
4470 (send_environment_packet, extended_remote_environment_support)
4471 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4472 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4473 (packet_command): Now methods of ...
4474 (remote_target): ... this class.
4475 (m_remote_state) <remote_target>: New field.
4476 (struct remote_state) <stop_reply_queue,
4477 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4478 fields.
4479 (remote_state::remote_state): Allocate stop_reply_queue.
4480 (remote_state): Delete global.
4481 (get_remote_state_raw): Delete.
4482 (remote_target::get_remote_state): Allocate m_remote_state on
4483 demand.
4484 (get_current_remote_target): New.
4485 (remote_ops, extended_remote_ops): Delete.
4486 (wait_forever_enabled_p, remote_async_inferior_event_token):
4487 Delete, moved to struct remote_state.
4488 (remote_target::close): Delete self. Destruction bits split to
4489 ...
4490 (remote_target::~remote_target): ... this.
4491 (show_memory_packet_size): Adjust to use
4492 get_current_remote_target.
4493 (struct protocol_feature) <func>: Add remote_target parameter.
4494 All callers adjusted.
4495 (curr_quit_handler_target): New.
4496 (remote_serial_quit_handler): Reimplement.
4497 (remote_target::open_1): Adjust to use get_current_remote_target.
4498 Heap-allocate remote_target/extended_remote_target instances.
4499 (vcont_builder::vcont_builder): Add remote_target parameter, and
4500 save it in m_remote. All callers adjusted.
4501 (vcont_builder::m_remote): New field.
4502 (vcont_builder::restart, vcont_builder::flush)
4503 (vcont_builder::push_action): Use it.
4504 (remote_target::commit_resume): Use it.
4505 (struct queue_iter_param) <remote>: New field.
4506 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4507 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4508 (check_pending_event_prevents_wildcard_vcont_callback)
4509 (remote_target::check_pending_events_prevent_wildcard_vcont)
4510 (remote_target::discard_pending_stop_replies)
4511 (remote_target::discard_pending_stop_replies_in_queue)
4512 (remote_target::remote_notif_remove_queued_reply): Fill in
4513 'remote' field.
4514 (remote_notif_get_pending_events): New.
4515 (remote_target::readchar, remote_target::remote_serial_write):
4516 Save/restore curr_quit_handler_target.
4517 (putpkt): New.
4518 (kill_new_fork_children): Fill in 'remote' field.
4519 (packet_command): Use get_current_remote_target, defer to
4520 remote_target method of same name.
4521 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4522 parameter, and save it in m_remote. All callers adjusted.
4523 (scoped_remote_fd::release): Use m_remote.
4524 (scoped_remote_fd::m_remote): New field.
4525 (remote_file_put, remote_file_get, remote_file_delete): Use
4526 get_current_remote_target, defer to remote_target method of same
4527 name.
4528 (remote_btrace_reset): Add remote_state paremeter. Update all
4529 callers.
4530 (remote_async_inferior_event_handler). Pass down 'data'.
4531 (remote_new_objfile): Use get_current_remote_target.
4532 (remote_target::vcont_r_supported): New.
4533 (set_range_stepping): Use get_current_remote_target and
4534 remote_target::vcont_r_supported.
4535 (_initialize_remote): Don't allocate 'remote_state' and
4536 'stop_reply_queue' globals.
4537 * remote.h (struct remote_target): Forward declare.
4538 (getpkt, putpkt, remote_notif_get_pending_events): Add
4539 'remote_target' parameter.
4540
4541 2018-05-22 Pedro Alves <palves@redhat.com>
4542
4543 * remote.c (vcont_builder): Now a class. Make all data members
4544 private.
4545 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4546 Declare methods.
4547 (vcont_builder_restart): Rename to ...
4548 (vcont_builder::restart): ... this.
4549 (vcont_builder_flush): Rename to ...
4550 (vcont_builder::flush): ... this.
4551 (vcont_builder_push_action): Rename to ...
4552 (vcont_builder::push_action): ... this.
4553 (remote_target::commit_resume): Adjust.
4554
4555 2018-05-22 Pedro Alves <palves@redhat.com>
4556
4557 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4558 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4559 (get_fixed_memory_packet_size): New.
4560 (get_memory_packet_size): Use it.
4561 (set_memory_packet_size): Don't override the config size with
4562 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4563 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4564 Don't refer to get_memory_packet_size if not connected to a remote
4565 target. Show "(default)" if configured size is 0.
4566
4567 2018-05-22 Pedro Alves <palves@redhat.com>
4568
4569 * remote.c (remote_target::mourn_inferior): Move
4570 discard_pending_stop_replies call here from ...
4571 (_initialize_remote): ... here.
4572
4573 2018-05-22 Pedro Alves <palves@redhat.com>
4574
4575 * remote.c (compare_section_command): Remove set_general_process
4576 call.
4577
4578 2018-05-22 Pedro Alves <palves@redhat.com>
4579
4580 * remote.c (struct packet_reg, struct remote_arch_state):
4581 Move higher up in the file.
4582 (remote_state) <m_arch_states>: Store remote_arch_state values
4583 instead of remote_arch_state pointers.
4584 (remote_state::get_remote_arch_state): Adjust.
4585
4586 2018-05-22 Pedro Alves <palves@redhat.com>
4587
4588 * remote.c: Include <unordered_map>.
4589 (remote_state): Now a class.
4590 (remote_state) <get_remote_arch_state>: Declare method.
4591 <get_remote_arch_state>: New field.
4592 (remote_arch_state) <remote_arch_state>: Declare ctor.
4593 <regs>: Now a unique_ptr.
4594 (remote_gdbarch_data_handle): Delete.
4595 (get_remote_arch_state): Delete.
4596 (remote_state::get_remote_arch_state): New.
4597 (get_remote_state): Adjust to call remote_state's
4598 get_remote_arch_state method.
4599 (init_remote_state): Delete, bits factored out to ...
4600 (remote_arch_state::remote_arch_state): ... this new method.
4601 (get_remote_packet_size, get_memory_packet_size)
4602 (process_g_packet, remote_target::fetch_registers)
4603 (remote_target::prepare_to_store, store_registers_using_G)
4604 (remote_target::store_registers, remote_target::get_trace_status):
4605 Adjust to call remote_state's method.
4606 (_initialize_remote): Remove reference to
4607 remote_gdbarch_data_handle.
4608
4609 2018-05-22 Pedro Alves <palves@redhat.com>
4610
4611 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4612 pread>: New method declarations.
4613 (remote_target::open_1): Adjust.
4614 (readahead_cache_invalidate): Rename to ...
4615 (readahead_cache::invalidate): ... this, and adjust to be a class
4616 method.
4617 (readahead_cache_invalidate_fd): Rename to ...
4618 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4619 class method.
4620 (remote_hostio_pwrite): Adjust.
4621 (remote_hostio_pread_from_cache): Rename to ...
4622 (readahead_cache::pread): ... this, and adjust to be a class
4623 method.
4624 (remote_hostio_close): Adjust.
4625
4626 2018-05-22 Pedro Alves <palves@redhat.com>
4627
4628 * remote.c (remote_hostio_close_cleanup): Delete.
4629 (class scoped_remote_fd): New.
4630 (remote_file_put, remote_file_get): Use it.
4631
4632 2018-05-22 Pedro Alves <palves@redhat.com>
4633
4634 (struct vCont_action_support): Use bool and initialize all fields.
4635 (struct readahead_cache): Initialize all fields.
4636 (remote_state): Use bool and initialize all fields.
4637 (remote_state::remote_state, remote_state::~remote_state): New.
4638 (new_remote_state): Delete.
4639 (_initialize_remote): Use new to allocate remote_state.
4640
4641 2018-05-22 Pedro Alves <palves@redhat.com>
4642 張俊芝 <zjz@zjz.name>
4643
4644 PR gdb/22973
4645 * c-exp.y: Include "c-support.h".
4646 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4647 of tolower. Use c_ident_is_alpha to scan names.
4648 * c-lang.c: Include "c-support.h".
4649 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4650 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4651 * c-support.h: New file, with bits factored out from ...
4652 * cp-name-parser.y: ... this file.
4653 Include "c-support.h".
4654 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4655 c-support.h and renamed.
4656 (symbol_end, yylex): Adjust.
4657
4658 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4659
4660 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4661 parameter type to CORE_ADDR.
4662 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4663 parameter type in declaration to CORE_ADDR.
4664 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4665 target_auxv_search to get AT_HWCAP and use the result to get the
4666 target description.
4667 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4668 to CORE_ADDR. Remove the cast of the return value to unsigned
4669 long. Fix error predicate of target_auxv_search.
4670 (ppc_linux_nat_target::read_description): Change the type of the
4671 hwcap variable to CORE_ADDR.
4672
4673 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4674
4675 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4676 if the size of fpscr is larger than 32 bits.
4677
4678 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4679
4680 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4681 (ppc32_linux_vsxregmap): New global.
4682 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4683 regcache_supply_regset, and regcache_collect_regset.
4684 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4685 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4686 (fetch_vsx_register, store_vsx_register): Remove.
4687 (fetch_vsx_registers): Add regno parameter. Get regset using
4688 ppc_linux_vsxregset. Use regset to supply registers.
4689 (store_vsx_registers): Add regno parameter. Get regset using
4690 ppc_linux_vsxregset. Use regset to collect registers.
4691 (fetch_register): Call fetch_vsx_registers instead of
4692 fetch_vsx_register.
4693 (store_register): Call store_vsx_registers instead of
4694 store_vsx_register.
4695 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4696 new regno parameter.
4697 (store_ppc_registers): Call store_vsx_registers with -1 for the
4698 new regno parameter.
4699 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4700 (ppc_collect_vsxregset): Remove.
4701
4702 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4703
4704 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4705 offset fields.
4706 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4707 for vector register offset fields.
4708 (ppc64_fbsd_reg_offsets): Likewise.
4709 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4710 to vector register offset fields.
4711 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4712 to vector register offset fields.
4713 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4714 vector register offset fields.
4715 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4716 initializers for vector register offset fields.
4717 (rs6000_aix64_reg_offsets): Likewise.
4718 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4719 (ppc_supply_vrregset): Remove.
4720 (ppc_collect_vrregset): Remove.
4721 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4722 (ppc_linux_vrregset) : New function.
4723 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4724 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4725 (ppc32_linux_vrregset): Remove.
4726 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4727 and use result instead of ppc32_linux_vrregset.
4728 (ppc32_linux_reg_offsets): Remove initializers for vector register
4729 offset fields.
4730 (ppc64_linux_reg_offsets): Likewise.
4731 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4732 * ppc-linux-nat.c: Include regset.h.
4733 (gdb_vrregset_t): Adjust comment to account for little-endian
4734 mode.
4735 (supply_vrregset, fill_vrregset): Remove.
4736 (fetch_altivec_register, store_altivec_register): Remove.
4737 (fetch_altivec_registers): Add regno parameter. Get regset using
4738 ppc_linux_vrregset. Use regset to supply registers.
4739 (store_altivec_registers): Add regno parameter. Get regset using
4740 ppc_linux_vrregset. Use regset to collect registers.
4741 (fetch_register): Call fetch_altivec_registers instead of
4742 fetch_altivec_register.
4743 (store_register): Call store_altivec_registers instead of
4744 store_altivec_register.
4745 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4746 the new regno parameter.
4747 (store_ppc_registers): Call store_altivec_registers with -1 for
4748 the new regno parameter.
4749
4750 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4751
4752 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4753 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4754 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4755 (gdb_vrregset_t): Change array type size to
4756 PPC_LINUX_SIZEOF_VRREGSET.
4757 (gdb_vsxregset_t): Change array type size to
4758 PPC_LINUX_SIZEOF_VSXREGSET.
4759 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4760 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4761 PPC_LINUX_SIZEOF_VSXREGSET.
4762
4763 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4764
4765 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4766 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4767 nat/ppc-linux.c.
4768 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4769 ppc_linux_target_wordsize with tid.
4770 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4771 wordsize with tid.
4772 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4773 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4774 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4775 tid parameter. Remove static specifier.
4776 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4777 (ppc_linux_target_wordsize): New declaration.
4778
4779 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4780
4781 * arch/ppc-linux-common.c: New file.
4782 * arch/ppc-linux-common.h: New file.
4783 * arch/ppc-linux-tdesc.h: New file.
4784 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4785 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4786 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4787 arch/ppc-linux-tdesc.h.
4788 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4789 arch/ppc-linux-tdesc.h.
4790 (ppc_linux_nat_target::read_description): Remove target
4791 description matching code. Fill a ppc_linux_features struct and
4792 call ppc_linux_match_description with it. Move comment about ISA
4793 2.05 to ppc-linux-common.c.
4794 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4795 arch/ppc-linux-tdesc.h.
4796 (ppc_linux_core_read_description): Remove target description
4797 matching code. Fill a ppc_linux_features struct and call
4798 ppc_linux_match_description with it.
4799 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4800 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4801 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4802 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4803 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4804 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4805 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4806 (tdesc_powerpc_e500l): Remove.
4807
4808 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4809
4810 * ada-lang.c (catch_assert_command): Pass empty string instead
4811 of NULL for excep_string argument.
4812
4813 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4814
4815 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4816 the width of the requested register exceeds the width of the
4817 `ptrace' data type.
4818
4819 2018-05-21 Tom Tromey <tom@tromey.com>
4820
4821 * printcmd.c (output_command): Remove.
4822 (output_command_const): Rename to output_command.
4823 * valprint.h (output_command): Rename from output_command_const.
4824 * tracepoint.c (trace_dump_actions): Call output_command.
4825
4826 2018-05-21 Tom Tromey <tom@tromey.com>
4827
4828 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4829 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4830 * ada-lang.h (create_ada_exception_catchpoint): Update.
4831 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4832 std::string.
4833 (create_excep_cond_exprs, ~ada_catchpoint)
4834 (should_stop_exception, print_one_exception)
4835 (print_mention_exception, print_recreate_exception): Update.
4836 (ada_get_next_arg): Remove.
4837 (catch_ada_exception_command_split): Use std::string. Change type
4838 of "excep_string", "cond_string".
4839 (catch_ada_exception_command): Update.
4840 (create_ada_exception_catchpoint): Change type of excep_string.
4841 (ada_exception_sal): Remove excep_string parameter.
4842 (~ada_catchpoint): Remove.
4843
4844 2018-05-21 Tom Tromey <tom@tromey.com>
4845
4846 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4847 cleanup.
4848
4849 2018-05-21 Tom Tromey <tom@tromey.com>
4850
4851 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4852 Return unique_xmalloc_ptr.
4853 (print_it_exception): Update.
4854
4855 2018-05-21 Tom Tromey <tom@tromey.com>
4856
4857 * tracepoint.c (trace_dump_actions): Use std::string.
4858
4859 2018-05-21 Tom Tromey <tom@tromey.com>
4860
4861 * symfile.c (reread_symbols): Use std::string for original_name.
4862
4863 2018-05-21 Tom Tromey <tom@tromey.com>
4864
4865 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4866 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4867 constructor.
4868
4869 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4870
4871 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4872 instance to...
4873 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4874 * objfiles.c (get_objfile_bfd_data): Allocate
4875 objfile_per_bfd_storage with obstack_new when allocating on
4876 obstack.
4877
4878 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4879
4880 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4881 OBSTACK_ZALLOC.
4882 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4883 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4884 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4885 (add_pending): Likewise.
4886 (parse_symbol): Likewise.
4887 (parse_partial_symbols): Likewise.
4888 (psymtab_to_symtab_1): Likewise.
4889 (new_psymtab): Likewise.
4890 (elfmdebug_build_psymtabs): Likewise.
4891 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4892 * objfiles.c (get_objfile_bfd_data): Likewise.
4893 (objfile_register_static_link): Likewise.
4894 * psymtab.c (allocate_psymtab): Likewise.
4895 * stabsread.c (read_member_functions): Likewise.
4896 * xcoffread.c (xcoff_end_psymtab): Likewise.
4897
4898 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4899
4900 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4901 compiler supports std::is_trivially_constructible.
4902 * common/poison.h: Include obstack.h.
4903 (IsMallocable): Define to is_trivially_constructible if the
4904 compiler supports it, define to true_type otherwise.
4905 (xobnew): New.
4906 (XOBNEW): Redefine.
4907 (xobnewvec): New.
4908 (XOBNEWVEC): Redefine.
4909 * gdb_obstack.h (obstack_zalloc): New.
4910 (OBSTACK_ZALLOC): Redefine.
4911 (obstack_calloc): New.
4912 (OBSTACK_CALLOC): Redefine.
4913 (obstack_new): New.
4914 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4915 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4916 gdbarch.c.
4917 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4918 obstack_calloc/obstack_zalloc.
4919 (gdbarch_obstack_zalloc): Remove.
4920 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4921
4922 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4923
4924 * stack.c (backtrace_command_1): Remove useless variable int i.
4925
4926 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4927
4928 * stack.c (print_frame_info): Fix comment.
4929
4930 2018-05-18 Tom Tromey <tom@tromey.com>
4931
4932 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4933 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4934 (~dwarf2_per_objfile): Update
4935 (dwarf2_get_dwz_file): Use new.
4936 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4937 unique_ptr.
4938
4939 2018-05-18 Tom Tromey <tom@tromey.com>
4940
4941 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4942 unique_ptr.
4943 * dwarf2read.c (struct dwp_file): Add constructor and
4944 initializers.
4945 (open_and_init_dwp_file): Return a unique_ptr.
4946 (dwarf2_per_objfile, create_dwp_hash_table)
4947 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4948 (lookup_dwo_unit_in_dwp): Update.
4949 (open_and_init_dwp_file, get_dwp_file): Update.
4950
4951 2018-05-18 Tom Tromey <tom@tromey.com>
4952
4953 * dwarf2read.c (dwarf2_per_objfile): Update.
4954 (struct mapped_index): Add initializers.
4955 (dwarf2_read_index): Use new.
4956 (dw2_symtab_iter_init): Update.
4957 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4958 unique_ptr.
4959
4960 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4961
4962 * dwarf2read.c (mapped_index) <total_size>: Remove.
4963
4964 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4965
4966 * unittests/format_pieces-selftests.c (test_format_specifier):
4967 Add ARI comments.
4968
4969 2018-05-18 Tom Tromey <tom@tromey.com>
4970
4971 * c-typeprint.c (maybe_print_hole): New function.
4972 (c_print_type_struct_field_offset): Update.
4973 (c_type_print_base_struct_union): Call maybe_print_hole.
4974
4975 2018-05-17 Keith Seitz <keiths@redhat.com>
4976
4977 * breakpoint.c (build_bpstat_chain): New function, moved from
4978 bpstat_stop_status.
4979 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4980 If no stop chain is passed, call build_bpstat_chain to build it.
4981 * breakpoint.h (build_bpstat_chain): Declare.
4982 (bpstat_stop_status): Move documentation here from breakpoint.c.
4983 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4984 build the stop chain and pass it to skip_inline_frames.
4985 Pass this stop chain to bpstat_stop_status.
4986 * inline-frame.c: Include breakpoint.h.
4987 (stopped_by_user_bp_inline_frame): New function.
4988 (skip_inline_frames): Add parameter `stop_chain'.
4989 Move documention to inline-frame.h.
4990 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4991 whether the frame should be elided.
4992 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4993 Add moved documentation and update for new parameter.
4994
4995 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4996
4997 PR cli/14975
4998 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4999 unittests/format_pieces-selftests.c.
5000 * common/format.h (format_piece) <operator==>: New.
5001 (format_pieces) <operator[]>: Remove.
5002 * common/format.c (format_pieces::format_pieces): Handle \e.
5003 * unittests/format_pieces-selftests.c: New.
5004
5005 2018-05-17 Tom Tromey <tom@tromey.com>
5006
5007 PR symtab/23010:
5008 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5009 (dw2_instantiate_symtab): Add skip_partial parameter.
5010 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5011 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5012 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5013 (dw2_expand_symtabs_matching_one)
5014 (dw2_find_pc_sect_compunit_symtab)
5015 (dw2_debug_names_lookup_symbol)
5016 (dw2_debug_names_expand_symtabs_for_function): Update.
5017 (init_cutu_and_read_dies): Add skip_partial parameter.
5018 (process_psymtab_comp_unit, build_type_psymtabs_1)
5019 (process_skeletonless_type_unit, load_partial_comp_unit)
5020 (psymtab_to_symtab_1): Update.
5021 (load_full_comp_unit): Add skip_partial parameter.
5022 (process_imported_unit_die, dwarf2_read_addr_index)
5023 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5024 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5025 (read_signatured_type): Update.
5026
5027 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5028
5029 * value.c (release_value): Remove unused variable.
5030 (record_latest_value): Likewise.
5031 (access_value_history): Likewise.
5032 (preserve_values): Likewise.
5033
5034 2018-05-17 Tom Tromey <tom@tromey.com>
5035
5036 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5037 Initialize.
5038
5039 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5040
5041 PR gdb/22286
5042 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5043 Also handle registers whose width is not a multiple of
5044 PTRACE_TYPE_RET.
5045 (linux_nat_trad_target::store_register): Likewise.
5046
5047 2018-05-16 Tom Tromey <tom@tromey.com>
5048
5049 * gdbcore.h (core_bfd): Redefine.
5050 * corelow.c (core_target::close): Update.
5051 (core_target_open): Update.
5052 * progspace.h (struct program_space) <cbfd>: Now a
5053 gdb_bfd_ref_ptr.
5054
5055 2018-05-16 Tom Tromey <tom@tromey.com>
5056
5057 PR cli/19551:
5058 * symfile-add-flags.h (enum symfile_add_flags)
5059 <SYMFILE_NOT_FILENAME>: New constant.
5060 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5061 objfile name from BFD.
5062 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5063 * minidebug.c (find_separate_debug_file_in_section): Put
5064 ".gnu_debugdata" into BFD's file name.
5065
5066 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5067
5068 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5069 Remove.
5070
5071 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5072
5073 PR binutils/21446
5074 * aarch64-tdep.c (aarch64_analyze_prologue,
5075 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5076 Indicate not interested in errors.
5077
5078 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5079
5080 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5081 Supply the MIPS_ZERO_REGNUM register.
5082
5083 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5084
5085 * mips-tdep.c (mask_address_var): Make variable static.
5086
5087 2018-05-14 Tom Tromey <tom@tromey.com>
5088
5089 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5090
5091 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5092
5093 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5094 FXSAVE_ADDR for the mxcsr register.
5095
5096 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5097
5098 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5099
5100 2018-05-11 Pedro Alves <palves@redhat.com>
5101
5102 * corelow.c (core_target) <core_target>: No longer inline.
5103 Initialize m_core_gdbarch, m_core_vec and build the section table
5104 here.
5105 <~core_target>: New.
5106 <core_gdbarch, get_core_register_section>: New methods.
5107 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5108 factored out from ...
5109 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5110 (core_ops): Delete.
5111 (sniff_core_bfd): Add gdbarch parameter.
5112 (core_close): Delete, merged into ...
5113 (core_target::close): ... here. Delete self.
5114 (core_close_cleanup): Delete.
5115 (core_target_open): Allocate a core_target on the heap. Use a
5116 unique_ptr instead of a cleanup. Bits moved into the core_target
5117 ctor. Adjust to use core_target methods instead of globals.
5118 (get_core_register_section): Rename to ...
5119 (core_target::get_core_register_section): ... this and adjust.
5120 (struct get_core_registers_cb_data): New.
5121 (get_core_registers_cb): Use it. Use bool.
5122 (core_target::fetch_registers, core_target::files_info)
5123 (core_target::xfer_partial, core_target::read_description)
5124 (core_target::pid_to, core_target::thread_name): Adjust to
5125 reference class fields instead of globals.
5126 * target.h (struct target_ops_deleter, target_ops_up): New.
5127
5128 2018-05-11 Pedro Alves <palves@redhat.com>
5129
5130 * corefile.c (core_file_command): Move to corelow.c.
5131 * corelow.c (the_core_target): Delete.
5132 (core_file_command): Moved from corefile.c. Check exec_bfd
5133 instead of the_core_target. Use target_detach instead of calling
5134 into the_core_target directly.
5135 (maybe_say_no_core_file_now): New.
5136 (core_target::detach): Use it.
5137 (_initialize_corelow): Remove references to the_core_target.
5138 * gdbcore.h (the_core_target): Delete.
5139
5140 2018-05-11 Tom Tromey <tromey@redhat.com>
5141 Pedro Alves <palves@redhat.com>
5142
5143 * corefile.c (core_bfd): Remove.
5144 * gdbcore.h (core_bfd): Now a macro.
5145 * progspace.h (struct program_space) <cbfd>: New field.
5146
5147 2018-05-11 Tom Tromey <tom@tromey.com>
5148
5149 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5150 gdb::def_vector.
5151
5152 2018-05-10 Tom Tromey <tom@tromey.com>
5153
5154 * configure: Rebuild.
5155 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5156
5157 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5158
5159 PR server/23158:
5160 * regformats/regdat.sh: Adjust script, following the addition
5161 of the new expedite_regs parameter to init_target_desc.
5162
5163 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5164
5165 PR gdb/23127
5166 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5167 set_gdbarch_significant_addr_bit.
5168 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5169 set_gdbarch_significant_addr_bit.
5170 * utils.c (address_significant): Update to sign extend addr.
5171
5172 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5173
5174 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5175 (xtensa_linux_init_abi): Limit tdep->num_regs by
5176 tdep->num_nopriv_regs.
5177 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5178 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5179 not initialized.
5180
5181 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5182
5183 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5184
5185 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5186
5187 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5188 (I387_MXCSR_INIT_VAL): New constant.
5189 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5190 buffer if it was supplied by the inferior.
5191 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5192 (i387_xsave_get_clear_bv): New function.
5193 (i387_supply_xsave): Only read x87 control registers from the
5194 xsave buffer if the feature is enabled, and the state will have
5195 been written, otherwise, provide a suitable default.
5196 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5197 including x87 control registers. Update control registers if they
5198 have changed from the default value, and mark features as enabled
5199 as required.
5200 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5201
5202 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5203
5204 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5205
5206 2018-05-07 Tom Tromey <tom@tromey.com>
5207
5208 * configure: Rebuild.
5209 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5210
5211 2018-05-07 Tom Tromey <tom@tromey.com>
5212
5213 PR tdep/20362:
5214 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5215 bit. Use correct value for VDIV.
5216
5217 2018-05-04 Tom Tromey <tom@tromey.com>
5218
5219 * configure: Rebuild.
5220 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5221
5222 2018-05-04 Tom Tromey <tom@tromey.com>
5223
5224 * linux-record.c (record_linux_system_call) <case
5225 RECORD_SYS_RECVFROM>: Add "break".
5226
5227 2018-05-04 Tom Tromey <tom@tromey.com>
5228
5229 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5230 Add missing "break".
5231 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5232 Add missing "break".
5233
5234 2018-05-04 Tom Tromey <tom@tromey.com>
5235
5236 * rs6000-tdep.c (ppc_process_record_op4)
5237 (ppc_process_record_op63): Add fall-through comment.
5238
5239 2018-05-04 Tom Tromey <tom@tromey.com>
5240
5241 * i386-tdep.c (i386_process_record): Add fall-through comment.
5242
5243 2018-05-04 Tom Tromey <tom@tromey.com>
5244
5245 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5246 comment.
5247
5248 2018-05-04 Tom Tromey <tom@tromey.com>
5249
5250 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5251 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5252 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5253 comment.
5254 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5255 comment.
5256 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5257 comment.
5258
5259 2018-05-04 Tom Tromey <tom@tromey.com>
5260
5261 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5262
5263 2018-05-04 Tom Tromey <tom@tromey.com>
5264
5265 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5266 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5267 * symfile.c (section_is_mapped): Fix fall-through comment.
5268 * stabsread.c (define_symbol, read_member_functions): Fix
5269 fall-through comment.
5270 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5271 comment.
5272 * remote.c (remote_wait_as): Fix fall-through comment.
5273 * p-exp.y (yylex): Fix fall-through comment.
5274 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5275 comment.
5276 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5277 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5278 * jv-exp.y (yylex): Fix fall-through comment.
5279 * go-exp.y (lex_one_token): Fix fall-through comment.
5280 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5281 fall-through comment.
5282 * f-exp.y (yylex): Fix fall-through comment.
5283 * dwarf2read.c (process_die): Fix fall-through comments.
5284 * dbxread.c (process_one_symbol): Fix fall-through comment.
5285 * d-exp.y (lex_one_token): Fix fall-through comment.
5286 * cp-name-parser.y (yylex): Fix fall-through comment.
5287 * coffread.c (coff_symtab_read): Fix fall-through comment.
5288 * c-exp.y (lex_one_token): Fix fall-through comment.
5289 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5290 comment.
5291 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5292 comment.
5293
5294 2018-05-04 Tom Tromey <tom@tromey.com>
5295
5296 PR python/22730:
5297 * NEWS: Mention gdb.execute change.
5298 * gdbcmd.h (execute_control_command): Don't declare.
5299 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5300 execute_control_commands, execute_control_commands_to_string.
5301 * cli/cli-script.h (execute_control_commands)
5302 (execute_control_commands_to_string): Declare.
5303 (execute_control_command): Add from_tty parameter.
5304 * cli/cli-script.c (execute_control_commands)
5305 (execute_control_commands_to_string): New functions.
5306 (execute_user_command): Use execute_control_commands.
5307 (execute_control_command_1): Add "from_tty" parameter. Update.
5308 (execute_control_command): Likewise.
5309
5310 2018-05-04 Tom Tromey <tom@tromey.com>
5311
5312 PR python/22731:
5313 * NEWS: Mention that breakpoint commands are writable.
5314 * python/py-breakpoint.c (bppy_set_commands): New function.
5315 (breakpoint_object_getset) <"commands">: Use it.
5316
5317 2018-05-04 Tom Tromey <tom@tromey.com>
5318
5319 * tracepoint.c (actions_command): Update.
5320 * mi/mi-cmd-break.c (mi_command_line_array)
5321 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5322 (mi_read_next_line): Remove.
5323 (mi_cmd_break_commands): Update.
5324 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5325 function_view.
5326 * cli/cli-script.c (get_command_line): Update.
5327 (process_next_line): Use function_view. Constify.
5328 (recurse_read_control_structure, read_command_lines)
5329 (read_command_lines_1): Change argument types to function_view.
5330 (do_define_command, document_command): Update.
5331 * breakpoint.h (check_tracepoint_command): Don't declare.
5332 * breakpoint.c (check_tracepoint_command): Remove.
5333 (commands_command_1, create_tracepoint_from_upload): Update.
5334
5335 2018-05-04 Tom Tromey <tom@tromey.com>
5336
5337 PR gdb/11750:
5338 * cli/cli-script.h (enum command_control_type) <define_control>:
5339 New constant.
5340 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5341 (build_command_line, execute_control_command_1)
5342 (process_next_line): Likewise.
5343 (do_define_command): New function, extracted from define_command.
5344 (define_command): Use it.
5345
5346 2018-05-04 Tom Tromey <tom@tromey.com>
5347
5348 * tracepoint.c (actions_command): Update.
5349 * cli/cli-script.h (read_command_lines): Update.
5350 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5351 (MAX_TMPBUF): Remove define.
5352 (define_command): Use string_printf.
5353 (document_command): Likewise.
5354 * breakpoint.c (commands_command_1): Update.
5355
5356 2018-05-04 Tom Tromey <tom@tromey.com>
5357
5358 * top.c (execute_command): Update.
5359 * cli/cli-script.h (print_command_lines): Now varargs.
5360 * cli/cli-script.c (print_command_lines): Now varargs.
5361 (execute_control_command_1) <case while_control, case if_control>:
5362 Update.
5363
5364 2018-05-04 Tom Tromey <tom@tromey.com>
5365
5366 * tracepoint.c (all_tracepoint_actions): Rename from
5367 all_tracepoint_actions_and_cleanup. Change return type.
5368 (actions_command, encode_actions_1, encode_actions)
5369 (trace_dump_actions, tdump_command): Update.
5370 * remote.c (remote_download_command_source): Update.
5371 * python/python.c (gdbpy_eval_from_control_command)
5372 (python_command, python_interactive_command): Update.
5373 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5374 * guile/guile.c (guile_command)
5375 (gdbscm_eval_from_control_command, guile_command): Update.
5376 * compile/compile.c (compile_code_command)
5377 (compile_print_command, compile_to_object): Update.
5378 * cli/cli-script.h (struct command_lines_deleter): New.
5379 (counted_command_line): New typedef.
5380 (struct command_line): Add constructor, destructor.
5381 <body_list>: Remove.
5382 <body_list_0, body_list_1>: New members.
5383 (command_line_up): Remove typedef.
5384 (read_command_lines, read_command_lines_1, get_command_line):
5385 Update.
5386 (copy_command_lines): Don't declare.
5387 * cli/cli-script.c (build_command_line): Use "new".
5388 (get_command_line): Return counted_command_line.
5389 (print_command_lines, execute_user_command)
5390 (execute_control_command_1, while_command, if_command): Update.
5391 (realloc_body_list): Remove.
5392 (process_next_line, recurse_read_control_structure): Update.
5393 (read_command_lines, read_command_lines_1): Return counted_command_line.
5394 (free_command_lines): Use "delete".
5395 (copy_command_lines): Remove.
5396 (define_command, document_command, show_user_1): Update.
5397 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5398 a counted_command_line.
5399 * breakpoint.h (counted_command_line): Remove typedef.
5400 (breakpoint_set_commands): Update.
5401 * breakpoint.c (check_no_tracepoint_commands)
5402 (validate_commands_for_breakpoint): Update.
5403 (breakpoint_set_commands): Change commands to be a
5404 counted_command_line.
5405 (commands_command_1, update_dprintf_command_list)
5406 (create_tracepoint_from_upload): Update.
5407
5408 2018-05-04 Tom Tromey <tom@tromey.com>
5409
5410 * cli/cli-decode.h (cmd_list_element): New constructor.
5411 (~cmd_list_element): New destructor.
5412 (struct cmd_list_element): Add initializers.
5413 * cli/cli-decode.c (do_add_cmd): Use "new".
5414 (delete_cmd): Use "delete".
5415
5416 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5417 Pedro Alves <palves@redhat.com>
5418
5419 PR breakpoints/19806 and support for PR external/20207.
5420 * NEWS: Mention Aarch64 watchpoint improvements.
5421 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5422 watchpoints and PR external/20207 watchpoints.
5423 * nat/aarch64-linux-hw-point.c
5424 (kernel_supports_any_contiguous_range): New.
5425 (aarch64_watchpoint_offset): New.
5426 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5427 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5428 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5429 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5430 next_addr_orig_p. Support PR external/20207 watchpoints.
5431 (aarch64_downgrade_regs): New.
5432 (aarch64_dr_state_insert_one_point): New parameters offset and
5433 addr_orig.
5434 (aarch64_dr_state_remove_one_point): Likewise.
5435 (aarch64_handle_breakpoint): Update caller.
5436 (aarch64_handle_aligned_watchpoint): Likewise.
5437 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5438 aligned_offset.
5439 (aarch64_linux_set_debug_regs): Remove const from state. Call
5440 aarch64_downgrade_regs.
5441 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5442 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5443 (DR_CONTROL_MASK): ... this.
5444 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5445 (unsigned int aarch64_watchpoint_offset): New prototype.
5446 (aarch64_linux_set_debug_regs): Remove const from state.
5447 * utils.c (align_up, align_down): Move to ...
5448 * common/common-utils.c (align_up, align_down): ... here.
5449 * utils.h (align_up, align_down): Move to ...
5450 * common/common-utils.h (align_up, align_down): ... here.
5451
5452 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5453
5454 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5455 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5456 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5457 Re-implement to match the ABI as summarized in GCC's
5458 gcc/config/sparc/sparc.c. All callers updated.
5459 (sparc32_store_arguments): Remove assertion.
5460
5461 2018-05-04 Tom Tromey <tom@tromey.com>
5462
5463 * printcmd.c: Don't include tui.h.
5464 (decode_format): Use skip_spaces.
5465
5466 2018-05-04 Tom Tromey <tom@tromey.com>
5467
5468 PR gdb/22619:
5469 * printcmd.c (last_count): New global.
5470 (x_command): Use saved count when repeating.
5471
5472 2018-05-04 Tom Tromey <tom@tromey.com>
5473
5474 * nto-procfs.c (do_closedir_cleanup): Remove.
5475 (procfs_pidlist): Use gdb_dir_up.
5476 * procfs.c (do_closedir_cleanup): Remove.
5477 (proc_update_threads): Use gdb_dir_up.
5478 * common/filestuff.h (struct gdb_dir_deleter): New.
5479 (gdb_dir_up): New typedef.
5480
5481 2018-05-04 Tom Tromey <tom@tromey.com>
5482
5483 * ada-lang.c (print_mention_exception): Use std::string.
5484
5485 2018-05-04 Tom Tromey <tom@tromey.com>
5486
5487 * ada-lang.c (create_excep_cond_exprs): Update.
5488 (ada_exception_catchpoint_cond_string): Use std::string.
5489
5490 2018-05-04 Tom Tromey <tom@tromey.com>
5491
5492 * ada-lang.c (xget_renaming_scope): Return std::string.
5493 (old_renaming_is_invisible): Update.
5494
5495 2018-05-04 Tom Tromey <tom@tromey.com>
5496
5497 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5498 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5499
5500 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5501
5502 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5503
5504 2018-05-04 Tom Tromey <tom@tromey.com>
5505
5506 * remote.c (remote_query_supported_append): Change type.
5507 (remote_check_symbols): Update.
5508
5509 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5510
5511 PR gdb/11420
5512 * configure.ac: Prepend libpython.
5513 * python/python-config.py: Likewise.
5514 * configure: Regenerate.
5515
5516 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5517
5518 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5519
5520 2018-05-03 Pedro Alves <palves@redhat.com>
5521
5522 * s390-linux-nat.c
5523 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5524 override. Write 'true' instead of '1'.
5525 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5526 declaration.
5527
5528 2018-05-02 Pedro Alves <palves@redhat.com>
5529
5530 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5531 add_inf_child_target.
5532 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5533 add_inf_child_target.
5534 * aix-thread.c (aix_thread_target_info): New.
5535 (aix_thread_target) <shortname, longname, doc>: Delete.
5536 <info>: New.
5537 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5538 add_inf_child_target.
5539 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5540 add_inf_child_target.
5541 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5542 add_inf_child_target.
5543 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5544 add_inf_child_target.
5545 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5546 add_inf_child_target.
5547 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5548 add_inf_child_target.
5549 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5550 add_inf_child_target.
5551 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5552 add_inf_child_target.
5553 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5554 add_inf_child_target.
5555 * bfd-target.c (target_bfd_target_info): New.
5556 (target_bfd) <shortname, longname, doc>: Delete.
5557 <info>: New.
5558 * bsd-kvm.c (bsd_kvm_target_info): New.
5559 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5560 <info>: New.
5561 (bsd_kvm_target::open): Rename to ...
5562 (bsd_kvm_target_open): ... this. Adjust.
5563 * bsd-uthread.c (bsd_uthread_target_info): New.
5564 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5565 <info>: New.
5566 * corefile.c (core_file_command): Adjust.
5567 * corelow.c (core_target_info): New.
5568 (core_target) <shortname, longname, doc>: Delete.
5569 <info>: New.
5570 (core_target::open): Rename to ...
5571 (core_target_open): ... this. Adjust.
5572 * ctf.c (ctf_target_info): New.
5573 (ctf_target) <shortname, longname, doc>: Delete.
5574 <info>: New.
5575 (ctf_target::open): Rename to ...
5576 (ctf_target_open): ... this.
5577 (_initialize_ctf): Adjust.
5578 * exec.c (exec_target_info): New.
5579 (exec_target) <shortname, longname, doc>: Delete.
5580 <info>: New.
5581 (exec_target::open): Rename to ...
5582 (exec_target_open): ... this.
5583 * gdbcore.h (core_target_open): Declare.
5584 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5585 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5586 add_inf_child_target.
5587 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5588 add_inf_child_target.
5589 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5590 add_inf_child_target.
5591 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5592 add_inf_child_target.
5593 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5594 add_inf_child_target.
5595 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5596 add_inf_child_target.
5597 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5598 add_inf_child_target.
5599 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5600 add_inf_child_target.
5601 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5602 add_inf_child_target.
5603 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5604 add_inf_child_target.
5605 * inf-child.c (inf_child_target_info): New.
5606 (inf_child_target::info): New.
5607 (inf_child_open_target): Remove 'target' parameter. Use
5608 get_native_target instead.
5609 (inf_child_target::open): Delete.
5610 (add_inf_child_target): New.
5611 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5612 Delete.
5613 <info>: New.
5614 (add_inf_child_target): Declare.
5615 (inf_child_open_target): Declare.
5616 * linux-thread-db.c (thread_db_target_info): New.
5617 (thread_db_target) <shortname, longname, doc>: Delete.
5618 <info>: New.
5619 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5620 add_inf_child_target.
5621 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5622 add_inf_child_target.
5623 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5624 add_inf_child_target.
5625 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5626 add_inf_child_target.
5627 * make-target-delegates (print_class): Adjust.
5628 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5629 add_inf_child_target.
5630 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5631 add_inf_child_target.
5632 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5633 add_inf_child_target.
5634 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5635 add_inf_child_target.
5636 * nto-procfs.c (nto_native_target_info): New.
5637 (nto_procfs_target_native) <shortname, longname, doc>:
5638 Delete.
5639 <info>: New.
5640 (nto_procfs_target_info): New.
5641 (nto_procfs_target_procfs) <shortname, longname, doc>:
5642 Delete.
5643 <info>: New.
5644 (init_procfs_targets): Adjust.
5645 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5646 add_inf_child_target.
5647 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5648 add_inf_child_target.
5649 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5650 add_inf_child_target.
5651 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5652 add_inf_child_target.
5653 * ravenscar-thread.c (ravenscar_target_info): New.
5654 (ravenscar_thread_target) <shortname, longname, doc>:
5655 Delete.
5656 <info>: New.
5657 * record-btrace.c (record_btrace_target_info):
5658 (record_btrace_target) <shortname, longname, doc>: Delete.
5659 <info>: New.
5660 (record_btrace_target::open): Rename to ...
5661 (record_btrace_target_open): ... this. Adjust.
5662 * record-full.c (record_longname, record_doc): New.
5663 (record_full_base_target) <shortname, longname, doc>: Delete.
5664 <info>: New.
5665 (record_full_target_info): New.
5666 (record_full_target): <shortname>: Delete.
5667 <info>: New.
5668 (record_full_core_open_1, record_full_open_1): Update comments.
5669 (record_full_base_target::open): Rename to ...
5670 (record_full_open): ... this.
5671 (cmd_record_full_restore): Update.
5672 (_initialize_record_full): Update.
5673 * remote-sim.c (remote_sim_target_info): New.
5674 (gdbsim_target) <shortname, longname, doc>: Delete.
5675 <info>: New.
5676 (gdbsim_target::open): Rename to ...
5677 (gdbsim_target_open): ... this.
5678 (_initialize_remote_sim): Adjust.
5679 * remote.c (remote_doc): New.
5680 (remote_target_info): New.
5681 (remote_target) <shortname, longname, doc>: Delete.
5682 <info>: New.
5683 (extended_remote_target_info): New.
5684 (extended_remote_target) <shortname, longname, doc>: Delete.
5685 <info>: New.
5686 (remote_target::open_1): Make static. Adjust.
5687 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5688 * s390-linux-nat.c (_initialize_s390_nat): Use
5689 add_inf_child_target.
5690 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5691 add_inf_child_target.
5692 * sol-thread.c (thread_db_target_info): New.
5693 (sol_thread_target) <shortname, longname, doc>: Delete.
5694 <info>: New.
5695 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5696 add_inf_child_target.
5697 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5698 add_inf_child_target.
5699 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5700 add_inf_child_target.
5701 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5702 add_inf_child_target.
5703 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5704 add_inf_child_target.
5705 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5706 add_inf_child_target.
5707 * spu-linux-nat.c (_initialize_spu_nat): Use
5708 add_inf_child_target.
5709 * spu-multiarch.c (spu_multiarch_target_info): New.
5710 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5711 <info>: New.
5712 * target-delegates.c: Regenerate.
5713 * target.c: Include <unordered_map>.
5714 (target_ops_p): Delete.
5715 (DEF_VEC_P(target_ops_p)): Delete.
5716 (target_factories): New.
5717 (test_target_info): New.
5718 (test_target_ops::info): New.
5719 (open_target): Adjust to use target_factories.
5720 (add_target_with_completer): Rename to ...
5721 (add_target): ... this. Change prototype. Register target_info
5722 and open callback in target_factories. Register target_info in
5723 command context instead of target_ops.
5724 (add_target): Delete old implementation.
5725 (add_deprecated_target_alias): Change prototype. Adjust.
5726 (the_native_target): New.
5727 (set_native_target, get_native_target): New.
5728 (find_default_run_target): Use the_native_target.
5729 (find_attach_target, find_run_target): Simplify.
5730 (target_ops::open): Delete.
5731 (dummy_target_info): New.
5732 (dummy_target::shortname, dummy_target::longname)
5733 (dummy_target::doc): Delete.
5734 (dummy_target::info): New.
5735 (debug_target::shortname, debug_target::longname)
5736 (debug_target::doc): Delete.
5737 (debug_target::info): New.
5738 * target.h (struct target_info): New.
5739 (target_ops::~target_ops): Add comment.
5740 (target_ops::info): New.
5741 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5742 longer virtual. Implement in terms of target_info.
5743 (set_native_target, get_native_target): Declare.
5744 (target_open_ftype): New.
5745 (add_target, add_target_with_completer)
5746 (add_deprecated_target_alias): Change prototype.
5747 (test_target) <shortname, longname, doc>: Delete.
5748 <info>: New.
5749 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5750 add_inf_child_target.
5751 * tracefile-tfile.c (tfile_target_info): New.
5752 (tfile_target) <shortname, longname, doc>: Delete.
5753 <info>: New.
5754 (tfile_target::open): Rename to ...
5755 (tfile_target_open): ... this.
5756 (_initialize_tracefile_tfile): Adjust.
5757 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5758 add_inf_child_target.
5759 * windows-nat.c (_initialize_windows_nat): Use
5760 add_inf_child_target.
5761 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5762 add_inf_child_target.
5763
5764 2018-05-02 Pedro Alves <palves@redhat.com>
5765
5766 * linux-nat.h (linux_nat_target) <low_new_thread,
5767 low_delete_thread, low_new_fork, low_forget_process,
5768 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5769 New virtual methods.
5770 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5771 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5772 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5773 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5774 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5775 Delete.
5776 * linux-fork.c (delete_fork): Adjust to call low method.
5777 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5778 (linux_nat_new_fork, linux_nat_forget_process_hook)
5779 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5780 (linux_nat_status_is_event):
5781 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5782 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5783 to call low method.
5784 (sigtrap_is_event): Rename to ...
5785 (linux_nat_target::low_status_is_event): ... this.
5786 (linux_nat_set_status_is_event): Delete.
5787 (save_stop_reason, linux_nat_wait_1)
5788 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5789 low methods.
5790 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5791 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5792 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5793 (linux_nat_set_prepare_to_resume): Delete.
5794 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5795 low virtual methods.
5796 * amd64-linux-nat.c: Likewise.
5797 * arm-linux-nat.c: Likewise.
5798 * i386-linux-nat.c: Likewise.
5799 * ia64-linux-nat.c: Likewise.
5800 * mips-linux-nat.c: Likewise.
5801 * ppc-linux-nat.c: Likewise.
5802 * s390-linux-nat.c: Likewise.
5803 * sparc64-linux-nat.c: Likewise.
5804 * x86-linux-nat.c: Likewise.
5805 * x86-linux-nat.h: Include "nat/x86-linux.h".
5806 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5807 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5808 Override methods.
5809
5810 2018-05-02 Pedro Alves <palves@redhat.com>
5811
5812 * target.h (target_ops)
5813 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5814 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5815 stopped_by_watchpoint, have_continuable_watchpoint,
5816 stopped_data_address, watchpoint_addr_within_range,
5817 can_accel_watchpoint_condition, can_run, thread_alive,
5818 has_all_memory, has_memory, has_stack, has_registers,
5819 has_execution, can_async_p, is_async_p, supports_non_stop,
5820 always_non_stop_p, can_execute_reverse, supports_multi_process,
5821 supports_enable_disable_tracepoint,
5822 supports_disable_randomization, supports_string_tracing,
5823 supports_evaluation_of_breakpoint_conditions,
5824 can_run_breakpoint_commands, filesystem_is_local,
5825 can_download_tracepoint, get_trace_state_variable_value,
5826 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5827 record_is_replaying, record_will_replay,
5828 augmented_libraries_svr4_read>: Adjust to return bool.
5829 * aarch64-linux-nat.c: All implementations adjusted.
5830 * aix-thread.c: All implementations adjusted.
5831 * arm-linux-nat.c: All implementations adjusted.
5832 * breakpoint.c: All implementations adjusted.
5833 * bsd-kvm.c: All implementations adjusted.
5834 * bsd-uthread.c: All implementations adjusted.
5835 * corelow.c: All implementations adjusted.
5836 * ctf.c: All implementations adjusted.
5837 * darwin-nat.c: All implementations adjusted.
5838 * darwin-nat.h: All implementations adjusted.
5839 * exec.c: All implementations adjusted.
5840 * fbsd-nat.c: All implementations adjusted.
5841 * fbsd-nat.h: All implementations adjusted.
5842 * gnu-nat.c: All implementations adjusted.
5843 * gnu-nat.h: All implementations adjusted.
5844 * go32-nat.c: All implementations adjusted.
5845 * ia64-linux-nat.c: All implementations adjusted.
5846 * inf-child.c: All implementations adjusted.
5847 * inf-child.h: All implementations adjusted.
5848 * inf-ptrace.c: All implementations adjusted.
5849 * inf-ptrace.h: All implementations adjusted.
5850 * linux-nat.c: All implementations adjusted.
5851 * linux-nat.h: All implementations adjusted.
5852 * mips-linux-nat.c: All implementations adjusted.
5853 * nto-procfs.c: All implementations adjusted.
5854 * ppc-linux-nat.c: All implementations adjusted.
5855 * procfs.c: All implementations adjusted.
5856 * ravenscar-thread.c: All implementations adjusted.
5857 * record-btrace.c: All implementations adjusted.
5858 * record-full.c: All implementations adjusted.
5859 * remote-sim.c: All implementations adjusted.
5860 * remote.c: All implementations adjusted.
5861 * s390-linux-nat.c: All implementations adjusted.
5862 * sol-thread.c: All implementations adjusted.
5863 * spu-multiarch.c: All implementations adjusted.
5864 * target-delegates.c: All implementations adjusted.
5865 * target.c: All implementations adjusted.
5866 * target.h: All implementations adjusted.
5867 * tracefile-tfile.c: All implementations adjusted.
5868 * tracefile.c: All implementations adjusted.
5869 * tracefile.h: All implementations adjusted.
5870 * windows-nat.c: All implementations adjusted.
5871 * x86-linux-nat.h: All implementations adjusted.
5872 * x86-nat.h: All implementations adjusted.
5873
5874 2018-05-02 Pedro Alves <palves@redhat.com>
5875
5876 * make-target-delegates (scan_target_h): Don't trim lines here.
5877 Replace sequences of tabs and/or whitespace with a single
5878 whitespace.
5879 (top level, parsing methods): Trim each line before processing it
5880 here.
5881
5882 2018-05-02 Pedro Alves <palves@redhat.com>
5883 John Baldwin <jhb@freebsd.org>
5884
5885 * target.h (enum strata) <debug_stratum>: New.
5886 (struct target_ops) <all delegation methods>: Replace by C++
5887 virtual methods, and drop "to_" prefix. All references updated
5888 throughout.
5889 <to_shortname, to_longname, to_doc, to_data,
5890 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5891 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5892 virtual methods. All references updated throughout.
5893 <can_attach, supports_terminal_ours, can_create_inferior,
5894 get_thread_control_capabilities, attach_no_wait>: New
5895 virtual methods.
5896 <insert_breakpoint, remove_breakpoint>: Now
5897 TARGET_DEFAULT_NORETURN methods.
5898 <info_proc>: Now returns bool.
5899 <to_magic>: Delete.
5900 (OPS_MAGIC): Delete.
5901 (current_target): Delete. All references replaced by references
5902 to ...
5903 (target_stack): ... this. New.
5904 (target_shortname, target_longname): Adjust.
5905 (target_can_run): Now a function declaration.
5906 (default_child_has_all_memory, default_child_has_memory)
5907 (default_child_has_stack, default_child_has_registers)
5908 (default_child_has_execution): Remove target_ops parameter.
5909 (complete_target_initialization): Delete.
5910 (memory_breakpoint_target): New template class.
5911 (test_target_ops): Refactor as a C++ class with virtual methods.
5912 * make-target-delegates (NAME_PART): Tighten.
5913 (POINTER_PART, CP_SYMBOL): New.
5914 (SIMPLE_RETURN_PART): Reimplement.
5915 (VEC_RETURN_PART): Expect less.
5916 (RETURN_PART, VIRTUAL_PART): New.
5917 (METHOD): Adjust to C++ virtual methods.
5918 (scan_target_h): Remove reference to C99.
5919 (dname): Output "target_ops::" prefix.
5920 (write_function_header): Adjust to output a C++ class method.
5921 (write_declaration): New.
5922 (write_delegator): Adjust to output a C++ class method.
5923 (tdname): Output "dummy_target::" prefix.
5924 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5925 method.
5926 (tdefault_names, debug_names): Delete.
5927 (return_types, tdefaults, styles, argtypes_array): New.
5928 (top level): All methods are delegators.
5929 (print_class): New.
5930 (top level): Print dummy_target and debug_target classes.
5931 * target-delegates.c: Regenerate.
5932 * target-debug.h (target_debug_print_enum_info_proc_what)
5933 (target_debug_print_thread_control_capabilities)
5934 (target_debug_print_thread_info_p): New.
5935 * target.c (dummy_target): Delete.
5936 (the_dummy_target, the_debug_target): New.
5937 (target_stack): Now extern.
5938 (set_targetdebug): Push/unpush debug target.
5939 (default_child_has_all_memory, default_child_has_memory)
5940 (default_child_has_stack, default_child_has_registers)
5941 (default_child_has_execution): Remove target_ops parameter.
5942 (complete_target_initialization): Delete.
5943 (add_target_with_completer): No longer call
5944 complete_target_initialization.
5945 (target_supports_terminal_ours): Use regular delegation.
5946 (update_current_target): Delete.
5947 (push_target): No longer check magic number. Don't call
5948 update_current_target.
5949 (unpush_target): Don't call update_current_target.
5950 (target_is_pushed): No longer check magic number.
5951 (target_require_runnable): Skip for all stratums over
5952 process_stratum.
5953 (target_ops::info_proc): New.
5954 (target_info_proc): Use find_target_at and
5955 find_default_run_target.
5956 (target_supports_disable_randomization): Use regular delegation.
5957 (target_get_osdata): Use find_target_at.
5958 (target_ops::open, target_ops::close, target_ops::can_attach)
5959 (target_ops::attach, target_ops::can_create_inferior)
5960 (target_ops::create_inferior, target_ops::can_run)
5961 (target_can_run): New.
5962 (default_fileio_target): Use regular delegation.
5963 (target_ops::fileio_open, target_ops::fileio_pwrite)
5964 (target_ops::fileio_pread, target_ops::fileio_fstat)
5965 (target_ops::fileio_close, target_ops::fileio_unlink)
5966 (target_ops::fileio_readlink): New.
5967 (target_fileio_open_1, target_fileio_unlink)
5968 (target_fileio_readlink): Always call the target method. Handle
5969 FILEIO_ENOSYS.
5970 (return_zero, return_zero_has_execution): Delete.
5971 (init_dummy_target): Delete.
5972 (dummy_target::dummy_target, dummy_target::shortname)
5973 (dummy_target::longname, dummy_target::doc)
5974 (debug_target::debug_target, debug_target::shortname)
5975 (debug_target::longname, debug_target::doc): New.
5976 (target_supports_delete_record): Use regular delegation.
5977 (setup_target_debug): Delete.
5978 (maintenance_print_target_stack): Skip debug_stratum.
5979 (initialize_targets): Instantiate the_dummy_target and
5980 the_debug_target.
5981 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5982 use target_stack.
5983 (target_auxv_search, fprint_target_auxv): Adjust.
5984 (info_auxv_command): Adjust to use target_stack.
5985 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5986 * exceptions.c (print_flush): Handle a NULL target_stack.
5987 * regcache.c (target_ops_no_register): Refactor as class with
5988 virtual methods.
5989
5990 * exec.c (exec_target): New class.
5991 (exec_ops): Now an exec_target.
5992 (exec_open, exec_close_1, exec_get_section_table)
5993 (exec_xfer_partial, exec_files_info, exec_has_memory)
5994 (exec_make_note_section): Refactor as exec_target methods.
5995 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5996 Delete.
5997 (exec_target::find_memory_regions): New.
5998 (_initialize_exec): Don't call init_exec_ops.
5999 * gdbcore.h (exec_file_clear): Delete.
6000
6001 * corefile.c (core_target): Delete.
6002 (core_file_command): Adjust.
6003 * corelow.c (core_target): New class.
6004 (the_core_target): New.
6005 (core_close): Remove target_ops parameter.
6006 (core_close_cleanup): Adjust.
6007 (core_target::close): New.
6008 (core_open, core_detach, get_core_registers, core_files_info)
6009 (core_xfer_partial, core_thread_alive, core_read_description)
6010 (core_pid_to_str, core_thread_name, core_has_memory)
6011 (core_has_stack, core_has_registers, core_info_proc): Rework as
6012 core_target methods.
6013 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6014 (_initialize_corelow): Initialize the_core_target.
6015 * gdbcore.h (core_target): Delete.
6016 (the_core_target): New.
6017
6018 * ctf.c: (ctf_target): New class.
6019 (ctf_ops): Now a ctf_target.
6020 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6021 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6022 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6023 methods.
6024 (init_ctf_ops): Delete.
6025 (_initialize_ctf): Don't call it.
6026 * tracefile-tfile.c (tfile_target): New class.
6027 (tfile_ops): Now a tfile_target.
6028 (tfile_open, tfile_close, tfile_files_info)
6029 (tfile_get_tracepoint_status, tfile_trace_find)
6030 (tfile_fetch_registers, tfile_xfer_partial)
6031 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6032 Refactor as tfile_target methods.
6033 (tfile_xfer_partial_features): Remove target_ops parameter.
6034 (init_tfile_ops): Delete.
6035 (_initialize_tracefile_tfile): Don't call it.
6036 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6037 (tracefile_has_stack, tracefile_has_registers)
6038 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6039 tracefile_target methods.
6040 (init_tracefile_ops): Delete.
6041 (tracefile_target::tracefile_target): New.
6042 * tracefile.h: Include "target.h".
6043 (tracefile_target): New class.
6044 (init_tracefile_ops): Delete.
6045
6046 * spu-multiarch.c (spu_multiarch_target): New class.
6047 (spu_ops): Now a spu_multiarch_target.
6048 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6049 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6050 (spu_search_memory, spu_mourn_inferior): Refactor as
6051 spu_multiarch_target methods.
6052 (init_spu_ops): Delete.
6053 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6054 complete_target_initialization.
6055
6056 * ravenscar-thread.c (ravenscar_thread_target): New class.
6057 (ravenscar_ops): Now a ravenscar_thread_target.
6058 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6059 (ravenscar_thread_alive, ravenscar_pid_to_str)
6060 (ravenscar_fetch_registers, ravenscar_store_registers)
6061 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6062 (ravenscar_stopped_by_hw_breakpoint)
6063 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6064 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6065 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6066 methods.
6067 (init_ravenscar_thread_ops): Delete.
6068 (_initialize_ravenscar): Remove references to
6069 init_ravenscar_thread_ops and complete_target_initialization.
6070
6071 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6072 (bsd_uthread_target): New class.
6073 (bsd_uthread_ops): Now a bsd_uthread_target.
6074 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6075 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6076 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6077 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6078 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6079 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6080 (bsd_uthread_target): Delete function.
6081 (_initialize_bsd_uthread): Remove reference to
6082 complete_target_initialization.
6083
6084 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6085 (target_bfd): ... this new class.
6086 (target_bfd_xfer_partial, target_bfd_get_section_table)
6087 (target_bfd_close): Refactor as target_bfd methods.
6088 (target_bfd::~target_bfd): New.
6089 (target_bfd_reopen): Adjust.
6090 (target_bfd::close): New.
6091
6092 * record-btrace.c (record_btrace_target): New class.
6093 (record_btrace_ops): Now a record_btrace_target.
6094 (record_btrace_open, record_btrace_stop_recording)
6095 (record_btrace_disconnect, record_btrace_close)
6096 (record_btrace_async, record_btrace_info)
6097 (record_btrace_insn_history, record_btrace_insn_history_range)
6098 (record_btrace_insn_history_from, record_btrace_call_history)
6099 (record_btrace_call_history_range)
6100 (record_btrace_call_history_from, record_btrace_record_method)
6101 (record_btrace_is_replaying, record_btrace_will_replay)
6102 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6103 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6104 (record_btrace_store_registers, record_btrace_prepare_to_store)
6105 (record_btrace_to_get_unwinder)
6106 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6107 (record_btrace_commit_resume, record_btrace_wait)
6108 (record_btrace_stop, record_btrace_can_execute_reverse)
6109 (record_btrace_stopped_by_sw_breakpoint)
6110 (record_btrace_supports_stopped_by_sw_breakpoint)
6111 (record_btrace_stopped_by_hw_breakpoint)
6112 (record_btrace_supports_stopped_by_hw_breakpoint)
6113 (record_btrace_update_thread_list, record_btrace_thread_alive)
6114 (record_btrace_goto_begin, record_btrace_goto_end)
6115 (record_btrace_goto, record_btrace_stop_replaying_all)
6116 (record_btrace_execution_direction)
6117 (record_btrace_prepare_to_generate_core)
6118 (record_btrace_done_generating_core): Refactor as
6119 record_btrace_target methods.
6120 (init_record_btrace_ops): Delete.
6121 (_initialize_record_btrace): Remove reference to
6122 init_record_btrace_ops.
6123 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6124 the execution_direction global.
6125 (record_full_base_target, record_full_target)
6126 (record_full_core_target): New classes.
6127 (record_full_ops): Now a record_full_target.
6128 (record_full_core_ops): Now a record_full_core_target.
6129 (record_full_target::detach, record_full_target::disconnect)
6130 (record_full_core_target::disconnect)
6131 (record_full_target::mourn_inferior, record_full_target::kill):
6132 New.
6133 (record_full_open, record_full_close, record_full_async): Refactor
6134 as methods of the record_full_base_target class.
6135 (record_full_resume, record_full_commit_resume): Refactor
6136 as methods of the record_full_target class.
6137 (record_full_wait, record_full_stopped_by_watchpoint)
6138 (record_full_stopped_data_address)
6139 (record_full_stopped_by_sw_breakpoint)
6140 (record_full_supports_stopped_by_sw_breakpoint)
6141 (record_full_stopped_by_hw_breakpoint)
6142 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6143 methods of the record_full_base_target class.
6144 (record_full_store_registers, record_full_xfer_partial)
6145 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6146 Refactor as methods of the record_full_target class.
6147 (record_full_can_execute_reverse, record_full_get_bookmark)
6148 (record_full_goto_bookmark, record_full_execution_direction)
6149 (record_full_record_method, record_full_info, record_full_delete)
6150 (record_full_is_replaying, record_full_will_replay)
6151 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6152 (record_full_stop_replaying): Refactor as methods of the
6153 record_full_base_target class.
6154 (record_full_core_resume, record_full_core_kill)
6155 (record_full_core_fetch_registers)
6156 (record_full_core_prepare_to_store)
6157 (record_full_core_store_registers, record_full_core_xfer_partial)
6158 (record_full_core_insert_breakpoint)
6159 (record_full_core_remove_breakpoint)
6160 (record_full_core_has_execution): Refactor
6161 as methods of the record_full_core_target class.
6162 (record_full_base_target::supports_delete_record): New.
6163 (init_record_full_ops): Delete.
6164 (init_record_full_core_ops): Delete.
6165 (record_full_save): Refactor as method of the
6166 record_full_base_target class.
6167 (_initialize_record_full): Remove references to
6168 init_record_full_ops and init_record_full_core_ops.
6169
6170 * remote.c (remote_target, extended_remote_target): New classes.
6171 (remote_ops): Now a remote_target.
6172 (extended_remote_ops): Now an extended_remote_target.
6173 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6174 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6175 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6176 (remote_pass_signals, remote_set_syscall_catchpoint)
6177 (remote_program_signals, )
6178 (remote_thread_always_alive): Remove target_ops parameter.
6179 (remote_thread_alive, remote_thread_name)
6180 (remote_update_thread_list, remote_threads_extra_info)
6181 (remote_static_tracepoint_marker_at)
6182 (remote_static_tracepoint_markers_by_strid)
6183 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6184 (remote_open): Refactor as methods of remote_target.
6185 (extended_remote_open, extended_remote_detach)
6186 (extended_remote_attach, extended_remote_post_attach):
6187 (extended_remote_supports_disable_randomization)
6188 (extended_remote_create_inferior): : Refactor as method of
6189 extended_remote_target.
6190 (remote_set_permissions, remote_open_1, remote_detach)
6191 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6192 (remote_resume, remote_commit_resume, remote_stop)
6193 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6194 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6195 (remote_prepare_to_store, remote_store_registers)
6196 (remote_flash_erase, remote_flash_done, remote_files_info)
6197 (remote_kill, remote_mourn, remote_insert_breakpoint)
6198 (remote_remove_breakpoint, remote_insert_watchpoint)
6199 (remote_watchpoint_addr_within_range)
6200 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6201 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6202 (remote_supports_stopped_by_sw_breakpoint)
6203 (remote_stopped_by_hw_breakpoint)
6204 (remote_supports_stopped_by_hw_breakpoint)
6205 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6206 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6207 (remote_verify_memory): Refactor as methods of remote_target.
6208 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6209 parameter.
6210 (remote_xfer_partial, remote_get_memory_xfer_limit)
6211 (remote_search_memory, remote_rcmd, remote_memory_map)
6212 (remote_pid_to_str, remote_get_thread_local_address)
6213 (remote_get_tib_address, remote_read_description): Refactor as
6214 methods of remote_target.
6215 (remote_target::fileio_open, remote_target::fileio_pwrite)
6216 (remote_target::fileio_pread, remote_target::fileio_close): New.
6217 (remote_hostio_readlink, remote_hostio_fstat)
6218 (remote_filesystem_is_local, remote_can_execute_reverse)
6219 (remote_supports_non_stop, remote_supports_disable_randomization)
6220 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6221 (remote_supports_enable_disable_tracepoint)
6222 (remote_supports_string_tracing)
6223 (remote_can_run_breakpoint_commands, remote_trace_init)
6224 (remote_download_tracepoint, remote_can_download_tracepoint)
6225 (remote_download_trace_state_variable, remote_enable_tracepoint)
6226 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6227 (remote_trace_start, remote_get_trace_status)
6228 (remote_get_tracepoint_status, remote_trace_stop)
6229 (remote_trace_find, remote_get_trace_state_variable_value)
6230 (remote_save_trace_data, remote_get_raw_trace_data)
6231 (remote_set_disconnected_tracing, remote_core_of_thread)
6232 (remote_set_circular_trace_buffer, remote_traceframe_info)
6233 (remote_get_min_fast_tracepoint_insn_len)
6234 (remote_set_trace_buffer_size, remote_set_trace_notes)
6235 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6236 (remote_disable_btrace, remote_teardown_btrace)
6237 (remote_read_btrace, remote_btrace_conf)
6238 (remote_augmented_libraries_svr4_read, remote_load)
6239 (remote_pid_to_exec_file, remote_can_do_single_step)
6240 (remote_execution_direction, remote_thread_handle_to_thread_info):
6241 Refactor as methods of remote_target.
6242 (init_remote_ops, init_extended_remote_ops): Delete.
6243 (remote_can_async_p, remote_is_async_p, remote_async)
6244 (remote_thread_events, remote_upload_tracepoints)
6245 (remote_upload_trace_state_variables): Refactor as methods of
6246 remote_target.
6247 (_initialize_remote): Remove references to init_remote_ops and
6248 init_extended_remote_ops.
6249
6250 * remote-sim.c (gdbsim_target): New class.
6251 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6252 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6253 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6254 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6255 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6256 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6257 Refactor as methods of gdbsim_target.
6258 (gdbsim_ops): Now a gdbsim_target.
6259 (init_gdbsim_ops): Delete.
6260 (gdbsim_cntrl_c): Adjust.
6261 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6262
6263 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6264 (the_amd64_linux_nat_target): New.
6265 (amd64_linux_fetch_inferior_registers)
6266 (amd64_linux_store_inferior_registers): Refactor as methods of
6267 amd64_linux_nat_target.
6268 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6269 * i386-linux-nat.c: Don't include "linux-nat.h".
6270 (i386_linux_nat_target): New class.
6271 (the_i386_linux_nat_target): New.
6272 (i386_linux_fetch_inferior_registers)
6273 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6274 as methods of i386_linux_nat_target.
6275 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6276 * inf-child.c (inf_child_ops): Delete.
6277 (inf_child_fetch_inferior_registers)
6278 (inf_child_store_inferior_registers): Delete.
6279 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6280 methods of inf_child_target.
6281 (inf_child_target::supports_terminal_ours)
6282 (inf_child_target::terminal_init)
6283 (inf_child_target::terminal_inferior)
6284 (inf_child_target::terminal_ours_for_output)
6285 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6286 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6287 New.
6288 (inf_child_open, inf_child_disconnect, inf_child_close)
6289 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6290 (inf_child_post_startup_inferior, inf_child_can_run)
6291 (inf_child_pid_to_exec_file): Refactor as methods of
6292 inf_child_target.
6293 (inf_child_follow_fork): Delete.
6294 (inf_child_target::can_create_inferior)
6295 (inf_child_target::can_attach): New.
6296 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6297 (inf_child_target::has_stack, inf_child_target::has_registers)
6298 (inf_child_target::has_execution): New.
6299 (inf_child_fileio_open, inf_child_fileio_pwrite)
6300 (inf_child_fileio_pread, inf_child_fileio_fstat)
6301 (inf_child_fileio_close, inf_child_fileio_unlink)
6302 (inf_child_fileio_readlink, inf_child_use_agent)
6303 (inf_child_can_use_agent): Refactor as methods of
6304 inf_child_target.
6305 (return_zero, inf_child_target): Delete.
6306 (inf_child_target::inf_child_target): New.
6307 * inf-child.h: Include "target.h".
6308 (inf_child_target): Delete function prototype.
6309 (inf_child_target): New class.
6310 (inf_child_open_target, inf_child_mourn_inferior)
6311 (inf_child_maybe_unpush_target): Delete.
6312 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6313 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6314 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6315 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6316 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6317 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6318 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6319 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6320 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6321 methods of inf_ptrace_target.
6322 (inf_ptrace_target): Delete function.
6323 * inf-ptrace.h: Include "inf-child.h".
6324 (inf_ptrace_target): Delete function declaration.
6325 (inf_ptrace_target): New class.
6326 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6327 * linux-nat.c (linux_target): New.
6328 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6329 (linux_nat_target::~linux_nat_target): New.
6330 (linux_child_post_attach, linux_child_post_startup_inferior)
6331 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6332 (linux_child_remove_fork_catchpoint)
6333 (linux_child_insert_vfork_catchpoint)
6334 (linux_child_remove_vfork_catchpoint)
6335 (linux_child_insert_exec_catchpoint)
6336 (linux_child_remove_exec_catchpoint)
6337 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6338 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6339 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6340 (linux_nat_stopped_data_address)
6341 (linux_nat_stopped_by_sw_breakpoint)
6342 (linux_nat_supports_stopped_by_sw_breakpoint)
6343 (linux_nat_stopped_by_hw_breakpoint)
6344 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6345 (linux_nat_kill, linux_nat_mourn_inferior)
6346 (linux_nat_xfer_partial, linux_nat_thread_alive)
6347 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6348 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6349 (linux_child_static_tracepoint_markers_by_strid)
6350 (linux_nat_is_async_p, linux_nat_can_async_p)
6351 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6352 (linux_nat_supports_multi_process)
6353 (linux_nat_supports_disable_randomization, linux_nat_async)
6354 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6355 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6356 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6357 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6358 methods of linux_nat_target.
6359 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6360 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6361 parameter.
6362 (check_stopped_by_watchpoint): Adjust.
6363 (linux_xfer_partial): Delete.
6364 (linux_target_install_ops, linux_target, linux_nat_add_target):
6365 Delete.
6366 (linux_nat_target::linux_nat_target): New.
6367 * linux-nat.h: Include "inf-ptrace.h".
6368 (linux_nat_target): New.
6369 (linux_target, linux_target_install_ops, linux_nat_add_target):
6370 Delete function declarations.
6371 (linux_target): Declare global.
6372 * linux-thread-db.c (thread_db_target): New.
6373 (thread_db_target::thread_db_target): New.
6374 (thread_db_ops): Delete.
6375 (the_thread_db_target): New.
6376 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6377 (thread_db_update_thread_list, thread_db_pid_to_str)
6378 (thread_db_extra_thread_info)
6379 (thread_db_thread_handle_to_thread_info)
6380 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6381 (thread_db_resume): Refactor as methods of thread_db_target.
6382 (init_thread_db_ops): Delete.
6383 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6384 * x86-linux-nat.c: Don't include "linux-nat.h".
6385 (super_post_startup_inferior): Delete.
6386 (x86_linux_nat_target::~x86_linux_nat_target): New.
6387 (x86_linux_child_post_startup_inferior)
6388 (x86_linux_read_description, x86_linux_enable_btrace)
6389 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6390 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6391 methods of x86_linux_nat_target.
6392 (x86_linux_create_target): Delete. Bits folded ...
6393 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6394 pointer.
6395 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6396 (x86_linux_nat_target): New class.
6397 (x86_linux_create_target): Delete.
6398 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6399 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6400 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6401 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6402 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6403 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6404 make extern.
6405 (x86_use_watchpoints): Delete.
6406 * x86-nat.h: Include "breakpoint.h" and "target.h".
6407 (x86_use_watchpoints): Delete.
6408 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6409 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6410 (x86_insert_watchpoint, x86_remove_watchpoint)
6411 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6412 (x86_stopped_by_hw_breakpoint): New declarations.
6413 (x86_nat_target): New template class.
6414
6415 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6416 (the_ppc_linux_nat_target): New.
6417 (ppc_linux_fetch_inferior_registers)
6418 (ppc_linux_can_use_hw_breakpoint)
6419 (ppc_linux_region_ok_for_hw_watchpoint)
6420 (ppc_linux_ranged_break_num_registers)
6421 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6422 (ppc_linux_insert_mask_watchpoint)
6423 (ppc_linux_remove_mask_watchpoint)
6424 (ppc_linux_can_accel_watchpoint_condition)
6425 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6426 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6427 (ppc_linux_watchpoint_addr_within_range)
6428 (ppc_linux_masked_watch_num_registers)
6429 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6430 (ppc_linux_read_description): Refactor as methods of
6431 ppc_linux_nat_target.
6432 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6433
6434 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6435 (procfs_target): New class.
6436 (the_procfs_target): New.
6437 (procfs_target): Delete function.
6438 (procfs_auxv_parse, procfs_attach, procfs_detach)
6439 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6440 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6441 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6442 (procfs_create_inferior, procfs_update_thread_list)
6443 (procfs_thread_alive, procfs_pid_to_str)
6444 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6445 (procfs_stopped_data_address, procfs_insert_watchpoint)
6446 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6447 (proc_find_memory_regions, procfs_info_proc)
6448 (procfs_make_note_section): Refactor as methods of procfs_target.
6449 (_initialize_procfs): Adjust.
6450 * sol-thread.c (sol_thread_target): New class.
6451 (sol_thread_ops): Now a sol_thread_target.
6452 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6453 (sol_thread_fetch_registers, sol_thread_store_registers)
6454 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6455 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6456 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6457 (init_sol_thread_ops): Delete.
6458 (_initialize_sol_thread): Adjust. Remove references to
6459 init_sol_thread_ops and complete_target_initialization.
6460
6461 * windows-nat.c (windows_nat_target): New class.
6462 (windows_fetch_inferior_registers)
6463 (windows_store_inferior_registers, windows_resume, windows_wait)
6464 (windows_attach, windows_detach, windows_pid_to_exec_file)
6465 (windows_files_info, windows_create_inferior)
6466 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6467 (windows_close, windows_pid_to_str, windows_xfer_partial)
6468 (windows_get_tib_address, windows_get_ada_task_ptid)
6469 (windows_thread_name, windows_thread_alive): Refactor as
6470 windows_nat_target methods.
6471 (do_initial_windows_stuff): Adjust.
6472 (windows_target): Delete function.
6473 (_initialize_windows_nat): Adjust.
6474
6475 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6476 (darwin_mourn_inferior, darwin_kill_inferior)
6477 (darwin_create_inferior, darwin_attach, darwin_detach)
6478 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6479 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6480 (darwin_supports_multi_process): Refactor as darwin_nat_target
6481 methods.
6482 (darwin_resume_to, darwin_files_info): Delete.
6483 (_initialize_darwin_inferior): Rename to ...
6484 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6485 * darwin-nat.h: Include "inf-child.h".
6486 (darwin_nat_target): New class.
6487 (darwin_complete_target): Delete.
6488 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6489 (darwin_target): New.
6490 (i386_darwin_fetch_inferior_registers)
6491 (i386_darwin_store_inferior_registers): Refactor as methods of
6492 darwin_nat_target.
6493 (darwin_complete_target): Delete, with ...
6494 (_initialize_i386_darwin_nat): ... bits factored out here.
6495
6496 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6497 (the_alpha_linux_nat_target): New.
6498 (alpha_linux_register_u_offset): Refactor as
6499 alpha_linux_nat_target method.
6500 (_initialize_alpha_linux_nat): Adjust.
6501 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6502 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6503 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6504 methods of linux_nat_trad_target.
6505 (linux_trad_target): Delete.
6506 * linux-nat-trad.h (linux_trad_target): Delete function.
6507 (linux_nat_trad_target): New class.
6508 * mips-linux-nat.c (mips_linux_nat_target): New class.
6509 (super_fetch_registers, super_store_registers, super_close):
6510 Delete.
6511 (the_mips_linux_nat_target): New.
6512 (mips64_linux_regsets_fetch_registers)
6513 (mips64_linux_regsets_store_registers)
6514 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6515 (mips_linux_register_u_offset, mips_linux_read_description)
6516 (mips_linux_can_use_hw_breakpoint)
6517 (mips_linux_stopped_by_watchpoint)
6518 (mips_linux_stopped_data_address)
6519 (mips_linux_region_ok_for_hw_watchpoint)
6520 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6521 (mips_linux_close): Refactor as methods of mips_linux_nat.
6522 (_initialize_mips_linux_nat): Adjust to C++ification.
6523
6524 * aix-thread.c (aix_thread_target): New class.
6525 (aix_thread_ops): Now an aix_thread_target.
6526 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6527 (aix_thread_fetch_registers, aix_thread_store_registers)
6528 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6529 (aix_thread_thread_alive, aix_thread_pid_to_str)
6530 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6531 Refactor as methods of aix_thread_target.
6532 (init_aix_thread_ops): Delete.
6533 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6534 and complete_target_initialization.
6535 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6536 (rs6000_nat_target): New class.
6537 (the_rs6000_nat_target): New.
6538 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6539 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6540 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6541 (super_create_inferior): Delete.
6542 (_initialize_rs6000_nat): Adjust to C++ification.
6543
6544 * arm-linux-nat.c (arm_linux_nat_target): New class.
6545 (the_arm_linux_nat_target): New.
6546 (arm_linux_fetch_inferior_registers)
6547 (arm_linux_store_inferior_registers, arm_linux_read_description)
6548 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6549 (arm_linux_remove_hw_breakpoint)
6550 (arm_linux_region_ok_for_hw_watchpoint)
6551 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6552 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6553 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6554 arm_linux_nat_target.
6555 (_initialize_arm_linux_nat): Adjust to C++ification.
6556
6557 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6558 (the_aarch64_linux_nat_target): New.
6559 (aarch64_linux_fetch_inferior_registers)
6560 (aarch64_linux_store_inferior_registers)
6561 (aarch64_linux_child_post_startup_inferior)
6562 (aarch64_linux_read_description)
6563 (aarch64_linux_can_use_hw_breakpoint)
6564 (aarch64_linux_insert_hw_breakpoint)
6565 (aarch64_linux_remove_hw_breakpoint)
6566 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6567 (aarch64_linux_region_ok_for_hw_watchpoint)
6568 (aarch64_linux_stopped_data_address)
6569 (aarch64_linux_stopped_by_watchpoint)
6570 (aarch64_linux_watchpoint_addr_within_range)
6571 (aarch64_linux_can_do_single_step): Refactor as methods of
6572 aarch64_linux_nat_target.
6573 (super_post_startup_inferior): Delete.
6574 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6575
6576 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6577 (the_hppa_linux_nat_target): New.
6578 (hppa_linux_fetch_inferior_registers)
6579 (hppa_linux_store_inferior_registers): Refactor as methods of
6580 hppa_linux_nat_target.
6581 (_initialize_hppa_linux_nat): Adjust to C++ification.
6582
6583 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6584 (the_ia64_linux_nat_target): New.
6585 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6586 (ia64_linux_stopped_data_address)
6587 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6588 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6589 ia64_linux_nat_target methods.
6590 (super_xfer_partial): Delete.
6591 (_initialize_ia64_linux_nat): Adjust to C++ification.
6592
6593 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6594 (the_m32r_linux_nat_target): New.
6595 (m32r_linux_fetch_inferior_registers)
6596 (m32r_linux_store_inferior_registers): Refactor as
6597 m32r_linux_nat_target methods.
6598 (_initialize_m32r_linux_nat): Adjust to C++ification.
6599
6600 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6601 (the_m68k_linux_nat_target): New.
6602 (m68k_linux_fetch_inferior_registers)
6603 (m68k_linux_store_inferior_registers): Refactor as
6604 m68k_linux_nat_target methods.
6605 (_initialize_m68k_linux_nat): Adjust to C++ification.
6606
6607 * s390-linux-nat.c (s390_linux_nat_target): New class.
6608 (the_s390_linux_nat_target): New.
6609 (s390_linux_fetch_inferior_registers)
6610 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6611 (s390_insert_watchpoint, s390_remove_watchpoint)
6612 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6613 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6614 (s390_auxv_parse, s390_read_description): Refactor as methods of
6615 s390_linux_nat_target.
6616 (_initialize_s390_nat): Adjust to C++ification.
6617
6618 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6619 (the_sparc_linux_nat_target): New.
6620 (_initialize_sparc_linux_nat): Adjust to C++ification.
6621 * sparc-nat.c (sparc_fetch_inferior_registers)
6622 (sparc_store_inferior_registers): Remove target_ops parameter.
6623 * sparc-nat.h (sparc_fetch_inferior_registers)
6624 (sparc_store_inferior_registers): Remove target_ops parameter.
6625 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6626 (the_sparc64_linux_nat_target): New.
6627 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6628
6629 * spu-linux-nat.c (spu_linux_nat_target): New class.
6630 (the_spu_linux_nat_target): New.
6631 (spu_child_post_startup_inferior, spu_child_post_attach)
6632 (spu_child_wait, spu_fetch_inferior_registers)
6633 (spu_store_inferior_registers, spu_xfer_partial)
6634 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6635 methods.
6636 (_initialize_spu_nat): Adjust to C++ification.
6637
6638 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6639 (the_tilegx_linux_nat_target): New.
6640 (fetch_inferior_registers, store_inferior_registers):
6641 Refactor as methods.
6642 (_initialize_tile_linux_nat): Adjust to C++ification.
6643
6644 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6645 (the_xtensa_linux_nat_target): New.
6646 (xtensa_linux_fetch_inferior_registers)
6647 (xtensa_linux_store_inferior_registers): Refactor as
6648 xtensa_linux_nat_target methods.
6649 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6650
6651 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6652 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6653 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6654 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6655 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6656 (fbsd_stopped_by_sw_breakpoint)
6657 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6658 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6659 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6660 (fbsd_post_startup_inferior, fbsd_post_attach)
6661 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6662 (fbsd_set_syscall_catchpoint)
6663 (super_xfer_partial, super_resume, super_wait)
6664 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6665 (fbsd_handle_debug_trap): Remove target_ops parameter.
6666 (fbsd_nat_add_target): Delete.
6667 * fbsd-nat.h: Include "inf-ptrace.h".
6668 (fbsd_nat_add_target): Delete.
6669 (USE_SIGTRAP_SIGINFO): Define.
6670 (fbsd_nat_target): New class.
6671
6672 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6673 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6674 (amd64bsd_target): Delete.
6675 * amd64-bsd-nat.h: New file.
6676 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6677 "x86-bsd-nat.h".
6678 (amd64_fbsd_nat_target): New class.
6679 (the_amd64_fbsd_nat_target): New.
6680 (amd64fbsd_read_description): Refactor as method of
6681 amd64_fbsd_nat_target.
6682 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6683 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6684 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6685 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6686 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6687 (i386bsd_target): Delete.
6688 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6689 (i386bsd_fetch_inferior_registers)
6690 (i386bsd_store_inferior_registers): Declare.
6691 (i386_bsd_nat_target): New class.
6692 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6693 (the_i386_fbsd_nat_target): New.
6694 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6695 i386_fbsd_nat_target methods.
6696 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6697 (_initialize_i386fbsd_nat): Adjust to C++ification.
6698 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6699 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6700 (_initialize_x86_bsd_nat): Adjust to C++ification.
6701 * x86-bsd-nat.h: Include "x86-nat.h".
6702 (x86bsd_target): Delete declaration.
6703 (x86bsd_nat_target): New class.
6704
6705 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6706 (the_aarch64_fbsd_nat_target): New.
6707 (aarch64_fbsd_fetch_inferior_registers)
6708 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6709 aarch64_fbsd_nat_target.
6710 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6711 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6712 (the_alpha_bsd_nat_target): New.
6713 (alphabsd_fetch_inferior_registers)
6714 (alphabsd_store_inferior_registers): Refactor as
6715 alpha_bsd_nat_target methods.
6716 (_initialize_alphabsd_nat): Refactor as methods of
6717 alpha_bsd_nat_target.
6718 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6719 (the_amd64_nbsd_nat_target): New.
6720 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6721 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6722 (the_amd64_obsd_nat_target): New.
6723 (_initialize_amd64obsd_nat): Adjust to C++ification.
6724 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6725 (the_arm_fbsd_nat_target): New.
6726 (arm_fbsd_fetch_inferior_registers)
6727 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6728 (_initialize_arm_fbsd_nat): Refactor as methods of
6729 arm_fbsd_nat_target.
6730 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6731 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6732 (the_arm_netbsd_nat_target): New.
6733 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6734 arm_netbsd_nat_target.
6735 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6736 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6737 (the_hppa_nbsd_nat_target): New.
6738 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6739 hppa_nbsd_nat_target methods.
6740 (_initialize_hppanbsd_nat): Adjust to C++ification.
6741 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6742 (the_hppa_obsd_nat_target): New.
6743 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6744 methods of hppa_obsd_nat_target.
6745 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6746 add_target.
6747 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6748 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6749 add_target.
6750 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6751 (_initialize_i386obsd_nat): Use add_target.
6752 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6753 (the_m68k_bsd_nat_target): New.
6754 (m68kbsd_fetch_inferior_registers)
6755 (m68kbsd_store_inferior_registers): Refactor as methods of
6756 m68k_bsd_nat_target.
6757 (_initialize_m68kbsd_nat): Adjust to C++ification.
6758 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6759 (the_mips_fbsd_nat_target): New.
6760 (mips_fbsd_fetch_inferior_registers)
6761 (mips_fbsd_store_inferior_registers): Refactor as methods of
6762 mips_fbsd_nat_target.
6763 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6764 add_target.
6765 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6766 (the_mips_nbsd_nat_target): New.
6767 (mipsnbsd_fetch_inferior_registers)
6768 (mipsnbsd_store_inferior_registers): Refactor as methods of
6769 mips_nbsd_nat_target.
6770 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6771 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6772 (the_mips64_obsd_nat_target): New.
6773 (mips64obsd_fetch_inferior_registers)
6774 (mips64obsd_store_inferior_registers): Refactor as methods of
6775 mips64_obsd_nat_target.
6776 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6777 add_target.
6778 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6779 nbsd_nat_target.
6780 * nbsd-nat.h: Include "inf-ptrace.h".
6781 (nbsd_nat_target): New class.
6782 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6783 (obsd_wait): Refactor as methods of obsd_nat_target.
6784 (obsd_add_target): Delete.
6785 * obsd-nat.h: Include "inf-ptrace.h".
6786 (obsd_nat_target): New class.
6787 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6788 (the_ppc_fbsd_nat_target): New.
6789 (ppcfbsd_fetch_inferior_registers)
6790 (ppcfbsd_store_inferior_registers): Refactor as methods of
6791 ppc_fbsd_nat_target.
6792 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6793 add_target.
6794 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6795 (the_ppc_nbsd_nat_target): New.
6796 (ppcnbsd_fetch_inferior_registers)
6797 (ppcnbsd_store_inferior_registers): Refactor as methods of
6798 ppc_nbsd_nat_target.
6799 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6800 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6801 (the_ppc_obsd_nat_target): New.
6802 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6803 methods of ppc_obsd_nat_target.
6804 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6805 add_target.
6806 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6807 (the_sh_nbsd_nat_target): New.
6808 (shnbsd_fetch_inferior_registers)
6809 (shnbsd_store_inferior_registers): Refactor as methods of
6810 sh_nbsd_nat_target.
6811 (_initialize_shnbsd_nat): Adjust to C++ification.
6812 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6813 (inf_ptrace_xfer_partial): Delete.
6814 (sparc_xfer_partial, sparc_target): Delete.
6815 * sparc-nat.h (sparc_fetch_inferior_registers)
6816 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6817 (sparc_target): Delete function declaration.
6818 (sparc_target): New template class.
6819 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6820 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6821 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6822 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6823 add_target.
6824 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6825 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6826 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6827 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6828 add_target.
6829 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6830 (the_vax_bsd_nat_target): New.
6831 (vaxbsd_fetch_inferior_registers)
6832 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6833 methods.
6834 (_initialize_vaxbsd_nat): Adjust to C++ification.
6835
6836 * bsd-kvm.c (bsd_kvm_target): New class.
6837 (bsd_kvm_ops): Now a bsd_kvm_target.
6838 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6839 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6840 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6841 bsd_kvm_target.
6842 (bsd_kvm_return_one): Delete.
6843 (bsd_kvm_add_target): Adjust to C++ification.
6844
6845 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6846 (nto_procfs_target_procfs): New classes.
6847 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6848 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6849 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6850 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6851 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6852 (procfs_remove_hw_breakpoint, procfs_resume)
6853 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6854 (procfs_kill_inferior, procfs_store_registers)
6855 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6856 as methods of nto_procfs_target.
6857 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6858 (nto_native_ops): Delete.
6859 (procfs_open, procfs_native_open): Delete.
6860 (nto_native_ops): Now an nto_procfs_target_native.
6861 (init_procfs_targets): Adjust to C++ification.
6862 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6863 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6864 Refactor as methods of nto_procfs_target.
6865
6866 * go32-nat.c (go32_nat_target): New class.
6867 (the_go32_nat_target): New.
6868 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6869 (go32_store_registers, go32_xfer_partial, go32_files_info)
6870 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6871 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6872 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6873 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6874 (go32_target): Delete.
6875 (_initialize_go32_nat): Adjust to C++ification.
6876
6877 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6878 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6879 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6880 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6881 gnu_nat_target.
6882 (gnu_target): Delete.
6883 * gnu-nat.h (gnu_target): Delete.
6884 (gnu_nat_target): New class.
6885 * i386-gnu-nat.c (gnu_base_target): New.
6886 (i386_gnu_nat_target): New class.
6887 (the_i386_gnu_nat_target): New.
6888 (_initialize_i386gnu_nat): Adjust to C++ification.
6889
6890 2018-05-02 Pedro Alves <palves@redhat.com>
6891
6892 * bfd-target.c (target_bfd_xclose): Rename to ...
6893 (target_bfd_close): ... this.
6894 (target_bfd_reopen): Adjust.
6895 * target.c (target_close): Remove references to to_xclose.
6896 * target.h (target_ops::to_xclose): Delete.
6897 (target_ops::to_close): Update comments.
6898
6899 2018-05-02 Pedro Alves <palves@redhat.com>
6900
6901 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6902 "linux-nat.h".
6903 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6904 * inf-ptrace.c (inf_ptrace_register_u_offset)
6905 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6906 (inf_ptrace_store_register, inf_ptrace_store_registers)
6907 (inf_ptrace_trad_target): Move to ...
6908 * linux-nat-trad.c: ... this new file.
6909 * linux-nat-trad.h: New file.
6910 * linux-nat.c (linux_target_install_ops): Make extern.
6911 (linux_trad_target): Delete.
6912 * linux-nat.h (linux_trad_target): Delete declaration.
6913 (linux_target_install_ops): Declare.
6914 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6915 "linux-nat.h".
6916
6917 2018-05-02 Pedro Alves <palves@redhat.com>
6918
6919 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6920 procfs_target/add_target here.
6921 * procfs.c (procfs_target): Make static.
6922 (_initialize_procfs): Call add_target here.
6923 * procfs.h (struct target_ops): Remove forward declaration.
6924 (procfs_target): Remove declaration.
6925 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6926
6927 2018-05-02 Pedro Alves <palves@redhat.com>
6928
6929 * procfs.c (procfs_stopped_by_watchpoint)
6930 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6931 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6932 Forward declare.
6933 (procfs_use_watchpoints): Delete, move contents...
6934 (procfs_target): ... here.
6935 * procfs.h (procfs_use_watchpoints): Delete declaration.
6936 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6937 procfs_use_watchpoints.
6938 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6939 procfs_use_watchpoints.
6940
6941 2018-05-02 Tom Tromey <tom@tromey.com>
6942
6943 PR python/20084:
6944 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6945 and var_zuinteger_unlimited.
6946 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6947 and PARAM_ZUINTEGER_UNLIMITED.
6948 (set_parameter_value): Handle var_zuinteger and
6949 var_zuinteger_unlimited.
6950 (add_setshow_generic): Likewise.
6951 (parmpy_init): Likewise.
6952
6953 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6954
6955 PR rust/23124
6956 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6957 pointer is not null before dereferencing it.
6958
6959 2018-04-30 Tom Tromey <tom@tromey.com>
6960
6961 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6962 is_mi_like_p.
6963
6964 2018-04-30 Tom Tromey <tom@tromey.com>
6965
6966 * breakpoint.c (mention): Remove use of is_mi_like_p.
6967 (print_mention_ranged_breakpoint): Likewise.
6968 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6969 of is_mi_like_p.
6970
6971 2018-04-30 Tom Tromey <tom@tromey.com>
6972
6973 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6974
6975 2018-04-30 Tom Tromey <tom@tromey.com>
6976
6977 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6978 (info_spu_event_command): Remove some uses of is_mi_like_p.
6979
6980 2018-04-30 Tom Tromey <tom@tromey.com>
6981
6982 * python/py-framefilter.c (py_print_single_arg)
6983 (enumerate_locals, py_print_args, py_print_frame): Remove some
6984 uses of is_mi_like_p.
6985
6986 2018-04-30 Tom Tromey <tom@tromey.com>
6987
6988 * ui-out.c: Update.
6989 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6990 * ui-out.h (ui_out::is_mi_like_p): Now const.
6991 (ui_out::do_is_mi_like_p): Now const.
6992 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6993
6994 2018-04-30 Tom Tromey <tom@tromey.com>
6995
6996 * varobj.c (varobj_set_visualizer): Use new_reference.
6997 * python/python.c (gdbpy_decode_line): Use new_reference.
6998 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6999 new_reference.
7000
7001 2018-04-30 Tom Tromey <tom@tromey.com>
7002
7003 * varobj.c (install_new_value): Use new_reference.
7004 * value.h (value_incref): Return void. Swap intro comment with
7005 value_decref.
7006 * value.c (set_value_parent): Use new_reference.
7007 (value_incref): Return void. Update intro comment.
7008 (release_value): Use new_reference.
7009 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7010
7011 2018-04-30 Tom Tromey <tom@tromey.com>
7012
7013 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7014 * gdb_bfd.h (new_bfd_ref): Remove.
7015 (gdb_bfd_open): Update comment.
7016 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7017 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7018 (gdb_bfd_fdopenr): Use new_reference.
7019 * exec.c (exec_file_attach): Use new_reference.
7020
7021 2018-04-30 Tom Tromey <tom@tromey.com>
7022
7023 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7024 method.
7025
7026 2018-04-30 Tom Tromey <tom@tromey.com>
7027
7028 * jit.c (jit_read_code_entry): Use type_align.
7029 * i386-tdep.c (i386_gdbarch_init): Don't call
7030 set_gdbarch_long_long_align_bit.
7031 * gdbarch.sh: Remove long_long_align_bit.
7032 * gdbarch.c, gdbarch.h: Rebuild.
7033 * arc-tdep.c (arc_type_align): New function.
7034 (arc_gdbarch_init): Use arc_type_align. Don't call
7035 set_gdbarch_long_long_align_bit.
7036
7037 2018-04-30 Tom Tromey <tom@tromey.com>
7038
7039 * rust-lang.c (rust_type_alignment): Remove.
7040 (rust_composite_type): Use type_align.
7041
7042 2018-04-30 Tom Tromey <tom@tromey.com>
7043
7044 * NEWS: Mention Type.align.
7045 * python/py-type.c (typy_get_alignof): New function.
7046 (type_object_getset): Add "alignof".
7047
7048 2018-04-30 Tom Tromey <tom@tromey.com>
7049
7050 PR exp/17095:
7051 * NEWS: Update.
7052 * std-operator.def (UNOP_ALIGNOF): New operator.
7053 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7054 New.
7055 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7056 * c-lang.c (c_op_print_tab): Add alignof.
7057 * c-exp.y (ALIGNOF): New token.
7058 (exp): Add "ALIGNOF" production.
7059 (ident_tokens): Add _Alignof and alignof.
7060
7061 2018-04-30 Tom Tromey <tom@tromey.com>
7062
7063 * i386-tdep.c (i386_type_align): New function.
7064 (i386_gdbarch_init): Update.
7065 * gdbarch.sh (type_align): New method.
7066 * gdbarch.c, gdbarch.h: Rebuild.
7067 * arch-utils.h (default_type_align): Declare.
7068 * arch-utils.c (default_type_align): New function.
7069 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7070 (struct type) <align_log2>: New field.
7071 <instance_flags>: Now a bitfield.
7072 (TYPE_RAW_ALIGN): New macro.
7073 (type_align, type_raw_align, set_type_align): Declare.
7074 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7075 functions.
7076 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7077 (get_alignment, maybe_set_alignment): New functions.
7078 (read_structure_type, read_enumeration_type, read_array_type)
7079 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7080 (read_subrange_type, read_base_type): Set type alignment.
7081
7082 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7083
7084 * dwarf2read.c (read_index_from_section): Use bool.
7085
7086 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7087
7088 PR gdb/22950
7089 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7090 with #ifdef.
7091
7092 2018-04-29 John Reiser <jreiser@BitWagon.com>
7093
7094 PR build/22873
7095 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7096 last step, and do it atomically.
7097
7098 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7099
7100 * compile/compile-c-types.c (convert_int, convert_float):
7101 Update for C FE v1.
7102
7103 2018-04-27 Tom Tromey <tom@tromey.com>
7104
7105 PR rust/22545:
7106 * rust-lang.c (rust_inclusive_range_type_p): New function.
7107 (rust_range): Handle inclusive ranges.
7108 (rust_compute_range): Likewise.
7109 * rust-exp.y (struct rust_op) <inclusive>: New field.
7110 (DOTDOTEQ): New constant.
7111 (range_expr): Add "..=" productions.
7112 (operator_tokens): Add "..=" token.
7113 (ast_range): Add "inclusive" parameter.
7114 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7115 ranges.
7116 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7117 bounds values.
7118 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7119 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7120 Update comments.
7121 * expprint.c (print_subexp_standard): Handle new bounds values.
7122 (dump_subexp_body_standard): Likewise.
7123
7124 2018-04-27 Tom Tromey <tom@tromey.com>
7125
7126 * configure: Rebuild.
7127 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7128 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7129 "OVERRIDE".
7130 (class symbol_needs_eval_context): Likewise.
7131 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7132 (mock_mapped_index::symbol_name_at): Use "override". Remove
7133 "virtual".
7134 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7135 "override".
7136 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7137 * aarch64-tdep.c (instruction_reader::read): Use "override".
7138 (instruction_reader_test::read): Likewise.
7139 * arm-tdep.c (instruction_reader::read): Use "override".
7140 (instruction_reader_thumb::read): Likewise.
7141
7142 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7143
7144 PR remote/9665
7145 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7146 instead of remote_send.
7147 (remote_send): Remove.
7148
7149 2018-04-26 Pedro Alves <palves@redhat.com>
7150
7151 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7152 find_function_start_sal instead of find_pc_line.
7153
7154 2018-04-26 Pedro Alves <palves@redhat.com>
7155
7156 * breakpoint.c (set_breakpoint_location_function): Handle
7157 mst_data_gnu_ifunc.
7158 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7159 * elfread.c (elf_symtab_read): Give data symbols with
7160 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7161 (elf_rel_plt_read): Update comment.
7162 * linespec.c (convert_linespec_to_sals): Handle
7163 mst_data_gnu_ifunc.
7164 (minsym_found): Handle mst_data_gnu_ifunc.
7165 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7166 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7167 * parse.c (find_minsym_type_and_address): Handle
7168 mst_data_gnu_ifunc.
7169 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7170 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7171 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7172 comment.
7173 <mst_data_gnu_ifunc>: New enumerator.
7174
7175 2018-04-26 Pedro Alves <palves@redhat.com>
7176
7177 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7178 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7179 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7180 Handle it.
7181 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7182 (lookup_minimal_symbol_by_pc): Adjust.
7183 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7184 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7185 * minsyms.h (lookup_msym_prefer): New enum.
7186 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7187 parameter by a lookup_msym_prefer parameter.
7188
7189 2018-04-26 Pedro Alves <palves@redhat.com>
7190
7191 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7192 ends in "@plt" instead of looking at the symbol's section.
7193
7194 2018-04-26 Pedro Alves <palves@redhat.com>
7195
7196 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7197 all references.
7198 (find_pc_partial_function_gnu_ifunc): Rename to ...
7199 (find_pc_partial_function): ... this, and remove references to
7200 'is_gnu_ifunc_p'.
7201 (find_pc_partial_function): Delete old implementation.
7202 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7203
7204 2018-04-26 Pedro Alves <palves@redhat.com>
7205
7206 * linespec.c (struct bound_minimal_symbol_search_key): New.
7207 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7208 skip first line if we found a GNU ifunc minimal symbol by name.
7209 (compare_msymbols): Change parameters to work with a destructured
7210 lhs minsym.
7211 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7212 functions.
7213
7214 2018-04-26 Pedro Alves <palves@redhat.com>
7215
7216 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7217 ifunc targets here. Instead, if we have an ifunc minsym, use its
7218 address/name.
7219 (add_location_to_breakpoint): Store the minsym and the objfile in
7220 the breakpoint location.
7221 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7222 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7223 Record the minsym in the sal.
7224 * symtab.h (symtab_and_line) <msymbol>: New field.
7225
7226 2018-04-26 Pedro Alves <palves@redhat.com>
7227
7228 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7229 unless we actually resolved the ifunc.
7230
7231 2018-04-26 Pedro Alves <palves@redhat.com>
7232
7233 * c-exp.y (variable production): Prefer ifunc minsyms over
7234 regular function symbols.
7235 * symtab.c (find_gnu_ifunc): New function.
7236 * minsyms.h (lookup_msym_prefer): New enum.
7237 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7238 parameter by a lookup_msym_prefer parameter.
7239 * symtab.h (find_gnu_ifunc): New declaration.
7240
7241 2018-04-26 Pedro Alves <palves@redhat.com>
7242
7243 * blockframe.c (find_gnu_ifunc_target_type): New function.
7244 (find_function_type): New.
7245 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7246 return a value with a memory address.
7247 (eval_call): For calls to GNU ifunc functions, try to find the
7248 type of the target function from the type that the resolver
7249 returns.
7250 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7251 symbols.
7252 * infcall.c (find_function_return_type): Delete.
7253 (find_function_addr): Add 'function_type' parameter. For calls to
7254 GNU ifunc functions, try to find the type of the target function
7255 from the type that the resolver returns, and return it via
7256 FUNCTION_TYPE.
7257 (call_function_by_hand_dummy): Adjust to use the function type
7258 returned by find_function_addr.
7259 (find_function_addr): Add 'function_type' parameter and move
7260 description here.
7261 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7262 declarations.
7263
7264 2018-04-26 Pedro Alves <palves@redhat.com>
7265
7266 * c-exp.y (variable production): Skip finding an alias for ifunc
7267 symbols.
7268
7269 2018-04-26 Pedro Alves <palves@redhat.com>
7270
7271 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7272
7273 2018-04-25 Pedro Alves <palves@redhat.com>
7274
7275 * infcmd.c (kill_command): Print the pid as string, not the whole
7276 thread's ptid. Add comment. s/has been killed/killed/ in output
7277 message.
7278 * remote.c (remote_detach_1): Print the pid as string, not the
7279 whole thread's ptid.
7280
7281 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7282 Sergio Durigan Junior <sergiodj@redhat.com>
7283 Pedro Alves <palves@redhat.com>
7284
7285 * infcmd.c (kill_command): Print message when inferior has
7286 been killed.
7287 * inferior.c (print_inferior_events): Remove 'static'. Set as
7288 '1'.
7289 (add_inferior): Improve message printed when
7290 'print_inferior_events' is on.
7291 (exit_inferior): Remove message printed when
7292 'print_inferior_events' is on.
7293 (detach_inferior): Improve message printed when
7294 'print_inferior_events' is on.
7295 (initialize_inferiors): Use 'add_inferior_silent' to set
7296 'current_inferior_'.
7297 * inferior.h (print_inferior_events): Declare here as
7298 'extern'.
7299 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7300 '[Detaching...]' messages when 'print_inferior_events' is on.
7301 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7302 as prefix/suffix for messages. Remove periods. Fix erroneous
7303 'Detaching after fork from child...', replace it by '... from
7304 parent...'.
7305 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7306 prefix/suffix when printing 'Detaching...' messages. Print
7307 them when 'print_inferior_events' is on.
7308 * remote.c (remote_detach_1): Print message when detaching
7309 from inferior and '!is_fork_parent'.
7310
7311 2018-04-24 Tom Tromey <tom@tromey.com>
7312
7313 * cli-out.h: Reindent.
7314
7315 2018-04-24 Tom Tromey <tom@tromey.com>
7316
7317 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7318 (cli_ui_out::do_field_string): Use fputs_filtered.
7319 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7320
7321 2018-04-23 Tom Tromey <tom@tromey.com>
7322
7323 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7324 gdb::unique_xmalloc_ptr.
7325
7326 2018-04-23 Tom Tromey <tom@tromey.com>
7327
7328 * configure: Rebuild.
7329
7330 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7331
7332 PR gdb/23095
7333 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7334 prepare_for_testing. Set normal_bp to r_debug_state if target
7335 is bsd.
7336
7337 2018-04-21 Pedro Alves <palves@redhat.com>
7338 Rajendra SY <rajendra.sy@gmail.com>
7339
7340 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7341 * remote.c (extended_remote_attach): In all-stop mode, mark the
7342 thread as executing.
7343
7344 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7345
7346 * thread.c (thread_apply_all_command): Fix comment.
7347 (thread_command): Fix comment.
7348
7349 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7350
7351 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7352 parameter.
7353 * features/aarch64-core.c (create_feature_aarch64_core):
7354 Regenerate.
7355 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7356 Likewise.
7357 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7358 Likewise.
7359 * features/i386/32bit-avx512.c
7360 (create_feature_i386_32bit_avx512): Likewise.
7361 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7362 Likewise.
7363 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7364 Likewise.
7365 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7366 Likewise.
7367 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7368 Likewise.
7369 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7370 Likewise.
7371 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7372 Likewise.
7373 * features/i386/64bit-avx512.c
7374 (create_feature_i386_64bit_avx512): Likewise.
7375 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7376 Likewise.
7377 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7378 Likewise.
7379 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7380 Likewise.
7381 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7382 Likewise.
7383 * features/i386/64bit-segments.c
7384 (create_feature_i386_64bit_segments): Likewise.
7385 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7386 Likewise.
7387 * features/i386/x32-core.c
7388 (create_feature_i386_x32_core): Likewise.
7389 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7390 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7391 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7392 * target-descriptions.c: In generated code, don't pass xml
7393 filename.
7394
7395 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7396
7397 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7398 (print_xml_feature::visit_post): Likewise.
7399 (print_xml_feature::visit): Likewise.
7400 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7401 (print_xml_feature): Add new class.
7402 * regformats/regdat.sh: Null xmltarget on feature targets.
7403 * target-descriptions.c (struct target_desc): Add xmltarget.
7404 (maintenance_check_tdesc_xml_convert): Add unittest function.
7405 (tdesc_get_features_xml): Add function to get xml.
7406 (maintenance_check_xml_descriptions): Test xml generation.
7407 * xml-tdesc.c (string_read_description_xml): Add function.
7408 * xml-tdesc.h (string_read_description_xml): Add declaration.
7409
7410 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7411
7412 * features/Makefile: Add feature marker to targets with new style
7413 target descriptions.
7414 * regformats/aarch64.dat: Regenerate.
7415 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7416 * regformats/i386/amd64-avx-linux.dat: Likewise.
7417 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7418 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7419 * regformats/i386/amd64-linux.dat: Likewise.
7420 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7421 * regformats/i386/amd64.dat: Likewise.
7422 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7423 * regformats/i386/i386-avx-linux.dat: Likewise.
7424 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7425 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7426 * regformats/i386/i386-linux.dat: Likewise.
7427 * regformats/i386/i386-mmx-linux.dat: Likewise.
7428 * regformats/i386/i386-mpx-linux.dat: Likewise.
7429 * regformats/i386/i386.dat: Likewise.
7430 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7431 * regformats/i386/x32-avx-linux.dat: Likewise.
7432 * regformats/i386/x32-linux.dat: Likewise.
7433 * regformats/tic6x-c62x-linux.dat: Likewise.
7434 * regformats/tic6x-c64x-linux.dat: Likewise.
7435 * regformats/tic6x-c64xp-linux.dat: Likewise.
7436 * regformats/regdat.sh: Parse feature marker.
7437
7438 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7439
7440 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7441 (tdesc_osabi_name): Likewise.
7442 * target-descriptions.c (tdesc_architecture_name): Add new
7443 function.
7444 (tdesc_osabi_name): Likewise.
7445
7446 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7447
7448 * common/tdesc.c (tdesc_predefined_type): Move to here.
7449 (tdesc_named_type): Likewise.
7450 (tdesc_create_vector): Likewise.
7451 (tdesc_create_struct): Likewise.
7452 (tdesc_set_struct_size): Likewise.
7453 (tdesc_create_union): Likewise.
7454 (tdesc_create_flags): Likewise.
7455 (tdesc_create_enum): Likewise.
7456 (tdesc_add_field): Likewise.
7457 (tdesc_add_typed_bitfield): Likewise.
7458 (tdesc_add_bitfield): Likewise.
7459 (tdesc_add_flag): Likewise.
7460 (tdesc_add_enum_value): Likewise.
7461 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7462 (struct tdesc_type_vector): Likewise.
7463 (struct tdesc_type_field): Likewise.
7464 (struct tdesc_type_with_fields): Likewise.
7465 (tdesc_create_enum): Add declaration.
7466 (tdesc_add_typed_bitfield): Likewise.
7467 (tdesc_add_enum_value): Likewise.
7468 * target-descriptions.c (tdesc_type_field): Move from here.
7469 (tdesc_type_builtin): Likewise.
7470 (tdesc_type_vector): Likewise.
7471 (tdesc_type_with_fields): Likewise.
7472 (tdesc_predefined_types): Likewise.
7473 (tdesc_named_type): Likewise.
7474 (tdesc_create_vector): Likewise.
7475 (tdesc_create_struct): Likewise.
7476 (tdesc_set_struct_size): Likewise.
7477 (tdesc_create_union): Likewise.
7478 (tdesc_create_flags): Likewise.
7479 (tdesc_create_enum): Likewise.
7480 (tdesc_add_field): Likewise.
7481 (tdesc_add_typed_bitfield): Likewise.
7482 (tdesc_add_bitfield): Likewise.
7483 (tdesc_add_flag): Likewise.
7484 (tdesc_add_enum_value): Likewise.
7485 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7486 (tdesc_add_typed_bitfield): Likewise.
7487 (tdesc_add_enum_value): Likewise.
7488
7489 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7490
7491 * common/tdesc.c (tdesc_feature::accept): Move to here.
7492 (tdesc_feature::operator==): Likewise.
7493 (tdesc_create_reg): Likewise.
7494 * common/tdesc.h (tdesc_type_kind): Likewise.
7495 (struct tdesc_type): Likewise.
7496 (struct tdesc_feature): Likewise.
7497 * regformats/regdat.sh: Create a feature.
7498 * target-descriptions.c (tdesc_type_kind): Move from here.
7499 (tdesc_type): Likewise.
7500 (tdesc_type_up): Likewise.
7501 (tdesc_feature): Likewise.
7502 (tdesc_create_reg): Likewise.
7503
7504 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7505
7506 * Makefile.in: Add arch/tdesc.c
7507 * common/tdesc.c: New file.
7508 * common/tdesc.h (tdesc_element_visitor): Move to here.
7509 (tdesc_element): Likewise.
7510 (tdesc_reg): Likewise.
7511 (tdesc_reg_up): Likewise.
7512 * regformats/regdef.h (reg): Add offset to constructors.
7513 * target-descriptions.c (tdesc_element_visitor): Move from here.
7514 (tdesc_element): Likewise.
7515 (tdesc_reg): Likewise.
7516 (tdesc_reg_up): Likewise.
7517
7518 2018-04-17 Tom Tromey <tom@tromey.com>
7519
7520 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7521 discriminant field.
7522
7523 2018-04-17 Tom Tromey <tom@tromey.com>
7524
7525 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7526
7527 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7528
7529 * symtab.c (print_symbol_info): Skip printing filename and line
7530 number when `last' is NULL.
7531 (symtab_symbol_info): Use empty string instead of NULL for first
7532 invocation of print_symbol_info.
7533 (rbreak_command): Pass NULL to `last' parameter of
7534 print_symbol_info.
7535
7536 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7537
7538 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7539 instead of nullptr.
7540
7541 2018-04-16 Pedro Alves <palves@redhat.com>
7542
7543 * MAINTAINERS (sh): Remove.
7544 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7545 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7546 (ALLDEPFILES): Remove sh64-tdep.c.
7547 * NEWS: Mentions that support for SH-5/SH64 is removed.
7548 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7549 (sh*-*-openbsd*): Ditto.
7550 (sh64-*-elf*): Remove.
7551 (sh*): Remove.
7552 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7553 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7554 * sh-tdep.c: No longer include "sh64-tdep.h".
7555 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7556 * sh64-tdep.c, sh64-tdep.h: Remove files.
7557
7558 2018-04-16 Pedro Alves <palves@redhat.com>
7559
7560 * MAINTAINERS: Remove m88k.
7561 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7562 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7563 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7564 * NEWS: Mention that support for m88k was removed.
7565 * configure.host (m88*-*-*): Remove support.
7566 * configure.nat (m88k-*-*): Remove support.
7567 * configure.tgt (m88*-*-openbsd*): Remove.
7568 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7569
7570 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7571
7572 * configure.tgt (x86_tobjs): New variable.
7573 (amd64_tobjs, i386_tobjs): Use it.
7574
7575 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7576
7577 * symtab.c (print_symbol_info): Precede the symbol definition by
7578 the line number when available.
7579 * NEWS: Advertise this enhancement.
7580
7581 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7582
7583 * NEWS (New options): announce set/show record btrace cpu.
7584 * btrace.c: Include record-btrace.h.
7585 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7586 the vendor is unknown.
7587 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7588 Maybe overwrite the btrace configuration's cpu.
7589 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7590 (btrace_fetch): Add cpu parameter. Update callers.
7591 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7592 Maybe overwrite the btrace configuration's cpu. Skip enabling
7593 errata workarounds if the vendor is unknown.
7594 * python/py-record-btrace.c: Include record-btrace.h.
7595 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7596 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7597 * record-btrace.c (record_btrace_cpu_state_kind): New.
7598 (record_btrace_cpu): New.
7599 (set_record_btrace_cpu_cmdlist): New.
7600 (record_btrace_get_cpu): New.
7601 (require_btrace_thread, record_btrace_info)
7602 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7603 (cmd_set_record_btrace_cpu_none): New.
7604 (cmd_set_record_btrace_cpu_auto): New.
7605 (cmd_set_record_btrace_cpu): New.
7606 (cmd_show_record_btrace_cpu): New.
7607 (_initialize_record_btrace): Initialize set/show record btrace cpu
7608 commands.
7609 * record-btrace.h (record_btrace_get_cpu): New.
7610
7611 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7612
7613 * record.c (set_record_command): Fix typo in message.
7614
7615 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7616
7617 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7618
7619 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7620
7621 * infrun.c (process_event_stop_test): Call
7622 gdbarch_in_indirect_branch_thunk.
7623 * gdbarch.sh (in_indirect_branch_thunk): New.
7624 * gdbarch.c: Regenerated.
7625 * gdbarch.h: Regenerated.
7626 * x86-tdep.h: New.
7627 * x86-tdep.c: New.
7628 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7629 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7630 (ALLDEPFILES): Add x86-tdep.c.
7631 * arch-utils.h (default_in_indirect_branch_thunk): New.
7632 * arch-utils.c (default_in_indirect_branch_thunk): New.
7633 * i386-tdep: Include x86-tdep.h.
7634 (i386_in_indirect_branch_thunk): New.
7635 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7636 function.
7637 * amd64-tdep: Include x86-tdep.h.
7638 (amd64_in_indirect_branch_thunk): New.
7639 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7640
7641 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7642
7643 PR gdb/23053
7644 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7645 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7646 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7647 regression.
7648
7649 2018-04-12 Tom Tromey <tom@tromey.com>
7650
7651 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7652 (rust_evaluate_subexp): Likewise.
7653
7654 2018-04-12 Pedro Alves <palves@redhat.com>
7655
7656 * procfs.c (procfs_detach): Make forward declaration's prototype
7657 match definition's protototype.
7658 (proc_get_LDT_entry): Remove stale do_cleanups call.
7659
7660 2018-04-12 Pedro Alves <palves@redhat.com>
7661
7662 * target.h (target_ops::to_has_exited): Delete.
7663 (target_has_exited): Delete.
7664 * target-delegates.c: Regenerate.
7665
7666 2018-04-11 Pedro Alves <palves@redhat.com>
7667
7668 * target.c (fileio_fh_t::t): Add comment.
7669 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7670 (target_fileio_close): Handle a NULL target.
7671 (invalidate_fileio_fh): New.
7672 (target_close): Call it.
7673 * remote.c (remote_hostio_send_command): No longer check whether
7674 remote_desc is open.
7675
7676 2018-04-11 Pedro Alves <palves@redhat.com>
7677
7678 * target.c (fileio_fh_t): Make it a named struct instead of a
7679 typedef.
7680 (fileio_fh_t::is_closed): New method.
7681 (DEF_VEC_O (fileio_fh_t)): Remove.
7682 (fileio_fhandles): Now a std::vector.
7683 (is_closed_fileio_fh): Delete.
7684 (acquire_fileio_fd): Adjust. Rename parameters.
7685 (release_fileio_fd): Adjust.
7686 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7687 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7688 (target_fileio_close): Adjust.
7689
7690 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7691
7692 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7693 index.
7694
7695 2018-04-10 Pedro Alves <palves@redhat.com>
7696
7697 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7698 (scoped_finish_thread_state): New class.
7699 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7700 cleanup.
7701 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7702 (fetch_inferior_event, normal_stop): Likewise.
7703 * thread.c (finish_thread_state_cleanup): Delete.
7704
7705 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7706 Pedro Alves <palves@redhat.com>
7707
7708 * value.c: Include "selftest.h" and "common/array-view.h".
7709 (struct range) <operator ==>: New.
7710 (test_ranges_contain): New.
7711 (check_ranges_vector): New.
7712 (test_insert_into_bit_range_vector): New.
7713 (_initialize_values): Register selftests.
7714 * common/array-view.h (operator==, operator!=): New.
7715
7716 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7717
7718 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7719 an iterator.
7720 * inline-frame.c: Include <algorithm>.
7721 (struct inline_state): Add constructor.
7722 (inline_state_s): Remove.
7723 (DEF_VEC_O(inline_state_s)): Remove.
7724 (inline_states): Change type to std::vector.
7725 (find_inline_frame_state): Adjust to std::vector.
7726 (allocate_inline_frame_state): Remove.
7727 (clear_inline_frame_state): Adjust to std::vector.
7728 (skip_inline_frames): Adjust to std::vector.
7729
7730 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7731
7732 * tracepoint.h (struct trace_state_variable): Add constructor.
7733 <name>: Change type to std::string.
7734 * tracepoint.c (tsv_s): Remove.
7735 (DEF_VEC_O(tsv_s)): Remove.
7736 (tvariables): Change to std::vector.
7737 (create_trace_state_variable): Adjust to std::vector.
7738 (find_trace_state_variable): Likewise.
7739 (find_trace_state_variable_by_number): Likewise.
7740 (delete_trace_state_variable): Likewise.
7741 (trace_variable_command): Adjust to std::string.
7742 (delete_trace_variable_command): Likewise.
7743 (tvariables_info_1): Adjust to std::vector.
7744 (save_trace_state_variables): Likewise.
7745 (start_tracing): Likewise.
7746 (merge_uploaded_trace_state_variables): Adjust to std::vector
7747 and std::string.
7748 * target.h (struct target_ops)
7749 <to_download_trace_state_variable>: Pass reference to
7750 trace_state_variable.
7751 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7752 * target-delegates.c: Re-generate.
7753 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7754 (mi_tsv_deleted): Likewise.
7755 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7756 * remote.c (remote_download_trace_state_variable): Change
7757 pointer to reference and adjust.
7758 * make-target-delegates (parse_argtypes): Handle references.
7759 (write_function_header): Likewise.
7760 (munge_type): Likewise.
7761
7762 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7763
7764 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7765 string_view-selftests.c.
7766 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7767 testsuite.
7768 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7769 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7770 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7771 * unittests/basic_string_view/element_access/char/1.cc:
7772 Likewise.
7773 * unittests/basic_string_view/element_access/char/empty.cc:
7774 Likewise.
7775 * unittests/basic_string_view/element_access/char/front_back.cc:
7776 Likewise.
7777 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7778 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7779 Likewise.
7780 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7781 Likewise.
7782 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7783 Likewise.
7784 * unittests/basic_string_view/operations/compare/char/1.cc:
7785 Likewise.
7786 * unittests/basic_string_view/operations/compare/char/13650.cc:
7787 Likewise.
7788 * unittests/basic_string_view/operations/copy/char/1.cc:
7789 Likewise.
7790 * unittests/basic_string_view/operations/data/char/1.cc:
7791 Likewise.
7792 * unittests/basic_string_view/operations/find/char/1.cc:
7793 Likewise.
7794 * unittests/basic_string_view/operations/find/char/2.cc:
7795 Likewise.
7796 * unittests/basic_string_view/operations/find/char/3.cc:
7797 Likewise.
7798 * unittests/basic_string_view/operations/find/char/4.cc:
7799 Likewise.
7800 * unittests/basic_string_view/operations/rfind/char/1.cc:
7801 Likewise.
7802 * unittests/basic_string_view/operations/rfind/char/2.cc:
7803 Likewise.
7804 * unittests/basic_string_view/operations/rfind/char/3.cc:
7805 Likewise.
7806 * unittests/basic_string_view/operations/substr/char/1.cc:
7807 Likewise.
7808 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7809 * unittests/string_view-selftests.c: New file.
7810
7811 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7812
7813 * unittests/basic_string_view/capacity/1.cc: New file.
7814 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7815 * unittests/basic_string_view/cons/char/1.cc: New file.
7816 * unittests/basic_string_view/cons/char/2.cc: New file.
7817 * unittests/basic_string_view/cons/char/3.cc: New file.
7818 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7819 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7820 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7821 * unittests/basic_string_view/element_access/char/1.cc: New file.
7822 * unittests/basic_string_view/element_access/char/2.cc: New file.
7823 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7824 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7825 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7826 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7827 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7828 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7829 * unittests/basic_string_view/include.cc: New file.
7830 * unittests/basic_string_view/inserters/char/1.cc: New file.
7831 * unittests/basic_string_view/inserters/char/2.cc: New file.
7832 * unittests/basic_string_view/inserters/char/3.cc: New file.
7833 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7834 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7835 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7836 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7837 * unittests/basic_string_view/literals/types.cc: New file.
7838 * unittests/basic_string_view/literals/values.cc: New file.
7839 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7840 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7841 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7842 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7843 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7844 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7845 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7846 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7847 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7848 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7849 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7850 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7851 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7852 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7853 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7854 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7855 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7856 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7857 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7858 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7859 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7860 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7861 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7862 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7863 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7864 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7865 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7866 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7867 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7868 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7869 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7870 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7871 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7872 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7873 * unittests/basic_string_view/operators/char/2.cc: New file.
7874 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7875 * unittests/basic_string_view/range_access/char/1.cc: New file.
7876 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7877 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7878 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7879 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7880 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7881 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7882 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7883 * unittests/basic_string_view/typedefs.cc: New file.
7884 * unittests/basic_string_view/types/1.cc: New file.
7885
7886 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7887
7888 * common/gdb_string_view.h: Remove libstdc++ implementation
7889 details, adjust to gdb reality.
7890 * common/gdb_string_view.tcc: Likewise.
7891 * cli/cli-script.c (struct string_view): Remove.
7892 (user_args) <m_args>: Change element type to gdb::string_view.
7893 (user_args::insert_args): Adjust.
7894
7895 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7896
7897 * common/gdb_string_view.h: New file.
7898 * common/gdb_string_view.tcc: New file.
7899
7900 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7901
7902 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7903 * configure: Re-generate.
7904
7905 2018-04-09 Pedro Alves <palves@redhat.com>
7906
7907 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7908 (set_target_gdbarch): Call
7909 gdb::observers::architecture_changed.notify instead of
7910 observer_notify_architecture_changed.
7911
7912 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7913
7914 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7915 (do_restore_current_traceframe_cleanup): Remove.
7916 (restore_current_traceframe_cleanup_dtor): Remove.
7917 (make_cleanup_restore_current_traceframe): Remove.
7918 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7919 New.
7920 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7921 * infrun.c (fetch_inferior_event): Use
7922 scoped_restore_current_traceframe.
7923
7924 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7925
7926 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7927 Remove.
7928 <n_allocated_type_units>: Remove.
7929 <all_type_units>: Change to std::vector.
7930 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7931 to std::vector change.
7932 (dwarf2_per_objfile::get_cutu): Likewise.
7933 (dwarf2_per_objfile::get_tu): Likewise.
7934 (create_signatured_type_table_from_index): Likewise.
7935 (create_signatured_type_table_from_debug_names): Likewise.
7936 (dw2_symtab_iter_next): Likewise.
7937 (dw2_print_stats): Likewise.
7938 (dw2_expand_all_symtabs): Likewise.
7939 (dw2_expand_marked_cus): Likewise.
7940 (dw2_debug_names_iterator::next): Likewise.
7941 (dwarf2_initialize_objfile): Likewise.
7942 (add_signatured_type_cu_to_table): Likewise.
7943 (create_all_type_units): Likewise.
7944 (add_type_unit): Likewise.
7945 (struct tu_abbrev_offset): Add constructor.
7946 (build_type_psymtabs_1): Adjust to std::vector change.
7947 (print_tu_stats): Likewise.
7948 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7949 (write_debug_names): Likewise.
7950
7951 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7952
7953 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7954 Make an std::vector.
7955 <n_comp_units>: Remove.
7956 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7957 to std::vector change.
7958 (dwarf2_per_objfile::get_cutu): Likewise.
7959 (dwarf2_per_objfile::get_cu): Likewise.
7960 (create_cus_from_index): Likewise.
7961 (create_addrmap_from_index): Likewise.
7962 (create_addrmap_from_aranges): Likewise.
7963 (dwarf2_read_index): Likewise.
7964 (dw2_find_last_source_symtab): Likewise.
7965 (dw2_map_symtabs_matching_filename): Likewise.
7966 (dw2_symtab_iter_next): Likewise.
7967 (dw2_print_stats): Likewise.
7968 (dw2_expand_all_symtabs): Likewise.
7969 (dw2_expand_symtabs_with_fullname): Likewise.
7970 (dw2_expand_marked_cus): Likewise.
7971 (dw2_map_symbol_filenames): Likewise.
7972 (create_cus_from_debug_names): Likewise.
7973 (dwarf2_read_debug_names): Likewise.
7974 (dw2_debug_names_iterator::next): Likewise.
7975 (dwarf2_initialize_objfile): Likewise.
7976 (set_partial_user): Likewise.
7977 (dwarf2_build_psymtabs_hard): Likewise.
7978 (read_comp_units_from_section): Remove arguments, adjust to
7979 std::vector change.
7980 (create_all_comp_units): Adjust to std::vector and
7981 read_comp_units_from_section changes.
7982 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7983 change.
7984 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7985 (psyms_seen_size): Likewise.
7986 (write_gdbindex): Likewise.
7987 (write_debug_names): Likewise.
7988
7989 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7990
7991 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7992 with dwarf2_per_objfile.
7993 (create_cus_from_index): Likewise.
7994 (create_signatured_type_table_from_index): Likewise.
7995 (dwarf2_read_index): Likewise.
7996 (dwarf2_initialize_objfile): Likewise.
7997 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7998 per_cu rather than get_dwarf2_per_objfile.
7999
8000 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8001
8002 * dwarf2read.h (struct signatured_type): Forward declare.
8003 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8004 New methods.
8005 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8006 (dw2_get_cutu): ...this.
8007 (dwarf2_per_objfile::get_cu): Rename from...
8008 (dw2_get_cu): ...this.
8009 (dwarf2_per_objfile::get_tu): New.
8010 (create_addrmap_from_index): Adjust.
8011 (create_addrmap_from_aranges): Adjust.
8012 (dw2_find_last_source_symtab): Adjust.
8013 (dw2_map_symtabs_matching_filename): Adjust.
8014 (dw2_symtab_iter_next): Adjust.
8015 (dw2_print_stats): Adjust.
8016 (dw2_expand_all_symtabs): Adjust.
8017 (dw2_expand_symtabs_with_fullname): Adjust.
8018 (dw2_expand_marked_cus): Adjust.
8019 (dw_expand_symtabs_matching_file_matcher): Adjust.
8020 (dw2_map_symbol_filenames): Adjust.
8021 (dw2_debug_names_iterator::next): Adjust.
8022 (dwarf2_initialize_objfile): Adjust.
8023 (set_partial_user): Adjust.
8024 (dwarf2_build_psymtabs_hard): Adjust.
8025
8026 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8027
8028 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8029 Remove unused variables.
8030 (dw2_map_symtabs_matching_filename): Likewise.
8031 (dwarf2_record_block_ranges): Likewise.
8032 (dwarf2_read_addr_index): Likewise.
8033 (follow_die_offset): Likewise.
8034
8035 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8036
8037 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8038 to symbol_file_add_main.
8039
8040 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8041
8042 PR mi/22299
8043 * mi/mi-console.c (do_fputc_async_safe): New.
8044 (mi_console_file::write_async_safe): New.
8045 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8046 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8047 New.
8048 * ui-file.c (ui_file::putstrn): Adjust call to
8049 fputstrn_unfiltered.
8050 * utils.c (printchar): Replace do_fputs and do_fprintf
8051 parameters by do_fputc.
8052 (fputstr_filtered): Adjust call to printchar.
8053 (fputstr_unfiltered): Likewise.
8054 (fputstrn_filtered): Likewise.
8055 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8056 printchar.
8057 * utils.h (do_fputc_ftype): New typedef.
8058 (fputstrn_unfiltered): Add do_fputc parameter.
8059
8060 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8061
8062 * regformats/i386/i386-avx.dat: Remove.
8063
8064 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8065
8066 PR gdb/22979
8067 * amd64-tdep.c (amd64_none_init_abi): New function.
8068 (amd64_x32_none_init_abi): New function.
8069 (_initialize_amd64_tdep): Register handlers for x86-64 and
8070 x64_32 with GDB_OSABI_NONE.
8071 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8072 GDB_OSABI_NONE osabi.
8073
8074 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8075
8076 PR gdb/22980
8077 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8078 GDB_OSABI_NONE.
8079 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8080 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8081
8082 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8083
8084 * common/byte-vector.h (char_vector): New type.
8085 * target.h (target_read_alloc): Return
8086 gdb::optional<byte_vector>.
8087 (target_read_stralloc): Return gdb::optional<char_vector>.
8088 (target_get_osdata): Return gdb::optional<char_vector>.
8089 * target.c (target_read_alloc_1): Templatize. Replacement
8090 manual memory management with vector.
8091 (target_read_alloc): Change return type, adjust.
8092 (target_read_stralloc): Change return type, adjust.
8093 (target_get_osdata): Change return type, adjust.
8094 * auxv.c (struct auxv_info) <length>: Remove.
8095 <data>: Change type to gdb::optional<byte_vector>.
8096 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8097 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8098 (target_auxv_search): Adjust.
8099 (fprint_target_auxv): Adjust.
8100 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8101 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8102 (linux_make_corefile_notes): Adjust.
8103 * osdata.c (get_osdata): Adjust.
8104 * remote.c (remote_get_threads_with_qxfer): Adjust.
8105 (remote_memory_map): Adjust.
8106 (remote_traceframe_info): Adjust.
8107 (btrace_read_config): Adjust.
8108 (remote_read_btrace): Adjust.
8109 (remote_pid_to_exec_file): Adjust.
8110 * solib-aix.c (solib_aix_get_library_list): Adjust.
8111 * solib-dsbt.c (decode_loadmap): Don't free buf.
8112 (dsbt_get_initial_loadmaps): Adjust.
8113 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8114 * solib-target.c (solib_target_current_sos): Adjust.
8115 * tracepoint.c (sdata_make_value): Adjust.
8116 * xml-support.c (xinclude_start_include): Adjust.
8117 (xml_fetch_content_from_file): Adjust.
8118 * xml-support.h (xml_fetch_another): Change return type.
8119 (xml_fetch_content_from_file): Change return type.
8120 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8121 * xml-tdesc.c (file_read_description_xml): Adjust.
8122 (fetch_available_features_from_target): Change return type.
8123 (target_fetch_description_xml): Adjust.
8124 (target_read_description_xml): Adjust.
8125
8126 2018-04-06 Tom Tromey <tom@tromey.com>
8127
8128 * value.c (~value): Update.
8129 (struct value) <contents>: Now unique_xmalloc_ptr.
8130 (value_contents_bits_eq, allocate_value_contents)
8131 (value_contents_raw, value_contents_all_raw)
8132 (value_contents_for_printing, value_contents_for_printing_const)
8133 (set_value_enclosing_type): Update.
8134
8135 2018-04-06 Tom Tromey <tom@tromey.com>
8136
8137 * value.c (range_s): Remove typedef, VEC.
8138 (struct range): Add operator<.
8139 (range_lessthan): Remove.
8140 (ranges_contain): Change type.
8141 (~value): Update.
8142 (struct value) <unavailable, optimized_out>: Now std::vector.
8143 (value_entirely_available)
8144 (value_entirely_covered_by_range_vector)
8145 (value_entirely_unavailable, value_entirely_optimized_out):
8146 Update.
8147 (insert_into_bit_range_vector): Change argument type.
8148 (find_first_range_overlap): Likewise.
8149 (struct ranges_and_idx, value_contents_bits_eq)
8150 (require_not_optimized_out, require_available): Update.
8151 (ranges_copy_adjusted): Change argument types.
8152 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8153
8154 2018-04-06 Tom Tromey <tom@tromey.com>
8155
8156 * value.c (~value): Update.
8157 (struct value) <parent>: Now a value_ref_ptr.
8158 (value_parent, set_value_parent, value_address, value_copy):
8159 Update.
8160
8161 2018-04-06 Tom Tromey <tom@tromey.com>
8162
8163 * value.c (struct value): Add constructor, destructor, and member
8164 initializers.
8165 (allocate_value_lazy, value_decref): Update.
8166
8167 2018-04-06 Tom Tromey <tom@tromey.com>
8168
8169 * value.c (struct value) <released, next>: Remove.
8170 (all_values): Now a std::vector.
8171 (allocate_value_lazy): Update.
8172 (value_next): Remove.
8173 (value_mark, value_free_to_mark, release_value)
8174 (value_release_to_mark): Update.
8175
8176 2018-04-06 Tom Tromey <tom@tromey.com>
8177
8178 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8179 (free_value_chain): Remove.
8180 * value.c (free_value_chain): Remove.
8181 (value_release_to_mark): Return a std::vector.
8182 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8183 std::vector.
8184 (check_condition): Update.
8185 * eval.c (fetch_subexp_value): Change "val_chain" to a
8186 std::vector.
8187 * breakpoint.c (update_watchpoint): Update.
8188 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8189
8190 2018-04-06 Tom Tromey <tom@tromey.com>
8191
8192 * value.h (free_all_values): Remove.
8193 * value.c (free_all_values): Remove.
8194
8195 2018-04-06 Tom Tromey <tom@tromey.com>
8196
8197 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8198 (value_history_chain, value_history_count): Remove.
8199 (value_history): New global.
8200 (record_latest_value, access_value_history, show_values)
8201 (preserve_values): Update.
8202
8203 2018-04-06 Tom Tromey <tom@tromey.com>
8204
8205 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8206 * varobj.c (varobj_set_display_format, varobj_set_value)
8207 (install_default_visualizer, construct_visualizer)
8208 (install_new_value, ~varobj, varobj_get_value_type)
8209 (my_value_of_variable, varobj_editable_p): Update.
8210 * c-varobj.c (c_describe_child, c_value_of_variable)
8211 (cplus_number_of_children, cplus_describe_child): Update.
8212 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8213 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8214 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8215
8216 2018-04-06 Tom Tromey <tom@tromey.com>
8217
8218 * printcmd.c (last_examine_address): Change type to
8219 value_ref_ptr.
8220 (do_examine, x_command): Update.
8221
8222 2018-04-06 Tom Tromey <tom@tromey.com>
8223
8224 * value.c (release_value): Update.
8225 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8226 (struct bpstats) <val>: Now a value_ref_ptr.
8227 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8228 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8229 (~watchpoint, print_it_watchpoint, watch_command_1)
8230 (invalidate_bp_value_on_memory_change): Update.
8231
8232 2018-04-06 Tom Tromey <tom@tromey.com>
8233
8234 * varobj.c (varobj_clear_saved_item)
8235 (update_dynamic_varobj_children, install_new_value, ~varobj):
8236 Update.
8237 * value.h (value_incref): Move declaration earlier.
8238 (value_decref): Rename from value_free.
8239 (struct value_ref_policy): New.
8240 (value_ref_ptr): New typedef.
8241 (struct value_deleter): Remove.
8242 (gdb_value_up): Remove typedef.
8243 (release_value): Change return type.
8244 (release_value_or_incref): Remove.
8245 * value.c (set_value_parent): Update.
8246 (value_incref): Change return type.
8247 (value_decref): Rename from value_free.
8248 (value_free_to_mark, free_all_values, free_value_chain): Update.
8249 (release_value): Return value_ref_ptr.
8250 (release_value_or_incref): Remove.
8251 (record_latest_value, set_internalvar, clear_internalvar):
8252 Update.
8253 * stack.c (info_frame_command): Don't call value_free.
8254 * python/py-value.c (valpy_dealloc, valpy_new)
8255 (value_to_value_object): Update.
8256 * printcmd.c (do_examine): Update.
8257 * opencl-lang.c (lval_func_free_closure): Update.
8258 * mi/mi-main.c (register_changed_p): Don't call value_free.
8259 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8260 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8261 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8262 value_free.
8263 * guile/scm-value.c (vlscm_free_value_smob)
8264 (vlscm_scm_from_value): Update.
8265 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8266 (frame_unwind_register_unsigned, get_frame_register_bytes)
8267 (put_frame_register_bytes): Don't call value_free.
8268 * findvar.c (address_from_register): Don't call value_free.
8269 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8270 * dwarf2loc.c (entry_data_value_free_closure)
8271 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8272 (dwarf2_evaluate_loc_desc_full): Update.
8273 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8274 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8275 (~watchpoint, watch_command_1)
8276 (invalidate_bp_value_on_memory_change): Update.
8277 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8278
8279 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8280
8281 PR gdb/23022
8282 * warning.m4: Add -Wno-error=deprecated-register.
8283 * configure: Re-generate.
8284
8285 2018-04-05 Tom Tromey <tom@tromey.com>
8286
8287 * linespec.h: Remove include of "vec.h".
8288
8289 2018-04-05 Tom Tromey <tom@tromey.com>
8290
8291 * linespec.c (typep): Remove typedef.
8292 (find_methods, find_superclass_methods): Take a std::vector.
8293 (find_method): Use std::vector.
8294
8295 2018-04-05 Tom Tromey <tom@tromey.com>
8296
8297 * utils.c (compare_strings): Remove.
8298 * utils.h (compare_strings): Remove.
8299 * objc-lang.h (find_imps): Update.
8300 * objc-lang.c (find_methods): Take a std::vector.
8301 (uniquify_strings, find_imps): Likewise.
8302 * linespec.c (find_methods): Take a std::vector.
8303 (decode_objc): Use std::vector.
8304 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8305 a std::vector.
8306 (find_method, find_function_symbols): Use std::vector.
8307
8308 2018-04-05 Tom Tromey <tom@tromey.com>
8309
8310 * completer.c (completion_tracker::completion_tracker): Remove
8311 cast.
8312 (completion_tracker::discard_completions): Likewise.
8313 * breakpoint.c (ambiguous_names_p): Remove cast.
8314 * ada-lang.c (_initialize_ada_language): Remove cast.
8315 * utils.h (streq): Update.
8316 (streq_hash): Add new declaration.
8317 * utils.c (streq): Return bool.
8318 (streq_hash): New function.
8319
8320 2018-04-05 Tom Tromey <tom@tromey.com>
8321
8322 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8323 Remove a string copy.
8324
8325 2018-04-05 Tom Tromey <tom@tromey.com>
8326
8327 * linespec.c (filter_results): Use std::vector.
8328 (decode_line_2, decode_line_full): Update.
8329
8330 2018-04-05 Tom Tromey <tom@tromey.com>
8331
8332 * linespec.c (canonical_to_fullform): Return std::string.
8333 (filter_results): Update.
8334 (struct decode_line_2_item): Add constructor.
8335 <fullform, displayform>: Now std::string.
8336 (decode_line_2_compare_items): Now a std::sort comparator.
8337 (decode_line_2): Update.
8338
8339 2018-04-05 Tom Tromey <tom@tromey.com>
8340
8341 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8342 (unexpected_linespec_error): Update.
8343 (linespec_parse_basic, parse_linespec): Update.
8344
8345 2018-04-05 Tom Tromey <tom@tromey.com>
8346
8347 * linespec.c (linespec_parse_basic): Reindent.
8348
8349 2018-04-05 Tom Tromey <tom@tromey.com>
8350
8351 * minsyms.h (iterate_over_minimal_symbols): Update.
8352 * minsyms.c (iterate_over_minimal_symbols): Take a
8353 gdb::function_view.
8354 * linespec.c (struct collect_minsyms): Remove.
8355 (compare_msyms): Now a std::sort comparator.
8356 (add_minsym): Add parameters.
8357 (search_minsyms_for_name): Update. Use std::vector.
8358
8359 2018-04-03 Tom Tromey <tom@tromey.com>
8360
8361 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8362 gdb::byte_vector.
8363
8364 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8365
8366 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8367
8368 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8369
8370 PR gdb/16959
8371 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8372 printing static type.
8373
8374 2018-04-01 Tom Tromey <tom@tromey.com>
8375
8376 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8377 (rs6000_xfer_shared_libraries): Update.
8378
8379 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8380
8381 * common/gdb_vecs.h (char_ptr): Remove.
8382 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8383
8384 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8385
8386 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8387 with std::vector.
8388 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8389
8390 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8391
8392 * tracepoint.h (struct uploaded_tp): Initialize fields.
8393 <actions, step_actions, cmd_strings>: Change type to
8394 std::vector<char *>.
8395 * tracepoint.c (get_uploaded_tp): Allocate with new.
8396 (free_uploaded_tps): Free with delete.
8397 (parse_tracepoint_definition): Adjust to std::vector change.
8398 * breakpoint.c (read_uploaded_action): Likewise.
8399 (create_tracepoint_from_upload): Likewise.
8400 * ctf.c (ctf_write_uploaded_tp): Likewise.
8401 (SET_ARRAY_FIELD): Likewise.
8402 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8403
8404 2018-03-30 Tom Tromey <tom@tromey.com>
8405
8406 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8407 std::unique_ptr.
8408 (svr4_keep_data_in_core): Update.
8409 (svr4_read_so_list): Update.
8410
8411 2018-03-30 Tom Tromey <tom@tromey.com>
8412
8413 * windows-nat.c (handle_output_debug_string, handle_exception):
8414 Update.
8415 * target.h (target_read_string): Update.
8416 * target.c (target_read_string): Change "string" to
8417 unique_xmalloc_ptr.
8418 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8419 Update.
8420 * solib-frv.c (frv_current_sos): Update.
8421 * solib-dsbt.c (dsbt_current_sos): Update.
8422 * solib-darwin.c (darwin_current_sos): Update.
8423 * linux-thread-db.c (inferior_has_bug): Update.
8424 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8425 Update. Remove alloca.
8426 * ada-lang.c (ada_main_name): Update.
8427
8428 2018-03-30 Tom Tromey <tom@tromey.com>
8429
8430 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8431 (struct dwo_file_deleter): New.
8432 (dwo_file_up): New typedef.
8433 (open_and_init_dwo_file): Use dwo_file_up.
8434 (free_dwo_file_cleanup): Remove.
8435
8436 2018-03-30 Tom Tromey <tom@tromey.com>
8437
8438 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8439 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8440
8441 2018-03-30 Tom Tromey <tom@tromey.com>
8442
8443 * dwarf2read.c (class free_cached_comp_units): New class.
8444 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8445 (free_cached_comp_units): Remove function.
8446
8447 2018-03-30 Tom Tromey <tom@tromey.com>
8448
8449 * utils.h (make_cleanup_unpush_target): Remove.
8450 * inf-ptrace.c (struct target_unpusher): New.
8451 (target_unpush_up) New typedef.
8452 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8453 target_unpush_up.
8454 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8455
8456 2018-03-27 Tom Tromey <tom@tromey.com>
8457
8458 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8459
8460 2018-03-27 Pedro Alves <palves@redhat.com>
8461 Tom Tromey <tom@tromey.com>
8462
8463 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8464 destructor. Now a class.
8465 (gdb_readline_wrapper_cleanup): Remove function.
8466 (gdb_readline_wrapper): Remove cleanups.
8467
8468 2018-03-27 Tom Tromey <tom@tromey.com>
8469
8470 * typeprint.h (struct type_print_options) <local_typedefs,
8471 global_typedefs>: Remove "struct" keyword.
8472 (class typedef_hash_table): New class.
8473 (recursively_update_typedef_hash, add_template_parameters)
8474 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8475 (find_typedef_in_hash): Don't declare.
8476 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8477 (typedef_hash_table::recursively_update): Rename from
8478 recursively_update_typedef_hash. Now a member.
8479 (typedef_hash_table::add_template_parameters): Rename from
8480 add_template_parameters. Now a member.
8481 (typedef_hash_table::typedef_hash_table): Now a constructor;
8482 rename from create_typedef_hash.
8483 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8484 rename from free_typedef_hash.
8485 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8486 (do_free_global_table): Remove.
8487 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8488 from copy_type_recursive.
8489 (create_global_typedef_table): Remove.
8490 (typedef_hash_table::find_global_typedef): Now a member of
8491 typedef_hash_table.
8492 (typedef_hash_table::find_typedef): Rename from
8493 find_typedef_in_hash; now a member.
8494 (whatis_exp): Update.
8495 * extension.h (struct ext_lang_type_printers): Add constructor and
8496 destructor.
8497 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8498 declare.
8499 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8500 Now a constructor; rename from start_ext_lang_type_printers.
8501 (ext_lang_type_printers): Now a destructor; rename from
8502 free_ext_lang_type_printers.
8503 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8504 Update.
8505 (c_type_print_base_struct_union): Update. Remove cleanups.
8506
8507 2018-03-27 Tom Tromey <tom@tromey.com>
8508
8509 * dwarf-index-write.c: Include <cmath>.
8510
8511 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8512
8513 * NEWS: Add entry describing new "set|show varsize-limit" command.
8514 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8515 command.
8516 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8517 "set variable".
8518
8519 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8520
8521 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8522 dwarf-index-write.c
8523 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8524 * dwarf-index-common.c: New file.
8525 * dwarf-index-common.h: New file.
8526 * dwarf-index-write.c: New file.
8527 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8528 (struct dwarf2_section_info): Move from here.
8529 (dwarf2_section_info_def): Likewise.
8530 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8531 (offset_type): Likewise.
8532 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8533 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8534 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8535 (byte_swap): Likewise.
8536 (MAYBE_SWAP): Likewise.
8537 (dwarf2_per_cu_ptr): Likewise.
8538 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8539 (struct tu_stats): Likewise.
8540 (struct dwarf2_per_objfile): Likewise.
8541 (struct dwarf2_per_cu_data): Likewise.
8542 (struct signatured_type): Likewise.
8543 (sig_type_ptr): Likewise.
8544 (DEF_VEC_P (sig_type_ptr)): Likewise.
8545 (INDEX4_SUFFIX): Likewise.
8546 (INDEX5_SUFFIX): Likewise.
8547 (DEBUG_STR_SUFFIX): Likewise.
8548 (dwarf2_read_section): Make non-static.
8549 (mapped_index_string_hash): Move from here.
8550 (dwarf5_djb_hash): Likewise.
8551 (file_write): Likewise.
8552 (class data_buf): Likewise.
8553 (struct symtab_index_entry): Likewise.
8554 (struct mapped_symtab): Likewise.
8555 (find_slot): Likewise.
8556 (hash_expand): Likewise.
8557 (add_index_entry): Likewise.
8558 (uniquify_cu_indices): Likewise.
8559 (class c_str_view): Likewise.
8560 (class c_str_view_hasher): Likewise.
8561 (class vector_hasher): Likewise.
8562 (write_hash_table): Likewise.
8563 (psym_index_map): Likewise.
8564 (struct addrmap_index_data): Likewise.
8565 (add_address_entry): Likewise.
8566 (add_address_entry_worker): Likewise.
8567 (write_address_map): Likewise.
8568 (symbol_kind): Likewise.
8569 (write_psymbols): Likewise.
8570 (struct signatured_type_index_data): Likewise.
8571 (write_one_signatured_type): Likewise.
8572 (recursively_count_psymbols): Likewise.
8573 (recursively_write_psymbols): Likewise.
8574 (class debug_names): Likewise.
8575 (check_dwarf64_offsets): Likewise.
8576 (psyms_seen_size): Likewise.
8577 (write_gdbindex): Likewise.
8578 (write_debug_names): Likewise.
8579 (assert_file_size): Likewise.
8580 (write_psymtabs_to_index): Likewise.
8581 (save_gdb_index_command): Likewise.
8582 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8583 command.
8584 * dwarf2read.h: New file.
8585
8586 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8587
8588 PR gdb/22670
8589 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8590 symbol name if the CU's language stores symbol names in linkage
8591 format.
8592 * language.h (struct language_defn)
8593 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8594 all instances of this struct.
8595
8596 2018-03-26 Tom Tromey <tom@tromey.com>
8597
8598 * stack.c (backtrace_command_1): Remove verbose code.
8599
8600 2018-03-26 Tom Tromey <tom@tromey.com>
8601
8602 * python/py-framefilter.c (py_print_type): Don't catch
8603 exceptions. Return void.
8604 (py_print_value): Likewise.
8605 (py_print_single_arg): Likewise.
8606 (enumerate_args): Don't catch exceptions.
8607 (py_print_args): Likewise.
8608 (py_print_frame): Likewise.
8609 (gdbpy_apply_frame_filter): Catch exceptions here.
8610
8611 2018-03-26 Tom Tromey <tom@tromey.com>
8612
8613 * stack.c (_initialize_stack): Remove trailing newlines from help
8614 text. Add "Usage" line to "backtrace" help.
8615
8616 2018-03-26 Tom Tromey <tom@tromey.com>
8617
8618 PR python/16486:
8619 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8620
8621 2018-03-26 Tom Tromey <tom@tromey.com>
8622
8623 * python/py-framefilter.c (py_print_single_arg): Return
8624 EXT_LANG_BT_ERROR from catch.
8625
8626 2018-03-26 Tom Tromey <tom@tromey.com>
8627
8628 PR backtrace/15584:
8629 * stack.c (backtrace_command_1): Move some code into no-filters
8630 "if".
8631
8632 2018-03-26 Tom Tromey <tom@tromey.com>
8633
8634 * python/py-framefilter.c (throw_quit_or_print_exception): New
8635 function.
8636 (gdbpy_apply_frame_filter): Use it.
8637
8638 2018-03-26 Tom Tromey <tom@tromey.com>
8639
8640 PR cli/17716:
8641 * python/py-framefilter.c (py_print_type, py_print_value)
8642 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8643 RETURN_MASK_ERROR.
8644
8645 2018-03-26 Tom Tromey <tom@tromey.com>
8646
8647 * python/py-framefilter.c (enumerate_args): Use
8648 gdb::unique_xmalloc_ptr.
8649
8650 2018-03-26 Tom Tromey <tom@tromey.com>
8651
8652 * python/py-framefilter.c (py_print_frame): Return
8653 EXT_LANG_BT_OK.
8654 (gdbpy_apply_frame_filter): Update comment.
8655 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8656 Remove.
8657 <EXT_LANG_BT_NO_FILTERS>: Change value.
8658
8659 2018-03-26 Tom Tromey <tom@tromey.com>
8660
8661 PR backtrace/15582:
8662 * stack.c (backtrace_command): Parse "hide" argument.
8663 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8664 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8665 constant.
8666
8667 2018-03-26 Tom Tromey <tom@tromey.com>
8668
8669 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8670 add "flags".
8671 (backtrace_command): Remove "fulltrace", add "flags".
8672
8673 2018-03-26 Tom Tromey <tom@tromey.com>
8674
8675 * stack.c (backtrace_command): Rewrite command line parsing.
8676
8677 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8678
8679 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8680
8681 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8682
8683 * filename-seen-cache.h: Add include guard.
8684
8685 2018-03-26 Keith Seitz <keiths@redhat.com>
8686
8687 * symfile.c (place_section): Remove "struct" from section_addr_info
8688 in comment.
8689 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8690 "struct" keyword from section_addr_info.
8691
8692 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8693
8694 * regformats/regdef.h (reg): Add constructors.
8695
8696 2018-03-25 Pedro Alves <palves@redhat.com>
8697
8698 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8699 if then/else bodies in var_func_name extraction.
8700
8701 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8702
8703 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8704 lookup_minimal_symbol() to find symbol entry.
8705 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8706
8707 2018-03-23 Keith Seitz <keiths@redhat.com>
8708
8709 PR c++/22968
8710 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8711 nested type definitions for C++, too.
8712
8713 2018-03-23 Tom Tromey <tom@tromey.com>
8714
8715 * machoread.c (struct oso_el): Add a constructor. Don't define as
8716 a typedef.
8717 (macho_register_oso): Remove.
8718 (macho_symtab_read): Take a std::vector.
8719 (oso_el_compare_name): Now a std::sort comparator.
8720 (macho_symfile_read_all_oso): Take a std::vector.
8721 (macho_symfile_read): Use std::vector. Remove cleanups.
8722
8723 2018-03-22 Tom Tromey <tom@tromey.com>
8724
8725 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8726 (record_full_goto_bookmark): Use std::string.
8727
8728 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8729
8730 PR tdep/18295
8731 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8732 a single mask.
8733
8734 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8735
8736 * rs6000-tdep.c (store_insn_p): New function.
8737 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8738 and cr_reg to their unshifted values. Use store_insn_p to
8739 match LR saves using either R1 or fdata->alloca_reg. Use
8740 store_insn_p to match CR saves. Set alloca_reg_offset
8741 when alloca_reg and framep are set. Remove lr_reg shift
8742 when assigning to fdata->lr_register.
8743
8744 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8745
8746 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8747 command line args instead of emitting a warning.
8748
8749 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8750
8751 * tracepoint.h (struct static_tracepoint_marker): Initialize
8752 fields, define default constructor, move constructor and move
8753 assignment, disable the rest.
8754 <str_id, extra>: Make std::string.
8755 (release_static_tracepoint_marker): Remove.
8756 (free_current_marker): Remove.
8757 * tracepoint.c (free_current_marker): Remove.
8758 (parse_static_tracepoint_marker_definition): Adjust to
8759 std::string, use new hex2str overload.
8760 (release_static_tracepoint_marker): Remove.
8761 (print_one_static_tracepoint_marker): Get marker by reference
8762 and adjust to std::string.
8763 (info_static_tracepoint_markers_command): Adjust to std::vector
8764 changes
8765 * target.h (static_tracepoint_marker_p): Remove typedef.
8766 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8767 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8768 bool.
8769 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8770 * target-debug.h
8771 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8772 (target_debug_print_std_vector_static_tracepoint_marker): New.
8773 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8774 to...
8775 (target_debug_print_static_tracepoint_marker_p): ... this.
8776 * target-delegates.c: Re-generate.
8777 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8778 Make std::string.
8779 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8780 (decode_static_tracepoint_spec): Adjust to std::vector.
8781 (tracepoint_print_one_detail): Adjust to std::string.
8782 (strace_marker_decode_location): Adjust to std::string.
8783 (update_static_tracepoint): Adjust to std::string, remove call
8784 to release_static_tracepoint_marker.
8785 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8786 Adjust to std::vector.
8787 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8788 (remote_static_tracepoint_markers_by_strid): Adjust to
8789 std::vector.
8790 * common/rsp-low.h (hex2str): New overload with explicit count
8791 of bytes.
8792 * common/rsp-low.c (hex2str): New overload with explicit count
8793 of bytes.
8794 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8795 (_initialize_rsp_low_selftests): Add test_hex2str test.
8796 * unittests/tracepoint-selftests.c
8797 (test_parse_static_tracepoint_marker_definition): Adjust to
8798 std::string.
8799
8800 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8801
8802 * tracepoint.c (parse_static_tracepoint_marker_definition):
8803 Consider case where the definition is followed by more
8804 definitions.
8805 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8806 tracepoint-selftests.c.
8807 * unittests/tracepoint-selftests.c: New.
8808
8809 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8810
8811 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8812 Carvalho.
8813
8814 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8815
8816 * symtab.c (find_pc_sect_line): fixed indentation.
8817
8818 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8819
8820 * symtab.c (find_pc_sect_line): now uses binary search.
8821
8822 2018-03-19 Tom Tromey <tom@tromey.com>
8823
8824 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8825 "IDENT" production.
8826
8827 2018-03-19 Pedro Alves <palves@redhat.com>
8828 Tom Tromey <tom@tromey.com>
8829
8830 * unittests/observable-selftests.c: New file.
8831 * common/observable.h: New file.
8832 * observable.h: New file.
8833 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8834 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8835 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8836 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8837 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8838 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8839 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8840 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8841 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8842 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8843 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8844 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8845 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8846 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8847 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8848 tui/tui-interp.c, valops.c: Update all users.
8849 * tui/tui-hooks.c (tui_bp_created_observer)
8850 (tui_bp_deleted_observer, tui_bp_modified_observer)
8851 (tui_inferior_exit_observer, tui_before_prompt_observer)
8852 (tui_normal_stop_observer, tui_register_changed_observer):
8853 Remove.
8854 (tui_observers_token): New global.
8855 (attach_or_detach, tui_attach_detach_observers): New functions.
8856 (tui_install_hooks, tui_remove_hooks): Use
8857 tui_attach_detach_observers.
8858 * record-btrace.c (record_btrace_thread_observer): Remove.
8859 (record_btrace_thread_observer_token): New global.
8860 * observer.sh: Remove.
8861 * observer.c: Rename to observable.c.
8862 * observable.c (namespace gdb_observers): Define new objects.
8863 (observer_debug): Move into gdb_observers namespace.
8864 (struct observer, struct observer_list, xalloc_observer_list_node)
8865 (xfree_observer_list_node, generic_observer_attach)
8866 (generic_observer_detach, generic_observer_notify): Remove.
8867 (_initialize_observer): Update.
8868 Don't include observer.inc.
8869 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8870 (clean mostlyclean): Likewise.
8871 (observer.h, observer.inc): Remove targets.
8872 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8873 (COMMON_SFILES): Use observable.c, not observer.c.
8874 * .gitignore: Remove observer.h.
8875
8876 2018-03-18 Tom Tromey <tom@tromey.com>
8877
8878 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8879 gdb::def_vector.
8880 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8881
8882 2018-03-17 Tom Tromey <tom@tromey.com>
8883
8884 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8885
8886 2018-03-17 Tom Tromey <tom@tromey.com>
8887
8888 * target.c (class scoped_target_fd): New.
8889 (target_fileio_close_cleanup): Remove.
8890 (target_fileio_read_alloc_1): Use scoped_target_fd.
8891
8892 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8893
8894 * silent-rules.mk: New.
8895 * Makefile.in: Include silent-rules.mk
8896 (srcdir, VPATH, top_srcdir): Move up.
8897 (COMPILE): Add ECHO_CXX.
8898 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8899 (init.c): Add ECHO_INIT_C.
8900 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8901 (version.c): Add ECHO_GEN.
8902 (printcmd.o): Add ECHO_CXX.
8903 (target-float.o): Add ECHO_CXX.
8904 (ada-exp.o): Add ECHO_CXX.
8905 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8906 (insight$(EXEEXT)): Add ECHO_CXXLD.
8907 * gnulib/configure.ac: Add AM_SILENT_RULES.
8908 * gnulib/aclocal.m4: Re-generate.
8909 * gnulib/configure: Re-generate.
8910 * gnulib/import/Makefile.in: Re-generate.
8911
8912 2018-03-16 Tom Tromey <tom@tromey.com>
8913
8914 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8915 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8916 * utils.c (do_free_section_addr_info)
8917 (make_cleanup_free_section_addr_info): Remove.
8918 * symfile.h (struct other_sections): Add constructor.
8919 (struct section_addr_info): Remove.
8920 (section_addr_info): New typedef.
8921 (struct sym_fns) <sym_offsets>: Change type of parameter.
8922 (build_section_addr_info_from_objfile)
8923 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8924 (default_symfile_offsets, symbol_file_add)
8925 (symbol_file_add_from_bfd)
8926 (build_section_addr_info_from_section_table): Update.
8927 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8928 * symfile.c (alloc_section_addr_info): Remove.
8929 (build_section_addr_info_from_section_table): Change return type.
8930 Update.
8931 (build_section_addr_info_from_bfd)
8932 (build_section_addr_info_from_objfile): Likewise.
8933 (free_section_addr_info): Remove.
8934 (relative_addr_info_to_section_offsets): Change type of "addrs".
8935 (addrs_section_compar): Now a std::sort comparator.
8936 (addrs_section_sort): Change return type.
8937 (addr_info_make_relative): Change type of "addrs". Update.
8938 (default_symfile_offsets, syms_from_objfile_1)
8939 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8940 (symbol_file_add_separate): Update.
8941 (symbol_file_add): Change type of "addrs". Update.
8942 (add_symbol_file_command): Update. Remove cleanups.
8943 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8944 cleanups.
8945 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8946 * solib.c (solib_read_symbols): Update.
8947 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8948 * machoread.c (macho_symfile_offsets): Update.
8949 * jit.c (jit_bfd_try_read_symtab): Update.
8950
8951 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8952
8953 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8954 unittests/utils-selftests.c.
8955 * unittests/utils-selftests.c: New file.
8956
8957 2018-03-14 Tom Tromey <tom@tromey.com>
8958
8959 PR cli/14977:
8960 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8961 for NULL.
8962
8963 2018-03-14 Tom Tromey <tom@tromey.com>
8964
8965 PR cli/19918:
8966 * printcmd.c (printf_pointer): Allow "-" in format.
8967
8968 2018-03-14 Tom Tromey <tom@tromey.com>
8969
8970 * printcmd.c (_initialize_printcmd): Add usage to printf.
8971
8972 2018-03-14 Yao Qi <qiyao@sourceware.org>
8973
8974 * MAINTAINERS: Update my email address.
8975
8976 2018-03-13 Tom Tromey <tom@tromey.com>
8977
8978 * machoread.c (macho_check_dsym): Change filenamep to a
8979 std::string*.
8980 (macho_symfile_read): Update.
8981 * symfile.c (load_command): Use std::string.
8982
8983 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8984
8985 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8986 to error message string.
8987 (riscv_register_name): Use xsnprintf instead of sprintf.
8988 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8989 internal_error.
8990 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8991 error.
8992 (riscv_push_dummy_call): Likewise.
8993
8994 2018-03-12 Tom Tromey <tom@tromey.com>
8995
8996 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8997 Use gdb::byte_vector.
8998 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8999
9000 2018-03-12 Yao Qi <yao.qi@linaro.org>
9001
9002 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9003 parameter type to readable_regcache.
9004 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9005 the declaration.
9006
9007 2018-03-11 Tom Tromey <tom@tromey.com>
9008
9009 * dwarf2read.c (struct nextfield): Add initializers.
9010 (struct nextfnfield): Remove.
9011 (struct fnfieldlist): Add initializers. Remove "length" and
9012 "head", use std::vector.
9013 (struct decl_field_list): Remove.
9014 (struct field_info): Add initializers.
9015 <fields, baseclasses>: Now std::vector.
9016 <nbaseclasses, nfnfields, typedef_field_list_count,
9017 nested_types_list_count>: Remove.
9018 (dwarf2_add_field, dwarf2_add_type_defn)
9019 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9020 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9021 (process_structure_scope): Update.
9022
9023 2018-03-11 Tom Tromey <tom@tromey.com>
9024
9025 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9026 for use by std::sort.
9027 (build_type_psymtabs_1): Use std::vector.
9028
9029 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9030
9031 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9032 and LIBMPFR in the printed configuration.
9033
9034 2018-03-08 Tom Tromey <tom@tromey.com>
9035
9036 * source.c (get_filename_and_charpos): Use scoped_fd.
9037 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9038 (procfs_pidlist): Likewise.
9039 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9040 (iterate_over_mappings): Likewise.
9041
9042 2018-03-08 Tom Tromey <tom@tromey.com>
9043
9044 * infcall.c (struct call_return_meta_info)
9045 <stack_temporaries_enabled>: Remove.
9046 (get_call_return_value, call_function_by_hand_dummy): Update.
9047 * thread.c (disable_thread_stack_temporaries): Remove.
9048 (enable_thread_stack_temporaries): Remove.
9049 (thread_stack_temporaries_enabled_p): Return bool.
9050 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9051 (get_last_thread_stack_temporary): Update.
9052 * eval.c (evaluate_subexp): Update.
9053 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9054 class, not a function.
9055 (value_ptr, value_vec): Remove typedefs.
9056 (class thread_info) <stack_temporaries_enabled>: Now bool.
9057 <stack_temporaries>: Now a std::vector.
9058 (thread_stack_temporaries_enabled_p)
9059 (value_in_thread_stack_temporaries): Return bool.
9060
9061 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9062
9063 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9064 (getpkt_or_notif_sane_1): Likewise.
9065
9066 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9067
9068 * build-id.c (build_id_to_debug_bfd): Use std::string.
9069
9070 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9071
9072 * build-id.c (find_separate_debug_file_by_buildid): Return
9073 std::string.
9074 * build-id.h (find_separate_debug_file_by_buildid): Return
9075 std::string.
9076 * coffread.c (coff_symfile_read): Adjust to std::string.
9077 * elfread.c (elf_symfile_read): Adjust to std::string.
9078 * symfile.c (separate_debug_file_exists): Change parameter to
9079 std::string.
9080 (find_separate_debug_file): Return std::string.
9081 (find_separate_debug_file_by_debuglink): Return std::string.
9082 * symfile.h (find_separate_debug_file_by_debuglink): Return
9083 std::string.
9084
9085 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9086
9087 * common/xml-utils.c (xml_escape_text): Move code to...
9088 (xml_escape_text_append): ... this new function.
9089 * common/xml-utils.h (xml_escape_text_append): New declaration.
9090 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9091 New function.
9092 (_initialize_xml_utils): register test_xml_escape_text_append as
9093 a selftest.
9094
9095 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9096
9097 * defs.h: Remove MAX_REGISTER_SIZE.
9098 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9099 asserts.
9100 * python/py-unwind.c (pyuw_sniffer): Likewise.
9101
9102 2018-03-07 Tom Tromey <tom@tromey.com>
9103
9104 * linux-tdep.c (linux_info_proc): Update.
9105 * target.h (struct target_ops) <to_fileio_readlink>: Return
9106 optional<string>.
9107 (target_fileio_readlink): Return optional<string>.
9108 * remote.c (remote_hostio_readlink): Return optional<string>.
9109 * inf-child.c (inf_child_fileio_readlink): Return
9110 optional<string>.
9111 * target.c (target_fileio_readlink): Return optional<string>.
9112
9113 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9114
9115 * regcache.c (cooked_read_test): Add riscv to the list of
9116 architectures that have a save_reggroup.
9117
9118 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9119
9120 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9121 value is not a dynamic class object.
9122
9123 2018-03-06 Tom Tromey <tom@tromey.com>
9124
9125 * rust-exp.y: Formatting fixes.
9126
9127 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9128
9129 * riscv-tdep.c (riscv_register_name): Remove target description
9130 support.
9131 (riscv_gdbarch_init): Remove target description check.
9132
9133 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9134
9135 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9136 comment.
9137 * riscv-tdep.h: Likewise.
9138
9139 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9140
9141 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9142 (riscv_pseudo_register_write): Delete.
9143 (riscv_gdbarch_init): Remove all use of pseudo registers.
9144
9145 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9146
9147 * record-btrace.c (btrace_print_lines): Replace cleanup
9148 parameter with RAII equivalents.
9149 (btrace_insn_history): Replace cleanup with RAII equivalents.
9150 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9151 make_cleanup_ui_out_tuple_begin_end): Remove.
9152 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9153 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9154 make_cleanup_ui_out_list_begin_end): Remove.
9155
9156 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9157
9158 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9159 parameter types to std::vector. Use bool.
9160 (record_btrace_wait): Replace VEC(tp_t) with
9161 std::vector<thread_info *>.
9162 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9163
9164 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9165
9166 * record-btrace.c (record_btrace_disable_callback): Remove.
9167 (struct scoped_btrace_disable): New.
9168 (record_btrace_open): Use scoped_btrace_disable.
9169
9170 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9171
9172 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9173 reading values from registers.
9174
9175 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9176
9177 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9178 where appropriate.
9179
9180 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9181
9182 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9183 change parameter type. Use GDB's print functions, and use
9184 core_addr_to_string where appropriate.
9185 (riscv_push_dummy_call): Use core_addr_to_string where
9186 appropriate, update call to riscv_print_arg_location, and reindent
9187 a few lines.
9188 (riscv_return_value): Update call to riscv_print_arg_location.
9189
9190 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9191 Tim Newsome <tim@sifive.com>
9192 Albert Ou <a0u@eecs.berkeley.edu>
9193 Darius Rad <darius@bluespec.com>
9194
9195 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9196 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9197 (ALLDEPFILES): Add riscv-tdep.c
9198 * configure.tgt: Add riscv support.
9199 * riscv-tdep.c: New file.
9200 * riscv-tdep.h: New file.
9201 * NEWS: Mention new target.
9202 * MAINTAINERS: Add entry for riscv.
9203
9204 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9205
9206 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9207 fields within aggregates.
9208
9209 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9210
9211 * record-btrace.c (btrace_print_lines): Change type of flags to
9212 gdb_disassembly_flags.
9213
9214 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9215
9216 * fbsd-nat.c: Include "inf-ptrace.h".
9217 (USE_SIGTRAP_SIGINFO): Conditionally define.
9218 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9219 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9220 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9221 function.
9222 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9223 Likewise.
9224 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9225 Likewise.
9226 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9227 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9228 "supports_stopped_by_hw_breakpoint" target methods.
9229
9230 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9231
9232 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9233 * fbsd-nat.c (debug_fbsd_nat): New variable.
9234 (show_fbsd_nat_debug): New function.
9235 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9236 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9237
9238 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9239
9240 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9241 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9242 prototype.
9243 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9244 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9245 method.
9246
9247 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9248
9249 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9250 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9251
9252 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9253
9254 * charset.c (struct charset_vector): New.
9255 (charsets): Change type to charset_vector.
9256 (find_charset_names): Adjust.
9257 (add_one): Adjust.
9258 (_initialize_charset): Adjust.
9259
9260 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9261
9262 * progspace.h (struct program_space) <deleted_solibs>: Change
9263 type to std::vector<std::string>.
9264 * progspace.c (clear_program_space_solib_cache): Adjust.
9265 * breakpoint.c (print_solib_event): Adjust.
9266 (check_status_catch_solib): Adjust.
9267 * solib.c (update_solib_list): Adjust.
9268 * ui-out.h (class ui_out) <field_string>: New overload.
9269 * ui-out.c (ui_out::field_string): New overload.
9270
9271 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9272
9273 * progspace.h (struct program_space): Add constructor and
9274 destructor, initialize fields.
9275 (add_program_space): Remove.
9276 * progspace.c (add_program_space): Rename to...
9277 (program_space::program_space): ... this.
9278 (release_program_space): Rename to...
9279 (program_space::~program_space): ... this.
9280 (delete_program_space): Use delete to delete program_space.
9281 (initialize_progspace): Use new to allocate program_space.
9282 * inferior.c (add_inferior_with_spaces): Likewise.
9283 (clone_inferior_command): Likewise.
9284 * infrun.c (follow_fork_inferior): Likewise.
9285 (handle_vfork_child_exec_or_exit): Likewise.
9286
9287 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9288
9289 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9290 (delim_string_to_char_ptr_vec): Return std::vector of
9291 gdb::unique_xmalloc_ptr.
9292 (dirnames_to_char_ptr_vec_append): Take std::vector of
9293 gdb::unique_xmalloc_ptr.
9294 (dirnames_to_char_ptr_vec): Return std::vector of
9295 gdb::unique_xmalloc_ptr.
9296 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9297 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9298 (delim_string_to_char_ptr_vec): Return an std::vector of
9299 gdb::unique_xmalloc_ptr, adjust the code.
9300 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9301 gdb::unique_xmalloc_ptr, adjust the code.
9302 (dirnames_to_char_ptr_vec): Return an std::vector of
9303 gdb::unique_xmalloc_ptr, adjust the code.
9304 * auto-load.c (auto_load_safe_path_vec): Change type to
9305 std::vector of gdb::unique_xmalloc_ptr.
9306 (auto_load_expand_dir_vars): Return an std::vector of
9307 gdb::unique_xmalloc_ptr, adjust the code.
9308 (auto_load_safe_path_vec_update): Adjust.
9309 (filename_is_in_auto_load_safe_path_vec): Adjust.
9310 (auto_load_objfile_script_1): Adjust.
9311 * build-id.c (build_id_to_debug_bfd): Adjust.
9312 * linux-thread-db.c (thread_db_load_search): Adjust.
9313 * source.c (add_path): Adjust.
9314 (openp): Adjust.
9315 * symfile.c (find_separate_debug_file): Adjust.
9316 * utils.c (do_free_char_ptr_vec): Remove.
9317 (make_cleanup_free_char_ptr_vec): Remove.
9318
9319 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9320
9321 PR gdb/22907
9322 * common/pathstuff.c: Conditionally include "<windows.h>".
9323
9324 2018-03-01 Georg Sauthoff <mail@georg.so>
9325
9326 PR gdb/22888
9327 * gcore.in: Quote variables and switch interpreter to bash.
9328
9329 2018-03-01 Tom Tromey <tom@tromey.com>
9330
9331 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9332 assertion. Add assertion for discriminant_index.
9333 (quirk_rust_enum): Use correct base type name in univariant case.
9334
9335 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9336
9337 * record.c (get_call_history_modifiers): Return a
9338 record_print_flags.
9339 (cmd_record_call_history): Adjust.
9340 * record-btrace.c (record_btrace_call_history): Adjust.
9341 (record_btrace_call_history_range): Adjust.
9342 (record_btrace_call_history_from): Adjust.
9343 * target-debug.h (target_debug_print_record_print_flags): New.
9344 * target-delegates.c: Re-generate.
9345 * target.c (target_call_history): Change flags type.
9346 (target_call_history_from): Likewise.
9347 (target_call_history_range): Likewise.
9348 * target.h (struct target_ops) <target_call_history>: Likewise.
9349 (target_call_history_from): Likewise.
9350 (target_call_history_range): Likewise.
9351
9352 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9353 Simon Marchi <simon.marchi@polymtl.ca>
9354
9355 * common/common-utils.c: Include "sys/stat.h".
9356 (is_regular_file): Move here from "source.c"; change return
9357 type to "bool".
9358 * common/common-utils.h (is_regular_file): New prototype.
9359 * common/pathstuff.c (contains_dir_separator): New function.
9360 * common/pathstuff.h (contains_dir_separator): New prototype.
9361 * source.c: Don't include "sys/stat.h".
9362 (is_regular_file): Move to "common/common-utils.c".
9363
9364 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9365
9366 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9367 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9368 * auto-load.c: Include "common/pathstuff.h".
9369 * common/common-def.h (current_directory): Move here.
9370 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9371 function.
9372 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9373 prototype.
9374 * common/pathstuff.c: New file.
9375 * common/pathstuff.h: New file.
9376 * compile/compile.c: Include "common/pathstuff.h".
9377 * defs.h (current_directory): Move to "common/common-defs.h".
9378 * dwarf2read.c: Include "common/pathstuff.h".
9379 * exec.c: Likewise.
9380 * guile/scm-safe-call.c: Likewise.
9381 * linux-thread-db.c: Likewise.
9382 * main.c: Likewise.
9383 * nto-tdep.c: Likewise.
9384 * objfiles.c: Likewise.
9385 * source.c: Likewise.
9386 * symtab.c: Likewise.
9387 * utils.c: Include "common/pathstuff.h".
9388 (gdb_realpath): Move to "common/pathstuff.c".
9389 (gdb_realpath_keepfile): Likewise.
9390 (gdb_abspath): Likewise.
9391 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9392 (gdb_realpath_keepfile): Likewise.
9393 (gdb_abspath): Likewise.
9394
9395 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9396
9397 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9398 wildcard process pid for super_resume for kernels with a
9399 specific bug.
9400
9401 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9402
9403 * compile/compile.c (get_args): Add additional comments
9404 explaining function.
9405
9406 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9407 Tom Tromey <tom@tromey.com>
9408
9409 * target.h (memory_write_request_s): Remove typedef. Don't define
9410 VEC.
9411 (target_write_memory_blocks): Change argument to std::vector.
9412 (struct memory_write_request): Add constructor.
9413 * target-memory.c (compare_block_starting_address): Return bool.
9414 Change argument types.
9415 (claim_memory): Change arguments to use std::vector.
9416 (split_regular_and_flash_blocks, blocks_to_erase)
9417 (compute_garbled_blocks): Likewise.
9418 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9419 (target_write_memory_blocks): Change argument to std::vector.
9420 * symfile.c (struct load_section_data): Add constructor and
9421 destructor. Use std::vector for "requests".
9422 (struct load_progress_data): Add initializers.
9423 (load_section_callback): Update. Use "new".
9424 (clear_memory_write_data): Remove.
9425 (generic_load): Update.
9426
9427 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9428
9429 * arch/aarch64.h: Use common/tdesc.h.
9430
9431 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9432
9433 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9434 architecture with a 64-bit ABI.
9435
9436 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9437
9438 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9439 ahead of target description loading.
9440
9441 2018-02-26 Tom Tromey <tom@tromey.com>
9442
9443 * stack.c (backtrace_command_1): Update.
9444 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9445 of "flags".
9446 * python/py-framefilter.c (py_print_frame)
9447 (gdbpy_apply_frame_filter): Change type of "flags".
9448 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9449 of "flags".
9450 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9451 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9452 * extension.h (enum frame_filter_flag): Rename from
9453 frame_filter_flags.
9454 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9455 (apply_ext_lang_frame_filter): Change type of "flags".
9456 * extension.c (apply_ext_lang_frame_filter): Change type of
9457 "flags".
9458 * extension-priv.h (struct extension_language_ops)
9459 <apply_frame_filter>: Change type of "flags".
9460
9461 2018-02-26 Tom Tromey <tom@tromey.com>
9462
9463 PR python/16497:
9464 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9465 off-by-one in py_end computation.
9466 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9467 PRINT_MORE_FRAMES.
9468 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9469 constant.
9470
9471 2018-02-26 Tom Tromey <tom@tromey.com>
9472
9473 * dwarf2read.c (struct variant_field): New.
9474 (struct nextfield) <variant>: New field.
9475 (dwarf2_add_field): Handle DW_TAG_variant_part.
9476 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9477 discriminated union.
9478 (read_structure_type): Handle DW_TAG_variant_part.
9479 (handle_struct_member_die): New function, extracted from
9480 process_structure_scope. Handle DW_TAG_variant.
9481 (process_structure_scope): Handle discriminated unions. Call
9482 handle_struct_member_die.
9483
9484 2018-02-26 Tom Tromey <tom@tromey.com>
9485
9486 * rust-lang.h (rust_last_path_segment): Declare.
9487 * rust-lang.c (rust_last_path_segment): Now public. Change
9488 contract.
9489 (struct disr_info): Remove.
9490 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9491 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9492 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9493 (rust_enum_p, rust_enum_variant): New function.
9494 (rust_underscore_fields): Remove "offset" parameter.
9495 (rust_print_enum): New function.
9496 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9497 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9498 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9499 enums.
9500 (rust_internal_print_type): New function, from rust_print_type.
9501 Remove enum code.
9502 (rust_print_type): Call rust_internal_print_type.
9503 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9504 Update enum handling.
9505 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9506 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9507 (rust_union_quirks): New functions.
9508 (process_full_comp_unit, process_full_type_unit): Call
9509 rust_union_quirks.
9510 (process_structure_scope): Update rust_unions if necessary.
9511
9512 2018-02-26 Tom Tromey <tom@tromey.com>
9513
9514 * value.h (value_union_variant): Declare.
9515 * valops.c (value_union_variant): New function.
9516 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9517 (struct discriminant_info): New.
9518 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9519 enumerator.
9520 (struct main_type) <flag_discriminated_union>: New field.
9521
9522 2018-02-26 Tom Tromey <tom@tromey.com>
9523
9524 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9525 unittests/unpack-selftests.c.
9526 * unittests/unpack-selftests.c: New file.
9527 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9528
9529 2018-02-26 Yao Qi <yao.qi@linaro.org>
9530
9531 * dwarf2read.c (struct partial_die_info) <read>: New method.
9532 (read_partial_die): Remove the declaration.
9533 (load_partial_dies): Update.
9534 (partial_die_info::partial_die_info):
9535 (read_partial_die): Change it to partial_die_info::read.
9536
9537 2018-02-26 Yao Qi <yao.qi@linaro.org>
9538
9539 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9540 (fixup_partial_die): Remove declaration.
9541 (scan_partial_symbols): Update.
9542 (partial_die_parent_scope): Likewise.
9543 (partial_die_full_name): Likewise.
9544 (fixup_partial_die): Change it to partial_die_info::fixup.
9545
9546 2018-02-26 Yao Qi <yao.qi@linaro.org>
9547
9548 * dwarf2read.c (read_partial_die): Update the declaration.
9549 (load_partial_dies): Caller update.
9550 (read_partial_die): Remove one argument abbrev_len.
9551
9552 2018-02-26 Yao Qi <yao.qi@linaro.org>
9553
9554 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9555 assignment operator.
9556 (load_partial_dies): Use ctor and copy ctor.
9557 (read_partial_die): Update.
9558 (dwarf2_cu::find_partial_die): Use ctor.
9559
9560 2018-02-26 Yao Qi <yao.qi@linaro.org>
9561
9562 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9563 (find_partial_die_in_comp_unit): Change it to
9564 dwarf2_cu::find_partial_die.
9565 (find_partial_die): Update.
9566
9567 2018-02-26 Yao Qi <yao.qi@linaro.org>
9568
9569 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9570 is NULL.
9571
9572 2018-02-26 Yao Qi <yao.qi@linaro.org>
9573
9574 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9575
9576 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9577
9578 * arch/amd64.h: Use common/tdesc.h.
9579 * arch/i386.c: Likewise.
9580 * arch/i386.h: Likewise.
9581 * arch/tic6x.c: Likewise.
9582 * arch/tdesc.h: Move file from here...
9583 * common/tdesc.h: ...to here.
9584 * features/aarch64-core.c: Regenerate.
9585 * features/aarch64-fpu.c: Regenerate.
9586 * features/i386/32bit-avx.c: Regenerate.
9587 * features/i386/32bit-avx512.c: Regenerate.
9588 * features/i386/32bit-core.c: Regenerate.
9589 * features/i386/32bit-linux.c: Regenerate.
9590 * features/i386/32bit-mpx.c: Regenerate.
9591 * features/i386/32bit-pkeys.c: Regenerate.
9592 * features/i386/32bit-sse.c: Regenerate.
9593 * features/i386/64bit-avx.c: Regenerate.
9594 * features/i386/64bit-avx512.c: Regenerate.
9595 * features/i386/64bit-core.c: Regenerate.
9596 * features/i386/64bit-linux.c: Regenerate.
9597 * features/i386/64bit-mpx.c: Regenerate.
9598 * features/i386/64bit-pkeys.c: Regenerate.
9599 * features/i386/64bit-segments.c: Regenerate.
9600 * features/i386/64bit-sse.c: Regenerate.
9601 * features/i386/x32-core.c: Regenerate.
9602 * features/tic6x-c6xp.c: Regenerate.
9603 * features/tic6x-core.c: Regenerate.
9604 * features/tic6x-gp.c: Regenerate.
9605 * target-descriptions.c: Use common/tdesc.h.
9606 * target-descriptions.h: Likewise.
9607
9608 2018-02-24 Tom Tromey <tom@tromey.com>
9609
9610 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9611 (try_thread_db_load_from_dir, thread_db_load_search): Use
9612 std::string.
9613 (info_auto_load_libthread_db_compare): Return bool. Change
9614 argument types.
9615 (info_auto_load_libthread_db): Use std::vector, std::string.
9616 Remove cleanups.
9617
9618 2018-02-24 Tom Tromey <tom@tromey.com>
9619
9620 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9621 std::string.
9622 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9623 std::string*.
9624 * gdbarch.c: Rebuild.
9625 * gdbarch.h: Rebuild.
9626 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9627 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9628 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9629 std::string*.
9630
9631 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9632
9633 * gdbtypes.h (sect_offset): Change type to uint64_t.
9634 (sect_offset_str): New function.
9635 * dwarf2read.c (create_addrmap_from_aranges): Use
9636 sect_offset_str.
9637 (error_check_comp_unit_head): Likewise.
9638 (create_debug_type_hash_table): Likewise.
9639 (read_cutu_die_from_dwo): Likewise.
9640 (init_cutu_and_read_dies): Likewise.
9641 (init_cutu_and_read_dies_no_follow): Likewise.
9642 (process_psymtab_comp_unit_reader): Likewise.
9643 (partial_die_parent_scope): Likewise.
9644 (peek_die_abbrev): Likewise.
9645 (process_queue): Likewise.
9646 (dwarf2_physname): Likewise.
9647 (read_namespace_alias): Likewise.
9648 (read_import_statement): Likewise.
9649 (create_dwo_cu_reader): Likewise.
9650 (create_cus_hash_table): Likewise.
9651 (lookup_dwo_cutu): Likewise.
9652 (inherit_abstract_dies): Likewise.
9653 (read_func_scope): Likewise.
9654 (read_call_site_scope): Likewise.
9655 (dwarf2_add_member_fn): Likewise.
9656 (read_common_block): Likewise.
9657 (read_module_type): Likewise.
9658 (read_typedef): Likewise.
9659 (read_subrange_type): Likewise.
9660 (load_partial_dies): Likewise.
9661 (read_partial_die): Likewise.
9662 (find_partial_die): Likewise.
9663 (read_str_index): Likewise.
9664 (dwarf2_string_attr): Likewise.
9665 (build_error_marker_type): Likewise.
9666 (lookup_die_type): Likewise.
9667 (dump_die_shallow): Likewise.
9668 (follow_die_ref): Likewise.
9669 (dwarf2_fetch_die_loc_sect_off): Likewise.
9670 (dwarf2_fetch_constant_bytes): Likewise.
9671 (follow_die_sig): Likewise.
9672 (get_signatured_type): Likewise.
9673 (get_DW_AT_signature_type): Likewise.
9674 (dwarf2_find_containing_comp_unit): Likewise.
9675 (set_die_type): Likewise.
9676
9677 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9678
9679 * arch/aarch64.c: Include "common-defs.h".
9680 * arch/amd64.c: Likewise.
9681 * arch/i386.c: Likewise.
9682
9683 2018-02-21 Tom Tromey <tom@tromey.com>
9684
9685 * value.h: (extract_field_op): Update.
9686 * eval.c (extract_field_op): Return a const char *.
9687 * expression.h (parse_expression_for_completion): Update.
9688 * completer.c (complete_expression): Update.
9689 (add_struct_fields): Make fieldname const.
9690 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9691 (mark_completion_tag, parse_exp_in_context_1): Update.
9692 (parse_expression_for_completion): Change "name" to
9693 unique_xmalloc_ptr*.
9694
9695 2018-02-21 Tom Tromey <tom@tromey.com>
9696
9697 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9698
9699 2018-02-21 Yao Qi <yao.qi@linaro.org>
9700
9701 * avr-tdep.c (avr_read_pc): Change parameter type to
9702 readable_regcache.
9703 * gdbarch.sh (read_pc): Likewise.
9704 * gdbarch.c: Re-generated.
9705 * gdbarch.h: Re-generated.
9706 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9707 readable_regcache.
9708 * ia64-tdep.c (ia64_read_pc): Likewise.
9709 * mips-tdep.c (mips_read_pc): Likewise.
9710 * spu-tdep.c (spu_read_pc): Likewise.
9711
9712 2018-02-21 Yao Qi <yao.qi@linaro.org>
9713
9714 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9715 * regcache-dump.c: New file.
9716 * regcache.c: Move register_dump to regcache-dump.c.
9717 (maintenance_print_registers): Likewise.
9718 (maintenance_print_raw_registers): Likewise.
9719 (maintenance_print_cooked_registers): Likewise.
9720 (maintenance_print_register_groups): Likewise.
9721 (maintenance_print_remote_registers): Likewise.
9722 (_initialize_regcache): Likewise.
9723 * regcache.h (register_dump): Moved from regcache.c.
9724
9725 2018-02-21 Yao Qi <yao.qi@linaro.org>
9726
9727 * regcache.c (regcache::regcache): Update.
9728 (regcache::invalidate): Move it to detached_regcache::invalidate.
9729 (get_thread_arch_aspace_regcache): Update.
9730 (regcache::raw_update): Update.
9731 (regcache::cooked_read): Remove some code.
9732 (regcache::cooked_read_value): Likewise.
9733 (regcache::raw_write): Remove assert on m_readonly_p.
9734 (regcache::raw_supply_integer): Move it to
9735 detached_regcache::raw_supply_integer.
9736 (regcache::raw_supply_zeroed): Likewise.
9737 * regcache.h (detached_regcache) <raw_supply_integer>: New
9738 declaration.
9739 <raw_supply_zeroed, invalidate>: Likewise.
9740 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9741 <invalidate>: Likewise.
9742 <m_readonly_p>: Removed.
9743
9744 2018-02-21 Yao Qi <yao.qi@linaro.org>
9745
9746 * infcmd.c (get_return_value): Let stop_regs point to
9747 get_current_regcache.
9748 * regcache.c (regcache::regcache): Remove.
9749 (register_dump_reg_buffer): New class.
9750 (regcache_print): Adjust.
9751 * regcache.h (regcache): Remove constructors.
9752
9753 2018-02-21 Yao Qi <yao.qi@linaro.org>
9754
9755 * regcache.c (class register_dump): New class.
9756 (register_dump_regcache, register_dump_none): New class.
9757 (register_dump_remote, register_dump_groups): New class.
9758 (regcache_print): Update.
9759 * regcache.h (regcache_dump_what): Move it to regcache.c.
9760 (regcache) <dump>: Remove.
9761
9762 2018-02-21 Yao Qi <yao.qi@linaro.org>
9763
9764 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9765 reg_buffer_rw *.
9766 (jit_unwind_reg_set_impl): Call raw_supply.
9767 (jit_frame_sniffer): Use reg_buffer_rw.
9768 * record-full.c (record_full_core_regbuf): Change its type.
9769 (record_full_core_open_1): Use reg_buffer_rw.
9770 (record_full_close): Likewise.
9771 (record_full_core_fetch_registers): Use regcache->raw_supply.
9772 (record_full_core_store_registers): Likewise.
9773 * regcache.c (regcache::get_register_status): Move it to
9774 reg_buffer.
9775 (regcache_raw_set_cached_value): Remove.
9776 (regcache::raw_set_cached_value): Remove.
9777 (regcache::raw_write): Call raw_supply.
9778 (regcache::raw_supply): Move it to reg_buffer_rw.
9779 * regcache.h (regcache_raw_set_cached_value): Remove.
9780 (reg_buffer_rw): New class.
9781
9782 2018-02-21 Yao Qi <yao.qi@linaro.org>
9783
9784 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9785 readonly_detached_regcache.
9786 (dummy_frame_prev_register): Use regcache->cooked_read.
9787 * frame.c (frame_save_as_regcache): Change return type.
9788 (frame_pop): Update.
9789 * frame.h (frame_save_as_regcache): Update declaration.
9790 * inferior.h (get_infcall_suspend_state_regcache): Update
9791 declaration.
9792 * infrun.c (infcall_suspend_state) <registers>: use
9793 readonly_detached_regcache.
9794 (save_infcall_suspend_state): Don't use regcache_dup.
9795 (get_infcall_suspend_state_regcache): Change return type.
9796 * linux-fork.c (struct fork_info) <savedregs>: Change to
9797 readonly_detached_regcache.
9798 <pc>: New field.
9799 (fork_save_infrun_state): Don't use regcache_dup.
9800 (info_checkpoints_command): Adjust.
9801 * mi/mi-main.c (register_changed_p): Update declaration.
9802 (mi_cmd_data_list_changed_registers): Use
9803 readonly_detached_regcache.
9804 (register_changed_p): Change parameter type to
9805 readonly_detached_regcache.
9806 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9807 readonly_detached_regcache.
9808 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9809 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9810 New.
9811 (regcache::save): Move it to reg_buffer.
9812 (regcache::restore): Change parameter type.
9813 (regcache_dup): Remove.
9814 * regcache.h (reg_buffer) <save>: New method.
9815 (readonly_detached_regcache): New class.
9816 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9817 readonly_detached_regcache.
9818 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9819
9820 2018-02-21 Yao Qi <yao.qi@linaro.org>
9821
9822 * frame.c (frame_save_as_regcache): Use regcache method save.
9823 (frame_pop): Use regcache method restore.
9824 * infrun.c (restore_infcall_suspend_state): Likewise.
9825 * linux-fork.c (fork_load_infrun_state): Likewise.
9826 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9827 save.
9828 * regcache.c (regcache_save): Remove.
9829 (regcache::restore): More asserts.
9830 (regcache_cpy): Remove.
9831 * regcache.h (regcache_save): Remove the declaration.
9832 (regcache::restore): Move from private to public.
9833 Remove the friend declaration of regcache_cpy.
9834 (regcache_cpy): Remove declaration.
9835
9836 2018-02-21 Yao Qi <yao.qi@linaro.org>
9837
9838 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9839 parameter type to 'readable_regcache *'.
9840 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9841 * arm-tdep.c (arm_neon_quad_read): Likewise.
9842 (arm_pseudo_read): Likewise.
9843 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9844 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9845 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9846 * gdbarch.c: Re-generated.
9847 * gdbarch.h: Re-generated.
9848 * gdbarch.sh (pseudo_register_read): Change parameter type to
9849 'readable_regcache *'.
9850 (pseudo_register_read_value): Likewise.
9851 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9852 (h8300_pseudo_register_read): Likewise.
9853 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9854 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9855 (i386_pseudo_register_read_into_value): Likewise.
9856 (i386_pseudo_register_read_value): Likewise.
9857 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9858 declaration.
9859 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9860 * m32c-tdep.c (m32c_raw_read): Likewise.
9861 (m32c_read_flg): Likewise.
9862 (m32c_banked_register): Likewise.
9863 (m32c_banked_read): Likewise.
9864 (m32c_sb_read): Likewise.
9865 (m32c_part_read): Likewise.
9866 (m32c_cat_read): Likewise.
9867 (m32c_r3r2r1r0_read): Likewise.
9868 (m32c_pseudo_register_read): Likewise.
9869 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9870 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9871 (mep_pseudo_cr64_read): Likewise.
9872 (mep_pseudo_register_read): Likewise.
9873 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9874 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9875 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9876 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9877 (regcache::cooked_read): Likewise.
9878 (regcache::cooked_read_value): Likewise.
9879 (regcache_cooked_read_signed):
9880 (regcache::cooked_read): Likewise.
9881 * regcache.h (readable_regcache): New class.
9882 (regcache): Inherit readable_regcache. Move some methods to
9883 readable_regcache.
9884 * rl78-tdep.c (rl78_pseudo_register_read): Change
9885 parameter type to 'readable_regcache *'.
9886 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9887 (e500_pseudo_register_read): Change parameter type to
9888 'readable_regcache *'.
9889 (dfp_pseudo_register_read): Likewise.
9890 (vsx_pseudo_register_read): Likewise.
9891 (efpr_pseudo_register_read): Likewise.
9892 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9893 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9894 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9895 (sh64_pseudo_register_read): Likewise.
9896 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9897 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9898 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9899 (spu_pseudo_register_read): Likewise.
9900 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9901 (xtensa_pseudo_register_read): Likewise.
9902
9903 2018-02-21 Yao Qi <yao.qi@linaro.org>
9904
9905 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9906 (regcache::arch): Move it to reg_buffer::arch.
9907 (regcache::register_buffer): Likewise.
9908 (regcache::assert_regnum): Likewise.
9909 (regcache::num_raw_registers): Likewise.
9910 * regcache.h (reg_buffer): New class.
9911 (regcache): Inherit reg_buffer.
9912
9913 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9914
9915 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9916 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9917
9918 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9919
9920 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9921
9922 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9923
9924 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9925 (SFILES): Remove common/*.c files.
9926 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9927 * common/common.host: Add common reference.
9928 * configure.ac: Likewise.
9929 * configure: Regenerate.
9930
9931 2018-02-16 Yao Qi <yao.qi@linaro.org>
9932
9933 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9934 (block_initialize_namespace): Use new.
9935 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9936 (dwarf2_free_objfile): Use delete.
9937 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9938 (copy_type_recursive): Use new.
9939 * gdb_obstack.h (allocate_on_obstack): New.
9940
9941 2018-02-15 Yao Qi <yao.qi@linaro.org>
9942
9943 PR gdb/22849
9944 * inferior.c (exit_inferior_1): Reset inf->control.
9945
9946 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9947
9948 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9949 declaration.
9950
9951 2018-02-14 Pedro Alves <palves@redhat.com>
9952
9953 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9954 frame_cleanup_after_sniffer on exception.
9955
9956 2018-02-14 Tom Tromey <tom@tromey.com>
9957
9958 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9959 const.
9960 (solib_bfd_open): Make pathname const.
9961 * solib.c (solib_bfd_open): Make pathname const.
9962 * solib-spu.c (spu_bfd_fopen): Make name const.
9963 (spu_bfd_open): Make pathname const.
9964 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9965 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9966
9967 2018-02-14 Tom Tromey <tom@tromey.com>
9968
9969 * symfile.c (symfile_bfd_open): Update.
9970 * source.h (openp, source_full_path_of, find_and_open_source):
9971 Change argument type to unique_xmalloc_ptr.
9972 * source.c (openp): Take a unique_xmalloc_ptr.
9973 (source_full_path_of, find_and_open_source): Likewise.
9974 (open_source_file, symtab_to_fullname): Update.
9975 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9976 unique_xmalloc_ptr.
9977 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9978 (exec_file_find): Update.
9979 * psymtab.c (psymtab_to_fullname): Update.
9980 * nto-tdep.h (nto_find_and_open_solib): Update.
9981 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9982 unique_xmalloc_ptr.
9983 * exec.c (exec_file_attach): Update.
9984 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9985 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9986
9987 2018-02-14 Tom Tromey <tom@tromey.com>
9988
9989 * solib.c: Include source.h.
9990 * nto-tdep.c: Include source.h.
9991 * mi/mi-cmd-env.c: Include source.h.
9992 * infcmd.c: Include source.h.
9993 * exec.c: Include source.h.
9994 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9995 (add_path, directory_switch, source_path, init_source_path): Move
9996 declarations...
9997 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9998 (add_path, directory_switch, source_path, init_source_path):
9999 ...here.
10000
10001 2018-02-14 Tom Tromey <tom@tromey.com>
10002
10003 * solist.h (exec_file_find, solib_find): Return
10004 unique_xmalloc_ptr.
10005 (solib_bfd_fopen): Take a const char *.
10006 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10007 (exec_file_find, solib_find): Likewise.
10008 (solib_bfd_fopen): Do not take ownership of "pathname".
10009 (solib_bfd_open): Use unique_xmalloc_ptr.
10010 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10011 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10012 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10013 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10014
10015 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10016
10017 * ada-lang.c (name_match_type_from_name): Remove reference to
10018 ada_name_for_lookup in function's documentation.
10019 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10020
10021 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10022
10023 * defs.h (enum openp_flags): New enum.
10024 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10025 Move to enum openp_flags.
10026 (openp_flags): New enum flags.
10027 (openp): Change parameter type to openp_flags.
10028 * source.c (openp): Change parameter type to openp_flags.
10029 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10030 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10031
10032 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10033
10034 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10035 per-command.
10036
10037 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10038
10039 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10040 into...
10041 (class dwarf2_queue_guard): ...the destructor of this new class.
10042 (dw2_do_instantiate_symtab): Create instance of the new class
10043 dwarf2_queue_guard, remove cleanup.
10044
10045 2018-02-09 Tom Tromey <tom@tromey.com>
10046
10047 * source.c (find_source_lines): Don't reference past the end of
10048 the vector.
10049
10050 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10051
10052 * remote.c (remote_btrace_maybe_reopen): Change error message.
10053 * btrace.c (btrace_enable): Likewise.
10054 (parse_xml_btrace): Likewise.
10055 (parse_xml_btrace_conf): Likewise.
10056
10057 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10058
10059 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10060 (linux_enable_pt, linux_enable_bts): Call
10061 diagnose_perf_event_open_fail.
10062
10063 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10064
10065 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10066 Remove parameter and change return type. Update callers. Move it.
10067 (linux_enable_bts, linux_enable_pt): Improve error message.
10068 (linux_enable_pt): Remove zero buffer size check.
10069 (linux_enable_btrace): Improve error messages. Remove NULL return
10070 check.
10071
10072 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10073
10074 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10075 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10076 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10077 (linux_supports_pt, linux_supports_btrace): Remove.
10078 (linux_enable_bts): Call cpu_supports_bts.
10079 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10080 * remote.c (remote_supports_btrace): Remove.
10081 (init_remote_ops): Remove remote_supports_btrace.
10082 * target-delegates.c: Regenerated.
10083 * target.c (target_supports_btrace): Remove.
10084 * target.h (target_ops) <to_supports_btrace>: Remove
10085 (target_supports_btrace): Remove.
10086 * x86-linux-nat.c (x86_linux_create_target): Remove
10087 linux_supports_btrace.
10088
10089 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10090
10091 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10092 btrace failed.
10093 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10094 exception and use message in own exception.
10095
10096 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10097
10098 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10099 (perf_event_pt_event_type): Use gdb_file_up.
10100 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10101 scoped_fd, and scoped_mmap.
10102
10103 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10104
10105 * common/scoped_mmap.h: New.
10106 * unittests/scoped_mmap-selftest.c: New.
10107 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10108 unittests/scoped_mmap-selftest.c.
10109
10110 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10111
10112 * common/scoped_fd.h: New.
10113 * unittests/scoped_fd-selftest.c: New.
10114 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10115 unittests/scoped_fd-selftest.c.
10116
10117 2018-02-09 Tom Tromey <tom@tromey.com>
10118
10119 * auto-load.c (auto_load_section_scripts): Use
10120 gdb::unique_xmalloc_ptr.
10121
10122 2018-02-09 Tom Tromey <tom@tromey.com>
10123
10124 * auto-load.c (execute_script_contents): Use std::string.
10125
10126 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10127
10128 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10129 Python function, rather than a new command.
10130
10131 2018-02-08 Tom Tromey <tom@tromey.com>
10132
10133 * solib.c (solib_find_1): Use std::string.
10134 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10135
10136 2018-02-08 Tom Tromey <tom@tromey.com>
10137
10138 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10139
10140 2018-02-08 Tom Tromey <tom@tromey.com>
10141
10142 * source.c (find_source_lines): Use gdb::def_vector.
10143
10144 2018-02-08 Tom Tromey <tom@tromey.com>
10145
10146 * macrocmd.c (struct temporary_macro_definition): New.
10147 (macro_define_command): Use temporary_macro_definition. Remove
10148 cleanups.
10149 (free_macro_definition_ptr): Remove.
10150
10151 2018-02-08 Tom Tromey <tom@tromey.com>
10152
10153 * macroexp.c (maybe_expand): Use std::string.
10154
10155 2018-02-08 Tom Tromey <tom@tromey.com>
10156
10157 * macroexp.c (struct macro_buffer): Add initializers for some
10158 members.
10159 (init_buffer, init_shared_buffer, free_buffer)
10160 (free_buffer_return_text): Remove.
10161 (macro_buffer): New constructors.
10162 (~macro_buffer): New destructor.
10163 (macro_buffer::set_shared): New method.
10164 (macro_buffer::resize_buffer, macro_buffer::appendc)
10165 (macro_buffer::appendmem): Now methods, not free functions.
10166 (set_token, append_tokens_without_splicing, stringify)
10167 (macro_stringify): Update.
10168 (gather_arguments): Change return type. Remove argc_p argument,
10169 add args_ptr argument. Use std::vector.
10170 (substitute_args): Remove argc argument. Accept std::vector.
10171 (expand): Update. Use std::vector.
10172 (scan, macro_expand, macro_expand_next): Update.
10173
10174 2018-02-08 Tom Tromey <tom@tromey.com>
10175
10176 * symtab.c (default_collect_symbol_completion_matches_break_on):
10177 Use unique_xmalloc_ptr.
10178 * macroscope.h: (sal_macro_scope, user_macro_scope)
10179 (default_macro_scope): Return unique_xmalloc_ptr.
10180 * macroscope.c (sal_macro_scope, user_macro_scope)
10181 (default_macro_scope): Return unique_xmalloc_ptr.
10182 * macroexp.h (macro_expand, macro_expand_once): Return
10183 unique_xmalloc_ptr.
10184 * macroexp.c (macro_expand, macro_expand_once): Return
10185 unique_xmalloc_ptr.
10186 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10187 (info_macro_command, info_macros_command): Use
10188 unique_xmalloc_ptr.
10189 * compile/compile-c-support.c (write_macro_definitions): Use
10190 unique_xmalloc_ptr.
10191 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10192
10193 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10194
10195 * value.c (value_static_field): Assign field type instead of
10196 containing type when returning an optimized out value.
10197
10198 2018-02-06 Yao Qi <yao.qi@linaro.org>
10199
10200 * ft32-tdep.c (ft32_read_pc): Remove.
10201 (ft32_write_pc): Remove.
10202 (ft32_gdbarch_init): Update.
10203 * m32r-tdep.c (m32r_read_pc): Remove.
10204 (m32r_gdbarch_init): Update.
10205 * mep-tdep.c (mep_read_pc): Remove.
10206 (mep_gdbarch_init): Update.
10207 * microblaze-tdep.c (microblaze_write_pc): Remove.
10208 (microblaze_gdbarch_init): Update.
10209 * mn10300-tdep.c (mn10300_read_pc): Remove.
10210 (mn10300_write_pc): Remove.
10211 (mn10300_gdbarch_init): Update.
10212 * moxie-tdep.c (moxie_read_pc): Remove.
10213 (moxie_write_pc): Remove.
10214 (moxie_gdbarch_init): Update.
10215
10216 2018-02-06 Yao Qi <yao.qi@linaro.org>
10217
10218 * expprint.c (print_subexp_standard): Handle
10219 OP_F77_UNDETERMINED_ARGLIST.
10220 (dump_subexp_body_standard): Likewise.
10221
10222 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10223
10224 * target-descriptions.c (tdesc_element_visitor) Add empty
10225 implementations.
10226 (tdesc_type): Move make_gdb_type from here.
10227 (tdesc_type_builtin): Likewise.
10228 (tdesc_type_vector): Likewise.
10229 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10230 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10231 (make_gdb_type_union): Likewise.
10232 (make_gdb_type_flags): Likewise.
10233 (make_gdb_type_enum): Likewise.
10234 (make_gdb_type): New function.
10235 (tdesc_register_type): Use static make_gdb_type.
10236
10237 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10238
10239 * infcmd.c (default_print_one_register_info): Align natural-format
10240 column values consistently one under another.
10241 (pad_to_column): New function.
10242
10243 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10244
10245 * dwarf2read.c (dwarf2_physname): Move commment.
10246
10247 2018-02-01 Leszek Swirski <leszeks@google.com>
10248
10249 * varobj.c (varobj_formatted_print_options): Allow recursive
10250 pretty printing if pretty printing is enabled.
10251
10252 2018-02-01 Leszek Swirski <leszeks@google.com>
10253
10254 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10255 names after a structop as a filename.
10256
10257 2018-02-01 Yao Qi <yao.qi@linaro.org>
10258
10259 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10260 (arm_record_coproc_data_proc): Likewise.
10261
10262 2018-02-01 Yao Qi <yao.qi@linaro.org>
10263
10264 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10265
10266 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10267
10268 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10269 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10270
10271 2018-01-31 Pedro Alves <palves@redhat.com>
10272
10273 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10274 * inflow.c (child_terminal_save_inferior): Wrap reference to
10275 tcgetpgrp in HAVE_TERMIOS_H.
10276 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10277 _WIN32.
10278 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10279 always iterate over all inferiors.
10280 (gdbsim_cntrl_c): Adjust.
10281 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10282
10283 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10284
10285 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10286 index type is objfile-owned if the element type is as well.
10287
10288 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10289
10290 GDB 8.1 released.
10291
10292 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10293
10294 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10295 "features/s390x-linux64.c".
10296 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10297 s390_linux32 and s390x_linux64.
10298 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10299 default tdesc.
10300 * s390-tdep.c: Include "features/s390-linux32.c" and
10301 "features/s390x-linux64.c".
10302 (s390_tdesc_valid): Add check for tdesc_has_registers.
10303 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10304 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10305 tdesc_s390x_linux64.
10306 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10307 tdesc_s390x_linux64 to...
10308 * s390-tdep.h: ...here.
10309
10310 2018-01-30 Pedro Alves <palves@redhat.com>
10311
10312 PR gdb/13211
10313 * config.in, configure: Regenerate.
10314 * configure.ac: Check for getpgid.
10315 * go32-nat.c (go32_pass_ctrlc): New.
10316 (go32_target): Install it.
10317 * inf-child.c (inf_child_target): Install
10318 child_terminal_save_inferior, child_pass_ctrlc and
10319 child_interrupt.
10320 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10321 (inf_ptrace_target): No longer install it.
10322 * infcmd.c (interrupt_target_1): Adjust.
10323 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10324 (child_interrupt): Declare.
10325 (inferior::terminal_state): New.
10326 * inflow.c (struct terminal_info): Update comments.
10327 (inferior_process_group): Delete.
10328 (terminal_is_ours): Delete.
10329 (gdb_tty_state): New.
10330 (child_terminal_init): Adjust.
10331 (is_gdb_terminal, sharing_input_terminal_1)
10332 (sharing_input_terminal): New functions.
10333 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10334 Set the process's actual process group in the foreground if
10335 possible. Handle is_ours_for_output/is_ours distinction. Don't
10336 mark terminal as the inferior's if not sharing GDB's terminal.
10337 Don't check attach_flag.
10338 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10339 pass down a target_terminal_state.
10340 (child_terminal_save_inferior): New, factored out from ...
10341 (child_terminal_ours_1): ... this. Handle
10342 target_terminal_state::is_ours_for_output.
10343 (child_interrupt, child_pass_ctrlc): New.
10344 (inflow_inferior_exit): Clear the inferior's terminal_state.
10345 (copy_terminal_info): Copy the inferior's terminal state.
10346 (_initialize_inflow): Remove reference to terminal_is_ours.
10347 * inflow.h (inferior_process_group): Delete.
10348 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10349 * procfs.c (procfs_target): Don't install procfs_interrupt.
10350 (procfs_interrupt): Delete.
10351 * remote.c (remote_serial_quit_handler): Adjust.
10352 (remote_interrupt): Remove ptid parameter. Adjust.
10353 * target-delegates.c: Regenerate.
10354 * target.c: Include "terminal.h".
10355 (target_terminal::terminal_state): Rename to ...
10356 (target_terminal::m_terminal_state): ... this.
10357 (target_terminal::init): Adjust.
10358 (target_terminal::inferior): Adjust to per-inferior
10359 terminal_state.
10360 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10361 (target_terminal::ours, target_terminal::ours_for_output): Use
10362 target_terminal_is_ours_kind.
10363 (target_interrupt): Remove ptid parameter. Adjust.
10364 (default_target_pass_ctrlc): Adjust.
10365 * target.h (target_ops::to_terminal_save_inferior): New field.
10366 (target_ops::to_interrupt): Remove ptid_t parameter.
10367 (target_interrupt): Remove ptid_t parameter. Update comment.
10368 (target_pass_ctrlc): Update comment.
10369 * target/target.h (target_terminal_state): New scoped enum,
10370 factored out of ...
10371 (target_terminal::terminal_state): ... here.
10372 (target_terminal::inferior): Update comments.
10373 (target_terminal::restore_inferior): New.
10374 (target_terminal::is_inferior, target_terminal::is_ours)
10375 (target_terminal::is_ours_for_output): Adjust.
10376 (target_terminal::scoped_restore_terminal_state): Adjust to
10377 rename, and call restore_inferior() instead of inferior().
10378 (target_terminal::scoped_restore_terminal_state::m_state): Change
10379 type.
10380 (target_terminal::terminal_state): Rename to ...
10381 (target_terminal::m_terminal_state): ... this and change type.
10382
10383 2018-01-30 Pedro Alves <palves@redhat.com>
10384
10385 * linux-nat.c (wait_for_signal): New function.
10386 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10387 directly.
10388 (async_terminal_is_ours)
10389 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10390 (linux_nat_add_target): Don't override
10391 to_terminal_inferior/to_terminal_ours.
10392
10393 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10394
10395 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10396
10397 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10398
10399 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10400 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10401 dwarf2_per_objfile_free here.
10402 (dwarf2_per_objfile_free): Remove.
10403 (_initialize_dwarf2_read): Don't register
10404 dwarf2_per_objfile_free as a registry cleanup.
10405
10406 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10407
10408 Avoid compilation errors in MinGW native builds
10409
10410 The error is triggered by including python-internal.h, and the
10411 error message is:
10412
10413 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10414 from build-gnulib/import/math.h:27,
10415 from d:/usr/Python26/include/pyport.h:235,
10416 from d:/usr/Python26/include/Python.h:58,
10417 from python/python-internal.h:94,
10418 from python/py-arch.c:24:
10419 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10420 using ::hypot;
10421 ^~~~~
10422
10423 This happens because Python headers define 'hypot' to expand t
10424 '_hypot' in the Windows builds.
10425 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10426 'hypoth'. This avoids a compilation error.
10427
10428 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10429
10430 * MAINTAINERS (Write After Approval): Fix ordering.
10431
10432 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10433
10434 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10435
10436 2018-01-26 Alan Modra <amodra@gmail.com>
10437
10438 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10439 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10440 Remove nop. Make const. Comment.
10441 (powerpc32_plt_stub_so_2): New.
10442 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10443 Correct count. Update uses.
10444 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10445 Move common code reading PLT entry word. Correct
10446 powerpc32_plt_stub PLT address calculation.
10447 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10448 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10449 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10450 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10451 (ppc64_standard_linkage8): Likewise.
10452 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10453 Correct insns description.
10454 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10455
10456 2018-01-24 Pedro Alves <palves@redhat.com>
10457
10458 GCC PR libstdc++/83906
10459 * gdbtypes.c (operator==(const dynamic_prop &,
10460 const dynamic_prop &)): New.
10461 (operator==(const range_bounds &, const range_bounds &)): New.
10462 (check_types_equal): Use them instead of memcmp.
10463 * gdbtypes.h (operator==(const dynamic_prop &,
10464 const dynamic_prop &)): Declare.
10465 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10466 (operator==(const range_bounds &, const range_bounds &)): Declare.
10467 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10468
10469 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10470
10471 * s390-linux-tdep.c (s390_record_address_mask)
10472 (s390_record_calc_disp_common, s390_record_calc_disp)
10473 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10474 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10475 (s390_process_record): Move to s390-tdep.c.
10476 (s390_linux_init_abi_any): Adjust.
10477 * s390-tdep.c (s390_record_address_mask)
10478 (s390_record_calc_disp_common, s390_record_calc_disp)
10479 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10480 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10481 (s390_process_record): Moved from s390-linux-tdep.c
10482 (s390_gdbarch_init): Adjust.
10483
10484 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10485
10486 * s390-linux-nat.c (s390-tdep.h): New include.
10487 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10488 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10489 (ALLDEPFILES): Add s390-tdep.c.
10490 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10491 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10492 * s390-tdep.h: ...this. New file.
10493 * s390-linux-tdep.c (s390-tdep.h): New include.
10494 (_initialize_s390_tdep): Rename to...
10495 (_initialize_s390_linux_tdep): ...this and adjust.
10496 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10497 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10498 s390-tdep.h.
10499 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10500 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10501 (s390_is_partial_instruction, s390_software_single_step)
10502 (is_non_branch_ril, s390_displaced_step_copy_insn)
10503 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10504 (s390_prologue_data, s390_addr, s390_store, s390_load)
10505 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10506 (s390_register_call_saved, s390_guess_tracepoint_registers)
10507 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10508 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10509 (s390_pseudo_register_name, s390_pseudo_register_type)
10510 (s390_pseudo_register_read, s390_pseudo_register_write)
10511 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10512 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10513 (s390_addr_bits_remove, s390_address_class_type_flags)
10514 (s390_address_class_type_flags_to_name)
10515 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10516 (s390_function_arg_float, s390_function_arg_vector)
10517 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10518 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10519 (s390_frame_align, s390_register_return_value, s390_return_value)
10520 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10521 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10522 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10523 (s390_trad_frame_prev_register, s390_unwind_cache)
10524 (s390_prologue_frame_unwind_cache)
10525 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10526 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10527 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10528 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10529 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10530 (s390_frame_base_address, s390_local_base_address)
10531 (s390_frame_base, s390_gcc_target_options)
10532 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10533 (s390_validate_reg_range, s390_tdesc_valid)
10534 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10535 * s390-tdep.c: ...this. New file.
10536
10537 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10538
10539 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10540 (s390_process_record, s390_gdbarch_tdep_alloc)
10541 (s390_linux_init_abi_any): Use/set new hook.
10542
10543 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10544
10545 * s390-linux-tdep.c (osabi.h): New include.
10546 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10547 (s390_linux_init_abi_any): New functions.
10548 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10549
10550 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10551
10552 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10553 tdesc_has_registers check
10554
10555 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10556
10557 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10558 (s390_validate_reg_range): New macro.
10559 (s390_gdbarch_init): Adjust.
10560
10561 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10562
10563 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10564 (s390_gdbarch_tdep_alloc): Adjust.
10565 (s390_gdbarch_init): Adjust.
10566
10567 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10568
10569 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10570 <have_tdb>: Change type to bool.
10571 (s390_gdbarch_tdep_alloc): Adjust.
10572 (s390_gdbarch_init): Adjust.
10573
10574 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10575
10576 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10577 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10578 (s390_gdbarch_tdep_alloc): New function.
10579 (s390_gdbarch_init): Allocate tdep at start and use its fields
10580 instead of separate variables.
10581
10582 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10583
10584 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10585 when looking for cached gdbarch and add comment for remaining.
10586
10587 2018-01-22 Pedro Alves <palves@redhat.com>
10588 Sergio Durigan Junior <sergiodj@redhat.com>
10589
10590 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10591 case.
10592
10593 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10594
10595 * MAINTAINERS: Update my company e-mail address.
10596
10597 2018-01-22 Yao Qi <yao.qi@linaro.org>
10598
10599 * regcache.c (cooked_write_test): New function.
10600 (_initialize_regcache): Register the test.
10601
10602 2018-01-22 Yao Qi <yao.qi@linaro.org>
10603
10604 * ia64-tdep.c (ia64_pseudo_register_read): Call
10605 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10606 * m32c-tdep.c (m32c_cat_read): Likewise.
10607 (m32c_r3r2r1r0_read): Likewise.
10608 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10609 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10610
10611 2018-01-22 Yao Qi <yao.qi@linaro.org>
10612
10613 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10614 method raw_read instead of regcache_raw_read.
10615 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10616 * arm-tdep.c (arm_neon_quad_read): Likewise.
10617 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10618 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10619 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10620 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10621 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10622 (i386_pseudo_register_read_into_value): Likewise.
10623 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10624 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10625 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10626 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10627 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10628 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10629 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10630 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10631 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10632
10633 2018-01-22 Yao Qi <yao.qi@linaro.org>
10634
10635 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10636 * configure.tgt: Remove target mt.
10637 * mt-tdep.c: Remove.
10638 * regcache.c (cooked_read_test): Remove the check for mt.
10639
10640 2018-01-22 Yao Qi <yao.qi@linaro.org>
10641
10642 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10643 instead of gdbarch_pseudo_register_read_value.
10644
10645 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10646
10647 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10648 language is Ada.
10649
10650 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10651
10652 * linespec.c (create_sals_line_offset): Remove code that preserved
10653 the symtab_and_line's line number.
10654
10655 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10656
10657 * varobj.c (varobj_create): Don't set valid_block when creating a
10658 floating varobj.
10659
10660 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10661
10662 * varobj.c (varobj_create): Remove out of date comment.
10663
10664 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10665
10666 PR mi/20395
10667 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10668 updating innermost block.
10669 * parse.c (innermost_block_tracker::update): Take extra type
10670 parameter, and check types match before updating innermost block.
10671 (write_dollar_variable): Update innermost block for registers.
10672 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10673 (innermost_block_tracker::innermost_block_tracker): Initialise
10674 m_types member.
10675 (innermost_block_tracker::reset): Take type parameter.
10676 (innermost_block_tracker::update): Take type parameter, and pass
10677 type through as needed.
10678 (innermost_block_tracker::m_types): New member.
10679 * varobj.c (varobj_create): Pass type when reseting innermost
10680 block.
10681
10682 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10683
10684 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10685 * ada-lang.c (resolve_subexp): Likewise.
10686 * breakpoint.c (set_breakpoint_condition) Likewise.
10687 (watch_command_1) Likewise.
10688 * c-exp.y (variable): Likewise.
10689 * d-exp.y (PrimaryExpression): Likewise.
10690 * f-exp.y (variable): Likewise.
10691 * go-exp.y (variable): Likewise.
10692 * m2-exp.y (variable): Likewise.
10693 * objfiles.c (objfile::~objfile): Likewise.
10694 * p-exp.y (variable): Likewise.
10695 * parse.c (innermost_block): Change type.
10696 * parser-defs.h (class innermost_block_tracker): New.
10697 (innermost_block): Change to innermost_block_tracker.
10698 * printcmd.c (display_command): Switch to innermost_block API.
10699 (do_one_display): Likewise.
10700 * rust-exp.y (do_one_display): Likewise.
10701 * symfile.c (clear_symtab_users): Likewise.
10702 * varobj.c (varobj_create): Switch to innermost_block API, replace
10703 use of innermost_block with block stored on varobj object.
10704
10705 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10706
10707 * expression.h (innermost_block): Remove declaration.
10708 * varobj.c: Add 'parser-defs.h' include.
10709
10710 2018-01-19 Tom Tromey <tom@tromey.com>
10711
10712 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10713 symbols in the static and global blocks.
10714
10715 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10716
10717 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10718 gdb_ptrace.h, and move including gdb_wait.h ...
10719 * nat/linux-ptrace.h: ... to here.
10720
10721 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10722
10723 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10724 inf_ptrace_detach_success.
10725 (inf_ptrace_detach_success): Add inferior parameter, use it
10726 instead of inferior_ptid, pass it to detach_inferior.
10727 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10728 parameter.
10729 * inferior.c (detach_inferior): Add overload that takes an
10730 inferior object.
10731 * inferior.h (detach_inferior): Likewise.
10732 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10733 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10734 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10735
10736 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10737
10738 * target.h (struct target_ops) <to_detach>: Add inferior
10739 parameter.
10740 (target_detach): Likewise.
10741 * target.c (dispose_inferior): Pass inferior down.
10742 (target_detach): Pass inferior down. Assert that it is equal to
10743 the current inferior.
10744 * aix-thread.c (aix_thread_detach): Pass inferior down.
10745 * corefile.c (core_file_command): Pass current_inferior() down.
10746 * corelow.c (core_detach): Add inferior parameter.
10747 * darwin-nat.c (darwin_detach): Likewise.
10748 * gnu-nat.c (gnu_detach): Likewise.
10749 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10750 * infcmd.c (detach_command): Pass current_inferior() down to
10751 target_detach.
10752 * infrun.c (follow_fork_inferior): Pass parent_inf to
10753 target_detach.
10754 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10755 target_detach.
10756 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10757 * linux-thread-db.c (thread_db_detach): Likewise.
10758 * nto-procfs.c (procfs_detach): Likewise.
10759 * procfs.c (procfs_detach): Likewise.
10760 * record.c (record_detach): Likewise.
10761 * record.h (struct inferior): Forward-declare.
10762 (record_detach): Add inferior parameter.
10763 * remote-sim.c (gdbsim_detach): Likewise.
10764 * remote.c (remote_detach_1): Likewise.
10765 (remote_detach): Likewise.
10766 (extended_remote_detach): Likewise.
10767 * sol-thread.c (sol_thread_detach): Likewise.
10768 * target-debug.h (target_debug_print_inferior_p): New macro.
10769 * target-delegates.c: Re-generate.
10770 * top.c (kill_or_detach): Pass inferior down to target_detach.
10771 * windows-nat.c (windows_detach): Add inferior parameter.
10772
10773 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10774
10775 * target.h (struct target_ops) <to_detach>: Remove args
10776 parameter.
10777 (target_detach): Likewise.
10778 * target.c (dispose_inferior): Adjust.
10779 (target_detach): Remove args parameter, adjust.
10780 * aix-thread.c (aix_thread_detach): Adjust.
10781 * corefile.c (core_file_command): Adjust.
10782 * corelow.c (core_detach): Adjust.
10783 * darwin-nat.c (darwin_detach): Adjust.
10784 * gnu-nat.c (gnu_detach): Adjust.
10785 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10786 * infcmd.c (detach_command): Adjust
10787 * infrun.c (follow_fork_inferior): Adjust.
10788 (handle_vfork_child_exec_or_exit): Adjust.
10789 * linux-fork.c (linux_fork_detach): Remove args parameter.
10790 * linux-fork.h (linux_fork_detach): Likewise.
10791 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10792 * linux-thread-db.c (thread_db_detach): Likewise.
10793 * nto-procfs.c (procfs_detach): Likewise.
10794 * procfs.c (procfs_detach): Likewise.
10795 (do_detach): Remove signo parameter.
10796 * record.c (record_detach): Remove args parameter.
10797 * record.h (record_detach): Likewise.
10798 * remote-sim.c (gdbsim_detach): Likewise.
10799 * remote.c (remote_detach_1): Likewise.
10800 (remote_detach): Likewise.
10801 (extended_remote_detach): Likewise.
10802 * sol-thread.c (sol_thread_detach): Likewise.
10803 * target-delegates.c: Re-generate.
10804 * top.c (struct qt_args) <args>: Remove field.
10805 (kill_or_detach): Don't pass args.
10806 (quit_force): Don't set args.
10807 * windows-nat.c (windows_detach): Remove args parameter.
10808
10809 2018-01-19 Yao Qi <yao.qi@linaro.org>
10810
10811 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10812 (arm_linux_init_abi): Install it.
10813
10814 2018-01-19 Yao Qi <yao.qi@linaro.org>
10815
10816 * osabi.c (gdb_osabi_names): Extend the regexp for
10817 arm-linux-gnueabihf.
10818
10819 2018-01-18 Yao Qi <yao.qi@linaro.org>
10820
10821 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10822 m_abbrevs.
10823 (abbrev_table::add_abbrev): Update.
10824 (abbrev_table::lookup_abbrev): Update.
10825
10826 2018-01-18 Yao Qi <yao.qi@linaro.org>
10827
10828 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10829
10830 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10831
10832 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10833 to "std::string".
10834
10835 2018-01-17 Tom Tromey <tom@tromey.com>
10836
10837 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10838
10839 2018-01-17 Tom Tromey <tom@tromey.com>
10840
10841 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10842 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10843 (create_array_type_with_stride): Update.
10844 * dwarf2read.c (set_die_type): Update.
10845
10846 2018-01-17 Tom Tromey <tom@tromey.com>
10847
10848 * dwarf2read.c (delayed_method_info): Remove typedef.
10849 (dwarf2_cu::method_info): Now a std::vector.
10850 (add_to_method_list): Update.
10851 (free_delayed_list): Remove.
10852 (compute_delayed_physnames): Update.
10853 (process_full_comp_unit, process_full_type_unit): Clear the method
10854 list. Remove cleanups.
10855 (psymtab_include_file_name): Add name_holder parameter. Use
10856 unique_xmalloc_ptr.
10857 (dwarf_decode_lines): Update.
10858
10859 2018-01-17 Tom Tromey <tom@tromey.com>
10860 Simon Marchi <simon.marchi@ericsson.com>
10861
10862 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10863 (dwarf2_per_objfile::free_cached_comp_units)
10864 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10865 (init_cutu_and_read_dies_no_follow): Update.
10866 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10867 (dwarf2_cu::~dwarf2_cu): New.
10868 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10869 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10870
10871 2018-01-17 Tom Tromey <tom@tromey.com>
10872 Simon Marchi <simon.marchi@ericsson.com>
10873
10874 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10875 (struct die_reader_specs) <abbrev_table>: New member.
10876 (struct abbrev_table): Add constructor.
10877 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10878 <abbrev_obstack>: Now an auto_obstack.
10879 (abbrev_table_up): New typedef.
10880 (init_cu_die_reader): Add abbrev_table parameter.
10881 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10882 Add result_dwo_abbrev_table.
10883 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10884 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10885 Update.
10886 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10887 parameter.
10888 (skip_children): Update.
10889 (abbrev_table::alloc_abbrev): Rename from
10890 abbrev_table_alloc_abbrev.
10891 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10892 (abbrev_table::lookup_abbrev): Rename from
10893 abbrev_table_lookup_abbrev.
10894 (abbrev_table_read_table): Return abbrev_table_up.
10895 (abbrev_table_free, abbrev_table_free_cleanup)
10896 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10897 (load_partial_dies): Update.
10898
10899 2018-01-17 Tom Tromey <tom@tromey.com>
10900
10901 * dwarf2read.c (dwarf2_compute_name): Update comment.
10902 (read_func_scope, read_variable): Update.
10903 (new_symbol): Remove.
10904 (new_symbol_full): Rename to new_symbol.
10905
10906 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10907
10908 PR gdb/16577
10909 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10910 a warning instead of throwing an error, set section size to 0 and return
10911 NULL.
10912 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10913
10914 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10915
10916 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10917 std::string.
10918 (linux_ptrace_attach_fail_reason_string): Likewise.
10919 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10920 Likewise.
10921 (linux_ptrace_attach_fail_reason_string): Likewise.
10922 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10923
10924 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10925
10926 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10927
10928 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10929
10930 PR gdb/21559
10931 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10932 checking for fs_base/gs_base fields in struct user_regs_struct.
10933 * configure: Regenerate.
10934
10935 2018-01-17 Yao Qi <yao.qi@linaro.org>
10936
10937 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10938 function.
10939 (aarch64_linux_init_abi): Install it to gdbarch hook
10940 gcc_target_options.
10941
10942 2018-01-15 Pedro Alves <palves@redhat.com>
10943
10944 * common/signals-state-save-restore.c
10945 (save_original_signals_state): Fix typos.
10946
10947 2017-01-12 Tom Tromey <tom@tromey.com>
10948 Sergio Durigan Junior <sergiodj@redhat.com>
10949
10950 * Makefile.in (install-only): Install gdb-add-index.
10951
10952 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10953
10954 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10955
10956 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10957
10958 * infrun.c (keep_going_pass_signal): Clear step-over info when
10959 insert_breakpoints fails.
10960
10961 2018-01-11 Pedro Alves <palves@redhat.com>
10962
10963 PR gdb/22583
10964 * infrun.c (resume): Rename to ...
10965 (resume_1): ... this.
10966 (resume): Reimplement as wrapper around resume_1.
10967
10968 2018-01-11 Pedro Alves <palves@redhat.com>
10969
10970 PR remote/22597
10971 * remote.c (remote_parse_stop_reply): Default to the last-set
10972 general thread instead of to 'magic_null_ptid'.
10973
10974 2018-01-10 Pedro Alves <palves@redhat.com>
10975
10976 * language.h (language_get_symbol_name_matcher): Rename ...
10977 (get_symbol_name_matcher): ... this.
10978 * language.c (language_get_symbol_name_matcher): Ditto.
10979 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10980 callers adjusted.
10981
10982 2018-01-10 Pedro Alves <palves@redhat.com>
10983
10984 PR gdb/22670
10985 * dwarf2read.c
10986 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10987 Adjust to use language_get_symbol_name_matcher instead of
10988 language_defn::la_get_symbol_name_matcher.
10989 * language.c (language_get_symbol_name_matcher): If in Ada mode
10990 and the lookup name is a verbatim match, return Ada's matcher.
10991 * language.h (language_get_symbol_name_matcher): Adjust comment.
10992 (ada_lookup_name_info::verbatim_p):: New method.
10993
10994 2018-01-10 Pedro Alves <palves@redhat.com>
10995
10996 PR gdb/22670
10997 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10998 minsym's language is language_auto or language_cplus, pass down
10999 language_ada instead.
11000 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11001
11002 2018-01-10 Pedro Alves <palves@redhat.com>
11003
11004 PR gdb/22670
11005 * minsyms.c (linkage_name_str): New function.
11006 (iterate_over_minimal_symbols): Use it.
11007
11008 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11009
11010 * NEWS: Document that 'info proc' now works on FreeBSD.
11011
11012 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11013
11014 * configure.ac: Check for kinfo_getfile in libutil.
11015 * configure: Regenerate.
11016 * config.in: Regenerate.
11017 * fbsd-nat.c: Include "fbsd-tdep.h".
11018 (fbsd_fetch_cmdline): New.
11019 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11020 rather than calling error.
11021 (fbsd_info_proc): New.
11022 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11023 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11024 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11025
11026 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11027
11028 * fbsd-nat.c (struct free_deleter): Remove.
11029 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11030
11031 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11032
11033 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11034 NULL for an empty pathname.
11035
11036 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11037
11038 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11039 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11040 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11041 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11042 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11043 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11044 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11045 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11046 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11047 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11048 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11049 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11050 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11051 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11052 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11053
11054 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11055
11056 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11057 (gnu_xfer_auxv): New function.
11058 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11059 TARGET_OBJECT_AUXV.
11060
11061 2018-01-08 Yao Qi <yao.qi@linaro.org>
11062 Simon Marchi <simon.marchi@ericsson.com>
11063
11064 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11065 common/selftest.c.
11066 (COMMON_OBS): Remove selftest.o.
11067 * configure.ac: Append selftest-arch.c and common/selftest.c to
11068 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11069 * configure: Re-generated.
11070 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11071 GDB_SELF_TEST.
11072 (maintenance_info_selftests): Likewise.
11073
11074 2018-01-08 Xavier Roirand <roirand@adacore.com>
11075
11076 * ada-valprint.c (val_print_packed_array_elements): Use
11077 proper number of elements when printing an array indexed
11078 by an enumeration type.
11079
11080 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11081
11082 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11083 (dw2_get_file_names_reader): Adjust.
11084 (lookup_dwo_signatured_type): Adjust.
11085 (lookup_dwp_signatured_type): Adjust.
11086 (lookup_signatured_type): Adjust.
11087 (create_type_unit_group): Adjust.
11088 (get_type_unit_group): Adjust.
11089 (process_psymtab_comp_unit_reader): Adjust.
11090 (build_type_psymtabs_reader): Adjust.
11091 (scan_partial_symbols): Adjust.
11092 (add_partial_symbol): Adjust.
11093 (add_partial_subprogram): Adjust.
11094 (peek_die_abbrev): Adjust.
11095 (fixup_go_packaging): Adjust.
11096 (process_imported_unit_die): Adjust.
11097 (dwarf2_compute_name): Adjust.
11098 (dwarf2_physname): Adjust.
11099 (read_import_statement): Adjust.
11100 (handle_DW_AT_stmt_list): Adjust.
11101 (read_file_scope): Adjust.
11102 (read_func_scope): Adjust.
11103 (read_lexical_block_scope): Adjust.
11104 (read_call_site_scope): Adjust.
11105 (read_variable): Adjust.
11106 (dwarf2_rnglists_process): Adjust.
11107 (dwarf2_ranges_process): Adjust.
11108 (dwarf2_ranges_read): Adjust.
11109 (dwarf2_get_pc_bounds): Adjust.
11110 (dwarf2_record_block_ranges): Adjust.
11111 (dwarf2_add_field): Adjust.
11112 (dwarf2_add_member_fn): Adjust.
11113 (read_structure_type): Adjust.
11114 (process_structure_scope): Adjust.
11115 (read_enumeration_type): Adjust.
11116 (read_array_type): Adjust.
11117 (mark_common_block_symbol_computed): Adjust.
11118 (read_common_block): Adjust.
11119 (read_namespace_type): Adjust.
11120 (read_namespace): Adjust.
11121 (read_module_type): Adjust.
11122 (read_tag_pointer_type): Adjust.
11123 (read_tag_ptr_to_member_type): Adjust.
11124 (read_tag_string_type): Adjust.
11125 (read_subroutine_type): Adjust.
11126 (read_typedef): Adjust.
11127 (read_base_type): Adjust.
11128 (attr_to_dynamic_prop): Adjust.
11129 (read_subrange_type): Adjust.
11130 (read_unspecified_type): Adjust.
11131 (dwarf2_read_abbrevs): Adjust.
11132 (load_partial_dies): Adjust.
11133 (read_partial_die): Adjust.
11134 (find_partial_die): Adjust.
11135 (guess_partial_die_structure_name): Adjust.
11136 (fixup_partial_die): Adjust.
11137 (read_attribute_value): Adjust.
11138 (read_addr_index): Adjust.
11139 (read_addr_index_from_leb128): Adjust.
11140 (read_str_index): Adjust.
11141 (dwarf2_string_attr): Adjust.
11142 (get_debug_line_section): Adjust.
11143 (dwarf_decode_line_header): Adjust.
11144 (lnp_state_machine::check_line_address): Adjust.
11145 (dwarf_decode_lines_1): Adjust.
11146 (dwarf_decode_lines): Adjust.
11147 (dwarf2_start_symtab): Adjust.
11148 (var_decode_location): Adjust.
11149 (new_symbol_full): Adjust.
11150 (dwarf2_const_value_data): Adjust.
11151 (dwarf2_const_value_attr): Adjust.
11152 (dwarf2_const_value): Adjust.
11153 (die_type): Adjust.
11154 (die_containing_type): Adjust.
11155 (build_error_marker_type): Adjust.
11156 (lookup_die_type): Adjust.
11157 (guess_full_die_structure_name): Adjust.
11158 (anonymous_struct_prefix): Adjust.
11159 (determine_prefix): Adjust.
11160 (dwarf2_name): Adjust.
11161 (follow_die_ref_or_sig): Adjust.
11162 (follow_die_offset): Adjust.
11163 (follow_die_ref): Adjust.
11164 (follow_die_sig_1): Adjust.
11165 (follow_die_sig): Adjust.
11166 (get_signatured_type): Adjust.
11167 (get_DW_AT_signature_type): Adjust.
11168 (decode_locdesc): Adjust.
11169 (dwarf_decode_macros): Adjust.
11170 (cu_debug_loc_section): Adjust.
11171 (fill_in_loclist_baton): Adjust.
11172 (dwarf2_symbol_mark_computed): Adjust.
11173 (init_one_comp_unit): Don't assign
11174 dwarf2_cu::dwarf2_per_objfile.
11175 (set_die_type): Adjust.
11176
11177 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11178
11179 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11180 <dwarf2_per_objfile>: New field.
11181 (dwarf2_per_objfile): Remove global.
11182 (get_dwarf2_per_objfile): New function.
11183 (set_dwarf2_per_objfile): New function.
11184 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11185 dwarf2_per_objfile.
11186 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11187 (read_abbrev_offset): Likewise.
11188 (read_indirect_string): Likewise.
11189 (read_indirect_line_string): Likewise.
11190 (read_indirect_string_at_offset): Likewise.
11191 (read_indirect_string_from_dwz): Likewise.
11192 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11193 dwarf2_per_objfile.
11194 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11195 (create_all_comp_units): Change objfile parameter to
11196 dwarf2_per_objfile.
11197 (create_all_type_units): Likewise.
11198 (process_queue): Add dwarf2_per_objfile parameter.
11199 (read_and_check_comp_unit_head): Likewise.
11200 (lookup_dwo_unit_in_dwp): Likewise.
11201 (get_dwp_file): Likewise.
11202 (process_cu_includes): Likewise.
11203 (struct free_dwo_file_cleanup_data): New struct.
11204 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11205 set_dwarf2_per_objfile.
11206 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11207 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11208 context, adjust calls.
11209 (dw2_instantiate_symtab): Likewise.
11210 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11211 (dw2_get_cu): Likewise.
11212 (create_cu_from_index_list): Change objfile parameter to
11213 dwarf2_per_objfile.
11214 (create_cus_from_index_list): Get dwarf2_per_objfile from
11215 context, adjust calls.
11216 (create_cus_from_index): Likewise.
11217 (create_signatured_type_table_from_index): Change objfile
11218 parameter to dwarf2_per_objfile.
11219 (create_signatured_type_table_from_debug_names): Change objfile
11220 parameter to dwarf2_per_objfile.
11221 (create_addrmap_from_index): Likewise.
11222 (create_addrmap_from_aranges): Likewise.
11223 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11224 (dw2_setup): Remove.
11225 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11226 context.
11227 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11228 get_dwarf2_per_objfile.
11229 (dw2_forget_cached_source_info): Likewise.
11230 (dw2_map_symtabs_matching_filename): Likewise.
11231 (struct dw2_symtab_iterator) <index>: Remove.
11232 <dwarf2_per_objfile>: New field.
11233 (dw2_symtab_iter_init): Replace index parameter with
11234 dwarf2_per_objfile.
11235 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11236 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11237 (dw2_print_stats): Likewise.
11238 (dw2_dump): Likewise.
11239 (dw2_expand_symtabs_for_function): Likewise.
11240 (dw2_expand_all_symtabs): Likewise.
11241 (dw2_expand_symtabs_with_fullname): Likewise.
11242 (dw2_expand_marked_cus): Replace index and objfile parameters
11243 with dwarf2_per_objfile.
11244 (dw_expand_symtabs_matching_file_matcher): Add
11245 dwarf2_per_objfile parameter and adjust calls.
11246 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11247 adjust calls.
11248 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11249 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11250 adjust calls.
11251 (create_cus_from_debug_names_list): Replace objfile parameter
11252 with dwarf2_per_objfile and adjust calls.
11253 (create_cus_from_debug_names): Likewise.
11254 (dwarf2_read_debug_names): Likewise.
11255 (mapped_debug_names::namei_to_name): Adjust call.
11256 (dw2_debug_names_iterator::next): Likewise.
11257 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11258 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11259 (dw2_debug_names_dump): Likewise.
11260 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11261 (dw2_debug_names_expand_symtabs_matching): Likewise.
11262 (dwarf2_initialize_objfile): Likewise.
11263 (dwarf2_build_psymtabs): Likewise.
11264 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11265 this_cu.
11266 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11267 (read_and_check_comp_unit_head): Likewise.
11268 (read_abbrev_offset): Likewise.
11269 (create_debug_type_hash_table): Likewise.
11270 (create_debug_types_hash_table): Likewise.
11271 (create_all_type_units): Replace objfile parameter with
11272 dwarf2_per_objfile.
11273 (add_type_unit): Add dwarf2_per_objfile parameter.
11274 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11275 with dwarf2_per_objfile.
11276 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11277 (lookup_dwp_signatured_type): Likewise.
11278 (lookup_signatured_type): Likewise.
11279 (read_cutu_die_from_dwo): Likewise.
11280 (init_tu_and_read_dwo_dies): Likewise.
11281 (init_cutu_and_read_dies): Likewise.
11282 (init_cutu_and_read_dies_no_follow): Likewise.
11283 (allocate_type_unit_groups_table): Add objfile parameter.
11284 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11285 (get_type_unit_group): Likewise.
11286 (process_psymtab_comp_unit): Update call.
11287 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11288 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11289 (print_tu_stats): Likewise.
11290 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11291 in void* parameter.
11292 (build_type_psymtabs): Change objfile parameter to
11293 dwarf2_per_objfile.
11294 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11295 passed in void* parameter.
11296 (process_skeletonless_type_units): Change objfile parameter to
11297 dwarf2_per_objfile.
11298 (set_partial_user): Likewise.
11299 (dwarf2_build_psymtabs_hard): Likewise.
11300 (read_comp_units_from_section): Likewise.
11301 (create_all_comp_units): Likewise.
11302 (scan_partial_symbols): Update calls.
11303 (add_partial_symbol): Likewise.
11304 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11305 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11306 (process_queue): Add dwarf2_per_objfile parameter.
11307 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11308 (compute_compunit_symtab_includes): Likewise.
11309 (process_cu_includes): Add dwarf2_per_objfile parameter.
11310 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11311 (process_full_type_unit): Likewise.
11312 (process_imported_unit_die): Update call.
11313 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11314 (read_file_scope): Likewise.
11315 (allocate_dwo_file_hash_table): Add objfile parameter.
11316 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11317 (create_cus_hash_table): Likewise.
11318 (create_dwp_hash_table): Likewise.
11319 (create_dwo_unit_in_dwp_v1): Likewise.
11320 (create_dwp_v2_section): Likewise.
11321 (create_dwo_unit_in_dwp_v2): Likewise.
11322 (lookup_dwo_unit_in_dwp): Likewise.
11323 (try_open_dwop_file): Likewise.
11324 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11325 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11326 cleanup to include a reference to dwarf2_per_objfile.
11327 (open_dwp_file): Add dwarf2_per_objfile parameter.
11328 (open_and_init_dwp_file): Likewise.
11329 (get_dwp_file): Likewise.
11330 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11331 (queue_and_load_all_dwo_tus): Update call.
11332 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11333 data.
11334 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11335 (dwarf2_ranges_process): Likewise.
11336 (dwarf2_get_pc_bounds): Likewise.
11337 (mark_common_block_symbol_computed): Likewise.
11338 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11339 (dwarf2_read_abbrevs): Update call.
11340 (read_partial_die): Use dwarf2_per_objfile from cu.
11341 (find_partial_die): Likewise.
11342 (fixup_partial_die): Likewise.
11343 (read_attribute_value): Likewise.
11344 (read_indirect_string_at_offset_from): Add objfile parameter.
11345 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11346 parameter.
11347 (read_indirect_string_from_dwz): Add objfile parameter.
11348 (read_indirect_string): Add objfile parameter.
11349 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11350 (read_addr_index): Use dwarf2_per_objfile from cu.
11351 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11352 call dw2_setup.
11353 (read_str_index): Use dwarf2_per_objfile from cu.
11354 (get_debug_line_section): Likewise.
11355 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11356 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11357 (new_symbol_full): Use dwarf2_per_objfile from cu.
11358 (build_error_marker_type): Likewise.
11359 (lookup_die_type): Likewise.
11360 (determine_prefix): Likewise.
11361 (follow_die_offset): Likewise.
11362 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11363 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11364 (dwarf2_fetch_die_type_sect_off): Likewise.
11365 (dwarf2_get_die_type): Likewise.
11366 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11367 (get_signatured_type): Likewise.
11368 (get_DW_AT_signature_type): Likewise.
11369 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11370 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11371 (cu_debug_loc_section): Likewise.
11372 (fill_in_loclist_baton): Likewise.
11373 (dwarf2_symbol_mark_computed): Likewise.
11374 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11375 dwarf2_per_objfile.
11376 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11377 parameter.
11378 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11379 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11380 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11381 (set_die_type): Use dwarf2_free_objfile from cu.
11382 (get_die_type_at_offset): Likewise.
11383 (dwarf2_per_objfile_free): Don't assign global variable.
11384 (debug_names) <constructor>: Add dwarf2_per_objfile
11385 parameter, update m_debugstrlookup construction.
11386 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11387 parameter.
11388 <m_dwarf2_per_objfile>: New field.
11389 <lookup>: Use m_dwarf2_per_objfile.
11390 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11391 (psyms_seen_size): Likewise.
11392 (write_gdbindex): Replace objfile parameter with
11393 dwarf2_per_objfile.
11394 (write_debug_names): Likewise.
11395 (write_psymtabs_to_index): Likewise.
11396 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11397 calls.
11398
11399 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11400
11401 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11402 <dwarf2_per_objfile>: New field.
11403 (struct dwarf2_per_cu_data) <objfile>: Remove.
11404 <dwarf2_per_objfile>: New field.
11405 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11406 of objfile.
11407 (create_signatured_type_table_from_index): Likewise.
11408 (create_debug_type_hash_table): Likewise.
11409 (fill_in_sig_entry_from_dwo_entry): Likewise.
11410 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11411 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11412 objfile.
11413 (create_partial_symtab): Access objfile through
11414 dwarf2_per_objfile.
11415 (process_psymtab_comp_unit_reader): Likewise.
11416 (read_comp_units_from_section): Likewise.
11417 (scan_partial_symbols): Likewise.
11418 (add_partial_symbol): Likewise.
11419 (add_partial_subprogram): Likewise.
11420 (peek_die_abbrev): Likewise.
11421 (fixup_go_packaging): Likewise.
11422 (process_full_comp_unit): Likewise.
11423 (process_full_type_unit): Likewise.
11424 (process_imported_unit_die): Likewise.
11425 (dwarf2_compute_name): Likewise.
11426 (dwarf2_physname): Likewise.
11427 (read_import_statement): Likewise.
11428 (create_cus_hash_table): Assign dwarf2_physname instead of
11429 objfile.
11430 (read_func_scope): Access objfile through dwarf2_per_objfile.
11431 (read_lexical_block_scope): Likewise.
11432 (read_call_site_scope): Likewise.
11433 (read_variable): Likewise.
11434 (dwarf2_rnglists_process): Likewise.
11435 (dwarf2_ranges_process): Likewise.
11436 (dwarf2_ranges_read): Likewise.
11437 (dwarf2_record_block_ranges): Likewise.
11438 (dwarf2_add_field): Likewise.
11439 (dwarf2_add_member_fn): Likewise.
11440 (read_structure_type): Likewise.
11441 (process_structure_scope): Likewise.
11442 (read_enumeration_type): Likewise.
11443 (read_array_type): Likewise.
11444 (read_common_block): Likewise.
11445 (read_namespace_type): Likewise.
11446 (read_namespace): Likewise.
11447 (read_module_type): Likewise.
11448 (read_tag_pointer_type): Likewise.
11449 (read_tag_ptr_to_member_type): Likewise.
11450 (read_tag_string_type): Likewise.
11451 (read_subroutine_type): Likewise.
11452 (read_typedef): Likewise.
11453 (read_base_type): Likewise.
11454 (attr_to_dynamic_prop): Likewise.
11455 (read_subrange_type): Likewise.
11456 (read_unspecified_type): Likewise.
11457 (load_partial_dies): Likewise.
11458 (read_partial_die): Likewise.
11459 (find_partial_die): Likewise.
11460 (guess_partial_die_structure_name): Likewise.
11461 (fixup_partial_die): Likewise.
11462 (read_attribute_value): Likewise.
11463 (read_addr_index_from_leb128): Likewise.
11464 (dwarf2_read_addr_index): Likewise.
11465 (dwarf2_string_attr): Likewise.
11466 (lnp_state_machine::check_line_address): Likewise.
11467 (dwarf_decode_lines_1): Likewise.
11468 (dwarf_decode_lines): Likewise.
11469 (dwarf2_start_symtab): Likewise.
11470 (var_decode_location): Likewise.
11471 (new_symbol_full): Likewise.
11472 (dwarf2_const_value_data): Likewise.
11473 (dwarf2_const_value_attr): Likewise.
11474 (dwarf2_const_value): Likewise.
11475 (die_type): Likewise.
11476 (die_containing_type): Likewise.
11477 (lookup_die_type): Likewise.
11478 (guess_full_die_structure_name): Likewise.
11479 (anonymous_struct_prefix): Likewise.
11480 (dwarf2_name): Likewise.
11481 (follow_die_ref_or_sig): Likewise.
11482 (follow_die_offset): Likewise.
11483 (follow_die_ref): Likewise.
11484 (dwarf2_fetch_die_loc_sect_off): Likewise.
11485 (dwarf2_fetch_constant_bytes): Likewise.
11486 (dwarf2_fetch_die_type_sect_off): Likewise.
11487 (dwarf2_get_die_type): Likewise.
11488 (follow_die_sig): Likewise.
11489 (decode_locdesc): Likewise.
11490 (dwarf2_per_cu_objfile): Likewise.
11491 (dwarf2_per_cu_text_offset): Likewise.
11492 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11493 objfile.
11494 (set_die_type): Access objfile through
11495 dwarf2_per_objfile.
11496
11497 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11498
11499 * valprint.c (converted_character_d): Remove typedef.
11500 (DEF_VEC_O (converted_character_d)): Remove.
11501 (count_next_character): Use std::vector.
11502 (print_converted_chars_to_obstack): Likewise.
11503 (generic_printstr): Likewise.
11504
11505 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11506
11507 * xml-support.h (struct gdb_xml_value): Add constructor.
11508 <value>: Change type to unique_xmalloc_ptr.
11509 (gdb_xml_value_s): Remove typedef.
11510 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11511 (gdb_xml_element_start_handler): Change parameter type to
11512 std::vector.
11513 (xml_find_attribute): Likewise.
11514 * xml-support.c (xml_find_attribute): Change parameter type to
11515 std::vector and adjust.
11516 (gdb_xml_values_cleanup): Remove.
11517 (gdb_xml_parser::start_element): Adjust to std::vector.
11518 (xinclude_start_include): Change paraeter type to std::vector
11519 and adjust.
11520 * btrace.c (check_xml_btrace_version): Likewise.
11521 (parse_xml_btrace_block): Likewise.
11522 (parse_xml_btrace_pt_config_cpu): Likewise.
11523 (parse_xml_btrace_pt): Likewise.
11524 (parse_xml_btrace_conf_bts): Likewise.
11525 (parse_xml_btrace_conf_pt): Likewise.
11526 * memory-map.c (memory_map_start_memory): Likewise.
11527 (memory_map_start_property): Likewise.
11528 * osdata.c (osdata_start_osdata): Likewise.
11529 (osdata_start_item): Likewise.
11530 (osdata_start_column): Likewise.
11531 * remote.c (start_thread): Likewise.
11532 * solib-aix.c (library_list_start_library): Likewise.
11533 (library_list_start_list): Likewise.
11534 * solib-svr4.c (library_list_start_library): Likewise.
11535 (svr4_library_list_start_list): Likewise.
11536 * solib-target.c (library_list_start_segment): Likewise.
11537 (library_list_start_section): Likewise.
11538 (library_list_start_library): Likewise.
11539 (library_list_start_list): Likewise.
11540 * tracepoint.c (traceframe_info_start_memory): Likewise.
11541 (traceframe_info_start_tvar): Likewise.
11542 * xml-syscall.c (syscall_start_syscall): Likewise.
11543 * xml-tdesc.c (tdesc_start_target): Likewise.
11544 (tdesc_start_feature): Likewise.
11545 (tdesc_start_reg): Likewise.
11546 (tdesc_start_union): Likewise.
11547 (tdesc_start_struct): Likewise.
11548 (tdesc_start_flags): Likewise.
11549 (tdesc_start_enum): Likewise.
11550 (tdesc_start_field): Likewise.
11551 (tdesc_start_enum_value): Likewise.
11552 (tdesc_start_vector): Likewise.
11553
11554 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11555
11556 * extension.h (struct xmethod_worker) <clone>: Remove.
11557 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11558 Remove.
11559 (python_xmethod_worker::clone): Remove.
11560 * valops.c (find_overload_match): Use std::move instead of
11561 clone.
11562
11563 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11564
11565 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11566 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11567 <free_xmethod_worker_data>: Remove.
11568 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11569 <get_xmethod_arg_types>: Remove.
11570 <get_xmethod_result_type>: Remove.
11571 <invoke_xmethod>: Remove.
11572 * extension.c (new_xmethod_worker): Remove.
11573 (clone_xmethod_worker): Remove.
11574 (get_matching_xmethod_workers): Return void, pass std::vector by
11575 pointer.
11576 (get_xmethod_arg_types): Rename to...
11577 (xmethod_worker::get_arg_types): ... this, and adjust.
11578 (get_xmethod_result_type): Rename to...
11579 (xmethod_worker::get_result_type): ... this, and adjust.
11580 (invoke_xmethod): Remove.
11581 (free_xmethod_worker): Remove.
11582 (free_xmethod_worker_vec): Remove.
11583 * extension.h (enum ext_lang_rc): Move here from
11584 extension-priv.h.
11585 (struct xmethod_worker): Add constructor and destructor.
11586 <data>: Remove.
11587 <value>: Remove.
11588 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11589 virtual pure methods.
11590 <get_arg_types, get_result_type>: New methods.
11591 (xmethod_worker_ptr): Remove typedef.
11592 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11593 (xmethod_worker_vec): Remove typedef.
11594 (xmethod_worker_up): New typedef.
11595 (invoke_xmethod): Remove.
11596 (clone_xmethod_worker): Remove.
11597 (free_xmethod_worker): Remove.
11598 (free_xmethod_worker_vec): Remove.
11599 (get_xmethod_arg_types): Remove.
11600 (get_xmethod_result_type): Remove.
11601 * valops.c (find_method_list): Use std::vector, don't use
11602 intermediate vector.
11603 (value_find_oload_method_list): Use std::vector.
11604 (find_overload_match): Use std::vector.
11605 (find_oload_champ): Use std::vector.
11606 * value.c (value_free): Use operator delete.
11607 (value_of_xmethod): Rename to...
11608 (value_from_xmethod): ... this. Don't assign
11609 xmethod_worker::value, take rvalue-reference.
11610 (result_type_of_xmethod): Adjust.
11611 (call_xmethod): Adjust.
11612 * value.h: Include extension.h.
11613 (struct xmethod_worker): Don't forward-declare.
11614 (value_of_xmethod): Rename to...
11615 (value_from_xmethod): ... this, take rvalue-reference.
11616 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11617 (struct python_xmethod_worker): ... this, add constructor and
11618 destructor.
11619 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11620 (gdbpy_free_xmethod_worker_data): Rename to...
11621 (python_xmethod_worker::~python_xmethod_worker): ... this and
11622 adjust.
11623 (gdbpy_clone_xmethod_worker_data): Rename to...
11624 (python_xmethod_worker::clone): ... this and adjust.
11625 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11626 temporary vector.
11627 (gdbpy_get_xmethod_arg_types): Rename to...
11628 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11629 (gdbpy_get_xmethod_result_type): Rename to...
11630 (python_xmethod_worker::do_get_result_type): ... this and
11631 adjust.
11632 (gdbpy_invoke_xmethod): Rename to...
11633 (python_xmethod_worker::invoke): ... this and adjust.
11634 (new_python_xmethod_worker): Rename to...
11635 (python_xmethod_worker::python_xmethod_worker): ... this and
11636 adjust.
11637 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11638 Remove.
11639 (gdbpy_free_xmethod_worker_data): Remove.
11640 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11641 (gdbpy_get_xmethod_arg_types): Remove.
11642 (gdbpy_get_xmethod_result_type): Remove.
11643 (gdbpy_invoke_xmethod): Remove.
11644 * python/python.c (python_extension_ops): Remove obsolete
11645 callbacks.
11646
11647 2018-01-05 Pedro Alves <palves@redhat.com>
11648
11649 PR gdb/18653
11650 * common/signals-state-save-restore.c
11651 (save_original_signals_state): New parameter 'quiet'. Warn if we
11652 find a custom handler preinstalled, instead of internal erroring.
11653 But only warn if !quiet.
11654 * common/signals-state-save-restore.h
11655 (save_original_signals_state): New parameter 'quiet'.
11656 * main.c (captured_main_1): Move save_original_signals_state call
11657 after option handling, and pass QUIET.
11658
11659 2018-01-05 Pedro Alves <palves@redhat.com>
11660
11661 * spu-tdep.c (spu_catch_start): Pass
11662 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11663
11664 2018-01-05 Pedro Alves <palves@redhat.com>
11665
11666 PR gdb/22670
11667 * ada-lang.c (literal_symbol_name_matcher): New function.
11668 (ada_get_symbol_name_matcher): Use it for
11669 symbol_name_match_type::SEARCH_NAME.
11670 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11671 it down instead of assuming symbol_name_match_type::FULL.
11672 * block.h (block_lookup_symbol): New parameter 'match_type'.
11673 * c-valprint.c (print_unpacked_pointer): Use
11674 lookup_symbol_search_name instead of lookup_symbol.
11675 * compile/compile-object-load.c (get_out_value_type): Pass down
11676 symbol_name_match_type::SEARCH_NAME.
11677 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11678 symbol_name_match_type::FULL.
11679 * cp-support.c (cp_get_symbol_name_matcher): Handle
11680 symbol_name_match_type::SEARCH_NAME.
11681 * infrun.c (insert_exception_resume_breakpoint): Use
11682 lookup_symbol_search_name.
11683 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11684 * psymtab.c (maintenance_check_psymtabs): Use
11685 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11686 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11687 SYMBOL_SEARCH_NAME.
11688 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11689 if symbol_name_match_type::SEARCH_NAME.
11690 (lookup_symbol_in_language): Pass down
11691 symbol_name_match_type::FULL.
11692 (lookup_symbol_search_name): New.
11693 (lookup_language_this): Pass down
11694 symbol_name_match_type::SEARCH_NAME.
11695 (lookup_symbol_aux, lookup_local_symbol): New parameter
11696 'match_type'. Pass it down.
11697 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11698 (lookup_symbol_search_name): New declaration.
11699 (lookup_symbol_in_block): New 'match_type' parameter.
11700
11701 2018-01-05 Pedro Alves <palves@redhat.com>
11702
11703 PR gdb/22670
11704 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11705 ada_lookup_symbol.
11706 (ada_lookup_symbol): Reimplement in terms of
11707 ada_lookup_symbol_list, bits factored out from
11708 ada_lookup_encoded_symbol.
11709
11710 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11711
11712 * ada-exp.y (write_object_renaming): When subscripting an array
11713 using a symbol as the index, pass the block in call to
11714 ada_lookup_encoded_symbol when looking that symbol up.
11715
11716 2018-01-05 Jerome Guitton <guitton@adacore.com>
11717
11718 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11719 TYPE_INDEX_TYPE.
11720
11721 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11722
11723 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11724 the case where VALUE_LVAL (val0) is not lval_memory.
11725
11726 2018-01-05 Xavier Roirand <roirand@adacore.com>
11727
11728 * ada-valprint.c (print_optional_low_bound): Handle
11729 character-indexed array printing like boolean-indexed array
11730 printing.
11731
11732 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11733
11734 * NEWS: Create a new section for the next release branch.
11735 Rename the section of the current branch, now that it has
11736 been cut.
11737
11738 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11739
11740 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11741 * version.in: Bump version to 8.1.50.DATE-git.
11742
11743 2018-01-03 Xavier Roirand <roirand@adacore.com>
11744
11745 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11746 Add field.
11747 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11748 Add field.
11749 (default_exception_support_info) <catch_handlers_sym>: Add field.
11750 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11751 (ada_exception_name_addr_1): Add "catch handlers" handling.
11752 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11753 Update all callers.
11754 (create_excep_cond_exprs) <ex>: Add parameter.
11755 (re_set_exception): Update create_excep_cond_exprs call.
11756 (print_it_exception, print_one_exception, print_mention_exception)
11757 (print_recreate_exception): Add "catch handler" handling.
11758 (allocate_location_catch_handlers, re_set_catch_handlers)
11759 (check_status_catch_handlers, print_it_catch_handlers)
11760 (print_one_catch_handlers, print_mention_catch_handlers)
11761 (print_recreate_catch_handlers): New function.
11762 (catch_handlers_breakpoint_ops): New variable.
11763 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11764 Add parameter. Add "catch handler" handling.
11765 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11766 Add "catch handler" handling.
11767 (ada_exception_catchpoint_cond_string): Add "catch handler"
11768 handling.
11769 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11770 call.
11771 (catch_ada_handlers_command): New function.
11772 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11773 operations structure.
11774 (_initialize_ada_language): Add "catch handlers" command entry.
11775 * NEWS: Document "catch handlers" feature.
11776
11777 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11778
11779 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11780 account when creating the array type of the slice.
11781 (ada_value_slice): Likewise.
11782
11783 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11784
11785 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11786 New enum value.
11787 (create_array_type_with_stride): Add byte_stride_prop parameter.
11788 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11789 New parameter. Update all callers in this file.
11790 (array_type_has_dynamic_stride): New function.
11791 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11792 of arrays with dynamic byte strides.
11793 * dwarf2read.c (read_array_type): Add support for dynamic
11794 DW_AT_byte_stride attributes.
11795
11796 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11797
11798 * dwarf2read.c (read_unspecified_type): Treat
11799 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11800
11801 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11802
11803 Update copyright year range in all GDB files.
11804
11805 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11806
11807 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11808 and gdb/testsuite/gdb.base/step-line.c.
11809
11810 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11811
11812 * copyright.py (main): Dump the contents of
11813 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11814 even if BY_HAND is empty.
11815
11816 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11817
11818 * top.c (print_gdb_version): Update Copyright year in version
11819 message.
11820
11821 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11822
11823 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11824
11825 For older changes see ChangeLog-2017.
11826 \f
11827 Local Variables:
11828 mode: change-log
11829 left-margin: 8
11830 fill-column: 74
11831 version-control: never
11832 coding: utf-8
11833 End:
This page took 0.280015 seconds and 3 git commands to generate.