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