]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Add debuginfod support to GDB
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2020-02-26 Aaron Merey <amerey@redhat.com>
2
3 * Makefile.in: Handle optional debuginfod support.
4 * NEWS: Update.
5 * README: Add --with-debuginfod summary.
6 * config.in: Regenerate.
7 * configure: Regenerate.
8 * configure.ac: Handle optional debuginfod support.
9 * debuginfod-support.c: debuginfod helper functions.
10 * debuginfod-support.h: Ditto.
11 * doc/gdb.texinfo: Add --with-debuginfod to configure options
12 summary.
13 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
14 when a dwz file cannot be found.
15 * elfread.c (elf_symfile_read): Query debuginfod servers when a
16 debuginfo file cannot be found.
17 * source.c (open_source_file): Query debuginfod servers when a
18 source file cannot be found.
19 * top.c (print_gdb_configuration): Include
20 --{with,without}-debuginfod in the output.
21
22 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
23
24 * thread.c (thr_try_catch_cmd): Print thread name.
25
26 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
27
28 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
29 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
30 dwarf2_fetch_die_type_sect_off): Move to...
31 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
32 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
33 dwarf2_fetch_die_type_sect_off): ... here.
34 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
35 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
36 dwarf2_fetch_die_type_sect_off): Move doc to header file.
37
38 2020-02-26 Tom de Vries <tdevries@suse.de>
39
40 PR gdb/25603
41 * symfile.c (set_initial_language): Exit-early if
42 language_mode == language_mode_manual.
43
44 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
45
46 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
47 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
48 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
49
50 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
51
52 * gdbtypes.c (create_array_type_with_stride): Handle negative
53 array strides.
54 * valarith.c (value_subscripted_rvalue): Likewise.
55
56 2020-02-25 Luis Machado <luis.machado@linaro.org>
57
58 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
59
60 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
61
62 * loc.h (dwarf2_get_die_type): Move to...
63 * read.h (dwarf2_get_die_type): ... here.
64 * read.c (dwarf2_get_die_type): Move doc to header.
65
66 2020-02-25 Joel Brobecker <brobecker@adacore.com>
67
68 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
69 'gnulib/Makefile.in' to the list.
70
71 2020-02-24 Tom Tromey <tom@tromey.com>
72
73 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
74 Remove.
75 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
76 XOBNEWVEC.
77
78 2020-02-24 Tom Tromey <tom@tromey.com>
79
80 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
81 New method.
82 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
83 (dw2_do_instantiate_symtab, dw2_get_file_names)
84 (build_type_psymtab_dependencies, load_full_type_unit): Update.
85
86 2020-02-24 Tom Tromey <tom@tromey.com>
87
88 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
89 make_scoped_restore.
90 (dwarf2_psymtab::read_symtab): Don't clear
91 reading_partial_symbols.
92
93 2020-02-24 Tom de Vries <tdevries@suse.de>
94
95 PR gdb/25592
96 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
97
98 2020-02-24 Tom de Vries <tdevries@suse.de>
99
100 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
101 commands layout next/prev/regs.
102
103 2020-02-22 Tom Tromey <tom@tromey.com>
104
105 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
106 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
107
108 2020-02-22 Tom Tromey <tom@tromey.com>
109
110 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
111
112 2020-02-22 Tom Tromey <tom@tromey.com>
113
114 * tui/tui-win.c (_initialize_tui_win): Add usage text.
115 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
116 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
117 * tui/tui.c (_initialize_tui): Add usage text.
118
119 2020-02-22 Tom Tromey <tom@tromey.com>
120
121 * tui/tui-win.c (tui_set_focus_command)
122 (tui_set_win_height_command): Use error_no_arg.
123 (_initialize_tui_win): Update help text.
124 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
125
126 2020-02-22 Tom Tromey <tom@tromey.com>
127
128 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
129 * tui/tui-disasm.h (struct tui_disasm_window)
130 <display_start_addr>: Declare.
131 * tui/tui-source.h (struct tui_source_window)
132 <display_start_addr>: Declare.
133 * tui/tui-winsource.h (struct tui_source_window_base)
134 <show_source_line, display_start_addr>: New methods.
135 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
136 Rename and move to protected section.
137 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
138 (tui_source_window_base::do_erase_source_content): Update.
139 (tui_source_window_base::show_source_line): Now a method.
140 (tui_source_window_base::show_source_content)
141 (tui_source_window_base::tui_source_window_base)
142 (tui_source_window_base::rerender)
143 (tui_source_window_base::refill)
144 (tui_source_window_base::do_scroll_horizontal)
145 (tui_source_window_base::set_is_exec_point_at)
146 (tui_source_window_base::update_breakpoint_info)
147 (tui_source_window_base::update_exec_info): Update.
148 * tui/tui-source.c (tui_source_window::set_contents)
149 (tui_source_window::showing_source_p)
150 (tui_source_window::do_scroll_vertical)
151 (tui_source_window::location_matches_p)
152 (tui_source_window::line_is_displayed): Update.
153 (tui_source_window::display_start_addr): New method.
154 * tui/tui-disasm.c (tui_disasm_window::set_contents)
155 (tui_disasm_window::do_scroll_vertical)
156 (tui_disasm_window::location_matches_p): Update.
157 (tui_disasm_window::display_start_addr): New method.
158
159 2020-02-22 Tom Tromey <tom@tromey.com>
160
161 * NEWS: Add entry for gdb.register_window_type.
162 * tui/tui-layout.h (window_factory): New typedef.
163 (tui_register_window): Declare.
164 * tui/tui-layout.c (saved_tui_windows): New global.
165 (tui_apply_current_layout): Use it.
166 (tui_register_window): New function.
167 * python/python.c (do_start_initialization): Call
168 gdbpy_initialize_tui.
169 (python_GdbMethods): Add "register_window_type" function.
170 * python/python-internal.h (gdbpy_register_tui_window)
171 (gdbpy_initialize_tui): Declare.
172 * python/py-tui.c: New file.
173 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
174
175 2020-02-22 Tom Tromey <tom@tromey.com>
176
177 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
178
179 2020-02-22 Tom Tromey <tom@tromey.com>
180
181 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
182 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
183 * tui/tui-data.c (tui_set_win_with_focus): Remove.
184 (tui_set_win_focus_to): Move from tui-win.c.
185
186 2020-02-22 Tom Tromey <tom@tromey.com>
187
188 * tui/tui-layout.c (make_standard_window, get_locator_window): New
189 functions.
190 (known_window_types): New global.
191 (tui_get_window_by_name): Reimplement.
192 (initialize_known_windows): New function.
193 (validate_window_name): Rewrite.
194 (_initialize_tui_layout): Call initialize_known_windows.
195
196 2020-02-22 Tom Tromey <tom@tromey.com>
197
198 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
199 Remove constants.
200 * tui/tui-winsource.h (struct tui_source_window_base)
201 <tui_source_window_base>: Remove parameter.
202 * tui/tui-winsource.c
203 (tui_source_window_base::tui_source_window_base): Remove
204 parameter.
205 (tui_source_window_base::refill): Update.
206 * tui/tui-stack.h (struct tui_locator_window)
207 <tui_locator_window>: Update.
208 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
209 Default the constructor.
210 * tui/tui-regs.h (struct tui_data_item_window)
211 <tui_data_item_window>: Default the constructor.
212 (struct tui_data_window) <tui_data_window>: Likewise.
213 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
214 Default the constructor.
215 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
216 Default the constructor.
217 <type>: Remove.
218 (struct tui_win_info) <tui_win_info>: Default the constructor.
219 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
220 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
221 Default the constructor.
222
223 2020-02-22 Tom Tromey <tom@tromey.com>
224
225 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
226 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
227 * tui/tui-win.c (tui_resize_all): Don't call
228 tui_delete_invisible_windows.
229 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
230 done.
231 (tui_set_layout): Update.
232 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
233 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
234 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
235
236 2020-02-22 Tom Tromey <tom@tromey.com>
237
238 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
239 correctly.
240
241 2020-02-22 Tom Tromey <tom@tromey.com>
242
243 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
244
245 2020-02-22 Tom Tromey <tom@tromey.com>
246
247 * tui/tui-winsource.h (struct tui_source_window_iterator)
248 <inner_iterator>: New etytypedef.
249 <tui_source_window_iterator>: Take "end" parameter.
250 <tui_source_window_iterator>: Take iterator.
251 <operator*, advance>: Update.
252 <m_iter>: Change type.
253 <m_end>: New field.
254 (struct tui_source_windows) <begin, end>: Update.
255 * tui/tui-layout.c (tui_windows): New global.
256 (tui_apply_current_layout): Clear tui_windows.
257 (tui_layout_window::apply): Update tui_windows.
258 * tui/tui-data.h (tui_windows): Declare.
259 (all_tui_windows): Now inline function.
260 (class tui_window_iterator, struct all_tui_windows): Remove.
261
262 2020-02-22 Tom Tromey <tom@tromey.com>
263
264 PR tui/17850:
265 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
266 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
267 "height" argument.
268 (class tui_layout_window) <get_sizes>: Likewise.
269 (class tui_layout_split) <tui_layout_split>: Add "vertical"
270 argument.
271 <get_sizes>: Add "height" argument.
272 <m_vertical>: New field.
273 * tui/tui-layout.c (tui_layout_split::clone): Update.
274 (tui_layout_split::get_sizes): Add "height" argument.
275 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
276 (tui_new_layout_command): Parse "-horizontal".
277 (_initialize_tui_layout): Update help string.
278 (tui_layout_split::specification): Add "-horizontal" when needed.
279 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
280 argument.
281 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
282 New methods.
283
284 2020-02-22 Tom Tromey <tom@tromey.com>
285
286 * tui/tui-layout.h (enum tui_adjust_result): New.
287 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
288 (class tui_layout_window) <adjust_size>: Return
289 tui_adjust_result. Rewrite.
290 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
291 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
292
293 2020-02-22 Tom Tromey <tom@tromey.com>
294
295 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
296 parameter and return types.
297 (class tui_layout_base) <specification>: Add "depth".
298 (class tui_layout_window) <specification>: Add "depth".
299 (class tui_layout_split) <specification>: Add "depth".
300 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
301 and return types.
302 (tui_new_layout_command): Parse sub-layouts.
303 (_initialize_tui_layout): Update help string.
304 (tui_layout_window::specification): Add "depth".
305 (add_layout_command): Update.
306
307 2020-02-22 Tom Tromey <tom@tromey.com>
308
309 * NEWS: Add "tui new-layout" item.
310 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
311 Add new-layout command to help text.
312 (validate_window_name): New function.
313 (tui_new_layout_command): New function.
314 (_initialize_tui_layout): Register "new-layout".
315 (tui_layout_window::specification): New method.
316 (tui_layout_window::specification): New method.
317 * tui/tui-layout.h (class tui_layout_base) <specification>: New
318 method.
319 (class tui_layout_window) <specification>: New method.
320 (class tui_layout_split) <specification>: New method.
321
322 2020-02-22 Tom Tromey <tom@tromey.com>
323
324 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
325 * tui/tui-win.c (window_name_completer): Update comment.
326 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
327 Declare method.
328 (class tui_layout_window) <replace_window>: Likewise.
329 (class tui_layout_split) <replace_window>: Likewise.
330 (tui_set_layout): Don't declare.
331 (tui_set_initial_layout): Declare function.
332 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
333 (asm_regs_layout): New globals.
334 (tui_current_layout, show_layout): Remove.
335 (tui_set_layout, tui_add_win_to_layout): Rewrite.
336 (find_layout, tui_apply_layout): New function.
337 (layout_completer): Remove.
338 (tui_next_layout): Reimplement.
339 (tui_next_layout_command): New function.
340 (tui_set_initial_layout, tui_prev_layout_command): New functions.
341 (tui_regs_layout): Reimplement.
342 (tui_regs_layout_command): New function.
343 (extract_display_start_addr): Rewrite.
344 (next_layout, prev_layout): Remove.
345 (tui_layout_window::replace_window): New method.
346 (tui_layout_split::replace_window): New method.
347 (destroy_layout): New function.
348 (layout_list): New global.
349 (add_layout_command): New function.
350 (initialize_layouts): Update.
351 (tui_layout_command): New function.
352 (_initialize_tui_layout): Install "layout" commands.
353 * tui/tui-data.h (enum tui_layout_type): Remove.
354 (tui_current_layout): Don't declare.
355
356 2020-02-22 Tom Tromey <tom@tromey.com>
357
358 * tui/tui-regs.c (tui_reg_layout): Remove.
359 (tui_reg_command): Use tui_regs_layout.
360 * tui/tui-layout.h (tui_reg_command): Declare.
361 * tui/tui-layout.c (tui_reg_command): New function.
362
363 2020-02-22 Tom Tromey <tom@tromey.com>
364
365 * tui/tui.c (tui_rl_delete_other_windows): Call
366 tui_remove_some_windows.
367 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
368 Declare method.
369 (class tui_layout_window) <remove_windows>: New method.
370 (class tui_layout_split) <remove_windows>: Declare.
371 (tui_remove_some_windows): Declare.
372 * tui/tui-layout.c (tui_remove_some_windows): New function.
373 (tui_layout_split::remove_windows): New method.
374
375 2020-02-22 Tom Tromey <tom@tromey.com>
376
377 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
378 * tui/tui-layout.h (tui_next_layout): Declare.
379 * tui/tui-layout.c (tui_next_layout): New function.
380
381 2020-02-22 Tom Tromey <tom@tromey.com>
382
383 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
384 correct coordinates.
385
386 2020-02-22 Tom Tromey <tom@tromey.com>
387
388 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
389 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
390 DATA_WIN case.
391
392 2020-02-22 Tom Tromey <tom@tromey.com>
393
394 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
395 TUI_DISASM_WIN, not tui_win_list.
396
397 2020-02-22 Tom Tromey <tom@tromey.com>
398
399 * valprint.c (generic_val_print_enum_1)
400 (val_print_type_code_flags): Style member names.
401 * rust-lang.c (val_print_struct, rust_print_enum)
402 (rust_print_struct_def, rust_internal_print_type): Style member
403 names.
404 * p-valprint.c (pascal_object_print_value_fields): Style member
405 names. Only call fprintf_symbol_filtered for static members.
406 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
407 * f-valprint.c (f_val_print): Style member names.
408 * f-typeprint.c (f_type_print_base): Style member names.
409 * cp-valprint.c (cp_print_value_fields): Style member names. Only
410 call fprintf_symbol_filtered for static members.
411 (cp_print_class_member): Style member names.
412 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
413 member names.
414 * ada-valprint.c (ada_print_scalar): Style enum names.
415 (ada_val_print_enum): Likewise.
416 * ada-typeprint.c (print_enum_type): Style enum names.
417
418 2020-02-21 Tom Tromey <tom@tromey.com>
419
420 * psympriv.h (struct partial_symtab): Update comment.
421
422 2020-02-21 Tom Tromey <tromey@adacore.com>
423
424 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
425 type is CORE_ADDR.
426
427 2020-02-21 Tom de Vries <tdevries@suse.de>
428
429 PR gdb/25534
430 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
431 if dependencies[i]->user != NULL.
432
433 2020-02-21 Ali Tamur <tamur@google.com>
434
435 * dwarf2/read.c (dwarf2_name): Add null check.
436
437 2020-02-20 Tom Tromey <tom@tromey.com>
438
439 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
440 ">=", in binary search.
441 (dwarf2_find_containing_comp_unit): New overload.
442 (run_test): New self-test.
443 (_initialize_dwarf2_read): Register new test.
444
445 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
446
447 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
448 * riscv-tdep.h: Likewise.
449 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
450 rv32-only CSR.
451 * features/riscv/64bit-csr.xml: Regenerated.
452
453 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
454 Tom Tromey <tom@tromey.com>
455
456 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
457 of 'fputc_unfiltered'.
458 (putchar_unfiltered): Call 'fputc_unfiltered'.
459 (fputc_unfiltered): Call 'fputs_unfiltered'.
460
461 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
462
463 * config.in: Regenerate.
464 * configure: Regenerate.
465 * configure.ac: Add --with-python-libdir option.
466 * main.c: Use WITH_PYTHON_LIBDIR.
467
468 2020-02-19 Tom Tromey <tom@tromey.com>
469
470 * symtab.c (general_symbol_info::compute_and_set_names): Use
471 obstack_strndup. Simplify call to symbol_set_demangled_name.
472
473 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
474
475 * dwarf2/read.c (allocate_signatured_type_table,
476 allocate_dwo_unit_table, allocate_type_unit_groups_table,
477 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
478 Remove objfile parameter, update all callers.
479
480 2020-02-19 Doug Evans <dje@google.com>
481
482 PR rust/25535
483 * rust-lang.c (rust_print_enum): Apply embedded_offset to
484 rust_enum_variant calculation.
485
486 2020-02-19 Tom Tromey <tromey@adacore.com>
487
488 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
489
490 2020-02-19 Tom Tromey <tromey@adacore.com>
491
492 * ada-lang.c (cache_symbol): Use obstack_strdup.
493
494 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
495
496 * configure: Regenerate.
497
498 2020-02-19 Tom Tromey <tromey@adacore.com>
499
500 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
501 NULL check.
502
503 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
504
505 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
506
507 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
508
509 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
510 if GDBSERVER is not defined.
511 (riscv_tdesc_cache): Likewise, also store const target_desc.
512 (STATIC_IN_GDB): Define.
513 (riscv_create_target_description): Update declaration with
514 STATIC_IN_GDB.
515 (riscv_lookup_target_description): New function, only define if
516 GDBSERVER is not defined.
517 * arch/riscv.h (riscv_create_target_description): Declare only
518 when GDBSERVER is defined.
519 (riscv_lookup_target_description): New declaration when GDBSERVER
520 is not defined.
521 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
522 (riscv_linux_read_features): ...this, and return
523 riscv_gdbarch_features instead of target_desc.
524 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
525 (riscv_linux_read_description): Rename to...
526 (riscv_linux_read_features): ...this.
527 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
528 Update to use riscv_gdbarch_features and
529 riscv_lookup_target_description.
530 * riscv-tdep.c (riscv_find_default_target_description): Use
531 riscv_lookup_target_description instead of
532 riscv_create_target_description.
533
534 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
535
536 * valprint.c (generic_val_print_enum_1): When printing a flag
537 enum with value 0 and there is no enumerator with value 0, print
538 just "0" instead of "(unknown: 0x0)".
539
540 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
541
542 * valprint.c (generic_val_print_enum_1): Print unknown part of
543 flag enum in hex.
544
545 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
546
547 * dwarf2/read.c (update_enumeration_type_from_children): Allow
548 flag enums to contain duplicate enumerators.
549 * valprint.c (generic_val_print_enum_1): Update comment.
550
551 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
552
553 * dwarf2/read.c: Include "count-one-bits.h".
554 (update_enumeration_type_from_children): If an enumerator has
555 multiple bits set, don't treat the enumeration as a "flag enum".
556 * valprint.c (generic_val_print_enum_1): Assert that enumerators
557 of flag enums have 0 or 1 bit set.
558
559 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
560
561 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
562 conversion.
563 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
564 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
565 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
566 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
567 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
568
569 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
570
571 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
572
573 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
574
575 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
576 displaced_step_closure_up.
577 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
578 (struct displaced_step_closure_up):
579 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
580 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
581 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
582 Likewise.
583 * gdbarch.sh (displaced_step_copy_insn): Likewise.
584 * gdbarch.c, gdbarch.h: Re-generate.
585 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
586 displaced_step_closure_up.
587 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
588 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
589 * infrun.h (displaced_step_closure_up): New type alias.
590 (struct displaced_step_inferior_state) <step_closure>: Change
591 type to displaced_step_closure_up.
592 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
593 displaced_step_closure_up.
594 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
595
596 2020-02-14 Tom Tromey <tom@tromey.com>
597
598 * minidebug.c (gnu_debug_key): New global.
599 (find_separate_debug_file_in_section): Use it.
600
601 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
602
603 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
604 std::unique_ptr.
605 * gdbarch.c: Re-generate.
606 * gdbarch.h: Re-generate.
607 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
608 change.
609 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
610 type to std::unique_ptr.
611 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
612 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
613 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
614 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
615 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
616 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
617 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
618 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
619 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
620
621 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
622
623 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
624 std::unique_ptr.
625 (displaced_step_clear): Rename to...
626 (displaced_step_reset): ... this. Just call displaced->reset ().
627 (displaced_step_clear_cleanup): Rename to...
628 (displaced_step_reset_cleanup): ... this.
629 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
630 (displaced_step_fixup): Likewise.
631 (resume_1): Likewise.
632 (handle_inferior_event): Restore child's memory before calling
633 displaced_step_fixup on the parent.
634 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
635 to std::unique_ptr.
636 <step_closure>: Change type to std::unique_ptr.
637
638 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
639
640 * arm-tdep.c: Include count-one-bits.h.
641 (cleanup_block_store_pc): Use count_one_bits.
642 (cleanup_block_load_pc): Use count_one_bits.
643 (arm_copy_block_xfer): Use count_one_bits.
644 (thumb2_copy_block_xfer): Use count_one_bits.
645 (thumb_copy_pop_pc_16bit): Use count_one_bits.
646 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
647 (thumb_get_next_pcs_raw): Use count_one_bits.
648 (arm_get_next_pcs_raw): Use count_one_bits_l.
649 * arch/arm.c (bitcount): Remove.
650 * arch/arm.h (bitcount): Remove.
651
652 2020-02-14 Tom Tromey <tromey@adacore.com>
653
654 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
655 Update.
656 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
657 * dwarf2/loc.c (call_site_find_chain_1): Return
658 unique_xmalloc_ptr.
659 (call_site_find_chain): Likewise.
660
661 2020-02-14 Richard Biener <rguenther@suse.de>
662
663 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
664 on expression with division operators.
665
666 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
667
668 * MAINTAINERS (Write After Approval): Adding myself.
669
670 2020-02-12 Tom Tromey <tom@tromey.com>
671
672 * event-loop.c (event_data, gdb_event, event_handler_func):
673 Remove.
674
675 2020-02-12 Tom Tromey <tom@tromey.com>
676
677 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
678 (dwarf2_frame_objfile_data): Add comment.
679 (find_comp_unit, set_comp_unit): New functions.
680 (dwarf2_frame_find_fde): Use find_comp_unit.
681 (dwarf2_build_frame_info): Use set_comp_unit.
682
683 2020-02-12 Tom Tromey <tom@tromey.com>
684
685 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
686 (comp_unit): Don't initialize objfile.
687 (execute_cfa_program): Add text_offset parameter.
688 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
689 (dwarf2_frame_cache): Update.
690 (dwarf2_build_frame_info): Don't set "objfile" member.
691
692 2020-02-12 Tom Tromey <tom@tromey.com>
693
694 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
695 (decode_frame_entry): Likewise.
696 (dwarf2_build_frame_info): Update.
697
698 2020-02-12 Tom Tromey <tom@tromey.com>
699
700 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
701 (decode_frame_entry_1): Use the comp_unit obstack.
702
703 2020-02-12 Tom Tromey <tom@tromey.com>
704
705 * dwarf2/frame.c (struct comp_unit): Add initializers and
706 constructor.
707 (dwarf2_frame_objfile_data): Store a comp_unit.
708 (dwarf2_frame_find_fde): Update.
709 (dwarf2_build_frame_info): Use "new".
710
711 2020-02-12 Tom Tromey <tom@tromey.com>
712
713 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
714 (dwarf2_fde_table): Typedef for std::vector.
715 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
716 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
717 (decode_frame_entry): Update.
718 (dwarf2_build_frame_info): Use "new".
719
720 2020-02-12 Christian Biesinger <cbiesinger@google.com>
721
722 * arm-tdep.c (arm_gdbarch_init): Update.
723 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
724 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
725 have_neon, is_m>: Change to bool.
726
727 2020-02-12 Christian Biesinger <cbiesinger@google.com>
728
729 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
730
731 2020-02-12 Tom Tromey <tom@tromey.com>
732
733 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
734
735 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
736
737 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
738 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
739
740 2020-02-11 Tom Tromey <tom@tromey.com>
741
742 * psymtab.h: Update comment.
743
744 2020-02-11 Tom Tromey <tom@tromey.com>
745
746 * gdb_obstack.h (struct auto_obstack): Use
747 DISABLE_COPY_AND_ASSIGN.
748
749 2020-02-11 Tom Tromey <tom@tromey.com>
750
751 * dwarf2/frame.h (struct objfile): Don't forward declare.
752
753 2020-02-11 Christian Biesinger <cbiesinger@google.com>
754
755 * cris-tdep.c (cris_supply_gregset): Change signature to match
756 what struct regset expects.
757 (cris_regset): New struct.
758 (fetch_core_registers): Remove.
759 (cris_iterate_over_regset_sections): New function.
760 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
761 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
762
763 2020-02-11 Christian Biesinger <cbiesinger@google.com>
764
765 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
766 registers.
767
768 2020-02-11 Christian Biesinger <cbiesinger@google.com>
769
770 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
771
772 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
773
774 * configure: Re-generate.
775
776 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
777
778 * configure: Re-generate.
779
780 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
781
782 * acinclude: Update warning.m4 path.
783 * warning.m4: Move to gdbsupport.
784
785 2020-02-11 Tom Tromey <tromey@adacore.com>
786
787 * remote.c (remote_console_output): Update.
788 * printcmd.c (printf_command): Update.
789 * event-loop.c (gdb_wait_for_event): Update.
790 * linux-nat.c (sigchld_handler): Update.
791 * remote-sim.c (gdb_os_write_stdout): Update.
792 (gdb_os_flush_stdout): Update.
793 (gdb_os_flush_stderr): Update.
794 (gdb_os_write_stderr): Update.
795 * exceptions.c (print_exception): Update.
796 * remote-fileio.c (remote_fileio_func_read): Update.
797 (remote_fileio_func_write): Update.
798 * tui/tui.c (tui_enable): Update.
799 * tui/tui-interp.c (tui_interp::init): Update.
800 * utils.c (init_page_info): Update.
801 (putchar_unfiltered, fputc_unfiltered): Update.
802 (gdb_flush): Update.
803 (emit_style_escape): Update.
804 (flush_wrap_buffer, fputs_maybe_filtered): Update.
805 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
806 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
807 (stderr_file::write): Update.
808 (stderr_file::puts): Update.
809 * ui-file.h (ui_file_isatty, ui_file_write)
810 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
811 (ui_file_puts): Don't declare.
812
813 2020-02-10 Tom de Vries <tdevries@suse.de>
814
815 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
816 sentinel to char *.
817
818 2020-02-09 Tom de Vries <tdevries@suse.de>
819
820 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
821 filename if it matches "<artificial>".
822
823 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
824
825 * windows-tdep.c (struct enum_value_name): New struct.
826 (create_enum): New function.
827 (windows_get_siginfo_type): Create and use enum types.
828
829 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
830
831 * NEWS: Mention $_siginfo support for Windows.
832 * windows-nat.c (handle_exception): Set siginfo_er.
833 (windows_nat_target::mourn_inferior): Reset siginfo_er.
834 (windows_xfer_siginfo): New function.
835 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
836 * windows-tdep.c (struct windows_gdbarch_data): New struct.
837 (init_windows_gdbarch_data): New function.
838 (get_windows_gdbarch_data): New function.
839 (windows_get_siginfo_type): New function.
840 (windows_init_abi): Register windows_get_siginfo_type.
841 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
842
843 2020-02-08 Tom Tromey <tom@tromey.com>
844
845 * dwarf2/read.c (class cutu_reader) <cutu_reader,
846 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
847 <keep>: Declare method.
848 <m_keep>: Remove member.
849 <~cutu_reader>: Remove.
850 (cutu_reader::init_tu_and_read_dwo_dies): Update.
851 (cutu_reader::cutu_reader): Update.
852 (cutu_reader::keep): Rename from ~cutu_reader.
853 (process_psymtab_comp_unit, build_type_psymtabs_1)
854 (process_skeletonless_type_unit, load_partial_comp_unit)
855 (load_full_comp_unit, dwarf2_read_addr_index)
856 (read_signatured_type): Update.
857
858 2020-02-08 Tom Tromey <tom@tromey.com>
859
860 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
861 "want_partial_unit" parameter.
862 (process_psymtab_comp_unit): Change want_partial_unit to bool.
863 Inline check for DW_TAG_partial_unit.
864 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
865
866 2020-02-08 Tom Tromey <tom@tromey.com>
867
868 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
869 read.c.
870 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
871 read.c.
872
873 2020-02-08 Tom Tromey <tom@tromey.com>
874
875 * dwarf2/read.c (read_address): Move to comp-unit.c.
876 (dwarf2_rnglists_process, dwarf2_ranges_process)
877 (read_attribute_value, dwarf_decode_lines_1)
878 (var_decode_location, decode_locdesc): Update.
879 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
880 read.c. Remove "cu" parameter.
881 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
882 method.
883
884 2020-02-08 Tom Tromey <tom@tromey.com>
885
886 * dwarf2/read.c (read_attribute_value, read_indirect_string)
887 (read_indirect_line_string): Update.
888 * dwarf2/comp-unit.c (read_offset): Remove.
889 (read_comp_unit_head): Update.
890 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
891 method.
892 (read_offset): Don't declare.
893
894 2020-02-08 Tom Tromey <tom@tromey.com>
895
896 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
897 * dwarf2/read.c (struct comp_unit_head): Move to
898 dwarf2/comp-unit.h.
899 (enum class rcuh_kind): Move to comp-unit.h.
900 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
901 (read_comp_unit_head, error_check_comp_unit_head)
902 (read_and_check_comp_unit_head): Move to comp-unit.c.
903 (read_offset, dwarf_unit_type_name): Likewise.
904 (create_debug_type_hash_table, read_cutu_die_from_dwo)
905 (cutu_reader::cutu_reader, read_call_site_scope)
906 (find_partial_die, follow_die_offset): Update.
907 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
908
909 2020-02-08 Tom Tromey <tom@tromey.com>
910
911 * dwarf2/read.c (read_offset_1): Move to leb.c.
912 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
913 (dwarf_decode_macro_bytes): Update.
914 * dwarf2/leb.c (read_offset): Rename; move from read.c.
915 * dwarf2/leb.h (read_offset): Declare.
916
917 2020-02-08 Tom Tromey <tom@tromey.com>
918
919 * dwarf2/read.c (dwarf2_section_size): Remove.
920 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
921 Update.
922 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
923
924 2020-02-08 Tom Tromey <tom@tromey.com>
925
926 * dwarf2/read.c (read_initial_length): Move to leb.c.
927 * dwarf2/leb.h (read_initial_length): Declare.
928 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
929 handle_nonstd parameter.
930 * dwarf2/frame.c (read_initial_length): Remove.
931 (decode_frame_entry_1): Update.
932
933 2020-02-08 Tom Tromey <tom@tromey.com>
934
935 * dwarf2/loc.c (dwarf2_find_location_expression)
936 (dwarf_evaluate_loc_desc::get_tls_address)
937 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
938 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
939 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
940 (dwarf2_compile_property_to_c)
941 (dwarf2_loc_desc_get_symbol_read_needs)
942 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
943 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
944 (loclist_describe_location, loclist_tracepoint_var_ref)
945 (loclist_generate_c_location): Update.
946 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
947 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
948 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
949 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
950 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
951 (dwarf2_per_cu_data::addr_size)
952 (dwarf2_per_cu_data::ref_addr_size)
953 (dwarf2_per_cu_data::text_offset)
954 (dwarf2_per_cu_data::addr_type): Now methods.
955 (per_cu_header_read_in): Make per_cu "const".
956 (dwarf2_version): Remove.
957 (dwarf2_per_cu_data::int_type): Now a method.
958 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
959 (set_die_type, read_array_type, read_subrange_index_type)
960 (read_tag_string_type, read_subrange_type): Update.
961 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
962 offset_size, ref_addr_size, text_offset, addr_type, version,
963 objfile, int_type, addr_sized_int_type>: Declare methods.
964
965 2020-02-08 Tom Tromey <tom@tromey.com>
966
967 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
968 Move earlier.
969
970 2020-02-08 Tom Tromey <tom@tromey.com>
971
972 * dwarf2/read.h (dwarf_line_debug): Declare.
973 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
974 * dwarf2/read.c: Move line_header code to new files.
975 (dwarf_line_debug): No longer static.
976 * dwarf2/line-header.c: New file.
977 * dwarf2/line-header.h: New file.
978
979 2020-02-08 Tom Tromey <tom@tromey.com>
980
981 * dwarf2/read.c (struct line_header) <file_full_name,
982 file_file_name>: Return unique_xmalloc_ptr.
983 (line_header::file_file_name): Update.
984 (line_header::file_full_name): Update.
985 (dw2_get_file_names_reader): Update.
986 (macro_start_file): Update.
987
988 2020-02-08 Tom Tromey <tom@tromey.com>
989
990 * dwarf2/read.c (struct line_header) <file_full_name,
991 file_file_name>: Declare methods.
992 (dw2_get_file_names_reader): Update.
993 (file_file_name): Now a method.
994 (file_full_name): Likewise.
995 (macro_start_file): Update.
996
997 2020-02-08 Tom Tromey <tom@tromey.com>
998
999 * dwarf2/read.c (dwarf_always_disassemble)
1000 (show_dwarf_always_disassemble): Move to loc.c.
1001 (_initialize_dwarf2_read): Move "always-disassemble" registration
1002 to loc.c.
1003 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
1004 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
1005 static.
1006 (show_dwarf_always_disassemble): Move from read.c.
1007 (_initialize_dwarf2loc): Move always-disassemble from read.c.
1008
1009 2020-02-08 Tom Tromey <tom@tromey.com>
1010
1011 * dwarf2/read.c (~dwarf2_per_objfile): Update.
1012 (create_quick_file_names_table): Return htab_up.
1013 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
1014 Update.
1015 * dwarf2/read.h (struct dwarf2_per_objfile)
1016 <quick_file_names_table>: Now htab_up.
1017
1018 2020-02-08 Tom Tromey <tom@tromey.com>
1019
1020 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
1021
1022 2020-02-08 Tom Tromey <tom@tromey.com>
1023
1024 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
1025 Rewrite.
1026 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
1027 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
1028 (abbrev_table::abbrev_table): No longer inline.
1029 (ABBREV_HASH_SIZE): Remove.
1030 (abbrev_table::m_abbrevs): Now an htab_up.
1031
1032 2020-02-08 Tom Tromey <tom@tromey.com>
1033
1034 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
1035 (cutu_reader): Update.
1036 (build_type_psymtabs_1): Update.
1037 * dwarf2/abbrev.c (abbrev_table::read): Rename.
1038 (abbrev_table::alloc_abbrev): Update.
1039 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
1040 (abbrev_table::read): New static method, renamed from
1041 abbrev_table_read_table.
1042 (abbrev_table::alloc_abbrev)
1043 (abbrev_table::add_abbrev): Now private.
1044 (abbrev_table::abbrev_table): Now private.
1045 (abbrev_table::m_abbrev_obstack): Now private. Rename.
1046
1047 2020-02-08 Tom Tromey <tom@tromey.com>
1048
1049 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
1050 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
1051 htab_up.
1052
1053 2020-02-08 Tom Tromey <tom@tromey.com>
1054
1055 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
1056 htab_up.
1057 (lookup_dwo_unit_in_dwp): Update.
1058 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
1059 on obstack.
1060
1061 2020-02-08 Tom Tromey <tom@tromey.com>
1062
1063 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
1064 obstack.
1065
1066 2020-02-08 Tom Tromey <tom@tromey.com>
1067
1068 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
1069 line_header_hash.
1070 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
1071 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
1072 Change type to htab_up.
1073
1074 2020-02-08 Tom Tromey <tom@tromey.com>
1075
1076 * dwarf2/read.c (allocate_type_unit_groups_table): Return
1077 htab_up. Don't allocate on obstack.
1078 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
1079 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
1080 Change type to htab_up.
1081
1082 2020-02-08 Tom Tromey <tom@tromey.com>
1083
1084 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
1085 Change type to htab_up.
1086 * dwarf2/read.c (create_signatured_type_table_from_index)
1087 (create_signatured_type_table_from_debug_names)
1088 (create_all_type_units, add_type_unit)
1089 (lookup_dwo_signatured_type, lookup_signatured_type)
1090 (process_skeletonless_type_unit): Update.
1091 (create_debug_type_hash_table, create_debug_types_hash_table):
1092 Change type of types_htab.
1093 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
1094 htab_up. Don't allocate on obstack.
1095 (create_cus_hash_table): Change type of cus_htab parameter.
1096 (struct dwo_file) <cus, tus>: Now htab_up.
1097 (lookup_dwo_signatured_type, lookup_dwo_cutu)
1098 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
1099 (queue_and_load_all_dwo_tus): Update.
1100 * dwarf2/index-write.c (write_gdbindex): Update.
1101 (write_debug_names): Update.
1102
1103 2020-02-08 Tom Tromey <tom@tromey.com>
1104
1105 * dwarf2/read.h (struct dwarf2_queue_item): Move from
1106 dwarf2/read.c. Remove "next" member. Add constructor ntad
1107 destructor.
1108 (struct dwarf2_per_objfile) <queue>: New member.
1109 * dwarf2/read.c (struct dwarf2_queue_item): Move to
1110 dwarf2/read.h.
1111 (dwarf2_queue, dwarf2_queue_tail): Remove.
1112 (class dwarf2_queue_guard): Add parameter to constructor. Use
1113 DISABLE_COPY_AND_ASSIGN.
1114 <m_per_objfile>: New member.
1115 <~dwarf2_queue_guard>: Rewrite.
1116 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
1117 Update.
1118 (~dwarf2_queue_item): New.
1119
1120 2020-02-08 Tom Tromey <tom@tromey.com>
1121
1122 * dwarf2/read.c (struct die_info) <has_children>: New member.
1123 (dw2_get_file_names_reader): Remove has_children.
1124 (dw2_get_file_names): Update.
1125 (read_cutu_die_from_dwo): Remove has_children.
1126 (cutu_reader::init_tu_and_read_dwo_dies)
1127 (cutu_reader::cutu_reader): Update.
1128 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
1129 Remove has_children.
1130 (build_type_psymtabs_1, process_skeletonless_type_unit)
1131 (load_partial_comp_unit, load_full_comp_unit): Update.
1132 (create_dwo_cu_reader): Remove has_children.
1133 (create_cus_hash_table, read_die_and_children): Update.
1134 (read_full_die_1,read_full_die): Remove has_children.
1135 (read_signatured_type): Update.
1136 (class cutu_reader) <has_children>: Remove.
1137
1138 2020-02-08 Tom Tromey <tom@tromey.com>
1139
1140 * dwarf2/expr.c: Rename from dwarf2expr.c.
1141 * dwarf2/expr.h: Rename from dwarf2expr.h.
1142 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
1143 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
1144 * dwarf2/frame.c: Rename from dwarf2-frame.c.
1145 * dwarf2/frame.h: Rename from dwarf2-frame.h.
1146 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
1147 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
1148 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
1149 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
1150 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
1151 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
1152 * dwarf2/loc.c: Rename from dwarf2loc.c.
1153 * dwarf2/loc.h: Rename from dwarf2loc.h.
1154 * dwarf2/read.c: Rename from dwarf2read.c.
1155 * dwarf2/read.h: Rename from dwarf2read.h.
1156 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
1157 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
1158 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
1159 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
1160 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
1161 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
1162 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
1163 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
1164 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
1165 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
1166 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
1167 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
1168 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
1169 Update.
1170 * Makefile.in (COMMON_SFILES): Update.
1171 (HFILES_NO_SRCDIR): Update.
1172
1173 2020-02-08 Tom Tromey <tom@tromey.com>
1174
1175 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
1176 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
1177
1178 2020-02-08 Tom Tromey <tom@tromey.com>
1179
1180 * dwarf2read.h (struct die_info): Don't declare.
1181
1182 2020-02-08 Tom Tromey <tom@tromey.com>
1183
1184 * dwarf2read.h (die_info_ptr): Remove typedef.
1185
1186 2020-02-08 Tom Tromey <tom@tromey.com>
1187
1188 * dwarf2read.c (read_call_site_scope)
1189 (handle_data_member_location, dwarf2_add_member_fn)
1190 (mark_common_block_symbol_computed, read_common_block)
1191 (attr_to_dynamic_prop, partial_die_info::read)
1192 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
1193 (dwarf2_symbol_mark_computed, set_die_type): Update.
1194 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
1195 method.
1196 (attr_form_is_block): Don't declare.
1197 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
1198
1199 2020-02-08 Tom Tromey <tom@tromey.com>
1200
1201 * dwarf2read.c (dwarf2_find_base_address, )
1202 (read_call_site_scope, rust_containing_type)
1203 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
1204 (handle_data_member_location, dwarf2_add_member_fn)
1205 (get_alignment, read_structure_type, process_structure_scope)
1206 (mark_common_block_symbol_computed, read_common_block)
1207 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
1208 (partial_die_info::read, read_attribute_value, new_symbol)
1209 (lookup_die_type, dwarf2_get_ref_die_offset)
1210 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
1211 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
1212 (dwarf2_symbol_mark_computed): Update.
1213 * dwarf2/attribute.h (struct attribute) <value_as_address,
1214 form_is_section_offset, form_is_constant, form_is_ref>: Declare
1215 methods.
1216 (value_as_address, attr_form_is_section_offset)
1217 (attr_form_is_constant, attr_form_is_ref): Don't declare.
1218 * dwarf2/attribute.c (attribute::value_as_address)
1219 (attribute::form_is_section_offset, attribute::form_is_constant)
1220 (attribute::form_is_ref): Now methods.
1221
1222 2020-02-08 Tom Tromey <tom@tromey.com>
1223
1224 * dwarf2read.c (struct attribute, DW_STRING)
1225 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
1226 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
1227 (attr_form_is_block, attr_form_is_section_offset)
1228 (attr_form_is_constant, attr_form_is_ref): Move.
1229 * dwarf2/attribute.h: New file.
1230 * dwarf2/attribute.c: New file, from dwarf2read.c.
1231 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
1232
1233 2020-02-08 Tom Tromey <tom@tromey.com>
1234
1235 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
1236 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
1237 Move.
1238 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
1239 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
1240 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
1241 abbrev.c.
1242 * dwarf2/abbrev.h: New file.
1243 * dwarf2/abbrev.c: New file, from dwarf2read.c.
1244 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
1245
1246 2020-02-08 Tom Tromey <tom@tromey.com>
1247
1248 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
1249 (dwarf2_section_size, dwarf2_get_section_info)
1250 (create_signatured_type_table_from_debug_names)
1251 (create_addrmap_from_aranges, read_debug_names_from_section)
1252 (get_gdb_index_contents_from_section, read_comp_unit_head)
1253 (error_check_comp_unit_head, read_abbrev_offset)
1254 (create_debug_type_hash_table, init_cu_die_reader)
1255 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
1256 (read_comp_units_from_section, create_cus_hash_table)
1257 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
1258 (create_dwp_v2_section, dwarf2_rnglists_process)
1259 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
1260 (abbrev_table_read_table, read_indirect_string_at_offset_from)
1261 (read_indirect_string_from_dwz, read_addr_index_1)
1262 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
1263 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1264 (fill_in_loclist_baton): Update.
1265 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
1266 get_containing_section, get_bfd_owner, get_bfd_section,
1267 get_file_name, get_id, get_flags, empty, read>: Declare methods.
1268 (dwarf2_read_section, get_section_name, get_section_file_name)
1269 (get_containing_section, get_section_bfd_owner)
1270 (get_section_bfd_section, get_section_name, get_section_file_name)
1271 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
1272 declare.
1273 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
1274 (dwarf2_section_info::get_bfd_owner)
1275 (dwarf2_section_info::get_bfd_section)
1276 (dwarf2_section_info::get_name)
1277 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
1278 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
1279 (dwarf2_section_info::read): Now methods.
1280 * dwarf-index-write.c (class debug_names): Update.
1281
1282 2020-02-08 Tom Tromey <tom@tromey.com>
1283
1284 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
1285 Move to dwarf2/section.h.
1286 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
1287 (get_section_bfd_section, get_section_name)
1288 (get_section_file_name, get_section_id, get_section_flags)
1289 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
1290 dwarf2/section.c.
1291 * dwarf2/section.h: New file.
1292 * dwarf2/section.c: New file, from dwarf2read.c.
1293 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
1294
1295 2020-02-08 Tom Tromey <tom@tromey.com>
1296
1297 * dwarf2read.h (read_unsigned_leb128): Don't declare.
1298 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
1299 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
1300 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
1301 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
1302 * dwarf2/leb.h: New file, from dwarf2read.c.
1303 * dwarf2/leb.c: New file, from dwarf2read.c.
1304 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
1305 Remove.
1306 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
1307 (COMMON_SFILES): Add dwarf2/leb.c.
1308
1309 2020-02-08 Joel Brobecker <brobecker@adacore.com>
1310
1311 GDB 9.1 released.
1312
1313 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
1314
1315 PR gdb/25190:
1316 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
1317 * gdb/remote.c (remote_console_output): Update.
1318 * gdb/ui-file.c (fputs_unfiltered): Rename to...
1319 (ui_file_puts): ...this.
1320 * gdb/ui-file.h (ui_file_puts): Add declaration.
1321 * gdb/utils.c (emit_style_escape): Update.
1322 (flush_wrap_buffer): Update.
1323 (fputs_maybe_filtered): Update.
1324 (fputs_unfiltered): Add function.
1325
1326 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
1327
1328 * gdb/event-loop.c (gdb_wait_for_event): Update.
1329 * gdb/printcmd.c (printf_command): Update.
1330 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
1331 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
1332 (gdb_os_flush_stderr): Update.
1333 * gdb/remote.c (remote_console_output): Update.
1334 * gdb/ui-file.c (gdb_flush): Rename to...
1335 (ui_file_flush): ...this.
1336 (stderr_file::write): Update.
1337 (stderr_file::puts): Update.
1338 * gdb/ui-file.h (gdb_flush): Rename to...
1339 (ui_file_flush): ...this.
1340 * gdb/utils.c (gdb_flush): Add function.
1341 * gdb/utils.h (gdb_flush): Add declaration.
1342
1343 2020-02-07 Tom Tromey <tromey@adacore.com>
1344
1345 PR breakpoints/24915:
1346 * source.c (find_and_open_source): Do not check basenames_may_differ.
1347
1348 2020-02-07 Tom Tromey <tom@tromey.com>
1349
1350 * README: Update gdbserver documentation.
1351 * gdbserver: Move to top level.
1352 * configure.tgt (build_gdbserver): Remove.
1353 * configure.ac: Remove --enable-gdbserver.
1354 * configure: Rebuild.
1355 * Makefile.in (distclean): Don't mention gdbserver.
1356
1357 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
1358
1359 * source-cache.c (source_cache::ensure): Surround
1360 get_plain_source_lines with a try/catch.
1361 (source_cache::get_line_charpos): Get rid of try/catch
1362 and only check for the return value of "ensure".
1363 * tui/tui-source.c (tui_source_window::set_contents):
1364 Simplify "nlines" calculation.
1365
1366 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
1367
1368 * MAINTAINERS (Write After Approval): Add myself.
1369
1370 2020-02-05 Christian Biesinger <cbiesinger@google.com>
1371
1372 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
1373 function call.
1374
1375 2020-02-05 Christian Biesinger <cbiesinger@google.com>
1376
1377 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
1378
1379 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
1380
1381 * nat/riscv-linux-tdesc.h: New file.
1382 * nat/riscv-linux-tdesc.c: New file, taking code from...
1383 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
1384 ... here.
1385 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
1386 NATDEPFILES.
1387
1388 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
1389
1390 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
1391 we don't set the fake simulator ptid to the null_ptid.
1392
1393 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
1394
1395 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
1396 * gdbthread.h (class thread_info) <resumed>: Likewise.
1397 * infrun.c (resume_1): Likewise.
1398 (proceed): Likewise.
1399 (infrun_thread_stop_requested): Likewise.
1400 (stop_all_threads): Likewise.
1401 (handle_inferior_event): Likewise.
1402 (restart_threads): Likewise.
1403 (finish_step_over): Likewise.
1404 (keep_going_stepped_thread): Likewise.
1405 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
1406 (linux_handle_extended_wait): Likewise.
1407 * record-btrace.c (get_thread_current_frame_id): Likewise.
1408 * record-full.c (record_full_wait_1): Likewise.
1409 * remote.c (remote_target::process_initial_stop_replies): Likewise.
1410 * target.c (target_resume): Likewise.
1411 * thread.c (set_running_thread): Likewise.
1412
1413 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
1414
1415 * f-valprint.c (f77_print_array_1): Changed datatype of index
1416 variable to LONGEST from int to enable it to contain bound
1417 values correctly.
1418
1419 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
1420
1421 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
1422 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
1423 offsets according to FLEN determined.
1424 (riscv_linux_nat_target::read_description): Determine FLEN
1425 dynamically.
1426 (riscv_linux_nat_target::fetch_registers): Size regset buffer
1427 according to FLEN determined.
1428 (riscv_linux_nat_target::store_registers): Likewise.
1429
1430 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
1431
1432 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
1433 when reg->group is empty and reggroup is not.
1434
1435 2020-01-31 Tom Tromey <tromey@adacore.com>
1436
1437 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
1438 Call beneath target's mourn_inferior after unpushing.
1439
1440 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
1441
1442 PR tui/9765
1443 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
1444 have enough lines to fill the screen, still return the lowest
1445 address we found.
1446
1447 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
1448
1449 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
1450 '-', '<', and '>' commands.
1451
1452 2020-01-29 Pedro Alves <palves@redhat.com>
1453 Sergio Durigan Junior <sergiodj@redhat.com>
1454
1455 * infcmd.c (construct_inferior_arguments): Assert that
1456 'argc' is greater than 0.
1457
1458 2020-01-29 Luis Machado <luis.machado@linaro.org>
1459
1460 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
1461 (BRK_INSN_MASK): Define to 0xd4200000.
1462 (aarch64_program_breakpoint_here_p): New function.
1463 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
1464 * arch-utils.c (default_program_breakpoint_here_p): Moved from
1465 breakpoint.c.
1466 * arch-utils.h (default_program_breakpoint_here_p): Moved from
1467 breakpoint.h
1468 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
1469 call gdbarch_program_breakpoint_here_p.
1470 (program_breakpoint_here): Moved to arch-utils.c, renamed to
1471 default_program_breakpoint_here_p, changed return type to bool and
1472 simplified.
1473 * breakpoint.h (program_breakpoint_here): Moved prototype to
1474 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
1475 return type to bool.
1476 * gdbarch.c: Regenerate.
1477 * gdbarch.h: Regenerate.
1478 * gdbarch.sh (program_breakpoint_here_p): New method.
1479 * infrun.c (handle_signal_stop): Call
1480 gdbarch_program_breakpoint_here_p.
1481
1482 2020-01-26 Tom Tromey <tom@tromey.com>
1483
1484 * ctfread.c (struct ctf_fp_info): Reindent.
1485 (_initialize_ctfread): Remove.
1486
1487 2020-01-26 Tom Tromey <tom@tromey.com>
1488
1489 * psymtab.c (partial_map_expand_apply)
1490 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
1491 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
1492 (psym_print_stats, psym_expand_symtabs_for_function)
1493 (psym_map_symbol_filenames, psym_map_matching_symbols)
1494 (psym_expand_symtabs_matching)
1495 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
1496 (maintenance_check_psymtabs): Use new methods.
1497 * psympriv.h (struct partial_symtab) <readin_p,
1498 get_compunit_symtab>: New methods.
1499 <readin, compunit_symtab>: Remove members.
1500 (struct standard_psymtab): New.
1501 (struct legacy_psymtab): Derive from standard_psymtab.
1502 * dwarf2read.h (struct dwarf2_psymtab): Derive from
1503 standard_psymtab.
1504 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
1505
1506 2020-01-26 Tom Tromey <tom@tromey.com>
1507
1508 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
1509 read_dependencies. Add assert.
1510 * psymtab.c (partial_symtab::read_dependencies): New method.
1511 * psympriv.h (struct partial_symtab) <read_dependencies>: New
1512 method.
1513 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
1514 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
1515 read_dependencies.
1516 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
1517 Add assert.
1518
1519 2020-01-26 Tom Tromey <tom@tromey.com>
1520
1521 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
1522 Call expand_psymtab.
1523 (xcoff_read_symtab): Call expand_psymtab.
1524 (xcoff_start_psymtab, xcoff_end_psymtab): Set
1525 legacy_expand_psymtab.
1526 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
1527 method.
1528 (struct legacy_psymtab) <expand_psymtab>: Implement.
1529 <legacy_expand_psymtab>: New member.
1530 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
1531 (parse_partial_symbols): Set legacy_expand_psymtab.
1532 (psymtab_to_symtab_1): Change argument order. Call
1533 expand_psymtab.
1534 (new_psymtab): Set legacy_expand_psymtab.
1535 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
1536 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
1537 expand_psymtab.
1538 (dwarf2_psymtab::expand_psymtab): Rename from
1539 psymtab_to_symtab_1. Call expand_psymtab.
1540 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
1541 (dbx_end_psymtab): Likewise.
1542 (dbx_psymtab_to_symtab_1): Change argument order. Call
1543 expand_psymtab.
1544 (dbx_read_symtab): Call expand_psymtab.
1545 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
1546 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
1547 (ctf_psymtab::read_symtab): Call expand_psymtab.
1548
1549 2020-01-26 Tom Tromey <tom@tromey.com>
1550
1551 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
1552 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
1553 messages.
1554 * mdebugread.c (mdebug_read_symtab): Remove prints.
1555 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
1556 assert.
1557 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
1558
1559 2020-01-26 Tom Tromey <tom@tromey.com>
1560
1561 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
1562 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
1563 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
1564 legacy_symtab.
1565 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
1566 * psymtab.c (psymtab_to_symtab): Call method.
1567 (dump_psymtab): Update.
1568 * psympriv.h (struct partial_symtab): Add virtual destructor.
1569 <read_symtab>: New method.
1570 (struct legacy_symtab): New.
1571 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
1572 (struct pst_map) <pst>: Now a legacy_psymtab.
1573 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
1574 (new_psymtab): Use legacy_psymtab.
1575 * dwarf2read.h (struct dwarf2_psymtab): New.
1576 (struct dwarf2_per_cu_data) <psymtab>: Use it.
1577 * dwarf2read.c (dwarf2_create_include_psymtab)
1578 (dwarf2_build_include_psymtabs, create_type_unit_group)
1579 (create_partial_symtab, process_psymtab_comp_unit_reader)
1580 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
1581 (set_partial_user): Use dwarf2_psymtab.
1582 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
1583 (psymtab_to_symtab_1, process_full_comp_unit)
1584 (process_full_type_unit, dwarf2_ranges_read)
1585 (dwarf2_get_pc_bounds, psymtab_include_file_name)
1586 (dwarf_decode_lines): Use dwarf2_psymtab.
1587 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
1588 (add_address_entry_worker, write_one_signatured_type)
1589 (recursively_count_psymbols, recursively_write_psymbols)
1590 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
1591 (write_debug_names): Likewise.
1592 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
1593 <pst>: Now a legacy_psymtab.
1594 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
1595 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
1596 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
1597 * ctfread.c (struct ctf_psymtab): New.
1598 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
1599 ctf_psymtab.
1600 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
1601 (create_partial_symtab): Return a ctf_psymtab.
1602 (scan_partial_symbols): Update.
1603
1604 2020-01-26 Tom Tromey <tom@tromey.com>
1605
1606 * xcoffread.c (xcoff_start_psymtab): Use new.
1607 * psymtab.c (partial_symtab::partial_symtab): New constructor,
1608 renamed from start_psymtab_common.
1609 * psympriv.h (struct partial_symtab): Add new constructor.
1610 (start_psymtab_common): Don't declare.
1611 * mdebugread.c (parse_partial_symbols): Use new.
1612 * dwarf2read.c (create_partial_symtab): Use new.
1613 * dbxread.c (start_psymtab): Use new.
1614 * ctfread.c (create_partial_symtab): Use new.
1615
1616 2020-01-26 Tom Tromey <tom@tromey.com>
1617
1618 * xcoffread.c (xcoff_end_psymtab): Use new.
1619 * psymtab.c (start_psymtab_common): Use new.
1620 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
1621 Update.
1622 * psympriv.h (struct partial_symtab): Add parameters to
1623 constructor. Don't inline.
1624 (allocate_psymtab): Don't declare.
1625 * mdebugread.c (new_psymtab): Use new.
1626 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
1627 * dbxread.c (dbx_end_psymtab): Use new.
1628
1629 2020-01-26 Tom Tromey <tom@tromey.com>
1630
1631 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
1632 allocate_psymtab. Update documentation.
1633 * psymtab.c (psymtab_storage::install_psymtab): Rename from
1634 allocate_psymtab. Do not use new.
1635 (allocate_psymtab): Use new. Update.
1636
1637 2020-01-26 Tom Tromey <tom@tromey.com>
1638
1639 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1640 * psymtab.c (psym_print_stats): Update.
1641 * psympriv.h (struct partial_symtab) <readin,
1642 psymtabs_addrmap_supported, anonymous>: Now bool.
1643 * mdebugread.c (psymtab_to_symtab_1): Update.
1644 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
1645 (build_type_psymtabs_reader, psymtab_to_symtab_1)
1646 (process_full_comp_unit, process_full_type_unit): Update.
1647 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
1648 * ctfread.c (psymtab_to_symtab): Update.
1649
1650 2020-01-26 Tom Tromey <tom@tromey.com>
1651
1652 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
1653 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
1654 * psymtab.c (psymtab_storage): Delete psymtabs.
1655 (psymtab_storage::allocate_psymtab): Use new.
1656 (psymtab_storage::discard_psymtab): Use delete.
1657 * psympriv.h (struct partial_symtab): Add constructor and
1658 initializers.
1659
1660 2020-01-26 Tom Tromey <tom@tromey.com>
1661
1662 * machoread.c: Do not include psympriv.h.
1663
1664 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1665
1666 * NEWS: Mention the new option and the set/show commands.
1667
1668 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1669
1670 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
1671 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
1672 (validate_exec_file): New variables, enums, functions.
1673 (exec_file_locate_attach, print_section_info): Style the filenames.
1674 (_initialize_exec): Install show_exec_file_mismatch_command and
1675 set_exec_file_mismatch_command.
1676 * gdbcore.h (validate_exec_file): Declare.
1677 * infcmd.c (attach_command): Call validate_exec_file.
1678 * remote.c ( remote_target::remote_add_inferior): Likewise.
1679
1680 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
1681
1682 * frame.c (find_frame_sal): Move call to get_next_frame into more
1683 inner scope.
1684 * inline-frame.c (inilne_state) <inline_state>: Update argument
1685 types.
1686 (inilne_state) <skipped_symbol>: Rename to...
1687 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
1688 (skip_inline_frames): Build vector of skipped symbols and use this
1689 to reate the inline_state.
1690 (inline_skipped_symbol): Add a comment and some assertions, fetch
1691 skipped symbol from the list.
1692
1693 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
1694
1695 * buildsym.c (lte_is_less_than): Delete.
1696 (buildsym_compunit::end_symtab_with_blockvector): Create local
1697 lambda function to sort line table entries, and use
1698 std::stable_sort instead of std::sort.
1699 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
1700 markers when looking for a previous line.
1701
1702 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
1703
1704 * dwarf2read.c (lnp_state_machine::record_line): Include
1705 end_sequence parameter in debug print out. Record the line if we
1706 are at an end_sequence marker even if it's not the start of a
1707 statement.
1708 * symmisc.c (maintenance_print_one_line_table): Print end of
1709 sequence markers with 'END' not '0'.
1710
1711 2020-01-24 Pedro Alves <palves@redhat.com>
1712
1713 PR gdb/25410
1714 * thread.c (scoped_restore_current_thread::restore): Use
1715 switch_to_inferior_no_thread.
1716 * exec.c: Include "progspace-and-thread.h".
1717 (add_target_sections, remove_target_sections):
1718 scoped_restore_current_pspace_and_thread instead of
1719 scoped_restore_current_thread.
1720 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
1721 and aspace to the inferior before calling clone_program_space.
1722 Remove stale comment.
1723
1724 2020-01-24 Christian Biesinger <cbiesinger@google.com>
1725
1726 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
1727 (arm_netbsd_nat_target::fetch_registers): ...this.
1728 (arm_nbsd_nat_target::store_registers): Rename to...
1729 (arm_netbsd_nat_target::store_registers): ...this.
1730
1731 2020-01-24 Christian Biesinger <cbiesinger@google.com>
1732
1733 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
1734 register_t.
1735
1736 2020-01-24 Christian Biesinger <cbiesinger@google.com>
1737
1738 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
1739 Update comment.
1740 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
1741 Likewise.
1742 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
1743 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
1744 the correct replacement (iterate_over_regset_sections).
1745 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
1746 Update comment.
1747
1748 2020-01-24 Graham Markall <graham.markall@embecosm.com>
1749
1750 PR gdb/23718
1751 * gdb/python/python.c (execute_gdb_command): Call
1752 async_enable_stdin in catch block.
1753
1754 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
1755
1756 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
1757 SWITCH_THRU_ALL_UIS.
1758
1759 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
1760
1761 PR tui/9765
1762 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
1763 comment, add extra parameter, and update to store previous symbol
1764 when appropriate.
1765 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
1766 add extra parameter.
1767 * tui/tui-disasm.c (tui_disassemble): Update header comment,
1768 remove unneeded parameter, add try/catch around gdb_print_insn,
1769 rewrite to add items to asm_lines vector.
1770 (tui_find_backward_disassembly_start_address): New function.
1771 (tui_find_disassembly_address): Updated throughout.
1772 (tui_disasm_window::set_contents): Update for changes to
1773 tui_disassemble.
1774 (tui_disasm_window::do_scroll_vertical): No need to adjust the
1775 number of lines to scroll.
1776
1777 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
1778
1779 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
1780 (SECT_OFF_DATA): Likewise.
1781 (SECT_OFF_RODATA): Likewise.
1782 (SECT_OFF_TEXT): Likewise.
1783 (SECT_OFF_BSS): Likewise.
1784 (struct objfile) <text_section_offset, data_section_offset>: New
1785 methods.
1786 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
1787 objfile::text_section_offset.
1788 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
1789 * coffread.c (coff_symtab_read): Likewise.
1790 (enter_linenos): Likewise.
1791 (process_coff_symbol): Likewise.
1792 * ctfread.c (get_objfile_text_range): Likewise.
1793 * dtrace-probe.c (dtrace_probe::get_relocated_address):
1794 Use objfile::data_section_offset.
1795 * dwarf2-frame.c (execute_cfa_program): Use
1796 objfile::text_section_offset.
1797 (dwarf2_frame_find_fde): Likewise.
1798 * dwarf2read.c (create_addrmap_from_index): Likewise.
1799 (create_addrmap_from_aranges): Likewise.
1800 (dw2_find_pc_sect_compunit_symtab): Likewise.
1801 (process_psymtab_comp_unit_reader): Likewise.
1802 (add_partial_symbol): Likewise.
1803 (add_partial_subprogram): Likewise.
1804 (process_full_comp_unit): Likewise.
1805 (read_file_scope): Likewise.
1806 (read_func_scope): Likewise.
1807 (read_lexical_block_scope): Likewise.
1808 (read_call_site_scope): Likewise.
1809 (dwarf2_rnglists_process): Likewise.
1810 (dwarf2_ranges_process): Likewise.
1811 (dwarf2_ranges_read): Likewise.
1812 (dwarf_decode_lines_1): Likewise.
1813 (new_symbol): Likewise.
1814 (dwarf2_fetch_die_loc_sect_off): Likewise.
1815 (dwarf2_per_cu_text_offset): Likewise.
1816 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
1817 * hppa-tdep.c (read_unwind_info): Likewise.
1818 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
1819 * psympriv.h (struct partial_symtab): Likewise.
1820 * psymtab.c (find_pc_sect_psymtab): Likewise.
1821 * solib-svr4.c (enable_break): Likewise.
1822 * stap-probe.c (relocate_address): Use
1823 objfile::data_section_offset.
1824 * xcoffread.c (enter_line_range): Use
1825 objfile::text_section_offset.
1826 (read_xcoff_symtab): Likewise.
1827
1828 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
1829
1830 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
1831 declaration to narrower scopes.
1832
1833 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
1834
1835 * darwin-nat.h (struct darwin_exception_msg, enum
1836 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
1837 Move up.
1838 (class darwin_nat_target) <wait_1, check_new_threads,
1839 decode_exception_message, decode_message, stop_inferior,
1840 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
1841 * darwin-nat.c (darwin_check_new_threads): Rename to...
1842 (darwin_nat_target::check_new_threads): ... this.
1843 (darwin_suspend_inferior_it): Remove.
1844 (darwin_decode_exception_message): Rename to...
1845 (darwin_nat_target::decode_exception_message): ... this.
1846 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
1847 (darwin_decode_message): Rename to...
1848 (darwin_nat_target::decode_message): ... this.
1849 (cancel_breakpoint): Rename to...
1850 (darwin_nat_target::cancel_breakpoint): ... this.
1851 (darwin_wait): Rename to...
1852 (darwin_nat_target::wait_1): ... this. Use range-based for loop
1853 instead of iterate_over_inferiors.
1854 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
1855 (darwin_stop_inferior): Rename to...
1856 (darwin_nat_target::stop_inferior): ... this.
1857 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
1858 (darwin_init_thread_list): Rename to...
1859 (darwin_nat_target::init_thread_list): ... this.
1860 (darwin_ptrace_him): Rename to...
1861 (darwin_nat_target::ptrace_him): ... this.
1862 (darwin_nat_target::create_inferior): Pass lambda function to
1863 fork_inferior.
1864 (darwin_nat_target::detach): Call stop_inferior instead of
1865 darwin_stop_inferior.
1866 * fork-inferior.h (fork_inferior): Change init_trace_fun
1867 parameter to gdb::function_view.
1868 * fork-inferior.c (fork_inferior): Likewise.
1869
1870 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
1871
1872 * i386-cygwin-tdep.c (core_process_module_section): Update.
1873 * windows-nat.c (struct lm_info_windows): Add text_offset.
1874 (windows_xfer_shared_libraries): Update.
1875 * windows-tdep.c (windows_xfer_shared_library):
1876 Add text_offset_cached argument.
1877 * windows-tdep.h (windows_xfer_shared_library): Update.
1878
1879 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
1880
1881 * gdbarch.sh: Add declaration for _initialize_gdbarch.
1882
1883 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
1884
1885 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
1886 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
1887 replace with range-based for.
1888 (gdbsim_interrupt_inferior): Remove.
1889 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
1890 with a range-based for. Inline code from
1891 gdbsim_interrupt_inferior.
1892
1893 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
1894
1895 * infrun.c (proceed): Fix indentation.
1896
1897 2020-01-21 Tom Tromey <tromey@adacore.com>
1898
1899 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
1900 * python/python.c (python_extension_ops): Update.
1901 (gdbpy_colorize): New function.
1902 * python/lib/gdb/__init__.py (colorize): New function.
1903 * extension.h (ext_lang_colorize): Declare.
1904 * extension.c (ext_lang_colorize): New function.
1905 * extension-priv.h (struct extension_language_ops) <colorize>: New
1906 member.
1907 * cli/cli-style.c (_initialize_cli_style): Update help text.
1908
1909 2020-01-21 Luis Machado <luis.machado@linaro.org>
1910
1911 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
1912 <cond>: Change type to bool.
1913 (aarch64_displaced_step_b_cond): Update cond to use bool type.
1914 (aarch64_displaced_step_cb): Likewise.
1915 (aarch64_displaced_step_tb): Likewise.
1916
1917 2020-01-21 Luis Machado <luis.machado@linaro.org>
1918
1919 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
1920 output.
1921
1922 2020-01-21 Luis Machado <luis.machado@linaro.org>
1923
1924 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
1925 <pc_adjust>: Adjust the documentation.
1926 (aarch64_displaced_step_fixup): Check if PC really moved before
1927 adjusting it.
1928
1929 2020-01-19 Tom Tromey <tom@tromey.com>
1930
1931 * disasm.c (~gdb_disassembler): New destructor.
1932 (gdb_buffered_insn_length): Call disassemble_free_target.
1933 * disasm.h (class gdb_disassembler): Declare destructor. Use
1934 DISABLE_COPY_AND_ASSIGN.
1935
1936 2020-01-19 Tom Tromey <tom@tromey.com>
1937
1938 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
1939 (die_reader_func_ftype): Remove.
1940 (cutu_reader): New class.
1941 (dw2_get_file_names_reader): Remove "data" parameter.
1942 (dw2_get_file_names): Use cutu_reader.
1943 (create_debug_type_hash_table): Update.
1944 (read_cutu_die_from_dwo): Update comment.
1945 (lookup_dwo_unit): Add dwo_name parameter.
1946 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
1947 die_reader_func_ftype and data parameters.
1948 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
1949 Remove die_reader_func_ftype and data parameters.
1950 (~cutu_reader): New; from init_cutu_and_read_dies.
1951 (cutu_reader::cutu_reader): Rename from
1952 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
1953 and data parameters.
1954 (init_cutu_and_read_dies_simple): Remove.
1955 (struct process_psymtab_comp_unit_data): Remove.
1956 (process_psymtab_comp_unit_reader): Remove data parameter; add
1957 want_partial_unit and pretend_language parameters.
1958 (process_psymtab_comp_unit): Use cutu_reader.
1959 (build_type_psymtabs_reader): Remove data parameter.
1960 (build_type_psymtabs_1): Use cutu_reader.
1961 (process_skeletonless_type_unit): Likewise.
1962 (load_partial_comp_unit_reader): Remove.
1963 (load_partial_comp_unit): Use cutu_reader.
1964 (load_full_comp_unit_reader): Remove.
1965 (load_full_comp_unit): Use cutu_reader.
1966 (struct create_dwo_cu_data): Remove.
1967 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
1968 dwo_unit parameters.
1969 (create_cus_hash_table): Use cutu_reader.
1970 (struct dwarf2_read_addr_index_data): Remove.
1971 (dwarf2_read_addr_index_reader): Remove.
1972 (dwarf2_read_addr_index): Use cutu_reader.
1973 (read_signatured_type_reader): Remove.
1974 (read_signatured_type): Use cutu_reader.
1975
1976 2020-01-19 Tom Tromey <tom@tromey.com>
1977
1978 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
1979 * tui/tui-wingeneral.h (class tui_suppress_output): New.
1980 (tui_wrefresh): Declare.
1981 * tui/tui-wingeneral.c (suppress_output): New global.
1982 (tui_suppress_output, ~tui_suppress_output): New constructor and
1983 destructor.
1984 (tui_wrefresh): New function.
1985 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
1986 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
1987 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
1988 method.
1989 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
1990 tui_wrefresh.
1991 (tui_data_window::no_refresh): New method.
1992 (tui_data_item_window::refresh_window): Call tui_wrefresh.
1993 (tui_reg_command): Use tui_suppress_output
1994 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
1995 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
1996 method.
1997 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
1998
1999 2020-01-19 Tom Tromey <tom@tromey.com>
2000
2001 * tui/tui-winsource.c (tui_update_source_windows_with_line):
2002 Handle case where symtab is null.
2003
2004 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
2005
2006 * linux-fork.c (one_fork_p): Simplify.
2007
2008 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
2009
2010 * top.c (struct qt_args): Remove.
2011 (kill_or_detach): Change return type to void, replace `void *`
2012 parameter with a proper one.
2013 (print_inferior_quit_action): Likewise.
2014 (quit_confirm): Use range-based for loop to iterate over inferiors.
2015 (quit_force): Likewise.
2016
2017 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
2018
2019 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
2020 `void *` parameter with proper parameters.
2021 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
2022 (print_one_inferior): Change return type to void, replace `void *`
2023 parameter with proper parameters.
2024 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
2025 inferiors.
2026 (get_other_inferior): Remove.
2027 (mi_cmd_remove_inferior): Use range-based loop to iterate over
2028 inferiors.
2029
2030 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
2031
2032 * mi/mi-interp.c (report_initial_inferior): Remove.
2033 (mi_interp::init): Use range-based for to iterate over inferiors.
2034
2035 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
2036
2037 * python/py-inferior.c (build_inferior_list): Remove.
2038 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
2039
2040 2020-01-16 Christian Biesinger <cbiesinger@google.com>
2041
2042 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
2043 (btrace_stitch_trace): Likewise.
2044 * charset.c (intermediate_encoding): Likewise (vaild).
2045 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
2046 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
2047 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
2048
2049 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
2050
2051 * windows-tdep.c (windows_get_tlb_type):
2052 Add rtl_user_process_parameters type.
2053
2054 2020-01-16 Pedro Alves <palves@redhat.com>
2055 Norbert Lange <nolange79@gmail.com>
2056
2057 PR build/24805
2058 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
2059 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
2060 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
2061 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
2062 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
2063 (ps_plog): Redeclare exported functions with default visibility.
2064
2065 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
2066
2067 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
2068 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
2069
2070 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
2071
2072 * infcmd.c (post_create_inferior): Use get_thread_regcache
2073 instead of get_current_regcache.
2074
2075 2020-01-14 Tom Tromey <tom@tromey.com>
2076
2077 PR symtab/12535:
2078 * python/python.c (gdbpy_decode_line): Treat empty string the same
2079 as no argument.
2080
2081 2020-01-14 Tom Tromey <tom@tromey.com>
2082
2083 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
2084
2085 2020-01-14 Tom Tromey <tom@tromey.com>
2086
2087 * nat/linux-btrace.c: Don't include <config.h>.
2088 * nat/linux-ptrace.c: Don't include <config.h>.
2089 * nat/x86-linux-dregs.c: Don't include <config.h>.
2090
2091 2020-01-14 Tom Tromey <tom@tromey.com>
2092
2093 * configure: Rebuild.
2094 * configure.ac: Move many checks to ../gdbsupport/common.m4.
2095
2096 2020-01-14 Tom Tromey <tom@tromey.com>
2097
2098 * nat/x86-linux-dregs.c: Include configh.h.
2099 * nat/linux-ptrace.c: Include configh.h.
2100 * nat/linux-btrace.c: Include configh.h.
2101 * defs.h: Include config.h, bfd.h.
2102 * configure.ac: Don't source common.host.
2103 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
2104 * configure: Rebuild.
2105 * acinclude.m4: Update path.
2106 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
2107 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
2108 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
2109 (CLIBS): Add LIBSUPPORT.
2110 (CDEPS): Likewise.
2111 (COMMON_SFILES): Remove gdbsupport files.
2112 (HFILES_NO_SRCDIR): Likewise.
2113 (stamp-version): Update path to create-version.sh.
2114 (ALLDEPFILES): Remove gdbsupport files.
2115
2116 2020-01-14 Tom Tromey <tom@tromey.com>
2117
2118 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
2119 USE_WIN32API when needed.
2120 * configure.ac (USE_WIN32API): Don't define.
2121 (WIN32LIBS): Use WIN32APILIBS.
2122 * configure: Rebuild.
2123
2124 2020-01-14 Tom Tromey <tom@tromey.com>
2125
2126 * configure: Rebuild.
2127 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
2128
2129 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2130
2131 * skip.c (skip_function_command): Make skip w/o arguments use the
2132 name of the inlined function if pc is inside any inlined function.
2133
2134 2020-01-14 Luis Machado <luis.machado@linaro.org>
2135
2136 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
2137 * infrun.c (resume_1): Likewise.
2138 (handle_inferior_event): Remove stale comment.
2139 * linux-nat.c (linux_nat_target::resume): Update comments.
2140 (save_stop_reason): Likewise.
2141 (linux_nat_filter_event): Likewise.
2142 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
2143
2144 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
2145
2146 * elfread.c (record_minimal_symbol): Set section index to 0 for
2147 non-allocatable sections.
2148
2149
2150 2020-01-13 Ali Tamur <tamur@google.com>
2151
2152 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
2153 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
2154 to gdb::optional. Update comments.
2155 (dwo_file): Update comments.
2156 (read_attribute): Update API to take an additional out parameter,
2157 need_reprocess. This is used to mark attributes that need other
2158 attributes (e.g. str_offsets_base) for correct computation which may not
2159 have been read yet.
2160 (read_attribute_reprocess): New function declaration.
2161 (read_addr_index): Likewise.
2162 (read_dwo_str_index): Likewise.
2163 (read_stub_str_index): Likewise.
2164 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
2165 (lookup_addr_base): New function definition.
2166 (lookup_ranges_base): Likewise.
2167 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
2168 lookup_ranges_base.
2169 (init_cutu_and_read_dies): Update comments.
2170 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
2171 unit. This is used to inherit parent's str_offsets_base and addr_base.
2172 Update comments.
2173 (init_cutu_and_read_dies_simple): Reflect API changes.
2174 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
2175 (create_cus_hash_table): Change API to take parent compile unit.
2176 Reflect API changes.
2177 (open_and_init_dwo_file): Reflect API changes.
2178 (dwarf2_get_pc_bounds): Update comments.
2179 (dwarf2_record_block_ranges): Likewise.
2180 (read_full_die_1): Change implementation to reprocess attributes that
2181 need str_offsets_base and addr_base.
2182 (partial_die_info::read): Likewise.
2183 (read_attribute_reprocess): New function definition.
2184 (read_attribute_value): Change API to take an additional out parameter,
2185 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
2186 when a non-dwo compile unit has index based attributes.
2187 (read_attribute): Reflect API changes.
2188 (read_addr_index_1): Reflect API changes. Update comments.
2189 (dwarf2_read_addr_index_data): Reflect API changes.
2190 (dwarf2_read_addr_index): Likewise.
2191 (read_str_index): Change API and implementation. This becomes a helper
2192 to be used by the new string index related methods. Update error
2193 message and comments.
2194 (read_dwo_str_index): New function definition.
2195 (read_stub_str_index): Likewise.
2196 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
2197 * symfile.h (dwarf2_debug_sections): Likewise.
2198 * xcoffread.c (dwarf2_debug_sections): Likewise.
2199
2200 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2201
2202 * gdbcore.h (struct core_fns) <core_read_registers>: Change
2203 core_reg_sect type to gdb_byte *.
2204 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
2205 * cris-tdep.c (fetch_core_registers): Likewise.
2206 * corelow.c (core_target::get_core_register_section): Change
2207 type of `contents` to gdb::byte_vector.
2208
2209 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
2210
2211 * tui/tui-wingeneral.c (box_win): Position the title in the center
2212 of the border.
2213
2214 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
2215
2216 * corelow.c (core_target::get_core_register_section): Use
2217 std::vector instead of alloca.
2218
2219 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2220
2221 * warning.m4: Add -Wmissing-declarations to build_warnings.
2222 * configure: Re-generate.
2223
2224 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2225
2226 * python/python.c (init__gdb_module): Add declaration.
2227
2228 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2229
2230 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
2231 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
2232 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
2233 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
2234 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
2235 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
2236 * ada-exp.y (_initialize_ada_exp): Add declaration.
2237 * ada-lang.c (_initialize_ada_language): Add declaration.
2238 * ada-tasks.c (_initialize_tasks): Add declaration.
2239 * agent.c (_initialize_agent): Add declaration.
2240 * aix-thread.c (_initialize_aix_thread): Add declaration.
2241 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
2242 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
2243 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
2244 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
2245 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
2246 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
2247 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
2248 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
2249 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
2250 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
2251 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
2252 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
2253 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
2254 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
2255 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
2256 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
2257 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
2258 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
2259 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
2260 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
2261 * annotate.c (_initialize_annotate): Add declaration.
2262 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
2263 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
2264 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
2265 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
2266 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
2267 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
2268 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
2269 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
2270 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
2271 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
2272 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
2273 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
2274 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
2275 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
2276 * auto-load.c (_initialize_auto_load): Add declaration.
2277 * auxv.c (_initialize_auxv): Add declaration.
2278 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
2279 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
2280 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
2281 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
2282 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
2283 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
2284 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
2285 * breakpoint.c (_initialize_breakpoint): Add declaration.
2286 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
2287 * btrace.c (_initialize_btrace): Add declaration.
2288 * charset.c (_initialize_charset): Add declaration.
2289 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
2290 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
2291 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
2292 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
2293 * cli/cli-script.c (_initialize_cli_script): Add declaration.
2294 * cli/cli-style.c (_initialize_cli_style): Add declaration.
2295 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
2296 * coffread.c (_initialize_coffread): Add declaration.
2297 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
2298 * compile/compile.c (_initialize_compile): Add declaration.
2299 * complaints.c (_initialize_complaints): Add declaration.
2300 * completer.c (_initialize_completer): Add declaration.
2301 * copying.c (_initialize_copying): Add declaration.
2302 * corefile.c (_initialize_core): Add declaration.
2303 * corelow.c (_initialize_corelow): Add declaration.
2304 * cp-abi.c (_initialize_cp_abi): Add declaration.
2305 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
2306 * cp-support.c (_initialize_cp_support): Add declaration.
2307 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
2308 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
2309 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
2310 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
2311 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
2312 * ctfread.c (_initialize_ctfread): Add declaration.
2313 * d-lang.c (_initialize_d_language): Add declaration.
2314 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
2315 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
2316 * dbxread.c (_initialize_dbxread): Add declaration.
2317 * dcache.c (_initialize_dcache): Add declaration.
2318 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
2319 * disasm.c (_initialize_disasm): Add declaration.
2320 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
2321 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
2322 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
2323 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
2324 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
2325 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
2326 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
2327 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
2328 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
2329 * elfread.c (_initialize_elfread): Add declaration.
2330 * exec.c (_initialize_exec): Add declaration.
2331 * extension.c (_initialize_extension): Add declaration.
2332 * f-lang.c (_initialize_f_language): Add declaration.
2333 * f-valprint.c (_initialize_f_valprint): Add declaration.
2334 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
2335 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
2336 * filesystem.c (_initialize_filesystem): Add declaration.
2337 * findcmd.c (_initialize_mem_search): Add declaration.
2338 * findvar.c (_initialize_findvar): Add declaration.
2339 * fork-child.c (_initialize_fork_child): Add declaration.
2340 * frame-base.c (_initialize_frame_base): Add declaration.
2341 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
2342 * frame.c (_initialize_frame): Add declaration.
2343 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
2344 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
2345 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
2346 * gcore.c (_initialize_gcore): Add declaration.
2347 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
2348 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
2349 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
2350 * gdbarch.c (_initialize_gdbarch): Add declaration.
2351 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
2352 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
2353 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
2354 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
2355 * go-lang.c (_initialize_go_language): Add declaration.
2356 * go32-nat.c (_initialize_go32_nat): Add declaration.
2357 * guile/guile.c (_initialize_guile): Add declaration.
2358 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
2359 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
2360 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
2361 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
2362 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
2363 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
2364 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
2365 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
2366 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
2367 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
2368 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
2369 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
2370 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
2371 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
2372 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
2373 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
2374 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
2375 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
2376 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
2377 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
2378 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
2379 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
2380 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
2381 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
2382 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
2383 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
2384 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
2385 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
2386 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
2387 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
2388 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
2389 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
2390 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
2391 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
2392 * infcall.c (_initialize_infcall): Add declaration.
2393 * infcmd.c (_initialize_infcmd): Add declaration.
2394 * inflow.c (_initialize_inflow): Add declaration.
2395 * infrun.c (_initialize_infrun): Add declaration.
2396 * interps.c (_initialize_interpreter): Add declaration.
2397 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
2398 * jit.c (_initialize_jit): Add declaration.
2399 * language.c (_initialize_language): Add declaration.
2400 * linux-fork.c (_initialize_linux_fork): Add declaration.
2401 * linux-nat.c (_initialize_linux_nat): Add declaration.
2402 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
2403 * linux-thread-db.c (_initialize_thread_db): Add declaration.
2404 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
2405 * m2-lang.c (_initialize_m2_language): Add declaration.
2406 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
2407 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
2408 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
2409 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
2410 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
2411 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
2412 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
2413 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
2414 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
2415 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
2416 * machoread.c (_initialize_machoread): Add declaration.
2417 * macrocmd.c (_initialize_macrocmd): Add declaration.
2418 * macroscope.c (_initialize_macroscope): Add declaration.
2419 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
2420 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
2421 * maint.c (_initialize_maint_cmds): Add declaration.
2422 * mdebugread.c (_initialize_mdebugread): Add declaration.
2423 * memattr.c (_initialize_mem): Add declaration.
2424 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
2425 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
2426 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
2427 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
2428 * mi/mi-main.c (_initialize_mi_main): Add declaration.
2429 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
2430 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
2431 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
2432 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
2433 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
2434 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
2435 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
2436 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
2437 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
2438 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
2439 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
2440 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
2441 * mipsread.c (_initialize_mipsread): Add declaration.
2442 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
2443 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
2444 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
2445 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
2446 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
2447 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
2448 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
2449 * nto-procfs.c (_initialize_procfs): Add declaration.
2450 * objc-lang.c (_initialize_objc_language): Add declaration.
2451 * observable.c (_initialize_observer): Add declaration.
2452 * opencl-lang.c (_initialize_opencl_language): Add declaration.
2453 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
2454 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
2455 * osabi.c (_initialize_gdb_osabi): Add declaration.
2456 * osdata.c (_initialize_osdata): Add declaration.
2457 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
2458 * parse.c (_initialize_parse): Add declaration.
2459 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
2460 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
2461 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
2462 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
2463 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
2464 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
2465 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
2466 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
2467 * printcmd.c (_initialize_printcmd): Add declaration.
2468 * probe.c (_initialize_probe): Add declaration.
2469 * proc-api.c (_initialize_proc_api): Add declaration.
2470 * proc-events.c (_initialize_proc_events): Add declaration.
2471 * proc-service.c (_initialize_proc_service): Add declaration.
2472 * procfs.c (_initialize_procfs): Add declaration.
2473 * producer.c (_initialize_producer): Add declaration.
2474 * psymtab.c (_initialize_psymtab): Add declaration.
2475 * python/python.c (_initialize_python): Add declaration.
2476 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
2477 * record-btrace.c (_initialize_record_btrace): Add declaration.
2478 * record-full.c (_initialize_record_full): Add declaration.
2479 * record.c (_initialize_record): Add declaration.
2480 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
2481 * regcache.c (_initialize_regcache): Add declaration.
2482 * reggroups.c (_initialize_reggroup): Add declaration.
2483 * remote-notif.c (_initialize_notif): Add declaration.
2484 * remote-sim.c (_initialize_remote_sim): Add declaration.
2485 * remote.c (_initialize_remote): Add declaration.
2486 * reverse.c (_initialize_reverse): Add declaration.
2487 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
2488 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
2489 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
2490 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
2491 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
2492 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
2493 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
2494 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
2495 Add declaration.
2496 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
2497 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
2498 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
2499 * rust-exp.y (_initialize_rust_exp): Add declaration.
2500 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
2501 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
2502 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
2503 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
2504 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
2505 * score-tdep.c (_initialize_score_tdep): Add declaration.
2506 * ser-go32.c (_initialize_ser_dos): Add declaration.
2507 * ser-mingw.c (_initialize_ser_windows): Add declaration.
2508 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
2509 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
2510 * ser-uds.c (_initialize_ser_socket): Add declaration.
2511 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
2512 * serial.c (_initialize_serial): Add declaration.
2513 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
2514 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
2515 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
2516 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
2517 * skip.c (_initialize_step_skip): Add declaration.
2518 * sol-thread.c (_initialize_sol_thread): Add declaration.
2519 * solib-aix.c (_initialize_solib_aix): Add declaration.
2520 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
2521 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
2522 * solib-frv.c (_initialize_frv_solib): Add declaration.
2523 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
2524 * solib-target.c (_initialize_solib_target): Add declaration.
2525 * solib.c (_initialize_solib): Add declaration.
2526 * source-cache.c (_initialize_source_cache): Add declaration.
2527 * source.c (_initialize_source): Add declaration.
2528 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
2529 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
2530 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
2531 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
2532 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
2533 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
2534 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
2535 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
2536 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
2537 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
2538 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
2539 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
2540 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
2541 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
2542 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
2543 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
2544 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
2545 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
2546 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
2547 * stabsread.c (_initialize_stabsread): Add declaration.
2548 * stack.c (_initialize_stack): Add declaration.
2549 * stap-probe.c (_initialize_stap_probe): Add declaration.
2550 * std-regs.c (_initialize_frame_reg): Add declaration.
2551 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
2552 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
2553 * symfile.c (_initialize_symfile): Add declaration.
2554 * symmisc.c (_initialize_symmisc): Add declaration.
2555 * symtab.c (_initialize_symtab): Add declaration.
2556 * target.c (_initialize_target): Add declaration.
2557 * target-connection.c (_initialize_target_connection): Add
2558 declaration.
2559 * target-dcache.c (_initialize_target_dcache): Add declaration.
2560 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
2561 * thread.c (_initialize_thread): Add declaration.
2562 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
2563 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
2564 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
2565 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
2566 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
2567 * tracectf.c (_initialize_ctf): Add declaration.
2568 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
2569 * tracefile.c (_initialize_tracefile): Add declaration.
2570 * tracepoint.c (_initialize_tracepoint): Add declaration.
2571 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
2572 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
2573 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
2574 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
2575 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
2576 * tui/tui-win.c (_initialize_tui_win): Add declaration.
2577 * tui/tui.c (_initialize_tui): Add declaration.
2578 * typeprint.c (_initialize_typeprint): Add declaration.
2579 * ui-style.c (_initialize_ui_style): Add declaration.
2580 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
2581 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
2582 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
2583 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
2584 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
2585 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
2586 * unittests/filtered_iterator-selftests.c
2587 (_initialize_filtered_iterator_selftests): Add declaration.
2588 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
2589 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
2590 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
2591 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
2592 * unittests/main-thread-selftests.c
2593 (_initialize_main_thread_selftests): Add declaration.
2594 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
2595 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
2596 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
2597 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
2598 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
2599 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
2600 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
2601 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
2602 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
2603 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
2604 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
2605 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
2606 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
2607 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
2608 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
2609 declaration.
2610 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
2611 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
2612 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
2613 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
2614 * user-regs.c (_initialize_user_regs): Add declaration.
2615 * utils.c (_initialize_utils): Add declaration.
2616 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
2617 * valops.c (_initialize_valops): Add declaration.
2618 * valprint.c (_initialize_valprint): Add declaration.
2619 * value.c (_initialize_values): Add declaration.
2620 * varobj.c (_initialize_varobj): Add declaration.
2621 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
2622 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
2623 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
2624 * windows-nat.c (_initialize_windows_nat): Add declaration.
2625 (_initialize_check_for_gdb_ini): Add declaration.
2626 (_initialize_loadable): Add declaration.
2627 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
2628 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
2629 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
2630 * xcoffread.c (_initialize_xcoffread): Add declaration.
2631 * xml-support.c (_initialize_xml_support): Add declaration.
2632 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
2633 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
2634 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
2635 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
2636
2637 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
2638
2639 * regformats/regdat.sh: Generate declaration for init function.
2640
2641 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
2642
2643 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
2644 up.
2645 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
2646 close_one_inferior>: New methods.
2647 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
2648 pass down target to find_inferior_pid.
2649 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
2650 Pass down target to find_inferior_ptid.
2651 (gdbsim_target::create_inferior): Pass down target to
2652 add_thread_silent.
2653 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
2654 target down to find_inferior_ptid and switch_to_thread.
2655 (gdbsim_target::close): Update to call close_one_inferior.
2656 (struct resume_data): Remove.
2657 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
2658 directly, rather than through a void pointer.
2659 (gdbsim_target::resume): Update to call resume_one_inferior.
2660
2661 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2662
2663 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
2664
2665 2020-01-12 Pedro Alves <palves@redhat.com>
2666
2667 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
2668 directly for the current inferior instead of
2669 discard_all_inferiors.
2670 (discard_all_inferiors): Delete.
2671
2672 2020-01-11 Tom Tromey <tom@tromey.com>
2673
2674 * tui/tui-wingeneral.c (box_win): Check cli_styling.
2675 * tui/tui-winsource.c (tui_source_window_base::refill): Use
2676 deprecated_safe_get_selected_frame.
2677
2678 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2679
2680 * inferior.c (print_inferior): Switch inferior before printing it.
2681
2682 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
2683 Pedro Alves <palves@redhat.com>
2684
2685 * progspace-and-thread.c (switch_to_program_space_and_thread):
2686 Assert there's an inferior for PSPACE. Use
2687 switch_to_inferior_no_thread to switch the inferior too.
2688 * progspace.c (program_space::~program_space): Call
2689 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
2690 (program_space::free_all_objfiles): Don't call clear_symtab_users
2691 here.
2692 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
2693
2694 2020-01-10 Pedro Alves <palves@redhat.com>
2695
2696 * NEWS: Mention multi-target debugging, "info connections", and
2697 "add-inferior -no-connection".
2698
2699 2020-01-10 Pedro Alves <palves@redhat.com>
2700
2701 * infrun.c: Include "target-connection.h".
2702 (check_multi_target_resumption): New.
2703 (proceed): Call it.
2704 * target-connection.c (make_target_connection_string): Make
2705 extern.
2706 * target-connection.h (make_target_connection_string): Declare.
2707
2708 2020-01-10 Pedro Alves <palves@redhat.com>
2709
2710 * Makefile.in (COMMON_SFILES): Add target-connection.c.
2711 * inferior.c (uiout_field_connection): New function.
2712 (print_inferior): Add new "connection-id" column.
2713 (add_inferior_command): Show connection number/string of added
2714 inferior.
2715 * process-stratum-target.h
2716 (process_stratum_target::connection_string): New virtual method.
2717 (process_stratum_target::connection_number): New field.
2718 * remote.c (remote_target::connection_string): New override.
2719 * target-connection.c: New file.
2720 * target-connection.h: New file.
2721 * target.c (decref_target): Remove process_stratum targets from
2722 the connection list.
2723 (target_stack::push): Add process_stratum targets to the
2724 connection list.
2725
2726 2020-01-10 Pedro Alves <palves@redhat.com>
2727
2728 Revert:
2729 2016-04-12 Pedro Alves <palves@redhat.com>
2730 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
2731 Remove references to name.
2732 * serial.h (struct serial) <name>: Delete.
2733
2734 2020-01-10 Pedro Alves <palves@redhat.com>
2735
2736 * gdbarch-selftests.c (register_to_value_test): Remove "target
2737 already pushed" check.
2738
2739 2020-01-10 Pedro Alves <palves@redhat.com>
2740 John Baldwin <jhb@FreeBSD.org>
2741
2742 * aarch64-linux-nat.c
2743 (aarch64_linux_nat_target::thread_architecture): Adjust.
2744 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
2745 (task_command_1): Likewise.
2746 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
2747 (aix_thread_target::wait, aix_thread_target::fetch_registers)
2748 (aix_thread_target::store_registers)
2749 (aix_thread_target::thread_alive): Adjust.
2750 * amd64-fbsd-tdep.c: Include "inferior.h".
2751 (amd64fbsd_get_thread_local_address): Pass down target.
2752 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
2753 thread's gdbarch instead of target_gdbarch.
2754 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
2755 get_last_target_status.
2756 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
2757 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
2758 inferiors.
2759 (update_inserted_breakpoint_locations): Skip if inferiors with no
2760 execution.
2761 (update_global_location_list): When handling moribund locations,
2762 find representative inferior for location's pspace, and use thread
2763 count of its process_stratum target.
2764 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
2765 * bsd-uthread.c (bsd_uthread_target::wait): Use
2766 as_process_stratum_target and adjust thread_change_ptid and
2767 add_thread calls.
2768 (bsd_uthread_target::update_thread_list): Use
2769 as_process_stratum_target and adjust find_thread_ptid,
2770 thread_change_ptid and add_thread calls.
2771 * btrace.c (maint_btrace_packet_history_cmd): Adjust
2772 find_thread_ptid call.
2773 * corelow.c (add_to_thread_list): Adjust add_thread call.
2774 (core_target_open): Adjust add_thread_silent and thread_count
2775 calls.
2776 (core_target::pid_to_str): Adjust find_inferior_ptid call.
2777 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
2778 * event-top.c (async_disconnect): Pop targets from all inferiors.
2779 * exec.c (add_target_sections): Push exec target on all inferiors
2780 sharing the program space.
2781 (remove_target_sections): Remove the exec target from all
2782 inferiors sharing the program space.
2783 (exec_on_vfork): New.
2784 * exec.h (exec_on_vfork): Declare.
2785 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
2786 Pass it down.
2787 (fbsd_nat_target::update_thread_list): Adjust.
2788 (fbsd_nat_target::resume): Adjust.
2789 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
2790 down.
2791 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
2792 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
2793 get_thread_arch_regcache call.
2794 * fork-child.c (gdb_startup_inferior): Pass target down to
2795 startup_inferior and set_executing.
2796 * gdbthread.h (struct process_stratum_target): Forward declare.
2797 (add_thread, add_thread_silent, add_thread_with_info)
2798 (in_thread_list): Add process_stratum_target parameter.
2799 (find_thread_ptid(inferior*, ptid_t)): New overload.
2800 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
2801 parameter.
2802 (all_threads()): Delete overload.
2803 (all_threads, all_non_exited_threads): Add process_stratum_target
2804 parameter.
2805 (all_threads_safe): Use brace initialization.
2806 (thread_count): Add process_stratum_target parameter.
2807 (set_resumed, set_running, set_stop_requested, set_executing)
2808 (threads_are_executing, finish_thread_state): Add
2809 process_stratum_target parameter.
2810 (switch_to_thread): Use is_current_thread.
2811 * i386-fbsd-tdep.c: Include "inferior.h".
2812 (i386fbsd_get_thread_local_address): Pass down target.
2813 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
2814 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
2815 have_inferiors check.
2816 * inf-ptrace.c (inf_ptrace_target::create_inferior)
2817 (inf_ptrace_target::attach): Adjust.
2818 * infcall.c (run_inferior_call): Adjust.
2819 * infcmd.c (run_command_1): Pass target to
2820 scoped_finish_thread_state.
2821 (proceed_thread_callback): Skip inferiors with no execution.
2822 (continue_command): Rename 'all_threads' local to avoid hiding
2823 'all_threads' function. Adjust get_last_target_status call.
2824 (prepare_one_step): Adjust set_running call.
2825 (signal_command): Use user_visible_resume_target. Compare thread
2826 pointers instead of inferior_ptid.
2827 (info_program_command): Adjust to pass down target.
2828 (attach_command): Mark target's 'thread_executing' flag.
2829 (stop_current_target_threads_ns): New, factored out from ...
2830 (interrupt_target_1): ... this. Switch inferior before making
2831 target calls.
2832 * inferior-iter.h
2833 (struct all_inferiors_iterator, struct all_inferiors_range)
2834 (struct all_inferiors_safe_range)
2835 (struct all_non_exited_inferiors_range): Filter on
2836 process_stratum_target too. Remove explicit.
2837 * inferior.c (inferior::inferior): Push dummy target on target
2838 stack.
2839 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
2840 Add process_stratum_target parameter, and pass it down.
2841 (have_live_inferiors): Adjust.
2842 (switch_to_inferior_and_push_target): New.
2843 (add_inferior_command, clone_inferior_command): Handle
2844 "-no-connection" parameter. Use
2845 switch_to_inferior_and_push_target.
2846 (_initialize_inferior): Mention "-no-connection" option in
2847 the help of "add-inferior" and "clone-inferior" commands.
2848 * inferior.h: Include "process-stratum-target.h".
2849 (interrupt_target_1): Use bool.
2850 (struct inferior) <push_target, unpush_target, target_is_pushed,
2851 find_target_beneath, top_target, process_target, target_at,
2852 m_stack>: New.
2853 (discard_all_inferiors): Delete.
2854 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
2855 (all_inferiors, all_non_exited_inferiors): Add
2856 process_stratum_target parameter.
2857 * infrun.c: Include "gdb_select.h" and <unordered_map>.
2858 (target_last_proc_target): New global.
2859 (follow_fork_inferior): Push target on new inferior. Pass target
2860 to add_thread_silent. Call exec_on_vfork. Handle target's
2861 reference count.
2862 (follow_fork): Adjust get_last_target_status call. Also consider
2863 target.
2864 (follow_exec): Push target on new inferior.
2865 (struct execution_control_state) <target>: New field.
2866 (user_visible_resume_target): New.
2867 (do_target_resume): Call target_async.
2868 (resume_1): Set target's threads_executing flag. Consider resume
2869 target.
2870 (commit_resume_all_targets): New.
2871 (proceed): Also consider resume target. Skip threads of inferiors
2872 with no execution. Commit resumtion in all targets.
2873 (start_remote): Pass current inferior to wait_for_inferior.
2874 (infrun_thread_stop_requested): Consider target as well. Pass
2875 thread_info pointer to clear_inline_frame_state instead of ptid.
2876 (infrun_thread_thread_exit): Consider target as well.
2877 (random_pending_event_thread): New inferior parameter. Use it.
2878 (do_target_wait): Rename to ...
2879 (do_target_wait_1): ... this. Add inferior parameter, and pass it
2880 down.
2881 (threads_are_resumed_pending_p, do_target_wait): New.
2882 (prepare_for_detach): Adjust calls.
2883 (wait_for_inferior): New inferior parameter. Handle it. Use
2884 do_target_wait_1 instead of do_target_wait.
2885 (fetch_inferior_event): Adjust. Switch to representative
2886 inferior. Pass target down.
2887 (set_last_target_status): Add process_stratum_target parameter.
2888 Save target in global.
2889 (get_last_target_status): Add process_stratum_target parameter and
2890 handle it.
2891 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
2892 (context_switch): Check inferior_ptid == null_ptid before calling
2893 inferior_thread().
2894 (get_inferior_stop_soon): Pass down target.
2895 (wait_one): Rename to ...
2896 (poll_one_curr_target): ... this.
2897 (struct wait_one_event): New.
2898 (wait_one): New.
2899 (stop_all_threads): Adjust.
2900 (handle_no_resumed, handle_inferior_event): Adjust to consider the
2901 event's target.
2902 (switch_back_to_stepped_thread): Also consider target.
2903 (print_stop_event): Update.
2904 (normal_stop): Update. Also consider the resume target.
2905 * infrun.h (wait_for_inferior): Remove declaration.
2906 (user_visible_resume_target): New declaration.
2907 (get_last_target_status, set_last_target_status): New
2908 process_stratum_target parameter.
2909 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
2910 process_stratum_target parameter, and use it.
2911 (clear_inline_frame_state (thread_info*)): New.
2912 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
2913 process_stratum_target parameter.
2914 (clear_inline_frame_state (thread_info*)): Declare.
2915 * linux-fork.c (delete_checkpoint_command): Pass target down to
2916 find_thread_ptid.
2917 (checkpoint_command): Adjust.
2918 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
2919 instead of just tweaking inferior_ptid.
2920 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
2921 (exit_lwp): Pass target down to find_thread_ptid.
2922 (attach_proc_task_lwp_callback): Pass target down to
2923 add_thread/set_running/set_executing.
2924 (linux_nat_target::attach): Pass target down to
2925 thread_change_ptid.
2926 (get_detach_signal): Pass target down to find_thread_ptid.
2927 Consider last target status's target.
2928 (linux_resume_one_lwp_throw, resume_lwp)
2929 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
2930 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
2931 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
2932 (linux_nat_target::async_wait_fd): New.
2933 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
2934 target down.
2935 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
2936 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
2937 * linux-thread-db.c (struct thread_db_info::process_target): New
2938 field.
2939 (add_thread_db_info): Save target.
2940 (get_thread_db_info): New process_stratum_target parameter. Also
2941 match target.
2942 (delete_thread_db_info): New process_stratum_target parameter.
2943 Also match target.
2944 (thread_from_lwp): Adjust to pass down target.
2945 (thread_db_notice_clone): Pass down target.
2946 (check_thread_db_callback): Pass down target.
2947 (try_thread_db_load_1): Always push the thread_db target.
2948 (try_thread_db_load, record_thread): Pass target down.
2949 (thread_db_target::detach): Pass target down. Always unpush the
2950 thread_db target.
2951 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
2952 target down. Always unpush the thread_db target.
2953 (find_new_threads_callback, thread_db_find_new_threads_2)
2954 (thread_db_target::update_thread_list): Pass target down.
2955 (thread_db_target::pid_to_str): Pass current inferior down.
2956 (thread_db_target::get_thread_local_address): Pass target down.
2957 (thread_db_target::resume, maintenance_check_libthread_db): Pass
2958 target down.
2959 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
2960 * procfs.c (procfs_target::procfs_init_inferior): Declare.
2961 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
2962 (procfs_init_inferior): Rename to ...
2963 (procfs_target::procfs_init_inferior): ... this and adjust.
2964 (procfs_target::create_inferior, procfs_notice_thread)
2965 (procfs_do_thread_registers): Adjust.
2966 * ppc-fbsd-tdep.c: Include "inferior.h".
2967 (ppcfbsd_get_thread_local_address): Pass down target.
2968 * proc-service.c (ps_xfer_memory): Switch current inferior and
2969 program space as well.
2970 (get_ps_regcache): Pass target down.
2971 * process-stratum-target.c
2972 (process_stratum_target::thread_address_space)
2973 (process_stratum_target::thread_architecture): Pass target down.
2974 * process-stratum-target.h
2975 (process_stratum_target::threads_executing): New field.
2976 (as_process_stratum_target): New.
2977 * ravenscar-thread.c
2978 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
2979 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
2980 down.
2981 * record-btrace.c (record_btrace_target::info_record): Adjust.
2982 (record_btrace_target::record_method)
2983 (record_btrace_target::record_is_replaying)
2984 (record_btrace_target::fetch_registers)
2985 (get_thread_current_frame_id, record_btrace_target::resume)
2986 (record_btrace_target::wait, record_btrace_target::stop): Pass
2987 target down.
2988 * record-full.c (record_full_wait_1): Switch to event thread.
2989 Pass target down.
2990 * regcache.c (regcache::regcache)
2991 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
2992 process_stratum_target parameter and handle it.
2993 (current_thread_target): New global.
2994 (get_thread_regcache): Add process_stratum_target parameter and
2995 handle it. Switch inferior before calling target method.
2996 (get_thread_regcache): Pass target down.
2997 (get_thread_regcache_for_ptid): Pass target down.
2998 (registers_changed_ptid): Add process_stratum_target parameter and
2999 handle it.
3000 (registers_changed_thread, registers_changed): Pass target down.
3001 (test_get_thread_arch_aspace_regcache): New.
3002 (current_regcache_test): Define a couple local test_target_ops
3003 instances and use them for testing.
3004 (readwrite_regcache): Pass process_stratum_target parameter.
3005 (cooked_read_test, cooked_write_test): Pass mock_target down.
3006 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
3007 (get_thread_arch_aspace_regcache): Add process_stratum_target
3008 parameter.
3009 (regcache::target): New method.
3010 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
3011 (regcache::registers_changed_ptid): Add process_stratum_target
3012 parameter.
3013 (regcache::m_target): New field.
3014 (registers_changed_ptid): Add process_stratum_target parameter.
3015 * remote.c (remote_state::supports_vCont_probed): New field.
3016 (remote_target::async_wait_fd): New method.
3017 (remote_unpush_and_throw): Add remote_target parameter.
3018 (get_current_remote_target): Adjust.
3019 (remote_target::remote_add_inferior): Push target.
3020 (remote_target::remote_add_thread)
3021 (remote_target::remote_notice_new_inferior)
3022 (get_remote_thread_info): Pass target down.
3023 (remote_target::update_thread_list): Skip threads of inferiors
3024 bound to other targets. (remote_target::close): Don't discard
3025 inferiors. (remote_target::add_current_inferior_and_thread)
3026 (remote_target::process_initial_stop_replies)
3027 (remote_target::start_remote)
3028 (remote_target::remote_serial_quit_handler): Pass down target.
3029 (remote_target::remote_unpush_target): New remote_target
3030 parameter. Unpush the target from all inferiors.
3031 (remote_target::remote_unpush_and_throw): New remote_target
3032 parameter. Pass it down.
3033 (remote_target::open_1): Check whether the current inferior has
3034 execution instead of checking whether any inferior is live. Pass
3035 target down.
3036 (remote_target::remote_detach_1): Pass down target. Use
3037 remote_unpush_target.
3038 (extended_remote_target::attach): Pass down target.
3039 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
3040 (remote_target::append_resumption): Pass down target.
3041 (remote_target::append_pending_thread_resumptions)
3042 (remote_target::remote_resume_with_hc, remote_target::resume)
3043 (remote_target::commit_resume): Pass down target.
3044 (remote_target::remote_stop_ns): Check supports_vCont_probed.
3045 (remote_target::interrupt_query)
3046 (remote_target::remove_new_fork_children)
3047 (remote_target::check_pending_events_prevent_wildcard_vcont)
3048 (remote_target::remote_parse_stop_reply)
3049 (remote_target::process_stop_reply): Pass down target.
3050 (first_remote_resumed_thread): New remote_target parameter. Pass
3051 it down.
3052 (remote_target::wait_as): Pass down target.
3053 (unpush_and_perror): New remote_target parameter. Pass it down.
3054 (remote_target::readchar, remote_target::remote_serial_write)
3055 (remote_target::getpkt_or_notif_sane_1)
3056 (remote_target::kill_new_fork_children, remote_target::kill): Pass
3057 down target.
3058 (remote_target::mourn_inferior): Pass down target. Use
3059 remote_unpush_target.
3060 (remote_target::core_of_thread)
3061 (remote_target::remote_btrace_maybe_reopen): Pass down target.
3062 (remote_target::pid_to_exec_file)
3063 (remote_target::thread_handle_to_thread_info): Pass down target.
3064 (remote_target::async_wait_fd): New.
3065 * riscv-fbsd-tdep.c: Include "inferior.h".
3066 (riscv_fbsd_get_thread_local_address): Pass down target.
3067 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
3068 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
3069 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
3070 Adjust.
3071 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
3072 * solib-svr4.c (enable_break): Pass down target.
3073 * spu-multiarch.c (parse_spufs_run): Pass down target.
3074 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
3075 * target-delegates.c: Regenerate.
3076 * target.c (g_target_stack): Delete.
3077 (current_top_target): Return the current inferior's top target.
3078 (target_has_execution_1): Refer to the passed-in inferior's top
3079 target.
3080 (target_supports_terminal_ours): Check whether the initial
3081 inferior was already created.
3082 (decref_target): New.
3083 (target_stack::push): Incref/decref the target.
3084 (push_target, push_target, unpush_target): Adjust.
3085 (target_stack::unpush): Defref target.
3086 (target_is_pushed): Return bool. Adjust to refer to the current
3087 inferior's target stack.
3088 (dispose_inferior): Delete, and inline parts ...
3089 (target_preopen): ... here. Only dispose of the current inferior.
3090 (target_detach): Hold strong target reference while detaching.
3091 Pass target down.
3092 (target_thread_name): Add assertion.
3093 (target_resume): Pass down target.
3094 (target_ops::beneath, find_target_at): Adjust to refer to the
3095 current inferior's target stack.
3096 (get_dummy_target): New.
3097 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
3098 has a thread running.
3099 (initialize_targets): Rename to ...
3100 (_initialize_target): ... this.
3101 * target.h: Include "gdbsupport/refcounted-object.h".
3102 (struct target_ops): Inherit refcounted_object.
3103 (target_ops::shortname, target_ops::longname): Make const.
3104 (target_ops::async_wait_fd): New method.
3105 (decref_target): Declare.
3106 (struct target_ops_ref_policy): New.
3107 (target_ops_ref): New typedef.
3108 (get_dummy_target): Declare function.
3109 (target_is_pushed): Return bool.
3110 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
3111 (all_matching_threads_iterator::all_matching_threads_iterator):
3112 Handle filter target.
3113 * thread-iter.h (struct all_matching_threads_iterator, struct
3114 all_matching_threads_range, class all_non_exited_threads_range):
3115 Filter by target too. Remove explicit.
3116 * thread.c (threads_executing): Delete.
3117 (inferior_thread): Pass down current inferior.
3118 (clear_thread_inferior_resources): Pass down thread pointer
3119 instead of ptid_t.
3120 (add_thread_silent, add_thread_with_info, add_thread): Add
3121 process_stratum_target parameter. Use it for thread and inferior
3122 searches.
3123 (is_current_thread): New.
3124 (thread_info::deletable): Use it.
3125 (find_thread_ptid, thread_count, in_thread_list)
3126 (thread_change_ptid, set_resumed, set_running): New
3127 process_stratum_target parameter. Pass it down.
3128 (set_executing): New process_stratum_target parameter. Pass it
3129 down. Adjust reference to 'threads_executing'.
3130 (threads_are_executing): New process_stratum_target parameter.
3131 Adjust reference to 'threads_executing'.
3132 (set_stop_requested, finish_thread_state): New
3133 process_stratum_target parameter. Pass it down.
3134 (switch_to_thread): Also match inferior.
3135 (switch_to_thread): New process_stratum_target parameter. Pass it
3136 down.
3137 (update_threads_executing): Reimplement.
3138 * top.c (quit_force): Pop targets from all inferior.
3139 (gdb_init): Don't call initialize_targets.
3140 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
3141 Declare.
3142 (windows_add_thread, windows_delete_thread): Adjust.
3143 (get_windows_debug_event): Rename to ...
3144 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
3145 * tracefile-tfile.c (tfile_target_open): Pass down target.
3146 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
3147 Forward declare.
3148 (switch_to_thread): Add process_stratum_target parameter.
3149 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
3150 parameter. Use it.
3151 (mi_on_resume): Pass target down.
3152 * nat/fork-inferior.c (startup_inferior): Add
3153 process_stratum_target parameter. Pass it down.
3154 * nat/fork-inferior.h (startup_inferior): Add
3155 process_stratum_target parameter.
3156 * python/py-threadevent.c (py_get_event_thread): Pass target down.
3157
3158 2020-01-10 Pedro Alves <palves@redhat.com>
3159
3160 * remote.c (remote_target::start_remote): Don't set inferior_ptid
3161 directly. Instead find the first thread in the thread list and
3162 use switch_to_thread.
3163
3164 2020-01-10 Pedro Alves <palves@redhat.com>
3165
3166 * remote.c (remote_target::remote_add_inferior): Don't bind a
3167 process to the current inferior if the current inferior is already
3168 bound to a process.
3169
3170 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3171 Pedro Alves <palves@redhat.com>
3172
3173 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
3174 If no process is specified, return null_ptid instead of
3175 inferior_ptid.
3176 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
3177 TARGET_WAITKIND_SIGNALLED with no pid.
3178
3179 2020-01-10 Pedro Alves <palves@redhat.com>
3180
3181 * remote.c (first_remote_resumed_thread): New.
3182 (remote_target::wait_as): Use it as default event_ptid instead of
3183 inferior_ptid.
3184
3185 2020-01-10 Pedro Alves <palves@redhat.com>
3186
3187 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
3188
3189 2020-01-10 Pedro Alves <palves@redhat.com>
3190
3191 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
3192 not -1.
3193
3194 2020-01-10 Pedro Alves <palves@redhat.com>
3195
3196 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
3197 ptid to get_last_target_status.
3198 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
3199 ptid to get_last_target_status.
3200 * infcmd.c (continue_command): Don't pass a target_waitstatus to
3201 get_last_target_status.
3202 (info_program_command): Don't pass a target_waitstatus to
3203 get_last_target_status.
3204 * infrun.c (init_wait_for_inferior): Use
3205 nullify_last_target_wait_ptid.
3206 (get_last_target_status): Handle nullptr arguments.
3207 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
3208 (print_stop_event): Don't pass a ptid to get_last_target_status.
3209 (normal_stop): Don't pass a ptid to get_last_target_status.
3210 * infrun.h (get_last_target_status, set_last_target_status): Move
3211 comments here and update.
3212 (nullify_last_target_wait_ptid): Declare.
3213 * linux-fork.c (fork_load_infrun_state): Remove local extern
3214 declaration of nullify_last_target_wait_ptid.
3215 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
3216 to get_last_target_status.
3217
3218 2020-01-10 Pedro Alves <palves@redhat.com>
3219
3220 * gdbthread.h (scoped_restore_current_thread)
3221 <dont_restore, restore, m_dont_restore>: Declare.
3222 * thread.c (thread_alive): Add assertion. Return bool.
3223 (switch_to_thread_if_alive): New.
3224 (prune_threads): Switch inferior/thread.
3225 (print_thread_info_1): Switch thread before calling target methods.
3226 (scoped_restore_current_thread::restore): New, factored out from
3227 ...
3228 (scoped_restore_current_thread::~scoped_restore_current_thread):
3229 ... this.
3230 (scoped_restore_current_thread::scoped_restore_current_thread):
3231 Add assertion.
3232 (thread_apply_all_command, thread_select): Use
3233 switch_to_thread_if_alive.
3234 * infrun.c (proceed, restart_threads, handle_signal_stop)
3235 (switch_back_to_stepped_thread): Switch current thread before
3236 calling target methods.
3237
3238 2020-01-10 Pedro Alves <palves@redhat.com>
3239
3240 * inferior.c (switch_to_inferior_no_thread): New function,
3241 factored out from ...
3242 (inferior_command): ... here.
3243 * inferior.h (switch_to_inferior_no_thread): Declare.
3244 * mi/mi-main.c (run_one_inferior): Use
3245 switch_to_inferior_no_thread.
3246
3247 2020-01-10 Pedro Alves <palves@redhat.com>
3248
3249 * infcmd.c (kill_command): Remove dead code.
3250
3251 2020-01-10 Pedro Alves <palves@redhat.com>
3252
3253 * remote.c (remote_target::mourn_inferior): No longer check
3254 whether the target is running.
3255
3256 2020-01-10 Pedro Alves <palves@redhat.com>
3257
3258 * corelow.c (core_target::has_execution): Change parameter type to
3259 inferior pointer.
3260 * inferior.c (number_of_live_inferiors): Use
3261 inferior::has_execution instead of target_has_execution_1.
3262 * inferior.h (inferior::has_execution): New.
3263 * linux-thread-db.c (thread_db_target::update_thread_list): Use
3264 inferior::has_execution instead of target_has_execution_1.
3265 * process-stratum-target.c
3266 (process_stratum_target::has_execution): Change parameter type to
3267 inferior pointer. Check the inferior's PID instead of
3268 inferior_ptid.
3269 * process-stratum-target.h
3270 (process_stratum_target::has_execution): Change parameter type to
3271 inferior pointer.
3272 * record-full.c (record_full_core_target::has_execution): Change
3273 parameter type to inferior pointer.
3274 * target.c (target_has_execution_1): Change parameter type to
3275 inferior pointer.
3276 (target_has_execution_current): Adjust.
3277 * target.h (target_ops::has_execution): Change parameter type to
3278 inferior pointer.
3279 (target_has_execution_1): Change parameter type to inferior
3280 pointer. Change return type to bool.
3281 * tracefile.h (tracefile_target::has_execution): Change parameter
3282 type to inferior pointer.
3283
3284 2020-01-10 Pedro Alves <palves@redhat.com>
3285
3286 * exceptions.c (print_flush): Remove current_top_target() check.
3287
3288 2020-01-10 Pedro Alves <palves@redhat.com>
3289
3290 * remote.c (show_remote_exec_file): Show the current inferior's
3291 exec-file instead of the command variable's value.
3292
3293 2020-01-10 Pedro Alves <palves@redhat.com>
3294
3295 * record-full.c (record_full_resume_ptid): New global.
3296 (record_full_target::resume): Set it.
3297 (record_full_wait_1): Use record_full_resume_ptid instead of
3298 inferior_ptid.
3299
3300 2020-01-10 Pedro Alves <palves@redhat.com>
3301
3302 * gdbthread.h (scoped_restore_current_thread)
3303 <dont_restore, restore, m_dont_restore>: Declare.
3304 * thread.c (thread_alive): Add assertion. Return bool.
3305 (switch_to_thread_if_alive): New.
3306 (prune_threads): Switch inferior/thread.
3307 (print_thread_info_1): Switch thread before calling target methods.
3308 (scoped_restore_current_thread::restore): New, factored out from
3309 ...
3310 (scoped_restore_current_thread::~scoped_restore_current_thread):
3311 ... this.
3312 (scoped_restore_current_thread::scoped_restore_current_thread):
3313 Add assertion.
3314 (thread_apply_all_command, thread_select): Use
3315 switch_to_thread_if_alive.
3316
3317 2020-01-10 George Barrett <bob@bob131.so>
3318
3319 * stap-probe.c (stap_modify_semaphore): Don't check for null
3320 semaphores.
3321 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
3322 for null semaphores.
3323
3324 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
3325
3326 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
3327 all source windows, and maintain horizontal scroll status while
3328 doing so.
3329
3330 2020-01-09 Tom Tromey <tom@tromey.com>
3331
3332 PR tui/18932:
3333 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
3334 update_source_window, not print_source_lines.
3335
3336 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
3337
3338 * tui/tui.c (tui_enable): Register tui hooks after calling
3339 tui_display_main.
3340
3341 2020-01-09 Christian Biesinger <cbiesinger@google.com>
3342
3343 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
3344
3345 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
3346
3347 * thread.c (print_thread_info_1): Fix indentation.
3348
3349 2020-01-09 Christian Biesinger <cbiesinger@google.com>
3350
3351 * symtab.c (general_symbol_info::compute_and_set_names): Move the
3352 unique_xmalloc_ptr outside the if to always free the demangled name.
3353
3354 2020-01-08 Tom Tromey <tromey@adacore.com>
3355
3356 * xcoffread.c (enter_line_range, read_xcoff_symtab)
3357 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
3358 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
3359 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
3360 Remove.
3361 (section_offsets): New typedef.
3362 * symtab.c (fixup_section, get_msymbol_address): Update.
3363 * symmisc.c (dump_msymbols): Update.
3364 * symfile.h (relative_addr_info_to_section_offsets)
3365 (symfile_map_offsets_to_segments): Update.
3366 * symfile.c (build_section_addr_info_from_objfile)
3367 (init_objfile_sect_indices): Update.
3368 (struct place_section_arg): Change type of "offsets".
3369 (place_section): Update.
3370 (relative_addr_info_to_section_offsets): Change type of
3371 "section_offsets". Remove "num_sections" parameter.
3372 (default_symfile_offsets, syms_from_objfile_1)
3373 (set_objfile_default_section_offset): Update.
3374 (reread_symbols): No need to preserve section offsets by hand.
3375 (symfile_map_offsets_to_segments): Change type of "offsets".
3376 * stap-probe.c (relocate_address): Update.
3377 * stabsread.h (process_one_symbol): Update.
3378 * solib-target.c (struct lm_info_target) <offsets>: Change type.
3379 (solib_target_relocate_section_addresses): Update.
3380 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
3381 Update.
3382 * solib-frv.c (frv_relocate_main_executable): Update.
3383 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
3384 * solib-aix.c (solib_aix_get_section_offsets): Change return
3385 type.
3386 (solib_aix_solib_create_inferior_hook): Update.
3387 * remote.c (remote_target::get_offsets): Update.
3388 * psymtab.c (find_pc_sect_psymtab): Update.
3389 * psympriv.h (struct partial_symbol) <address, text_low,
3390 text_high>: Update.
3391 * objfiles.h (obj_section_offset): Update.
3392 (struct objfile) <section_offsets>: Change type.
3393 <num_sections>: Remove.
3394 (objfile_relocate): Update.
3395 * objfiles.c (entry_point_address_query): Update
3396 (relocate_one_symbol): Change type of "section_offsets".
3397 (objfile_relocate1, objfile_relocate1): Change type of
3398 "new_offsets".
3399 (objfile_rebase1): Update.
3400 * mipsread.c (mipscoff_symfile_read): Update.
3401 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
3402 parameter.
3403 * mdebugread.c (parse_symbol): Change type of "section_offsets".
3404 (parse_external, psymtab_to_symtab_1): Update.
3405 * machoread.c (macho_symfile_offsets): Update.
3406 * ia64-tdep.c (ia64_find_unwind_table): Update.
3407 * hppa-tdep.c (read_unwind_info): Update.
3408 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
3409 * dwarf2read.c (create_addrmap_from_index)
3410 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
3411 (process_psymtab_comp_unit_reader, add_partial_symbol)
3412 (add_partial_subprogram, process_full_comp_unit)
3413 (read_file_scope, read_func_scope, read_lexical_block_scope)
3414 (read_call_site_scope, dwarf2_rnglists_process)
3415 (dwarf2_ranges_process, dwarf2_ranges_read)
3416 (dwarf_decode_lines_1, var_decode_location, new_symbol)
3417 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
3418 Update.
3419 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
3420 Update.
3421 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
3422 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
3423 (process_one_symbol): Change type of "section_offsets".
3424 * ctfread.c (get_objfile_text_range): Update.
3425 * coffread.c (coff_symtab_read, enter_linenos)
3426 (process_coff_symbol): Update.
3427 * coff-pe-read.c (add_pe_forwarded_sym): Update.
3428 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
3429
3430 2020-01-08 Tom Tromey <tromey@adacore.com>
3431
3432 * dwarf2read.c (parse_macro_definition): Use std::string.
3433 (parse_macro_definition): Likewise.
3434
3435 2020-01-08 Tom Tromey <tromey@adacore.com>
3436
3437 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
3438 (ATTR_ALLOC_CHUNK): Remove.
3439
3440 2020-01-08 Tom Tromey <tromey@adacore.com>
3441
3442 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
3443
3444 2020-01-08 Tom Tromey <tromey@adacore.com>
3445
3446 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
3447 (dwarf2_compute_name, open_dwo_file): Likewise.
3448 (process_enumeration_scope): Use std::vector.
3449 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
3450 (partial_die_info::fixup, dwarf2_start_subfile)
3451 (guess_full_die_structure_name, dwarf2_name): Likewise.
3452 (determine_prefix): Update.
3453 (guess_full_die_structure_name): Make return type const.
3454 (partial_die_full_name): Return unique_xmalloc_ptr.
3455 (DW_FIELD_ALLOC_CHUNK): Remove.
3456
3457 2020-01-07 Tom Tromey <tromey@adacore.com>
3458
3459 PR build/24937:
3460 * stap-probe.c (class stap_static_probe_ops): Add constructor.
3461
3462 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
3463
3464 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
3465
3466 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
3467
3468 * stack.c (print_frame_info): Move disassemble_next_line code
3469 inside source_print block.
3470
3471 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3472
3473 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
3474 gdb/signals.h, as we are now using native signal symbols.
3475
3476 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
3477
3478 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
3479 overflow by an early check of content vs threshold.
3480 * tui/tui-source.c (tui_source_window::line_is_displayed):
3481 Likewise.
3482
3483 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3484
3485 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
3486
3487 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
3488
3489 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
3490 export table if no section contains it's RVA.
3491
3492 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3493
3494 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
3495
3496 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
3497
3498 * source.c (print_source_lines_base): Set last_line_listed.
3499
3500 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
3501
3502 * tui/tui-disasm.c: Remove trailing spaces.
3503
3504 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3505 Pedro Alves <palves@redhat.com>
3506
3507 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
3508 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
3509 (windows_gdb_signal_to_target): New function, uses the above
3510 enumeration to convert GDB internal signal codes to equivalent
3511 Windows codes.
3512 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
3513 * windows-nat.c: Include "gdb_wait.h".
3514 (get_windows_debug_event): Extract the fatal exception from the
3515 exit status and convert to the equivalent Posix signal number.
3516 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
3517 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
3518 * gdbsupport/gdb_wait.c: New file, implements
3519 windows_status_to_termsig.
3520 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
3521 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
3522
3523 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
3524
3525 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
3526 show_layout.
3527
3528 2020-01-05 Luis Machado <luis.machado@linaro.org>
3529
3530 * aarch64-linux-nat.c
3531 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
3532 and bfd_mach_aarch64.
3533
3534 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3535
3536 * ui-file.c (stdio_file::can_emit_style_escape)
3537 (tee_file::can_emit_style_escape): Ensure style is used also on
3538 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
3539 to gdb_stdout.
3540 * main.c (set_gdb_data_directory): Use file style to output the
3541 warning that the given pathname is not a directory.
3542 * top.c (show_history_filename, gdb_safe_append_history)
3543 (show_gdb_datadir): Use file style.
3544
3545 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
3546
3547 * solib-target.c (struct lm_info_target):
3548 Change offsets to be a unique_xmalloc_ptr.
3549 (solib_target_relocate_section_addresses): Update.
3550
3551 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
3552
3553 * windows-nat.c (windows_clear_solib): Free so_list linked list.
3554
3555 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3556
3557 * MAINTAINERS (Write After Approval): Add myself.
3558
3559 2020-01-02 Luis Machado <luis.machado@linaro.org>
3560
3561 * proc-service.c (get_ps_regcache): Remove reference to obsolete
3562 Cell BE architecture.
3563 * target.h (struct target_ops) <thread_architecture>: Likewise.
3564
3565 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3566
3567 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3568
3569 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3570
3571 * MAINTAINERS (Write After Approval): Add myself.
3572
3573 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3574
3575 * gdbarch.sh: Update copyright year range of generated files.
3576
3577 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3578
3579 Update copyright year range in all GDB files.
3580
3581 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3582
3583 * copyright.py: Convert to Python 3.
3584
3585 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3586
3587 * copyright.py: Adapt after move of gnulib directory from gdb
3588 directory to toplevel directory.
3589
3590 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3591
3592 * copyright.py (main): Exit if run from the wrong directory.
3593
3594 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3595
3596 * top.c (print_gdb_version): Change copyright year to 2020.
3597
3598 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3599
3600 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
3601
3602 For older changes see ChangeLog-2019.
3603 \f
3604 Local Variables:
3605 mode: change-log
3606 left-margin: 8
3607 fill-column: 74
3608 version-control: never
3609 coding: utf-8
3610 End: