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