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