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