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