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