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