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