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