DWARFv5: Info address command error in gdb with DWARFfv5.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
2
3 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
4 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
5 with DW_LLE_base_addressx are being emitted in DWARFv5.
6 Add the newly added kind DW_LOC_OFFSET_PAIR also.
7 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
8 unsigned integer.
9
10 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
11
12 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
13 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
14 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
15 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
16 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
17 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
18 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
19
20
21 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
22
23 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
24 (read_loclist_index): New function definition.
25 (lookup_loclist_base): New function definition.
26 (read_loclist_header): New function definition.
27 (dwarf2_cu): Add loclist_base and loclist_header field.
28 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
29 (read_full_die_1): Read the value of DW_AT_loclists_base.
30 (read_attribute_reprocess): Handle DW_FORM_loclistx.
31 (read_attribute_value): Handle DW_FORM_loclistx.
32 (skip_one_die): Handle DW_FORM_loclistx.
33 (loclist_header): New structure declaration.
34 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
35
36 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
37
38 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
39 constructor. Remove `addr` parameter from other constructor and
40 add `per_cu` parameter.
41 * dwarf2/read.c (create_partial_symtab): Update.
42
43 2020-04-07 Tom de Vries <tdevries@suse.de>
44
45 PR symtab/25796
46 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
47 (partial_die_info::fixup): Inherit has_const_value.
48
49 2020-04-07 Tom de Vries <tdevries@suse.de>
50
51 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
52 symbols without address.
53
54 2020-04-06 Kamil Rytarowski <n54@gmx.com>
55
56 * nbsd-nat.h (struct thread_info): Add forward declaration.
57 (nbsd_nat_target::thread_alive): Add.
58 (nbsd_nat_target::thread_name): Likewise.
59 (nbsd_nat_target::update_thread_list): Likewise.
60 (update_thread_list::post_attach): Likewise.
61 (post_attach::pid_to_str): Likewise.
62 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
63 (nbsd_thread_lister): Add.
64 (nbsd_nat_target::thread_alive): Likewise.
65 (nbsd_nat_target::thread_name): Likewise.
66 (nbsd_add_threads): Likewise.
67 (update_thread_list::post_attach): Likewise.
68 (nbsd_nat_target::update_thread_list): Likewise.
69 (post_attach::pid_to_str): Likewise.
70
71 2020-04-06 Tom Tromey <tromey@adacore.com>
72
73 * ada-valprint.c (print_variant_part): Extract the variant field.
74 (print_field_values): Use the field as the outer value when
75 recursing.
76
77 2020-04-06 Tom Tromey <tromey@adacore.com>
78
79 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
80 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
81 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
82 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
83 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
84
85 2020-04-06 Tom Tromey <tromey@adacore.com>
86
87 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
88 TYPE_CODE_ERROR.
89
90 2020-04-06 Kamil Rytarowski <n54@gmx.com>
91
92 * nbsd-tdep.c: Include "gdbarch.h".
93 Define enum with NetBSD signal numbers.
94 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
95 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
96 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
97 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
98 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
99 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
100 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
101 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
102 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
103 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
104 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
105 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
106
107 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
108
109 PR gdb/25325
110 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
111
112 2020-04-03 Tom Tromey <tromey@adacore.com>
113
114 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
115 Read constant block.
116
117 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
118
119 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
120 (gdb_bfd_get_full_section_contents): New declaration.
121 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
122 * windows-tdep.c (is_linked_with_cygwin_dll): Use
123 gdb_bfd_get_full_section_contents.
124
125 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
126
127 * exec.c (build_section_table): Replace internal_error with
128 gdb_assert.
129 (section_table_xfer_memory_partial): Likewise.
130 * mdebugread.c (parse_partial_symbols): Likewise.
131 * psymtab.c (lookup_partial_symbol): Likewise.
132 * utils.c (wrap_here): Likewise.
133
134 2020-04-02 Tom Tromey <tromey@adacore.com>
135
136 * f-lang.c (build_fortran_types): Use arch_type to initialize
137 builtin_complex_s32 in the TYPE_CODE_ERROR case.
138
139 2020-04-02 Tom Tromey <tromey@adacore.com>
140
141 * dwarf2/read.c (partial_die_info::read): Do not create a vector
142 of attributes.
143
144 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
145 Bernd Edlinger <bernd.edlinger@hotmail.de>
146 Tom Tromey <tromey@adacore.com>
147
148 * buildsym.c (buildsym_compunit::record_line): Remove
149 deduplication code.
150
151 2020-04-02 Tom de Vries <tdevries@suse.de>
152
153 PR ada/24671
154 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
155
156 2020-04-02 Tom de Vries <tdevries@suse.de>
157
158 * dwarf2/read.c (dwarf2_gdb_index_functions,
159 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
160 NULL.
161 * psymtab.c (psym_lookup_global_symbol_language): New function.
162 (psym_functions): Init psym_lookup_global_symbol_language with
163 psym_lookup_global_symbol_language.
164 * symfile-debug.c (debug_sym_quick_functions): Init
165 lookup_global_symbol_language with NULL.
166 * symfile.c (set_initial_language): Remove fixme comment.
167 * symfile.h (struct quick_symbol_functions): Add
168 lookup_global_symbol_language.
169 * symtab.c (find_quick_global_symbol_language): New function.
170 (find_main_name): Use find_quick_global_symbol_language.
171
172 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
173
174 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
175
176 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
177
178 * buildsym.c (record_line): Fix undefined behavior and preserve
179 lines at eof.
180
181 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
182
183 * buildsym.c (record_line): Fix the resizing condition.
184
185 2020-04-01 Tom Tromey <tom@tromey.com>
186
187 * value.h (value_literal_complex): Add comment.
188 * valops.c (value_literal_complex): Refer to value.h.
189
190 2020-04-01 Tom Tromey <tom@tromey.com>
191
192 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
193 (scalar_type): New rule, from typebase.
194 (typebase): Use scalar_type. Recognize complex types.
195 (field_name): Handle FLOAT_KEYWORD.
196 (ident_tokens): Add _Complex and __complex__.
197
198 2020-04-01 Tom Tromey <tom@tromey.com>
199
200 PR exp/25299:
201 * valarith.c (promotion_type, complex_binop): New functions.
202 (scalar_binop): Handle complex numbers. Use promotion_type.
203 (value_pos, value_neg, value_complement): Handle complex numbers.
204
205 2020-04-01 Tom Tromey <tom@tromey.com>
206
207 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
208 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
209 (parse_number): Handle complex numbers.
210
211 2020-04-01 Tom Tromey <tom@tromey.com>
212
213 * c-valprint.c (c_decorations): Change complex suffix to "i".
214
215 2020-04-01 Tom Tromey <tom@tromey.com>
216
217 * valprint.c (generic_value_print_complex): Use accessors.
218 * value.h (value_real_part, value_imaginary_part): Declare.
219 * valops.c (value_real_part, value_imaginary_part): New
220 functions.
221 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
222
223 2020-04-01 Tom Tromey <tom@tromey.com>
224
225 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
226 (read_range_type): Update.
227 * mdebugread.c (basic_type): Update.
228 * go-lang.c (build_go_types): Use init_complex_type.
229 * gdbtypes.h (struct main_type) <complex_type>: New member.
230 (init_complex_type): Update.
231 (arch_complex_type): Don't declare.
232 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
233 Make name if none given. Use alloc_type_copy. Look for cached
234 complex type.
235 (arch_complex_type): Remove.
236 (gdbtypes_post_init): Use init_complex_type.
237 * f-lang.c (build_fortran_types): Use init_complex_type.
238 * dwarf2/read.c (read_base_type): Update.
239 * d-lang.c (build_d_types): Use init_complex_type.
240 * ctfread.c (read_base_type): Update.
241
242 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
243
244 * infrun.c (stop_all_threads): Update assertion, plus when
245 stopping threads, take into account that we might be trying
246 to stop an all-stop target.
247 (stop_waiting): Call 'stop_all_threads' if there exists a
248 non-stop target.
249
250 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
251
252 * target.h (exists_non_stop_target): New function declaration.
253 * target.c (exists_non_stop_target): New function.
254
255 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
256
257 PR gdb/24789
258 * eval.c (is_integral_or_integral_reference): New function.
259 (evaluate_subexp_standard): Allow integer references in
260 pointer arithmetic.
261
262 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
263
264 * remote.c (remote_target::remote_parse_stop_reply): Remove the
265 check for no ptid in the stop reply when the target is non-stop.
266
267 2020-04-01 Tom Tromey <tromey@adacore.com>
268
269 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
270 "name" parameter to rvalue reference. Initialize m_name_holder.
271 <lookup_name_info>: New overloads.
272 <name>: Return gdb::string_view.
273 <c_str>: New method.
274 <make_ignore_params>: Update.
275 <search_name_hash>: Update.
276 <language_lookup_name>: Return const char *.
277 <m_name>: Change type.
278 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
279 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
280 (lookup_name_info::match_any): Update.
281 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
282 Update.
283 * minsyms.c (linkage_name_str): Update.
284 * language.c (default_symbol_name_matcher): Update.
285 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
286 Update.
287 * ada-lang.c (ada_fold_name): Change parameter to string_view.
288 (ada_lookup_name_info::ada_lookup_name_info): Update.
289 (literal_symbol_name_matcher): Update.
290
291 2020-04-01 Tom Tromey <tromey@adacore.com>
292
293 * psymtab.c (psymtab_search_name): Remove function.
294 (psym_lookup_symbol): Create search name and lookup name here.
295 (lookup_partial_symbol): Remove "name" parameter; add
296 lookup_name.
297 (psym_expand_symtabs_for_function): Update.
298
299 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
300
301 PR tui/25597:
302 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
303
304 2020-03-31 Tom Tromey <tromey@adacore.com>
305
306 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
307 memcpy.
308
309 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
310
311 * features/riscv/32bit-csr.xml: Regenerated.
312 * features/riscv/64bit-csr.xml: Regenerated.
313
314 2020-03-30 Tom Tromey <tromey@adacore.com>
315
316 * ada-valprint.c (print_variant_part): Update.
317 * ada-lang.h (ada_which_variant_applies): Update.
318 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
319 outer_valaddr parameters; replace with "outer" value parameter.
320 (to_fixed_variant_branch_type): Update.
321
322 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
323
324 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
325 <list>. Remove inclusion of observable.h.
326 (PPC_DEBUG_CURRENT_VERSION): Move up define.
327 (struct arch_lwp_info): New struct.
328 (class ppc_linux_dreg_interface): New class.
329 (struct ppc_linux_process_info): New struct.
330 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
331 <low_new_clone, low_forget_process, low_prepare_to_resume>
332 <copy_thread_dreg_state, mark_thread_stale>
333 <mark_debug_registers_changed, register_hw_breakpoint>
334 <clear_hw_breakpoint, register_wp, clear_wp>
335 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
336 <num_memory_accesses, get_trigger_type>
337 <create_watchpoint_request, hwdebug_point_cmp>
338 <init_arch_lwp_info, get_arch_lwp_info>
339 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
340 methods.
341 <struct ptid_hash>: New inner struct.
342 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
343 members.
344 (saved_dabr_value, hwdebug_info, max_slots_number)
345 (struct hw_break_tuple, struct thread_points, ppc_threads)
346 (have_ptrace_hwdebug_interface)
347 (hwdebug_find_thread_points_by_tid)
348 (hwdebug_insert_point, hwdebug_remove_point): Remove.
349 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
350 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
351 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
352 use m_dreg_interface.
353 (hwdebug_point_cmp): Change to...
354 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
355 reference arguments instead of pointers.
356 (ppc_linux_nat_target::ranged_break_num_registers): Use
357 m_dreg_interface.
358 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
359 m_dreg_interface. Call register_hw_breakpoint.
360 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
361 m_dreg_interface. Call clear_hw_breakpoint.
362 (get_trigger_type): Change to...
363 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
364 comment.
365 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
366 use m_dreg_interface. Call register_hw_breakpoint.
367 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
368 use m_dreg_interface. Call clear_hw_breakpoint.
369 (can_use_watchpoint_cond_accel): Change to...
370 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
371 method. Update comment, use m_dreg_interface and
372 m_process_info.
373 (calculate_dvc): Change to...
374 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
375 m_dreg_interface.
376 (num_memory_accesses): Change to...
377 (ppc_linux_nat_target::num_memory_accesses): ...this method.
378 (check_condition): Change to...
379 (ppc_linux_nat_target::check_condition): ...this method.
380 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
381 comment, use m_dreg_interface.
382 (create_watchpoint_request): Change to...
383 (ppc_linux_nat_target::create_watchpoint_request): ...this
384 method. Use m_dreg_interface.
385 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
386 m_dreg_interface. Call register_hw_breakpoint or register_wp.
387 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
388 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
389 (ppc_linux_nat_target::low_forget_process)
390 (ppc_linux_nat_target::low_new_fork)
391 (ppc_linux_nat_target::low_new_clone)
392 (ppc_linux_nat_target::low_delete_thread)
393 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
394 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
395 only call mark_thread_stale.
396 (ppc_linux_thread_exit): Remove.
397 (ppc_linux_nat_target::stopped_data_address): Change to...
398 (ppc_linux_nat_target::low_stopped_data_address): This. Add
399 comment, use m_dreg_interface and m_thread_hw_breakpoints.
400 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
401 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
402 comment. Call low_stopped_data_address.
403 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
404 m_dreg_interface.
405 (ppc_linux_nat_target::masked_watch_num_registers): Use
406 m_dreg_interface.
407 (ppc_linux_nat_target::copy_thread_dreg_state)
408 (ppc_linux_nat_target::mark_thread_stale)
409 (ppc_linux_nat_target::mark_debug_registers_changed)
410 (ppc_linux_nat_target::register_hw_breakpoint)
411 (ppc_linux_nat_target::clear_hw_breakpoint)
412 (ppc_linux_nat_target::register_wp)
413 (ppc_linux_nat_target::clear_wp)
414 (ppc_linux_nat_target::init_arch_lwp_info)
415 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
416 (_initialize_ppc_linux_nat): Remove observer callback.
417
418 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
419
420 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
421 (ppc_linux_nat_target::auxv_parse)
422 (ppc_linux_nat_target::read_description)
423 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
424 Move up.
425
426 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
427
428 * linux-nat.h (low_new_clone): New method.
429 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
430
431 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
432
433 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
434 (dbx_expand_psymtab): ... this.
435 (start_psymtab): Update.
436 * mdebugread.c (psymtab_to_symtab_1): Rename to...
437 (mdebug_expand_psymtab): ... this.
438 (parse_partial_symbols): Update.
439 (new_psymtab): Update.
440 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
441 (xcoff_expand_psymtab): ... this.
442 (xcoff_start_psymtab): Update.
443
444 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
445
446 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
447 <expand_dependencies>: ... this.
448 * psymtab.c (partial_symtab::read_dependencies): Rename to...
449 (partial_symtab::expand_dependencies): ... this.
450 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
451 Update.
452 (dwarf2_psymtab::expand_psymtab): Update.
453 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
454 * mdebugread.c (psymtab_to_symtab_1): Update.
455 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
456
457 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
458
459 * psympriv.h (discard_psymtab): Remove.
460 * dbxread.c (dbx_end_psymtab): Update.
461 * xcoffread.c (xcoff_end_psymtab): Update.
462
463 2020-03-28 Tom Tromey <tom@tromey.com>
464
465 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
466 comment.
467
468 2020-03-28 Tom Tromey <tom@tromey.com>
469
470 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
471
472 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
473
474 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
475
476 2020-03-26 John Baldwin <jhb@FreeBSD.org>
477
478 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
479
480 2020-03-26 Tom Tromey <tom@tromey.com>
481
482 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
483 (mark_common_block_symbol_computed, read_tag_string_type)
484 (attr_to_dynamic_prop, read_subrange_type): Update.
485 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
486 to be methods on struct attribute.
487 (skip_one_die, process_imported_unit_die, read_namespace_alias)
488 (read_call_site_scope, partial_die_info::read)
489 (partial_die_info::read, lookup_die_type, follow_die_ref):
490 Update.
491 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
492 from dwarf2_get_ref_die_offset.
493 (attribute::constant_value): New method, from
494 dwarf2_get_attr_constant_value.
495 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
496 Declare method.
497 <constant_value>: New method.
498
499 2020-03-26 Tom Tromey <tom@tromey.com>
500
501 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
502 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
503 (dwarf_type_encoding_name): Move to stringify.c.
504 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
505 * dwarf2/stringify.c: New file.
506 * dwarf2/stringify.h: New file.
507
508 2020-03-26 Tom Tromey <tom@tromey.com>
509
510 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
511 Rewrite.
512
513 2020-03-26 Tom Tromey <tom@tromey.com>
514
515 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
516 methods.
517 * dwarf2/read.c (lookup_addr_base): Move to die.h.
518 (lookup_ranges_base): Likewise.
519 (read_cutu_die_from_dwo, read_full_die_1): Update.
520
521 2020-03-26 Tom Tromey <tom@tromey.com>
522
523 * dwarf2/read.c (read_import_statement, read_file_scope)
524 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
525 (read_lexical_block_scope, read_call_site_scope)
526 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
527 (handle_struct_member_die, process_structure_scope)
528 (update_enumeration_type_from_children)
529 (process_enumeration_scope, read_array_type, read_common_block)
530 (read_namespace, read_module, read_subroutine_type): Update.
531 (sibling_die): Remove.
532
533 2020-03-26 Tom Tromey <tom@tromey.com>
534
535 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
536 (build_type_psymtabs_reader, read_structure_type)
537 (read_enumeration_type, read_full_die_1): Update.
538 (dwarf2_attr_no_follow): Move to die.h.
539 * dwarf2/die.h (struct die_info) <attr>: New method.
540
541 2020-03-26 Tom Tromey <tom@tromey.com>
542
543 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
544 <base_address>: Now an optional.
545 (dwarf2_find_base_address, dwarf2_rnglists_process)
546 (dwarf2_ranges_process, fill_in_loclist_baton)
547 (dwarf2_symbol_mark_computed): Update.
548
549 2020-03-26 Tom Tromey <tom@tromey.com>
550
551 * dwarf2/read.c (struct die_info): Move to die.h.
552 * dwarf2/die.h: New file.
553
554 2020-03-26 Tom Tromey <tom@tromey.com>
555
556 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
557 * dwarf2/read.c
558 (dwarf2_statement_list_fits_in_line_number_section_complaint):
559 Move to line-header.c.
560 (read_checked_initial_length_and_offset, read_formatted_entries):
561 Likewise.
562 (dwarf_decode_line_header): Split into two.
563 * dwarf2/line-header.c
564 (dwarf2_statement_list_fits_in_line_number_section_complaint):
565 Move from read.c.
566 (read_checked_initial_length_and_offset, read_formatted_entries):
567 Likewise.
568 (dwarf_decode_line_header): New function, split from read.c.
569
570 2020-03-26 Tom Tromey <tom@tromey.com>
571
572 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
573 Declare method.
574 * dwarf2/read.c (read_attribute_value): Update.
575 (dwarf2_per_objfile::read_line_string): Rename from
576 read_indirect_line_string.
577 (read_formatted_entries): Update.
578
579 2020-03-26 Tom Tromey <tom@tromey.com>
580
581 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
582 variable.
583
584 2020-03-26 Tom Tromey <tom@tromey.com>
585
586 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
587 const.
588 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
589 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
590 parameter const.
591
592 2020-03-26 Tom Tromey <tom@tromey.com>
593
594 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
595 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
596 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
597 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
598
599 2020-03-26 Tom Tromey <tom@tromey.com>
600
601 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
602 file_names_size, file_full_name, file_file_name>: Use const.
603 <file_name_at, file_names>: Add const overload.
604 * dwarf2/line-header.c (line_header::file_file_name)
605 (line_header::file_full_name): Update.
606
607 2020-03-26 Tom Tromey <tom@tromey.com>
608
609 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
610 (macro_start_file, consume_improper_spaces)
611 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
612 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
613 (dwarf_decode_macros): Move to macro.c.
614 * dwarf2/macro.c: New file.
615 * dwarf2/macro.h: New file.
616 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
617
618 2020-03-26 Tom Tromey <tom@tromey.com>
619
620 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
621 method.
622 * dwarf2/section.c: New method. From
623 read_indirect_string_at_offset_from.
624 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
625 (read_indirect_string_at_offset_from): Move to section.c.
626 (read_indirect_string_at_offset): Rewrite.
627 (read_indirect_line_string_at_offset): Remove.
628 (read_indirect_string, read_indirect_line_string)
629 (dwarf_decode_macro_bytes): Update.
630
631 2020-03-26 Tom Tromey <tom@tromey.com>
632
633 * dwarf2/section.h (struct dwarf2_section_info)
634 <overload_complaint>: Declare.
635 (dwarf2_section_buffer_overflow_complaint): Don't declare.
636 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
637 Rename from dwarf2_section_buffer_overflow_complaint.
638 * dwarf2/read.c (skip_one_die, partial_die_info::read)
639 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
640
641 2020-03-26 Tom Tromey <tom@tromey.com>
642
643 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
644 Declare.
645 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
646 Move from read.c.
647 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
648 to section.c.
649
650 2020-03-26 Tom Tromey <tom@tromey.com>
651
652 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
653
654 2020-03-26 Tom Tromey <tom@tromey.com>
655
656 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
657 "builder".
658 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
659 parameter.
660 (dwarf_decode_macros): Update.
661
662 2020-03-26 Tom Tromey <tom@tromey.com>
663
664 * dwarf2/read.c (read_attribute_value): Update.
665 (read_indirect_string_from_dwz): Move to dwz.c; change into
666 method.
667 (dwarf_decode_macro_bytes): Update.
668 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
669 * dwarf2/dwz.c: New file.
670 * Makefile.in (COMMON_SFILES): Add dwz.c.
671
672 2020-03-26 Tom Tromey <tom@tromey.com>
673
674 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
675 * dwarf2/read.c: Add include.
676 * dwarf2/index-write.c: Add include.
677 * dwarf2/index-cache.c: Add include.
678 * dwarf2/dwz.h: New file.
679
680 2020-03-25 Tom Tromey <tom@tromey.com>
681
682 * compile/compile-object-load.c (get_out_value_type): Mention
683 correct symbol name in error message.
684
685 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
686
687 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
688
689 2020-03-25 Tom de Vries <tdevries@suse.de>
690
691 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
692 * symmisc.c (dump_symtab_1): Print user and includes fields.
693 (maintenance_info_symtabs): Same.
694
695 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
696
697 PR gdb/25534
698 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
699 (riscv_regcache_cooked_write): New function.
700 (riscv_push_dummy_call): Use new function.
701 (riscv_return_value): Likewise.
702
703 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
704
705 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
706 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
707 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
708 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
709 * infrun.c (follow_fork): Likewise.
710 (follow_fork_inferior): Likewise.
711 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
712 * linux-nat.h (class linux_nat_target): Likewise.
713 * remote.c (class remote_target) <follow_fork>: Likewise.
714 (remote_target::follow_fork): Likewise.
715 * target-delegates.c: Re-generate.
716 * target.c (default_follow_fork): Likewise.
717 (target_follow_fork): Likewise.
718 * target.h (struct target_ops) <follow_fork>: Likewise.
719 (target_follow_fork): Likewise.
720
721 2020-03-24 Tom de Vries <tdevries@suse.de>
722
723 * psymtab.c (maintenance_info_psymtabs): Print user field.
724
725 2020-03-20 Tom Tromey <tromey@adacore.com>
726
727 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
728 const.
729 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
730 const.
731
732 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
733
734 * ptrace.m4: Don't check for ptrace declaration.
735 * config.in: Re-generate.
736 * configure: Re-generate.
737 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
738 not defined.
739
740 2020-03-20 Kamil Rytarowski <n54@gmx.com>
741
742 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
743 `PTRACE_TYPE_RET'.
744 * i386-bsd-nat.c (gdb_ptrace): Likewise.
745 * sparc-nat.c (gdb_ptrace): Likewise.
746 * x86-bsd-nat.c (gdb_ptrace): Likewise.
747
748 2020-03-20 Tom Tromey <tromey@adacore.com>
749
750 * c-exp.y (lex_one_token): Fix assert.
751
752 2020-03-20 Tom Tromey <tromey@adacore.com>
753
754 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
755 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
756 strncpy call.
757
758 2020-03-20 Tom Tromey <tromey@adacore.com>
759
760 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
761
762 2020-03-20 Tom Tromey <tromey@adacore.com>
763
764 * ada-valprint.c (print_variant_part): Remove parameters; switch
765 to value-based API.
766 (print_field_values): Likewise.
767 (ada_val_print_struct_union): Likewise.
768 (ada_value_print_1): Update.
769
770 2020-03-20 Kamil Rytarowski <n54@gmx.com>
771
772 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
773 nbsd_nat_target instead of inf_ptrace_target.
774 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
775 nbsd_nat_target.
776
777 2020-03-20 Kamil Rytarowski <n54@gmx.com>
778
779 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
780 it to the ptrace call.
781 * (store_registers): Likewise.
782
783 2020-03-20 Kamil Rytarowski <n54@gmx.com>
784
785 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
786 it to the ptrace call.
787 * (store_registers): Likewise.
788
789 2020-03-19 Luis Machado <luis.machado@linaro.org>
790
791 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
792 valid, fetch vg value from ptrace.
793
794 2020-03-19 Kamil Rytarowski <n54@gmx.com>
795 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
796 * inf-ptrace.c: Likewise.
797 * (gdb_ptrace): Add.
798 * (inf_ptrace_target::resume): Update.
799 * (inf_ptrace_target::xfer_partial): Likewise.
800 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
801 * (inf_ptrace_peek_poke): Update.
802
803 2020-03-19 Kamil Rytarowski <n54@gmx.com>
804
805 * x86-bsd-nat.c (gdb_ptrace): New.
806 * (x86bsd_dr_set): Add new argument `ptid'.
807 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
808 x86bsd_dr_set_addr): Update.
809
810 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
811
812 * remote.c (remote_target::process_stop_reply): Handle events for
813 all threads differently.
814
815 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
816
817 * completer.c (completion_tracker::remove_completion): Define new
818 function.
819 * completer.h (completion_tracker::remove_completion): Declare new
820 function.
821 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
822 when adding a C++ function symbol.
823
824 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
825
826 * completer.c (completion_tracker::completion_hash_entry): Define
827 new class.
828 (advance_to_filename_complete_word_point): Call
829 recompute_lowest_common_denominator.
830 (completion_tracker::completion_tracker): Call discard_completions
831 to setup the hash table.
832 (completion_tracker::discard_completions): Allow for being called
833 from the constructor, pass new equal function, and element deleter
834 when constructing the hash table. Initialise new class member
835 variables.
836 (completion_tracker::maybe_add_completion): Remove use of
837 m_entries_vec, and store more information into m_entries_hash.
838 (completion_tracker::recompute_lcd_visitor): New function, most
839 content taken from...
840 (completion_tracker::recompute_lowest_common_denominator):
841 ...here, this now just visits each item in the hash calling the
842 above visitor.
843 (completion_tracker::build_completion_result): Remove use of
844 m_entries_vec, call recompute_lowest_common_denominator.
845 * completer.h (completion_tracker::have_completions): Remove use
846 of m_entries_vec.
847 (completion_tracker::completion_hash_entry): Declare new class.
848 (completion_tracker::recompute_lowest_common_denominator): Change
849 function signature.
850 (completion_tracker::recompute_lcd_visitor): Declare new function.
851 (completion_tracker::m_entries_vec): Delete.
852 (completion_tracker::m_entries_hash): Initialize to NULL.
853 (completion_tracker::m_lowest_common_denominator_valid): New
854 member variable.
855 (completion_tracker::m_lowest_common_denominator_max_length): New
856 member variable.
857
858 2020-03-17 Kamil Rytarowski <n54@gmx.com>
859
860 * regformats/regdef.h: Put reg in gdb namespace.
861
862 2020-03-17 Kamil Rytarowski <n54@gmx.com>
863
864 * i386-bsd-nat.c (gdb_ptrace): New.
865 * (i386bsd_fetch_inferior_registers,
866 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
867 * (i386bsd_fetch_inferior_registers,
868 i386bsd_store_inferior_registers) Use gdb_ptrace.
869
870 2020-03-17 Kamil Rytarowski <n54@gmx.com>
871
872 * amd64-bsd-nat.c (gdb_ptrace): New.
873 * (amd64bsd_fetch_inferior_registers,
874 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
875 * (amd64bsd_fetch_inferior_registers,
876 amd64bsd_store_inferior_registers) Use gdb_ptrace.
877
878 2020-03-17 Kamil Rytarowski <n54@gmx.com>
879
880 * user-regs.c (user_reg::read): Rename to...
881 (user_reg::xread): ...this.
882 * (append_user_reg): Rename argument `read' to `xread'.
883 * (user_reg_add_builtin): Likewise.
884 * (user_reg_add): Likewise.
885 * (value_of_user_reg): Likewise.
886
887 2020-03-17 Kamil Rytarowski <n54@gmx.com>
888
889 * sparc-nat.c (gdb_ptrace): New.
890 * sparc-nat.c (sparc_fetch_inferior_registers)
891 (sparc_store_inferior_registers) Remove obsolete comment.
892 * sparc-nat.c (sparc_fetch_inferior_registers)
893 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
894 * sparc-nat.c (sparc_fetch_inferior_registers)
895 (sparc_store_inferior_registers) Use gdb_ptrace.
896
897 2020-03-17 Kamil Rytarowski <n54@gmx.com>
898
899 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
900 it to the ptrace call.
901 * sh-nbsd-nat.c (store_registers): Likewise.
902
903 2020-03-17 Kamil Rytarowski <n54@gmx.com>
904
905 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
906 nbsd_nat_target instead of inf_ptrace_target.
907 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
908 nbsd_nat_target.
909
910 2020-03-17 Kamil Rytarowski <n54@gmx.com>
911
912 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
913
914 2020-03-17 Kamil Rytarowski <n54@gmx.com>
915
916 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
917 <sys/sysctl.h>.
918 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
919
920 2020-03-17 Tom de Vries <tdevries@suse.de>
921
922 PR gdb/23710
923 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
924 fields.
925 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
926 fields.
927 (process_imported_unit_die): Skip import of c++ CUs.
928
929 2020-03-16 Tom Tromey <tom@tromey.com>
930
931 * p-valprint.c (pascal_object_print_value): Initialize
932 base_value.
933
934 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
935 Shahab Vahedi <shahab@synopsys.com>
936
937 * Makefile.in: Add arch/arc.o
938 * configure.tgt: Likewise.
939 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
940 (_initialize_arc_tdep): Don't initialize old target descriptions.
941 (arc_read_description): New function to cache target descriptions.
942 * arc-tdep.h (arc_read_description): Add proto type.
943 * arch/arc.c: New file.
944 * arch/arc.h: Likewise.
945 * features/Makefile: Replace old target descriptions with new.
946 * features/arc-arcompact.c: Remove.
947 * features/arc-arcompact.xml: Likewise.
948 * features/arc-v2.c: Likewise
949 * features/arc-v2.xml: Likewise
950 * features/arc/aux-arcompact.xml: New file.
951 * features/arc/aux-v2.xml: Likewise.
952 * features/arc/core-arcompact.xml: Likewise.
953 * features/arc/core-v2.xml: Likewise.
954 * features/arc/aux-arcompact.c: Generate.
955 * features/arc/aux-v2.c: Likewise.
956 * features/arc/core-arcompact.c: Likewise.
957 * features/arc/core-v2.c: Likewise.
958 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
959
960 2020-03-16 Tom Tromey <tromey@adacore.com>
961
962 PR gdb/25663:
963 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
964 putting value into bcache.
965
966 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
967
968 PR gdb/21500
969 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
970 to...
971 (amd64_windows_init_abi_common): ... this. Don't set size of
972 long type.
973 (amd64_windows_init_abi): New function.
974 (amd64_cygwin_init_abi): New function.
975 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
976 the Cygwin OS ABI.
977 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
978 comment.
979
980 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
981
982 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
983 * windows-tdep.c (CYGWIN_DLL_NAME): New.
984 (pe_import_directory_entry): New struct type.
985 (is_linked_with_cygwin_dll): New function.
986 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
987 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
988 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
989
990 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
991
992 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
993 i386_cygwin_core_osabi_sniffer.
994
995 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
996
997 * i386-cygwin-tdep.c: Rename to...
998 * i386-windows-tdep.c: ... this.
999 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
1000 i386-windows-tdep.c.
1001 * configure.tgt: Likewise.
1002
1003 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1004
1005 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
1006 * osabi.c (gdb_osabi_names): Add "Windows".
1007 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
1008 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
1009 (i386_cygwin_core_osabi_sniffer): New function, extracted from
1010 i386_cygwin_osabi_sniffer.
1011 (_initialize_i386_cygwin_tdep): Register OS ABI
1012 GDB_OSABI_WINDOWS for i386.
1013 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
1014 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
1015 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
1016 for x86-64.
1017 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
1018 when the target matches '*-*-mingw*'.
1019
1020 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1021
1022 * defs.h (enum gdb_osabi): Move to...
1023 * osabi.h (enum gdb_osabi): ... here.
1024 * gdbarch.sh: Include osabi.h in gdbarch.h.
1025 * gdbarch.h: Re-generate.
1026
1027 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
1028
1029 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
1030 function.
1031 (_initialize_amd64_windows_tdep): Register osabi sniffer.
1032
1033 2020-03-14 Tom Tromey <tom@tromey.com>
1034
1035 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
1036 for C++.
1037 (c_type_print_modifier): Likewise. Add "language" parameter.
1038 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
1039 (c_type_print_base_1): Update.
1040 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
1041 constants.
1042 * type-stack.c (type_stack::insert): Handle tp_atomic and
1043 tp_restrict.
1044 (type_stack::follow_type_instance_flags): Likewise.
1045 (type_stack::follow_types): Likewise. Merge type-following code.
1046 * c-exp.y (RESTRICT, ATOMIC): New tokens.
1047 (space_identifier, cv_with_space_id)
1048 (const_or_volatile_or_space_identifier_noopt)
1049 (const_or_volatile_or_space_identifier): Remove.
1050 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
1051 rules.
1052 (ptr_operator, typebase): Update.
1053 (enum token_flag) <FLAG_C>: New constant.
1054 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
1055 "_Atomic".
1056 (lex_one_token): Handle FLAG_C.
1057
1058 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1059
1060 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
1061 it to the ptrace call.
1062 * m68k-bsd-nat.c (store_registers): Likewise.
1063
1064 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1065
1066 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
1067 gdb_byte *.
1068 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1069 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
1070 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
1071
1072 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1073
1074 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
1075 nbsd_nat_target instead of inf_ptrace_target.
1076 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
1077 nbsd_nat_target.
1078
1079 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1080
1081 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
1082 register_t.
1083
1084 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1085
1086 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
1087 it to the ptrace call.
1088 * alpha-bsd-nat.c (store_registers): Likewise.
1089
1090 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1091
1092 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
1093 includes.
1094 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
1095 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
1096 fill_fpregset): Likewise.
1097
1098 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1099
1100 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
1101 nbsd_nat_target instead of inf_ptrace_target.
1102 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
1103 nbsd_nat_target.
1104
1105 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1106
1107 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
1108 register_t.
1109
1110 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1111
1112 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
1113 it to the ptrace call.
1114 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
1115 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
1116 * arm-nbsd-nat.c (store_register): Likewise.
1117 * arm-nbsd-nat.c (store_regs): Likewise.
1118 * arm-nbsd-nat.c (store_fp_register): Likewise.
1119 * arm-nbsd-nat.c (store_fp_regs): Likewise.
1120
1121 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1122
1123 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
1124 nbsd_nat_target instead of inf_ptrace_target.
1125 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
1126 nbsd_nat_target.
1127
1128 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1129
1130 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
1131 it to the ptrace call.
1132 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
1133
1134 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1135
1136 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
1137 it to the ptrace call.
1138 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
1139
1140 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1141
1142 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
1143 gdb_byte *.
1144 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
1145
1146 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1147
1148 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
1149 instead of inf_ptrace_target.
1150 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
1151 nbsd_nat_target.
1152
1153 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1154
1155 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
1156 register_t.
1157
1158 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1159
1160 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
1161 register_t.
1162
1163 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1164
1165 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
1166 register_t.
1167
1168 2020-03-13 Tom Tromey <tom@tromey.com>
1169
1170 * value.h (val_print): Don't declare.
1171 * valprint.h (val_print_array_elements)
1172 (val_print_scalar_formatted, generic_val_print): Don't declare.
1173 * valprint.c (generic_val_print_array): Take a struct value.
1174 (generic_val_print_ptr, generic_val_print_memberptr)
1175 (generic_val_print_bool, generic_val_print_int)
1176 (generic_val_print_char, generic_val_print_complex)
1177 (generic_val_print): Remove.
1178 (generic_value_print): Update.
1179 (do_val_print): Remove unused parameters. Don't call
1180 la_val_print.
1181 (val_print): Remove.
1182 (common_val_print): Update. Don't call value_check_printable.
1183 (val_print_scalar_formatted, val_print_array_elements): Remove.
1184 * rust-lang.c (rust_val_print): Remove.
1185 (rust_language_defn): Update.
1186 * p-valprint.c (pascal_val_print): Remove.
1187 (pascal_value_print_inner): Update.
1188 (pascal_object_print_val_fields, pascal_object_print_val):
1189 Remove.
1190 (pascal_object_print_static_field): Update.
1191 * p-lang.h (pascal_val_print): Don't declare.
1192 * p-lang.c (pascal_language_defn): Update.
1193 * opencl-lang.c (opencl_language_defn): Update.
1194 * objc-lang.c (objc_language_defn): Update.
1195 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
1196 * m2-lang.h (m2_val_print): Don't declare.
1197 * m2-lang.c (m2_language_defn): Update.
1198 * language.h (struct language_defn) <la_val_print>: Remove.
1199 * language.c (unk_lang_value_print_inner): Rename. Change
1200 argument types.
1201 (unknown_language_defn, auto_language_defn): Update.
1202 * go-valprint.c (go_val_print): Remove.
1203 * go-lang.h (go_val_print): Don't declare.
1204 * go-lang.c (go_language_defn): Update.
1205 * f-valprint.c (f_val_print): Remove.
1206 * f-lang.h (f_value_print): Don't declare.
1207 * f-lang.c (f_language_defn): Update.
1208 * d-valprint.c (d_val_print): Remove.
1209 * d-lang.h (d_value_print): Don't declare.
1210 * d-lang.c (d_language_defn): Update.
1211 * cp-valprint.c (cp_print_value_fields)
1212 (cp_print_value_fields_rtti, cp_print_value): Remove.
1213 (cp_print_static_field): Update.
1214 * c-valprint.c (c_val_print_array, c_val_print_ptr)
1215 (c_val_print_struct, c_val_print_union, c_val_print_int)
1216 (c_val_print_memberptr, c_val_print): Remove.
1217 * c-lang.h (c_val_print_array, cp_print_value_fields)
1218 (cp_print_value_fields_rtti): Don't declare.
1219 * c-lang.c (c_language_defn, cplus_language_defn)
1220 (asm_language_defn, minimal_language_defn): Update.
1221 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
1222 (ada_val_print_enum): Take a struct value.
1223 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
1224 (ada_val_print): Remove.
1225 (ada_value_print_1): Update.
1226 (printable_val_type): Remove.
1227 * ada-lang.h (ada_val_print): Don't declare.
1228 * ada-lang.c (ada_language_defn): Update.
1229
1230 2020-03-13 Tom Tromey <tom@tromey.com>
1231
1232 * valprint.c (do_val_print): Update.
1233 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
1234 a struct value.
1235 (value_to_value_object_no_release): Declare.
1236 * python/py-value.c (value_to_value_object_no_release): New
1237 function.
1238 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
1239 struct value.
1240 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
1241 function.
1242 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
1243 a struct value.
1244 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
1245 Declare.
1246 (gdbscm_apply_val_pretty_printer): Take a struct value.
1247 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
1248 value.
1249 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
1250 value.
1251 * extension-priv.h (struct extension_language_ops)
1252 <apply_val_pretty_printer>: Take a struct value.
1253 * cp-valprint.c (cp_print_value): Create a struct value.
1254 (cp_print_value): Update.
1255
1256 2020-03-13 Tom Tromey <tom@tromey.com>
1257
1258 * ada-valprint.c (print_field_values): Call common_val_print.
1259
1260 2020-03-13 Tom Tromey <tom@tromey.com>
1261
1262 * ada-valprint.c (val_print_packed_array_elements): Remove
1263 bitoffset and val parameters. Call common_val_print.
1264 (ada_val_print_string): Remove offset, address, and original_value
1265 parameters.
1266 (ada_val_print_array): Update.
1267 (ada_value_print_array): New function.
1268 (ada_value_print_1): Call it.
1269
1270 2020-03-13 Tom Tromey <tom@tromey.com>
1271
1272 * ada-valprint.c (ada_value_print): Use common_val_print.
1273
1274 2020-03-13 Tom Tromey <tom@tromey.com>
1275
1276 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
1277
1278 2020-03-13 Tom Tromey <tom@tromey.com>
1279
1280 * ada-valprint.c (ada_value_print_num): New function.
1281 (ada_value_print_1): Use it.
1282
1283 2020-03-13 Tom Tromey <tom@tromey.com>
1284
1285 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
1286
1287 2020-03-13 Tom Tromey <tom@tromey.com>
1288
1289 * ada-valprint.c (ada_value_print_ptr): New function.
1290 (ada_value_print_1): Use it.
1291
1292 2020-03-13 Tom Tromey <tom@tromey.com>
1293
1294 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
1295 call common_val_print.
1296 (ada_val_print_1): Update.
1297 (ada_value_print_1): New function.
1298 (ada_value_print_inner): Rewrite.
1299
1300 2020-03-13 Tom Tromey <tom@tromey.com>
1301
1302 * cp-valprint.c (cp_print_value_fields): Update.
1303 (cp_print_value): New function.
1304
1305 2020-03-13 Tom Tromey <tom@tromey.com>
1306
1307 * m2-valprint.c (m2_value_print_inner): Use
1308 cp_print_value_fields.
1309 * cp-valprint.c (cp_print_value_fields): New function.
1310 * c-valprint.c (c_value_print_struct): New function.
1311 (c_value_print_inner): Use c_value_print_struct.
1312 * c-lang.h (cp_print_value_fields): Declare.
1313
1314 2020-03-13 Tom Tromey <tom@tromey.com>
1315
1316 * c-valprint.c (c_value_print_array): New function.
1317 (c_value_print_inner): Use it.
1318
1319 2020-03-13 Tom Tromey <tom@tromey.com>
1320
1321 * c-valprint.c (c_value_print_memberptr): New function.
1322 (c_value_print_inner): Use it.
1323
1324 2020-03-13 Tom Tromey <tom@tromey.com>
1325
1326 * c-valprint.c (c_value_print_int): New function.
1327 (c_value_print_inner): Use it.
1328
1329 2020-03-13 Tom Tromey <tom@tromey.com>
1330
1331 * c-valprint.c (c_value_print_ptr): New function.
1332 (c_value_print_inner): Use it.
1333
1334 2020-03-13 Tom Tromey <tom@tromey.com>
1335
1336 * c-valprint.c (c_value_print_inner): Rewrite.
1337
1338 2020-03-13 Tom Tromey <tom@tromey.com>
1339
1340 * valprint.c (generic_value_print_complex): New function.
1341 (generic_value_print): Use it.
1342
1343 2020-03-13 Tom Tromey <tom@tromey.com>
1344
1345 * valprint.c (generic_val_print_float): Don't call
1346 val_print_scalar_formatted.
1347 (generic_val_print, generic_value_print): Update.
1348
1349 2020-03-13 Tom Tromey <tom@tromey.com>
1350
1351 * valprint.c (generic_value_print_char): New function
1352 (generic_value_print): Use it.
1353
1354 2020-03-13 Tom Tromey <tom@tromey.com>
1355
1356 * valprint.c (generic_value_print_int): New function.
1357 (generic_value_print): Use it.
1358
1359 2020-03-13 Tom Tromey <tom@tromey.com>
1360
1361 * valprint.c (generic_value_print_bool): New function.
1362 (generic_value_print): Use it.
1363
1364 2020-03-13 Tom Tromey <tom@tromey.com>
1365
1366 * valprint.c (generic_val_print_func): Simplify.
1367 (generic_val_print, generic_value_print): Update.
1368
1369 2020-03-13 Tom Tromey <tom@tromey.com>
1370
1371 * valprint.c (generic_val_print_flags): Remove.
1372 (generic_val_print, generic_value_print): Update.
1373 (val_print_type_code_flags): Add original_value parameter.
1374
1375 2020-03-13 Tom Tromey <tom@tromey.com>
1376
1377 * valprint.c (generic_val_print): Update.
1378 (generic_value_print): Update.
1379 * valprint.c (generic_val_print_enum): Don't call
1380 val_print_scalar_formatted.
1381
1382 2020-03-13 Tom Tromey <tom@tromey.com>
1383
1384 * valprint.c (generic_value_print): Call generic_value_print_ptr.
1385 * valprint.c (generic_value_print_ptr): New function.
1386
1387 2020-03-13 Tom Tromey <tom@tromey.com>
1388
1389 * valprint.c (generic_value_print): Rewrite.
1390
1391 2020-03-13 Tom Tromey <tom@tromey.com>
1392
1393 * p-valprint.c (pascal_object_print_value_fields)
1394 (pascal_object_print_value): New functions.
1395
1396 2020-03-13 Tom Tromey <tom@tromey.com>
1397
1398 * p-valprint.c (pascal_value_print_inner): Rewrite.
1399
1400 2020-03-13 Tom Tromey <tom@tromey.com>
1401
1402 * f-valprint.c (f_value_print_innner): Rewrite.
1403
1404 2020-03-13 Tom Tromey <tom@tromey.com>
1405
1406 * m2-valprint.c (m2_print_unbounded_array): New overload.
1407 (m2_print_unbounded_array): Update.
1408 (m2_print_array_contents): Take a struct value.
1409 (m2_value_print_inner): Rewrite.
1410
1411 2020-03-13 Tom Tromey <tom@tromey.com>
1412
1413 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
1414 (d_value_print_inner): New function.
1415 * d-lang.h (d_value_print_inner): Declare.
1416 * d-lang.c (d_language_defn): Use d_value_print_inner.
1417
1418 2020-03-13 Tom Tromey <tom@tromey.com>
1419
1420 * go-valprint.c (go_value_print_inner): New function.
1421 * go-lang.h (go_value_print_inner): Declare.
1422 * go-lang.c (go_language_defn): Use go_value_print_inner.
1423
1424 2020-03-13 Tom Tromey <tom@tromey.com>
1425
1426 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
1427 API.
1428 (rust_val_print): Rewrite.
1429 (rust_value_print_inner): New function, from rust_val_print.
1430 (rust_language_defn): Use rust_value_print_inner.
1431
1432 2020-03-13 Tom Tromey <tom@tromey.com>
1433
1434 * ada-valprint.c (ada_value_print_inner): New function.
1435 * ada-lang.h (ada_value_print_inner): Declare.
1436 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
1437
1438 2020-03-13 Tom Tromey <tom@tromey.com>
1439
1440 * f-valprint.c (f_value_print_innner): New function.
1441 * f-lang.h (f_value_print_innner): Declare.
1442 * f-lang.c (f_language_defn): Use f_value_print_innner.
1443
1444 2020-03-13 Tom Tromey <tom@tromey.com>
1445
1446 * p-valprint.c (pascal_value_print_inner): New function.
1447 * p-lang.h (pascal_value_print_inner): Declare.
1448 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
1449
1450 2020-03-13 Tom Tromey <tom@tromey.com>
1451
1452 * m2-valprint.c (m2_value_print_inner): New function.
1453 * m2-lang.h (m2_value_print_inner): Declare.
1454 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
1455
1456 2020-03-13 Tom Tromey <tom@tromey.com>
1457
1458 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
1459 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
1460 * c-valprint.c (c_value_print_inner): New function.
1461 * c-lang.h (c_value_print_inner): Declare.
1462 * c-lang.c (c_language_defn, cplus_language_defn)
1463 (asm_language_defn, minimal_language_defn): Use
1464 c_value_print_inner.
1465
1466 2020-03-13 Tom Tromey <tom@tromey.com>
1467
1468 * p-valprint.c (pascal_object_print_value_fields): Now static.
1469 * p-lang.h (pascal_object_print_value_fields): Don't declare.
1470
1471 2020-03-13 Tom Tromey <tom@tromey.com>
1472
1473 * c-valprint.c (c_val_print_array): Simplify.
1474
1475 2020-03-13 Tom Tromey <tom@tromey.com>
1476
1477 * valprint.c (value_print_array_elements): New function.
1478 * valprint.h (value_print_array_elements): Declare.
1479
1480 2020-03-13 Tom Tromey <tom@tromey.com>
1481
1482 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
1483 * mips-tdep.c (mips_print_register): Use
1484 value_print_scalar_formatted.
1485
1486 2020-03-13 Tom Tromey <tom@tromey.com>
1487
1488 * valprint.h (value_print_scalar_formatted): Declare.
1489 * valprint.c (value_print_scalar_formatted): New function.
1490
1491 2020-03-13 Tom Tromey <tom@tromey.com>
1492
1493 * valprint.h (generic_value_print): Declare.
1494 * valprint.c (generic_value_print): New function.
1495
1496 2020-03-13 Tom Tromey <tom@tromey.com>
1497
1498 * valprint.c (do_val_print): Call la_value_print_inner, if
1499 available.
1500 * rust-lang.c (rust_language_defn): Update.
1501 * p-lang.c (pascal_language_defn): Update.
1502 * opencl-lang.c (opencl_language_defn): Update.
1503 * objc-lang.c (objc_language_defn): Update.
1504 * m2-lang.c (m2_language_defn): Update.
1505 * language.h (struct language_defn) <la_value_print_inner>: New
1506 member.
1507 * language.c (unknown_language_defn, auto_language_defn): Update.
1508 * go-lang.c (go_language_defn): Update.
1509 * f-lang.c (f_language_defn): Update.
1510 * d-lang.c (d_language_defn): Update.
1511 * c-lang.c (c_language_defn, cplus_language_defn)
1512 (asm_language_defn, minimal_language_defn): Update.
1513 * ada-lang.c (ada_language_defn): Update.
1514
1515 2020-03-13 Tom Tromey <tom@tromey.com>
1516
1517 * c-valprint.c (c_value_print): Use common_val_print.
1518
1519 2020-03-13 Tom Tromey <tom@tromey.com>
1520
1521 * cp-valprint.c (cp_print_static_field): Use common_val_print.
1522
1523 2020-03-13 Tom Tromey <tom@tromey.com>
1524
1525 * f-valprint.c (f77_print_array_1, f_val_print): Use
1526 common_val_print.
1527
1528 2020-03-13 Tom Tromey <tom@tromey.com>
1529
1530 * riscv-tdep.c (riscv_print_one_register_info): Use
1531 common_val_print.
1532
1533 2020-03-13 Tom Tromey <tom@tromey.com>
1534
1535 * mi/mi-main.c (output_register): Use common_val_print.
1536
1537 2020-03-13 Tom Tromey <tom@tromey.com>
1538
1539 * infcmd.c (default_print_one_register_info): Use
1540 common_val_print.
1541
1542 2020-03-13 Tom Tromey <tom@tromey.com>
1543
1544 * valprint.h (common_val_print_checked): Declare.
1545 * valprint.c (common_val_print_checked): New function.
1546 * stack.c (print_frame_arg): Use common_val_print_checked.
1547
1548 2020-03-13 Tom Tromey <tom@tromey.com>
1549
1550 * valprint.c (do_val_print): New function, from val_print.
1551 (val_print): Use do_val_print.
1552 (common_val_print): Use do_val_print.
1553
1554 2020-03-13 Tom Tromey <tom@tromey.com>
1555
1556 * valprint.c (value_print): Use scoped_value_mark.
1557
1558 2020-03-13 Tom de Vries <tdevries@suse.de>
1559
1560 PR symtab/25646
1561 * psymtab.c (partial_symtab::partial_symtab): Don't set
1562 globals_offset and statics_offset. Push element onto
1563 current_global_psymbols and current_static_psymbols stacks.
1564 (concat): New function.
1565 (end_psymtab_common): Set globals_offset and statics_offset. Pop
1566 element from current_global_psymbols and current_static_psymbols
1567 stacks. Concat popped elements to global_psymbols and
1568 static_symbols.
1569 (add_psymbol_to_list): Use current_global_psymbols and
1570 current_static_psymbols stacks.
1571 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
1572 current_static_psymbols fields.
1573
1574 2020-03-12 Christian Biesinger <cbiesinger@google.com>
1575
1576 * corelow.c (sniff_core_bfd): Remove.
1577 (class core_target) <m_core_vec>: Remove.
1578 (core_target::core_target): Update.
1579 (core_file_fns): Remove.
1580 (deprecated_add_core_fns): Remove.
1581 (default_core_sniffer): Remove.
1582 (sniff_core_bfd): Remove.
1583 (default_check_format): Remove.
1584 (gdb_check_format): Remove.
1585 (core_target_open): Update.
1586 (core_target::get_core_register_section): Update.
1587 (get_core_registers_cb): Update.
1588 (core_target::fetch_registers): Update.
1589 * gdbcore.h (struct core_fns): Remove.
1590 (deprecated_add_core_fns): Remove.
1591 (default_core_sniffer): Remove.
1592 (default_check_format): Remove.
1593
1594 2020-03-12 Tom Tromey <tom@tromey.com>
1595
1596 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
1597 CORE_ADDR.
1598 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
1599
1600 2020-03-12 Tom Tromey <tom@tromey.com>
1601
1602 * remote.c (remote_target::download_tracepoint)
1603 (remote_target::enable_tracepoint)
1604 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
1605 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
1606 sprintf_vma.
1607
1608 2020-03-12 Tom Tromey <tom@tromey.com>
1609
1610 * symfile-mem.c: Update CORE_ADDR size assert.
1611
1612 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1613
1614 * selftest.m4: Move to gdbsupport/.
1615 * acinclude.m4: Update path to selftest.m4.
1616
1617 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1618
1619 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
1620 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
1621 gdbarch-selfselftests.c and selftest-arch.c.
1622 (SUBDIR_UNITTESTS_OBS): Rename to...
1623 (SELFTESTS_OBS): ... this.
1624 (COMMON_SFILES): Remove disasm-selftests.c and
1625 gdbarch-selftests.c.
1626 * configure.ac: Don't add selftest-arch.{c,o} to
1627 CONFIG_{SRCS,OBS}.
1628 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
1629 preprocessor conditions.
1630
1631 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1632
1633 * configure.ac: Don't source bfd/development.sh.
1634 * selftest.m4: Modify comment.
1635 * configure: Re-generate.
1636
1637 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1638
1639 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
1640 not "true" or "false".
1641 * configure: Re-generate.
1642
1643 2020-03-12 Christian Biesinger <cbiesinger@google.com>
1644
1645 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
1646 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
1647 renamed to arm_nbsd_supply_gregset.
1648 (fetch_register): Update to call arm_nbsd_supply_gregset.
1649 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
1650 (arm_netbsd_nat_target::fetch_registers): Update.
1651 (fetch_elfcore_registers): Removed.
1652 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
1653 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
1654 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
1655 not require NetBSD system headers.
1656 (arm_nbsd_regset): New struct.
1657 (arm_nbsd_iterate_over_regset_sections): New function.
1658 (arm_netbsd_init_abi_common): Updated to call
1659 set_gdbarch_iterate_over_regset_sections.
1660 * arm-nbsd-tdep.h: New file.
1661
1662 2020-03-11 Kevin Buettner <kevinb@redhat.com>
1663
1664 * symtab.c (find_pc_sect_line): Add check which prevents infinite
1665 recursion.
1666
1667 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
1668
1669 * configure: Re-generate.
1670
1671 2020-03-11 Tom Tromey <tromey@adacore.com>
1672
1673 * ada-typeprint.c (print_choices): Fix comment.
1674
1675 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
1676
1677 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
1678 previous item in the list, when the list has no items.
1679
1680 2020-03-11 Tom de Vries <tdevries@suse.de>
1681
1682 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
1683 PROP_LOCLIST handling code.
1684
1685 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
1686
1687 * buildsym-legacy.c (record_line): Pass extra parameter to
1688 record_line.
1689 * buildsym.c (buildsym_compunit::record_line): Take an extra
1690 parameter, reduce duplication in the line table, and record the
1691 is_stmt flag in the line table.
1692 * buildsym.h (buildsym_compunit::record_line): Add extra
1693 parameter.
1694 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
1695 non-statement lines.
1696 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
1697 this to the symtab builder.
1698 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
1699 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
1700 through to dwarf_record_line_1.
1701 * infrun.c (process_event_stop_test): When stepping, don't stop at
1702 a non-statement instruction, and only refresh the step info when
1703 we land in the middle of a line's range. Also add an extra
1704 comment.
1705 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
1706 field.
1707 * record-btrace.c (btrace_find_line_range): Only record lines
1708 marked as is-statement.
1709 * stack.c (frame_show_address): Show the frame address if we are
1710 in a non-statement sal.
1711 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
1712 (maintenance_print_one_line_table): Print a header for the is_stmt
1713 column, and include is_stmt information in the output.
1714 * symtab.c (find_pc_sect_line): Find lines marked as statements in
1715 preference to non-statements.
1716 (find_pcs_for_symtab_line): Prefer is-statement entries.
1717 (find_line_common): Likewise.
1718 * symtab.h (struct linetable_entry): Add is_stmt field.
1719 (struct symtab_and_line): Likewise.
1720 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
1721 arranging the line table.
1722
1723 2020-03-07 Tom de Vries <tdevries@suse.de>
1724
1725 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
1726 DIE.
1727
1728 2020-03-07 Tom Tromey <tom@tromey.com>
1729
1730 * valops.c (value_literal_complex): Remove obsolete comment.
1731 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
1732 comment.
1733
1734 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1735
1736 * infrun.h: Forward-declare thread_info.
1737 (set_step_info): Add thread_info parameter, add doc.
1738 * infrun.c (set_step_info): Add thread_info parameter, move doc
1739 to header.
1740 * infrun.c (process_event_stop_test): Pass thread to
1741 set_step_info call.
1742 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
1743 set_step_info.
1744 (prepare_one_step): Add thread_info parameter, pass it to
1745 set_step_frame and prepare_one_step (recursive) call.
1746 (step_1): Pass thread to prepare_one_step call.
1747 (step_command_fsm::should_stop): Pass thread to
1748 prepare_one_step.
1749 (until_next_fsm): Pass thread to set_step_frame call.
1750 (finish_command): Pass thread to set_step_info call.
1751
1752 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
1753
1754 * windows-tdep.c (windows_solib_create_inferior_hook):
1755 Check if inferior is running.
1756
1757 2020-03-06 Tom de Vries <tdevries@suse.de>
1758
1759 * NEWS: Fix "the the".
1760 * ctfread.c: Same.
1761
1762 2020-03-06 Tom de Vries <tdevries@suse.de>
1763
1764 * psymtab.c (psymtab_to_symtab): Don't print "done.".
1765
1766 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1767
1768 * .dir-locals.el: Add a comment referencing the other copies of
1769 this file.
1770
1771 2020-03-05 John Baldwin <jhb@FreeBSD.org>
1772
1773 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
1774 psargs.
1775
1776 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1777
1778 * .gitattributes: New file.
1779
1780 2020-03-04 Tom Tromey <tom@tromey.com>
1781
1782 * symmisc.c (print_symbol_bcache_statistics)
1783 (print_objfile_statistics): Update.
1784 * symfile.c (allocate_symtab): Use intern.
1785 * psymtab.c (partial_symtab::partial_symtab): Use intern.
1786 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
1787 macro_cache>: Remove.
1788 <string_cache>: New member.
1789 (struct objfile) <intern>: New methods.
1790 * elfread.c (elf_symtab_read): Use intern.
1791 * dwarf2/read.c (fixup_go_packaging): Intern package name.
1792 (dwarf2_compute_name, dwarf2_physname)
1793 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
1794 names.
1795 (guess_partial_die_structure_name): Update.
1796 (partial_die_info::fixup): Intern name.
1797 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
1798 name.
1799 (dwarf2_name): Intern name. Update.
1800 * buildsym.c (buildsym_compunit::get_macro_table): Use
1801 string_cache.
1802
1803 2020-03-04 Tom Tromey <tom@tromey.com>
1804
1805 * jit.c (bfd_open_from_target_memory): Make "target" const.
1806 * corefile.c (gnutarget): Now const.
1807 * gdbcore.h (gnutarget): Now const.
1808
1809 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
1810
1811 * NEWS: Mention support for WOW64 processes.
1812 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
1813 (amd64_windows_segment_register_p): Remove static.
1814 (_initialize_amd64_windows_nat): Update.
1815 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
1816 * i386-windows-nat.c (context_offset): Update.
1817 (i386_mappings): Rename and remove static.
1818 (i386_windows_segment_register_p): Remove static.
1819 (_initialize_i386_windows_nat): Update.
1820 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
1821 (STATUS_WX86_SINGLE_STEP): New macro.
1822 (EnumProcessModulesEx): New macro.
1823 (Wow64SuspendThread): New macro.
1824 (Wow64GetThreadContext): New macro.
1825 (Wow64SetThreadContext): New macro.
1826 (Wow64GetThreadSelectorEntry): New macro.
1827 (windows_set_context_register_offsets): Add static.
1828 (windows_set_segment_register_p): Likewise.
1829 (windows_add_thread): Adapt for WOW64 processes.
1830 (windows_fetch_one_register): Likewise.
1831 (windows_nat_target::fetch_registers): Likewise.
1832 (windows_store_one_register): Likewise.
1833 (display_selector): Likewise.
1834 (display_selectors): Likewise.
1835 (handle_exception): Likewise.
1836 (windows_continue): Likewise.
1837 (windows_nat_target::resume): Likewise.
1838 (windows_add_all_dlls): Likewise.
1839 (do_initial_windows_stuff): Likewise.
1840 (windows_nat_target::attach): Likewise.
1841 (windows_get_exec_module_filename): Likewise.
1842 (windows_nat_target::create_inferior): Likewise.
1843 (windows_xfer_siginfo): Likewise.
1844 (_initialize_loadable): Initialize Wow64SuspendThread,
1845 Wow64GetThreadContext, Wow64SetThreadContext,
1846 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
1847 * windows-nat.h (windows_set_context_register_offsets):
1848 Remove declaration.
1849 (windows_set_segment_register_p): Likewise.
1850 (i386_windows_segment_register_p): Add declaration.
1851 (amd64_windows_segment_register_p): Likewise.
1852
1853 2020-03-04 Luis Machado <luis.machado@linaro.org>
1854
1855 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
1856 in "info registers" for AArch64/ARM.
1857
1858 The change caused "info registers" to not print GPR's.
1859
1860 gdb/ChangeLog:
1861
1862 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
1863
1864 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
1865 when reg->group is empty and reggroup is not.
1866
1867 2020-03-03 Tom Tromey <tromey@adacore.com>
1868
1869 * dwarf2/frame.c (struct dwarf2_frame_cache)
1870 <checked_tailcall_bottom, entry_cfa_sp_offset,
1871 entry_cfa_sp_offset_p>: Remove members.
1872 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
1873 (dwarf2_frame_prev_register): Don't call
1874 dwarf2_tailcall_sniffer_first.
1875 (dwarf2_append_unwinders): Don't append tailcall unwinder.
1876 * frame-unwind.c (add_unwinder): New fuction.
1877 (frame_unwind_init): Use it. Add tailcall unwinder.
1878
1879 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
1880 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
1881
1882 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
1883 value should be printed as true.
1884
1885 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
1886
1887 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
1888 (windows_init_abi): Set and use windows_so_ops.
1889
1890 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
1891
1892 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
1893 when verifying if dealing with a convenience variable.
1894
1895 2020-03-03 Luis Machado <luis.machado@linaro.org>
1896
1897 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
1898
1899 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1900
1901 * infrun.c (gdbarch_supports_displaced_stepping): New.
1902 (use_displaced_stepping): Break up conditions in smaller pieces.
1903 Use gdbarch_supports_displaced_stepping.
1904 (displaced_step_prepare_throw): Use
1905 gdbarch_supports_displaced_stepping.
1906
1907 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1908
1909 * NEWS: Mention new behaviour of the history filename.
1910 * top.c (write_history_p): Add comment.
1911 (show_write_history_p): Add header comment, give a different
1912 message when history writing is on, but the history filename is
1913 empty.
1914 (history_filename): Add comment.
1915 (history_filename_empty): New function.
1916 (show_history_filename): Add header comment, give a different
1917 message when the filename is empty.
1918 (init_history): Compare history_filename against nullptr, and only
1919 read history if the filename is not empty.
1920 (set_history_filename): Add header comment, and only make
1921 non-empty filenames absolute.
1922 (init_main): Make the filename argument to 'set history filename'
1923 optional.
1924
1925 2020-03-02 Christian Biesinger <cbiesinger@google.com>
1926
1927 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
1928 (arm_supply_vfpregset): ...this, and update to use VFP registers.
1929 (fetch_fp_register): Update.
1930 (fetch_fp_regs): Update.
1931 (store_fp_register): Update.
1932 (store_fp_regs): Update.
1933 (arm_netbsd_nat_target::read_description): New function.
1934 (fetch_elfcore_registers): Update.
1935
1936 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1937
1938 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
1939 general_thread if the stop reply is missing a thread-id.
1940 (remote_target::process_stop_reply): Use the first non-exited
1941 thread if the target didn't pass a thread-id.
1942 * infrun.c (do_target_wait): Move call to
1943 switch_to_inferior_no_thread to ....
1944 (do_target_wait_1): ... here.
1945
1946 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
1947
1948 * debuginfod-support.c: Include defs.h first.
1949
1950 2020-02-28 Tom de Vries <tdevries@suse.de>
1951
1952 * symfile.c (set_initial_language): Use default language for lookup.
1953
1954 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
1955
1956 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
1957 reader variable, pass `this` to read_cutu_die_from_dwo.
1958
1959 2020-02-27 Aaron Merey <amerey@redhat.com>
1960
1961 * source.c (open_source_file): Check for nullptr when computing
1962 srcpath.
1963
1964 2020-02-27 Tom Tromey <tromey@adacore.com>
1965
1966 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
1967 member.
1968 (dwarf2_add_field): Don't update nfields.
1969 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
1970
1971 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
1972
1973 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
1974 abs.
1975
1976 2020-02-26 Tom Tromey <tom@tromey.com>
1977
1978 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
1979 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
1980 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
1981 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
1982 per_cu_data.
1983
1984 2020-02-26 Tom Tromey <tom@tromey.com>
1985
1986 * dwarf2/index-write.c (psym_index_map): Change type.
1987 (add_address_entry_worker, write_one_signatured_type)
1988 (recursively_count_psymbols, recursively_write_psymbols)
1989 (class debug_names, psyms_seen_size, write_gdbindex)
1990 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
1991
1992 2020-02-26 Aaron Merey <amerey@redhat.com>
1993
1994 * Makefile.in: Handle optional debuginfod support.
1995 * NEWS: Update.
1996 * README: Add --with-debuginfod summary.
1997 * config.in: Regenerate.
1998 * configure: Regenerate.
1999 * configure.ac: Handle optional debuginfod support.
2000 * debuginfod-support.c: debuginfod helper functions.
2001 * debuginfod-support.h: Ditto.
2002 * doc/gdb.texinfo: Add --with-debuginfod to configure options
2003 summary.
2004 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
2005 when a dwz file cannot be found.
2006 * elfread.c (elf_symfile_read): Query debuginfod servers when a
2007 debuginfo file cannot be found.
2008 * source.c (open_source_file): Query debuginfod servers when a
2009 source file cannot be found.
2010 * top.c (print_gdb_configuration): Include
2011 --{with,without}-debuginfod in the output.
2012
2013 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
2014
2015 * thread.c (thr_try_catch_cmd): Print thread name.
2016
2017 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
2018
2019 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
2020 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2021 dwarf2_fetch_die_type_sect_off): Move to...
2022 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
2023 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2024 dwarf2_fetch_die_type_sect_off): ... here.
2025 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
2026 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2027 dwarf2_fetch_die_type_sect_off): Move doc to header file.
2028
2029 2020-02-26 Tom de Vries <tdevries@suse.de>
2030
2031 PR gdb/25603
2032 * symfile.c (set_initial_language): Exit-early if
2033 language_mode == language_mode_manual.
2034
2035 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
2036
2037 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
2038 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
2039 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
2040
2041 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2042
2043 * gdbtypes.c (create_array_type_with_stride): Handle negative
2044 array strides.
2045 * valarith.c (value_subscripted_rvalue): Likewise.
2046
2047 2020-02-25 Luis Machado <luis.machado@linaro.org>
2048
2049 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
2050
2051 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
2052
2053 * loc.h (dwarf2_get_die_type): Move to...
2054 * read.h (dwarf2_get_die_type): ... here.
2055 * read.c (dwarf2_get_die_type): Move doc to header.
2056
2057 2020-02-25 Joel Brobecker <brobecker@adacore.com>
2058
2059 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
2060 'gnulib/Makefile.in' to the list.
2061
2062 2020-02-24 Tom Tromey <tom@tromey.com>
2063
2064 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
2065 Remove.
2066 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
2067 XOBNEWVEC.
2068
2069 2020-02-24 Tom Tromey <tom@tromey.com>
2070
2071 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
2072 New method.
2073 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
2074 (dw2_do_instantiate_symtab, dw2_get_file_names)
2075 (build_type_psymtab_dependencies, load_full_type_unit): Update.
2076
2077 2020-02-24 Tom Tromey <tom@tromey.com>
2078
2079 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
2080 make_scoped_restore.
2081 (dwarf2_psymtab::read_symtab): Don't clear
2082 reading_partial_symbols.
2083
2084 2020-02-24 Tom de Vries <tdevries@suse.de>
2085
2086 PR gdb/25592
2087 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
2088
2089 2020-02-24 Tom de Vries <tdevries@suse.de>
2090
2091 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
2092 commands layout next/prev/regs.
2093
2094 2020-02-22 Tom Tromey <tom@tromey.com>
2095
2096 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
2097 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
2098
2099 2020-02-22 Tom Tromey <tom@tromey.com>
2100
2101 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
2102
2103 2020-02-22 Tom Tromey <tom@tromey.com>
2104
2105 * tui/tui-win.c (_initialize_tui_win): Add usage text.
2106 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
2107 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
2108 * tui/tui.c (_initialize_tui): Add usage text.
2109
2110 2020-02-22 Tom Tromey <tom@tromey.com>
2111
2112 * tui/tui-win.c (tui_set_focus_command)
2113 (tui_set_win_height_command): Use error_no_arg.
2114 (_initialize_tui_win): Update help text.
2115 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
2116
2117 2020-02-22 Tom Tromey <tom@tromey.com>
2118
2119 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
2120 * tui/tui-disasm.h (struct tui_disasm_window)
2121 <display_start_addr>: Declare.
2122 * tui/tui-source.h (struct tui_source_window)
2123 <display_start_addr>: Declare.
2124 * tui/tui-winsource.h (struct tui_source_window_base)
2125 <show_source_line, display_start_addr>: New methods.
2126 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
2127 Rename and move to protected section.
2128 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
2129 (tui_source_window_base::do_erase_source_content): Update.
2130 (tui_source_window_base::show_source_line): Now a method.
2131 (tui_source_window_base::show_source_content)
2132 (tui_source_window_base::tui_source_window_base)
2133 (tui_source_window_base::rerender)
2134 (tui_source_window_base::refill)
2135 (tui_source_window_base::do_scroll_horizontal)
2136 (tui_source_window_base::set_is_exec_point_at)
2137 (tui_source_window_base::update_breakpoint_info)
2138 (tui_source_window_base::update_exec_info): Update.
2139 * tui/tui-source.c (tui_source_window::set_contents)
2140 (tui_source_window::showing_source_p)
2141 (tui_source_window::do_scroll_vertical)
2142 (tui_source_window::location_matches_p)
2143 (tui_source_window::line_is_displayed): Update.
2144 (tui_source_window::display_start_addr): New method.
2145 * tui/tui-disasm.c (tui_disasm_window::set_contents)
2146 (tui_disasm_window::do_scroll_vertical)
2147 (tui_disasm_window::location_matches_p): Update.
2148 (tui_disasm_window::display_start_addr): New method.
2149
2150 2020-02-22 Tom Tromey <tom@tromey.com>
2151
2152 * NEWS: Add entry for gdb.register_window_type.
2153 * tui/tui-layout.h (window_factory): New typedef.
2154 (tui_register_window): Declare.
2155 * tui/tui-layout.c (saved_tui_windows): New global.
2156 (tui_apply_current_layout): Use it.
2157 (tui_register_window): New function.
2158 * python/python.c (do_start_initialization): Call
2159 gdbpy_initialize_tui.
2160 (python_GdbMethods): Add "register_window_type" function.
2161 * python/python-internal.h (gdbpy_register_tui_window)
2162 (gdbpy_initialize_tui): Declare.
2163 * python/py-tui.c: New file.
2164 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
2165
2166 2020-02-22 Tom Tromey <tom@tromey.com>
2167
2168 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
2169
2170 2020-02-22 Tom Tromey <tom@tromey.com>
2171
2172 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
2173 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
2174 * tui/tui-data.c (tui_set_win_with_focus): Remove.
2175 (tui_set_win_focus_to): Move from tui-win.c.
2176
2177 2020-02-22 Tom Tromey <tom@tromey.com>
2178
2179 * tui/tui-layout.c (make_standard_window, get_locator_window): New
2180 functions.
2181 (known_window_types): New global.
2182 (tui_get_window_by_name): Reimplement.
2183 (initialize_known_windows): New function.
2184 (validate_window_name): Rewrite.
2185 (_initialize_tui_layout): Call initialize_known_windows.
2186
2187 2020-02-22 Tom Tromey <tom@tromey.com>
2188
2189 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
2190 Remove constants.
2191 * tui/tui-winsource.h (struct tui_source_window_base)
2192 <tui_source_window_base>: Remove parameter.
2193 * tui/tui-winsource.c
2194 (tui_source_window_base::tui_source_window_base): Remove
2195 parameter.
2196 (tui_source_window_base::refill): Update.
2197 * tui/tui-stack.h (struct tui_locator_window)
2198 <tui_locator_window>: Update.
2199 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
2200 Default the constructor.
2201 * tui/tui-regs.h (struct tui_data_item_window)
2202 <tui_data_item_window>: Default the constructor.
2203 (struct tui_data_window) <tui_data_window>: Likewise.
2204 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
2205 Default the constructor.
2206 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
2207 Default the constructor.
2208 <type>: Remove.
2209 (struct tui_win_info) <tui_win_info>: Default the constructor.
2210 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
2211 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
2212 Default the constructor.
2213
2214 2020-02-22 Tom Tromey <tom@tromey.com>
2215
2216 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
2217 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
2218 * tui/tui-win.c (tui_resize_all): Don't call
2219 tui_delete_invisible_windows.
2220 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
2221 done.
2222 (tui_set_layout): Update.
2223 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
2224 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
2225 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
2226
2227 2020-02-22 Tom Tromey <tom@tromey.com>
2228
2229 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
2230 correctly.
2231
2232 2020-02-22 Tom Tromey <tom@tromey.com>
2233
2234 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
2235
2236 2020-02-22 Tom Tromey <tom@tromey.com>
2237
2238 * tui/tui-winsource.h (struct tui_source_window_iterator)
2239 <inner_iterator>: New etytypedef.
2240 <tui_source_window_iterator>: Take "end" parameter.
2241 <tui_source_window_iterator>: Take iterator.
2242 <operator*, advance>: Update.
2243 <m_iter>: Change type.
2244 <m_end>: New field.
2245 (struct tui_source_windows) <begin, end>: Update.
2246 * tui/tui-layout.c (tui_windows): New global.
2247 (tui_apply_current_layout): Clear tui_windows.
2248 (tui_layout_window::apply): Update tui_windows.
2249 * tui/tui-data.h (tui_windows): Declare.
2250 (all_tui_windows): Now inline function.
2251 (class tui_window_iterator, struct all_tui_windows): Remove.
2252
2253 2020-02-22 Tom Tromey <tom@tromey.com>
2254
2255 PR tui/17850:
2256 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
2257 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
2258 "height" argument.
2259 (class tui_layout_window) <get_sizes>: Likewise.
2260 (class tui_layout_split) <tui_layout_split>: Add "vertical"
2261 argument.
2262 <get_sizes>: Add "height" argument.
2263 <m_vertical>: New field.
2264 * tui/tui-layout.c (tui_layout_split::clone): Update.
2265 (tui_layout_split::get_sizes): Add "height" argument.
2266 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
2267 (tui_new_layout_command): Parse "-horizontal".
2268 (_initialize_tui_layout): Update help string.
2269 (tui_layout_split::specification): Add "-horizontal" when needed.
2270 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
2271 argument.
2272 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
2273 New methods.
2274
2275 2020-02-22 Tom Tromey <tom@tromey.com>
2276
2277 * tui/tui-layout.h (enum tui_adjust_result): New.
2278 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
2279 (class tui_layout_window) <adjust_size>: Return
2280 tui_adjust_result. Rewrite.
2281 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
2282 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
2283
2284 2020-02-22 Tom Tromey <tom@tromey.com>
2285
2286 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
2287 parameter and return types.
2288 (class tui_layout_base) <specification>: Add "depth".
2289 (class tui_layout_window) <specification>: Add "depth".
2290 (class tui_layout_split) <specification>: Add "depth".
2291 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
2292 and return types.
2293 (tui_new_layout_command): Parse sub-layouts.
2294 (_initialize_tui_layout): Update help string.
2295 (tui_layout_window::specification): Add "depth".
2296 (add_layout_command): Update.
2297
2298 2020-02-22 Tom Tromey <tom@tromey.com>
2299
2300 * NEWS: Add "tui new-layout" item.
2301 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
2302 Add new-layout command to help text.
2303 (validate_window_name): New function.
2304 (tui_new_layout_command): New function.
2305 (_initialize_tui_layout): Register "new-layout".
2306 (tui_layout_window::specification): New method.
2307 (tui_layout_window::specification): New method.
2308 * tui/tui-layout.h (class tui_layout_base) <specification>: New
2309 method.
2310 (class tui_layout_window) <specification>: New method.
2311 (class tui_layout_split) <specification>: New method.
2312
2313 2020-02-22 Tom Tromey <tom@tromey.com>
2314
2315 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
2316 * tui/tui-win.c (window_name_completer): Update comment.
2317 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
2318 Declare method.
2319 (class tui_layout_window) <replace_window>: Likewise.
2320 (class tui_layout_split) <replace_window>: Likewise.
2321 (tui_set_layout): Don't declare.
2322 (tui_set_initial_layout): Declare function.
2323 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
2324 (asm_regs_layout): New globals.
2325 (tui_current_layout, show_layout): Remove.
2326 (tui_set_layout, tui_add_win_to_layout): Rewrite.
2327 (find_layout, tui_apply_layout): New function.
2328 (layout_completer): Remove.
2329 (tui_next_layout): Reimplement.
2330 (tui_next_layout_command): New function.
2331 (tui_set_initial_layout, tui_prev_layout_command): New functions.
2332 (tui_regs_layout): Reimplement.
2333 (tui_regs_layout_command): New function.
2334 (extract_display_start_addr): Rewrite.
2335 (next_layout, prev_layout): Remove.
2336 (tui_layout_window::replace_window): New method.
2337 (tui_layout_split::replace_window): New method.
2338 (destroy_layout): New function.
2339 (layout_list): New global.
2340 (add_layout_command): New function.
2341 (initialize_layouts): Update.
2342 (tui_layout_command): New function.
2343 (_initialize_tui_layout): Install "layout" commands.
2344 * tui/tui-data.h (enum tui_layout_type): Remove.
2345 (tui_current_layout): Don't declare.
2346
2347 2020-02-22 Tom Tromey <tom@tromey.com>
2348
2349 * tui/tui-regs.c (tui_reg_layout): Remove.
2350 (tui_reg_command): Use tui_regs_layout.
2351 * tui/tui-layout.h (tui_reg_command): Declare.
2352 * tui/tui-layout.c (tui_reg_command): New function.
2353
2354 2020-02-22 Tom Tromey <tom@tromey.com>
2355
2356 * tui/tui.c (tui_rl_delete_other_windows): Call
2357 tui_remove_some_windows.
2358 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
2359 Declare method.
2360 (class tui_layout_window) <remove_windows>: New method.
2361 (class tui_layout_split) <remove_windows>: Declare.
2362 (tui_remove_some_windows): Declare.
2363 * tui/tui-layout.c (tui_remove_some_windows): New function.
2364 (tui_layout_split::remove_windows): New method.
2365
2366 2020-02-22 Tom Tromey <tom@tromey.com>
2367
2368 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
2369 * tui/tui-layout.h (tui_next_layout): Declare.
2370 * tui/tui-layout.c (tui_next_layout): New function.
2371
2372 2020-02-22 Tom Tromey <tom@tromey.com>
2373
2374 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
2375 correct coordinates.
2376
2377 2020-02-22 Tom Tromey <tom@tromey.com>
2378
2379 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
2380 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
2381 DATA_WIN case.
2382
2383 2020-02-22 Tom Tromey <tom@tromey.com>
2384
2385 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
2386 TUI_DISASM_WIN, not tui_win_list.
2387
2388 2020-02-22 Tom Tromey <tom@tromey.com>
2389
2390 * valprint.c (generic_val_print_enum_1)
2391 (val_print_type_code_flags): Style member names.
2392 * rust-lang.c (val_print_struct, rust_print_enum)
2393 (rust_print_struct_def, rust_internal_print_type): Style member
2394 names.
2395 * p-valprint.c (pascal_object_print_value_fields): Style member
2396 names. Only call fprintf_symbol_filtered for static members.
2397 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
2398 * f-valprint.c (f_val_print): Style member names.
2399 * f-typeprint.c (f_type_print_base): Style member names.
2400 * cp-valprint.c (cp_print_value_fields): Style member names. Only
2401 call fprintf_symbol_filtered for static members.
2402 (cp_print_class_member): Style member names.
2403 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
2404 member names.
2405 * ada-valprint.c (ada_print_scalar): Style enum names.
2406 (ada_val_print_enum): Likewise.
2407 * ada-typeprint.c (print_enum_type): Style enum names.
2408
2409 2020-02-21 Tom Tromey <tom@tromey.com>
2410
2411 * psympriv.h (struct partial_symtab): Update comment.
2412
2413 2020-02-21 Tom Tromey <tromey@adacore.com>
2414
2415 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
2416 type is CORE_ADDR.
2417
2418 2020-02-21 Tom de Vries <tdevries@suse.de>
2419
2420 PR gdb/25534
2421 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
2422 if dependencies[i]->user != NULL.
2423
2424 2020-02-21 Ali Tamur <tamur@google.com>
2425
2426 * dwarf2/read.c (dwarf2_name): Add null check.
2427
2428 2020-02-20 Tom Tromey <tom@tromey.com>
2429
2430 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
2431 ">=", in binary search.
2432 (dwarf2_find_containing_comp_unit): New overload.
2433 (run_test): New self-test.
2434 (_initialize_dwarf2_read): Register new test.
2435
2436 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
2437
2438 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
2439 * riscv-tdep.h: Likewise.
2440 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
2441 rv32-only CSR.
2442 * features/riscv/64bit-csr.xml: Regenerated.
2443
2444 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
2445 Tom Tromey <tom@tromey.com>
2446
2447 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
2448 of 'fputc_unfiltered'.
2449 (putchar_unfiltered): Call 'fputc_unfiltered'.
2450 (fputc_unfiltered): Call 'fputs_unfiltered'.
2451
2452 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
2453
2454 * config.in: Regenerate.
2455 * configure: Regenerate.
2456 * configure.ac: Add --with-python-libdir option.
2457 * main.c: Use WITH_PYTHON_LIBDIR.
2458
2459 2020-02-19 Tom Tromey <tom@tromey.com>
2460
2461 * symtab.c (general_symbol_info::compute_and_set_names): Use
2462 obstack_strndup. Simplify call to symbol_set_demangled_name.
2463
2464 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
2465
2466 * dwarf2/read.c (allocate_signatured_type_table,
2467 allocate_dwo_unit_table, allocate_type_unit_groups_table,
2468 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
2469 Remove objfile parameter, update all callers.
2470
2471 2020-02-19 Doug Evans <dje@google.com>
2472
2473 PR rust/25535
2474 * rust-lang.c (rust_print_enum): Apply embedded_offset to
2475 rust_enum_variant calculation.
2476
2477 2020-02-19 Tom Tromey <tromey@adacore.com>
2478
2479 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
2480
2481 2020-02-19 Tom Tromey <tromey@adacore.com>
2482
2483 * ada-lang.c (cache_symbol): Use obstack_strdup.
2484
2485 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
2486
2487 * configure: Regenerate.
2488
2489 2020-02-19 Tom Tromey <tromey@adacore.com>
2490
2491 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
2492 NULL check.
2493
2494 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
2495
2496 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
2497
2498 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
2499
2500 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
2501 if GDBSERVER is not defined.
2502 (riscv_tdesc_cache): Likewise, also store const target_desc.
2503 (STATIC_IN_GDB): Define.
2504 (riscv_create_target_description): Update declaration with
2505 STATIC_IN_GDB.
2506 (riscv_lookup_target_description): New function, only define if
2507 GDBSERVER is not defined.
2508 * arch/riscv.h (riscv_create_target_description): Declare only
2509 when GDBSERVER is defined.
2510 (riscv_lookup_target_description): New declaration when GDBSERVER
2511 is not defined.
2512 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
2513 (riscv_linux_read_features): ...this, and return
2514 riscv_gdbarch_features instead of target_desc.
2515 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
2516 (riscv_linux_read_description): Rename to...
2517 (riscv_linux_read_features): ...this.
2518 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
2519 Update to use riscv_gdbarch_features and
2520 riscv_lookup_target_description.
2521 * riscv-tdep.c (riscv_find_default_target_description): Use
2522 riscv_lookup_target_description instead of
2523 riscv_create_target_description.
2524
2525 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
2526
2527 * valprint.c (generic_val_print_enum_1): When printing a flag
2528 enum with value 0 and there is no enumerator with value 0, print
2529 just "0" instead of "(unknown: 0x0)".
2530
2531 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
2532
2533 * valprint.c (generic_val_print_enum_1): Print unknown part of
2534 flag enum in hex.
2535
2536 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
2537
2538 * dwarf2/read.c (update_enumeration_type_from_children): Allow
2539 flag enums to contain duplicate enumerators.
2540 * valprint.c (generic_val_print_enum_1): Update comment.
2541
2542 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
2543
2544 * dwarf2/read.c: Include "count-one-bits.h".
2545 (update_enumeration_type_from_children): If an enumerator has
2546 multiple bits set, don't treat the enumeration as a "flag enum".
2547 * valprint.c (generic_val_print_enum_1): Assert that enumerators
2548 of flag enums have 0 or 1 bit set.
2549
2550 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2551
2552 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
2553 conversion.
2554 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
2555 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
2556 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
2557 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
2558 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
2559
2560 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
2561
2562 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
2563
2564 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
2565
2566 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
2567 displaced_step_closure_up.
2568 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
2569 (struct displaced_step_closure_up):
2570 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
2571 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
2572 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
2573 Likewise.
2574 * gdbarch.sh (displaced_step_copy_insn): Likewise.
2575 * gdbarch.c, gdbarch.h: Re-generate.
2576 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
2577 displaced_step_closure_up.
2578 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
2579 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
2580 * infrun.h (displaced_step_closure_up): New type alias.
2581 (struct displaced_step_inferior_state) <step_closure>: Change
2582 type to displaced_step_closure_up.
2583 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
2584 displaced_step_closure_up.
2585 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
2586
2587 2020-02-14 Tom Tromey <tom@tromey.com>
2588
2589 * minidebug.c (gnu_debug_key): New global.
2590 (find_separate_debug_file_in_section): Use it.
2591
2592 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
2593
2594 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
2595 std::unique_ptr.
2596 * gdbarch.c: Re-generate.
2597 * gdbarch.h: Re-generate.
2598 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
2599 change.
2600 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
2601 type to std::unique_ptr.
2602 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
2603 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
2604 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
2605 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
2606 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
2607 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
2608 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
2609 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
2610 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
2611
2612 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
2613
2614 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
2615 std::unique_ptr.
2616 (displaced_step_clear): Rename to...
2617 (displaced_step_reset): ... this. Just call displaced->reset ().
2618 (displaced_step_clear_cleanup): Rename to...
2619 (displaced_step_reset_cleanup): ... this.
2620 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
2621 (displaced_step_fixup): Likewise.
2622 (resume_1): Likewise.
2623 (handle_inferior_event): Restore child's memory before calling
2624 displaced_step_fixup on the parent.
2625 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
2626 to std::unique_ptr.
2627 <step_closure>: Change type to std::unique_ptr.
2628
2629 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
2630
2631 * arm-tdep.c: Include count-one-bits.h.
2632 (cleanup_block_store_pc): Use count_one_bits.
2633 (cleanup_block_load_pc): Use count_one_bits.
2634 (arm_copy_block_xfer): Use count_one_bits.
2635 (thumb2_copy_block_xfer): Use count_one_bits.
2636 (thumb_copy_pop_pc_16bit): Use count_one_bits.
2637 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
2638 (thumb_get_next_pcs_raw): Use count_one_bits.
2639 (arm_get_next_pcs_raw): Use count_one_bits_l.
2640 * arch/arm.c (bitcount): Remove.
2641 * arch/arm.h (bitcount): Remove.
2642
2643 2020-02-14 Tom Tromey <tromey@adacore.com>
2644
2645 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
2646 Update.
2647 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
2648 * dwarf2/loc.c (call_site_find_chain_1): Return
2649 unique_xmalloc_ptr.
2650 (call_site_find_chain): Likewise.
2651
2652 2020-02-14 Richard Biener <rguenther@suse.de>
2653
2654 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
2655 on expression with division operators.
2656
2657 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
2658
2659 * MAINTAINERS (Write After Approval): Adding myself.
2660
2661 2020-02-12 Tom Tromey <tom@tromey.com>
2662
2663 * event-loop.c (event_data, gdb_event, event_handler_func):
2664 Remove.
2665
2666 2020-02-12 Tom Tromey <tom@tromey.com>
2667
2668 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
2669 (dwarf2_frame_objfile_data): Add comment.
2670 (find_comp_unit, set_comp_unit): New functions.
2671 (dwarf2_frame_find_fde): Use find_comp_unit.
2672 (dwarf2_build_frame_info): Use set_comp_unit.
2673
2674 2020-02-12 Tom Tromey <tom@tromey.com>
2675
2676 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
2677 (comp_unit): Don't initialize objfile.
2678 (execute_cfa_program): Add text_offset parameter.
2679 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
2680 (dwarf2_frame_cache): Update.
2681 (dwarf2_build_frame_info): Don't set "objfile" member.
2682
2683 2020-02-12 Tom Tromey <tom@tromey.com>
2684
2685 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
2686 (decode_frame_entry): Likewise.
2687 (dwarf2_build_frame_info): Update.
2688
2689 2020-02-12 Tom Tromey <tom@tromey.com>
2690
2691 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
2692 (decode_frame_entry_1): Use the comp_unit obstack.
2693
2694 2020-02-12 Tom Tromey <tom@tromey.com>
2695
2696 * dwarf2/frame.c (struct comp_unit): Add initializers and
2697 constructor.
2698 (dwarf2_frame_objfile_data): Store a comp_unit.
2699 (dwarf2_frame_find_fde): Update.
2700 (dwarf2_build_frame_info): Use "new".
2701
2702 2020-02-12 Tom Tromey <tom@tromey.com>
2703
2704 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
2705 (dwarf2_fde_table): Typedef for std::vector.
2706 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
2707 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
2708 (decode_frame_entry): Update.
2709 (dwarf2_build_frame_info): Use "new".
2710
2711 2020-02-12 Christian Biesinger <cbiesinger@google.com>
2712
2713 * arm-tdep.c (arm_gdbarch_init): Update.
2714 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
2715 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
2716 have_neon, is_m>: Change to bool.
2717
2718 2020-02-12 Christian Biesinger <cbiesinger@google.com>
2719
2720 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
2721
2722 2020-02-12 Tom Tromey <tom@tromey.com>
2723
2724 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
2725
2726 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
2727
2728 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
2729 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
2730
2731 2020-02-11 Tom Tromey <tom@tromey.com>
2732
2733 * psymtab.h: Update comment.
2734
2735 2020-02-11 Tom Tromey <tom@tromey.com>
2736
2737 * gdb_obstack.h (struct auto_obstack): Use
2738 DISABLE_COPY_AND_ASSIGN.
2739
2740 2020-02-11 Tom Tromey <tom@tromey.com>
2741
2742 * dwarf2/frame.h (struct objfile): Don't forward declare.
2743
2744 2020-02-11 Christian Biesinger <cbiesinger@google.com>
2745
2746 * cris-tdep.c (cris_supply_gregset): Change signature to match
2747 what struct regset expects.
2748 (cris_regset): New struct.
2749 (fetch_core_registers): Remove.
2750 (cris_iterate_over_regset_sections): New function.
2751 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
2752 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
2753
2754 2020-02-11 Christian Biesinger <cbiesinger@google.com>
2755
2756 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
2757 registers.
2758
2759 2020-02-11 Christian Biesinger <cbiesinger@google.com>
2760
2761 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
2762
2763 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2764
2765 * configure: Re-generate.
2766
2767 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2768
2769 * configure: Re-generate.
2770
2771 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2772
2773 * acinclude: Update warning.m4 path.
2774 * warning.m4: Move to gdbsupport.
2775
2776 2020-02-11 Tom Tromey <tromey@adacore.com>
2777
2778 * remote.c (remote_console_output): Update.
2779 * printcmd.c (printf_command): Update.
2780 * event-loop.c (gdb_wait_for_event): Update.
2781 * linux-nat.c (sigchld_handler): Update.
2782 * remote-sim.c (gdb_os_write_stdout): Update.
2783 (gdb_os_flush_stdout): Update.
2784 (gdb_os_flush_stderr): Update.
2785 (gdb_os_write_stderr): Update.
2786 * exceptions.c (print_exception): Update.
2787 * remote-fileio.c (remote_fileio_func_read): Update.
2788 (remote_fileio_func_write): Update.
2789 * tui/tui.c (tui_enable): Update.
2790 * tui/tui-interp.c (tui_interp::init): Update.
2791 * utils.c (init_page_info): Update.
2792 (putchar_unfiltered, fputc_unfiltered): Update.
2793 (gdb_flush): Update.
2794 (emit_style_escape): Update.
2795 (flush_wrap_buffer, fputs_maybe_filtered): Update.
2796 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
2797 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
2798 (stderr_file::write): Update.
2799 (stderr_file::puts): Update.
2800 * ui-file.h (ui_file_isatty, ui_file_write)
2801 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
2802 (ui_file_puts): Don't declare.
2803
2804 2020-02-10 Tom de Vries <tdevries@suse.de>
2805
2806 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
2807 sentinel to char *.
2808
2809 2020-02-09 Tom de Vries <tdevries@suse.de>
2810
2811 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
2812 filename if it matches "<artificial>".
2813
2814 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
2815
2816 * windows-tdep.c (struct enum_value_name): New struct.
2817 (create_enum): New function.
2818 (windows_get_siginfo_type): Create and use enum types.
2819
2820 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
2821
2822 * NEWS: Mention $_siginfo support for Windows.
2823 * windows-nat.c (handle_exception): Set siginfo_er.
2824 (windows_nat_target::mourn_inferior): Reset siginfo_er.
2825 (windows_xfer_siginfo): New function.
2826 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
2827 * windows-tdep.c (struct windows_gdbarch_data): New struct.
2828 (init_windows_gdbarch_data): New function.
2829 (get_windows_gdbarch_data): New function.
2830 (windows_get_siginfo_type): New function.
2831 (windows_init_abi): Register windows_get_siginfo_type.
2832 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
2833
2834 2020-02-08 Tom Tromey <tom@tromey.com>
2835
2836 * dwarf2/read.c (class cutu_reader) <cutu_reader,
2837 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
2838 <keep>: Declare method.
2839 <m_keep>: Remove member.
2840 <~cutu_reader>: Remove.
2841 (cutu_reader::init_tu_and_read_dwo_dies): Update.
2842 (cutu_reader::cutu_reader): Update.
2843 (cutu_reader::keep): Rename from ~cutu_reader.
2844 (process_psymtab_comp_unit, build_type_psymtabs_1)
2845 (process_skeletonless_type_unit, load_partial_comp_unit)
2846 (load_full_comp_unit, dwarf2_read_addr_index)
2847 (read_signatured_type): Update.
2848
2849 2020-02-08 Tom Tromey <tom@tromey.com>
2850
2851 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
2852 "want_partial_unit" parameter.
2853 (process_psymtab_comp_unit): Change want_partial_unit to bool.
2854 Inline check for DW_TAG_partial_unit.
2855 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
2856
2857 2020-02-08 Tom Tromey <tom@tromey.com>
2858
2859 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
2860 read.c.
2861 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
2862 read.c.
2863
2864 2020-02-08 Tom Tromey <tom@tromey.com>
2865
2866 * dwarf2/read.c (read_address): Move to comp-unit.c.
2867 (dwarf2_rnglists_process, dwarf2_ranges_process)
2868 (read_attribute_value, dwarf_decode_lines_1)
2869 (var_decode_location, decode_locdesc): Update.
2870 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
2871 read.c. Remove "cu" parameter.
2872 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
2873 method.
2874
2875 2020-02-08 Tom Tromey <tom@tromey.com>
2876
2877 * dwarf2/read.c (read_attribute_value, read_indirect_string)
2878 (read_indirect_line_string): Update.
2879 * dwarf2/comp-unit.c (read_offset): Remove.
2880 (read_comp_unit_head): Update.
2881 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
2882 method.
2883 (read_offset): Don't declare.
2884
2885 2020-02-08 Tom Tromey <tom@tromey.com>
2886
2887 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
2888 * dwarf2/read.c (struct comp_unit_head): Move to
2889 dwarf2/comp-unit.h.
2890 (enum class rcuh_kind): Move to comp-unit.h.
2891 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
2892 (read_comp_unit_head, error_check_comp_unit_head)
2893 (read_and_check_comp_unit_head): Move to comp-unit.c.
2894 (read_offset, dwarf_unit_type_name): Likewise.
2895 (create_debug_type_hash_table, read_cutu_die_from_dwo)
2896 (cutu_reader::cutu_reader, read_call_site_scope)
2897 (find_partial_die, follow_die_offset): Update.
2898 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
2899
2900 2020-02-08 Tom Tromey <tom@tromey.com>
2901
2902 * dwarf2/read.c (read_offset_1): Move to leb.c.
2903 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
2904 (dwarf_decode_macro_bytes): Update.
2905 * dwarf2/leb.c (read_offset): Rename; move from read.c.
2906 * dwarf2/leb.h (read_offset): Declare.
2907
2908 2020-02-08 Tom Tromey <tom@tromey.com>
2909
2910 * dwarf2/read.c (dwarf2_section_size): Remove.
2911 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
2912 Update.
2913 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
2914
2915 2020-02-08 Tom Tromey <tom@tromey.com>
2916
2917 * dwarf2/read.c (read_initial_length): Move to leb.c.
2918 * dwarf2/leb.h (read_initial_length): Declare.
2919 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
2920 handle_nonstd parameter.
2921 * dwarf2/frame.c (read_initial_length): Remove.
2922 (decode_frame_entry_1): Update.
2923
2924 2020-02-08 Tom Tromey <tom@tromey.com>
2925
2926 * dwarf2/loc.c (dwarf2_find_location_expression)
2927 (dwarf_evaluate_loc_desc::get_tls_address)
2928 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
2929 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
2930 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
2931 (dwarf2_compile_property_to_c)
2932 (dwarf2_loc_desc_get_symbol_read_needs)
2933 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
2934 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
2935 (loclist_describe_location, loclist_tracepoint_var_ref)
2936 (loclist_generate_c_location): Update.
2937 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
2938 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
2939 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
2940 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
2941 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
2942 (dwarf2_per_cu_data::addr_size)
2943 (dwarf2_per_cu_data::ref_addr_size)
2944 (dwarf2_per_cu_data::text_offset)
2945 (dwarf2_per_cu_data::addr_type): Now methods.
2946 (per_cu_header_read_in): Make per_cu "const".
2947 (dwarf2_version): Remove.
2948 (dwarf2_per_cu_data::int_type): Now a method.
2949 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
2950 (set_die_type, read_array_type, read_subrange_index_type)
2951 (read_tag_string_type, read_subrange_type): Update.
2952 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
2953 offset_size, ref_addr_size, text_offset, addr_type, version,
2954 objfile, int_type, addr_sized_int_type>: Declare methods.
2955
2956 2020-02-08 Tom Tromey <tom@tromey.com>
2957
2958 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
2959 Move earlier.
2960
2961 2020-02-08 Tom Tromey <tom@tromey.com>
2962
2963 * dwarf2/read.h (dwarf_line_debug): Declare.
2964 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
2965 * dwarf2/read.c: Move line_header code to new files.
2966 (dwarf_line_debug): No longer static.
2967 * dwarf2/line-header.c: New file.
2968 * dwarf2/line-header.h: New file.
2969
2970 2020-02-08 Tom Tromey <tom@tromey.com>
2971
2972 * dwarf2/read.c (struct line_header) <file_full_name,
2973 file_file_name>: Return unique_xmalloc_ptr.
2974 (line_header::file_file_name): Update.
2975 (line_header::file_full_name): Update.
2976 (dw2_get_file_names_reader): Update.
2977 (macro_start_file): Update.
2978
2979 2020-02-08 Tom Tromey <tom@tromey.com>
2980
2981 * dwarf2/read.c (struct line_header) <file_full_name,
2982 file_file_name>: Declare methods.
2983 (dw2_get_file_names_reader): Update.
2984 (file_file_name): Now a method.
2985 (file_full_name): Likewise.
2986 (macro_start_file): Update.
2987
2988 2020-02-08 Tom Tromey <tom@tromey.com>
2989
2990 * dwarf2/read.c (dwarf_always_disassemble)
2991 (show_dwarf_always_disassemble): Move to loc.c.
2992 (_initialize_dwarf2_read): Move "always-disassemble" registration
2993 to loc.c.
2994 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
2995 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
2996 static.
2997 (show_dwarf_always_disassemble): Move from read.c.
2998 (_initialize_dwarf2loc): Move always-disassemble from read.c.
2999
3000 2020-02-08 Tom Tromey <tom@tromey.com>
3001
3002 * dwarf2/read.c (~dwarf2_per_objfile): Update.
3003 (create_quick_file_names_table): Return htab_up.
3004 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
3005 Update.
3006 * dwarf2/read.h (struct dwarf2_per_objfile)
3007 <quick_file_names_table>: Now htab_up.
3008
3009 2020-02-08 Tom Tromey <tom@tromey.com>
3010
3011 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
3012
3013 2020-02-08 Tom Tromey <tom@tromey.com>
3014
3015 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
3016 Rewrite.
3017 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
3018 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
3019 (abbrev_table::abbrev_table): No longer inline.
3020 (ABBREV_HASH_SIZE): Remove.
3021 (abbrev_table::m_abbrevs): Now an htab_up.
3022
3023 2020-02-08 Tom Tromey <tom@tromey.com>
3024
3025 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
3026 (cutu_reader): Update.
3027 (build_type_psymtabs_1): Update.
3028 * dwarf2/abbrev.c (abbrev_table::read): Rename.
3029 (abbrev_table::alloc_abbrev): Update.
3030 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
3031 (abbrev_table::read): New static method, renamed from
3032 abbrev_table_read_table.
3033 (abbrev_table::alloc_abbrev)
3034 (abbrev_table::add_abbrev): Now private.
3035 (abbrev_table::abbrev_table): Now private.
3036 (abbrev_table::m_abbrev_obstack): Now private. Rename.
3037
3038 2020-02-08 Tom Tromey <tom@tromey.com>
3039
3040 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
3041 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
3042 htab_up.
3043
3044 2020-02-08 Tom Tromey <tom@tromey.com>
3045
3046 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
3047 htab_up.
3048 (lookup_dwo_unit_in_dwp): Update.
3049 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
3050 on obstack.
3051
3052 2020-02-08 Tom Tromey <tom@tromey.com>
3053
3054 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
3055 obstack.
3056
3057 2020-02-08 Tom Tromey <tom@tromey.com>
3058
3059 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
3060 line_header_hash.
3061 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
3062 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
3063 Change type to htab_up.
3064
3065 2020-02-08 Tom Tromey <tom@tromey.com>
3066
3067 * dwarf2/read.c (allocate_type_unit_groups_table): Return
3068 htab_up. Don't allocate on obstack.
3069 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
3070 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
3071 Change type to htab_up.
3072
3073 2020-02-08 Tom Tromey <tom@tromey.com>
3074
3075 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
3076 Change type to htab_up.
3077 * dwarf2/read.c (create_signatured_type_table_from_index)
3078 (create_signatured_type_table_from_debug_names)
3079 (create_all_type_units, add_type_unit)
3080 (lookup_dwo_signatured_type, lookup_signatured_type)
3081 (process_skeletonless_type_unit): Update.
3082 (create_debug_type_hash_table, create_debug_types_hash_table):
3083 Change type of types_htab.
3084 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
3085 htab_up. Don't allocate on obstack.
3086 (create_cus_hash_table): Change type of cus_htab parameter.
3087 (struct dwo_file) <cus, tus>: Now htab_up.
3088 (lookup_dwo_signatured_type, lookup_dwo_cutu)
3089 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
3090 (queue_and_load_all_dwo_tus): Update.
3091 * dwarf2/index-write.c (write_gdbindex): Update.
3092 (write_debug_names): Update.
3093
3094 2020-02-08 Tom Tromey <tom@tromey.com>
3095
3096 * dwarf2/read.h (struct dwarf2_queue_item): Move from
3097 dwarf2/read.c. Remove "next" member. Add constructor ntad
3098 destructor.
3099 (struct dwarf2_per_objfile) <queue>: New member.
3100 * dwarf2/read.c (struct dwarf2_queue_item): Move to
3101 dwarf2/read.h.
3102 (dwarf2_queue, dwarf2_queue_tail): Remove.
3103 (class dwarf2_queue_guard): Add parameter to constructor. Use
3104 DISABLE_COPY_AND_ASSIGN.
3105 <m_per_objfile>: New member.
3106 <~dwarf2_queue_guard>: Rewrite.
3107 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
3108 Update.
3109 (~dwarf2_queue_item): New.
3110
3111 2020-02-08 Tom Tromey <tom@tromey.com>
3112
3113 * dwarf2/read.c (struct die_info) <has_children>: New member.
3114 (dw2_get_file_names_reader): Remove has_children.
3115 (dw2_get_file_names): Update.
3116 (read_cutu_die_from_dwo): Remove has_children.
3117 (cutu_reader::init_tu_and_read_dwo_dies)
3118 (cutu_reader::cutu_reader): Update.
3119 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
3120 Remove has_children.
3121 (build_type_psymtabs_1, process_skeletonless_type_unit)
3122 (load_partial_comp_unit, load_full_comp_unit): Update.
3123 (create_dwo_cu_reader): Remove has_children.
3124 (create_cus_hash_table, read_die_and_children): Update.
3125 (read_full_die_1,read_full_die): Remove has_children.
3126 (read_signatured_type): Update.
3127 (class cutu_reader) <has_children>: Remove.
3128
3129 2020-02-08 Tom Tromey <tom@tromey.com>
3130
3131 * dwarf2/expr.c: Rename from dwarf2expr.c.
3132 * dwarf2/expr.h: Rename from dwarf2expr.h.
3133 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
3134 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
3135 * dwarf2/frame.c: Rename from dwarf2-frame.c.
3136 * dwarf2/frame.h: Rename from dwarf2-frame.h.
3137 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
3138 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
3139 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
3140 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
3141 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
3142 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
3143 * dwarf2/loc.c: Rename from dwarf2loc.c.
3144 * dwarf2/loc.h: Rename from dwarf2loc.h.
3145 * dwarf2/read.c: Rename from dwarf2read.c.
3146 * dwarf2/read.h: Rename from dwarf2read.h.
3147 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
3148 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
3149 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
3150 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
3151 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
3152 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
3153 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
3154 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
3155 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
3156 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
3157 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
3158 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
3159 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
3160 Update.
3161 * Makefile.in (COMMON_SFILES): Update.
3162 (HFILES_NO_SRCDIR): Update.
3163
3164 2020-02-08 Tom Tromey <tom@tromey.com>
3165
3166 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
3167 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
3168
3169 2020-02-08 Tom Tromey <tom@tromey.com>
3170
3171 * dwarf2read.h (struct die_info): Don't declare.
3172
3173 2020-02-08 Tom Tromey <tom@tromey.com>
3174
3175 * dwarf2read.h (die_info_ptr): Remove typedef.
3176
3177 2020-02-08 Tom Tromey <tom@tromey.com>
3178
3179 * dwarf2read.c (read_call_site_scope)
3180 (handle_data_member_location, dwarf2_add_member_fn)
3181 (mark_common_block_symbol_computed, read_common_block)
3182 (attr_to_dynamic_prop, partial_die_info::read)
3183 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
3184 (dwarf2_symbol_mark_computed, set_die_type): Update.
3185 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
3186 method.
3187 (attr_form_is_block): Don't declare.
3188 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
3189
3190 2020-02-08 Tom Tromey <tom@tromey.com>
3191
3192 * dwarf2read.c (dwarf2_find_base_address, )
3193 (read_call_site_scope, rust_containing_type)
3194 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
3195 (handle_data_member_location, dwarf2_add_member_fn)
3196 (get_alignment, read_structure_type, process_structure_scope)
3197 (mark_common_block_symbol_computed, read_common_block)
3198 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
3199 (partial_die_info::read, read_attribute_value, new_symbol)
3200 (lookup_die_type, dwarf2_get_ref_die_offset)
3201 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
3202 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
3203 (dwarf2_symbol_mark_computed): Update.
3204 * dwarf2/attribute.h (struct attribute) <value_as_address,
3205 form_is_section_offset, form_is_constant, form_is_ref>: Declare
3206 methods.
3207 (value_as_address, attr_form_is_section_offset)
3208 (attr_form_is_constant, attr_form_is_ref): Don't declare.
3209 * dwarf2/attribute.c (attribute::value_as_address)
3210 (attribute::form_is_section_offset, attribute::form_is_constant)
3211 (attribute::form_is_ref): Now methods.
3212
3213 2020-02-08 Tom Tromey <tom@tromey.com>
3214
3215 * dwarf2read.c (struct attribute, DW_STRING)
3216 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
3217 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
3218 (attr_form_is_block, attr_form_is_section_offset)
3219 (attr_form_is_constant, attr_form_is_ref): Move.
3220 * dwarf2/attribute.h: New file.
3221 * dwarf2/attribute.c: New file, from dwarf2read.c.
3222 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
3223
3224 2020-02-08 Tom Tromey <tom@tromey.com>
3225
3226 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
3227 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
3228 Move.
3229 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
3230 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
3231 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
3232 abbrev.c.
3233 * dwarf2/abbrev.h: New file.
3234 * dwarf2/abbrev.c: New file, from dwarf2read.c.
3235 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
3236
3237 2020-02-08 Tom Tromey <tom@tromey.com>
3238
3239 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
3240 (dwarf2_section_size, dwarf2_get_section_info)
3241 (create_signatured_type_table_from_debug_names)
3242 (create_addrmap_from_aranges, read_debug_names_from_section)
3243 (get_gdb_index_contents_from_section, read_comp_unit_head)
3244 (error_check_comp_unit_head, read_abbrev_offset)
3245 (create_debug_type_hash_table, init_cu_die_reader)
3246 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
3247 (read_comp_units_from_section, create_cus_hash_table)
3248 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
3249 (create_dwp_v2_section, dwarf2_rnglists_process)
3250 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
3251 (abbrev_table_read_table, read_indirect_string_at_offset_from)
3252 (read_indirect_string_from_dwz, read_addr_index_1)
3253 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
3254 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3255 (fill_in_loclist_baton): Update.
3256 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
3257 get_containing_section, get_bfd_owner, get_bfd_section,
3258 get_file_name, get_id, get_flags, empty, read>: Declare methods.
3259 (dwarf2_read_section, get_section_name, get_section_file_name)
3260 (get_containing_section, get_section_bfd_owner)
3261 (get_section_bfd_section, get_section_name, get_section_file_name)
3262 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
3263 declare.
3264 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
3265 (dwarf2_section_info::get_bfd_owner)
3266 (dwarf2_section_info::get_bfd_section)
3267 (dwarf2_section_info::get_name)
3268 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
3269 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
3270 (dwarf2_section_info::read): Now methods.
3271 * dwarf-index-write.c (class debug_names): Update.
3272
3273 2020-02-08 Tom Tromey <tom@tromey.com>
3274
3275 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
3276 Move to dwarf2/section.h.
3277 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
3278 (get_section_bfd_section, get_section_name)
3279 (get_section_file_name, get_section_id, get_section_flags)
3280 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
3281 dwarf2/section.c.
3282 * dwarf2/section.h: New file.
3283 * dwarf2/section.c: New file, from dwarf2read.c.
3284 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
3285
3286 2020-02-08 Tom Tromey <tom@tromey.com>
3287
3288 * dwarf2read.h (read_unsigned_leb128): Don't declare.
3289 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
3290 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
3291 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
3292 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
3293 * dwarf2/leb.h: New file, from dwarf2read.c.
3294 * dwarf2/leb.c: New file, from dwarf2read.c.
3295 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
3296 Remove.
3297 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
3298 (COMMON_SFILES): Add dwarf2/leb.c.
3299
3300 2020-02-08 Joel Brobecker <brobecker@adacore.com>
3301
3302 GDB 9.1 released.
3303
3304 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
3305
3306 PR gdb/25190:
3307 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
3308 * gdb/remote.c (remote_console_output): Update.
3309 * gdb/ui-file.c (fputs_unfiltered): Rename to...
3310 (ui_file_puts): ...this.
3311 * gdb/ui-file.h (ui_file_puts): Add declaration.
3312 * gdb/utils.c (emit_style_escape): Update.
3313 (flush_wrap_buffer): Update.
3314 (fputs_maybe_filtered): Update.
3315 (fputs_unfiltered): Add function.
3316
3317 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
3318
3319 * gdb/event-loop.c (gdb_wait_for_event): Update.
3320 * gdb/printcmd.c (printf_command): Update.
3321 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
3322 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
3323 (gdb_os_flush_stderr): Update.
3324 * gdb/remote.c (remote_console_output): Update.
3325 * gdb/ui-file.c (gdb_flush): Rename to...
3326 (ui_file_flush): ...this.
3327 (stderr_file::write): Update.
3328 (stderr_file::puts): Update.
3329 * gdb/ui-file.h (gdb_flush): Rename to...
3330 (ui_file_flush): ...this.
3331 * gdb/utils.c (gdb_flush): Add function.
3332 * gdb/utils.h (gdb_flush): Add declaration.
3333
3334 2020-02-07 Tom Tromey <tromey@adacore.com>
3335
3336 PR breakpoints/24915:
3337 * source.c (find_and_open_source): Do not check basenames_may_differ.
3338
3339 2020-02-07 Tom Tromey <tom@tromey.com>
3340
3341 * README: Update gdbserver documentation.
3342 * gdbserver: Move to top level.
3343 * configure.tgt (build_gdbserver): Remove.
3344 * configure.ac: Remove --enable-gdbserver.
3345 * configure: Rebuild.
3346 * Makefile.in (distclean): Don't mention gdbserver.
3347
3348 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
3349
3350 * source-cache.c (source_cache::ensure): Surround
3351 get_plain_source_lines with a try/catch.
3352 (source_cache::get_line_charpos): Get rid of try/catch
3353 and only check for the return value of "ensure".
3354 * tui/tui-source.c (tui_source_window::set_contents):
3355 Simplify "nlines" calculation.
3356
3357 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
3358
3359 * MAINTAINERS (Write After Approval): Add myself.
3360
3361 2020-02-05 Christian Biesinger <cbiesinger@google.com>
3362
3363 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
3364 function call.
3365
3366 2020-02-05 Christian Biesinger <cbiesinger@google.com>
3367
3368 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
3369
3370 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
3371
3372 * nat/riscv-linux-tdesc.h: New file.
3373 * nat/riscv-linux-tdesc.c: New file, taking code from...
3374 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
3375 ... here.
3376 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
3377 NATDEPFILES.
3378
3379 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
3380
3381 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
3382 we don't set the fake simulator ptid to the null_ptid.
3383
3384 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
3385
3386 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
3387 * gdbthread.h (class thread_info) <resumed>: Likewise.
3388 * infrun.c (resume_1): Likewise.
3389 (proceed): Likewise.
3390 (infrun_thread_stop_requested): Likewise.
3391 (stop_all_threads): Likewise.
3392 (handle_inferior_event): Likewise.
3393 (restart_threads): Likewise.
3394 (finish_step_over): Likewise.
3395 (keep_going_stepped_thread): Likewise.
3396 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
3397 (linux_handle_extended_wait): Likewise.
3398 * record-btrace.c (get_thread_current_frame_id): Likewise.
3399 * record-full.c (record_full_wait_1): Likewise.
3400 * remote.c (remote_target::process_initial_stop_replies): Likewise.
3401 * target.c (target_resume): Likewise.
3402 * thread.c (set_running_thread): Likewise.
3403
3404 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
3405
3406 * f-valprint.c (f77_print_array_1): Changed datatype of index
3407 variable to LONGEST from int to enable it to contain bound
3408 values correctly.
3409
3410 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
3411
3412 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
3413 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
3414 offsets according to FLEN determined.
3415 (riscv_linux_nat_target::read_description): Determine FLEN
3416 dynamically.
3417 (riscv_linux_nat_target::fetch_registers): Size regset buffer
3418 according to FLEN determined.
3419 (riscv_linux_nat_target::store_registers): Likewise.
3420
3421 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
3422
3423 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
3424 when reg->group is empty and reggroup is not.
3425
3426 2020-01-31 Tom Tromey <tromey@adacore.com>
3427
3428 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
3429 Call beneath target's mourn_inferior after unpushing.
3430
3431 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
3432
3433 PR tui/9765
3434 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
3435 have enough lines to fill the screen, still return the lowest
3436 address we found.
3437
3438 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
3439
3440 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
3441 '-', '<', and '>' commands.
3442
3443 2020-01-29 Pedro Alves <palves@redhat.com>
3444 Sergio Durigan Junior <sergiodj@redhat.com>
3445
3446 * infcmd.c (construct_inferior_arguments): Assert that
3447 'argc' is greater than 0.
3448
3449 2020-01-29 Luis Machado <luis.machado@linaro.org>
3450
3451 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
3452 (BRK_INSN_MASK): Define to 0xd4200000.
3453 (aarch64_program_breakpoint_here_p): New function.
3454 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
3455 * arch-utils.c (default_program_breakpoint_here_p): Moved from
3456 breakpoint.c.
3457 * arch-utils.h (default_program_breakpoint_here_p): Moved from
3458 breakpoint.h
3459 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
3460 call gdbarch_program_breakpoint_here_p.
3461 (program_breakpoint_here): Moved to arch-utils.c, renamed to
3462 default_program_breakpoint_here_p, changed return type to bool and
3463 simplified.
3464 * breakpoint.h (program_breakpoint_here): Moved prototype to
3465 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
3466 return type to bool.
3467 * gdbarch.c: Regenerate.
3468 * gdbarch.h: Regenerate.
3469 * gdbarch.sh (program_breakpoint_here_p): New method.
3470 * infrun.c (handle_signal_stop): Call
3471 gdbarch_program_breakpoint_here_p.
3472
3473 2020-01-26 Tom Tromey <tom@tromey.com>
3474
3475 * ctfread.c (struct ctf_fp_info): Reindent.
3476 (_initialize_ctfread): Remove.
3477
3478 2020-01-26 Tom Tromey <tom@tromey.com>
3479
3480 * psymtab.c (partial_map_expand_apply)
3481 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
3482 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
3483 (psym_print_stats, psym_expand_symtabs_for_function)
3484 (psym_map_symbol_filenames, psym_map_matching_symbols)
3485 (psym_expand_symtabs_matching)
3486 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
3487 (maintenance_check_psymtabs): Use new methods.
3488 * psympriv.h (struct partial_symtab) <readin_p,
3489 get_compunit_symtab>: New methods.
3490 <readin, compunit_symtab>: Remove members.
3491 (struct standard_psymtab): New.
3492 (struct legacy_psymtab): Derive from standard_psymtab.
3493 * dwarf2read.h (struct dwarf2_psymtab): Derive from
3494 standard_psymtab.
3495 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
3496
3497 2020-01-26 Tom Tromey <tom@tromey.com>
3498
3499 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
3500 read_dependencies. Add assert.
3501 * psymtab.c (partial_symtab::read_dependencies): New method.
3502 * psympriv.h (struct partial_symtab) <read_dependencies>: New
3503 method.
3504 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
3505 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
3506 read_dependencies.
3507 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
3508 Add assert.
3509
3510 2020-01-26 Tom Tromey <tom@tromey.com>
3511
3512 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
3513 Call expand_psymtab.
3514 (xcoff_read_symtab): Call expand_psymtab.
3515 (xcoff_start_psymtab, xcoff_end_psymtab): Set
3516 legacy_expand_psymtab.
3517 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
3518 method.
3519 (struct legacy_psymtab) <expand_psymtab>: Implement.
3520 <legacy_expand_psymtab>: New member.
3521 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
3522 (parse_partial_symbols): Set legacy_expand_psymtab.
3523 (psymtab_to_symtab_1): Change argument order. Call
3524 expand_psymtab.
3525 (new_psymtab): Set legacy_expand_psymtab.
3526 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
3527 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
3528 expand_psymtab.
3529 (dwarf2_psymtab::expand_psymtab): Rename from
3530 psymtab_to_symtab_1. Call expand_psymtab.
3531 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
3532 (dbx_end_psymtab): Likewise.
3533 (dbx_psymtab_to_symtab_1): Change argument order. Call
3534 expand_psymtab.
3535 (dbx_read_symtab): Call expand_psymtab.
3536 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
3537 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
3538 (ctf_psymtab::read_symtab): Call expand_psymtab.
3539
3540 2020-01-26 Tom Tromey <tom@tromey.com>
3541
3542 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
3543 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
3544 messages.
3545 * mdebugread.c (mdebug_read_symtab): Remove prints.
3546 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
3547 assert.
3548 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
3549
3550 2020-01-26 Tom Tromey <tom@tromey.com>
3551
3552 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
3553 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
3554 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
3555 legacy_symtab.
3556 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
3557 * psymtab.c (psymtab_to_symtab): Call method.
3558 (dump_psymtab): Update.
3559 * psympriv.h (struct partial_symtab): Add virtual destructor.
3560 <read_symtab>: New method.
3561 (struct legacy_symtab): New.
3562 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
3563 (struct pst_map) <pst>: Now a legacy_psymtab.
3564 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
3565 (new_psymtab): Use legacy_psymtab.
3566 * dwarf2read.h (struct dwarf2_psymtab): New.
3567 (struct dwarf2_per_cu_data) <psymtab>: Use it.
3568 * dwarf2read.c (dwarf2_create_include_psymtab)
3569 (dwarf2_build_include_psymtabs, create_type_unit_group)
3570 (create_partial_symtab, process_psymtab_comp_unit_reader)
3571 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
3572 (set_partial_user): Use dwarf2_psymtab.
3573 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
3574 (psymtab_to_symtab_1, process_full_comp_unit)
3575 (process_full_type_unit, dwarf2_ranges_read)
3576 (dwarf2_get_pc_bounds, psymtab_include_file_name)
3577 (dwarf_decode_lines): Use dwarf2_psymtab.
3578 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
3579 (add_address_entry_worker, write_one_signatured_type)
3580 (recursively_count_psymbols, recursively_write_psymbols)
3581 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
3582 (write_debug_names): Likewise.
3583 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
3584 <pst>: Now a legacy_psymtab.
3585 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
3586 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
3587 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
3588 * ctfread.c (struct ctf_psymtab): New.
3589 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
3590 ctf_psymtab.
3591 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
3592 (create_partial_symtab): Return a ctf_psymtab.
3593 (scan_partial_symbols): Update.
3594
3595 2020-01-26 Tom Tromey <tom@tromey.com>
3596
3597 * xcoffread.c (xcoff_start_psymtab): Use new.
3598 * psymtab.c (partial_symtab::partial_symtab): New constructor,
3599 renamed from start_psymtab_common.
3600 * psympriv.h (struct partial_symtab): Add new constructor.
3601 (start_psymtab_common): Don't declare.
3602 * mdebugread.c (parse_partial_symbols): Use new.
3603 * dwarf2read.c (create_partial_symtab): Use new.
3604 * dbxread.c (start_psymtab): Use new.
3605 * ctfread.c (create_partial_symtab): Use new.
3606
3607 2020-01-26 Tom Tromey <tom@tromey.com>
3608
3609 * xcoffread.c (xcoff_end_psymtab): Use new.
3610 * psymtab.c (start_psymtab_common): Use new.
3611 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
3612 Update.
3613 * psympriv.h (struct partial_symtab): Add parameters to
3614 constructor. Don't inline.
3615 (allocate_psymtab): Don't declare.
3616 * mdebugread.c (new_psymtab): Use new.
3617 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
3618 * dbxread.c (dbx_end_psymtab): Use new.
3619
3620 2020-01-26 Tom Tromey <tom@tromey.com>
3621
3622 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
3623 allocate_psymtab. Update documentation.
3624 * psymtab.c (psymtab_storage::install_psymtab): Rename from
3625 allocate_psymtab. Do not use new.
3626 (allocate_psymtab): Use new. Update.
3627
3628 2020-01-26 Tom Tromey <tom@tromey.com>
3629
3630 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3631 * psymtab.c (psym_print_stats): Update.
3632 * psympriv.h (struct partial_symtab) <readin,
3633 psymtabs_addrmap_supported, anonymous>: Now bool.
3634 * mdebugread.c (psymtab_to_symtab_1): Update.
3635 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
3636 (build_type_psymtabs_reader, psymtab_to_symtab_1)
3637 (process_full_comp_unit, process_full_type_unit): Update.
3638 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
3639 * ctfread.c (psymtab_to_symtab): Update.
3640
3641 2020-01-26 Tom Tromey <tom@tromey.com>
3642
3643 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
3644 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
3645 * psymtab.c (psymtab_storage): Delete psymtabs.
3646 (psymtab_storage::allocate_psymtab): Use new.
3647 (psymtab_storage::discard_psymtab): Use delete.
3648 * psympriv.h (struct partial_symtab): Add constructor and
3649 initializers.
3650
3651 2020-01-26 Tom Tromey <tom@tromey.com>
3652
3653 * machoread.c: Do not include psympriv.h.
3654
3655 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3656
3657 * NEWS: Mention the new option and the set/show commands.
3658
3659 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3660
3661 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
3662 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
3663 (validate_exec_file): New variables, enums, functions.
3664 (exec_file_locate_attach, print_section_info): Style the filenames.
3665 (_initialize_exec): Install show_exec_file_mismatch_command and
3666 set_exec_file_mismatch_command.
3667 * gdbcore.h (validate_exec_file): Declare.
3668 * infcmd.c (attach_command): Call validate_exec_file.
3669 * remote.c ( remote_target::remote_add_inferior): Likewise.
3670
3671 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
3672
3673 * frame.c (find_frame_sal): Move call to get_next_frame into more
3674 inner scope.
3675 * inline-frame.c (inilne_state) <inline_state>: Update argument
3676 types.
3677 (inilne_state) <skipped_symbol>: Rename to...
3678 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
3679 (skip_inline_frames): Build vector of skipped symbols and use this
3680 to reate the inline_state.
3681 (inline_skipped_symbol): Add a comment and some assertions, fetch
3682 skipped symbol from the list.
3683
3684 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
3685
3686 * buildsym.c (lte_is_less_than): Delete.
3687 (buildsym_compunit::end_symtab_with_blockvector): Create local
3688 lambda function to sort line table entries, and use
3689 std::stable_sort instead of std::sort.
3690 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
3691 markers when looking for a previous line.
3692
3693 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
3694
3695 * dwarf2read.c (lnp_state_machine::record_line): Include
3696 end_sequence parameter in debug print out. Record the line if we
3697 are at an end_sequence marker even if it's not the start of a
3698 statement.
3699 * symmisc.c (maintenance_print_one_line_table): Print end of
3700 sequence markers with 'END' not '0'.
3701
3702 2020-01-24 Pedro Alves <palves@redhat.com>
3703
3704 PR gdb/25410
3705 * thread.c (scoped_restore_current_thread::restore): Use
3706 switch_to_inferior_no_thread.
3707 * exec.c: Include "progspace-and-thread.h".
3708 (add_target_sections, remove_target_sections):
3709 scoped_restore_current_pspace_and_thread instead of
3710 scoped_restore_current_thread.
3711 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
3712 and aspace to the inferior before calling clone_program_space.
3713 Remove stale comment.
3714
3715 2020-01-24 Christian Biesinger <cbiesinger@google.com>
3716
3717 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
3718 (arm_netbsd_nat_target::fetch_registers): ...this.
3719 (arm_nbsd_nat_target::store_registers): Rename to...
3720 (arm_netbsd_nat_target::store_registers): ...this.
3721
3722 2020-01-24 Christian Biesinger <cbiesinger@google.com>
3723
3724 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
3725 register_t.
3726
3727 2020-01-24 Christian Biesinger <cbiesinger@google.com>
3728
3729 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
3730 Update comment.
3731 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
3732 Likewise.
3733 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
3734 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
3735 the correct replacement (iterate_over_regset_sections).
3736 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
3737 Update comment.
3738
3739 2020-01-24 Graham Markall <graham.markall@embecosm.com>
3740
3741 PR gdb/23718
3742 * gdb/python/python.c (execute_gdb_command): Call
3743 async_enable_stdin in catch block.
3744
3745 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
3746
3747 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
3748 SWITCH_THRU_ALL_UIS.
3749
3750 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
3751
3752 PR tui/9765
3753 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
3754 comment, add extra parameter, and update to store previous symbol
3755 when appropriate.
3756 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
3757 add extra parameter.
3758 * tui/tui-disasm.c (tui_disassemble): Update header comment,
3759 remove unneeded parameter, add try/catch around gdb_print_insn,
3760 rewrite to add items to asm_lines vector.
3761 (tui_find_backward_disassembly_start_address): New function.
3762 (tui_find_disassembly_address): Updated throughout.
3763 (tui_disasm_window::set_contents): Update for changes to
3764 tui_disassemble.
3765 (tui_disasm_window::do_scroll_vertical): No need to adjust the
3766 number of lines to scroll.
3767
3768 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
3769
3770 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
3771 (SECT_OFF_DATA): Likewise.
3772 (SECT_OFF_RODATA): Likewise.
3773 (SECT_OFF_TEXT): Likewise.
3774 (SECT_OFF_BSS): Likewise.
3775 (struct objfile) <text_section_offset, data_section_offset>: New
3776 methods.
3777 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
3778 objfile::text_section_offset.
3779 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
3780 * coffread.c (coff_symtab_read): Likewise.
3781 (enter_linenos): Likewise.
3782 (process_coff_symbol): Likewise.
3783 * ctfread.c (get_objfile_text_range): Likewise.
3784 * dtrace-probe.c (dtrace_probe::get_relocated_address):
3785 Use objfile::data_section_offset.
3786 * dwarf2-frame.c (execute_cfa_program): Use
3787 objfile::text_section_offset.
3788 (dwarf2_frame_find_fde): Likewise.
3789 * dwarf2read.c (create_addrmap_from_index): Likewise.
3790 (create_addrmap_from_aranges): Likewise.
3791 (dw2_find_pc_sect_compunit_symtab): Likewise.
3792 (process_psymtab_comp_unit_reader): Likewise.
3793 (add_partial_symbol): Likewise.
3794 (add_partial_subprogram): Likewise.
3795 (process_full_comp_unit): Likewise.
3796 (read_file_scope): Likewise.
3797 (read_func_scope): Likewise.
3798 (read_lexical_block_scope): Likewise.
3799 (read_call_site_scope): Likewise.
3800 (dwarf2_rnglists_process): Likewise.
3801 (dwarf2_ranges_process): Likewise.
3802 (dwarf2_ranges_read): Likewise.
3803 (dwarf_decode_lines_1): Likewise.
3804 (new_symbol): Likewise.
3805 (dwarf2_fetch_die_loc_sect_off): Likewise.
3806 (dwarf2_per_cu_text_offset): Likewise.
3807 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
3808 * hppa-tdep.c (read_unwind_info): Likewise.
3809 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
3810 * psympriv.h (struct partial_symtab): Likewise.
3811 * psymtab.c (find_pc_sect_psymtab): Likewise.
3812 * solib-svr4.c (enable_break): Likewise.
3813 * stap-probe.c (relocate_address): Use
3814 objfile::data_section_offset.
3815 * xcoffread.c (enter_line_range): Use
3816 objfile::text_section_offset.
3817 (read_xcoff_symtab): Likewise.
3818
3819 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
3820
3821 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
3822 declaration to narrower scopes.
3823
3824 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
3825
3826 * darwin-nat.h (struct darwin_exception_msg, enum
3827 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
3828 Move up.
3829 (class darwin_nat_target) <wait_1, check_new_threads,
3830 decode_exception_message, decode_message, stop_inferior,
3831 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
3832 * darwin-nat.c (darwin_check_new_threads): Rename to...
3833 (darwin_nat_target::check_new_threads): ... this.
3834 (darwin_suspend_inferior_it): Remove.
3835 (darwin_decode_exception_message): Rename to...
3836 (darwin_nat_target::decode_exception_message): ... this.
3837 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
3838 (darwin_decode_message): Rename to...
3839 (darwin_nat_target::decode_message): ... this.
3840 (cancel_breakpoint): Rename to...
3841 (darwin_nat_target::cancel_breakpoint): ... this.
3842 (darwin_wait): Rename to...
3843 (darwin_nat_target::wait_1): ... this. Use range-based for loop
3844 instead of iterate_over_inferiors.
3845 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
3846 (darwin_stop_inferior): Rename to...
3847 (darwin_nat_target::stop_inferior): ... this.
3848 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
3849 (darwin_init_thread_list): Rename to...
3850 (darwin_nat_target::init_thread_list): ... this.
3851 (darwin_ptrace_him): Rename to...
3852 (darwin_nat_target::ptrace_him): ... this.
3853 (darwin_nat_target::create_inferior): Pass lambda function to
3854 fork_inferior.
3855 (darwin_nat_target::detach): Call stop_inferior instead of
3856 darwin_stop_inferior.
3857 * fork-inferior.h (fork_inferior): Change init_trace_fun
3858 parameter to gdb::function_view.
3859 * fork-inferior.c (fork_inferior): Likewise.
3860
3861 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
3862
3863 * i386-cygwin-tdep.c (core_process_module_section): Update.
3864 * windows-nat.c (struct lm_info_windows): Add text_offset.
3865 (windows_xfer_shared_libraries): Update.
3866 * windows-tdep.c (windows_xfer_shared_library):
3867 Add text_offset_cached argument.
3868 * windows-tdep.h (windows_xfer_shared_library): Update.
3869
3870 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
3871
3872 * gdbarch.sh: Add declaration for _initialize_gdbarch.
3873
3874 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
3875
3876 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
3877 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
3878 replace with range-based for.
3879 (gdbsim_interrupt_inferior): Remove.
3880 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
3881 with a range-based for. Inline code from
3882 gdbsim_interrupt_inferior.
3883
3884 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
3885
3886 * infrun.c (proceed): Fix indentation.
3887
3888 2020-01-21 Tom Tromey <tromey@adacore.com>
3889
3890 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
3891 * python/python.c (python_extension_ops): Update.
3892 (gdbpy_colorize): New function.
3893 * python/lib/gdb/__init__.py (colorize): New function.
3894 * extension.h (ext_lang_colorize): Declare.
3895 * extension.c (ext_lang_colorize): New function.
3896 * extension-priv.h (struct extension_language_ops) <colorize>: New
3897 member.
3898 * cli/cli-style.c (_initialize_cli_style): Update help text.
3899
3900 2020-01-21 Luis Machado <luis.machado@linaro.org>
3901
3902 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
3903 <cond>: Change type to bool.
3904 (aarch64_displaced_step_b_cond): Update cond to use bool type.
3905 (aarch64_displaced_step_cb): Likewise.
3906 (aarch64_displaced_step_tb): Likewise.
3907
3908 2020-01-21 Luis Machado <luis.machado@linaro.org>
3909
3910 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
3911 output.
3912
3913 2020-01-21 Luis Machado <luis.machado@linaro.org>
3914
3915 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
3916 <pc_adjust>: Adjust the documentation.
3917 (aarch64_displaced_step_fixup): Check if PC really moved before
3918 adjusting it.
3919
3920 2020-01-19 Tom Tromey <tom@tromey.com>
3921
3922 * disasm.c (~gdb_disassembler): New destructor.
3923 (gdb_buffered_insn_length): Call disassemble_free_target.
3924 * disasm.h (class gdb_disassembler): Declare destructor. Use
3925 DISABLE_COPY_AND_ASSIGN.
3926
3927 2020-01-19 Tom Tromey <tom@tromey.com>
3928
3929 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
3930 (die_reader_func_ftype): Remove.
3931 (cutu_reader): New class.
3932 (dw2_get_file_names_reader): Remove "data" parameter.
3933 (dw2_get_file_names): Use cutu_reader.
3934 (create_debug_type_hash_table): Update.
3935 (read_cutu_die_from_dwo): Update comment.
3936 (lookup_dwo_unit): Add dwo_name parameter.
3937 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
3938 die_reader_func_ftype and data parameters.
3939 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
3940 Remove die_reader_func_ftype and data parameters.
3941 (~cutu_reader): New; from init_cutu_and_read_dies.
3942 (cutu_reader::cutu_reader): Rename from
3943 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
3944 and data parameters.
3945 (init_cutu_and_read_dies_simple): Remove.
3946 (struct process_psymtab_comp_unit_data): Remove.
3947 (process_psymtab_comp_unit_reader): Remove data parameter; add
3948 want_partial_unit and pretend_language parameters.
3949 (process_psymtab_comp_unit): Use cutu_reader.
3950 (build_type_psymtabs_reader): Remove data parameter.
3951 (build_type_psymtabs_1): Use cutu_reader.
3952 (process_skeletonless_type_unit): Likewise.
3953 (load_partial_comp_unit_reader): Remove.
3954 (load_partial_comp_unit): Use cutu_reader.
3955 (load_full_comp_unit_reader): Remove.
3956 (load_full_comp_unit): Use cutu_reader.
3957 (struct create_dwo_cu_data): Remove.
3958 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
3959 dwo_unit parameters.
3960 (create_cus_hash_table): Use cutu_reader.
3961 (struct dwarf2_read_addr_index_data): Remove.
3962 (dwarf2_read_addr_index_reader): Remove.
3963 (dwarf2_read_addr_index): Use cutu_reader.
3964 (read_signatured_type_reader): Remove.
3965 (read_signatured_type): Use cutu_reader.
3966
3967 2020-01-19 Tom Tromey <tom@tromey.com>
3968
3969 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
3970 * tui/tui-wingeneral.h (class tui_suppress_output): New.
3971 (tui_wrefresh): Declare.
3972 * tui/tui-wingeneral.c (suppress_output): New global.
3973 (tui_suppress_output, ~tui_suppress_output): New constructor and
3974 destructor.
3975 (tui_wrefresh): New function.
3976 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
3977 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
3978 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
3979 method.
3980 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
3981 tui_wrefresh.
3982 (tui_data_window::no_refresh): New method.
3983 (tui_data_item_window::refresh_window): Call tui_wrefresh.
3984 (tui_reg_command): Use tui_suppress_output
3985 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
3986 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
3987 method.
3988 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
3989
3990 2020-01-19 Tom Tromey <tom@tromey.com>
3991
3992 * tui/tui-winsource.c (tui_update_source_windows_with_line):
3993 Handle case where symtab is null.
3994
3995 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
3996
3997 * linux-fork.c (one_fork_p): Simplify.
3998
3999 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
4000
4001 * top.c (struct qt_args): Remove.
4002 (kill_or_detach): Change return type to void, replace `void *`
4003 parameter with a proper one.
4004 (print_inferior_quit_action): Likewise.
4005 (quit_confirm): Use range-based for loop to iterate over inferiors.
4006 (quit_force): Likewise.
4007
4008 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
4009
4010 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
4011 `void *` parameter with proper parameters.
4012 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
4013 (print_one_inferior): Change return type to void, replace `void *`
4014 parameter with proper parameters.
4015 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
4016 inferiors.
4017 (get_other_inferior): Remove.
4018 (mi_cmd_remove_inferior): Use range-based loop to iterate over
4019 inferiors.
4020
4021 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
4022
4023 * mi/mi-interp.c (report_initial_inferior): Remove.
4024 (mi_interp::init): Use range-based for to iterate over inferiors.
4025
4026 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
4027
4028 * python/py-inferior.c (build_inferior_list): Remove.
4029 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
4030
4031 2020-01-16 Christian Biesinger <cbiesinger@google.com>
4032
4033 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
4034 (btrace_stitch_trace): Likewise.
4035 * charset.c (intermediate_encoding): Likewise (vaild).
4036 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
4037 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
4038 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
4039
4040 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
4041
4042 * windows-tdep.c (windows_get_tlb_type):
4043 Add rtl_user_process_parameters type.
4044
4045 2020-01-16 Pedro Alves <palves@redhat.com>
4046 Norbert Lange <nolange79@gmail.com>
4047
4048 PR build/24805
4049 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
4050 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
4051 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
4052 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
4053 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
4054 (ps_plog): Redeclare exported functions with default visibility.
4055
4056 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
4057
4058 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
4059 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
4060
4061 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
4062
4063 * infcmd.c (post_create_inferior): Use get_thread_regcache
4064 instead of get_current_regcache.
4065
4066 2020-01-14 Tom Tromey <tom@tromey.com>
4067
4068 PR symtab/12535:
4069 * python/python.c (gdbpy_decode_line): Treat empty string the same
4070 as no argument.
4071
4072 2020-01-14 Tom Tromey <tom@tromey.com>
4073
4074 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
4075
4076 2020-01-14 Tom Tromey <tom@tromey.com>
4077
4078 * nat/linux-btrace.c: Don't include <config.h>.
4079 * nat/linux-ptrace.c: Don't include <config.h>.
4080 * nat/x86-linux-dregs.c: Don't include <config.h>.
4081
4082 2020-01-14 Tom Tromey <tom@tromey.com>
4083
4084 * configure: Rebuild.
4085 * configure.ac: Move many checks to ../gdbsupport/common.m4.
4086
4087 2020-01-14 Tom Tromey <tom@tromey.com>
4088
4089 * nat/x86-linux-dregs.c: Include configh.h.
4090 * nat/linux-ptrace.c: Include configh.h.
4091 * nat/linux-btrace.c: Include configh.h.
4092 * defs.h: Include config.h, bfd.h.
4093 * configure.ac: Don't source common.host.
4094 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
4095 * configure: Rebuild.
4096 * acinclude.m4: Update path.
4097 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
4098 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
4099 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
4100 (CLIBS): Add LIBSUPPORT.
4101 (CDEPS): Likewise.
4102 (COMMON_SFILES): Remove gdbsupport files.
4103 (HFILES_NO_SRCDIR): Likewise.
4104 (stamp-version): Update path to create-version.sh.
4105 (ALLDEPFILES): Remove gdbsupport files.
4106
4107 2020-01-14 Tom Tromey <tom@tromey.com>
4108
4109 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
4110 USE_WIN32API when needed.
4111 * configure.ac (USE_WIN32API): Don't define.
4112 (WIN32LIBS): Use WIN32APILIBS.
4113 * configure: Rebuild.
4114
4115 2020-01-14 Tom Tromey <tom@tromey.com>
4116
4117 * configure: Rebuild.
4118 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
4119
4120 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4121
4122 * skip.c (skip_function_command): Make skip w/o arguments use the
4123 name of the inlined function if pc is inside any inlined function.
4124
4125 2020-01-14 Luis Machado <luis.machado@linaro.org>
4126
4127 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
4128 * infrun.c (resume_1): Likewise.
4129 (handle_inferior_event): Remove stale comment.
4130 * linux-nat.c (linux_nat_target::resume): Update comments.
4131 (save_stop_reason): Likewise.
4132 (linux_nat_filter_event): Likewise.
4133 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
4134
4135 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
4136
4137 * elfread.c (record_minimal_symbol): Set section index to 0 for
4138 non-allocatable sections.
4139
4140
4141 2020-01-13 Ali Tamur <tamur@google.com>
4142
4143 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
4144 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
4145 to gdb::optional. Update comments.
4146 (dwo_file): Update comments.
4147 (read_attribute): Update API to take an additional out parameter,
4148 need_reprocess. This is used to mark attributes that need other
4149 attributes (e.g. str_offsets_base) for correct computation which may not
4150 have been read yet.
4151 (read_attribute_reprocess): New function declaration.
4152 (read_addr_index): Likewise.
4153 (read_dwo_str_index): Likewise.
4154 (read_stub_str_index): Likewise.
4155 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
4156 (lookup_addr_base): New function definition.
4157 (lookup_ranges_base): Likewise.
4158 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
4159 lookup_ranges_base.
4160 (init_cutu_and_read_dies): Update comments.
4161 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
4162 unit. This is used to inherit parent's str_offsets_base and addr_base.
4163 Update comments.
4164 (init_cutu_and_read_dies_simple): Reflect API changes.
4165 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
4166 (create_cus_hash_table): Change API to take parent compile unit.
4167 Reflect API changes.
4168 (open_and_init_dwo_file): Reflect API changes.
4169 (dwarf2_get_pc_bounds): Update comments.
4170 (dwarf2_record_block_ranges): Likewise.
4171 (read_full_die_1): Change implementation to reprocess attributes that
4172 need str_offsets_base and addr_base.
4173 (partial_die_info::read): Likewise.
4174 (read_attribute_reprocess): New function definition.
4175 (read_attribute_value): Change API to take an additional out parameter,
4176 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
4177 when a non-dwo compile unit has index based attributes.
4178 (read_attribute): Reflect API changes.
4179 (read_addr_index_1): Reflect API changes. Update comments.
4180 (dwarf2_read_addr_index_data): Reflect API changes.
4181 (dwarf2_read_addr_index): Likewise.
4182 (read_str_index): Change API and implementation. This becomes a helper
4183 to be used by the new string index related methods. Update error
4184 message and comments.
4185 (read_dwo_str_index): New function definition.
4186 (read_stub_str_index): Likewise.
4187 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
4188 * symfile.h (dwarf2_debug_sections): Likewise.
4189 * xcoffread.c (dwarf2_debug_sections): Likewise.
4190
4191 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4192
4193 * gdbcore.h (struct core_fns) <core_read_registers>: Change
4194 core_reg_sect type to gdb_byte *.
4195 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
4196 * cris-tdep.c (fetch_core_registers): Likewise.
4197 * corelow.c (core_target::get_core_register_section): Change
4198 type of `contents` to gdb::byte_vector.
4199
4200 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
4201
4202 * tui/tui-wingeneral.c (box_win): Position the title in the center
4203 of the border.
4204
4205 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
4206
4207 * corelow.c (core_target::get_core_register_section): Use
4208 std::vector instead of alloca.
4209
4210 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4211
4212 * warning.m4: Add -Wmissing-declarations to build_warnings.
4213 * configure: Re-generate.
4214
4215 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4216
4217 * python/python.c (init__gdb_module): Add declaration.
4218
4219 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4220
4221 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
4222 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
4223 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
4224 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
4225 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
4226 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
4227 * ada-exp.y (_initialize_ada_exp): Add declaration.
4228 * ada-lang.c (_initialize_ada_language): Add declaration.
4229 * ada-tasks.c (_initialize_tasks): Add declaration.
4230 * agent.c (_initialize_agent): Add declaration.
4231 * aix-thread.c (_initialize_aix_thread): Add declaration.
4232 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
4233 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
4234 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
4235 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
4236 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
4237 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
4238 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
4239 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
4240 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
4241 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
4242 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
4243 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
4244 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
4245 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
4246 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
4247 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
4248 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
4249 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
4250 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
4251 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
4252 * annotate.c (_initialize_annotate): Add declaration.
4253 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
4254 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
4255 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
4256 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
4257 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
4258 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
4259 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
4260 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
4261 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
4262 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
4263 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
4264 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
4265 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
4266 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
4267 * auto-load.c (_initialize_auto_load): Add declaration.
4268 * auxv.c (_initialize_auxv): Add declaration.
4269 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
4270 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
4271 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
4272 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
4273 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
4274 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
4275 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
4276 * breakpoint.c (_initialize_breakpoint): Add declaration.
4277 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
4278 * btrace.c (_initialize_btrace): Add declaration.
4279 * charset.c (_initialize_charset): Add declaration.
4280 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
4281 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
4282 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
4283 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
4284 * cli/cli-script.c (_initialize_cli_script): Add declaration.
4285 * cli/cli-style.c (_initialize_cli_style): Add declaration.
4286 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
4287 * coffread.c (_initialize_coffread): Add declaration.
4288 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
4289 * compile/compile.c (_initialize_compile): Add declaration.
4290 * complaints.c (_initialize_complaints): Add declaration.
4291 * completer.c (_initialize_completer): Add declaration.
4292 * copying.c (_initialize_copying): Add declaration.
4293 * corefile.c (_initialize_core): Add declaration.
4294 * corelow.c (_initialize_corelow): Add declaration.
4295 * cp-abi.c (_initialize_cp_abi): Add declaration.
4296 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
4297 * cp-support.c (_initialize_cp_support): Add declaration.
4298 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
4299 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
4300 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
4301 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
4302 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
4303 * ctfread.c (_initialize_ctfread): Add declaration.
4304 * d-lang.c (_initialize_d_language): Add declaration.
4305 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
4306 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
4307 * dbxread.c (_initialize_dbxread): Add declaration.
4308 * dcache.c (_initialize_dcache): Add declaration.
4309 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
4310 * disasm.c (_initialize_disasm): Add declaration.
4311 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
4312 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
4313 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
4314 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
4315 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
4316 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
4317 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
4318 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
4319 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
4320 * elfread.c (_initialize_elfread): Add declaration.
4321 * exec.c (_initialize_exec): Add declaration.
4322 * extension.c (_initialize_extension): Add declaration.
4323 * f-lang.c (_initialize_f_language): Add declaration.
4324 * f-valprint.c (_initialize_f_valprint): Add declaration.
4325 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
4326 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
4327 * filesystem.c (_initialize_filesystem): Add declaration.
4328 * findcmd.c (_initialize_mem_search): Add declaration.
4329 * findvar.c (_initialize_findvar): Add declaration.
4330 * fork-child.c (_initialize_fork_child): Add declaration.
4331 * frame-base.c (_initialize_frame_base): Add declaration.
4332 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
4333 * frame.c (_initialize_frame): Add declaration.
4334 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
4335 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
4336 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
4337 * gcore.c (_initialize_gcore): Add declaration.
4338 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
4339 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
4340 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
4341 * gdbarch.c (_initialize_gdbarch): Add declaration.
4342 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
4343 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
4344 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
4345 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
4346 * go-lang.c (_initialize_go_language): Add declaration.
4347 * go32-nat.c (_initialize_go32_nat): Add declaration.
4348 * guile/guile.c (_initialize_guile): Add declaration.
4349 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
4350 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
4351 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
4352 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
4353 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
4354 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
4355 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
4356 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
4357 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
4358 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
4359 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
4360 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
4361 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
4362 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
4363 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
4364 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
4365 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
4366 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
4367 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
4368 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
4369 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
4370 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
4371 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
4372 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
4373 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
4374 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
4375 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
4376 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
4377 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
4378 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
4379 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
4380 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
4381 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
4382 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
4383 * infcall.c (_initialize_infcall): Add declaration.
4384 * infcmd.c (_initialize_infcmd): Add declaration.
4385 * inflow.c (_initialize_inflow): Add declaration.
4386 * infrun.c (_initialize_infrun): Add declaration.
4387 * interps.c (_initialize_interpreter): Add declaration.
4388 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
4389 * jit.c (_initialize_jit): Add declaration.
4390 * language.c (_initialize_language): Add declaration.
4391 * linux-fork.c (_initialize_linux_fork): Add declaration.
4392 * linux-nat.c (_initialize_linux_nat): Add declaration.
4393 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
4394 * linux-thread-db.c (_initialize_thread_db): Add declaration.
4395 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
4396 * m2-lang.c (_initialize_m2_language): Add declaration.
4397 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
4398 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
4399 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
4400 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
4401 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
4402 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
4403 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
4404 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
4405 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
4406 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
4407 * machoread.c (_initialize_machoread): Add declaration.
4408 * macrocmd.c (_initialize_macrocmd): Add declaration.
4409 * macroscope.c (_initialize_macroscope): Add declaration.
4410 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
4411 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
4412 * maint.c (_initialize_maint_cmds): Add declaration.
4413 * mdebugread.c (_initialize_mdebugread): Add declaration.
4414 * memattr.c (_initialize_mem): Add declaration.
4415 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
4416 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
4417 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
4418 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
4419 * mi/mi-main.c (_initialize_mi_main): Add declaration.
4420 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
4421 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
4422 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
4423 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
4424 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
4425 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
4426 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
4427 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
4428 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
4429 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
4430 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
4431 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
4432 * mipsread.c (_initialize_mipsread): Add declaration.
4433 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
4434 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
4435 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
4436 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
4437 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
4438 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
4439 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
4440 * nto-procfs.c (_initialize_procfs): Add declaration.
4441 * objc-lang.c (_initialize_objc_language): Add declaration.
4442 * observable.c (_initialize_observer): Add declaration.
4443 * opencl-lang.c (_initialize_opencl_language): Add declaration.
4444 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
4445 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
4446 * osabi.c (_initialize_gdb_osabi): Add declaration.
4447 * osdata.c (_initialize_osdata): Add declaration.
4448 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
4449 * parse.c (_initialize_parse): Add declaration.
4450 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
4451 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
4452 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
4453 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
4454 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
4455 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
4456 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
4457 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
4458 * printcmd.c (_initialize_printcmd): Add declaration.
4459 * probe.c (_initialize_probe): Add declaration.
4460 * proc-api.c (_initialize_proc_api): Add declaration.
4461 * proc-events.c (_initialize_proc_events): Add declaration.
4462 * proc-service.c (_initialize_proc_service): Add declaration.
4463 * procfs.c (_initialize_procfs): Add declaration.
4464 * producer.c (_initialize_producer): Add declaration.
4465 * psymtab.c (_initialize_psymtab): Add declaration.
4466 * python/python.c (_initialize_python): Add declaration.
4467 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
4468 * record-btrace.c (_initialize_record_btrace): Add declaration.
4469 * record-full.c (_initialize_record_full): Add declaration.
4470 * record.c (_initialize_record): Add declaration.
4471 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
4472 * regcache.c (_initialize_regcache): Add declaration.
4473 * reggroups.c (_initialize_reggroup): Add declaration.
4474 * remote-notif.c (_initialize_notif): Add declaration.
4475 * remote-sim.c (_initialize_remote_sim): Add declaration.
4476 * remote.c (_initialize_remote): Add declaration.
4477 * reverse.c (_initialize_reverse): Add declaration.
4478 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
4479 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
4480 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
4481 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
4482 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
4483 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
4484 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
4485 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
4486 Add declaration.
4487 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
4488 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
4489 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
4490 * rust-exp.y (_initialize_rust_exp): Add declaration.
4491 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
4492 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
4493 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
4494 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
4495 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
4496 * score-tdep.c (_initialize_score_tdep): Add declaration.
4497 * ser-go32.c (_initialize_ser_dos): Add declaration.
4498 * ser-mingw.c (_initialize_ser_windows): Add declaration.
4499 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
4500 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
4501 * ser-uds.c (_initialize_ser_socket): Add declaration.
4502 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
4503 * serial.c (_initialize_serial): Add declaration.
4504 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
4505 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
4506 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
4507 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
4508 * skip.c (_initialize_step_skip): Add declaration.
4509 * sol-thread.c (_initialize_sol_thread): Add declaration.
4510 * solib-aix.c (_initialize_solib_aix): Add declaration.
4511 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
4512 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
4513 * solib-frv.c (_initialize_frv_solib): Add declaration.
4514 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
4515 * solib-target.c (_initialize_solib_target): Add declaration.
4516 * solib.c (_initialize_solib): Add declaration.
4517 * source-cache.c (_initialize_source_cache): Add declaration.
4518 * source.c (_initialize_source): Add declaration.
4519 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
4520 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
4521 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
4522 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
4523 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
4524 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
4525 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
4526 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
4527 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
4528 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
4529 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
4530 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
4531 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
4532 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
4533 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
4534 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
4535 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
4536 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
4537 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
4538 * stabsread.c (_initialize_stabsread): Add declaration.
4539 * stack.c (_initialize_stack): Add declaration.
4540 * stap-probe.c (_initialize_stap_probe): Add declaration.
4541 * std-regs.c (_initialize_frame_reg): Add declaration.
4542 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
4543 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
4544 * symfile.c (_initialize_symfile): Add declaration.
4545 * symmisc.c (_initialize_symmisc): Add declaration.
4546 * symtab.c (_initialize_symtab): Add declaration.
4547 * target.c (_initialize_target): Add declaration.
4548 * target-connection.c (_initialize_target_connection): Add
4549 declaration.
4550 * target-dcache.c (_initialize_target_dcache): Add declaration.
4551 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
4552 * thread.c (_initialize_thread): Add declaration.
4553 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
4554 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
4555 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
4556 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
4557 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
4558 * tracectf.c (_initialize_ctf): Add declaration.
4559 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
4560 * tracefile.c (_initialize_tracefile): Add declaration.
4561 * tracepoint.c (_initialize_tracepoint): Add declaration.
4562 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
4563 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
4564 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
4565 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
4566 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
4567 * tui/tui-win.c (_initialize_tui_win): Add declaration.
4568 * tui/tui.c (_initialize_tui): Add declaration.
4569 * typeprint.c (_initialize_typeprint): Add declaration.
4570 * ui-style.c (_initialize_ui_style): Add declaration.
4571 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
4572 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
4573 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
4574 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
4575 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
4576 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
4577 * unittests/filtered_iterator-selftests.c
4578 (_initialize_filtered_iterator_selftests): Add declaration.
4579 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
4580 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
4581 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
4582 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
4583 * unittests/main-thread-selftests.c
4584 (_initialize_main_thread_selftests): Add declaration.
4585 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
4586 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
4587 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
4588 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
4589 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
4590 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
4591 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
4592 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
4593 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
4594 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
4595 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
4596 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
4597 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
4598 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
4599 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
4600 declaration.
4601 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
4602 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
4603 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
4604 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
4605 * user-regs.c (_initialize_user_regs): Add declaration.
4606 * utils.c (_initialize_utils): Add declaration.
4607 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
4608 * valops.c (_initialize_valops): Add declaration.
4609 * valprint.c (_initialize_valprint): Add declaration.
4610 * value.c (_initialize_values): Add declaration.
4611 * varobj.c (_initialize_varobj): Add declaration.
4612 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
4613 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
4614 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
4615 * windows-nat.c (_initialize_windows_nat): Add declaration.
4616 (_initialize_check_for_gdb_ini): Add declaration.
4617 (_initialize_loadable): Add declaration.
4618 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
4619 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
4620 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
4621 * xcoffread.c (_initialize_xcoffread): Add declaration.
4622 * xml-support.c (_initialize_xml_support): Add declaration.
4623 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
4624 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
4625 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
4626 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
4627
4628 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
4629
4630 * regformats/regdat.sh: Generate declaration for init function.
4631
4632 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
4633
4634 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
4635 up.
4636 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
4637 close_one_inferior>: New methods.
4638 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
4639 pass down target to find_inferior_pid.
4640 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
4641 Pass down target to find_inferior_ptid.
4642 (gdbsim_target::create_inferior): Pass down target to
4643 add_thread_silent.
4644 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
4645 target down to find_inferior_ptid and switch_to_thread.
4646 (gdbsim_target::close): Update to call close_one_inferior.
4647 (struct resume_data): Remove.
4648 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
4649 directly, rather than through a void pointer.
4650 (gdbsim_target::resume): Update to call resume_one_inferior.
4651
4652 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4653
4654 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
4655
4656 2020-01-12 Pedro Alves <palves@redhat.com>
4657
4658 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
4659 directly for the current inferior instead of
4660 discard_all_inferiors.
4661 (discard_all_inferiors): Delete.
4662
4663 2020-01-11 Tom Tromey <tom@tromey.com>
4664
4665 * tui/tui-wingeneral.c (box_win): Check cli_styling.
4666 * tui/tui-winsource.c (tui_source_window_base::refill): Use
4667 deprecated_safe_get_selected_frame.
4668
4669 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4670
4671 * inferior.c (print_inferior): Switch inferior before printing it.
4672
4673 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
4674 Pedro Alves <palves@redhat.com>
4675
4676 * progspace-and-thread.c (switch_to_program_space_and_thread):
4677 Assert there's an inferior for PSPACE. Use
4678 switch_to_inferior_no_thread to switch the inferior too.
4679 * progspace.c (program_space::~program_space): Call
4680 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
4681 (program_space::free_all_objfiles): Don't call clear_symtab_users
4682 here.
4683 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
4684
4685 2020-01-10 Pedro Alves <palves@redhat.com>
4686
4687 * NEWS: Mention multi-target debugging, "info connections", and
4688 "add-inferior -no-connection".
4689
4690 2020-01-10 Pedro Alves <palves@redhat.com>
4691
4692 * infrun.c: Include "target-connection.h".
4693 (check_multi_target_resumption): New.
4694 (proceed): Call it.
4695 * target-connection.c (make_target_connection_string): Make
4696 extern.
4697 * target-connection.h (make_target_connection_string): Declare.
4698
4699 2020-01-10 Pedro Alves <palves@redhat.com>
4700
4701 * Makefile.in (COMMON_SFILES): Add target-connection.c.
4702 * inferior.c (uiout_field_connection): New function.
4703 (print_inferior): Add new "connection-id" column.
4704 (add_inferior_command): Show connection number/string of added
4705 inferior.
4706 * process-stratum-target.h
4707 (process_stratum_target::connection_string): New virtual method.
4708 (process_stratum_target::connection_number): New field.
4709 * remote.c (remote_target::connection_string): New override.
4710 * target-connection.c: New file.
4711 * target-connection.h: New file.
4712 * target.c (decref_target): Remove process_stratum targets from
4713 the connection list.
4714 (target_stack::push): Add process_stratum targets to the
4715 connection list.
4716
4717 2020-01-10 Pedro Alves <palves@redhat.com>
4718
4719 Revert:
4720 2016-04-12 Pedro Alves <palves@redhat.com>
4721 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
4722 Remove references to name.
4723 * serial.h (struct serial) <name>: Delete.
4724
4725 2020-01-10 Pedro Alves <palves@redhat.com>
4726
4727 * gdbarch-selftests.c (register_to_value_test): Remove "target
4728 already pushed" check.
4729
4730 2020-01-10 Pedro Alves <palves@redhat.com>
4731 John Baldwin <jhb@FreeBSD.org>
4732
4733 * aarch64-linux-nat.c
4734 (aarch64_linux_nat_target::thread_architecture): Adjust.
4735 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
4736 (task_command_1): Likewise.
4737 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
4738 (aix_thread_target::wait, aix_thread_target::fetch_registers)
4739 (aix_thread_target::store_registers)
4740 (aix_thread_target::thread_alive): Adjust.
4741 * amd64-fbsd-tdep.c: Include "inferior.h".
4742 (amd64fbsd_get_thread_local_address): Pass down target.
4743 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
4744 thread's gdbarch instead of target_gdbarch.
4745 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
4746 get_last_target_status.
4747 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
4748 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
4749 inferiors.
4750 (update_inserted_breakpoint_locations): Skip if inferiors with no
4751 execution.
4752 (update_global_location_list): When handling moribund locations,
4753 find representative inferior for location's pspace, and use thread
4754 count of its process_stratum target.
4755 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
4756 * bsd-uthread.c (bsd_uthread_target::wait): Use
4757 as_process_stratum_target and adjust thread_change_ptid and
4758 add_thread calls.
4759 (bsd_uthread_target::update_thread_list): Use
4760 as_process_stratum_target and adjust find_thread_ptid,
4761 thread_change_ptid and add_thread calls.
4762 * btrace.c (maint_btrace_packet_history_cmd): Adjust
4763 find_thread_ptid call.
4764 * corelow.c (add_to_thread_list): Adjust add_thread call.
4765 (core_target_open): Adjust add_thread_silent and thread_count
4766 calls.
4767 (core_target::pid_to_str): Adjust find_inferior_ptid call.
4768 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
4769 * event-top.c (async_disconnect): Pop targets from all inferiors.
4770 * exec.c (add_target_sections): Push exec target on all inferiors
4771 sharing the program space.
4772 (remove_target_sections): Remove the exec target from all
4773 inferiors sharing the program space.
4774 (exec_on_vfork): New.
4775 * exec.h (exec_on_vfork): Declare.
4776 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
4777 Pass it down.
4778 (fbsd_nat_target::update_thread_list): Adjust.
4779 (fbsd_nat_target::resume): Adjust.
4780 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
4781 down.
4782 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
4783 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
4784 get_thread_arch_regcache call.
4785 * fork-child.c (gdb_startup_inferior): Pass target down to
4786 startup_inferior and set_executing.
4787 * gdbthread.h (struct process_stratum_target): Forward declare.
4788 (add_thread, add_thread_silent, add_thread_with_info)
4789 (in_thread_list): Add process_stratum_target parameter.
4790 (find_thread_ptid(inferior*, ptid_t)): New overload.
4791 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
4792 parameter.
4793 (all_threads()): Delete overload.
4794 (all_threads, all_non_exited_threads): Add process_stratum_target
4795 parameter.
4796 (all_threads_safe): Use brace initialization.
4797 (thread_count): Add process_stratum_target parameter.
4798 (set_resumed, set_running, set_stop_requested, set_executing)
4799 (threads_are_executing, finish_thread_state): Add
4800 process_stratum_target parameter.
4801 (switch_to_thread): Use is_current_thread.
4802 * i386-fbsd-tdep.c: Include "inferior.h".
4803 (i386fbsd_get_thread_local_address): Pass down target.
4804 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
4805 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
4806 have_inferiors check.
4807 * inf-ptrace.c (inf_ptrace_target::create_inferior)
4808 (inf_ptrace_target::attach): Adjust.
4809 * infcall.c (run_inferior_call): Adjust.
4810 * infcmd.c (run_command_1): Pass target to
4811 scoped_finish_thread_state.
4812 (proceed_thread_callback): Skip inferiors with no execution.
4813 (continue_command): Rename 'all_threads' local to avoid hiding
4814 'all_threads' function. Adjust get_last_target_status call.
4815 (prepare_one_step): Adjust set_running call.
4816 (signal_command): Use user_visible_resume_target. Compare thread
4817 pointers instead of inferior_ptid.
4818 (info_program_command): Adjust to pass down target.
4819 (attach_command): Mark target's 'thread_executing' flag.
4820 (stop_current_target_threads_ns): New, factored out from ...
4821 (interrupt_target_1): ... this. Switch inferior before making
4822 target calls.
4823 * inferior-iter.h
4824 (struct all_inferiors_iterator, struct all_inferiors_range)
4825 (struct all_inferiors_safe_range)
4826 (struct all_non_exited_inferiors_range): Filter on
4827 process_stratum_target too. Remove explicit.
4828 * inferior.c (inferior::inferior): Push dummy target on target
4829 stack.
4830 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
4831 Add process_stratum_target parameter, and pass it down.
4832 (have_live_inferiors): Adjust.
4833 (switch_to_inferior_and_push_target): New.
4834 (add_inferior_command, clone_inferior_command): Handle
4835 "-no-connection" parameter. Use
4836 switch_to_inferior_and_push_target.
4837 (_initialize_inferior): Mention "-no-connection" option in
4838 the help of "add-inferior" and "clone-inferior" commands.
4839 * inferior.h: Include "process-stratum-target.h".
4840 (interrupt_target_1): Use bool.
4841 (struct inferior) <push_target, unpush_target, target_is_pushed,
4842 find_target_beneath, top_target, process_target, target_at,
4843 m_stack>: New.
4844 (discard_all_inferiors): Delete.
4845 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
4846 (all_inferiors, all_non_exited_inferiors): Add
4847 process_stratum_target parameter.
4848 * infrun.c: Include "gdb_select.h" and <unordered_map>.
4849 (target_last_proc_target): New global.
4850 (follow_fork_inferior): Push target on new inferior. Pass target
4851 to add_thread_silent. Call exec_on_vfork. Handle target's
4852 reference count.
4853 (follow_fork): Adjust get_last_target_status call. Also consider
4854 target.
4855 (follow_exec): Push target on new inferior.
4856 (struct execution_control_state) <target>: New field.
4857 (user_visible_resume_target): New.
4858 (do_target_resume): Call target_async.
4859 (resume_1): Set target's threads_executing flag. Consider resume
4860 target.
4861 (commit_resume_all_targets): New.
4862 (proceed): Also consider resume target. Skip threads of inferiors
4863 with no execution. Commit resumtion in all targets.
4864 (start_remote): Pass current inferior to wait_for_inferior.
4865 (infrun_thread_stop_requested): Consider target as well. Pass
4866 thread_info pointer to clear_inline_frame_state instead of ptid.
4867 (infrun_thread_thread_exit): Consider target as well.
4868 (random_pending_event_thread): New inferior parameter. Use it.
4869 (do_target_wait): Rename to ...
4870 (do_target_wait_1): ... this. Add inferior parameter, and pass it
4871 down.
4872 (threads_are_resumed_pending_p, do_target_wait): New.
4873 (prepare_for_detach): Adjust calls.
4874 (wait_for_inferior): New inferior parameter. Handle it. Use
4875 do_target_wait_1 instead of do_target_wait.
4876 (fetch_inferior_event): Adjust. Switch to representative
4877 inferior. Pass target down.
4878 (set_last_target_status): Add process_stratum_target parameter.
4879 Save target in global.
4880 (get_last_target_status): Add process_stratum_target parameter and
4881 handle it.
4882 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
4883 (context_switch): Check inferior_ptid == null_ptid before calling
4884 inferior_thread().
4885 (get_inferior_stop_soon): Pass down target.
4886 (wait_one): Rename to ...
4887 (poll_one_curr_target): ... this.
4888 (struct wait_one_event): New.
4889 (wait_one): New.
4890 (stop_all_threads): Adjust.
4891 (handle_no_resumed, handle_inferior_event): Adjust to consider the
4892 event's target.
4893 (switch_back_to_stepped_thread): Also consider target.
4894 (print_stop_event): Update.
4895 (normal_stop): Update. Also consider the resume target.
4896 * infrun.h (wait_for_inferior): Remove declaration.
4897 (user_visible_resume_target): New declaration.
4898 (get_last_target_status, set_last_target_status): New
4899 process_stratum_target parameter.
4900 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
4901 process_stratum_target parameter, and use it.
4902 (clear_inline_frame_state (thread_info*)): New.
4903 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
4904 process_stratum_target parameter.
4905 (clear_inline_frame_state (thread_info*)): Declare.
4906 * linux-fork.c (delete_checkpoint_command): Pass target down to
4907 find_thread_ptid.
4908 (checkpoint_command): Adjust.
4909 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
4910 instead of just tweaking inferior_ptid.
4911 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
4912 (exit_lwp): Pass target down to find_thread_ptid.
4913 (attach_proc_task_lwp_callback): Pass target down to
4914 add_thread/set_running/set_executing.
4915 (linux_nat_target::attach): Pass target down to
4916 thread_change_ptid.
4917 (get_detach_signal): Pass target down to find_thread_ptid.
4918 Consider last target status's target.
4919 (linux_resume_one_lwp_throw, resume_lwp)
4920 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
4921 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
4922 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
4923 (linux_nat_target::async_wait_fd): New.
4924 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
4925 target down.
4926 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
4927 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
4928 * linux-thread-db.c (struct thread_db_info::process_target): New
4929 field.
4930 (add_thread_db_info): Save target.
4931 (get_thread_db_info): New process_stratum_target parameter. Also
4932 match target.
4933 (delete_thread_db_info): New process_stratum_target parameter.
4934 Also match target.
4935 (thread_from_lwp): Adjust to pass down target.
4936 (thread_db_notice_clone): Pass down target.
4937 (check_thread_db_callback): Pass down target.
4938 (try_thread_db_load_1): Always push the thread_db target.
4939 (try_thread_db_load, record_thread): Pass target down.
4940 (thread_db_target::detach): Pass target down. Always unpush the
4941 thread_db target.
4942 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
4943 target down. Always unpush the thread_db target.
4944 (find_new_threads_callback, thread_db_find_new_threads_2)
4945 (thread_db_target::update_thread_list): Pass target down.
4946 (thread_db_target::pid_to_str): Pass current inferior down.
4947 (thread_db_target::get_thread_local_address): Pass target down.
4948 (thread_db_target::resume, maintenance_check_libthread_db): Pass
4949 target down.
4950 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
4951 * procfs.c (procfs_target::procfs_init_inferior): Declare.
4952 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
4953 (procfs_init_inferior): Rename to ...
4954 (procfs_target::procfs_init_inferior): ... this and adjust.
4955 (procfs_target::create_inferior, procfs_notice_thread)
4956 (procfs_do_thread_registers): Adjust.
4957 * ppc-fbsd-tdep.c: Include "inferior.h".
4958 (ppcfbsd_get_thread_local_address): Pass down target.
4959 * proc-service.c (ps_xfer_memory): Switch current inferior and
4960 program space as well.
4961 (get_ps_regcache): Pass target down.
4962 * process-stratum-target.c
4963 (process_stratum_target::thread_address_space)
4964 (process_stratum_target::thread_architecture): Pass target down.
4965 * process-stratum-target.h
4966 (process_stratum_target::threads_executing): New field.
4967 (as_process_stratum_target): New.
4968 * ravenscar-thread.c
4969 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
4970 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
4971 down.
4972 * record-btrace.c (record_btrace_target::info_record): Adjust.
4973 (record_btrace_target::record_method)
4974 (record_btrace_target::record_is_replaying)
4975 (record_btrace_target::fetch_registers)
4976 (get_thread_current_frame_id, record_btrace_target::resume)
4977 (record_btrace_target::wait, record_btrace_target::stop): Pass
4978 target down.
4979 * record-full.c (record_full_wait_1): Switch to event thread.
4980 Pass target down.
4981 * regcache.c (regcache::regcache)
4982 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
4983 process_stratum_target parameter and handle it.
4984 (current_thread_target): New global.
4985 (get_thread_regcache): Add process_stratum_target parameter and
4986 handle it. Switch inferior before calling target method.
4987 (get_thread_regcache): Pass target down.
4988 (get_thread_regcache_for_ptid): Pass target down.
4989 (registers_changed_ptid): Add process_stratum_target parameter and
4990 handle it.
4991 (registers_changed_thread, registers_changed): Pass target down.
4992 (test_get_thread_arch_aspace_regcache): New.
4993 (current_regcache_test): Define a couple local test_target_ops
4994 instances and use them for testing.
4995 (readwrite_regcache): Pass process_stratum_target parameter.
4996 (cooked_read_test, cooked_write_test): Pass mock_target down.
4997 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
4998 (get_thread_arch_aspace_regcache): Add process_stratum_target
4999 parameter.
5000 (regcache::target): New method.
5001 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
5002 (regcache::registers_changed_ptid): Add process_stratum_target
5003 parameter.
5004 (regcache::m_target): New field.
5005 (registers_changed_ptid): Add process_stratum_target parameter.
5006 * remote.c (remote_state::supports_vCont_probed): New field.
5007 (remote_target::async_wait_fd): New method.
5008 (remote_unpush_and_throw): Add remote_target parameter.
5009 (get_current_remote_target): Adjust.
5010 (remote_target::remote_add_inferior): Push target.
5011 (remote_target::remote_add_thread)
5012 (remote_target::remote_notice_new_inferior)
5013 (get_remote_thread_info): Pass target down.
5014 (remote_target::update_thread_list): Skip threads of inferiors
5015 bound to other targets. (remote_target::close): Don't discard
5016 inferiors. (remote_target::add_current_inferior_and_thread)
5017 (remote_target::process_initial_stop_replies)
5018 (remote_target::start_remote)
5019 (remote_target::remote_serial_quit_handler): Pass down target.
5020 (remote_target::remote_unpush_target): New remote_target
5021 parameter. Unpush the target from all inferiors.
5022 (remote_target::remote_unpush_and_throw): New remote_target
5023 parameter. Pass it down.
5024 (remote_target::open_1): Check whether the current inferior has
5025 execution instead of checking whether any inferior is live. Pass
5026 target down.
5027 (remote_target::remote_detach_1): Pass down target. Use
5028 remote_unpush_target.
5029 (extended_remote_target::attach): Pass down target.
5030 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
5031 (remote_target::append_resumption): Pass down target.
5032 (remote_target::append_pending_thread_resumptions)
5033 (remote_target::remote_resume_with_hc, remote_target::resume)
5034 (remote_target::commit_resume): Pass down target.
5035 (remote_target::remote_stop_ns): Check supports_vCont_probed.
5036 (remote_target::interrupt_query)
5037 (remote_target::remove_new_fork_children)
5038 (remote_target::check_pending_events_prevent_wildcard_vcont)
5039 (remote_target::remote_parse_stop_reply)
5040 (remote_target::process_stop_reply): Pass down target.
5041 (first_remote_resumed_thread): New remote_target parameter. Pass
5042 it down.
5043 (remote_target::wait_as): Pass down target.
5044 (unpush_and_perror): New remote_target parameter. Pass it down.
5045 (remote_target::readchar, remote_target::remote_serial_write)
5046 (remote_target::getpkt_or_notif_sane_1)
5047 (remote_target::kill_new_fork_children, remote_target::kill): Pass
5048 down target.
5049 (remote_target::mourn_inferior): Pass down target. Use
5050 remote_unpush_target.
5051 (remote_target::core_of_thread)
5052 (remote_target::remote_btrace_maybe_reopen): Pass down target.
5053 (remote_target::pid_to_exec_file)
5054 (remote_target::thread_handle_to_thread_info): Pass down target.
5055 (remote_target::async_wait_fd): New.
5056 * riscv-fbsd-tdep.c: Include "inferior.h".
5057 (riscv_fbsd_get_thread_local_address): Pass down target.
5058 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
5059 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
5060 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
5061 Adjust.
5062 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
5063 * solib-svr4.c (enable_break): Pass down target.
5064 * spu-multiarch.c (parse_spufs_run): Pass down target.
5065 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
5066 * target-delegates.c: Regenerate.
5067 * target.c (g_target_stack): Delete.
5068 (current_top_target): Return the current inferior's top target.
5069 (target_has_execution_1): Refer to the passed-in inferior's top
5070 target.
5071 (target_supports_terminal_ours): Check whether the initial
5072 inferior was already created.
5073 (decref_target): New.
5074 (target_stack::push): Incref/decref the target.
5075 (push_target, push_target, unpush_target): Adjust.
5076 (target_stack::unpush): Defref target.
5077 (target_is_pushed): Return bool. Adjust to refer to the current
5078 inferior's target stack.
5079 (dispose_inferior): Delete, and inline parts ...
5080 (target_preopen): ... here. Only dispose of the current inferior.
5081 (target_detach): Hold strong target reference while detaching.
5082 Pass target down.
5083 (target_thread_name): Add assertion.
5084 (target_resume): Pass down target.
5085 (target_ops::beneath, find_target_at): Adjust to refer to the
5086 current inferior's target stack.
5087 (get_dummy_target): New.
5088 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
5089 has a thread running.
5090 (initialize_targets): Rename to ...
5091 (_initialize_target): ... this.
5092 * target.h: Include "gdbsupport/refcounted-object.h".
5093 (struct target_ops): Inherit refcounted_object.
5094 (target_ops::shortname, target_ops::longname): Make const.
5095 (target_ops::async_wait_fd): New method.
5096 (decref_target): Declare.
5097 (struct target_ops_ref_policy): New.
5098 (target_ops_ref): New typedef.
5099 (get_dummy_target): Declare function.
5100 (target_is_pushed): Return bool.
5101 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
5102 (all_matching_threads_iterator::all_matching_threads_iterator):
5103 Handle filter target.
5104 * thread-iter.h (struct all_matching_threads_iterator, struct
5105 all_matching_threads_range, class all_non_exited_threads_range):
5106 Filter by target too. Remove explicit.
5107 * thread.c (threads_executing): Delete.
5108 (inferior_thread): Pass down current inferior.
5109 (clear_thread_inferior_resources): Pass down thread pointer
5110 instead of ptid_t.
5111 (add_thread_silent, add_thread_with_info, add_thread): Add
5112 process_stratum_target parameter. Use it for thread and inferior
5113 searches.
5114 (is_current_thread): New.
5115 (thread_info::deletable): Use it.
5116 (find_thread_ptid, thread_count, in_thread_list)
5117 (thread_change_ptid, set_resumed, set_running): New
5118 process_stratum_target parameter. Pass it down.
5119 (set_executing): New process_stratum_target parameter. Pass it
5120 down. Adjust reference to 'threads_executing'.
5121 (threads_are_executing): New process_stratum_target parameter.
5122 Adjust reference to 'threads_executing'.
5123 (set_stop_requested, finish_thread_state): New
5124 process_stratum_target parameter. Pass it down.
5125 (switch_to_thread): Also match inferior.
5126 (switch_to_thread): New process_stratum_target parameter. Pass it
5127 down.
5128 (update_threads_executing): Reimplement.
5129 * top.c (quit_force): Pop targets from all inferior.
5130 (gdb_init): Don't call initialize_targets.
5131 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
5132 Declare.
5133 (windows_add_thread, windows_delete_thread): Adjust.
5134 (get_windows_debug_event): Rename to ...
5135 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
5136 * tracefile-tfile.c (tfile_target_open): Pass down target.
5137 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
5138 Forward declare.
5139 (switch_to_thread): Add process_stratum_target parameter.
5140 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
5141 parameter. Use it.
5142 (mi_on_resume): Pass target down.
5143 * nat/fork-inferior.c (startup_inferior): Add
5144 process_stratum_target parameter. Pass it down.
5145 * nat/fork-inferior.h (startup_inferior): Add
5146 process_stratum_target parameter.
5147 * python/py-threadevent.c (py_get_event_thread): Pass target down.
5148
5149 2020-01-10 Pedro Alves <palves@redhat.com>
5150
5151 * remote.c (remote_target::start_remote): Don't set inferior_ptid
5152 directly. Instead find the first thread in the thread list and
5153 use switch_to_thread.
5154
5155 2020-01-10 Pedro Alves <palves@redhat.com>
5156
5157 * remote.c (remote_target::remote_add_inferior): Don't bind a
5158 process to the current inferior if the current inferior is already
5159 bound to a process.
5160
5161 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5162 Pedro Alves <palves@redhat.com>
5163
5164 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
5165 If no process is specified, return null_ptid instead of
5166 inferior_ptid.
5167 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
5168 TARGET_WAITKIND_SIGNALLED with no pid.
5169
5170 2020-01-10 Pedro Alves <palves@redhat.com>
5171
5172 * remote.c (first_remote_resumed_thread): New.
5173 (remote_target::wait_as): Use it as default event_ptid instead of
5174 inferior_ptid.
5175
5176 2020-01-10 Pedro Alves <palves@redhat.com>
5177
5178 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
5179
5180 2020-01-10 Pedro Alves <palves@redhat.com>
5181
5182 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
5183 not -1.
5184
5185 2020-01-10 Pedro Alves <palves@redhat.com>
5186
5187 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
5188 ptid to get_last_target_status.
5189 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
5190 ptid to get_last_target_status.
5191 * infcmd.c (continue_command): Don't pass a target_waitstatus to
5192 get_last_target_status.
5193 (info_program_command): Don't pass a target_waitstatus to
5194 get_last_target_status.
5195 * infrun.c (init_wait_for_inferior): Use
5196 nullify_last_target_wait_ptid.
5197 (get_last_target_status): Handle nullptr arguments.
5198 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
5199 (print_stop_event): Don't pass a ptid to get_last_target_status.
5200 (normal_stop): Don't pass a ptid to get_last_target_status.
5201 * infrun.h (get_last_target_status, set_last_target_status): Move
5202 comments here and update.
5203 (nullify_last_target_wait_ptid): Declare.
5204 * linux-fork.c (fork_load_infrun_state): Remove local extern
5205 declaration of nullify_last_target_wait_ptid.
5206 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
5207 to get_last_target_status.
5208
5209 2020-01-10 Pedro Alves <palves@redhat.com>
5210
5211 * gdbthread.h (scoped_restore_current_thread)
5212 <dont_restore, restore, m_dont_restore>: Declare.
5213 * thread.c (thread_alive): Add assertion. Return bool.
5214 (switch_to_thread_if_alive): New.
5215 (prune_threads): Switch inferior/thread.
5216 (print_thread_info_1): Switch thread before calling target methods.
5217 (scoped_restore_current_thread::restore): New, factored out from
5218 ...
5219 (scoped_restore_current_thread::~scoped_restore_current_thread):
5220 ... this.
5221 (scoped_restore_current_thread::scoped_restore_current_thread):
5222 Add assertion.
5223 (thread_apply_all_command, thread_select): Use
5224 switch_to_thread_if_alive.
5225 * infrun.c (proceed, restart_threads, handle_signal_stop)
5226 (switch_back_to_stepped_thread): Switch current thread before
5227 calling target methods.
5228
5229 2020-01-10 Pedro Alves <palves@redhat.com>
5230
5231 * inferior.c (switch_to_inferior_no_thread): New function,
5232 factored out from ...
5233 (inferior_command): ... here.
5234 * inferior.h (switch_to_inferior_no_thread): Declare.
5235 * mi/mi-main.c (run_one_inferior): Use
5236 switch_to_inferior_no_thread.
5237
5238 2020-01-10 Pedro Alves <palves@redhat.com>
5239
5240 * infcmd.c (kill_command): Remove dead code.
5241
5242 2020-01-10 Pedro Alves <palves@redhat.com>
5243
5244 * remote.c (remote_target::mourn_inferior): No longer check
5245 whether the target is running.
5246
5247 2020-01-10 Pedro Alves <palves@redhat.com>
5248
5249 * corelow.c (core_target::has_execution): Change parameter type to
5250 inferior pointer.
5251 * inferior.c (number_of_live_inferiors): Use
5252 inferior::has_execution instead of target_has_execution_1.
5253 * inferior.h (inferior::has_execution): New.
5254 * linux-thread-db.c (thread_db_target::update_thread_list): Use
5255 inferior::has_execution instead of target_has_execution_1.
5256 * process-stratum-target.c
5257 (process_stratum_target::has_execution): Change parameter type to
5258 inferior pointer. Check the inferior's PID instead of
5259 inferior_ptid.
5260 * process-stratum-target.h
5261 (process_stratum_target::has_execution): Change parameter type to
5262 inferior pointer.
5263 * record-full.c (record_full_core_target::has_execution): Change
5264 parameter type to inferior pointer.
5265 * target.c (target_has_execution_1): Change parameter type to
5266 inferior pointer.
5267 (target_has_execution_current): Adjust.
5268 * target.h (target_ops::has_execution): Change parameter type to
5269 inferior pointer.
5270 (target_has_execution_1): Change parameter type to inferior
5271 pointer. Change return type to bool.
5272 * tracefile.h (tracefile_target::has_execution): Change parameter
5273 type to inferior pointer.
5274
5275 2020-01-10 Pedro Alves <palves@redhat.com>
5276
5277 * exceptions.c (print_flush): Remove current_top_target() check.
5278
5279 2020-01-10 Pedro Alves <palves@redhat.com>
5280
5281 * remote.c (show_remote_exec_file): Show the current inferior's
5282 exec-file instead of the command variable's value.
5283
5284 2020-01-10 Pedro Alves <palves@redhat.com>
5285
5286 * record-full.c (record_full_resume_ptid): New global.
5287 (record_full_target::resume): Set it.
5288 (record_full_wait_1): Use record_full_resume_ptid instead of
5289 inferior_ptid.
5290
5291 2020-01-10 Pedro Alves <palves@redhat.com>
5292
5293 * gdbthread.h (scoped_restore_current_thread)
5294 <dont_restore, restore, m_dont_restore>: Declare.
5295 * thread.c (thread_alive): Add assertion. Return bool.
5296 (switch_to_thread_if_alive): New.
5297 (prune_threads): Switch inferior/thread.
5298 (print_thread_info_1): Switch thread before calling target methods.
5299 (scoped_restore_current_thread::restore): New, factored out from
5300 ...
5301 (scoped_restore_current_thread::~scoped_restore_current_thread):
5302 ... this.
5303 (scoped_restore_current_thread::scoped_restore_current_thread):
5304 Add assertion.
5305 (thread_apply_all_command, thread_select): Use
5306 switch_to_thread_if_alive.
5307
5308 2020-01-10 George Barrett <bob@bob131.so>
5309
5310 * stap-probe.c (stap_modify_semaphore): Don't check for null
5311 semaphores.
5312 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
5313 for null semaphores.
5314
5315 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
5316
5317 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
5318 all source windows, and maintain horizontal scroll status while
5319 doing so.
5320
5321 2020-01-09 Tom Tromey <tom@tromey.com>
5322
5323 PR tui/18932:
5324 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
5325 update_source_window, not print_source_lines.
5326
5327 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
5328
5329 * tui/tui.c (tui_enable): Register tui hooks after calling
5330 tui_display_main.
5331
5332 2020-01-09 Christian Biesinger <cbiesinger@google.com>
5333
5334 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
5335
5336 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
5337
5338 * thread.c (print_thread_info_1): Fix indentation.
5339
5340 2020-01-09 Christian Biesinger <cbiesinger@google.com>
5341
5342 * symtab.c (general_symbol_info::compute_and_set_names): Move the
5343 unique_xmalloc_ptr outside the if to always free the demangled name.
5344
5345 2020-01-08 Tom Tromey <tromey@adacore.com>
5346
5347 * xcoffread.c (enter_line_range, read_xcoff_symtab)
5348 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
5349 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
5350 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
5351 Remove.
5352 (section_offsets): New typedef.
5353 * symtab.c (fixup_section, get_msymbol_address): Update.
5354 * symmisc.c (dump_msymbols): Update.
5355 * symfile.h (relative_addr_info_to_section_offsets)
5356 (symfile_map_offsets_to_segments): Update.
5357 * symfile.c (build_section_addr_info_from_objfile)
5358 (init_objfile_sect_indices): Update.
5359 (struct place_section_arg): Change type of "offsets".
5360 (place_section): Update.
5361 (relative_addr_info_to_section_offsets): Change type of
5362 "section_offsets". Remove "num_sections" parameter.
5363 (default_symfile_offsets, syms_from_objfile_1)
5364 (set_objfile_default_section_offset): Update.
5365 (reread_symbols): No need to preserve section offsets by hand.
5366 (symfile_map_offsets_to_segments): Change type of "offsets".
5367 * stap-probe.c (relocate_address): Update.
5368 * stabsread.h (process_one_symbol): Update.
5369 * solib-target.c (struct lm_info_target) <offsets>: Change type.
5370 (solib_target_relocate_section_addresses): Update.
5371 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
5372 Update.
5373 * solib-frv.c (frv_relocate_main_executable): Update.
5374 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
5375 * solib-aix.c (solib_aix_get_section_offsets): Change return
5376 type.
5377 (solib_aix_solib_create_inferior_hook): Update.
5378 * remote.c (remote_target::get_offsets): Update.
5379 * psymtab.c (find_pc_sect_psymtab): Update.
5380 * psympriv.h (struct partial_symbol) <address, text_low,
5381 text_high>: Update.
5382 * objfiles.h (obj_section_offset): Update.
5383 (struct objfile) <section_offsets>: Change type.
5384 <num_sections>: Remove.
5385 (objfile_relocate): Update.
5386 * objfiles.c (entry_point_address_query): Update
5387 (relocate_one_symbol): Change type of "section_offsets".
5388 (objfile_relocate1, objfile_relocate1): Change type of
5389 "new_offsets".
5390 (objfile_rebase1): Update.
5391 * mipsread.c (mipscoff_symfile_read): Update.
5392 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
5393 parameter.
5394 * mdebugread.c (parse_symbol): Change type of "section_offsets".
5395 (parse_external, psymtab_to_symtab_1): Update.
5396 * machoread.c (macho_symfile_offsets): Update.
5397 * ia64-tdep.c (ia64_find_unwind_table): Update.
5398 * hppa-tdep.c (read_unwind_info): Update.
5399 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
5400 * dwarf2read.c (create_addrmap_from_index)
5401 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
5402 (process_psymtab_comp_unit_reader, add_partial_symbol)
5403 (add_partial_subprogram, process_full_comp_unit)
5404 (read_file_scope, read_func_scope, read_lexical_block_scope)
5405 (read_call_site_scope, dwarf2_rnglists_process)
5406 (dwarf2_ranges_process, dwarf2_ranges_read)
5407 (dwarf_decode_lines_1, var_decode_location, new_symbol)
5408 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
5409 Update.
5410 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
5411 Update.
5412 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
5413 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
5414 (process_one_symbol): Change type of "section_offsets".
5415 * ctfread.c (get_objfile_text_range): Update.
5416 * coffread.c (coff_symtab_read, enter_linenos)
5417 (process_coff_symbol): Update.
5418 * coff-pe-read.c (add_pe_forwarded_sym): Update.
5419 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
5420
5421 2020-01-08 Tom Tromey <tromey@adacore.com>
5422
5423 * dwarf2read.c (parse_macro_definition): Use std::string.
5424 (parse_macro_definition): Likewise.
5425
5426 2020-01-08 Tom Tromey <tromey@adacore.com>
5427
5428 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
5429 (ATTR_ALLOC_CHUNK): Remove.
5430
5431 2020-01-08 Tom Tromey <tromey@adacore.com>
5432
5433 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
5434
5435 2020-01-08 Tom Tromey <tromey@adacore.com>
5436
5437 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
5438 (dwarf2_compute_name, open_dwo_file): Likewise.
5439 (process_enumeration_scope): Use std::vector.
5440 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
5441 (partial_die_info::fixup, dwarf2_start_subfile)
5442 (guess_full_die_structure_name, dwarf2_name): Likewise.
5443 (determine_prefix): Update.
5444 (guess_full_die_structure_name): Make return type const.
5445 (partial_die_full_name): Return unique_xmalloc_ptr.
5446 (DW_FIELD_ALLOC_CHUNK): Remove.
5447
5448 2020-01-07 Tom Tromey <tromey@adacore.com>
5449
5450 PR build/24937:
5451 * stap-probe.c (class stap_static_probe_ops): Add constructor.
5452
5453 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
5454
5455 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
5456
5457 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
5458
5459 * stack.c (print_frame_info): Move disassemble_next_line code
5460 inside source_print block.
5461
5462 2020-01-06 Eli Zaretskii <eliz@gnu.org>
5463
5464 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
5465 gdb/signals.h, as we are now using native signal symbols.
5466
5467 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
5468
5469 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
5470 overflow by an early check of content vs threshold.
5471 * tui/tui-source.c (tui_source_window::line_is_displayed):
5472 Likewise.
5473
5474 2020-01-06 Eli Zaretskii <eliz@gnu.org>
5475
5476 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
5477
5478 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
5479
5480 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
5481 export table if no section contains it's RVA.
5482
5483 2020-01-06 Eli Zaretskii <eliz@gnu.org>
5484
5485 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
5486
5487 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
5488
5489 * source.c (print_source_lines_base): Set last_line_listed.
5490
5491 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
5492
5493 * tui/tui-disasm.c: Remove trailing spaces.
5494
5495 2020-01-06 Eli Zaretskii <eliz@gnu.org>
5496 Pedro Alves <palves@redhat.com>
5497
5498 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
5499 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
5500 (windows_gdb_signal_to_target): New function, uses the above
5501 enumeration to convert GDB internal signal codes to equivalent
5502 Windows codes.
5503 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
5504 * windows-nat.c: Include "gdb_wait.h".
5505 (get_windows_debug_event): Extract the fatal exception from the
5506 exit status and convert to the equivalent Posix signal number.
5507 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
5508 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
5509 * gdbsupport/gdb_wait.c: New file, implements
5510 windows_status_to_termsig.
5511 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
5512 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
5513
5514 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
5515
5516 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
5517 show_layout.
5518
5519 2020-01-05 Luis Machado <luis.machado@linaro.org>
5520
5521 * aarch64-linux-nat.c
5522 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
5523 and bfd_mach_aarch64.
5524
5525 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5526
5527 * ui-file.c (stdio_file::can_emit_style_escape)
5528 (tee_file::can_emit_style_escape): Ensure style is used also on
5529 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
5530 to gdb_stdout.
5531 * main.c (set_gdb_data_directory): Use file style to output the
5532 warning that the given pathname is not a directory.
5533 * top.c (show_history_filename, gdb_safe_append_history)
5534 (show_gdb_datadir): Use file style.
5535
5536 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
5537
5538 * solib-target.c (struct lm_info_target):
5539 Change offsets to be a unique_xmalloc_ptr.
5540 (solib_target_relocate_section_addresses): Update.
5541
5542 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
5543
5544 * windows-nat.c (windows_clear_solib): Free so_list linked list.
5545
5546 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5547
5548 * MAINTAINERS (Write After Approval): Add myself.
5549
5550 2020-01-02 Luis Machado <luis.machado@linaro.org>
5551
5552 * proc-service.c (get_ps_regcache): Remove reference to obsolete
5553 Cell BE architecture.
5554 * target.h (struct target_ops) <thread_architecture>: Likewise.
5555
5556 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
5557
5558 * Makefile.in: Use INSTALL_PROGRAM_ENV.
5559
5560 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
5561
5562 * MAINTAINERS (Write After Approval): Add myself.
5563
5564 2020-01-01 Joel Brobecker <brobecker@adacore.com>
5565
5566 * gdbarch.sh: Update copyright year range of generated files.
5567
5568 2020-01-01 Joel Brobecker <brobecker@adacore.com>
5569
5570 Update copyright year range in all GDB files.
5571
5572 2020-01-01 Joel Brobecker <brobecker@adacore.com>
5573
5574 * copyright.py: Convert to Python 3.
5575
5576 2020-01-01 Joel Brobecker <brobecker@adacore.com>
5577
5578 * copyright.py: Adapt after move of gnulib directory from gdb
5579 directory to toplevel directory.
5580
5581 2020-01-01 Joel Brobecker <brobecker@adacore.com>
5582
5583 * copyright.py (main): Exit if run from the wrong directory.
5584
5585 2020-01-01 Joel Brobecker <brobecker@adacore.com>
5586
5587 * top.c (print_gdb_version): Change copyright year to 2020.
5588
5589 2020-01-01 Joel Brobecker <brobecker@adacore.com>
5590
5591 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
5592
5593 For older changes see ChangeLog-2019.
5594 \f
5595 Local Variables:
5596 mode: change-log
5597 left-margin: 8
5598 fill-column: 74
5599 version-control: never
5600 coding: utf-8
5601 End:
This page took 0.142772 seconds and 5 git commands to generate.