gdb: fix off-by-one error in quirk_rust_enum
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
2
3 * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
4
5 2020-05-19 Pedro Alves <palves@redhat.com>
6
7 * NEWS (set exec-file-mismatch): Adjust entry.
8 * exec.c: Include "build-id.h".
9 (validate_exec_file): Try to match build IDs instead of filenames.
10 * gdb_bfd.c (struct gdb_bfd_open_closure): New.
11 (gdb_bfd_iovec_fileio_open): Adjust to use gdb_bfd_open_closure
12 and pass down 'warn_if_slow'.
13 (gdb_bfd_open): Add 'warn_if_slow' parameter. Use
14 gdb_bfd_open_closure to pass it down.
15 * gdb_bfd.h (gdb_bfd_open): Add 'warn_if_slow' parameter.
16
17 2020-05-19 Pedro Alves <palves@redhat.com>
18
19 * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust.
20 * target.c (target_fileio_open_1): Rename to target_fileio_open
21 and make extern. Use bool.
22 (target_fileio_open, target_fileio_open_warn_if_slow): Delete.
23 (target_fileio_read_alloc_1): Adjust.
24 * target.h (target_fileio_open): Add 'warn_if_slow' parameter.
25 (target_fileio_open_warn_if_slow): Delete declaration.
26
27 2020-05-19 Pedro Alves <palves@redhat.com>
28
29 * gdb_bfd.h: (gdb_bfd_open): Default to 'fd' parameter to -1.
30 Adjust all callers.
31
32 2020-05-19 Yoshinori Sato <ysato@users.sourceforge.jp>
33
34 * h8300-tdep.c (h8300_is_argument_spill): Change how we check
35 whether disp is negative.
36
37 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
38
39 * symfile.h (struct symfile_segment_data)
40 <~symfile_segment_data>: Remove.
41 <segment_info>: Change to std::vector.
42 * symfile.c (default_symfile_segments): Update.
43 * elfread.c (elf_symfile_segments): Update.
44
45 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
46
47 * symfile.h (struct symfile_segment_data) <struct segment>: New.
48 <segments>: New.
49 <segment_bases, segment_sizes>: Remove.
50 * symfile.c (default_symfile_segments): Update.
51 * elfread.c (elf_symfile_segments): Update.
52 * remote.c (remote_target::get_offsets): Update.
53 * solib-target.c (solib_target_relocate_section_addresses):
54 Update.
55
56 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
57
58 * symfile.h (struct symfile_segment_data): Initialize fields.
59 <~symfile_segment_data>: Add.
60 (symfile_segment_data_up): New.
61 (struct sym_fns) <sym_segments>: Return a
62 symfile_segment_data_up.
63 (default_symfile_segments): Return a symfile_segment_data_up.
64 (free_symfile_segment_data): Remove.
65 (get_symfile_segment_data): Return a symfile_segment_data_up.
66 * symfile.c (default_symfile_segments): Likewise.
67 (get_symfile_segment_data): Likewise.
68 (free_symfile_segment_data): Remove.
69 (symfile_find_segment_sections): Update.
70 * elfread.c (elf_symfile_segments): Return a
71 symfile_segment_data_up.
72 * remote.c (remote_target::get_offsets): Update.
73 * solib-target.c (solib_target_relocate_section_addresses):
74 Update.
75 * symfile-debug.c (debug_sym_segments): Return a
76 symfile_segment_data_up.
77
78 2020-05-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
79
80 PR build/25981
81 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap):
82 Hardcode register numbers.
83
84 PR build/25981
85 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry,
86 procfs_find_LDT_entry): Remove.
87 * procfs.h [(__i386__ || __x86_64__) && sun] (struct ssd,
88 procfs_find_LDT_entry): Remove.
89 * sol-thread.c [(__i386__ || __x86_64__) && sun] (ps_lgetLDT):
90 Remove.
91
92 2020-05-17 Pedro Alves <palves@redhat.com>
93 Andrew Burgess <andrew.burgess@embecosm.com>
94 Keno Fischer <keno@juliacomputing.com>
95
96 PR gdb/25741
97 * breakpoint.c (build_target_condition_list): Update comments.
98 (build_target_command_list): Update comments and skip matching
99 locations.
100 (insert_bp_location): Move "set breakpoint auto-hw on" handling to
101 a separate function. Simplify "set breakpoint auto-hw off"
102 handling.
103 (insert_breakpoints): Update comment.
104 (tracepoint_locations_match): New parameter. For breakpoints,
105 compare location types too, if the caller wants to.
106 (handle_automatic_hardware_breakpoints): New functions.
107 (bp_location_is_less_than): Also sort by location type and
108 hardware breakpoint length.
109 (update_global_location_list): Handle "set breakpoint auto-hw on"
110 here.
111 (update_breakpoint_locations): Ask breakpoint_locations_match to
112 ignore location types.
113
114 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
115
116 * gdbtypes.h (TYPE_NAME): Remove. Change all cal sites to use
117 type::name instead.
118
119 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
120
121 * gdbtypes.h (struct type) <name, set_name>: New methods.
122 (TYPE_CODE): Use type::name. Change all call sites used to set
123 the name to use type::set_name instead.
124
125 2020-05-16 Tom Tromey <tom@tromey.com>
126
127 * top.c (quit_force): Update.
128 * infrun.c (handle_no_resumed): Update.
129 * top.h (all_uis): New function.
130 (ALL_UIS): Remove.
131
132 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
133
134 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Fix condition.
135
136 2020-05-16 Pedro Alves <palves@redhat.com>
137
138 * ia64-linux-nat.c
139 (ia64_linux_nat_target) <enable_watchpoints_in_psr(ptid_t)>:
140 Declare method.
141 (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target.
142
143 2020-05-15 Simon Marchi <simon.marchi@efficios.com>
144
145 * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
146 (sparc64_adi_info): Likewise.
147
148 2020-05-15 Tom Tromey <tom@tromey.com>
149
150 * symtab.c (lookup_language_this, lookup_symbol_aux): Use
151 block_objfile.
152 (lookup_objfile_from_block): Remove.
153 (lookup_symbol_in_block, lookup_symbol_in_static_block)
154 (lookup_global_symbol): Use block_objfile.
155 * symtab.h (lookup_objfile_from_block): Don't declare.
156 * printcmd.c (clear_dangling_display_expressions): Use
157 block_objfile.
158 * parse.c (operator_check_standard): Use block_objfile.
159
160 2020-05-15 Tom Tromey <tom@tromey.com>
161
162 * language.c (language_alloc_type_symbol): Set
163 SYMBOL_SECTION.
164 * symtab.c (initialize_objfile_symbol): Remove.
165 (allocate_symbol): Remove.
166 (allocate_template_symbol): Remove.
167 * dwarf2/read.c (fixup_go_packaging): Use "new".
168 (new_symbol): Use "new".
169 (read_variable): Don't call initialize_objfile_symbol. Use
170 "new".
171 (read_func_scope): Use "new".
172 * xcoffread.c (process_xcoff_symbol): Don't call
173 initialize_objfile_symbol.
174 (SYMBOL_DUP): Remove.
175 * coffread.c (process_coff_symbol, coff_read_enum_type): Use
176 "new".
177 * symtab.h (allocate_symbol, initialize_objfile_symbol)
178 (allocate_template_symbol): Don't declare.
179 (struct symbol): Add copy constructor. Change defaults.
180 * jit.c (finalize_symtab): Use "new".
181 * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb):
182 Use "new".
183 * stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
184 (common_block_end): Use "new".
185 * mdebugread.c (parse_symbol): Use "new".
186 (new_symbol): Likewise.
187
188 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
189
190 * NEWS: Mention changes to help and apropos.
191
192 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
193
194 * command.h (enum command_class): Improve comments, document
195 that class_alias is for user-defined aliases, give the class
196 name for each class, remove unused class_xdb.
197 * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage.
198 * breakpoint.c (_initialize_breakpoint): Replace class_alias
199 by a precise class.
200 * infcmd.c (_initialize_infcmd): Likewise.
201 * reverse.c (_initialize_reverse): Likewise.
202 * stack.c (_initialize_stack): Likewise.
203 * symfile.c (_initialize_symfile): Likewise.
204 * tracepoint.c (_initialize_tracepoint): Likewise.
205
206 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
207
208 * cli/cli-decode.c (apropos_cmd): Produce output for aliases
209 when their aliased command is traversed.
210 (help_cmd): Add fput_command_names_styled call to
211 output command name and aliases when command has an alias.
212
213 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
214
215 * cli/cli-decode.h (help_cmd_list): Remove declaration.
216 * cli/cli-decode.c (help_cmd_list): Declare as static,
217 remove prefix argument, use bool for recurse arg, rework to show the aliases of
218 a command together with the command.
219 (fput_command_name_styled, fput_command_names_styled): New functions.
220 (print_help_for_command): Remove prefix arg, use bool for recurse arg, use
221 fput_command_name_styled.
222 (help_list, help_all): Update callers to remove prefix arg and use bool recurse.
223 * cli/cli-cmds.c (_initialize_cli_cmds): Update alias_command doc.
224
225 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
226
227 * cli/cli-setshow.h (cmd_show_list): Remove prefix argument.
228 * cli/cli-decode.c (do_show_prefix_cmd): Likewise.
229 * command.h (cmd_show_list): Likewise.
230 * dwarf2/index-cache.c (show_index_cache_command): Likewise.
231 * cli/cli-setshow.c (cmd_show_list): Use the prefix to produce the output. Skip aliases.
232
233 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
234
235 * unittests/command-def-selftests.c (traverse_command_structure):
236 Verify all commands of a list have the same prefix command and
237 that only the top cmdlist commands have a null prefix.
238
239 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
240
241 * cli/cli-decode.c (lookup_cmd_for_prefix): Return the aliased command
242 as prefix, not one of its aliases.
243 (set_cmd_prefix): Remove.
244 (do_add_cmd): Centralize the setting of the prefix of a command, when
245 command is defined after its full chain of prefix commands.
246 (add_alias_cmd): Remove call to set_cmd_prefix, as do_add_cmd does it.
247 (add_setshow_cmd_full): Likewise.
248 (update_prefix_field_of_prefixed_commands): New function.
249 (add_prefix_cmd): Replace non working call to set_cmd_prefix by
250 update_prefix_field_of_prefixed_commands.
251 * gdb/remote-fileio.c (initialize_remote_fileio): Use the real
252 addresses of remote_set_cmdlist and remote_show_cmdlist given
253 as argument, not the address of an argument.
254 * gdb/remote-fileio.h (initialize_remote_fileio): Likewise.
255 * gdb/remote.c (_initialize_remote): Likewise.
256
257 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
258
259 * cli/cli-cmds.c (alias_command): Check for an existing alias
260 using lookup_cmd_composition, as valid_command_p is too strict
261 and forbids aliases that are the prefix of an existing alias
262 or command.
263 * cli/cli-decode.c (lookup_cmd_composition): Ensure a prefix
264 command is properly recognised as a valid command.
265
266 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
267
268 * unittests/help-doc-selftests.c: Rename to
269 unittests/command-def-selftests.c
270 * unittests/command-def-selftests.c (help_doc_tests): Update some
271 comments.
272 (command_structure_tests, traverse_command_structure): New namespace
273 and function.
274 (command_structure_invariants_tests): New function.
275 (_initialize_command_def_selftests) Renamed from
276 _initialize_help_doc_selftests, register command_structure_invariants
277 selftest.
278
279 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
280
281 * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as
282 an alias of 'show'.
283
284 2020-05-15 Joel Brobecker <brobecker@adacore.com>
285
286 * ada-lang.h: (ada_is_gnat_encoded_fixed_point_type): Renames
287 ada_is_fixed_point_type. Update all callers.
288 (gnat_encoded_fixed_point_delta): Renames ada_delta. Update
289 all callers.
290 * ada-lang.c (gnat_encoded_fixed_type_info): Renames fixed_type_info.
291 Update all callers.
292 * ada-typeprint.c (print_gnat_encoded_fixed_point_type): Renames
293 print_fixed_point_type. Update all callers.
294 * ada-valprint.c (ada_value_print_num): Replace call to
295 ada_is_fixed_point_type by ada_is_gnat_encoded_fixed_point_type.
296
297 2020-05-14 Kevin Buettner <kevinb@redhat.com>
298
299 * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
300 processors.
301 (cpu_supports_bts): Add CV_AMD case.
302
303 2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
304 Simon Marchi <simon.marchi@efficios.com>
305
306 * infrun.c (stop_all_threads): Collect multiple wait events at
307 each pass.
308
309 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
310
311 * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
312 type::code instead.
313
314 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
315
316 * gdbtypes.h (struct type) <code, set_code>: New methods.
317 (TYPE_CODE): Use type::code. Change all call sites used to set
318 the code to use type::set_code instead.
319
320 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
321 Tom de Vries <tdevries@suse.de>
322 Pedro Alves <palves@redhat.com>
323
324 PR threads/25478
325 * infrun.c (stop_all_threads): Do NOT ignore
326 TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
327 TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
328 received.
329 (handle_no_resumed): Remove code handling a live inferior with no
330 threads.
331 * remote.c (has_single_non_exited_thread): New.
332 (remote_target::update_thread_list): Do not delete a thread if is
333 the last thread of the process.
334 * thread.c (thread_select): Call delete_exited_threads instead of
335 prune_threads.
336
337 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
338
339 * infrun.c (stop_all_threads): Enable/disable thread events of all
340 targets. Move a debug message denoting the end of the function
341 into the SCOPED_EXIT block.
342
343 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
344
345 * process-stratum-target.h: Include <set>.
346 (all_non_exited_process_targets, switch_to_target_no_thread): New
347 function declarations.
348 * process-stratum-target.c (all_non_exited_process_targets)
349 (switch_to_target_no_thread): New function implementations.
350
351 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
352
353 * infrun.c (handle_inferior_event): Extract out a piece of code
354 into...
355 (mark_non_executing_threads): ...this new function.
356
357 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
358
359 * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
360 use.
361
362 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
363
364 * regcache.c (regcache_read_pc_protected): New function
365 implementation that returns 0 if the PC cannot read via
366 'regcache_read_pc'.
367 * infrun.c (proceed): Call 'regcache_read_pc_protected'
368 instead of 'regcache_read_pc'.
369 (keep_going_pass_signal): Ditto.
370
371 2020-05-13 Tom Tromey <tromey@adacore.com>
372
373 * ada-lang.c (align_value): Remove.
374 (ada_template_to_fixed_record_type_1): Use align_up.
375
376 2020-05-13 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
377
378 * async-event.c: Update the copyright year.
379 * async-event.h: Update the copyright year.
380
381 2020-05-12 Simon Marchi <simon.marchi@efficios.com>
382
383 * objfiles.h (is_addr_in_objfile,
384 shared_objfile_contains_address_p): Return bool.
385 * objfile.c (is_addr_in_objfile,
386 shared_objfile_contains_address_p): Return bool.
387
388 2020-05-11 Tom Tromey <tromey@adacore.com>
389
390 * cli/cli-cmds.c (info_command): Restore.
391 (_initialize_cli_cmds): Use add_prefix_command for "info".
392 * gdb-gdb.gdb.in: Restore breakpoint on info_command.
393
394 2020-05-11 Tom Tromey <tromey@adacore.com>
395
396 * ada-lang.c (ada_value_primitive_field): Now public.
397 * ada-lang.h (ada_value_primitive_field): Declare.
398 * ada-valprint.c (print_field_values): Use
399 ada_value_primitive_field for wrapper fields.
400
401 2020-05-11 Tom de Vries <tdevries@suse.de>
402
403 * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
404 MODULE_DOMAIN.
405
406 2020-05-11 Tom de Vries <tdevries@suse.de>
407
408 PR symtab/25941
409 * dwarf2/read.c (create_cus_from_debug_names_list): Initialize CUs
410 with length 0, if not gdb-produced.
411 (cutu_reader::cutu_reader): Set CU length to actual length if 0.
412
413 2020-05-09 Tom de Vries <tdevries@suse.de>
414
415 PR gdb/25955
416 * break-catch-throw.c (check_status_exception_catchpoint): Fix name
417 calculation.
418
419 2020-05-09 Tom Tromey <tom@tromey.com>
420
421 * top.c (server_command): Now bool.
422 * top.h (server_command): Now bool.
423
424 2020-05-08 Tom Tromey <tromey@adacore.com>
425
426 * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE
427 already being processed.
428
429 2020-05-08 Tom Tromey <tom@tromey.com>
430
431 * printcmd.c (struct display) <next>: Remove.
432 <display>: New constructor.
433 <exp_string>: Now a std::string.
434 <enabled_p>: Now a bool.
435 (display_number): Move definition earlier.
436 (displays): Rename from display_chain. Now a std::vector.
437 (ALL_DISPLAYS, ALL_DISPLAYS_SAFE): Remove.
438 (display_command): Update.
439 (do_one_display, disable_display)
440 (enable_disable_display_command, do_enable_disable_display):
441 Update.
442 (free_display): Remove.
443 (clear_displays): Rewrite.
444 (delete_display): Update.
445 (map_display_numbers): Use function_view. Remove "data"
446 parameter. Update.
447 (do_delete_display): Remove.
448 (undisplay_command): Update.
449 (do_one_display, do_displays, disable_display)
450 (info_display_command): Update.
451 (do_enable_disable_display): Remove.
452 (enable_disable_display_command)
453 (clear_dangling_display_expressions): Update.
454
455 2020-05-08 Tom Tromey <tom@tromey.com>
456
457 * symtab.c (set_symbol_cache_size)
458 (maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
459 (maintenance_print_symbol_cache_statistics): Update.
460 * symmisc.c (print_symbol_bcache_statistics)
461 (print_objfile_statistics, maintenance_print_objfiles)
462 (maintenance_info_symtabs, maintenance_check_symtabs)
463 (maintenance_expand_symtabs, maintenance_info_line_tables):
464 Update.
465 * symfile-debug.c (set_debug_symfile): Update.
466 * source.c (forget_cached_source_info): Update.
467 * python/python.c (gdbpy_progspaces): Update.
468 * psymtab.c (maintenance_info_psymtabs): Update.
469 * probe.c (parse_probes): Update.
470 * linespec.c (iterate_over_all_matching_symtabs)
471 (collect_symtabs_from_filename, search_minsyms_for_name): Update.
472 * guile/scm-progspace.c (gdbscm_progspaces): Update.
473 * exec.c (exec_target::close): Update.
474 * ada-tasks.c (ada_tasks_new_objfile_observer): Update.
475 * breakpoint.c (print_one_breakpoint_location)
476 (create_longjmp_master_breakpoint)
477 (create_std_terminate_master_breakpoint): Update.
478 * progspace.c (program_spaces): Now a std::vector.
479 (maybe_new_address_space): Update.
480 (add_program_space): Remove.
481 (program_space::program_space): Update.
482 (remove_program_space): Update.
483 (number_of_program_spaces): Remove.
484 (print_program_space, update_address_spaces): Update.
485 * progspace.h (program_spaces): Change type.
486 (ALL_PSPACES): Remove.
487 (number_of_program_spaces): Don't declare.
488 (struct program_space) <next>: Remove.
489
490 2020-05-08 Tom Tromey <tom@tromey.com>
491
492 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update.
493 * solib-svr4.c (svr4_fetch_objfile_link_map): Update.
494 (enable_break): Update.
495 * solib-frv.c (frv_fdpic_find_global_pointer): Update.
496 (frv_fdpic_find_canonical_descriptor): Update.
497 (frv_fetch_objfile_link_map): Update.
498 * progspace.c (program_space::free_all_objfiles): Update.
499 (program_space::solibs): New method.
500 * progspace.h (struct program_space) <solibs>: New method.
501 * solist.h (master_so_list): Don't declare.
502 (ALL_SO_LIBS): Remove.
503 * solib.h (so_list_head): Remove.
504 (update_solib_list): Update comment.
505 * solib.c (master_so_list): Remove.
506 (solib_used, update_solib_list, solib_add)
507 (info_sharedlibrary_command, clear_solib)
508 (reload_shared_libraries_1, remove_user_added_objfile): Update.
509
510 2020-05-08 Tom Tromey <tom@tromey.com>
511
512 * extension.c (extension_languages): Now a std::array.
513 (ALL_EXTENSION_LANGUAGES): Remove.
514 (get_ext_lang_defn, get_ext_lang_of_file)
515 (eval_ext_lang_from_control_command): Update.
516 (finish_ext_lang_initialization)
517 (auto_load_ext_lang_scripts_for_objfile)
518 (ext_lang_type_printers::ext_lang_type_printers)
519 (apply_ext_lang_type_printers)
520 (ext_lang_type_printers::~ext_lang_type_printers)
521 (apply_ext_lang_val_pretty_printer, apply_ext_lang_frame_filter)
522 (preserve_ext_lang_values, get_breakpoint_cond_ext_lang)
523 (breakpoint_ext_lang_cond_says_stop, check_quit_flag)
524 (get_matching_xmethod_workers, ext_lang_colorize)
525 (ext_lang_before_prompt): Update.
526 (ALL_ENABLED_EXTENSION_LANGUAGES): Remove.
527
528 2020-05-08 Tom Tromey <tom@tromey.com>
529
530 * symtab.h (class demangle_result_storage) <set_malloc_ptr>: New
531 overload.
532 <swap_string, m_string>: Remove.
533 * symtab.c (demangle_for_lookup, completion_list_add_symbol):
534 Update.
535 * stabsread.c (define_symbol, read_type): Update.
536 * linespec.c (find_linespec_symbols): Update.
537 * gnu-v3-abi.c (gnuv3_get_typeid): Update.
538 * dwarf2/read.c (dwarf2_canonicalize_name): Update.
539 * dbxread.c (read_dbx_symtab): Update.
540 * cp-support.h (cp_canonicalize_string_full)
541 (cp_canonicalize_string, cp_canonicalize_string_no_typedefs):
542 Return unique_xmalloc_ptr.
543 * cp-support.c (inspect_type): Update.
544 (cp_canonicalize_string_full): Return unique_xmalloc_ptr.
545 (cp_canonicalize_string_no_typedefs, cp_canonicalize_string):
546 Likewise.
547 * c-typeprint.c (print_name_maybe_canonical): Update.
548 * break-catch-throw.c (check_status_exception_catchpoint):
549 Update.
550
551 2020-05-08 Tom de Vries <tdevries@suse.de>
552
553 * infrun.c (follow_fork): Copy current_line and current_symtab to
554 child thread.
555
556 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
557
558 * async-event.c (struct async_signal_handler, struct
559 async_event_handler): Reformat, remove typedef.
560
561 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
562
563 * gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
564 access thistype->main_type->dyn_prop_list directly.
565
566 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
567
568 * gdbtypes.h (struct type) <remove_dyn_prop>: New method.
569 (remove_dyn_prop): Remove. Update all users to use
570 type::remove_dyn_prop.
571 * gdbtypes.c (remove_dyn_prop): Rename to...
572 (type::remove_dyn_prop): ... this.
573
574 2020-05-07 Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
575
576 * gdbtypes.h (struct type) <add_dyn_prop>: New method.
577 (add_dyn_prop): Remove. Update all users to use
578 type::add_dyn_prop.
579 * gdbtypes.c (add_dyn_prop): Rename to...
580 (type::add_dyn_prop): ... this.
581
582 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
583
584 * gdbtypes.h (struct type) <get_dyn_prop>: New method.
585 (get_dyn_prop): Remove. Update all users to use
586 type::dyn_prop.
587 * gdbtypes.c (get_dyn_prop): Rename to...
588 (type::dyn_prop): ... this.
589
590 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
591
592 * gdbtypes.h (struct main_type) <flag_static>: Remove.
593
594 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
595
596 * amd64-tdep.c (amd64_analyze_prologue): Check for `endbr64`
597 instruction, skip it if it's there.
598
599 2020-05-05 Simon Marchi <simon.marchi@efficios.com>
600
601 * gdbtypes.h (struct main_type) <flag_incomplete>: Remove.
602
603 2020-05-04 Simon Marchi <simon.marchi@efficios.com>
604
605 * gdbtypes.h (TYPE_INCOMPLETE): Remove.
606 * gdbtypes.c (recursive_dump_type): Remove use of
607 TYPE_INCOMPLETE.
608
609 2020-05-03 Tom Tromey <tom@tromey.com>
610
611 * breakpoint.c (catch_command, tcatch_command): Remove.
612 (_initialize_breakpoint): Use add_basic_prefix_cmd,
613 add_show_prefix_cmd.
614 (set_breakpoint_cmd, show_breakpoint_cmd): Remove
615 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
616 Remove.
617 (add_internal_problem_command): Use add_basic_prefix_cmd,
618 add_show_prefix_cmd.
619 * mips-tdep.c (set_mipsfpu_command): Remove.
620 (_initialize_mips_tdep): Use add_basic_prefix_cmd.
621 * dwarf2/index-cache.c (set_index_cache_command): Remove.
622 (_initialize_index_cache): Use add_basic_prefix_cmd.
623 * memattr.c (dummy_cmd): Remove.
624 (_initialize_mem): Use add_basic_prefix_cmd, add_show_prefix_cmd.
625 * tui/tui-win.c (set_tui_cmd, show_tui_cmd): Remove.
626 (_initialize_tui_win): Use add_basic_prefix_cmd,
627 add_show_prefix_cmd.
628 * cli/cli-logging.c (set_logging_command): Remove.
629 (_initialize_cli_logging): Use add_basic_prefix_cmd,
630 add_show_prefix_cmd.
631 (show_logging_command): Remove.
632 * target.c (target_command): Remove.
633 (add_target): Use add_basic_prefix_cmd.
634
635 2020-05-02 Hannes Domani <ssbssa@yahoo.de>
636
637 * gdbtypes.h (enum dynamic_prop_node_kind): Fix typo.
638
639 2020-05-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
640
641 * gdb-gdb.gdb-in: Remove breakpoint on disappeared function
642 info_command.
643
644 2020-04-30 Kamil Rytarowski <n54@gmx.com>
645
646 * nbsd-nat.c (nbsd_enable_proc_events)
647 (nbsd_nat_target::post_startup_inferior): Add.
648 (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
649 (nbsd_nat_target::update_thread_list): Rewrite.
650 (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
651 "PTRACE_LWP_CREATE".
652 * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
653
654 2020-04-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
655
656 * stack.c (_initialize_stack): Remove duplicated creation
657 of "frame" command and "f" alias.
658
659 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
660
661 PR gdb/18706
662 * gdbtypes.c (check_typedef): Calculate size of array of
663 stubbed type.
664
665 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
666
667 PR gdb/15559
668 * i386-tdep.c (i386_push_dummy_call): Call
669 i386_thiscall_push_dummy_call.
670 (i386_thiscall_push_dummy_call): New function.
671 * i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
672 * i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
673 (i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
674
675 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
676
677 * gdbarch.sh (do_read): Add shellcheck disable directive for
678 warning SC2162.
679
680 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
681
682 * gdbarch.sh: Use ${foo:-} where shellcheck would report a
683 "referenced but not assigned" warning.
684
685 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
686
687 * gdbarch.sh: Remove code that sets fallbackdefault.
688
689 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
690
691 * gdbarch.sh: Use shell operators && and || instead of
692 -a and -o.
693
694 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
695
696 * gdbarch.sh: Use $(...) instead of `...`.
697
698 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
699
700 * gdbarch.sh: Use double quotes around variables.
701
702 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
703
704 * gdbarch.sh: Use %s with printf, instead of variables in the
705 format string.
706
707 2020-04-29 Tom Tromey <tromey@adacore.com>
708
709 PR ada/25875:
710 * dwarf2/read.c (update_enumeration_type_from_children): Compute
711 type fields here.
712 (read_enumeration_type): Call
713 update_enumeration_type_from_children later. Update comments.
714 (process_enumeration_scope): Don't create type fields.
715
716 2020-04-29 Kamil Rytarowski <n54@gmx.com>
717
718 * nbsd-tdep.c: Include "xml-syscall.h".
719 (nbsd_init_abi): Call `set_xml_syscall_file_name'.
720
721 2020-04-29 Kamil Rytarowski <n54@gmx.com>
722
723 * nbsd-nat.c: Include "sys/wait.h".
724 (nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
725 (nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
726 (nbsd_nat_target::remove_exec_catchpoint)
727 (nbsd_nat_target::set_syscall_catchpoint): Add.
728 * nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
729 (nbsd_nat_target::insert_exec_catchpoint)
730 (nbsd_nat_target::remove_exec_catchpoint)
731 (nbsd_nat_target::set_syscall_catchpoint): Add.
732 * nbsd-tdep.c (nbsd_get_syscall_number): Add.
733 (nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
734 `nbsd_get_syscall_number'.
735
736 2020-04-29 Tom Tromey <tom@tromey.com>
737
738 * stack.c (print_block_frame_labels): Remove.
739
740 2020-04-29 Hannes Domani <ssbssa@yahoo.de>
741
742 PR gdb/17320
743 * ada-valprint.c (val_print_packed_array_elements): Move array
744 end bracket to new line.
745 (ada_val_print_string): Remove extra spaces before first array
746 element.
747 * c-valprint.c (c_value_print_array): Likewise.
748 * m2-valprint.c (m2_print_array_contents): Likewise.
749 (m2_value_print_inner): Likewise.
750 * p-valprint.c (pascal_value_print_inner): Likewise.
751 * valprint.c (generic_val_print_array): Likewise.
752 (value_print_array_elements): Move first array element and array
753 end bracket to new line.
754
755 2020-04-29 Tom de Vries <tdevries@suse.de>
756
757 PR symtab/25889
758 * linespec.c (find_method): Fix ix calculation.
759
760 2020-04-28 Kamil Rytarowski <n54@gmx.com>
761
762 * syscalls/update-netbsd.sh: New file.
763 * syscalls/netbsd.xml: Regenerate.
764 * data-directory/Makefile.in: Register `netbsd.xml' in
765 `SYSCALLS_FILES'.
766
767 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
768
769 * syscalls/update-freebsd.sh: Add double quotes.
770
771 2020-04-28 Tom Tromey <tom@tromey.com>
772
773 * NEWS: Update.
774 * python/py-cmd.c (gdbpy_initialize_commands): Add COMMAND_TUI.
775 (cmdpy_init): Allow class_tui.
776
777 2020-04-28 Mark Williams <mark@myosotissp.com>
778
779 PR gdb/24480
780 * dwarf2read.c: Add missing assingments to list_in_scope when
781 start_symtab was already called.
782
783 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
784
785 PR gdb/25881
786 * dwarf2/read.c (offset_map_type): Use
787 gdb:hash_enum<sect_offset> as hash function.
788
789 2020-04-28 Tom de Vries <tdevries@suse.de>
790
791 * dwarf2/read.c (process_structure_scope): Add symbol for struct decl
792 with DW_AT_signature.
793
794 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
795
796 * configure.ac: Remove check for fs_base/gs_base in
797 user_regs_struct.
798 * configure: Re-generate.
799 * config.in: Re-generate.
800 * amd64-nat.c (amd64_native_gregset_reg_offset): Adjust.
801 * amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers,
802 amd64_linux_nat_target::store_registers, ps_get_thread_area, ): Adjust.
803
804 2020-04-27 Luis Machado <luis.machado@linaro.org>
805
806 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Handle
807 problematic inline frame unwinding situation.
808 * frame.c (frame_id_computed_p): New function.
809 * frame.h (frame_id_computed_p): New prototype.
810
811 2020-04-26 Tom Tromey <tom@tromey.com>
812
813 * command.h (enum command_class) <class_pseudo>: Remove.
814
815 2020-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
816
817 * cli/cli-decode.c (lookup_cmd_composition): Fix comments
818 and whitespace.
819
820 2020-04-25 Kamil Rytarowski <n54@gmx.com>
821
822 * inf-ptrace.c (inf_ptrace_target::wait): Remove
823 `PT_GET_PROCESS_STATE' block.
824
825 2020-04-24 Tom Tromey <tom@tromey.com>
826
827 * symtab.h (symbol_get_demangled_name): Don't declare.
828 * symtab.c (symbol_get_demangled_name): Remove.
829 (general_symbol_info::natural_name)
830 (general_symbol_info::demangled_name): Update.
831
832 2020-04-24 Tom Tromey <tom@tromey.com>
833
834 PR rust/25025:
835 * dwarf2/read.c (dwarf2_physname): Do not demangle for Rust.
836
837 2020-04-24 Tom Tromey <tom@tromey.com>
838
839 PR symtab/12707:
840 * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
841 exists.
842 (new_symbol): Likewise.
843 * compile/compile-object-load.c (get_out_value_type): Use
844 symbol_matches_search_name.
845
846 2020-04-24 Tom Tromey <tom@tromey.com>
847
848 * dwarf2/read.c (add_partial_symbol): Do not call
849 compute_and_set_names.
850
851 2020-04-24 Tom Tromey <tom@tromey.com>
852
853 * dwarf2/read.c (add_partial_symbol): Use new add_psymbol_to_list
854 overload.
855
856 2020-04-24 Tom Tromey <tom@tromey.com>
857
858 * psymtab.c (add_psymbol_to_bcache): Simplify calling convention.
859 (add_psymbol_to_list): New overload. Make old overload call new
860 one.
861 * psympriv.h (add_psymbol_to_list): New overload.
862
863 2020-04-24 Tom Tromey <tom@tromey.com>
864
865 * dwarf2/read.c (partial_die_info::read) <case
866 DW_AT_linkage_name>: Use value_as_string.
867 (dwarf2_string_attr): Use value_as_string.
868 * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
869 method.
870 * dwarf2/attribute.c (attribute::value_as_string): New method.
871
872 2020-04-24 Tom Tromey <tom@tromey.com>
873
874 * symtab.c (general_symbol_info::natural_name)
875 (general_symbol_info::demangled_name): Check for language_rust.
876
877 2020-04-24 Tom Tromey <tom@tromey.com>
878
879 * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
880 (dwarf2_physname): ... from here.
881 (partial_die_info::read): Add Rust "{" hack.
882
883 2020-04-24 Tom Tromey <tom@tromey.com>
884
885 * symtab.h (struct general_symbol_info) <set_demangled_name>: New
886 method.
887 (symbol_set_demangled_name): Don't declare.
888 * symtab.c (general_symbol_info::set_demangled_name): Rename from
889 symbol_set_demangled_name.
890 (general_symbol_info::set_language)
891 (general_symbol_info::compute_and_set_names): Update.
892 * minsyms.c (minimal_symbol_reader::install): Update.
893 * dwarf2/read.c (new_symbol): Update.
894
895 2020-04-24 Tom Tromey <tromey@adacore.com>
896
897 PR python/23662:
898 * python/py-type.c (convert_field): Handle
899 FIELD_LOC_KIND_DWARF_BLOCK.
900 (typy_get_sizeof): Handle TYPE_HAS_DYNAMIC_LENGTH.
901 (typy_get_dynamic): Nw function.
902 (type_object_getset): Add "dynamic".
903 * NEWS: Add entry.
904
905 2020-04-24 Tom Tromey <tromey@adacore.com>
906
907 * ada-typeprint.c (print_choices, print_variant_part)
908 (print_record_field_types_dynamic): New functions.
909 (print_record_field_types): Use print_record_field_types_dynamic.
910
911 2020-04-24 Tom Tromey <tromey@adacore.com>
912
913 * dwarf2/read.c (handle_data_member_location): New overload.
914 (dwarf2_add_field): Use it.
915 (decode_locdesc): Add "computed" parameter. Update comment.
916 * gdbtypes.c (is_dynamic_type_internal): Also look for
917 FIELD_LOC_KIND_DWARF_BLOCK.
918 (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK.
919 * gdbtypes.c (is_dynamic_type_internal): Add special case for C++
920 virtual base classes.
921 * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle
922 FIELD_LOC_KIND_DWARF_BLOCK.
923
924 2020-04-24 Tom Tromey <tromey@adacore.com>
925
926 * dwarf2/read.c (read_structure_type): Handle dynamic length.
927 * gdbtypes.c (is_dynamic_type_internal): Check
928 TYPE_HAS_DYNAMIC_LENGTH.
929 (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH.
930 * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH):
931 New macros.
932 (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New
933 constant.
934
935 2020-04-24 Tom Tromey <tromey@adacore.com>
936
937 * dwarf2/read.c (struct variant_field): Rewrite.
938 (struct variant_part_builder): New.
939 (struct nextfield): Remove "variant" field. Add "offset".
940 (struct field_info): Add "current_variant_part" and
941 "variant_parts".
942 (alloc_discriminant_info): Remove.
943 (alloc_rust_variant): New function.
944 (quirk_rust_enum): Update.
945 (dwarf2_add_field): Set "offset" member. Don't handle
946 DW_TAG_variant_part.
947 (offset_map_type): New typedef.
948 (convert_variant_range, create_one_variant)
949 (create_one_variant_part, create_variant_parts)
950 (add_variant_property): New functions.
951 (dwarf2_attach_fields_to_type): Call add_variant_property.
952 (read_structure_type): Don't handle DW_TAG_variant_part.
953 (handle_variant_part, handle_variant): New functions.
954 (handle_struct_member_die): Use them.
955 (process_structure_scope): Don't handle variant parts.
956 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): Remove.
957 (struct discriminant_info): Remove.
958 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: Remove.
959 (struct main_type) <flag_discriminated_union>: Remove.
960 * rust-lang.c (rust_enum_p, rust_empty_enum_p): Rewrite.
961 (rust_enum_variant): Return int. Remove "contents". Rewrite.
962 (rust_print_enum, rust_print_struct_def, rust_evaluate_subexp):
963 Update.
964 * valops.c (value_union_variant): Remove.
965 * value.h (value_union_variant): Don't declare.
966
967 2020-04-24 Tom Tromey <tromey@adacore.com>
968
969 * ada-lang.c (ada_discrete_type_high_bound, ada_discrete_type_low)
970 (ada_value_primitive_packed_val): Update.
971 * ada-valprint.c (ada_value_print_1): Update.
972 * dwarf2/loc.c (evaluate_for_locexpr_baton): New struct.
973 (dwarf2_locexpr_baton_eval): Take a property_addr_info rather than
974 just an address. Use evaluate_for_locexpr_baton.
975 (dwarf2_evaluate_property): Update.
976 * dwarf2/loc.h (struct property_addr_info) <valaddr>: Now an
977 array_view.
978 * findvar.c (default_read_var_value): Update.
979 * gdbtypes.c (compute_variant_fields_inner)
980 (resolve_dynamic_type_internal): Update.
981 (resolve_dynamic_type): Change type of valaddr parameter.
982 * gdbtypes.h (resolve_dynamic_type): Update.
983 * valarith.c (value_subscripted_rvalue): Update.
984 * value.c (value_from_contents_and_address): Update.
985
986 2020-04-24 Tom Tromey <tromey@adacore.com>
987
988 * dwarf2/loc.c (dwarf2_locexpr_baton_eval): Add
989 "push_initial_value" parameter.
990 (dwarf2_evaluate_property): Likewise.
991 * dwarf2/loc.h (dwarf2_evaluate_property): Update.
992
993 2020-04-24 Tom Tromey <tromey@adacore.com>
994
995 * gdbtypes.c (is_dynamic_type_internal): Check for variant parts.
996 (variant::matches, compute_variant_fields_recurse)
997 (compute_variant_fields_inner, compute_variant_fields): New
998 functions.
999 (resolve_dynamic_struct): Check for DYN_PROP_VARIANT_PARTS.
1000 Use resolved_type after type is made.
1001 (operator==): Add new cases.
1002 * gdbtypes.h (TYPE_HAS_VARIANT_PARTS): New macro.
1003 (struct discriminant_range, struct variant, struct variant_part):
1004 New.
1005 (union dynamic_prop_data) <variant_parts, original_type>: New
1006 members.
1007 (enum dynamic_prop_node_kind) <DYN_PROP_VARIANT_PARTS>: New constant.
1008 (enum dynamic_prop_kind) <PROP_TYPE, PROP_VARIANT_PARTS>: New
1009 constants.
1010 * value.c (unpack_bits_as_long): Now public.
1011 * value.h (unpack_bits_as_long): Declare.
1012
1013 2020-04-24 Tom Tromey <tromey@adacore.com>
1014
1015 * rs6000-tdep.c (struct ppc_variant): Rename from "variant".
1016 (variants, find_variant_by_arch, rs6000_gdbarch_init): Update.
1017
1018 2020-04-24 Hannes Domani <ssbssa@yahoo.de>
1019
1020 * windows-tdep.c (exception_values): Add WOW64 exception numbers.
1021
1022 2020-04-24 Kamil Rytarowski <n54@gmx.com>
1023
1024 * inf-ptrace.h (follow_fork, insert_fork_catchpoint)
1025 (remove_fork_catchpoint, post_startup_inferior)
1026 (post_attach): Move...
1027 * obsd-nat.h (follow_fork, insert_fork_catchpoint)
1028 (remove_fork_catchpoint, post_startup_inferior)
1029 (post_attach): ...here.
1030 * inf-ptrace.c (follow_fork, insert_fork_catchpoint)
1031 (remove_fork_catchpoint, post_startup_inferior)
1032 (post_attach): Move...
1033 * obsd-nat.c (follow_fork, insert_fork_catchpoint)
1034 (remove_fork_catchpoint, post_startup_inferior)
1035 (post_attach): ...here.
1036
1037 2020-04-24 Tom Tromey <tromey@adacore.com>
1038
1039 * nat/windows-nat.h (struct windows_thread_info)
1040 <pc_adjusted>: New member.
1041 * windows-nat.c (windows_fetch_one_register): Check
1042 pc_adjusted.
1043 (windows_nat_target::get_windows_debug_event)
1044 (windows_nat_target::wait): Set pc_adjusted.
1045
1046 2020-04-24 Tom de Vries <tdevries@suse.de>
1047
1048 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
1049 Run gdb-add-index inside temp dir.
1050
1051 2020-04-23 Tom Tromey <tromey@adacore.com>
1052
1053 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
1054 in loop.
1055
1056 2020-04-23 Luis Machado <luis.machado@linaro.org>
1057
1058 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
1059 get_frame_register instead of gdbarch_unwind_pc.
1060
1061 2020-04-23 Tom de Vries <tdevries@suse.de>
1062
1063 * symtab.c (lookup_global_symbol): Prefer def over decl.
1064
1065 2020-04-23 Tom de Vries <tdevries@suse.de>
1066
1067 PR symtab/25807
1068 * block.c (best_symbol, better_symbol): Promote to external.
1069 * block.h (best_symbol, better_symbol): Declare.
1070 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
1071 decl.
1072
1073 2020-04-23 Tom Tromey <tromey@adacore.com>
1074
1075 PR ada/25837:
1076 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
1077 "const char *", not a "const std::string &".
1078 <name_and_matcher::operator==>: Update.
1079 * unittests/lookup_name_info-selftests.c: Change type of
1080 "result".
1081
1082 2020-04-23 Tom Tromey <tom@tromey.com>
1083
1084 * inferior.h (iterate_over_inferiors): Don't declare.
1085 * inferior.c (iterate_over_inferiors): Remove.
1086 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
1087 Remove.
1088 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
1089 use iterate_over_inferiors.
1090 (darwin_resume_inferior_it)
1091 (struct resume_inferior_threads_param)
1092 (darwin_resume_inferior_threads_it): Remove.
1093 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
1094
1095 2020-04-23 Tom de Vries <tdevries@suse.de>
1096
1097 * blockframe.c (find_pc_partial_function): Use
1098 find_pc_sect_compunit_symtab rather than
1099 objfile->sf->qf->find_pc_sect_compunit_symtab.
1100
1101 2020-04-22 Tom de Vries <tdevries@suse.de>
1102
1103 PR symtab/25764
1104 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
1105 in psymtabs.
1106
1107 2020-04-22 Tom de Vries <tdevries@suse.de>
1108
1109 PR symtab/25801
1110 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
1111 symtabs.
1112
1113 2020-04-22 Tom de Vries <tdevries@suse.de>
1114
1115 PR symtab/25700
1116 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
1117 CU if already created.
1118
1119 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1120
1121 * infrun.c (displaced_step_fixup): Switch to the event_thread
1122 before calling displaced_step_restore, not after.
1123
1124 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
1125
1126 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
1127 its inferior is not recorded by us.
1128 (record_btrace_target_open): Replace call to
1129 all_non_exited_threads () with call to current_inferior
1130 ()->non_exited_threads ().
1131 (record_btrace_target::stop_recording): Likewise.
1132 (record_btrace_target::close): Likewise.
1133 (record_btrace_target::wait): Likewise.
1134 (record_btrace_target::record_stop_replaying): Likewise.
1135
1136 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
1137
1138 * btrace.c (btrace_enable): Throw an error on double enables and
1139 when enabling recording fails.
1140 (btrace_disable): Throw an error if the thread is not recorded.
1141
1142 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
1143
1144 * record-btrace.c (record_btrace_target::fetch_registers): Forward
1145 request if we do not have a thread_info.
1146
1147 2020-04-21 Tom de Vries <tdevries@suse.de>
1148
1149 PR gdb/25471
1150 * thread.c
1151 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
1152 exception in get_frame_id.
1153
1154 2020-04-20 Tom Tromey <tromey@adacore.com>
1155
1156 * python/python.c (struct gdbpy_event): Mark move constructor as
1157 noexcept.
1158 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
1159 constructor as noexcept.
1160 * completer.h (struct completion_result): Mark move constructor as
1161 noexcept.
1162 * completer.c (completion_result::completion_result): Use
1163 initialization style. Don't call reset_match_list.
1164
1165 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
1166
1167 * MAINTAINERS (Write After Approval): Add myself.
1168
1169 2020-04-18 Tom Tromey <tom@tromey.com>
1170
1171 * windows-tdep.c (init_w32_command_list)
1172 (w32_prefix_command_valid): Restore.
1173 (_initialize_windows_tdep): Call init_w32_command_list.
1174
1175 2020-04-18 Tom Tromey <tom@tromey.com>
1176
1177 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
1178 * value.c (value_fn_field): Update.
1179 * valops.c (find_function_in_inferior)
1180 (value_allocate_space_in_inferior): Update.
1181 * tui/tui-winsource.c (tui_update_source_windows_with_line):
1182 Update.
1183 * tui/tui-source.c (tui_source_window::set_contents): Update.
1184 * symtab.c (lookup_global_or_static_symbol)
1185 (find_function_start_sal_1, skip_prologue_sal)
1186 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
1187 * symmisc.c (dump_msymbols, dump_symtab_1)
1188 (maintenance_print_one_line_table): Update.
1189 * symfile.c (init_entry_point_info, section_is_mapped)
1190 (list_overlays_command, simple_read_overlay_table)
1191 (simple_overlay_update_1): Update.
1192 * stap-probe.c (handle_stap_probe): Update.
1193 * stabsread.c (dbx_init_float_type, define_symbol)
1194 (read_one_struct_field, read_enum_type, read_range_type): Update.
1195 * source.c (info_line_command): Update.
1196 * python/python.c (gdbpy_source_objfile_script)
1197 (gdbpy_execute_objfile_script): Update.
1198 * python/py-type.c (save_objfile_types): Update.
1199 * python/py-objfile.c (py_free_objfile): Update.
1200 * python/py-inferior.c (python_new_objfile): Update.
1201 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
1202 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
1203 (maintenance_check_psymtabs): Update.
1204 * printcmd.c (info_address_command): Update.
1205 * objfiles.h (struct objfile) <arch>: New method, from
1206 get_objfile_arch.
1207 (get_objfile_arch): Don't declare.
1208 * objfiles.c (get_objfile_arch): Remove.
1209 (filter_overlapping_sections): Update.
1210 * minsyms.c (msymbol_is_function): Update.
1211 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
1212 (output_nondebug_symbol): Update.
1213 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
1214 (mdebug_expand_psymtab): Update.
1215 * machoread.c (macho_add_oso_symfile): Update.
1216 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
1217 Update.
1218 * linux-fork.c (checkpoint_command): Update.
1219 * linespec.c (convert_linespec_to_sals): Update.
1220 * jit.c (finalize_symtab): Update.
1221 * infrun.c (insert_exception_resume_from_probe): Update.
1222 * ia64-tdep.c (ia64_find_unwind_table): Update.
1223 * hppa-tdep.c (internalize_unwinds): Update.
1224 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
1225 Update.
1226 * gcore.c (call_target_sbrk): Update.
1227 * elfread.c (record_minimal_symbol, elf_symtab_read)
1228 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
1229 (elf_gnu_ifunc_resolve_by_got): Update.
1230 * dwarf2/read.c (create_addrmap_from_index)
1231 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
1232 (read_debug_names_from_section)
1233 (process_psymtab_comp_unit_reader, add_partial_symbol)
1234 (add_partial_subprogram, process_full_comp_unit)
1235 (read_file_scope, read_func_scope, read_lexical_block_scope)
1236 (read_call_site_scope, dwarf2_ranges_read)
1237 (dwarf2_record_block_ranges, dwarf2_add_field)
1238 (mark_common_block_symbol_computed, read_tag_pointer_type)
1239 (read_tag_string_type, dwarf2_init_float_type)
1240 (dwarf2_init_complex_target_type, read_base_type)
1241 (partial_die_info::read, partial_die_info::read)
1242 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
1243 (dwarf2_fetch_die_loc_sect_off): Update.
1244 * dwarf2/loc.c (dwarf2_find_location_expression)
1245 (class dwarf_evaluate_loc_desc, rw_pieced_value)
1246 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
1247 (dwarf2_loc_desc_get_symbol_read_needs)
1248 (locexpr_describe_location_piece, locexpr_describe_location_1)
1249 (loclist_describe_location): Update.
1250 * dwarf2/index-write.c (write_debug_names): Update.
1251 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
1252 * dtrace-probe.c (dtrace_process_dof): Update.
1253 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
1254 (process_one_symbol): Update.
1255 * ctfread.c (ctf_init_float_type, read_base_type): Update.
1256 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
1257 (coff_read_enum_type): Update.
1258 * cli/cli-cmds.c (edit_command, list_command): Update.
1259 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
1260 * breakpoint.c (create_overlay_event_breakpoint)
1261 (create_longjmp_master_breakpoint)
1262 (create_std_terminate_master_breakpoint)
1263 (create_exception_master_breakpoint, get_sal_arch): Update.
1264 * block.c (block_gdbarch): Update.
1265 * annotate.c (annotate_source_line): Update.
1266
1267 2020-04-17 Tom Tromey <tromey@adacore.com>
1268
1269 * auto-load.c (show_auto_load_cmd): Remove.
1270 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
1271 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
1272 (maintenance_print_arc_command): Remove.
1273 * tui/tui-win.c (tui_command): Remove.
1274 (tui_get_cmd_list): Use add_basic_prefix_cmd.
1275 * tui/tui-layout.c (tui_layout_command): Remove.
1276 (_initialize_tui_layout): Use add_basic_prefix_cmd.
1277 * python/python.c (user_set_python, user_show_python): Remove.
1278 (_initialize_python): Use add_basic_prefix_cmd,
1279 add_show_prefix_cmd.
1280 * guile/guile.c (set_guile_command, show_guile_command): Remove.
1281 (install_gdb_commands): Use add_basic_prefix_cmd,
1282 add_show_prefix_cmd.
1283 (info_guile_command): Remove.
1284 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
1285 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
1286 add_show_prefix_cmd.
1287 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
1288 Remove do_set and do_show parameters.
1289 * cli/cli-style.c (set_style, show_style): Remove.
1290 (_initialize_cli_style): Use add_basic_prefix_cmd,
1291 add_show_prefix_cmd.
1292 (cli_style_option::add_setshow_commands): Remove do_set and
1293 do_show parameters.
1294 (cli_style_option::add_setshow_commands): Use
1295 add_basic_prefix_cmd, add_show_prefix_cmd.
1296 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
1297 (set_style_name): Remove.
1298 * cli/cli-dump.c (dump_command, append_command): Remove.
1299 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1300 (tekhex_dump_command, binary_dump_command)
1301 (binary_append_command): Remove.
1302 (_initialize_cli_dump): Use add_basic_prefix_cmd.
1303 * windows-tdep.c (w32_prefix_command_valid): Remove global.
1304 (init_w32_command_list): Remove; move into ...
1305 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
1306 * valprint.c (set_print, show_print, set_print_raw)
1307 (show_print_raw): Remove.
1308 (_initialize_valprint): Use add_basic_prefix_cmd,
1309 add_show_prefix_cmd.
1310 * typeprint.c (set_print_type, show_print_type): Remove.
1311 (_initialize_typeprint): Use add_basic_prefix_cmd,
1312 add_show_prefix_cmd.
1313 * record.c (set_record_command, show_record_command): Remove.
1314 (_initialize_record): Use add_basic_prefix_cmd,
1315 add_show_prefix_cmd.
1316 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
1317 add_show_prefix_cmd.
1318 (info_command, show_command, set_debug, show_debug): Remove.
1319 * top.h (set_history, show_history): Don't declare.
1320 * top.c (set_history, show_history): Remove.
1321 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1322 (unset_tdesc_cmd): Remove.
1323 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
1324 add_show_prefix_cmd.
1325 * symtab.c (info_module_command): Remove.
1326 (_initialize_symtab): Use add_basic_prefix_cmd.
1327 * symfile.c (overlay_command): Remove.
1328 (_initialize_symfile): Use add_basic_prefix_cmd.
1329 * sparc64-tdep.c (info_adi_command): Remove.
1330 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
1331 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
1332 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
1333 add_show_prefix_cmd.
1334 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
1335 (_initialize_serial): Use add_basic_prefix_cmd,
1336 add_show_prefix_cmd.
1337 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
1338 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
1339 add_show_prefix_cmd.
1340 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
1341 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
1342 add_show_prefix_cmd.
1343 * riscv-tdep.c (show_riscv_command, set_riscv_command)
1344 (show_debug_riscv_command, set_debug_riscv_command): Remove.
1345 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
1346 add_show_prefix_cmd.
1347 * remote.c (remote_command, set_remote_cmd): Remove.
1348 (_initialize_remote): Use add_basic_prefix_cmd.
1349 * record-full.c (set_record_full_command)
1350 (show_record_full_command): Remove.
1351 (_initialize_record_full): Use add_basic_prefix_cmd,
1352 add_show_prefix_cmd.
1353 * record-btrace.c (cmd_set_record_btrace)
1354 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
1355 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
1356 (cmd_show_record_btrace_pt): Remove.
1357 (_initialize_record_btrace): Use add_basic_prefix_cmd,
1358 add_show_prefix_cmd.
1359 * ravenscar-thread.c (set_ravenscar_command)
1360 (show_ravenscar_command): Remove.
1361 (_initialize_ravenscar): Use add_basic_prefix_cmd,
1362 add_show_prefix_cmd.
1363 * mips-tdep.c (show_mips_command, set_mips_command)
1364 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
1365 add_show_prefix_cmd.
1366 * maint.c (maintenance_command, maintenance_info_command)
1367 (maintenance_check_command, maintenance_print_command)
1368 (maintenance_set_cmd, maintenance_show_cmd): Remove.
1369 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
1370 add_show_prefix_cmd.
1371 (show_per_command_cmd): Remove.
1372 * maint-test-settings.c (maintenance_set_test_settings_cmd):
1373 Remove.
1374 (maintenance_show_test_settings_cmd): Remove.
1375 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
1376 add_show_prefix_cmd.
1377 * maint-test-options.c (maintenance_test_options_command):
1378 Remove.
1379 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
1380 * macrocmd.c (macro_command): Remove
1381 (_initialize_macrocmd): Use add_basic_prefix_cmd.
1382 * language.c (set_check, show_check): Remove.
1383 (_initialize_language): Use add_basic_prefix_cmd,
1384 add_show_prefix_cmd.
1385 * infcmd.c (unset_command): Remove.
1386 (_initialize_infcmd): Use add_basic_prefix_cmd.
1387 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
1388 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
1389 add_show_prefix_cmd.
1390 * go32-nat.c (go32_info_dos_command): Remove.
1391 (_initialize_go32_nat): Use add_basic_prefix_cmd.
1392 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
1393 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
1394 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
1395 (_initialize_frame): Use add_basic_prefix_cmd,
1396 add_show_prefix_cmd.
1397 * dcache.c (set_dcache_command, show_dcache_command): Remove.
1398 (_initialize_dcache): Use add_basic_prefix_cmd,
1399 add_show_prefix_cmd.
1400 * cp-support.c (maint_cplus_command): Remove.
1401 (_initialize_cp_support): Use add_basic_prefix_cmd.
1402 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1403 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1404 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
1405 add_basic_prefix_cmd, add_show_prefix_cmd.
1406 * breakpoint.c (save_command): Remove.
1407 (_initialize_breakpoint): Use add_basic_prefix_cmd.
1408 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
1409 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
1410 add_show_prefix_cmd.
1411 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
1412 (set_ada_command, show_ada_command): Remove.
1413 (_initialize_ada_language): Use add_basic_prefix_cmd,
1414 add_show_prefix_cmd.
1415 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
1416
1417 2020-04-16 Kamil Rytarowski <n54@gmx.com>
1418
1419 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
1420 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
1421
1422 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
1423
1424 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
1425 warning messages.
1426
1427 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
1428
1429 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
1430 import table is not at beginning of .idata section.
1431
1432 2020-04-16 Pedro Alves <palves@redhat.com>
1433
1434 * inferior.c (delete_inferior): Use delete operator directly
1435 instead of delete_program_space.
1436 * progspace.c (add_program_space): New, factored out from
1437 program_space::program_space.
1438 (remove_program_space): New, factored out from
1439 delete_program_space.
1440 (program_space::program_space): Remove intro comment. Rewrite.
1441 (program_space::~program_space): Remove intro comment. Call
1442 remove_program_space.
1443 (delete_program_space): Delete.
1444 * progspace.h (program_space::program_space): Make explicit. Move
1445 intro comment here, adjusted.
1446 (program_space::~program_space): Move intro comment here,
1447 adjusted.
1448 (delete_program_space): Remove.
1449
1450 2020-04-16 Tom Tromey <tromey@adacore.com>
1451
1452 * windows-nat.c (windows_nat::handle_access_violation): New
1453 function.
1454 * nat/windows-nat.h (handle_access_violation): Declare.
1455 * nat/windows-nat.c (handle_exception): Move Cygwin code to
1456 windows-nat.c. Call handle_access_violation.
1457
1458 2020-04-16 Tom de Vries <tdevries@suse.de>
1459
1460 PR symtab/25791
1461 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
1462 CUs without psymtab.
1463
1464 2020-04-16 Kevin Buettner <kevinb@redhat.com>
1465
1466 * python/python.c (do_start_initialization): Don't call
1467 PyEval_InitThreads for Python 3.9 and beyond.
1468
1469 2020-04-15 Kamil Rytarowski <n54@gmx.com>
1470
1471 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
1472 thread functions.
1473 (obsd_nat_target::wait): Likewise.
1474
1475 2020-04-15 Tom Tromey <tromey@adacore.com>
1476
1477 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
1478 (DEBUG_EXCEPT): Use debug_printf.
1479
1480 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
1481
1482 * completer.c (class completion_tracker::completion_hash_entry)
1483 <hash_name>: New member function.
1484 (completion_tracker::discard_completions): New callback to hash a
1485 completion_hash_entry, pass this to htab_create_alloc.
1486
1487 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
1488
1489 * windows-nat.c (windows_make_so): Warn rather than stopping with
1490 an error if realpath() fails.
1491
1492 2020-04-14 Kamil Rytarowski <n54@gmx.com>
1493
1494 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
1495 (nbsd_nat_target::info_proc): Add do_status.
1496
1497 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
1498 Tom de Vries <tdevries@suse.de>
1499
1500 PR symtab/25718
1501 * psympriv.h (struct partial_symtab::read_symtab)
1502 (struct partial_symtab::expand_psymtab)
1503 (struct partial_symtab::read_dependencies): Update comments.
1504 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
1505 read_symtab for includer.
1506 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
1507 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
1508 (struct dwarf2_include_psymtab::m_readin): Remove.
1509 (struct dwarf2_include_psymtab::includer): New member function.
1510 (dwarf2_psymtab::expand_psymtab): Assert !readin.
1511
1512 2020-04-14 Tom de Vries <tdevries@suse.de>
1513
1514 PR symtab/25720
1515 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
1516 with NULL symbol_matcher and lookup_name.
1517 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
1518 and lookup_name.
1519 * dwarf2/read.c (dw2_expand_symtabs_matching)
1520 (dw2_debug_names_expand_symtabs_matching): Same.
1521 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
1522 Make lookup_name a pointer. Update comment.
1523 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
1524 lookup_name being a pointer.
1525 * symfile.c (expand_symtabs_matching): Same.
1526 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
1527 * linespec.c (iterate_over_all_matching_symtabs): Same.
1528
1529 2020-04-13 Tom Tromey <tom@tromey.com>
1530
1531 * run-on-main-thread.c: Update include.
1532 * unittests/main-thread-selftests.c: Update include.
1533 * tui/tui-win.c: Update include.
1534 * tui/tui-io.c: Update include.
1535 * tui/tui-interp.c: Update include.
1536 * tui/tui-hooks.c: Update include.
1537 * top.h: Update include.
1538 * top.c: Update include.
1539 * ser-base.c: Update include.
1540 * remote.c: Update include.
1541 * remote-notif.c: Update include.
1542 * remote-fileio.c: Update include.
1543 * record-full.c: Update include.
1544 * record-btrace.c: Update include.
1545 * python/python.c: Update include.
1546 * posix-hdep.c: Update include.
1547 * mingw-hdep.c: Update include.
1548 * mi/mi-main.c: Update include.
1549 * mi/mi-interp.c: Update include.
1550 * main.c: Update include.
1551 * linux-nat.c: Update include.
1552 * interps.c: Update include.
1553 * infrun.c: Update include.
1554 * inf-loop.c: Update include.
1555 * event-top.c: Update include.
1556 * event-loop.c: Move to ../gdbsupport/.
1557 * event-loop.h: Move to ../gdbsupport/.
1558 * async-event.h: Update include.
1559 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
1560
1561 2020-04-13 Tom Tromey <tom@tromey.com>
1562
1563 * tui/tui-win.c: Include async-event.h.
1564 * remote.c: Include async-event.h.
1565 * remote-notif.c: Include async-event.h.
1566 * record-full.c: Include async-event.h.
1567 * record-btrace.c: Include async-event.h.
1568 * infrun.c: Include async-event.h.
1569 * event-top.c: Include async-event.h.
1570 * event-loop.h: Move some declarations to async-event.h.
1571 * event-loop.c: Don't include ser-event.h or top.h. Move some
1572 code to async-event.c.
1573 * async-event.h: New file.
1574 * async-event.c: New file.
1575 * Makefile.in (COMMON_SFILES): Add async-event.c.
1576 (HFILES_NO_SRCDIR): Add async-event.h.
1577
1578 2020-04-13 Tom Tromey <tom@tromey.com>
1579
1580 * utils.c (flush_streams): New function.
1581 * event-loop.c (gdb_wait_for_event): Call flush_streams.
1582
1583 2020-04-13 Tom Tromey <tom@tromey.com>
1584
1585 * event-loop.c (handle_file_event): Use warning, not
1586 printf_unfiltered.
1587
1588 2020-04-13 Tom Tromey <tom@tromey.com>
1589
1590 * event-loop.c: Include <chrono>.
1591
1592 2020-04-13 Tom Tromey <tom@tromey.com>
1593
1594 * gdb_select.h: Move to ../gdbsupport/.
1595 * event-loop.c: Update include path.
1596 * top.c: Update include path.
1597 * ser-base.c: Update include path.
1598 * ui-file.c: Update include path.
1599 * ser-tcp.c: Update include path.
1600 * guile/scm-ports.c: Update include path.
1601 * posix-hdep.c: Update include path.
1602 * ser-unix.c: Update include path.
1603 * gdb_usleep.c: Update include path.
1604 * mingw-hdep.c: Update include path.
1605 * inflow.c: Update include path.
1606 * infrun.c: Update include path.
1607 * event-top.c: Update include path.
1608
1609 2020-04-13 Tom Tromey <tom@tromey.com>
1610
1611 * configure: Rebuild.
1612 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
1613
1614 2020-04-13 Tom Tromey <tom@tromey.com>
1615
1616 * event-loop.h (start_event_loop): Don't declare.
1617 * event-loop.c (start_event_loop): Move...
1618 * main.c (start_event_loop): ...here. Now static.
1619
1620 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
1621
1622 * MAINTAINERS: Update my email address.
1623
1624 2020-04-12 Kamil Rytarowski <n54@gmx.com>
1625
1626 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
1627 IP_ALL.
1628
1629 2020-04-12 Kamil Rytarowski <n54@gmx.com>
1630
1631 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
1632 (nbsd_nat_target::info_proc): Add do_cmdline.
1633
1634 2020-04-12 Kamil Rytarowski <n54@gmx.com>
1635
1636 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
1637 (nbsd_nat_target::info_proc): Add do_cwd.
1638
1639 2020-04-12 Kamil Rytarowski <n54@gmx.com>
1640
1641 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
1642
1643 2020-04-11 Kamil Rytarowski <n54@gmx.com>
1644
1645 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
1646 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
1647 (nbsd_nat_target::info_proc): New functions.
1648 * nbsd-nat.c (kinfo_get_vmmap): New function.
1649 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
1650 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
1651 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
1652 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
1653 functions.
1654 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
1655 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
1656 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
1657 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
1658 (KINFO_VME_FLAG_GROWS_DOWN): New.
1659
1660 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
1661
1662 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
1663 bit shift.
1664
1665 2020-04-10 Tom Tromey <tromey@adacore.com>
1666
1667 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
1668
1669 2020-04-10 Tom Tromey <tromey@adacore.com>
1670
1671 * symtab.c (get_symbol_address, get_msymbol_address): Skip
1672 separate debug files.
1673
1674 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
1675
1676 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
1677 Move to...
1678 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
1679 ... here.
1680 * windows-nat.c (windows_nat_target::get_windows_debug_event):
1681 Check for STATUS_WX86_BREAKPOINT.
1682 (windows_nat_target::wait): Same.
1683
1684 2020-04-10 Tom de Vries <tdevries@suse.de>
1685
1686 PR cli/25808
1687 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
1688
1689 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
1690
1691 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
1692 (Write After Approval): Remove Tom de Vries.
1693
1694 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
1695
1696 revert partially:
1697 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
1698
1699 * buildsym.c (record_line): Fix undefined behavior and preserve
1700 lines at eof.
1701
1702 2020-04-09 Kamil Rytarowski <n54@gmx.com>
1703
1704 * auxv.h (svr4_auxv_parse): New.
1705 * auxv.c (default_auxv_parse): Split into default_auxv_parse
1706 and generic_auxv_parse.
1707 (svr4_auxv_parse): Add.
1708 * obsd-tdep.c: Include "auxv.h".
1709 (obsd_auxv_parse): Remove.
1710 (obsd_init_abi): Remove comment.
1711 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
1712 from `obsd_auxv_parse' to `svr4_auxv_parse'.
1713 * nbsd-tdep.c: Include "auxv.h".
1714 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
1715
1716 2020-04-08 Tom Tromey <tromey@adacore.com>
1717
1718 * nat/windows-nat.h (last_wait_event): Don't declare.
1719 (wait_for_debug_event): Update comment.
1720 * nat/windows-nat.c (last_wait_event): Now static.
1721
1722 2020-04-08 Tom Tromey <tromey@adacore.com>
1723
1724 * windows-nat.c (wait_for_debug_event): Move to
1725 nat/windows-nat.c.
1726 * nat/windows-nat.h (wait_for_debug_event): Declare.
1727 * nat/windows-nat.c (wait_for_debug_event): Move from
1728 windows-nat.c. No longer static.
1729
1730 2020-04-08 Tom Tromey <tromey@adacore.com>
1731
1732 * windows-nat.c (get_windows_debug_event): Use
1733 fetch_pending_stop.
1734 * nat/windows-nat.h (fetch_pending_stop): Declare.
1735 * nat/windows-nat.c (fetch_pending_stop): New function.
1736
1737 2020-04-08 Tom Tromey <tromey@adacore.com>
1738
1739 * windows-nat.c (windows_continue): Use matching_pending_stop and
1740 continue_last_debug_event.
1741 * nat/windows-nat.h (matching_pending_stop)
1742 (continue_last_debug_event): Declare.
1743 * nat/windows-nat.c (DEBUG_EVENTS): New define.
1744 (matching_pending_stop, continue_last_debug_event): New
1745 functions.
1746
1747 2020-04-08 Tom Tromey <tromey@adacore.com>
1748
1749 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
1750 (handle_exception_result): Move to nat/windows-nat.h.
1751 (DEBUG_EXCEPTION_SIMPLE): Remove.
1752 (windows_nat::handle_ms_vc_exception): New function.
1753 (handle_exception): Move to nat/windows-nat.c.
1754 (get_windows_debug_event): Update.
1755 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
1756 nat/windows-nat.c.
1757 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
1758 (handle_exception_result): Move from windows-nat.c.
1759 (handle_exception): Declare.
1760 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
1761 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
1762 windows-nat.c.
1763
1764 2020-04-08 Tom Tromey <tromey@adacore.com>
1765
1766 * windows-nat.c (exception_count, event_count): Remove.
1767 (handle_exception, get_windows_debug_event)
1768 (do_initial_windows_stuff): Update.
1769
1770 2020-04-08 Tom Tromey <tromey@adacore.com>
1771
1772 * windows-nat.c (windows_nat::handle_load_dll)
1773 (windows_nat::handle_unload_dll): Rename. No longer static.
1774 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
1775 Declare.
1776
1777 2020-04-08 Tom Tromey <tromey@adacore.com>
1778
1779 * complaints.h (stop_whining): Declare at top-level.
1780 (complaint): Don't declare stop_whining.
1781
1782 2020-04-08 Tom Tromey <tromey@adacore.com>
1783
1784 * windows-nat.c (windows_nat::handle_output_debug_string):
1785 Rename. No longer static.
1786 * nat/windows-nat.h (handle_output_debug_string): Declare.
1787
1788 2020-04-08 Tom Tromey <tromey@adacore.com>
1789
1790 * windows-nat.c (current_process_handle, current_process_id)
1791 (main_thread_id, last_sig, current_event, last_wait_event)
1792 (current_windows_thread, desired_stop_thread_id, pending_stops)
1793 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
1794 (display_selectors, fake_create_process)
1795 (get_windows_debug_event): Update.
1796 * nat/windows-nat.h (current_process_handle, current_process_id)
1797 (main_thread_id, last_sig, current_event, last_wait_event)
1798 (current_windows_thread, desired_stop_thread_id, pending_stops)
1799 (struct pending_stop, siginfo_er): Move from windows-nat.c.
1800 * nat/windows-nat.c (current_process_handle, current_process_id)
1801 (main_thread_id, last_sig, current_event, last_wait_event)
1802 (current_windows_thread, desired_stop_thread_id, pending_stops)
1803 (siginfo_er): New globals. Move from windows-nat.c.
1804
1805 2020-04-08 Tom Tromey <tromey@adacore.com>
1806
1807 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
1808 (handle_load_dll): Update.
1809 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
1810
1811 2020-04-08 Tom Tromey <tromey@adacore.com>
1812
1813 * windows-nat.c (enum thread_disposition_type): Move to
1814 nat/windows-nat.h.
1815 (windows_nat::thread_rec): Rename from thread_rec. No longer
1816 static.
1817 (windows_add_thread, windows_nat_target::fetch_registers)
1818 (windows_nat_target::store_registers, handle_exception)
1819 (windows_nat_target::resume, get_windows_debug_event)
1820 (windows_nat_target::get_tib_address)
1821 (windows_nat_target::thread_name)
1822 (windows_nat_target::thread_alive): Update.
1823 * nat/windows-nat.h (enum thread_disposition_type): Move from
1824 windows-nat.c.
1825 (thread_rec): Declare.
1826
1827 2020-04-08 Tom Tromey <tromey@adacore.com>
1828
1829 * windows-nat.c: Add "using namespace".
1830 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
1831 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
1832
1833 2020-04-08 Tom Tromey <tromey@adacore.com>
1834
1835 * nat/windows-nat.h (struct windows_thread_info): Declare
1836 destructor.
1837 * nat/windows-nat.c (~windows_thread_info): New.
1838
1839 2020-04-08 Tom Tromey <tromey@adacore.com>
1840
1841 PR gdb/22992
1842 * windows-nat.c (current_event): Update comment.
1843 (last_wait_event, desired_stop_thread_id): New globals.
1844 (struct pending_stop): New.
1845 (pending_stops): New global.
1846 (windows_nat_target) <stopped_by_sw_breakpoint>
1847 <supports_stopped_by_sw_breakpoint>: New methods.
1848 (windows_fetch_one_register): Add assertions. Adjust PC.
1849 (windows_continue): Handle pending stops. Suspend other threads
1850 when stepping. Use last_wait_event
1851 (wait_for_debug_event): New function.
1852 (get_windows_debug_event): Use wait_for_debug_event. Handle
1853 pending stops. Queue spurious stops.
1854 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
1855 (windows_nat_target::kill): Use wait_for_debug_event.
1856 * nat/windows-nat.h (struct windows_thread_info)
1857 <stopped_at_software_breakpoint>: New field.
1858 * nat/windows-nat.c (windows_thread_info::resume): Clear
1859 stopped_at_software_breakpoint.
1860
1861 2020-04-08 Tom Tromey <tromey@adacore.com>
1862
1863 * windows-nat.c (enum thread_disposition_type): New.
1864 (thread_rec): Replace "get_context" parameter with "disposition";
1865 change type.
1866 (windows_add_thread, windows_nat_target::fetch_registers)
1867 (windows_nat_target::store_registers, handle_exception)
1868 (windows_nat_target::resume, get_windows_debug_event)
1869 (windows_nat_target::get_tib_address)
1870 (windows_nat_target::thread_name)
1871 (windows_nat_target::thread_alive): Update.
1872
1873 2020-04-08 Tom Tromey <tromey@adacore.com>
1874
1875 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
1876 (windows_continue): Use windows_continue::resume.
1877 * nat/windows-nat.h (struct windows_thread_info) <suspend,
1878 resume>: Declare new methods.
1879 * nat/windows-nat.c: New file.
1880 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
1881
1882 2020-04-08 Tom Tromey <tromey@adacore.com>
1883
1884 * windows-nat.c (windows_add_thread, windows_delete_thread)
1885 (windows_nat_target::fetch_registers)
1886 (windows_nat_target::store_registers, fake_create_process)
1887 (windows_nat_target::resume, windows_nat_target::resume)
1888 (get_windows_debug_event, windows_nat_target::wait)
1889 (windows_nat_target::pid_to_str)
1890 (windows_nat_target::get_tib_address)
1891 (windows_nat_target::get_ada_task_ptid)
1892 (windows_nat_target::thread_name)
1893 (windows_nat_target::thread_alive): Use lwp, not tid.
1894
1895 2020-04-08 Tom Tromey <tromey@adacore.com>
1896
1897 * windows-nat.c (handle_exception)
1898 (windows_nat_target::thread_name): Update.
1899 * nat/windows-nat.h (windows_thread_info): Remove destructor.
1900 <name>: Now unique_xmalloc_ptr.
1901
1902 2020-04-08 Tom Tromey <tromey@adacore.com>
1903
1904 * windows-nat.c (thread_rec)
1905 (windows_nat_target::fetch_registers): Update.
1906 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
1907 Update comment.
1908 <debug_registers_changed, reload_context>: Now bool.
1909
1910 2020-04-08 Tom Tromey <tromey@adacore.com>
1911
1912 * windows-nat.c (windows_add_thread): Use new.
1913 (windows_init_thread_list, windows_delete_thread): Use delete.
1914 (get_windows_debug_event): Update.
1915 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
1916 destructor, and initializers.
1917
1918 2020-04-08 Tom Tromey <tromey@adacore.com>
1919
1920 * windows-nat.c (struct windows_thread_info): Remove.
1921 * nat/windows-nat.h: New file.
1922
1923 2020-04-08 Tom Tromey <tromey@adacore.com>
1924
1925 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
1926 (thread_rec, windows_add_thread, windows_delete_thread)
1927 (windows_continue): Update.
1928
1929 2020-04-08 Tom Tromey <tromey@adacore.com>
1930
1931 * windows-nat.c (struct windows_thread_info): Remove typedef.
1932 (thread_head): Remove.
1933 (thread_list): New global.
1934 (thread_rec, windows_add_thread, windows_init_thread_list)
1935 (windows_delete_thread, windows_continue): Update.
1936
1937 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
1938
1939 * windows-tdep.h (windows_init_abi): Add comment.
1940 (cygwin_init_abi): New declaration.
1941 * windows-tdep.c: Split signal enumeration in two, one for
1942 Windows and one for Cygwin.
1943 (windows_gdb_signal_to_target): Only deal with signal of the
1944 Windows OS ABI.
1945 (cygwin_gdb_signal_to_target): New function.
1946 (windows_init_abi): Rename to windows_init_abi_common, don't set
1947 gdb_signal_to_target gdbarch method. Add new new function with
1948 this name.
1949 (cygwin_init_abi): New function.
1950 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
1951 comment. Don't call windows_init_abi.
1952 (amd64_windows_init_abi): Add comment, call windows_init_abi.
1953 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
1954 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
1955 i386_windows_init_abi_common, don't call windows_init_abi. Add
1956 a new function of this name.
1957 (i386_cygwin_init_abi): New function.
1958 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
1959 OS ABI Cygwin.
1960
1961 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
1962
1963 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
1964 parameter.c.
1965 (dwarf2_read_gdb_index): Update.
1966
1967 2020-04-07 Kamil Rytarowski <n54@gmx.com>
1968
1969 * nbsd-tdep.c: Include "objfiles.h".
1970 (nbsd_skip_solib_resolver): New.
1971 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
1972
1973 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
1974
1975 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
1976 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
1977 with DW_LLE_base_addressx are being emitted in DWARFv5.
1978 Add the newly added kind DW_LOC_OFFSET_PAIR also.
1979 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
1980 unsigned integer.
1981
1982 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
1983
1984 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
1985 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
1986 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
1987 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
1988 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
1989 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
1990 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
1991
1992
1993 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
1994
1995 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
1996 (read_loclist_index): New function definition.
1997 (lookup_loclist_base): New function definition.
1998 (read_loclist_header): New function definition.
1999 (dwarf2_cu): Add loclist_base and loclist_header field.
2000 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
2001 (read_full_die_1): Read the value of DW_AT_loclists_base.
2002 (read_attribute_reprocess): Handle DW_FORM_loclistx.
2003 (read_attribute_value): Handle DW_FORM_loclistx.
2004 (skip_one_die): Handle DW_FORM_loclistx.
2005 (loclist_header): New structure declaration.
2006 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
2007
2008 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2009
2010 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
2011 constructor. Remove `addr` parameter from other constructor and
2012 add `per_cu` parameter.
2013 * dwarf2/read.c (create_partial_symtab): Update.
2014
2015 2020-04-07 Tom de Vries <tdevries@suse.de>
2016
2017 PR symtab/25796
2018 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
2019 (partial_die_info::fixup): Inherit has_const_value.
2020
2021 2020-04-07 Tom de Vries <tdevries@suse.de>
2022
2023 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
2024 symbols without address.
2025
2026 2020-04-06 Kamil Rytarowski <n54@gmx.com>
2027
2028 * nbsd-nat.h (struct thread_info): Add forward declaration.
2029 (nbsd_nat_target::thread_alive): Add.
2030 (nbsd_nat_target::thread_name): Likewise.
2031 (nbsd_nat_target::update_thread_list): Likewise.
2032 (update_thread_list::post_attach): Likewise.
2033 (post_attach::pid_to_str): Likewise.
2034 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
2035 (nbsd_thread_lister): Add.
2036 (nbsd_nat_target::thread_alive): Likewise.
2037 (nbsd_nat_target::thread_name): Likewise.
2038 (nbsd_add_threads): Likewise.
2039 (update_thread_list::post_attach): Likewise.
2040 (nbsd_nat_target::update_thread_list): Likewise.
2041 (post_attach::pid_to_str): Likewise.
2042
2043 2020-04-06 Tom Tromey <tromey@adacore.com>
2044
2045 * ada-valprint.c (print_variant_part): Extract the variant field.
2046 (print_field_values): Use the field as the outer value when
2047 recursing.
2048
2049 2020-04-06 Tom Tromey <tromey@adacore.com>
2050
2051 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
2052 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
2053 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
2054 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
2055 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
2056
2057 2020-04-06 Tom Tromey <tromey@adacore.com>
2058
2059 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
2060 TYPE_CODE_ERROR.
2061
2062 2020-04-06 Kamil Rytarowski <n54@gmx.com>
2063
2064 * nbsd-tdep.c: Include "gdbarch.h".
2065 Define enum with NetBSD signal numbers.
2066 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
2067 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
2068 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2069 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
2070 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
2071 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
2072 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
2073 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
2074 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
2075 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
2076 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
2077 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
2078
2079 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
2080
2081 PR gdb/25325
2082 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
2083
2084 2020-04-03 Tom Tromey <tromey@adacore.com>
2085
2086 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
2087 Read constant block.
2088
2089 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
2090
2091 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
2092 (gdb_bfd_get_full_section_contents): New declaration.
2093 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
2094 * windows-tdep.c (is_linked_with_cygwin_dll): Use
2095 gdb_bfd_get_full_section_contents.
2096
2097 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
2098
2099 * exec.c (build_section_table): Replace internal_error with
2100 gdb_assert.
2101 (section_table_xfer_memory_partial): Likewise.
2102 * mdebugread.c (parse_partial_symbols): Likewise.
2103 * psymtab.c (lookup_partial_symbol): Likewise.
2104 * utils.c (wrap_here): Likewise.
2105
2106 2020-04-02 Tom Tromey <tromey@adacore.com>
2107
2108 * f-lang.c (build_fortran_types): Use arch_type to initialize
2109 builtin_complex_s32 in the TYPE_CODE_ERROR case.
2110
2111 2020-04-02 Tom Tromey <tromey@adacore.com>
2112
2113 * dwarf2/read.c (partial_die_info::read): Do not create a vector
2114 of attributes.
2115
2116 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
2117 Bernd Edlinger <bernd.edlinger@hotmail.de>
2118 Tom Tromey <tromey@adacore.com>
2119
2120 * buildsym.c (buildsym_compunit::record_line): Remove
2121 deduplication code.
2122
2123 2020-04-02 Tom de Vries <tdevries@suse.de>
2124
2125 PR ada/24671
2126 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
2127
2128 2020-04-02 Tom de Vries <tdevries@suse.de>
2129
2130 * dwarf2/read.c (dwarf2_gdb_index_functions,
2131 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
2132 NULL.
2133 * psymtab.c (psym_lookup_global_symbol_language): New function.
2134 (psym_functions): Init psym_lookup_global_symbol_language with
2135 psym_lookup_global_symbol_language.
2136 * symfile-debug.c (debug_sym_quick_functions): Init
2137 lookup_global_symbol_language with NULL.
2138 * symfile.c (set_initial_language): Remove fixme comment.
2139 * symfile.h (struct quick_symbol_functions): Add
2140 lookup_global_symbol_language.
2141 * symtab.c (find_quick_global_symbol_language): New function.
2142 (find_main_name): Use find_quick_global_symbol_language.
2143
2144 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
2145
2146 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
2147
2148 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
2149
2150 * buildsym.c (record_line): Fix undefined behavior and preserve
2151 lines at eof.
2152
2153 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
2154
2155 * buildsym.c (record_line): Fix the resizing condition.
2156
2157 2020-04-01 Tom Tromey <tom@tromey.com>
2158
2159 * value.h (value_literal_complex): Add comment.
2160 * valops.c (value_literal_complex): Refer to value.h.
2161
2162 2020-04-01 Tom Tromey <tom@tromey.com>
2163
2164 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
2165 (scalar_type): New rule, from typebase.
2166 (typebase): Use scalar_type. Recognize complex types.
2167 (field_name): Handle FLOAT_KEYWORD.
2168 (ident_tokens): Add _Complex and __complex__.
2169
2170 2020-04-01 Tom Tromey <tom@tromey.com>
2171
2172 PR exp/25299:
2173 * valarith.c (promotion_type, complex_binop): New functions.
2174 (scalar_binop): Handle complex numbers. Use promotion_type.
2175 (value_pos, value_neg, value_complement): Handle complex numbers.
2176
2177 2020-04-01 Tom Tromey <tom@tromey.com>
2178
2179 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
2180 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
2181 (parse_number): Handle complex numbers.
2182
2183 2020-04-01 Tom Tromey <tom@tromey.com>
2184
2185 * c-valprint.c (c_decorations): Change complex suffix to "i".
2186
2187 2020-04-01 Tom Tromey <tom@tromey.com>
2188
2189 * valprint.c (generic_value_print_complex): Use accessors.
2190 * value.h (value_real_part, value_imaginary_part): Declare.
2191 * valops.c (value_real_part, value_imaginary_part): New
2192 functions.
2193 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
2194
2195 2020-04-01 Tom Tromey <tom@tromey.com>
2196
2197 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
2198 (read_range_type): Update.
2199 * mdebugread.c (basic_type): Update.
2200 * go-lang.c (build_go_types): Use init_complex_type.
2201 * gdbtypes.h (struct main_type) <complex_type>: New member.
2202 (init_complex_type): Update.
2203 (arch_complex_type): Don't declare.
2204 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
2205 Make name if none given. Use alloc_type_copy. Look for cached
2206 complex type.
2207 (arch_complex_type): Remove.
2208 (gdbtypes_post_init): Use init_complex_type.
2209 * f-lang.c (build_fortran_types): Use init_complex_type.
2210 * dwarf2/read.c (read_base_type): Update.
2211 * d-lang.c (build_d_types): Use init_complex_type.
2212 * ctfread.c (read_base_type): Update.
2213
2214 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2215
2216 * infrun.c (stop_all_threads): Update assertion, plus when
2217 stopping threads, take into account that we might be trying
2218 to stop an all-stop target.
2219 (stop_waiting): Call 'stop_all_threads' if there exists a
2220 non-stop target.
2221
2222 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2223
2224 * target.h (exists_non_stop_target): New function declaration.
2225 * target.c (exists_non_stop_target): New function.
2226
2227 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
2228
2229 PR gdb/24789
2230 * eval.c (is_integral_or_integral_reference): New function.
2231 (evaluate_subexp_standard): Allow integer references in
2232 pointer arithmetic.
2233
2234 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2235
2236 * remote.c (remote_target::remote_parse_stop_reply): Remove the
2237 check for no ptid in the stop reply when the target is non-stop.
2238
2239 2020-04-01 Tom Tromey <tromey@adacore.com>
2240
2241 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
2242 "name" parameter to rvalue reference. Initialize m_name_holder.
2243 <lookup_name_info>: New overloads.
2244 <name>: Return gdb::string_view.
2245 <c_str>: New method.
2246 <make_ignore_params>: Update.
2247 <search_name_hash>: Update.
2248 <language_lookup_name>: Return const char *.
2249 <m_name>: Change type.
2250 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
2251 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
2252 (lookup_name_info::match_any): Update.
2253 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
2254 Update.
2255 * minsyms.c (linkage_name_str): Update.
2256 * language.c (default_symbol_name_matcher): Update.
2257 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
2258 Update.
2259 * ada-lang.c (ada_fold_name): Change parameter to string_view.
2260 (ada_lookup_name_info::ada_lookup_name_info): Update.
2261 (literal_symbol_name_matcher): Update.
2262
2263 2020-04-01 Tom Tromey <tromey@adacore.com>
2264
2265 * psymtab.c (psymtab_search_name): Remove function.
2266 (psym_lookup_symbol): Create search name and lookup name here.
2267 (lookup_partial_symbol): Remove "name" parameter; add
2268 lookup_name.
2269 (psym_expand_symtabs_for_function): Update.
2270
2271 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
2272
2273 PR tui/25597:
2274 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
2275
2276 2020-03-31 Tom Tromey <tromey@adacore.com>
2277
2278 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
2279 memcpy.
2280
2281 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
2282
2283 * features/riscv/32bit-csr.xml: Regenerated.
2284 * features/riscv/64bit-csr.xml: Regenerated.
2285
2286 2020-03-30 Tom Tromey <tromey@adacore.com>
2287
2288 * ada-valprint.c (print_variant_part): Update.
2289 * ada-lang.h (ada_which_variant_applies): Update.
2290 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
2291 outer_valaddr parameters; replace with "outer" value parameter.
2292 (to_fixed_variant_branch_type): Update.
2293
2294 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2295
2296 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
2297 <list>. Remove inclusion of observable.h.
2298 (PPC_DEBUG_CURRENT_VERSION): Move up define.
2299 (struct arch_lwp_info): New struct.
2300 (class ppc_linux_dreg_interface): New class.
2301 (struct ppc_linux_process_info): New struct.
2302 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
2303 <low_new_clone, low_forget_process, low_prepare_to_resume>
2304 <copy_thread_dreg_state, mark_thread_stale>
2305 <mark_debug_registers_changed, register_hw_breakpoint>
2306 <clear_hw_breakpoint, register_wp, clear_wp>
2307 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
2308 <num_memory_accesses, get_trigger_type>
2309 <create_watchpoint_request, hwdebug_point_cmp>
2310 <init_arch_lwp_info, get_arch_lwp_info>
2311 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
2312 methods.
2313 <struct ptid_hash>: New inner struct.
2314 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
2315 members.
2316 (saved_dabr_value, hwdebug_info, max_slots_number)
2317 (struct hw_break_tuple, struct thread_points, ppc_threads)
2318 (have_ptrace_hwdebug_interface)
2319 (hwdebug_find_thread_points_by_tid)
2320 (hwdebug_insert_point, hwdebug_remove_point): Remove.
2321 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
2322 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
2323 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
2324 use m_dreg_interface.
2325 (hwdebug_point_cmp): Change to...
2326 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
2327 reference arguments instead of pointers.
2328 (ppc_linux_nat_target::ranged_break_num_registers): Use
2329 m_dreg_interface.
2330 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
2331 m_dreg_interface. Call register_hw_breakpoint.
2332 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
2333 m_dreg_interface. Call clear_hw_breakpoint.
2334 (get_trigger_type): Change to...
2335 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
2336 comment.
2337 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
2338 use m_dreg_interface. Call register_hw_breakpoint.
2339 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
2340 use m_dreg_interface. Call clear_hw_breakpoint.
2341 (can_use_watchpoint_cond_accel): Change to...
2342 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
2343 method. Update comment, use m_dreg_interface and
2344 m_process_info.
2345 (calculate_dvc): Change to...
2346 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
2347 m_dreg_interface.
2348 (num_memory_accesses): Change to...
2349 (ppc_linux_nat_target::num_memory_accesses): ...this method.
2350 (check_condition): Change to...
2351 (ppc_linux_nat_target::check_condition): ...this method.
2352 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
2353 comment, use m_dreg_interface.
2354 (create_watchpoint_request): Change to...
2355 (ppc_linux_nat_target::create_watchpoint_request): ...this
2356 method. Use m_dreg_interface.
2357 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
2358 m_dreg_interface. Call register_hw_breakpoint or register_wp.
2359 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
2360 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
2361 (ppc_linux_nat_target::low_forget_process)
2362 (ppc_linux_nat_target::low_new_fork)
2363 (ppc_linux_nat_target::low_new_clone)
2364 (ppc_linux_nat_target::low_delete_thread)
2365 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
2366 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
2367 only call mark_thread_stale.
2368 (ppc_linux_thread_exit): Remove.
2369 (ppc_linux_nat_target::stopped_data_address): Change to...
2370 (ppc_linux_nat_target::low_stopped_data_address): This. Add
2371 comment, use m_dreg_interface and m_thread_hw_breakpoints.
2372 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
2373 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
2374 comment. Call low_stopped_data_address.
2375 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
2376 m_dreg_interface.
2377 (ppc_linux_nat_target::masked_watch_num_registers): Use
2378 m_dreg_interface.
2379 (ppc_linux_nat_target::copy_thread_dreg_state)
2380 (ppc_linux_nat_target::mark_thread_stale)
2381 (ppc_linux_nat_target::mark_debug_registers_changed)
2382 (ppc_linux_nat_target::register_hw_breakpoint)
2383 (ppc_linux_nat_target::clear_hw_breakpoint)
2384 (ppc_linux_nat_target::register_wp)
2385 (ppc_linux_nat_target::clear_wp)
2386 (ppc_linux_nat_target::init_arch_lwp_info)
2387 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
2388 (_initialize_ppc_linux_nat): Remove observer callback.
2389
2390 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2391
2392 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
2393 (ppc_linux_nat_target::auxv_parse)
2394 (ppc_linux_nat_target::read_description)
2395 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
2396 Move up.
2397
2398 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2399
2400 * linux-nat.h (low_new_clone): New method.
2401 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
2402
2403 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
2404
2405 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
2406 (dbx_expand_psymtab): ... this.
2407 (start_psymtab): Update.
2408 * mdebugread.c (psymtab_to_symtab_1): Rename to...
2409 (mdebug_expand_psymtab): ... this.
2410 (parse_partial_symbols): Update.
2411 (new_psymtab): Update.
2412 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
2413 (xcoff_expand_psymtab): ... this.
2414 (xcoff_start_psymtab): Update.
2415
2416 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
2417
2418 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
2419 <expand_dependencies>: ... this.
2420 * psymtab.c (partial_symtab::read_dependencies): Rename to...
2421 (partial_symtab::expand_dependencies): ... this.
2422 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
2423 Update.
2424 (dwarf2_psymtab::expand_psymtab): Update.
2425 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
2426 * mdebugread.c (psymtab_to_symtab_1): Update.
2427 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2428
2429 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
2430
2431 * psympriv.h (discard_psymtab): Remove.
2432 * dbxread.c (dbx_end_psymtab): Update.
2433 * xcoffread.c (xcoff_end_psymtab): Update.
2434
2435 2020-03-28 Tom Tromey <tom@tromey.com>
2436
2437 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
2438 comment.
2439
2440 2020-03-28 Tom Tromey <tom@tromey.com>
2441
2442 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
2443
2444 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
2445
2446 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
2447
2448 2020-03-26 John Baldwin <jhb@FreeBSD.org>
2449
2450 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
2451
2452 2020-03-26 Tom Tromey <tom@tromey.com>
2453
2454 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
2455 (mark_common_block_symbol_computed, read_tag_string_type)
2456 (attr_to_dynamic_prop, read_subrange_type): Update.
2457 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
2458 to be methods on struct attribute.
2459 (skip_one_die, process_imported_unit_die, read_namespace_alias)
2460 (read_call_site_scope, partial_die_info::read)
2461 (partial_die_info::read, lookup_die_type, follow_die_ref):
2462 Update.
2463 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
2464 from dwarf2_get_ref_die_offset.
2465 (attribute::constant_value): New method, from
2466 dwarf2_get_attr_constant_value.
2467 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
2468 Declare method.
2469 <constant_value>: New method.
2470
2471 2020-03-26 Tom Tromey <tom@tromey.com>
2472
2473 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
2474 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
2475 (dwarf_type_encoding_name): Move to stringify.c.
2476 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
2477 * dwarf2/stringify.c: New file.
2478 * dwarf2/stringify.h: New file.
2479
2480 2020-03-26 Tom Tromey <tom@tromey.com>
2481
2482 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
2483 Rewrite.
2484
2485 2020-03-26 Tom Tromey <tom@tromey.com>
2486
2487 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
2488 methods.
2489 * dwarf2/read.c (lookup_addr_base): Move to die.h.
2490 (lookup_ranges_base): Likewise.
2491 (read_cutu_die_from_dwo, read_full_die_1): Update.
2492
2493 2020-03-26 Tom Tromey <tom@tromey.com>
2494
2495 * dwarf2/read.c (read_import_statement, read_file_scope)
2496 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
2497 (read_lexical_block_scope, read_call_site_scope)
2498 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
2499 (handle_struct_member_die, process_structure_scope)
2500 (update_enumeration_type_from_children)
2501 (process_enumeration_scope, read_array_type, read_common_block)
2502 (read_namespace, read_module, read_subroutine_type): Update.
2503 (sibling_die): Remove.
2504
2505 2020-03-26 Tom Tromey <tom@tromey.com>
2506
2507 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
2508 (build_type_psymtabs_reader, read_structure_type)
2509 (read_enumeration_type, read_full_die_1): Update.
2510 (dwarf2_attr_no_follow): Move to die.h.
2511 * dwarf2/die.h (struct die_info) <attr>: New method.
2512
2513 2020-03-26 Tom Tromey <tom@tromey.com>
2514
2515 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
2516 <base_address>: Now an optional.
2517 (dwarf2_find_base_address, dwarf2_rnglists_process)
2518 (dwarf2_ranges_process, fill_in_loclist_baton)
2519 (dwarf2_symbol_mark_computed): Update.
2520
2521 2020-03-26 Tom Tromey <tom@tromey.com>
2522
2523 * dwarf2/read.c (struct die_info): Move to die.h.
2524 * dwarf2/die.h: New file.
2525
2526 2020-03-26 Tom Tromey <tom@tromey.com>
2527
2528 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
2529 * dwarf2/read.c
2530 (dwarf2_statement_list_fits_in_line_number_section_complaint):
2531 Move to line-header.c.
2532 (read_checked_initial_length_and_offset, read_formatted_entries):
2533 Likewise.
2534 (dwarf_decode_line_header): Split into two.
2535 * dwarf2/line-header.c
2536 (dwarf2_statement_list_fits_in_line_number_section_complaint):
2537 Move from read.c.
2538 (read_checked_initial_length_and_offset, read_formatted_entries):
2539 Likewise.
2540 (dwarf_decode_line_header): New function, split from read.c.
2541
2542 2020-03-26 Tom Tromey <tom@tromey.com>
2543
2544 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
2545 Declare method.
2546 * dwarf2/read.c (read_attribute_value): Update.
2547 (dwarf2_per_objfile::read_line_string): Rename from
2548 read_indirect_line_string.
2549 (read_formatted_entries): Update.
2550
2551 2020-03-26 Tom Tromey <tom@tromey.com>
2552
2553 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
2554 variable.
2555
2556 2020-03-26 Tom Tromey <tom@tromey.com>
2557
2558 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
2559 const.
2560 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
2561 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
2562 parameter const.
2563
2564 2020-03-26 Tom Tromey <tom@tromey.com>
2565
2566 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
2567 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
2568 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
2569 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
2570
2571 2020-03-26 Tom Tromey <tom@tromey.com>
2572
2573 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
2574 file_names_size, file_full_name, file_file_name>: Use const.
2575 <file_name_at, file_names>: Add const overload.
2576 * dwarf2/line-header.c (line_header::file_file_name)
2577 (line_header::file_full_name): Update.
2578
2579 2020-03-26 Tom Tromey <tom@tromey.com>
2580
2581 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
2582 (macro_start_file, consume_improper_spaces)
2583 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
2584 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
2585 (dwarf_decode_macros): Move to macro.c.
2586 * dwarf2/macro.c: New file.
2587 * dwarf2/macro.h: New file.
2588 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
2589
2590 2020-03-26 Tom Tromey <tom@tromey.com>
2591
2592 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
2593 method.
2594 * dwarf2/section.c: New method. From
2595 read_indirect_string_at_offset_from.
2596 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
2597 (read_indirect_string_at_offset_from): Move to section.c.
2598 (read_indirect_string_at_offset): Rewrite.
2599 (read_indirect_line_string_at_offset): Remove.
2600 (read_indirect_string, read_indirect_line_string)
2601 (dwarf_decode_macro_bytes): Update.
2602
2603 2020-03-26 Tom Tromey <tom@tromey.com>
2604
2605 * dwarf2/section.h (struct dwarf2_section_info)
2606 <overload_complaint>: Declare.
2607 (dwarf2_section_buffer_overflow_complaint): Don't declare.
2608 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
2609 Rename from dwarf2_section_buffer_overflow_complaint.
2610 * dwarf2/read.c (skip_one_die, partial_die_info::read)
2611 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
2612
2613 2020-03-26 Tom Tromey <tom@tromey.com>
2614
2615 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
2616 Declare.
2617 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
2618 Move from read.c.
2619 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
2620 to section.c.
2621
2622 2020-03-26 Tom Tromey <tom@tromey.com>
2623
2624 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
2625
2626 2020-03-26 Tom Tromey <tom@tromey.com>
2627
2628 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
2629 "builder".
2630 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
2631 parameter.
2632 (dwarf_decode_macros): Update.
2633
2634 2020-03-26 Tom Tromey <tom@tromey.com>
2635
2636 * dwarf2/read.c (read_attribute_value): Update.
2637 (read_indirect_string_from_dwz): Move to dwz.c; change into
2638 method.
2639 (dwarf_decode_macro_bytes): Update.
2640 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
2641 * dwarf2/dwz.c: New file.
2642 * Makefile.in (COMMON_SFILES): Add dwz.c.
2643
2644 2020-03-26 Tom Tromey <tom@tromey.com>
2645
2646 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
2647 * dwarf2/read.c: Add include.
2648 * dwarf2/index-write.c: Add include.
2649 * dwarf2/index-cache.c: Add include.
2650 * dwarf2/dwz.h: New file.
2651
2652 2020-03-25 Tom Tromey <tom@tromey.com>
2653
2654 * compile/compile-object-load.c (get_out_value_type): Mention
2655 correct symbol name in error message.
2656
2657 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
2658
2659 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
2660
2661 2020-03-25 Tom de Vries <tdevries@suse.de>
2662
2663 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
2664 * symmisc.c (dump_symtab_1): Print user and includes fields.
2665 (maintenance_info_symtabs): Same.
2666
2667 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
2668
2669 PR gdb/25534
2670 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
2671 (riscv_regcache_cooked_write): New function.
2672 (riscv_push_dummy_call): Use new function.
2673 (riscv_return_value): Likewise.
2674
2675 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
2676
2677 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
2678 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
2679 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
2680 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
2681 * infrun.c (follow_fork): Likewise.
2682 (follow_fork_inferior): Likewise.
2683 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
2684 * linux-nat.h (class linux_nat_target): Likewise.
2685 * remote.c (class remote_target) <follow_fork>: Likewise.
2686 (remote_target::follow_fork): Likewise.
2687 * target-delegates.c: Re-generate.
2688 * target.c (default_follow_fork): Likewise.
2689 (target_follow_fork): Likewise.
2690 * target.h (struct target_ops) <follow_fork>: Likewise.
2691 (target_follow_fork): Likewise.
2692
2693 2020-03-24 Tom de Vries <tdevries@suse.de>
2694
2695 * psymtab.c (maintenance_info_psymtabs): Print user field.
2696
2697 2020-03-20 Tom Tromey <tromey@adacore.com>
2698
2699 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
2700 const.
2701 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
2702 const.
2703
2704 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2705
2706 * ptrace.m4: Don't check for ptrace declaration.
2707 * config.in: Re-generate.
2708 * configure: Re-generate.
2709 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
2710 not defined.
2711
2712 2020-03-20 Kamil Rytarowski <n54@gmx.com>
2713
2714 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
2715 `PTRACE_TYPE_RET'.
2716 * i386-bsd-nat.c (gdb_ptrace): Likewise.
2717 * sparc-nat.c (gdb_ptrace): Likewise.
2718 * x86-bsd-nat.c (gdb_ptrace): Likewise.
2719
2720 2020-03-20 Tom Tromey <tromey@adacore.com>
2721
2722 * c-exp.y (lex_one_token): Fix assert.
2723
2724 2020-03-20 Tom Tromey <tromey@adacore.com>
2725
2726 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
2727 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
2728 strncpy call.
2729
2730 2020-03-20 Tom Tromey <tromey@adacore.com>
2731
2732 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
2733
2734 2020-03-20 Tom Tromey <tromey@adacore.com>
2735
2736 * ada-valprint.c (print_variant_part): Remove parameters; switch
2737 to value-based API.
2738 (print_field_values): Likewise.
2739 (ada_val_print_struct_union): Likewise.
2740 (ada_value_print_1): Update.
2741
2742 2020-03-20 Kamil Rytarowski <n54@gmx.com>
2743
2744 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
2745 nbsd_nat_target instead of inf_ptrace_target.
2746 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
2747 nbsd_nat_target.
2748
2749 2020-03-20 Kamil Rytarowski <n54@gmx.com>
2750
2751 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
2752 it to the ptrace call.
2753 * (store_registers): Likewise.
2754
2755 2020-03-20 Kamil Rytarowski <n54@gmx.com>
2756
2757 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
2758 it to the ptrace call.
2759 * (store_registers): Likewise.
2760
2761 2020-03-19 Luis Machado <luis.machado@linaro.org>
2762
2763 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
2764 valid, fetch vg value from ptrace.
2765
2766 2020-03-19 Kamil Rytarowski <n54@gmx.com>
2767 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
2768 * inf-ptrace.c: Likewise.
2769 * (gdb_ptrace): Add.
2770 * (inf_ptrace_target::resume): Update.
2771 * (inf_ptrace_target::xfer_partial): Likewise.
2772 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
2773 * (inf_ptrace_peek_poke): Update.
2774
2775 2020-03-19 Kamil Rytarowski <n54@gmx.com>
2776
2777 * x86-bsd-nat.c (gdb_ptrace): New.
2778 * (x86bsd_dr_set): Add new argument `ptid'.
2779 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
2780 x86bsd_dr_set_addr): Update.
2781
2782 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
2783
2784 * remote.c (remote_target::process_stop_reply): Handle events for
2785 all threads differently.
2786
2787 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
2788
2789 * completer.c (completion_tracker::remove_completion): Define new
2790 function.
2791 * completer.h (completion_tracker::remove_completion): Declare new
2792 function.
2793 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
2794 when adding a C++ function symbol.
2795
2796 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
2797
2798 * completer.c (completion_tracker::completion_hash_entry): Define
2799 new class.
2800 (advance_to_filename_complete_word_point): Call
2801 recompute_lowest_common_denominator.
2802 (completion_tracker::completion_tracker): Call discard_completions
2803 to setup the hash table.
2804 (completion_tracker::discard_completions): Allow for being called
2805 from the constructor, pass new equal function, and element deleter
2806 when constructing the hash table. Initialise new class member
2807 variables.
2808 (completion_tracker::maybe_add_completion): Remove use of
2809 m_entries_vec, and store more information into m_entries_hash.
2810 (completion_tracker::recompute_lcd_visitor): New function, most
2811 content taken from...
2812 (completion_tracker::recompute_lowest_common_denominator):
2813 ...here, this now just visits each item in the hash calling the
2814 above visitor.
2815 (completion_tracker::build_completion_result): Remove use of
2816 m_entries_vec, call recompute_lowest_common_denominator.
2817 * completer.h (completion_tracker::have_completions): Remove use
2818 of m_entries_vec.
2819 (completion_tracker::completion_hash_entry): Declare new class.
2820 (completion_tracker::recompute_lowest_common_denominator): Change
2821 function signature.
2822 (completion_tracker::recompute_lcd_visitor): Declare new function.
2823 (completion_tracker::m_entries_vec): Delete.
2824 (completion_tracker::m_entries_hash): Initialize to NULL.
2825 (completion_tracker::m_lowest_common_denominator_valid): New
2826 member variable.
2827 (completion_tracker::m_lowest_common_denominator_max_length): New
2828 member variable.
2829
2830 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2831
2832 * regformats/regdef.h: Put reg in gdb namespace.
2833
2834 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2835
2836 * i386-bsd-nat.c (gdb_ptrace): New.
2837 * (i386bsd_fetch_inferior_registers,
2838 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
2839 * (i386bsd_fetch_inferior_registers,
2840 i386bsd_store_inferior_registers) Use gdb_ptrace.
2841
2842 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2843
2844 * amd64-bsd-nat.c (gdb_ptrace): New.
2845 * (amd64bsd_fetch_inferior_registers,
2846 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
2847 * (amd64bsd_fetch_inferior_registers,
2848 amd64bsd_store_inferior_registers) Use gdb_ptrace.
2849
2850 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2851
2852 * user-regs.c (user_reg::read): Rename to...
2853 (user_reg::xread): ...this.
2854 * (append_user_reg): Rename argument `read' to `xread'.
2855 * (user_reg_add_builtin): Likewise.
2856 * (user_reg_add): Likewise.
2857 * (value_of_user_reg): Likewise.
2858
2859 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2860
2861 * sparc-nat.c (gdb_ptrace): New.
2862 * sparc-nat.c (sparc_fetch_inferior_registers)
2863 (sparc_store_inferior_registers) Remove obsolete comment.
2864 * sparc-nat.c (sparc_fetch_inferior_registers)
2865 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
2866 * sparc-nat.c (sparc_fetch_inferior_registers)
2867 (sparc_store_inferior_registers) Use gdb_ptrace.
2868
2869 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2870
2871 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
2872 it to the ptrace call.
2873 * sh-nbsd-nat.c (store_registers): Likewise.
2874
2875 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2876
2877 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
2878 nbsd_nat_target instead of inf_ptrace_target.
2879 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
2880 nbsd_nat_target.
2881
2882 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2883
2884 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
2885
2886 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2887
2888 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
2889 <sys/sysctl.h>.
2890 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
2891
2892 2020-03-17 Tom de Vries <tdevries@suse.de>
2893
2894 PR gdb/23710
2895 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
2896 fields.
2897 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
2898 fields.
2899 (process_imported_unit_die): Skip import of c++ CUs.
2900
2901 2020-03-16 Tom Tromey <tom@tromey.com>
2902
2903 * p-valprint.c (pascal_object_print_value): Initialize
2904 base_value.
2905
2906 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
2907 Shahab Vahedi <shahab@synopsys.com>
2908
2909 * Makefile.in: Add arch/arc.o
2910 * configure.tgt: Likewise.
2911 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
2912 (_initialize_arc_tdep): Don't initialize old target descriptions.
2913 (arc_read_description): New function to cache target descriptions.
2914 * arc-tdep.h (arc_read_description): Add proto type.
2915 * arch/arc.c: New file.
2916 * arch/arc.h: Likewise.
2917 * features/Makefile: Replace old target descriptions with new.
2918 * features/arc-arcompact.c: Remove.
2919 * features/arc-arcompact.xml: Likewise.
2920 * features/arc-v2.c: Likewise
2921 * features/arc-v2.xml: Likewise
2922 * features/arc/aux-arcompact.xml: New file.
2923 * features/arc/aux-v2.xml: Likewise.
2924 * features/arc/core-arcompact.xml: Likewise.
2925 * features/arc/core-v2.xml: Likewise.
2926 * features/arc/aux-arcompact.c: Generate.
2927 * features/arc/aux-v2.c: Likewise.
2928 * features/arc/core-arcompact.c: Likewise.
2929 * features/arc/core-v2.c: Likewise.
2930 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
2931
2932 2020-03-16 Tom Tromey <tromey@adacore.com>
2933
2934 PR gdb/25663:
2935 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
2936 putting value into bcache.
2937
2938 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
2939
2940 PR gdb/21500
2941 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
2942 to...
2943 (amd64_windows_init_abi_common): ... this. Don't set size of
2944 long type.
2945 (amd64_windows_init_abi): New function.
2946 (amd64_cygwin_init_abi): New function.
2947 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
2948 the Cygwin OS ABI.
2949 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
2950 comment.
2951
2952 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
2953
2954 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
2955 * windows-tdep.c (CYGWIN_DLL_NAME): New.
2956 (pe_import_directory_entry): New struct type.
2957 (is_linked_with_cygwin_dll): New function.
2958 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
2959 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
2960 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
2961
2962 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
2963
2964 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
2965 i386_cygwin_core_osabi_sniffer.
2966
2967 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
2968
2969 * i386-cygwin-tdep.c: Rename to...
2970 * i386-windows-tdep.c: ... this.
2971 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
2972 i386-windows-tdep.c.
2973 * configure.tgt: Likewise.
2974
2975 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
2976
2977 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
2978 * osabi.c (gdb_osabi_names): Add "Windows".
2979 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
2980 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
2981 (i386_cygwin_core_osabi_sniffer): New function, extracted from
2982 i386_cygwin_osabi_sniffer.
2983 (_initialize_i386_cygwin_tdep): Register OS ABI
2984 GDB_OSABI_WINDOWS for i386.
2985 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
2986 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
2987 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
2988 for x86-64.
2989 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
2990 when the target matches '*-*-mingw*'.
2991
2992 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
2993
2994 * defs.h (enum gdb_osabi): Move to...
2995 * osabi.h (enum gdb_osabi): ... here.
2996 * gdbarch.sh: Include osabi.h in gdbarch.h.
2997 * gdbarch.h: Re-generate.
2998
2999 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
3000
3001 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
3002 function.
3003 (_initialize_amd64_windows_tdep): Register osabi sniffer.
3004
3005 2020-03-14 Tom Tromey <tom@tromey.com>
3006
3007 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
3008 for C++.
3009 (c_type_print_modifier): Likewise. Add "language" parameter.
3010 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
3011 (c_type_print_base_1): Update.
3012 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
3013 constants.
3014 * type-stack.c (type_stack::insert): Handle tp_atomic and
3015 tp_restrict.
3016 (type_stack::follow_type_instance_flags): Likewise.
3017 (type_stack::follow_types): Likewise. Merge type-following code.
3018 * c-exp.y (RESTRICT, ATOMIC): New tokens.
3019 (space_identifier, cv_with_space_id)
3020 (const_or_volatile_or_space_identifier_noopt)
3021 (const_or_volatile_or_space_identifier): Remove.
3022 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
3023 rules.
3024 (ptr_operator, typebase): Update.
3025 (enum token_flag) <FLAG_C>: New constant.
3026 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
3027 "_Atomic".
3028 (lex_one_token): Handle FLAG_C.
3029
3030 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3031
3032 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
3033 it to the ptrace call.
3034 * m68k-bsd-nat.c (store_registers): Likewise.
3035
3036 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3037
3038 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
3039 gdb_byte *.
3040 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3041 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
3042 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
3043
3044 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3045
3046 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
3047 nbsd_nat_target instead of inf_ptrace_target.
3048 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
3049 nbsd_nat_target.
3050
3051 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3052
3053 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
3054 register_t.
3055
3056 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3057
3058 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
3059 it to the ptrace call.
3060 * alpha-bsd-nat.c (store_registers): Likewise.
3061
3062 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3063
3064 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
3065 includes.
3066 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
3067 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
3068 fill_fpregset): Likewise.
3069
3070 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3071
3072 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
3073 nbsd_nat_target instead of inf_ptrace_target.
3074 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
3075 nbsd_nat_target.
3076
3077 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3078
3079 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
3080 register_t.
3081
3082 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3083
3084 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
3085 it to the ptrace call.
3086 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
3087 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
3088 * arm-nbsd-nat.c (store_register): Likewise.
3089 * arm-nbsd-nat.c (store_regs): Likewise.
3090 * arm-nbsd-nat.c (store_fp_register): Likewise.
3091 * arm-nbsd-nat.c (store_fp_regs): Likewise.
3092
3093 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3094
3095 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
3096 nbsd_nat_target instead of inf_ptrace_target.
3097 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
3098 nbsd_nat_target.
3099
3100 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3101
3102 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
3103 it to the ptrace call.
3104 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
3105
3106 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3107
3108 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
3109 it to the ptrace call.
3110 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
3111
3112 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3113
3114 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
3115 gdb_byte *.
3116 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
3117
3118 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3119
3120 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
3121 instead of inf_ptrace_target.
3122 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
3123 nbsd_nat_target.
3124
3125 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3126
3127 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
3128 register_t.
3129
3130 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3131
3132 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
3133 register_t.
3134
3135 2020-03-14 Kamil Rytarowski <n54@gmx.com>
3136
3137 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
3138 register_t.
3139
3140 2020-03-13 Tom Tromey <tom@tromey.com>
3141
3142 * value.h (val_print): Don't declare.
3143 * valprint.h (val_print_array_elements)
3144 (val_print_scalar_formatted, generic_val_print): Don't declare.
3145 * valprint.c (generic_val_print_array): Take a struct value.
3146 (generic_val_print_ptr, generic_val_print_memberptr)
3147 (generic_val_print_bool, generic_val_print_int)
3148 (generic_val_print_char, generic_val_print_complex)
3149 (generic_val_print): Remove.
3150 (generic_value_print): Update.
3151 (do_val_print): Remove unused parameters. Don't call
3152 la_val_print.
3153 (val_print): Remove.
3154 (common_val_print): Update. Don't call value_check_printable.
3155 (val_print_scalar_formatted, val_print_array_elements): Remove.
3156 * rust-lang.c (rust_val_print): Remove.
3157 (rust_language_defn): Update.
3158 * p-valprint.c (pascal_val_print): Remove.
3159 (pascal_value_print_inner): Update.
3160 (pascal_object_print_val_fields, pascal_object_print_val):
3161 Remove.
3162 (pascal_object_print_static_field): Update.
3163 * p-lang.h (pascal_val_print): Don't declare.
3164 * p-lang.c (pascal_language_defn): Update.
3165 * opencl-lang.c (opencl_language_defn): Update.
3166 * objc-lang.c (objc_language_defn): Update.
3167 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
3168 * m2-lang.h (m2_val_print): Don't declare.
3169 * m2-lang.c (m2_language_defn): Update.
3170 * language.h (struct language_defn) <la_val_print>: Remove.
3171 * language.c (unk_lang_value_print_inner): Rename. Change
3172 argument types.
3173 (unknown_language_defn, auto_language_defn): Update.
3174 * go-valprint.c (go_val_print): Remove.
3175 * go-lang.h (go_val_print): Don't declare.
3176 * go-lang.c (go_language_defn): Update.
3177 * f-valprint.c (f_val_print): Remove.
3178 * f-lang.h (f_value_print): Don't declare.
3179 * f-lang.c (f_language_defn): Update.
3180 * d-valprint.c (d_val_print): Remove.
3181 * d-lang.h (d_value_print): Don't declare.
3182 * d-lang.c (d_language_defn): Update.
3183 * cp-valprint.c (cp_print_value_fields)
3184 (cp_print_value_fields_rtti, cp_print_value): Remove.
3185 (cp_print_static_field): Update.
3186 * c-valprint.c (c_val_print_array, c_val_print_ptr)
3187 (c_val_print_struct, c_val_print_union, c_val_print_int)
3188 (c_val_print_memberptr, c_val_print): Remove.
3189 * c-lang.h (c_val_print_array, cp_print_value_fields)
3190 (cp_print_value_fields_rtti): Don't declare.
3191 * c-lang.c (c_language_defn, cplus_language_defn)
3192 (asm_language_defn, minimal_language_defn): Update.
3193 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
3194 (ada_val_print_enum): Take a struct value.
3195 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
3196 (ada_val_print): Remove.
3197 (ada_value_print_1): Update.
3198 (printable_val_type): Remove.
3199 * ada-lang.h (ada_val_print): Don't declare.
3200 * ada-lang.c (ada_language_defn): Update.
3201
3202 2020-03-13 Tom Tromey <tom@tromey.com>
3203
3204 * valprint.c (do_val_print): Update.
3205 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
3206 a struct value.
3207 (value_to_value_object_no_release): Declare.
3208 * python/py-value.c (value_to_value_object_no_release): New
3209 function.
3210 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
3211 struct value.
3212 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
3213 function.
3214 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
3215 a struct value.
3216 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
3217 Declare.
3218 (gdbscm_apply_val_pretty_printer): Take a struct value.
3219 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
3220 value.
3221 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
3222 value.
3223 * extension-priv.h (struct extension_language_ops)
3224 <apply_val_pretty_printer>: Take a struct value.
3225 * cp-valprint.c (cp_print_value): Create a struct value.
3226 (cp_print_value): Update.
3227
3228 2020-03-13 Tom Tromey <tom@tromey.com>
3229
3230 * ada-valprint.c (print_field_values): Call common_val_print.
3231
3232 2020-03-13 Tom Tromey <tom@tromey.com>
3233
3234 * ada-valprint.c (val_print_packed_array_elements): Remove
3235 bitoffset and val parameters. Call common_val_print.
3236 (ada_val_print_string): Remove offset, address, and original_value
3237 parameters.
3238 (ada_val_print_array): Update.
3239 (ada_value_print_array): New function.
3240 (ada_value_print_1): Call it.
3241
3242 2020-03-13 Tom Tromey <tom@tromey.com>
3243
3244 * ada-valprint.c (ada_value_print): Use common_val_print.
3245
3246 2020-03-13 Tom Tromey <tom@tromey.com>
3247
3248 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
3249
3250 2020-03-13 Tom Tromey <tom@tromey.com>
3251
3252 * ada-valprint.c (ada_value_print_num): New function.
3253 (ada_value_print_1): Use it.
3254
3255 2020-03-13 Tom Tromey <tom@tromey.com>
3256
3257 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
3258
3259 2020-03-13 Tom Tromey <tom@tromey.com>
3260
3261 * ada-valprint.c (ada_value_print_ptr): New function.
3262 (ada_value_print_1): Use it.
3263
3264 2020-03-13 Tom Tromey <tom@tromey.com>
3265
3266 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
3267 call common_val_print.
3268 (ada_val_print_1): Update.
3269 (ada_value_print_1): New function.
3270 (ada_value_print_inner): Rewrite.
3271
3272 2020-03-13 Tom Tromey <tom@tromey.com>
3273
3274 * cp-valprint.c (cp_print_value_fields): Update.
3275 (cp_print_value): New function.
3276
3277 2020-03-13 Tom Tromey <tom@tromey.com>
3278
3279 * m2-valprint.c (m2_value_print_inner): Use
3280 cp_print_value_fields.
3281 * cp-valprint.c (cp_print_value_fields): New function.
3282 * c-valprint.c (c_value_print_struct): New function.
3283 (c_value_print_inner): Use c_value_print_struct.
3284 * c-lang.h (cp_print_value_fields): Declare.
3285
3286 2020-03-13 Tom Tromey <tom@tromey.com>
3287
3288 * c-valprint.c (c_value_print_array): New function.
3289 (c_value_print_inner): Use it.
3290
3291 2020-03-13 Tom Tromey <tom@tromey.com>
3292
3293 * c-valprint.c (c_value_print_memberptr): New function.
3294 (c_value_print_inner): Use it.
3295
3296 2020-03-13 Tom Tromey <tom@tromey.com>
3297
3298 * c-valprint.c (c_value_print_int): New function.
3299 (c_value_print_inner): Use it.
3300
3301 2020-03-13 Tom Tromey <tom@tromey.com>
3302
3303 * c-valprint.c (c_value_print_ptr): New function.
3304 (c_value_print_inner): Use it.
3305
3306 2020-03-13 Tom Tromey <tom@tromey.com>
3307
3308 * c-valprint.c (c_value_print_inner): Rewrite.
3309
3310 2020-03-13 Tom Tromey <tom@tromey.com>
3311
3312 * valprint.c (generic_value_print_complex): New function.
3313 (generic_value_print): Use it.
3314
3315 2020-03-13 Tom Tromey <tom@tromey.com>
3316
3317 * valprint.c (generic_val_print_float): Don't call
3318 val_print_scalar_formatted.
3319 (generic_val_print, generic_value_print): Update.
3320
3321 2020-03-13 Tom Tromey <tom@tromey.com>
3322
3323 * valprint.c (generic_value_print_char): New function
3324 (generic_value_print): Use it.
3325
3326 2020-03-13 Tom Tromey <tom@tromey.com>
3327
3328 * valprint.c (generic_value_print_int): New function.
3329 (generic_value_print): Use it.
3330
3331 2020-03-13 Tom Tromey <tom@tromey.com>
3332
3333 * valprint.c (generic_value_print_bool): New function.
3334 (generic_value_print): Use it.
3335
3336 2020-03-13 Tom Tromey <tom@tromey.com>
3337
3338 * valprint.c (generic_val_print_func): Simplify.
3339 (generic_val_print, generic_value_print): Update.
3340
3341 2020-03-13 Tom Tromey <tom@tromey.com>
3342
3343 * valprint.c (generic_val_print_flags): Remove.
3344 (generic_val_print, generic_value_print): Update.
3345 (val_print_type_code_flags): Add original_value parameter.
3346
3347 2020-03-13 Tom Tromey <tom@tromey.com>
3348
3349 * valprint.c (generic_val_print): Update.
3350 (generic_value_print): Update.
3351 * valprint.c (generic_val_print_enum): Don't call
3352 val_print_scalar_formatted.
3353
3354 2020-03-13 Tom Tromey <tom@tromey.com>
3355
3356 * valprint.c (generic_value_print): Call generic_value_print_ptr.
3357 * valprint.c (generic_value_print_ptr): New function.
3358
3359 2020-03-13 Tom Tromey <tom@tromey.com>
3360
3361 * valprint.c (generic_value_print): Rewrite.
3362
3363 2020-03-13 Tom Tromey <tom@tromey.com>
3364
3365 * p-valprint.c (pascal_object_print_value_fields)
3366 (pascal_object_print_value): New functions.
3367
3368 2020-03-13 Tom Tromey <tom@tromey.com>
3369
3370 * p-valprint.c (pascal_value_print_inner): Rewrite.
3371
3372 2020-03-13 Tom Tromey <tom@tromey.com>
3373
3374 * f-valprint.c (f_value_print_innner): Rewrite.
3375
3376 2020-03-13 Tom Tromey <tom@tromey.com>
3377
3378 * m2-valprint.c (m2_print_unbounded_array): New overload.
3379 (m2_print_unbounded_array): Update.
3380 (m2_print_array_contents): Take a struct value.
3381 (m2_value_print_inner): Rewrite.
3382
3383 2020-03-13 Tom Tromey <tom@tromey.com>
3384
3385 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
3386 (d_value_print_inner): New function.
3387 * d-lang.h (d_value_print_inner): Declare.
3388 * d-lang.c (d_language_defn): Use d_value_print_inner.
3389
3390 2020-03-13 Tom Tromey <tom@tromey.com>
3391
3392 * go-valprint.c (go_value_print_inner): New function.
3393 * go-lang.h (go_value_print_inner): Declare.
3394 * go-lang.c (go_language_defn): Use go_value_print_inner.
3395
3396 2020-03-13 Tom Tromey <tom@tromey.com>
3397
3398 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
3399 API.
3400 (rust_val_print): Rewrite.
3401 (rust_value_print_inner): New function, from rust_val_print.
3402 (rust_language_defn): Use rust_value_print_inner.
3403
3404 2020-03-13 Tom Tromey <tom@tromey.com>
3405
3406 * ada-valprint.c (ada_value_print_inner): New function.
3407 * ada-lang.h (ada_value_print_inner): Declare.
3408 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
3409
3410 2020-03-13 Tom Tromey <tom@tromey.com>
3411
3412 * f-valprint.c (f_value_print_innner): New function.
3413 * f-lang.h (f_value_print_innner): Declare.
3414 * f-lang.c (f_language_defn): Use f_value_print_innner.
3415
3416 2020-03-13 Tom Tromey <tom@tromey.com>
3417
3418 * p-valprint.c (pascal_value_print_inner): New function.
3419 * p-lang.h (pascal_value_print_inner): Declare.
3420 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
3421
3422 2020-03-13 Tom Tromey <tom@tromey.com>
3423
3424 * m2-valprint.c (m2_value_print_inner): New function.
3425 * m2-lang.h (m2_value_print_inner): Declare.
3426 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
3427
3428 2020-03-13 Tom Tromey <tom@tromey.com>
3429
3430 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
3431 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
3432 * c-valprint.c (c_value_print_inner): New function.
3433 * c-lang.h (c_value_print_inner): Declare.
3434 * c-lang.c (c_language_defn, cplus_language_defn)
3435 (asm_language_defn, minimal_language_defn): Use
3436 c_value_print_inner.
3437
3438 2020-03-13 Tom Tromey <tom@tromey.com>
3439
3440 * p-valprint.c (pascal_object_print_value_fields): Now static.
3441 * p-lang.h (pascal_object_print_value_fields): Don't declare.
3442
3443 2020-03-13 Tom Tromey <tom@tromey.com>
3444
3445 * c-valprint.c (c_val_print_array): Simplify.
3446
3447 2020-03-13 Tom Tromey <tom@tromey.com>
3448
3449 * valprint.c (value_print_array_elements): New function.
3450 * valprint.h (value_print_array_elements): Declare.
3451
3452 2020-03-13 Tom Tromey <tom@tromey.com>
3453
3454 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
3455 * mips-tdep.c (mips_print_register): Use
3456 value_print_scalar_formatted.
3457
3458 2020-03-13 Tom Tromey <tom@tromey.com>
3459
3460 * valprint.h (value_print_scalar_formatted): Declare.
3461 * valprint.c (value_print_scalar_formatted): New function.
3462
3463 2020-03-13 Tom Tromey <tom@tromey.com>
3464
3465 * valprint.h (generic_value_print): Declare.
3466 * valprint.c (generic_value_print): New function.
3467
3468 2020-03-13 Tom Tromey <tom@tromey.com>
3469
3470 * valprint.c (do_val_print): Call la_value_print_inner, if
3471 available.
3472 * rust-lang.c (rust_language_defn): Update.
3473 * p-lang.c (pascal_language_defn): Update.
3474 * opencl-lang.c (opencl_language_defn): Update.
3475 * objc-lang.c (objc_language_defn): Update.
3476 * m2-lang.c (m2_language_defn): Update.
3477 * language.h (struct language_defn) <la_value_print_inner>: New
3478 member.
3479 * language.c (unknown_language_defn, auto_language_defn): Update.
3480 * go-lang.c (go_language_defn): Update.
3481 * f-lang.c (f_language_defn): Update.
3482 * d-lang.c (d_language_defn): Update.
3483 * c-lang.c (c_language_defn, cplus_language_defn)
3484 (asm_language_defn, minimal_language_defn): Update.
3485 * ada-lang.c (ada_language_defn): Update.
3486
3487 2020-03-13 Tom Tromey <tom@tromey.com>
3488
3489 * c-valprint.c (c_value_print): Use common_val_print.
3490
3491 2020-03-13 Tom Tromey <tom@tromey.com>
3492
3493 * cp-valprint.c (cp_print_static_field): Use common_val_print.
3494
3495 2020-03-13 Tom Tromey <tom@tromey.com>
3496
3497 * f-valprint.c (f77_print_array_1, f_val_print): Use
3498 common_val_print.
3499
3500 2020-03-13 Tom Tromey <tom@tromey.com>
3501
3502 * riscv-tdep.c (riscv_print_one_register_info): Use
3503 common_val_print.
3504
3505 2020-03-13 Tom Tromey <tom@tromey.com>
3506
3507 * mi/mi-main.c (output_register): Use common_val_print.
3508
3509 2020-03-13 Tom Tromey <tom@tromey.com>
3510
3511 * infcmd.c (default_print_one_register_info): Use
3512 common_val_print.
3513
3514 2020-03-13 Tom Tromey <tom@tromey.com>
3515
3516 * valprint.h (common_val_print_checked): Declare.
3517 * valprint.c (common_val_print_checked): New function.
3518 * stack.c (print_frame_arg): Use common_val_print_checked.
3519
3520 2020-03-13 Tom Tromey <tom@tromey.com>
3521
3522 * valprint.c (do_val_print): New function, from val_print.
3523 (val_print): Use do_val_print.
3524 (common_val_print): Use do_val_print.
3525
3526 2020-03-13 Tom Tromey <tom@tromey.com>
3527
3528 * valprint.c (value_print): Use scoped_value_mark.
3529
3530 2020-03-13 Tom de Vries <tdevries@suse.de>
3531
3532 PR symtab/25646
3533 * psymtab.c (partial_symtab::partial_symtab): Don't set
3534 globals_offset and statics_offset. Push element onto
3535 current_global_psymbols and current_static_psymbols stacks.
3536 (concat): New function.
3537 (end_psymtab_common): Set globals_offset and statics_offset. Pop
3538 element from current_global_psymbols and current_static_psymbols
3539 stacks. Concat popped elements to global_psymbols and
3540 static_symbols.
3541 (add_psymbol_to_list): Use current_global_psymbols and
3542 current_static_psymbols stacks.
3543 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
3544 current_static_psymbols fields.
3545
3546 2020-03-12 Christian Biesinger <cbiesinger@google.com>
3547
3548 * corelow.c (sniff_core_bfd): Remove.
3549 (class core_target) <m_core_vec>: Remove.
3550 (core_target::core_target): Update.
3551 (core_file_fns): Remove.
3552 (deprecated_add_core_fns): Remove.
3553 (default_core_sniffer): Remove.
3554 (sniff_core_bfd): Remove.
3555 (default_check_format): Remove.
3556 (gdb_check_format): Remove.
3557 (core_target_open): Update.
3558 (core_target::get_core_register_section): Update.
3559 (get_core_registers_cb): Update.
3560 (core_target::fetch_registers): Update.
3561 * gdbcore.h (struct core_fns): Remove.
3562 (deprecated_add_core_fns): Remove.
3563 (default_core_sniffer): Remove.
3564 (default_check_format): Remove.
3565
3566 2020-03-12 Tom Tromey <tom@tromey.com>
3567
3568 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
3569 CORE_ADDR.
3570 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
3571
3572 2020-03-12 Tom Tromey <tom@tromey.com>
3573
3574 * remote.c (remote_target::download_tracepoint)
3575 (remote_target::enable_tracepoint)
3576 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
3577 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
3578 sprintf_vma.
3579
3580 2020-03-12 Tom Tromey <tom@tromey.com>
3581
3582 * symfile-mem.c: Update CORE_ADDR size assert.
3583
3584 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
3585
3586 * selftest.m4: Move to gdbsupport/.
3587 * acinclude.m4: Update path to selftest.m4.
3588
3589 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
3590
3591 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
3592 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
3593 gdbarch-selfselftests.c and selftest-arch.c.
3594 (SUBDIR_UNITTESTS_OBS): Rename to...
3595 (SELFTESTS_OBS): ... this.
3596 (COMMON_SFILES): Remove disasm-selftests.c and
3597 gdbarch-selftests.c.
3598 * configure.ac: Don't add selftest-arch.{c,o} to
3599 CONFIG_{SRCS,OBS}.
3600 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
3601 preprocessor conditions.
3602
3603 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
3604
3605 * configure.ac: Don't source bfd/development.sh.
3606 * selftest.m4: Modify comment.
3607 * configure: Re-generate.
3608
3609 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
3610
3611 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
3612 not "true" or "false".
3613 * configure: Re-generate.
3614
3615 2020-03-12 Christian Biesinger <cbiesinger@google.com>
3616
3617 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
3618 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
3619 renamed to arm_nbsd_supply_gregset.
3620 (fetch_register): Update to call arm_nbsd_supply_gregset.
3621 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
3622 (arm_netbsd_nat_target::fetch_registers): Update.
3623 (fetch_elfcore_registers): Removed.
3624 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
3625 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
3626 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
3627 not require NetBSD system headers.
3628 (arm_nbsd_regset): New struct.
3629 (arm_nbsd_iterate_over_regset_sections): New function.
3630 (arm_netbsd_init_abi_common): Updated to call
3631 set_gdbarch_iterate_over_regset_sections.
3632 * arm-nbsd-tdep.h: New file.
3633
3634 2020-03-11 Kevin Buettner <kevinb@redhat.com>
3635
3636 * symtab.c (find_pc_sect_line): Add check which prevents infinite
3637 recursion.
3638
3639 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
3640
3641 * configure: Re-generate.
3642
3643 2020-03-11 Tom Tromey <tromey@adacore.com>
3644
3645 * ada-typeprint.c (print_choices): Fix comment.
3646
3647 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
3648
3649 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
3650 previous item in the list, when the list has no items.
3651
3652 2020-03-11 Tom de Vries <tdevries@suse.de>
3653
3654 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
3655 PROP_LOCLIST handling code.
3656
3657 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
3658
3659 * buildsym-legacy.c (record_line): Pass extra parameter to
3660 record_line.
3661 * buildsym.c (buildsym_compunit::record_line): Take an extra
3662 parameter, reduce duplication in the line table, and record the
3663 is_stmt flag in the line table.
3664 * buildsym.h (buildsym_compunit::record_line): Add extra
3665 parameter.
3666 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
3667 non-statement lines.
3668 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
3669 this to the symtab builder.
3670 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
3671 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
3672 through to dwarf_record_line_1.
3673 * infrun.c (process_event_stop_test): When stepping, don't stop at
3674 a non-statement instruction, and only refresh the step info when
3675 we land in the middle of a line's range. Also add an extra
3676 comment.
3677 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
3678 field.
3679 * record-btrace.c (btrace_find_line_range): Only record lines
3680 marked as is-statement.
3681 * stack.c (frame_show_address): Show the frame address if we are
3682 in a non-statement sal.
3683 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
3684 (maintenance_print_one_line_table): Print a header for the is_stmt
3685 column, and include is_stmt information in the output.
3686 * symtab.c (find_pc_sect_line): Find lines marked as statements in
3687 preference to non-statements.
3688 (find_pcs_for_symtab_line): Prefer is-statement entries.
3689 (find_line_common): Likewise.
3690 * symtab.h (struct linetable_entry): Add is_stmt field.
3691 (struct symtab_and_line): Likewise.
3692 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
3693 arranging the line table.
3694
3695 2020-03-07 Tom de Vries <tdevries@suse.de>
3696
3697 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
3698 DIE.
3699
3700 2020-03-07 Tom Tromey <tom@tromey.com>
3701
3702 * valops.c (value_literal_complex): Remove obsolete comment.
3703 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
3704 comment.
3705
3706 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3707
3708 * infrun.h: Forward-declare thread_info.
3709 (set_step_info): Add thread_info parameter, add doc.
3710 * infrun.c (set_step_info): Add thread_info parameter, move doc
3711 to header.
3712 * infrun.c (process_event_stop_test): Pass thread to
3713 set_step_info call.
3714 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
3715 set_step_info.
3716 (prepare_one_step): Add thread_info parameter, pass it to
3717 set_step_frame and prepare_one_step (recursive) call.
3718 (step_1): Pass thread to prepare_one_step call.
3719 (step_command_fsm::should_stop): Pass thread to
3720 prepare_one_step.
3721 (until_next_fsm): Pass thread to set_step_frame call.
3722 (finish_command): Pass thread to set_step_info call.
3723
3724 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
3725
3726 * windows-tdep.c (windows_solib_create_inferior_hook):
3727 Check if inferior is running.
3728
3729 2020-03-06 Tom de Vries <tdevries@suse.de>
3730
3731 * NEWS: Fix "the the".
3732 * ctfread.c: Same.
3733
3734 2020-03-06 Tom de Vries <tdevries@suse.de>
3735
3736 * psymtab.c (psymtab_to_symtab): Don't print "done.".
3737
3738 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3739
3740 * .dir-locals.el: Add a comment referencing the other copies of
3741 this file.
3742
3743 2020-03-05 John Baldwin <jhb@FreeBSD.org>
3744
3745 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
3746 psargs.
3747
3748 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3749
3750 * .gitattributes: New file.
3751
3752 2020-03-04 Tom Tromey <tom@tromey.com>
3753
3754 * symmisc.c (print_symbol_bcache_statistics)
3755 (print_objfile_statistics): Update.
3756 * symfile.c (allocate_symtab): Use intern.
3757 * psymtab.c (partial_symtab::partial_symtab): Use intern.
3758 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
3759 macro_cache>: Remove.
3760 <string_cache>: New member.
3761 (struct objfile) <intern>: New methods.
3762 * elfread.c (elf_symtab_read): Use intern.
3763 * dwarf2/read.c (fixup_go_packaging): Intern package name.
3764 (dwarf2_compute_name, dwarf2_physname)
3765 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
3766 names.
3767 (guess_partial_die_structure_name): Update.
3768 (partial_die_info::fixup): Intern name.
3769 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
3770 name.
3771 (dwarf2_name): Intern name. Update.
3772 * buildsym.c (buildsym_compunit::get_macro_table): Use
3773 string_cache.
3774
3775 2020-03-04 Tom Tromey <tom@tromey.com>
3776
3777 * jit.c (bfd_open_from_target_memory): Make "target" const.
3778 * corefile.c (gnutarget): Now const.
3779 * gdbcore.h (gnutarget): Now const.
3780
3781 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
3782
3783 * NEWS: Mention support for WOW64 processes.
3784 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
3785 (amd64_windows_segment_register_p): Remove static.
3786 (_initialize_amd64_windows_nat): Update.
3787 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
3788 * i386-windows-nat.c (context_offset): Update.
3789 (i386_mappings): Rename and remove static.
3790 (i386_windows_segment_register_p): Remove static.
3791 (_initialize_i386_windows_nat): Update.
3792 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
3793 (STATUS_WX86_SINGLE_STEP): New macro.
3794 (EnumProcessModulesEx): New macro.
3795 (Wow64SuspendThread): New macro.
3796 (Wow64GetThreadContext): New macro.
3797 (Wow64SetThreadContext): New macro.
3798 (Wow64GetThreadSelectorEntry): New macro.
3799 (windows_set_context_register_offsets): Add static.
3800 (windows_set_segment_register_p): Likewise.
3801 (windows_add_thread): Adapt for WOW64 processes.
3802 (windows_fetch_one_register): Likewise.
3803 (windows_nat_target::fetch_registers): Likewise.
3804 (windows_store_one_register): Likewise.
3805 (display_selector): Likewise.
3806 (display_selectors): Likewise.
3807 (handle_exception): Likewise.
3808 (windows_continue): Likewise.
3809 (windows_nat_target::resume): Likewise.
3810 (windows_add_all_dlls): Likewise.
3811 (do_initial_windows_stuff): Likewise.
3812 (windows_nat_target::attach): Likewise.
3813 (windows_get_exec_module_filename): Likewise.
3814 (windows_nat_target::create_inferior): Likewise.
3815 (windows_xfer_siginfo): Likewise.
3816 (_initialize_loadable): Initialize Wow64SuspendThread,
3817 Wow64GetThreadContext, Wow64SetThreadContext,
3818 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
3819 * windows-nat.h (windows_set_context_register_offsets):
3820 Remove declaration.
3821 (windows_set_segment_register_p): Likewise.
3822 (i386_windows_segment_register_p): Add declaration.
3823 (amd64_windows_segment_register_p): Likewise.
3824
3825 2020-03-04 Luis Machado <luis.machado@linaro.org>
3826
3827 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
3828 in "info registers" for AArch64/ARM.
3829
3830 The change caused "info registers" to not print GPR's.
3831
3832 gdb/ChangeLog:
3833
3834 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
3835
3836 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
3837 when reg->group is empty and reggroup is not.
3838
3839 2020-03-03 Tom Tromey <tromey@adacore.com>
3840
3841 * dwarf2/frame.c (struct dwarf2_frame_cache)
3842 <checked_tailcall_bottom, entry_cfa_sp_offset,
3843 entry_cfa_sp_offset_p>: Remove members.
3844 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
3845 (dwarf2_frame_prev_register): Don't call
3846 dwarf2_tailcall_sniffer_first.
3847 (dwarf2_append_unwinders): Don't append tailcall unwinder.
3848 * frame-unwind.c (add_unwinder): New fuction.
3849 (frame_unwind_init): Use it. Add tailcall unwinder.
3850
3851 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
3852 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
3853
3854 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
3855 value should be printed as true.
3856
3857 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
3858
3859 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
3860 (windows_init_abi): Set and use windows_so_ops.
3861
3862 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
3863
3864 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
3865 when verifying if dealing with a convenience variable.
3866
3867 2020-03-03 Luis Machado <luis.machado@linaro.org>
3868
3869 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
3870
3871 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3872
3873 * infrun.c (gdbarch_supports_displaced_stepping): New.
3874 (use_displaced_stepping): Break up conditions in smaller pieces.
3875 Use gdbarch_supports_displaced_stepping.
3876 (displaced_step_prepare_throw): Use
3877 gdbarch_supports_displaced_stepping.
3878
3879 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
3880
3881 * NEWS: Mention new behaviour of the history filename.
3882 * top.c (write_history_p): Add comment.
3883 (show_write_history_p): Add header comment, give a different
3884 message when history writing is on, but the history filename is
3885 empty.
3886 (history_filename): Add comment.
3887 (history_filename_empty): New function.
3888 (show_history_filename): Add header comment, give a different
3889 message when the filename is empty.
3890 (init_history): Compare history_filename against nullptr, and only
3891 read history if the filename is not empty.
3892 (set_history_filename): Add header comment, and only make
3893 non-empty filenames absolute.
3894 (init_main): Make the filename argument to 'set history filename'
3895 optional.
3896
3897 2020-03-02 Christian Biesinger <cbiesinger@google.com>
3898
3899 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
3900 (arm_supply_vfpregset): ...this, and update to use VFP registers.
3901 (fetch_fp_register): Update.
3902 (fetch_fp_regs): Update.
3903 (store_fp_register): Update.
3904 (store_fp_regs): Update.
3905 (arm_netbsd_nat_target::read_description): New function.
3906 (fetch_elfcore_registers): Update.
3907
3908 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
3909
3910 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
3911 general_thread if the stop reply is missing a thread-id.
3912 (remote_target::process_stop_reply): Use the first non-exited
3913 thread if the target didn't pass a thread-id.
3914 * infrun.c (do_target_wait): Move call to
3915 switch_to_inferior_no_thread to ....
3916 (do_target_wait_1): ... here.
3917
3918 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
3919
3920 * debuginfod-support.c: Include defs.h first.
3921
3922 2020-02-28 Tom de Vries <tdevries@suse.de>
3923
3924 * symfile.c (set_initial_language): Use default language for lookup.
3925
3926 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
3927
3928 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
3929 reader variable, pass `this` to read_cutu_die_from_dwo.
3930
3931 2020-02-27 Aaron Merey <amerey@redhat.com>
3932
3933 * source.c (open_source_file): Check for nullptr when computing
3934 srcpath.
3935
3936 2020-02-27 Tom Tromey <tromey@adacore.com>
3937
3938 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
3939 member.
3940 (dwarf2_add_field): Don't update nfields.
3941 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
3942
3943 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
3944
3945 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
3946 abs.
3947
3948 2020-02-26 Tom Tromey <tom@tromey.com>
3949
3950 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
3951 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
3952 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
3953 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
3954 per_cu_data.
3955
3956 2020-02-26 Tom Tromey <tom@tromey.com>
3957
3958 * dwarf2/index-write.c (psym_index_map): Change type.
3959 (add_address_entry_worker, write_one_signatured_type)
3960 (recursively_count_psymbols, recursively_write_psymbols)
3961 (class debug_names, psyms_seen_size, write_gdbindex)
3962 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
3963
3964 2020-02-26 Aaron Merey <amerey@redhat.com>
3965
3966 * Makefile.in: Handle optional debuginfod support.
3967 * NEWS: Update.
3968 * README: Add --with-debuginfod summary.
3969 * config.in: Regenerate.
3970 * configure: Regenerate.
3971 * configure.ac: Handle optional debuginfod support.
3972 * debuginfod-support.c: debuginfod helper functions.
3973 * debuginfod-support.h: Ditto.
3974 * doc/gdb.texinfo: Add --with-debuginfod to configure options
3975 summary.
3976 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
3977 when a dwz file cannot be found.
3978 * elfread.c (elf_symfile_read): Query debuginfod servers when a
3979 debuginfo file cannot be found.
3980 * source.c (open_source_file): Query debuginfod servers when a
3981 source file cannot be found.
3982 * top.c (print_gdb_configuration): Include
3983 --{with,without}-debuginfod in the output.
3984
3985 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3986
3987 * thread.c (thr_try_catch_cmd): Print thread name.
3988
3989 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
3990
3991 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
3992 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3993 dwarf2_fetch_die_type_sect_off): Move to...
3994 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
3995 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3996 dwarf2_fetch_die_type_sect_off): ... here.
3997 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
3998 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3999 dwarf2_fetch_die_type_sect_off): Move doc to header file.
4000
4001 2020-02-26 Tom de Vries <tdevries@suse.de>
4002
4003 PR gdb/25603
4004 * symfile.c (set_initial_language): Exit-early if
4005 language_mode == language_mode_manual.
4006
4007 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
4008
4009 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
4010 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
4011 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
4012
4013 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
4014
4015 * gdbtypes.c (create_array_type_with_stride): Handle negative
4016 array strides.
4017 * valarith.c (value_subscripted_rvalue): Likewise.
4018
4019 2020-02-25 Luis Machado <luis.machado@linaro.org>
4020
4021 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
4022
4023 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
4024
4025 * loc.h (dwarf2_get_die_type): Move to...
4026 * read.h (dwarf2_get_die_type): ... here.
4027 * read.c (dwarf2_get_die_type): Move doc to header.
4028
4029 2020-02-25 Joel Brobecker <brobecker@adacore.com>
4030
4031 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
4032 'gnulib/Makefile.in' to the list.
4033
4034 2020-02-24 Tom Tromey <tom@tromey.com>
4035
4036 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
4037 Remove.
4038 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
4039 XOBNEWVEC.
4040
4041 2020-02-24 Tom Tromey <tom@tromey.com>
4042
4043 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
4044 New method.
4045 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
4046 (dw2_do_instantiate_symtab, dw2_get_file_names)
4047 (build_type_psymtab_dependencies, load_full_type_unit): Update.
4048
4049 2020-02-24 Tom Tromey <tom@tromey.com>
4050
4051 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
4052 make_scoped_restore.
4053 (dwarf2_psymtab::read_symtab): Don't clear
4054 reading_partial_symbols.
4055
4056 2020-02-24 Tom de Vries <tdevries@suse.de>
4057
4058 PR gdb/25592
4059 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
4060
4061 2020-02-24 Tom de Vries <tdevries@suse.de>
4062
4063 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
4064 commands layout next/prev/regs.
4065
4066 2020-02-22 Tom Tromey <tom@tromey.com>
4067
4068 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
4069 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
4070
4071 2020-02-22 Tom Tromey <tom@tromey.com>
4072
4073 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
4074
4075 2020-02-22 Tom Tromey <tom@tromey.com>
4076
4077 * tui/tui-win.c (_initialize_tui_win): Add usage text.
4078 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
4079 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
4080 * tui/tui.c (_initialize_tui): Add usage text.
4081
4082 2020-02-22 Tom Tromey <tom@tromey.com>
4083
4084 * tui/tui-win.c (tui_set_focus_command)
4085 (tui_set_win_height_command): Use error_no_arg.
4086 (_initialize_tui_win): Update help text.
4087 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
4088
4089 2020-02-22 Tom Tromey <tom@tromey.com>
4090
4091 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
4092 * tui/tui-disasm.h (struct tui_disasm_window)
4093 <display_start_addr>: Declare.
4094 * tui/tui-source.h (struct tui_source_window)
4095 <display_start_addr>: Declare.
4096 * tui/tui-winsource.h (struct tui_source_window_base)
4097 <show_source_line, display_start_addr>: New methods.
4098 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
4099 Rename and move to protected section.
4100 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
4101 (tui_source_window_base::do_erase_source_content): Update.
4102 (tui_source_window_base::show_source_line): Now a method.
4103 (tui_source_window_base::show_source_content)
4104 (tui_source_window_base::tui_source_window_base)
4105 (tui_source_window_base::rerender)
4106 (tui_source_window_base::refill)
4107 (tui_source_window_base::do_scroll_horizontal)
4108 (tui_source_window_base::set_is_exec_point_at)
4109 (tui_source_window_base::update_breakpoint_info)
4110 (tui_source_window_base::update_exec_info): Update.
4111 * tui/tui-source.c (tui_source_window::set_contents)
4112 (tui_source_window::showing_source_p)
4113 (tui_source_window::do_scroll_vertical)
4114 (tui_source_window::location_matches_p)
4115 (tui_source_window::line_is_displayed): Update.
4116 (tui_source_window::display_start_addr): New method.
4117 * tui/tui-disasm.c (tui_disasm_window::set_contents)
4118 (tui_disasm_window::do_scroll_vertical)
4119 (tui_disasm_window::location_matches_p): Update.
4120 (tui_disasm_window::display_start_addr): New method.
4121
4122 2020-02-22 Tom Tromey <tom@tromey.com>
4123
4124 * NEWS: Add entry for gdb.register_window_type.
4125 * tui/tui-layout.h (window_factory): New typedef.
4126 (tui_register_window): Declare.
4127 * tui/tui-layout.c (saved_tui_windows): New global.
4128 (tui_apply_current_layout): Use it.
4129 (tui_register_window): New function.
4130 * python/python.c (do_start_initialization): Call
4131 gdbpy_initialize_tui.
4132 (python_GdbMethods): Add "register_window_type" function.
4133 * python/python-internal.h (gdbpy_register_tui_window)
4134 (gdbpy_initialize_tui): Declare.
4135 * python/py-tui.c: New file.
4136 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
4137
4138 2020-02-22 Tom Tromey <tom@tromey.com>
4139
4140 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
4141
4142 2020-02-22 Tom Tromey <tom@tromey.com>
4143
4144 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
4145 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
4146 * tui/tui-data.c (tui_set_win_with_focus): Remove.
4147 (tui_set_win_focus_to): Move from tui-win.c.
4148
4149 2020-02-22 Tom Tromey <tom@tromey.com>
4150
4151 * tui/tui-layout.c (make_standard_window, get_locator_window): New
4152 functions.
4153 (known_window_types): New global.
4154 (tui_get_window_by_name): Reimplement.
4155 (initialize_known_windows): New function.
4156 (validate_window_name): Rewrite.
4157 (_initialize_tui_layout): Call initialize_known_windows.
4158
4159 2020-02-22 Tom Tromey <tom@tromey.com>
4160
4161 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
4162 Remove constants.
4163 * tui/tui-winsource.h (struct tui_source_window_base)
4164 <tui_source_window_base>: Remove parameter.
4165 * tui/tui-winsource.c
4166 (tui_source_window_base::tui_source_window_base): Remove
4167 parameter.
4168 (tui_source_window_base::refill): Update.
4169 * tui/tui-stack.h (struct tui_locator_window)
4170 <tui_locator_window>: Update.
4171 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
4172 Default the constructor.
4173 * tui/tui-regs.h (struct tui_data_item_window)
4174 <tui_data_item_window>: Default the constructor.
4175 (struct tui_data_window) <tui_data_window>: Likewise.
4176 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
4177 Default the constructor.
4178 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
4179 Default the constructor.
4180 <type>: Remove.
4181 (struct tui_win_info) <tui_win_info>: Default the constructor.
4182 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
4183 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
4184 Default the constructor.
4185
4186 2020-02-22 Tom Tromey <tom@tromey.com>
4187
4188 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
4189 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
4190 * tui/tui-win.c (tui_resize_all): Don't call
4191 tui_delete_invisible_windows.
4192 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
4193 done.
4194 (tui_set_layout): Update.
4195 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
4196 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
4197 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
4198
4199 2020-02-22 Tom Tromey <tom@tromey.com>
4200
4201 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
4202 correctly.
4203
4204 2020-02-22 Tom Tromey <tom@tromey.com>
4205
4206 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
4207
4208 2020-02-22 Tom Tromey <tom@tromey.com>
4209
4210 * tui/tui-winsource.h (struct tui_source_window_iterator)
4211 <inner_iterator>: New etytypedef.
4212 <tui_source_window_iterator>: Take "end" parameter.
4213 <tui_source_window_iterator>: Take iterator.
4214 <operator*, advance>: Update.
4215 <m_iter>: Change type.
4216 <m_end>: New field.
4217 (struct tui_source_windows) <begin, end>: Update.
4218 * tui/tui-layout.c (tui_windows): New global.
4219 (tui_apply_current_layout): Clear tui_windows.
4220 (tui_layout_window::apply): Update tui_windows.
4221 * tui/tui-data.h (tui_windows): Declare.
4222 (all_tui_windows): Now inline function.
4223 (class tui_window_iterator, struct all_tui_windows): Remove.
4224
4225 2020-02-22 Tom Tromey <tom@tromey.com>
4226
4227 PR tui/17850:
4228 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
4229 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
4230 "height" argument.
4231 (class tui_layout_window) <get_sizes>: Likewise.
4232 (class tui_layout_split) <tui_layout_split>: Add "vertical"
4233 argument.
4234 <get_sizes>: Add "height" argument.
4235 <m_vertical>: New field.
4236 * tui/tui-layout.c (tui_layout_split::clone): Update.
4237 (tui_layout_split::get_sizes): Add "height" argument.
4238 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
4239 (tui_new_layout_command): Parse "-horizontal".
4240 (_initialize_tui_layout): Update help string.
4241 (tui_layout_split::specification): Add "-horizontal" when needed.
4242 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
4243 argument.
4244 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
4245 New methods.
4246
4247 2020-02-22 Tom Tromey <tom@tromey.com>
4248
4249 * tui/tui-layout.h (enum tui_adjust_result): New.
4250 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
4251 (class tui_layout_window) <adjust_size>: Return
4252 tui_adjust_result. Rewrite.
4253 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
4254 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
4255
4256 2020-02-22 Tom Tromey <tom@tromey.com>
4257
4258 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
4259 parameter and return types.
4260 (class tui_layout_base) <specification>: Add "depth".
4261 (class tui_layout_window) <specification>: Add "depth".
4262 (class tui_layout_split) <specification>: Add "depth".
4263 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
4264 and return types.
4265 (tui_new_layout_command): Parse sub-layouts.
4266 (_initialize_tui_layout): Update help string.
4267 (tui_layout_window::specification): Add "depth".
4268 (add_layout_command): Update.
4269
4270 2020-02-22 Tom Tromey <tom@tromey.com>
4271
4272 * NEWS: Add "tui new-layout" item.
4273 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
4274 Add new-layout command to help text.
4275 (validate_window_name): New function.
4276 (tui_new_layout_command): New function.
4277 (_initialize_tui_layout): Register "new-layout".
4278 (tui_layout_window::specification): New method.
4279 (tui_layout_window::specification): New method.
4280 * tui/tui-layout.h (class tui_layout_base) <specification>: New
4281 method.
4282 (class tui_layout_window) <specification>: New method.
4283 (class tui_layout_split) <specification>: New method.
4284
4285 2020-02-22 Tom Tromey <tom@tromey.com>
4286
4287 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
4288 * tui/tui-win.c (window_name_completer): Update comment.
4289 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
4290 Declare method.
4291 (class tui_layout_window) <replace_window>: Likewise.
4292 (class tui_layout_split) <replace_window>: Likewise.
4293 (tui_set_layout): Don't declare.
4294 (tui_set_initial_layout): Declare function.
4295 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
4296 (asm_regs_layout): New globals.
4297 (tui_current_layout, show_layout): Remove.
4298 (tui_set_layout, tui_add_win_to_layout): Rewrite.
4299 (find_layout, tui_apply_layout): New function.
4300 (layout_completer): Remove.
4301 (tui_next_layout): Reimplement.
4302 (tui_next_layout_command): New function.
4303 (tui_set_initial_layout, tui_prev_layout_command): New functions.
4304 (tui_regs_layout): Reimplement.
4305 (tui_regs_layout_command): New function.
4306 (extract_display_start_addr): Rewrite.
4307 (next_layout, prev_layout): Remove.
4308 (tui_layout_window::replace_window): New method.
4309 (tui_layout_split::replace_window): New method.
4310 (destroy_layout): New function.
4311 (layout_list): New global.
4312 (add_layout_command): New function.
4313 (initialize_layouts): Update.
4314 (tui_layout_command): New function.
4315 (_initialize_tui_layout): Install "layout" commands.
4316 * tui/tui-data.h (enum tui_layout_type): Remove.
4317 (tui_current_layout): Don't declare.
4318
4319 2020-02-22 Tom Tromey <tom@tromey.com>
4320
4321 * tui/tui-regs.c (tui_reg_layout): Remove.
4322 (tui_reg_command): Use tui_regs_layout.
4323 * tui/tui-layout.h (tui_reg_command): Declare.
4324 * tui/tui-layout.c (tui_reg_command): New function.
4325
4326 2020-02-22 Tom Tromey <tom@tromey.com>
4327
4328 * tui/tui.c (tui_rl_delete_other_windows): Call
4329 tui_remove_some_windows.
4330 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
4331 Declare method.
4332 (class tui_layout_window) <remove_windows>: New method.
4333 (class tui_layout_split) <remove_windows>: Declare.
4334 (tui_remove_some_windows): Declare.
4335 * tui/tui-layout.c (tui_remove_some_windows): New function.
4336 (tui_layout_split::remove_windows): New method.
4337
4338 2020-02-22 Tom Tromey <tom@tromey.com>
4339
4340 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
4341 * tui/tui-layout.h (tui_next_layout): Declare.
4342 * tui/tui-layout.c (tui_next_layout): New function.
4343
4344 2020-02-22 Tom Tromey <tom@tromey.com>
4345
4346 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
4347 correct coordinates.
4348
4349 2020-02-22 Tom Tromey <tom@tromey.com>
4350
4351 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
4352 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
4353 DATA_WIN case.
4354
4355 2020-02-22 Tom Tromey <tom@tromey.com>
4356
4357 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
4358 TUI_DISASM_WIN, not tui_win_list.
4359
4360 2020-02-22 Tom Tromey <tom@tromey.com>
4361
4362 * valprint.c (generic_val_print_enum_1)
4363 (val_print_type_code_flags): Style member names.
4364 * rust-lang.c (val_print_struct, rust_print_enum)
4365 (rust_print_struct_def, rust_internal_print_type): Style member
4366 names.
4367 * p-valprint.c (pascal_object_print_value_fields): Style member
4368 names. Only call fprintf_symbol_filtered for static members.
4369 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
4370 * f-valprint.c (f_val_print): Style member names.
4371 * f-typeprint.c (f_type_print_base): Style member names.
4372 * cp-valprint.c (cp_print_value_fields): Style member names. Only
4373 call fprintf_symbol_filtered for static members.
4374 (cp_print_class_member): Style member names.
4375 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
4376 member names.
4377 * ada-valprint.c (ada_print_scalar): Style enum names.
4378 (ada_val_print_enum): Likewise.
4379 * ada-typeprint.c (print_enum_type): Style enum names.
4380
4381 2020-02-21 Tom Tromey <tom@tromey.com>
4382
4383 * psympriv.h (struct partial_symtab): Update comment.
4384
4385 2020-02-21 Tom Tromey <tromey@adacore.com>
4386
4387 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
4388 type is CORE_ADDR.
4389
4390 2020-02-21 Tom de Vries <tdevries@suse.de>
4391
4392 PR gdb/25534
4393 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
4394 if dependencies[i]->user != NULL.
4395
4396 2020-02-21 Ali Tamur <tamur@google.com>
4397
4398 * dwarf2/read.c (dwarf2_name): Add null check.
4399
4400 2020-02-20 Tom Tromey <tom@tromey.com>
4401
4402 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
4403 ">=", in binary search.
4404 (dwarf2_find_containing_comp_unit): New overload.
4405 (run_test): New self-test.
4406 (_initialize_dwarf2_read): Register new test.
4407
4408 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
4409
4410 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
4411 * riscv-tdep.h: Likewise.
4412 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
4413 rv32-only CSR.
4414 * features/riscv/64bit-csr.xml: Regenerated.
4415
4416 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
4417 Tom Tromey <tom@tromey.com>
4418
4419 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
4420 of 'fputc_unfiltered'.
4421 (putchar_unfiltered): Call 'fputc_unfiltered'.
4422 (fputc_unfiltered): Call 'fputs_unfiltered'.
4423
4424 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
4425
4426 * config.in: Regenerate.
4427 * configure: Regenerate.
4428 * configure.ac: Add --with-python-libdir option.
4429 * main.c: Use WITH_PYTHON_LIBDIR.
4430
4431 2020-02-19 Tom Tromey <tom@tromey.com>
4432
4433 * symtab.c (general_symbol_info::compute_and_set_names): Use
4434 obstack_strndup. Simplify call to symbol_set_demangled_name.
4435
4436 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
4437
4438 * dwarf2/read.c (allocate_signatured_type_table,
4439 allocate_dwo_unit_table, allocate_type_unit_groups_table,
4440 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
4441 Remove objfile parameter, update all callers.
4442
4443 2020-02-19 Doug Evans <dje@google.com>
4444
4445 PR rust/25535
4446 * rust-lang.c (rust_print_enum): Apply embedded_offset to
4447 rust_enum_variant calculation.
4448
4449 2020-02-19 Tom Tromey <tromey@adacore.com>
4450
4451 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
4452
4453 2020-02-19 Tom Tromey <tromey@adacore.com>
4454
4455 * ada-lang.c (cache_symbol): Use obstack_strdup.
4456
4457 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4458
4459 * configure: Regenerate.
4460
4461 2020-02-19 Tom Tromey <tromey@adacore.com>
4462
4463 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
4464 NULL check.
4465
4466 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4467
4468 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
4469
4470 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4471
4472 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
4473 if GDBSERVER is not defined.
4474 (riscv_tdesc_cache): Likewise, also store const target_desc.
4475 (STATIC_IN_GDB): Define.
4476 (riscv_create_target_description): Update declaration with
4477 STATIC_IN_GDB.
4478 (riscv_lookup_target_description): New function, only define if
4479 GDBSERVER is not defined.
4480 * arch/riscv.h (riscv_create_target_description): Declare only
4481 when GDBSERVER is defined.
4482 (riscv_lookup_target_description): New declaration when GDBSERVER
4483 is not defined.
4484 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
4485 (riscv_linux_read_features): ...this, and return
4486 riscv_gdbarch_features instead of target_desc.
4487 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
4488 (riscv_linux_read_description): Rename to...
4489 (riscv_linux_read_features): ...this.
4490 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
4491 Update to use riscv_gdbarch_features and
4492 riscv_lookup_target_description.
4493 * riscv-tdep.c (riscv_find_default_target_description): Use
4494 riscv_lookup_target_description instead of
4495 riscv_create_target_description.
4496
4497 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
4498
4499 * valprint.c (generic_val_print_enum_1): When printing a flag
4500 enum with value 0 and there is no enumerator with value 0, print
4501 just "0" instead of "(unknown: 0x0)".
4502
4503 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
4504
4505 * valprint.c (generic_val_print_enum_1): Print unknown part of
4506 flag enum in hex.
4507
4508 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
4509
4510 * dwarf2/read.c (update_enumeration_type_from_children): Allow
4511 flag enums to contain duplicate enumerators.
4512 * valprint.c (generic_val_print_enum_1): Update comment.
4513
4514 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
4515
4516 * dwarf2/read.c: Include "count-one-bits.h".
4517 (update_enumeration_type_from_children): If an enumerator has
4518 multiple bits set, don't treat the enumeration as a "flag enum".
4519 * valprint.c (generic_val_print_enum_1): Assert that enumerators
4520 of flag enums have 0 or 1 bit set.
4521
4522 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4523
4524 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
4525 conversion.
4526 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
4527 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
4528 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
4529 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
4530 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
4531
4532 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
4533
4534 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
4535
4536 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
4537
4538 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
4539 displaced_step_closure_up.
4540 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
4541 (struct displaced_step_closure_up):
4542 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
4543 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
4544 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
4545 Likewise.
4546 * gdbarch.sh (displaced_step_copy_insn): Likewise.
4547 * gdbarch.c, gdbarch.h: Re-generate.
4548 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
4549 displaced_step_closure_up.
4550 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
4551 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
4552 * infrun.h (displaced_step_closure_up): New type alias.
4553 (struct displaced_step_inferior_state) <step_closure>: Change
4554 type to displaced_step_closure_up.
4555 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
4556 displaced_step_closure_up.
4557 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
4558
4559 2020-02-14 Tom Tromey <tom@tromey.com>
4560
4561 * minidebug.c (gnu_debug_key): New global.
4562 (find_separate_debug_file_in_section): Use it.
4563
4564 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
4565
4566 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
4567 std::unique_ptr.
4568 * gdbarch.c: Re-generate.
4569 * gdbarch.h: Re-generate.
4570 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
4571 change.
4572 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
4573 type to std::unique_ptr.
4574 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
4575 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
4576 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
4577 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
4578 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
4579 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
4580 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
4581 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
4582 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
4583
4584 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
4585
4586 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
4587 std::unique_ptr.
4588 (displaced_step_clear): Rename to...
4589 (displaced_step_reset): ... this. Just call displaced->reset ().
4590 (displaced_step_clear_cleanup): Rename to...
4591 (displaced_step_reset_cleanup): ... this.
4592 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
4593 (displaced_step_fixup): Likewise.
4594 (resume_1): Likewise.
4595 (handle_inferior_event): Restore child's memory before calling
4596 displaced_step_fixup on the parent.
4597 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
4598 to std::unique_ptr.
4599 <step_closure>: Change type to std::unique_ptr.
4600
4601 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
4602
4603 * arm-tdep.c: Include count-one-bits.h.
4604 (cleanup_block_store_pc): Use count_one_bits.
4605 (cleanup_block_load_pc): Use count_one_bits.
4606 (arm_copy_block_xfer): Use count_one_bits.
4607 (thumb2_copy_block_xfer): Use count_one_bits.
4608 (thumb_copy_pop_pc_16bit): Use count_one_bits.
4609 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
4610 (thumb_get_next_pcs_raw): Use count_one_bits.
4611 (arm_get_next_pcs_raw): Use count_one_bits_l.
4612 * arch/arm.c (bitcount): Remove.
4613 * arch/arm.h (bitcount): Remove.
4614
4615 2020-02-14 Tom Tromey <tromey@adacore.com>
4616
4617 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
4618 Update.
4619 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
4620 * dwarf2/loc.c (call_site_find_chain_1): Return
4621 unique_xmalloc_ptr.
4622 (call_site_find_chain): Likewise.
4623
4624 2020-02-14 Richard Biener <rguenther@suse.de>
4625
4626 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
4627 on expression with division operators.
4628
4629 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
4630
4631 * MAINTAINERS (Write After Approval): Adding myself.
4632
4633 2020-02-12 Tom Tromey <tom@tromey.com>
4634
4635 * event-loop.c (event_data, gdb_event, event_handler_func):
4636 Remove.
4637
4638 2020-02-12 Tom Tromey <tom@tromey.com>
4639
4640 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
4641 (dwarf2_frame_objfile_data): Add comment.
4642 (find_comp_unit, set_comp_unit): New functions.
4643 (dwarf2_frame_find_fde): Use find_comp_unit.
4644 (dwarf2_build_frame_info): Use set_comp_unit.
4645
4646 2020-02-12 Tom Tromey <tom@tromey.com>
4647
4648 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
4649 (comp_unit): Don't initialize objfile.
4650 (execute_cfa_program): Add text_offset parameter.
4651 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
4652 (dwarf2_frame_cache): Update.
4653 (dwarf2_build_frame_info): Don't set "objfile" member.
4654
4655 2020-02-12 Tom Tromey <tom@tromey.com>
4656
4657 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
4658 (decode_frame_entry): Likewise.
4659 (dwarf2_build_frame_info): Update.
4660
4661 2020-02-12 Tom Tromey <tom@tromey.com>
4662
4663 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
4664 (decode_frame_entry_1): Use the comp_unit obstack.
4665
4666 2020-02-12 Tom Tromey <tom@tromey.com>
4667
4668 * dwarf2/frame.c (struct comp_unit): Add initializers and
4669 constructor.
4670 (dwarf2_frame_objfile_data): Store a comp_unit.
4671 (dwarf2_frame_find_fde): Update.
4672 (dwarf2_build_frame_info): Use "new".
4673
4674 2020-02-12 Tom Tromey <tom@tromey.com>
4675
4676 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
4677 (dwarf2_fde_table): Typedef for std::vector.
4678 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
4679 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
4680 (decode_frame_entry): Update.
4681 (dwarf2_build_frame_info): Use "new".
4682
4683 2020-02-12 Christian Biesinger <cbiesinger@google.com>
4684
4685 * arm-tdep.c (arm_gdbarch_init): Update.
4686 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
4687 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
4688 have_neon, is_m>: Change to bool.
4689
4690 2020-02-12 Christian Biesinger <cbiesinger@google.com>
4691
4692 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
4693
4694 2020-02-12 Tom Tromey <tom@tromey.com>
4695
4696 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
4697
4698 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4699
4700 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
4701 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
4702
4703 2020-02-11 Tom Tromey <tom@tromey.com>
4704
4705 * psymtab.h: Update comment.
4706
4707 2020-02-11 Tom Tromey <tom@tromey.com>
4708
4709 * gdb_obstack.h (struct auto_obstack): Use
4710 DISABLE_COPY_AND_ASSIGN.
4711
4712 2020-02-11 Tom Tromey <tom@tromey.com>
4713
4714 * dwarf2/frame.h (struct objfile): Don't forward declare.
4715
4716 2020-02-11 Christian Biesinger <cbiesinger@google.com>
4717
4718 * cris-tdep.c (cris_supply_gregset): Change signature to match
4719 what struct regset expects.
4720 (cris_regset): New struct.
4721 (fetch_core_registers): Remove.
4722 (cris_iterate_over_regset_sections): New function.
4723 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
4724 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
4725
4726 2020-02-11 Christian Biesinger <cbiesinger@google.com>
4727
4728 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
4729 registers.
4730
4731 2020-02-11 Christian Biesinger <cbiesinger@google.com>
4732
4733 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
4734
4735 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4736
4737 * configure: Re-generate.
4738
4739 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4740
4741 * configure: Re-generate.
4742
4743 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4744
4745 * acinclude: Update warning.m4 path.
4746 * warning.m4: Move to gdbsupport.
4747
4748 2020-02-11 Tom Tromey <tromey@adacore.com>
4749
4750 * remote.c (remote_console_output): Update.
4751 * printcmd.c (printf_command): Update.
4752 * event-loop.c (gdb_wait_for_event): Update.
4753 * linux-nat.c (sigchld_handler): Update.
4754 * remote-sim.c (gdb_os_write_stdout): Update.
4755 (gdb_os_flush_stdout): Update.
4756 (gdb_os_flush_stderr): Update.
4757 (gdb_os_write_stderr): Update.
4758 * exceptions.c (print_exception): Update.
4759 * remote-fileio.c (remote_fileio_func_read): Update.
4760 (remote_fileio_func_write): Update.
4761 * tui/tui.c (tui_enable): Update.
4762 * tui/tui-interp.c (tui_interp::init): Update.
4763 * utils.c (init_page_info): Update.
4764 (putchar_unfiltered, fputc_unfiltered): Update.
4765 (gdb_flush): Update.
4766 (emit_style_escape): Update.
4767 (flush_wrap_buffer, fputs_maybe_filtered): Update.
4768 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
4769 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
4770 (stderr_file::write): Update.
4771 (stderr_file::puts): Update.
4772 * ui-file.h (ui_file_isatty, ui_file_write)
4773 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
4774 (ui_file_puts): Don't declare.
4775
4776 2020-02-10 Tom de Vries <tdevries@suse.de>
4777
4778 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
4779 sentinel to char *.
4780
4781 2020-02-09 Tom de Vries <tdevries@suse.de>
4782
4783 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
4784 filename if it matches "<artificial>".
4785
4786 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4787
4788 * windows-tdep.c (struct enum_value_name): New struct.
4789 (create_enum): New function.
4790 (windows_get_siginfo_type): Create and use enum types.
4791
4792 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4793
4794 * NEWS: Mention $_siginfo support for Windows.
4795 * windows-nat.c (handle_exception): Set siginfo_er.
4796 (windows_nat_target::mourn_inferior): Reset siginfo_er.
4797 (windows_xfer_siginfo): New function.
4798 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
4799 * windows-tdep.c (struct windows_gdbarch_data): New struct.
4800 (init_windows_gdbarch_data): New function.
4801 (get_windows_gdbarch_data): New function.
4802 (windows_get_siginfo_type): New function.
4803 (windows_init_abi): Register windows_get_siginfo_type.
4804 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
4805
4806 2020-02-08 Tom Tromey <tom@tromey.com>
4807
4808 * dwarf2/read.c (class cutu_reader) <cutu_reader,
4809 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
4810 <keep>: Declare method.
4811 <m_keep>: Remove member.
4812 <~cutu_reader>: Remove.
4813 (cutu_reader::init_tu_and_read_dwo_dies): Update.
4814 (cutu_reader::cutu_reader): Update.
4815 (cutu_reader::keep): Rename from ~cutu_reader.
4816 (process_psymtab_comp_unit, build_type_psymtabs_1)
4817 (process_skeletonless_type_unit, load_partial_comp_unit)
4818 (load_full_comp_unit, dwarf2_read_addr_index)
4819 (read_signatured_type): Update.
4820
4821 2020-02-08 Tom Tromey <tom@tromey.com>
4822
4823 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
4824 "want_partial_unit" parameter.
4825 (process_psymtab_comp_unit): Change want_partial_unit to bool.
4826 Inline check for DW_TAG_partial_unit.
4827 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
4828
4829 2020-02-08 Tom Tromey <tom@tromey.com>
4830
4831 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
4832 read.c.
4833 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
4834 read.c.
4835
4836 2020-02-08 Tom Tromey <tom@tromey.com>
4837
4838 * dwarf2/read.c (read_address): Move to comp-unit.c.
4839 (dwarf2_rnglists_process, dwarf2_ranges_process)
4840 (read_attribute_value, dwarf_decode_lines_1)
4841 (var_decode_location, decode_locdesc): Update.
4842 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
4843 read.c. Remove "cu" parameter.
4844 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
4845 method.
4846
4847 2020-02-08 Tom Tromey <tom@tromey.com>
4848
4849 * dwarf2/read.c (read_attribute_value, read_indirect_string)
4850 (read_indirect_line_string): Update.
4851 * dwarf2/comp-unit.c (read_offset): Remove.
4852 (read_comp_unit_head): Update.
4853 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
4854 method.
4855 (read_offset): Don't declare.
4856
4857 2020-02-08 Tom Tromey <tom@tromey.com>
4858
4859 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
4860 * dwarf2/read.c (struct comp_unit_head): Move to
4861 dwarf2/comp-unit.h.
4862 (enum class rcuh_kind): Move to comp-unit.h.
4863 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
4864 (read_comp_unit_head, error_check_comp_unit_head)
4865 (read_and_check_comp_unit_head): Move to comp-unit.c.
4866 (read_offset, dwarf_unit_type_name): Likewise.
4867 (create_debug_type_hash_table, read_cutu_die_from_dwo)
4868 (cutu_reader::cutu_reader, read_call_site_scope)
4869 (find_partial_die, follow_die_offset): Update.
4870 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
4871
4872 2020-02-08 Tom Tromey <tom@tromey.com>
4873
4874 * dwarf2/read.c (read_offset_1): Move to leb.c.
4875 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
4876 (dwarf_decode_macro_bytes): Update.
4877 * dwarf2/leb.c (read_offset): Rename; move from read.c.
4878 * dwarf2/leb.h (read_offset): Declare.
4879
4880 2020-02-08 Tom Tromey <tom@tromey.com>
4881
4882 * dwarf2/read.c (dwarf2_section_size): Remove.
4883 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
4884 Update.
4885 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
4886
4887 2020-02-08 Tom Tromey <tom@tromey.com>
4888
4889 * dwarf2/read.c (read_initial_length): Move to leb.c.
4890 * dwarf2/leb.h (read_initial_length): Declare.
4891 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
4892 handle_nonstd parameter.
4893 * dwarf2/frame.c (read_initial_length): Remove.
4894 (decode_frame_entry_1): Update.
4895
4896 2020-02-08 Tom Tromey <tom@tromey.com>
4897
4898 * dwarf2/loc.c (dwarf2_find_location_expression)
4899 (dwarf_evaluate_loc_desc::get_tls_address)
4900 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
4901 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
4902 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
4903 (dwarf2_compile_property_to_c)
4904 (dwarf2_loc_desc_get_symbol_read_needs)
4905 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
4906 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
4907 (loclist_describe_location, loclist_tracepoint_var_ref)
4908 (loclist_generate_c_location): Update.
4909 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
4910 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
4911 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
4912 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
4913 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
4914 (dwarf2_per_cu_data::addr_size)
4915 (dwarf2_per_cu_data::ref_addr_size)
4916 (dwarf2_per_cu_data::text_offset)
4917 (dwarf2_per_cu_data::addr_type): Now methods.
4918 (per_cu_header_read_in): Make per_cu "const".
4919 (dwarf2_version): Remove.
4920 (dwarf2_per_cu_data::int_type): Now a method.
4921 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
4922 (set_die_type, read_array_type, read_subrange_index_type)
4923 (read_tag_string_type, read_subrange_type): Update.
4924 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
4925 offset_size, ref_addr_size, text_offset, addr_type, version,
4926 objfile, int_type, addr_sized_int_type>: Declare methods.
4927
4928 2020-02-08 Tom Tromey <tom@tromey.com>
4929
4930 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
4931 Move earlier.
4932
4933 2020-02-08 Tom Tromey <tom@tromey.com>
4934
4935 * dwarf2/read.h (dwarf_line_debug): Declare.
4936 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
4937 * dwarf2/read.c: Move line_header code to new files.
4938 (dwarf_line_debug): No longer static.
4939 * dwarf2/line-header.c: New file.
4940 * dwarf2/line-header.h: New file.
4941
4942 2020-02-08 Tom Tromey <tom@tromey.com>
4943
4944 * dwarf2/read.c (struct line_header) <file_full_name,
4945 file_file_name>: Return unique_xmalloc_ptr.
4946 (line_header::file_file_name): Update.
4947 (line_header::file_full_name): Update.
4948 (dw2_get_file_names_reader): Update.
4949 (macro_start_file): Update.
4950
4951 2020-02-08 Tom Tromey <tom@tromey.com>
4952
4953 * dwarf2/read.c (struct line_header) <file_full_name,
4954 file_file_name>: Declare methods.
4955 (dw2_get_file_names_reader): Update.
4956 (file_file_name): Now a method.
4957 (file_full_name): Likewise.
4958 (macro_start_file): Update.
4959
4960 2020-02-08 Tom Tromey <tom@tromey.com>
4961
4962 * dwarf2/read.c (dwarf_always_disassemble)
4963 (show_dwarf_always_disassemble): Move to loc.c.
4964 (_initialize_dwarf2_read): Move "always-disassemble" registration
4965 to loc.c.
4966 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
4967 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
4968 static.
4969 (show_dwarf_always_disassemble): Move from read.c.
4970 (_initialize_dwarf2loc): Move always-disassemble from read.c.
4971
4972 2020-02-08 Tom Tromey <tom@tromey.com>
4973
4974 * dwarf2/read.c (~dwarf2_per_objfile): Update.
4975 (create_quick_file_names_table): Return htab_up.
4976 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
4977 Update.
4978 * dwarf2/read.h (struct dwarf2_per_objfile)
4979 <quick_file_names_table>: Now htab_up.
4980
4981 2020-02-08 Tom Tromey <tom@tromey.com>
4982
4983 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
4984
4985 2020-02-08 Tom Tromey <tom@tromey.com>
4986
4987 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
4988 Rewrite.
4989 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
4990 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
4991 (abbrev_table::abbrev_table): No longer inline.
4992 (ABBREV_HASH_SIZE): Remove.
4993 (abbrev_table::m_abbrevs): Now an htab_up.
4994
4995 2020-02-08 Tom Tromey <tom@tromey.com>
4996
4997 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
4998 (cutu_reader): Update.
4999 (build_type_psymtabs_1): Update.
5000 * dwarf2/abbrev.c (abbrev_table::read): Rename.
5001 (abbrev_table::alloc_abbrev): Update.
5002 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
5003 (abbrev_table::read): New static method, renamed from
5004 abbrev_table_read_table.
5005 (abbrev_table::alloc_abbrev)
5006 (abbrev_table::add_abbrev): Now private.
5007 (abbrev_table::abbrev_table): Now private.
5008 (abbrev_table::m_abbrev_obstack): Now private. Rename.
5009
5010 2020-02-08 Tom Tromey <tom@tromey.com>
5011
5012 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
5013 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
5014 htab_up.
5015
5016 2020-02-08 Tom Tromey <tom@tromey.com>
5017
5018 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
5019 htab_up.
5020 (lookup_dwo_unit_in_dwp): Update.
5021 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
5022 on obstack.
5023
5024 2020-02-08 Tom Tromey <tom@tromey.com>
5025
5026 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
5027 obstack.
5028
5029 2020-02-08 Tom Tromey <tom@tromey.com>
5030
5031 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
5032 line_header_hash.
5033 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
5034 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
5035 Change type to htab_up.
5036
5037 2020-02-08 Tom Tromey <tom@tromey.com>
5038
5039 * dwarf2/read.c (allocate_type_unit_groups_table): Return
5040 htab_up. Don't allocate on obstack.
5041 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
5042 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
5043 Change type to htab_up.
5044
5045 2020-02-08 Tom Tromey <tom@tromey.com>
5046
5047 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
5048 Change type to htab_up.
5049 * dwarf2/read.c (create_signatured_type_table_from_index)
5050 (create_signatured_type_table_from_debug_names)
5051 (create_all_type_units, add_type_unit)
5052 (lookup_dwo_signatured_type, lookup_signatured_type)
5053 (process_skeletonless_type_unit): Update.
5054 (create_debug_type_hash_table, create_debug_types_hash_table):
5055 Change type of types_htab.
5056 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
5057 htab_up. Don't allocate on obstack.
5058 (create_cus_hash_table): Change type of cus_htab parameter.
5059 (struct dwo_file) <cus, tus>: Now htab_up.
5060 (lookup_dwo_signatured_type, lookup_dwo_cutu)
5061 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
5062 (queue_and_load_all_dwo_tus): Update.
5063 * dwarf2/index-write.c (write_gdbindex): Update.
5064 (write_debug_names): Update.
5065
5066 2020-02-08 Tom Tromey <tom@tromey.com>
5067
5068 * dwarf2/read.h (struct dwarf2_queue_item): Move from
5069 dwarf2/read.c. Remove "next" member. Add constructor ntad
5070 destructor.
5071 (struct dwarf2_per_objfile) <queue>: New member.
5072 * dwarf2/read.c (struct dwarf2_queue_item): Move to
5073 dwarf2/read.h.
5074 (dwarf2_queue, dwarf2_queue_tail): Remove.
5075 (class dwarf2_queue_guard): Add parameter to constructor. Use
5076 DISABLE_COPY_AND_ASSIGN.
5077 <m_per_objfile>: New member.
5078 <~dwarf2_queue_guard>: Rewrite.
5079 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
5080 Update.
5081 (~dwarf2_queue_item): New.
5082
5083 2020-02-08 Tom Tromey <tom@tromey.com>
5084
5085 * dwarf2/read.c (struct die_info) <has_children>: New member.
5086 (dw2_get_file_names_reader): Remove has_children.
5087 (dw2_get_file_names): Update.
5088 (read_cutu_die_from_dwo): Remove has_children.
5089 (cutu_reader::init_tu_and_read_dwo_dies)
5090 (cutu_reader::cutu_reader): Update.
5091 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
5092 Remove has_children.
5093 (build_type_psymtabs_1, process_skeletonless_type_unit)
5094 (load_partial_comp_unit, load_full_comp_unit): Update.
5095 (create_dwo_cu_reader): Remove has_children.
5096 (create_cus_hash_table, read_die_and_children): Update.
5097 (read_full_die_1,read_full_die): Remove has_children.
5098 (read_signatured_type): Update.
5099 (class cutu_reader) <has_children>: Remove.
5100
5101 2020-02-08 Tom Tromey <tom@tromey.com>
5102
5103 * dwarf2/expr.c: Rename from dwarf2expr.c.
5104 * dwarf2/expr.h: Rename from dwarf2expr.h.
5105 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
5106 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
5107 * dwarf2/frame.c: Rename from dwarf2-frame.c.
5108 * dwarf2/frame.h: Rename from dwarf2-frame.h.
5109 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
5110 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
5111 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
5112 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
5113 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
5114 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
5115 * dwarf2/loc.c: Rename from dwarf2loc.c.
5116 * dwarf2/loc.h: Rename from dwarf2loc.h.
5117 * dwarf2/read.c: Rename from dwarf2read.c.
5118 * dwarf2/read.h: Rename from dwarf2read.h.
5119 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
5120 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
5121 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
5122 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
5123 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
5124 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
5125 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
5126 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
5127 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
5128 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
5129 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
5130 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
5131 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
5132 Update.
5133 * Makefile.in (COMMON_SFILES): Update.
5134 (HFILES_NO_SRCDIR): Update.
5135
5136 2020-02-08 Tom Tromey <tom@tromey.com>
5137
5138 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
5139 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
5140
5141 2020-02-08 Tom Tromey <tom@tromey.com>
5142
5143 * dwarf2read.h (struct die_info): Don't declare.
5144
5145 2020-02-08 Tom Tromey <tom@tromey.com>
5146
5147 * dwarf2read.h (die_info_ptr): Remove typedef.
5148
5149 2020-02-08 Tom Tromey <tom@tromey.com>
5150
5151 * dwarf2read.c (read_call_site_scope)
5152 (handle_data_member_location, dwarf2_add_member_fn)
5153 (mark_common_block_symbol_computed, read_common_block)
5154 (attr_to_dynamic_prop, partial_die_info::read)
5155 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
5156 (dwarf2_symbol_mark_computed, set_die_type): Update.
5157 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
5158 method.
5159 (attr_form_is_block): Don't declare.
5160 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
5161
5162 2020-02-08 Tom Tromey <tom@tromey.com>
5163
5164 * dwarf2read.c (dwarf2_find_base_address, )
5165 (read_call_site_scope, rust_containing_type)
5166 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
5167 (handle_data_member_location, dwarf2_add_member_fn)
5168 (get_alignment, read_structure_type, process_structure_scope)
5169 (mark_common_block_symbol_computed, read_common_block)
5170 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
5171 (partial_die_info::read, read_attribute_value, new_symbol)
5172 (lookup_die_type, dwarf2_get_ref_die_offset)
5173 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
5174 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
5175 (dwarf2_symbol_mark_computed): Update.
5176 * dwarf2/attribute.h (struct attribute) <value_as_address,
5177 form_is_section_offset, form_is_constant, form_is_ref>: Declare
5178 methods.
5179 (value_as_address, attr_form_is_section_offset)
5180 (attr_form_is_constant, attr_form_is_ref): Don't declare.
5181 * dwarf2/attribute.c (attribute::value_as_address)
5182 (attribute::form_is_section_offset, attribute::form_is_constant)
5183 (attribute::form_is_ref): Now methods.
5184
5185 2020-02-08 Tom Tromey <tom@tromey.com>
5186
5187 * dwarf2read.c (struct attribute, DW_STRING)
5188 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
5189 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
5190 (attr_form_is_block, attr_form_is_section_offset)
5191 (attr_form_is_constant, attr_form_is_ref): Move.
5192 * dwarf2/attribute.h: New file.
5193 * dwarf2/attribute.c: New file, from dwarf2read.c.
5194 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
5195
5196 2020-02-08 Tom Tromey <tom@tromey.com>
5197
5198 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
5199 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
5200 Move.
5201 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
5202 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
5203 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
5204 abbrev.c.
5205 * dwarf2/abbrev.h: New file.
5206 * dwarf2/abbrev.c: New file, from dwarf2read.c.
5207 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
5208
5209 2020-02-08 Tom Tromey <tom@tromey.com>
5210
5211 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
5212 (dwarf2_section_size, dwarf2_get_section_info)
5213 (create_signatured_type_table_from_debug_names)
5214 (create_addrmap_from_aranges, read_debug_names_from_section)
5215 (get_gdb_index_contents_from_section, read_comp_unit_head)
5216 (error_check_comp_unit_head, read_abbrev_offset)
5217 (create_debug_type_hash_table, init_cu_die_reader)
5218 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
5219 (read_comp_units_from_section, create_cus_hash_table)
5220 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
5221 (create_dwp_v2_section, dwarf2_rnglists_process)
5222 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
5223 (abbrev_table_read_table, read_indirect_string_at_offset_from)
5224 (read_indirect_string_from_dwz, read_addr_index_1)
5225 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
5226 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5227 (fill_in_loclist_baton): Update.
5228 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
5229 get_containing_section, get_bfd_owner, get_bfd_section,
5230 get_file_name, get_id, get_flags, empty, read>: Declare methods.
5231 (dwarf2_read_section, get_section_name, get_section_file_name)
5232 (get_containing_section, get_section_bfd_owner)
5233 (get_section_bfd_section, get_section_name, get_section_file_name)
5234 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
5235 declare.
5236 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
5237 (dwarf2_section_info::get_bfd_owner)
5238 (dwarf2_section_info::get_bfd_section)
5239 (dwarf2_section_info::get_name)
5240 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
5241 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
5242 (dwarf2_section_info::read): Now methods.
5243 * dwarf-index-write.c (class debug_names): Update.
5244
5245 2020-02-08 Tom Tromey <tom@tromey.com>
5246
5247 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
5248 Move to dwarf2/section.h.
5249 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
5250 (get_section_bfd_section, get_section_name)
5251 (get_section_file_name, get_section_id, get_section_flags)
5252 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
5253 dwarf2/section.c.
5254 * dwarf2/section.h: New file.
5255 * dwarf2/section.c: New file, from dwarf2read.c.
5256 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
5257
5258 2020-02-08 Tom Tromey <tom@tromey.com>
5259
5260 * dwarf2read.h (read_unsigned_leb128): Don't declare.
5261 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
5262 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
5263 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
5264 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
5265 * dwarf2/leb.h: New file, from dwarf2read.c.
5266 * dwarf2/leb.c: New file, from dwarf2read.c.
5267 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
5268 Remove.
5269 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
5270 (COMMON_SFILES): Add dwarf2/leb.c.
5271
5272 2020-02-08 Joel Brobecker <brobecker@adacore.com>
5273
5274 GDB 9.1 released.
5275
5276 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
5277
5278 PR gdb/25190:
5279 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
5280 * gdb/remote.c (remote_console_output): Update.
5281 * gdb/ui-file.c (fputs_unfiltered): Rename to...
5282 (ui_file_puts): ...this.
5283 * gdb/ui-file.h (ui_file_puts): Add declaration.
5284 * gdb/utils.c (emit_style_escape): Update.
5285 (flush_wrap_buffer): Update.
5286 (fputs_maybe_filtered): Update.
5287 (fputs_unfiltered): Add function.
5288
5289 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
5290
5291 * gdb/event-loop.c (gdb_wait_for_event): Update.
5292 * gdb/printcmd.c (printf_command): Update.
5293 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
5294 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
5295 (gdb_os_flush_stderr): Update.
5296 * gdb/remote.c (remote_console_output): Update.
5297 * gdb/ui-file.c (gdb_flush): Rename to...
5298 (ui_file_flush): ...this.
5299 (stderr_file::write): Update.
5300 (stderr_file::puts): Update.
5301 * gdb/ui-file.h (gdb_flush): Rename to...
5302 (ui_file_flush): ...this.
5303 * gdb/utils.c (gdb_flush): Add function.
5304 * gdb/utils.h (gdb_flush): Add declaration.
5305
5306 2020-02-07 Tom Tromey <tromey@adacore.com>
5307
5308 PR breakpoints/24915:
5309 * source.c (find_and_open_source): Do not check basenames_may_differ.
5310
5311 2020-02-07 Tom Tromey <tom@tromey.com>
5312
5313 * README: Update gdbserver documentation.
5314 * gdbserver: Move to top level.
5315 * configure.tgt (build_gdbserver): Remove.
5316 * configure.ac: Remove --enable-gdbserver.
5317 * configure: Rebuild.
5318 * Makefile.in (distclean): Don't mention gdbserver.
5319
5320 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
5321
5322 * source-cache.c (source_cache::ensure): Surround
5323 get_plain_source_lines with a try/catch.
5324 (source_cache::get_line_charpos): Get rid of try/catch
5325 and only check for the return value of "ensure".
5326 * tui/tui-source.c (tui_source_window::set_contents):
5327 Simplify "nlines" calculation.
5328
5329 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
5330
5331 * MAINTAINERS (Write After Approval): Add myself.
5332
5333 2020-02-05 Christian Biesinger <cbiesinger@google.com>
5334
5335 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
5336 function call.
5337
5338 2020-02-05 Christian Biesinger <cbiesinger@google.com>
5339
5340 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
5341
5342 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
5343
5344 * nat/riscv-linux-tdesc.h: New file.
5345 * nat/riscv-linux-tdesc.c: New file, taking code from...
5346 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
5347 ... here.
5348 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
5349 NATDEPFILES.
5350
5351 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
5352
5353 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
5354 we don't set the fake simulator ptid to the null_ptid.
5355
5356 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
5357
5358 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
5359 * gdbthread.h (class thread_info) <resumed>: Likewise.
5360 * infrun.c (resume_1): Likewise.
5361 (proceed): Likewise.
5362 (infrun_thread_stop_requested): Likewise.
5363 (stop_all_threads): Likewise.
5364 (handle_inferior_event): Likewise.
5365 (restart_threads): Likewise.
5366 (finish_step_over): Likewise.
5367 (keep_going_stepped_thread): Likewise.
5368 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
5369 (linux_handle_extended_wait): Likewise.
5370 * record-btrace.c (get_thread_current_frame_id): Likewise.
5371 * record-full.c (record_full_wait_1): Likewise.
5372 * remote.c (remote_target::process_initial_stop_replies): Likewise.
5373 * target.c (target_resume): Likewise.
5374 * thread.c (set_running_thread): Likewise.
5375
5376 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
5377
5378 * f-valprint.c (f77_print_array_1): Changed datatype of index
5379 variable to LONGEST from int to enable it to contain bound
5380 values correctly.
5381
5382 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
5383
5384 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
5385 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
5386 offsets according to FLEN determined.
5387 (riscv_linux_nat_target::read_description): Determine FLEN
5388 dynamically.
5389 (riscv_linux_nat_target::fetch_registers): Size regset buffer
5390 according to FLEN determined.
5391 (riscv_linux_nat_target::store_registers): Likewise.
5392
5393 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
5394
5395 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
5396 when reg->group is empty and reggroup is not.
5397
5398 2020-01-31 Tom Tromey <tromey@adacore.com>
5399
5400 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
5401 Call beneath target's mourn_inferior after unpushing.
5402
5403 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
5404
5405 PR tui/9765
5406 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
5407 have enough lines to fill the screen, still return the lowest
5408 address we found.
5409
5410 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
5411
5412 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
5413 '-', '<', and '>' commands.
5414
5415 2020-01-29 Pedro Alves <palves@redhat.com>
5416 Sergio Durigan Junior <sergiodj@redhat.com>
5417
5418 * infcmd.c (construct_inferior_arguments): Assert that
5419 'argc' is greater than 0.
5420
5421 2020-01-29 Luis Machado <luis.machado@linaro.org>
5422
5423 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
5424 (BRK_INSN_MASK): Define to 0xd4200000.
5425 (aarch64_program_breakpoint_here_p): New function.
5426 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
5427 * arch-utils.c (default_program_breakpoint_here_p): Moved from
5428 breakpoint.c.
5429 * arch-utils.h (default_program_breakpoint_here_p): Moved from
5430 breakpoint.h
5431 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
5432 call gdbarch_program_breakpoint_here_p.
5433 (program_breakpoint_here): Moved to arch-utils.c, renamed to
5434 default_program_breakpoint_here_p, changed return type to bool and
5435 simplified.
5436 * breakpoint.h (program_breakpoint_here): Moved prototype to
5437 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
5438 return type to bool.
5439 * gdbarch.c: Regenerate.
5440 * gdbarch.h: Regenerate.
5441 * gdbarch.sh (program_breakpoint_here_p): New method.
5442 * infrun.c (handle_signal_stop): Call
5443 gdbarch_program_breakpoint_here_p.
5444
5445 2020-01-26 Tom Tromey <tom@tromey.com>
5446
5447 * ctfread.c (struct ctf_fp_info): Reindent.
5448 (_initialize_ctfread): Remove.
5449
5450 2020-01-26 Tom Tromey <tom@tromey.com>
5451
5452 * psymtab.c (partial_map_expand_apply)
5453 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
5454 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
5455 (psym_print_stats, psym_expand_symtabs_for_function)
5456 (psym_map_symbol_filenames, psym_map_matching_symbols)
5457 (psym_expand_symtabs_matching)
5458 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
5459 (maintenance_check_psymtabs): Use new methods.
5460 * psympriv.h (struct partial_symtab) <readin_p,
5461 get_compunit_symtab>: New methods.
5462 <readin, compunit_symtab>: Remove members.
5463 (struct standard_psymtab): New.
5464 (struct legacy_psymtab): Derive from standard_psymtab.
5465 * dwarf2read.h (struct dwarf2_psymtab): Derive from
5466 standard_psymtab.
5467 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
5468
5469 2020-01-26 Tom Tromey <tom@tromey.com>
5470
5471 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
5472 read_dependencies. Add assert.
5473 * psymtab.c (partial_symtab::read_dependencies): New method.
5474 * psympriv.h (struct partial_symtab) <read_dependencies>: New
5475 method.
5476 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
5477 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
5478 read_dependencies.
5479 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
5480 Add assert.
5481
5482 2020-01-26 Tom Tromey <tom@tromey.com>
5483
5484 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
5485 Call expand_psymtab.
5486 (xcoff_read_symtab): Call expand_psymtab.
5487 (xcoff_start_psymtab, xcoff_end_psymtab): Set
5488 legacy_expand_psymtab.
5489 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
5490 method.
5491 (struct legacy_psymtab) <expand_psymtab>: Implement.
5492 <legacy_expand_psymtab>: New member.
5493 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
5494 (parse_partial_symbols): Set legacy_expand_psymtab.
5495 (psymtab_to_symtab_1): Change argument order. Call
5496 expand_psymtab.
5497 (new_psymtab): Set legacy_expand_psymtab.
5498 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
5499 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
5500 expand_psymtab.
5501 (dwarf2_psymtab::expand_psymtab): Rename from
5502 psymtab_to_symtab_1. Call expand_psymtab.
5503 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
5504 (dbx_end_psymtab): Likewise.
5505 (dbx_psymtab_to_symtab_1): Change argument order. Call
5506 expand_psymtab.
5507 (dbx_read_symtab): Call expand_psymtab.
5508 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
5509 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
5510 (ctf_psymtab::read_symtab): Call expand_psymtab.
5511
5512 2020-01-26 Tom Tromey <tom@tromey.com>
5513
5514 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
5515 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
5516 messages.
5517 * mdebugread.c (mdebug_read_symtab): Remove prints.
5518 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
5519 assert.
5520 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
5521
5522 2020-01-26 Tom Tromey <tom@tromey.com>
5523
5524 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
5525 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
5526 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
5527 legacy_symtab.
5528 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
5529 * psymtab.c (psymtab_to_symtab): Call method.
5530 (dump_psymtab): Update.
5531 * psympriv.h (struct partial_symtab): Add virtual destructor.
5532 <read_symtab>: New method.
5533 (struct legacy_symtab): New.
5534 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
5535 (struct pst_map) <pst>: Now a legacy_psymtab.
5536 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
5537 (new_psymtab): Use legacy_psymtab.
5538 * dwarf2read.h (struct dwarf2_psymtab): New.
5539 (struct dwarf2_per_cu_data) <psymtab>: Use it.
5540 * dwarf2read.c (dwarf2_create_include_psymtab)
5541 (dwarf2_build_include_psymtabs, create_type_unit_group)
5542 (create_partial_symtab, process_psymtab_comp_unit_reader)
5543 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
5544 (set_partial_user): Use dwarf2_psymtab.
5545 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
5546 (psymtab_to_symtab_1, process_full_comp_unit)
5547 (process_full_type_unit, dwarf2_ranges_read)
5548 (dwarf2_get_pc_bounds, psymtab_include_file_name)
5549 (dwarf_decode_lines): Use dwarf2_psymtab.
5550 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
5551 (add_address_entry_worker, write_one_signatured_type)
5552 (recursively_count_psymbols, recursively_write_psymbols)
5553 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
5554 (write_debug_names): Likewise.
5555 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
5556 <pst>: Now a legacy_psymtab.
5557 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
5558 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
5559 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
5560 * ctfread.c (struct ctf_psymtab): New.
5561 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
5562 ctf_psymtab.
5563 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
5564 (create_partial_symtab): Return a ctf_psymtab.
5565 (scan_partial_symbols): Update.
5566
5567 2020-01-26 Tom Tromey <tom@tromey.com>
5568
5569 * xcoffread.c (xcoff_start_psymtab): Use new.
5570 * psymtab.c (partial_symtab::partial_symtab): New constructor,
5571 renamed from start_psymtab_common.
5572 * psympriv.h (struct partial_symtab): Add new constructor.
5573 (start_psymtab_common): Don't declare.
5574 * mdebugread.c (parse_partial_symbols): Use new.
5575 * dwarf2read.c (create_partial_symtab): Use new.
5576 * dbxread.c (start_psymtab): Use new.
5577 * ctfread.c (create_partial_symtab): Use new.
5578
5579 2020-01-26 Tom Tromey <tom@tromey.com>
5580
5581 * xcoffread.c (xcoff_end_psymtab): Use new.
5582 * psymtab.c (start_psymtab_common): Use new.
5583 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
5584 Update.
5585 * psympriv.h (struct partial_symtab): Add parameters to
5586 constructor. Don't inline.
5587 (allocate_psymtab): Don't declare.
5588 * mdebugread.c (new_psymtab): Use new.
5589 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
5590 * dbxread.c (dbx_end_psymtab): Use new.
5591
5592 2020-01-26 Tom Tromey <tom@tromey.com>
5593
5594 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
5595 allocate_psymtab. Update documentation.
5596 * psymtab.c (psymtab_storage::install_psymtab): Rename from
5597 allocate_psymtab. Do not use new.
5598 (allocate_psymtab): Use new. Update.
5599
5600 2020-01-26 Tom Tromey <tom@tromey.com>
5601
5602 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5603 * psymtab.c (psym_print_stats): Update.
5604 * psympriv.h (struct partial_symtab) <readin,
5605 psymtabs_addrmap_supported, anonymous>: Now bool.
5606 * mdebugread.c (psymtab_to_symtab_1): Update.
5607 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
5608 (build_type_psymtabs_reader, psymtab_to_symtab_1)
5609 (process_full_comp_unit, process_full_type_unit): Update.
5610 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
5611 * ctfread.c (psymtab_to_symtab): Update.
5612
5613 2020-01-26 Tom Tromey <tom@tromey.com>
5614
5615 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
5616 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
5617 * psymtab.c (psymtab_storage): Delete psymtabs.
5618 (psymtab_storage::allocate_psymtab): Use new.
5619 (psymtab_storage::discard_psymtab): Use delete.
5620 * psympriv.h (struct partial_symtab): Add constructor and
5621 initializers.
5622
5623 2020-01-26 Tom Tromey <tom@tromey.com>
5624
5625 * machoread.c: Do not include psympriv.h.
5626
5627 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5628
5629 * NEWS: Mention the new option and the set/show commands.
5630
5631 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5632
5633 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
5634 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
5635 (validate_exec_file): New variables, enums, functions.
5636 (exec_file_locate_attach, print_section_info): Style the filenames.
5637 (_initialize_exec): Install show_exec_file_mismatch_command and
5638 set_exec_file_mismatch_command.
5639 * gdbcore.h (validate_exec_file): Declare.
5640 * infcmd.c (attach_command): Call validate_exec_file.
5641 * remote.c ( remote_target::remote_add_inferior): Likewise.
5642
5643 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
5644
5645 * frame.c (find_frame_sal): Move call to get_next_frame into more
5646 inner scope.
5647 * inline-frame.c (inilne_state) <inline_state>: Update argument
5648 types.
5649 (inilne_state) <skipped_symbol>: Rename to...
5650 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
5651 (skip_inline_frames): Build vector of skipped symbols and use this
5652 to reate the inline_state.
5653 (inline_skipped_symbol): Add a comment and some assertions, fetch
5654 skipped symbol from the list.
5655
5656 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
5657
5658 * buildsym.c (lte_is_less_than): Delete.
5659 (buildsym_compunit::end_symtab_with_blockvector): Create local
5660 lambda function to sort line table entries, and use
5661 std::stable_sort instead of std::sort.
5662 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
5663 markers when looking for a previous line.
5664
5665 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
5666
5667 * dwarf2read.c (lnp_state_machine::record_line): Include
5668 end_sequence parameter in debug print out. Record the line if we
5669 are at an end_sequence marker even if it's not the start of a
5670 statement.
5671 * symmisc.c (maintenance_print_one_line_table): Print end of
5672 sequence markers with 'END' not '0'.
5673
5674 2020-01-24 Pedro Alves <palves@redhat.com>
5675
5676 PR gdb/25410
5677 * thread.c (scoped_restore_current_thread::restore): Use
5678 switch_to_inferior_no_thread.
5679 * exec.c: Include "progspace-and-thread.h".
5680 (add_target_sections, remove_target_sections):
5681 scoped_restore_current_pspace_and_thread instead of
5682 scoped_restore_current_thread.
5683 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
5684 and aspace to the inferior before calling clone_program_space.
5685 Remove stale comment.
5686
5687 2020-01-24 Christian Biesinger <cbiesinger@google.com>
5688
5689 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
5690 (arm_netbsd_nat_target::fetch_registers): ...this.
5691 (arm_nbsd_nat_target::store_registers): Rename to...
5692 (arm_netbsd_nat_target::store_registers): ...this.
5693
5694 2020-01-24 Christian Biesinger <cbiesinger@google.com>
5695
5696 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
5697 register_t.
5698
5699 2020-01-24 Christian Biesinger <cbiesinger@google.com>
5700
5701 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
5702 Update comment.
5703 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
5704 Likewise.
5705 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
5706 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
5707 the correct replacement (iterate_over_regset_sections).
5708 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
5709 Update comment.
5710
5711 2020-01-24 Graham Markall <graham.markall@embecosm.com>
5712
5713 PR gdb/23718
5714 * gdb/python/python.c (execute_gdb_command): Call
5715 async_enable_stdin in catch block.
5716
5717 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
5718
5719 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
5720 SWITCH_THRU_ALL_UIS.
5721
5722 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
5723
5724 PR tui/9765
5725 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
5726 comment, add extra parameter, and update to store previous symbol
5727 when appropriate.
5728 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
5729 add extra parameter.
5730 * tui/tui-disasm.c (tui_disassemble): Update header comment,
5731 remove unneeded parameter, add try/catch around gdb_print_insn,
5732 rewrite to add items to asm_lines vector.
5733 (tui_find_backward_disassembly_start_address): New function.
5734 (tui_find_disassembly_address): Updated throughout.
5735 (tui_disasm_window::set_contents): Update for changes to
5736 tui_disassemble.
5737 (tui_disasm_window::do_scroll_vertical): No need to adjust the
5738 number of lines to scroll.
5739
5740 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
5741
5742 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
5743 (SECT_OFF_DATA): Likewise.
5744 (SECT_OFF_RODATA): Likewise.
5745 (SECT_OFF_TEXT): Likewise.
5746 (SECT_OFF_BSS): Likewise.
5747 (struct objfile) <text_section_offset, data_section_offset>: New
5748 methods.
5749 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
5750 objfile::text_section_offset.
5751 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
5752 * coffread.c (coff_symtab_read): Likewise.
5753 (enter_linenos): Likewise.
5754 (process_coff_symbol): Likewise.
5755 * ctfread.c (get_objfile_text_range): Likewise.
5756 * dtrace-probe.c (dtrace_probe::get_relocated_address):
5757 Use objfile::data_section_offset.
5758 * dwarf2-frame.c (execute_cfa_program): Use
5759 objfile::text_section_offset.
5760 (dwarf2_frame_find_fde): Likewise.
5761 * dwarf2read.c (create_addrmap_from_index): Likewise.
5762 (create_addrmap_from_aranges): Likewise.
5763 (dw2_find_pc_sect_compunit_symtab): Likewise.
5764 (process_psymtab_comp_unit_reader): Likewise.
5765 (add_partial_symbol): Likewise.
5766 (add_partial_subprogram): Likewise.
5767 (process_full_comp_unit): Likewise.
5768 (read_file_scope): Likewise.
5769 (read_func_scope): Likewise.
5770 (read_lexical_block_scope): Likewise.
5771 (read_call_site_scope): Likewise.
5772 (dwarf2_rnglists_process): Likewise.
5773 (dwarf2_ranges_process): Likewise.
5774 (dwarf2_ranges_read): Likewise.
5775 (dwarf_decode_lines_1): Likewise.
5776 (new_symbol): Likewise.
5777 (dwarf2_fetch_die_loc_sect_off): Likewise.
5778 (dwarf2_per_cu_text_offset): Likewise.
5779 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
5780 * hppa-tdep.c (read_unwind_info): Likewise.
5781 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
5782 * psympriv.h (struct partial_symtab): Likewise.
5783 * psymtab.c (find_pc_sect_psymtab): Likewise.
5784 * solib-svr4.c (enable_break): Likewise.
5785 * stap-probe.c (relocate_address): Use
5786 objfile::data_section_offset.
5787 * xcoffread.c (enter_line_range): Use
5788 objfile::text_section_offset.
5789 (read_xcoff_symtab): Likewise.
5790
5791 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
5792
5793 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
5794 declaration to narrower scopes.
5795
5796 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
5797
5798 * darwin-nat.h (struct darwin_exception_msg, enum
5799 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
5800 Move up.
5801 (class darwin_nat_target) <wait_1, check_new_threads,
5802 decode_exception_message, decode_message, stop_inferior,
5803 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
5804 * darwin-nat.c (darwin_check_new_threads): Rename to...
5805 (darwin_nat_target::check_new_threads): ... this.
5806 (darwin_suspend_inferior_it): Remove.
5807 (darwin_decode_exception_message): Rename to...
5808 (darwin_nat_target::decode_exception_message): ... this.
5809 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
5810 (darwin_decode_message): Rename to...
5811 (darwin_nat_target::decode_message): ... this.
5812 (cancel_breakpoint): Rename to...
5813 (darwin_nat_target::cancel_breakpoint): ... this.
5814 (darwin_wait): Rename to...
5815 (darwin_nat_target::wait_1): ... this. Use range-based for loop
5816 instead of iterate_over_inferiors.
5817 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
5818 (darwin_stop_inferior): Rename to...
5819 (darwin_nat_target::stop_inferior): ... this.
5820 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
5821 (darwin_init_thread_list): Rename to...
5822 (darwin_nat_target::init_thread_list): ... this.
5823 (darwin_ptrace_him): Rename to...
5824 (darwin_nat_target::ptrace_him): ... this.
5825 (darwin_nat_target::create_inferior): Pass lambda function to
5826 fork_inferior.
5827 (darwin_nat_target::detach): Call stop_inferior instead of
5828 darwin_stop_inferior.
5829 * fork-inferior.h (fork_inferior): Change init_trace_fun
5830 parameter to gdb::function_view.
5831 * fork-inferior.c (fork_inferior): Likewise.
5832
5833 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
5834
5835 * i386-cygwin-tdep.c (core_process_module_section): Update.
5836 * windows-nat.c (struct lm_info_windows): Add text_offset.
5837 (windows_xfer_shared_libraries): Update.
5838 * windows-tdep.c (windows_xfer_shared_library):
5839 Add text_offset_cached argument.
5840 * windows-tdep.h (windows_xfer_shared_library): Update.
5841
5842 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
5843
5844 * gdbarch.sh: Add declaration for _initialize_gdbarch.
5845
5846 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
5847
5848 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
5849 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
5850 replace with range-based for.
5851 (gdbsim_interrupt_inferior): Remove.
5852 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
5853 with a range-based for. Inline code from
5854 gdbsim_interrupt_inferior.
5855
5856 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
5857
5858 * infrun.c (proceed): Fix indentation.
5859
5860 2020-01-21 Tom Tromey <tromey@adacore.com>
5861
5862 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
5863 * python/python.c (python_extension_ops): Update.
5864 (gdbpy_colorize): New function.
5865 * python/lib/gdb/__init__.py (colorize): New function.
5866 * extension.h (ext_lang_colorize): Declare.
5867 * extension.c (ext_lang_colorize): New function.
5868 * extension-priv.h (struct extension_language_ops) <colorize>: New
5869 member.
5870 * cli/cli-style.c (_initialize_cli_style): Update help text.
5871
5872 2020-01-21 Luis Machado <luis.machado@linaro.org>
5873
5874 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
5875 <cond>: Change type to bool.
5876 (aarch64_displaced_step_b_cond): Update cond to use bool type.
5877 (aarch64_displaced_step_cb): Likewise.
5878 (aarch64_displaced_step_tb): Likewise.
5879
5880 2020-01-21 Luis Machado <luis.machado@linaro.org>
5881
5882 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
5883 output.
5884
5885 2020-01-21 Luis Machado <luis.machado@linaro.org>
5886
5887 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
5888 <pc_adjust>: Adjust the documentation.
5889 (aarch64_displaced_step_fixup): Check if PC really moved before
5890 adjusting it.
5891
5892 2020-01-19 Tom Tromey <tom@tromey.com>
5893
5894 * disasm.c (~gdb_disassembler): New destructor.
5895 (gdb_buffered_insn_length): Call disassemble_free_target.
5896 * disasm.h (class gdb_disassembler): Declare destructor. Use
5897 DISABLE_COPY_AND_ASSIGN.
5898
5899 2020-01-19 Tom Tromey <tom@tromey.com>
5900
5901 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
5902 (die_reader_func_ftype): Remove.
5903 (cutu_reader): New class.
5904 (dw2_get_file_names_reader): Remove "data" parameter.
5905 (dw2_get_file_names): Use cutu_reader.
5906 (create_debug_type_hash_table): Update.
5907 (read_cutu_die_from_dwo): Update comment.
5908 (lookup_dwo_unit): Add dwo_name parameter.
5909 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
5910 die_reader_func_ftype and data parameters.
5911 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
5912 Remove die_reader_func_ftype and data parameters.
5913 (~cutu_reader): New; from init_cutu_and_read_dies.
5914 (cutu_reader::cutu_reader): Rename from
5915 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
5916 and data parameters.
5917 (init_cutu_and_read_dies_simple): Remove.
5918 (struct process_psymtab_comp_unit_data): Remove.
5919 (process_psymtab_comp_unit_reader): Remove data parameter; add
5920 want_partial_unit and pretend_language parameters.
5921 (process_psymtab_comp_unit): Use cutu_reader.
5922 (build_type_psymtabs_reader): Remove data parameter.
5923 (build_type_psymtabs_1): Use cutu_reader.
5924 (process_skeletonless_type_unit): Likewise.
5925 (load_partial_comp_unit_reader): Remove.
5926 (load_partial_comp_unit): Use cutu_reader.
5927 (load_full_comp_unit_reader): Remove.
5928 (load_full_comp_unit): Use cutu_reader.
5929 (struct create_dwo_cu_data): Remove.
5930 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
5931 dwo_unit parameters.
5932 (create_cus_hash_table): Use cutu_reader.
5933 (struct dwarf2_read_addr_index_data): Remove.
5934 (dwarf2_read_addr_index_reader): Remove.
5935 (dwarf2_read_addr_index): Use cutu_reader.
5936 (read_signatured_type_reader): Remove.
5937 (read_signatured_type): Use cutu_reader.
5938
5939 2020-01-19 Tom Tromey <tom@tromey.com>
5940
5941 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
5942 * tui/tui-wingeneral.h (class tui_suppress_output): New.
5943 (tui_wrefresh): Declare.
5944 * tui/tui-wingeneral.c (suppress_output): New global.
5945 (tui_suppress_output, ~tui_suppress_output): New constructor and
5946 destructor.
5947 (tui_wrefresh): New function.
5948 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
5949 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
5950 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
5951 method.
5952 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
5953 tui_wrefresh.
5954 (tui_data_window::no_refresh): New method.
5955 (tui_data_item_window::refresh_window): Call tui_wrefresh.
5956 (tui_reg_command): Use tui_suppress_output
5957 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
5958 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
5959 method.
5960 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
5961
5962 2020-01-19 Tom Tromey <tom@tromey.com>
5963
5964 * tui/tui-winsource.c (tui_update_source_windows_with_line):
5965 Handle case where symtab is null.
5966
5967 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
5968
5969 * linux-fork.c (one_fork_p): Simplify.
5970
5971 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
5972
5973 * top.c (struct qt_args): Remove.
5974 (kill_or_detach): Change return type to void, replace `void *`
5975 parameter with a proper one.
5976 (print_inferior_quit_action): Likewise.
5977 (quit_confirm): Use range-based for loop to iterate over inferiors.
5978 (quit_force): Likewise.
5979
5980 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
5981
5982 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
5983 `void *` parameter with proper parameters.
5984 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
5985 (print_one_inferior): Change return type to void, replace `void *`
5986 parameter with proper parameters.
5987 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
5988 inferiors.
5989 (get_other_inferior): Remove.
5990 (mi_cmd_remove_inferior): Use range-based loop to iterate over
5991 inferiors.
5992
5993 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
5994
5995 * mi/mi-interp.c (report_initial_inferior): Remove.
5996 (mi_interp::init): Use range-based for to iterate over inferiors.
5997
5998 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
5999
6000 * python/py-inferior.c (build_inferior_list): Remove.
6001 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
6002
6003 2020-01-16 Christian Biesinger <cbiesinger@google.com>
6004
6005 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
6006 (btrace_stitch_trace): Likewise.
6007 * charset.c (intermediate_encoding): Likewise (vaild).
6008 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
6009 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
6010 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
6011
6012 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
6013
6014 * windows-tdep.c (windows_get_tlb_type):
6015 Add rtl_user_process_parameters type.
6016
6017 2020-01-16 Pedro Alves <palves@redhat.com>
6018 Norbert Lange <nolange79@gmail.com>
6019
6020 PR build/24805
6021 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
6022 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
6023 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
6024 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
6025 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
6026 (ps_plog): Redeclare exported functions with default visibility.
6027
6028 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
6029
6030 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
6031 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
6032
6033 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
6034
6035 * infcmd.c (post_create_inferior): Use get_thread_regcache
6036 instead of get_current_regcache.
6037
6038 2020-01-14 Tom Tromey <tom@tromey.com>
6039
6040 PR symtab/12535:
6041 * python/python.c (gdbpy_decode_line): Treat empty string the same
6042 as no argument.
6043
6044 2020-01-14 Tom Tromey <tom@tromey.com>
6045
6046 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
6047
6048 2020-01-14 Tom Tromey <tom@tromey.com>
6049
6050 * nat/linux-btrace.c: Don't include <config.h>.
6051 * nat/linux-ptrace.c: Don't include <config.h>.
6052 * nat/x86-linux-dregs.c: Don't include <config.h>.
6053
6054 2020-01-14 Tom Tromey <tom@tromey.com>
6055
6056 * configure: Rebuild.
6057 * configure.ac: Move many checks to ../gdbsupport/common.m4.
6058
6059 2020-01-14 Tom Tromey <tom@tromey.com>
6060
6061 * nat/x86-linux-dregs.c: Include configh.h.
6062 * nat/linux-ptrace.c: Include configh.h.
6063 * nat/linux-btrace.c: Include configh.h.
6064 * defs.h: Include config.h, bfd.h.
6065 * configure.ac: Don't source common.host.
6066 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
6067 * configure: Rebuild.
6068 * acinclude.m4: Update path.
6069 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
6070 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
6071 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
6072 (CLIBS): Add LIBSUPPORT.
6073 (CDEPS): Likewise.
6074 (COMMON_SFILES): Remove gdbsupport files.
6075 (HFILES_NO_SRCDIR): Likewise.
6076 (stamp-version): Update path to create-version.sh.
6077 (ALLDEPFILES): Remove gdbsupport files.
6078
6079 2020-01-14 Tom Tromey <tom@tromey.com>
6080
6081 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
6082 USE_WIN32API when needed.
6083 * configure.ac (USE_WIN32API): Don't define.
6084 (WIN32LIBS): Use WIN32APILIBS.
6085 * configure: Rebuild.
6086
6087 2020-01-14 Tom Tromey <tom@tromey.com>
6088
6089 * configure: Rebuild.
6090 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
6091
6092 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6093
6094 * skip.c (skip_function_command): Make skip w/o arguments use the
6095 name of the inlined function if pc is inside any inlined function.
6096
6097 2020-01-14 Luis Machado <luis.machado@linaro.org>
6098
6099 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
6100 * infrun.c (resume_1): Likewise.
6101 (handle_inferior_event): Remove stale comment.
6102 * linux-nat.c (linux_nat_target::resume): Update comments.
6103 (save_stop_reason): Likewise.
6104 (linux_nat_filter_event): Likewise.
6105 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
6106
6107 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
6108
6109 * elfread.c (record_minimal_symbol): Set section index to 0 for
6110 non-allocatable sections.
6111
6112
6113 2020-01-13 Ali Tamur <tamur@google.com>
6114
6115 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
6116 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
6117 to gdb::optional. Update comments.
6118 (dwo_file): Update comments.
6119 (read_attribute): Update API to take an additional out parameter,
6120 need_reprocess. This is used to mark attributes that need other
6121 attributes (e.g. str_offsets_base) for correct computation which may not
6122 have been read yet.
6123 (read_attribute_reprocess): New function declaration.
6124 (read_addr_index): Likewise.
6125 (read_dwo_str_index): Likewise.
6126 (read_stub_str_index): Likewise.
6127 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
6128 (lookup_addr_base): New function definition.
6129 (lookup_ranges_base): Likewise.
6130 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
6131 lookup_ranges_base.
6132 (init_cutu_and_read_dies): Update comments.
6133 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
6134 unit. This is used to inherit parent's str_offsets_base and addr_base.
6135 Update comments.
6136 (init_cutu_and_read_dies_simple): Reflect API changes.
6137 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
6138 (create_cus_hash_table): Change API to take parent compile unit.
6139 Reflect API changes.
6140 (open_and_init_dwo_file): Reflect API changes.
6141 (dwarf2_get_pc_bounds): Update comments.
6142 (dwarf2_record_block_ranges): Likewise.
6143 (read_full_die_1): Change implementation to reprocess attributes that
6144 need str_offsets_base and addr_base.
6145 (partial_die_info::read): Likewise.
6146 (read_attribute_reprocess): New function definition.
6147 (read_attribute_value): Change API to take an additional out parameter,
6148 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
6149 when a non-dwo compile unit has index based attributes.
6150 (read_attribute): Reflect API changes.
6151 (read_addr_index_1): Reflect API changes. Update comments.
6152 (dwarf2_read_addr_index_data): Reflect API changes.
6153 (dwarf2_read_addr_index): Likewise.
6154 (read_str_index): Change API and implementation. This becomes a helper
6155 to be used by the new string index related methods. Update error
6156 message and comments.
6157 (read_dwo_str_index): New function definition.
6158 (read_stub_str_index): Likewise.
6159 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
6160 * symfile.h (dwarf2_debug_sections): Likewise.
6161 * xcoffread.c (dwarf2_debug_sections): Likewise.
6162
6163 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
6164
6165 * gdbcore.h (struct core_fns) <core_read_registers>: Change
6166 core_reg_sect type to gdb_byte *.
6167 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
6168 * cris-tdep.c (fetch_core_registers): Likewise.
6169 * corelow.c (core_target::get_core_register_section): Change
6170 type of `contents` to gdb::byte_vector.
6171
6172 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
6173
6174 * tui/tui-wingeneral.c (box_win): Position the title in the center
6175 of the border.
6176
6177 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
6178
6179 * corelow.c (core_target::get_core_register_section): Use
6180 std::vector instead of alloca.
6181
6182 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
6183
6184 * warning.m4: Add -Wmissing-declarations to build_warnings.
6185 * configure: Re-generate.
6186
6187 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
6188
6189 * python/python.c (init__gdb_module): Add declaration.
6190
6191 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
6192
6193 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
6194 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
6195 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
6196 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
6197 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
6198 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
6199 * ada-exp.y (_initialize_ada_exp): Add declaration.
6200 * ada-lang.c (_initialize_ada_language): Add declaration.
6201 * ada-tasks.c (_initialize_tasks): Add declaration.
6202 * agent.c (_initialize_agent): Add declaration.
6203 * aix-thread.c (_initialize_aix_thread): Add declaration.
6204 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
6205 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
6206 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
6207 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
6208 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
6209 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
6210 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
6211 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
6212 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
6213 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
6214 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
6215 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
6216 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
6217 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
6218 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
6219 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
6220 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
6221 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
6222 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
6223 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
6224 * annotate.c (_initialize_annotate): Add declaration.
6225 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
6226 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
6227 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
6228 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
6229 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
6230 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
6231 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
6232 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
6233 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
6234 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
6235 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
6236 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
6237 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
6238 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
6239 * auto-load.c (_initialize_auto_load): Add declaration.
6240 * auxv.c (_initialize_auxv): Add declaration.
6241 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
6242 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
6243 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
6244 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
6245 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
6246 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
6247 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
6248 * breakpoint.c (_initialize_breakpoint): Add declaration.
6249 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
6250 * btrace.c (_initialize_btrace): Add declaration.
6251 * charset.c (_initialize_charset): Add declaration.
6252 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
6253 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
6254 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
6255 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
6256 * cli/cli-script.c (_initialize_cli_script): Add declaration.
6257 * cli/cli-style.c (_initialize_cli_style): Add declaration.
6258 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
6259 * coffread.c (_initialize_coffread): Add declaration.
6260 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
6261 * compile/compile.c (_initialize_compile): Add declaration.
6262 * complaints.c (_initialize_complaints): Add declaration.
6263 * completer.c (_initialize_completer): Add declaration.
6264 * copying.c (_initialize_copying): Add declaration.
6265 * corefile.c (_initialize_core): Add declaration.
6266 * corelow.c (_initialize_corelow): Add declaration.
6267 * cp-abi.c (_initialize_cp_abi): Add declaration.
6268 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
6269 * cp-support.c (_initialize_cp_support): Add declaration.
6270 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
6271 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
6272 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
6273 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
6274 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
6275 * ctfread.c (_initialize_ctfread): Add declaration.
6276 * d-lang.c (_initialize_d_language): Add declaration.
6277 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
6278 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
6279 * dbxread.c (_initialize_dbxread): Add declaration.
6280 * dcache.c (_initialize_dcache): Add declaration.
6281 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
6282 * disasm.c (_initialize_disasm): Add declaration.
6283 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
6284 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
6285 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
6286 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
6287 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
6288 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
6289 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
6290 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
6291 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
6292 * elfread.c (_initialize_elfread): Add declaration.
6293 * exec.c (_initialize_exec): Add declaration.
6294 * extension.c (_initialize_extension): Add declaration.
6295 * f-lang.c (_initialize_f_language): Add declaration.
6296 * f-valprint.c (_initialize_f_valprint): Add declaration.
6297 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
6298 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
6299 * filesystem.c (_initialize_filesystem): Add declaration.
6300 * findcmd.c (_initialize_mem_search): Add declaration.
6301 * findvar.c (_initialize_findvar): Add declaration.
6302 * fork-child.c (_initialize_fork_child): Add declaration.
6303 * frame-base.c (_initialize_frame_base): Add declaration.
6304 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
6305 * frame.c (_initialize_frame): Add declaration.
6306 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
6307 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
6308 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
6309 * gcore.c (_initialize_gcore): Add declaration.
6310 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
6311 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
6312 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
6313 * gdbarch.c (_initialize_gdbarch): Add declaration.
6314 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
6315 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
6316 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
6317 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
6318 * go-lang.c (_initialize_go_language): Add declaration.
6319 * go32-nat.c (_initialize_go32_nat): Add declaration.
6320 * guile/guile.c (_initialize_guile): Add declaration.
6321 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
6322 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
6323 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
6324 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
6325 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
6326 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
6327 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
6328 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
6329 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
6330 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
6331 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
6332 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
6333 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
6334 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
6335 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
6336 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
6337 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
6338 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
6339 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
6340 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
6341 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
6342 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
6343 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
6344 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
6345 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
6346 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
6347 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
6348 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
6349 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
6350 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
6351 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
6352 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
6353 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
6354 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
6355 * infcall.c (_initialize_infcall): Add declaration.
6356 * infcmd.c (_initialize_infcmd): Add declaration.
6357 * inflow.c (_initialize_inflow): Add declaration.
6358 * infrun.c (_initialize_infrun): Add declaration.
6359 * interps.c (_initialize_interpreter): Add declaration.
6360 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
6361 * jit.c (_initialize_jit): Add declaration.
6362 * language.c (_initialize_language): Add declaration.
6363 * linux-fork.c (_initialize_linux_fork): Add declaration.
6364 * linux-nat.c (_initialize_linux_nat): Add declaration.
6365 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
6366 * linux-thread-db.c (_initialize_thread_db): Add declaration.
6367 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
6368 * m2-lang.c (_initialize_m2_language): Add declaration.
6369 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
6370 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
6371 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
6372 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
6373 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
6374 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
6375 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
6376 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
6377 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
6378 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
6379 * machoread.c (_initialize_machoread): Add declaration.
6380 * macrocmd.c (_initialize_macrocmd): Add declaration.
6381 * macroscope.c (_initialize_macroscope): Add declaration.
6382 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
6383 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
6384 * maint.c (_initialize_maint_cmds): Add declaration.
6385 * mdebugread.c (_initialize_mdebugread): Add declaration.
6386 * memattr.c (_initialize_mem): Add declaration.
6387 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
6388 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
6389 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
6390 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
6391 * mi/mi-main.c (_initialize_mi_main): Add declaration.
6392 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
6393 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
6394 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
6395 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
6396 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
6397 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
6398 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
6399 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
6400 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
6401 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
6402 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
6403 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
6404 * mipsread.c (_initialize_mipsread): Add declaration.
6405 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
6406 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
6407 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
6408 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
6409 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
6410 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
6411 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
6412 * nto-procfs.c (_initialize_procfs): Add declaration.
6413 * objc-lang.c (_initialize_objc_language): Add declaration.
6414 * observable.c (_initialize_observer): Add declaration.
6415 * opencl-lang.c (_initialize_opencl_language): Add declaration.
6416 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
6417 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
6418 * osabi.c (_initialize_gdb_osabi): Add declaration.
6419 * osdata.c (_initialize_osdata): Add declaration.
6420 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
6421 * parse.c (_initialize_parse): Add declaration.
6422 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
6423 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
6424 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
6425 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
6426 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
6427 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
6428 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
6429 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
6430 * printcmd.c (_initialize_printcmd): Add declaration.
6431 * probe.c (_initialize_probe): Add declaration.
6432 * proc-api.c (_initialize_proc_api): Add declaration.
6433 * proc-events.c (_initialize_proc_events): Add declaration.
6434 * proc-service.c (_initialize_proc_service): Add declaration.
6435 * procfs.c (_initialize_procfs): Add declaration.
6436 * producer.c (_initialize_producer): Add declaration.
6437 * psymtab.c (_initialize_psymtab): Add declaration.
6438 * python/python.c (_initialize_python): Add declaration.
6439 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
6440 * record-btrace.c (_initialize_record_btrace): Add declaration.
6441 * record-full.c (_initialize_record_full): Add declaration.
6442 * record.c (_initialize_record): Add declaration.
6443 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
6444 * regcache.c (_initialize_regcache): Add declaration.
6445 * reggroups.c (_initialize_reggroup): Add declaration.
6446 * remote-notif.c (_initialize_notif): Add declaration.
6447 * remote-sim.c (_initialize_remote_sim): Add declaration.
6448 * remote.c (_initialize_remote): Add declaration.
6449 * reverse.c (_initialize_reverse): Add declaration.
6450 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
6451 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
6452 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
6453 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
6454 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
6455 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
6456 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
6457 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
6458 Add declaration.
6459 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
6460 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
6461 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
6462 * rust-exp.y (_initialize_rust_exp): Add declaration.
6463 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
6464 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
6465 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
6466 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
6467 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
6468 * score-tdep.c (_initialize_score_tdep): Add declaration.
6469 * ser-go32.c (_initialize_ser_dos): Add declaration.
6470 * ser-mingw.c (_initialize_ser_windows): Add declaration.
6471 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
6472 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
6473 * ser-uds.c (_initialize_ser_socket): Add declaration.
6474 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
6475 * serial.c (_initialize_serial): Add declaration.
6476 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
6477 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
6478 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
6479 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
6480 * skip.c (_initialize_step_skip): Add declaration.
6481 * sol-thread.c (_initialize_sol_thread): Add declaration.
6482 * solib-aix.c (_initialize_solib_aix): Add declaration.
6483 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
6484 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
6485 * solib-frv.c (_initialize_frv_solib): Add declaration.
6486 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
6487 * solib-target.c (_initialize_solib_target): Add declaration.
6488 * solib.c (_initialize_solib): Add declaration.
6489 * source-cache.c (_initialize_source_cache): Add declaration.
6490 * source.c (_initialize_source): Add declaration.
6491 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
6492 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
6493 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
6494 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
6495 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
6496 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
6497 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
6498 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
6499 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
6500 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
6501 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
6502 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
6503 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
6504 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
6505 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
6506 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
6507 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
6508 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
6509 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
6510 * stabsread.c (_initialize_stabsread): Add declaration.
6511 * stack.c (_initialize_stack): Add declaration.
6512 * stap-probe.c (_initialize_stap_probe): Add declaration.
6513 * std-regs.c (_initialize_frame_reg): Add declaration.
6514 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
6515 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
6516 * symfile.c (_initialize_symfile): Add declaration.
6517 * symmisc.c (_initialize_symmisc): Add declaration.
6518 * symtab.c (_initialize_symtab): Add declaration.
6519 * target.c (_initialize_target): Add declaration.
6520 * target-connection.c (_initialize_target_connection): Add
6521 declaration.
6522 * target-dcache.c (_initialize_target_dcache): Add declaration.
6523 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
6524 * thread.c (_initialize_thread): Add declaration.
6525 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
6526 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
6527 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
6528 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
6529 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
6530 * tracectf.c (_initialize_ctf): Add declaration.
6531 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
6532 * tracefile.c (_initialize_tracefile): Add declaration.
6533 * tracepoint.c (_initialize_tracepoint): Add declaration.
6534 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
6535 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
6536 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
6537 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
6538 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
6539 * tui/tui-win.c (_initialize_tui_win): Add declaration.
6540 * tui/tui.c (_initialize_tui): Add declaration.
6541 * typeprint.c (_initialize_typeprint): Add declaration.
6542 * ui-style.c (_initialize_ui_style): Add declaration.
6543 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
6544 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
6545 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
6546 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
6547 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
6548 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
6549 * unittests/filtered_iterator-selftests.c
6550 (_initialize_filtered_iterator_selftests): Add declaration.
6551 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
6552 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
6553 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
6554 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
6555 * unittests/main-thread-selftests.c
6556 (_initialize_main_thread_selftests): Add declaration.
6557 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
6558 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
6559 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
6560 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
6561 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
6562 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
6563 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
6564 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
6565 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
6566 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
6567 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
6568 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
6569 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
6570 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
6571 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
6572 declaration.
6573 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
6574 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
6575 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
6576 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
6577 * user-regs.c (_initialize_user_regs): Add declaration.
6578 * utils.c (_initialize_utils): Add declaration.
6579 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
6580 * valops.c (_initialize_valops): Add declaration.
6581 * valprint.c (_initialize_valprint): Add declaration.
6582 * value.c (_initialize_values): Add declaration.
6583 * varobj.c (_initialize_varobj): Add declaration.
6584 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
6585 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
6586 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
6587 * windows-nat.c (_initialize_windows_nat): Add declaration.
6588 (_initialize_check_for_gdb_ini): Add declaration.
6589 (_initialize_loadable): Add declaration.
6590 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
6591 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
6592 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
6593 * xcoffread.c (_initialize_xcoffread): Add declaration.
6594 * xml-support.c (_initialize_xml_support): Add declaration.
6595 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
6596 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
6597 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
6598 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
6599
6600 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
6601
6602 * regformats/regdat.sh: Generate declaration for init function.
6603
6604 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
6605
6606 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
6607 up.
6608 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
6609 close_one_inferior>: New methods.
6610 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
6611 pass down target to find_inferior_pid.
6612 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
6613 Pass down target to find_inferior_ptid.
6614 (gdbsim_target::create_inferior): Pass down target to
6615 add_thread_silent.
6616 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
6617 target down to find_inferior_ptid and switch_to_thread.
6618 (gdbsim_target::close): Update to call close_one_inferior.
6619 (struct resume_data): Remove.
6620 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
6621 directly, rather than through a void pointer.
6622 (gdbsim_target::resume): Update to call resume_one_inferior.
6623
6624 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
6625
6626 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
6627
6628 2020-01-12 Pedro Alves <palves@redhat.com>
6629
6630 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
6631 directly for the current inferior instead of
6632 discard_all_inferiors.
6633 (discard_all_inferiors): Delete.
6634
6635 2020-01-11 Tom Tromey <tom@tromey.com>
6636
6637 * tui/tui-wingeneral.c (box_win): Check cli_styling.
6638 * tui/tui-winsource.c (tui_source_window_base::refill): Use
6639 deprecated_safe_get_selected_frame.
6640
6641 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6642
6643 * inferior.c (print_inferior): Switch inferior before printing it.
6644
6645 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
6646 Pedro Alves <palves@redhat.com>
6647
6648 * progspace-and-thread.c (switch_to_program_space_and_thread):
6649 Assert there's an inferior for PSPACE. Use
6650 switch_to_inferior_no_thread to switch the inferior too.
6651 * progspace.c (program_space::~program_space): Call
6652 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
6653 (program_space::free_all_objfiles): Don't call clear_symtab_users
6654 here.
6655 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
6656
6657 2020-01-10 Pedro Alves <palves@redhat.com>
6658
6659 * NEWS: Mention multi-target debugging, "info connections", and
6660 "add-inferior -no-connection".
6661
6662 2020-01-10 Pedro Alves <palves@redhat.com>
6663
6664 * infrun.c: Include "target-connection.h".
6665 (check_multi_target_resumption): New.
6666 (proceed): Call it.
6667 * target-connection.c (make_target_connection_string): Make
6668 extern.
6669 * target-connection.h (make_target_connection_string): Declare.
6670
6671 2020-01-10 Pedro Alves <palves@redhat.com>
6672
6673 * Makefile.in (COMMON_SFILES): Add target-connection.c.
6674 * inferior.c (uiout_field_connection): New function.
6675 (print_inferior): Add new "connection-id" column.
6676 (add_inferior_command): Show connection number/string of added
6677 inferior.
6678 * process-stratum-target.h
6679 (process_stratum_target::connection_string): New virtual method.
6680 (process_stratum_target::connection_number): New field.
6681 * remote.c (remote_target::connection_string): New override.
6682 * target-connection.c: New file.
6683 * target-connection.h: New file.
6684 * target.c (decref_target): Remove process_stratum targets from
6685 the connection list.
6686 (target_stack::push): Add process_stratum targets to the
6687 connection list.
6688
6689 2020-01-10 Pedro Alves <palves@redhat.com>
6690
6691 Revert:
6692 2016-04-12 Pedro Alves <palves@redhat.com>
6693 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
6694 Remove references to name.
6695 * serial.h (struct serial) <name>: Delete.
6696
6697 2020-01-10 Pedro Alves <palves@redhat.com>
6698
6699 * gdbarch-selftests.c (register_to_value_test): Remove "target
6700 already pushed" check.
6701
6702 2020-01-10 Pedro Alves <palves@redhat.com>
6703 John Baldwin <jhb@FreeBSD.org>
6704
6705 * aarch64-linux-nat.c
6706 (aarch64_linux_nat_target::thread_architecture): Adjust.
6707 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
6708 (task_command_1): Likewise.
6709 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
6710 (aix_thread_target::wait, aix_thread_target::fetch_registers)
6711 (aix_thread_target::store_registers)
6712 (aix_thread_target::thread_alive): Adjust.
6713 * amd64-fbsd-tdep.c: Include "inferior.h".
6714 (amd64fbsd_get_thread_local_address): Pass down target.
6715 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
6716 thread's gdbarch instead of target_gdbarch.
6717 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
6718 get_last_target_status.
6719 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
6720 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
6721 inferiors.
6722 (update_inserted_breakpoint_locations): Skip if inferiors with no
6723 execution.
6724 (update_global_location_list): When handling moribund locations,
6725 find representative inferior for location's pspace, and use thread
6726 count of its process_stratum target.
6727 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
6728 * bsd-uthread.c (bsd_uthread_target::wait): Use
6729 as_process_stratum_target and adjust thread_change_ptid and
6730 add_thread calls.
6731 (bsd_uthread_target::update_thread_list): Use
6732 as_process_stratum_target and adjust find_thread_ptid,
6733 thread_change_ptid and add_thread calls.
6734 * btrace.c (maint_btrace_packet_history_cmd): Adjust
6735 find_thread_ptid call.
6736 * corelow.c (add_to_thread_list): Adjust add_thread call.
6737 (core_target_open): Adjust add_thread_silent and thread_count
6738 calls.
6739 (core_target::pid_to_str): Adjust find_inferior_ptid call.
6740 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
6741 * event-top.c (async_disconnect): Pop targets from all inferiors.
6742 * exec.c (add_target_sections): Push exec target on all inferiors
6743 sharing the program space.
6744 (remove_target_sections): Remove the exec target from all
6745 inferiors sharing the program space.
6746 (exec_on_vfork): New.
6747 * exec.h (exec_on_vfork): Declare.
6748 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
6749 Pass it down.
6750 (fbsd_nat_target::update_thread_list): Adjust.
6751 (fbsd_nat_target::resume): Adjust.
6752 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
6753 down.
6754 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
6755 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
6756 get_thread_arch_regcache call.
6757 * fork-child.c (gdb_startup_inferior): Pass target down to
6758 startup_inferior and set_executing.
6759 * gdbthread.h (struct process_stratum_target): Forward declare.
6760 (add_thread, add_thread_silent, add_thread_with_info)
6761 (in_thread_list): Add process_stratum_target parameter.
6762 (find_thread_ptid(inferior*, ptid_t)): New overload.
6763 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
6764 parameter.
6765 (all_threads()): Delete overload.
6766 (all_threads, all_non_exited_threads): Add process_stratum_target
6767 parameter.
6768 (all_threads_safe): Use brace initialization.
6769 (thread_count): Add process_stratum_target parameter.
6770 (set_resumed, set_running, set_stop_requested, set_executing)
6771 (threads_are_executing, finish_thread_state): Add
6772 process_stratum_target parameter.
6773 (switch_to_thread): Use is_current_thread.
6774 * i386-fbsd-tdep.c: Include "inferior.h".
6775 (i386fbsd_get_thread_local_address): Pass down target.
6776 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
6777 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
6778 have_inferiors check.
6779 * inf-ptrace.c (inf_ptrace_target::create_inferior)
6780 (inf_ptrace_target::attach): Adjust.
6781 * infcall.c (run_inferior_call): Adjust.
6782 * infcmd.c (run_command_1): Pass target to
6783 scoped_finish_thread_state.
6784 (proceed_thread_callback): Skip inferiors with no execution.
6785 (continue_command): Rename 'all_threads' local to avoid hiding
6786 'all_threads' function. Adjust get_last_target_status call.
6787 (prepare_one_step): Adjust set_running call.
6788 (signal_command): Use user_visible_resume_target. Compare thread
6789 pointers instead of inferior_ptid.
6790 (info_program_command): Adjust to pass down target.
6791 (attach_command): Mark target's 'thread_executing' flag.
6792 (stop_current_target_threads_ns): New, factored out from ...
6793 (interrupt_target_1): ... this. Switch inferior before making
6794 target calls.
6795 * inferior-iter.h
6796 (struct all_inferiors_iterator, struct all_inferiors_range)
6797 (struct all_inferiors_safe_range)
6798 (struct all_non_exited_inferiors_range): Filter on
6799 process_stratum_target too. Remove explicit.
6800 * inferior.c (inferior::inferior): Push dummy target on target
6801 stack.
6802 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
6803 Add process_stratum_target parameter, and pass it down.
6804 (have_live_inferiors): Adjust.
6805 (switch_to_inferior_and_push_target): New.
6806 (add_inferior_command, clone_inferior_command): Handle
6807 "-no-connection" parameter. Use
6808 switch_to_inferior_and_push_target.
6809 (_initialize_inferior): Mention "-no-connection" option in
6810 the help of "add-inferior" and "clone-inferior" commands.
6811 * inferior.h: Include "process-stratum-target.h".
6812 (interrupt_target_1): Use bool.
6813 (struct inferior) <push_target, unpush_target, target_is_pushed,
6814 find_target_beneath, top_target, process_target, target_at,
6815 m_stack>: New.
6816 (discard_all_inferiors): Delete.
6817 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
6818 (all_inferiors, all_non_exited_inferiors): Add
6819 process_stratum_target parameter.
6820 * infrun.c: Include "gdb_select.h" and <unordered_map>.
6821 (target_last_proc_target): New global.
6822 (follow_fork_inferior): Push target on new inferior. Pass target
6823 to add_thread_silent. Call exec_on_vfork. Handle target's
6824 reference count.
6825 (follow_fork): Adjust get_last_target_status call. Also consider
6826 target.
6827 (follow_exec): Push target on new inferior.
6828 (struct execution_control_state) <target>: New field.
6829 (user_visible_resume_target): New.
6830 (do_target_resume): Call target_async.
6831 (resume_1): Set target's threads_executing flag. Consider resume
6832 target.
6833 (commit_resume_all_targets): New.
6834 (proceed): Also consider resume target. Skip threads of inferiors
6835 with no execution. Commit resumtion in all targets.
6836 (start_remote): Pass current inferior to wait_for_inferior.
6837 (infrun_thread_stop_requested): Consider target as well. Pass
6838 thread_info pointer to clear_inline_frame_state instead of ptid.
6839 (infrun_thread_thread_exit): Consider target as well.
6840 (random_pending_event_thread): New inferior parameter. Use it.
6841 (do_target_wait): Rename to ...
6842 (do_target_wait_1): ... this. Add inferior parameter, and pass it
6843 down.
6844 (threads_are_resumed_pending_p, do_target_wait): New.
6845 (prepare_for_detach): Adjust calls.
6846 (wait_for_inferior): New inferior parameter. Handle it. Use
6847 do_target_wait_1 instead of do_target_wait.
6848 (fetch_inferior_event): Adjust. Switch to representative
6849 inferior. Pass target down.
6850 (set_last_target_status): Add process_stratum_target parameter.
6851 Save target in global.
6852 (get_last_target_status): Add process_stratum_target parameter and
6853 handle it.
6854 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
6855 (context_switch): Check inferior_ptid == null_ptid before calling
6856 inferior_thread().
6857 (get_inferior_stop_soon): Pass down target.
6858 (wait_one): Rename to ...
6859 (poll_one_curr_target): ... this.
6860 (struct wait_one_event): New.
6861 (wait_one): New.
6862 (stop_all_threads): Adjust.
6863 (handle_no_resumed, handle_inferior_event): Adjust to consider the
6864 event's target.
6865 (switch_back_to_stepped_thread): Also consider target.
6866 (print_stop_event): Update.
6867 (normal_stop): Update. Also consider the resume target.
6868 * infrun.h (wait_for_inferior): Remove declaration.
6869 (user_visible_resume_target): New declaration.
6870 (get_last_target_status, set_last_target_status): New
6871 process_stratum_target parameter.
6872 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
6873 process_stratum_target parameter, and use it.
6874 (clear_inline_frame_state (thread_info*)): New.
6875 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
6876 process_stratum_target parameter.
6877 (clear_inline_frame_state (thread_info*)): Declare.
6878 * linux-fork.c (delete_checkpoint_command): Pass target down to
6879 find_thread_ptid.
6880 (checkpoint_command): Adjust.
6881 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
6882 instead of just tweaking inferior_ptid.
6883 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
6884 (exit_lwp): Pass target down to find_thread_ptid.
6885 (attach_proc_task_lwp_callback): Pass target down to
6886 add_thread/set_running/set_executing.
6887 (linux_nat_target::attach): Pass target down to
6888 thread_change_ptid.
6889 (get_detach_signal): Pass target down to find_thread_ptid.
6890 Consider last target status's target.
6891 (linux_resume_one_lwp_throw, resume_lwp)
6892 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
6893 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
6894 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
6895 (linux_nat_target::async_wait_fd): New.
6896 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
6897 target down.
6898 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
6899 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
6900 * linux-thread-db.c (struct thread_db_info::process_target): New
6901 field.
6902 (add_thread_db_info): Save target.
6903 (get_thread_db_info): New process_stratum_target parameter. Also
6904 match target.
6905 (delete_thread_db_info): New process_stratum_target parameter.
6906 Also match target.
6907 (thread_from_lwp): Adjust to pass down target.
6908 (thread_db_notice_clone): Pass down target.
6909 (check_thread_db_callback): Pass down target.
6910 (try_thread_db_load_1): Always push the thread_db target.
6911 (try_thread_db_load, record_thread): Pass target down.
6912 (thread_db_target::detach): Pass target down. Always unpush the
6913 thread_db target.
6914 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
6915 target down. Always unpush the thread_db target.
6916 (find_new_threads_callback, thread_db_find_new_threads_2)
6917 (thread_db_target::update_thread_list): Pass target down.
6918 (thread_db_target::pid_to_str): Pass current inferior down.
6919 (thread_db_target::get_thread_local_address): Pass target down.
6920 (thread_db_target::resume, maintenance_check_libthread_db): Pass
6921 target down.
6922 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
6923 * procfs.c (procfs_target::procfs_init_inferior): Declare.
6924 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
6925 (procfs_init_inferior): Rename to ...
6926 (procfs_target::procfs_init_inferior): ... this and adjust.
6927 (procfs_target::create_inferior, procfs_notice_thread)
6928 (procfs_do_thread_registers): Adjust.
6929 * ppc-fbsd-tdep.c: Include "inferior.h".
6930 (ppcfbsd_get_thread_local_address): Pass down target.
6931 * proc-service.c (ps_xfer_memory): Switch current inferior and
6932 program space as well.
6933 (get_ps_regcache): Pass target down.
6934 * process-stratum-target.c
6935 (process_stratum_target::thread_address_space)
6936 (process_stratum_target::thread_architecture): Pass target down.
6937 * process-stratum-target.h
6938 (process_stratum_target::threads_executing): New field.
6939 (as_process_stratum_target): New.
6940 * ravenscar-thread.c
6941 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
6942 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
6943 down.
6944 * record-btrace.c (record_btrace_target::info_record): Adjust.
6945 (record_btrace_target::record_method)
6946 (record_btrace_target::record_is_replaying)
6947 (record_btrace_target::fetch_registers)
6948 (get_thread_current_frame_id, record_btrace_target::resume)
6949 (record_btrace_target::wait, record_btrace_target::stop): Pass
6950 target down.
6951 * record-full.c (record_full_wait_1): Switch to event thread.
6952 Pass target down.
6953 * regcache.c (regcache::regcache)
6954 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
6955 process_stratum_target parameter and handle it.
6956 (current_thread_target): New global.
6957 (get_thread_regcache): Add process_stratum_target parameter and
6958 handle it. Switch inferior before calling target method.
6959 (get_thread_regcache): Pass target down.
6960 (get_thread_regcache_for_ptid): Pass target down.
6961 (registers_changed_ptid): Add process_stratum_target parameter and
6962 handle it.
6963 (registers_changed_thread, registers_changed): Pass target down.
6964 (test_get_thread_arch_aspace_regcache): New.
6965 (current_regcache_test): Define a couple local test_target_ops
6966 instances and use them for testing.
6967 (readwrite_regcache): Pass process_stratum_target parameter.
6968 (cooked_read_test, cooked_write_test): Pass mock_target down.
6969 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
6970 (get_thread_arch_aspace_regcache): Add process_stratum_target
6971 parameter.
6972 (regcache::target): New method.
6973 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
6974 (regcache::registers_changed_ptid): Add process_stratum_target
6975 parameter.
6976 (regcache::m_target): New field.
6977 (registers_changed_ptid): Add process_stratum_target parameter.
6978 * remote.c (remote_state::supports_vCont_probed): New field.
6979 (remote_target::async_wait_fd): New method.
6980 (remote_unpush_and_throw): Add remote_target parameter.
6981 (get_current_remote_target): Adjust.
6982 (remote_target::remote_add_inferior): Push target.
6983 (remote_target::remote_add_thread)
6984 (remote_target::remote_notice_new_inferior)
6985 (get_remote_thread_info): Pass target down.
6986 (remote_target::update_thread_list): Skip threads of inferiors
6987 bound to other targets. (remote_target::close): Don't discard
6988 inferiors. (remote_target::add_current_inferior_and_thread)
6989 (remote_target::process_initial_stop_replies)
6990 (remote_target::start_remote)
6991 (remote_target::remote_serial_quit_handler): Pass down target.
6992 (remote_target::remote_unpush_target): New remote_target
6993 parameter. Unpush the target from all inferiors.
6994 (remote_target::remote_unpush_and_throw): New remote_target
6995 parameter. Pass it down.
6996 (remote_target::open_1): Check whether the current inferior has
6997 execution instead of checking whether any inferior is live. Pass
6998 target down.
6999 (remote_target::remote_detach_1): Pass down target. Use
7000 remote_unpush_target.
7001 (extended_remote_target::attach): Pass down target.
7002 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
7003 (remote_target::append_resumption): Pass down target.
7004 (remote_target::append_pending_thread_resumptions)
7005 (remote_target::remote_resume_with_hc, remote_target::resume)
7006 (remote_target::commit_resume): Pass down target.
7007 (remote_target::remote_stop_ns): Check supports_vCont_probed.
7008 (remote_target::interrupt_query)
7009 (remote_target::remove_new_fork_children)
7010 (remote_target::check_pending_events_prevent_wildcard_vcont)
7011 (remote_target::remote_parse_stop_reply)
7012 (remote_target::process_stop_reply): Pass down target.
7013 (first_remote_resumed_thread): New remote_target parameter. Pass
7014 it down.
7015 (remote_target::wait_as): Pass down target.
7016 (unpush_and_perror): New remote_target parameter. Pass it down.
7017 (remote_target::readchar, remote_target::remote_serial_write)
7018 (remote_target::getpkt_or_notif_sane_1)
7019 (remote_target::kill_new_fork_children, remote_target::kill): Pass
7020 down target.
7021 (remote_target::mourn_inferior): Pass down target. Use
7022 remote_unpush_target.
7023 (remote_target::core_of_thread)
7024 (remote_target::remote_btrace_maybe_reopen): Pass down target.
7025 (remote_target::pid_to_exec_file)
7026 (remote_target::thread_handle_to_thread_info): Pass down target.
7027 (remote_target::async_wait_fd): New.
7028 * riscv-fbsd-tdep.c: Include "inferior.h".
7029 (riscv_fbsd_get_thread_local_address): Pass down target.
7030 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
7031 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
7032 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
7033 Adjust.
7034 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
7035 * solib-svr4.c (enable_break): Pass down target.
7036 * spu-multiarch.c (parse_spufs_run): Pass down target.
7037 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
7038 * target-delegates.c: Regenerate.
7039 * target.c (g_target_stack): Delete.
7040 (current_top_target): Return the current inferior's top target.
7041 (target_has_execution_1): Refer to the passed-in inferior's top
7042 target.
7043 (target_supports_terminal_ours): Check whether the initial
7044 inferior was already created.
7045 (decref_target): New.
7046 (target_stack::push): Incref/decref the target.
7047 (push_target, push_target, unpush_target): Adjust.
7048 (target_stack::unpush): Defref target.
7049 (target_is_pushed): Return bool. Adjust to refer to the current
7050 inferior's target stack.
7051 (dispose_inferior): Delete, and inline parts ...
7052 (target_preopen): ... here. Only dispose of the current inferior.
7053 (target_detach): Hold strong target reference while detaching.
7054 Pass target down.
7055 (target_thread_name): Add assertion.
7056 (target_resume): Pass down target.
7057 (target_ops::beneath, find_target_at): Adjust to refer to the
7058 current inferior's target stack.
7059 (get_dummy_target): New.
7060 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
7061 has a thread running.
7062 (initialize_targets): Rename to ...
7063 (_initialize_target): ... this.
7064 * target.h: Include "gdbsupport/refcounted-object.h".
7065 (struct target_ops): Inherit refcounted_object.
7066 (target_ops::shortname, target_ops::longname): Make const.
7067 (target_ops::async_wait_fd): New method.
7068 (decref_target): Declare.
7069 (struct target_ops_ref_policy): New.
7070 (target_ops_ref): New typedef.
7071 (get_dummy_target): Declare function.
7072 (target_is_pushed): Return bool.
7073 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
7074 (all_matching_threads_iterator::all_matching_threads_iterator):
7075 Handle filter target.
7076 * thread-iter.h (struct all_matching_threads_iterator, struct
7077 all_matching_threads_range, class all_non_exited_threads_range):
7078 Filter by target too. Remove explicit.
7079 * thread.c (threads_executing): Delete.
7080 (inferior_thread): Pass down current inferior.
7081 (clear_thread_inferior_resources): Pass down thread pointer
7082 instead of ptid_t.
7083 (add_thread_silent, add_thread_with_info, add_thread): Add
7084 process_stratum_target parameter. Use it for thread and inferior
7085 searches.
7086 (is_current_thread): New.
7087 (thread_info::deletable): Use it.
7088 (find_thread_ptid, thread_count, in_thread_list)
7089 (thread_change_ptid, set_resumed, set_running): New
7090 process_stratum_target parameter. Pass it down.
7091 (set_executing): New process_stratum_target parameter. Pass it
7092 down. Adjust reference to 'threads_executing'.
7093 (threads_are_executing): New process_stratum_target parameter.
7094 Adjust reference to 'threads_executing'.
7095 (set_stop_requested, finish_thread_state): New
7096 process_stratum_target parameter. Pass it down.
7097 (switch_to_thread): Also match inferior.
7098 (switch_to_thread): New process_stratum_target parameter. Pass it
7099 down.
7100 (update_threads_executing): Reimplement.
7101 * top.c (quit_force): Pop targets from all inferior.
7102 (gdb_init): Don't call initialize_targets.
7103 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
7104 Declare.
7105 (windows_add_thread, windows_delete_thread): Adjust.
7106 (get_windows_debug_event): Rename to ...
7107 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
7108 * tracefile-tfile.c (tfile_target_open): Pass down target.
7109 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
7110 Forward declare.
7111 (switch_to_thread): Add process_stratum_target parameter.
7112 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
7113 parameter. Use it.
7114 (mi_on_resume): Pass target down.
7115 * nat/fork-inferior.c (startup_inferior): Add
7116 process_stratum_target parameter. Pass it down.
7117 * nat/fork-inferior.h (startup_inferior): Add
7118 process_stratum_target parameter.
7119 * python/py-threadevent.c (py_get_event_thread): Pass target down.
7120
7121 2020-01-10 Pedro Alves <palves@redhat.com>
7122
7123 * remote.c (remote_target::start_remote): Don't set inferior_ptid
7124 directly. Instead find the first thread in the thread list and
7125 use switch_to_thread.
7126
7127 2020-01-10 Pedro Alves <palves@redhat.com>
7128
7129 * remote.c (remote_target::remote_add_inferior): Don't bind a
7130 process to the current inferior if the current inferior is already
7131 bound to a process.
7132
7133 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7134 Pedro Alves <palves@redhat.com>
7135
7136 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
7137 If no process is specified, return null_ptid instead of
7138 inferior_ptid.
7139 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
7140 TARGET_WAITKIND_SIGNALLED with no pid.
7141
7142 2020-01-10 Pedro Alves <palves@redhat.com>
7143
7144 * remote.c (first_remote_resumed_thread): New.
7145 (remote_target::wait_as): Use it as default event_ptid instead of
7146 inferior_ptid.
7147
7148 2020-01-10 Pedro Alves <palves@redhat.com>
7149
7150 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
7151
7152 2020-01-10 Pedro Alves <palves@redhat.com>
7153
7154 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
7155 not -1.
7156
7157 2020-01-10 Pedro Alves <palves@redhat.com>
7158
7159 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
7160 ptid to get_last_target_status.
7161 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
7162 ptid to get_last_target_status.
7163 * infcmd.c (continue_command): Don't pass a target_waitstatus to
7164 get_last_target_status.
7165 (info_program_command): Don't pass a target_waitstatus to
7166 get_last_target_status.
7167 * infrun.c (init_wait_for_inferior): Use
7168 nullify_last_target_wait_ptid.
7169 (get_last_target_status): Handle nullptr arguments.
7170 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
7171 (print_stop_event): Don't pass a ptid to get_last_target_status.
7172 (normal_stop): Don't pass a ptid to get_last_target_status.
7173 * infrun.h (get_last_target_status, set_last_target_status): Move
7174 comments here and update.
7175 (nullify_last_target_wait_ptid): Declare.
7176 * linux-fork.c (fork_load_infrun_state): Remove local extern
7177 declaration of nullify_last_target_wait_ptid.
7178 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
7179 to get_last_target_status.
7180
7181 2020-01-10 Pedro Alves <palves@redhat.com>
7182
7183 * gdbthread.h (scoped_restore_current_thread)
7184 <dont_restore, restore, m_dont_restore>: Declare.
7185 * thread.c (thread_alive): Add assertion. Return bool.
7186 (switch_to_thread_if_alive): New.
7187 (prune_threads): Switch inferior/thread.
7188 (print_thread_info_1): Switch thread before calling target methods.
7189 (scoped_restore_current_thread::restore): New, factored out from
7190 ...
7191 (scoped_restore_current_thread::~scoped_restore_current_thread):
7192 ... this.
7193 (scoped_restore_current_thread::scoped_restore_current_thread):
7194 Add assertion.
7195 (thread_apply_all_command, thread_select): Use
7196 switch_to_thread_if_alive.
7197 * infrun.c (proceed, restart_threads, handle_signal_stop)
7198 (switch_back_to_stepped_thread): Switch current thread before
7199 calling target methods.
7200
7201 2020-01-10 Pedro Alves <palves@redhat.com>
7202
7203 * inferior.c (switch_to_inferior_no_thread): New function,
7204 factored out from ...
7205 (inferior_command): ... here.
7206 * inferior.h (switch_to_inferior_no_thread): Declare.
7207 * mi/mi-main.c (run_one_inferior): Use
7208 switch_to_inferior_no_thread.
7209
7210 2020-01-10 Pedro Alves <palves@redhat.com>
7211
7212 * infcmd.c (kill_command): Remove dead code.
7213
7214 2020-01-10 Pedro Alves <palves@redhat.com>
7215
7216 * remote.c (remote_target::mourn_inferior): No longer check
7217 whether the target is running.
7218
7219 2020-01-10 Pedro Alves <palves@redhat.com>
7220
7221 * corelow.c (core_target::has_execution): Change parameter type to
7222 inferior pointer.
7223 * inferior.c (number_of_live_inferiors): Use
7224 inferior::has_execution instead of target_has_execution_1.
7225 * inferior.h (inferior::has_execution): New.
7226 * linux-thread-db.c (thread_db_target::update_thread_list): Use
7227 inferior::has_execution instead of target_has_execution_1.
7228 * process-stratum-target.c
7229 (process_stratum_target::has_execution): Change parameter type to
7230 inferior pointer. Check the inferior's PID instead of
7231 inferior_ptid.
7232 * process-stratum-target.h
7233 (process_stratum_target::has_execution): Change parameter type to
7234 inferior pointer.
7235 * record-full.c (record_full_core_target::has_execution): Change
7236 parameter type to inferior pointer.
7237 * target.c (target_has_execution_1): Change parameter type to
7238 inferior pointer.
7239 (target_has_execution_current): Adjust.
7240 * target.h (target_ops::has_execution): Change parameter type to
7241 inferior pointer.
7242 (target_has_execution_1): Change parameter type to inferior
7243 pointer. Change return type to bool.
7244 * tracefile.h (tracefile_target::has_execution): Change parameter
7245 type to inferior pointer.
7246
7247 2020-01-10 Pedro Alves <palves@redhat.com>
7248
7249 * exceptions.c (print_flush): Remove current_top_target() check.
7250
7251 2020-01-10 Pedro Alves <palves@redhat.com>
7252
7253 * remote.c (show_remote_exec_file): Show the current inferior's
7254 exec-file instead of the command variable's value.
7255
7256 2020-01-10 Pedro Alves <palves@redhat.com>
7257
7258 * record-full.c (record_full_resume_ptid): New global.
7259 (record_full_target::resume): Set it.
7260 (record_full_wait_1): Use record_full_resume_ptid instead of
7261 inferior_ptid.
7262
7263 2020-01-10 Pedro Alves <palves@redhat.com>
7264
7265 * gdbthread.h (scoped_restore_current_thread)
7266 <dont_restore, restore, m_dont_restore>: Declare.
7267 * thread.c (thread_alive): Add assertion. Return bool.
7268 (switch_to_thread_if_alive): New.
7269 (prune_threads): Switch inferior/thread.
7270 (print_thread_info_1): Switch thread before calling target methods.
7271 (scoped_restore_current_thread::restore): New, factored out from
7272 ...
7273 (scoped_restore_current_thread::~scoped_restore_current_thread):
7274 ... this.
7275 (scoped_restore_current_thread::scoped_restore_current_thread):
7276 Add assertion.
7277 (thread_apply_all_command, thread_select): Use
7278 switch_to_thread_if_alive.
7279
7280 2020-01-10 George Barrett <bob@bob131.so>
7281
7282 * stap-probe.c (stap_modify_semaphore): Don't check for null
7283 semaphores.
7284 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
7285 for null semaphores.
7286
7287 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
7288
7289 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
7290 all source windows, and maintain horizontal scroll status while
7291 doing so.
7292
7293 2020-01-09 Tom Tromey <tom@tromey.com>
7294
7295 PR tui/18932:
7296 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
7297 update_source_window, not print_source_lines.
7298
7299 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
7300
7301 * tui/tui.c (tui_enable): Register tui hooks after calling
7302 tui_display_main.
7303
7304 2020-01-09 Christian Biesinger <cbiesinger@google.com>
7305
7306 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
7307
7308 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
7309
7310 * thread.c (print_thread_info_1): Fix indentation.
7311
7312 2020-01-09 Christian Biesinger <cbiesinger@google.com>
7313
7314 * symtab.c (general_symbol_info::compute_and_set_names): Move the
7315 unique_xmalloc_ptr outside the if to always free the demangled name.
7316
7317 2020-01-08 Tom Tromey <tromey@adacore.com>
7318
7319 * xcoffread.c (enter_line_range, read_xcoff_symtab)
7320 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
7321 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
7322 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
7323 Remove.
7324 (section_offsets): New typedef.
7325 * symtab.c (fixup_section, get_msymbol_address): Update.
7326 * symmisc.c (dump_msymbols): Update.
7327 * symfile.h (relative_addr_info_to_section_offsets)
7328 (symfile_map_offsets_to_segments): Update.
7329 * symfile.c (build_section_addr_info_from_objfile)
7330 (init_objfile_sect_indices): Update.
7331 (struct place_section_arg): Change type of "offsets".
7332 (place_section): Update.
7333 (relative_addr_info_to_section_offsets): Change type of
7334 "section_offsets". Remove "num_sections" parameter.
7335 (default_symfile_offsets, syms_from_objfile_1)
7336 (set_objfile_default_section_offset): Update.
7337 (reread_symbols): No need to preserve section offsets by hand.
7338 (symfile_map_offsets_to_segments): Change type of "offsets".
7339 * stap-probe.c (relocate_address): Update.
7340 * stabsread.h (process_one_symbol): Update.
7341 * solib-target.c (struct lm_info_target) <offsets>: Change type.
7342 (solib_target_relocate_section_addresses): Update.
7343 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
7344 Update.
7345 * solib-frv.c (frv_relocate_main_executable): Update.
7346 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
7347 * solib-aix.c (solib_aix_get_section_offsets): Change return
7348 type.
7349 (solib_aix_solib_create_inferior_hook): Update.
7350 * remote.c (remote_target::get_offsets): Update.
7351 * psymtab.c (find_pc_sect_psymtab): Update.
7352 * psympriv.h (struct partial_symbol) <address, text_low,
7353 text_high>: Update.
7354 * objfiles.h (obj_section_offset): Update.
7355 (struct objfile) <section_offsets>: Change type.
7356 <num_sections>: Remove.
7357 (objfile_relocate): Update.
7358 * objfiles.c (entry_point_address_query): Update
7359 (relocate_one_symbol): Change type of "section_offsets".
7360 (objfile_relocate1, objfile_relocate1): Change type of
7361 "new_offsets".
7362 (objfile_rebase1): Update.
7363 * mipsread.c (mipscoff_symfile_read): Update.
7364 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
7365 parameter.
7366 * mdebugread.c (parse_symbol): Change type of "section_offsets".
7367 (parse_external, psymtab_to_symtab_1): Update.
7368 * machoread.c (macho_symfile_offsets): Update.
7369 * ia64-tdep.c (ia64_find_unwind_table): Update.
7370 * hppa-tdep.c (read_unwind_info): Update.
7371 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
7372 * dwarf2read.c (create_addrmap_from_index)
7373 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
7374 (process_psymtab_comp_unit_reader, add_partial_symbol)
7375 (add_partial_subprogram, process_full_comp_unit)
7376 (read_file_scope, read_func_scope, read_lexical_block_scope)
7377 (read_call_site_scope, dwarf2_rnglists_process)
7378 (dwarf2_ranges_process, dwarf2_ranges_read)
7379 (dwarf_decode_lines_1, var_decode_location, new_symbol)
7380 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
7381 Update.
7382 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
7383 Update.
7384 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
7385 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
7386 (process_one_symbol): Change type of "section_offsets".
7387 * ctfread.c (get_objfile_text_range): Update.
7388 * coffread.c (coff_symtab_read, enter_linenos)
7389 (process_coff_symbol): Update.
7390 * coff-pe-read.c (add_pe_forwarded_sym): Update.
7391 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
7392
7393 2020-01-08 Tom Tromey <tromey@adacore.com>
7394
7395 * dwarf2read.c (parse_macro_definition): Use std::string.
7396 (parse_macro_definition): Likewise.
7397
7398 2020-01-08 Tom Tromey <tromey@adacore.com>
7399
7400 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
7401 (ATTR_ALLOC_CHUNK): Remove.
7402
7403 2020-01-08 Tom Tromey <tromey@adacore.com>
7404
7405 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
7406
7407 2020-01-08 Tom Tromey <tromey@adacore.com>
7408
7409 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
7410 (dwarf2_compute_name, open_dwo_file): Likewise.
7411 (process_enumeration_scope): Use std::vector.
7412 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
7413 (partial_die_info::fixup, dwarf2_start_subfile)
7414 (guess_full_die_structure_name, dwarf2_name): Likewise.
7415 (determine_prefix): Update.
7416 (guess_full_die_structure_name): Make return type const.
7417 (partial_die_full_name): Return unique_xmalloc_ptr.
7418 (DW_FIELD_ALLOC_CHUNK): Remove.
7419
7420 2020-01-07 Tom Tromey <tromey@adacore.com>
7421
7422 PR build/24937:
7423 * stap-probe.c (class stap_static_probe_ops): Add constructor.
7424
7425 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
7426
7427 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
7428
7429 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
7430
7431 * stack.c (print_frame_info): Move disassemble_next_line code
7432 inside source_print block.
7433
7434 2020-01-06 Eli Zaretskii <eliz@gnu.org>
7435
7436 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
7437 gdb/signals.h, as we are now using native signal symbols.
7438
7439 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
7440
7441 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
7442 overflow by an early check of content vs threshold.
7443 * tui/tui-source.c (tui_source_window::line_is_displayed):
7444 Likewise.
7445
7446 2020-01-06 Eli Zaretskii <eliz@gnu.org>
7447
7448 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
7449
7450 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
7451
7452 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
7453 export table if no section contains it's RVA.
7454
7455 2020-01-06 Eli Zaretskii <eliz@gnu.org>
7456
7457 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
7458
7459 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
7460
7461 * source.c (print_source_lines_base): Set last_line_listed.
7462
7463 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
7464
7465 * tui/tui-disasm.c: Remove trailing spaces.
7466
7467 2020-01-06 Eli Zaretskii <eliz@gnu.org>
7468 Pedro Alves <palves@redhat.com>
7469
7470 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
7471 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
7472 (windows_gdb_signal_to_target): New function, uses the above
7473 enumeration to convert GDB internal signal codes to equivalent
7474 Windows codes.
7475 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
7476 * windows-nat.c: Include "gdb_wait.h".
7477 (get_windows_debug_event): Extract the fatal exception from the
7478 exit status and convert to the equivalent Posix signal number.
7479 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
7480 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
7481 * gdbsupport/gdb_wait.c: New file, implements
7482 windows_status_to_termsig.
7483 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
7484 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
7485
7486 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
7487
7488 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
7489 show_layout.
7490
7491 2020-01-05 Luis Machado <luis.machado@linaro.org>
7492
7493 * aarch64-linux-nat.c
7494 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
7495 and bfd_mach_aarch64.
7496
7497 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7498
7499 * ui-file.c (stdio_file::can_emit_style_escape)
7500 (tee_file::can_emit_style_escape): Ensure style is used also on
7501 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
7502 to gdb_stdout.
7503 * main.c (set_gdb_data_directory): Use file style to output the
7504 warning that the given pathname is not a directory.
7505 * top.c (show_history_filename, gdb_safe_append_history)
7506 (show_gdb_datadir): Use file style.
7507
7508 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
7509
7510 * solib-target.c (struct lm_info_target):
7511 Change offsets to be a unique_xmalloc_ptr.
7512 (solib_target_relocate_section_addresses): Update.
7513
7514 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
7515
7516 * windows-nat.c (windows_clear_solib): Free so_list linked list.
7517
7518 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
7519
7520 * MAINTAINERS (Write After Approval): Add myself.
7521
7522 2020-01-02 Luis Machado <luis.machado@linaro.org>
7523
7524 * proc-service.c (get_ps_regcache): Remove reference to obsolete
7525 Cell BE architecture.
7526 * target.h (struct target_ops) <thread_architecture>: Likewise.
7527
7528 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
7529
7530 * Makefile.in: Use INSTALL_PROGRAM_ENV.
7531
7532 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
7533
7534 * MAINTAINERS (Write After Approval): Add myself.
7535
7536 2020-01-01 Joel Brobecker <brobecker@adacore.com>
7537
7538 * gdbarch.sh: Update copyright year range of generated files.
7539
7540 2020-01-01 Joel Brobecker <brobecker@adacore.com>
7541
7542 Update copyright year range in all GDB files.
7543
7544 2020-01-01 Joel Brobecker <brobecker@adacore.com>
7545
7546 * copyright.py: Convert to Python 3.
7547
7548 2020-01-01 Joel Brobecker <brobecker@adacore.com>
7549
7550 * copyright.py: Adapt after move of gnulib directory from gdb
7551 directory to toplevel directory.
7552
7553 2020-01-01 Joel Brobecker <brobecker@adacore.com>
7554
7555 * copyright.py (main): Exit if run from the wrong directory.
7556
7557 2020-01-01 Joel Brobecker <brobecker@adacore.com>
7558
7559 * top.c (print_gdb_version): Change copyright year to 2020.
7560
7561 2020-01-01 Joel Brobecker <brobecker@adacore.com>
7562
7563 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
7564
7565 For older changes see ChangeLog-2019.
7566 \f
7567 Local Variables:
7568 mode: change-log
7569 left-margin: 8
7570 fill-column: 74
7571 version-control: never
7572 coding: utf-8
7573 End:
This page took 0.178115 seconds and 5 git commands to generate.