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