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