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