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