Add include guard to filename-seen-cache.h
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
2
3 * filename-seen-cache.h: Add include guard.
4
5 2018-03-26 Keith Seitz <keiths@redhat.com>
6
7 * symfile.c (place_section): Remove "struct" from section_addr_info
8 in comment.
9 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10 "struct" keyword from section_addr_info.
11
12 2018-03-26 Alan Hayward <alan.hayward@arm.com>
13
14 * regformats/regdef.h (reg): Add constructors.
15
16 2018-03-25 Pedro Alves <palves@redhat.com>
17
18 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
19 if then/else bodies in var_func_name extraction.
20
21 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
22
23 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
24 lookup_minimal_symbol() to find symbol entry.
25 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
26
27 2018-03-23 Keith Seitz <keiths@redhat.com>
28
29 PR c++/22968
30 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
31 nested type definitions for C++, too.
32
33 2018-03-23 Tom Tromey <tom@tromey.com>
34
35 * machoread.c (struct oso_el): Add a constructor. Don't define as
36 a typedef.
37 (macho_register_oso): Remove.
38 (macho_symtab_read): Take a std::vector.
39 (oso_el_compare_name): Now a std::sort comparator.
40 (macho_symfile_read_all_oso): Take a std::vector.
41 (macho_symfile_read): Use std::vector. Remove cleanups.
42
43 2018-03-22 Tom Tromey <tom@tromey.com>
44
45 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
46 (record_full_goto_bookmark): Use std::string.
47
48 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
49
50 PR tdep/18295
51 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
52 a single mask.
53
54 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
55
56 * rs6000-tdep.c (store_insn_p): New function.
57 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
58 and cr_reg to their unshifted values. Use store_insn_p to
59 match LR saves using either R1 or fdata->alloca_reg. Use
60 store_insn_p to match CR saves. Set alloca_reg_offset
61 when alloca_reg and framep are set. Remove lr_reg shift
62 when assigning to fdata->lr_register.
63
64 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
65
66 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
67 command line args instead of emitting a warning.
68
69 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
70
71 * tracepoint.h (struct static_tracepoint_marker): Initialize
72 fields, define default constructor, move constructor and move
73 assignment, disable the rest.
74 <str_id, extra>: Make std::string.
75 (release_static_tracepoint_marker): Remove.
76 (free_current_marker): Remove.
77 * tracepoint.c (free_current_marker): Remove.
78 (parse_static_tracepoint_marker_definition): Adjust to
79 std::string, use new hex2str overload.
80 (release_static_tracepoint_marker): Remove.
81 (print_one_static_tracepoint_marker): Get marker by reference
82 and adjust to std::string.
83 (info_static_tracepoint_markers_command): Adjust to std::vector
84 changes
85 * target.h (static_tracepoint_marker_p): Remove typedef.
86 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
87 (struct target_ops) <to_static_tracepoint_marker_at>: Return
88 bool.
89 <to_static_tracepoint_markers_by_strid>: Return std::vector.
90 * target-debug.h
91 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
92 (target_debug_print_std_vector_static_tracepoint_marker): New.
93 (target_debug_print_struct_static_tracepoint_marker_p): Rename
94 to...
95 (target_debug_print_static_tracepoint_marker_p): ... this.
96 * target-delegates.c: Re-generate.
97 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
98 Make std::string.
99 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
100 (decode_static_tracepoint_spec): Adjust to std::vector.
101 (tracepoint_print_one_detail): Adjust to std::string.
102 (strace_marker_decode_location): Adjust to std::string.
103 (update_static_tracepoint): Adjust to std::string, remove call
104 to release_static_tracepoint_marker.
105 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
106 Adjust to std::vector.
107 * remote.c (remote_static_tracepoint_marker_at): Return bool.
108 (remote_static_tracepoint_markers_by_strid): Adjust to
109 std::vector.
110 * common/rsp-low.h (hex2str): New overload with explicit count
111 of bytes.
112 * common/rsp-low.c (hex2str): New overload with explicit count
113 of bytes.
114 * unittests/rsp-low-selftests.c (test_hex2str): New function.
115 (_initialize_rsp_low_selftests): Add test_hex2str test.
116 * unittests/tracepoint-selftests.c
117 (test_parse_static_tracepoint_marker_definition): Adjust to
118 std::string.
119
120 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
121
122 * tracepoint.c (parse_static_tracepoint_marker_definition):
123 Consider case where the definition is followed by more
124 definitions.
125 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
126 tracepoint-selftests.c.
127 * unittests/tracepoint-selftests.c: New.
128
129 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
130
131 * MAINTAINERS (Write After Approval): Add Pedro Franco de
132 Carvalho.
133
134 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
135
136 * gdb/symtab.c (find_pc_sect_line): fixed indentation.
137
138 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
139
140 * gdb/symtab.c (find_pc_sect_line): now uses binary search.
141
142 2018-03-19 Tom Tromey <tom@tromey.com>
143
144 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
145 "IDENT" production.
146
147 2018-03-19 Pedro Alves <palves@redhat.com>
148 Tom Tromey <tom@tromey.com>
149
150 * unittests/observable-selftests.c: New file.
151 * common/observable.h: New file.
152 * observable.h: New file.
153 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
154 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
155 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
156 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
157 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
158 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
159 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
160 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
161 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
162 python/py-breakpoint.c, python/py-finishbreakpoint.c,
163 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
164 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
165 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
166 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
167 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
168 tui/tui-interp.c, valops.c: Update all users.
169 * tui/tui-hooks.c (tui_bp_created_observer)
170 (tui_bp_deleted_observer, tui_bp_modified_observer)
171 (tui_inferior_exit_observer, tui_before_prompt_observer)
172 (tui_normal_stop_observer, tui_register_changed_observer):
173 Remove.
174 (tui_observers_token): New global.
175 (attach_or_detach, tui_attach_detach_observers): New functions.
176 (tui_install_hooks, tui_remove_hooks): Use
177 tui_attach_detach_observers.
178 * record-btrace.c (record_btrace_thread_observer): Remove.
179 (record_btrace_thread_observer_token): New global.
180 * observer.sh: Remove.
181 * observer.c: Rename to observable.c.
182 * observable.c (namespace gdb_observers): Define new objects.
183 (observer_debug): Move into gdb_observers namespace.
184 (struct observer, struct observer_list, xalloc_observer_list_node)
185 (xfree_observer_list_node, generic_observer_attach)
186 (generic_observer_detach, generic_observer_notify): Remove.
187 (_initialize_observer): Update.
188 Don't include observer.inc.
189 * Makefile.in (generated_files): Remove observer.h, observer.inc.
190 (clean mostlyclean): Likewise.
191 (observer.h, observer.inc): Remove targets.
192 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
193 (COMMON_SFILES): Use observable.c, not observer.c.
194 * .gitignore: Remove observer.h.
195
196 2018-03-18 Tom Tromey <tom@tromey.com>
197
198 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
199 gdb::def_vector.
200 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
201
202 2018-03-17 Tom Tromey <tom@tromey.com>
203
204 * auto-load.c (auto_load_objfile_script_1): Use std::string.
205
206 2018-03-17 Tom Tromey <tom@tromey.com>
207
208 * target.c (class scoped_target_fd): New.
209 (target_fileio_close_cleanup): Remove.
210 (target_fileio_read_alloc_1): Use scoped_target_fd.
211
212 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
213
214 * silent-rules.mk: New.
215 * Makefile.in: Include silent-rules.mk
216 (srcdir, VPATH, top_srcdir): Move up.
217 (COMPILE): Add ECHO_CXX.
218 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
219 (init.c): Add ECHO_INIT_C.
220 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
221 (version.c): Add ECHO_GEN.
222 (printcmd.o): Add ECHO_CXX.
223 (target-float.o): Add ECHO_CXX.
224 (ada-exp.o): Add ECHO_CXX.
225 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
226 (insight$(EXEEXT)): Add ECHO_CXXLD.
227 * gnulib/configure.ac: Add AM_SILENT_RULES.
228 * gnulib/aclocal.m4: Re-generate.
229 * gnulib/configure: Re-generate.
230 * gnulib/import/Makefile.in: Re-generate.
231
232 2018-03-16 Tom Tromey <tom@tromey.com>
233
234 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
235 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
236 * utils.c (do_free_section_addr_info)
237 (make_cleanup_free_section_addr_info): Remove.
238 * symfile.h (struct other_sections): Add constructor.
239 (struct section_addr_info): Remove.
240 (section_addr_info): New typedef.
241 (struct sym_fns) <sym_offsets>: Change type of parameter.
242 (build_section_addr_info_from_objfile)
243 (relative_addr_info_to_section_offsets, addr_info_make_relative)
244 (default_symfile_offsets, symbol_file_add)
245 (symbol_file_add_from_bfd)
246 (build_section_addr_info_from_section_table): Update.
247 (alloc_section_addr_info, free_section_addr_info): Don't declare.
248 * symfile.c (alloc_section_addr_info): Remove.
249 (build_section_addr_info_from_section_table): Change return type.
250 Update.
251 (build_section_addr_info_from_bfd)
252 (build_section_addr_info_from_objfile): Likewise.
253 (free_section_addr_info): Remove.
254 (relative_addr_info_to_section_offsets): Change type of "addrs".
255 (addrs_section_compar): Now a std::sort comparator.
256 (addrs_section_sort): Change return type.
257 (addr_info_make_relative): Change type of "addrs". Update.
258 (default_symfile_offsets, syms_from_objfile_1)
259 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
260 (symbol_file_add_separate): Update.
261 (symbol_file_add): Change type of "addrs". Update.
262 (add_symbol_file_command): Update. Remove cleanups.
263 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
264 cleanups.
265 * symfile-debug.c (debug_sym_offsets): Change type of "info".
266 * solib.c (solib_read_symbols): Update.
267 * objfiles.c (objfile_relocate): Update. Remove cleanups.
268 * machoread.c (macho_symfile_offsets): Update.
269 * jit.c (jit_bfd_try_read_symtab): Update.
270
271 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
272
273 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
274 unittests/utils-selftests.c.
275 * unittests/utils-selftests.c: New file.
276
277 2018-03-14 Tom Tromey <tom@tromey.com>
278
279 PR cli/14977:
280 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
281 for NULL.
282
283 2018-03-14 Tom Tromey <tom@tromey.com>
284
285 PR cli/19918:
286 * printcmd.c (printf_pointer): Allow "-" in format.
287
288 2018-03-14 Tom Tromey <tom@tromey.com>
289
290 * printcmd.c (_initialize_printcmd): Add usage to printf.
291
292 2018-03-14 Yao Qi <qiyao@sourceware.org>
293
294 * MAINTAINERS: Update my email address.
295
296 2018-03-13 Tom Tromey <tom@tromey.com>
297
298 * machoread.c (macho_check_dsym): Change filenamep to a
299 std::string*.
300 (macho_symfile_read): Update.
301 * symfile.c (load_command): Use std::string.
302
303 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
304
305 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
306 to error message string.
307 (riscv_register_name): Use xsnprintf instead of sprintf.
308 (riscv_insn::fetch_instruction): Use gdb_assert instead of
309 internal_error.
310 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
311 error.
312 (riscv_push_dummy_call): Likewise.
313
314 2018-03-12 Tom Tromey <tom@tromey.com>
315
316 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
317 Use gdb::byte_vector.
318 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
319
320 2018-03-12 Yao Qi <yao.qi@linaro.org>
321
322 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
323 parameter type to readable_regcache.
324 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
325 the declaration.
326
327 2018-03-11 Tom Tromey <tom@tromey.com>
328
329 * dwarf2read.c (struct nextfield): Add initializers.
330 (struct nextfnfield): Remove.
331 (struct fnfieldlist): Add initializers. Remove "length" and
332 "head", use std::vector.
333 (struct decl_field_list): Remove.
334 (struct field_info): Add initializers.
335 <fields, baseclasses>: Now std::vector.
336 <nbaseclasses, nfnfields, typedef_field_list_count,
337 nested_types_list_count>: Remove.
338 (dwarf2_add_field, dwarf2_add_type_defn)
339 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
340 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
341 (process_structure_scope): Update.
342
343 2018-03-11 Tom Tromey <tom@tromey.com>
344
345 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
346 for use by std::sort.
347 (build_type_psymtabs_1): Use std::vector.
348
349 2018-03-09 Eli Zaretskii <eliz@gnu.org>
350
351 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
352 and LIBMPFR in the printed configuration.
353
354 2018-03-08 Tom Tromey <tom@tromey.com>
355
356 * source.c (get_filename_and_charpos): Use scoped_fd.
357 * nto-procfs.c (procfs_open_1): Use scoped_fd.
358 (procfs_pidlist): Likewise.
359 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
360 (iterate_over_mappings): Likewise.
361
362 2018-03-08 Tom Tromey <tom@tromey.com>
363
364 * infcall.c (struct call_return_meta_info)
365 <stack_temporaries_enabled>: Remove.
366 (get_call_return_value, call_function_by_hand_dummy): Update.
367 * thread.c (disable_thread_stack_temporaries): Remove.
368 (enable_thread_stack_temporaries): Remove.
369 (thread_stack_temporaries_enabled_p): Return bool.
370 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
371 (get_last_thread_stack_temporary): Update.
372 * eval.c (evaluate_subexp): Update.
373 * gdbthread.h (class enable_thread_stack_temporaries): Now a
374 class, not a function.
375 (value_ptr, value_vec): Remove typedefs.
376 (class thread_info) <stack_temporaries_enabled>: Now bool.
377 <stack_temporaries>: Now a std::vector.
378 (thread_stack_temporaries_enabled_p)
379 (value_in_thread_stack_temporaries): Return bool.
380
381 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
382
383 * remote.c (putpkt_binary): Fix omitted bytes reporting.
384 (getpkt_or_notif_sane_1): Likewise.
385
386 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
387
388 * build-id.c (build_id_to_debug_bfd): Use std::string.
389
390 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
391
392 * build-id.c (find_separate_debug_file_by_buildid): Return
393 std::string.
394 * build-id.h (find_separate_debug_file_by_buildid): Return
395 std::string.
396 * coffread.c (coff_symfile_read): Adjust to std::string.
397 * elfread.c (elf_symfile_read): Adjust to std::string.
398 * symfile.c (separate_debug_file_exists): Change parameter to
399 std::string.
400 (find_separate_debug_file): Return std::string.
401 (find_separate_debug_file_by_debuglink): Return std::string.
402 * symfile.h (find_separate_debug_file_by_debuglink): Return
403 std::string.
404
405 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
406
407 * common/xml-utils.c (xml_escape_text): Move code to...
408 (xml_escape_text_append): ... this new function.
409 * common/xml-utils.h (xml_escape_text_append): New declaration.
410 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
411 New function.
412 (_initialize_xml_utils): register test_xml_escape_text_append as
413 a selftest.
414
415 2018-03-07 Alan Hayward <alan.hayward@arm.com>
416
417 * defs.h: Remove MAX_REGISTER_SIZE.
418 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
419 asserts.
420 * python/py-unwind.c (pyuw_sniffer): Likewise.
421
422 2018-03-07 Tom Tromey <tom@tromey.com>
423
424 * linux-tdep.c (linux_info_proc): Update.
425 * target.h (struct target_ops) <to_fileio_readlink>: Return
426 optional<string>.
427 (target_fileio_readlink): Return optional<string>.
428 * remote.c (remote_hostio_readlink): Return optional<string>.
429 * inf-child.c (inf_child_fileio_readlink): Return
430 optional<string>.
431 * target.c (target_fileio_readlink): Return optional<string>.
432
433 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
434
435 * regcache.c (cooked_read_test): Add riscv to the list of
436 architectures that have a save_reggroup.
437
438 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
439
440 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
441 value is not a dynamic class object.
442
443 2018-03-06 Tom Tromey <tom@tromey.com>
444
445 * rust-exp.y: Formatting fixes.
446
447 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
448
449 * riscv-tdep.c (riscv_register_name): Remove target description
450 support.
451 (riscv_gdbarch_init): Remove target description check.
452
453 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
454
455 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
456 comment.
457 * riscv-tdep.h: Likewise.
458
459 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
460
461 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
462 (riscv_pseudo_register_write): Delete.
463 (riscv_gdbarch_init): Remove all use of pseudo registers.
464
465 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
466
467 * record-btrace.c (btrace_print_lines): Replace cleanup
468 parameter with RAII equivalents.
469 (btrace_insn_history): Replace cleanup with RAII equivalents.
470 * ui-out.h (make_cleanup_ui_out_list_begin_end,
471 make_cleanup_ui_out_tuple_begin_end): Remove.
472 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
473 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
474 make_cleanup_ui_out_list_begin_end): Remove.
475
476 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
477
478 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
479 parameter types to std::vector. Use bool.
480 (record_btrace_wait): Replace VEC(tp_t) with
481 std::vector<thread_info *>.
482 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
483
484 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
485
486 * record-btrace.c (record_btrace_disable_callback): Remove.
487 (struct scoped_btrace_disable): New.
488 (record_btrace_open): Use scoped_btrace_disable.
489
490 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
491
492 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
493 reading values from registers.
494
495 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
496
497 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
498 where appropriate.
499
500 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
501
502 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
503 change parameter type. Use GDB's print functions, and use
504 core_addr_to_string where appropriate.
505 (riscv_push_dummy_call): Use core_addr_to_string where
506 appropriate, update call to riscv_print_arg_location, and reindent
507 a few lines.
508 (riscv_return_value): Update call to riscv_print_arg_location.
509
510 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
511 Tim Newsome <tim@sifive.com>
512 Albert Ou <a0u@eecs.berkeley.edu>
513 Darius Rad <darius@bluespec.com>
514
515 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
516 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
517 (ALLDEPFILES): Add riscv-tdep.c
518 * configure.tgt: Add riscv support.
519 * riscv-tdep.c: New file.
520 * riscv-tdep.h: New file.
521 * NEWS: Mention new target.
522 * MAINTAINERS: Add entry for riscv.
523
524 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
525
526 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
527 fields within aggregates.
528
529 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
530
531 * record-btrace.c (btrace_print_lines): Change type of flags to
532 gdb_disassembly_flags.
533
534 2018-03-04 John Baldwin <jhb@FreeBSD.org>
535
536 * fbsd-nat.c: Include "inf-ptrace.h".
537 (USE_SIGTRAP_SIGINFO): Conditionally define.
538 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
539 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
540 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
541 function.
542 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
543 Likewise.
544 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
545 Likewise.
546 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
547 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
548 "supports_stopped_by_hw_breakpoint" target methods.
549
550 2018-03-04 John Baldwin <jhb@FreeBSD.org>
551
552 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
553 * fbsd-nat.c (debug_fbsd_nat): New variable.
554 (show_fbsd_nat_debug): New function.
555 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
556 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
557
558 2018-03-04 John Baldwin <jhb@FreeBSD.org>
559
560 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
561 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
562 prototype.
563 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
564 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
565 method.
566
567 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
568
569 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
570 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
571
572 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
573
574 * charset.c (struct charset_vector): New.
575 (charsets): Change type to charset_vector.
576 (find_charset_names): Adjust.
577 (add_one): Adjust.
578 (_initialize_charset): Adjust.
579
580 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
581
582 * progspace.h (struct program_space) <deleted_solibs>: Change
583 type to std::vector<std::string>.
584 * progspace.c (clear_program_space_solib_cache): Adjust.
585 * breakpoint.c (print_solib_event): Adjust.
586 (check_status_catch_solib): Adjust.
587 * solib.c (update_solib_list): Adjust.
588 * ui-out.h (class ui_out) <field_string>: New overload.
589 * ui-out.c (ui_out::field_string): New overload.
590
591 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
592
593 * progspace.h (struct program_space): Add constructor and
594 destructor, initialize fields.
595 (add_program_space): Remove.
596 * progspace.c (add_program_space): Rename to...
597 (program_space::program_space): ... this.
598 (release_program_space): Rename to...
599 (program_space::~program_space): ... this.
600 (delete_program_space): Use delete to delete program_space.
601 (initialize_progspace): Use new to allocate program_space.
602 * inferior.c (add_inferior_with_spaces): Likewise.
603 (clone_inferior_command): Likewise.
604 * infrun.c (follow_fork_inferior): Likewise.
605 (handle_vfork_child_exec_or_exit): Likewise.
606
607 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
608
609 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
610 (delim_string_to_char_ptr_vec): Return std::vector of
611 gdb::unique_xmalloc_ptr.
612 (dirnames_to_char_ptr_vec_append): Take std::vector of
613 gdb::unique_xmalloc_ptr.
614 (dirnames_to_char_ptr_vec): Return std::vector of
615 gdb::unique_xmalloc_ptr.
616 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
617 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
618 (delim_string_to_char_ptr_vec): Return an std::vector of
619 gdb::unique_xmalloc_ptr, adjust the code.
620 (dirnames_to_char_ptr_vec_append): Take an std::vector of
621 gdb::unique_xmalloc_ptr, adjust the code.
622 (dirnames_to_char_ptr_vec): Return an std::vector of
623 gdb::unique_xmalloc_ptr, adjust the code.
624 * auto-load.c (auto_load_safe_path_vec): Change type to
625 std::vector of gdb::unique_xmalloc_ptr.
626 (auto_load_expand_dir_vars): Return an std::vector of
627 gdb::unique_xmalloc_ptr, adjust the code.
628 (auto_load_safe_path_vec_update): Adjust.
629 (filename_is_in_auto_load_safe_path_vec): Adjust.
630 (auto_load_objfile_script_1): Adjust.
631 * build-id.c (build_id_to_debug_bfd): Adjust.
632 * linux-thread-db.c (thread_db_load_search): Adjust.
633 * source.c (add_path): Adjust.
634 (openp): Adjust.
635 * symfile.c (find_separate_debug_file): Adjust.
636 * utils.c (do_free_char_ptr_vec): Remove.
637 (make_cleanup_free_char_ptr_vec): Remove.
638
639 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
640
641 PR gdb/22907
642 * common/pathstuff.c: Conditionally include "<windows.h>".
643
644 2018-03-01 Georg Sauthoff <mail@georg.so>
645
646 PR gdb/22888
647 * gcore.in: Quote variables and switch interpreter to bash.
648
649 2018-03-01 Tom Tromey <tom@tromey.com>
650
651 * dwarf2read.c (alloc_discriminant_info): Fix default_index
652 assertion. Add assertion for discriminant_index.
653 (quirk_rust_enum): Use correct base type name in univariant case.
654
655 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
656
657 * record.c (get_call_history_modifiers): Return a
658 record_print_flags.
659 (cmd_record_call_history): Adjust.
660 * record-btrace.c (record_btrace_call_history): Adjust.
661 (record_btrace_call_history_range): Adjust.
662 (record_btrace_call_history_from): Adjust.
663 * target-debug.h (target_debug_print_record_print_flags): New.
664 * target-delegates.c: Re-generate.
665 * target.c (target_call_history): Change flags type.
666 (target_call_history_from): Likewise.
667 (target_call_history_range): Likewise.
668 * target.h (struct target_ops) <target_call_history>: Likewise.
669 (target_call_history_from): Likewise.
670 (target_call_history_range): Likewise.
671
672 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
673 Simon Marchi <simon.marchi@polymtl.ca>
674
675 * common/common-utils.c: Include "sys/stat.h".
676 (is_regular_file): Move here from "source.c"; change return
677 type to "bool".
678 * common/common-utils.h (is_regular_file): New prototype.
679 * common/pathstuff.c (contains_dir_separator): New function.
680 * common/pathstuff.h (contains_dir_separator): New prototype.
681 * source.c: Don't include "sys/stat.h".
682 (is_regular_file): Move to "common/common-utils.c".
683
684 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
685
686 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
687 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
688 * auto-load.c: Include "common/pathstuff.h".
689 * common/common-def.h (current_directory): Move here.
690 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
691 function.
692 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
693 prototype.
694 * common/pathstuff.c: New file.
695 * common/pathstuff.h: New file.
696 * compile/compile.c: Include "common/pathstuff.h".
697 * defs.h (current_directory): Move to "common/common-defs.h".
698 * dwarf2read.c: Include "common/pathstuff.h".
699 * exec.c: Likewise.
700 * guile/scm-safe-call.c: Likewise.
701 * linux-thread-db.c: Likewise.
702 * main.c: Likewise.
703 * nto-tdep.c: Likewise.
704 * objfiles.c: Likewise.
705 * source.c: Likewise.
706 * symtab.c: Likewise.
707 * utils.c: Include "common/pathstuff.h".
708 (gdb_realpath): Move to "common/pathstuff.c".
709 (gdb_realpath_keepfile): Likewise.
710 (gdb_abspath): Likewise.
711 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
712 (gdb_realpath_keepfile): Likewise.
713 (gdb_abspath): Likewise.
714
715 2018-02-28 John Baldwin <jhb@FreeBSD.org>
716
717 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
718 wildcard process pid for super_resume for kernels with a
719 specific bug.
720
721 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
722
723 * compile/compile.c (get_args): Add additional comments
724 explaining function.
725
726 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
727 Tom Tromey <tom@tromey.com>
728
729 * target.h (memory_write_request_s): Remove typedef. Don't define
730 VEC.
731 (target_write_memory_blocks): Change argument to std::vector.
732 (struct memory_write_request): Add constructor.
733 * target-memory.c (compare_block_starting_address): Return bool.
734 Change argument types.
735 (claim_memory): Change arguments to use std::vector.
736 (split_regular_and_flash_blocks, blocks_to_erase)
737 (compute_garbled_blocks): Likewise.
738 (cleanup_request_data, cleanup_write_requests_vector): Remove.
739 (target_write_memory_blocks): Change argument to std::vector.
740 * symfile.c (struct load_section_data): Add constructor and
741 destructor. Use std::vector for "requests".
742 (struct load_progress_data): Add initializers.
743 (load_section_callback): Update. Use "new".
744 (clear_memory_write_data): Remove.
745 (generic_load): Update.
746
747 2018-02-27 Alan Hayward <alan.hayward@arm.com>
748
749 * arch/aarch64.h: Use common/tdesc.h.
750
751 2018-02-26 Maciej W. Rozycki <macro@mips.com>
752
753 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
754 architecture with a 64-bit ABI.
755
756 2018-02-26 Maciej W. Rozycki <macro@mips.com>
757
758 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
759 ahead of target description loading.
760
761 2018-02-26 Tom Tromey <tom@tromey.com>
762
763 * stack.c (backtrace_command_1): Update.
764 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
765 of "flags".
766 * python/py-framefilter.c (py_print_frame)
767 (gdbpy_apply_frame_filter): Change type of "flags".
768 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
769 of "flags".
770 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
771 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
772 * extension.h (enum frame_filter_flag): Rename from
773 frame_filter_flags.
774 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
775 (apply_ext_lang_frame_filter): Change type of "flags".
776 * extension.c (apply_ext_lang_frame_filter): Change type of
777 "flags".
778 * extension-priv.h (struct extension_language_ops)
779 <apply_frame_filter>: Change type of "flags".
780
781 2018-02-26 Tom Tromey <tom@tromey.com>
782
783 PR python/16497:
784 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
785 off-by-one in py_end computation.
786 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
787 PRINT_MORE_FRAMES.
788 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
789 constant.
790
791 2018-02-26 Tom Tromey <tom@tromey.com>
792
793 * dwarf2read.c (struct variant_field): New.
794 (struct nextfield) <variant>: New field.
795 (dwarf2_add_field): Handle DW_TAG_variant_part.
796 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
797 discriminated union.
798 (read_structure_type): Handle DW_TAG_variant_part.
799 (handle_struct_member_die): New function, extracted from
800 process_structure_scope. Handle DW_TAG_variant.
801 (process_structure_scope): Handle discriminated unions. Call
802 handle_struct_member_die.
803
804 2018-02-26 Tom Tromey <tom@tromey.com>
805
806 * rust-lang.h (rust_last_path_segment): Declare.
807 * rust-lang.c (rust_last_path_segment): Now public. Change
808 contract.
809 (struct disr_info): Remove.
810 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
811 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
812 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
813 (rust_enum_p, rust_enum_variant): New function.
814 (rust_underscore_fields): Remove "offset" parameter.
815 (rust_print_enum): New function.
816 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
817 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
818 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
819 enums.
820 (rust_internal_print_type): New function, from rust_print_type.
821 Remove enum code.
822 (rust_print_type): Call rust_internal_print_type.
823 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
824 Update enum handling.
825 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
826 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
827 (rust_union_quirks): New functions.
828 (process_full_comp_unit, process_full_type_unit): Call
829 rust_union_quirks.
830 (process_structure_scope): Update rust_unions if necessary.
831
832 2018-02-26 Tom Tromey <tom@tromey.com>
833
834 * value.h (value_union_variant): Declare.
835 * valops.c (value_union_variant): New function.
836 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
837 (struct discriminant_info): New.
838 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
839 enumerator.
840 (struct main_type) <flag_discriminated_union>: New field.
841
842 2018-02-26 Tom Tromey <tom@tromey.com>
843
844 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
845 unittests/unpack-selftests.c.
846 * unittests/unpack-selftests.c: New file.
847 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
848
849 2018-02-26 Yao Qi <yao.qi@linaro.org>
850
851 * dwarf2read.c (struct partial_die_info) <read>: New method.
852 (read_partial_die): Remove the declaration.
853 (load_partial_dies): Update.
854 (partial_die_info::partial_die_info):
855 (read_partial_die): Change it to partial_die_info::read.
856
857 2018-02-26 Yao Qi <yao.qi@linaro.org>
858
859 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
860 (fixup_partial_die): Remove declaration.
861 (scan_partial_symbols): Update.
862 (partial_die_parent_scope): Likewise.
863 (partial_die_full_name): Likewise.
864 (fixup_partial_die): Change it to partial_die_info::fixup.
865
866 2018-02-26 Yao Qi <yao.qi@linaro.org>
867
868 * dwarf2read.c (read_partial_die): Update the declaration.
869 (load_partial_dies): Caller update.
870 (read_partial_die): Remove one argument abbrev_len.
871
872 2018-02-26 Yao Qi <yao.qi@linaro.org>
873
874 * dwarf2read.c (struct partial_die_info): Add ctor, delete
875 assignment operator.
876 (load_partial_dies): Use ctor and copy ctor.
877 (read_partial_die): Update.
878 (dwarf2_cu::find_partial_die): Use ctor.
879
880 2018-02-26 Yao Qi <yao.qi@linaro.org>
881
882 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
883 (find_partial_die_in_comp_unit): Change it to
884 dwarf2_cu::find_partial_die.
885 (find_partial_die): Update.
886
887 2018-02-26 Yao Qi <yao.qi@linaro.org>
888
889 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
890 is NULL.
891
892 2018-02-26 Yao Qi <yao.qi@linaro.org>
893
894 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
895
896 2018-02-26 Alan Hayward <alan.hayward@arm.com>
897
898 * arch/amd64.h: Use common/tdesc.h.
899 * arch/i386.c: Likewise.
900 * arch/i386.h: Likewise.
901 * arch/tic6x.c: Likewise.
902 * arch/tdesc.h: Move file from here...
903 * common/tdesc.h: ...to here.
904 * features/aarch64-core.c: Regenerate.
905 * features/aarch64-fpu.c: Regenerate.
906 * features/i386/32bit-avx.c: Regenerate.
907 * features/i386/32bit-avx512.c: Regenerate.
908 * features/i386/32bit-core.c: Regenerate.
909 * features/i386/32bit-linux.c: Regenerate.
910 * features/i386/32bit-mpx.c: Regenerate.
911 * features/i386/32bit-pkeys.c: Regenerate.
912 * features/i386/32bit-sse.c: Regenerate.
913 * features/i386/64bit-avx.c: Regenerate.
914 * features/i386/64bit-avx512.c: Regenerate.
915 * features/i386/64bit-core.c: Regenerate.
916 * features/i386/64bit-linux.c: Regenerate.
917 * features/i386/64bit-mpx.c: Regenerate.
918 * features/i386/64bit-pkeys.c: Regenerate.
919 * features/i386/64bit-segments.c: Regenerate.
920 * features/i386/64bit-sse.c: Regenerate.
921 * features/i386/x32-core.c: Regenerate.
922 * features/tic6x-c6xp.c: Regenerate.
923 * features/tic6x-core.c: Regenerate.
924 * features/tic6x-gp.c: Regenerate.
925 * target-descriptions.c: Use common/tdesc.h.
926 * target-descriptions.h: Likewise.
927
928 2018-02-24 Tom Tromey <tom@tromey.com>
929
930 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
931 (try_thread_db_load_from_dir, thread_db_load_search): Use
932 std::string.
933 (info_auto_load_libthread_db_compare): Return bool. Change
934 argument types.
935 (info_auto_load_libthread_db): Use std::vector, std::string.
936 Remove cleanups.
937
938 2018-02-24 Tom Tromey <tom@tromey.com>
939
940 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
941 std::string.
942 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
943 std::string*.
944 * gdbarch.c: Rebuild.
945 * gdbarch.h: Rebuild.
946 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
947 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
948 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
949 std::string*.
950
951 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
952
953 * gdbtypes.h (sect_offset): Change type to uint64_t.
954 (sect_offset_str): New function.
955 * dwarf2read.c (create_addrmap_from_aranges): Use
956 sect_offset_str.
957 (error_check_comp_unit_head): Likewise.
958 (create_debug_type_hash_table): Likewise.
959 (read_cutu_die_from_dwo): Likewise.
960 (init_cutu_and_read_dies): Likewise.
961 (init_cutu_and_read_dies_no_follow): Likewise.
962 (process_psymtab_comp_unit_reader): Likewise.
963 (partial_die_parent_scope): Likewise.
964 (peek_die_abbrev): Likewise.
965 (process_queue): Likewise.
966 (dwarf2_physname): Likewise.
967 (read_namespace_alias): Likewise.
968 (read_import_statement): Likewise.
969 (create_dwo_cu_reader): Likewise.
970 (create_cus_hash_table): Likewise.
971 (lookup_dwo_cutu): Likewise.
972 (inherit_abstract_dies): Likewise.
973 (read_func_scope): Likewise.
974 (read_call_site_scope): Likewise.
975 (dwarf2_add_member_fn): Likewise.
976 (read_common_block): Likewise.
977 (read_module_type): Likewise.
978 (read_typedef): Likewise.
979 (read_subrange_type): Likewise.
980 (load_partial_dies): Likewise.
981 (read_partial_die): Likewise.
982 (find_partial_die): Likewise.
983 (read_str_index): Likewise.
984 (dwarf2_string_attr): Likewise.
985 (build_error_marker_type): Likewise.
986 (lookup_die_type): Likewise.
987 (dump_die_shallow): Likewise.
988 (follow_die_ref): Likewise.
989 (dwarf2_fetch_die_loc_sect_off): Likewise.
990 (dwarf2_fetch_constant_bytes): Likewise.
991 (follow_die_sig): Likewise.
992 (get_signatured_type): Likewise.
993 (get_DW_AT_signature_type): Likewise.
994 (dwarf2_find_containing_comp_unit): Likewise.
995 (set_die_type): Likewise.
996
997 2018-02-21 John Baldwin <jhb@FreeBSD.org>
998
999 * arch/aarch64.c: Include "common-defs.h".
1000 * arch/amd64.c: Likewise.
1001 * arch/i386.c: Likewise.
1002
1003 2018-02-21 Tom Tromey <tom@tromey.com>
1004
1005 * value.h: (extract_field_op): Update.
1006 * eval.c (extract_field_op): Return a const char *.
1007 * expression.h (parse_expression_for_completion): Update.
1008 * completer.c (complete_expression): Update.
1009 (add_struct_fields): Make fieldname const.
1010 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
1011 (mark_completion_tag, parse_exp_in_context_1): Update.
1012 (parse_expression_for_completion): Change "name" to
1013 unique_xmalloc_ptr*.
1014
1015 2018-02-21 Tom Tromey <tom@tromey.com>
1016
1017 * infcall.c (call_function_by_hand_dummy): Use std::vector.
1018
1019 2018-02-21 Yao Qi <yao.qi@linaro.org>
1020
1021 * avr-tdep.c (avr_read_pc): Change parameter type to
1022 readable_regcache.
1023 * gdbarch.sh (read_pc): Likewise.
1024 * gdbarch.c: Re-generated.
1025 * gdbarch.h: Re-generated.
1026 * hppa-tdep.c (hppa_read_pc): Change parameter type to
1027 readable_regcache.
1028 * ia64-tdep.c (ia64_read_pc): Likewise.
1029 * mips-tdep.c (mips_read_pc): Likewise.
1030 * spu-tdep.c (spu_read_pc): Likewise.
1031
1032 2018-02-21 Yao Qi <yao.qi@linaro.org>
1033
1034 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
1035 * regcache-dump.c: New file.
1036 * regcache.c: Move register_dump to regcache-dump.c.
1037 (maintenance_print_registers): Likewise.
1038 (maintenance_print_raw_registers): Likewise.
1039 (maintenance_print_cooked_registers): Likewise.
1040 (maintenance_print_register_groups): Likewise.
1041 (maintenance_print_remote_registers): Likewise.
1042 (_initialize_regcache): Likewise.
1043 * regcache.h (register_dump): Moved from regcache.c.
1044
1045 2018-02-21 Yao Qi <yao.qi@linaro.org>
1046
1047 * regcache.c (regcache::regcache): Update.
1048 (regcache::invalidate): Move it to detached_regcache::invalidate.
1049 (get_thread_arch_aspace_regcache): Update.
1050 (regcache::raw_update): Update.
1051 (regcache::cooked_read): Remove some code.
1052 (regcache::cooked_read_value): Likewise.
1053 (regcache::raw_write): Remove assert on m_readonly_p.
1054 (regcache::raw_supply_integer): Move it to
1055 detached_regcache::raw_supply_integer.
1056 (regcache::raw_supply_zeroed): Likewise.
1057 * regcache.h (detached_regcache) <raw_supply_integer>: New
1058 declaration.
1059 <raw_supply_zeroed, invalidate>: Likewise.
1060 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
1061 <invalidate>: Likewise.
1062 <m_readonly_p>: Removed.
1063
1064 2018-02-21 Yao Qi <yao.qi@linaro.org>
1065
1066 * infcmd.c (get_return_value): Let stop_regs point to
1067 get_current_regcache.
1068 * regcache.c (regcache::regcache): Remove.
1069 (register_dump_reg_buffer): New class.
1070 (regcache_print): Adjust.
1071 * regcache.h (regcache): Remove constructors.
1072
1073 2018-02-21 Yao Qi <yao.qi@linaro.org>
1074
1075 * regcache.c (class register_dump): New class.
1076 (register_dump_regcache, register_dump_none): New class.
1077 (register_dump_remote, register_dump_groups): New class.
1078 (regcache_print): Update.
1079 * regcache.h (regcache_dump_what): Move it to regcache.c.
1080 (regcache) <dump>: Remove.
1081
1082 2018-02-21 Yao Qi <yao.qi@linaro.org>
1083
1084 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
1085 reg_buffer_rw *.
1086 (jit_unwind_reg_set_impl): Call raw_supply.
1087 (jit_frame_sniffer): Use reg_buffer_rw.
1088 * record-full.c (record_full_core_regbuf): Change its type.
1089 (record_full_core_open_1): Use reg_buffer_rw.
1090 (record_full_close): Likewise.
1091 (record_full_core_fetch_registers): Use regcache->raw_supply.
1092 (record_full_core_store_registers): Likewise.
1093 * regcache.c (regcache::get_register_status): Move it to
1094 reg_buffer.
1095 (regcache_raw_set_cached_value): Remove.
1096 (regcache::raw_set_cached_value): Remove.
1097 (regcache::raw_write): Call raw_supply.
1098 (regcache::raw_supply): Move it to reg_buffer_rw.
1099 * regcache.h (regcache_raw_set_cached_value): Remove.
1100 (reg_buffer_rw): New class.
1101
1102 2018-02-21 Yao Qi <yao.qi@linaro.org>
1103
1104 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
1105 readonly_detached_regcache.
1106 (dummy_frame_prev_register): Use regcache->cooked_read.
1107 * frame.c (frame_save_as_regcache): Change return type.
1108 (frame_pop): Update.
1109 * frame.h (frame_save_as_regcache): Update declaration.
1110 * inferior.h (get_infcall_suspend_state_regcache): Update
1111 declaration.
1112 * infrun.c (infcall_suspend_state) <registers>: use
1113 readonly_detached_regcache.
1114 (save_infcall_suspend_state): Don't use regcache_dup.
1115 (get_infcall_suspend_state_regcache): Change return type.
1116 * linux-fork.c (struct fork_info) <savedregs>: Change to
1117 readonly_detached_regcache.
1118 <pc>: New field.
1119 (fork_save_infrun_state): Don't use regcache_dup.
1120 (info_checkpoints_command): Adjust.
1121 * mi/mi-main.c (register_changed_p): Update declaration.
1122 (mi_cmd_data_list_changed_registers): Use
1123 readonly_detached_regcache.
1124 (register_changed_p): Change parameter type to
1125 readonly_detached_regcache.
1126 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
1127 readonly_detached_regcache.
1128 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
1129 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
1130 New.
1131 (regcache::save): Move it to reg_buffer.
1132 (regcache::restore): Change parameter type.
1133 (regcache_dup): Remove.
1134 * regcache.h (reg_buffer) <save>: New method.
1135 (readonly_detached_regcache): New class.
1136 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
1137 readonly_detached_regcache.
1138 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
1139
1140 2018-02-21 Yao Qi <yao.qi@linaro.org>
1141
1142 * frame.c (frame_save_as_regcache): Use regcache method save.
1143 (frame_pop): Use regcache method restore.
1144 * infrun.c (restore_infcall_suspend_state): Likewise.
1145 * linux-fork.c (fork_load_infrun_state): Likewise.
1146 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
1147 save.
1148 * regcache.c (regcache_save): Remove.
1149 (regcache::restore): More asserts.
1150 (regcache_cpy): Remove.
1151 * regcache.h (regcache_save): Remove the declaration.
1152 (regcache::restore): Move from private to public.
1153 Remove the friend declaration of regcache_cpy.
1154 (regcache_cpy): Remove declaration.
1155
1156 2018-02-21 Yao Qi <yao.qi@linaro.org>
1157
1158 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
1159 parameter type to 'readable_regcache *'.
1160 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1161 * arm-tdep.c (arm_neon_quad_read): Likewise.
1162 (arm_pseudo_read): Likewise.
1163 * avr-tdep.c (avr_pseudo_register_read): Likewise.
1164 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1165 * frv-tdep.c (frv_pseudo_register_read): Likewise.
1166 * gdbarch.c: Re-generated.
1167 * gdbarch.h: Re-generated.
1168 * gdbarch.sh (pseudo_register_read): Change parameter type to
1169 'readable_regcache *'.
1170 (pseudo_register_read_value): Likewise.
1171 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
1172 (h8300_pseudo_register_read): Likewise.
1173 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
1174 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1175 (i386_pseudo_register_read_into_value): Likewise.
1176 (i386_pseudo_register_read_value): Likewise.
1177 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
1178 declaration.
1179 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
1180 * m32c-tdep.c (m32c_raw_read): Likewise.
1181 (m32c_read_flg): Likewise.
1182 (m32c_banked_register): Likewise.
1183 (m32c_banked_read): Likewise.
1184 (m32c_sb_read): Likewise.
1185 (m32c_part_read): Likewise.
1186 (m32c_cat_read): Likewise.
1187 (m32c_r3r2r1r0_read): Likewise.
1188 (m32c_pseudo_register_read): Likewise.
1189 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1190 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1191 (mep_pseudo_cr64_read): Likewise.
1192 (mep_pseudo_register_read): Likewise.
1193 * mips-tdep.c (mips_pseudo_register_read): Likewise.
1194 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1195 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1196 * regcache.c (regcache::raw_read): Move it to readable_regcache.
1197 (regcache::cooked_read): Likewise.
1198 (regcache::cooked_read_value): Likewise.
1199 (regcache_cooked_read_signed):
1200 (regcache::cooked_read): Likewise.
1201 * regcache.h (readable_regcache): New class.
1202 (regcache): Inherit readable_regcache. Move some methods to
1203 readable_regcache.
1204 * rl78-tdep.c (rl78_pseudo_register_read): Change
1205 parameter type to 'readable_regcache *'.
1206 * rs6000-tdep.c (do_regcache_raw_read): Remove.
1207 (e500_pseudo_register_read): Change parameter type to
1208 'readable_regcache *'.
1209 (dfp_pseudo_register_read): Likewise.
1210 (vsx_pseudo_register_read): Likewise.
1211 (efpr_pseudo_register_read): Likewise.
1212 * s390-tdep.c (s390_pseudo_register_read): Likewise.
1213 * sh-tdep.c (sh_pseudo_register_read): Likewise.
1214 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
1215 (sh64_pseudo_register_read): Likewise.
1216 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
1217 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1218 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
1219 (spu_pseudo_register_read): Likewise.
1220 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1221 (xtensa_pseudo_register_read): Likewise.
1222
1223 2018-02-21 Yao Qi <yao.qi@linaro.org>
1224
1225 * regcache.c (regcache::regcache): Call reg_buffer ctor.
1226 (regcache::arch): Move it to reg_buffer::arch.
1227 (regcache::register_buffer): Likewise.
1228 (regcache::assert_regnum): Likewise.
1229 (regcache::num_raw_registers): Likewise.
1230 * regcache.h (reg_buffer): New class.
1231 (regcache): Inherit reg_buffer.
1232
1233 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
1234
1235 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
1236 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
1237
1238 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
1239
1240 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
1241
1242 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1243
1244 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
1245 (SFILES): Remove common/*.c files.
1246 (COMMON_OBS): Remove some *.o files built from common/*.c files.
1247 * common/common.host: Add common reference.
1248 * configure.ac: Likewise.
1249 * configure: Regenerate.
1250
1251 2018-02-16 Yao Qi <yao.qi@linaro.org>
1252
1253 * block.c (block_namespace_info): Inherit allocate_on_obstack.
1254 (block_initialize_namespace): Use new.
1255 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
1256 (dwarf2_free_objfile): Use delete.
1257 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
1258 (copy_type_recursive): Use new.
1259 * gdb_obstack.h (allocate_on_obstack): New.
1260
1261 2018-02-15 Yao Qi <yao.qi@linaro.org>
1262
1263 PR gdb/22849
1264 * inferior.c (exit_inferior_1): Reset inf->control.
1265
1266 2018-02-15 Joel Brobecker <brobecker@adacore.com>
1267
1268 * ada-lang.c (ada_to_fixed_value_create): Delete advance
1269 declaration.
1270
1271 2018-02-14 Pedro Alves <palves@redhat.com>
1272
1273 * frame-unwind.c (frame_unwind_try_unwinder): Always call
1274 frame_cleanup_after_sniffer on exception.
1275
1276 2018-02-14 Tom Tromey <tom@tromey.com>
1277
1278 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
1279 const.
1280 (solib_bfd_open): Make pathname const.
1281 * solib.c (solib_bfd_open): Make pathname const.
1282 * solib-spu.c (spu_bfd_fopen): Make name const.
1283 (spu_bfd_open): Make pathname const.
1284 * solib-darwin.c (darwin_bfd_open): Make pathname const.
1285 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
1286
1287 2018-02-14 Tom Tromey <tom@tromey.com>
1288
1289 * symfile.c (symfile_bfd_open): Update.
1290 * source.h (openp, source_full_path_of, find_and_open_source):
1291 Change argument type to unique_xmalloc_ptr.
1292 * source.c (openp): Take a unique_xmalloc_ptr.
1293 (source_full_path_of, find_and_open_source): Likewise.
1294 (open_source_file, symtab_to_fullname): Update.
1295 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
1296 unique_xmalloc_ptr.
1297 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
1298 (exec_file_find): Update.
1299 * psymtab.c (psymtab_to_fullname): Update.
1300 * nto-tdep.h (nto_find_and_open_solib): Update.
1301 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
1302 unique_xmalloc_ptr.
1303 * exec.c (exec_file_attach): Update.
1304 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
1305 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
1306
1307 2018-02-14 Tom Tromey <tom@tromey.com>
1308
1309 * solib.c: Include source.h.
1310 * nto-tdep.c: Include source.h.
1311 * mi/mi-cmd-env.c: Include source.h.
1312 * infcmd.c: Include source.h.
1313 * exec.c: Include source.h.
1314 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
1315 (add_path, directory_switch, source_path, init_source_path): Move
1316 declarations...
1317 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
1318 (add_path, directory_switch, source_path, init_source_path):
1319 ...here.
1320
1321 2018-02-14 Tom Tromey <tom@tromey.com>
1322
1323 * solist.h (exec_file_find, solib_find): Return
1324 unique_xmalloc_ptr.
1325 (solib_bfd_fopen): Take a const char *.
1326 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
1327 (exec_file_find, solib_find): Likewise.
1328 (solib_bfd_fopen): Do not take ownership of "pathname".
1329 (solib_bfd_open): Use unique_xmalloc_ptr.
1330 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
1331 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
1332 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
1333 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
1334
1335 2018-02-14 Joel Brobecker <brobecker@adacore.com>
1336
1337 * ada-lang.c (name_match_type_from_name): Remove reference to
1338 ada_name_for_lookup in function's documentation.
1339 * ada-lang.h (ada_name_for_lookup): Delete declaration.
1340
1341 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1342
1343 * defs.h (enum openp_flags): New enum.
1344 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
1345 Move to enum openp_flags.
1346 (openp_flags): New enum flags.
1347 (openp): Change parameter type to openp_flags.
1348 * source.c (openp): Change parameter type to openp_flags.
1349 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
1350 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
1351
1352 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1353
1354 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
1355 per-command.
1356
1357 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
1358
1359 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
1360 into...
1361 (class dwarf2_queue_guard): ...the destructor of this new class.
1362 (dw2_do_instantiate_symtab): Create instance of the new class
1363 dwarf2_queue_guard, remove cleanup.
1364
1365 2018-02-09 Tom Tromey <tom@tromey.com>
1366
1367 * source.c (find_source_lines): Don't reference past the end of
1368 the vector.
1369
1370 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1371
1372 * remote.c (remote_btrace_maybe_reopen): Change error message.
1373 * btrace.c (btrace_enable): Likewise.
1374 (parse_xml_btrace): Likewise.
1375 (parse_xml_btrace_conf): Likewise.
1376
1377 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1378
1379 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
1380 (linux_enable_pt, linux_enable_bts): Call
1381 diagnose_perf_event_open_fail.
1382
1383 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1384
1385 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
1386 Remove parameter and change return type. Update callers. Move it.
1387 (linux_enable_bts, linux_enable_pt): Improve error message.
1388 (linux_enable_pt): Remove zero buffer size check.
1389 (linux_enable_btrace): Improve error messages. Remove NULL return
1390 check.
1391
1392 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1393
1394 * btrace.c (btrace_enable): Remove target_supports_btrace call.
1395 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
1396 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
1397 (linux_supports_pt, linux_supports_btrace): Remove.
1398 (linux_enable_bts): Call cpu_supports_bts.
1399 * nat/linux-btrace.h (linux_supports_btrace): Remove.
1400 * remote.c (remote_supports_btrace): Remove.
1401 (init_remote_ops): Remove remote_supports_btrace.
1402 * target-delegates.c: Regenerated.
1403 * target.c (target_supports_btrace): Remove.
1404 * target.h (target_ops) <to_supports_btrace>: Remove
1405 (target_supports_btrace): Remove.
1406 * x86-linux-nat.c (x86_linux_create_target): Remove
1407 linux_supports_btrace.
1408
1409 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1410
1411 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
1412 btrace failed.
1413 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
1414 exception and use message in own exception.
1415
1416 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1417
1418 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
1419 (perf_event_pt_event_type): Use gdb_file_up.
1420 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
1421 scoped_fd, and scoped_mmap.
1422
1423 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1424
1425 * common/scoped_mmap.h: New.
1426 * unittests/scoped_mmap-selftest.c: New.
1427 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1428 unittests/scoped_mmap-selftest.c.
1429
1430 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1431
1432 * common/scoped_fd.h: New.
1433 * unittests/scoped_fd-selftest.c: New.
1434 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1435 unittests/scoped_fd-selftest.c.
1436
1437 2018-02-09 Tom Tromey <tom@tromey.com>
1438
1439 * auto-load.c (auto_load_section_scripts): Use
1440 gdb::unique_xmalloc_ptr.
1441
1442 2018-02-09 Tom Tromey <tom@tromey.com>
1443
1444 * auto-load.c (execute_script_contents): Use std::string.
1445
1446 2018-02-09 Joel Brobecker <brobecker@adacore.com>
1447
1448 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
1449 Python function, rather than a new command.
1450
1451 2018-02-08 Tom Tromey <tom@tromey.com>
1452
1453 * solib.c (solib_find_1): Use std::string.
1454 (solib_bfd_fopen): Use unique_xmalloc_ptr.
1455
1456 2018-02-08 Tom Tromey <tom@tromey.com>
1457
1458 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
1459
1460 2018-02-08 Tom Tromey <tom@tromey.com>
1461
1462 * source.c (find_source_lines): Use gdb::def_vector.
1463
1464 2018-02-08 Tom Tromey <tom@tromey.com>
1465
1466 * macrocmd.c (struct temporary_macro_definition): New.
1467 (macro_define_command): Use temporary_macro_definition. Remove
1468 cleanups.
1469 (free_macro_definition_ptr): Remove.
1470
1471 2018-02-08 Tom Tromey <tom@tromey.com>
1472
1473 * macroexp.c (maybe_expand): Use std::string.
1474
1475 2018-02-08 Tom Tromey <tom@tromey.com>
1476
1477 * macroexp.c (struct macro_buffer): Add initializers for some
1478 members.
1479 (init_buffer, init_shared_buffer, free_buffer)
1480 (free_buffer_return_text): Remove.
1481 (macro_buffer): New constructors.
1482 (~macro_buffer): New destructor.
1483 (macro_buffer::set_shared): New method.
1484 (macro_buffer::resize_buffer, macro_buffer::appendc)
1485 (macro_buffer::appendmem): Now methods, not free functions.
1486 (set_token, append_tokens_without_splicing, stringify)
1487 (macro_stringify): Update.
1488 (gather_arguments): Change return type. Remove argc_p argument,
1489 add args_ptr argument. Use std::vector.
1490 (substitute_args): Remove argc argument. Accept std::vector.
1491 (expand): Update. Use std::vector.
1492 (scan, macro_expand, macro_expand_next): Update.
1493
1494 2018-02-08 Tom Tromey <tom@tromey.com>
1495
1496 * symtab.c (default_collect_symbol_completion_matches_break_on):
1497 Use unique_xmalloc_ptr.
1498 * macroscope.h: (sal_macro_scope, user_macro_scope)
1499 (default_macro_scope): Return unique_xmalloc_ptr.
1500 * macroscope.c (sal_macro_scope, user_macro_scope)
1501 (default_macro_scope): Return unique_xmalloc_ptr.
1502 * macroexp.h (macro_expand, macro_expand_once): Return
1503 unique_xmalloc_ptr.
1504 * macroexp.c (macro_expand, macro_expand_once): Return
1505 unique_xmalloc_ptr.
1506 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1507 (info_macro_command, info_macros_command): Use
1508 unique_xmalloc_ptr.
1509 * compile/compile-c-support.c (write_macro_definitions): Use
1510 unique_xmalloc_ptr.
1511 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
1512
1513 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
1514
1515 * value.c (value_static_field): Assign field type instead of
1516 containing type when returning an optimized out value.
1517
1518 2018-02-06 Yao Qi <yao.qi@linaro.org>
1519
1520 * ft32-tdep.c (ft32_read_pc): Remove.
1521 (ft32_write_pc): Remove.
1522 (ft32_gdbarch_init): Update.
1523 * m32r-tdep.c (m32r_read_pc): Remove.
1524 (m32r_gdbarch_init): Update.
1525 * mep-tdep.c (mep_read_pc): Remove.
1526 (mep_gdbarch_init): Update.
1527 * microblaze-tdep.c (microblaze_write_pc): Remove.
1528 (microblaze_gdbarch_init): Update.
1529 * mn10300-tdep.c (mn10300_read_pc): Remove.
1530 (mn10300_write_pc): Remove.
1531 (mn10300_gdbarch_init): Update.
1532 * moxie-tdep.c (moxie_read_pc): Remove.
1533 (moxie_write_pc): Remove.
1534 (moxie_gdbarch_init): Update.
1535
1536 2018-02-06 Yao Qi <yao.qi@linaro.org>
1537
1538 * expprint.c (print_subexp_standard): Handle
1539 OP_F77_UNDETERMINED_ARGLIST.
1540 (dump_subexp_body_standard): Likewise.
1541
1542 2018-02-05 Alan Hayward <alan.hayward@arm.com>
1543
1544 * target-descriptions.c (tdesc_element_visitor) Add empty
1545 implementations.
1546 (tdesc_type): Move make_gdb_type from here.
1547 (tdesc_type_builtin): Likewise.
1548 (tdesc_type_vector): Likewise.
1549 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
1550 (make_gdb_type_struct): Move from tdesc_type_with_fields.
1551 (make_gdb_type_union): Likewise.
1552 (make_gdb_type_flags): Likewise.
1553 (make_gdb_type_enum): Likewise.
1554 (make_gdb_type): New function.
1555 (tdesc_register_type): Use static make_gdb_type.
1556
1557 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
1558
1559 * infcmd.c (default_print_one_register_info): Align natural-format
1560 column values consistently one under another.
1561 (pad_to_column): New function.
1562
1563 2018-02-05 Joel Brobecker <brobecker@adacore.com>
1564
1565 * dwarf2read.c (dwarf2_physname): Move commment.
1566
1567 2018-02-01 Leszek Swirski <leszeks@google.com>
1568
1569 * varobj.c (varobj_formatted_print_options): Allow recursive
1570 pretty printing if pretty printing is enabled.
1571
1572 2018-02-01 Leszek Swirski <leszeks@google.com>
1573
1574 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
1575 names after a structop as a filename.
1576
1577 2018-02-01 Yao Qi <yao.qi@linaro.org>
1578
1579 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
1580 (arm_record_coproc_data_proc): Likewise.
1581
1582 2018-02-01 Yao Qi <yao.qi@linaro.org>
1583
1584 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
1585
1586 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
1587
1588 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
1589 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
1590
1591 2018-01-31 Pedro Alves <palves@redhat.com>
1592
1593 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
1594 * inflow.c (child_terminal_save_inferior): Wrap reference to
1595 tcgetpgrp in HAVE_TERMIOS_H.
1596 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
1597 _WIN32.
1598 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
1599 always iterate over all inferiors.
1600 (gdbsim_cntrl_c): Adjust.
1601 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
1602
1603 2018-01-31 Joel Brobecker <brobecker@adacore.com>
1604
1605 * gdbtypes.c (lookup_array_range_type): Make sure the array's
1606 index type is objfile-owned if the element type is as well.
1607
1608 2018-01-31 Joel Brobecker <brobecker@adacore.com>
1609
1610 GDB 8.1 released.
1611
1612 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
1613
1614 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
1615 "features/s390x-linux64.c".
1616 (_initialize_s390_linux_tdep): Remove initialization of tdescs
1617 s390_linux32 and s390x_linux64.
1618 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
1619 default tdesc.
1620 * s390-tdep.c: Include "features/s390-linux32.c" and
1621 "features/s390x-linux64.c".
1622 (s390_tdesc_valid): Add check for tdesc_has_registers.
1623 (s390_gdbarch_init): Make sure there is always a valid tdesc.
1624 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
1625 tdesc_s390x_linux64.
1626 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
1627 tdesc_s390x_linux64 to...
1628 * s390-tdep.h: ...here.
1629
1630 2018-01-30 Pedro Alves <palves@redhat.com>
1631
1632 PR gdb/13211
1633 * config.in, configure: Regenerate.
1634 * configure.ac: Check for getpgid.
1635 * go32-nat.c (go32_pass_ctrlc): New.
1636 (go32_target): Install it.
1637 * inf-child.c (inf_child_target): Install
1638 child_terminal_save_inferior, child_pass_ctrlc and
1639 child_interrupt.
1640 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
1641 (inf_ptrace_target): No longer install it.
1642 * infcmd.c (interrupt_target_1): Adjust.
1643 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
1644 (child_interrupt): Declare.
1645 (inferior::terminal_state): New.
1646 * inflow.c (struct terminal_info): Update comments.
1647 (inferior_process_group): Delete.
1648 (terminal_is_ours): Delete.
1649 (gdb_tty_state): New.
1650 (child_terminal_init): Adjust.
1651 (is_gdb_terminal, sharing_input_terminal_1)
1652 (sharing_input_terminal): New functions.
1653 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
1654 Set the process's actual process group in the foreground if
1655 possible. Handle is_ours_for_output/is_ours distinction. Don't
1656 mark terminal as the inferior's if not sharing GDB's terminal.
1657 Don't check attach_flag.
1658 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
1659 pass down a target_terminal_state.
1660 (child_terminal_save_inferior): New, factored out from ...
1661 (child_terminal_ours_1): ... this. Handle
1662 target_terminal_state::is_ours_for_output.
1663 (child_interrupt, child_pass_ctrlc): New.
1664 (inflow_inferior_exit): Clear the inferior's terminal_state.
1665 (copy_terminal_info): Copy the inferior's terminal state.
1666 (_initialize_inflow): Remove reference to terminal_is_ours.
1667 * inflow.h (inferior_process_group): Delete.
1668 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
1669 * procfs.c (procfs_target): Don't install procfs_interrupt.
1670 (procfs_interrupt): Delete.
1671 * remote.c (remote_serial_quit_handler): Adjust.
1672 (remote_interrupt): Remove ptid parameter. Adjust.
1673 * target-delegates.c: Regenerate.
1674 * target.c: Include "terminal.h".
1675 (target_terminal::terminal_state): Rename to ...
1676 (target_terminal::m_terminal_state): ... this.
1677 (target_terminal::init): Adjust.
1678 (target_terminal::inferior): Adjust to per-inferior
1679 terminal_state.
1680 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
1681 (target_terminal::ours, target_terminal::ours_for_output): Use
1682 target_terminal_is_ours_kind.
1683 (target_interrupt): Remove ptid parameter. Adjust.
1684 (default_target_pass_ctrlc): Adjust.
1685 * target.h (target_ops::to_terminal_save_inferior): New field.
1686 (target_ops::to_interrupt): Remove ptid_t parameter.
1687 (target_interrupt): Remove ptid_t parameter. Update comment.
1688 (target_pass_ctrlc): Update comment.
1689 * target/target.h (target_terminal_state): New scoped enum,
1690 factored out of ...
1691 (target_terminal::terminal_state): ... here.
1692 (target_terminal::inferior): Update comments.
1693 (target_terminal::restore_inferior): New.
1694 (target_terminal::is_inferior, target_terminal::is_ours)
1695 (target_terminal::is_ours_for_output): Adjust.
1696 (target_terminal::scoped_restore_terminal_state): Adjust to
1697 rename, and call restore_inferior() instead of inferior().
1698 (target_terminal::scoped_restore_terminal_state::m_state): Change
1699 type.
1700 (target_terminal::terminal_state): Rename to ...
1701 (target_terminal::m_terminal_state): ... this and change type.
1702
1703 2018-01-30 Pedro Alves <palves@redhat.com>
1704
1705 * linux-nat.c (wait_for_signal): New function.
1706 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
1707 directly.
1708 (async_terminal_is_ours)
1709 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
1710 (linux_nat_add_target): Don't override
1711 to_terminal_inferior/to_terminal_ours.
1712
1713 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
1714
1715 * remote.c (remote_follow_fork): Don't call "detach_inferior".
1716
1717 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
1718
1719 * dwarf2read.c (free_dwo_files): Add forward-declaration.
1720 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
1721 dwarf2_per_objfile_free here.
1722 (dwarf2_per_objfile_free): Remove.
1723 (_initialize_dwarf2_read): Don't register
1724 dwarf2_per_objfile_free as a registry cleanup.
1725
1726 2018-01-27 Eli Zaretskii <eliz@gnu.org>
1727
1728 Avoid compilation errors in MinGW native builds
1729
1730 The error is triggered by including python-internal.h, and the
1731 error message is:
1732
1733 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
1734 from build-gnulib/import/math.h:27,
1735 from d:/usr/Python26/include/pyport.h:235,
1736 from d:/usr/Python26/include/Python.h:58,
1737 from python/python-internal.h:94,
1738 from python/py-arch.c:24:
1739 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
1740 using ::hypot;
1741 ^~~~~
1742
1743 This happens because Python headers define 'hypot' to expand t
1744 '_hypot' in the Windows builds.
1745 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
1746 'hypoth'. This avoids a compilation error.
1747
1748 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1749
1750 * MAINTAINERS (Write After Approval): Fix ordering.
1751
1752 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1753
1754 * MAINTAINERS (Write After Approval): Add Alan Hayward.
1755
1756 2018-01-26 Alan Modra <amodra@gmail.com>
1757
1758 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
1759 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
1760 Remove nop. Make const. Comment.
1761 (powerpc32_plt_stub_so_2): New.
1762 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
1763 Correct count. Update uses.
1764 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
1765 Move common code reading PLT entry word. Correct
1766 powerpc32_plt_stub PLT address calculation.
1767 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
1768 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
1769 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
1770 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
1771 (ppc64_standard_linkage8): Likewise.
1772 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
1773 Correct insns description.
1774 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
1775
1776 2018-01-24 Pedro Alves <palves@redhat.com>
1777
1778 GCC PR libstdc++/83906
1779 * gdbtypes.c (operator==(const dynamic_prop &,
1780 const dynamic_prop &)): New.
1781 (operator==(const range_bounds &, const range_bounds &)): New.
1782 (check_types_equal): Use them instead of memcmp.
1783 * gdbtypes.h (operator==(const dynamic_prop &,
1784 const dynamic_prop &)): Declare.
1785 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
1786 (operator==(const range_bounds &, const range_bounds &)): Declare.
1787 (operator!=(const range_bounds &, const range_bounds &)): Declare.
1788
1789 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1790
1791 * s390-linux-tdep.c (s390_record_address_mask)
1792 (s390_record_calc_disp_common, s390_record_calc_disp)
1793 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1794 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1795 (s390_process_record): Move to s390-tdep.c.
1796 (s390_linux_init_abi_any): Adjust.
1797 * s390-tdep.c (s390_record_address_mask)
1798 (s390_record_calc_disp_common, s390_record_calc_disp)
1799 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1800 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1801 (s390_process_record): Moved from s390-linux-tdep.c
1802 (s390_gdbarch_init): Adjust.
1803
1804 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1805
1806 * s390-linux-nat.c (s390-tdep.h): New include.
1807 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
1808 (HFILES_NO_SRCDIR): Add s390-tdep.h.
1809 (ALLDEPFILES): Add s390-tdep.c.
1810 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
1811 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
1812 * s390-tdep.h: ...this. New file.
1813 * s390-linux-tdep.c (s390-tdep.h): New include.
1814 (_initialize_s390_tdep): Rename to...
1815 (_initialize_s390_linux_tdep): ...this and adjust.
1816 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
1817 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
1818 s390-tdep.h.
1819 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
1820 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
1821 (s390_is_partial_instruction, s390_software_single_step)
1822 (is_non_branch_ril, s390_displaced_step_copy_insn)
1823 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
1824 (s390_prologue_data, s390_addr, s390_store, s390_load)
1825 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
1826 (s390_register_call_saved, s390_guess_tracepoint_registers)
1827 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
1828 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
1829 (s390_pseudo_register_name, s390_pseudo_register_type)
1830 (s390_pseudo_register_read, s390_pseudo_register_write)
1831 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
1832 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
1833 (s390_addr_bits_remove, s390_address_class_type_flags)
1834 (s390_address_class_type_flags_to_name)
1835 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
1836 (s390_function_arg_float, s390_function_arg_vector)
1837 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
1838 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
1839 (s390_frame_align, s390_register_return_value, s390_return_value)
1840 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
1841 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
1842 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
1843 (s390_trad_frame_prev_register, s390_unwind_cache)
1844 (s390_prologue_frame_unwind_cache)
1845 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
1846 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
1847 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
1848 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
1849 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
1850 (s390_frame_base_address, s390_local_base_address)
1851 (s390_frame_base, s390_gcc_target_options)
1852 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
1853 (s390_validate_reg_range, s390_tdesc_valid)
1854 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
1855 * s390-tdep.c: ...this. New file.
1856
1857 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1858
1859 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
1860 (s390_process_record, s390_gdbarch_tdep_alloc)
1861 (s390_linux_init_abi_any): Use/set new hook.
1862
1863 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1864
1865 * s390-linux-tdep.c (osabi.h): New include.
1866 (s390_linux_init_abi_31, s390_linux_init_abi_64)
1867 (s390_linux_init_abi_any): New functions.
1868 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
1869
1870 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1871
1872 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
1873 tdesc_has_registers check
1874
1875 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1876
1877 * s390-linux-tdep.c (s390_tdesc_valid): New function.
1878 (s390_validate_reg_range): New macro.
1879 (s390_gdbarch_init): Adjust.
1880
1881 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1882
1883 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
1884 (s390_gdbarch_tdep_alloc): Adjust.
1885 (s390_gdbarch_init): Adjust.
1886
1887 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1888
1889 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
1890 <have_tdb>: Change type to bool.
1891 (s390_gdbarch_tdep_alloc): Adjust.
1892 (s390_gdbarch_init): Adjust.
1893
1894 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1895
1896 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
1897 (gdbarch_tdep) <have_upper, have_vx>: New fields.
1898 (s390_gdbarch_tdep_alloc): New function.
1899 (s390_gdbarch_init): Allocate tdep at start and use its fields
1900 instead of separate variables.
1901
1902 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1903
1904 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
1905 when looking for cached gdbarch and add comment for remaining.
1906
1907 2018-01-22 Pedro Alves <palves@redhat.com>
1908 Sergio Durigan Junior <sergiodj@redhat.com>
1909
1910 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
1911 case.
1912
1913 2018-01-22 Maciej W. Rozycki <macro@mips.com>
1914
1915 * MAINTAINERS: Update my company e-mail address.
1916
1917 2018-01-22 Yao Qi <yao.qi@linaro.org>
1918
1919 * regcache.c (cooked_write_test): New function.
1920 (_initialize_regcache): Register the test.
1921
1922 2018-01-22 Yao Qi <yao.qi@linaro.org>
1923
1924 * ia64-tdep.c (ia64_pseudo_register_read): Call
1925 regcache->cooked_read instead of regcache_cooked_read_unsigned.
1926 * m32c-tdep.c (m32c_cat_read): Likewise.
1927 (m32c_r3r2r1r0_read): Likewise.
1928 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1929 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1930
1931 2018-01-22 Yao Qi <yao.qi@linaro.org>
1932
1933 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
1934 method raw_read instead of regcache_raw_read.
1935 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1936 * arm-tdep.c (arm_neon_quad_read): Likewise.
1937 * avr-tdep.c (avr_pseudo_register_read): Likewise.
1938 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1939 * frv-tdep.c (frv_pseudo_register_read): Likewise.
1940 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
1941 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1942 (i386_pseudo_register_read_into_value): Likewise.
1943 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1944 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1945 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1946 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
1947 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
1948 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
1949 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1950 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
1951 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
1952
1953 2018-01-22 Yao Qi <yao.qi@linaro.org>
1954
1955 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
1956 * configure.tgt: Remove target mt.
1957 * mt-tdep.c: Remove.
1958 * regcache.c (cooked_read_test): Remove the check for mt.
1959
1960 2018-01-22 Yao Qi <yao.qi@linaro.org>
1961
1962 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
1963 instead of gdbarch_pseudo_register_read_value.
1964
1965 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1966
1967 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
1968 language is Ada.
1969
1970 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1971
1972 * linespec.c (create_sals_line_offset): Remove code that preserved
1973 the symtab_and_line's line number.
1974
1975 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1976
1977 * varobj.c (varobj_create): Don't set valid_block when creating a
1978 floating varobj.
1979
1980 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1981
1982 * varobj.c (varobj_create): Remove out of date comment.
1983
1984 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1985
1986 PR mi/20395
1987 * ada-exp.y (write_var_from_sym): Pass extra parameter when
1988 updating innermost block.
1989 * parse.c (innermost_block_tracker::update): Take extra type
1990 parameter, and check types match before updating innermost block.
1991 (write_dollar_variable): Update innermost block for registers.
1992 * parser-defs.h (enum innermost_block_tracker_type): New enum.
1993 (innermost_block_tracker::innermost_block_tracker): Initialise
1994 m_types member.
1995 (innermost_block_tracker::reset): Take type parameter.
1996 (innermost_block_tracker::update): Take type parameter, and pass
1997 type through as needed.
1998 (innermost_block_tracker::m_types): New member.
1999 * varobj.c (varobj_create): Pass type when reseting innermost
2000 block.
2001
2002 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
2003
2004 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
2005 * ada-lang.c (resolve_subexp): Likewise.
2006 * breakpoint.c (set_breakpoint_condition) Likewise.
2007 (watch_command_1) Likewise.
2008 * c-exp.y (variable): Likewise.
2009 * d-exp.y (PrimaryExpression): Likewise.
2010 * f-exp.y (variable): Likewise.
2011 * go-exp.y (variable): Likewise.
2012 * m2-exp.y (variable): Likewise.
2013 * objfiles.c (objfile::~objfile): Likewise.
2014 * p-exp.y (variable): Likewise.
2015 * parse.c (innermost_block): Change type.
2016 * parser-defs.h (class innermost_block_tracker): New.
2017 (innermost_block): Change to innermost_block_tracker.
2018 * printcmd.c (display_command): Switch to innermost_block API.
2019 (do_one_display): Likewise.
2020 * rust-exp.y (do_one_display): Likewise.
2021 * symfile.c (clear_symtab_users): Likewise.
2022 * varobj.c (varobj_create): Switch to innermost_block API, replace
2023 use of innermost_block with block stored on varobj object.
2024
2025 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
2026
2027 * expression.h (innermost_block): Remove declaration.
2028 * varobj.c: Add 'parser-defs.h' include.
2029
2030 2018-01-19 Tom Tromey <tom@tromey.com>
2031
2032 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
2033 symbols in the static and global blocks.
2034
2035 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2036
2037 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
2038 gdb_ptrace.h, and move including gdb_wait.h ...
2039 * nat/linux-ptrace.h: ... to here.
2040
2041 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
2042
2043 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
2044 inf_ptrace_detach_success.
2045 (inf_ptrace_detach_success): Add inferior parameter, use it
2046 instead of inferior_ptid, pass it to detach_inferior.
2047 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
2048 parameter.
2049 * inferior.c (detach_inferior): Add overload that takes an
2050 inferior object.
2051 * inferior.h (detach_inferior): Likewise.
2052 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
2053 use inferior_ptid, adjust call to inf_ptrace_detach_success.
2054 * linux-thread-db.c (thread_db_detach): Use inf parameter.
2055
2056 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
2057
2058 * target.h (struct target_ops) <to_detach>: Add inferior
2059 parameter.
2060 (target_detach): Likewise.
2061 * target.c (dispose_inferior): Pass inferior down.
2062 (target_detach): Pass inferior down. Assert that it is equal to
2063 the current inferior.
2064 * aix-thread.c (aix_thread_detach): Pass inferior down.
2065 * corefile.c (core_file_command): Pass current_inferior() down.
2066 * corelow.c (core_detach): Add inferior parameter.
2067 * darwin-nat.c (darwin_detach): Likewise.
2068 * gnu-nat.c (gnu_detach): Likewise.
2069 * inf-ptrace.c (inf_ptrace_detach): Likewise.
2070 * infcmd.c (detach_command): Pass current_inferior() down to
2071 target_detach.
2072 * infrun.c (follow_fork_inferior): Pass parent_inf to
2073 target_detach.
2074 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
2075 target_detach.
2076 * linux-nat.c (linux_nat_detach): Add inferior parameter.
2077 * linux-thread-db.c (thread_db_detach): Likewise.
2078 * nto-procfs.c (procfs_detach): Likewise.
2079 * procfs.c (procfs_detach): Likewise.
2080 * record.c (record_detach): Likewise.
2081 * record.h (struct inferior): Forward-declare.
2082 (record_detach): Add inferior parameter.
2083 * remote-sim.c (gdbsim_detach): Likewise.
2084 * remote.c (remote_detach_1): Likewise.
2085 (remote_detach): Likewise.
2086 (extended_remote_detach): Likewise.
2087 * sol-thread.c (sol_thread_detach): Likewise.
2088 * target-debug.h (target_debug_print_inferior_p): New macro.
2089 * target-delegates.c: Re-generate.
2090 * top.c (kill_or_detach): Pass inferior down to target_detach.
2091 * windows-nat.c (windows_detach): Add inferior parameter.
2092
2093 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
2094
2095 * target.h (struct target_ops) <to_detach>: Remove args
2096 parameter.
2097 (target_detach): Likewise.
2098 * target.c (dispose_inferior): Adjust.
2099 (target_detach): Remove args parameter, adjust.
2100 * aix-thread.c (aix_thread_detach): Adjust.
2101 * corefile.c (core_file_command): Adjust.
2102 * corelow.c (core_detach): Adjust.
2103 * darwin-nat.c (darwin_detach): Adjust.
2104 * gnu-nat.c (gnu_detach): Adjust.
2105 * inf-ptrace.c (inf_ptrace_detach): Adjust.
2106 * infcmd.c (detach_command): Adjust
2107 * infrun.c (follow_fork_inferior): Adjust.
2108 (handle_vfork_child_exec_or_exit): Adjust.
2109 * linux-fork.c (linux_fork_detach): Remove args parameter.
2110 * linux-fork.h (linux_fork_detach): Likewise.
2111 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
2112 * linux-thread-db.c (thread_db_detach): Likewise.
2113 * nto-procfs.c (procfs_detach): Likewise.
2114 * procfs.c (procfs_detach): Likewise.
2115 (do_detach): Remove signo parameter.
2116 * record.c (record_detach): Remove args parameter.
2117 * record.h (record_detach): Likewise.
2118 * remote-sim.c (gdbsim_detach): Likewise.
2119 * remote.c (remote_detach_1): Likewise.
2120 (remote_detach): Likewise.
2121 (extended_remote_detach): Likewise.
2122 * sol-thread.c (sol_thread_detach): Likewise.
2123 * target-delegates.c: Re-generate.
2124 * top.c (struct qt_args) <args>: Remove field.
2125 (kill_or_detach): Don't pass args.
2126 (quit_force): Don't set args.
2127 * windows-nat.c (windows_detach): Remove args parameter.
2128
2129 2018-01-19 Yao Qi <yao.qi@linaro.org>
2130
2131 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
2132 (arm_linux_init_abi): Install it.
2133
2134 2018-01-19 Yao Qi <yao.qi@linaro.org>
2135
2136 * osabi.c (gdb_osabi_names): Extend the regexp for
2137 arm-linux-gnueabihf.
2138
2139 2018-01-18 Yao Qi <yao.qi@linaro.org>
2140
2141 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
2142 m_abbrevs.
2143 (abbrev_table::add_abbrev): Update.
2144 (abbrev_table::lookup_abbrev): Update.
2145
2146 2018-01-18 Yao Qi <yao.qi@linaro.org>
2147
2148 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
2149
2150 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
2151
2152 * compile/compile.c (compile_to_object): Convert "triplet_rx"
2153 to "std::string".
2154
2155 2018-01-17 Tom Tromey <tom@tromey.com>
2156
2157 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
2158
2159 2018-01-17 Tom Tromey <tom@tromey.com>
2160
2161 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
2162 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
2163 (create_array_type_with_stride): Update.
2164 * dwarf2read.c (set_die_type): Update.
2165
2166 2018-01-17 Tom Tromey <tom@tromey.com>
2167
2168 * dwarf2read.c (delayed_method_info): Remove typedef.
2169 (dwarf2_cu::method_info): Now a std::vector.
2170 (add_to_method_list): Update.
2171 (free_delayed_list): Remove.
2172 (compute_delayed_physnames): Update.
2173 (process_full_comp_unit, process_full_type_unit): Clear the method
2174 list. Remove cleanups.
2175 (psymtab_include_file_name): Add name_holder parameter. Use
2176 unique_xmalloc_ptr.
2177 (dwarf_decode_lines): Update.
2178
2179 2018-01-17 Tom Tromey <tom@tromey.com>
2180 Simon Marchi <simon.marchi@ericsson.com>
2181
2182 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
2183 (dwarf2_per_objfile::free_cached_comp_units)
2184 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
2185 (init_cutu_and_read_dies_no_follow): Update.
2186 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
2187 (dwarf2_cu::~dwarf2_cu): New.
2188 (free_heap_comp_unit, free_stack_comp_unit): Remove.
2189 (age_cached_comp_units, free_one_cached_comp_unit): Update.
2190
2191 2018-01-17 Tom Tromey <tom@tromey.com>
2192 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
2195 (struct die_reader_specs) <abbrev_table>: New member.
2196 (struct abbrev_table): Add constructor.
2197 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
2198 <abbrev_obstack>: Now an auto_obstack.
2199 (abbrev_table_up): New typedef.
2200 (init_cu_die_reader): Add abbrev_table parameter.
2201 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
2202 Add result_dwo_abbrev_table.
2203 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
2204 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
2205 Update.
2206 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
2207 parameter.
2208 (skip_children): Update.
2209 (abbrev_table::alloc_abbrev): Rename from
2210 abbrev_table_alloc_abbrev.
2211 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
2212 (abbrev_table::lookup_abbrev): Rename from
2213 abbrev_table_lookup_abbrev.
2214 (abbrev_table_read_table): Return abbrev_table_up.
2215 (abbrev_table_free, abbrev_table_free_cleanup)
2216 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
2217 (load_partial_dies): Update.
2218
2219 2018-01-17 Tom Tromey <tom@tromey.com>
2220
2221 * dwarf2read.c (dwarf2_compute_name): Update comment.
2222 (read_func_scope, read_variable): Update.
2223 (new_symbol): Remove.
2224 (new_symbol_full): Rename to new_symbol.
2225
2226 2018-01-17 Mike Gulick <mgulick@mathworks.com>
2227
2228 PR gdb/16577
2229 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
2230 a warning instead of throwing an error, set section size to 0 and return
2231 NULL.
2232 * gdb_bfd.h (gdb_bfd_map_section): Update description.
2233
2234 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2235
2236 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
2237 std::string.
2238 (linux_ptrace_attach_fail_reason_string): Likewise.
2239 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
2240 Likewise.
2241 (linux_ptrace_attach_fail_reason_string): Likewise.
2242 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
2243
2244 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2245
2246 * linux-nat.c (linux_nat_attach): Remove xstrdup.
2247
2248 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2249
2250 PR gdb/21559
2251 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2252 checking for fs_base/gs_base fields in struct user_regs_struct.
2253 * configure: Regenerate.
2254
2255 2018-01-17 Yao Qi <yao.qi@linaro.org>
2256
2257 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
2258 function.
2259 (aarch64_linux_init_abi): Install it to gdbarch hook
2260 gcc_target_options.
2261
2262 2018-01-15 Pedro Alves <palves@redhat.com>
2263
2264 * common/signals-state-save-restore.c
2265 (save_original_signals_state): Fix typos.
2266
2267 2017-01-12 Tom Tromey <tom@tromey.com>
2268 Sergio Durigan Junior <sergiodj@redhat.com>
2269
2270 * Makefile.in (install-only): Install gdb-add-index.
2271
2272 2018-01-12 John Baldwin <jhb@FreeBSD.org>
2273
2274 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
2275
2276 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2277
2278 * infrun.c (keep_going_pass_signal): Clear step-over info when
2279 insert_breakpoints fails.
2280
2281 2018-01-11 Pedro Alves <palves@redhat.com>
2282
2283 PR gdb/22583
2284 * infrun.c (resume): Rename to ...
2285 (resume_1): ... this.
2286 (resume): Reimplement as wrapper around resume_1.
2287
2288 2018-01-11 Pedro Alves <palves@redhat.com>
2289
2290 PR remote/22597
2291 * remote.c (remote_parse_stop_reply): Default to the last-set
2292 general thread instead of to 'magic_null_ptid'.
2293
2294 2018-01-10 Pedro Alves <palves@redhat.com>
2295
2296 * language.h (language_get_symbol_name_matcher): Rename ...
2297 (get_symbol_name_matcher): ... this.
2298 * language.c (language_get_symbol_name_matcher): Ditto.
2299 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
2300 callers adjusted.
2301
2302 2018-01-10 Pedro Alves <palves@redhat.com>
2303
2304 PR gdb/22670
2305 * dwarf2read.c
2306 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
2307 Adjust to use language_get_symbol_name_matcher instead of
2308 language_defn::la_get_symbol_name_matcher.
2309 * language.c (language_get_symbol_name_matcher): If in Ada mode
2310 and the lookup name is a verbatim match, return Ada's matcher.
2311 * language.h (language_get_symbol_name_matcher): Adjust comment.
2312 (ada_lookup_name_info::verbatim_p):: New method.
2313
2314 2018-01-10 Pedro Alves <palves@redhat.com>
2315
2316 PR gdb/22670
2317 * ada-lang.c (ada_collect_symbol_completion_matches): If the
2318 minsym's language is language_auto or language_cplus, pass down
2319 language_ada instead.
2320 * symtab.c (compare_symbol_name): Don't frob symbol language here.
2321
2322 2018-01-10 Pedro Alves <palves@redhat.com>
2323
2324 PR gdb/22670
2325 * minsyms.c (linkage_name_str): New function.
2326 (iterate_over_minimal_symbols): Use it.
2327
2328 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2329
2330 * NEWS: Document that 'info proc' now works on FreeBSD.
2331
2332 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2333
2334 * configure.ac: Check for kinfo_getfile in libutil.
2335 * configure: Regenerate.
2336 * config.in: Regenerate.
2337 * fbsd-nat.c: Include "fbsd-tdep.h".
2338 (fbsd_fetch_cmdline): New.
2339 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
2340 rather than calling error.
2341 (fbsd_info_proc): New.
2342 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
2343 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
2344 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
2345
2346 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2347
2348 * fbsd-nat.c (struct free_deleter): Remove.
2349 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
2350
2351 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2352
2353 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
2354 NULL for an empty pathname.
2355
2356 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2357
2358 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
2359 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
2360 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
2361 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
2362 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
2363 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
2364 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
2365 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
2366 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
2367 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
2368 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
2369 (fbsd_core_fetch_timeval, fbsd_print_sigset)
2370 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
2371 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
2372 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
2373
2374 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
2375
2376 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
2377 (gnu_xfer_auxv): New function.
2378 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
2379 TARGET_OBJECT_AUXV.
2380
2381 2018-01-08 Yao Qi <yao.qi@linaro.org>
2382 Simon Marchi <simon.marchi@ericsson.com>
2383
2384 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
2385 common/selftest.c.
2386 (COMMON_OBS): Remove selftest.o.
2387 * configure.ac: Append selftest-arch.c and common/selftest.c to
2388 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
2389 * configure: Re-generated.
2390 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
2391 GDB_SELF_TEST.
2392 (maintenance_info_selftests): Likewise.
2393
2394 2018-01-08 Xavier Roirand <roirand@adacore.com>
2395
2396 * ada-valprint.c (val_print_packed_array_elements): Use
2397 proper number of elements when printing an array indexed
2398 by an enumeration type.
2399
2400 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2401
2402 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
2403 (dw2_get_file_names_reader): Adjust.
2404 (lookup_dwo_signatured_type): Adjust.
2405 (lookup_dwp_signatured_type): Adjust.
2406 (lookup_signatured_type): Adjust.
2407 (create_type_unit_group): Adjust.
2408 (get_type_unit_group): Adjust.
2409 (process_psymtab_comp_unit_reader): Adjust.
2410 (build_type_psymtabs_reader): Adjust.
2411 (scan_partial_symbols): Adjust.
2412 (add_partial_symbol): Adjust.
2413 (add_partial_subprogram): Adjust.
2414 (peek_die_abbrev): Adjust.
2415 (fixup_go_packaging): Adjust.
2416 (process_imported_unit_die): Adjust.
2417 (dwarf2_compute_name): Adjust.
2418 (dwarf2_physname): Adjust.
2419 (read_import_statement): Adjust.
2420 (handle_DW_AT_stmt_list): Adjust.
2421 (read_file_scope): Adjust.
2422 (read_func_scope): Adjust.
2423 (read_lexical_block_scope): Adjust.
2424 (read_call_site_scope): Adjust.
2425 (read_variable): Adjust.
2426 (dwarf2_rnglists_process): Adjust.
2427 (dwarf2_ranges_process): Adjust.
2428 (dwarf2_ranges_read): Adjust.
2429 (dwarf2_get_pc_bounds): Adjust.
2430 (dwarf2_record_block_ranges): Adjust.
2431 (dwarf2_add_field): Adjust.
2432 (dwarf2_add_member_fn): Adjust.
2433 (read_structure_type): Adjust.
2434 (process_structure_scope): Adjust.
2435 (read_enumeration_type): Adjust.
2436 (read_array_type): Adjust.
2437 (mark_common_block_symbol_computed): Adjust.
2438 (read_common_block): Adjust.
2439 (read_namespace_type): Adjust.
2440 (read_namespace): Adjust.
2441 (read_module_type): Adjust.
2442 (read_tag_pointer_type): Adjust.
2443 (read_tag_ptr_to_member_type): Adjust.
2444 (read_tag_string_type): Adjust.
2445 (read_subroutine_type): Adjust.
2446 (read_typedef): Adjust.
2447 (read_base_type): Adjust.
2448 (attr_to_dynamic_prop): Adjust.
2449 (read_subrange_type): Adjust.
2450 (read_unspecified_type): Adjust.
2451 (dwarf2_read_abbrevs): Adjust.
2452 (load_partial_dies): Adjust.
2453 (read_partial_die): Adjust.
2454 (find_partial_die): Adjust.
2455 (guess_partial_die_structure_name): Adjust.
2456 (fixup_partial_die): Adjust.
2457 (read_attribute_value): Adjust.
2458 (read_addr_index): Adjust.
2459 (read_addr_index_from_leb128): Adjust.
2460 (read_str_index): Adjust.
2461 (dwarf2_string_attr): Adjust.
2462 (get_debug_line_section): Adjust.
2463 (dwarf_decode_line_header): Adjust.
2464 (lnp_state_machine::check_line_address): Adjust.
2465 (dwarf_decode_lines_1): Adjust.
2466 (dwarf_decode_lines): Adjust.
2467 (dwarf2_start_symtab): Adjust.
2468 (var_decode_location): Adjust.
2469 (new_symbol_full): Adjust.
2470 (dwarf2_const_value_data): Adjust.
2471 (dwarf2_const_value_attr): Adjust.
2472 (dwarf2_const_value): Adjust.
2473 (die_type): Adjust.
2474 (die_containing_type): Adjust.
2475 (build_error_marker_type): Adjust.
2476 (lookup_die_type): Adjust.
2477 (guess_full_die_structure_name): Adjust.
2478 (anonymous_struct_prefix): Adjust.
2479 (determine_prefix): Adjust.
2480 (dwarf2_name): Adjust.
2481 (follow_die_ref_or_sig): Adjust.
2482 (follow_die_offset): Adjust.
2483 (follow_die_ref): Adjust.
2484 (follow_die_sig_1): Adjust.
2485 (follow_die_sig): Adjust.
2486 (get_signatured_type): Adjust.
2487 (get_DW_AT_signature_type): Adjust.
2488 (decode_locdesc): Adjust.
2489 (dwarf_decode_macros): Adjust.
2490 (cu_debug_loc_section): Adjust.
2491 (fill_in_loclist_baton): Adjust.
2492 (dwarf2_symbol_mark_computed): Adjust.
2493 (init_one_comp_unit): Don't assign
2494 dwarf2_cu::dwarf2_per_objfile.
2495 (set_die_type): Adjust.
2496
2497 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2498
2499 * dwarf2read.c (struct mapped_debug_names): Add constructor.
2500 <dwarf2_per_objfile>: New field.
2501 (dwarf2_per_objfile): Remove global.
2502 (get_dwarf2_per_objfile): New function.
2503 (set_dwarf2_per_objfile): New function.
2504 (dwarf2_build_psymtabs_hard): Change objfile parameter to
2505 dwarf2_per_objfile.
2506 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2507 (read_abbrev_offset): Likewise.
2508 (read_indirect_string): Likewise.
2509 (read_indirect_line_string): Likewise.
2510 (read_indirect_string_at_offset): Likewise.
2511 (read_indirect_string_from_dwz): Likewise.
2512 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2513 dwarf2_per_objfile.
2514 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2515 (create_all_comp_units): Change objfile parameter to
2516 dwarf2_per_objfile.
2517 (create_all_type_units): Likewise.
2518 (process_queue): Add dwarf2_per_objfile parameter.
2519 (read_and_check_comp_unit_head): Likewise.
2520 (lookup_dwo_unit_in_dwp): Likewise.
2521 (get_dwp_file): Likewise.
2522 (process_cu_includes): Likewise.
2523 (struct free_dwo_file_cleanup_data): New struct.
2524 (dwarf2_has_info): Use get_dwarf2_per_objfile and
2525 set_dwarf2_per_objfile.
2526 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
2527 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
2528 context, adjust calls.
2529 (dw2_instantiate_symtab): Likewise.
2530 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
2531 (dw2_get_cu): Likewise.
2532 (create_cu_from_index_list): Change objfile parameter to
2533 dwarf2_per_objfile.
2534 (create_cus_from_index_list): Get dwarf2_per_objfile from
2535 context, adjust calls.
2536 (create_cus_from_index): Likewise.
2537 (create_signatured_type_table_from_index): Change objfile
2538 parameter to dwarf2_per_objfile.
2539 (create_signatured_type_table_from_debug_names): Change objfile
2540 parameter to dwarf2_per_objfile.
2541 (create_addrmap_from_index): Likewise.
2542 (create_addrmap_from_aranges): Likewise.
2543 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
2544 (dw2_setup): Remove.
2545 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
2546 context.
2547 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
2548 get_dwarf2_per_objfile.
2549 (dw2_forget_cached_source_info): Likewise.
2550 (dw2_map_symtabs_matching_filename): Likewise.
2551 (struct dw2_symtab_iterator) <index>: Remove.
2552 <dwarf2_per_objfile>: New field.
2553 (dw2_symtab_iter_init): Replace index parameter with
2554 dwarf2_per_objfile.
2555 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
2556 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
2557 (dw2_print_stats): Likewise.
2558 (dw2_dump): Likewise.
2559 (dw2_expand_symtabs_for_function): Likewise.
2560 (dw2_expand_all_symtabs): Likewise.
2561 (dw2_expand_symtabs_with_fullname): Likewise.
2562 (dw2_expand_marked_cus): Replace index and objfile parameters
2563 with dwarf2_per_objfile.
2564 (dw_expand_symtabs_matching_file_matcher): Add
2565 dwarf2_per_objfile parameter and adjust calls.
2566 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
2567 adjust calls.
2568 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
2569 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
2570 adjust calls.
2571 (create_cus_from_debug_names_list): Replace objfile parameter
2572 with dwarf2_per_objfile and adjust calls.
2573 (create_cus_from_debug_names): Likewise.
2574 (dwarf2_read_debug_names): Likewise.
2575 (mapped_debug_names::namei_to_name): Adjust call.
2576 (dw2_debug_names_iterator::next): Likewise.
2577 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2578 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
2579 (dw2_debug_names_dump): Likewise.
2580 (dw2_debug_names_expand_symtabs_for_function): Likewise.
2581 (dw2_debug_names_expand_symtabs_matching): Likewise.
2582 (dwarf2_initialize_objfile): Likewise.
2583 (dwarf2_build_psymtabs): Likewise.
2584 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
2585 this_cu.
2586 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
2587 (read_and_check_comp_unit_head): Likewise.
2588 (read_abbrev_offset): Likewise.
2589 (create_debug_type_hash_table): Likewise.
2590 (create_debug_types_hash_table): Likewise.
2591 (create_all_type_units): Replace objfile parameter with
2592 dwarf2_per_objfile.
2593 (add_type_unit): Add dwarf2_per_objfile parameter.
2594 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
2595 with dwarf2_per_objfile.
2596 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
2597 (lookup_dwp_signatured_type): Likewise.
2598 (lookup_signatured_type): Likewise.
2599 (read_cutu_die_from_dwo): Likewise.
2600 (init_tu_and_read_dwo_dies): Likewise.
2601 (init_cutu_and_read_dies): Likewise.
2602 (init_cutu_and_read_dies_no_follow): Likewise.
2603 (allocate_type_unit_groups_table): Add objfile parameter.
2604 (create_type_unit_group): Use dwarf2_per_objfile from cu.
2605 (get_type_unit_group): Likewise.
2606 (process_psymtab_comp_unit): Update call.
2607 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
2608 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
2609 (print_tu_stats): Likewise.
2610 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
2611 in void* parameter.
2612 (build_type_psymtabs): Change objfile parameter to
2613 dwarf2_per_objfile.
2614 (process_skeletonless_type_unit): Use dwarf2_per_objfile
2615 passed in void* parameter.
2616 (process_skeletonless_type_units): Change objfile parameter to
2617 dwarf2_per_objfile.
2618 (set_partial_user): Likewise.
2619 (dwarf2_build_psymtabs_hard): Likewise.
2620 (read_comp_units_from_section): Likewise.
2621 (create_all_comp_units): Likewise.
2622 (scan_partial_symbols): Update calls.
2623 (add_partial_symbol): Likewise.
2624 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
2625 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
2626 (process_queue): Add dwarf2_per_objfile parameter.
2627 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
2628 (compute_compunit_symtab_includes): Likewise.
2629 (process_cu_includes): Add dwarf2_per_objfile parameter.
2630 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
2631 (process_full_type_unit): Likewise.
2632 (process_imported_unit_die): Update call.
2633 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
2634 (read_file_scope): Likewise.
2635 (allocate_dwo_file_hash_table): Add objfile parameter.
2636 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
2637 (create_cus_hash_table): Likewise.
2638 (create_dwp_hash_table): Likewise.
2639 (create_dwo_unit_in_dwp_v1): Likewise.
2640 (create_dwp_v2_section): Likewise.
2641 (create_dwo_unit_in_dwp_v2): Likewise.
2642 (lookup_dwo_unit_in_dwp): Likewise.
2643 (try_open_dwop_file): Likewise.
2644 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
2645 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
2646 cleanup to include a reference to dwarf2_per_objfile.
2647 (open_dwp_file): Add dwarf2_per_objfile parameter.
2648 (open_and_init_dwp_file): Likewise.
2649 (get_dwp_file): Likewise.
2650 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
2651 (queue_and_load_all_dwo_tus): Update call.
2652 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
2653 data.
2654 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
2655 (dwarf2_ranges_process): Likewise.
2656 (dwarf2_get_pc_bounds): Likewise.
2657 (mark_common_block_symbol_computed): Likewise.
2658 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2659 (dwarf2_read_abbrevs): Update call.
2660 (read_partial_die): Use dwarf2_per_objfile from cu.
2661 (find_partial_die): Likewise.
2662 (fixup_partial_die): Likewise.
2663 (read_attribute_value): Likewise.
2664 (read_indirect_string_at_offset_from): Add objfile parameter.
2665 (read_indirect_string_at_offset): Add dwarf2_per_objfile
2666 parameter.
2667 (read_indirect_string_from_dwz): Add objfile parameter.
2668 (read_indirect_string): Add objfile parameter.
2669 (read_addr_index_1): Add dwarf2_per_objfile parameter.
2670 (read_addr_index): Use dwarf2_per_objfile from cu.
2671 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
2672 call dw2_setup.
2673 (read_str_index): Use dwarf2_per_objfile from cu.
2674 (get_debug_line_section): Likewise.
2675 (read_formatted_entries): Add dwarf2_per_objfile parameter.
2676 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
2677 (new_symbol_full): Use dwarf2_per_objfile from cu.
2678 (build_error_marker_type): Likewise.
2679 (lookup_die_type): Likewise.
2680 (determine_prefix): Likewise.
2681 (follow_die_offset): Likewise.
2682 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
2683 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
2684 (dwarf2_fetch_die_type_sect_off): Likewise.
2685 (dwarf2_get_die_type): Likewise.
2686 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
2687 (get_signatured_type): Likewise.
2688 (get_DW_AT_signature_type): Likewise.
2689 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
2690 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
2691 (cu_debug_loc_section): Likewise.
2692 (fill_in_loclist_baton): Likewise.
2693 (dwarf2_symbol_mark_computed): Likewise.
2694 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2695 dwarf2_per_objfile.
2696 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
2697 parameter.
2698 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2699 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
2700 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
2701 (set_die_type): Use dwarf2_free_objfile from cu.
2702 (get_die_type_at_offset): Likewise.
2703 (dwarf2_per_objfile_free): Don't assign global variable.
2704 (debug_names) <constructor>: Add dwarf2_per_objfile
2705 parameter, update m_debugstrlookup construction.
2706 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
2707 parameter.
2708 <m_dwarf2_per_objfile>: New field.
2709 <lookup>: Use m_dwarf2_per_objfile.
2710 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
2711 (psyms_seen_size): Likewise.
2712 (write_gdbindex): Replace objfile parameter with
2713 dwarf2_per_objfile.
2714 (write_debug_names): Likewise.
2715 (write_psymtabs_to_index): Likewise.
2716 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
2717 calls.
2718
2719 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2720
2721 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
2722 <dwarf2_per_objfile>: New field.
2723 (struct dwarf2_per_cu_data) <objfile>: Remove.
2724 <dwarf2_per_objfile>: New field.
2725 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
2726 of objfile.
2727 (create_signatured_type_table_from_index): Likewise.
2728 (create_debug_type_hash_table): Likewise.
2729 (fill_in_sig_entry_from_dwo_entry): Likewise.
2730 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
2731 (create_type_unit_group): Assign dwarf2_per_objfile instead of
2732 objfile.
2733 (create_partial_symtab): Access objfile through
2734 dwarf2_per_objfile.
2735 (process_psymtab_comp_unit_reader): Likewise.
2736 (read_comp_units_from_section): Likewise.
2737 (scan_partial_symbols): Likewise.
2738 (add_partial_symbol): Likewise.
2739 (add_partial_subprogram): Likewise.
2740 (peek_die_abbrev): Likewise.
2741 (fixup_go_packaging): Likewise.
2742 (process_full_comp_unit): Likewise.
2743 (process_full_type_unit): Likewise.
2744 (process_imported_unit_die): Likewise.
2745 (dwarf2_compute_name): Likewise.
2746 (dwarf2_physname): Likewise.
2747 (read_import_statement): Likewise.
2748 (create_cus_hash_table): Assign dwarf2_physname instead of
2749 objfile.
2750 (read_func_scope): Access objfile through dwarf2_per_objfile.
2751 (read_lexical_block_scope): Likewise.
2752 (read_call_site_scope): Likewise.
2753 (read_variable): Likewise.
2754 (dwarf2_rnglists_process): Likewise.
2755 (dwarf2_ranges_process): Likewise.
2756 (dwarf2_ranges_read): Likewise.
2757 (dwarf2_record_block_ranges): Likewise.
2758 (dwarf2_add_field): Likewise.
2759 (dwarf2_add_member_fn): Likewise.
2760 (read_structure_type): Likewise.
2761 (process_structure_scope): Likewise.
2762 (read_enumeration_type): Likewise.
2763 (read_array_type): Likewise.
2764 (read_common_block): Likewise.
2765 (read_namespace_type): Likewise.
2766 (read_namespace): Likewise.
2767 (read_module_type): Likewise.
2768 (read_tag_pointer_type): Likewise.
2769 (read_tag_ptr_to_member_type): Likewise.
2770 (read_tag_string_type): Likewise.
2771 (read_subroutine_type): Likewise.
2772 (read_typedef): Likewise.
2773 (read_base_type): Likewise.
2774 (attr_to_dynamic_prop): Likewise.
2775 (read_subrange_type): Likewise.
2776 (read_unspecified_type): Likewise.
2777 (load_partial_dies): Likewise.
2778 (read_partial_die): Likewise.
2779 (find_partial_die): Likewise.
2780 (guess_partial_die_structure_name): Likewise.
2781 (fixup_partial_die): Likewise.
2782 (read_attribute_value): Likewise.
2783 (read_addr_index_from_leb128): Likewise.
2784 (dwarf2_read_addr_index): Likewise.
2785 (dwarf2_string_attr): Likewise.
2786 (lnp_state_machine::check_line_address): Likewise.
2787 (dwarf_decode_lines_1): Likewise.
2788 (dwarf_decode_lines): Likewise.
2789 (dwarf2_start_symtab): Likewise.
2790 (var_decode_location): Likewise.
2791 (new_symbol_full): Likewise.
2792 (dwarf2_const_value_data): Likewise.
2793 (dwarf2_const_value_attr): Likewise.
2794 (dwarf2_const_value): Likewise.
2795 (die_type): Likewise.
2796 (die_containing_type): Likewise.
2797 (lookup_die_type): Likewise.
2798 (guess_full_die_structure_name): Likewise.
2799 (anonymous_struct_prefix): Likewise.
2800 (dwarf2_name): Likewise.
2801 (follow_die_ref_or_sig): Likewise.
2802 (follow_die_offset): Likewise.
2803 (follow_die_ref): Likewise.
2804 (dwarf2_fetch_die_loc_sect_off): Likewise.
2805 (dwarf2_fetch_constant_bytes): Likewise.
2806 (dwarf2_fetch_die_type_sect_off): Likewise.
2807 (dwarf2_get_die_type): Likewise.
2808 (follow_die_sig): Likewise.
2809 (decode_locdesc): Likewise.
2810 (dwarf2_per_cu_objfile): Likewise.
2811 (dwarf2_per_cu_text_offset): Likewise.
2812 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
2813 objfile.
2814 (set_die_type): Access objfile through
2815 dwarf2_per_objfile.
2816
2817 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2818
2819 * valprint.c (converted_character_d): Remove typedef.
2820 (DEF_VEC_O (converted_character_d)): Remove.
2821 (count_next_character): Use std::vector.
2822 (print_converted_chars_to_obstack): Likewise.
2823 (generic_printstr): Likewise.
2824
2825 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2826
2827 * xml-support.h (struct gdb_xml_value): Add constructor.
2828 <value>: Change type to unique_xmalloc_ptr.
2829 (gdb_xml_value_s): Remove typedef.
2830 (DEF_VEC_O (gdb_xml_value_s)): Remove.
2831 (gdb_xml_element_start_handler): Change parameter type to
2832 std::vector.
2833 (xml_find_attribute): Likewise.
2834 * xml-support.c (xml_find_attribute): Change parameter type to
2835 std::vector and adjust.
2836 (gdb_xml_values_cleanup): Remove.
2837 (gdb_xml_parser::start_element): Adjust to std::vector.
2838 (xinclude_start_include): Change paraeter type to std::vector
2839 and adjust.
2840 * btrace.c (check_xml_btrace_version): Likewise.
2841 (parse_xml_btrace_block): Likewise.
2842 (parse_xml_btrace_pt_config_cpu): Likewise.
2843 (parse_xml_btrace_pt): Likewise.
2844 (parse_xml_btrace_conf_bts): Likewise.
2845 (parse_xml_btrace_conf_pt): Likewise.
2846 * memory-map.c (memory_map_start_memory): Likewise.
2847 (memory_map_start_property): Likewise.
2848 * osdata.c (osdata_start_osdata): Likewise.
2849 (osdata_start_item): Likewise.
2850 (osdata_start_column): Likewise.
2851 * remote.c (start_thread): Likewise.
2852 * solib-aix.c (library_list_start_library): Likewise.
2853 (library_list_start_list): Likewise.
2854 * solib-svr4.c (library_list_start_library): Likewise.
2855 (svr4_library_list_start_list): Likewise.
2856 * solib-target.c (library_list_start_segment): Likewise.
2857 (library_list_start_section): Likewise.
2858 (library_list_start_library): Likewise.
2859 (library_list_start_list): Likewise.
2860 * tracepoint.c (traceframe_info_start_memory): Likewise.
2861 (traceframe_info_start_tvar): Likewise.
2862 * xml-syscall.c (syscall_start_syscall): Likewise.
2863 * xml-tdesc.c (tdesc_start_target): Likewise.
2864 (tdesc_start_feature): Likewise.
2865 (tdesc_start_reg): Likewise.
2866 (tdesc_start_union): Likewise.
2867 (tdesc_start_struct): Likewise.
2868 (tdesc_start_flags): Likewise.
2869 (tdesc_start_enum): Likewise.
2870 (tdesc_start_field): Likewise.
2871 (tdesc_start_enum_value): Likewise.
2872 (tdesc_start_vector): Likewise.
2873
2874 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2875
2876 * extension.h (struct xmethod_worker) <clone>: Remove.
2877 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
2878 Remove.
2879 (python_xmethod_worker::clone): Remove.
2880 * valops.c (find_overload_match): Use std::move instead of
2881 clone.
2882
2883 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2884
2885 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
2886 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
2887 <free_xmethod_worker_data>: Remove.
2888 <get_matching_xmethod_workers>: Chance VEC to std::vector.
2889 <get_xmethod_arg_types>: Remove.
2890 <get_xmethod_result_type>: Remove.
2891 <invoke_xmethod>: Remove.
2892 * extension.c (new_xmethod_worker): Remove.
2893 (clone_xmethod_worker): Remove.
2894 (get_matching_xmethod_workers): Return void, pass std::vector by
2895 pointer.
2896 (get_xmethod_arg_types): Rename to...
2897 (xmethod_worker::get_arg_types): ... this, and adjust.
2898 (get_xmethod_result_type): Rename to...
2899 (xmethod_worker::get_result_type): ... this, and adjust.
2900 (invoke_xmethod): Remove.
2901 (free_xmethod_worker): Remove.
2902 (free_xmethod_worker_vec): Remove.
2903 * extension.h (enum ext_lang_rc): Move here from
2904 extension-priv.h.
2905 (struct xmethod_worker): Add constructor and destructor.
2906 <data>: Remove.
2907 <value>: Remove.
2908 <invoke, clone, do_get_result_type, do_get_arg_types>: New
2909 virtual pure methods.
2910 <get_arg_types, get_result_type>: New methods.
2911 (xmethod_worker_ptr): Remove typedef.
2912 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
2913 (xmethod_worker_vec): Remove typedef.
2914 (xmethod_worker_up): New typedef.
2915 (invoke_xmethod): Remove.
2916 (clone_xmethod_worker): Remove.
2917 (free_xmethod_worker): Remove.
2918 (free_xmethod_worker_vec): Remove.
2919 (get_xmethod_arg_types): Remove.
2920 (get_xmethod_result_type): Remove.
2921 * valops.c (find_method_list): Use std::vector, don't use
2922 intermediate vector.
2923 (value_find_oload_method_list): Use std::vector.
2924 (find_overload_match): Use std::vector.
2925 (find_oload_champ): Use std::vector.
2926 * value.c (value_free): Use operator delete.
2927 (value_of_xmethod): Rename to...
2928 (value_from_xmethod): ... this. Don't assign
2929 xmethod_worker::value, take rvalue-reference.
2930 (result_type_of_xmethod): Adjust.
2931 (call_xmethod): Adjust.
2932 * value.h: Include extension.h.
2933 (struct xmethod_worker): Don't forward-declare.
2934 (value_of_xmethod): Rename to...
2935 (value_from_xmethod): ... this, take rvalue-reference.
2936 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
2937 (struct python_xmethod_worker): ... this, add constructor and
2938 destructor.
2939 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
2940 (gdbpy_free_xmethod_worker_data): Rename to...
2941 (python_xmethod_worker::~python_xmethod_worker): ... this and
2942 adjust.
2943 (gdbpy_clone_xmethod_worker_data): Rename to...
2944 (python_xmethod_worker::clone): ... this and adjust.
2945 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
2946 temporary vector.
2947 (gdbpy_get_xmethod_arg_types): Rename to...
2948 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
2949 (gdbpy_get_xmethod_result_type): Rename to...
2950 (python_xmethod_worker::do_get_result_type): ... this and
2951 adjust.
2952 (gdbpy_invoke_xmethod): Rename to...
2953 (python_xmethod_worker::invoke): ... this and adjust.
2954 (new_python_xmethod_worker): Rename to...
2955 (python_xmethod_worker::python_xmethod_worker): ... this and
2956 adjust.
2957 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
2958 Remove.
2959 (gdbpy_free_xmethod_worker_data): Remove.
2960 (gdbpy_get_matching_xmethod_workers): Use std::vector.
2961 (gdbpy_get_xmethod_arg_types): Remove.
2962 (gdbpy_get_xmethod_result_type): Remove.
2963 (gdbpy_invoke_xmethod): Remove.
2964 * python/python.c (python_extension_ops): Remove obsolete
2965 callbacks.
2966
2967 2018-01-05 Pedro Alves <palves@redhat.com>
2968
2969 PR gdb/18653
2970 * common/signals-state-save-restore.c
2971 (save_original_signals_state): New parameter 'quiet'. Warn if we
2972 find a custom handler preinstalled, instead of internal erroring.
2973 But only warn if !quiet.
2974 * common/signals-state-save-restore.h
2975 (save_original_signals_state): New parameter 'quiet'.
2976 * main.c (captured_main_1): Move save_original_signals_state call
2977 after option handling, and pass QUIET.
2978
2979 2018-01-05 Pedro Alves <palves@redhat.com>
2980
2981 * spu-tdep.c (spu_catch_start): Pass
2982 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
2983
2984 2018-01-05 Pedro Alves <palves@redhat.com>
2985
2986 PR gdb/22670
2987 * ada-lang.c (literal_symbol_name_matcher): New function.
2988 (ada_get_symbol_name_matcher): Use it for
2989 symbol_name_match_type::SEARCH_NAME.
2990 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
2991 it down instead of assuming symbol_name_match_type::FULL.
2992 * block.h (block_lookup_symbol): New parameter 'match_type'.
2993 * c-valprint.c (print_unpacked_pointer): Use
2994 lookup_symbol_search_name instead of lookup_symbol.
2995 * compile/compile-object-load.c (get_out_value_type): Pass down
2996 symbol_name_match_type::SEARCH_NAME.
2997 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
2998 symbol_name_match_type::FULL.
2999 * cp-support.c (cp_get_symbol_name_matcher): Handle
3000 symbol_name_match_type::SEARCH_NAME.
3001 * infrun.c (insert_exception_resume_breakpoint): Use
3002 lookup_symbol_search_name.
3003 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
3004 * psymtab.c (maintenance_check_psymtabs): Use
3005 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
3006 * stack.c (print_frame_args): Use lookup_symbol_search_name and
3007 SYMBOL_SEARCH_NAME.
3008 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
3009 if symbol_name_match_type::SEARCH_NAME.
3010 (lookup_symbol_in_language): Pass down
3011 symbol_name_match_type::FULL.
3012 (lookup_symbol_search_name): New.
3013 (lookup_language_this): Pass down
3014 symbol_name_match_type::SEARCH_NAME.
3015 (lookup_symbol_aux, lookup_local_symbol): New parameter
3016 'match_type'. Pass it down.
3017 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
3018 (lookup_symbol_search_name): New declaration.
3019 (lookup_symbol_in_block): New 'match_type' parameter.
3020
3021 2018-01-05 Pedro Alves <palves@redhat.com>
3022
3023 PR gdb/22670
3024 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
3025 ada_lookup_symbol.
3026 (ada_lookup_symbol): Reimplement in terms of
3027 ada_lookup_symbol_list, bits factored out from
3028 ada_lookup_encoded_symbol.
3029
3030 2018-01-05 Joel Brobecker <brobecker@adacore.com>
3031
3032 * ada-exp.y (write_object_renaming): When subscripting an array
3033 using a symbol as the index, pass the block in call to
3034 ada_lookup_encoded_symbol when looking that symbol up.
3035
3036 2018-01-05 Jerome Guitton <guitton@adacore.com>
3037
3038 * ada-lang.c (ada_array_length): Use ada_index_type instead of
3039 TYPE_INDEX_TYPE.
3040
3041 2018-01-05 Joel Brobecker <brobecker@adacore.com>
3042
3043 * ada-lang.c (ada_to_fixed_value_create): Add handling of
3044 the case where VALUE_LVAL (val0) is not lval_memory.
3045
3046 2018-01-05 Xavier Roirand <roirand@adacore.com>
3047
3048 * ada-valprint.c (print_optional_low_bound): Handle
3049 character-indexed array printing like boolean-indexed array
3050 printing.
3051
3052 2018-01-05 Joel Brobecker <brobecker@adacore.com>
3053
3054 * NEWS: Create a new section for the next release branch.
3055 Rename the section of the current branch, now that it has
3056 been cut.
3057
3058 2018-01-05 Joel Brobecker <brobecker@adacore.com>
3059
3060 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
3061 * version.in: Bump version to 8.1.50.DATE-git.
3062
3063 2018-01-03 Xavier Roirand <roirand@adacore.com>
3064
3065 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
3066 Add field.
3067 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
3068 Add field.
3069 (default_exception_support_info) <catch_handlers_sym>: Add field.
3070 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
3071 (ada_exception_name_addr_1): Add "catch handlers" handling.
3072 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
3073 Update all callers.
3074 (create_excep_cond_exprs) <ex>: Add parameter.
3075 (re_set_exception): Update create_excep_cond_exprs call.
3076 (print_it_exception, print_one_exception, print_mention_exception)
3077 (print_recreate_exception): Add "catch handler" handling.
3078 (allocate_location_catch_handlers, re_set_catch_handlers)
3079 (check_status_catch_handlers, print_it_catch_handlers)
3080 (print_one_catch_handlers, print_mention_catch_handlers)
3081 (print_recreate_catch_handlers): New function.
3082 (catch_handlers_breakpoint_ops): New variable.
3083 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
3084 Add parameter. Add "catch handler" handling.
3085 (ada_exception_sym_name, ada_exception_breakpoint_ops):
3086 Add "catch handler" handling.
3087 (ada_exception_catchpoint_cond_string): Add "catch handler"
3088 handling.
3089 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
3090 call.
3091 (catch_ada_handlers_command): New function.
3092 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
3093 operations structure.
3094 (_initialize_ada_language): Add "catch handlers" command entry.
3095 * NEWS: Document "catch handlers" feature.
3096
3097 2018-01-02 Joel Brobecker <brobecker@adacore.com>
3098
3099 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
3100 account when creating the array type of the slice.
3101 (ada_value_slice): Likewise.
3102
3103 2018-01-02 Joel Brobecker <brobecker@adacore.com>
3104
3105 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
3106 New enum value.
3107 (create_array_type_with_stride): Add byte_stride_prop parameter.
3108 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
3109 New parameter. Update all callers in this file.
3110 (array_type_has_dynamic_stride): New function.
3111 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
3112 of arrays with dynamic byte strides.
3113 * dwarf2read.c (read_array_type): Add support for dynamic
3114 DW_AT_byte_stride attributes.
3115
3116 2018-01-02 Joel Brobecker <brobecker@adacore.com>
3117
3118 * dwarf2read.c (read_unspecified_type): Treat
3119 DW_TAG_enumeration_type DIEs from Ada units as stubs.
3120
3121 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3122
3123 Update copyright year range in all GDB files.
3124
3125 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3126
3127 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
3128 and gdb/testsuite/gdb.base/step-line.c.
3129
3130 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3131
3132 * copyright.py (main): Dump the contents of
3133 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
3134 even if BY_HAND is empty.
3135
3136 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3137
3138 * top.c (print_gdb_version): Update Copyright year in version
3139 message.
3140
3141 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3142
3143 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
3144
3145 For older changes see ChangeLog-2017.
3146 \f
3147 Local Variables:
3148 mode: change-log
3149 left-margin: 8
3150 fill-column: 74
3151 version-control: never
3152 coding: utf-8
3153 End:
This page took 0.111672 seconds and 4 git commands to generate.