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