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