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