Simplify complaints even more
[binutils-gdb.git] / gdb / ChangeLog
1 2018-10-04 Tom Tromey <tom@tromey.com>
2
3 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4 (reread_symbols): Update.
5 * complaints.h (clear_complaints): Remove argument.
6 * complaints.c (enum complaint_series): Remove.
7 (series): Remove global.
8 (complaint_internal): Update.
9 (clear_complaints): Remove argument.
10
11 2018-10-04 Tom Tromey <tom@tromey.com>
12
13 * symfile.c (symbol_file_add_with_addrs): Do not print "no
14 debugging symbols" message if there is a separate debug objfile.
15
16 2018-10-04 Tom Tromey <tom@tromey.com>
17
18 PR cli/19551:
19 * symfile.c (symbol_file_add_with_addrs): Update output.
20 * psymtab.c (require_partial_symbols): Update output.
21
22 2018-10-04 Tom Tromey <tom@tromey.com>
23
24 PR cli/22234:
25 * complaints.c: Emit \n.
26
27 2018-10-04 Tom Tromey <tom@tromey.com>
28
29 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
30 (separate_debug_file_exists, find_separate_debug_file)
31 (add_symbol_file_command, reread_symbols, allocate_symtab)
32 (allocate_compunit_symtab): Use filtered printing, not
33 unfiltered.
34 * psymtab.c (require_partial_symbols, dump_psymtab)
35 (allocate_psymtab): Use filtered printing, not unfiltered.
36
37 2018-10-04 Tom Tromey <tom@tromey.com>
38
39 * complaints.c (complaint_internal): Correctly check complaint
40 count.
41
42 2018-10-04 Tom Tromey <tom@tromey.com>
43
44 * complaints.h (struct complaints): Remove declaration.
45 * complaints.c (clear_complaints): Remove an unused variable.
46
47 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
48
49 * MAINTAINERS (Write After Approval): Add self.
50
51 2018-10-03 Tom Tromey <tom@tromey.com>
52
53 * guile/scm-value.c (gdbscm_value_to_string): Initialize
54 "buffer_contents".
55 * coffread.c (coff_symtab_read): Initialize "newobj".
56
57 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
58
59 * dwarf2read.c (read_func_scope): Remove struct keyword in
60 range-based for.
61
62 2018-10-03 Tom Tromey <tom@tromey.com>
63
64 * README: Mention --enable-ubsan.
65 * NEWS: Mention --enable-ubsan.
66 * acinclude.m4: Include sanitize.m4.
67 * configure: Rebuild.
68 * configure.ac: Call AM_GDB_UBSAN.
69 * sanitize.m4: New file.
70
71 2018-10-03 Tom Tromey <tom@tromey.com>
72
73 * expression.h (enum exp_opcode): Use uint8_t as base type.
74 * expprint.c (op_name): Handle invalid opcodes.
75
76 2018-10-03 Tom Tromey <tom@tromey.com>
77
78 * parse.c (prefixify_expression): Add assert.
79 (parse_exp_in_context_1): Throw exception if the expression is
80 empty.
81
82 2018-10-03 Tom Tromey <tom@tromey.com>
83
84 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
85
86 2018-10-03 Tom Tromey <tom@tromey.com>
87
88 * c-exp.y (parse_number): Work in unsigned. Remove casts.
89
90 2018-10-03 Tom Tromey <tom@tromey.com>
91
92 * dwarf2read.c (read_subrange_type): Make "negative_mask"
93 unsigned.
94
95 2018-10-03 Tom Tromey <tom@tromey.com>
96
97 * findvar.c (extract_integer): Do work in an unsigned type.
98
99 2018-10-03 Tom Tromey <tom@tromey.com>
100
101 * common/enum-flags.h (enum_flags::operator~): Add static assert.
102 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
103 base type.
104 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
105 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
106 type.
107 * c-lang.h (enum c_string_type_values): Use unsigned as base
108 type.
109 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
110
111 2018-10-03 Tom Tromey <tom@tromey.com>
112
113 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
114 <~dwarf2_frame_state_reg_info>: Update.
115 <dwarf2_frame_state_reg_info>: Update.
116 <alloc_regs>: Add assertion. Update.
117 <reg>: Now a std::vector.
118 <num_regs>: Remove.
119 <swap>: Update.
120 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
121 (execute_cfa_program_test, dwarf2_frame_cache): Update.
122
123 2018-10-03 Tom Tromey <tom@tromey.com>
124
125 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
126
127 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
128
129 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
130
131 2018-10-02 Tom Tromey <tom@tromey.com>
132
133 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
134
135 2018-10-02 John Darrington <john@darrington.wattle.id.au>
136
137 * NEWS: Mention changed commands.
138 * ser-uds.c: New file.
139 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
140 * configure: Regenerate.
141 * Makefile.in: Add new file.
142 * serial.c (serial_open): Check if filename is a socket
143 and lookup the appropriate interface accordingly.
144
145 2018-10-01 Alan Hayward <alan.hayward@arm.com>
146
147 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
148 define.
149 (AARCH64_EXTRA_MAGIC): Likewise.
150 (AARCH64_FPSIMD_MAGIC): Likewise.
151 (AARCH64_SVE_MAGIC): Likewise.
152 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
153 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
154 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
155 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
156 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
157 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
158 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
159 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
160 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
161 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
162 (read_aarch64_ctx): Add function.
163 (aarch64_linux_sigframe_init): Detect FP registers.
164
165 2018-10-01 Alan Hayward <alan.hayward@arm.com>
166
167 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
168 (AARCH64_D0_REGNUM): Likewise.
169 (AARCH64_S0_REGNUM): Likewise.
170 (AARCH64_H0_REGNUM): Likewise.
171 (AARCH64_B0_REGNUM): Likewise.
172 (AARCH64_SVE_V0_REGNUM): Likewise.
173 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
174 (AARCH64_D0_REGNUM): Likewise.
175 (AARCH64_S0_REGNUM): Likewise.
176 (AARCH64_H0_REGNUM): Likewise.
177 (AARCH64_B0_REGNUM): Likewise.
178 (AARCH64_SVE_V0_REGNUM): Likewise.
179
180 2018-10-01 Gary Benson <gbenson@redhat.com>
181
182 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
183 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
184 prfpregset_t instead of gdb_prfpregset_t.
185 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
186 * configure, config.in: Rebuild.
187
188 2018-10-01 Gary Benson <gbenson@redhat.com>
189
190 * common/gdb_proc_service.h: New file, factored out from...
191 * gdb_proc_service.h: Moved common code to the above file.
192 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
193
194 2018-10-01 Gary Benson <gbenson@redhat.com>
195
196 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
197 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
198
199 2018-10-01 Gary Benson <gbenson@redhat.com>
200
201 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
202 (AC_CHECK_HEADERS): Check for linux/elf.h.
203 * configure, config.in: Rebuild.
204 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
205 doesn't define elf_fpregset_t.
206
207 2018-10-01 Gary Benson <gbenson@redhat.com>
208
209 * gdb_proc_service.h: Whitespace change.
210
211 2018-10-01 Tom Tromey <tom@tromey.com>
212
213 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
214 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
215 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
216
217 2018-10-01 Tom Tromey <tom@tromey.com>
218
219 * README: Minor change.
220
221 2018-09-30 Pedro Alves <palves@redhat.com>
222
223 * darwin-nat-info.c (darwin_debug_regions_recurse)
224 (info_mach_exceptions_command): Remove unused local variables.
225 * darwin-nat.c (darwin_decode_notify_message)
226 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
227 (darwin_stop_inferior, darwin_setup_exceptions)
228 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
229 (darwin_nat_target::attach, darwin_nat_target::detach)
230 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
231 local variables.
232 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
233 variables.
234
235 2018-09-29 Tom Tromey <tom@tromey.com>
236
237 * README: Remove some leftover text.
238
239 2018-09-29 Tom Tromey <tom@tromey.com>
240
241 * PROBLEMS: Rewrite.
242 * README: Update.
243
244 2018-09-28 John Baldwin <jhb@FreeBSD.org>
245
246 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
247 case with explicit breakpoint kind.
248 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
249 'additional_info' and related logic.
250 (riscv_debug_breakpoints): New variable.
251 (riscv_breakpoint_kind_from_pc): Use the length of the existing
252 instruction to determine the breakpoint kind.
253 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
254 flag. Update description of 'set/show riscv
255 use-compressed-breakpoints' flag.
256
257 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
258
259 (NEWS): Mention changes to frame related commands.
260 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
261 (add_prefix_cmd_suppress_notification): New function.
262 (add_com_suppress_notification): Call
263 add_cmd_suppress_notification.
264 * command.h (add_cmd_suppress_notification): Declare.
265 (add_prefix_cmd_suppress_notification): Declare.
266 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
267 (parse_frame_specification): Moved from stack.c, with
268 simplification to handle a single argument.
269 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
270 switch to the selected frame. Add a header comment.
271 * stack.c: Remove 'safe-ctype.h' include.
272 (find_frame_for_function): Add declaration.
273 (find_frame_for_address): New function.
274 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
275 (frame_selection_by_function_completer): New function.
276 (info_frame_command): Rename to...
277 (info_frame_command_core): ...this, and update parameter types.
278 (select_frame_command): Rename to...
279 (select_frame_command_core): ...this, and update parameter types.
280 (frame_command): Rename to...
281 (frame_command_core): ...this, and update parameter types.
282 (class frame_command_helper): New class to wrap implementations of
283 frame related sub-commands.
284 (frame_apply_cmd_list): New static global.
285 (frame_cmd_list): Make static.
286 (select_frame_cmd_list): New global for sub-commands.
287 (info_frame_cmd_list): New global for sub-commands.
288 (_initialize_stack): Register sub-commands for 'frame',
289 'select-frame', and 'info frame'. Update 'frame apply' commands
290 to use frame_apply_cmd_list. Move function local static
291 frame_apply_list to file static frame_apply_cmd_list for
292 consistency.
293 * stack.h (select_frame_command): Delete declarationn.
294 (select_frame_for_mi): Declare new function.
295
296 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
297
298 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
299 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
300 and NOP.
301
302 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
303
304 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
305
306 2018-09-26 Tom Tromey <tom@tromey.com>
307
308 * valops.c (auto_abandon): Remove dead code.
309
310 2018-09-26 Tom Tromey <tom@tromey.com>
311
312 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
313
314 2018-09-24 Tom Tromey <tom@tromey.com>
315
316 * common/pathstuff.c (get_standard_cache_dir): Make
317 "xdg_cache_home" and "home" const.
318 * top.c (init_history): Make "tmpenv" const.
319 * main.c (get_init_files): Make "homedir" const.
320
321 2018-09-23 Tom Tromey <tom@tromey.com>
322
323 PR python/18852:
324 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
325
326 2018-09-23 Tom Tromey <tom@tromey.com>
327
328 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
329 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
330 * python/python-internal.h (gdbpy_handle_exception): Declare.
331 * python/py-utils.c (gdbpy_handle_exception): New function.
332
333 2018-09-23 Tom Tromey <tom@tromey.com>
334
335 PR python/17284:
336 * python/py-type.c (typy_template_argument): Check for negative
337 argument number.
338
339 2018-09-23 Tom Tromey <tom@tromey.com>
340
341 PR python/14062:
342 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
343
344 2018-09-23 Tom Tromey <tom@tromey.com>
345
346 PR python/18170:
347 * python/py-value.c (valpy_int): Allow conversion from pointer
348 type.
349
350 2018-09-23 Tom Tromey <tom@tromey.com>
351
352 PR python/20126:
353 * python/py-value.c (valpy_int): Respect type sign.
354
355 2018-09-23 Tom Tromey <tom@tromey.com>
356
357 PR python/18352;
358 * python/py-value.c (valpy_float): Allow conversions from int or
359 char.
360 (valpy_int, valpy_long): Allow conversions from float.
361
362 2018-09-23 Tom Tromey <tom@tromey.com>
363
364 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
365 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
366
367 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
368
369 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
370 __sighndlr.
371 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
372
373 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
374
375 * windows-nat.c (windows_nat_target::wait): Remove a spurious
376 target_terminal::ours().
377
378 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
379
380 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
381 of vl to ULONGEST.
382
383 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
384
385 * breakpoint.c (update_inserted_breakpoint_locations): Remove
386 redundant condition.
387
388 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
389
390 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
391
392 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
393 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
394 * sol-thread.c (ps_pdmodel): Don't guard definition.
395
396 * procfs.c: Fix formatting.
397
398 * procfs.c (sysset_t_alloc): Remove.
399 (create_procinfo): Use XNEW instead of sysset_t_alloc.
400 (procfs_debug_inferior): Likewise.
401 (procfs_set_exec_trap): Likewise.
402 (proc_set_traced_sysentry): Don't allocate argp dynamically.
403 (proc_set_traced_sysexit): Likewise.
404
405 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
406 (dead_procinfo): Likewise.
407 (proc_warn): Likewise.
408 (proc_error): Likewise.
409 (proc_get_LDT_entry): Likewise.
410 (do_attach): Likewise.
411 (procfs_target::pid_to_str): Likewise.
412 (iterate_over_mappings): Likewise.
413
414 * procfs.c (create_procinfo): Fix ARI warning.
415 (proc_get_status): Likewise.
416 (proc_stop_process): Likewise.
417 (proc_run_process): Likewise.
418 (proc_kill): Likewise.
419 (proc_get_LDT_entry): Likewise.
420 (procfs_find_LDT_entry): Likewise.
421 (proc_update_threads): Likewise.
422 (proc_iterate_over_threads): Likewise.
423 (do_attach): Likewise.
424 (procfs_xfer_memory): Likewise.
425 (invalidate_cache): Likewise.
426 (procfs_target::resume): Likewise.
427 (procfs_init_inferior): Likewise.
428 (procfs_set_exec_trap): Likewise.
429 (procfs_target::thread_alive): Likewise.
430 (procfs_target::pid_to_exec_file): Likewise.
431 (iterate_over_mappings): Likewise.
432 (procfs_target::make_corefile_notes): Likewise.
433 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
434
435 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
436 (procfs_find_LDT_entry): Likewise.
437 * sol-thread.c (ps_lgetLDT): Likewise.
438
439 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
440
441 PR tdep/17903
442 * procfs.c (procfs_target): Declare pid_to_exec_file.
443 (procfs_target::pid_to_exec_file): New.
444
445 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
446
447 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
448 renaming.
449 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
450 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
451
452 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
453
454 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
455 (supply_fpregset, fill_fpregset): Move ...
456 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
457 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
458 Remove references to ioctl-based procfs.
459 Include <sys/reg.h>.
460 Remove PR_MODEL_NATIVE guards.
461 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
462 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
463
464 2018-09-19 Xavier Roirand <roirand@adacore.com>
465
466 PR gdb/20981:
467 * solib-darwin.c (darwin_get_dyld_bfd): New function.
468 (darwin_solib_get_all_image_info_addr_at_init): Update call.
469 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
470
471 2018-09-19 John Baldwin <jhb@FreeBSD.org>
472
473 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
474 (fbsd_print_sockaddr_in6): Likewise.
475
476 2018-09-19 Richard Bunt <richard.bunt@arm.com>
477 Chris January <chris.january@arm.com>
478
479 * eval.c (skip_undetermined_arglist): Skip argument list helper.
480 (evaluate_subexp_standard): Return a dummy type when
481 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
482 OP_F77_UNDETERMINED_ARGLIST case.
483 * expression.h (enum noside): Update comment.
484
485 2018-09-19 George Vasick <george.vasick@oracle.com>
486
487 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
488
489 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
490 April Chin <april.chin@oracle.com>
491 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
492
493 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
494 uint_t lwpid_t.
495 (create_procinfo): Print pids in /proc without leading zeros.
496
497 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
498
499 * nios2-tdep.c (nios2_gcc_target_options): New.
500 (nios2_gdb_arch_init): Install new hook.
501
502 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
503
504 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
505 New file.
506 * update-gnulib.sh: Apply patch.
507 * configure: Re-generate.
508
509 2018-09-18 John Baldwin <jhb@FreeBSD.org>
510
511 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
512 description. Make "info proc" command descriptions more
513 consistent.
514
515 2018-09-18 John Baldwin <jhb@FreeBSD.org>
516
517 * NEWS: Mention 'info proc files' command.
518
519 2018-09-18 John Baldwin <jhb@FreeBSD.org>
520
521 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
522 descriptors for IP_FILES and IP_ALL.
523
524 2018-09-18 John Baldwin <jhb@FreeBSD.org>
525
526 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
527 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
528 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
529 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
530 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
531 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
532 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
533 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
534 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
535 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
536 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
537 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
538 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
539 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
540 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
541 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
542 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
543 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
544 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
545 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
546 (struct fbsd_sockaddr_un): New types.
547 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
548 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
549 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
550 (fbsd_core_info_proc_files): New functions.
551 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
552 IP_ALL.
553 * fbsd-tdep.h (fbsd_info_proc_files_header)
554 (fbsd_info_proc_files_entry): New.
555
556 2018-09-18 John Baldwin <jhb@FreeBSD.org>
557
558 * defs.h (enum info_proc_what) [IP_FILES]: New value.
559 * infcmd.c (info_proc_cmd_files): New function.
560 (_initialize_infcmd): Register 'info proc files' command.
561
562 2018-09-18 John Baldwin <jhb@FreeBSD.org>
563
564 * gnulib/aclocal-m4-deps.mk: Re-generate.
565 * gnulib/aclocal.m4: Re-generate.
566 * gnulib/config.in: Re-generate.
567 * gnulib/configure: Re-generate.
568 * gnulib/import/Makefile.am: Re-generate.
569 * gnulib/import/Makefile.in: Re-generate.
570 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
571 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
572 * gnulib/import/arpa_inet.in.h: New file.
573 * gnulib/import/inet_ntop.c: New file.
574 * gnulib/import/m4/arpa_inet_h.m4: New file.
575 * gnulib/import/m4/inet_ntop.m4: New file.
576 * gnulib/import/m4/netinet_in_h.m4: New file.
577 * gnulib/import/m4/socklen.m4: New file.
578 * gnulib/import/m4/sockpfaf.m4: New file.
579 * gnulib/import/m4/stdalign.m4: New file.
580 * gnulib/import/m4/sys_uio_h.m4: New file.
581 * gnulib/import/netinet_in.in.h: New file.
582 * gnulib/import/stdalign.in.h: New file.
583 * gnulib/import/sys_socket.c: New file.
584 * gnulib/import/sys_socket.in.h: New file.
585 * gnulib/import/sys_uio.in.h: New file.
586 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
587 module.
588
589 2018-09-18 John Baldwin <jhb@FreeBSD.org>
590
591 * gnulib/aclocal-m4-deps.mk: New file.
592 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
593 deterministically.
594
595 2018-09-18 John Baldwin <jhb@FreeBSD.org>
596
597 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
598 KVE_PATH.
599
600 2018-09-18 Tom Tromey <tom@tromey.com>
601
602 * compile/compile-object-load.c (struct
603 link_hash_table_cleanup_data): Add constructor and destructor.
604 Use DISABLE_COPY_AND_ASSIGN.
605 (~link_hash_table_cleanup_data): Rename from
606 link_hash_table_free. Now a destructor.
607 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
608
609 2018-09-18 Tom Tromey <tom@tromey.com>
610
611 * compile/compile-object-run.c (do_module_cleanup): Use delete.
612 * compile/compile-object-load.c (struct munmap_list): Move to
613 header file.
614 (munmap_list::add): Rename from munmap_list_add; rewrite.
615 (munmap_list::~munmap_list): Rename from munmap_list_free.
616 (munmap_listp_free_cleanup): Remove.
617 (compile_object_load): Update.
618 * compile/compile-object-load.h (struct munmap_list): Move from
619 compile-object-load.c. Rewrite.
620
621 2018-09-18 Alan Hayward <alan.hayward@arm.com>
622
623 * aarch64-tdep.c (pass_in_v): Use register size.
624 (aarch64_extract_return_value): Likewise.
625 (aarch64_store_return_value): Likewise.
626
627 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
628
629 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
630 rlim_t.
631
632 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
633
634 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
635 Fix short help line.
636
637 2018-09-17 Tom Tromey <tom@tromey.com>
638
639 PR python/20445:
640 * configure: Rebuild.
641 * configure.ac: Conditionally use -DNDEBUG for Python.
642
643 2018-09-17 Tom Tromey <tom@tromey.com>
644
645 * configure: Rebuild.
646 * configure.ac: Use gmp as a library dependency when checking for
647 mpfr.
648
649 2018-09-17 Pedro Alves <palves@redhat.com>
650
651 * python/py-inferior.c (find_inferior_object): Delete.
652
653 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
654
655 * compile/compile-cplus-types.c
656 (compile_cplus_instance::enter_scope): Don't use new_scope after
657 std::move.
658
659 2018-09-17 Tom Tromey <tom@tromey.com>
660
661 * common/pathstuff.c (get_standard_cache_dir): Use
662 ~/Library/Caches on macOS.
663 * common/pathstuff.h (get_standard_cache_dir): Update comment.
664
665 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
666
667 PR python/23669
668 * breakpoint.c (commands_cmd_element): New.
669 (_initialize_breakpoint): Assign commands_cmd_element.
670 * breakpoint.h (commands_cmd_element): New.
671 * cli/cli-script.c (while_cmd_element, if_command,
672 define_cmd_element): New.
673 (command_name_equals): Remove.
674 (process_next_line): Compare commands by pointer, not by name.
675 (_initialize_cli_script): Assign the various cmd_list_element
676 variables.
677 * compile/compile.c (compile_cmd_element): New.
678 (_initialize_compile): Assign compile_cmd_element.
679 * compile/compile.h (compile_cmd_element): New.
680 * guile/guile.c (guile_cmd_element): New.
681 (install_gdb_commands): Assign guile_cmd_element.
682 * guile/guile.h (guile_cmd_element): New.
683 * python/python.c (python_cmd_element): New.
684 (_initialize_python): Assign python_cmd_element.
685 * python/python.h (python_cmd_element): New.
686 * tracepoint.c (while_stepping_cmd_element): New.
687 (_initialize_tracepoint): Assign while_stepping_cmd_element.
688 * tracepoint.h (while_stepping_cmd_element): New.
689
690 2018-09-17 Tom Tromey <tom@tromey.com>
691
692 * infrun.c (save_infcall_suspend_state): Return
693 infcall_suspend_state_up.
694 (save_infcall_control_state): Return infcall_control_state_up.
695 * inferior.h (save_infcall_suspend_state)
696 (save_infcall_control_state): Declare later. Return unique
697 pointers.
698
699 2018-09-17 Tom Tromey <tom@tromey.com>
700
701 * infrun.c (struct stop_context): Declare constructor,
702 destructor, "changed" method.
703 (stop_context::stop_context): Rename from save_stop_context.
704 (stop_context::~stop_context): Rename from
705 release_stop_context_cleanup.
706 (normal_stop): Update.
707 (stop_context::changed): Rename from stop_context_changed. Return
708 bool.
709
710 2018-09-17 Tom Tromey <tom@tromey.com>
711
712 * inferior.h (struct infcall_suspend_state_deleter): New.
713 (infcall_suspend_state_up): New typedef.
714 (struct infcall_control_state_deleter): New.
715 (infcall_control_state_up): New typedef.
716 (make_cleanup_restore_infcall_suspend_state)
717 (make_cleanup_restore_infcall_control_state): Don't declare.
718 * infcall.c (call_function_by_hand_dummy): Update.
719 * infrun.c (do_restore_infcall_suspend_state_cleanup)
720 (make_cleanup_restore_infcall_suspend_state): Remove.
721 (do_restore_infcall_control_state_cleanup)
722 (make_cleanup_restore_infcall_control_state): Remove.
723
724 2018-09-17 Tom Tromey <tom@tromey.com>
725
726 * gdbthread.h (struct thread_control_state): Add initializer.
727 (class thread_info) <control>: Remove initializer.
728 * inferior.h (struct inferior_control_state): Add initializer.
729 (class inferior) <control>: Remove initializer.
730 (exit_inferior_1): Update.
731 * infrun.c (struct infcall_control_state): Add constructors.
732 (save_infcall_control_state): Use new.
733 (restore_infcall_control_state, discard_infcall_control_state):
734 Use delete.
735
736 2018-09-17 Tom Tromey <tom@tromey.com>
737
738 * infrun.c (struct infcall_suspend_state) <registers>: Now a
739 unique_ptr.
740 <siginfo_data>: Now a unique_xmalloc_ptr.
741 (save_infcall_suspend_state, restore_infcall_suspend_state)
742 (discard_infcall_suspend_state)
743 (get_infcall_suspend_state_regcache): Update.
744
745 2018-09-17 Tom Tromey <tom@tromey.com>
746
747 * gdbthread.h (struct thread_suspend_state): Add initializers.
748 (class thread_info) <suspend>: Remove initializer.
749 * infrun.c (struct infcall_suspend_state): Add initializers.
750 (save_infcall_suspend_state): Use new.
751 (discard_infcall_suspend_state): Use delete.
752
753 2018-09-16 Tom Tromey <tom@tromey.com>
754
755 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
756 Remove.
757 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
758 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
759 (py_varobj_iter_new): Likewise.
760 (py_varobj_get_iterator): Use gdbpy_ref.
761
762 2018-09-16 Tom Tromey <tom@tromey.com>
763
764 * python/py-threadevent.c (py_get_event_thread): Simplify.
765 * python/py-inferior.c (infpy_thread_from_thread_handle):
766 Return immediately after calling thread_to_thread_object. Use
767 Py_RETURN_NONE.
768 (thread_to_thread_object): Set the exception on a NULL return.
769
770 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
771
772 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
773
774 2018-09-16 Tom Tromey <tom@tromey.com>
775
776 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
777 Remove.
778
779 2018-09-16 Tom Tromey <tom@tromey.com>
780
781 * python/python-internal.h (thread_to_thread_object): Change
782 return type.
783 * python/py-inferior.c (thread_to_thread_object): Return a new
784 reference.
785 (infpy_thread_from_thread_handle): Update.
786 * python/py-infthread.c (gdbpy_selected_thread): Update.
787 * python/py-stopevent.c (create_stop_event_object): Update.
788 * python/py-threadevent.c (py_get_event_thread): Return a new
789 reference.
790 (py_get_event_thread): Update.
791 * python/py-event.h (py_get_event_thread): Change return type.
792 * python/py-continueevent.c (create_continue_event_object):
793 Update.
794
795 2018-09-16 Tom Tromey <tom@tromey.com>
796
797 * python/py-progspace.c (pspy_get_objfiles): Update.
798 * python/python-internal.h (objfile_to_objfile_object): Change
799 return type.
800 * python/py-newobjfileevent.c (create_new_objfile_event_object):
801 Update.
802 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
803 Update.
804 * python/python.c (gdbpy_get_current_objfile): Update.
805 (gdbpy_objfiles): Update.
806 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
807 Update.
808 (objfile_to_objfile_object): Return a new reference.
809 * python/py-symtab.c (stpy_get_objfile): Update.
810 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
811 Update.
812
813 2018-09-16 Tom Tromey <tom@tromey.com>
814
815 * python/py-inferior.c (infpy_get_progspace): Update.
816 * python/python-internal.h (pspace_to_pspace_object): Change
817 return type.
818 * python/py-newobjfileevent.c
819 (create_clear_objfiles_event_object): Update.
820 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
821 Update.
822 * python/python.c (gdbpy_get_current_progspace): Update.
823 (gdbpy_progspaces): Update.
824 * python/py-progspace.c (pspace_to_pspace_object): Return a new
825 reference.
826 * python/py-objfile.c (objfpy_get_progspace): Update.
827 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
828 Update.
829
830 2018-09-16 Tom Tromey <tom@tromey.com>
831
832 * python/lib/gdb/__init__.py (current_progspace, objfiles)
833 (solib_name, block_for_pc, find_pc_line): New functions.
834 (execute_unwinders): Update.
835 * python/py-block.c (gdbpy_block_for_pc): Remove.
836 * python/py-inferior.c (infpy_get_progspace): New function.
837 (inferior_object_getset) <progspace>: Add.
838 * python/py-progspace.c (pspy_objfiles): Rewrite.
839 (pspy_solib_name, pspy_block_for_pc)
840 (pspy_find_pc_line, pspy_is_valid): New functions.
841 (progspace_object_methods): Add entries for solib_name,
842 block_for_pc, find_pc_line, is_valid.
843 * python/python-internal.h (gdbpy_block_for_pc)
844 (build_objfiles_list): Don't declare.
845 * python/python.c: Don't include solib.h.
846 (gdbpy_solib_name, gdbpy_find_pc_line)
847 (gdbpy_get_current_progspace, build_objfiles_list)
848 (gdbpy_objfiles): Remove.
849 (GdbMethods) <current_progspace, objfiles, block_for_pc,
850 solib_name, find_pc_line>: Remove entries.
851
852 2018-09-16 Tom Tromey <tom@tromey.com>
853
854 * top.c (new_ui_command): Use GNU style for metasyntactic
855 variables.
856 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
857 variables.
858 * maint.c (maintenance_translate_address): Remove "<>" around
859 text.
860 * interps.c (interpreter_exec_cmd): Use GNU style for
861 metasyntactic variables.
862 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
863 metasyntactic variables.
864 * tracepoint.c (tfind_range_command): Use GNU style for
865 metasyntactic variables.
866 (tfind_outside_command): Likewise.
867 (_initialize_tracepoint): Likewise.
868 * remote.c (extended_remote_target::create_inferior): Use GNU
869 style for metasyntactic variables.
870 * sparc64-tdep.c (adi_examine_command): Use GNU style for
871 metasyntactic variables.
872 (adi_assign_command): Likewise.
873
874 2018-09-16 Tom Tromey <tom@tromey.com>
875
876 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
877 metasyntactic variables. Print message if no disassembler options
878 are available.
879
880 2018-09-15 Tom Tromey <tom@tromey.com>
881
882 * infcmd.c (get_inferior_args): Return const char *.
883 * inferior.h (get_inferior_args): Return type now const.
884 * linux-tdep.c (linux_fill_prpsinfo): Update.
885 * procfs.c (procfs_target::make_corefile_notes): Update.
886
887 2018-09-07 Tom Tromey <tom@tromey.com>
888
889 * python/python.c (execute_gdb_command): Call bpstat_do_actions
890 inside the TRY.
891
892 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
893
894 * nios2-tdep.c (nios2_type_align): New.
895 (nios2_gdb_arch_init): Install type_align hook.
896
897 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
898
899 * eval.c (fake_method::fake_method): Call xzalloc directly for a
900 type that is neither object file owned, nor gdbarch owned.
901 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
902 gdbarch is non-NULL.
903 (alloc_type_instance): Allocate non-objfile owned types on the
904 gdbarch obstack.
905 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
906 using TYPE_ALLOC to ensure memory is allocated on the correct
907 obstack.
908 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
909 obstack, or the gdbarch obstack.
910 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
911
912 2018-09-14 Tom Tromey <tom@tromey.com>
913
914 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
915 block.
916
917 2018-09-14 Tom Tromey <tom@tromey.com>
918
919 * nat/fork-inferior.c (get_startup_shell): Remove "static".
920
921 2018-09-13 Tom Tromey <tom@tromey.com>
922
923 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
924 static.
925
926 2018-09-13 Tom Tromey <tom@tromey.com>
927
928 * exec.c (try_open_exec_file): Use std::string.
929
930 2018-09-13 Tom Tromey <tom@tromey.com>
931
932 * utils.h (gdb_bfd_errmsg): Return std::string.
933 * exec.c (exec_file_attach): Update.
934 * compile/compile-object-load.c (compile_object_load): Update.
935 * utils.c (gdb_bfd_errmsg): Return std::string.
936
937 2018-09-13 Tom Tromey <tom@tromey.com>
938
939 * procfs.c (struct procinfo_deleter): New.
940 (procinfo_up): New typedef.
941 (do_destroy_procinfo_cleanup): Remove.
942 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
943
944 2018-09-13 Tom Tromey <tom@tromey.com>
945
946 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
947
948 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
949 2018-09-13 Tom Tromey <tom@tromey.com>
950
951 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
952 (pspy_get_objfiles): New function.
953 (progspace_object_methods): New.
954 (pspace_object_type): Add tp_methods callback.
955 * python/python-internal.h (build_objfiles_list): New
956 declaration.
957 * python/python.c (build_objfiles_list): New function.
958 (gdbpy_objfiles): Implement using build_objfiles_list.
959 * NEWS: Mention the Progspace.objfiles method.
960
961 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
962
963 * python/py-inferior.c (infpy_get_progspace): New function.
964 (inferior_object_getset): Add progspace property.
965 * NEWS: Mention the new property.
966
967 2018-09-13 Tom Tromey <tom@tromey.com>
968
969 PR rust/23650:
970 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
971
972 2018-09-13 Tom Tromey <tom@tromey.com>
973
974 PR rust/23626:
975 * rust-lang.c (rust_enum_variant): Now static.
976 (rust_empty_enum_p): New function.
977 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
978 Handle empty enum.
979
980 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
981
982 * python/py-inferior.c (infpy_repr): New.
983 (inferior_object_type): Register infpy_repr.
984 * python/py-objfile.c (objfpy_repr): New.
985 (objfile_object_type): Register objfpy_repr.
986
987 2018-09-12 John Baldwin <jhb@FreeBSD.org>
988
989 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
990
991 2018-09-12 John Baldwin <jhb@FreeBSD.org>
992
993 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
994 typo.
995
996 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
997
998 * common/common-utils.c: Don't include '<sys/stat.h>'.
999 (is_regular_file): Move to...
1000 * common/filestuff.c (is_regular_file): ... here.
1001 * common/common-utils.h (is_regular_file): Move to...
1002 * common/filestuff.h (is_regular_file): ... here.
1003
1004 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1005
1006 * skip.c (debug_skip): New variable.
1007 (skiplist_entry::do_skip_file_p): Add debug output.
1008 (skiplist_entry::do_skip_gfile_p): Likewise.
1009 (skiplist_entry::skip_function_p): Likewise.
1010 (_initialize_step_skip): Create debug command.
1011 * NEWS: Mention set/show debug skip.
1012
1013 2018-09-11 Xavier Roirand <roirand@adacore.com>
1014
1015 * darwin-nat.c (should_disable_startup_with_shell):
1016 New function.
1017 (darwin_nat_target::create_inferior): Add call.
1018
1019 2018-09-11 Xavier Roirand <roirand@adacore.com>
1020
1021 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1022 inf_port, msg_state>: Initialize.
1023 (struct darwin_thread_info) <signaled, single_step>: Change
1024 type and initialize.
1025 (struct darwin_thread_info) <event>: Initialize.
1026
1027 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1028
1029 PR gdb/23555
1030 PR gdb/23558
1031 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1032 guesses.
1033
1034 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1035
1036 Revert:
1037 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1038
1039 PR gdb/23555
1040 PR gdb/23558
1041 * gnulib/aclocal.m4: Regenerate.
1042 * gnulib/config.in: Regenerate.
1043 * gnulib/configure: Regenerate.
1044 * gnulib/import/Makefile.am: Update.
1045 * gnulib/import/Makefile.in: Update.
1046 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1047 * gnulib/import/_Noreturn.h: ... this.
1048 * gnulib/import/alloca.in.h: Update.
1049 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1050 * gnulib/import/arg-nonnull.h: ... this.
1051 * gnulib/import/assure.h: Update.
1052 * gnulib/import/at-func.c: Update.
1053 * gnulib/import/basename-lgpl.c: Update.
1054 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1055 * gnulib/import/c++defs.h: ... this.
1056 * gnulib/import/canonicalize-lgpl.c: Update.
1057 * gnulib/import/cdefs.h: Update.
1058 * gnulib/import/chdir-long.c: Update.
1059 * gnulib/import/chdir-long.h: Update.
1060 * gnulib/import/cloexec.c: Update.
1061 * gnulib/import/cloexec.h: Update.
1062 * gnulib/import/close.c: Update.
1063 * gnulib/import/closedir.c: Update.
1064 * gnulib/import/config.charset: Update.
1065 * gnulib/import/dirent-private.h: Update.
1066 * gnulib/import/dirent.in.h: Update.
1067 * gnulib/import/dirfd.c: Update.
1068 * gnulib/import/dirname-lgpl.c: Update.
1069 * gnulib/import/dirname.h: Update.
1070 * gnulib/import/dosname.h: Update.
1071 * gnulib/import/dup-safer-flag.c: Update.
1072 * gnulib/import/dup-safer.c: Update.
1073 * gnulib/import/dup.c: Update.
1074 * gnulib/import/dup2.c: Update.
1075 * gnulib/import/errno.in.h: Update.
1076 * gnulib/import/error.c: Update.
1077 * gnulib/import/error.h: Update.
1078 * gnulib/import/exitfail.c: Update.
1079 * gnulib/import/exitfail.h: Update.
1080 * gnulib/import/extra/update-copyright: Update.
1081 * gnulib/import/fchdir.c: Update.
1082 * gnulib/import/fcntl.c: Update.
1083 * gnulib/import/fcntl.in.h: Update.
1084 * gnulib/import/fd-hook.c: Update.
1085 * gnulib/import/fd-hook.h: Update.
1086 * gnulib/import/fd-safer-flag.c: Update.
1087 * gnulib/import/fd-safer.c: Update.
1088 * gnulib/import/fdopendir.c: Update.
1089 * gnulib/import/filename.h: Update.
1090 * gnulib/import/filenamecat-lgpl.c: Update.
1091 * gnulib/import/filenamecat.h: Update.
1092 * gnulib/import/flexmember.h: Update.
1093 * gnulib/import/float+.h: Update.
1094 * gnulib/import/float.c: Update.
1095 * gnulib/import/float.in.h: Update.
1096 * gnulib/import/fnmatch.c: Update.
1097 * gnulib/import/fnmatch.in.h: Update.
1098 * gnulib/import/fnmatch_loop.c: Update.
1099 * gnulib/import/fpucw.h: Update.
1100 * gnulib/import/frexp.c: Update.
1101 * gnulib/import/frexpl.c: Update.
1102 * gnulib/import/fstat.c: Update.
1103 * gnulib/import/fstatat.c: Update.
1104 * gnulib/import/getcwd-lgpl.c: Update.
1105 * gnulib/import/getcwd.c: Update.
1106 * gnulib/import/getdtablesize.c: Update.
1107 * gnulib/import/getlogin_r.c: Update.
1108 * gnulib/import/getprogname.c: Update.
1109 * gnulib/import/getprogname.h: Update.
1110 * gnulib/import/gettext.h: Update.
1111 * gnulib/import/gettimeofday.c: Update.
1112 * gnulib/import/glob-libc.h: Update.
1113 * gnulib/import/glob.c: Update.
1114 * gnulib/import/glob.in.h: Update.
1115 * gnulib/import/glob_internal.h: Update.
1116 * gnulib/import/glob_pattern_p.c: Update.
1117 * gnulib/import/globfree.c: Update.
1118 * gnulib/import/hard-locale.c: Update.
1119 * gnulib/import/hard-locale.h: Update.
1120 * gnulib/import/intprops.h: Update.
1121 * gnulib/import/inttypes.in.h: Update.
1122 * gnulib/import/isnan.c: Update.
1123 * gnulib/import/isnand-nolibm.h: Update.
1124 * gnulib/import/isnand.c: Update.
1125 * gnulib/import/isnanl-nolibm.h: Update.
1126 * gnulib/import/isnanl.c: Update.
1127 * gnulib/import/itold.c: Update.
1128 * gnulib/import/libc-config.h: Update.
1129 * gnulib/import/limits.in.h: Update.
1130 * gnulib/import/localcharset.c: Update.
1131 * gnulib/import/localcharset.h: Update.
1132 * gnulib/import/localtime-buffer.c: Update.
1133 * gnulib/import/localtime-buffer.h: Update.
1134 * gnulib/import/lstat.c: Update.
1135 * gnulib/import/m4/00gnulib.m4: Update.
1136 * gnulib/import/m4/__inline.m4: Update.
1137 * gnulib/import/m4/absolute-header.m4: Update.
1138 * gnulib/import/m4/alloca.m4: Update.
1139 * gnulib/import/m4/builtin-expect.m4: Update.
1140 * gnulib/import/m4/canonicalize.m4: Update.
1141 * gnulib/import/m4/chdir-long.m4: Update.
1142 * gnulib/import/m4/close.m4: Update.
1143 * gnulib/import/m4/closedir.m4: Update.
1144 * gnulib/import/m4/configmake.m4: Update.
1145 * gnulib/import/m4/d-ino.m4: Update.
1146 * gnulib/import/m4/d-type.m4: Update.
1147 * gnulib/import/m4/dirent_h.m4: Update.
1148 * gnulib/import/m4/dirfd.m4: Update.
1149 * gnulib/import/m4/dirname.m4: Update.
1150 * gnulib/import/m4/double-slash-root.m4: Update.
1151 * gnulib/import/m4/dup.m4: Update.
1152 * gnulib/import/m4/dup2.m4: Update.
1153 * gnulib/import/m4/eealloc.m4: Update.
1154 * gnulib/import/m4/environ.m4: Update.
1155 * gnulib/import/m4/errno_h.m4: Update.
1156 * gnulib/import/m4/error.m4: Update.
1157 * gnulib/import/m4/exponentd.m4: Update.
1158 * gnulib/import/m4/exponentl.m4: Update.
1159 * gnulib/import/m4/extensions.m4: Update.
1160 * gnulib/import/m4/extern-inline.m4: Update.
1161 * gnulib/import/m4/fchdir.m4: Update.
1162 * gnulib/import/m4/fcntl-o.m4: Update.
1163 * gnulib/import/m4/fcntl.m4: Update.
1164 * gnulib/import/m4/fcntl_h.m4: Update.
1165 * gnulib/import/m4/fdopendir.m4: Update.
1166 * gnulib/import/m4/filenamecat.m4: Update.
1167 * gnulib/import/m4/flexmember.m4: Update.
1168 * gnulib/import/m4/float_h.m4: Update.
1169 * gnulib/import/m4/fnmatch.m4: Update.
1170 * gnulib/import/m4/fnmatch_h.m4: Update.
1171 * gnulib/import/m4/fpieee.m4: Update.
1172 * gnulib/import/m4/frexp.m4: Update.
1173 * gnulib/import/m4/frexpl.m4: Update.
1174 * gnulib/import/m4/fstat.m4: Update.
1175 * gnulib/import/m4/fstatat.m4: Update.
1176 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1177 * gnulib/import/m4/getcwd-path-max.m4: Update.
1178 * gnulib/import/m4/getcwd.m4: Update.
1179 * gnulib/import/m4/getdtablesize.m4: Update.
1180 * gnulib/import/m4/getlogin.m4: Update.
1181 * gnulib/import/m4/getlogin_r.m4: Update.
1182 * gnulib/import/m4/getpagesize.m4: Update.
1183 * gnulib/import/m4/getprogname.m4: Update.
1184 * gnulib/import/m4/gettimeofday.m4: Update.
1185 * gnulib/import/m4/glibc21.m4: Update.
1186 * gnulib/import/m4/glob.m4: Update.
1187 * gnulib/import/m4/glob_h.m4: Update.
1188 * gnulib/import/m4/gnulib-cache.m4: Update.
1189 * gnulib/import/m4/gnulib-common.m4: Update.
1190 * gnulib/import/m4/gnulib-comp.m4: Update.
1191 * gnulib/import/m4/gnulib-tool.m4: Update.
1192 * gnulib/import/m4/hard-locale.m4: Update.
1193 * gnulib/import/m4/include_next.m4: Update.
1194 * gnulib/import/m4/inttypes-pri.m4: Update.
1195 * gnulib/import/m4/inttypes.m4: Update.
1196 * gnulib/import/m4/isnand.m4: Update.
1197 * gnulib/import/m4/isnanl.m4: Update.
1198 * gnulib/import/m4/largefile.m4: Update.
1199 * gnulib/import/m4/limits-h.m4: Update.
1200 * gnulib/import/m4/localcharset.m4: Update.
1201 * gnulib/import/m4/locale-fr.m4: Update.
1202 * gnulib/import/m4/locale-ja.m4: Update.
1203 * gnulib/import/m4/locale-zh.m4: Update.
1204 * gnulib/import/m4/localtime-buffer.m4: Update.
1205 * gnulib/import/m4/longlong.m4: Update.
1206 * gnulib/import/m4/lstat.m4: Update.
1207 * gnulib/import/m4/malloc.m4: Update.
1208 * gnulib/import/m4/malloca.m4: Update.
1209 * gnulib/import/m4/math_h.m4: Update.
1210 * gnulib/import/m4/mbrtowc.m4: Update.
1211 * gnulib/import/m4/mbsinit.m4: Update.
1212 * gnulib/import/m4/mbsrtowcs.m4: Update.
1213 * gnulib/import/m4/mbstate_t.m4: Update.
1214 * gnulib/import/m4/memchr.m4: Update.
1215 * gnulib/import/m4/memmem.m4: Update.
1216 * gnulib/import/m4/mempcpy.m4: Update.
1217 * gnulib/import/m4/memrchr.m4: Update.
1218 * gnulib/import/m4/mkdir.m4: Update.
1219 * gnulib/import/m4/mkstemp.m4: Update.
1220 * gnulib/import/m4/mmap-anon.m4: Update.
1221 * gnulib/import/m4/mode_t.m4: Update.
1222 * gnulib/import/m4/msvc-inval.m4: Update.
1223 * gnulib/import/m4/msvc-nothrow.m4: Update.
1224 * gnulib/import/m4/multiarch.m4: Update.
1225 * gnulib/import/m4/nocrash.m4: Update.
1226 * gnulib/import/m4/off_t.m4: Update.
1227 * gnulib/import/m4/onceonly.m4: Update.
1228 * gnulib/import/m4/open-cloexec.m4: Update.
1229 * gnulib/import/m4/open.m4: Update.
1230 * gnulib/import/m4/openat.m4: Update.
1231 * gnulib/import/m4/opendir.m4: Update.
1232 * gnulib/import/m4/pathmax.m4: Update.
1233 * gnulib/import/m4/rawmemchr.m4: Update.
1234 * gnulib/import/m4/readdir.m4: Update.
1235 * gnulib/import/m4/readlink.m4: Update.
1236 * gnulib/import/m4/realloc.m4: Update.
1237 * gnulib/import/m4/rename.m4: Update.
1238 * gnulib/import/m4/rewinddir.m4: Update.
1239 * gnulib/import/m4/rmdir.m4: Update.
1240 * gnulib/import/m4/save-cwd.m4: Update.
1241 * gnulib/import/m4/secure_getenv.m4: Update.
1242 * gnulib/import/m4/setenv.m4: Update.
1243 * gnulib/import/m4/signal_h.m4: Update.
1244 * gnulib/import/m4/ssize_t.m4: Update.
1245 * gnulib/import/m4/stat-time.m4: Update.
1246 * gnulib/import/m4/stat.m4: Update.
1247 * gnulib/import/m4/std-gnu11.m4: Update.
1248 * gnulib/import/m4/stdbool.m4: Update.
1249 * gnulib/import/m4/stddef_h.m4: Update.
1250 * gnulib/import/m4/stdint.m4: Update.
1251 * gnulib/import/m4/stdio_h.m4: Update.
1252 * gnulib/import/m4/stdlib_h.m4: Update.
1253 * gnulib/import/m4/strchrnul.m4: Update.
1254 * gnulib/import/m4/strdup.m4: Update.
1255 * gnulib/import/m4/strerror.m4: Update.
1256 * gnulib/import/m4/string_h.m4: Update.
1257 * gnulib/import/m4/strstr.m4: Update.
1258 * gnulib/import/m4/strtok_r.m4: Update.
1259 * gnulib/import/m4/sys_socket_h.m4: Update.
1260 * gnulib/import/m4/sys_stat_h.m4: Update.
1261 * gnulib/import/m4/sys_time_h.m4: Update.
1262 * gnulib/import/m4/sys_types_h.m4: Update.
1263 * gnulib/import/m4/tempname.m4: Update.
1264 * gnulib/import/m4/time_h.m4: Update.
1265 * gnulib/import/m4/unistd-safer.m4: Update.
1266 * gnulib/import/m4/unistd_h.m4: Update.
1267 * gnulib/import/m4/warn-on-use.m4: Update.
1268 * gnulib/import/m4/wchar_h.m4: Update.
1269 * gnulib/import/m4/wchar_t.m4: Update.
1270 * gnulib/import/m4/wctype_h.m4: Update.
1271 * gnulib/import/m4/wint_t.m4: Update.
1272 * gnulib/import/malloc.c: Update.
1273 * gnulib/import/malloc/scratch_buffer.h: Update.
1274 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1275 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1276 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1277 * gnulib/import/malloca.c: Update.
1278 * gnulib/import/malloca.h: Update.
1279 * gnulib/import/malloca.valgrind: Update.
1280 * gnulib/import/math.in.h: Update.
1281 * gnulib/import/mbrtowc.c: Update.
1282 * gnulib/import/mbsinit.c: Update.
1283 * gnulib/import/mbsrtowcs-impl.h: Update.
1284 * gnulib/import/mbsrtowcs-state.c: Update.
1285 * gnulib/import/mbsrtowcs.c: Update.
1286 * gnulib/import/memchr.c: Update.
1287 * gnulib/import/memmem.c: Update.
1288 * gnulib/import/mempcpy.c: Update.
1289 * gnulib/import/memrchr.c: Update.
1290 * gnulib/import/mkdir.c: Update.
1291 * gnulib/import/mkstemp.c: Update.
1292 * gnulib/import/msvc-inval.c: Update.
1293 * gnulib/import/msvc-inval.h: Update.
1294 * gnulib/import/msvc-nothrow.c: Update.
1295 * gnulib/import/msvc-nothrow.h: Update.
1296 * gnulib/import/open.c: Update.
1297 * gnulib/import/openat-die.c: Update.
1298 * gnulib/import/openat-priv.h: Update.
1299 * gnulib/import/openat-proc.c: Update.
1300 * gnulib/import/openat.c: Update.
1301 * gnulib/import/openat.h: Update.
1302 * gnulib/import/opendir.c: Update.
1303 * gnulib/import/pathmax.h: Update.
1304 * gnulib/import/pipe-safer.c: Update.
1305 * gnulib/import/rawmemchr.c: Update.
1306 * gnulib/import/readdir.c: Update.
1307 * gnulib/import/readlink.c: Update.
1308 * gnulib/import/realloc.c: Update.
1309 * gnulib/import/ref-add.sin: Update.
1310 * gnulib/import/ref-del.sin: Update.
1311 * gnulib/import/rename.c: Update.
1312 * gnulib/import/rewinddir.c: Update.
1313 * gnulib/import/rmdir.c: Update.
1314 * gnulib/import/same-inode.h: Update.
1315 * gnulib/import/save-cwd.c: Update.
1316 * gnulib/import/save-cwd.h: Update.
1317 * gnulib/import/scratch_buffer.h: Update.
1318 * gnulib/import/secure_getenv.c: Update.
1319 * gnulib/import/setenv.c: Update.
1320 * gnulib/import/signal.in.h: Update.
1321 * gnulib/import/stat-time.c: Update.
1322 * gnulib/import/stat-time.h: Update.
1323 * gnulib/import/stat-w32.c: Update.
1324 * gnulib/import/stat-w32.h: Update.
1325 * gnulib/import/stat.c: Update.
1326 * gnulib/import/stdbool.in.h: Update.
1327 * gnulib/import/stddef.in.h: Update.
1328 * gnulib/import/stdint.in.h: Update.
1329 * gnulib/import/stdio.in.h: Update.
1330 * gnulib/import/stdlib.in.h: Update.
1331 * gnulib/import/str-two-way.h: Update.
1332 * gnulib/import/strchrnul.c: Update.
1333 * gnulib/import/strdup.c: Update.
1334 * gnulib/import/streq.h: Update.
1335 * gnulib/import/strerror-override.c: Update.
1336 * gnulib/import/strerror-override.h: Update.
1337 * gnulib/import/strerror.c: Update.
1338 * gnulib/import/string.in.h: Update.
1339 * gnulib/import/stripslash.c: Update.
1340 * gnulib/import/strnlen1.c: Update.
1341 * gnulib/import/strnlen1.h: Update.
1342 * gnulib/import/strstr.c: Update.
1343 * gnulib/import/strtok_r.c: Update.
1344 * gnulib/import/sys_stat.in.h: Update.
1345 * gnulib/import/sys_time.in.h: Update.
1346 * gnulib/import/sys_types.in.h: Update.
1347 * gnulib/import/tempname.c: Update.
1348 * gnulib/import/tempname.h: Update.
1349 * gnulib/import/time.in.h: Update.
1350 * gnulib/import/unistd--.h: Update.
1351 * gnulib/import/unistd-safer.h: Update.
1352 * gnulib/import/unistd.in.h: Update.
1353 * gnulib/import/unsetenv.c: Update.
1354 * gnulib/import/verify.h: Update.
1355 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1356 * gnulib/import/wchar.in.h: Update.
1357 * gnulib/import/wctype.in.h: Update.
1358 * gnulib/import/xalloc-oversized.h: Update.
1359 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1360 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1361
1362 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * record-btrace.c (get_thread_current_frame): Remove
1365 old_inferior_ptid.
1366
1367 2018-09-10 Jerome Guitton <guitton@adacore.com>
1368
1369 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1370 with check_tag to 1 if and only if the type is tagged and the
1371 component being searched cannot been found in the current
1372 view. Otherwise, always call ada_to_fixed_type with
1373 check_tag to 0.
1374
1375 2018-09-10 Xavier Roirand <roirand@adacore.com>
1376
1377 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1378 declaration.
1379 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1380 * ada-varobj.c (ada_varobj_get_number_of_children,
1381 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1382
1383 2018-09-10 Xavier Roirand <roirand@adacore.com>
1384
1385 * ada-valprint.c (ada_value_print): Use type instead of
1386 enclosing type.
1387
1388 2018-09-10 Xavier Roirand <roirand@adacore.com>
1389
1390 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1391 an array of access to unconstrained array.
1392
1393 2018-09-10 Xavier Roirand <roirand@adacore.com>
1394
1395 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1396 (ada_check_typedef): Use it.
1397
1398 2018-09-10 Xavier Roirand <roirand@adacore.com>
1399
1400 * ada-varobj.c (ada_varobj_describe_struct_child)
1401 (ada_varobj_describe_child): Handle union case like struct one.
1402
1403 2018-09-10 Tom Tromey <tom@tromey.com>
1404
1405 PR python/18380:
1406 * python/python.c (_initialize_python): Make example in "python"
1407 help work in Python 3.
1408
1409 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1410
1411 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1412 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1413 $(EXEEXT) to the script, as it is not a program.
1414
1415 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1416
1417 * python/py-prettyprint.c (pretty_print_one_value): Return
1418 gdbpy_ref<>.
1419 (print_string_repr): Adjust.
1420 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1421 * python/python-internal.h (apply_varobj_pretty_printer): Return
1422 gdbpy_ref<>.
1423 * varobj.c (varobj_value_get_print_value): Adjust.
1424
1425 2018-09-08 Tom Tromey <tom@tromey.com>
1426
1427 PR python/16047:
1428 * python/py-prettyprint.c (pretty_print_one_value): Check for
1429 to_string method.
1430
1431 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1432
1433 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1434 replace_operator_with_call.
1435
1436 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1437
1438 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1439
1440 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1441
1442 * ada-typeprint.c (print_range): Print the bounds using TYPE
1443 rather than its TYPE_TARGET_TYPE.
1444
1445 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1446
1447 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1448 call to ada_to_fixed_value_create.
1449
1450 2018-09-08 Jerome Guitton <guitton@adacore.com>
1451
1452 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1453
1454 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1455
1456 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1457 by calls to error.
1458
1459 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1460
1461 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1462 Move update of loop variable "fi".
1463
1464 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1465
1466 * ada-lang.c (value_assign_to_component): In the case of
1467 big-endian targets, extract the bits of the given VAL
1468 using an src_offset of zero if container is not a scalar.
1469
1470 2018-09-06 Simon Ser <contact@emersion.fr>
1471
1472 PR gdb/23105
1473 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1474 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1475 * fbsd-tdep.c (fbsd_make_note_desc): New.
1476 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1477 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1478 * target.h (enum target_object) Add FreeBSD-specific
1479 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1480
1481 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1482
1483 * compile/compile-c.h (generate_c_for_variable_locations):
1484 Change reference to pointer.
1485 * compile/compile-c-support.c (compile_program) <compute>:
1486 Likewise.
1487 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1488 (generate_c_for_for_one_variable): Likewise
1489 (generate_c_for_variable_locations): Likewise
1490 * compile/compile-c-types.c (compile_c_instance::convert_type):
1491 Likewise
1492 * compile/compile-cplus-symbols.c (convert_one_symbol):
1493 std::move the scope passed to enter_scope.
1494 * compile/compile-cplus-types.c
1495 (compile_cplus_instance::enter_scope): Make parameter
1496 rvalue-reference.
1497 (compile_cplus_instance::new_scope): Change reference to
1498 pointer.
1499 (compile_cplus_instance::convert_type): Likewise
1500 (compile_cplus_convert_typedef): std::move the scope passed to
1501 enter_scope.
1502 (compile_cplus_convert_struct_or_union): Likewise.
1503 (compile_cplus_convert_enum): Likewise.
1504 (compile_cplus_convert_namespace): Likewise.
1505 * compile/compile-cplus.h (compile_cplus_instance)
1506 <enter_scope>: Make parameter rvalue-reference.
1507 * compile/compile-internal.h (compile_instance)
1508 <get_cached_type>: Likewise
1509 * compile/compile-loc2c.c (push): Likewise
1510 (pushf): Likewise
1511 (unary): Likewise
1512 (binary): Likewise
1513 (print_label): Likewise
1514 (pushf_register_address): Likewise
1515 (pushf_register): Likewise
1516 (do_compile_dwarf_expr_to_c): Likewise
1517 (compile_dwarf_expr_to_c): Likewise
1518 (compile_dwarf_bounds_to_c): Likewise
1519 * compile/compile.c (compile_instance::get_cached_type):
1520 Likewise
1521 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1522 (compile_dwarf_bounds_to_c): Likewise
1523 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1524 (dwarf2_compile_property_to_c): Likewise
1525 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1526 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1527 Likewise
1528
1529 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1530
1531 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1532 * tui/tui-data.c (init_content_element): Don't initialize it.
1533
1534 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1535
1536 * tui/tui-data.h (struct tui_win_info)
1537 <detail::opaque>: Remove.
1538 * tui/tui-data.c (init_win_info): Remove assignment.
1539
1540 2018-09-05 Tom Tromey <tom@tromey.com>
1541
1542 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1543 -Wformat-nonliteral.
1544 * target-float.c (host_float_ops<T>::to_string)
1545 (host_float_ops<T>::from_string): Use
1546 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1547 * configure: Rebuild.
1548
1549 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1550
1551 * printcmd.c (printf_c_string): Use
1552 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1553 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1554
1555 2018-09-05 Tom Tromey <tom@tromey.com>
1556
1557 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1558
1559 2018-09-05 Tom de Vries <tdevries@suse.de>
1560
1561 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1562 with resolve_abstract_p == true.
1563 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1564 defaulting to false. Propagate resolve_abstract_p to
1565 dwarf2_fetch_die_loc_sect_off.
1566 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1567 parameter, defaulting to false.
1568 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1569 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1570 parameter.
1571 * dwarf2read.h (struct die_info): Forward-declare.
1572 (die_info_ptr): New typedef.
1573 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1574
1575 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1576
1577 GDB 8.2 released.
1578
1579 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1580 Pedro Alves <palves@redhat.com>
1581
1582 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1583 "aclocal-m4-deps.mk". Include file here.
1584 $(srcdir)/aclocal.m4: Add "configure.ac".
1585 * gnulib/aclocal-m4-deps.mk: New file.
1586 * gnulib/update-gnulib.sh: Automatically update
1587 "aclocal-m4-deps.mk".
1588
1589 2018-09-04 Tom Tromey <tom@tromey.com>
1590
1591 * configure: Rebuild.
1592 * configure.ac: Remove multi-ice code.
1593
1594 2018-09-04 Tom Tromey <tom@tromey.com>
1595
1596 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1597 (ada-exp.o): Update.
1598
1599 2018-09-04 Tom Tromey <tom@tromey.com>
1600
1601 * Makefile.in (printcmd.o, target-float.o): Remove.
1602 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1603
1604 2018-09-04 Tom Tromey <tom@tromey.com>
1605
1606 * gnulib/Makefile.in: Remove obsolete comment.
1607 * Makefile.in: Remove obsolete comment.
1608
1609 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1610
1611 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1612 line with '+'.
1613
1614 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1615
1616 * riscv-tdep.c: Add 'prologue-value.h' include.
1617 (struct riscv_unwind_cache): New struct.
1618 (riscv_debug_unwinder): New global.
1619 (riscv_scan_prologue): Update arguments, capture register details
1620 from prologue scan.
1621 (riscv_skip_prologue): Reformat arguments line, move end of
1622 prologue calculation into riscv_scan_prologue.
1623 (riscv_frame_cache): Update return type, create
1624 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1625 details.
1626 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1627 (riscv_frame_prev_register): Use the trad_frame within the
1628 riscv_unwind_cache.
1629 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1630 flag.
1631
1632 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1633
1634 * trad-frame.h (trad_frame_set_realreg): Declare.
1635 (trad_frame_set_addr): Declare.
1636 * trad-frame.c (trad_frame_set_realreg): Define new function.
1637 (trad_frame_set_addr): Define new function.
1638 (trad_frame_set_reg_realreg): Use new function.
1639 (trad_frame_set_reg_addr): Use new function.
1640
1641 2018-09-01 Keith Seitz <keiths@redhat.com>
1642
1643 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1644 pulongest instead of "%lld".
1645 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1646 ATTRIBUTE_UNUSED.
1647
1648 2018-08-31 Tom Tromey <tom@tromey.com>
1649
1650 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1651 variant part type.
1652
1653 2018-08-31 Pedro Alves <palves@redhat.com>
1654
1655 * gdbarch.h: Regenerate.
1656
1657 2018-08-31 Pedro Alves <palves@redhat.com>
1658
1659 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1660 * target.h (Hardware watchpoint interfaces): Describe
1661 continuable/steppable/non-steppable watchpoints.
1662 * gdbarch.h, gdbarch.c: Regenerate.
1663
1664 2018-08-31 Pedro Alves <palves@redhat.com>
1665
1666 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1667 Delete.
1668 * s390-linux-nat.c
1669 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1670 * target.h (target_ops::have_continuable_watchpoint): Delete.
1671 (target_have_continuable_watchpoint): Delete.
1672 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1673 * target-delegates.c: Regenerate.
1674
1675 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1676
1677 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1678 the files present in "gnulib/import/m4/".
1679
1680 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1681
1682 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1683 c.sw, c.swsp, and c.sdsp.
1684
1685 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1686
1687 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1688 (riscv_read_misa_reg): Don't cache value read into inferior data.
1689 (riscv_new_inferior_data): Delete.
1690 (riscv_inferior_data_cleanup): Delete.
1691 (riscv_inferior_data): Delete.
1692 (riscv_invalidate_inferior_data): Delete.
1693 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1694
1695 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1696
1697 * compile/compile-cplus-types.c
1698 (compile_cplus_instance::leave_scope): Take the address of scope
1699 object.
1700 (compile_cplus_instance::convert_qualified_base): Compare quals
1701 to 0.
1702
1703 2018-08-30 Keith Seitz <keiths@redhat.com>
1704
1705 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1706 Use "%s" and host_address_to_string instead of "%p" in printf.
1707
1708 2018-08-29 Keith Seitz <keiths@redhat.com>
1709
1710 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1711 and compile-cplus-types.c.
1712 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1713 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1714 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1715 Declare.
1716 * compile/compile-c-support.c: Include compile-cplus.h.
1717 (load_libcompile): Templatize.
1718 (get_compile_context): "New" function.
1719 (c_get_compile_context): Use get_compile_context.
1720 (cplus_get_compile_context): New function.
1721 (cplus_push_user_expression, cplus_pop_user_expression)
1722 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1723 (cplus_compute_program): Define new structs/functions.
1724 * compile/compile-cplus-symmbols.c: New file.
1725 * compile/compile-cplus-types.c: New file.
1726 * compile/compile-cplus.h: New file.
1727 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1728 Declare.
1729 * compile/compile-object-load.c (get_out_value_type): Use
1730 strncmp_iw when comparing symbol names.
1731 (compile_object_load): Add mst_bss and mst_data.
1732 * compile/compile.c (_initialize_compile): Remove
1733 -Wno-implicit-function-declaration from `compile_args'.
1734 * compile/gcc-cp-plugin.h: New file.
1735 * NEWS: Mention C++ compile support and new debug options.
1736
1737 2018-08-29 Keith Seitz <keiths@redhat.com>
1738
1739 * linespec.c (collect_info::add_symbol): Make virtual.
1740 (struct symbol_searcher_collect_info): New struct.
1741 (symbol_searcher::find_all_symbols): New method.
1742 * symtab.h (class symbol_searcher): New class.
1743
1744 2018-08-29 Keith Seitz <keiths@redhat.com>
1745
1746 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1747 Change to vector of block_symbol. Update all users.
1748 (struct collect_info) <symbols>: Likewise.
1749 (collect_info::add_symbol): Take block_symbol as argument.
1750 Update all callers.
1751 (decode_compound_collector) <m_symbols>: Change type to vector
1752 of block_symbol. Update all users.
1753 (decode_compound_collector::operator ()): Change parameter type
1754 to block_symbol.
1755 (find_method, find_function_symbols, find_linespec_symbols)
1756 (find_label_symbols_in_block, find_label_symbols): Change symbol
1757 vectors to block_symbol vectors.
1758 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1759 block_symbol.
1760
1761 2018-08-29 Keith Seitz <keiths@redhat.com>
1762
1763 * linespec.c (symbolp): Remove typedef and VEC definitions.
1764 (bound_minimal_symbol_d): Likewise.
1765
1766 2018-08-29 Keith Seitz <keiths@redhat.com>
1767
1768 * linespec.c (decode_compound_collector::decode_compound_collector):
1769 Remove initialization for `m_symtabs'.
1770 (decode_compound_collector::release_symbols): Change return type
1771 to std::vector. Update all callers.
1772 (class decode_compound_collector) <m_symbols>: Change type to
1773 std::vector.
1774 (lookup_prefix_sym): Change return type to std::vector. Update all
1775 callers.
1776 (compare_symbols): Remove.
1777 (std_compare_symbols): Rename to `compare_symbols'.
1778 (find_method): Change `sym_classes' parameter to std::vector.
1779 Update all callers. Use std::sort to sort sym_classes.
1780 (find_linespec_symbols): Remove cleanup.
1781
1782 2018-08-29 Keith Seitz <keiths@redhat.com>
1783
1784 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1785 std::vector. Update all users.
1786 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1787 (struct collect_info) <minimal_symbols>: Likewise.
1788 (compare_msymbols): Return bool. Change parameters to const
1789 bound_minimal_symbol references.
1790 (find_method, find_function_symbols, find_linespec_symbols): Change
1791 `minsyms' parameter to std::vector. Update all callers.
1792
1793 2018-08-29 Keith Seitz <keiths@redhat.com>
1794
1795 * linespec.c (struct linespec) <label_symbols>: Change type to
1796 std::vector. Update all users.
1797 (find_label_symbols_in_block): Change `result' parameter to
1798 std::vector. Update all callers.
1799 (find_label_symbols): Return std::vector. Update all callers.
1800
1801 2018-08-29 Keith Seitz <keiths@redhat.com>
1802
1803 * linespec.c (struct linespec) <function_symbols>: Change type to
1804 std::vector. Update all users.
1805 (struct collect_info) <function_symbols>: Likewise.
1806 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1807 (std_compare_symbols): New function.
1808 (find_method, find_function_symbols, find_linespec_symbols)
1809 (find_label_symbols_in_block): Change `symbols' parameter to
1810 std::vector. Update all callers.
1811 (find_label_symbols): Likewise for `function_symbols' and
1812 `label_funcs_ret'.
1813
1814 2018-08-29 Keith Seitz <keiths@redhat.com>
1815
1816 * linespec.c (symtab_vector_up): Define.
1817 (struct linespec) <file_symtabs>: Change type to std::vector *.
1818 Update all uses.
1819 (struct collect_info) <file_symtabs>: Likewise.
1820 (collect_symtabs_from_filename): Return symtab_vector_up.
1821 Update all callers.
1822 (decode_objc): Remove cleanup.
1823 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1824 (symtab_collector::release_symtabs): Return symtab_vector_up.
1825 Update all callers.
1826 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1827 Update all users.
1828 (collect_symtabs_from_filename, symtabs_from_filename): Return
1829 symtab_vector_up. Update all callers.
1830
1831 2018-08-29 Tom Tromey <tom@tromey.com>
1832
1833 * csky-tdep.c (csky_analyze_prologue): Use
1834 core_addr_to_string_nz.
1835
1836 2018-08-29 Tom Tromey <tom@tromey.com>
1837
1838 * windows-nat.c (struct xlate_exception) <them>: Change type to
1839 DWORD.
1840 (xlate): Fix formatting. Remove last entry.
1841 (struct xlate_exception, xlate): Comment out.
1842 (windows_nat_target::resume): Use ranged for.
1843
1844 2018-08-29 Jim Wilson <jimw@sifive.com>
1845
1846 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1847 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1848 of NT_PRFPREG.
1849 (riscv_linux_nat_target::store_registers): Likewise.
1850
1851 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1852
1853 PR gdb/23555
1854 PR gdb/23558
1855 * gnulib/aclocal.m4: Regenerate.
1856 * gnulib/config.in: Regenerate.
1857 * gnulib/configure: Regenerate.
1858 * gnulib/import/Makefile.am: Update.
1859 * gnulib/import/Makefile.in: Update.
1860 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1861 * gnulib/import/_Noreturn.h: ... this.
1862 * gnulib/import/alloca.in.h: Update.
1863 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1864 * gnulib/import/arg-nonnull.h: ... this.
1865 * gnulib/import/assure.h: Update.
1866 * gnulib/import/at-func.c: Update.
1867 * gnulib/import/basename-lgpl.c: Update.
1868 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1869 * gnulib/import/c++defs.h: ... this.
1870 * gnulib/import/canonicalize-lgpl.c: Update.
1871 * gnulib/import/cdefs.h: Update.
1872 * gnulib/import/chdir-long.c: Update.
1873 * gnulib/import/chdir-long.h: Update.
1874 * gnulib/import/cloexec.c: Update.
1875 * gnulib/import/cloexec.h: Update.
1876 * gnulib/import/close.c: Update.
1877 * gnulib/import/closedir.c: Update.
1878 * gnulib/import/config.charset: Update.
1879 * gnulib/import/dirent-private.h: Update.
1880 * gnulib/import/dirent.in.h: Update.
1881 * gnulib/import/dirfd.c: Update.
1882 * gnulib/import/dirname-lgpl.c: Update.
1883 * gnulib/import/dirname.h: Update.
1884 * gnulib/import/dosname.h: Update.
1885 * gnulib/import/dup-safer-flag.c: Update.
1886 * gnulib/import/dup-safer.c: Update.
1887 * gnulib/import/dup.c: Update.
1888 * gnulib/import/dup2.c: Update.
1889 * gnulib/import/errno.in.h: Update.
1890 * gnulib/import/error.c: Update.
1891 * gnulib/import/error.h: Update.
1892 * gnulib/import/exitfail.c: Update.
1893 * gnulib/import/exitfail.h: Update.
1894 * gnulib/import/extra/update-copyright: Update.
1895 * gnulib/import/fchdir.c: Update.
1896 * gnulib/import/fcntl.c: Update.
1897 * gnulib/import/fcntl.in.h: Update.
1898 * gnulib/import/fd-hook.c: Update.
1899 * gnulib/import/fd-hook.h: Update.
1900 * gnulib/import/fd-safer-flag.c: Update.
1901 * gnulib/import/fd-safer.c: Update.
1902 * gnulib/import/fdopendir.c: Update.
1903 * gnulib/import/filename.h: Update.
1904 * gnulib/import/filenamecat-lgpl.c: Update.
1905 * gnulib/import/filenamecat.h: Update.
1906 * gnulib/import/flexmember.h: Update.
1907 * gnulib/import/float+.h: Update.
1908 * gnulib/import/float.c: Update.
1909 * gnulib/import/float.in.h: Update.
1910 * gnulib/import/fnmatch.c: Update.
1911 * gnulib/import/fnmatch.in.h: Update.
1912 * gnulib/import/fnmatch_loop.c: Update.
1913 * gnulib/import/fpucw.h: Update.
1914 * gnulib/import/frexp.c: Update.
1915 * gnulib/import/frexpl.c: Update.
1916 * gnulib/import/fstat.c: Update.
1917 * gnulib/import/fstatat.c: Update.
1918 * gnulib/import/getcwd-lgpl.c: Update.
1919 * gnulib/import/getcwd.c: Update.
1920 * gnulib/import/getdtablesize.c: Update.
1921 * gnulib/import/getlogin_r.c: Update.
1922 * gnulib/import/getprogname.c: Update.
1923 * gnulib/import/getprogname.h: Update.
1924 * gnulib/import/gettext.h: Update.
1925 * gnulib/import/gettimeofday.c: Update.
1926 * gnulib/import/glob-libc.h: Update.
1927 * gnulib/import/glob.c: Update.
1928 * gnulib/import/glob.in.h: Update.
1929 * gnulib/import/glob_internal.h: Update.
1930 * gnulib/import/glob_pattern_p.c: Update.
1931 * gnulib/import/globfree.c: Update.
1932 * gnulib/import/hard-locale.c: Update.
1933 * gnulib/import/hard-locale.h: Update.
1934 * gnulib/import/intprops.h: Update.
1935 * gnulib/import/inttypes.in.h: Update.
1936 * gnulib/import/isnan.c: Update.
1937 * gnulib/import/isnand-nolibm.h: Update.
1938 * gnulib/import/isnand.c: Update.
1939 * gnulib/import/isnanl-nolibm.h: Update.
1940 * gnulib/import/isnanl.c: Update.
1941 * gnulib/import/itold.c: Update.
1942 * gnulib/import/libc-config.h: Update.
1943 * gnulib/import/limits.in.h: Update.
1944 * gnulib/import/localcharset.c: Update.
1945 * gnulib/import/localcharset.h: Update.
1946 * gnulib/import/localtime-buffer.c: Update.
1947 * gnulib/import/localtime-buffer.h: Update.
1948 * gnulib/import/lstat.c: Update.
1949 * gnulib/import/m4/00gnulib.m4: Update.
1950 * gnulib/import/m4/__inline.m4: Update.
1951 * gnulib/import/m4/absolute-header.m4: Update.
1952 * gnulib/import/m4/alloca.m4: Update.
1953 * gnulib/import/m4/builtin-expect.m4: Update.
1954 * gnulib/import/m4/canonicalize.m4: Update.
1955 * gnulib/import/m4/chdir-long.m4: Update.
1956 * gnulib/import/m4/close.m4: Update.
1957 * gnulib/import/m4/closedir.m4: Update.
1958 * gnulib/import/m4/configmake.m4: Update.
1959 * gnulib/import/m4/d-ino.m4: Update.
1960 * gnulib/import/m4/d-type.m4: Update.
1961 * gnulib/import/m4/dirent_h.m4: Update.
1962 * gnulib/import/m4/dirfd.m4: Update.
1963 * gnulib/import/m4/dirname.m4: Update.
1964 * gnulib/import/m4/double-slash-root.m4: Update.
1965 * gnulib/import/m4/dup.m4: Update.
1966 * gnulib/import/m4/dup2.m4: Update.
1967 * gnulib/import/m4/eealloc.m4: Update.
1968 * gnulib/import/m4/environ.m4: Update.
1969 * gnulib/import/m4/errno_h.m4: Update.
1970 * gnulib/import/m4/error.m4: Update.
1971 * gnulib/import/m4/exponentd.m4: Update.
1972 * gnulib/import/m4/exponentl.m4: Update.
1973 * gnulib/import/m4/extensions.m4: Update.
1974 * gnulib/import/m4/extern-inline.m4: Update.
1975 * gnulib/import/m4/fchdir.m4: Update.
1976 * gnulib/import/m4/fcntl-o.m4: Update.
1977 * gnulib/import/m4/fcntl.m4: Update.
1978 * gnulib/import/m4/fcntl_h.m4: Update.
1979 * gnulib/import/m4/fdopendir.m4: Update.
1980 * gnulib/import/m4/filenamecat.m4: Update.
1981 * gnulib/import/m4/flexmember.m4: Update.
1982 * gnulib/import/m4/float_h.m4: Update.
1983 * gnulib/import/m4/fnmatch.m4: Update.
1984 * gnulib/import/m4/fnmatch_h.m4: Update.
1985 * gnulib/import/m4/fpieee.m4: Update.
1986 * gnulib/import/m4/frexp.m4: Update.
1987 * gnulib/import/m4/frexpl.m4: Update.
1988 * gnulib/import/m4/fstat.m4: Update.
1989 * gnulib/import/m4/fstatat.m4: Update.
1990 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1991 * gnulib/import/m4/getcwd-path-max.m4: Update.
1992 * gnulib/import/m4/getcwd.m4: Update.
1993 * gnulib/import/m4/getdtablesize.m4: Update.
1994 * gnulib/import/m4/getlogin.m4: Update.
1995 * gnulib/import/m4/getlogin_r.m4: Update.
1996 * gnulib/import/m4/getpagesize.m4: Update.
1997 * gnulib/import/m4/getprogname.m4: Update.
1998 * gnulib/import/m4/gettimeofday.m4: Update.
1999 * gnulib/import/m4/glibc21.m4: Update.
2000 * gnulib/import/m4/glob.m4: Update.
2001 * gnulib/import/m4/glob_h.m4: Update.
2002 * gnulib/import/m4/gnulib-cache.m4: Update.
2003 * gnulib/import/m4/gnulib-common.m4: Update.
2004 * gnulib/import/m4/gnulib-comp.m4: Update.
2005 * gnulib/import/m4/gnulib-tool.m4: Update.
2006 * gnulib/import/m4/hard-locale.m4: Update.
2007 * gnulib/import/m4/include_next.m4: Update.
2008 * gnulib/import/m4/inttypes-pri.m4: Update.
2009 * gnulib/import/m4/inttypes.m4: Update.
2010 * gnulib/import/m4/isnand.m4: Update.
2011 * gnulib/import/m4/isnanl.m4: Update.
2012 * gnulib/import/m4/largefile.m4: Update.
2013 * gnulib/import/m4/limits-h.m4: Update.
2014 * gnulib/import/m4/localcharset.m4: Update.
2015 * gnulib/import/m4/locale-fr.m4: Update.
2016 * gnulib/import/m4/locale-ja.m4: Update.
2017 * gnulib/import/m4/locale-zh.m4: Update.
2018 * gnulib/import/m4/localtime-buffer.m4: Update.
2019 * gnulib/import/m4/longlong.m4: Update.
2020 * gnulib/import/m4/lstat.m4: Update.
2021 * gnulib/import/m4/malloc.m4: Update.
2022 * gnulib/import/m4/malloca.m4: Update.
2023 * gnulib/import/m4/math_h.m4: Update.
2024 * gnulib/import/m4/mbrtowc.m4: Update.
2025 * gnulib/import/m4/mbsinit.m4: Update.
2026 * gnulib/import/m4/mbsrtowcs.m4: Update.
2027 * gnulib/import/m4/mbstate_t.m4: Update.
2028 * gnulib/import/m4/memchr.m4: Update.
2029 * gnulib/import/m4/memmem.m4: Update.
2030 * gnulib/import/m4/mempcpy.m4: Update.
2031 * gnulib/import/m4/memrchr.m4: Update.
2032 * gnulib/import/m4/mkdir.m4: Update.
2033 * gnulib/import/m4/mkstemp.m4: Update.
2034 * gnulib/import/m4/mmap-anon.m4: Update.
2035 * gnulib/import/m4/mode_t.m4: Update.
2036 * gnulib/import/m4/msvc-inval.m4: Update.
2037 * gnulib/import/m4/msvc-nothrow.m4: Update.
2038 * gnulib/import/m4/multiarch.m4: Update.
2039 * gnulib/import/m4/nocrash.m4: Update.
2040 * gnulib/import/m4/off_t.m4: Update.
2041 * gnulib/import/m4/onceonly.m4: Update.
2042 * gnulib/import/m4/open-cloexec.m4: Update.
2043 * gnulib/import/m4/open.m4: Update.
2044 * gnulib/import/m4/openat.m4: Update.
2045 * gnulib/import/m4/opendir.m4: Update.
2046 * gnulib/import/m4/pathmax.m4: Update.
2047 * gnulib/import/m4/rawmemchr.m4: Update.
2048 * gnulib/import/m4/readdir.m4: Update.
2049 * gnulib/import/m4/readlink.m4: Update.
2050 * gnulib/import/m4/realloc.m4: Update.
2051 * gnulib/import/m4/rename.m4: Update.
2052 * gnulib/import/m4/rewinddir.m4: Update.
2053 * gnulib/import/m4/rmdir.m4: Update.
2054 * gnulib/import/m4/save-cwd.m4: Update.
2055 * gnulib/import/m4/secure_getenv.m4: Update.
2056 * gnulib/import/m4/setenv.m4: Update.
2057 * gnulib/import/m4/signal_h.m4: Update.
2058 * gnulib/import/m4/ssize_t.m4: Update.
2059 * gnulib/import/m4/stat-time.m4: Update.
2060 * gnulib/import/m4/stat.m4: Update.
2061 * gnulib/import/m4/std-gnu11.m4: Update.
2062 * gnulib/import/m4/stdbool.m4: Update.
2063 * gnulib/import/m4/stddef_h.m4: Update.
2064 * gnulib/import/m4/stdint.m4: Update.
2065 * gnulib/import/m4/stdio_h.m4: Update.
2066 * gnulib/import/m4/stdlib_h.m4: Update.
2067 * gnulib/import/m4/strchrnul.m4: Update.
2068 * gnulib/import/m4/strdup.m4: Update.
2069 * gnulib/import/m4/strerror.m4: Update.
2070 * gnulib/import/m4/string_h.m4: Update.
2071 * gnulib/import/m4/strstr.m4: Update.
2072 * gnulib/import/m4/strtok_r.m4: Update.
2073 * gnulib/import/m4/sys_socket_h.m4: Update.
2074 * gnulib/import/m4/sys_stat_h.m4: Update.
2075 * gnulib/import/m4/sys_time_h.m4: Update.
2076 * gnulib/import/m4/sys_types_h.m4: Update.
2077 * gnulib/import/m4/tempname.m4: Update.
2078 * gnulib/import/m4/time_h.m4: Update.
2079 * gnulib/import/m4/unistd-safer.m4: Update.
2080 * gnulib/import/m4/unistd_h.m4: Update.
2081 * gnulib/import/m4/warn-on-use.m4: Update.
2082 * gnulib/import/m4/wchar_h.m4: Update.
2083 * gnulib/import/m4/wchar_t.m4: Update.
2084 * gnulib/import/m4/wctype_h.m4: Update.
2085 * gnulib/import/m4/wint_t.m4: Update.
2086 * gnulib/import/malloc.c: Update.
2087 * gnulib/import/malloc/scratch_buffer.h: Update.
2088 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2089 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2090 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2091 * gnulib/import/malloca.c: Update.
2092 * gnulib/import/malloca.h: Update.
2093 * gnulib/import/malloca.valgrind: Update.
2094 * gnulib/import/math.in.h: Update.
2095 * gnulib/import/mbrtowc.c: Update.
2096 * gnulib/import/mbsinit.c: Update.
2097 * gnulib/import/mbsrtowcs-impl.h: Update.
2098 * gnulib/import/mbsrtowcs-state.c: Update.
2099 * gnulib/import/mbsrtowcs.c: Update.
2100 * gnulib/import/memchr.c: Update.
2101 * gnulib/import/memmem.c: Update.
2102 * gnulib/import/mempcpy.c: Update.
2103 * gnulib/import/memrchr.c: Update.
2104 * gnulib/import/mkdir.c: Update.
2105 * gnulib/import/mkstemp.c: Update.
2106 * gnulib/import/msvc-inval.c: Update.
2107 * gnulib/import/msvc-inval.h: Update.
2108 * gnulib/import/msvc-nothrow.c: Update.
2109 * gnulib/import/msvc-nothrow.h: Update.
2110 * gnulib/import/open.c: Update.
2111 * gnulib/import/openat-die.c: Update.
2112 * gnulib/import/openat-priv.h: Update.
2113 * gnulib/import/openat-proc.c: Update.
2114 * gnulib/import/openat.c: Update.
2115 * gnulib/import/openat.h: Update.
2116 * gnulib/import/opendir.c: Update.
2117 * gnulib/import/pathmax.h: Update.
2118 * gnulib/import/pipe-safer.c: Update.
2119 * gnulib/import/rawmemchr.c: Update.
2120 * gnulib/import/readdir.c: Update.
2121 * gnulib/import/readlink.c: Update.
2122 * gnulib/import/realloc.c: Update.
2123 * gnulib/import/ref-add.sin: Update.
2124 * gnulib/import/ref-del.sin: Update.
2125 * gnulib/import/rename.c: Update.
2126 * gnulib/import/rewinddir.c: Update.
2127 * gnulib/import/rmdir.c: Update.
2128 * gnulib/import/same-inode.h: Update.
2129 * gnulib/import/save-cwd.c: Update.
2130 * gnulib/import/save-cwd.h: Update.
2131 * gnulib/import/scratch_buffer.h: Update.
2132 * gnulib/import/secure_getenv.c: Update.
2133 * gnulib/import/setenv.c: Update.
2134 * gnulib/import/signal.in.h: Update.
2135 * gnulib/import/stat-time.c: Update.
2136 * gnulib/import/stat-time.h: Update.
2137 * gnulib/import/stat-w32.c: Update.
2138 * gnulib/import/stat-w32.h: Update.
2139 * gnulib/import/stat.c: Update.
2140 * gnulib/import/stdbool.in.h: Update.
2141 * gnulib/import/stddef.in.h: Update.
2142 * gnulib/import/stdint.in.h: Update.
2143 * gnulib/import/stdio.in.h: Update.
2144 * gnulib/import/stdlib.in.h: Update.
2145 * gnulib/import/str-two-way.h: Update.
2146 * gnulib/import/strchrnul.c: Update.
2147 * gnulib/import/strdup.c: Update.
2148 * gnulib/import/streq.h: Update.
2149 * gnulib/import/strerror-override.c: Update.
2150 * gnulib/import/strerror-override.h: Update.
2151 * gnulib/import/strerror.c: Update.
2152 * gnulib/import/string.in.h: Update.
2153 * gnulib/import/stripslash.c: Update.
2154 * gnulib/import/strnlen1.c: Update.
2155 * gnulib/import/strnlen1.h: Update.
2156 * gnulib/import/strstr.c: Update.
2157 * gnulib/import/strtok_r.c: Update.
2158 * gnulib/import/sys_stat.in.h: Update.
2159 * gnulib/import/sys_time.in.h: Update.
2160 * gnulib/import/sys_types.in.h: Update.
2161 * gnulib/import/tempname.c: Update.
2162 * gnulib/import/tempname.h: Update.
2163 * gnulib/import/time.in.h: Update.
2164 * gnulib/import/unistd--.h: Update.
2165 * gnulib/import/unistd-safer.h: Update.
2166 * gnulib/import/unistd.in.h: Update.
2167 * gnulib/import/unsetenv.c: Update.
2168 * gnulib/import/verify.h: Update.
2169 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2170 * gnulib/import/wchar.in.h: Update.
2171 * gnulib/import/wctype.in.h: Update.
2172 * gnulib/import/xalloc-oversized.h: Update.
2173 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2174 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2175
2176 2018-08-16 Gary Benson <gbenson@redhat.com>
2177
2178 PR gdb/13000:
2179 * gdb/main.c (captured_main_1): Exit with nonzero status
2180 in batch mode if the last command to be executed failed.
2181 * NEWS: Mention the above.
2182
2183 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2184
2185 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2186 end of warning message.
2187
2188 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2189
2190 PR gdb/22943:
2191 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2192 (aarch64_extract_return_value): Use
2193 aapcs_is_vfp_call_or_return_candidate.
2194 (aarch64_return_in_memory): Likewise.
2195 (aarch64_store_return_value): Likewise.
2196
2197 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2198
2199 * aarch64-tdep.c
2200 (aapcs_is_vfp_call_or_return_candidate): Make static
2201 (pass_in_v_or_stack): Remove function.
2202 (pass_in_v_vfp_candidate): New function.
2203 (aarch64_push_dummy_call): Check for float register candidates.
2204
2205 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2206
2207 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2208 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2209 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2210
2211 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2212
2213 PR build/23399
2214 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2215 (struct ipa_sym_addresses): Rename to...
2216 (struct ipa_sym_addresses_common): ... this.
2217 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2218
2219 2018-08-28 Tom Tromey <tom@tromey.com>
2220
2221 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2222 (token_fifo): Now a std::vector.
2223 (yylex, c_parse): Update.
2224 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2225 (token_fifo): Now a std::vector.
2226 (yylex, d_parse): Update.
2227 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2228 (token_fifo): Now a std::vector.
2229 (yylex, go_parse): Update.
2230
2231 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2232
2233 * parser-defs.h (struct type_stack) <elements>: Change type to
2234 std::vector<union type_stack_elt>.
2235 <depth, size>: Remove.
2236 * parse.c (parse_exp_in_context_1): Adjust.
2237 (type_stack_reserve): Remove.
2238 (check_type_stack_depth): Remove.
2239 (insert_into_type_stack): Adjust to std::vector.
2240 (insert_type): Likewise.
2241 (push_type): Likewise.
2242 (push_type_int): Likewise.
2243 (insert_type_address_space): Likewise.
2244 (pop_type): Likewise.
2245 (pop_type_int): Likewise.
2246 (pop_typelist): Likewise.
2247 (pop_type_stack): Likewise.
2248 (append_type_stack): Likewise.
2249 (push_type_stack): Likewise.
2250 (get_type_stack): Likewise.
2251 (type_stack_cleanup): Likewise.
2252 (push_typelist): Likewise.
2253 (follow_types): Likewise.
2254 (_initialize_parse): Likewise.
2255
2256 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2257
2258 * NEWS: Mention csky target.
2259
2260 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2261 Hafiz Abid Qadeer <abidh@codesourcery.com>
2262 Don Breazeal <donb@codesourcery.com>
2263
2264 * csky-linux-tdep.c: New file.
2265 * csky-tdep.c: Likewise.
2266 * csky-tdep.h: Likewise.
2267 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2268 csky-tdep.o.
2269 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2270 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2271 * configure.tgt: Add csky support.
2272
2273 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2274
2275 * python/py-framefilter.c (py_print_frame): Print frame architecture
2276 when printing on an MI output.
2277
2278 2018-08-27 Tom Tromey <tom@tromey.com>
2279
2280 PR build/23087:
2281 * configure: Rebuild.
2282 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2283
2284 2018-08-27 Tom Tromey <tom@tromey.com>
2285
2286 * aarch64-linux-tdep.c
2287 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2288 casts to int.
2289
2290 2018-08-27 Tom Tromey <tom@tromey.com>
2291
2292 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2293 unsigned.
2294 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2295 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2296 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2297 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2298 unsigned.
2299
2300 2018-08-27 Tom Tromey <tom@tromey.com>
2301
2302 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2303 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2304
2305 2018-08-27 Tom Tromey <tom@tromey.com>
2306
2307 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2308 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2309 ULONGEST_MAX.
2310 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2311 ULONGEST_MAX.
2312 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2313 ULONGEST_MAX.
2314 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2315 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2316 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2317 ULONGEST_MAX.
2318 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2319 (ppc64_linux_sigaction_tramp_frame)
2320 (ppc32_linux_sighandler_tramp_frame)
2321 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2322 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2323 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2324 * mn10300-linux-tdep.c (am33_linux_sigframe)
2325 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2326 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2327 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2328 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2329 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2330 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2331 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2332 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2333 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2334 * microblaze-linux-tdep.c
2335 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2336 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2337 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2338 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2339 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2340 * common/common-types.h (ULONGEST_MAX): New define.
2341 (CORE_ADDR_MAX): Fix formatting.
2342 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2343 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2344 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2345 (arm_linux_rt_sigreturn_tramp_frame)
2346 (arm_eabi_linux_sigreturn_tramp_frame)
2347 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2348 (thumb2_eabi_linux_sigreturn_tramp_frame)
2349 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2350 (arm_linux_restart_syscall_tramp_frame)
2351 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2352 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2353 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2354 ULONGEST_MAX.
2355 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2356
2357 2018-08-27 Tom Tromey <tom@tromey.com>
2358
2359 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2360 CORE_ADDR_MAX.
2361 * mips-tdep.c (mips_deal_with_atomic_sequence)
2362 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2363 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2364 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2365 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2366 CORE_ADDR_MAX.
2367 * aarch64-tdep.c (aarch64_software_single_step): Use
2368 CORE_ADDR_MAX.
2369
2370 2018-08-27 Tom Tromey <tom@tromey.com>
2371
2372 * linespec.c (complete_linespec_component): Add cast to "char".
2373 * completer.c (completion_tracker::build_completion_result): Add
2374 cast to "char".
2375
2376 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2377
2378 * solist.h (struct solist, struct target_so_ops): Fix
2379 indentation.
2380
2381 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2382
2383 * ada-tasks.c (ada_task_info_s): Remove typedef.
2384 (DEF_VEC_O(ada_task_info_s)): Remove.
2385 (struct ada_tasks_inferior_data): Initialize fields.
2386 <task_list>: Make an std::vector.
2387 (get_ada_tasks_inferior_data): Allocate with new.
2388 (ada_get_task_number): Adjust.
2389 (get_task_number_from_id): Likewise.
2390 (valid_task_id): Likewise.
2391 (ada_get_task_info_from_ptid): Likewise.
2392 (iterate_over_live_ada_tasks): Likewise.
2393 (add_ada_task): Likewise.
2394 (read_known_tasks): Likewise.
2395 (ada_build_task_list): Likewise.
2396 (print_ada_task_info): Likewise.
2397 (info_task): Likewise.
2398 (task_command_1): Likewise.
2399
2400 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2401
2402 * ada-lang.c (add_angle_brackets): Return std::string.
2403
2404 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2405
2406 * python/py-threadevent.c (py_get_event_thread): Initialize
2407 pythread.
2408
2409 2018-08-24 Pedro Alves <palves@redhat.com>
2410
2411 * python/py-bpevent.c (create_breakpoint_event_object): Use
2412 copy-initialization.
2413 * python/py-continueevent.c (emit_continue_event): Use
2414 copy-initialization.
2415 * python/py-exitedevent.c (create_exited_event_object): Return a
2416 gdbpy_ref<>.
2417 (emit_exited_event): Use copy-initialization.
2418 * python/py-inferior.c (python_new_inferior)
2419 (python_inferior_deleted, add_thread_object): Use
2420 copy-initialization.
2421 * python/py-infevents.c (create_inferior_call_event_object)
2422 (create_register_changed_event_object)
2423 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2424 (emit_inferior_call_event, emit_memory_changed_event)
2425 (emit_register_changed_event): Use copy-initialization.
2426 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2427 Return a gdbpy_ref<>.
2428 (emit_new_objfile_event): Use copy-initialization.
2429 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2430 (emit_clear_objfiles_event): Use copy-initialization.
2431 * python/py-signalevent.c (create_signal_event_object): Use
2432 copy-initialization.
2433 * python/py-threadevent.c (create_thread_event_object): Use
2434 copy-initialization.
2435
2436 2018-08-24 Pedro Alves <palves@redhat.com>
2437 Simon Marchi <simon.marchi@ericsson.com>
2438
2439 PR gdb/23379
2440 * python/py-continueevent.c: Include "gdbthread.h".
2441 (create_continue_event_object): Add intro comment. Add 'ptid'
2442 parameter. Use it to find thread to pass to
2443 create_thread_event_object.
2444 (emit_continue_event): Pass PTID down to
2445 create_continue_event_object.
2446 * python/py-event.h (py_get_event_thread): Declare.
2447 (create_thread_event_object): Remove default from 'thread'
2448 parameter.
2449 * python/py-stopevent.c (create_stop_event_object): Use
2450 py_get_event_thread.
2451 * python/py-threadevent.c (get_event_thread): Rename to ...
2452 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2453 and use it to find the thread.
2454 (create_thread_event_object): Assert that THREAD isn't null.
2455 Don't find the event thread here.
2456
2457 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2458
2459 * block.h (blockrange, blockranges): New struct declarations.
2460 (struct block): Add new field named `ranges'.
2461 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2462 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2463 macros for accessing ranges in struct block.
2464 (make_blockranges): New declaration.
2465 block.c (make_blockranges): New function.
2466 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2467 for block.
2468 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2469 * blockframe.c (cache_pc_function_block): New static global.
2470 (clear_pc_function_cache): Clear cache_pc_function_block.
2471 (find_pc_partial_function): Move comment to symtab.h. Add
2472 support for non-contiguous blocks.
2473 * cli/cli-cmds.c (block.h): Include.
2474 (print_disassembly): Handle printing of non-contiguous blocks.
2475 (disassemble_current_function): Likewise.
2476 (disassemble_command): Likewise.
2477
2478 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2479 BLOCK_START.
2480 * blockframe.c (get_pc_function_start): Likewise.
2481 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2482 (gcc_symbol_address): Likewise.
2483 * compile/compile-object-run.c (compile_object_run): Likewise.
2484 * compile/compile.c (get_expr_block_and_pc): Likewise.
2485 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2486 (func_addr_to_tail_call_list): Likewise.
2487 * findvar.c (default_read_var_value): Likewise.
2488 * inline-frame.c (inline_frame_this_id): Likewise.
2489 (skip-inline_frames): Likewise.
2490 * infcmd.c (until_next_command): Likewise.
2491 * linespec.c (convert_linespec_to_sals): Likewise.
2492 * parse.c (parse_exp_in_context_1): Likewise.
2493 * printcmd.c (build_address_symbolic): likewise.
2494 (info_address_command): Likewise.
2495 symtab.c (find_function_start_sal): Likewise.
2496 (skip_prologue_sal): Likewise.
2497 (find_function_alias_target): Likewise.
2498 (find_gnu_ifunc): Likewise.
2499 * stack.c (find_frame_funname): Likewise.
2500 * symtab.c (fixup_symbol_section): Likewise.
2501 (find_function_start_sal): Likewise.
2502 (skip_prologue_sal): Likewsie.
2503 (find_function_alias_target): Likewise.
2504 (find_gnu_ifunc): Likewise.
2505 * tracepoint.c (info_scope_command): Likewise.
2506 * value.c (value_fn_field): Likewise.
2507
2508 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2509 in place of find_pc_partial_function.
2510 * blockframe.c (find_function_entry_range_from_pc): New function.
2511 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2512 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2513 for each range in a block.
2514
2515
2516 2018-08-23 Xavier Roirand <roirand@adacore.com>
2517
2518 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2519 incrementation.
2520
2521 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2522
2523 * solib-svr4.c (read_program_headers_from_bfd): Return
2524 gdb::optional<gdb::byte_vector>.
2525 (svr4_exec_displacement): Adjust.
2526
2527 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2528
2529 * solib-svr4.c (read_program_header): Return
2530 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2531 (find_program_interpreter): Return
2532 gdb::optional<gdb::byte_vector>.
2533 (scan_dyntag_auxv): Adjust.
2534 (enable_break): Adjust.
2535 (svr4_exec_displacement): Adjust.
2536
2537 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2538
2539 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2540 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2541
2542 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2543
2544 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2545 string_vprintf.
2546 * guile/scm-utils.c (gdbscm_printf): Likewise.
2547 * serial.c (serial_printf): Likewise.
2548 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2549
2550 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2551
2552 * stack.c (print_frame): Print frame architecture when printing on
2553 an MI output.
2554 * NEWS: Mention new "arch" attribute in frame output.
2555
2556 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2557
2558 * arch/aarch64.h (aarch64_regnum): Update comment.
2559
2560 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2561
2562 * NEWS: Add SVE to 8.2 section.
2563
2564 2018-08-21 Pedro Alves <palves@redhat.com>
2565
2566 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2567 out from gdbscm_parse_function_args.
2568 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2569 gdbscm_parse_function_args_1.
2570
2571 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2572
2573 PR gdb/17816
2574 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2575 operator.
2576
2577 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2578
2579 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2580
2581 2018-08-19 Michael Spang <spang@google.com>
2582
2583 PR gdb/11786
2584 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2585 for PT_TLS segments.
2586
2587 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2588
2589 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2590 dwarf_variable_value.
2591 * dwarf2-frame.c (class dwarf_expr_executor):
2592 Add override for dwarf_variable_value.
2593 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2594 (class symbol_needs_eval_context): Likewise.
2595 (indirect_synthetic_pointer): Add forward declaration.
2596 (sect_variable_value): New function.
2597 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2598 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2599 for DW_OP_GNU_variable_value.
2600
2601 2018-08-16 Tom Tromey <tom@tromey.com>
2602
2603 * top.c (read_command_file): Update.
2604 (command_line_input): Remove "repeat" argument.
2605 * ada-lang.c (get_selections): Update.
2606 * linespec.c (decode_line_2): Update.
2607 * defs.h (command_line_input): Remove argument.
2608 * cli/cli-script.c (read_next_line): Update.
2609 * python/py-gdb-readline.c: Update.
2610
2611 2018-08-17 Tom Tromey <tom@tromey.com>
2612
2613 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2614 command_line_input.
2615
2616 2018-08-15 Tom Tromey <tom@tromey.com>
2617
2618 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2619
2620 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2621
2622 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2623 If used, use find_pc_partial_function to find address range
2624 to disassemble.
2625 * mi/mi-main.c (mi_cmd_list_features): Report
2626 "data-disassemble-a-option" feature.
2627 * NEWS: Mention new -data-disassemble option -a.
2628
2629 2018-08-13 Tom Tromey <tom@tromey.com>
2630
2631 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2632
2633 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2634
2635 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2636 (aarch64_linux_collect_sve_regset): Likewise.
2637 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2638 * regcache.h (regcache_map_entry_size): New function.
2639
2640 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2641
2642 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2643 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2644 (SVE_HEADER_VL_LENGTH): Likewise.
2645 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2646 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2647 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2648 (SVE_HEADER_SIZE_OFFSET): Likewise.
2649 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2650 (SVE_HEADER_VL_OFFSET): Likewise.
2651 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2652 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2653 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2654 (SVE_HEADER_SIZE): Likewise.
2655 (aarch64_linux_core_read_vq): Add function.
2656 (aarch64_linux_core_read_description): Check for SVE section.
2657
2658 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2659
2660 * aarch64-fbsd-tdep.c
2661 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2662 collect_size.
2663 * aarch64-linux-tdep.c
2664 (aarch64_linux_iterate_over_regset_sections): Likewise.
2665 * alpha-linux-tdep.c
2666 (alpha_linux_iterate_over_regset_sections):
2667 * alpha-nbsd-tdep.c
2668 (alphanbsd_iterate_over_regset_sections): Likewise.
2669 * amd64-fbsd-tdep.c
2670 (amd64fbsd_iterate_over_regset_sections): Likewise.
2671 * amd64-linux-tdep.c
2672 (amd64_linux_iterate_over_regset_sections): Likewise.
2673 * arm-bsd-tdep.c
2674 (armbsd_iterate_over_regset_sections): Likewise.
2675 * arm-fbsd-tdep.c
2676 (arm_fbsd_iterate_over_regset_sections): Likewise.
2677 * arm-linux-tdep.c
2678 (arm_linux_iterate_over_regset_sections): Likewise.
2679 * corelow.c (get_core_registers_cb): Likewise.
2680 (core_target::fetch_registers): Likewise.
2681 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2682 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2683 * gdbarch.h (void): Regenerate.
2684 * gdbarch.sh: Add supply_size and collect_size.
2685 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2686 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2687 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2688 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2689 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2690 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2691 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2692 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2693 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2694 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2695 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2696 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2697 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2698 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2699 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2700 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2701 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2702 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2703 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2704 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2705 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2706 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2707 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2708 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2709 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2710 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2711 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2712 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2713 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2714 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2715
2716 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2717
2718 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2719 with string_printf.
2720
2721 2018-08-10 Keith Seitz <keiths@redhat.com>
2722
2723 * compile/compile-c-support.c (add_code_header, add_code_footer):
2724 Move into policy class.
2725 (c_push_user_expression, pop_user_expression_nop)
2726 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2727 (compile_program): New host class.
2728 (c_compile_program): New typedef.
2729 (c_compute_porgram): Use c_compile_program.
2730
2731 2018-08-10 Keith Seitz <keiths@redhat.com>
2732
2733 * compile/compile-internal.h (compile_instance::~compile_instance):
2734 Remove calls to htab_delete.
2735 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2736 * compile.c (compile_instance::compile_instance): Initialize
2737 htab unique pointers.
2738 (compile_instance::get_cached_type, compile_instance::insert_type)
2739 (compile_instance::error_symbol_once): Update for unique_ptr.
2740
2741 2018-08-10 Keith Seitz <keiths@redhat.com>
2742
2743 * compile/compile-c-symbols.c (struct symbol_error)
2744 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2745 (compile_instance::insert_symbol_error)
2746 (compile_instance::error_symbol_once): Move to ...
2747 * compile/compile.c: ... here.
2748
2749 2018-08-10 Keith Seitz <keiths@redhat.com>
2750
2751 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2752 instead of `new_compile_instance'.
2753 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2754 Update description.
2755 If the symbol error map is not initialized, create it.
2756 (generate_c_for_for_one_symbol): Do not check/initialize
2757 the symbol error map.
2758 * compile/compile-c-types.c (compile_c_instance): Make a class.
2759 Update all callers.
2760 (compile_instance::compile_instance): Initialize the type cache.
2761 (get_cached_type): New function.
2762 (insert_type): Update description.
2763 (compile_c_instance::m_default_cflags): Define.
2764 (convert_type): Update description. Use get_cached_type.
2765 (delete_instance): Moved to destructor.
2766 (new_compile_instance): Moved to constructor.
2767 * compile/compile-c.h (compile_c_instance): Make class inheriting
2768 from compile_instance.
2769 <base>: Remove field.
2770 <type_map, symbol_err_map>: Move to base class.
2771 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2772 * compile/compile-internal.h (compile_instance): Make class.
2773 <type_map_t, symbol_err_map_t>: Define.
2774 <fe>: Rename to `m_gcc_fe'.
2775 <scope, block, gcc_target_options>: Add `m_' prefix.
2776 <m_type_map, m_symbol_err_map>: New fields, moved from
2777 compile_c_instance.
2778 <destroy>: Remove.
2779 (convert_type, new_compile_instance): Remove.
2780 * compile/compile.c (cleanup_compile_instance): Remove.
2781 (compile_to_object): Use unique_ptr to eliminate cleanups.
2782 (compile_instance::set_print_callback, compile_instance::version)
2783 (compile_instance::set_verbose)
2784 (compile_instance::set_driver_filename)
2785 (compile_instance::set_triplet_regexp)
2786 (compile_instance::set_arguments)
2787 (compile_instance::set_source_file)
2788 (compile_instance::compile): Define.
2789
2790 2018-08-10 Keith Seitz <keiths@redhat.com>
2791
2792 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2793 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2794 gcc-c-fe.def to define C plugin.
2795 (delete_instance): Delete `c_plugin'.
2796 (new_compile_instance): Initialize `c_plugin'.
2797 * compile/compile-c.h: Include gcc_c_plugin.h.
2798 (struct compile_c_instance) <c_plugin>: New member.
2799 * gcc-c-plugin.h: New file.
2800 Update all callers with API change.
2801
2802 2018-08-10 Keith Seitz <keiths@redhat.com>
2803
2804 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2805 (HFILES_NO_SRCDIR): ... to here.
2806 Add compile-internal.h and compile-c.h.
2807 * compile/compile-c-support.c: Include compile-c.h.
2808 * compile/compile-c-symbols.c: Include compile-c.h.
2809 (generate_c_for_variable_locations): Update comment.
2810 * compile/compile-c-types.c: Include compile-c.h.
2811 * compile/compile-c.h: New file -- moved C language declarations
2812 from other files here.
2813 * compile/compile-internal.h: Do not include hashtab.h or
2814 common/enum-flags.h.
2815 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2816 (gcc_convert_symbol, gcc_symbol_address)
2817 (generate_c_for_variable_locations, c_get_mode_for_size)
2818 (c_get_range_decl_name): Definitions moved to compile-c.h.
2819 * compile/compile-loc2c.c: Include compile-c.h.
2820
2821 2018-08-10 Keith Seitz <keiths@redhat.com>
2822
2823 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2824 (c_symbol_substitution_name): ... this.
2825 Update all callers.
2826
2827 2018-08-10 Keith Seitz <keiths@redhat.com>
2828
2829 * compile/compile-c-support.c (c_compute_program): Use
2830 unique_xmalloc_ptr to eliminate cleanup.
2831 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2832 Return a unique_xmalloc_ptr and eliminate cleanup.
2833 * compile/compile-internal.h (generate_c_for_variable_locations):
2834 Return unique_xmalloc_ptr and update description.
2835
2836 2018-08-10 Alan Hayward <alan.hayward@arm.com>
2837
2838 * corelow.c (core_target::get_core_register_section): Rename
2839 min_size to section_min_size.
2840
2841 2018-08-09 Jim Wilson <jimw@sifive.com>
2842
2843 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2844 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2845 * NEWS: Mention new GNU/Linux RISC-V target.
2846 * configure.host: Add riscv*-*-linux*.
2847 * configure.nat: Add riscv*.
2848 * configure.tgt: Add riscv*-*-linux*.
2849 * riscv-linux-nat.c: New file.
2850 * riscv-linux-tdep.c: New file.
2851
2852 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2853
2854 * infrun.c (resume): Make static, add forward declaration.
2855 (proceed): Update header comment.
2856 * infrun.h (resume): Delete declaration.
2857
2858 2018-08-09 Tom Tromey <tom@tromey.com>
2859
2860 * riscv-tdep.h: Minor formatting fixes.
2861
2862 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
2863
2864 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2865 * dwarf-index-cache.c (create_dir_and_check): Likewise.
2866 (test_mkdir_recursive): Likewise.
2867 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2868
2869 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
2870
2871 * valarith.c (value_subscripted_rvalue): If an array is not in
2872 memory, and we don't know the upper bound, then we can't know that
2873 the requested element exists or not.
2874
2875 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
2876
2877 * target.c (str_comma_list_concat_elem): Fix typo in comment.
2878 (target_options_to_string): Add comment.
2879
2880 2018-08-08 Tom Tromey <tom@tromey.com>
2881
2882 * unittests/scoped_mmap-selftests.c: Check result of "write".
2883
2884 2018-08-08 Jim Wilson <jimw@sifive.com>
2885
2886 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2887 (decode_register_index_short): New.
2888 (decode_j_type_insn, decode_cj_type_insn): New.
2889 (decode_b_type_insn, decode_cb_type_insn): New.
2890 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
2891 local xlen. Check xlen when decoding ambiguous compressed insns. In
2892 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2893 is_c_sw_insn instead of is_sw_insn.
2894 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2895 (riscv_software_single_step): New.
2896 * riscv-tdep.h (riscv_software_single_step): Declare.
2897
2898 * riscv-tdep.c (riscv_isa_xlen): Drop static.
2899 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2900
2901 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
2902
2903 PR gdb/18050:
2904 * target.c (dispose_inferior): Don't dispose of inferiors that are
2905 already killed.
2906
2907 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
2908
2909 * remote.c (remote_target::download_tracepoint): Change char* to
2910 const char*.
2911
2912 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
2913
2914 * target.h (target_options_to_string): Return an std::string.
2915 * target.c (str_comma_list_concat_elem): Return void, use
2916 std::string.
2917 (do_option): Likewise.
2918 (target_options_to_string): Return an std::string.
2919 * linux-nat.c (linux_nat_target::wait): Adjust.
2920 * target-debug.h (target_debug_print_options): Adjust.
2921
2922 2018-08-07 Tom Tromey <tom@tromey.com>
2923
2924 * Makefile.in (CPPFLAGS): New variable.
2925 (INTERNAL_CPPFLAGS): Use it.
2926
2927 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2928
2929 * NEWS: Mention the index cache.
2930
2931 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2932
2933 * common/pathstuff.h (get_standard_cache_dir): New.
2934 * common/pathstuff.c (get_standard_cache_dir): New.
2935 * build-id.h (build_id_to_string): New.
2936 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2937 DEBUG_STR_SUFFIX): Move to here.
2938 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2939 DEBUG_STR_SUFFIX): Move from there.
2940 (write_psymtabs_to_index): Make non-static, add basename
2941 parameter. Write to temporary files, rename when done.
2942 (save_gdb_index_command): Adjust call to
2943 write_psymtabs_to_index.
2944 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2945 field.
2946 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2947 (get_gdb_index_contents_from_cache): New.
2948 (get_gdb_index_contents_from_cache_dwz): New.
2949 (dwarf2_initialize_objfile): Read index from cache.
2950 (dwarf2_build_psymtabs): Save to index.
2951 * dwarf-index-cache.h: New file.
2952 * dwarf-index-cache.c: New file.
2953 * dwarf-index-write.h: New file.
2954
2955 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2956
2957 * gnulib/aclocal.m4: Re-generate.
2958 * gnulib/config.in: Re-generate.
2959 * gnulib/configure: Re-generate.
2960 * gnulib/import/Makefile.am: Re-generate.
2961 * gnulib/import/Makefile.in: Re-generate.
2962 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2963 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2964 * gnulib/import/m4/mkdir.m4: New file.
2965 * gnulib/import/mkdir.c: New file.
2966 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2967 module.
2968
2969 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2970
2971 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2972 * common/scoped_mmap.c: New file.
2973 * common/scoped_mmap.h (destroy): New method.
2974 (~scoped_mmap, reset): Use destroy.
2975 (scoped_mmap): New move constructor.
2976 (mmap_file): New declaration.
2977 * unittests/scoped_mmap-selftests.c (test_normal,
2978 test_invalid_filename, run_tests): New functions.
2979 (_initialize_scoped_mmap_selftests): Register selftest.
2980
2981 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2982
2983 * dwarf2read.c (read_gdb_index_from_section): Rename to...
2984 (read_gdb_index_from_buffer): ... this. Remove section
2985 parameter, add buffer parameter.
2986 (get_gdb_index_contents_ftype,
2987 get_gdb_index_contents_dwz_ftype): New typedefs.
2988 (dwarf2_read_gdb_index): Add callback parameters to get the
2989 index contents.
2990 (get_gdb_index_contents_from_section): New.
2991 (dwarf2_initialize_objfile): Update call to
2992 dwarf2_read_gdb_index.
2993
2994 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
2995
2996 * common/filestuff.h (gdb_fopen_cloexec): New overload.
2997 (gdb_open_cloexec): Likewise.
2998 * nat/linux-osdata.c (command_from_pid): Use string_printf.
2999 (commandline_from_pid): Likewise.
3000 (linux_xfer_osdata_threads): Likewise.
3001 (linux_xfer_osdata_fds): Likewise.
3002 * ada-lang.c (is_package_name): Likewise.
3003 * auxv.c (procfs_xfer_auxv): Likewise.
3004 * breakpoint.c (print_one_breakpoint_location): Use
3005 uiout::field_fmt.
3006 (print_one_catch_solib): Use string_printf.
3007 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3008 (add_pe_forwarded_sym): Likewise.
3009 * dwarf2read.c (create_type_unit_group): Likewise.
3010 (build_error_marker_type): Likewise.
3011 * infcall.c (get_function_name): Likewise.
3012 * valprint.c (print_converted_chars_to_obstack): Likewise.
3013 * xtensa-tdep.c (xtensa_register_type): Likewise.
3014
3015 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3016
3017 * remote.c (remote_target::download_tracepoint): Fix format
3018 string errors.
3019
3020 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3021
3022 * tracefile.c: Include common/byte-vector.h.
3023 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3024 with trace_regblock_size if needed. Update uses of buf.
3025
3026 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3027
3028 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3029 std::vector<unsigned char>.
3030 * tracepoint.c (collection_list::collection_list): Remove
3031 m_regs_mask initializer from initializer list. Resize
3032 m_regs_mask using the largest remote register number.
3033 (collection_list::add_remote_register): Remove size check on
3034 m_regs_mask. Use at to access element.
3035 (collection_list::stringify): Change type of temp_buf to
3036 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3037 stringify the register mask. Use pack_hex_byte for the register
3038 mask.
3039
3040 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3041
3042 * tracepoint.h (class collection_list) <add_register>: Remove.
3043 <add_remote_register, add_ax_registers, add_local_register>:
3044 Declare.
3045 <add_memrange>: Add scope parameter.
3046 * tracepoint.c (encode_actions_1): Likewise.
3047 (collection_list::add_register): Rename to ...
3048 (collection_list::add_remote_register): ... this. Update
3049 comment.
3050 (collection_list::add_ax_registers, add_local_register): New
3051 methods.
3052 (collection_list::add_memrange): Add scope parameter. Call
3053 add_local_register instead of add_register.
3054 (finalize_tracepoint_aexpr): New function.
3055 (collection_list::collect_symbol): Update calls to add_memrange.
3056 Call add_local_register instead of add_register. Call
3057 add_ax_registers. Call finalize_tracepoint_aexpr.
3058 (encode_actions_1): Get remote regnos for $reg action. Call
3059 add_remote_register, add_ax_registers, and add_local_register.
3060 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3061 (validate_actionline): Call finalize_tracepoint_aexpr.
3062
3063 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3064
3065 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3066 Replace array buf with gdb::char_vector buf, of size
3067 get_remote_packet_size (). Replace references to buf and
3068 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3069 and xsnprintf with snprintf. Raise errors if the buffer is too
3070 small.
3071
3072 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3073
3074 * remote.c (remote_target::download_tracepoint): Fix the has_more
3075 predicate in the QTDP action list iteration.
3076
3077 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3078
3079 * remote.c (remote_target::download_tracepoint): Fix indentation
3080 in for block.
3081
3082 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3083
3084 * proc-api.c (_initialize_proc_api): Remove c, unused.
3085 * procfs.c (procfs_init_inferior): Remove signals, unused.
3086 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3087 unused.
3088
3089 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3090 Andrew Burgess <andrew.burgess@embecosm.com>
3091
3092 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3093 'W_STOPCODE (0)' as this could be ambiguous.
3094
3095 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3096
3097 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3098 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3099 "ai_socktype").
3100
3101 2018-08-02 Tom Tromey <tom@tromey.com>
3102
3103 PR symtab/16842.
3104 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3105 symbols.
3106 (process_structure_scope): Likewise.
3107
3108 2018-08-02 Xavier Roirand <roirand@adacore.com>
3109
3110 PR gdb/22629:
3111 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3112 kill inferior.
3113
3114 2018-08-02 Tom Tromey <tom@tromey.com>
3115
3116 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3117 (darwin_suspend_inferior, darwin_resume_inferior)
3118 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3119 (darwin_check_new_threads): Check result of get_darwin_inferior.
3120
3121 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3122
3123 GDB 8.1.1 released.
3124
3125 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3126
3127 * varobj.c (varobj_get_path_expr_parent): Report an error if
3128 parent is a dynamic varobj.
3129
3130 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3131
3132 * gnulib/aclocal.m4: Re-generate.
3133 * gnulib/config.in: Re-generate.
3134 * gnulib/configure: Re-generate.
3135 * gnulib/import/Makefile.in: Re-generate.
3136 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3137 * gnulib/import/m4/onceonly.m4: Re-generate.
3138
3139 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3140
3141 * target-descriptions.c (struct xml_test_tdesc): New.
3142 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3143 (record_xml_tdesc): Update.
3144 (maintenance_check_xml_descriptions): Update.
3145 * target-descriptions.h (record_xml_tdesc): Update comment.
3146
3147 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3148
3149 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3150 checking array bounds are defined.
3151
3152 2018-07-30 Tom Tromey <tom@tromey.com>
3153
3154 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3155 irreflexivity violation.
3156
3157 2018-07-30 Tom Tromey <tom@tromey.com>
3158
3159 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3160 * value.c (unpack_long): Remove lint code.
3161 * valops.c (value_ind): Remove lint code.
3162 * valarith.c (value_x_binop, value_x_unop, value_equal)
3163 (value_pos): Remove lint code.
3164
3165 2018-07-28 Tom de Vries <tdevries@suse.de>
3166
3167 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3168 with undefined upper bound as <optimized out>.
3169
3170 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3171
3172 * gcore.in: Rename variable "name" to "prefix". Expand
3173 "usage" text.
3174
3175 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3176
3177 * windows-nat.c (windows_nat_target::create_inferior): Update to
3178 call close() in global namespace.
3179
3180 2018-07-26 Tom Tromey <tom@tromey.com>
3181
3182 * dwarf-index-write.c (add_address_entry): Don't add objfile
3183 offsets.
3184 * dbxread.c (find_stab_function): Rename from
3185 find_stab_function_addr. Return a bound_minimal_symbol.
3186 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3187 Don't add objfile offsets.
3188 (end_psymtab): Use raw_text_low, raw_text_high,
3189 MSYMBOL_VALUE_RAW_ADDRESS.
3190 (read_ofile_symtab): Update.
3191 (process_one_symbol): Update.
3192 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3193 offsets.
3194 (dw2_relocate): Remove.
3195 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3196 searching addrmap.
3197 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3198 Update.
3199 (process_psymtab_comp_unit_reader, add_partial_symbol)
3200 (add_partial_subprogram, dwarf2_ranges_read): Update.
3201 (load_partial_dies): Update.
3202 (add_address_entry): Don't add objfile offsets.
3203 (dwarf2_build_include_psymtabs): Update.
3204 (create_addrmap_from_aranges): Don't add objfile offsets.
3205 (dw2_find_pc_sect_compunit_symtab): Update.
3206 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3207 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3208 Update.
3209 (parse_partial_symbols): Don't add objfile offsets. Use
3210 raw_text_low, raw_text_high. Update.
3211 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3212 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3213 or call 'relocate' quick function. Clear psymbol_map.
3214 * psympriv.h (struct partial_symbol) <address>: Add section
3215 offset.
3216 <set_unrelocated_address>: Rename from set_address.
3217 <raw_text_low, raw_text_high>: New methods.
3218 <text_low, text_high>: Add objfile parameter.
3219 (add_psymbol_to_bcache): Add 'section' parameter. Call
3220 set_unrelocated_address.
3221 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3222 (find_pc_psymbol): Update.
3223 (fixup_psymbol_section, relocate_psymtabs): Remove.
3224 (dump_psymtab, psym_functions): Update.
3225 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3226 parameter.
3227 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3228 (start_psymtab_common): Update.
3229 * symfile-debug.c (debug_qf_relocate): Remove.
3230 (debug_sym_quick_functions): Update.
3231 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3232 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3233 Update.
3234
3235 2018-07-26 Tom Tromey <tromey@redhat.com>
3236
3237 * dbxread.c (end_psymtab): Use text_high_valid and
3238 text_low_valid.
3239 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3240 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3241 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3242 Update comment.
3243 <text_low_valid, text_high_valid>: New fields.
3244 <set_text_low, set_text_high>: Update.
3245 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3246
3247 2018-07-26 Tom Tromey <tom@tromey.com>
3248
3249 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3250 Update.
3251 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3252 textlow and texthigh fields.
3253 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3254 Update.
3255 * mdebugread.c (parse_lines, parse_partial_symbols)
3256 (psymtab_to_symtab_1): Update.
3257 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3258 Rename fields. Update comment. Now private.
3259 <text_low, text_high, set_text_low, set_text_high>: New methods.
3260 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3261 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3262 (start_psymtab_common, maintenance_info_psymtabs)
3263 (maintenance_check_psymtabs): Update.
3264 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3265 texthigh fields.
3266 (scan_xcoff_symtab): Update.
3267
3268 2018-07-26 Tom Tromey <tromey@redhat.com>
3269
3270 * psympriv.h (struct partial_symbol) <unrelocated_address,
3271 address, set_address>: New methods.
3272 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3273 (fixup_psymbol_section, relocate_psymtabs): Update.
3274 (print_partial_symbols): Add 'objfile' parameter. Update.
3275 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3276 Update.
3277
3278 2018-07-26 Tom Tromey <tom@tromey.com>
3279
3280 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3281 (debug_names::write_psymbols): Update.
3282 * psympriv.h (struct partial_symbol): Derive from
3283 general_symbol_info.
3284 <obj_section>: New method.
3285 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3286 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3287 (find_pc_sect_psymbol, fixup_psymbol_section)
3288 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3289 (print_partial_symbols, recursively_search_psymtabs)
3290 (compare_psymbols, psymbol_hash, psymbol_compare)
3291 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3292 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3293
3294 2018-07-26 Tom Tromey <tromey@redhat.com>
3295
3296 * dbxread.c (end_psymtab): Remove dead code.
3297
3298 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3299
3300 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3301 DWARF unwinders are disabled.
3302 * dwarf2-frame.c: Add dwarf2read.h include.
3303 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3304 disabled.
3305 (dwarf2_frame_unwinders_enabled_p): Define.
3306 (show_dwarf_unwinders_enabled_p): New function.
3307 (_initialize_dwarf2_frame): Register switch to control DWARF
3308 unwinder use.
3309 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3310 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3311 (show_dwarf_cmdlist): Remove static keyword.
3312 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3313 (show_dwarf_cmdlist): Declare.
3314 * NEWS: Document new feature.
3315
3316 2018-07-26 Tom de Vries <tdevries@suse.de>
3317
3318 PR breakpoints/23366
3319 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3320
3321 2018-07-26 Tom de Vries <tdevries@suse.de>
3322
3323 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3324 DW_AT_count can't be translated to a dynamic prop.
3325
3326 2018-07-25 Tom de Vries <tdevries@suse.de>
3327
3328 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3329 try/catch.
3330
3331 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3332
3333 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3334
3335 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3336
3337 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3338
3339 2018-07-24 Keith Seitz <keiths@redhat.comt
3340
3341 PR symtab/23010
3342 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3343 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3344 instead of add_symbol_to_list.
3345 (read_file_scope): Call prepare_one_comp_unit before reading
3346 any other DIEs.
3347
3348 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3349
3350 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3351
3352 2018-07-24 Tom Tromey <tom@tromey.com>
3353
3354 * utils.c (malloc, realloc, free): Don't declare.
3355 * configure, config.in: Rebuild.
3356 * configure.ac: Don't check for declarations of free, malloc, or
3357 realloc.
3358
3359 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3360
3361 * aarch64-linux-nat.c
3362 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3363 variable.
3364 * arm-linux-nat.c (fetch_regs): Likewise.
3365 (store_regs): Likewise.
3366 (fetch_vfp_regs): Likewise.
3367 (store_vfp_regs): Likewise.
3368 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3369 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3370 (arm_linux_nat_target::insert_watchpoint): Likewise.
3371 (arm_linux_nat_target::remove_watchpoint): Likewise.
3372 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3373 Likewise.
3374 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3375 Likewise.
3376 * ppc-linux-nat.c (fetch_register): Likewise.
3377 (fetch_all_gp_regs): Likewise.
3378 (fetch_ppc_registers): Likewise.
3379 (store_all_gp_regs): Likewise.
3380 (store_ppc_registers): Likewise.
3381 (hwdebug_insert_point): Likewise.
3382 (can_use_watchpoint_cond_accel): Likewise.
3383 * remote-sim.c (gdb_os_write_stdout): Likewise.
3384
3385 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3386 Tom Tromey <tom@tromey.com>
3387
3388 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3389 test for it.
3390 * configure: Rebuild.
3391
3392 2018-07-22 Tom Tromey <tom@tromey.com>
3393
3394 * regformats/regdat.sh: Define xmltarget_${name} inside
3395 #ifndef IN_PROCESS_AGENT.
3396
3397 2018-07-22 Tom Tromey <tom@tromey.com>
3398
3399 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3400
3401 2018-07-22 Tom Tromey <tom@tromey.com>
3402
3403 * symfile.c (reread_symbols): Notify iter, not objfile.
3404
3405 2018-07-22 Tom Tromey <tom@tromey.com>
3406
3407 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3408 Use arch_ops.
3409 (ravenscar_thread_target::prepare_to_store): Likewise.
3410
3411 2018-07-22 Tom Tromey <tom@tromey.com>
3412
3413 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3414 unused variable. Call value_fetch_lazy when needed.
3415 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3416 Remove unused variable. Call value_fetch_lazy when needed.
3417
3418 2018-07-22 Tom Tromey <tom@tromey.com>
3419
3420 * m32c-tdep.c (mark_dma): Return void.
3421 (make_regs): Remove unused declarations.
3422
3423 2018-07-22 Tom Tromey <tom@tromey.com>
3424
3425 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3426 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3427 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3428 bkscm_get_valid_block_smob_arg_unsafe for effect.
3429
3430 2018-07-22 Tom Tromey <tom@tromey.com>
3431
3432 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3433 value_type.
3434
3435 2018-07-22 Tom Tromey <tom@tromey.com>
3436
3437 * windows-nat.c (saved_context): Conditionally define.
3438 * remote.c (remote_target::remote_btrace_maybe_reopen):
3439 Conditionally declare "warned".
3440 * inflow.c (sigquit_ours): Conditionally define.
3441 (new_tty): Move "tty" declaration inside #if.
3442 * guile/guile.c (guile_datadir): Conditionally define.
3443 * charset.c (set_be_le_names): Move some declarations inside #if.
3444 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3445 #if.
3446 (parse_xml_btrace_conf): Likewise.
3447
3448 2018-07-22 Tom Tromey <tom@tromey.com>
3449
3450 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3451
3452 2018-07-22 Tom Tromey <tom@tromey.com>
3453
3454 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3455 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3456 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3457 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3458 * stack.c (frame_apply_level_command): Remove unused variable.
3459 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3460 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3461 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3462 unused variable.
3463 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3464 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3465 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3466 variable.
3467 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3468 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3469 variable.
3470 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3471 Remove unused variable.
3472 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3473 variable.
3474 * common/tdesc.c (print_xml_feature::visit): Remove unused
3475 variable.
3476 * compile/compile-object-load.c (store_regs): Remove unused
3477 variables.
3478 * complaints.c (clear_complaints): Remove unused variable.
3479 * corelow.c (core_target_open): Remove unused variable.
3480 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3481 variable.
3482 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3483 variable.
3484 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3485 variable.
3486 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3487 variable.
3488 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3489 variable.
3490 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3491 variable.
3492 * ia64-tdep.c (examine_prologue): Remove unused variable.
3493 * infcall.c (run_inferior_call): Remove unused variable.
3494 * inferior.c (exit_inferior): Remove unused variable.
3495 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3496 * linespec.c (decode_line_2): Remove unused variable.
3497 * linux-nat.c (super_close): Remove.
3498 * linux-tdep.c (linux_info_proc): Remove unused variable.
3499 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3500 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3501 Remove unused variable.
3502 * parse.c (find_minsym_type_and_address): Remove unused variable.
3503 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3504 variable.
3505 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3506 variable.
3507 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3508 variables.
3509 * record-btrace.c (record_btrace_target::store_registers): Remove
3510 unused variable.
3511 (cmd_show_record_btrace_cpu): Remove unused variable.
3512 * riscv-tdep.c (riscv_register_reggroup_p)
3513 (riscv_push_dummy_call, riscv_return_value): Remove unused
3514 variable.
3515 * rust-exp.y (literal): Remove unused variable.
3516 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3517 unused variable.
3518 <STRUCTOP_ANONYMOUS>: Likewise.
3519 * s390-linux-tdep.c (s390_linux_init_abi_31)
3520 (s390_linux_init_abi_64): Remove unused variable.
3521 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3522 (file_select_thread, net_windows_open, _initialize_ser_windows):
3523 Remove unused variables.
3524 * symtab.c (find_pc_sect_line): Remove unused variable.
3525 * target-memory.c (compute_garbled_blocks): Remove unused
3526 variable.
3527 (target_write_memory_blocks): Remove unused variable.
3528 * target.c (target_stack::unpush): Remove unused variables.
3529 * tracepoint.c (start_tracing, all_tracepoint_actions)
3530 (merge_uploaded_trace_state_variables)
3531 (print_one_static_tracepoint_marker): Remove unused variable.
3532 * unittests/basic_string_view/element_access/char/1.cc (test01):
3533 Remove unused variable.
3534 * windows-nat.c (windows_continue, windows_add_all_dlls)
3535 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3536 Remove unused variables.
3537
3538 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3539
3540 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3541 attr_profile in HAVE_ELF.
3542 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3543 HAVE_ELF.
3544
3545 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3546
3547 * frame.c (frame_register_unwind): Change parameter name.
3548 (frame_unwind_register): Likewise.
3549 (frame_unwind_register_value): Likewise.
3550 (frame_unwind_register_signed): Likewise.
3551 (frame_unwind_register_unsigned): Likewise.
3552 * frame.h (frame_register_unwind): Likewise.
3553 (frame_unwind_register): Likewise.
3554 (frame_unwind_register_value): Likewise.
3555 (frame_unwind_register_signed): Likewise.
3556 (frame_unwind_register_unsigned): Likewise.
3557 (frame_unwind_arch): Likewise.
3558
3559 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3560
3561 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3562 ISA maintenance.
3563
3564 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3565
3566 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3567 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3568 hand.
3569
3570 2018-07-20 Keith Seitz <keiths@redhat.com>
3571
3572 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3573 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3574 m_compunit_symtab, m_language>: Add "m_" prefix.
3575 Update all uses.
3576 * buildsym.c: Update all uses.
3577
3578 2018-07-20 Tom Tromey <tom@tromey.com>
3579
3580 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3581 * buildsym.h (record_line_ftype): Remove typedef.
3582
3583 2018-07-20 Tom Tromey <tom@tromey.com>
3584
3585 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3586 (end_expandable_symtab): Likewise.
3587 (end_symtab_get_static_block): Likewise.
3588 (end_symtab_from_static_block): Likewise.
3589 * buildsym-legacy.c (augment_type_symtab): Remove.
3590 (end_expandable_symtab): Remove.
3591 (end_symtab_get_static_block): Remove.
3592 (end_symtab_from_static_block): Remove.
3593
3594 2018-07-20 Tom Tromey <tom@tromey.com>
3595
3596 * dwarf2read.c: Include buildsym.h.
3597 (struct dwarf2_cu) <builder>: New method.
3598 (fixup_go_packaging): Update.
3599 (process_full_comp_unit, process_full_type_unit): Update. Don't
3600 use scoped_free_pendings.
3601 (using_directives): Add "cu" parameter, remove "language".
3602 (read_import_statement, setup_type_unit_groups, )
3603 (read_func_scope, read_lexical_block_scope)
3604 (dwarf2_record_block_ranges, read_namespace): Update.
3605 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3606 (lnp_state_machine::handle_end_sequence): Update.
3607 (class lnp_state_machine) <m_cu>: New member.
3608 <m_record_line_callback>: Remove.
3609 <m_currently_recording_lines>: New member.
3610 (lnp_state_machine::handle_set_file): Update.
3611 (noop_record_line): Remove.
3612 (dwarf_record_line_p): Add cu parameter.
3613 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3614 (lnp_state_machine::record_line)
3615 (lnp_state_machine::lnp_state_machine)
3616 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3617 (dwarf_decode_lines): Update.
3618 (dwarf2_start_subfile): Add cu parameter.
3619 (dwarf2_start_symtab, new_symbol): Update.
3620 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3621 Remove dwarf2_per_objfile parameter.
3622 (dwarf_decode_macros): Update.
3623
3624 2018-07-20 Tom Tromey <tom@tromey.com>
3625
3626 * stabsread.c (define_symbol): Update.
3627 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3628 * dwarf2read.c (new_symbol): Update.
3629 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3630 * cp-namespace.c: Include buildsym.h.
3631 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3632 * buildsym-legacy.c (get_buildsym_compunit): New function.
3633
3634 2018-07-20 Tom Tromey <tom@tromey.com>
3635
3636 * xcoffread.c: Include buildsym-legacy.h.
3637 * windows-nat.c: Include buildsym-legacy.h.
3638 * stabsread.c: Include buildsym-legacy.h.
3639 * mdebugread.c: Include buildsym-legacy.h.
3640 * buildsym-legacy.h: New file.
3641 * buildsym-legacy.c: New file, from buildsym.c.
3642 * go32-nat.c: Include buildsym-legacy.h.
3643 * dwarf2read.c: Include buildsym-legacy.h.
3644 * dbxread.c: Include buildsym-legacy.h.
3645 * cp-namespace.c: Include buildsym-legacy.h.
3646 * coffread.c: Include buildsym-legacy.h.
3647 * buildsym.h: Move some contents to buildsym-legacy.h.
3648 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3649 buildsym-legacy.c.
3650 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3651
3652 2018-07-20 Tom Tromey <tom@tromey.com>
3653
3654 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3655 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3656 (buildsym_compunit::buildsym_compunit)
3657 (buildsym_compunit::~buildsym_compunit)
3658 (buildsym_compunit::get_macro_table): Define.
3659
3660 2018-07-20 Tom Tromey <tom@tromey.com>
3661
3662 * buildsym.c (reset_symtab_globals): Remove.
3663 (buildsym_compunit::end_symtab_from_static_block): Update.
3664 (buildsym_compunit::augment_type_symtab): Update.
3665 (end_symtab_from_static_block): Call free_buildsym_compunit.
3666 (augment_type_symtab, end_symtab, end_expandable_symtab):
3667 Likewise.
3668
3669 2018-07-20 Tom Tromey <tom@tromey.com>
3670
3671 * arch-utils.c: Do not include buildsym.h.
3672 * mipsread.c: Do not include buildsym.h.
3673 * machoread.c: Do not include buildsym.h.
3674 * elfread.c: Do not include buildsym.h.
3675
3676 2018-07-20 Tom Tromey <tom@tromey.com>
3677
3678 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3679 initialization.
3680 (buildsym_compunit): Add new constructor.
3681 (struct buildsym_compunit) <get_last_source_file, finish_block,
3682 record_block_range, start_subfile, patch_subfile_names,
3683 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3684 set_last_source_start_addr, get_last_source_start_addr,
3685 get_local_using_directives, set_local_using_directives,
3686 get_global_using_directives, outermost_context_p,
3687 get_current_context_stack, get_context_stack_depth,
3688 get_current_subfile, get_local_symbols, get_file_symbols,
3689 get_global_symbols, record_debugformat, record_producer,
3690 push_context, pop_context, end_symtab_get_static_block,
3691 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3692 New public methods.
3693 <record_pending_block, finish_block_internal, make_blockvector,
3694 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3695 private methods.
3696 Update all users.
3697
3698 2018-05-22 Tom Tromey <tom@tromey.com>
3699
3700 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3701 parameter.
3702 (finish_block_internal): Update.
3703
3704 2018-07-20 Tom Tromey <tom@tromey.com>
3705
3706 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3707 parameter.
3708 (finish_block_internal): Update.
3709
3710 2018-07-20 Tom Tromey <tom@tromey.com>
3711
3712 * buildsym.h (EXTERN): Don't define or undef.
3713 * buildsym.c (EXTERN): Don't define.
3714
3715 2018-07-20 Tom Tromey <tom@tromey.com>
3716
3717 * buildsym.c: Remove TODO comment.
3718
3719 2018-07-20 Tom Tromey <tom@tromey.com>
3720
3721 * coffread.c (coff_symtab_read): Update.
3722 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3723 (xcoff_new_init): Update.
3724 * mipsread.c (mipscoff_new_init): Update.
3725 * mdebugread.c (mdebug_build_psymtabs): Update.
3726 * elfread.c (elf_new_init): Update.
3727 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3728 Update.
3729 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3730 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3731 (stabsect_build_psymtabs): Update.
3732 * buildsym.h (buildsym_init): Don't declare.
3733 * buildsym.c: Update comment.
3734 (prepare_for_building): Remove.
3735 (start_symtab, restart_symtab): Update.
3736 (reset_symtab_globals): Update comment.
3737 (buildsym_init): Remove.
3738
3739 2018-07-20 Tom Tromey <tom@tromey.com>
3740
3741 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3742 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3743 (read_enum_type, common_block_start, common_block_end)
3744 (cleanup_undefined_types_1, finish_global_stabs): Update.
3745 * mdebugread.c (psymtab_to_symtab_1): Update.
3746 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3747 (read_lexical_block_scope, new_symbol): Update.
3748 * dbxread.c (process_one_symbol): Update.
3749 * coffread.c (coff_symtab_read, process_coff_symbol)
3750 (coff_read_enum_type): Update.
3751 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3752 declare.
3753 (get_local_symbols, get_file_symbols, get_global_symbols): New
3754 functions.
3755 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3756 m_global_symbols.
3757 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3758 (~scoped_free_pendings): Update.
3759 (finish_block, prepare_for_building, reset_symtab_globals)
3760 (end_symtab_get_static_block, end_symtab_with_blockvector)
3761 (augment_type_symtab, push_context): Update.
3762 (get_local_symbols, get_file_symbols, get_global_symbols): New
3763 functions.
3764 (buildsym_init): Update.
3765
3766 2018-07-20 Tom Tromey <tom@tromey.com>
3767
3768 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3769 (process_full_type_unit): Likewise.
3770 (dwarf2_start_symtab): Set list_in_scope.
3771
3772 2018-07-20 Tom Tromey <tom@tromey.com>
3773
3774 * dwarf2read.c (process_psymtab_comp_unit_reader)
3775 (build_type_psymtabs_reader): Do not set list_in_scope.
3776
3777 2018-07-20 Tom Tromey <tom@tromey.com>
3778
3779 * buildsym.c (free_pendings): Remove.
3780 (add_symbol_to_list, scoped_free_pendings)
3781 (finish_block_internal, buildsym_init): Update.
3782
3783 2018-07-20 Tom Tromey <tom@tromey.com>
3784
3785 * xcoffread.c (read_xcoff_symtab): Update.
3786 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3787 Update.
3788 * dbxread.c (process_one_symbol): Update.
3789 * coffread.c (coff_symtab_read): Update.
3790 * buildsym.h (finish_block): Update.
3791 * buildsym.c (finish_block): Remove "listhead" argument.
3792 (end_symtab_get_static_block): Update.
3793
3794 2018-07-20 Tom Tromey <tom@tromey.com>
3795
3796 * buildsym.h (class scoped_free_pendings): Remove constructor.
3797 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3798 method.
3799 <m_pending_block_obstack, m_pending_blocks>: New members.
3800 (pending_block_obstack, pending_blocks): Remove.
3801 (scoped_free_pendings::scoped_free_pendings): Default.
3802 (~scoped_free_pendings): Update.
3803 (free_pending_blocks): Remove.
3804 (finish_block_internal, record_pending_block, make_blockvector)
3805 (end_symtab_get_static_block, augment_type_symtab, push_context)
3806 (buildsym_init): Update.
3807
3808 2018-07-20 Tom Tromey <tom@tromey.com>
3809
3810 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3811 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3812 members.
3813 (pending_addrmap, pending_addrmap_obstack)
3814 (pending_addrmap_interesting): Remove.
3815 (scoped_free_pendings, record_block_range, make_blockvector)
3816 (prepare_for_building, reset_symtab_globals, buildsym_init):
3817 Update.
3818
3819 2018-07-20 Tom Tromey <tom@tromey.com>
3820
3821 * xcoffread.c (process_linenos): Update.
3822 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3823 * mdebugread.c (psymtab_to_symtab_1): Update.
3824 * dwarf2read.c (setup_type_unit_groups)
3825 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3826 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3827 * dbxread.c (process_one_symbol): Update.
3828 * coffread.c (coff_symtab_read, enter_linenos)
3829 (process_coff_symbol): Update.
3830 * buildsym.h (current_subfile): Don't declare.
3831 (get_current_subfile): Declare.
3832 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3833 member.
3834 (start_subfile, free_buildsym_compunit, push_subfile)
3835 (prepare_for_building, start_symtab): Update.
3836 (get_current_subfile): New function.
3837
3838 2018-07-20 Tom Tromey <tom@tromey.com>
3839
3840 * coffread.c (coff_symtab_read): Update.
3841 * xcoffread.c (read_xcoff_symtab): Update.
3842 * dwarf2read.c (new_symbol): Update.
3843 (read_func_scope, read_lexical_block_scope): Update.
3844 * dbxread.c (process_one_symbol): Update.
3845 * buildsym.h (context_stack, context_stack_depth): Don't declare.
3846 (outermost_context_p): Remove macro.
3847 (outermost_context_p, get_current_context_stack)
3848 (get_context_stack_depth): Declare.
3849 (pop_context): Return struct context_stack.
3850 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3851 member.
3852 (context_stack_size): Remove.
3853 (INITIAL_CONTEXT_STACK_SIZE): Remove.
3854 (prepare_for_building, end_symtab_get_static_block)
3855 (augment_type_symtab, push_context): Update.
3856 (pop_context): Return struct context_stack.
3857 (outermost_context_p, get_current_context_stack)
3858 (get_context_stack_depth): New functions.
3859 (buildsym_init): Update.
3860
3861 2018-07-20 Tom Tromey <tom@tromey.com>
3862
3863 * rust-exp.y: Now a pure parser. Update all rules.
3864 (%union): Move earlier.
3865 (current_parser, work_obstack): Remove globals.
3866 (rust_parser, ~rust_parser): Update.
3867 (class rust_parser) <copy_name, concat3, crate_name, super_name,
3868 lex_character, lex_number, lex_string, lex_identifier,
3869 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3870 convert_name, convert_params_to_expression,
3871 convert_ast_to_expression, ast_basic_type, ast_operation,
3872 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3873 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3874 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3875 ast_array_type, ast_slice_type, ast_reference_type,
3876 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3877 (rust_parse): Update.
3878 (rustyyerror, rustyylex): Add parser parameter.
3879 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3880 (rust_lex_stringish_test, rust_lex_test_sequence)
3881 (rust_lex_test_trailing_dot, rust_lex_test_completion)
3882 (rust_lex_test_push_back, rust_lex_tests): Update.
3883
3884 2018-07-19 Pedro Alves <palves@redhat.com>
3885
3886 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3887 gdb::unique_xmalloc_ptr.
3888 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3889 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3890 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3891 copy-initialization.
3892 * guile/scm-pretty-print.c (ppscm_print_children): Use
3893 gdb::unique_xmalloc_ptr instead of cleanups.
3894 (gdbscm_apply_val_pretty_printer): Remove cleanups.
3895 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3896 gdb::unique_xmalloc_ptr.
3897 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3898 Adjust to use gdb::unique_xmalloc_ptr.
3899 * guile/scm-utils.c (extract_arg): Adjust.
3900 * guile/scm-value.c (gdbscm_value_field): Adjust to use
3901 gdb::unique_xmalloc_ptr instead of a cleanup.
3902
3903 2018-07-19 Tom Tromey <tom@tromey.com>
3904
3905 * utils.c (do_value_free_to_mark)
3906 (make_cleanup_value_free_to_mark): Remove.
3907 * utils.h (make_cleanup_value_free_to_mark): Remove.
3908
3909 2018-07-19 Pedro Alves <palves@redhat.com>
3910
3911 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3912 forwarding reference.
3913
3914 2018-07-18 Pedro Alves <palves@redhat.com>
3915
3916 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3917 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
3918 cleanup.
3919
3920 2018-07-18 Pedro Alves <palves@redhat.com>
3921
3922 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3923 exceptions.
3924 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3925 (gdbscm_wrap): New.
3926 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3927 directly instead of a cleanup.
3928 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3929 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
3930 (vlscm_binop_gdbthrow): New, factored out from ...
3931 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
3932 (vlscm_rich_compare): Use gdbscm_wrap.
3933 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3934 instead of a cleanup.
3935 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3936 cleanup.
3937 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3938 Use xfree directly instead of a cleanup.
3939 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3940 Adjust to use gdbscm_wrap and scoped_value_mark.
3941 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3942 (gdbscm_value_address, gdbscm_value_dereference)
3943 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3944 scoped_value_mark.
3945 (gdbscm_value_dynamic_type): Use scoped_value_mark.
3946 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3947 scoped_value_mark.
3948 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3949 gdbscm_wrap and scoped_value_mark.
3950 (gdbscm_value_to_string): Use xfree directly instead of a
3951 cleanup. Move 'buffer' unique_ptr to TRY scope.
3952 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3953 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
3954 scoped_value_mark.
3955 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3956 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3957 scoped_value_mark.
3958 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3959 gdbscm_wrap.
3960
3961 2018-07-18 Tom de Vries <tdevries@suse.de>
3962
3963 * findvar.c (default_read_var_value): Also resolve dynamic type for
3964 LOC_OPTIMIZED_OUT vars.
3965
3966 2018-07-18 Maciej W. Rozycki <macro@mips.com>
3967
3968 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3969 decoding.
3970
3971 2018-07-17 Tom Tromey <tom@tromey.com>
3972
3973 * guile/scm-param.c (pascm_set_func, pascm_show_func)
3974 (compute_enum_list, pascm_set_param_value_x)
3975 (gdbscm_parameter_value): Update.
3976 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3977 (gdbscm_scm_to_host_string): Update.
3978 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3979 Update.
3980 * guile/scm-cmd.c (cmdscm_add_completion): Update.
3981 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3982 * guile/scm-string.c (gdbscm_scm_to_string): Return
3983 unique_xmalloc_ptr.
3984 (gdbscm_scm_to_host_string): Likewise.
3985
3986 2018-07-17 Tom Tromey <tom@tromey.com>
3987
3988 * guile/guile.c (gdbscm_eval_from_control_command): Update.
3989 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3990 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3991 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3992 unique_xmalloc_ptr.
3993
3994 2018-07-17 Tom Tromey <tom@tromey.com>
3995
3996 * guile/scm-param.c (pascm_signal_setshow_error): Update.
3997 * guile/guile-internal.h (gdbscm_exception_message_to_string):
3998 Update.
3999 * guile/scm-cmd.c (cmdscm_function): Update.
4000 * guile/scm-pretty-print.c
4001 (ppscm_print_exception_unless_memory_error): Update.
4002 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4003 Return unique_xmalloc_ptr.
4004
4005 2018-07-17 Tom Tromey <tom@tromey.com>
4006
4007 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4008 Use string_printf.
4009
4010 2018-07-17 Jim Wilson <jimw@sifive.com>
4011
4012 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4013 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4014 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4015 unecessary braces after EF_RISCV_RVC test. Delete call to
4016 set_gdbarch_decr_pc_after_break.
4017
4018 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4019 RISCV_LAST_FP_REGNUM + 1.
4020 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4021
4022 2018-07-17 Tom Tromey <tom@tromey.com>
4023
4024 * configure.ac: Remove --disable-gdbcli.
4025 * configure: Rebuild.
4026 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4027 (SUBDIR_CLI_CFLAGS): Remove.
4028 (SFILES): Use SUBDIR_CLI_SRCS.
4029 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4030
4031 2018-07-17 Tom Tromey <tom@tromey.com>
4032
4033 PR gdb/18624:
4034 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4035
4036 2018-07-16 Jim Wilson <jimw@sifive.com>
4037
4038 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4039
4040 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4041
4042 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4043 variable.
4044 (libunwind_frame_sniffer): Likewise.
4045 (libunwind_frame_prev_register): Likewise.
4046 (libunwind_sigtramp_frame_sniffer): Likewise.
4047 * ia64-tdep.c (ia64_access_reg): Likewise.
4048 (ia64_access_rse_reg): Likewise.
4049 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4050 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4051
4052 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4053
4054 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4055
4056 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4057
4058 * remote-sim.c (gdbsim_target::close,
4059 gdbsim_target::mourn_inferior): Remove unused variables.
4060
4061 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4062
4063 * ia64-tdep.c (ktab_buf): New global.
4064 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4065 (get_kernel_table): Adjust.
4066
4067 2018-07-16 Tom Tromey <tom@tromey.com>
4068
4069 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4070 * dwarf2read.c (using_directives, new_symbol): Use
4071 outermost_context_p.
4072 * dbxread.c (process_one_symbol): Use outermost_context_p.
4073 * coffread.c (coff_symtab_read): Use outermost_context_p.
4074
4075 2018-07-16 Tom Tromey <tom@tromey.com>
4076
4077 * dwarf2read.c (using_directives, read_func_scope)
4078 (read_lexical_block_scope): Update.
4079 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4080 * buildsym.h (local_using_directives, global_using_directives):
4081 Don't declare.
4082 (get_local_using_directives, set_local_using_directives)
4083 (get_global_using_directives): Declare.
4084 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4085 m_global_using_directives>: New members.
4086 (finish_block_internal, prepare_for_building)
4087 (reset_symtab_globals, end_symtab_get_static_block)
4088 (push_context): Update.
4089 (get_local_using_directives, set_local_using_directives)
4090 (get_global_using_directives): New functions.
4091 (buildsym_init): Update.
4092
4093 2018-07-16 Tom Tromey <tom@tromey.com>
4094
4095 * xcoffread.c (xcoff_initial_scan): Don't call
4096 free_pending_blocks.
4097 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4098 * buildsym.h (class scoped_free_pendings): Add constructor.
4099 (free_pending_blocks): Don't declare.
4100 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4101 (free_pending_blocks): Now static.
4102
4103 2018-07-16 Tom Tromey <tom@tromey.com>
4104
4105 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4106 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4107 member.
4108 (struct subfile_stack): Remove.
4109 (subfile_stack): Remove.
4110 (push_subfile, pop_subfile, buildsym_init): Update.
4111
4112 2018-07-16 Tom Tromey <tom@tromey.com>
4113
4114 * buildsym.c (push_subfile): Use gdb_assert.
4115 (pop_subfile): Use gdb_assert.
4116
4117 2018-07-16 Tom Tromey <tom@tromey.com>
4118
4119 * buildsym.h (merge_symbol_lists): Remove.
4120 * buildsym.c (merge_symbol_lists): Remove.
4121
4122 2018-07-16 Tom Tromey <tom@tromey.com>
4123
4124 * stabsread.c (scan_file_globals): Update comment.
4125 * stabsread.h (scan_file_globals): Move from buildsym.h.
4126 * buildsym.h (scan_file_globals): Move to stabsread.h.
4127
4128 2018-07-16 Tom Tromey <tom@tromey.com>
4129
4130 * xcoffread.c (xcoff_new_init): Update.
4131 * mipsread.c (mipscoff_new_init): Update.
4132 * mdebugread.c (mdebug_build_psymtabs): Update.
4133 * elfread.c (elf_new_init): Update.
4134 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4135 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4136 * buildsym.h (buildsym_new_init): Don't declare.
4137 * buildsym.c (buildsym_new_init): Remove.
4138
4139 2018-07-16 Tom Tromey <tom@tromey.com>
4140
4141 * stabsread.h (within_function): Move from buildsym.h.
4142 * stabsread.c (start_stabs): Clear within_function.
4143 * coffread.c (coff_start_symtab): Clear within_function.
4144 * buildsym.h (within_function): Move to stabsread.h.
4145 * buildsym.c (prepare_for_building): Update.
4146
4147 2018-07-16 Tom Tromey <tom@tromey.com>
4148
4149 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4150 * dwarf2read.c (dwarf2_start_symtab): Don't set
4151 processing_gcc_compilation.
4152 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4153
4154 2018-07-16 Tom Tromey <tom@tromey.com>
4155
4156 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4157 (next_symbol_text_func): Move from buildsym.h.
4158 * stabsread.c (hashname): Move from buildsym.c.
4159 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4160 (next_symbol_text_func, hashname): Move to stabsread.h.
4161 * buildsym.c: Don't include bcache.h
4162 (hashname): Move to stasbread.c.
4163
4164 2018-07-16 Tom Tromey <tom@tromey.com>
4165
4166 * buildsym.h (context_stack_size): Don't declare.
4167 * buildsym.c (context_stack_size): New global.
4168
4169 2018-07-16 Tom Tromey <tom@tromey.com>
4170
4171 * dbxread.c (processing_acc_compilation): New global.
4172 * buildsym.h (processing_acc_compilation): Don't declare.
4173
4174 2018-07-16 Tom Tromey <tom@tromey.com>
4175
4176 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4177 * dbxread.c (read_ofile_symtab): Update.
4178 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4179 * buildsym.h (last_source_start_addr): Remove.
4180 (set_last_source_start_addr, get_last_source_start_addr):
4181 Declare.
4182 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4183 parameter.
4184 (struct buildsym_compunit) <m_last_source_start_addr>: New
4185 member.
4186 (prepare_for_building): Remove start_addr parameter.
4187 (start_symtab, restart_symtab, end_symtab_get_static_block)
4188 (end_symtab_with_blockvector): Update.
4189 (set_last_source_start_addr, get_last_source_start_addr): New
4190 functions.
4191
4192 2018-07-16 Tom Tromey <tom@tromey.com>
4193
4194 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4195 member.
4196 (have_line_numbers): Remove.
4197 (record_line, prepare_for_building, end_symtab_get_static_block)
4198 (augment_type_symtab): Update.
4199
4200 2018-07-16 Tom Tromey <tom@tromey.com>
4201
4202 * buildsym.c (~buildsym_compunit): Free the macro table.
4203 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4204 methods.
4205 <m_pending_macros>: New member.
4206 (pending_macros): Remove.
4207 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4208 (reset_symtab_globals, end_symtab_get_static_block)
4209 (end_symtab_with_blockvector, augment_type_symtab)
4210 (buildsym_init): Update.
4211
4212 2018-07-16 Tom Tromey <tom@tromey.com>
4213
4214 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4215 parameter.
4216 (buildsym_compunit::set_last_source_file): New method.
4217 <m_last_source_file>: New member.
4218 (prepare_for_building): Remove "name" parameter.
4219 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4220 (last_source_file): Remove.
4221 (set_last_source_file, get_last_source_file): Update.
4222
4223 2018-07-16 Tom Tromey <tom@tromey.com>
4224
4225 * buildsym.c (prepare_for_building): Add assert.
4226
4227 2018-07-16 Tom Tromey <tom@tromey.com>
4228
4229 * buildsym.c (~buildsym_compunit): Update.
4230 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4231 (start_subfile, patch_subfile_names)
4232 (end_symtab_with_blockvector): Update.
4233
4234 2018-07-16 Tom Tromey <tom@tromey.com>
4235
4236 * buildsym.c (struct buildsym_compunit): Add constructor,
4237 destructor, initializers.
4238 (start_buildsym_compunit): Remove.
4239 (free_buildsym_compunit): Use "delete".
4240 (start_symtab, restart_symtab): Use "new".
4241
4242 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4243
4244 * symfile.c (set_objfile_default_section_offset): Remove struct
4245 keyword.
4246
4247 2018-07-14 Stafford Horne <shorne@gmail.com>
4248
4249 * (Responsible Maintainers): Add myself as or1k maintainer.
4250
4251 2018-07-13 Tom Tromey <tom@tromey.com>
4252
4253 * symfile.c (set_objfile_default_section_offset): Use extra braces
4254 around initializer.
4255
4256 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4257
4258 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4259 non-branching basr.
4260
4261 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4262
4263 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4264 unittests/cli-utils-selftests.c
4265 * unittests/cli-utils-selftests.c: New file.
4266
4267 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4268
4269 * NEWS: Mention new commands. Mention change to 'thread apply'.
4270
4271 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4272
4273 * thread.c (thr_try_catch_cmd): New function.
4274 (thread_apply_all_command): Handle qcs flags.
4275 (thread_apply_command): Handle qcs flags.
4276 (taas_command): New function.
4277 (tfaas_command): New function.
4278 (_initialize_thread): Update to setup the new commands 'taas
4279 and 'tfaas'. Change doc string for 'thread apply'.
4280
4281 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4282
4283 * stack.c: (trailing_outermost_frame): New function, mostly
4284 extracted from backtrace_command_1.
4285 (leading_innermost_frame): New function.
4286 (backtrace_command_1): Update to call trailing_outermost_frame.
4287 (frame_apply_command_count): New function.
4288 (frame_apply_level_command): New function.
4289 (frame_apply_all_command): New function.
4290 (frame_apply_command): New function.
4291 (faas_command): New function.
4292 (frame_cmd_list): New variable.
4293 (_initialize_stack): Update to setup the new commands 'frame apply'
4294 and 'faas'.
4295
4296 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4297
4298 * cli-utils.c (number_or_range_parser::get_number): Only handle
4299 numbers or convenience var as numbers.
4300 (parse_flags): New function.
4301 (parse_flags_qcs): New function.
4302 (number_or_range_parser::finished): Ensure parsing end is detected
4303 before end of string.
4304 * cli-utils.h (parse_flags): New function.
4305 (parse_flags_qcs): New function.
4306 (number_or_range_parser): Remove m_finished bool.
4307 (number_or_range_parser::skip_range): Set m_in_range to false.
4308
4309 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4310
4311 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4312 on Windows.
4313
4314 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4315 Jan Kratochvil <jan.kratochvil@redhat.com>
4316 Paul Fertser <fercerpav@gmail.com>
4317 Tsutomu Seki <sekiriki@gmail.com>
4318 Pedro Alves <palves@redhat.com>
4319
4320 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4321 'unittests/parse-connection-spec-selftests.c'.
4322 (COMMON_SFILES): Add 'common/netstuff.c'.
4323 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4324 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4325 * common/netstuff.c: New file.
4326 * common/netstuff.h: New file.
4327 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4328 (wait_for_connect): Update comment. New parameter
4329 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4330 Use 'sock' directly instead of 'scb->fd'.
4331 (try_connect): New function, with code from 'net_open'.
4332 (net_open): Rewrite main loop to deal with multiple
4333 sockets/addresses. Handle IPv6-style hostnames; implement
4334 support for IPv6 connections.
4335 * unittests/parse-connection-spec-selftests.c: New file.
4336
4337 2018-07-11 Pedro Alves <palves@redhat.com>
4338
4339 PR gdb/23377
4340 * remote.c (remote_target::remote_detach_pid): Call
4341 set_current_process.
4342
4343 2018-07-11 Pedro Alves <palves@redhat.com>
4344
4345 * h8300-tdep.c (h8300_gdbarch_init): Remove
4346 set_gdbarch_ecoff_reg_to_regnum calls.
4347
4348 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4349
4350 PR c++/23373
4351 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4352 offsets/sizes for static members of a class/struct.
4353
4354 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4355
4356 * target-descriptions.c (tdesc_register_bitsize): Rename.
4357 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4358 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4359 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4360
4361 2018-07-10 Tom Tromey <tom@tromey.com>
4362
4363 * breakpoint.c (moribund_locations): Now static and a
4364 std::vector.
4365 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4366 (build_bpstat_chain, update_global_location_list)
4367 (breakpoint_retire_moribund): Update.
4368 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4369 VEC.
4370
4371 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4372
4373 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4374 (riscv_register_reggroup_p): Use new function, remove unneeded
4375 parenthesis.
4376 (riscv_push_dummy_call): Extend assert to compare against xlen or
4377 flen based on register type.
4378
4379 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4380
4381 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4382
4383 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4384
4385 * remote.c (show_hardware_watchpoint_limit): New function.
4386 (show_hardware_watchpoint_length_limit): New function.
4387 (show_hardware_breakpoint_limit): New function.
4388 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4389 where appropriate, update help text.
4390
4391 2018-07-09 Tom Tromey <tom@tromey.com>
4392
4393 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4394 (CLIBS): Don't mention NAT_CLIBS.
4395
4396 2018-07-09 Tom Tromey <tom@tromey.com>
4397
4398 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4399 (LIBGDB_OBS, clean mostlyclean): Update.
4400 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4401
4402 2018-07-09 Tom Tromey <tom@tromey.com>
4403
4404 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4405 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4406 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4407
4408 2018-07-09 Tom Tromey <tom@tromey.com>
4409
4410 * Makefile.in (ALLDEPFILES): Remove exec.c.
4411 (COMMON_OBS): Remove exec.o.
4412 (COMMON_SFILES): Add exec.c.
4413
4414 2018-07-09 Tom Tromey <tom@tromey.com>
4415
4416 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4417
4418 2018-07-09 Tom Tromey <tom@tromey.com>
4419
4420 * Makefile.in (clean mostlyclean): Remove stamp-version.
4421 (version.c): Depend on stamp-version.
4422 (stamp-version): New rule, from version.c rule.
4423
4424 2018-07-09 Tom Tromey <tom@tromey.com>
4425
4426 * Makefile.in (init.c): Depend on stamp-init.
4427 (stamp-init): New rule, from init.c rule.
4428 (clean mostlyclean): Remove stamp-init.
4429
4430 2018-07-09 Tom Tromey <tom@tromey.com>
4431
4432 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4433 SUBDIR_GCC_COMPILE_SRCS.
4434
4435 2018-07-09 Tom Tromey <tom@tromey.com>
4436
4437 * Makefile.in (init.c): Remove some unused sed rules.
4438
4439 2018-07-09 Tom Tromey <tom@tromey.com>
4440
4441 * Makefile.in (TSOBS): Remove.
4442 (INIT_FILES): Update.
4443 (LIBGDB_OBS): Update.
4444 (COMMON_SFILES): Add inflow.c.
4445 (SFILES): Remove inflow.c.
4446
4447 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4448
4449 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4450
4451 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4452
4453 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4454 get_saveloc_name, is_signal_frame_name, step_name,
4455 init_remote_name, create_addr_space_name,
4456 destroy_addr_space_name, search_unwind_table_name,
4457 find_dyn_list_name): Constify.
4458
4459 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4460
4461 * darwin-nat.c (darwin_pthread_kill): New function.
4462 (darwin_resume_thread): Use darwin_pthread_kill.
4463
4464 2018-07-05 Tom de Vries <tdevries@suse.de>
4465
4466 * macroexp.c (macro_buffer) <operator=>: New member function.
4467
4468 2018-07-04 Tom Tromey <tom@tromey.com>
4469
4470 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4471
4472 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4473
4474 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4475 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4476 * maint.c: Likewise.
4477 * top.c: Likewise.
4478
4479 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4480
4481 * NEWS: Create a new section for the next release branch.
4482 Rename the section of the current branch, now that it has
4483 been cut.
4484
4485 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4486
4487 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4488 * version.in: Bump version to 8.2.50.DATE-git.
4489
4490 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4491 Pedro Alves <palves@redhat.com>
4492
4493 * linux-nat.c (linux_init_ptrace): Rename to ...
4494 (linux_init_ptrace_procfs): ... this. Call
4495 linux_proc_init_warnings.
4496 (linux_nat_target::post_attach)
4497 (linux_nat_target::post_startup_inferior): Adjust.
4498 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4499 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4500
4501 2018-07-04 Tom de Vries <tdevries@suse.de>
4502
4503 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4504 check ...
4505 (read_comp_unit_head): ... here.
4506
4507 2018-07-03 Tom Tromey <tom@tromey.com>
4508
4509 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4510 (stop_tracing, tstatus_command)
4511 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4512 (print_one_static_tracepoint_marker): Update.
4513 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4514 std::vector.
4515 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4516 VEC.
4517 (all_tracepoints, static_tracepoints_here): Return std::vector.
4518
4519 2018-07-03 Tom Tromey <tom@tromey.com>
4520
4521 * common/ptid.c (ptid_equal): Remove.
4522 * common/ptid.h (ptid_equal): Don't declare.
4523 * ada-tasks.c: Update.
4524 * breakpoint.c: Update.
4525 * common/agent.c: Update.
4526 * corelow.c: Update.
4527 * darwin-nat-info.c: Update.
4528 * darwin-nat.c: Update.
4529 * dcache.c: Update.
4530 * dtrace-probe.c: Update.
4531 * dummy-frame.c: Update.
4532 * fbsd-nat.c: Update.
4533 * frame.c: Update.
4534 * gdbthread.h: Update.
4535 * gnu-nat.c: Update.
4536 * go32-nat.c: Update.
4537 * inf-loop.c: Update.
4538 * inf-ptrace.c: Update.
4539 * infcall.c: Update.
4540 * infcmd.c: Update.
4541 * inflow.c: Update.
4542 * infrun.c: Update.
4543 * linux-fork.c: Update.
4544 * linux-nat.c: Update.
4545 * linux-thread-db.c: Update.
4546 * mi/mi-cmd-var.c: Update.
4547 * mi/mi-interp.c: Update.
4548 * mi/mi-main.c: Update.
4549 * nto-procfs.c: Update.
4550 * ppc-linux-tdep.c: Update.
4551 * procfs.c: Update.
4552 * python/py-inferior.c: Update.
4553 * python/py-record-btrace.c: Update.
4554 * python/py-record.c: Update.
4555 * ravenscar-thread.c: Update.
4556 * regcache.c: Update.
4557 * remote-sim.c: Update.
4558 * remote.c: Update.
4559 * sol-thread.c: Update.
4560 * solib.c: Update.
4561 * target.c: Update.
4562 * tui/tui-stack.c: Update.
4563 * varobj.c: Update.
4564 * windows-nat.c: Update.
4565 * windows-tdep.c: Update.
4566
4567 2018-07-03 Tom Tromey <tom@tromey.com>
4568
4569 * common/ptid.c (ptid_match): Remove.
4570 * common/ptid.h (ptid_match): Don't declare.
4571 * fbsd-nat.c: Update.
4572 * infcmd.c: Update.
4573 * infrun.c: Update.
4574 * linux-nat.c: Update.
4575 * record-btrace.c: Update.
4576 * regcache.c: Update.
4577 * remote.c: Update.
4578
4579 2018-07-03 Tom Tromey <tom@tromey.com>
4580
4581 * common/ptid.c (ptid_tid_p): Remove.
4582 * common/ptid.h (ptid_tid_p): Don't declare.
4583 * sol-thread.c: Update.
4584
4585 2018-07-03 Tom Tromey <tom@tromey.com>
4586
4587 * common/ptid.c (ptid_lwp_p): Remove.
4588 * common/ptid.h (ptid_lwp_p): Don't declare.
4589 * fbsd-nat.c: Update.
4590 * linux-nat.c: Update.
4591 * nat/linux-procfs.c: Update.
4592 * nat/x86-linux-dregs.c: Update.
4593 * sol-thread.c: Update.
4594
4595 2018-07-03 Tom Tromey <tom@tromey.com>
4596
4597 * common/ptid.c (ptid_is_pid): Remove.
4598 * common/ptid.h (ptid_is_pid): Don't declare.
4599 * infrun.c: Update.
4600 * linux-nat.c: Update.
4601 * mi/mi-interp.c: Update.
4602 * remote.c: Update.
4603 * thread.c: Update.
4604
4605 2018-07-03 Tom Tromey <tom@tromey.com>
4606
4607 * common/ptid.c (ptid_get_tid): Remove.
4608 * common/ptid.h (ptid_get_tid): Don't declare.
4609 * ada-tasks.c: Update.
4610 * aix-thread.c: Update.
4611 * bsd-uthread.c: Update.
4612 * darwin-nat.c: Update.
4613 * fbsd-nat.c: Update.
4614 * i386-darwin-nat.c: Update.
4615 * infrun.c: Update.
4616 * linux-tdep.c: Update.
4617 * nto-procfs.c: Update.
4618 * ppc-ravenscar-thread.c: Update.
4619 * python/py-infthread.c: Update.
4620 * ravenscar-thread.c: Update.
4621 * sol-thread.c: Update.
4622 * sparc-ravenscar-thread.c: Update.
4623 * windows-nat.c: Update.
4624
4625 2018-07-03 Tom Tromey <tom@tromey.com>
4626
4627 * common/ptid.c (ptid_get_lwp): Remove.
4628 * common/ptid.h (ptid_get_lwp): Don't declare.
4629 * aarch64-linux-nat.c: Update.
4630 * ada-tasks.c: Update.
4631 * aix-thread.c: Update.
4632 * amd64-linux-nat.c: Update.
4633 * arm-linux-nat.c: Update.
4634 * corelow.c: Update.
4635 * fbsd-nat.c: Update.
4636 * fbsd-tdep.c: Update.
4637 * gnu-nat.c: Update.
4638 * i386-cygwin-tdep.c: Update.
4639 * i386-gnu-nat.c: Update.
4640 * i386-linux-nat.c: Update.
4641 * ia64-linux-nat.c: Update.
4642 * inf-ptrace.c: Update.
4643 * infrun.c: Update.
4644 * linux-fork.c: Update.
4645 * linux-nat.c: Update.
4646 * linux-tdep.c: Update.
4647 * linux-thread-db.c: Update.
4648 * mips-linux-nat.c: Update.
4649 * nat/aarch64-linux-hw-point.c: Update.
4650 * nat/aarch64-linux.c: Update.
4651 * nat/linux-btrace.c: Update.
4652 * nat/linux-osdata.c: Update.
4653 * nat/linux-procfs.c: Update.
4654 * nat/x86-linux-dregs.c: Update.
4655 * obsd-nat.c: Update.
4656 * ppc-fbsd-nat.c: Update.
4657 * ppc-linux-nat.c: Update.
4658 * procfs.c: Update.
4659 * python/py-infthread.c: Update.
4660 * ravenscar-thread.c: Update.
4661 * remote.c: Update.
4662 * s390-linux-nat.c: Update.
4663 * sol-thread.c: Update.
4664 * sol2-tdep.c: Update.
4665 * spu-linux-nat.c: Update.
4666 * x86-linux-nat.c: Update.
4667 * xtensa-linux-nat.c: Update.
4668
4669 2018-07-03 Tom Tromey <tom@tromey.com>
4670
4671 * common/ptid.c (ptid_get_pid): Remove.
4672 * common/ptid.h (ptid_get_pid): Don't declare.
4673 * aarch64-linux-nat.c: Update.
4674 * ada-lang.c: Update.
4675 * aix-thread.c: Update.
4676 * alpha-bsd-nat.c: Update.
4677 * amd64-fbsd-nat.c: Update.
4678 * amd64-linux-nat.c: Update.
4679 * arm-linux-nat.c: Update.
4680 * arm-nbsd-nat.c: Update.
4681 * auxv.c: Update.
4682 * break-catch-syscall.c: Update.
4683 * breakpoint.c: Update.
4684 * bsd-uthread.c: Update.
4685 * corelow.c: Update.
4686 * ctf.c: Update.
4687 * darwin-nat.c: Update.
4688 * fbsd-nat.c: Update.
4689 * fbsd-tdep.c: Update.
4690 * gcore.c: Update.
4691 * gnu-nat.c: Update.
4692 * hppa-nbsd-nat.c: Update.
4693 * hppa-obsd-nat.c: Update.
4694 * i386-fbsd-nat.c: Update.
4695 * ia64-linux-nat.c: Update.
4696 * inf-ptrace.c: Update.
4697 * infcmd.c: Update.
4698 * inferior.c: Update.
4699 * inferior.h: Update.
4700 * inflow.c: Update.
4701 * infrun.c: Update.
4702 * linux-fork.c: Update.
4703 * linux-nat.c: Update.
4704 * linux-tdep.c: Update.
4705 * linux-thread-db.c: Update.
4706 * m68k-bsd-nat.c: Update.
4707 * mi/mi-interp.c: Update.
4708 * mi/mi-main.c: Update.
4709 * mips-linux-nat.c: Update.
4710 * mips-nbsd-nat.c: Update.
4711 * mips64-obsd-nat.c: Update.
4712 * nat/aarch64-linux-hw-point.c: Update.
4713 * nat/aarch64-linux.c: Update.
4714 * nat/linux-btrace.c: Update.
4715 * nat/linux-osdata.c: Update.
4716 * nat/linux-procfs.c: Update.
4717 * nat/x86-linux-dregs.c: Update.
4718 * nto-procfs.c: Update.
4719 * obsd-nat.c: Update.
4720 * ppc-linux-nat.c: Update.
4721 * ppc-nbsd-nat.c: Update.
4722 * ppc-obsd-nat.c: Update.
4723 * proc-service.c: Update.
4724 * procfs.c: Update.
4725 * python/py-inferior.c: Update.
4726 * python/py-infthread.c: Update.
4727 * ravenscar-thread.c: Update.
4728 * record.c: Update.
4729 * remote-sim.c: Update.
4730 * remote.c: Update.
4731 * rs6000-nat.c: Update.
4732 * s390-linux-nat.c: Update.
4733 * sh-nbsd-nat.c: Update.
4734 * sol-thread.c: Update.
4735 * sparc-nat.c: Update.
4736 * sparc64-tdep.c: Update.
4737 * spu-linux-nat.c: Update.
4738 * spu-tdep.c: Update.
4739 * target-debug.h: Update.
4740 * target.c: Update.
4741 * thread.c: Update.
4742 * tid-parse.c: Update.
4743 * tracefile-tfile.c: Update.
4744 * vax-bsd-nat.c: Update.
4745 * windows-nat.c: Update.
4746 * x86-linux-nat.c: Update.
4747 * x86-nat.c: Update.
4748
4749 2018-07-03 Tom Tromey <tom@tromey.com>
4750
4751 * common/ptid.c (pid_to_ptid): Remove.
4752 * common/ptid.h (pid_to_ptid): Don't declare.
4753 * aix-thread.c: Update.
4754 * arm-linux-nat.c: Update.
4755 * common/ptid.c: Update.
4756 * common/ptid.h: Update.
4757 * corelow.c: Update.
4758 * ctf.c: Update.
4759 * darwin-nat.c: Update.
4760 * fbsd-nat.c: Update.
4761 * fork-child.c: Update.
4762 * gnu-nat.c: Update.
4763 * go32-nat.c: Update.
4764 * inf-ptrace.c: Update.
4765 * infcmd.c: Update.
4766 * inferior.c: Update.
4767 * infrun.c: Update.
4768 * linux-fork.c: Update.
4769 * linux-nat.c: Update.
4770 * nat/aarch64-linux-hw-point.c: Update.
4771 * nat/fork-inferior.c: Update.
4772 * nat/x86-linux-dregs.c: Update.
4773 * nto-procfs.c: Update.
4774 * obsd-nat.c: Update.
4775 * procfs.c: Update.
4776 * progspace.c: Update.
4777 * remote.c: Update.
4778 * rs6000-nat.c: Update.
4779 * s390-linux-nat.c: Update.
4780 * sol-thread.c: Update.
4781 * spu-linux-nat.c: Update.
4782 * target.c: Update.
4783 * top.c: Update.
4784 * tracefile-tfile.c: Update.
4785 * windows-nat.c: Update.
4786
4787 2018-07-03 Tom Tromey <tom@tromey.com>
4788
4789 * common/ptid.h (ptid_build): Don't declare.
4790 * common/ptid.c (ptid_build): Remove.
4791 * aix-thread.c: Update.
4792 * bsd-kvm.c: Update.
4793 * bsd-uthread.c: Update.
4794 * common/agent.c: Update.
4795 * common/ptid.c: Update.
4796 * common/ptid.h: Update.
4797 * corelow.c: Update.
4798 * darwin-nat.c: Update.
4799 * fbsd-nat.c: Update.
4800 * gnu-nat.c: Update.
4801 * linux-fork.c: Update.
4802 * linux-nat.c: Update.
4803 * linux-thread-db.c: Update.
4804 * nat/linux-osdata.c: Update.
4805 * nat/linux-procfs.c: Update.
4806 * nto-procfs.c: Update.
4807 * obsd-nat.c: Update.
4808 * proc-service.c: Update.
4809 * procfs.c: Update.
4810 * ravenscar-thread.c: Update.
4811 * remote-sim.c: Update.
4812 * remote.c: Update.
4813 * sol-thread.c: Update.
4814 * target.c: Update.
4815 * windows-nat.c: Update.
4816
4817 2018-07-03 Tom Tromey <tom@tromey.com>
4818
4819 * infrun.c (follow_exec): Use exit_inferior_silent.
4820 * inferior.c (exit_inferior_num_silent): Remove.
4821 * inferior.h (exit_inferior_num_silent): Don't declare.
4822
4823 2018-07-03 Tom Tromey <tom@tromey.com>
4824
4825 PR cli/23340:
4826 * darwin-nat.c (darwin_attach_pid): Reset inferior and
4827 inferior_ptid on error.
4828
4829 2018-07-02 Maciej W. Rozycki <macro@mips.com>
4830 Simon Marchi <simon.marchi@polymtl.ca>
4831
4832 PR tdep/8282
4833 * disasm.h (gdb_disassembler): Add
4834 `m_disassembler_options_holder'. member
4835 * disasm.c (get_all_disassembler_options): New function.
4836 (gdb_disassembler::gdb_disassembler): Use it.
4837 (gdb_buffered_insn_length_init_dis): Likewise.
4838 (gdb_buffered_insn_length): Adjust accordingly.
4839 (set_disassembler_options): Handle options with arguments.
4840 (show_disassembler_options_sfunc): Likewise. Add a leading new
4841 line if showing options with descriptions.
4842 (disassembler_options_completer): Adapt to using the
4843 `disasm_options_and_args_t' structure.
4844 * mips-tdep.c (mips_disassembler_options): New variable.
4845 (mips_disassembler_options_o32): Likewise.
4846 (mips_disassembler_options_n32): Likewise.
4847 (mips_disassembler_options_n64): Likewise.
4848 (gdb_print_insn_mips): Don't set `disassembler_options'.
4849 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4850 functions.
4851 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4852 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
4853 `gdbarch_disassembler_options_implicit' and
4854 `gdbarch_valid_disassembler_options'.
4855 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4856 `disasm_options_and_args_t' structure.
4857 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4858 method.
4859 (valid_disassembler_options): Switch from `disasm_options_t' to
4860 the `disasm_options_and_args_t' structure.
4861 * NEWS: Document `set disassembler-options' support for the MIPS
4862 target.
4863 * gdbarch.h: Regenerate.
4864 * gdbarch.c: Regenerate.
4865
4866 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
4867
4868 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4869
4870 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4871
4872 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4873 parameter in call to amd64_target_description.
4874 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4875 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4876 (amd64fbsd_init_abi): Likewise.
4877 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4878 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4879 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4880 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4881
4882 2018-06-29 Pedro Alves <palves@redhat.com>
4883
4884 * gdb/amd64-tdep.h (amd64_create_target_description): Add
4885 "segments" parameter.
4886 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4887 (_initialize_amd64_tdep): Update call to
4888 amd64_create_target_description.
4889 (amd64_target_description): Add "segments" parameter. Adjust
4890 the implementation to use it.
4891 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4892 call to amd64_create_target_description.
4893 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4894 * gdb/arch/amd64.h (amd64_create_target_description): Add
4895 "segments" register.
4896 * gdb/arch/amd64.c (amd64_create_target_description): Add
4897 "segments" parameter. Call create_feature_i386_64bit_segments
4898 only if SEGMENTS is true.
4899 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4900 call to amd64_create_target_description.
4901
4902 2018-06-29 Pedro Alves <palves@redhat.com>
4903
4904 * thread.c (thread_target_id_str): New, factored out from ...
4905 (print_thread_info_1): ... here. Use it to compute the max
4906 "Target Id" column width.
4907
4908 2018-06-29 Pedro Alves <palves@redhat.com>
4909
4910 * remote.c (remote_target::extra_thread_info): Delete
4911 'display_buf' and 'n' locals. from the cache, regardless of
4912 packet mechanims is in use. Use cache for qThreadExtra and qP
4913 methods too.
4914
4915 2018-06-29 Pedro Alves <palves@redhat.com>
4916
4917 * blockframe.c (find_pc_sect_containing_function): New function.
4918 * breakpoint.c (print_breakpoint_location): Don't call
4919 find_pc_sect_function.
4920 * linespec.c (create_sals_line_offset): Record the location's
4921 symbol in the sal.
4922 * linespec.c (convert_address_location_to_sals): Fill in sal's
4923 symbol with find_pc_sect_containing_function.
4924 * symtab.c (find_function_start_sal): Rename to ...
4925 (find_function_start_sal_1): ... this.
4926 (find_function_start_sal): Reimplement as wrapper around
4927 find_function_start_sal_1, and use
4928 find_pc_sect_containing_function to fill in the sal's symbol.
4929 (find_function_start_sal(symbol*, bool)): Adjust.
4930 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4931 comments.
4932 (find_pc_sect_containing_function): Declare.
4933
4934 2018-06-29 Pedro Alves <palves@redhat.com>
4935
4936 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4937 true if the the location has no symbol.
4938
4939 2018-06-28 Tom Tromey <tom@tromey.com>
4940
4941 * NEWS: Mention --enable-codesign.
4942 * silent-rules.mk (ECHO_SIGN): New variable.
4943 * configure.ac: Add --enable-codesign.
4944 * configure: Rebuild.
4945 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4946 (gdb$(EXEEXT)): Optionally invoke codesign.
4947
4948 2018-06-28 Pedro Alves <palves@redhat.com>
4949
4950 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4951 comments.
4952 (switch_to_thread_no_regs): Adjust comment.
4953 * infcmd.c (stop_pc): Delete.
4954 (post_create_inferior, info_program_command): Replace references
4955 to stop_pc with references to thread_info->suspend.stop_pc.
4956 * inferior.h (stop_pc): Delete declaration.
4957 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4958 (handle_inferior_event_1, handle_signal_stop)
4959 (process_event_stop_test, keep_going_stepped_thread)
4960 (handle_step_into_function, handle_step_into_function_backward)
4961 (print_stop_location): Replace references to stop_pc with
4962 references to thread_info->suspend.stop_pc.
4963 (struct infcall_suspend_state) <stop_pc>: Delete field.
4964 (save_infcall_suspend_state, restore_infcall_suspend_state):
4965 Remove references to inf_stat->stop_pc.
4966 * linux-fork.c (fork_load_infrun_state): Likewise.
4967 * record-btrace.c (record_btrace_set_replay): Likewise.
4968 * record-full.c (record_full_goto_entry): Likewise.
4969 * remote.c (print_one_stopped_thread): Likewise.
4970 * target.c (target_resume): Extend comment.
4971 * thread.c (set_executing_thread): New.
4972 (set_executing): Use it.
4973 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4974 Remove references to stop_pc.
4975
4976 2018-06-28 Pedro Alves <palves@redhat.com>
4977
4978 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4979 Moving fetching stop_pc until after ecs->event_thread is refreshed.
4980
4981 2018-06-28 Tom Tromey <tom@tromey.com>
4982
4983 * coffread.c (coff_symfile_finish): Update.
4984 * xcoffread.c (xcoff_symfile_finish): Update.
4985 * elfread.c (elf_symfile_finish): Update.
4986 * symfile.h (dwarf2_free_objfile): Don't declare.
4987 * dwarf2read.c (_initialize_dwarf2_read): Use
4988 register_objfile_data_with_cleanup.
4989 (dwarf2_free_objfile): Now static. Change signature.
4990
4991 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4992
4993 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4994 option "-o" to add-symbol-file-load to add an offset to each
4995 section's load address.
4996 * symfile.c (set_objfile_default_section_offset): New function.
4997
4998 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
4999
5000 * symfile.c (add_symbol_file_command): Make sure that sections
5001 with the same name are sorted in the same order.
5002
5003 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5004
5005 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5006 require the second argument. If omitted, load sections at the
5007 addresses specified in the file.
5008
5009 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5010
5011 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5012 (_initialize_symfile): Add option "-o" to symbol-file to add an
5013 offset to each section of the symbol file.
5014
5015 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5016
5017 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5018
5019 2018-06-27 Tom Tromey <tom@tromey.com>
5020
5021 * stack.c (_initialize_stack): Update "func" help text.
5022
5023 2018-06-27 Tom Tromey <tom@tromey.com>
5024
5025 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5026 std::vector.
5027 (unwind_infopy_str, pyuw_create_unwind_info)
5028 (unwind_infopy_add_saved_register, pyuw_sniffer)
5029 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5030 Update.
5031 (struct saved_reg): Add constructor.
5032 <value>: Now a gdbpy_ref<>.
5033
5034 2018-06-27 Tom Tromey <tom@tromey.com>
5035
5036 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5037
5038 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5039
5040 * gdb-gdb.py.in: Format using autopep8.
5041
5042 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5043
5044 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5045 (type_lookup_function): Recognize CORE_ADDR values.
5046
5047 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5048
5049 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5050 print tag_name.
5051
5052 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5053
5054 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5055 <__lt__>: Add.
5056
5057 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5058
5059 * gdb-gdb.py: Move to...
5060 * gdb-gdb.py.in: ... here.
5061 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5062 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5063 dependencies.
5064 (distclean): Remove gdb-gdb.py when cleaning.
5065 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5066 * configure: Re-generate.
5067
5068 2018-06-27 Pedro Alves <palves@redhat.com>
5069
5070 * proc-service.c (get_ps_regcache): New.
5071 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5072 (ps_lsetfpregs): Use it.
5073
5074 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5075
5076 PR gdb/21695
5077 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5078 (dwarf_decode_lines_1): Adjust.
5079
5080 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5081
5082 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5083 override.
5084 <info_proc>: Likewise.
5085
5086 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5087
5088 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5089 to windows_fetch_one_register, and only handle the case of
5090 fetching one register. Move the code that reloads the context
5091 and iterates over all registers if R is negative to...
5092 (windows_nat_target::fetch_registers): ... here.
5093 (do_windows_store_inferior_registers): Rename to
5094 windows_store_one_register, and only handle the case of storing
5095 one register. Move the code that handles the case where r is
5096 negative to...
5097 (windows_nat_target::store_registers) ... here.
5098
5099 2018-06-26 Tom Tromey <tom@tromey.com>
5100
5101 PR rust/22574:
5102 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5103 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5104 Update.
5105 (rust_internal_print_type): Add podata parameter.
5106 (rust_print_type): Update.
5107
5108 2018-06-26 Tom Tromey <tom@tromey.com>
5109
5110 * typeprint.h (struct print_offset_data) <update, finish,
5111 maybe_print_hole>: New methods.
5112 <indentation>: New constant.
5113 * typeprint.c (print_offset_data::indentation): Define.
5114 (print_offset_data::maybe_print_hole, print_offset_data::update)
5115 (print_offset_data::finish): Move from c-typeprint.c and rename.
5116 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5117 (print_spaces_filtered_with_print_options): Update.
5118 (c_print_type_union_field_offset, maybe_print_hole)
5119 (c_print_type_struct_field_offset): Move to typeprint.c and
5120 rename.
5121 (c_type_print_base_struct_union): Update.
5122
5123 2018-06-25 Pedro Alves <palves@redhat.com>
5124
5125 * gdbthread.h (thread_info_ref, delete_thread)
5126 (delete_thread_silent, first_thread_of_inferior)
5127 (any_thread_of_inferior, switch_to_thread)
5128 (enable_thread_stack_temporaries)
5129 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5130 (get_last_thread_stack_temporary)
5131 (value_in_thread_stack_temporaries, can_access_registers_thread):
5132 Spell out "struct thread_info" instead of just "thread_info".
5133 * inferior.h (notice_new_inferior): Likewise.
5134
5135 2018-06-25 Pedro Alves <palves@redhat.com>
5136
5137 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5138 pass thread_info pointer to delete_thread.
5139 (windows_nat_target::detach): Pass inferior pointer to
5140 detach_inferior.
5141 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5142 delete_thread.
5143 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5144 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5145 and pass a thread_info pointer to delete_thread.
5146 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5147 pass thread_info pointer to delete_thread.
5148 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5149 delete_thread_silent call.
5150 * procfs.c (procfs_target::detach): Pass inferior pointer to
5151 detach_inferior.
5152 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5153 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5154 delete_thread_silent call.
5155 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5156 pass thread_info pointer to delete_thread.
5157 (windows_nat_target::detach): Pass inferior pointer to
5158 delete_inferior.
5159
5160 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5161
5162 * regcache.c (readable_regcache::read_part): Fix asserts.
5163 (reg_buffer::raw_collect_part): New function.
5164 (regcache::write_part): Fix asserts.
5165 (reg_buffer::raw_supply_part): New function.
5166 (regcache::transfer_regset_register): New helper function.
5167 (regcache::transfer_regset): Call new functions.
5168 (regcache_supply_regset): Use gdb_byte*.
5169 (regcache::supply_regset): Likewise.
5170 (regcache_collect_regset): Likewise.
5171 (regcache::collect_regset): Likewise.
5172 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5173 (reg_buffer::raw_supply_part): Likewise.
5174 (regcache::transfer_regset_register): Likewise.
5175 (regcache::transfer_regset): Use gdb_byte*.
5176
5177 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5178
5179 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5180
5181 2018-06-21 Pedro Alves <palves@redhat.com>
5182
5183 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5184 instead of a ptid_t. All callers adjusted.
5185 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5186 adjusted.
5187 (print_ada_task_info, display_current_task_id, task_command_1):
5188 Adjust.
5189 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5190 inferior_thread.
5191 (breakpoint_kind): Adjust.
5192 (remove_breakpoints_pid): Rename to ...
5193 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5194 pointer. All callers adjusted.
5195 (bpstat_clear_actions): Use inferior_thread.
5196 (get_bpstat_thread): New.
5197 (bpstat_do_actions): Use it.
5198 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5199 to take a thread_info pointer. All callers adjusted.
5200 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5201 (breakpoint_re_set_thread): Use inferior_thread.
5202 * breakpoint.h (struct inferior): Forward declare.
5203 (bpstat_stop_status): Update.
5204 (remove_breakpoints_pid): Delete.
5205 (remove_breakpoints_inf): New.
5206 * bsd-uthread.c (bsd_uthread_target::wait)
5207 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5208 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5209 (maint_btrace_packet_history_cmd)
5210 (maint_btrace_clear_packet_history_cmd): Adjust.
5211 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5212 inferior_thread.
5213 * cli/cli-interp.c: Include "inferior.h".
5214 * common/refcounted-object.h (struct
5215 refcounted_object_ref_policy): New.
5216 * compile/compile-object-load.c: Include gdbthread.h.
5217 (store_regs): Use inferior_thread.
5218 * corelow.c (core_target::close): Use current_inferior.
5219 (core_target_open): Adjust to use first_thread_of_inferior and use
5220 the current inferior.
5221 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5222 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5223 <thread>: ... this new field. All references adjusted.
5224 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5225 Take a thread_info pointer instead of a ptid_t.
5226 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5227 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5228 thread_info pointer instead of a ptid_t.
5229 * elfread.c: Include "inferior.h".
5230 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5231 Use inferior_thread.
5232 * eval.c (evaluate_subexp): Likewise.
5233 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5234 inferior_thread.
5235 * gdb_proc_service.h (struct thread_info): Forward declare.
5236 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5237 <thread>: ... this new field. All references adjusted.
5238 * gdbarch.h, gdbarch.c: Regenerate.
5239 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5240 'thread' parameter. All implementations and callers adjusted.
5241 * gdbthread.h (thread_info) <set_running>: New method.
5242 (delete_thread, delete_thread_silent): Take a thread_info pointer
5243 instead of a ptid.
5244 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5245 (first_thread_of_process): Delete, replaced by ...
5246 (first_thread_of_inferior): ... this new function. All callers
5247 adjusted.
5248 (any_live_thread_of_process): Delete, replaced by ...
5249 (any_live_thread_of_inferior): ... this new function. All callers
5250 adjusted.
5251 (switch_to_thread, switch_to_no_thread): Declare.
5252 (is_executing): Delete.
5253 (enable_thread_stack_temporaries): Update comment.
5254 <enable_thread_stack_temporaries>: Take a thread_info pointer
5255 instead of a ptid_t. Incref the thread.
5256 <~enable_thread_stack_temporaries>: Decref the thread.
5257 <m_ptid>: Delete
5258 <m_thr>: New.
5259 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5260 (get_last_thread_stack_temporary)
5261 (value_in_thread_stack_temporaries, can_access_registers_thread):
5262 Take a thread_info pointer instead of a ptid_t. All callers
5263 adjusted.
5264 * infcall.c (get_call_return_value): Use inferior_thread.
5265 (run_inferior_call): Work with thread pointers instead of ptid_t.
5266 (call_function_by_hand_dummy): Work with thread pointers instead
5267 of ptid_t. Use thread_info_ref.
5268 * infcmd.c (proceed_thread_callback): Access thread's state
5269 directly.
5270 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5271 access thread's state directly.
5272 (continue_command): Use inferior_thread.
5273 (info_program_command): Use find_thread_ptid and access thread
5274 state directly.
5275 (proceed_after_attach_callback): Use thread state directly.
5276 (notice_new_inferior): Take a thread_info pointer instead of a
5277 ptid_t. All callers adjusted.
5278 (exit_inferior): Take an inferior pointer instead of a pid. All
5279 callers adjusted.
5280 (exit_inferior_silent): New.
5281 (detach_inferior): Delete.
5282 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5283 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5284 (detach_inferior_command, kill_inferior_command): Use
5285 find_inferior_id instead of valid_gdb_inferior_id and
5286 gdb_inferior_id_to_pid.
5287 (inferior_command): Use inferior and thread pointers.
5288 * inferior.h (struct thread_info): Forward declare.
5289 (notice_new_inferior): Take a thread_info pointer instead of a
5290 ptid_t. All callers adjusted.
5291 (detach_inferior): Delete declaration.
5292 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5293 instead of a pid. All callers adjusted.
5294 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5295 (valid_gdb_inferior_id): Delete.
5296 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5297 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5298 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5299 ...
5300 <inf>: ... this new field.
5301 <step_ptid>: Delete, replaced by ...
5302 <step_thread>: ... this new field.
5303 (get_displaced_stepping_state): Take an inferior pointer instead
5304 of a pid. All callers adjusted.
5305 (displaced_step_in_progress_any_inferior): Adjust.
5306 (displaced_step_in_progress_thread): Take a thread pointer instead
5307 of a ptid_t. All callers adjusted.
5308 (displaced_step_in_progress, add_displaced_stepping_state): Take
5309 an inferior pointer instead of a pid. All callers adjusted.
5310 (get_displaced_step_closure_by_addr): Adjust.
5311 (remove_displaced_stepping_state): Take an inferior pointer
5312 instead of a pid. All callers adjusted.
5313 (displaced_step_prepare_throw, displaced_step_prepare)
5314 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5315 All callers adjusted.
5316 (start_step_over): Adjust.
5317 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5318 displaced step queue.
5319 (do_target_resume): Adjust.
5320 (fetch_inferior_event): Use inferior_thread.
5321 (context_switch, get_inferior_stop_soon): Take an
5322 execution_control_state pointer instead of a ptid_t. All callers
5323 adjusted.
5324 (switch_to_thread_cleanup): Delete.
5325 (stop_all_threads): Use scoped_restore_current_thread.
5326 * inline-frame.c: Include "gdbthread.h".
5327 (inline_state) <inline_state>: Take a thread pointer instead of a
5328 ptid_t. All callers adjusted.
5329 <ptid>: Delete, replaced by ...
5330 <thread>: ... this new field.
5331 (find_inline_frame_state): Take a thread pointer instead of a
5332 ptid_t. All callers adjusted.
5333 (skip_inline_frames, step_into_inline_frame)
5334 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5335 pointer instead of a ptid_t. All callers adjusted.
5336 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5337 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5338 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5339 pointers directly.
5340 * linux-nat.c (get_detach_signal): Likewise.
5341 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5342 (thread_db_notice_clone): Adjust.
5343 (thread_db_find_new_threads_silently)
5344 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5345 a thread pointer instead of a ptid_t. All callers adjusted.
5346 * mi/mi-cmd-var.c: Include "inferior.h".
5347 (mi_cmd_var_update_iter): Update to use thread pointers.
5348 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5349 inferior directly.
5350 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5351 out to ...
5352 (mi_output_running): ... this new function.
5353 (mi_on_resume_1): Adjust to use it.
5354 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5355 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5356 directly.
5357 (interrupt_thread_callback): : Adjust to use thread and inferior
5358 pointers.
5359 * proc-service.c: Include "gdbthread.h".
5360 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5361 * progspace-and-thread.c: Include "inferior.h".
5362 * progspace.c: Include "inferior.h".
5363 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5364 hold a reference to an inferior_object.
5365 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5366 inferior_thread.
5367 * python/py-inferior.c (struct inferior_object): Give the type a
5368 tag name instead of a typedef.
5369 (python_on_normal_stop): No need to check if the current thread is
5370 listed.
5371 (inferior_to_inferior_object): Change return type to
5372 inferior_object. All callers adjusted.
5373 (find_thread_object): Delete, bits factored out to ...
5374 (thread_to_thread_object): ... this new function.
5375 * python/py-infthread.c (create_thread_object): Use
5376 inferior_to_inferior_object.
5377 (thpy_is_stopped): Use thread pointer directly.
5378 (gdbpy_selected_thread): Use inferior_thread.
5379 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5380 field, replaced with ...
5381 <thread>: ... this new field. All users adjusted.
5382 (btpy_insn_or_gap_new): Drop const.
5383 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5384 callers adjusted.
5385 * python/py-record.c: Include "gdbthread.h".
5386 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5387 a ptid_t. All callers adjusted.
5388 (gdbpy_current_recording): Use inferior_thread.
5389 * python/py-record.h (recpy_record_object) <ptid>: Delete
5390 field, replaced with ...
5391 <thread>: ... this new field. All users adjusted.
5392 (recpy_element_object) <ptid>: Delete
5393 field, replaced with ...
5394 <thread>: ... this new field. All users adjusted.
5395 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5396 a ptid_t. All callers adjusted.
5397 * python/py-threadevent.c: Include "gdbthread.h".
5398 (get_event_thread): Use thread_to_thread_object.
5399 * python/python-internal.h (struct inferior_object): Forward
5400 declare.
5401 (find_thread_object, find_inferior_object): Delete declarations.
5402 (thread_to_thread_object, inferior_to_inferior_object): New
5403 declarations.
5404 * record-btrace.c: Include "inferior.h".
5405 (require_btrace_thread): Use inferior_thread.
5406 (record_btrace_frame_sniffer)
5407 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5408 (get_thread_current_frame): Use scoped_restore_current_thread and
5409 switch_to_thread.
5410 (get_thread_current_frame): Use thread pointer directly.
5411 (record_btrace_replay_at_breakpoint): Use thread's inferior
5412 pointer directly.
5413 * record-full.c: Include "inferior.h".
5414 * regcache.c: Include "gdbthread.h".
5415 (get_thread_arch_regcache): Use the inferior's address space
5416 directly.
5417 (get_thread_regcache, registers_changed_thread): New.
5418 * regcache.h (get_thread_regcache(thread_info *thread)): New
5419 overload.
5420 (registers_changed_thread): New.
5421 (remote_target) <remote_detach_1>: Swap order of parameters.
5422 (remote_add_thread): <remote_add_thread>: Return the new thread.
5423 (get_remote_thread_info(ptid_t)): New overload.
5424 (remote_target::remote_notice_new_inferior): Use thread pointers
5425 directly.
5426 (remote_target::process_initial_stop_replies): Use
5427 thread_info::set_running.
5428 (remote_target::remote_detach_1, remote_target::detach)
5429 (extended_remote_target::detach): Adjust.
5430 * stack.c (frame_show_address): Use inferior_thread.
5431 * target-debug.h (target_debug_print_thread_info_pp): New.
5432 * target-delegates.c: Regenerate.
5433 * target.c (default_thread_address_space): Delete.
5434 (memory_xfer_partial_1): Use current_inferior.
5435 (target_detach): Use current_inferior.
5436 (target_thread_address_space): Delete.
5437 (generic_mourn_inferior): Use current_inferior.
5438 * target.h (struct target_ops) <thread_address_space>: Delete.
5439 (target_thread_address_space): Delete.
5440 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5441 pointers directly.
5442 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5443 thread pointer instead of a ptid_t. Adjust all callers.
5444 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5445 (first_thread_of_process): Delete, replaced by ...
5446 (first_thread_of_inferior): ... this new function. All callers
5447 adjusted.
5448 (any_thread_of_process): Rename to ...
5449 (any_thread_of_inferior): ... this, and take an inferior pointer.
5450 (any_live_thread_of_process): Rename to ...
5451 (any_live_thread_of_inferior): ... this, and take an inferior
5452 pointer.
5453 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5454 (value_in_thread_stack_temporaries)
5455 (get_last_thread_stack_temporary): Take a thread pointer instead
5456 of a ptid_t. Adjust all callers.
5457 (thread_info::set_running): New.
5458 (validate_registers_access): Use inferior_thread.
5459 (can_access_registers_ptid): Rename to ...
5460 (can_access_registers_thread): ... this, and take a thread
5461 pointer.
5462 (print_thread_info_1): Adjust to compare thread pointers instead
5463 of ptids.
5464 (switch_to_no_thread, switch_to_thread): Make extern.
5465 (scoped_restore_current_thread::~scoped_restore_current_thread):
5466 Use m_thread pointer directly.
5467 (scoped_restore_current_thread::scoped_restore_current_thread):
5468 Use inferior_thread.
5469 (thread_command): Use thread pointer directly.
5470 (thread_num_make_value_helper): Use inferior_thread.
5471 * top.c (execute_command): Use inferior_thread.
5472 * tui/tui-interp.c: Include "inferior.h".
5473 * varobj.c (varobj_create): Use inferior_thread.
5474 (value_of_root_1): Use find_thread_global_id instead of
5475 global_thread_id_to_ptid.
5476
5477 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5478
5479 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5480 possible.
5481 (regcache::write_part): Likewise.
5482 (readable_regcache::cooked_read_part): Update comment.
5483 (readable_regcache::cooked_write_part): Likewise.
5484 * regcache.h: (readable_regcache::read_part): Likewise.
5485 (regcache::write_part): Likewise.
5486
5487 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5488 Dirk Schubert <dirk.schubert@arm.com>
5489
5490 * aarch64-linux-nat.c (post_attach): New.
5491 (aarch64_linux_nat_target::post_attach): Override post_attach to
5492 record the number of hardware debug registers.
5493
5494 2018-06-20 Tom Tromey <tom@tromey.com>
5495
5496 * python/py-param.c (add_setshow_generic): Make parameters const.
5497 (parmpy_init): Update.
5498
5499 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5500
5501 * regcache.h (regcache_cooked_read_ftype): Rename to...
5502 (register_read_ftype): ...this, change type to function_view.
5503 (class reg_buffer) <save>: Remove src parameter.
5504 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5505 parameter non-const in first overload. Remove src parameter in
5506 second overload.
5507 * regcache.c (do_cooked_read): Remove.
5508 (readonly_detached_regcache::readonly_detached_regcache): Make
5509 parameter non-const, adjust call to other constructor.
5510 (reg_buffer::save): Remove src parameter.
5511 * frame.c (do_frame_register_read): Remove.
5512 (frame_save_as_regcache): Use lambda function.
5513 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5514 parameter to ppu2spu_data *.
5515 (ppu2spu_sniffer): Use lambda function.
5516
5517 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5518
5519 * record-full.c (record_full_target::insert_breakpoint): Remove
5520 "struct" keyword, add const.
5521
5522 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5523
5524 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5525 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5526 * configure.ac: Remove AC_PREREQ, add missing quoting.
5527 * gnulib/configure.ac: Modernize usage of
5528 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5529 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5530 (AUTOMAKE_VERSION): Bump to 1.15.1.
5531 * configure: Re-generate.
5532 * config.in: Re-generate.
5533 * aclocal.m4: Re-generate.
5534 * gnulib/aclocal.m4: Re-generate.
5535 * gnulib/config.in: Re-generate.
5536 * gnulib/configure: Re-generate.
5537 * gnulib/import/Makefile.in: Re-generate.
5538
5539 2018-06-19 Pedro Alves <palves@redhat.com>
5540
5541 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5542 (lookup_minimal_symbol_by_pc_section): ... here with
5543 gdb_assert_not_reached added.
5544
5545 2018-06-19 Pedro Alves <palves@redhat.com>
5546
5547 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5548 parameter with a block parameter. Compare location's block symbol
5549 with the frame's block instead of addresses.
5550 (skip_inline_frames): Pass the current block instead of the
5551 frame's address. Break out as soon as we determine the frame
5552 should not be skipped.
5553
5554 2018-06-18 Tom Tromey <tom@tromey.com>
5555
5556 * solib-aix.c (solib_aix_get_section_offsets): Return
5557 unique_xmalloc_ptr.
5558 (solib_aix_solib_create_inferior_hook): Update.
5559
5560 2018-06-18 Tom Tromey <tom@tromey.com>
5561
5562 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5563
5564 2018-06-18 Tom Tromey <tom@tromey.com>
5565
5566 * solib-frv.c (frv_relocate_main_executable): Use
5567 unique_xmalloc_ptr.
5568 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5569 unique_xmalloc_ptr.
5570
5571 2018-06-18 Tom Tromey <tom@tromey.com>
5572
5573 * objfiles.h (inhibit_section_map_updates): Update.
5574 (resume_section_map_updates, resume_section_map_updates_cleanup):
5575 Remove.
5576 * solib-svr4.c (svr4_handle_solib_event): Update.
5577 * objfiles.c (inhibit_section_map_updates): Return
5578 scoped_restore_tmpl<int>.
5579 (resume_section_map_updates, resume_section_map_updates_cleanup):
5580 Remove.
5581
5582 2018-06-18 Tom Tromey <tom@tromey.com>
5583
5584 * valprint.h (read_string): Update.
5585 * valprint.c (read_string): Change type of "buffer".
5586 (val_print_string): Update.
5587 * python/py-value.c (valpy_string): Update.
5588 * language.h (struct language_defn) <la_get_string>: Change
5589 type of "buffer".
5590 (default_get_string, c_get_string): Update.
5591 * language.c (default_get_string): Change type of "buffer".
5592 * guile/scm-value.c (gdbscm_value_to_string): Update.
5593 * c-lang.c (c_get_string): Change type of "buffer".
5594
5595 2018-06-18 Tom Tromey <tom@tromey.com>
5596
5597 * ser-mingw.c (struct pipe_state_destroyer): New.
5598 (pipe_state_up): New typedef.
5599 (cleanup_pipe_state): Remove.
5600 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5601
5602 2018-06-18 Tom Tromey <tom@tromey.com>
5603
5604 * rust-lang.h (rust_yyerror): Don't declare.
5605 * rust-lang.c (rust_language_defn): Update.
5606 * rust-exp.y (yyerror): Now static.
5607 * parse.c (parse_exp_in_context_1): Update.
5608 * p-lang.h (p_yyerror): Don't declare.
5609 * p-lang.c (p_language_defn): Update.
5610 * p-exp.y (yyerror): Now static.
5611 * opencl-lang.c (opencl_language_defn): Update.
5612 * objc-lang.c (objc_language_defn): Update.
5613 * m2-lang.h (m2_yyerror): Don't declare.
5614 * m2-lang.c (m2_language_defn): Update.
5615 * m2-exp.y (yyerror): Now static.
5616 * language.h (struct language_defn) <la_error>: Remove.
5617 * language.c (unk_lang_error): Remove.
5618 (unknown_language_defn, auto_language_defn): Remove.
5619 * go-lang.h (go_yyerror): Don't declare.
5620 * go-lang.c (go_language_defn): Update.
5621 * go-exp.y (yyerror): Now static.
5622 * f-lang.h (f_yyerror): Don't declare.
5623 * f-lang.c (f_language_defn): Update.
5624 * f-exp.y (yyerror): Now static.
5625 * d-lang.h (d_yyerror): Don't declare.
5626 * d-lang.c (d_language_defn): Update.
5627 * d-exp.y (yyerror): Now static.
5628 * c-lang.h (c_yyerror): Don't declare.
5629 * c-lang.c (c_language_defn, cplus_language_defn)
5630 (asm_language_defn, minimal_language_defn): Update.
5631 * c-exp.y (yyerror): Now static.
5632 * ada-lang.h (ada_yyerror): Don't declare.
5633 * ada-lang.c (ada_language_defn): Update.
5634 * ada-exp.y (yyerror): Now static.
5635
5636 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5637
5638 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5639 (store_sveregs_to_thread): Likewise.
5640 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5641 (aarch64_linux_store_inferior_registers): Likewise.
5642 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5643 function.
5644 (aarch64_sve_regs_copy_to_regcache): Likewise.
5645 (aarch64_sve_regs_copy_from_regcache): Likewise.
5646 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5647 declaration.
5648 (aarch64_sve_regs_copy_to_regcache): Likewise.
5649 (aarch64_sve_regs_copy_from_regcache): Likewise.
5650 (sve_context): Structure from Linux headers.
5651 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5652 (SVE_SIG_ZREG_SIZE): Likewise.
5653 (SVE_SIG_PREG_SIZE): Likewise.
5654 (SVE_SIG_FFR_SIZE): Likewise.
5655 (SVE_SIG_REGS_OFFSET): Likewise.
5656 (SVE_SIG_ZREGS_OFFSET): Likewise.
5657 (SVE_SIG_ZREG_OFFSET): Likewise.
5658 (SVE_SIG_ZREGS_SIZE): Likewise.
5659 (SVE_SIG_PREGS_OFFSET): Likewise.
5660 (SVE_SIG_PREG_OFFSET): Likewise.
5661 (SVE_SIG_PREGS_SIZE): Likewise.
5662 (SVE_SIG_FFR_OFFSET): Likewise.
5663 (SVE_SIG_REGS_SIZE): Likewise.
5664 (SVE_SIG_CONTEXT_SIZE): Likewise.
5665 (SVE_PT_REGS_MASK): Likewise.
5666 (SVE_PT_REGS_FPSIMD): Likewise.
5667 (SVE_PT_REGS_SVE): Likewise.
5668 (SVE_PT_VL_INHERIT): Likewise.
5669 (SVE_PT_VL_ONEXEC): Likewise.
5670 (SVE_PT_REGS_OFFSET): Likewise.
5671 (SVE_PT_FPSIMD_OFFSET): Likewise.
5672 (SVE_PT_FPSIMD_SIZE): Likewise.
5673 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5674 (SVE_PT_SVE_PREG_SIZE): Likewise.
5675 (SVE_PT_SVE_FFR_SIZE): Likewise.
5676 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5677 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5678 (__SVE_SIG_TO_PT): Likewise.
5679 (SVE_PT_SVE_OFFSET): Likewise.
5680 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5681 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5682 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5683 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5684 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5685 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5686 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5687 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5688 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5689 (SVE_PT_SVE_SIZE): Likewise.
5690 (SVE_PT_SIZE): Likewise.
5691 (HAS_SVE_STATE): New define.
5692
5693 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5694
5695 * nat/aarch64-sve-linux-sigcontext.h: New file.
5696 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5697 new files.
5698 (SVE_VQ_MIN): Likewise.
5699 (SVE_VQ_MAX): Likewise.
5700 (SVE_VL_MIN): Likewise.
5701 (SVE_VL_MAX): Likewise.
5702 (SVE_NUM_ZREGS): Likewise.
5703 (SVE_NUM_PREGS): Likewise.
5704 (sve_vl_valid): Likewise.
5705 (struct user_sve_header): Likewise.
5706
5707 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5708 Richard Bunt <Richard.Bunt@arm.com>
5709
5710 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5711 was requested by GDB.
5712
5713 2018-06-15 Tom de Vries <tdevries@suse.de>
5714
5715 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5716
5717 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5718
5719 * gnulib/update-gnulib.sh: Print expected versions of
5720 autoconf/aclocal.
5721
5722 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5723
5724 * arch-utils.c (default_type_align): Use type_length_units.
5725 * gdbtypes.c (type_align): Use type_length_units.
5726
5727 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5728
5729 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5730 of 'define' command.
5731
5732 2018-06-14 Tom de Vries <tdevries@suse.de>
5733
5734 PR cli/22573
5735 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5736 get_no_prettyformat_print_options.
5737
5738 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5739
5740 * sparc-nat.h: Include target.h.
5741 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5742 <fetch_registers>: Remove this argument in function call.
5743 <store_registers>: Remove this argument in function call, remove
5744 extra semicolon.
5745 <low_forget_process>: Call sparc64_forget_process instead of
5746 sparc_forget_process.
5747
5748 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5749
5750 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5751 (procfs_target::make_corefile_notes): Adjust to new
5752 target_read_alloc return type.
5753
5754 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5755 Stephen Roberts <stephen.roberts@arm.com>
5756
5757 PR gdb/22882
5758 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5759 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5760 Move should_notify_stop local into more inner scope.
5761
5762 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5763 Stephen Roberts <stephen.roberts@arm.com>
5764
5765 PR gdb/22882
5766 * infrun.c (resume_1): Add call to mark_async_event_handler.
5767
5768 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5769
5770 * infrun.c (do_target_wait): Change old version of $pc printed.
5771
5772 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5773
5774 * dwarf2read.c (read_index_from_section): Rename to...
5775 (read_gdb_index_from_section): ... this, update all callers.
5776 (dwarf2_read_index): Rename to...
5777 (dwarf2_read_gdb_index): ... this, update all callers.
5778
5779 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5780
5781 * gdb/hppa-linux-nat.c
5782 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5783 hppa_linux_nat_target::fetch_registers.
5784
5785 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5786
5787 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5788 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5789 (AARCH64_DWARF_SVE_FFR): Likewise.
5790 (AARCH64_DWARF_SVE_P0): Likewise.
5791 (AARCH64_DWARF_SVE_Z0): Likewise.
5792
5793 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5794
5795 * common/common-regcache.h (raw_compare): New function.
5796 * regcache.c (regcache::raw_compare): Likewise.
5797 * regcache.h (regcache::raw_compare): New declaration.
5798
5799 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5800
5801 * common/common-regcache.h (reg_buffer_common): New structure.
5802 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5803 (reg_buffer::raw_supply): Likewise.
5804 (reg_buffer::raw_supply_integer): Likewise.
5805 (reg_buffer::raw_supply_zeroed): Likewise.
5806 (reg_buffer::raw_collect): Likewise.
5807 (reg_buffer::raw_collect_integer): Likewise.
5808 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5809 (reg_buffer::raw_supply): Likewise.
5810 (reg_buffer::raw_supply_integer): Likewise.
5811 (reg_buffer::raw_supply_zeroed): Likewise.
5812 (reg_buffer::raw_collect): Likewise.
5813 (reg_buffer::raw_collect_integer): Likewise.
5814
5815 2018-06-10 Tom Tromey <tom@tromey.com>
5816
5817 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5818 (class remote_state) <stop_reply_queue>: Now std::vector.
5819 (remote_state::~remote_state)
5820 (remote_target::stop_reply_queue_length): Update.
5821 (struct queue_iter_param, remove_child_of_pending_fork)
5822 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5823 (check_pending_event_prevents_wildcard_vcont_callback)
5824 (remove_stop_reply_for_inferior)
5825 (remove_stop_reply_of_remote_state)
5826 (remote_notif_remove_once_on_match)
5827 (stop_reply_match_ptid_and_ws)
5828 (remote_kill_child_of_pending_fork): Remove.
5829 (remote_target::remove_new_fork_children)
5830 (remote_target::check_pending_events_prevent_wildcard_vcont)
5831 (remote_target::discard_pending_stop_replies)
5832 (remote_target::discard_pending_stop_replies_in_queue)
5833 (remote_target::remote_notif_remove_queued_reply)
5834 (remote_target::queued_stop_reply)
5835 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5836 (remote_target::wait, remote_target::kill_new_fork_children)
5837 (remote_target::async): Update.
5838
5839 2018-06-10 Tom Tromey <tom@tromey.com>
5840
5841 * record-full.c (record_full_arch_list_cleanups): Remove.
5842 (record_full_message): Use try/catch.
5843 (record_full_wait_cleanups): Remove.
5844 (record_full_wait_1): Use try/catch.
5845 (record_full_restore): Likewise.
5846
5847 2018-06-10 Tom Tromey <tom@tromey.com>
5848
5849 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
5850 declare VEC. Add constructor.
5851 <in_target_beneath>: Now bool.
5852 (record_full_breakpoints): Now a std::vector, static.
5853 (record_full_sync_record_breakpoints)
5854 (record_full_init_record_breakpoints)
5855 (record_full_target::insert_breakpoint)
5856 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
5857
5858 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5859
5860 * dwarf2read.c (process_cu_includes): Remove struct keyword.
5861 * serial.c (serial_interface_lookup): Remove struct keyword.
5862
5863 2018-06-10 Tom Tromey <tom@tromey.com>
5864
5865 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5866 method.
5867 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5868 a method.
5869 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5870 method.
5871 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5872 "beneath" as a method.
5873 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5874 Use "beneath" as a method.
5875
5876 2018-06-10 Tom Tromey <tom@tromey.com>
5877
5878 * tracefile.c (struct trace_file_writer_deleter): New.
5879 <operator()>: Rename from trace_file_writer_xfree.
5880 (trace_file_writer_up): New typedef.
5881 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5882
5883 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5884
5885 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5886 <m_registers, m_register_status>: Change type to
5887 std::unique_ptr.
5888 * regcache.c (reg_buffer::reg_buffer): Use new instead of
5889 XCNEWVEC.
5890
5891 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
5892
5893 * common/common-regcache.h (enum register_status): Add
5894 underlying type "signed char".
5895 * regcache.h (reg_buffer) <m_register_status>: Change type to
5896 register_status *.
5897 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5898 register_status instead of signed char.
5899 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5900 (reg_buffer::get_register_status): Remove cast.
5901 (readable_regcache::raw_read): Remove cast.
5902 (readable_regcache::cooked_read): Remove cast.
5903
5904 2018-06-09 Tom Tromey <tom@tromey.com>
5905
5906 * source.c (reverse_search_command, forward_search_command): Use
5907 scoped_fd.
5908
5909 2018-06-09 Tom Tromey <tom@tromey.com>
5910
5911 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
5912 (serial_ops_list): Now static, std::vector.
5913 (serial_interface_lookup, serial_add_interface): Update.
5914
5915 2018-06-09 Tom Tromey <tom@tromey.com>
5916
5917 * dwarf2read.c (process_cu_includes): Update.
5918 (process_full_comp_unit): Update.
5919 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5920 std::vector.
5921
5922 2018-06-08 Paul Koning <paul_koning@dell.com>
5923
5924 PR gdb/23252
5925
5926 * python/python.c (do_start_initialization):
5927 Avoid call to internal Python API.
5928 (init__gdb_module): New function.
5929
5930 2018-06-08 Gary Benson <gbenson@redhat.com>
5931
5932 * linux-thread-db.c (valprint.h): New include.
5933 (struct check_thread_db_info): New structure.
5934 (check_thread_db_on_load, tdb_testinfo): New static globals.
5935 (check_thread_db, check_thread_db_callback): New functions.
5936 (try_thread_db_load_1): Run integrity checks if requested.
5937 (maintenance_check_libthread_db): New function.
5938 (_initialize_thread_db): Register "maint check libthread-db"
5939 and "maint set/show check-libthread-db".
5940 * NEWS: Mention the above new commands.
5941
5942 2018-06-08 Tom Tromey <tom@tromey.com>
5943
5944 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5945 now a method.
5946
5947 2018-06-08 Tom Tromey <tom@tromey.com>
5948
5949 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5950
5951 2018-06-08 Tom Tromey <tom@tromey.com>
5952
5953 * common/btrace-common.h (struct btrace_data): Add constructor,
5954 destructor, move assignment operator.
5955 <empty, clear, fini>: New methods.
5956 <format>: Initialize.
5957 (btrace_data_init, btrace_data_fini, btrace_data_clear)
5958 (btrace_data_empty): Don't declare.
5959 * common/btrace-common.c (btrace_data_init): Remove.
5960 (btrace_data::fini): Rename from btrace_data_fini.
5961 (btrace_data::empty): Rename from btrace_data_empty.
5962 (btrace_data::clear): Rename from btrace_data_clear. Return
5963 bool.
5964 * btrace.h (make_cleanup_btrace_data): Don't declare.
5965 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5966 (parse_xml_btrace): Update.
5967 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5968 (maint_btrace_clear_packet_history_cmd): Update.
5969
5970 2018-06-07 Pedro Alves <palves@redhat.com>
5971
5972 * target.h (target_ops) <beneath>: Now a method. All references
5973 updated.
5974 (class target_stack): New.
5975 * target.c (g_target_stack): New.
5976 (g_current_top_target): Delete.
5977 (current_top_target): Get the top target out of g_target_stack.
5978 (target_stack::push, target_stack::unpush): New.
5979 (push_target, unpush_target): Reimplement.
5980 (target_is_pushed): Reimplement in terms of g_target_stack.
5981 (target_ops::beneath, target_stack::find_beneath): New.
5982
5983 2018-06-07 Pedro Alves <palves@redhat.com>
5984
5985 * target.h (find_target_beneath): Delete declaration.
5986 * target.c (find_target_beneath): Delete definition.
5987 * aix-thread.c: All callers of find_target_beneath adjusted to
5988 call target_ops::beneath instead.
5989 * bsd-uthread.c: Likewise.
5990 * linux-thread-db.c: Likewise.
5991 * ravenscar-thread.c: Likewise.
5992 * sol-thread.c: Likewise.
5993 * spu-multiarch.c: Likewise.
5994
5995 2018-06-07 Pedro Alves <palves@redhat.com>
5996
5997 * target.h (target_ops) <beneath>: Now a method. All references
5998 updated.
5999 (target_ops) <m_beneath>: New.
6000 * target.c (target_ops::beneath): New.
6001 * corelow.c: Adjust all references to target_ops::beneath.
6002 * linux-thread-db.c: Likewise.
6003 * make-target-delegates: Likewise.
6004 * record-btrace.c: Likewise.
6005 * record-full.c: Likewise.
6006 * remote.c: Likewise.
6007 * target.c: Likewise.
6008 * target-delegates.c: Regenerate.
6009
6010 2018-06-07 Pedro Alves <palves@redhat.com>
6011
6012 * target.h (target_stack): Delete.
6013 (current_top_target): Declare function.
6014 * target.c (target_stack): Delete.
6015 (g_current_top_target): New.
6016 (current_top_target): New function.
6017 * auxv.c: Use current_top_target instead of target_stack
6018 throughout.
6019 * avr-tdep.c: Likewise.
6020 * breakpoint.c: Likewise.
6021 * corefile.c: Likewise.
6022 * elfread.c: Likewise.
6023 * eval.c: Likewise.
6024 * exceptions.c: Likewise.
6025 * frame.c: Likewise.
6026 * gdbarch-selftests.c: Likewise.
6027 * gnu-v3-abi.c: Likewise.
6028 * ia64-tdep.c: Likewise.
6029 * ia64-vms-tdep.c: Likewise.
6030 * infcall.c: Likewise.
6031 * infcmd.c: Likewise.
6032 * infrun.c: Likewise.
6033 * linespec.c: Likewise.
6034 * linux-tdep.c: Likewise.
6035 * minsyms.c: Likewise.
6036 * ppc-linux-nat.c: Likewise.
6037 * ppc-linux-tdep.c: Likewise.
6038 * procfs.c: Likewise.
6039 * regcache.c: Likewise.
6040 * remote.c: Likewise.
6041 * rs6000-tdep.c: Likewise.
6042 * s390-linux-nat.c: Likewise.
6043 * s390-tdep.c: Likewise.
6044 * solib-aix.c: Likewise.
6045 * solib-darwin.c: Likewise.
6046 * solib-dsbt.c: Likewise.
6047 * solib-spu.c: Likewise.
6048 * solib-svr4.c: Likewise.
6049 * solib-target.c: Likewise.
6050 * sparc-tdep.c: Likewise.
6051 * sparc64-tdep.c: Likewise.
6052 * spu-tdep.c: Likewise.
6053 * symfile.c: Likewise.
6054 * symtab.c: Likewise.
6055 * target-descriptions.c: Likewise.
6056 * target-memory.c: Likewise.
6057 * target.c: Likewise.
6058 * target.h: Likewise.
6059 * tracefile-tfile.c: Likewise.
6060 * tracepoint.c: Likewise.
6061 * valops.c: Likewise.
6062 * valprint.c: Likewise.
6063 * value.c: Likewise.
6064 * windows-tdep.c: Likewise.
6065 * mi/mi-main.c: Likewise.
6066
6067 2018-06-07 Tom Tromey <tom@tromey.com>
6068
6069 * valprint.h (build_address_symbolic): Declare.
6070 * printcmd.c (print_address_symbolic): Update.
6071 (build_address_symbolic): Change "name" and "filename" to
6072 std::string.
6073 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6074 Update.
6075 * defs.h (build_address_symbolic): Remove declaration.
6076
6077 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6078
6079 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6080 (aarch64_vnv_type): Add function.
6081 (aarch64_pseudo_register_name): Add V regs for SVE.
6082 (aarch64_pseudo_register_type): Likewise.
6083 (aarch64_pseudo_register_reggroup_p): Likewise.
6084 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6085 (aarch64_pseudo_read_value): Add V regs for SVE.
6086 (aarch64_pseudo_write_2): Use V0 offset for SVE
6087 (aarch64_pseudo_write): Add V regs for SVE.
6088 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6089
6090 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6091
6092 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6093 (sve_vl_from_vq): Likewise.
6094
6095 2018-06-05 Tom Tromey <tom@tromey.com>
6096
6097 * cli/cli-cmds.c (show_version): Update.
6098 * top.c (print_gdb_version): Add "interactive" parameter.
6099 Update.
6100 * main.c (captured_main_1): Update.
6101 * top.h (print_gdb_version): Add "interactive" parameter and a
6102 comment.
6103
6104 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6105
6106 * common/enum-flags.h: Add trailing semicolon to example in
6107 comment.
6108
6109 2018-06-05 Tom Tromey <tom@tromey.com>
6110
6111 PR cli/12326:
6112 * NEWS: Add entry about pager.
6113 * utils.c (pagination_disabled_for_command): New global.
6114 (prompt_for_continue): Allow "c" response to prompt.
6115 (reinitialize_more_filter): Clear
6116 pagination_disabled_for_command.
6117 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6118
6119 2018-06-04 Tom Tromey <tom@tromey.com>
6120
6121 * ada-lang.h (ada_lookup_symbol_list): Update.
6122 * ada-lang.c (resolve_subexp): Update.
6123 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6124 parameter.
6125 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6126 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6127 results parameter to std::vector.
6128 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6129 Update.
6130 * ada-exp.y (block_lookup): Update.
6131 (select_possible_type_sym): Change type of syms. Remove nsyms
6132 parameter.
6133 (write_var_or_type, write_name_assoc): Update.
6134
6135 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6136
6137 * windows-nat.c (windows_nat_target::xfer_partial): Return
6138 TARGET_XFER_E_IO if we need to delegate to the target beneath
6139 but BENEATH is NULL.
6140
6141 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6142
6143 * Makefile.in (config.status): Add configure.nat as a
6144 dependency.
6145
6146 2018-06-04 Tom Tromey <tom@tromey.com>
6147
6148 * cp-name-parser.y (cpname_state): Add method declarations.
6149 (HANDLE_QUAL): Update.
6150 (cpname_state::d_grab, cpname_state::fill_comp)
6151 (cpname_state::make_operator, cpname_state::make_dtor)
6152 (cpname_state::make_builtin_type, cpname_state::make_name)
6153 (cpname_state::d_qualify, cpname_state::d_int_type)
6154 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6155 (%union): Move earlier.
6156
6157 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6158
6159 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6160
6161 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6162
6163 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6164 (aarch64_pseudo_write_1): Likewise.
6165 (aarch64_pseudo_read_value): Use helper.
6166 (aarch64_pseudo_write): Likewise.
6167
6168 2018-06-04 Pedro Alves <palves@redhat.com>
6169
6170 * darwin-nat.c (darwin_ops): Delete.
6171 (darwin_attach_pid): Use get_native_target.
6172
6173 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6174
6175 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6176 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6177
6178 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6179
6180 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6181 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6182 (aarch64_gdbarch_init): Check for SVE.
6183 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6184
6185 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6186
6187 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6188 * aarch64-tdep.h (aarch64_read_description): Likewise.
6189 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6190 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6191 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6192 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6193 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6194
6195 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6196
6197 * value.c (value_fetch_lazy_bitfield): New.
6198 (value_fetch_lazy_memory): New.
6199 (value_fetch_lazy_register): New.
6200 (value_fetch_lazy): Factor out to smaller functions.
6201
6202 2018-06-01 Tom Tromey <tom@tromey.com>
6203
6204 * cp-name-parser.y (backslashable, represented): Now const.
6205
6206 2018-06-01 Tom Tromey <tom@tromey.com>
6207
6208 * cp-name-parser.y: Include parser-defs.h.
6209 (parser_fprintf): Remove declaration.
6210
6211 2018-06-01 Tom Tromey <tom@tromey.com>
6212
6213 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6214 %parse-param.
6215 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6216 (global_result): Remove globals.
6217 (struct cpname_state): New.
6218 (yyparse): Don't declare.
6219 (yylex, yyerror): Move declarations after %union.
6220 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6221 (make_name): Add state parameter.
6222 Update all callers.
6223 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6224 parameter.
6225 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6226 Update.
6227 (yylex): Add lvalp, state parameters.
6228 (yyerror): Add state parameter.
6229 (cp_demangled_name_to_comp): Update.
6230
6231 2018-06-01 Tom Tromey <tom@tromey.com>
6232
6233 * cp-name-parser.y (parser_fprintf): Declare.
6234 (GDB_YY_REMAP_PREFIX): Define.
6235 Include yy-remap.h. Don't redefine yy* identifiers.
6236
6237 2018-06-01 Tom Tromey <tom@tromey.com>
6238
6239 * python/py-type.c (typy_legacy_template_argument): Update.
6240 * cp-support.h (cp_demangled_name_to_comp): Update.
6241 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6242 parameter to be a "std::string *".
6243 (main): Update.
6244
6245 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6246
6247 * ada-lex.l: Include "diagnostics.h" instead of
6248 "common/diagnostics.h".
6249 * unittests/environ-selftests.c: Likewise.
6250 * common/diagnostics.h: Moved to ../include.
6251
6252 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6253
6254 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6255 to language_mode_manual while calling breakpoint_re_set_one.
6256
6257 2018-06-01 Tom Tromey <tom@tromey.com>
6258
6259 * valops.c (value_cast_structs, destructor_name_p): Update.
6260 * symtab.c (gdb_mangle_name): Update.
6261 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6262 Update.
6263 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6264 (pascal_object_print_value_fields, pascal_object_print_value):
6265 Update.
6266 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6267 * linespec.c (find_methods): Update.
6268 * gdbtypes.h (type_name_no_tag): Remove.
6269 (type_name_or_error): Rename from type_name_no_tag_or_error.
6270 * gdbtypes.c (type_name_no_tag): Remove.
6271 (type_name_or_error): Rename from type_name_no_tag_or_error.
6272 (lookup_struct_elt_type, check_typedef): Update.
6273 * expprint.c (print_subexp_standard): Update.
6274 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6275 * d-namespace.c (d_lookup_nested_symbol): Update.
6276 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6277 (cp_print_class_member): Update.
6278 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6279 * completer.c (add_struct_fields): Update.
6280 * c-typeprint.c (cp_type_print_derivation_info)
6281 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6282 Update.
6283 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6284 (ada_prefer_type, ada_is_exception_sym): Update.
6285
6286 2018-06-01 Tom Tromey <tom@tromey.com>
6287
6288 * valops.c (enum_constant_from_type, value_namespace_elt)
6289 (value_maybe_namespace_elt): Update.
6290 * valarith.c (find_size_for_pointer_math): Update.
6291 * target-descriptions.c (make_gdb_type): Update.
6292 * symmisc.c (print_symbol): Update.
6293 * stabsread.c (define_symbol, read_type)
6294 (complain_about_struct_wipeout, add_undefined_type)
6295 (cleanup_undefined_types_1): Update.
6296 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6297 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6298 (rust_internal_print_type, rust_composite_type)
6299 (rust_evaluate_funcall, rust_evaluate_subexp)
6300 (rust_inclusive_range_type_p): Update.
6301 * python/py-type.c (typy_get_tag): Update.
6302 * p-typeprint.c (pascal_type_print_base): Update.
6303 * mdebugread.c (parse_symbol, parse_type): Update.
6304 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6305 Update.
6306 * guile/scm-type.c (gdbscm_type_tag): Update.
6307 * go-lang.c (sixg_string_p): Update.
6308 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6309 Update.
6310 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6311 (TYPE_TAG_NAME): Remove.
6312 * gdbtypes.c (type_name_no_tag): Simplify.
6313 (check_typedef, check_types_equal, recursive_dump_type)
6314 (copy_type_recursive, arch_composite_type): Update.
6315 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6316 in summary mode when needed.
6317 * eval.c (evaluate_funcall): Update.
6318 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6319 (process_structure_scope, read_enumeration_type)
6320 (read_namespace_type, read_module_type, determine_prefix): Update.
6321 * cp-support.c (inspect_type): Update.
6322 * coffread.c (process_coff_symbol, decode_base_type): Update.
6323 * c-varobj.c (c_is_path_expr_parent): Update.
6324 * c-typeprint.c (c_type_print_base_struct_union): Update.
6325 (c_type_print_base_1): Update. Print struct/class/union/enum in
6326 summary when using C language.
6327 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6328 (gen_maybe_namespace_elt): Update.
6329 * ada-lang.c (ada_type_name): Simplify.
6330 (empty_record, ada_template_to_fixed_record_type_1)
6331 (template_to_static_fixed_type)
6332 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6333
6334 2018-06-01 Tom Tromey <tom@tromey.com>
6335
6336 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6337 c_print_type.
6338 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6339 (c_print_type): Update.
6340 (c_print_type): New overload.
6341 (c_type_print_varspec_prefix, c_type_print_args)
6342 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6343 (c_type_print_base_struct_union, c_type_print_base_1)
6344 (cp_type_print_method_args): Add "language" parameter.
6345 (c_type_print_base): Update.
6346 * c-lang.h (c_print_type): Add new overload.
6347
6348 2018-06-01 Tom Tromey <tom@tromey.com>
6349
6350 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6351 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6352
6353 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6354
6355 * aarch64-tdep.c (aarch64_sve_register_names): New const
6356 var.
6357 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6358 (AARCH64_SVE_Z_REGS_NUM): New define.
6359 (AARCH64_SVE_P_REGS_NUM): Likewise.
6360 (AARCH64_SVE_NUM_REGS): Likewise.
6361
6362 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6363
6364 * nat/linux-ptrace.h [__alpha__]
6365 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6366 definitions.
6367
6368 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6369
6370 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6371 the endianness selected.
6372 * NEWS: Document `set endian auto' mode operation update.
6373
6374 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6375
6376 * Makefile.in: Add new header.
6377 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6378 (sve_vl_from_vg): Likewise.
6379 (sve_vq_from_vl): Likewise.
6380 (sve_vl_from_vq): Likewise.
6381 (sve_vq_from_vg): Likewise.
6382 (sve_vg_from_vq): Likewise.
6383 * configure.nat: Add new c file.
6384 * nat/aarch64-sve-linux-ptrace.c: New file.
6385 * nat/aarch64-sve-linux-ptrace.h: New file.
6386
6387 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6388
6389 * aarch64-linux-nat.c (aarch64_linux_read_description):
6390 Add parmeter zero.
6391 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6392 Likewise.
6393 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6394 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6395 (aarch64_gdbarch_init): Add parmeter zero.
6396 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6397 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6398 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6399 parmeter.
6400 * doc/gdb.texinfo: Describe SVE feature
6401 * features/aarch64-sve.c: New file.
6402
6403 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6404
6405 PR gdb/23210
6406 * gdbarch.sh (significant_addr_bit): Default to zero when
6407 not set by target architecture.
6408 * gdbarch.c: Re-generated.
6409 * utils.c (address_significant): Update.
6410
6411 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6412
6413 * stack.c (func_command): Remove trailing newline in call to error.
6414
6415 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6416
6417 * regcache.h (regcache_raw_collect): Remove, update callers to
6418 use regcache::raw_collect.
6419 * regcache.c (regcache_raw_collect): Remove.
6420
6421 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6422
6423 * regcache.h (regcache_raw_supply): Remove, update callers to
6424 use detached_regcache::raw_supply.
6425 * regcache.c (regcache_raw_supply): Remove.
6426
6427 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6428
6429 * regcache.h (regcache_cooked_write_part): Remove, update
6430 callers to use regcache::cooked_write_part.
6431 * regcache.c (regcache_cooked_write_part): Remove.
6432
6433 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6434
6435 * regcache.h (regcache_cooked_read_part): Remove, update callers
6436 to use readable_regcache::cooked_read_part.
6437 * regcache.c (regcache_cooked_read_part): Remove.
6438
6439 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6440
6441 * regcache.h (regcache_cooked_read_value): Remove, update
6442 callers to use readable_regcache::cooked_read_value.
6443 * regcache.c (regcache_cooked_read_value): Remove.
6444
6445 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6446
6447 * regcache.h (regcache_cooked_write): Remove, update callers to
6448 use regcache::cooked_write.
6449 * regcache.c (regcache_cooked_write): Remove.
6450
6451 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6452
6453 * regcache.h (regcache_invalidate): Remove, update callers to
6454 use detached_regcache::invalidate instead.
6455 * regcache.c (regcache_invalidate): Remove.
6456
6457 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6458
6459 * regcache.h (regcache_raw_write_part): Remove, update callers
6460 to use regcache::raw_write_part instead.
6461 * regcache.c (regcache_raw_write_part): Remove.
6462
6463 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6464
6465 * regcache.h (regcache_raw_read_part): Remove, update callers to
6466 use readable_regcache::raw_read_part instead.
6467 * regcache.c (regcache_raw_read_part): Remove.
6468
6469 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6470
6471 * regcache.h (regcache_cooked_read): Remove, update callers to
6472 use readable_regcache::cooked_read instead.
6473 * regcache.c (regcache_cooked_read): Remove.
6474
6475 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6476
6477 * regcache.h (regcache_raw_write): Remove, update callers to use
6478 regcache::raw_write instead.
6479 * regcache.c (regcache_raw_write): Remove.
6480
6481 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6482
6483 * regcache.h (regcache_raw_read): Remove, update callers to use
6484 readable_regcache::raw_read instead.
6485 * regcache.c (regcache_raw_read): Remove.
6486
6487 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6488
6489 * regcache.h (regcache_raw_update): Remove, update callers to
6490 use readable_regcache::raw_update instead.
6491 * regcache.c (regcache_raw_update): Remove.
6492
6493 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6494
6495 * regcache.h (regcache_register_status): Remove, update callers
6496 to use reg_buffer::get_register_status directly instead.
6497 * regcache.c (regcache_register_status): Remove.
6498
6499 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6500
6501 * regcache.h (regcache_get_ptid): Remove, update all callers to
6502 call regcache::ptid instead.
6503 * regcache.c (regcache_get_ptid): Remove.
6504
6505 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6506
6507 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6508
6509 2018-05-30 Pedro Alves <palves@redhat.com>
6510
6511 * common/common-exceptions.h (exception_rethrow): Use
6512 ATTRIBUTE_NORETURN.
6513
6514 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6515
6516 * breakpoint.c (print_solib_event, check_status_catch_solib):
6517 Remove struct keyword in range-based for loops.
6518 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6519 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6520 Likewise.
6521 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6522 Likewise.
6523 * symfile.c (addr_info_make_relative): Likewise.
6524 * thread.c (value_in_thread_stack_temporaries): Likewise.
6525
6526 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6527
6528 PR gdb/16841
6529 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6530 aggregate type to get its real type before accessing it.
6531
6532 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6533
6534 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6535 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6536 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6537 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6538 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6539 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6540 * printcmd.c (info_address_command): Likewise.
6541
6542 2018-05-29 Tom Tromey <tom@tromey.com>
6543
6544 * windows-nat.c (handle_exception): Update fall-through comment.
6545
6546 2018-05-29 Tom Tromey <tom@tromey.com>
6547
6548 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6549 (struct program_space) <added_solibs>: Now a std::vector.
6550 * breakpoint.c (print_solib_event): Update.
6551 (check_status_catch_solib): Update.
6552 * progspace.c (clear_program_space_solib_cache): Update.
6553 * solib.c (update_solib_list): Update.
6554
6555 2018-05-29 Tom Tromey <tom@tromey.com>
6556
6557 * python/py-type.c (typy_richcompare): Update.
6558 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6559 * gdbtypes.h (types_deeply_equal): Return bool.
6560 (types_equal): Likewise.
6561 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6562 declare VEC.
6563 (check_types_equal): Change worklist to std::vector. Return
6564 bool.
6565 (struct type_equality_entry): Add constructor.
6566 (compare_maybe_null_strings): Return bool.
6567 (check_types_worklist): Return bool. Change worklist to
6568 std::vector.
6569 (types_deeply_equal): Use std::vector.
6570 (types_equal): Return bool.
6571 (compare_maybe_null_strings): Simplify.
6572
6573 2018-05-29 Tom Tromey <tom@tromey.com>
6574
6575 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6576
6577 2018-05-29 Tom Tromey <tom@tromey.com>
6578
6579 * objc-lang.h: Don't include cp-support.h.
6580 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6581 declare VEC.
6582
6583 2018-05-27 Tom Tromey <tom@tromey.com>
6584
6585 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6586
6587 2018-05-25 Tom Tromey <tom@tromey.com>
6588
6589 * value.c (value::location): Initialize.
6590
6591 2018-05-25 Tom Tromey <tom@tromey.com>
6592
6593 * dbxread.c (init_bincl_list): Remove.
6594 (bincl_list): Now a std::vector.
6595 (bincls_allocated, next_bincl): Remove.
6596 (free_bincl_list, do_free_bincl_list_cleanup)
6597 (make_cleanup_free_bincl_list): Remove.
6598 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6599 unique_xmalloc_ptr.
6600 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6601 (struct header_file_location): Add constructor.
6602 (add_bincl_to_list): Remove.
6603
6604 2018-05-25 Tom Tromey <tom@tromey.com>
6605
6606 * tui/tui.c (tui_enable): Update.
6607 * mi/mi-interp.c (mi_interp::init): Update.
6608 * interps.h (class interp) <name>: New method.
6609 <m_name>: Rename from name.
6610 (~scoped_restore_interp): Update.
6611 * interps.c (interp::interp): Update.
6612 (interp_add, interp_set, interp_lookup_existing)
6613 (current_interp_named_p): Update.
6614
6615 2018-05-25 Tom Tromey <tom@tromey.com>
6616
6617 * interps.c (interp_name): Remove.
6618 * mi/mi-interp.c (mi_interp::init): Update.
6619 * interps.h (interp_name): Remove.
6620 (~scoped_restore_interp): Update.
6621 * tui/tui.c (tui_enable): Update.
6622
6623 2018-05-25 Tom Tromey <tom@tromey.com>
6624
6625 * utils.c (fputs_maybe_filtered): Update.
6626 * linespec.c (decode_line_full): Update.
6627 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6628 (mi_print_breakpoint_for_event, mi_solib_loaded)
6629 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6630 (mi_user_selected_context_changed): Update.
6631 * mi/mi-main.c (mi_execute_command): Update.
6632 * cli/cli-script.c (execute_control_command): Update.
6633 * python/python.c (execute_gdb_command): Update.
6634 * solib.c (info_sharedlibrary_command): Update.
6635 * interps.c (interp_ui_out): Remove.
6636 * interps.h (interp_ui_out): Remove.
6637
6638 2018-05-25 Tom Tromey <tom@tromey.com>
6639
6640 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6641 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6642 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6643
6644 2018-05-25 Tom Tromey <tom@tromey.com>
6645
6646 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6647 * interps.c (interp_exec): Use scoped_restore.
6648
6649 2018-05-25 Tom Tromey <tom@tromey.com>
6650
6651 * remote.c (remote_target::remote_file_get): Use
6652 gdb::byte_vector.
6653 (remote_target::remote_file_put): Likewise.
6654
6655 2018-05-25 Tom Tromey <tom@tromey.com>
6656
6657 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6658 a std::string.
6659 (get_pe_section_index, add_pe_exported_sym): Update.
6660 (read_pe_exported_syms): Use gdb::def_vector.
6661
6662 2018-05-25 Tom Tromey <tom@tromey.com>
6663
6664 * frame.c (remove_prev_frame): Remove.
6665 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6666
6667 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6668
6669 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6670 Remove prototypes.
6671 * mips-linux-nat.c (supply_fpregset): Always call
6672 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6673 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6674 `mips_fill_fpregset'.
6675 * mips-linux-tdep.c (mips_supply_fpregset)
6676 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6677 (mips_fill_fpregset_wrapper): Remove functions.
6678 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6679 (mips_linux_fpregset): Remove variable.
6680 (mips_linux_iterate_over_regset_sections): Use
6681 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6682 (mips_linux_o32_sigframe_init): Remove comment.
6683
6684 2018-05-25 Pedro Alves <palves@redhat.com>
6685
6686 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6687 (struct readahead_cache, struct packet_reg, struct
6688 remote_arch_state, class remote_state): Move higher up in the
6689 file.
6690 (remote_target::m_remote_state): Now an object instead of a pointer.
6691 (remote_target::get_remote_state): Adjust.
6692
6693 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6694
6695 * stack.c (select_and_print_frame): Delete.
6696 (struct function_bounds): Move struct within function.
6697 (func_command): Most content moved into new function
6698 find_frame_for_function, use new function, print result, add
6699 function comment.
6700 (find_frame_for_function): New function, now returns a result.
6701
6702 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6703
6704 * stack.c (iterate_over_block_arg_vars): Fix comment.
6705 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6706
6707 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6708
6709 PR gdb/23203
6710 * frame.c
6711 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6712 Define.
6713 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6714 Define.
6715 * frame.h (class scoped_restore_selected_frame): New class.
6716 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6717 of any exception, use scoped_restore_selected_frame to restore the
6718 frame instead.
6719
6720 2018-05-24 Pedro Alves <palves@redhat.com>
6721
6722 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6723 override.
6724
6725 2018-05-23 Tom Tromey <tom@tromey.com>
6726
6727 * complaints.c (struct complaints): Remove.
6728 (symfile_complaint_book): Remove.
6729 (series): New global.
6730 (complaint_internal): Update.
6731 (clear_complaints): Update.
6732
6733 2018-05-23 Tom Tromey <tom@tromey.com>
6734
6735 * complaints.c (counters): New global.
6736 (struct complain): Remove.
6737 (struct complaints) <root>: Remove.
6738 (complaint_sentinel): Remove.
6739 (symfile_complaint_book): Update.
6740 (find_complaint) Remove.
6741 (complaint_internal, clear_complaints): Update.
6742
6743 2018-05-23 Tom Tromey <tom@tromey.com>
6744
6745 * complaints.c (struct complain) <file, line>: Remove.
6746 (find_complaint): Remove file, line parameters.
6747 (complaint_internal): Update.
6748
6749 2018-05-23 Tom Tromey <tom@tromey.com>
6750
6751 * complaints.c (vcomplaint): Remove.
6752 (complaint_internal) Merge in contents of vcomplaint.
6753
6754 2018-05-23 Tom Tromey <tom@tromey.com>
6755
6756 * complaints.c (struct complaints) <explanation>: Remove.
6757 (symfile_explanations): Remove.
6758 (symfile_complaint_book): Update.
6759 (vcomplaint): Update.
6760 (struct explanation): Remove.
6761
6762 2018-05-23 Tom Tromey <tom@tromey.com>
6763
6764 * complaints.c (symfile_complaints): Remove.
6765 (complaint_internal): Remove "complaints" parameter.
6766 (clear_complaints, vcomplaint): Remove "c" parameter.
6767 (get_complaints): Remove.
6768 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6769 (dwarf2_debug_line_missing_file_complaint)
6770 (dwarf2_debug_line_missing_end_sequence_complaint)
6771 (dwarf2_complex_location_expr_complaint)
6772 (dwarf2_const_value_length_mismatch_complaint)
6773 (dwarf2_section_buffer_overflow_complaint)
6774 (dwarf2_macro_malformed_definition_complaint)
6775 (dwarf2_invalid_attrib_class_complaint)
6776 (create_addrmap_from_index, dw2_symtab_iter_next)
6777 (dw2_expand_marked_cus)
6778 (dw2_debug_names_iterator::find_vec_in_debug_names)
6779 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6780 (create_debug_type_hash_table, init_cutu_and_read_dies)
6781 (partial_die_parent_scope, add_partial_enumeration)
6782 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6783 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6784 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6785 (create_cus_hash_table, create_dwp_hash_table)
6786 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6787 (dwarf2_rnglists_process, dwarf2_ranges_process)
6788 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6789 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6790 (handle_struct_member_die, process_structure_scope)
6791 (read_array_type, read_common_block, read_module_type)
6792 (read_tag_pointer_type, read_typedef, read_base_type)
6793 (read_subrange_type, load_partial_dies, partial_die_info::read)
6794 (partial_die_info::read, partial_die_info::read)
6795 (partial_die_info::read, read_checked_initial_length_and_offset)
6796 (dwarf2_string_attr, read_formatted_entries)
6797 (dwarf_decode_line_header)
6798 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6799 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6800 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6801 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6802 (get_signatured_type, get_DW_AT_signature_type)
6803 (decode_locdesc, file_file_name, consume_improper_spaces)
6804 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6805 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6806 (dwarf2_symbol_mark_computed, set_die_type)
6807 (read_attribute_value): Update.
6808 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6809 Update.
6810 * dbxread.c (unknown_symtype_complaint)
6811 (lbrac_mismatch_complaint, repeated_header_complaint)
6812 (set_namestring, function_outside_compilation_unit_complaint)
6813 (read_dbx_symtab, process_one_symbol): Update.
6814 * gdbtypes.c (stub_noname_complaint): Update.
6815 * windows-nat.c (handle_unload_dll): Update.
6816 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6817 (decode_base_type): Update.
6818 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6819 (eb_complaint, record_include_begin, record_include_end)
6820 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6821 (process_xcoff_symbol, read_symbol)
6822 (function_outside_compilation_unit_complaint)
6823 (scan_xcoff_symtab): Update.
6824 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6825 * buildsym.c (finish_block_internal, make_blockvector)
6826 (end_symtab_get_static_block, augment_type_symtab): Update.
6827 * dtrace-probe.c (dtrace_process_dof)
6828 (dtrace_static_probe_ops::get_probes): Update.
6829 * complaints.h (struct complaint): Don't declare.
6830 (symfile_complaints): Remove.
6831 (complaint_internal): Remove "complaints" parameter.
6832 (complaint): Likewise.
6833 (clear_complaints): Likewise.
6834 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6835 (reread_symbols): Update.
6836 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6837 (dwarf2_frame_cache, decode_frame_entry): Update.
6838 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6839 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6840 (info_selectors_command): Update.
6841 * macrotab.c (macro_include, check_for_redefinition)
6842 (macro_undef): Update.
6843 * objfiles.c (filter_overlapping_sections): Update.
6844 * stabsread.c (invalid_cpp_abbrev_complaint)
6845 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6846 (define_symbol, error_type, read_type, rs6000_builtin_type)
6847 (stabs_method_name_from_physname, read_member_functions)
6848 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6849 (attach_fields_to_type, complain_about_struct_wipeout)
6850 (read_range_type, read_args, common_block_start)
6851 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6852 Update.
6853 * mdebugread.c (index_complaint, unknown_ext_complaint)
6854 (basic_type_complaint, bad_tag_guess_complaint)
6855 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6856 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6857 (parse_procedure, parse_lines)
6858 (function_outside_compilation_unit_complaint)
6859 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6860 (bad_tag_guess_complaint, reg_value_complaint): Update.
6861 * cp-support.c (demangled_name_complaint): Update.
6862 * macroscope.c (sal_macro_scope): Update.
6863 * dwarf-index-write.c (class debug_names): Update.
6864
6865 2018-05-23 Tom Tromey <tom@tromey.com>
6866
6867 * complaints.c (clear_complaints): Remove "noisy" parameter.
6868 * complaints.h (clear_complaints): Update.
6869 * symfile.c (syms_from_objfile_1, finish_new_objfile)
6870 (reread_symbols): Update.
6871
6872 2018-05-23 Tom Tromey <tom@tromey.com>
6873
6874 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6875 SUBSEQUENT_MESSAGE.
6876 (vcomplaint, clear_complaints): Update.
6877 (symfile_explanations): Remove some messages.
6878
6879 2018-05-23 Tom Tromey <tom@tromey.com>
6880
6881 * complaints.c (internal_complaint): Remove.
6882 * complaints.h (internal_complaint): Remove.
6883
6884 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6885
6886 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6887
6888 2018-05-22 Pedro Alves <palves@redhat.com>
6889
6890 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6891 (remote_fileio_badfd, remote_fileio_return_errno)
6892 (remote_fileio_return_success, remote_fileio_func_open)
6893 (remote_fileio_func_open, remote_fileio_func_close)
6894 (remote_fileio_func_read, remote_fileio_func_write)
6895 (remote_fileio_func_lseek, remote_fileio_func_rename)
6896 (remote_fileio_func_unlink, remote_fileio_func_stat)
6897 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6898 (remote_fileio_func_isatty, remote_fileio_func_system): Add
6899 remote_target parameter.
6900 (remote_fio_func_map) <func>: Add remote_target parameter.
6901 (do_remote_fileio_request, remote_fileio_request):
6902 * remote-fileio.h (remote_fileio_request):
6903 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6904 remote_target parameter.
6905 (remote_notif_process, handle_notification): Adjust to pass down
6906 the remote.
6907 (remote_notif_state_allocate): Add remote_target parameter. Save
6908 it.
6909 * remote-notif.h (struct remote_target): Forward declare.
6910 (struct notif_client) <parse, ack, can_get_pending_events>: Add
6911 remote_target parameter.
6912 (struct remote_notif_state) <remote>: New field.
6913 (remote_notif_ack, remote_notif_parse): Add remote_target
6914 parameter.
6915 (remote_notif_state_allocate, remote_notif_state_allocate): Add
6916 remote_target parameter.
6917 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6918 (threads_listing_context, rmt_thread_action, protocol_feature)
6919 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6920 (packet_result, struct threads_listing_context, remote_state):
6921 Move definitions and declarations higher up.
6922 (remote_target) <~remote_target>: Declare.
6923 (remote_download_command_source, remote_file_put, remote_file_get)
6924 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6925 (remote_hostio_pread_vFile, remote_hostio_send_command)
6926 (remote_hostio_set_filesystem, remote_hostio_open)
6927 (remote_hostio_close, remote_hostio_unlink, remote_state)
6928 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6929 (get_memory_write_packet_size, get_memory_read_packet_size)
6930 (append_pending_thread_resumptions, remote_detach_1)
6931 (append_resumption, remote_resume_with_vcont)
6932 (add_current_inferior_and_thread, wait_ns, wait_as)
6933 (process_stop_reply, remote_notice_new_inferior)
6934 (process_initial_stop_replies, remote_add_thread)
6935 (btrace_sync_conf, remote_btrace_maybe_reopen)
6936 (remove_new_fork_children, kill_new_fork_children)
6937 (discard_pending_stop_replies, stop_reply_queue_length)
6938 (check_pending_events_prevent_wildcard_vcont)
6939 (discard_pending_stop_replies_in_queue, stop_reply)
6940 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6941 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6942 (remote_interrupt_as, remote_interrupt_ns)
6943 (remote_get_noisy_reply, remote_query_attached)
6944 (remote_add_inferior, remote_current_thread, get_current_thread)
6945 (set_thread, set_general_thread, set_continue_thread)
6946 (set_general_process, write_ptid)
6947 (remote_unpack_thread_info_response, remote_get_threadinfo)
6948 (parse_threadlist_response, remote_get_threadlist)
6949 (remote_threadlist_iterator, remote_get_threads_with_ql)
6950 (remote_get_threads_with_qxfer)
6951 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6952 (get_offsets, remote_check_symbols, remote_supported_packet)
6953 (remote_query_supported, remote_packet_size)
6954 (remote_serial_quit_handler, remote_detach_pid)
6955 (remote_vcont_probe, remote_resume_with_hc)
6956 (send_interrupt_sequence, interrupt_query)
6957 (remote_notif_get_pending_events, fetch_register_using_p)
6958 (send_g_packet, process_g_packet, fetch_registers_using_g)
6959 (store_register_using_P, store_registers_using_G)
6960 (set_remote_traceframe, check_binary_download)
6961 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6962 (remote_xfer_live_readonly_partial, remote_read_bytes)
6963 (remote_send_printf, remote_flash_write, readchar)
6964 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6965 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6966 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6967 (extended_remote_disable_randomization, extended_remote_run)
6968 (send_environment_packet, extended_remote_environment_support)
6969 (extended_remote_set_inferior_cwd, remote_write_qxfer)
6970 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6971 (packet_command): Now methods of ...
6972 (remote_target): ... this class.
6973 (m_remote_state) <remote_target>: New field.
6974 (struct remote_state) <stop_reply_queue,
6975 remote_async_inferior_event_token, wait_forever_enabled_p>: New
6976 fields.
6977 (remote_state::remote_state): Allocate stop_reply_queue.
6978 (remote_state): Delete global.
6979 (get_remote_state_raw): Delete.
6980 (remote_target::get_remote_state): Allocate m_remote_state on
6981 demand.
6982 (get_current_remote_target): New.
6983 (remote_ops, extended_remote_ops): Delete.
6984 (wait_forever_enabled_p, remote_async_inferior_event_token):
6985 Delete, moved to struct remote_state.
6986 (remote_target::close): Delete self. Destruction bits split to
6987 ...
6988 (remote_target::~remote_target): ... this.
6989 (show_memory_packet_size): Adjust to use
6990 get_current_remote_target.
6991 (struct protocol_feature) <func>: Add remote_target parameter.
6992 All callers adjusted.
6993 (curr_quit_handler_target): New.
6994 (remote_serial_quit_handler): Reimplement.
6995 (remote_target::open_1): Adjust to use get_current_remote_target.
6996 Heap-allocate remote_target/extended_remote_target instances.
6997 (vcont_builder::vcont_builder): Add remote_target parameter, and
6998 save it in m_remote. All callers adjusted.
6999 (vcont_builder::m_remote): New field.
7000 (vcont_builder::restart, vcont_builder::flush)
7001 (vcont_builder::push_action): Use it.
7002 (remote_target::commit_resume): Use it.
7003 (struct queue_iter_param) <remote>: New field.
7004 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7005 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7006 (check_pending_event_prevents_wildcard_vcont_callback)
7007 (remote_target::check_pending_events_prevent_wildcard_vcont)
7008 (remote_target::discard_pending_stop_replies)
7009 (remote_target::discard_pending_stop_replies_in_queue)
7010 (remote_target::remote_notif_remove_queued_reply): Fill in
7011 'remote' field.
7012 (remote_notif_get_pending_events): New.
7013 (remote_target::readchar, remote_target::remote_serial_write):
7014 Save/restore curr_quit_handler_target.
7015 (putpkt): New.
7016 (kill_new_fork_children): Fill in 'remote' field.
7017 (packet_command): Use get_current_remote_target, defer to
7018 remote_target method of same name.
7019 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7020 parameter, and save it in m_remote. All callers adjusted.
7021 (scoped_remote_fd::release): Use m_remote.
7022 (scoped_remote_fd::m_remote): New field.
7023 (remote_file_put, remote_file_get, remote_file_delete): Use
7024 get_current_remote_target, defer to remote_target method of same
7025 name.
7026 (remote_btrace_reset): Add remote_state paremeter. Update all
7027 callers.
7028 (remote_async_inferior_event_handler). Pass down 'data'.
7029 (remote_new_objfile): Use get_current_remote_target.
7030 (remote_target::vcont_r_supported): New.
7031 (set_range_stepping): Use get_current_remote_target and
7032 remote_target::vcont_r_supported.
7033 (_initialize_remote): Don't allocate 'remote_state' and
7034 'stop_reply_queue' globals.
7035 * remote.h (struct remote_target): Forward declare.
7036 (getpkt, putpkt, remote_notif_get_pending_events): Add
7037 'remote_target' parameter.
7038
7039 2018-05-22 Pedro Alves <palves@redhat.com>
7040
7041 * remote.c (vcont_builder): Now a class. Make all data members
7042 private.
7043 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7044 Declare methods.
7045 (vcont_builder_restart): Rename to ...
7046 (vcont_builder::restart): ... this.
7047 (vcont_builder_flush): Rename to ...
7048 (vcont_builder::flush): ... this.
7049 (vcont_builder_push_action): Rename to ...
7050 (vcont_builder::push_action): ... this.
7051 (remote_target::commit_resume): Adjust.
7052
7053 2018-05-22 Pedro Alves <palves@redhat.com>
7054
7055 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7056 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7057 (get_fixed_memory_packet_size): New.
7058 (get_memory_packet_size): Use it.
7059 (set_memory_packet_size): Don't override the config size with
7060 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7061 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7062 Don't refer to get_memory_packet_size if not connected to a remote
7063 target. Show "(default)" if configured size is 0.
7064
7065 2018-05-22 Pedro Alves <palves@redhat.com>
7066
7067 * remote.c (remote_target::mourn_inferior): Move
7068 discard_pending_stop_replies call here from ...
7069 (_initialize_remote): ... here.
7070
7071 2018-05-22 Pedro Alves <palves@redhat.com>
7072
7073 * remote.c (compare_section_command): Remove set_general_process
7074 call.
7075
7076 2018-05-22 Pedro Alves <palves@redhat.com>
7077
7078 * remote.c (struct packet_reg, struct remote_arch_state):
7079 Move higher up in the file.
7080 (remote_state) <m_arch_states>: Store remote_arch_state values
7081 instead of remote_arch_state pointers.
7082 (remote_state::get_remote_arch_state): Adjust.
7083
7084 2018-05-22 Pedro Alves <palves@redhat.com>
7085
7086 * remote.c: Include <unordered_map>.
7087 (remote_state): Now a class.
7088 (remote_state) <get_remote_arch_state>: Declare method.
7089 <get_remote_arch_state>: New field.
7090 (remote_arch_state) <remote_arch_state>: Declare ctor.
7091 <regs>: Now a unique_ptr.
7092 (remote_gdbarch_data_handle): Delete.
7093 (get_remote_arch_state): Delete.
7094 (remote_state::get_remote_arch_state): New.
7095 (get_remote_state): Adjust to call remote_state's
7096 get_remote_arch_state method.
7097 (init_remote_state): Delete, bits factored out to ...
7098 (remote_arch_state::remote_arch_state): ... this new method.
7099 (get_remote_packet_size, get_memory_packet_size)
7100 (process_g_packet, remote_target::fetch_registers)
7101 (remote_target::prepare_to_store, store_registers_using_G)
7102 (remote_target::store_registers, remote_target::get_trace_status):
7103 Adjust to call remote_state's method.
7104 (_initialize_remote): Remove reference to
7105 remote_gdbarch_data_handle.
7106
7107 2018-05-22 Pedro Alves <palves@redhat.com>
7108
7109 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7110 pread>: New method declarations.
7111 (remote_target::open_1): Adjust.
7112 (readahead_cache_invalidate): Rename to ...
7113 (readahead_cache::invalidate): ... this, and adjust to be a class
7114 method.
7115 (readahead_cache_invalidate_fd): Rename to ...
7116 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7117 class method.
7118 (remote_hostio_pwrite): Adjust.
7119 (remote_hostio_pread_from_cache): Rename to ...
7120 (readahead_cache::pread): ... this, and adjust to be a class
7121 method.
7122 (remote_hostio_close): Adjust.
7123
7124 2018-05-22 Pedro Alves <palves@redhat.com>
7125
7126 * remote.c (remote_hostio_close_cleanup): Delete.
7127 (class scoped_remote_fd): New.
7128 (remote_file_put, remote_file_get): Use it.
7129
7130 2018-05-22 Pedro Alves <palves@redhat.com>
7131
7132 (struct vCont_action_support): Use bool and initialize all fields.
7133 (struct readahead_cache): Initialize all fields.
7134 (remote_state): Use bool and initialize all fields.
7135 (remote_state::remote_state, remote_state::~remote_state): New.
7136 (new_remote_state): Delete.
7137 (_initialize_remote): Use new to allocate remote_state.
7138
7139 2018-05-22 Pedro Alves <palves@redhat.com>
7140 張俊芝 <zjz@zjz.name>
7141
7142 PR gdb/22973
7143 * c-exp.y: Include "c-support.h".
7144 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7145 of tolower. Use c_ident_is_alpha to scan names.
7146 * c-lang.c: Include "c-support.h".
7147 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7148 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7149 * c-support.h: New file, with bits factored out from ...
7150 * cp-name-parser.y: ... this file.
7151 Include "c-support.h".
7152 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7153 c-support.h and renamed.
7154 (symbol_end, yylex): Adjust.
7155
7156 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7157
7158 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7159 parameter type to CORE_ADDR.
7160 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7161 parameter type in declaration to CORE_ADDR.
7162 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7163 target_auxv_search to get AT_HWCAP and use the result to get the
7164 target description.
7165 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7166 to CORE_ADDR. Remove the cast of the return value to unsigned
7167 long. Fix error predicate of target_auxv_search.
7168 (ppc_linux_nat_target::read_description): Change the type of the
7169 hwcap variable to CORE_ADDR.
7170
7171 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7172
7173 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7174 if the size of fpscr is larger than 32 bits.
7175
7176 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7177
7178 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7179 (ppc32_linux_vsxregmap): New global.
7180 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7181 regcache_supply_regset, and regcache_collect_regset.
7182 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7183 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7184 (fetch_vsx_register, store_vsx_register): Remove.
7185 (fetch_vsx_registers): Add regno parameter. Get regset using
7186 ppc_linux_vsxregset. Use regset to supply registers.
7187 (store_vsx_registers): Add regno parameter. Get regset using
7188 ppc_linux_vsxregset. Use regset to collect registers.
7189 (fetch_register): Call fetch_vsx_registers instead of
7190 fetch_vsx_register.
7191 (store_register): Call store_vsx_registers instead of
7192 store_vsx_register.
7193 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7194 new regno parameter.
7195 (store_ppc_registers): Call store_vsx_registers with -1 for the
7196 new regno parameter.
7197 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7198 (ppc_collect_vsxregset): Remove.
7199
7200 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7201
7202 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7203 offset fields.
7204 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7205 for vector register offset fields.
7206 (ppc64_fbsd_reg_offsets): Likewise.
7207 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7208 to vector register offset fields.
7209 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7210 to vector register offset fields.
7211 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7212 vector register offset fields.
7213 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7214 initializers for vector register offset fields.
7215 (rs6000_aix64_reg_offsets): Likewise.
7216 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7217 (ppc_supply_vrregset): Remove.
7218 (ppc_collect_vrregset): Remove.
7219 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7220 (ppc_linux_vrregset) : New function.
7221 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7222 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7223 (ppc32_linux_vrregset): Remove.
7224 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7225 and use result instead of ppc32_linux_vrregset.
7226 (ppc32_linux_reg_offsets): Remove initializers for vector register
7227 offset fields.
7228 (ppc64_linux_reg_offsets): Likewise.
7229 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7230 * ppc-linux-nat.c: Include regset.h.
7231 (gdb_vrregset_t): Adjust comment to account for little-endian
7232 mode.
7233 (supply_vrregset, fill_vrregset): Remove.
7234 (fetch_altivec_register, store_altivec_register): Remove.
7235 (fetch_altivec_registers): Add regno parameter. Get regset using
7236 ppc_linux_vrregset. Use regset to supply registers.
7237 (store_altivec_registers): Add regno parameter. Get regset using
7238 ppc_linux_vrregset. Use regset to collect registers.
7239 (fetch_register): Call fetch_altivec_registers instead of
7240 fetch_altivec_register.
7241 (store_register): Call store_altivec_registers instead of
7242 store_altivec_register.
7243 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7244 the new regno parameter.
7245 (store_ppc_registers): Call store_altivec_registers with -1 for
7246 the new regno parameter.
7247
7248 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7249
7250 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7251 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7252 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7253 (gdb_vrregset_t): Change array type size to
7254 PPC_LINUX_SIZEOF_VRREGSET.
7255 (gdb_vsxregset_t): Change array type size to
7256 PPC_LINUX_SIZEOF_VSXREGSET.
7257 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7258 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7259 PPC_LINUX_SIZEOF_VSXREGSET.
7260
7261 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7262
7263 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7264 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7265 nat/ppc-linux.c.
7266 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7267 ppc_linux_target_wordsize with tid.
7268 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7269 wordsize with tid.
7270 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7271 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7272 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7273 tid parameter. Remove static specifier.
7274 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7275 (ppc_linux_target_wordsize): New declaration.
7276
7277 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7278
7279 * arch/ppc-linux-common.c: New file.
7280 * arch/ppc-linux-common.h: New file.
7281 * arch/ppc-linux-tdesc.h: New file.
7282 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7283 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7284 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7285 arch/ppc-linux-tdesc.h.
7286 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7287 arch/ppc-linux-tdesc.h.
7288 (ppc_linux_nat_target::read_description): Remove target
7289 description matching code. Fill a ppc_linux_features struct and
7290 call ppc_linux_match_description with it. Move comment about ISA
7291 2.05 to ppc-linux-common.c.
7292 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7293 arch/ppc-linux-tdesc.h.
7294 (ppc_linux_core_read_description): Remove target description
7295 matching code. Fill a ppc_linux_features struct and call
7296 ppc_linux_match_description with it.
7297 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7298 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7299 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7300 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7301 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7302 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7303 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7304 (tdesc_powerpc_e500l): Remove.
7305
7306 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7307
7308 * ada-lang.c (catch_assert_command): Pass empty string instead
7309 of NULL for excep_string argument.
7310
7311 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7312
7313 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7314 the width of the requested register exceeds the width of the
7315 `ptrace' data type.
7316
7317 2018-05-21 Tom Tromey <tom@tromey.com>
7318
7319 * printcmd.c (output_command): Remove.
7320 (output_command_const): Rename to output_command.
7321 * valprint.h (output_command): Rename from output_command_const.
7322 * tracepoint.c (trace_dump_actions): Call output_command.
7323
7324 2018-05-21 Tom Tromey <tom@tromey.com>
7325
7326 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7327 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7328 * ada-lang.h (create_ada_exception_catchpoint): Update.
7329 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7330 std::string.
7331 (create_excep_cond_exprs, ~ada_catchpoint)
7332 (should_stop_exception, print_one_exception)
7333 (print_mention_exception, print_recreate_exception): Update.
7334 (ada_get_next_arg): Remove.
7335 (catch_ada_exception_command_split): Use std::string. Change type
7336 of "excep_string", "cond_string".
7337 (catch_ada_exception_command): Update.
7338 (create_ada_exception_catchpoint): Change type of excep_string.
7339 (ada_exception_sal): Remove excep_string parameter.
7340 (~ada_catchpoint): Remove.
7341
7342 2018-05-21 Tom Tromey <tom@tromey.com>
7343
7344 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7345 cleanup.
7346
7347 2018-05-21 Tom Tromey <tom@tromey.com>
7348
7349 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7350 Return unique_xmalloc_ptr.
7351 (print_it_exception): Update.
7352
7353 2018-05-21 Tom Tromey <tom@tromey.com>
7354
7355 * tracepoint.c (trace_dump_actions): Use std::string.
7356
7357 2018-05-21 Tom Tromey <tom@tromey.com>
7358
7359 * symfile.c (reread_symbols): Use std::string for original_name.
7360
7361 2018-05-21 Tom Tromey <tom@tromey.com>
7362
7363 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7364 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7365 constructor.
7366
7367 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7368
7369 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7370 instance to...
7371 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7372 * objfiles.c (get_objfile_bfd_data): Allocate
7373 objfile_per_bfd_storage with obstack_new when allocating on
7374 obstack.
7375
7376 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7377
7378 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7379 OBSTACK_ZALLOC.
7380 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7381 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7382 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7383 (add_pending): Likewise.
7384 (parse_symbol): Likewise.
7385 (parse_partial_symbols): Likewise.
7386 (psymtab_to_symtab_1): Likewise.
7387 (new_psymtab): Likewise.
7388 (elfmdebug_build_psymtabs): Likewise.
7389 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7390 * objfiles.c (get_objfile_bfd_data): Likewise.
7391 (objfile_register_static_link): Likewise.
7392 * psymtab.c (allocate_psymtab): Likewise.
7393 * stabsread.c (read_member_functions): Likewise.
7394 * xcoffread.c (xcoff_end_psymtab): Likewise.
7395
7396 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7397
7398 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7399 compiler supports std::is_trivially_constructible.
7400 * common/poison.h: Include obstack.h.
7401 (IsMallocable): Define to is_trivially_constructible if the
7402 compiler supports it, define to true_type otherwise.
7403 (xobnew): New.
7404 (XOBNEW): Redefine.
7405 (xobnewvec): New.
7406 (XOBNEWVEC): Redefine.
7407 * gdb_obstack.h (obstack_zalloc): New.
7408 (OBSTACK_ZALLOC): Redefine.
7409 (obstack_calloc): New.
7410 (OBSTACK_CALLOC): Redefine.
7411 (obstack_new): New.
7412 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7413 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7414 gdbarch.c.
7415 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7416 obstack_calloc/obstack_zalloc.
7417 (gdbarch_obstack_zalloc): Remove.
7418 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7419
7420 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7421
7422 * stack.c (backtrace_command_1): Remove useless variable int i.
7423
7424 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7425
7426 * stack.c (print_frame_info): Fix comment.
7427
7428 2018-05-18 Tom Tromey <tom@tromey.com>
7429
7430 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7431 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7432 (~dwarf2_per_objfile): Update
7433 (dwarf2_get_dwz_file): Use new.
7434 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7435 unique_ptr.
7436
7437 2018-05-18 Tom Tromey <tom@tromey.com>
7438
7439 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7440 unique_ptr.
7441 * dwarf2read.c (struct dwp_file): Add constructor and
7442 initializers.
7443 (open_and_init_dwp_file): Return a unique_ptr.
7444 (dwarf2_per_objfile, create_dwp_hash_table)
7445 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7446 (lookup_dwo_unit_in_dwp): Update.
7447 (open_and_init_dwp_file, get_dwp_file): Update.
7448
7449 2018-05-18 Tom Tromey <tom@tromey.com>
7450
7451 * dwarf2read.c (dwarf2_per_objfile): Update.
7452 (struct mapped_index): Add initializers.
7453 (dwarf2_read_index): Use new.
7454 (dw2_symtab_iter_init): Update.
7455 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7456 unique_ptr.
7457
7458 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7459
7460 * dwarf2read.c (mapped_index) <total_size>: Remove.
7461
7462 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7463
7464 * unittests/format_pieces-selftests.c (test_format_specifier):
7465 Add ARI comments.
7466
7467 2018-05-18 Tom Tromey <tom@tromey.com>
7468
7469 * c-typeprint.c (maybe_print_hole): New function.
7470 (c_print_type_struct_field_offset): Update.
7471 (c_type_print_base_struct_union): Call maybe_print_hole.
7472
7473 2018-05-17 Keith Seitz <keiths@redhat.com>
7474
7475 * breakpoint.c (build_bpstat_chain): New function, moved from
7476 bpstat_stop_status.
7477 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7478 If no stop chain is passed, call build_bpstat_chain to build it.
7479 * breakpoint.h (build_bpstat_chain): Declare.
7480 (bpstat_stop_status): Move documentation here from breakpoint.c.
7481 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7482 build the stop chain and pass it to skip_inline_frames.
7483 Pass this stop chain to bpstat_stop_status.
7484 * inline-frame.c: Include breakpoint.h.
7485 (stopped_by_user_bp_inline_frame): New function.
7486 (skip_inline_frames): Add parameter `stop_chain'.
7487 Move documention to inline-frame.h.
7488 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7489 whether the frame should be elided.
7490 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7491 Add moved documentation and update for new parameter.
7492
7493 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7494
7495 PR cli/14975
7496 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7497 unittests/format_pieces-selftests.c.
7498 * common/format.h (format_piece) <operator==>: New.
7499 (format_pieces) <operator[]>: Remove.
7500 * common/format.c (format_pieces::format_pieces): Handle \e.
7501 * unittests/format_pieces-selftests.c: New.
7502
7503 2018-05-17 Tom Tromey <tom@tromey.com>
7504
7505 PR symtab/23010:
7506 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7507 (dw2_instantiate_symtab): Add skip_partial parameter.
7508 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7509 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7510 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7511 (dw2_expand_symtabs_matching_one)
7512 (dw2_find_pc_sect_compunit_symtab)
7513 (dw2_debug_names_lookup_symbol)
7514 (dw2_debug_names_expand_symtabs_for_function): Update.
7515 (init_cutu_and_read_dies): Add skip_partial parameter.
7516 (process_psymtab_comp_unit, build_type_psymtabs_1)
7517 (process_skeletonless_type_unit, load_partial_comp_unit)
7518 (psymtab_to_symtab_1): Update.
7519 (load_full_comp_unit): Add skip_partial parameter.
7520 (process_imported_unit_die, dwarf2_read_addr_index)
7521 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7522 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7523 (read_signatured_type): Update.
7524
7525 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7526
7527 * value.c (release_value): Remove unused variable.
7528 (record_latest_value): Likewise.
7529 (access_value_history): Likewise.
7530 (preserve_values): Likewise.
7531
7532 2018-05-17 Tom Tromey <tom@tromey.com>
7533
7534 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7535 Initialize.
7536
7537 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7538
7539 PR gdb/22286
7540 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7541 Also handle registers whose width is not a multiple of
7542 PTRACE_TYPE_RET.
7543 (linux_nat_trad_target::store_register): Likewise.
7544
7545 2018-05-16 Tom Tromey <tom@tromey.com>
7546
7547 * gdbcore.h (core_bfd): Redefine.
7548 * corelow.c (core_target::close): Update.
7549 (core_target_open): Update.
7550 * progspace.h (struct program_space) <cbfd>: Now a
7551 gdb_bfd_ref_ptr.
7552
7553 2018-05-16 Tom Tromey <tom@tromey.com>
7554
7555 PR cli/19551:
7556 * symfile-add-flags.h (enum symfile_add_flags)
7557 <SYMFILE_NOT_FILENAME>: New constant.
7558 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7559 objfile name from BFD.
7560 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7561 * minidebug.c (find_separate_debug_file_in_section): Put
7562 ".gnu_debugdata" into BFD's file name.
7563
7564 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7565
7566 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7567 Remove.
7568
7569 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7570
7571 PR binutils/21446
7572 * aarch64-tdep.c (aarch64_analyze_prologue,
7573 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7574 Indicate not interested in errors.
7575
7576 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7577
7578 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7579 Supply the MIPS_ZERO_REGNUM register.
7580
7581 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7582
7583 * mips-tdep.c (mask_address_var): Make variable static.
7584
7585 2018-05-14 Tom Tromey <tom@tromey.com>
7586
7587 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7588
7589 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7590
7591 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7592 FXSAVE_ADDR for the mxcsr register.
7593
7594 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7595
7596 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7597
7598 2018-05-11 Pedro Alves <palves@redhat.com>
7599
7600 * corelow.c (core_target) <core_target>: No longer inline.
7601 Initialize m_core_gdbarch, m_core_vec and build the section table
7602 here.
7603 <~core_target>: New.
7604 <core_gdbarch, get_core_register_section>: New methods.
7605 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7606 factored out from ...
7607 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7608 (core_ops): Delete.
7609 (sniff_core_bfd): Add gdbarch parameter.
7610 (core_close): Delete, merged into ...
7611 (core_target::close): ... here. Delete self.
7612 (core_close_cleanup): Delete.
7613 (core_target_open): Allocate a core_target on the heap. Use a
7614 unique_ptr instead of a cleanup. Bits moved into the core_target
7615 ctor. Adjust to use core_target methods instead of globals.
7616 (get_core_register_section): Rename to ...
7617 (core_target::get_core_register_section): ... this and adjust.
7618 (struct get_core_registers_cb_data): New.
7619 (get_core_registers_cb): Use it. Use bool.
7620 (core_target::fetch_registers, core_target::files_info)
7621 (core_target::xfer_partial, core_target::read_description)
7622 (core_target::pid_to, core_target::thread_name): Adjust to
7623 reference class fields instead of globals.
7624 * target.h (struct target_ops_deleter, target_ops_up): New.
7625
7626 2018-05-11 Pedro Alves <palves@redhat.com>
7627
7628 * corefile.c (core_file_command): Move to corelow.c.
7629 * corelow.c (the_core_target): Delete.
7630 (core_file_command): Moved from corefile.c. Check exec_bfd
7631 instead of the_core_target. Use target_detach instead of calling
7632 into the_core_target directly.
7633 (maybe_say_no_core_file_now): New.
7634 (core_target::detach): Use it.
7635 (_initialize_corelow): Remove references to the_core_target.
7636 * gdbcore.h (the_core_target): Delete.
7637
7638 2018-05-11 Tom Tromey <tromey@redhat.com>
7639 Pedro Alves <palves@redhat.com>
7640
7641 * corefile.c (core_bfd): Remove.
7642 * gdbcore.h (core_bfd): Now a macro.
7643 * progspace.h (struct program_space) <cbfd>: New field.
7644
7645 2018-05-11 Tom Tromey <tom@tromey.com>
7646
7647 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7648 gdb::def_vector.
7649
7650 2018-05-10 Tom Tromey <tom@tromey.com>
7651
7652 * configure: Rebuild.
7653 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7654
7655 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7656
7657 PR server/23158:
7658 * regformats/regdat.sh: Adjust script, following the addition
7659 of the new expedite_regs parameter to init_target_desc.
7660
7661 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7662
7663 PR gdb/23127
7664 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7665 set_gdbarch_significant_addr_bit.
7666 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7667 set_gdbarch_significant_addr_bit.
7668 * utils.c (address_significant): Update to sign extend addr.
7669
7670 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7671
7672 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7673 (xtensa_linux_init_abi): Limit tdep->num_regs by
7674 tdep->num_nopriv_regs.
7675 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7676 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7677 not initialized.
7678
7679 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7680
7681 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7682
7683 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7684
7685 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7686 (I387_MXCSR_INIT_VAL): New constant.
7687 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7688 buffer if it was supplied by the inferior.
7689 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7690 (i387_xsave_get_clear_bv): New function.
7691 (i387_supply_xsave): Only read x87 control registers from the
7692 xsave buffer if the feature is enabled, and the state will have
7693 been written, otherwise, provide a suitable default.
7694 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7695 including x87 control registers. Update control registers if they
7696 have changed from the default value, and mark features as enabled
7697 as required.
7698 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7699
7700 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7701
7702 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7703
7704 2018-05-07 Tom Tromey <tom@tromey.com>
7705
7706 * configure: Rebuild.
7707 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7708
7709 2018-05-07 Tom Tromey <tom@tromey.com>
7710
7711 PR tdep/20362:
7712 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7713 bit. Use correct value for VDIV.
7714
7715 2018-05-04 Tom Tromey <tom@tromey.com>
7716
7717 * configure: Rebuild.
7718 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7719
7720 2018-05-04 Tom Tromey <tom@tromey.com>
7721
7722 * linux-record.c (record_linux_system_call) <case
7723 RECORD_SYS_RECVFROM>: Add "break".
7724
7725 2018-05-04 Tom Tromey <tom@tromey.com>
7726
7727 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7728 Add missing "break".
7729 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7730 Add missing "break".
7731
7732 2018-05-04 Tom Tromey <tom@tromey.com>
7733
7734 * rs6000-tdep.c (ppc_process_record_op4)
7735 (ppc_process_record_op63): Add fall-through comment.
7736
7737 2018-05-04 Tom Tromey <tom@tromey.com>
7738
7739 * i386-tdep.c (i386_process_record): Add fall-through comment.
7740
7741 2018-05-04 Tom Tromey <tom@tromey.com>
7742
7743 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7744 comment.
7745
7746 2018-05-04 Tom Tromey <tom@tromey.com>
7747
7748 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7749 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7750 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7751 comment.
7752 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7753 comment.
7754 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7755 comment.
7756
7757 2018-05-04 Tom Tromey <tom@tromey.com>
7758
7759 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7760
7761 2018-05-04 Tom Tromey <tom@tromey.com>
7762
7763 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7764 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7765 * symfile.c (section_is_mapped): Fix fall-through comment.
7766 * stabsread.c (define_symbol, read_member_functions): Fix
7767 fall-through comment.
7768 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7769 comment.
7770 * remote.c (remote_wait_as): Fix fall-through comment.
7771 * p-exp.y (yylex): Fix fall-through comment.
7772 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7773 comment.
7774 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7775 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7776 * jv-exp.y (yylex): Fix fall-through comment.
7777 * go-exp.y (lex_one_token): Fix fall-through comment.
7778 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7779 fall-through comment.
7780 * f-exp.y (yylex): Fix fall-through comment.
7781 * dwarf2read.c (process_die): Fix fall-through comments.
7782 * dbxread.c (process_one_symbol): Fix fall-through comment.
7783 * d-exp.y (lex_one_token): Fix fall-through comment.
7784 * cp-name-parser.y (yylex): Fix fall-through comment.
7785 * coffread.c (coff_symtab_read): Fix fall-through comment.
7786 * c-exp.y (lex_one_token): Fix fall-through comment.
7787 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7788 comment.
7789 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7790 comment.
7791
7792 2018-05-04 Tom Tromey <tom@tromey.com>
7793
7794 PR python/22730:
7795 * NEWS: Mention gdb.execute change.
7796 * gdbcmd.h (execute_control_command): Don't declare.
7797 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7798 execute_control_commands, execute_control_commands_to_string.
7799 * cli/cli-script.h (execute_control_commands)
7800 (execute_control_commands_to_string): Declare.
7801 (execute_control_command): Add from_tty parameter.
7802 * cli/cli-script.c (execute_control_commands)
7803 (execute_control_commands_to_string): New functions.
7804 (execute_user_command): Use execute_control_commands.
7805 (execute_control_command_1): Add "from_tty" parameter. Update.
7806 (execute_control_command): Likewise.
7807
7808 2018-05-04 Tom Tromey <tom@tromey.com>
7809
7810 PR python/22731:
7811 * NEWS: Mention that breakpoint commands are writable.
7812 * python/py-breakpoint.c (bppy_set_commands): New function.
7813 (breakpoint_object_getset) <"commands">: Use it.
7814
7815 2018-05-04 Tom Tromey <tom@tromey.com>
7816
7817 * tracepoint.c (actions_command): Update.
7818 * mi/mi-cmd-break.c (mi_command_line_array)
7819 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7820 (mi_read_next_line): Remove.
7821 (mi_cmd_break_commands): Update.
7822 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7823 function_view.
7824 * cli/cli-script.c (get_command_line): Update.
7825 (process_next_line): Use function_view. Constify.
7826 (recurse_read_control_structure, read_command_lines)
7827 (read_command_lines_1): Change argument types to function_view.
7828 (do_define_command, document_command): Update.
7829 * breakpoint.h (check_tracepoint_command): Don't declare.
7830 * breakpoint.c (check_tracepoint_command): Remove.
7831 (commands_command_1, create_tracepoint_from_upload): Update.
7832
7833 2018-05-04 Tom Tromey <tom@tromey.com>
7834
7835 PR gdb/11750:
7836 * cli/cli-script.h (enum command_control_type) <define_control>:
7837 New constant.
7838 * cli/cli-script.c (multi_line_command_p): Handle define_control.
7839 (build_command_line, execute_control_command_1)
7840 (process_next_line): Likewise.
7841 (do_define_command): New function, extracted from define_command.
7842 (define_command): Use it.
7843
7844 2018-05-04 Tom Tromey <tom@tromey.com>
7845
7846 * tracepoint.c (actions_command): Update.
7847 * cli/cli-script.h (read_command_lines): Update.
7848 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7849 (MAX_TMPBUF): Remove define.
7850 (define_command): Use string_printf.
7851 (document_command): Likewise.
7852 * breakpoint.c (commands_command_1): Update.
7853
7854 2018-05-04 Tom Tromey <tom@tromey.com>
7855
7856 * top.c (execute_command): Update.
7857 * cli/cli-script.h (print_command_lines): Now varargs.
7858 * cli/cli-script.c (print_command_lines): Now varargs.
7859 (execute_control_command_1) <case while_control, case if_control>:
7860 Update.
7861
7862 2018-05-04 Tom Tromey <tom@tromey.com>
7863
7864 * tracepoint.c (all_tracepoint_actions): Rename from
7865 all_tracepoint_actions_and_cleanup. Change return type.
7866 (actions_command, encode_actions_1, encode_actions)
7867 (trace_dump_actions, tdump_command): Update.
7868 * remote.c (remote_download_command_source): Update.
7869 * python/python.c (gdbpy_eval_from_control_command)
7870 (python_command, python_interactive_command): Update.
7871 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7872 * guile/guile.c (guile_command)
7873 (gdbscm_eval_from_control_command, guile_command): Update.
7874 * compile/compile.c (compile_code_command)
7875 (compile_print_command, compile_to_object): Update.
7876 * cli/cli-script.h (struct command_lines_deleter): New.
7877 (counted_command_line): New typedef.
7878 (struct command_line): Add constructor, destructor.
7879 <body_list>: Remove.
7880 <body_list_0, body_list_1>: New members.
7881 (command_line_up): Remove typedef.
7882 (read_command_lines, read_command_lines_1, get_command_line):
7883 Update.
7884 (copy_command_lines): Don't declare.
7885 * cli/cli-script.c (build_command_line): Use "new".
7886 (get_command_line): Return counted_command_line.
7887 (print_command_lines, execute_user_command)
7888 (execute_control_command_1, while_command, if_command): Update.
7889 (realloc_body_list): Remove.
7890 (process_next_line, recurse_read_control_structure): Update.
7891 (read_command_lines, read_command_lines_1): Return counted_command_line.
7892 (free_command_lines): Use "delete".
7893 (copy_command_lines): Remove.
7894 (define_command, document_command, show_user_1): Update.
7895 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7896 a counted_command_line.
7897 * breakpoint.h (counted_command_line): Remove typedef.
7898 (breakpoint_set_commands): Update.
7899 * breakpoint.c (check_no_tracepoint_commands)
7900 (validate_commands_for_breakpoint): Update.
7901 (breakpoint_set_commands): Change commands to be a
7902 counted_command_line.
7903 (commands_command_1, update_dprintf_command_list)
7904 (create_tracepoint_from_upload): Update.
7905
7906 2018-05-04 Tom Tromey <tom@tromey.com>
7907
7908 * cli/cli-decode.h (cmd_list_element): New constructor.
7909 (~cmd_list_element): New destructor.
7910 (struct cmd_list_element): Add initializers.
7911 * cli/cli-decode.c (do_add_cmd): Use "new".
7912 (delete_cmd): Use "delete".
7913
7914 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
7915 Pedro Alves <palves@redhat.com>
7916
7917 PR breakpoints/19806 and support for PR external/20207.
7918 * NEWS: Mention Aarch64 watchpoint improvements.
7919 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7920 watchpoints and PR external/20207 watchpoints.
7921 * nat/aarch64-linux-hw-point.c
7922 (kernel_supports_any_contiguous_range): New.
7923 (aarch64_watchpoint_offset): New.
7924 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7925 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7926 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7927 (aarch64_align_watchpoint): New parameters aligned_offset_p and
7928 next_addr_orig_p. Support PR external/20207 watchpoints.
7929 (aarch64_downgrade_regs): New.
7930 (aarch64_dr_state_insert_one_point): New parameters offset and
7931 addr_orig.
7932 (aarch64_dr_state_remove_one_point): Likewise.
7933 (aarch64_handle_breakpoint): Update caller.
7934 (aarch64_handle_aligned_watchpoint): Likewise.
7935 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7936 aligned_offset.
7937 (aarch64_linux_set_debug_regs): Remove const from state. Call
7938 aarch64_downgrade_regs.
7939 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7940 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7941 (DR_CONTROL_MASK): ... this.
7942 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7943 (unsigned int aarch64_watchpoint_offset): New prototype.
7944 (aarch64_linux_set_debug_regs): Remove const from state.
7945 * utils.c (align_up, align_down): Move to ...
7946 * common/common-utils.c (align_up, align_down): ... here.
7947 * utils.h (align_up, align_down): Move to ...
7948 * common/common-utils.h (align_up, align_down): ... here.
7949
7950 2018-05-04 Joel Brobecker <brobecker@adacore.com>
7951
7952 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7953 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7954 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7955 Re-implement to match the ABI as summarized in GCC's
7956 gcc/config/sparc/sparc.c. All callers updated.
7957 (sparc32_store_arguments): Remove assertion.
7958
7959 2018-05-04 Tom Tromey <tom@tromey.com>
7960
7961 * printcmd.c: Don't include tui.h.
7962 (decode_format): Use skip_spaces.
7963
7964 2018-05-04 Tom Tromey <tom@tromey.com>
7965
7966 PR gdb/22619:
7967 * printcmd.c (last_count): New global.
7968 (x_command): Use saved count when repeating.
7969
7970 2018-05-04 Tom Tromey <tom@tromey.com>
7971
7972 * nto-procfs.c (do_closedir_cleanup): Remove.
7973 (procfs_pidlist): Use gdb_dir_up.
7974 * procfs.c (do_closedir_cleanup): Remove.
7975 (proc_update_threads): Use gdb_dir_up.
7976 * common/filestuff.h (struct gdb_dir_deleter): New.
7977 (gdb_dir_up): New typedef.
7978
7979 2018-05-04 Tom Tromey <tom@tromey.com>
7980
7981 * ada-lang.c (print_mention_exception): Use std::string.
7982
7983 2018-05-04 Tom Tromey <tom@tromey.com>
7984
7985 * ada-lang.c (create_excep_cond_exprs): Update.
7986 (ada_exception_catchpoint_cond_string): Use std::string.
7987
7988 2018-05-04 Tom Tromey <tom@tromey.com>
7989
7990 * ada-lang.c (xget_renaming_scope): Return std::string.
7991 (old_renaming_is_invisible): Update.
7992
7993 2018-05-04 Tom Tromey <tom@tromey.com>
7994
7995 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7996 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7997
7998 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
7999
8000 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8001
8002 2018-05-04 Tom Tromey <tom@tromey.com>
8003
8004 * remote.c (remote_query_supported_append): Change type.
8005 (remote_check_symbols): Update.
8006
8007 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8008
8009 PR gdb/11420
8010 * configure.ac: Prepend libpython.
8011 * python/python-config.py: Likewise.
8012 * configure: Regenerate.
8013
8014 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8015
8016 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8017
8018 2018-05-03 Pedro Alves <palves@redhat.com>
8019
8020 * s390-linux-nat.c
8021 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8022 override. Write 'true' instead of '1'.
8023 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8024 declaration.
8025
8026 2018-05-02 Pedro Alves <palves@redhat.com>
8027
8028 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8029 add_inf_child_target.
8030 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8031 add_inf_child_target.
8032 * aix-thread.c (aix_thread_target_info): New.
8033 (aix_thread_target) <shortname, longname, doc>: Delete.
8034 <info>: New.
8035 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8036 add_inf_child_target.
8037 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8038 add_inf_child_target.
8039 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8040 add_inf_child_target.
8041 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8042 add_inf_child_target.
8043 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8044 add_inf_child_target.
8045 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8046 add_inf_child_target.
8047 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8048 add_inf_child_target.
8049 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8050 add_inf_child_target.
8051 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8052 add_inf_child_target.
8053 * bfd-target.c (target_bfd_target_info): New.
8054 (target_bfd) <shortname, longname, doc>: Delete.
8055 <info>: New.
8056 * bsd-kvm.c (bsd_kvm_target_info): New.
8057 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8058 <info>: New.
8059 (bsd_kvm_target::open): Rename to ...
8060 (bsd_kvm_target_open): ... this. Adjust.
8061 * bsd-uthread.c (bsd_uthread_target_info): New.
8062 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8063 <info>: New.
8064 * corefile.c (core_file_command): Adjust.
8065 * corelow.c (core_target_info): New.
8066 (core_target) <shortname, longname, doc>: Delete.
8067 <info>: New.
8068 (core_target::open): Rename to ...
8069 (core_target_open): ... this. Adjust.
8070 * ctf.c (ctf_target_info): New.
8071 (ctf_target) <shortname, longname, doc>: Delete.
8072 <info>: New.
8073 (ctf_target::open): Rename to ...
8074 (ctf_target_open): ... this.
8075 (_initialize_ctf): Adjust.
8076 * exec.c (exec_target_info): New.
8077 (exec_target) <shortname, longname, doc>: Delete.
8078 <info>: New.
8079 (exec_target::open): Rename to ...
8080 (exec_target_open): ... this.
8081 * gdbcore.h (core_target_open): Declare.
8082 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8083 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8084 add_inf_child_target.
8085 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8086 add_inf_child_target.
8087 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8088 add_inf_child_target.
8089 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8090 add_inf_child_target.
8091 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8092 add_inf_child_target.
8093 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8094 add_inf_child_target.
8095 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8096 add_inf_child_target.
8097 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8098 add_inf_child_target.
8099 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8100 add_inf_child_target.
8101 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8102 add_inf_child_target.
8103 * inf-child.c (inf_child_target_info): New.
8104 (inf_child_target::info): New.
8105 (inf_child_open_target): Remove 'target' parameter. Use
8106 get_native_target instead.
8107 (inf_child_target::open): Delete.
8108 (add_inf_child_target): New.
8109 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8110 Delete.
8111 <info>: New.
8112 (add_inf_child_target): Declare.
8113 (inf_child_open_target): Declare.
8114 * linux-thread-db.c (thread_db_target_info): New.
8115 (thread_db_target) <shortname, longname, doc>: Delete.
8116 <info>: New.
8117 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8118 add_inf_child_target.
8119 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8120 add_inf_child_target.
8121 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8122 add_inf_child_target.
8123 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8124 add_inf_child_target.
8125 * make-target-delegates (print_class): Adjust.
8126 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8127 add_inf_child_target.
8128 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8129 add_inf_child_target.
8130 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8131 add_inf_child_target.
8132 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8133 add_inf_child_target.
8134 * nto-procfs.c (nto_native_target_info): New.
8135 (nto_procfs_target_native) <shortname, longname, doc>:
8136 Delete.
8137 <info>: New.
8138 (nto_procfs_target_info): New.
8139 (nto_procfs_target_procfs) <shortname, longname, doc>:
8140 Delete.
8141 <info>: New.
8142 (init_procfs_targets): Adjust.
8143 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8144 add_inf_child_target.
8145 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8146 add_inf_child_target.
8147 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8148 add_inf_child_target.
8149 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8150 add_inf_child_target.
8151 * ravenscar-thread.c (ravenscar_target_info): New.
8152 (ravenscar_thread_target) <shortname, longname, doc>:
8153 Delete.
8154 <info>: New.
8155 * record-btrace.c (record_btrace_target_info):
8156 (record_btrace_target) <shortname, longname, doc>: Delete.
8157 <info>: New.
8158 (record_btrace_target::open): Rename to ...
8159 (record_btrace_target_open): ... this. Adjust.
8160 * record-full.c (record_longname, record_doc): New.
8161 (record_full_base_target) <shortname, longname, doc>: Delete.
8162 <info>: New.
8163 (record_full_target_info): New.
8164 (record_full_target): <shortname>: Delete.
8165 <info>: New.
8166 (record_full_core_open_1, record_full_open_1): Update comments.
8167 (record_full_base_target::open): Rename to ...
8168 (record_full_open): ... this.
8169 (cmd_record_full_restore): Update.
8170 (_initialize_record_full): Update.
8171 * remote-sim.c (remote_sim_target_info): New.
8172 (gdbsim_target) <shortname, longname, doc>: Delete.
8173 <info>: New.
8174 (gdbsim_target::open): Rename to ...
8175 (gdbsim_target_open): ... this.
8176 (_initialize_remote_sim): Adjust.
8177 * remote.c (remote_doc): New.
8178 (remote_target_info): New.
8179 (remote_target) <shortname, longname, doc>: Delete.
8180 <info>: New.
8181 (extended_remote_target_info): New.
8182 (extended_remote_target) <shortname, longname, doc>: Delete.
8183 <info>: New.
8184 (remote_target::open_1): Make static. Adjust.
8185 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8186 * s390-linux-nat.c (_initialize_s390_nat): Use
8187 add_inf_child_target.
8188 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8189 add_inf_child_target.
8190 * sol-thread.c (thread_db_target_info): New.
8191 (sol_thread_target) <shortname, longname, doc>: Delete.
8192 <info>: New.
8193 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8194 add_inf_child_target.
8195 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8196 add_inf_child_target.
8197 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8198 add_inf_child_target.
8199 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8200 add_inf_child_target.
8201 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8202 add_inf_child_target.
8203 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8204 add_inf_child_target.
8205 * spu-linux-nat.c (_initialize_spu_nat): Use
8206 add_inf_child_target.
8207 * spu-multiarch.c (spu_multiarch_target_info): New.
8208 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8209 <info>: New.
8210 * target-delegates.c: Regenerate.
8211 * target.c: Include <unordered_map>.
8212 (target_ops_p): Delete.
8213 (DEF_VEC_P(target_ops_p)): Delete.
8214 (target_factories): New.
8215 (test_target_info): New.
8216 (test_target_ops::info): New.
8217 (open_target): Adjust to use target_factories.
8218 (add_target_with_completer): Rename to ...
8219 (add_target): ... this. Change prototype. Register target_info
8220 and open callback in target_factories. Register target_info in
8221 command context instead of target_ops.
8222 (add_target): Delete old implementation.
8223 (add_deprecated_target_alias): Change prototype. Adjust.
8224 (the_native_target): New.
8225 (set_native_target, get_native_target): New.
8226 (find_default_run_target): Use the_native_target.
8227 (find_attach_target, find_run_target): Simplify.
8228 (target_ops::open): Delete.
8229 (dummy_target_info): New.
8230 (dummy_target::shortname, dummy_target::longname)
8231 (dummy_target::doc): Delete.
8232 (dummy_target::info): New.
8233 (debug_target::shortname, debug_target::longname)
8234 (debug_target::doc): Delete.
8235 (debug_target::info): New.
8236 * target.h (struct target_info): New.
8237 (target_ops::~target_ops): Add comment.
8238 (target_ops::info): New.
8239 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8240 longer virtual. Implement in terms of target_info.
8241 (set_native_target, get_native_target): Declare.
8242 (target_open_ftype): New.
8243 (add_target, add_target_with_completer)
8244 (add_deprecated_target_alias): Change prototype.
8245 (test_target) <shortname, longname, doc>: Delete.
8246 <info>: New.
8247 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8248 add_inf_child_target.
8249 * tracefile-tfile.c (tfile_target_info): New.
8250 (tfile_target) <shortname, longname, doc>: Delete.
8251 <info>: New.
8252 (tfile_target::open): Rename to ...
8253 (tfile_target_open): ... this.
8254 (_initialize_tracefile_tfile): Adjust.
8255 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8256 add_inf_child_target.
8257 * windows-nat.c (_initialize_windows_nat): Use
8258 add_inf_child_target.
8259 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8260 add_inf_child_target.
8261
8262 2018-05-02 Pedro Alves <palves@redhat.com>
8263
8264 * linux-nat.h (linux_nat_target) <low_new_thread,
8265 low_delete_thread, low_new_fork, low_forget_process,
8266 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8267 New virtual methods.
8268 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8269 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8270 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8271 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8272 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8273 Delete.
8274 * linux-fork.c (delete_fork): Adjust to call low method.
8275 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8276 (linux_nat_new_fork, linux_nat_forget_process_hook)
8277 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8278 (linux_nat_status_is_event):
8279 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8280 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8281 to call low method.
8282 (sigtrap_is_event): Rename to ...
8283 (linux_nat_target::low_status_is_event): ... this.
8284 (linux_nat_set_status_is_event): Delete.
8285 (save_stop_reason, linux_nat_wait_1)
8286 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8287 low methods.
8288 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8289 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8290 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8291 (linux_nat_set_prepare_to_resume): Delete.
8292 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8293 low virtual methods.
8294 * amd64-linux-nat.c: Likewise.
8295 * arm-linux-nat.c: Likewise.
8296 * i386-linux-nat.c: Likewise.
8297 * ia64-linux-nat.c: Likewise.
8298 * mips-linux-nat.c: Likewise.
8299 * ppc-linux-nat.c: Likewise.
8300 * s390-linux-nat.c: Likewise.
8301 * sparc64-linux-nat.c: Likewise.
8302 * x86-linux-nat.c: Likewise.
8303 * x86-linux-nat.h: Include "nat/x86-linux.h".
8304 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8305 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8306 Override methods.
8307
8308 2018-05-02 Pedro Alves <palves@redhat.com>
8309
8310 * target.h (target_ops)
8311 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8312 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8313 stopped_by_watchpoint, have_continuable_watchpoint,
8314 stopped_data_address, watchpoint_addr_within_range,
8315 can_accel_watchpoint_condition, can_run, thread_alive,
8316 has_all_memory, has_memory, has_stack, has_registers,
8317 has_execution, can_async_p, is_async_p, supports_non_stop,
8318 always_non_stop_p, can_execute_reverse, supports_multi_process,
8319 supports_enable_disable_tracepoint,
8320 supports_disable_randomization, supports_string_tracing,
8321 supports_evaluation_of_breakpoint_conditions,
8322 can_run_breakpoint_commands, filesystem_is_local,
8323 can_download_tracepoint, get_trace_state_variable_value,
8324 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8325 record_is_replaying, record_will_replay,
8326 augmented_libraries_svr4_read>: Adjust to return bool.
8327 * aarch64-linux-nat.c: All implementations adjusted.
8328 * aix-thread.c: All implementations adjusted.
8329 * arm-linux-nat.c: All implementations adjusted.
8330 * breakpoint.c: All implementations adjusted.
8331 * bsd-kvm.c: All implementations adjusted.
8332 * bsd-uthread.c: All implementations adjusted.
8333 * corelow.c: All implementations adjusted.
8334 * ctf.c: All implementations adjusted.
8335 * darwin-nat.c: All implementations adjusted.
8336 * darwin-nat.h: All implementations adjusted.
8337 * exec.c: All implementations adjusted.
8338 * fbsd-nat.c: All implementations adjusted.
8339 * fbsd-nat.h: All implementations adjusted.
8340 * gnu-nat.c: All implementations adjusted.
8341 * gnu-nat.h: All implementations adjusted.
8342 * go32-nat.c: All implementations adjusted.
8343 * ia64-linux-nat.c: All implementations adjusted.
8344 * inf-child.c: All implementations adjusted.
8345 * inf-child.h: All implementations adjusted.
8346 * inf-ptrace.c: All implementations adjusted.
8347 * inf-ptrace.h: All implementations adjusted.
8348 * linux-nat.c: All implementations adjusted.
8349 * linux-nat.h: All implementations adjusted.
8350 * mips-linux-nat.c: All implementations adjusted.
8351 * nto-procfs.c: All implementations adjusted.
8352 * ppc-linux-nat.c: All implementations adjusted.
8353 * procfs.c: All implementations adjusted.
8354 * ravenscar-thread.c: All implementations adjusted.
8355 * record-btrace.c: All implementations adjusted.
8356 * record-full.c: All implementations adjusted.
8357 * remote-sim.c: All implementations adjusted.
8358 * remote.c: All implementations adjusted.
8359 * s390-linux-nat.c: All implementations adjusted.
8360 * sol-thread.c: All implementations adjusted.
8361 * spu-multiarch.c: All implementations adjusted.
8362 * target-delegates.c: All implementations adjusted.
8363 * target.c: All implementations adjusted.
8364 * target.h: All implementations adjusted.
8365 * tracefile-tfile.c: All implementations adjusted.
8366 * tracefile.c: All implementations adjusted.
8367 * tracefile.h: All implementations adjusted.
8368 * windows-nat.c: All implementations adjusted.
8369 * x86-linux-nat.h: All implementations adjusted.
8370 * x86-nat.h: All implementations adjusted.
8371
8372 2018-05-02 Pedro Alves <palves@redhat.com>
8373
8374 * make-target-delegates (scan_target_h): Don't trim lines here.
8375 Replace sequences of tabs and/or whitespace with a single
8376 whitespace.
8377 (top level, parsing methods): Trim each line before processing it
8378 here.
8379
8380 2018-05-02 Pedro Alves <palves@redhat.com>
8381 John Baldwin <jhb@freebsd.org>
8382
8383 * target.h (enum strata) <debug_stratum>: New.
8384 (struct target_ops) <all delegation methods>: Replace by C++
8385 virtual methods, and drop "to_" prefix. All references updated
8386 throughout.
8387 <to_shortname, to_longname, to_doc, to_data,
8388 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8389 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8390 virtual methods. All references updated throughout.
8391 <can_attach, supports_terminal_ours, can_create_inferior,
8392 get_thread_control_capabilities, attach_no_wait>: New
8393 virtual methods.
8394 <insert_breakpoint, remove_breakpoint>: Now
8395 TARGET_DEFAULT_NORETURN methods.
8396 <info_proc>: Now returns bool.
8397 <to_magic>: Delete.
8398 (OPS_MAGIC): Delete.
8399 (current_target): Delete. All references replaced by references
8400 to ...
8401 (target_stack): ... this. New.
8402 (target_shortname, target_longname): Adjust.
8403 (target_can_run): Now a function declaration.
8404 (default_child_has_all_memory, default_child_has_memory)
8405 (default_child_has_stack, default_child_has_registers)
8406 (default_child_has_execution): Remove target_ops parameter.
8407 (complete_target_initialization): Delete.
8408 (memory_breakpoint_target): New template class.
8409 (test_target_ops): Refactor as a C++ class with virtual methods.
8410 * make-target-delegates (NAME_PART): Tighten.
8411 (POINTER_PART, CP_SYMBOL): New.
8412 (SIMPLE_RETURN_PART): Reimplement.
8413 (VEC_RETURN_PART): Expect less.
8414 (RETURN_PART, VIRTUAL_PART): New.
8415 (METHOD): Adjust to C++ virtual methods.
8416 (scan_target_h): Remove reference to C99.
8417 (dname): Output "target_ops::" prefix.
8418 (write_function_header): Adjust to output a C++ class method.
8419 (write_declaration): New.
8420 (write_delegator): Adjust to output a C++ class method.
8421 (tdname): Output "dummy_target::" prefix.
8422 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8423 method.
8424 (tdefault_names, debug_names): Delete.
8425 (return_types, tdefaults, styles, argtypes_array): New.
8426 (top level): All methods are delegators.
8427 (print_class): New.
8428 (top level): Print dummy_target and debug_target classes.
8429 * target-delegates.c: Regenerate.
8430 * target-debug.h (target_debug_print_enum_info_proc_what)
8431 (target_debug_print_thread_control_capabilities)
8432 (target_debug_print_thread_info_p): New.
8433 * target.c (dummy_target): Delete.
8434 (the_dummy_target, the_debug_target): New.
8435 (target_stack): Now extern.
8436 (set_targetdebug): Push/unpush debug target.
8437 (default_child_has_all_memory, default_child_has_memory)
8438 (default_child_has_stack, default_child_has_registers)
8439 (default_child_has_execution): Remove target_ops parameter.
8440 (complete_target_initialization): Delete.
8441 (add_target_with_completer): No longer call
8442 complete_target_initialization.
8443 (target_supports_terminal_ours): Use regular delegation.
8444 (update_current_target): Delete.
8445 (push_target): No longer check magic number. Don't call
8446 update_current_target.
8447 (unpush_target): Don't call update_current_target.
8448 (target_is_pushed): No longer check magic number.
8449 (target_require_runnable): Skip for all stratums over
8450 process_stratum.
8451 (target_ops::info_proc): New.
8452 (target_info_proc): Use find_target_at and
8453 find_default_run_target.
8454 (target_supports_disable_randomization): Use regular delegation.
8455 (target_get_osdata): Use find_target_at.
8456 (target_ops::open, target_ops::close, target_ops::can_attach)
8457 (target_ops::attach, target_ops::can_create_inferior)
8458 (target_ops::create_inferior, target_ops::can_run)
8459 (target_can_run): New.
8460 (default_fileio_target): Use regular delegation.
8461 (target_ops::fileio_open, target_ops::fileio_pwrite)
8462 (target_ops::fileio_pread, target_ops::fileio_fstat)
8463 (target_ops::fileio_close, target_ops::fileio_unlink)
8464 (target_ops::fileio_readlink): New.
8465 (target_fileio_open_1, target_fileio_unlink)
8466 (target_fileio_readlink): Always call the target method. Handle
8467 FILEIO_ENOSYS.
8468 (return_zero, return_zero_has_execution): Delete.
8469 (init_dummy_target): Delete.
8470 (dummy_target::dummy_target, dummy_target::shortname)
8471 (dummy_target::longname, dummy_target::doc)
8472 (debug_target::debug_target, debug_target::shortname)
8473 (debug_target::longname, debug_target::doc): New.
8474 (target_supports_delete_record): Use regular delegation.
8475 (setup_target_debug): Delete.
8476 (maintenance_print_target_stack): Skip debug_stratum.
8477 (initialize_targets): Instantiate the_dummy_target and
8478 the_debug_target.
8479 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8480 use target_stack.
8481 (target_auxv_search, fprint_target_auxv): Adjust.
8482 (info_auxv_command): Adjust to use target_stack.
8483 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8484 * exceptions.c (print_flush): Handle a NULL target_stack.
8485 * regcache.c (target_ops_no_register): Refactor as class with
8486 virtual methods.
8487
8488 * exec.c (exec_target): New class.
8489 (exec_ops): Now an exec_target.
8490 (exec_open, exec_close_1, exec_get_section_table)
8491 (exec_xfer_partial, exec_files_info, exec_has_memory)
8492 (exec_make_note_section): Refactor as exec_target methods.
8493 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8494 Delete.
8495 (exec_target::find_memory_regions): New.
8496 (_initialize_exec): Don't call init_exec_ops.
8497 * gdbcore.h (exec_file_clear): Delete.
8498
8499 * corefile.c (core_target): Delete.
8500 (core_file_command): Adjust.
8501 * corelow.c (core_target): New class.
8502 (the_core_target): New.
8503 (core_close): Remove target_ops parameter.
8504 (core_close_cleanup): Adjust.
8505 (core_target::close): New.
8506 (core_open, core_detach, get_core_registers, core_files_info)
8507 (core_xfer_partial, core_thread_alive, core_read_description)
8508 (core_pid_to_str, core_thread_name, core_has_memory)
8509 (core_has_stack, core_has_registers, core_info_proc): Rework as
8510 core_target methods.
8511 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8512 (_initialize_corelow): Initialize the_core_target.
8513 * gdbcore.h (core_target): Delete.
8514 (the_core_target): New.
8515
8516 * ctf.c: (ctf_target): New class.
8517 (ctf_ops): Now a ctf_target.
8518 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8519 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8520 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8521 methods.
8522 (init_ctf_ops): Delete.
8523 (_initialize_ctf): Don't call it.
8524 * tracefile-tfile.c (tfile_target): New class.
8525 (tfile_ops): Now a tfile_target.
8526 (tfile_open, tfile_close, tfile_files_info)
8527 (tfile_get_tracepoint_status, tfile_trace_find)
8528 (tfile_fetch_registers, tfile_xfer_partial)
8529 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8530 Refactor as tfile_target methods.
8531 (tfile_xfer_partial_features): Remove target_ops parameter.
8532 (init_tfile_ops): Delete.
8533 (_initialize_tracefile_tfile): Don't call it.
8534 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8535 (tracefile_has_stack, tracefile_has_registers)
8536 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8537 tracefile_target methods.
8538 (init_tracefile_ops): Delete.
8539 (tracefile_target::tracefile_target): New.
8540 * tracefile.h: Include "target.h".
8541 (tracefile_target): New class.
8542 (init_tracefile_ops): Delete.
8543
8544 * spu-multiarch.c (spu_multiarch_target): New class.
8545 (spu_ops): Now a spu_multiarch_target.
8546 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8547 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8548 (spu_search_memory, spu_mourn_inferior): Refactor as
8549 spu_multiarch_target methods.
8550 (init_spu_ops): Delete.
8551 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8552 complete_target_initialization.
8553
8554 * ravenscar-thread.c (ravenscar_thread_target): New class.
8555 (ravenscar_ops): Now a ravenscar_thread_target.
8556 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8557 (ravenscar_thread_alive, ravenscar_pid_to_str)
8558 (ravenscar_fetch_registers, ravenscar_store_registers)
8559 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8560 (ravenscar_stopped_by_hw_breakpoint)
8561 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8562 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8563 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8564 methods.
8565 (init_ravenscar_thread_ops): Delete.
8566 (_initialize_ravenscar): Remove references to
8567 init_ravenscar_thread_ops and complete_target_initialization.
8568
8569 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8570 (bsd_uthread_target): New class.
8571 (bsd_uthread_ops): Now a bsd_uthread_target.
8572 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8573 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8574 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8575 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8576 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8577 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8578 (bsd_uthread_target): Delete function.
8579 (_initialize_bsd_uthread): Remove reference to
8580 complete_target_initialization.
8581
8582 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8583 (target_bfd): ... this new class.
8584 (target_bfd_xfer_partial, target_bfd_get_section_table)
8585 (target_bfd_close): Refactor as target_bfd methods.
8586 (target_bfd::~target_bfd): New.
8587 (target_bfd_reopen): Adjust.
8588 (target_bfd::close): New.
8589
8590 * record-btrace.c (record_btrace_target): New class.
8591 (record_btrace_ops): Now a record_btrace_target.
8592 (record_btrace_open, record_btrace_stop_recording)
8593 (record_btrace_disconnect, record_btrace_close)
8594 (record_btrace_async, record_btrace_info)
8595 (record_btrace_insn_history, record_btrace_insn_history_range)
8596 (record_btrace_insn_history_from, record_btrace_call_history)
8597 (record_btrace_call_history_range)
8598 (record_btrace_call_history_from, record_btrace_record_method)
8599 (record_btrace_is_replaying, record_btrace_will_replay)
8600 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8601 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8602 (record_btrace_store_registers, record_btrace_prepare_to_store)
8603 (record_btrace_to_get_unwinder)
8604 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8605 (record_btrace_commit_resume, record_btrace_wait)
8606 (record_btrace_stop, record_btrace_can_execute_reverse)
8607 (record_btrace_stopped_by_sw_breakpoint)
8608 (record_btrace_supports_stopped_by_sw_breakpoint)
8609 (record_btrace_stopped_by_hw_breakpoint)
8610 (record_btrace_supports_stopped_by_hw_breakpoint)
8611 (record_btrace_update_thread_list, record_btrace_thread_alive)
8612 (record_btrace_goto_begin, record_btrace_goto_end)
8613 (record_btrace_goto, record_btrace_stop_replaying_all)
8614 (record_btrace_execution_direction)
8615 (record_btrace_prepare_to_generate_core)
8616 (record_btrace_done_generating_core): Refactor as
8617 record_btrace_target methods.
8618 (init_record_btrace_ops): Delete.
8619 (_initialize_record_btrace): Remove reference to
8620 init_record_btrace_ops.
8621 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8622 the execution_direction global.
8623 (record_full_base_target, record_full_target)
8624 (record_full_core_target): New classes.
8625 (record_full_ops): Now a record_full_target.
8626 (record_full_core_ops): Now a record_full_core_target.
8627 (record_full_target::detach, record_full_target::disconnect)
8628 (record_full_core_target::disconnect)
8629 (record_full_target::mourn_inferior, record_full_target::kill):
8630 New.
8631 (record_full_open, record_full_close, record_full_async): Refactor
8632 as methods of the record_full_base_target class.
8633 (record_full_resume, record_full_commit_resume): Refactor
8634 as methods of the record_full_target class.
8635 (record_full_wait, record_full_stopped_by_watchpoint)
8636 (record_full_stopped_data_address)
8637 (record_full_stopped_by_sw_breakpoint)
8638 (record_full_supports_stopped_by_sw_breakpoint)
8639 (record_full_stopped_by_hw_breakpoint)
8640 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8641 methods of the record_full_base_target class.
8642 (record_full_store_registers, record_full_xfer_partial)
8643 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8644 Refactor as methods of the record_full_target class.
8645 (record_full_can_execute_reverse, record_full_get_bookmark)
8646 (record_full_goto_bookmark, record_full_execution_direction)
8647 (record_full_record_method, record_full_info, record_full_delete)
8648 (record_full_is_replaying, record_full_will_replay)
8649 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8650 (record_full_stop_replaying): Refactor as methods of the
8651 record_full_base_target class.
8652 (record_full_core_resume, record_full_core_kill)
8653 (record_full_core_fetch_registers)
8654 (record_full_core_prepare_to_store)
8655 (record_full_core_store_registers, record_full_core_xfer_partial)
8656 (record_full_core_insert_breakpoint)
8657 (record_full_core_remove_breakpoint)
8658 (record_full_core_has_execution): Refactor
8659 as methods of the record_full_core_target class.
8660 (record_full_base_target::supports_delete_record): New.
8661 (init_record_full_ops): Delete.
8662 (init_record_full_core_ops): Delete.
8663 (record_full_save): Refactor as method of the
8664 record_full_base_target class.
8665 (_initialize_record_full): Remove references to
8666 init_record_full_ops and init_record_full_core_ops.
8667
8668 * remote.c (remote_target, extended_remote_target): New classes.
8669 (remote_ops): Now a remote_target.
8670 (extended_remote_ops): Now an extended_remote_target.
8671 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8672 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8673 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8674 (remote_pass_signals, remote_set_syscall_catchpoint)
8675 (remote_program_signals, )
8676 (remote_thread_always_alive): Remove target_ops parameter.
8677 (remote_thread_alive, remote_thread_name)
8678 (remote_update_thread_list, remote_threads_extra_info)
8679 (remote_static_tracepoint_marker_at)
8680 (remote_static_tracepoint_markers_by_strid)
8681 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8682 (remote_open): Refactor as methods of remote_target.
8683 (extended_remote_open, extended_remote_detach)
8684 (extended_remote_attach, extended_remote_post_attach):
8685 (extended_remote_supports_disable_randomization)
8686 (extended_remote_create_inferior): : Refactor as method of
8687 extended_remote_target.
8688 (remote_set_permissions, remote_open_1, remote_detach)
8689 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8690 (remote_resume, remote_commit_resume, remote_stop)
8691 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8692 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8693 (remote_prepare_to_store, remote_store_registers)
8694 (remote_flash_erase, remote_flash_done, remote_files_info)
8695 (remote_kill, remote_mourn, remote_insert_breakpoint)
8696 (remote_remove_breakpoint, remote_insert_watchpoint)
8697 (remote_watchpoint_addr_within_range)
8698 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8699 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8700 (remote_supports_stopped_by_sw_breakpoint)
8701 (remote_stopped_by_hw_breakpoint)
8702 (remote_supports_stopped_by_hw_breakpoint)
8703 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8704 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8705 (remote_verify_memory): Refactor as methods of remote_target.
8706 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8707 parameter.
8708 (remote_xfer_partial, remote_get_memory_xfer_limit)
8709 (remote_search_memory, remote_rcmd, remote_memory_map)
8710 (remote_pid_to_str, remote_get_thread_local_address)
8711 (remote_get_tib_address, remote_read_description): Refactor as
8712 methods of remote_target.
8713 (remote_target::fileio_open, remote_target::fileio_pwrite)
8714 (remote_target::fileio_pread, remote_target::fileio_close): New.
8715 (remote_hostio_readlink, remote_hostio_fstat)
8716 (remote_filesystem_is_local, remote_can_execute_reverse)
8717 (remote_supports_non_stop, remote_supports_disable_randomization)
8718 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8719 (remote_supports_enable_disable_tracepoint)
8720 (remote_supports_string_tracing)
8721 (remote_can_run_breakpoint_commands, remote_trace_init)
8722 (remote_download_tracepoint, remote_can_download_tracepoint)
8723 (remote_download_trace_state_variable, remote_enable_tracepoint)
8724 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8725 (remote_trace_start, remote_get_trace_status)
8726 (remote_get_tracepoint_status, remote_trace_stop)
8727 (remote_trace_find, remote_get_trace_state_variable_value)
8728 (remote_save_trace_data, remote_get_raw_trace_data)
8729 (remote_set_disconnected_tracing, remote_core_of_thread)
8730 (remote_set_circular_trace_buffer, remote_traceframe_info)
8731 (remote_get_min_fast_tracepoint_insn_len)
8732 (remote_set_trace_buffer_size, remote_set_trace_notes)
8733 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8734 (remote_disable_btrace, remote_teardown_btrace)
8735 (remote_read_btrace, remote_btrace_conf)
8736 (remote_augmented_libraries_svr4_read, remote_load)
8737 (remote_pid_to_exec_file, remote_can_do_single_step)
8738 (remote_execution_direction, remote_thread_handle_to_thread_info):
8739 Refactor as methods of remote_target.
8740 (init_remote_ops, init_extended_remote_ops): Delete.
8741 (remote_can_async_p, remote_is_async_p, remote_async)
8742 (remote_thread_events, remote_upload_tracepoints)
8743 (remote_upload_trace_state_variables): Refactor as methods of
8744 remote_target.
8745 (_initialize_remote): Remove references to init_remote_ops and
8746 init_extended_remote_ops.
8747
8748 * remote-sim.c (gdbsim_target): New class.
8749 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8750 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8751 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8752 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8753 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8754 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8755 Refactor as methods of gdbsim_target.
8756 (gdbsim_ops): Now a gdbsim_target.
8757 (init_gdbsim_ops): Delete.
8758 (gdbsim_cntrl_c): Adjust.
8759 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8760
8761 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8762 (the_amd64_linux_nat_target): New.
8763 (amd64_linux_fetch_inferior_registers)
8764 (amd64_linux_store_inferior_registers): Refactor as methods of
8765 amd64_linux_nat_target.
8766 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8767 * i386-linux-nat.c: Don't include "linux-nat.h".
8768 (i386_linux_nat_target): New class.
8769 (the_i386_linux_nat_target): New.
8770 (i386_linux_fetch_inferior_registers)
8771 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8772 as methods of i386_linux_nat_target.
8773 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8774 * inf-child.c (inf_child_ops): Delete.
8775 (inf_child_fetch_inferior_registers)
8776 (inf_child_store_inferior_registers): Delete.
8777 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8778 methods of inf_child_target.
8779 (inf_child_target::supports_terminal_ours)
8780 (inf_child_target::terminal_init)
8781 (inf_child_target::terminal_inferior)
8782 (inf_child_target::terminal_ours_for_output)
8783 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8784 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8785 New.
8786 (inf_child_open, inf_child_disconnect, inf_child_close)
8787 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8788 (inf_child_post_startup_inferior, inf_child_can_run)
8789 (inf_child_pid_to_exec_file): Refactor as methods of
8790 inf_child_target.
8791 (inf_child_follow_fork): Delete.
8792 (inf_child_target::can_create_inferior)
8793 (inf_child_target::can_attach): New.
8794 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8795 (inf_child_target::has_stack, inf_child_target::has_registers)
8796 (inf_child_target::has_execution): New.
8797 (inf_child_fileio_open, inf_child_fileio_pwrite)
8798 (inf_child_fileio_pread, inf_child_fileio_fstat)
8799 (inf_child_fileio_close, inf_child_fileio_unlink)
8800 (inf_child_fileio_readlink, inf_child_use_agent)
8801 (inf_child_can_use_agent): Refactor as methods of
8802 inf_child_target.
8803 (return_zero, inf_child_target): Delete.
8804 (inf_child_target::inf_child_target): New.
8805 * inf-child.h: Include "target.h".
8806 (inf_child_target): Delete function prototype.
8807 (inf_child_target): New class.
8808 (inf_child_open_target, inf_child_mourn_inferior)
8809 (inf_child_maybe_unpush_target): Delete.
8810 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8811 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8812 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8813 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8814 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8815 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8816 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8817 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8818 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8819 methods of inf_ptrace_target.
8820 (inf_ptrace_target): Delete function.
8821 * inf-ptrace.h: Include "inf-child.h".
8822 (inf_ptrace_target): Delete function declaration.
8823 (inf_ptrace_target): New class.
8824 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8825 * linux-nat.c (linux_target): New.
8826 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8827 (linux_nat_target::~linux_nat_target): New.
8828 (linux_child_post_attach, linux_child_post_startup_inferior)
8829 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8830 (linux_child_remove_fork_catchpoint)
8831 (linux_child_insert_vfork_catchpoint)
8832 (linux_child_remove_vfork_catchpoint)
8833 (linux_child_insert_exec_catchpoint)
8834 (linux_child_remove_exec_catchpoint)
8835 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8836 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8837 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8838 (linux_nat_stopped_data_address)
8839 (linux_nat_stopped_by_sw_breakpoint)
8840 (linux_nat_supports_stopped_by_sw_breakpoint)
8841 (linux_nat_stopped_by_hw_breakpoint)
8842 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8843 (linux_nat_kill, linux_nat_mourn_inferior)
8844 (linux_nat_xfer_partial, linux_nat_thread_alive)
8845 (linux_nat_update_thread_list, linux_nat_pid_to_str)
8846 (linux_nat_thread_name, linux_child_pid_to_exec_file)
8847 (linux_child_static_tracepoint_markers_by_strid)
8848 (linux_nat_is_async_p, linux_nat_can_async_p)
8849 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8850 (linux_nat_supports_multi_process)
8851 (linux_nat_supports_disable_randomization, linux_nat_async)
8852 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8853 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8854 (linux_nat_fileio_open, linux_nat_fileio_readlink)
8855 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8856 methods of linux_nat_target.
8857 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8858 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8859 parameter.
8860 (check_stopped_by_watchpoint): Adjust.
8861 (linux_xfer_partial): Delete.
8862 (linux_target_install_ops, linux_target, linux_nat_add_target):
8863 Delete.
8864 (linux_nat_target::linux_nat_target): New.
8865 * linux-nat.h: Include "inf-ptrace.h".
8866 (linux_nat_target): New.
8867 (linux_target, linux_target_install_ops, linux_nat_add_target):
8868 Delete function declarations.
8869 (linux_target): Declare global.
8870 * linux-thread-db.c (thread_db_target): New.
8871 (thread_db_target::thread_db_target): New.
8872 (thread_db_ops): Delete.
8873 (the_thread_db_target): New.
8874 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8875 (thread_db_update_thread_list, thread_db_pid_to_str)
8876 (thread_db_extra_thread_info)
8877 (thread_db_thread_handle_to_thread_info)
8878 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8879 (thread_db_resume): Refactor as methods of thread_db_target.
8880 (init_thread_db_ops): Delete.
8881 (_initialize_thread_db): Remove reference to init_thread_db_ops.
8882 * x86-linux-nat.c: Don't include "linux-nat.h".
8883 (super_post_startup_inferior): Delete.
8884 (x86_linux_nat_target::~x86_linux_nat_target): New.
8885 (x86_linux_child_post_startup_inferior)
8886 (x86_linux_read_description, x86_linux_enable_btrace)
8887 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8888 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8889 methods of x86_linux_nat_target.
8890 (x86_linux_create_target): Delete. Bits folded ...
8891 (x86_linux_add_target): ... here. Now takes a linux_nat_target
8892 pointer.
8893 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8894 (x86_linux_nat_target): New class.
8895 (x86_linux_create_target): Delete.
8896 (x86_linux_add_target): Now takes a linux_nat_target pointer.
8897 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8898 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8899 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8900 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8901 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8902 make extern.
8903 (x86_use_watchpoints): Delete.
8904 * x86-nat.h: Include "breakpoint.h" and "target.h".
8905 (x86_use_watchpoints): Delete.
8906 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8907 (x86_stopped_by_watchpoint, x86_stopped_data_address)
8908 (x86_insert_watchpoint, x86_remove_watchpoint)
8909 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8910 (x86_stopped_by_hw_breakpoint): New declarations.
8911 (x86_nat_target): New template class.
8912
8913 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8914 (the_ppc_linux_nat_target): New.
8915 (ppc_linux_fetch_inferior_registers)
8916 (ppc_linux_can_use_hw_breakpoint)
8917 (ppc_linux_region_ok_for_hw_watchpoint)
8918 (ppc_linux_ranged_break_num_registers)
8919 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8920 (ppc_linux_insert_mask_watchpoint)
8921 (ppc_linux_remove_mask_watchpoint)
8922 (ppc_linux_can_accel_watchpoint_condition)
8923 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8924 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8925 (ppc_linux_watchpoint_addr_within_range)
8926 (ppc_linux_masked_watch_num_registers)
8927 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8928 (ppc_linux_read_description): Refactor as methods of
8929 ppc_linux_nat_target.
8930 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
8931
8932 * procfs.c (procfs_xfer_partial): Delete forward declaration.
8933 (procfs_target): New class.
8934 (the_procfs_target): New.
8935 (procfs_target): Delete function.
8936 (procfs_auxv_parse, procfs_attach, procfs_detach)
8937 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8938 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8939 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8940 (procfs_create_inferior, procfs_update_thread_list)
8941 (procfs_thread_alive, procfs_pid_to_str)
8942 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8943 (procfs_stopped_data_address, procfs_insert_watchpoint)
8944 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8945 (proc_find_memory_regions, procfs_info_proc)
8946 (procfs_make_note_section): Refactor as methods of procfs_target.
8947 (_initialize_procfs): Adjust.
8948 * sol-thread.c (sol_thread_target): New class.
8949 (sol_thread_ops): Now a sol_thread_target.
8950 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8951 (sol_thread_fetch_registers, sol_thread_store_registers)
8952 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8953 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8954 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8955 (init_sol_thread_ops): Delete.
8956 (_initialize_sol_thread): Adjust. Remove references to
8957 init_sol_thread_ops and complete_target_initialization.
8958
8959 * windows-nat.c (windows_nat_target): New class.
8960 (windows_fetch_inferior_registers)
8961 (windows_store_inferior_registers, windows_resume, windows_wait)
8962 (windows_attach, windows_detach, windows_pid_to_exec_file)
8963 (windows_files_info, windows_create_inferior)
8964 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8965 (windows_close, windows_pid_to_str, windows_xfer_partial)
8966 (windows_get_tib_address, windows_get_ada_task_ptid)
8967 (windows_thread_name, windows_thread_alive): Refactor as
8968 windows_nat_target methods.
8969 (do_initial_windows_stuff): Adjust.
8970 (windows_target): Delete function.
8971 (_initialize_windows_nat): Adjust.
8972
8973 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8974 (darwin_mourn_inferior, darwin_kill_inferior)
8975 (darwin_create_inferior, darwin_attach, darwin_detach)
8976 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8977 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8978 (darwin_supports_multi_process): Refactor as darwin_nat_target
8979 methods.
8980 (darwin_resume_to, darwin_files_info): Delete.
8981 (_initialize_darwin_inferior): Rename to ...
8982 (_initialize_darwin_nat): ... this. Adjust to C++ification.
8983 * darwin-nat.h: Include "inf-child.h".
8984 (darwin_nat_target): New class.
8985 (darwin_complete_target): Delete.
8986 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8987 (darwin_target): New.
8988 (i386_darwin_fetch_inferior_registers)
8989 (i386_darwin_store_inferior_registers): Refactor as methods of
8990 darwin_nat_target.
8991 (darwin_complete_target): Delete, with ...
8992 (_initialize_i386_darwin_nat): ... bits factored out here.
8993
8994 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8995 (the_alpha_linux_nat_target): New.
8996 (alpha_linux_register_u_offset): Refactor as
8997 alpha_linux_nat_target method.
8998 (_initialize_alpha_linux_nat): Adjust.
8999 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9000 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9001 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9002 methods of linux_nat_trad_target.
9003 (linux_trad_target): Delete.
9004 * linux-nat-trad.h (linux_trad_target): Delete function.
9005 (linux_nat_trad_target): New class.
9006 * mips-linux-nat.c (mips_linux_nat_target): New class.
9007 (super_fetch_registers, super_store_registers, super_close):
9008 Delete.
9009 (the_mips_linux_nat_target): New.
9010 (mips64_linux_regsets_fetch_registers)
9011 (mips64_linux_regsets_store_registers)
9012 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9013 (mips_linux_register_u_offset, mips_linux_read_description)
9014 (mips_linux_can_use_hw_breakpoint)
9015 (mips_linux_stopped_by_watchpoint)
9016 (mips_linux_stopped_data_address)
9017 (mips_linux_region_ok_for_hw_watchpoint)
9018 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9019 (mips_linux_close): Refactor as methods of mips_linux_nat.
9020 (_initialize_mips_linux_nat): Adjust to C++ification.
9021
9022 * aix-thread.c (aix_thread_target): New class.
9023 (aix_thread_ops): Now an aix_thread_target.
9024 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9025 (aix_thread_fetch_registers, aix_thread_store_registers)
9026 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9027 (aix_thread_thread_alive, aix_thread_pid_to_str)
9028 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9029 Refactor as methods of aix_thread_target.
9030 (init_aix_thread_ops): Delete.
9031 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9032 and complete_target_initialization.
9033 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9034 (rs6000_nat_target): New class.
9035 (the_rs6000_nat_target): New.
9036 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9037 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9038 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9039 (super_create_inferior): Delete.
9040 (_initialize_rs6000_nat): Adjust to C++ification.
9041
9042 * arm-linux-nat.c (arm_linux_nat_target): New class.
9043 (the_arm_linux_nat_target): New.
9044 (arm_linux_fetch_inferior_registers)
9045 (arm_linux_store_inferior_registers, arm_linux_read_description)
9046 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9047 (arm_linux_remove_hw_breakpoint)
9048 (arm_linux_region_ok_for_hw_watchpoint)
9049 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9050 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9051 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9052 arm_linux_nat_target.
9053 (_initialize_arm_linux_nat): Adjust to C++ification.
9054
9055 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9056 (the_aarch64_linux_nat_target): New.
9057 (aarch64_linux_fetch_inferior_registers)
9058 (aarch64_linux_store_inferior_registers)
9059 (aarch64_linux_child_post_startup_inferior)
9060 (aarch64_linux_read_description)
9061 (aarch64_linux_can_use_hw_breakpoint)
9062 (aarch64_linux_insert_hw_breakpoint)
9063 (aarch64_linux_remove_hw_breakpoint)
9064 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9065 (aarch64_linux_region_ok_for_hw_watchpoint)
9066 (aarch64_linux_stopped_data_address)
9067 (aarch64_linux_stopped_by_watchpoint)
9068 (aarch64_linux_watchpoint_addr_within_range)
9069 (aarch64_linux_can_do_single_step): Refactor as methods of
9070 aarch64_linux_nat_target.
9071 (super_post_startup_inferior): Delete.
9072 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9073
9074 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9075 (the_hppa_linux_nat_target): New.
9076 (hppa_linux_fetch_inferior_registers)
9077 (hppa_linux_store_inferior_registers): Refactor as methods of
9078 hppa_linux_nat_target.
9079 (_initialize_hppa_linux_nat): Adjust to C++ification.
9080
9081 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9082 (the_ia64_linux_nat_target): New.
9083 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9084 (ia64_linux_stopped_data_address)
9085 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9086 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9087 ia64_linux_nat_target methods.
9088 (super_xfer_partial): Delete.
9089 (_initialize_ia64_linux_nat): Adjust to C++ification.
9090
9091 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9092 (the_m32r_linux_nat_target): New.
9093 (m32r_linux_fetch_inferior_registers)
9094 (m32r_linux_store_inferior_registers): Refactor as
9095 m32r_linux_nat_target methods.
9096 (_initialize_m32r_linux_nat): Adjust to C++ification.
9097
9098 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9099 (the_m68k_linux_nat_target): New.
9100 (m68k_linux_fetch_inferior_registers)
9101 (m68k_linux_store_inferior_registers): Refactor as
9102 m68k_linux_nat_target methods.
9103 (_initialize_m68k_linux_nat): Adjust to C++ification.
9104
9105 * s390-linux-nat.c (s390_linux_nat_target): New class.
9106 (the_s390_linux_nat_target): New.
9107 (s390_linux_fetch_inferior_registers)
9108 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9109 (s390_insert_watchpoint, s390_remove_watchpoint)
9110 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9111 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9112 (s390_auxv_parse, s390_read_description): Refactor as methods of
9113 s390_linux_nat_target.
9114 (_initialize_s390_nat): Adjust to C++ification.
9115
9116 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9117 (the_sparc_linux_nat_target): New.
9118 (_initialize_sparc_linux_nat): Adjust to C++ification.
9119 * sparc-nat.c (sparc_fetch_inferior_registers)
9120 (sparc_store_inferior_registers): Remove target_ops parameter.
9121 * sparc-nat.h (sparc_fetch_inferior_registers)
9122 (sparc_store_inferior_registers): Remove target_ops parameter.
9123 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9124 (the_sparc64_linux_nat_target): New.
9125 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9126
9127 * spu-linux-nat.c (spu_linux_nat_target): New class.
9128 (the_spu_linux_nat_target): New.
9129 (spu_child_post_startup_inferior, spu_child_post_attach)
9130 (spu_child_wait, spu_fetch_inferior_registers)
9131 (spu_store_inferior_registers, spu_xfer_partial)
9132 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9133 methods.
9134 (_initialize_spu_nat): Adjust to C++ification.
9135
9136 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9137 (the_tilegx_linux_nat_target): New.
9138 (fetch_inferior_registers, store_inferior_registers):
9139 Refactor as methods.
9140 (_initialize_tile_linux_nat): Adjust to C++ification.
9141
9142 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9143 (the_xtensa_linux_nat_target): New.
9144 (xtensa_linux_fetch_inferior_registers)
9145 (xtensa_linux_store_inferior_registers): Refactor as
9146 xtensa_linux_nat_target methods.
9147 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9148
9149 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9150 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9151 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9152 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9153 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9154 (fbsd_stopped_by_sw_breakpoint)
9155 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9156 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9157 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9158 (fbsd_post_startup_inferior, fbsd_post_attach)
9159 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9160 (fbsd_set_syscall_catchpoint)
9161 (super_xfer_partial, super_resume, super_wait)
9162 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9163 (fbsd_handle_debug_trap): Remove target_ops parameter.
9164 (fbsd_nat_add_target): Delete.
9165 * fbsd-nat.h: Include "inf-ptrace.h".
9166 (fbsd_nat_add_target): Delete.
9167 (USE_SIGTRAP_SIGINFO): Define.
9168 (fbsd_nat_target): New class.
9169
9170 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9171 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9172 (amd64bsd_target): Delete.
9173 * amd64-bsd-nat.h: New file.
9174 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9175 "x86-bsd-nat.h".
9176 (amd64_fbsd_nat_target): New class.
9177 (the_amd64_fbsd_nat_target): New.
9178 (amd64fbsd_read_description): Refactor as method of
9179 amd64_fbsd_nat_target.
9180 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9181 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9182 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9183 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9184 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9185 (i386bsd_target): Delete.
9186 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9187 (i386bsd_fetch_inferior_registers)
9188 (i386bsd_store_inferior_registers): Declare.
9189 (i386_bsd_nat_target): New class.
9190 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9191 (the_i386_fbsd_nat_target): New.
9192 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9193 i386_fbsd_nat_target methods.
9194 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9195 (_initialize_i386fbsd_nat): Adjust to C++ification.
9196 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9197 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9198 (_initialize_x86_bsd_nat): Adjust to C++ification.
9199 * x86-bsd-nat.h: Include "x86-nat.h".
9200 (x86bsd_target): Delete declaration.
9201 (x86bsd_nat_target): New class.
9202
9203 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9204 (the_aarch64_fbsd_nat_target): New.
9205 (aarch64_fbsd_fetch_inferior_registers)
9206 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9207 aarch64_fbsd_nat_target.
9208 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9209 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9210 (the_alpha_bsd_nat_target): New.
9211 (alphabsd_fetch_inferior_registers)
9212 (alphabsd_store_inferior_registers): Refactor as
9213 alpha_bsd_nat_target methods.
9214 (_initialize_alphabsd_nat): Refactor as methods of
9215 alpha_bsd_nat_target.
9216 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9217 (the_amd64_nbsd_nat_target): New.
9218 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9219 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9220 (the_amd64_obsd_nat_target): New.
9221 (_initialize_amd64obsd_nat): Adjust to C++ification.
9222 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9223 (the_arm_fbsd_nat_target): New.
9224 (arm_fbsd_fetch_inferior_registers)
9225 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9226 (_initialize_arm_fbsd_nat): Refactor as methods of
9227 arm_fbsd_nat_target.
9228 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9229 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9230 (the_arm_netbsd_nat_target): New.
9231 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9232 arm_netbsd_nat_target.
9233 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9234 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9235 (the_hppa_nbsd_nat_target): New.
9236 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9237 hppa_nbsd_nat_target methods.
9238 (_initialize_hppanbsd_nat): Adjust to C++ification.
9239 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9240 (the_hppa_obsd_nat_target): New.
9241 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9242 methods of hppa_obsd_nat_target.
9243 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9244 add_target.
9245 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9246 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9247 add_target.
9248 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9249 (_initialize_i386obsd_nat): Use add_target.
9250 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9251 (the_m68k_bsd_nat_target): New.
9252 (m68kbsd_fetch_inferior_registers)
9253 (m68kbsd_store_inferior_registers): Refactor as methods of
9254 m68k_bsd_nat_target.
9255 (_initialize_m68kbsd_nat): Adjust to C++ification.
9256 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9257 (the_mips_fbsd_nat_target): New.
9258 (mips_fbsd_fetch_inferior_registers)
9259 (mips_fbsd_store_inferior_registers): Refactor as methods of
9260 mips_fbsd_nat_target.
9261 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9262 add_target.
9263 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9264 (the_mips_nbsd_nat_target): New.
9265 (mipsnbsd_fetch_inferior_registers)
9266 (mipsnbsd_store_inferior_registers): Refactor as methods of
9267 mips_nbsd_nat_target.
9268 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9269 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9270 (the_mips64_obsd_nat_target): New.
9271 (mips64obsd_fetch_inferior_registers)
9272 (mips64obsd_store_inferior_registers): Refactor as methods of
9273 mips64_obsd_nat_target.
9274 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9275 add_target.
9276 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9277 nbsd_nat_target.
9278 * nbsd-nat.h: Include "inf-ptrace.h".
9279 (nbsd_nat_target): New class.
9280 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9281 (obsd_wait): Refactor as methods of obsd_nat_target.
9282 (obsd_add_target): Delete.
9283 * obsd-nat.h: Include "inf-ptrace.h".
9284 (obsd_nat_target): New class.
9285 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9286 (the_ppc_fbsd_nat_target): New.
9287 (ppcfbsd_fetch_inferior_registers)
9288 (ppcfbsd_store_inferior_registers): Refactor as methods of
9289 ppc_fbsd_nat_target.
9290 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9291 add_target.
9292 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9293 (the_ppc_nbsd_nat_target): New.
9294 (ppcnbsd_fetch_inferior_registers)
9295 (ppcnbsd_store_inferior_registers): Refactor as methods of
9296 ppc_nbsd_nat_target.
9297 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9298 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9299 (the_ppc_obsd_nat_target): New.
9300 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9301 methods of ppc_obsd_nat_target.
9302 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9303 add_target.
9304 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9305 (the_sh_nbsd_nat_target): New.
9306 (shnbsd_fetch_inferior_registers)
9307 (shnbsd_store_inferior_registers): Refactor as methods of
9308 sh_nbsd_nat_target.
9309 (_initialize_shnbsd_nat): Adjust to C++ification.
9310 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9311 (inf_ptrace_xfer_partial): Delete.
9312 (sparc_xfer_partial, sparc_target): Delete.
9313 * sparc-nat.h (sparc_fetch_inferior_registers)
9314 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9315 (sparc_target): Delete function declaration.
9316 (sparc_target): New template class.
9317 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9318 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9319 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9320 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9321 add_target.
9322 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9323 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9324 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9325 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9326 add_target.
9327 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9328 (the_vax_bsd_nat_target): New.
9329 (vaxbsd_fetch_inferior_registers)
9330 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9331 methods.
9332 (_initialize_vaxbsd_nat): Adjust to C++ification.
9333
9334 * bsd-kvm.c (bsd_kvm_target): New class.
9335 (bsd_kvm_ops): Now a bsd_kvm_target.
9336 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9337 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9338 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9339 bsd_kvm_target.
9340 (bsd_kvm_return_one): Delete.
9341 (bsd_kvm_add_target): Adjust to C++ification.
9342
9343 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9344 (nto_procfs_target_procfs): New classes.
9345 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9346 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9347 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9348 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9349 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9350 (procfs_remove_hw_breakpoint, procfs_resume)
9351 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9352 (procfs_kill_inferior, procfs_store_registers)
9353 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9354 as methods of nto_procfs_target.
9355 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9356 (nto_native_ops): Delete.
9357 (procfs_open, procfs_native_open): Delete.
9358 (nto_native_ops): Now an nto_procfs_target_native.
9359 (init_procfs_targets): Adjust to C++ification.
9360 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9361 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9362 Refactor as methods of nto_procfs_target.
9363
9364 * go32-nat.c (go32_nat_target): New class.
9365 (the_go32_nat_target): New.
9366 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9367 (go32_store_registers, go32_xfer_partial, go32_files_info)
9368 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9369 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9370 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9371 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9372 (go32_target): Delete.
9373 (_initialize_go32_nat): Adjust to C++ification.
9374
9375 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9376 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9377 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9378 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9379 gnu_nat_target.
9380 (gnu_target): Delete.
9381 * gnu-nat.h (gnu_target): Delete.
9382 (gnu_nat_target): New class.
9383 * i386-gnu-nat.c (gnu_base_target): New.
9384 (i386_gnu_nat_target): New class.
9385 (the_i386_gnu_nat_target): New.
9386 (_initialize_i386gnu_nat): Adjust to C++ification.
9387
9388 2018-05-02 Pedro Alves <palves@redhat.com>
9389
9390 * bfd-target.c (target_bfd_xclose): Rename to ...
9391 (target_bfd_close): ... this.
9392 (target_bfd_reopen): Adjust.
9393 * target.c (target_close): Remove references to to_xclose.
9394 * target.h (target_ops::to_xclose): Delete.
9395 (target_ops::to_close): Update comments.
9396
9397 2018-05-02 Pedro Alves <palves@redhat.com>
9398
9399 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9400 "linux-nat.h".
9401 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9402 * inf-ptrace.c (inf_ptrace_register_u_offset)
9403 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9404 (inf_ptrace_store_register, inf_ptrace_store_registers)
9405 (inf_ptrace_trad_target): Move to ...
9406 * linux-nat-trad.c: ... this new file.
9407 * linux-nat-trad.h: New file.
9408 * linux-nat.c (linux_target_install_ops): Make extern.
9409 (linux_trad_target): Delete.
9410 * linux-nat.h (linux_trad_target): Delete declaration.
9411 (linux_target_install_ops): Declare.
9412 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9413 "linux-nat.h".
9414
9415 2018-05-02 Pedro Alves <palves@redhat.com>
9416
9417 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9418 procfs_target/add_target here.
9419 * procfs.c (procfs_target): Make static.
9420 (_initialize_procfs): Call add_target here.
9421 * procfs.h (struct target_ops): Remove forward declaration.
9422 (procfs_target): Remove declaration.
9423 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9424
9425 2018-05-02 Pedro Alves <palves@redhat.com>
9426
9427 * procfs.c (procfs_stopped_by_watchpoint)
9428 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9429 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9430 Forward declare.
9431 (procfs_use_watchpoints): Delete, move contents...
9432 (procfs_target): ... here.
9433 * procfs.h (procfs_use_watchpoints): Delete declaration.
9434 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9435 procfs_use_watchpoints.
9436 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9437 procfs_use_watchpoints.
9438
9439 2018-05-02 Tom Tromey <tom@tromey.com>
9440
9441 PR python/20084:
9442 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9443 and var_zuinteger_unlimited.
9444 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9445 and PARAM_ZUINTEGER_UNLIMITED.
9446 (set_parameter_value): Handle var_zuinteger and
9447 var_zuinteger_unlimited.
9448 (add_setshow_generic): Likewise.
9449 (parmpy_init): Likewise.
9450
9451 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9452
9453 PR rust/23124
9454 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9455 pointer is not null before dereferencing it.
9456
9457 2018-04-30 Tom Tromey <tom@tromey.com>
9458
9459 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9460 is_mi_like_p.
9461
9462 2018-04-30 Tom Tromey <tom@tromey.com>
9463
9464 * breakpoint.c (mention): Remove use of is_mi_like_p.
9465 (print_mention_ranged_breakpoint): Likewise.
9466 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9467 of is_mi_like_p.
9468
9469 2018-04-30 Tom Tromey <tom@tromey.com>
9470
9471 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9472
9473 2018-04-30 Tom Tromey <tom@tromey.com>
9474
9475 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9476 (info_spu_event_command): Remove some uses of is_mi_like_p.
9477
9478 2018-04-30 Tom Tromey <tom@tromey.com>
9479
9480 * python/py-framefilter.c (py_print_single_arg)
9481 (enumerate_locals, py_print_args, py_print_frame): Remove some
9482 uses of is_mi_like_p.
9483
9484 2018-04-30 Tom Tromey <tom@tromey.com>
9485
9486 * ui-out.c: Update.
9487 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9488 * ui-out.h (ui_out::is_mi_like_p): Now const.
9489 (ui_out::do_is_mi_like_p): Now const.
9490 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9491
9492 2018-04-30 Tom Tromey <tom@tromey.com>
9493
9494 * varobj.c (varobj_set_visualizer): Use new_reference.
9495 * python/python.c (gdbpy_decode_line): Use new_reference.
9496 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9497 new_reference.
9498
9499 2018-04-30 Tom Tromey <tom@tromey.com>
9500
9501 * varobj.c (install_new_value): Use new_reference.
9502 * value.h (value_incref): Return void. Swap intro comment with
9503 value_decref.
9504 * value.c (set_value_parent): Use new_reference.
9505 (value_incref): Return void. Update intro comment.
9506 (release_value): Use new_reference.
9507 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9508
9509 2018-04-30 Tom Tromey <tom@tromey.com>
9510
9511 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9512 * gdb_bfd.h (new_bfd_ref): Remove.
9513 (gdb_bfd_open): Update comment.
9514 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9515 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9516 (gdb_bfd_fdopenr): Use new_reference.
9517 * exec.c (exec_file_attach): Use new_reference.
9518
9519 2018-04-30 Tom Tromey <tom@tromey.com>
9520
9521 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9522 method.
9523
9524 2018-04-30 Tom Tromey <tom@tromey.com>
9525
9526 * jit.c (jit_read_code_entry): Use type_align.
9527 * i386-tdep.c (i386_gdbarch_init): Don't call
9528 set_gdbarch_long_long_align_bit.
9529 * gdbarch.sh: Remove long_long_align_bit.
9530 * gdbarch.c, gdbarch.h: Rebuild.
9531 * arc-tdep.c (arc_type_align): New function.
9532 (arc_gdbarch_init): Use arc_type_align. Don't call
9533 set_gdbarch_long_long_align_bit.
9534
9535 2018-04-30 Tom Tromey <tom@tromey.com>
9536
9537 * rust-lang.c (rust_type_alignment): Remove.
9538 (rust_composite_type): Use type_align.
9539
9540 2018-04-30 Tom Tromey <tom@tromey.com>
9541
9542 * NEWS: Mention Type.align.
9543 * python/py-type.c (typy_get_alignof): New function.
9544 (type_object_getset): Add "alignof".
9545
9546 2018-04-30 Tom Tromey <tom@tromey.com>
9547
9548 PR exp/17095:
9549 * NEWS: Update.
9550 * std-operator.def (UNOP_ALIGNOF): New operator.
9551 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9552 New.
9553 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9554 * c-lang.c (c_op_print_tab): Add alignof.
9555 * c-exp.y (ALIGNOF): New token.
9556 (exp): Add "ALIGNOF" production.
9557 (ident_tokens): Add _Alignof and alignof.
9558
9559 2018-04-30 Tom Tromey <tom@tromey.com>
9560
9561 * i386-tdep.c (i386_type_align): New function.
9562 (i386_gdbarch_init): Update.
9563 * gdbarch.sh (type_align): New method.
9564 * gdbarch.c, gdbarch.h: Rebuild.
9565 * arch-utils.h (default_type_align): Declare.
9566 * arch-utils.c (default_type_align): New function.
9567 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9568 (struct type) <align_log2>: New field.
9569 <instance_flags>: Now a bitfield.
9570 (TYPE_RAW_ALIGN): New macro.
9571 (type_align, type_raw_align, set_type_align): Declare.
9572 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9573 functions.
9574 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9575 (get_alignment, maybe_set_alignment): New functions.
9576 (read_structure_type, read_enumeration_type, read_array_type)
9577 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9578 (read_subrange_type, read_base_type): Set type alignment.
9579
9580 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9581
9582 * dwarf2read.c (read_index_from_section): Use bool.
9583
9584 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9585
9586 PR gdb/22950
9587 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9588 with #ifdef.
9589
9590 2018-04-29 John Reiser <jreiser@BitWagon.com>
9591
9592 PR build/22873
9593 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9594 last step, and do it atomically.
9595
9596 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9597
9598 * compile/compile-c-types.c (convert_int, convert_float):
9599 Update for C FE v1.
9600
9601 2018-04-27 Tom Tromey <tom@tromey.com>
9602
9603 PR rust/22545:
9604 * rust-lang.c (rust_inclusive_range_type_p): New function.
9605 (rust_range): Handle inclusive ranges.
9606 (rust_compute_range): Likewise.
9607 * rust-exp.y (struct rust_op) <inclusive>: New field.
9608 (DOTDOTEQ): New constant.
9609 (range_expr): Add "..=" productions.
9610 (operator_tokens): Add "..=" token.
9611 (ast_range): Add "inclusive" parameter.
9612 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9613 ranges.
9614 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9615 bounds values.
9616 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9617 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9618 Update comments.
9619 * expprint.c (print_subexp_standard): Handle new bounds values.
9620 (dump_subexp_body_standard): Likewise.
9621
9622 2018-04-27 Tom Tromey <tom@tromey.com>
9623
9624 * configure: Rebuild.
9625 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9626 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9627 "OVERRIDE".
9628 (class symbol_needs_eval_context): Likewise.
9629 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9630 (mock_mapped_index::symbol_name_at): Use "override". Remove
9631 "virtual".
9632 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9633 "override".
9634 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9635 * aarch64-tdep.c (instruction_reader::read): Use "override".
9636 (instruction_reader_test::read): Likewise.
9637 * arm-tdep.c (instruction_reader::read): Use "override".
9638 (instruction_reader_thumb::read): Likewise.
9639
9640 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9641
9642 PR remote/9665
9643 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9644 instead of remote_send.
9645 (remote_send): Remove.
9646
9647 2018-04-26 Pedro Alves <palves@redhat.com>
9648
9649 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9650 find_function_start_sal instead of find_pc_line.
9651
9652 2018-04-26 Pedro Alves <palves@redhat.com>
9653
9654 * breakpoint.c (set_breakpoint_location_function): Handle
9655 mst_data_gnu_ifunc.
9656 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9657 * elfread.c (elf_symtab_read): Give data symbols with
9658 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9659 (elf_rel_plt_read): Update comment.
9660 * linespec.c (convert_linespec_to_sals): Handle
9661 mst_data_gnu_ifunc.
9662 (minsym_found): Handle mst_data_gnu_ifunc.
9663 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9664 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9665 * parse.c (find_minsym_type_and_address): Handle
9666 mst_data_gnu_ifunc.
9667 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9668 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9669 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9670 comment.
9671 <mst_data_gnu_ifunc>: New enumerator.
9672
9673 2018-04-26 Pedro Alves <palves@redhat.com>
9674
9675 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9676 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9677 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9678 Handle it.
9679 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9680 (lookup_minimal_symbol_by_pc): Adjust.
9681 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9682 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9683 * minsyms.h (lookup_msym_prefer): New enum.
9684 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9685 parameter by a lookup_msym_prefer parameter.
9686
9687 2018-04-26 Pedro Alves <palves@redhat.com>
9688
9689 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9690 ends in "@plt" instead of looking at the symbol's section.
9691
9692 2018-04-26 Pedro Alves <palves@redhat.com>
9693
9694 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9695 all references.
9696 (find_pc_partial_function_gnu_ifunc): Rename to ...
9697 (find_pc_partial_function): ... this, and remove references to
9698 'is_gnu_ifunc_p'.
9699 (find_pc_partial_function): Delete old implementation.
9700 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9701
9702 2018-04-26 Pedro Alves <palves@redhat.com>
9703
9704 * linespec.c (struct bound_minimal_symbol_search_key): New.
9705 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9706 skip first line if we found a GNU ifunc minimal symbol by name.
9707 (compare_msymbols): Change parameters to work with a destructured
9708 lhs minsym.
9709 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9710 functions.
9711
9712 2018-04-26 Pedro Alves <palves@redhat.com>
9713
9714 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9715 ifunc targets here. Instead, if we have an ifunc minsym, use its
9716 address/name.
9717 (add_location_to_breakpoint): Store the minsym and the objfile in
9718 the breakpoint location.
9719 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9720 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9721 Record the minsym in the sal.
9722 * symtab.h (symtab_and_line) <msymbol>: New field.
9723
9724 2018-04-26 Pedro Alves <palves@redhat.com>
9725
9726 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9727 unless we actually resolved the ifunc.
9728
9729 2018-04-26 Pedro Alves <palves@redhat.com>
9730
9731 * c-exp.y (variable production): Prefer ifunc minsyms over
9732 regular function symbols.
9733 * symtab.c (find_gnu_ifunc): New function.
9734 * minsyms.h (lookup_msym_prefer): New enum.
9735 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9736 parameter by a lookup_msym_prefer parameter.
9737 * symtab.h (find_gnu_ifunc): New declaration.
9738
9739 2018-04-26 Pedro Alves <palves@redhat.com>
9740
9741 * blockframe.c (find_gnu_ifunc_target_type): New function.
9742 (find_function_type): New.
9743 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9744 return a value with a memory address.
9745 (eval_call): For calls to GNU ifunc functions, try to find the
9746 type of the target function from the type that the resolver
9747 returns.
9748 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9749 symbols.
9750 * infcall.c (find_function_return_type): Delete.
9751 (find_function_addr): Add 'function_type' parameter. For calls to
9752 GNU ifunc functions, try to find the type of the target function
9753 from the type that the resolver returns, and return it via
9754 FUNCTION_TYPE.
9755 (call_function_by_hand_dummy): Adjust to use the function type
9756 returned by find_function_addr.
9757 (find_function_addr): Add 'function_type' parameter and move
9758 description here.
9759 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9760 declarations.
9761
9762 2018-04-26 Pedro Alves <palves@redhat.com>
9763
9764 * c-exp.y (variable production): Skip finding an alias for ifunc
9765 symbols.
9766
9767 2018-04-26 Pedro Alves <palves@redhat.com>
9768
9769 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9770
9771 2018-04-25 Pedro Alves <palves@redhat.com>
9772
9773 * infcmd.c (kill_command): Print the pid as string, not the whole
9774 thread's ptid. Add comment. s/has been killed/killed/ in output
9775 message.
9776 * remote.c (remote_detach_1): Print the pid as string, not the
9777 whole thread's ptid.
9778
9779 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9780 Sergio Durigan Junior <sergiodj@redhat.com>
9781 Pedro Alves <palves@redhat.com>
9782
9783 * infcmd.c (kill_command): Print message when inferior has
9784 been killed.
9785 * inferior.c (print_inferior_events): Remove 'static'. Set as
9786 '1'.
9787 (add_inferior): Improve message printed when
9788 'print_inferior_events' is on.
9789 (exit_inferior): Remove message printed when
9790 'print_inferior_events' is on.
9791 (detach_inferior): Improve message printed when
9792 'print_inferior_events' is on.
9793 (initialize_inferiors): Use 'add_inferior_silent' to set
9794 'current_inferior_'.
9795 * inferior.h (print_inferior_events): Declare here as
9796 'extern'.
9797 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9798 '[Detaching...]' messages when 'print_inferior_events' is on.
9799 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9800 as prefix/suffix for messages. Remove periods. Fix erroneous
9801 'Detaching after fork from child...', replace it by '... from
9802 parent...'.
9803 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9804 prefix/suffix when printing 'Detaching...' messages. Print
9805 them when 'print_inferior_events' is on.
9806 * remote.c (remote_detach_1): Print message when detaching
9807 from inferior and '!is_fork_parent'.
9808
9809 2018-04-24 Tom Tromey <tom@tromey.com>
9810
9811 * cli-out.h: Reindent.
9812
9813 2018-04-24 Tom Tromey <tom@tromey.com>
9814
9815 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9816 (cli_ui_out::do_field_string): Use fputs_filtered.
9817 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9818
9819 2018-04-23 Tom Tromey <tom@tromey.com>
9820
9821 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9822 gdb::unique_xmalloc_ptr.
9823
9824 2018-04-23 Tom Tromey <tom@tromey.com>
9825
9826 * configure: Rebuild.
9827
9828 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
9829
9830 PR gdb/23095
9831 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9832 prepare_for_testing. Set normal_bp to r_debug_state if target
9833 is bsd.
9834
9835 2018-04-21 Pedro Alves <palves@redhat.com>
9836 Rajendra SY <rajendra.sy@gmail.com>
9837
9838 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9839 * remote.c (extended_remote_attach): In all-stop mode, mark the
9840 thread as executing.
9841
9842 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9843
9844 * thread.c (thread_apply_all_command): Fix comment.
9845 (thread_command): Fix comment.
9846
9847 2018-04-10 Alan Hayward <alan.hayward@arm.com>
9848
9849 * common/tdesc.h (tdesc_create_feature): Remove xml filename
9850 parameter.
9851 * features/aarch64-core.c (create_feature_aarch64_core):
9852 Regenerate.
9853 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9854 Likewise.
9855 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9856 Likewise.
9857 * features/i386/32bit-avx512.c
9858 (create_feature_i386_32bit_avx512): Likewise.
9859 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9860 Likewise.
9861 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9862 Likewise.
9863 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9864 Likewise.
9865 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9866 Likewise.
9867 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9868 Likewise.
9869 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9870 Likewise.
9871 * features/i386/64bit-avx512.c
9872 (create_feature_i386_64bit_avx512): Likewise.
9873 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9874 Likewise.
9875 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9876 Likewise.
9877 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9878 Likewise.
9879 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9880 Likewise.
9881 * features/i386/64bit-segments.c
9882 (create_feature_i386_64bit_segments): Likewise.
9883 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9884 Likewise.
9885 * features/i386/x32-core.c
9886 (create_feature_i386_x32_core): Likewise.
9887 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9888 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9889 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9890 * target-descriptions.c: In generated code, don't pass xml
9891 filename.
9892
9893 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9894
9895 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9896 (print_xml_feature::visit_post): Likewise.
9897 (print_xml_feature::visit): Likewise.
9898 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9899 (print_xml_feature): Add new class.
9900 * regformats/regdat.sh: Null xmltarget on feature targets.
9901 * target-descriptions.c (struct target_desc): Add xmltarget.
9902 (maintenance_check_tdesc_xml_convert): Add unittest function.
9903 (tdesc_get_features_xml): Add function to get xml.
9904 (maintenance_check_xml_descriptions): Test xml generation.
9905 * xml-tdesc.c (string_read_description_xml): Add function.
9906 * xml-tdesc.h (string_read_description_xml): Add declaration.
9907
9908 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9909
9910 * features/Makefile: Add feature marker to targets with new style
9911 target descriptions.
9912 * regformats/aarch64.dat: Regenerate.
9913 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9914 * regformats/i386/amd64-avx-linux.dat: Likewise.
9915 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9916 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9917 * regformats/i386/amd64-linux.dat: Likewise.
9918 * regformats/i386/amd64-mpx-linux.dat: Likewise.
9919 * regformats/i386/amd64.dat: Likewise.
9920 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9921 * regformats/i386/i386-avx-linux.dat: Likewise.
9922 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9923 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9924 * regformats/i386/i386-linux.dat: Likewise.
9925 * regformats/i386/i386-mmx-linux.dat: Likewise.
9926 * regformats/i386/i386-mpx-linux.dat: Likewise.
9927 * regformats/i386/i386.dat: Likewise.
9928 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9929 * regformats/i386/x32-avx-linux.dat: Likewise.
9930 * regformats/i386/x32-linux.dat: Likewise.
9931 * regformats/tic6x-c62x-linux.dat: Likewise.
9932 * regformats/tic6x-c64x-linux.dat: Likewise.
9933 * regformats/tic6x-c64xp-linux.dat: Likewise.
9934 * regformats/regdat.sh: Parse feature marker.
9935
9936 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9937
9938 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9939 (tdesc_osabi_name): Likewise.
9940 * target-descriptions.c (tdesc_architecture_name): Add new
9941 function.
9942 (tdesc_osabi_name): Likewise.
9943
9944 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9945
9946 * common/tdesc.c (tdesc_predefined_type): Move to here.
9947 (tdesc_named_type): Likewise.
9948 (tdesc_create_vector): Likewise.
9949 (tdesc_create_struct): Likewise.
9950 (tdesc_set_struct_size): Likewise.
9951 (tdesc_create_union): Likewise.
9952 (tdesc_create_flags): Likewise.
9953 (tdesc_create_enum): Likewise.
9954 (tdesc_add_field): Likewise.
9955 (tdesc_add_typed_bitfield): Likewise.
9956 (tdesc_add_bitfield): Likewise.
9957 (tdesc_add_flag): Likewise.
9958 (tdesc_add_enum_value): Likewise.
9959 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9960 (struct tdesc_type_vector): Likewise.
9961 (struct tdesc_type_field): Likewise.
9962 (struct tdesc_type_with_fields): Likewise.
9963 (tdesc_create_enum): Add declaration.
9964 (tdesc_add_typed_bitfield): Likewise.
9965 (tdesc_add_enum_value): Likewise.
9966 * target-descriptions.c (tdesc_type_field): Move from here.
9967 (tdesc_type_builtin): Likewise.
9968 (tdesc_type_vector): Likewise.
9969 (tdesc_type_with_fields): Likewise.
9970 (tdesc_predefined_types): Likewise.
9971 (tdesc_named_type): Likewise.
9972 (tdesc_create_vector): Likewise.
9973 (tdesc_create_struct): Likewise.
9974 (tdesc_set_struct_size): Likewise.
9975 (tdesc_create_union): Likewise.
9976 (tdesc_create_flags): Likewise.
9977 (tdesc_create_enum): Likewise.
9978 (tdesc_add_field): Likewise.
9979 (tdesc_add_typed_bitfield): Likewise.
9980 (tdesc_add_bitfield): Likewise.
9981 (tdesc_add_flag): Likewise.
9982 (tdesc_add_enum_value): Likewise.
9983 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9984 (tdesc_add_typed_bitfield): Likewise.
9985 (tdesc_add_enum_value): Likewise.
9986
9987 2018-04-18 Alan Hayward <alan.hayward@arm.com>
9988
9989 * common/tdesc.c (tdesc_feature::accept): Move to here.
9990 (tdesc_feature::operator==): Likewise.
9991 (tdesc_create_reg): Likewise.
9992 * common/tdesc.h (tdesc_type_kind): Likewise.
9993 (struct tdesc_type): Likewise.
9994 (struct tdesc_feature): Likewise.
9995 * regformats/regdat.sh: Create a feature.
9996 * target-descriptions.c (tdesc_type_kind): Move from here.
9997 (tdesc_type): Likewise.
9998 (tdesc_type_up): Likewise.
9999 (tdesc_feature): Likewise.
10000 (tdesc_create_reg): Likewise.
10001
10002 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10003
10004 * Makefile.in: Add arch/tdesc.c
10005 * common/tdesc.c: New file.
10006 * common/tdesc.h (tdesc_element_visitor): Move to here.
10007 (tdesc_element): Likewise.
10008 (tdesc_reg): Likewise.
10009 (tdesc_reg_up): Likewise.
10010 * regformats/regdef.h (reg): Add offset to constructors.
10011 * target-descriptions.c (tdesc_element_visitor): Move from here.
10012 (tdesc_element): Likewise.
10013 (tdesc_reg): Likewise.
10014 (tdesc_reg_up): Likewise.
10015
10016 2018-04-17 Tom Tromey <tom@tromey.com>
10017
10018 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10019 discriminant field.
10020
10021 2018-04-17 Tom Tromey <tom@tromey.com>
10022
10023 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10024
10025 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10026
10027 * symtab.c (print_symbol_info): Skip printing filename and line
10028 number when `last' is NULL.
10029 (symtab_symbol_info): Use empty string instead of NULL for first
10030 invocation of print_symbol_info.
10031 (rbreak_command): Pass NULL to `last' parameter of
10032 print_symbol_info.
10033
10034 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10035
10036 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10037 instead of nullptr.
10038
10039 2018-04-16 Pedro Alves <palves@redhat.com>
10040
10041 * MAINTAINERS (sh): Remove.
10042 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10043 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10044 (ALLDEPFILES): Remove sh64-tdep.c.
10045 * NEWS: Mentions that support for SH-5/SH64 is removed.
10046 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10047 (sh*-*-openbsd*): Ditto.
10048 (sh64-*-elf*): Remove.
10049 (sh*): Remove.
10050 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10051 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10052 * sh-tdep.c: No longer include "sh64-tdep.h".
10053 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10054 * sh64-tdep.c, sh64-tdep.h: Remove files.
10055
10056 2018-04-16 Pedro Alves <palves@redhat.com>
10057
10058 * MAINTAINERS: Remove m88k.
10059 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10060 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10061 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10062 * NEWS: Mention that support for m88k was removed.
10063 * configure.host (m88*-*-*): Remove support.
10064 * configure.nat (m88k-*-*): Remove support.
10065 * configure.tgt (m88*-*-openbsd*): Remove.
10066 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10067
10068 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10069
10070 * configure.tgt (x86_tobjs): New variable.
10071 (amd64_tobjs, i386_tobjs): Use it.
10072
10073 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10074
10075 * symtab.c (print_symbol_info): Precede the symbol definition by
10076 the line number when available.
10077 * NEWS: Advertise this enhancement.
10078
10079 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10080
10081 * NEWS (New options): announce set/show record btrace cpu.
10082 * btrace.c: Include record-btrace.h.
10083 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10084 the vendor is unknown.
10085 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10086 Maybe overwrite the btrace configuration's cpu.
10087 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10088 (btrace_fetch): Add cpu parameter. Update callers.
10089 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10090 Maybe overwrite the btrace configuration's cpu. Skip enabling
10091 errata workarounds if the vendor is unknown.
10092 * python/py-record-btrace.c: Include record-btrace.h.
10093 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10094 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10095 * record-btrace.c (record_btrace_cpu_state_kind): New.
10096 (record_btrace_cpu): New.
10097 (set_record_btrace_cpu_cmdlist): New.
10098 (record_btrace_get_cpu): New.
10099 (require_btrace_thread, record_btrace_info)
10100 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10101 (cmd_set_record_btrace_cpu_none): New.
10102 (cmd_set_record_btrace_cpu_auto): New.
10103 (cmd_set_record_btrace_cpu): New.
10104 (cmd_show_record_btrace_cpu): New.
10105 (_initialize_record_btrace): Initialize set/show record btrace cpu
10106 commands.
10107 * record-btrace.h (record_btrace_get_cpu): New.
10108
10109 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10110
10111 * record.c (set_record_command): Fix typo in message.
10112
10113 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10114
10115 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10116
10117 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10118
10119 * infrun.c (process_event_stop_test): Call
10120 gdbarch_in_indirect_branch_thunk.
10121 * gdbarch.sh (in_indirect_branch_thunk): New.
10122 * gdbarch.c: Regenerated.
10123 * gdbarch.h: Regenerated.
10124 * x86-tdep.h: New.
10125 * x86-tdep.c: New.
10126 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10127 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10128 (ALLDEPFILES): Add x86-tdep.c.
10129 * arch-utils.h (default_in_indirect_branch_thunk): New.
10130 * arch-utils.c (default_in_indirect_branch_thunk): New.
10131 * i386-tdep: Include x86-tdep.h.
10132 (i386_in_indirect_branch_thunk): New.
10133 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10134 function.
10135 * amd64-tdep: Include x86-tdep.h.
10136 (amd64_in_indirect_branch_thunk): New.
10137 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10138
10139 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10140
10141 PR gdb/23053
10142 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10143 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10144 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10145 regression.
10146
10147 2018-04-12 Tom Tromey <tom@tromey.com>
10148
10149 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10150 (rust_evaluate_subexp): Likewise.
10151
10152 2018-04-12 Pedro Alves <palves@redhat.com>
10153
10154 * procfs.c (procfs_detach): Make forward declaration's prototype
10155 match definition's protototype.
10156 (proc_get_LDT_entry): Remove stale do_cleanups call.
10157
10158 2018-04-12 Pedro Alves <palves@redhat.com>
10159
10160 * target.h (target_ops::to_has_exited): Delete.
10161 (target_has_exited): Delete.
10162 * target-delegates.c: Regenerate.
10163
10164 2018-04-11 Pedro Alves <palves@redhat.com>
10165
10166 * target.c (fileio_fh_t::t): Add comment.
10167 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10168 (target_fileio_close): Handle a NULL target.
10169 (invalidate_fileio_fh): New.
10170 (target_close): Call it.
10171 * remote.c (remote_hostio_send_command): No longer check whether
10172 remote_desc is open.
10173
10174 2018-04-11 Pedro Alves <palves@redhat.com>
10175
10176 * target.c (fileio_fh_t): Make it a named struct instead of a
10177 typedef.
10178 (fileio_fh_t::is_closed): New method.
10179 (DEF_VEC_O (fileio_fh_t)): Remove.
10180 (fileio_fhandles): Now a std::vector.
10181 (is_closed_fileio_fh): Delete.
10182 (acquire_fileio_fd): Adjust. Rename parameters.
10183 (release_fileio_fd): Adjust.
10184 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10185 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10186 (target_fileio_close): Adjust.
10187
10188 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10189
10190 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10191 index.
10192
10193 2018-04-10 Pedro Alves <palves@redhat.com>
10194
10195 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10196 (scoped_finish_thread_state): New class.
10197 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10198 cleanup.
10199 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10200 (fetch_inferior_event, normal_stop): Likewise.
10201 * thread.c (finish_thread_state_cleanup): Delete.
10202
10203 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10204 Pedro Alves <palves@redhat.com>
10205
10206 * value.c: Include "selftest.h" and "common/array-view.h".
10207 (struct range) <operator ==>: New.
10208 (test_ranges_contain): New.
10209 (check_ranges_vector): New.
10210 (test_insert_into_bit_range_vector): New.
10211 (_initialize_values): Register selftests.
10212 * common/array-view.h (operator==, operator!=): New.
10213
10214 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10215
10216 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10217 an iterator.
10218 * inline-frame.c: Include <algorithm>.
10219 (struct inline_state): Add constructor.
10220 (inline_state_s): Remove.
10221 (DEF_VEC_O(inline_state_s)): Remove.
10222 (inline_states): Change type to std::vector.
10223 (find_inline_frame_state): Adjust to std::vector.
10224 (allocate_inline_frame_state): Remove.
10225 (clear_inline_frame_state): Adjust to std::vector.
10226 (skip_inline_frames): Adjust to std::vector.
10227
10228 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10229
10230 * tracepoint.h (struct trace_state_variable): Add constructor.
10231 <name>: Change type to std::string.
10232 * tracepoint.c (tsv_s): Remove.
10233 (DEF_VEC_O(tsv_s)): Remove.
10234 (tvariables): Change to std::vector.
10235 (create_trace_state_variable): Adjust to std::vector.
10236 (find_trace_state_variable): Likewise.
10237 (find_trace_state_variable_by_number): Likewise.
10238 (delete_trace_state_variable): Likewise.
10239 (trace_variable_command): Adjust to std::string.
10240 (delete_trace_variable_command): Likewise.
10241 (tvariables_info_1): Adjust to std::vector.
10242 (save_trace_state_variables): Likewise.
10243 (start_tracing): Likewise.
10244 (merge_uploaded_trace_state_variables): Adjust to std::vector
10245 and std::string.
10246 * target.h (struct target_ops)
10247 <to_download_trace_state_variable>: Pass reference to
10248 trace_state_variable.
10249 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10250 * target-delegates.c: Re-generate.
10251 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10252 (mi_tsv_deleted): Likewise.
10253 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10254 * remote.c (remote_download_trace_state_variable): Change
10255 pointer to reference and adjust.
10256 * make-target-delegates (parse_argtypes): Handle references.
10257 (write_function_header): Likewise.
10258 (munge_type): Likewise.
10259
10260 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10261
10262 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10263 string_view-selftests.c.
10264 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10265 testsuite.
10266 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10267 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10268 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10269 * unittests/basic_string_view/element_access/char/1.cc:
10270 Likewise.
10271 * unittests/basic_string_view/element_access/char/empty.cc:
10272 Likewise.
10273 * unittests/basic_string_view/element_access/char/front_back.cc:
10274 Likewise.
10275 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10276 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10277 Likewise.
10278 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10279 Likewise.
10280 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10281 Likewise.
10282 * unittests/basic_string_view/operations/compare/char/1.cc:
10283 Likewise.
10284 * unittests/basic_string_view/operations/compare/char/13650.cc:
10285 Likewise.
10286 * unittests/basic_string_view/operations/copy/char/1.cc:
10287 Likewise.
10288 * unittests/basic_string_view/operations/data/char/1.cc:
10289 Likewise.
10290 * unittests/basic_string_view/operations/find/char/1.cc:
10291 Likewise.
10292 * unittests/basic_string_view/operations/find/char/2.cc:
10293 Likewise.
10294 * unittests/basic_string_view/operations/find/char/3.cc:
10295 Likewise.
10296 * unittests/basic_string_view/operations/find/char/4.cc:
10297 Likewise.
10298 * unittests/basic_string_view/operations/rfind/char/1.cc:
10299 Likewise.
10300 * unittests/basic_string_view/operations/rfind/char/2.cc:
10301 Likewise.
10302 * unittests/basic_string_view/operations/rfind/char/3.cc:
10303 Likewise.
10304 * unittests/basic_string_view/operations/substr/char/1.cc:
10305 Likewise.
10306 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10307 * unittests/string_view-selftests.c: New file.
10308
10309 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10310
10311 * unittests/basic_string_view/capacity/1.cc: New file.
10312 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10313 * unittests/basic_string_view/cons/char/1.cc: New file.
10314 * unittests/basic_string_view/cons/char/2.cc: New file.
10315 * unittests/basic_string_view/cons/char/3.cc: New file.
10316 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10317 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10318 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10319 * unittests/basic_string_view/element_access/char/1.cc: New file.
10320 * unittests/basic_string_view/element_access/char/2.cc: New file.
10321 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10322 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10323 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10324 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10325 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10326 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10327 * unittests/basic_string_view/include.cc: New file.
10328 * unittests/basic_string_view/inserters/char/1.cc: New file.
10329 * unittests/basic_string_view/inserters/char/2.cc: New file.
10330 * unittests/basic_string_view/inserters/char/3.cc: New file.
10331 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10332 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10333 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10334 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10335 * unittests/basic_string_view/literals/types.cc: New file.
10336 * unittests/basic_string_view/literals/values.cc: New file.
10337 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10338 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10339 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10340 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10341 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10342 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10343 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10344 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10345 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10346 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10347 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10348 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10349 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10350 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10351 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10352 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10353 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10354 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10355 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10356 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10357 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10358 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10359 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10360 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10361 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10362 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10363 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10364 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10365 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10366 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10367 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10368 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10369 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10370 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10371 * unittests/basic_string_view/operators/char/2.cc: New file.
10372 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10373 * unittests/basic_string_view/range_access/char/1.cc: New file.
10374 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10375 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10376 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10377 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10378 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10379 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10380 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10381 * unittests/basic_string_view/typedefs.cc: New file.
10382 * unittests/basic_string_view/types/1.cc: New file.
10383
10384 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10385
10386 * common/gdb_string_view.h: Remove libstdc++ implementation
10387 details, adjust to gdb reality.
10388 * common/gdb_string_view.tcc: Likewise.
10389 * cli/cli-script.c (struct string_view): Remove.
10390 (user_args) <m_args>: Change element type to gdb::string_view.
10391 (user_args::insert_args): Adjust.
10392
10393 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10394
10395 * common/gdb_string_view.h: New file.
10396 * common/gdb_string_view.tcc: New file.
10397
10398 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10399
10400 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10401 * configure: Re-generate.
10402
10403 2018-04-09 Pedro Alves <palves@redhat.com>
10404
10405 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10406 (set_target_gdbarch): Call
10407 gdb::observers::architecture_changed.notify instead of
10408 observer_notify_architecture_changed.
10409
10410 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10411
10412 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10413 (do_restore_current_traceframe_cleanup): Remove.
10414 (restore_current_traceframe_cleanup_dtor): Remove.
10415 (make_cleanup_restore_current_traceframe): Remove.
10416 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10417 New.
10418 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10419 * infrun.c (fetch_inferior_event): Use
10420 scoped_restore_current_traceframe.
10421
10422 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10423
10424 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10425 Remove.
10426 <n_allocated_type_units>: Remove.
10427 <all_type_units>: Change to std::vector.
10428 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10429 to std::vector change.
10430 (dwarf2_per_objfile::get_cutu): Likewise.
10431 (dwarf2_per_objfile::get_tu): Likewise.
10432 (create_signatured_type_table_from_index): Likewise.
10433 (create_signatured_type_table_from_debug_names): Likewise.
10434 (dw2_symtab_iter_next): Likewise.
10435 (dw2_print_stats): Likewise.
10436 (dw2_expand_all_symtabs): Likewise.
10437 (dw2_expand_marked_cus): Likewise.
10438 (dw2_debug_names_iterator::next): Likewise.
10439 (dwarf2_initialize_objfile): Likewise.
10440 (add_signatured_type_cu_to_table): Likewise.
10441 (create_all_type_units): Likewise.
10442 (add_type_unit): Likewise.
10443 (struct tu_abbrev_offset): Add constructor.
10444 (build_type_psymtabs_1): Adjust to std::vector change.
10445 (print_tu_stats): Likewise.
10446 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10447 (write_debug_names): Likewise.
10448
10449 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10450
10451 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10452 Make an std::vector.
10453 <n_comp_units>: Remove.
10454 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10455 to std::vector change.
10456 (dwarf2_per_objfile::get_cutu): Likewise.
10457 (dwarf2_per_objfile::get_cu): Likewise.
10458 (create_cus_from_index): Likewise.
10459 (create_addrmap_from_index): Likewise.
10460 (create_addrmap_from_aranges): Likewise.
10461 (dwarf2_read_index): Likewise.
10462 (dw2_find_last_source_symtab): Likewise.
10463 (dw2_map_symtabs_matching_filename): Likewise.
10464 (dw2_symtab_iter_next): Likewise.
10465 (dw2_print_stats): Likewise.
10466 (dw2_expand_all_symtabs): Likewise.
10467 (dw2_expand_symtabs_with_fullname): Likewise.
10468 (dw2_expand_marked_cus): Likewise.
10469 (dw2_map_symbol_filenames): Likewise.
10470 (create_cus_from_debug_names): Likewise.
10471 (dwarf2_read_debug_names): Likewise.
10472 (dw2_debug_names_iterator::next): Likewise.
10473 (dwarf2_initialize_objfile): Likewise.
10474 (set_partial_user): Likewise.
10475 (dwarf2_build_psymtabs_hard): Likewise.
10476 (read_comp_units_from_section): Remove arguments, adjust to
10477 std::vector change.
10478 (create_all_comp_units): Adjust to std::vector and
10479 read_comp_units_from_section changes.
10480 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10481 change.
10482 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10483 (psyms_seen_size): Likewise.
10484 (write_gdbindex): Likewise.
10485 (write_debug_names): Likewise.
10486
10487 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10488
10489 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10490 with dwarf2_per_objfile.
10491 (create_cus_from_index): Likewise.
10492 (create_signatured_type_table_from_index): Likewise.
10493 (dwarf2_read_index): Likewise.
10494 (dwarf2_initialize_objfile): Likewise.
10495 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10496 per_cu rather than get_dwarf2_per_objfile.
10497
10498 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10499
10500 * dwarf2read.h (struct signatured_type): Forward declare.
10501 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10502 New methods.
10503 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10504 (dw2_get_cutu): ...this.
10505 (dwarf2_per_objfile::get_cu): Rename from...
10506 (dw2_get_cu): ...this.
10507 (dwarf2_per_objfile::get_tu): New.
10508 (create_addrmap_from_index): Adjust.
10509 (create_addrmap_from_aranges): Adjust.
10510 (dw2_find_last_source_symtab): Adjust.
10511 (dw2_map_symtabs_matching_filename): Adjust.
10512 (dw2_symtab_iter_next): Adjust.
10513 (dw2_print_stats): Adjust.
10514 (dw2_expand_all_symtabs): Adjust.
10515 (dw2_expand_symtabs_with_fullname): Adjust.
10516 (dw2_expand_marked_cus): Adjust.
10517 (dw_expand_symtabs_matching_file_matcher): Adjust.
10518 (dw2_map_symbol_filenames): Adjust.
10519 (dw2_debug_names_iterator::next): Adjust.
10520 (dwarf2_initialize_objfile): Adjust.
10521 (set_partial_user): Adjust.
10522 (dwarf2_build_psymtabs_hard): Adjust.
10523
10524 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10525
10526 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10527 Remove unused variables.
10528 (dw2_map_symtabs_matching_filename): Likewise.
10529 (dwarf2_record_block_ranges): Likewise.
10530 (dwarf2_read_addr_index): Likewise.
10531 (follow_die_offset): Likewise.
10532
10533 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10534
10535 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10536 to symbol_file_add_main.
10537
10538 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10539
10540 PR mi/22299
10541 * mi/mi-console.c (do_fputc_async_safe): New.
10542 (mi_console_file::write_async_safe): New.
10543 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10544 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10545 New.
10546 * ui-file.c (ui_file::putstrn): Adjust call to
10547 fputstrn_unfiltered.
10548 * utils.c (printchar): Replace do_fputs and do_fprintf
10549 parameters by do_fputc.
10550 (fputstr_filtered): Adjust call to printchar.
10551 (fputstr_unfiltered): Likewise.
10552 (fputstrn_filtered): Likewise.
10553 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10554 printchar.
10555 * utils.h (do_fputc_ftype): New typedef.
10556 (fputstrn_unfiltered): Add do_fputc parameter.
10557
10558 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10559
10560 * regformats/i386/i386-avx.dat: Remove.
10561
10562 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10563
10564 PR gdb/22979
10565 * amd64-tdep.c (amd64_none_init_abi): New function.
10566 (amd64_x32_none_init_abi): New function.
10567 (_initialize_amd64_tdep): Register handlers for x86-64 and
10568 x64_32 with GDB_OSABI_NONE.
10569 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10570 GDB_OSABI_NONE osabi.
10571
10572 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10573
10574 PR gdb/22980
10575 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10576 GDB_OSABI_NONE.
10577 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10578 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10579
10580 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10581
10582 * common/byte-vector.h (char_vector): New type.
10583 * target.h (target_read_alloc): Return
10584 gdb::optional<byte_vector>.
10585 (target_read_stralloc): Return gdb::optional<char_vector>.
10586 (target_get_osdata): Return gdb::optional<char_vector>.
10587 * target.c (target_read_alloc_1): Templatize. Replacement
10588 manual memory management with vector.
10589 (target_read_alloc): Change return type, adjust.
10590 (target_read_stralloc): Change return type, adjust.
10591 (target_get_osdata): Change return type, adjust.
10592 * auxv.c (struct auxv_info) <length>: Remove.
10593 <data>: Change type to gdb::optional<byte_vector>.
10594 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10595 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10596 (target_auxv_search): Adjust.
10597 (fprint_target_auxv): Adjust.
10598 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10599 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10600 (linux_make_corefile_notes): Adjust.
10601 * osdata.c (get_osdata): Adjust.
10602 * remote.c (remote_get_threads_with_qxfer): Adjust.
10603 (remote_memory_map): Adjust.
10604 (remote_traceframe_info): Adjust.
10605 (btrace_read_config): Adjust.
10606 (remote_read_btrace): Adjust.
10607 (remote_pid_to_exec_file): Adjust.
10608 * solib-aix.c (solib_aix_get_library_list): Adjust.
10609 * solib-dsbt.c (decode_loadmap): Don't free buf.
10610 (dsbt_get_initial_loadmaps): Adjust.
10611 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10612 * solib-target.c (solib_target_current_sos): Adjust.
10613 * tracepoint.c (sdata_make_value): Adjust.
10614 * xml-support.c (xinclude_start_include): Adjust.
10615 (xml_fetch_content_from_file): Adjust.
10616 * xml-support.h (xml_fetch_another): Change return type.
10617 (xml_fetch_content_from_file): Change return type.
10618 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10619 * xml-tdesc.c (file_read_description_xml): Adjust.
10620 (fetch_available_features_from_target): Change return type.
10621 (target_fetch_description_xml): Adjust.
10622 (target_read_description_xml): Adjust.
10623
10624 2018-04-06 Tom Tromey <tom@tromey.com>
10625
10626 * value.c (~value): Update.
10627 (struct value) <contents>: Now unique_xmalloc_ptr.
10628 (value_contents_bits_eq, allocate_value_contents)
10629 (value_contents_raw, value_contents_all_raw)
10630 (value_contents_for_printing, value_contents_for_printing_const)
10631 (set_value_enclosing_type): Update.
10632
10633 2018-04-06 Tom Tromey <tom@tromey.com>
10634
10635 * value.c (range_s): Remove typedef, VEC.
10636 (struct range): Add operator<.
10637 (range_lessthan): Remove.
10638 (ranges_contain): Change type.
10639 (~value): Update.
10640 (struct value) <unavailable, optimized_out>: Now std::vector.
10641 (value_entirely_available)
10642 (value_entirely_covered_by_range_vector)
10643 (value_entirely_unavailable, value_entirely_optimized_out):
10644 Update.
10645 (insert_into_bit_range_vector): Change argument type.
10646 (find_first_range_overlap): Likewise.
10647 (struct ranges_and_idx, value_contents_bits_eq)
10648 (require_not_optimized_out, require_available): Update.
10649 (ranges_copy_adjusted): Change argument types.
10650 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10651
10652 2018-04-06 Tom Tromey <tom@tromey.com>
10653
10654 * value.c (~value): Update.
10655 (struct value) <parent>: Now a value_ref_ptr.
10656 (value_parent, set_value_parent, value_address, value_copy):
10657 Update.
10658
10659 2018-04-06 Tom Tromey <tom@tromey.com>
10660
10661 * value.c (struct value): Add constructor, destructor, and member
10662 initializers.
10663 (allocate_value_lazy, value_decref): Update.
10664
10665 2018-04-06 Tom Tromey <tom@tromey.com>
10666
10667 * value.c (struct value) <released, next>: Remove.
10668 (all_values): Now a std::vector.
10669 (allocate_value_lazy): Update.
10670 (value_next): Remove.
10671 (value_mark, value_free_to_mark, release_value)
10672 (value_release_to_mark): Update.
10673
10674 2018-04-06 Tom Tromey <tom@tromey.com>
10675
10676 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10677 (free_value_chain): Remove.
10678 * value.c (free_value_chain): Remove.
10679 (value_release_to_mark): Return a std::vector.
10680 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10681 std::vector.
10682 (check_condition): Update.
10683 * eval.c (fetch_subexp_value): Change "val_chain" to a
10684 std::vector.
10685 * breakpoint.c (update_watchpoint): Update.
10686 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10687
10688 2018-04-06 Tom Tromey <tom@tromey.com>
10689
10690 * value.h (free_all_values): Remove.
10691 * value.c (free_all_values): Remove.
10692
10693 2018-04-06 Tom Tromey <tom@tromey.com>
10694
10695 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10696 (value_history_chain, value_history_count): Remove.
10697 (value_history): New global.
10698 (record_latest_value, access_value_history, show_values)
10699 (preserve_values): Update.
10700
10701 2018-04-06 Tom Tromey <tom@tromey.com>
10702
10703 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10704 * varobj.c (varobj_set_display_format, varobj_set_value)
10705 (install_default_visualizer, construct_visualizer)
10706 (install_new_value, ~varobj, varobj_get_value_type)
10707 (my_value_of_variable, varobj_editable_p): Update.
10708 * c-varobj.c (c_describe_child, c_value_of_variable)
10709 (cplus_number_of_children, cplus_describe_child): Update.
10710 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10711 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10712 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10713
10714 2018-04-06 Tom Tromey <tom@tromey.com>
10715
10716 * printcmd.c (last_examine_address): Change type to
10717 value_ref_ptr.
10718 (do_examine, x_command): Update.
10719
10720 2018-04-06 Tom Tromey <tom@tromey.com>
10721
10722 * value.c (release_value): Update.
10723 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10724 (struct bpstats) <val>: Now a value_ref_ptr.
10725 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10726 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10727 (~watchpoint, print_it_watchpoint, watch_command_1)
10728 (invalidate_bp_value_on_memory_change): Update.
10729
10730 2018-04-06 Tom Tromey <tom@tromey.com>
10731
10732 * varobj.c (varobj_clear_saved_item)
10733 (update_dynamic_varobj_children, install_new_value, ~varobj):
10734 Update.
10735 * value.h (value_incref): Move declaration earlier.
10736 (value_decref): Rename from value_free.
10737 (struct value_ref_policy): New.
10738 (value_ref_ptr): New typedef.
10739 (struct value_deleter): Remove.
10740 (gdb_value_up): Remove typedef.
10741 (release_value): Change return type.
10742 (release_value_or_incref): Remove.
10743 * value.c (set_value_parent): Update.
10744 (value_incref): Change return type.
10745 (value_decref): Rename from value_free.
10746 (value_free_to_mark, free_all_values, free_value_chain): Update.
10747 (release_value): Return value_ref_ptr.
10748 (release_value_or_incref): Remove.
10749 (record_latest_value, set_internalvar, clear_internalvar):
10750 Update.
10751 * stack.c (info_frame_command): Don't call value_free.
10752 * python/py-value.c (valpy_dealloc, valpy_new)
10753 (value_to_value_object): Update.
10754 * printcmd.c (do_examine): Update.
10755 * opencl-lang.c (lval_func_free_closure): Update.
10756 * mi/mi-main.c (register_changed_p): Don't call value_free.
10757 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10758 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10759 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10760 value_free.
10761 * guile/scm-value.c (vlscm_free_value_smob)
10762 (vlscm_scm_from_value): Update.
10763 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10764 (frame_unwind_register_unsigned, get_frame_register_bytes)
10765 (put_frame_register_bytes): Don't call value_free.
10766 * findvar.c (address_from_register): Don't call value_free.
10767 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10768 * dwarf2loc.c (entry_data_value_free_closure)
10769 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10770 (dwarf2_evaluate_loc_desc_full): Update.
10771 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10772 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10773 (~watchpoint, watch_command_1)
10774 (invalidate_bp_value_on_memory_change): Update.
10775 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10776
10777 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10778
10779 PR gdb/23022
10780 * warning.m4: Add -Wno-error=deprecated-register.
10781 * configure: Re-generate.
10782
10783 2018-04-05 Tom Tromey <tom@tromey.com>
10784
10785 * linespec.h: Remove include of "vec.h".
10786
10787 2018-04-05 Tom Tromey <tom@tromey.com>
10788
10789 * linespec.c (typep): Remove typedef.
10790 (find_methods, find_superclass_methods): Take a std::vector.
10791 (find_method): Use std::vector.
10792
10793 2018-04-05 Tom Tromey <tom@tromey.com>
10794
10795 * utils.c (compare_strings): Remove.
10796 * utils.h (compare_strings): Remove.
10797 * objc-lang.h (find_imps): Update.
10798 * objc-lang.c (find_methods): Take a std::vector.
10799 (uniquify_strings, find_imps): Likewise.
10800 * linespec.c (find_methods): Take a std::vector.
10801 (decode_objc): Use std::vector.
10802 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10803 a std::vector.
10804 (find_method, find_function_symbols): Use std::vector.
10805
10806 2018-04-05 Tom Tromey <tom@tromey.com>
10807
10808 * completer.c (completion_tracker::completion_tracker): Remove
10809 cast.
10810 (completion_tracker::discard_completions): Likewise.
10811 * breakpoint.c (ambiguous_names_p): Remove cast.
10812 * ada-lang.c (_initialize_ada_language): Remove cast.
10813 * utils.h (streq): Update.
10814 (streq_hash): Add new declaration.
10815 * utils.c (streq): Return bool.
10816 (streq_hash): New function.
10817
10818 2018-04-05 Tom Tromey <tom@tromey.com>
10819
10820 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10821 Remove a string copy.
10822
10823 2018-04-05 Tom Tromey <tom@tromey.com>
10824
10825 * linespec.c (filter_results): Use std::vector.
10826 (decode_line_2, decode_line_full): Update.
10827
10828 2018-04-05 Tom Tromey <tom@tromey.com>
10829
10830 * linespec.c (canonical_to_fullform): Return std::string.
10831 (filter_results): Update.
10832 (struct decode_line_2_item): Add constructor.
10833 <fullform, displayform>: Now std::string.
10834 (decode_line_2_compare_items): Now a std::sort comparator.
10835 (decode_line_2): Update.
10836
10837 2018-04-05 Tom Tromey <tom@tromey.com>
10838
10839 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10840 (unexpected_linespec_error): Update.
10841 (linespec_parse_basic, parse_linespec): Update.
10842
10843 2018-04-05 Tom Tromey <tom@tromey.com>
10844
10845 * linespec.c (linespec_parse_basic): Reindent.
10846
10847 2018-04-05 Tom Tromey <tom@tromey.com>
10848
10849 * minsyms.h (iterate_over_minimal_symbols): Update.
10850 * minsyms.c (iterate_over_minimal_symbols): Take a
10851 gdb::function_view.
10852 * linespec.c (struct collect_minsyms): Remove.
10853 (compare_msyms): Now a std::sort comparator.
10854 (add_minsym): Add parameters.
10855 (search_minsyms_for_name): Update. Use std::vector.
10856
10857 2018-04-03 Tom Tromey <tom@tromey.com>
10858
10859 * mipsread.c (read_alphacoff_dynamic_symtab): Use
10860 gdb::byte_vector.
10861
10862 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10863
10864 * MAINTAINERS (Write After Approval): Add Weimin Pan.
10865
10866 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
10867
10868 PR gdb/16959
10869 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
10870 printing static type.
10871
10872 2018-04-01 Tom Tromey <tom@tromey.com>
10873
10874 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10875 (rs6000_xfer_shared_libraries): Update.
10876
10877 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
10878
10879 * common/gdb_vecs.h (char_ptr): Remove.
10880 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10881
10882 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10883
10884 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10885 with std::vector.
10886 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10887
10888 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
10889
10890 * tracepoint.h (struct uploaded_tp): Initialize fields.
10891 <actions, step_actions, cmd_strings>: Change type to
10892 std::vector<char *>.
10893 * tracepoint.c (get_uploaded_tp): Allocate with new.
10894 (free_uploaded_tps): Free with delete.
10895 (parse_tracepoint_definition): Adjust to std::vector change.
10896 * breakpoint.c (read_uploaded_action): Likewise.
10897 (create_tracepoint_from_upload): Likewise.
10898 * ctf.c (ctf_write_uploaded_tp): Likewise.
10899 (SET_ARRAY_FIELD): Likewise.
10900 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10901
10902 2018-03-30 Tom Tromey <tom@tromey.com>
10903
10904 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
10905 std::unique_ptr.
10906 (svr4_keep_data_in_core): Update.
10907 (svr4_read_so_list): Update.
10908
10909 2018-03-30 Tom Tromey <tom@tromey.com>
10910
10911 * windows-nat.c (handle_output_debug_string, handle_exception):
10912 Update.
10913 * target.h (target_read_string): Update.
10914 * target.c (target_read_string): Change "string" to
10915 unique_xmalloc_ptr.
10916 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10917 Update.
10918 * solib-frv.c (frv_current_sos): Update.
10919 * solib-dsbt.c (dsbt_current_sos): Update.
10920 * solib-darwin.c (darwin_current_sos): Update.
10921 * linux-thread-db.c (inferior_has_bug): Update.
10922 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10923 Update. Remove alloca.
10924 * ada-lang.c (ada_main_name): Update.
10925
10926 2018-03-30 Tom Tromey <tom@tromey.com>
10927
10928 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10929 (struct dwo_file_deleter): New.
10930 (dwo_file_up): New typedef.
10931 (open_and_init_dwo_file): Use dwo_file_up.
10932 (free_dwo_file_cleanup): Remove.
10933
10934 2018-03-30 Tom Tromey <tom@tromey.com>
10935
10936 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10937 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10938
10939 2018-03-30 Tom Tromey <tom@tromey.com>
10940
10941 * dwarf2read.c (class free_cached_comp_units): New class.
10942 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10943 (free_cached_comp_units): Remove function.
10944
10945 2018-03-30 Tom Tromey <tom@tromey.com>
10946
10947 * utils.h (make_cleanup_unpush_target): Remove.
10948 * inf-ptrace.c (struct target_unpusher): New.
10949 (target_unpush_up) New typedef.
10950 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10951 target_unpush_up.
10952 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10953
10954 2018-03-27 Tom Tromey <tom@tromey.com>
10955
10956 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10957
10958 2018-03-27 Pedro Alves <palves@redhat.com>
10959 Tom Tromey <tom@tromey.com>
10960
10961 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10962 destructor. Now a class.
10963 (gdb_readline_wrapper_cleanup): Remove function.
10964 (gdb_readline_wrapper): Remove cleanups.
10965
10966 2018-03-27 Tom Tromey <tom@tromey.com>
10967
10968 * typeprint.h (struct type_print_options) <local_typedefs,
10969 global_typedefs>: Remove "struct" keyword.
10970 (class typedef_hash_table): New class.
10971 (recursively_update_typedef_hash, add_template_parameters)
10972 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10973 (find_typedef_in_hash): Don't declare.
10974 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10975 (typedef_hash_table::recursively_update): Rename from
10976 recursively_update_typedef_hash. Now a member.
10977 (typedef_hash_table::add_template_parameters): Rename from
10978 add_template_parameters. Now a member.
10979 (typedef_hash_table::typedef_hash_table): Now a constructor;
10980 rename from create_typedef_hash.
10981 (typedef_hash_table::~typedef_hash_table): Now a destructor;
10982 rename from free_typedef_hash.
10983 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10984 (do_free_global_table): Remove.
10985 (typedef_hash_table::typedef_hash_table): New constructor; renamed
10986 from copy_type_recursive.
10987 (create_global_typedef_table): Remove.
10988 (typedef_hash_table::find_global_typedef): Now a member of
10989 typedef_hash_table.
10990 (typedef_hash_table::find_typedef): Rename from
10991 find_typedef_in_hash; now a member.
10992 (whatis_exp): Update.
10993 * extension.h (struct ext_lang_type_printers): Add constructor and
10994 destructor.
10995 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10996 declare.
10997 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10998 Now a constructor; rename from start_ext_lang_type_printers.
10999 (ext_lang_type_printers): Now a destructor; rename from
11000 free_ext_lang_type_printers.
11001 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11002 Update.
11003 (c_type_print_base_struct_union): Update. Remove cleanups.
11004
11005 2018-03-27 Tom Tromey <tom@tromey.com>
11006
11007 * dwarf-index-write.c: Include <cmath>.
11008
11009 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11010
11011 * NEWS: Add entry describing new "set|show varsize-limit" command.
11012 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11013 command.
11014 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11015 "set variable".
11016
11017 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11018
11019 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11020 dwarf-index-write.c
11021 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11022 * dwarf-index-common.c: New file.
11023 * dwarf-index-common.h: New file.
11024 * dwarf-index-write.c: New file.
11025 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11026 (struct dwarf2_section_info): Move from here.
11027 (dwarf2_section_info_def): Likewise.
11028 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11029 (offset_type): Likewise.
11030 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11031 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11032 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11033 (byte_swap): Likewise.
11034 (MAYBE_SWAP): Likewise.
11035 (dwarf2_per_cu_ptr): Likewise.
11036 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11037 (struct tu_stats): Likewise.
11038 (struct dwarf2_per_objfile): Likewise.
11039 (struct dwarf2_per_cu_data): Likewise.
11040 (struct signatured_type): Likewise.
11041 (sig_type_ptr): Likewise.
11042 (DEF_VEC_P (sig_type_ptr)): Likewise.
11043 (INDEX4_SUFFIX): Likewise.
11044 (INDEX5_SUFFIX): Likewise.
11045 (DEBUG_STR_SUFFIX): Likewise.
11046 (dwarf2_read_section): Make non-static.
11047 (mapped_index_string_hash): Move from here.
11048 (dwarf5_djb_hash): Likewise.
11049 (file_write): Likewise.
11050 (class data_buf): Likewise.
11051 (struct symtab_index_entry): Likewise.
11052 (struct mapped_symtab): Likewise.
11053 (find_slot): Likewise.
11054 (hash_expand): Likewise.
11055 (add_index_entry): Likewise.
11056 (uniquify_cu_indices): Likewise.
11057 (class c_str_view): Likewise.
11058 (class c_str_view_hasher): Likewise.
11059 (class vector_hasher): Likewise.
11060 (write_hash_table): Likewise.
11061 (psym_index_map): Likewise.
11062 (struct addrmap_index_data): Likewise.
11063 (add_address_entry): Likewise.
11064 (add_address_entry_worker): Likewise.
11065 (write_address_map): Likewise.
11066 (symbol_kind): Likewise.
11067 (write_psymbols): Likewise.
11068 (struct signatured_type_index_data): Likewise.
11069 (write_one_signatured_type): Likewise.
11070 (recursively_count_psymbols): Likewise.
11071 (recursively_write_psymbols): Likewise.
11072 (class debug_names): Likewise.
11073 (check_dwarf64_offsets): Likewise.
11074 (psyms_seen_size): Likewise.
11075 (write_gdbindex): Likewise.
11076 (write_debug_names): Likewise.
11077 (assert_file_size): Likewise.
11078 (write_psymtabs_to_index): Likewise.
11079 (save_gdb_index_command): Likewise.
11080 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11081 command.
11082 * dwarf2read.h: New file.
11083
11084 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11085
11086 PR gdb/22670
11087 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11088 symbol name if the CU's language stores symbol names in linkage
11089 format.
11090 * language.h (struct language_defn)
11091 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11092 all instances of this struct.
11093
11094 2018-03-26 Tom Tromey <tom@tromey.com>
11095
11096 * stack.c (backtrace_command_1): Remove verbose code.
11097
11098 2018-03-26 Tom Tromey <tom@tromey.com>
11099
11100 * python/py-framefilter.c (py_print_type): Don't catch
11101 exceptions. Return void.
11102 (py_print_value): Likewise.
11103 (py_print_single_arg): Likewise.
11104 (enumerate_args): Don't catch exceptions.
11105 (py_print_args): Likewise.
11106 (py_print_frame): Likewise.
11107 (gdbpy_apply_frame_filter): Catch exceptions here.
11108
11109 2018-03-26 Tom Tromey <tom@tromey.com>
11110
11111 * stack.c (_initialize_stack): Remove trailing newlines from help
11112 text. Add "Usage" line to "backtrace" help.
11113
11114 2018-03-26 Tom Tromey <tom@tromey.com>
11115
11116 PR python/16486:
11117 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11118
11119 2018-03-26 Tom Tromey <tom@tromey.com>
11120
11121 * python/py-framefilter.c (py_print_single_arg): Return
11122 EXT_LANG_BT_ERROR from catch.
11123
11124 2018-03-26 Tom Tromey <tom@tromey.com>
11125
11126 PR backtrace/15584:
11127 * stack.c (backtrace_command_1): Move some code into no-filters
11128 "if".
11129
11130 2018-03-26 Tom Tromey <tom@tromey.com>
11131
11132 * python/py-framefilter.c (throw_quit_or_print_exception): New
11133 function.
11134 (gdbpy_apply_frame_filter): Use it.
11135
11136 2018-03-26 Tom Tromey <tom@tromey.com>
11137
11138 PR cli/17716:
11139 * python/py-framefilter.c (py_print_type, py_print_value)
11140 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11141 RETURN_MASK_ERROR.
11142
11143 2018-03-26 Tom Tromey <tom@tromey.com>
11144
11145 * python/py-framefilter.c (enumerate_args): Use
11146 gdb::unique_xmalloc_ptr.
11147
11148 2018-03-26 Tom Tromey <tom@tromey.com>
11149
11150 * python/py-framefilter.c (py_print_frame): Return
11151 EXT_LANG_BT_OK.
11152 (gdbpy_apply_frame_filter): Update comment.
11153 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11154 Remove.
11155 <EXT_LANG_BT_NO_FILTERS>: Change value.
11156
11157 2018-03-26 Tom Tromey <tom@tromey.com>
11158
11159 PR backtrace/15582:
11160 * stack.c (backtrace_command): Parse "hide" argument.
11161 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11162 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11163 constant.
11164
11165 2018-03-26 Tom Tromey <tom@tromey.com>
11166
11167 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11168 add "flags".
11169 (backtrace_command): Remove "fulltrace", add "flags".
11170
11171 2018-03-26 Tom Tromey <tom@tromey.com>
11172
11173 * stack.c (backtrace_command): Rewrite command line parsing.
11174
11175 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11176
11177 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11178
11179 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11180
11181 * filename-seen-cache.h: Add include guard.
11182
11183 2018-03-26 Keith Seitz <keiths@redhat.com>
11184
11185 * symfile.c (place_section): Remove "struct" from section_addr_info
11186 in comment.
11187 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11188 "struct" keyword from section_addr_info.
11189
11190 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11191
11192 * regformats/regdef.h (reg): Add constructors.
11193
11194 2018-03-25 Pedro Alves <palves@redhat.com>
11195
11196 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11197 if then/else bodies in var_func_name extraction.
11198
11199 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11200
11201 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11202 lookup_minimal_symbol() to find symbol entry.
11203 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11204
11205 2018-03-23 Keith Seitz <keiths@redhat.com>
11206
11207 PR c++/22968
11208 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11209 nested type definitions for C++, too.
11210
11211 2018-03-23 Tom Tromey <tom@tromey.com>
11212
11213 * machoread.c (struct oso_el): Add a constructor. Don't define as
11214 a typedef.
11215 (macho_register_oso): Remove.
11216 (macho_symtab_read): Take a std::vector.
11217 (oso_el_compare_name): Now a std::sort comparator.
11218 (macho_symfile_read_all_oso): Take a std::vector.
11219 (macho_symfile_read): Use std::vector. Remove cleanups.
11220
11221 2018-03-22 Tom Tromey <tom@tromey.com>
11222
11223 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11224 (record_full_goto_bookmark): Use std::string.
11225
11226 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11227
11228 PR tdep/18295
11229 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11230 a single mask.
11231
11232 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11233
11234 * rs6000-tdep.c (store_insn_p): New function.
11235 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11236 and cr_reg to their unshifted values. Use store_insn_p to
11237 match LR saves using either R1 or fdata->alloca_reg. Use
11238 store_insn_p to match CR saves. Set alloca_reg_offset
11239 when alloca_reg and framep are set. Remove lr_reg shift
11240 when assigning to fdata->lr_register.
11241
11242 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11243
11244 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11245 command line args instead of emitting a warning.
11246
11247 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11248
11249 * tracepoint.h (struct static_tracepoint_marker): Initialize
11250 fields, define default constructor, move constructor and move
11251 assignment, disable the rest.
11252 <str_id, extra>: Make std::string.
11253 (release_static_tracepoint_marker): Remove.
11254 (free_current_marker): Remove.
11255 * tracepoint.c (free_current_marker): Remove.
11256 (parse_static_tracepoint_marker_definition): Adjust to
11257 std::string, use new hex2str overload.
11258 (release_static_tracepoint_marker): Remove.
11259 (print_one_static_tracepoint_marker): Get marker by reference
11260 and adjust to std::string.
11261 (info_static_tracepoint_markers_command): Adjust to std::vector
11262 changes
11263 * target.h (static_tracepoint_marker_p): Remove typedef.
11264 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11265 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11266 bool.
11267 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11268 * target-debug.h
11269 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11270 (target_debug_print_std_vector_static_tracepoint_marker): New.
11271 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11272 to...
11273 (target_debug_print_static_tracepoint_marker_p): ... this.
11274 * target-delegates.c: Re-generate.
11275 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11276 Make std::string.
11277 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11278 (decode_static_tracepoint_spec): Adjust to std::vector.
11279 (tracepoint_print_one_detail): Adjust to std::string.
11280 (strace_marker_decode_location): Adjust to std::string.
11281 (update_static_tracepoint): Adjust to std::string, remove call
11282 to release_static_tracepoint_marker.
11283 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11284 Adjust to std::vector.
11285 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11286 (remote_static_tracepoint_markers_by_strid): Adjust to
11287 std::vector.
11288 * common/rsp-low.h (hex2str): New overload with explicit count
11289 of bytes.
11290 * common/rsp-low.c (hex2str): New overload with explicit count
11291 of bytes.
11292 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11293 (_initialize_rsp_low_selftests): Add test_hex2str test.
11294 * unittests/tracepoint-selftests.c
11295 (test_parse_static_tracepoint_marker_definition): Adjust to
11296 std::string.
11297
11298 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11299
11300 * tracepoint.c (parse_static_tracepoint_marker_definition):
11301 Consider case where the definition is followed by more
11302 definitions.
11303 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11304 tracepoint-selftests.c.
11305 * unittests/tracepoint-selftests.c: New.
11306
11307 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11308
11309 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11310 Carvalho.
11311
11312 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11313
11314 * symtab.c (find_pc_sect_line): fixed indentation.
11315
11316 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11317
11318 * symtab.c (find_pc_sect_line): now uses binary search.
11319
11320 2018-03-19 Tom Tromey <tom@tromey.com>
11321
11322 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11323 "IDENT" production.
11324
11325 2018-03-19 Pedro Alves <palves@redhat.com>
11326 Tom Tromey <tom@tromey.com>
11327
11328 * unittests/observable-selftests.c: New file.
11329 * common/observable.h: New file.
11330 * observable.h: New file.
11331 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11332 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11333 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11334 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11335 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11336 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11337 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11338 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11339 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11340 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11341 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11342 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11343 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11344 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11345 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11346 tui/tui-interp.c, valops.c: Update all users.
11347 * tui/tui-hooks.c (tui_bp_created_observer)
11348 (tui_bp_deleted_observer, tui_bp_modified_observer)
11349 (tui_inferior_exit_observer, tui_before_prompt_observer)
11350 (tui_normal_stop_observer, tui_register_changed_observer):
11351 Remove.
11352 (tui_observers_token): New global.
11353 (attach_or_detach, tui_attach_detach_observers): New functions.
11354 (tui_install_hooks, tui_remove_hooks): Use
11355 tui_attach_detach_observers.
11356 * record-btrace.c (record_btrace_thread_observer): Remove.
11357 (record_btrace_thread_observer_token): New global.
11358 * observer.sh: Remove.
11359 * observer.c: Rename to observable.c.
11360 * observable.c (namespace gdb_observers): Define new objects.
11361 (observer_debug): Move into gdb_observers namespace.
11362 (struct observer, struct observer_list, xalloc_observer_list_node)
11363 (xfree_observer_list_node, generic_observer_attach)
11364 (generic_observer_detach, generic_observer_notify): Remove.
11365 (_initialize_observer): Update.
11366 Don't include observer.inc.
11367 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11368 (clean mostlyclean): Likewise.
11369 (observer.h, observer.inc): Remove targets.
11370 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11371 (COMMON_SFILES): Use observable.c, not observer.c.
11372 * .gitignore: Remove observer.h.
11373
11374 2018-03-18 Tom Tromey <tom@tromey.com>
11375
11376 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11377 gdb::def_vector.
11378 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11379
11380 2018-03-17 Tom Tromey <tom@tromey.com>
11381
11382 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11383
11384 2018-03-17 Tom Tromey <tom@tromey.com>
11385
11386 * target.c (class scoped_target_fd): New.
11387 (target_fileio_close_cleanup): Remove.
11388 (target_fileio_read_alloc_1): Use scoped_target_fd.
11389
11390 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11391
11392 * silent-rules.mk: New.
11393 * Makefile.in: Include silent-rules.mk
11394 (srcdir, VPATH, top_srcdir): Move up.
11395 (COMPILE): Add ECHO_CXX.
11396 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11397 (init.c): Add ECHO_INIT_C.
11398 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11399 (version.c): Add ECHO_GEN.
11400 (printcmd.o): Add ECHO_CXX.
11401 (target-float.o): Add ECHO_CXX.
11402 (ada-exp.o): Add ECHO_CXX.
11403 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11404 (insight$(EXEEXT)): Add ECHO_CXXLD.
11405 * gnulib/configure.ac: Add AM_SILENT_RULES.
11406 * gnulib/aclocal.m4: Re-generate.
11407 * gnulib/configure: Re-generate.
11408 * gnulib/import/Makefile.in: Re-generate.
11409
11410 2018-03-16 Tom Tromey <tom@tromey.com>
11411
11412 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11413 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11414 * utils.c (do_free_section_addr_info)
11415 (make_cleanup_free_section_addr_info): Remove.
11416 * symfile.h (struct other_sections): Add constructor.
11417 (struct section_addr_info): Remove.
11418 (section_addr_info): New typedef.
11419 (struct sym_fns) <sym_offsets>: Change type of parameter.
11420 (build_section_addr_info_from_objfile)
11421 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11422 (default_symfile_offsets, symbol_file_add)
11423 (symbol_file_add_from_bfd)
11424 (build_section_addr_info_from_section_table): Update.
11425 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11426 * symfile.c (alloc_section_addr_info): Remove.
11427 (build_section_addr_info_from_section_table): Change return type.
11428 Update.
11429 (build_section_addr_info_from_bfd)
11430 (build_section_addr_info_from_objfile): Likewise.
11431 (free_section_addr_info): Remove.
11432 (relative_addr_info_to_section_offsets): Change type of "addrs".
11433 (addrs_section_compar): Now a std::sort comparator.
11434 (addrs_section_sort): Change return type.
11435 (addr_info_make_relative): Change type of "addrs". Update.
11436 (default_symfile_offsets, syms_from_objfile_1)
11437 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11438 (symbol_file_add_separate): Update.
11439 (symbol_file_add): Change type of "addrs". Update.
11440 (add_symbol_file_command): Update. Remove cleanups.
11441 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11442 cleanups.
11443 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11444 * solib.c (solib_read_symbols): Update.
11445 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11446 * machoread.c (macho_symfile_offsets): Update.
11447 * jit.c (jit_bfd_try_read_symtab): Update.
11448
11449 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11450
11451 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11452 unittests/utils-selftests.c.
11453 * unittests/utils-selftests.c: New file.
11454
11455 2018-03-14 Tom Tromey <tom@tromey.com>
11456
11457 PR cli/14977:
11458 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11459 for NULL.
11460
11461 2018-03-14 Tom Tromey <tom@tromey.com>
11462
11463 PR cli/19918:
11464 * printcmd.c (printf_pointer): Allow "-" in format.
11465
11466 2018-03-14 Tom Tromey <tom@tromey.com>
11467
11468 * printcmd.c (_initialize_printcmd): Add usage to printf.
11469
11470 2018-03-14 Yao Qi <qiyao@sourceware.org>
11471
11472 * MAINTAINERS: Update my email address.
11473
11474 2018-03-13 Tom Tromey <tom@tromey.com>
11475
11476 * machoread.c (macho_check_dsym): Change filenamep to a
11477 std::string*.
11478 (macho_symfile_read): Update.
11479 * symfile.c (load_command): Use std::string.
11480
11481 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11482
11483 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11484 to error message string.
11485 (riscv_register_name): Use xsnprintf instead of sprintf.
11486 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11487 internal_error.
11488 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11489 error.
11490 (riscv_push_dummy_call): Likewise.
11491
11492 2018-03-12 Tom Tromey <tom@tromey.com>
11493
11494 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11495 Use gdb::byte_vector.
11496 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11497
11498 2018-03-12 Yao Qi <yao.qi@linaro.org>
11499
11500 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11501 parameter type to readable_regcache.
11502 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11503 the declaration.
11504
11505 2018-03-11 Tom Tromey <tom@tromey.com>
11506
11507 * dwarf2read.c (struct nextfield): Add initializers.
11508 (struct nextfnfield): Remove.
11509 (struct fnfieldlist): Add initializers. Remove "length" and
11510 "head", use std::vector.
11511 (struct decl_field_list): Remove.
11512 (struct field_info): Add initializers.
11513 <fields, baseclasses>: Now std::vector.
11514 <nbaseclasses, nfnfields, typedef_field_list_count,
11515 nested_types_list_count>: Remove.
11516 (dwarf2_add_field, dwarf2_add_type_defn)
11517 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11518 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11519 (process_structure_scope): Update.
11520
11521 2018-03-11 Tom Tromey <tom@tromey.com>
11522
11523 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11524 for use by std::sort.
11525 (build_type_psymtabs_1): Use std::vector.
11526
11527 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11528
11529 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11530 and LIBMPFR in the printed configuration.
11531
11532 2018-03-08 Tom Tromey <tom@tromey.com>
11533
11534 * source.c (get_filename_and_charpos): Use scoped_fd.
11535 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11536 (procfs_pidlist): Likewise.
11537 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11538 (iterate_over_mappings): Likewise.
11539
11540 2018-03-08 Tom Tromey <tom@tromey.com>
11541
11542 * infcall.c (struct call_return_meta_info)
11543 <stack_temporaries_enabled>: Remove.
11544 (get_call_return_value, call_function_by_hand_dummy): Update.
11545 * thread.c (disable_thread_stack_temporaries): Remove.
11546 (enable_thread_stack_temporaries): Remove.
11547 (thread_stack_temporaries_enabled_p): Return bool.
11548 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11549 (get_last_thread_stack_temporary): Update.
11550 * eval.c (evaluate_subexp): Update.
11551 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11552 class, not a function.
11553 (value_ptr, value_vec): Remove typedefs.
11554 (class thread_info) <stack_temporaries_enabled>: Now bool.
11555 <stack_temporaries>: Now a std::vector.
11556 (thread_stack_temporaries_enabled_p)
11557 (value_in_thread_stack_temporaries): Return bool.
11558
11559 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11560
11561 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11562 (getpkt_or_notif_sane_1): Likewise.
11563
11564 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11565
11566 * build-id.c (build_id_to_debug_bfd): Use std::string.
11567
11568 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11569
11570 * build-id.c (find_separate_debug_file_by_buildid): Return
11571 std::string.
11572 * build-id.h (find_separate_debug_file_by_buildid): Return
11573 std::string.
11574 * coffread.c (coff_symfile_read): Adjust to std::string.
11575 * elfread.c (elf_symfile_read): Adjust to std::string.
11576 * symfile.c (separate_debug_file_exists): Change parameter to
11577 std::string.
11578 (find_separate_debug_file): Return std::string.
11579 (find_separate_debug_file_by_debuglink): Return std::string.
11580 * symfile.h (find_separate_debug_file_by_debuglink): Return
11581 std::string.
11582
11583 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11584
11585 * common/xml-utils.c (xml_escape_text): Move code to...
11586 (xml_escape_text_append): ... this new function.
11587 * common/xml-utils.h (xml_escape_text_append): New declaration.
11588 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11589 New function.
11590 (_initialize_xml_utils): register test_xml_escape_text_append as
11591 a selftest.
11592
11593 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11594
11595 * defs.h: Remove MAX_REGISTER_SIZE.
11596 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11597 asserts.
11598 * python/py-unwind.c (pyuw_sniffer): Likewise.
11599
11600 2018-03-07 Tom Tromey <tom@tromey.com>
11601
11602 * linux-tdep.c (linux_info_proc): Update.
11603 * target.h (struct target_ops) <to_fileio_readlink>: Return
11604 optional<string>.
11605 (target_fileio_readlink): Return optional<string>.
11606 * remote.c (remote_hostio_readlink): Return optional<string>.
11607 * inf-child.c (inf_child_fileio_readlink): Return
11608 optional<string>.
11609 * target.c (target_fileio_readlink): Return optional<string>.
11610
11611 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11612
11613 * regcache.c (cooked_read_test): Add riscv to the list of
11614 architectures that have a save_reggroup.
11615
11616 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11617
11618 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11619 value is not a dynamic class object.
11620
11621 2018-03-06 Tom Tromey <tom@tromey.com>
11622
11623 * rust-exp.y: Formatting fixes.
11624
11625 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11626
11627 * riscv-tdep.c (riscv_register_name): Remove target description
11628 support.
11629 (riscv_gdbarch_init): Remove target description check.
11630
11631 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11632
11633 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11634 comment.
11635 * riscv-tdep.h: Likewise.
11636
11637 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11638
11639 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11640 (riscv_pseudo_register_write): Delete.
11641 (riscv_gdbarch_init): Remove all use of pseudo registers.
11642
11643 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11644
11645 * record-btrace.c (btrace_print_lines): Replace cleanup
11646 parameter with RAII equivalents.
11647 (btrace_insn_history): Replace cleanup with RAII equivalents.
11648 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11649 make_cleanup_ui_out_tuple_begin_end): Remove.
11650 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11651 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11652 make_cleanup_ui_out_list_begin_end): Remove.
11653
11654 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11655
11656 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11657 parameter types to std::vector. Use bool.
11658 (record_btrace_wait): Replace VEC(tp_t) with
11659 std::vector<thread_info *>.
11660 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11661
11662 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11663
11664 * record-btrace.c (record_btrace_disable_callback): Remove.
11665 (struct scoped_btrace_disable): New.
11666 (record_btrace_open): Use scoped_btrace_disable.
11667
11668 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11669
11670 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11671 reading values from registers.
11672
11673 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11674
11675 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11676 where appropriate.
11677
11678 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11679
11680 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11681 change parameter type. Use GDB's print functions, and use
11682 core_addr_to_string where appropriate.
11683 (riscv_push_dummy_call): Use core_addr_to_string where
11684 appropriate, update call to riscv_print_arg_location, and reindent
11685 a few lines.
11686 (riscv_return_value): Update call to riscv_print_arg_location.
11687
11688 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11689 Tim Newsome <tim@sifive.com>
11690 Albert Ou <a0u@eecs.berkeley.edu>
11691 Darius Rad <darius@bluespec.com>
11692
11693 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11694 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11695 (ALLDEPFILES): Add riscv-tdep.c
11696 * configure.tgt: Add riscv support.
11697 * riscv-tdep.c: New file.
11698 * riscv-tdep.h: New file.
11699 * NEWS: Mention new target.
11700 * MAINTAINERS: Add entry for riscv.
11701
11702 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11703
11704 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11705 fields within aggregates.
11706
11707 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11708
11709 * record-btrace.c (btrace_print_lines): Change type of flags to
11710 gdb_disassembly_flags.
11711
11712 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11713
11714 * fbsd-nat.c: Include "inf-ptrace.h".
11715 (USE_SIGTRAP_SIGINFO): Conditionally define.
11716 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11717 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11718 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11719 function.
11720 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11721 Likewise.
11722 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11723 Likewise.
11724 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11725 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11726 "supports_stopped_by_hw_breakpoint" target methods.
11727
11728 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11729
11730 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11731 * fbsd-nat.c (debug_fbsd_nat): New variable.
11732 (show_fbsd_nat_debug): New function.
11733 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11734 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11735
11736 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11737
11738 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11739 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11740 prototype.
11741 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11742 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11743 method.
11744
11745 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11746
11747 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11748 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11749
11750 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11751
11752 * charset.c (struct charset_vector): New.
11753 (charsets): Change type to charset_vector.
11754 (find_charset_names): Adjust.
11755 (add_one): Adjust.
11756 (_initialize_charset): Adjust.
11757
11758 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11759
11760 * progspace.h (struct program_space) <deleted_solibs>: Change
11761 type to std::vector<std::string>.
11762 * progspace.c (clear_program_space_solib_cache): Adjust.
11763 * breakpoint.c (print_solib_event): Adjust.
11764 (check_status_catch_solib): Adjust.
11765 * solib.c (update_solib_list): Adjust.
11766 * ui-out.h (class ui_out) <field_string>: New overload.
11767 * ui-out.c (ui_out::field_string): New overload.
11768
11769 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11770
11771 * progspace.h (struct program_space): Add constructor and
11772 destructor, initialize fields.
11773 (add_program_space): Remove.
11774 * progspace.c (add_program_space): Rename to...
11775 (program_space::program_space): ... this.
11776 (release_program_space): Rename to...
11777 (program_space::~program_space): ... this.
11778 (delete_program_space): Use delete to delete program_space.
11779 (initialize_progspace): Use new to allocate program_space.
11780 * inferior.c (add_inferior_with_spaces): Likewise.
11781 (clone_inferior_command): Likewise.
11782 * infrun.c (follow_fork_inferior): Likewise.
11783 (handle_vfork_child_exec_or_exit): Likewise.
11784
11785 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11786
11787 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11788 (delim_string_to_char_ptr_vec): Return std::vector of
11789 gdb::unique_xmalloc_ptr.
11790 (dirnames_to_char_ptr_vec_append): Take std::vector of
11791 gdb::unique_xmalloc_ptr.
11792 (dirnames_to_char_ptr_vec): Return std::vector of
11793 gdb::unique_xmalloc_ptr.
11794 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11795 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11796 (delim_string_to_char_ptr_vec): Return an std::vector of
11797 gdb::unique_xmalloc_ptr, adjust the code.
11798 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11799 gdb::unique_xmalloc_ptr, adjust the code.
11800 (dirnames_to_char_ptr_vec): Return an std::vector of
11801 gdb::unique_xmalloc_ptr, adjust the code.
11802 * auto-load.c (auto_load_safe_path_vec): Change type to
11803 std::vector of gdb::unique_xmalloc_ptr.
11804 (auto_load_expand_dir_vars): Return an std::vector of
11805 gdb::unique_xmalloc_ptr, adjust the code.
11806 (auto_load_safe_path_vec_update): Adjust.
11807 (filename_is_in_auto_load_safe_path_vec): Adjust.
11808 (auto_load_objfile_script_1): Adjust.
11809 * build-id.c (build_id_to_debug_bfd): Adjust.
11810 * linux-thread-db.c (thread_db_load_search): Adjust.
11811 * source.c (add_path): Adjust.
11812 (openp): Adjust.
11813 * symfile.c (find_separate_debug_file): Adjust.
11814 * utils.c (do_free_char_ptr_vec): Remove.
11815 (make_cleanup_free_char_ptr_vec): Remove.
11816
11817 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11818
11819 PR gdb/22907
11820 * common/pathstuff.c: Conditionally include "<windows.h>".
11821
11822 2018-03-01 Georg Sauthoff <mail@georg.so>
11823
11824 PR gdb/22888
11825 * gcore.in: Quote variables and switch interpreter to bash.
11826
11827 2018-03-01 Tom Tromey <tom@tromey.com>
11828
11829 * dwarf2read.c (alloc_discriminant_info): Fix default_index
11830 assertion. Add assertion for discriminant_index.
11831 (quirk_rust_enum): Use correct base type name in univariant case.
11832
11833 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
11834
11835 * record.c (get_call_history_modifiers): Return a
11836 record_print_flags.
11837 (cmd_record_call_history): Adjust.
11838 * record-btrace.c (record_btrace_call_history): Adjust.
11839 (record_btrace_call_history_range): Adjust.
11840 (record_btrace_call_history_from): Adjust.
11841 * target-debug.h (target_debug_print_record_print_flags): New.
11842 * target-delegates.c: Re-generate.
11843 * target.c (target_call_history): Change flags type.
11844 (target_call_history_from): Likewise.
11845 (target_call_history_range): Likewise.
11846 * target.h (struct target_ops) <target_call_history>: Likewise.
11847 (target_call_history_from): Likewise.
11848 (target_call_history_range): Likewise.
11849
11850 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11851 Simon Marchi <simon.marchi@polymtl.ca>
11852
11853 * common/common-utils.c: Include "sys/stat.h".
11854 (is_regular_file): Move here from "source.c"; change return
11855 type to "bool".
11856 * common/common-utils.h (is_regular_file): New prototype.
11857 * common/pathstuff.c (contains_dir_separator): New function.
11858 * common/pathstuff.h (contains_dir_separator): New prototype.
11859 * source.c: Don't include "sys/stat.h".
11860 (is_regular_file): Move to "common/common-utils.c".
11861
11862 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
11863
11864 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11865 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11866 * auto-load.c: Include "common/pathstuff.h".
11867 * common/common-def.h (current_directory): Move here.
11868 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11869 function.
11870 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11871 prototype.
11872 * common/pathstuff.c: New file.
11873 * common/pathstuff.h: New file.
11874 * compile/compile.c: Include "common/pathstuff.h".
11875 * defs.h (current_directory): Move to "common/common-defs.h".
11876 * dwarf2read.c: Include "common/pathstuff.h".
11877 * exec.c: Likewise.
11878 * guile/scm-safe-call.c: Likewise.
11879 * linux-thread-db.c: Likewise.
11880 * main.c: Likewise.
11881 * nto-tdep.c: Likewise.
11882 * objfiles.c: Likewise.
11883 * source.c: Likewise.
11884 * symtab.c: Likewise.
11885 * utils.c: Include "common/pathstuff.h".
11886 (gdb_realpath): Move to "common/pathstuff.c".
11887 (gdb_realpath_keepfile): Likewise.
11888 (gdb_abspath): Likewise.
11889 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11890 (gdb_realpath_keepfile): Likewise.
11891 (gdb_abspath): Likewise.
11892
11893 2018-02-28 John Baldwin <jhb@FreeBSD.org>
11894
11895 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11896 wildcard process pid for super_resume for kernels with a
11897 specific bug.
11898
11899 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
11900
11901 * compile/compile.c (get_args): Add additional comments
11902 explaining function.
11903
11904 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
11905 Tom Tromey <tom@tromey.com>
11906
11907 * target.h (memory_write_request_s): Remove typedef. Don't define
11908 VEC.
11909 (target_write_memory_blocks): Change argument to std::vector.
11910 (struct memory_write_request): Add constructor.
11911 * target-memory.c (compare_block_starting_address): Return bool.
11912 Change argument types.
11913 (claim_memory): Change arguments to use std::vector.
11914 (split_regular_and_flash_blocks, blocks_to_erase)
11915 (compute_garbled_blocks): Likewise.
11916 (cleanup_request_data, cleanup_write_requests_vector): Remove.
11917 (target_write_memory_blocks): Change argument to std::vector.
11918 * symfile.c (struct load_section_data): Add constructor and
11919 destructor. Use std::vector for "requests".
11920 (struct load_progress_data): Add initializers.
11921 (load_section_callback): Update. Use "new".
11922 (clear_memory_write_data): Remove.
11923 (generic_load): Update.
11924
11925 2018-02-27 Alan Hayward <alan.hayward@arm.com>
11926
11927 * arch/aarch64.h: Use common/tdesc.h.
11928
11929 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11930
11931 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11932 architecture with a 64-bit ABI.
11933
11934 2018-02-26 Maciej W. Rozycki <macro@mips.com>
11935
11936 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11937 ahead of target description loading.
11938
11939 2018-02-26 Tom Tromey <tom@tromey.com>
11940
11941 * stack.c (backtrace_command_1): Update.
11942 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11943 of "flags".
11944 * python/py-framefilter.c (py_print_frame)
11945 (gdbpy_apply_frame_filter): Change type of "flags".
11946 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11947 of "flags".
11948 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11949 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11950 * extension.h (enum frame_filter_flag): Rename from
11951 frame_filter_flags.
11952 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11953 (apply_ext_lang_frame_filter): Change type of "flags".
11954 * extension.c (apply_ext_lang_frame_filter): Change type of
11955 "flags".
11956 * extension-priv.h (struct extension_language_ops)
11957 <apply_frame_filter>: Change type of "flags".
11958
11959 2018-02-26 Tom Tromey <tom@tromey.com>
11960
11961 PR python/16497:
11962 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
11963 off-by-one in py_end computation.
11964 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11965 PRINT_MORE_FRAMES.
11966 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11967 constant.
11968
11969 2018-02-26 Tom Tromey <tom@tromey.com>
11970
11971 * dwarf2read.c (struct variant_field): New.
11972 (struct nextfield) <variant>: New field.
11973 (dwarf2_add_field): Handle DW_TAG_variant_part.
11974 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11975 discriminated union.
11976 (read_structure_type): Handle DW_TAG_variant_part.
11977 (handle_struct_member_die): New function, extracted from
11978 process_structure_scope. Handle DW_TAG_variant.
11979 (process_structure_scope): Handle discriminated unions. Call
11980 handle_struct_member_die.
11981
11982 2018-02-26 Tom Tromey <tom@tromey.com>
11983
11984 * rust-lang.h (rust_last_path_segment): Declare.
11985 * rust-lang.c (rust_last_path_segment): Now public. Change
11986 contract.
11987 (struct disr_info): Remove.
11988 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11989 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11990 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11991 (rust_enum_p, rust_enum_variant): New function.
11992 (rust_underscore_fields): Remove "offset" parameter.
11993 (rust_print_enum): New function.
11994 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11995 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11996 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
11997 enums.
11998 (rust_internal_print_type): New function, from rust_print_type.
11999 Remove enum code.
12000 (rust_print_type): Call rust_internal_print_type.
12001 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12002 Update enum handling.
12003 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12004 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12005 (rust_union_quirks): New functions.
12006 (process_full_comp_unit, process_full_type_unit): Call
12007 rust_union_quirks.
12008 (process_structure_scope): Update rust_unions if necessary.
12009
12010 2018-02-26 Tom Tromey <tom@tromey.com>
12011
12012 * value.h (value_union_variant): Declare.
12013 * valops.c (value_union_variant): New function.
12014 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12015 (struct discriminant_info): New.
12016 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12017 enumerator.
12018 (struct main_type) <flag_discriminated_union>: New field.
12019
12020 2018-02-26 Tom Tromey <tom@tromey.com>
12021
12022 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12023 unittests/unpack-selftests.c.
12024 * unittests/unpack-selftests.c: New file.
12025 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12026
12027 2018-02-26 Yao Qi <yao.qi@linaro.org>
12028
12029 * dwarf2read.c (struct partial_die_info) <read>: New method.
12030 (read_partial_die): Remove the declaration.
12031 (load_partial_dies): Update.
12032 (partial_die_info::partial_die_info):
12033 (read_partial_die): Change it to partial_die_info::read.
12034
12035 2018-02-26 Yao Qi <yao.qi@linaro.org>
12036
12037 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12038 (fixup_partial_die): Remove declaration.
12039 (scan_partial_symbols): Update.
12040 (partial_die_parent_scope): Likewise.
12041 (partial_die_full_name): Likewise.
12042 (fixup_partial_die): Change it to partial_die_info::fixup.
12043
12044 2018-02-26 Yao Qi <yao.qi@linaro.org>
12045
12046 * dwarf2read.c (read_partial_die): Update the declaration.
12047 (load_partial_dies): Caller update.
12048 (read_partial_die): Remove one argument abbrev_len.
12049
12050 2018-02-26 Yao Qi <yao.qi@linaro.org>
12051
12052 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12053 assignment operator.
12054 (load_partial_dies): Use ctor and copy ctor.
12055 (read_partial_die): Update.
12056 (dwarf2_cu::find_partial_die): Use ctor.
12057
12058 2018-02-26 Yao Qi <yao.qi@linaro.org>
12059
12060 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12061 (find_partial_die_in_comp_unit): Change it to
12062 dwarf2_cu::find_partial_die.
12063 (find_partial_die): Update.
12064
12065 2018-02-26 Yao Qi <yao.qi@linaro.org>
12066
12067 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12068 is NULL.
12069
12070 2018-02-26 Yao Qi <yao.qi@linaro.org>
12071
12072 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12073
12074 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12075
12076 * arch/amd64.h: Use common/tdesc.h.
12077 * arch/i386.c: Likewise.
12078 * arch/i386.h: Likewise.
12079 * arch/tic6x.c: Likewise.
12080 * arch/tdesc.h: Move file from here...
12081 * common/tdesc.h: ...to here.
12082 * features/aarch64-core.c: Regenerate.
12083 * features/aarch64-fpu.c: Regenerate.
12084 * features/i386/32bit-avx.c: Regenerate.
12085 * features/i386/32bit-avx512.c: Regenerate.
12086 * features/i386/32bit-core.c: Regenerate.
12087 * features/i386/32bit-linux.c: Regenerate.
12088 * features/i386/32bit-mpx.c: Regenerate.
12089 * features/i386/32bit-pkeys.c: Regenerate.
12090 * features/i386/32bit-sse.c: Regenerate.
12091 * features/i386/64bit-avx.c: Regenerate.
12092 * features/i386/64bit-avx512.c: Regenerate.
12093 * features/i386/64bit-core.c: Regenerate.
12094 * features/i386/64bit-linux.c: Regenerate.
12095 * features/i386/64bit-mpx.c: Regenerate.
12096 * features/i386/64bit-pkeys.c: Regenerate.
12097 * features/i386/64bit-segments.c: Regenerate.
12098 * features/i386/64bit-sse.c: Regenerate.
12099 * features/i386/x32-core.c: Regenerate.
12100 * features/tic6x-c6xp.c: Regenerate.
12101 * features/tic6x-core.c: Regenerate.
12102 * features/tic6x-gp.c: Regenerate.
12103 * target-descriptions.c: Use common/tdesc.h.
12104 * target-descriptions.h: Likewise.
12105
12106 2018-02-24 Tom Tromey <tom@tromey.com>
12107
12108 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12109 (try_thread_db_load_from_dir, thread_db_load_search): Use
12110 std::string.
12111 (info_auto_load_libthread_db_compare): Return bool. Change
12112 argument types.
12113 (info_auto_load_libthread_db): Use std::vector, std::string.
12114 Remove cleanups.
12115
12116 2018-02-24 Tom Tromey <tom@tromey.com>
12117
12118 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12119 std::string.
12120 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12121 std::string*.
12122 * gdbarch.c: Rebuild.
12123 * gdbarch.h: Rebuild.
12124 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12125 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12126 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12127 std::string*.
12128
12129 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12130
12131 * gdbtypes.h (sect_offset): Change type to uint64_t.
12132 (sect_offset_str): New function.
12133 * dwarf2read.c (create_addrmap_from_aranges): Use
12134 sect_offset_str.
12135 (error_check_comp_unit_head): Likewise.
12136 (create_debug_type_hash_table): Likewise.
12137 (read_cutu_die_from_dwo): Likewise.
12138 (init_cutu_and_read_dies): Likewise.
12139 (init_cutu_and_read_dies_no_follow): Likewise.
12140 (process_psymtab_comp_unit_reader): Likewise.
12141 (partial_die_parent_scope): Likewise.
12142 (peek_die_abbrev): Likewise.
12143 (process_queue): Likewise.
12144 (dwarf2_physname): Likewise.
12145 (read_namespace_alias): Likewise.
12146 (read_import_statement): Likewise.
12147 (create_dwo_cu_reader): Likewise.
12148 (create_cus_hash_table): Likewise.
12149 (lookup_dwo_cutu): Likewise.
12150 (inherit_abstract_dies): Likewise.
12151 (read_func_scope): Likewise.
12152 (read_call_site_scope): Likewise.
12153 (dwarf2_add_member_fn): Likewise.
12154 (read_common_block): Likewise.
12155 (read_module_type): Likewise.
12156 (read_typedef): Likewise.
12157 (read_subrange_type): Likewise.
12158 (load_partial_dies): Likewise.
12159 (read_partial_die): Likewise.
12160 (find_partial_die): Likewise.
12161 (read_str_index): Likewise.
12162 (dwarf2_string_attr): Likewise.
12163 (build_error_marker_type): Likewise.
12164 (lookup_die_type): Likewise.
12165 (dump_die_shallow): Likewise.
12166 (follow_die_ref): Likewise.
12167 (dwarf2_fetch_die_loc_sect_off): Likewise.
12168 (dwarf2_fetch_constant_bytes): Likewise.
12169 (follow_die_sig): Likewise.
12170 (get_signatured_type): Likewise.
12171 (get_DW_AT_signature_type): Likewise.
12172 (dwarf2_find_containing_comp_unit): Likewise.
12173 (set_die_type): Likewise.
12174
12175 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12176
12177 * arch/aarch64.c: Include "common-defs.h".
12178 * arch/amd64.c: Likewise.
12179 * arch/i386.c: Likewise.
12180
12181 2018-02-21 Tom Tromey <tom@tromey.com>
12182
12183 * value.h: (extract_field_op): Update.
12184 * eval.c (extract_field_op): Return a const char *.
12185 * expression.h (parse_expression_for_completion): Update.
12186 * completer.c (complete_expression): Update.
12187 (add_struct_fields): Make fieldname const.
12188 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12189 (mark_completion_tag, parse_exp_in_context_1): Update.
12190 (parse_expression_for_completion): Change "name" to
12191 unique_xmalloc_ptr*.
12192
12193 2018-02-21 Tom Tromey <tom@tromey.com>
12194
12195 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12196
12197 2018-02-21 Yao Qi <yao.qi@linaro.org>
12198
12199 * avr-tdep.c (avr_read_pc): Change parameter type to
12200 readable_regcache.
12201 * gdbarch.sh (read_pc): Likewise.
12202 * gdbarch.c: Re-generated.
12203 * gdbarch.h: Re-generated.
12204 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12205 readable_regcache.
12206 * ia64-tdep.c (ia64_read_pc): Likewise.
12207 * mips-tdep.c (mips_read_pc): Likewise.
12208 * spu-tdep.c (spu_read_pc): Likewise.
12209
12210 2018-02-21 Yao Qi <yao.qi@linaro.org>
12211
12212 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12213 * regcache-dump.c: New file.
12214 * regcache.c: Move register_dump to regcache-dump.c.
12215 (maintenance_print_registers): Likewise.
12216 (maintenance_print_raw_registers): Likewise.
12217 (maintenance_print_cooked_registers): Likewise.
12218 (maintenance_print_register_groups): Likewise.
12219 (maintenance_print_remote_registers): Likewise.
12220 (_initialize_regcache): Likewise.
12221 * regcache.h (register_dump): Moved from regcache.c.
12222
12223 2018-02-21 Yao Qi <yao.qi@linaro.org>
12224
12225 * regcache.c (regcache::regcache): Update.
12226 (regcache::invalidate): Move it to detached_regcache::invalidate.
12227 (get_thread_arch_aspace_regcache): Update.
12228 (regcache::raw_update): Update.
12229 (regcache::cooked_read): Remove some code.
12230 (regcache::cooked_read_value): Likewise.
12231 (regcache::raw_write): Remove assert on m_readonly_p.
12232 (regcache::raw_supply_integer): Move it to
12233 detached_regcache::raw_supply_integer.
12234 (regcache::raw_supply_zeroed): Likewise.
12235 * regcache.h (detached_regcache) <raw_supply_integer>: New
12236 declaration.
12237 <raw_supply_zeroed, invalidate>: Likewise.
12238 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12239 <invalidate>: Likewise.
12240 <m_readonly_p>: Removed.
12241
12242 2018-02-21 Yao Qi <yao.qi@linaro.org>
12243
12244 * infcmd.c (get_return_value): Let stop_regs point to
12245 get_current_regcache.
12246 * regcache.c (regcache::regcache): Remove.
12247 (register_dump_reg_buffer): New class.
12248 (regcache_print): Adjust.
12249 * regcache.h (regcache): Remove constructors.
12250
12251 2018-02-21 Yao Qi <yao.qi@linaro.org>
12252
12253 * regcache.c (class register_dump): New class.
12254 (register_dump_regcache, register_dump_none): New class.
12255 (register_dump_remote, register_dump_groups): New class.
12256 (regcache_print): Update.
12257 * regcache.h (regcache_dump_what): Move it to regcache.c.
12258 (regcache) <dump>: Remove.
12259
12260 2018-02-21 Yao Qi <yao.qi@linaro.org>
12261
12262 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12263 reg_buffer_rw *.
12264 (jit_unwind_reg_set_impl): Call raw_supply.
12265 (jit_frame_sniffer): Use reg_buffer_rw.
12266 * record-full.c (record_full_core_regbuf): Change its type.
12267 (record_full_core_open_1): Use reg_buffer_rw.
12268 (record_full_close): Likewise.
12269 (record_full_core_fetch_registers): Use regcache->raw_supply.
12270 (record_full_core_store_registers): Likewise.
12271 * regcache.c (regcache::get_register_status): Move it to
12272 reg_buffer.
12273 (regcache_raw_set_cached_value): Remove.
12274 (regcache::raw_set_cached_value): Remove.
12275 (regcache::raw_write): Call raw_supply.
12276 (regcache::raw_supply): Move it to reg_buffer_rw.
12277 * regcache.h (regcache_raw_set_cached_value): Remove.
12278 (reg_buffer_rw): New class.
12279
12280 2018-02-21 Yao Qi <yao.qi@linaro.org>
12281
12282 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12283 readonly_detached_regcache.
12284 (dummy_frame_prev_register): Use regcache->cooked_read.
12285 * frame.c (frame_save_as_regcache): Change return type.
12286 (frame_pop): Update.
12287 * frame.h (frame_save_as_regcache): Update declaration.
12288 * inferior.h (get_infcall_suspend_state_regcache): Update
12289 declaration.
12290 * infrun.c (infcall_suspend_state) <registers>: use
12291 readonly_detached_regcache.
12292 (save_infcall_suspend_state): Don't use regcache_dup.
12293 (get_infcall_suspend_state_regcache): Change return type.
12294 * linux-fork.c (struct fork_info) <savedregs>: Change to
12295 readonly_detached_regcache.
12296 <pc>: New field.
12297 (fork_save_infrun_state): Don't use regcache_dup.
12298 (info_checkpoints_command): Adjust.
12299 * mi/mi-main.c (register_changed_p): Update declaration.
12300 (mi_cmd_data_list_changed_registers): Use
12301 readonly_detached_regcache.
12302 (register_changed_p): Change parameter type to
12303 readonly_detached_regcache.
12304 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12305 readonly_detached_regcache.
12306 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12307 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12308 New.
12309 (regcache::save): Move it to reg_buffer.
12310 (regcache::restore): Change parameter type.
12311 (regcache_dup): Remove.
12312 * regcache.h (reg_buffer) <save>: New method.
12313 (readonly_detached_regcache): New class.
12314 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12315 readonly_detached_regcache.
12316 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12317
12318 2018-02-21 Yao Qi <yao.qi@linaro.org>
12319
12320 * frame.c (frame_save_as_regcache): Use regcache method save.
12321 (frame_pop): Use regcache method restore.
12322 * infrun.c (restore_infcall_suspend_state): Likewise.
12323 * linux-fork.c (fork_load_infrun_state): Likewise.
12324 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12325 save.
12326 * regcache.c (regcache_save): Remove.
12327 (regcache::restore): More asserts.
12328 (regcache_cpy): Remove.
12329 * regcache.h (regcache_save): Remove the declaration.
12330 (regcache::restore): Move from private to public.
12331 Remove the friend declaration of regcache_cpy.
12332 (regcache_cpy): Remove declaration.
12333
12334 2018-02-21 Yao Qi <yao.qi@linaro.org>
12335
12336 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12337 parameter type to 'readable_regcache *'.
12338 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12339 * arm-tdep.c (arm_neon_quad_read): Likewise.
12340 (arm_pseudo_read): Likewise.
12341 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12342 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12343 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12344 * gdbarch.c: Re-generated.
12345 * gdbarch.h: Re-generated.
12346 * gdbarch.sh (pseudo_register_read): Change parameter type to
12347 'readable_regcache *'.
12348 (pseudo_register_read_value): Likewise.
12349 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12350 (h8300_pseudo_register_read): Likewise.
12351 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12352 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12353 (i386_pseudo_register_read_into_value): Likewise.
12354 (i386_pseudo_register_read_value): Likewise.
12355 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12356 declaration.
12357 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12358 * m32c-tdep.c (m32c_raw_read): Likewise.
12359 (m32c_read_flg): Likewise.
12360 (m32c_banked_register): Likewise.
12361 (m32c_banked_read): Likewise.
12362 (m32c_sb_read): Likewise.
12363 (m32c_part_read): Likewise.
12364 (m32c_cat_read): Likewise.
12365 (m32c_r3r2r1r0_read): Likewise.
12366 (m32c_pseudo_register_read): Likewise.
12367 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12368 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12369 (mep_pseudo_cr64_read): Likewise.
12370 (mep_pseudo_register_read): Likewise.
12371 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12372 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12373 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12374 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12375 (regcache::cooked_read): Likewise.
12376 (regcache::cooked_read_value): Likewise.
12377 (regcache_cooked_read_signed):
12378 (regcache::cooked_read): Likewise.
12379 * regcache.h (readable_regcache): New class.
12380 (regcache): Inherit readable_regcache. Move some methods to
12381 readable_regcache.
12382 * rl78-tdep.c (rl78_pseudo_register_read): Change
12383 parameter type to 'readable_regcache *'.
12384 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12385 (e500_pseudo_register_read): Change parameter type to
12386 'readable_regcache *'.
12387 (dfp_pseudo_register_read): Likewise.
12388 (vsx_pseudo_register_read): Likewise.
12389 (efpr_pseudo_register_read): Likewise.
12390 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12391 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12392 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12393 (sh64_pseudo_register_read): Likewise.
12394 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12395 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12396 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12397 (spu_pseudo_register_read): Likewise.
12398 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12399 (xtensa_pseudo_register_read): Likewise.
12400
12401 2018-02-21 Yao Qi <yao.qi@linaro.org>
12402
12403 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12404 (regcache::arch): Move it to reg_buffer::arch.
12405 (regcache::register_buffer): Likewise.
12406 (regcache::assert_regnum): Likewise.
12407 (regcache::num_raw_registers): Likewise.
12408 * regcache.h (reg_buffer): New class.
12409 (regcache): Inherit reg_buffer.
12410
12411 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12412
12413 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12414 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12415
12416 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12417
12418 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12419
12420 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12421
12422 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12423 (SFILES): Remove common/*.c files.
12424 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12425 * common/common.host: Add common reference.
12426 * configure.ac: Likewise.
12427 * configure: Regenerate.
12428
12429 2018-02-16 Yao Qi <yao.qi@linaro.org>
12430
12431 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12432 (block_initialize_namespace): Use new.
12433 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12434 (dwarf2_free_objfile): Use delete.
12435 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12436 (copy_type_recursive): Use new.
12437 * gdb_obstack.h (allocate_on_obstack): New.
12438
12439 2018-02-15 Yao Qi <yao.qi@linaro.org>
12440
12441 PR gdb/22849
12442 * inferior.c (exit_inferior_1): Reset inf->control.
12443
12444 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12445
12446 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12447 declaration.
12448
12449 2018-02-14 Pedro Alves <palves@redhat.com>
12450
12451 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12452 frame_cleanup_after_sniffer on exception.
12453
12454 2018-02-14 Tom Tromey <tom@tromey.com>
12455
12456 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12457 const.
12458 (solib_bfd_open): Make pathname const.
12459 * solib.c (solib_bfd_open): Make pathname const.
12460 * solib-spu.c (spu_bfd_fopen): Make name const.
12461 (spu_bfd_open): Make pathname const.
12462 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12463 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12464
12465 2018-02-14 Tom Tromey <tom@tromey.com>
12466
12467 * symfile.c (symfile_bfd_open): Update.
12468 * source.h (openp, source_full_path_of, find_and_open_source):
12469 Change argument type to unique_xmalloc_ptr.
12470 * source.c (openp): Take a unique_xmalloc_ptr.
12471 (source_full_path_of, find_and_open_source): Likewise.
12472 (open_source_file, symtab_to_fullname): Update.
12473 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12474 unique_xmalloc_ptr.
12475 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12476 (exec_file_find): Update.
12477 * psymtab.c (psymtab_to_fullname): Update.
12478 * nto-tdep.h (nto_find_and_open_solib): Update.
12479 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12480 unique_xmalloc_ptr.
12481 * exec.c (exec_file_attach): Update.
12482 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12483 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12484
12485 2018-02-14 Tom Tromey <tom@tromey.com>
12486
12487 * solib.c: Include source.h.
12488 * nto-tdep.c: Include source.h.
12489 * mi/mi-cmd-env.c: Include source.h.
12490 * infcmd.c: Include source.h.
12491 * exec.c: Include source.h.
12492 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12493 (add_path, directory_switch, source_path, init_source_path): Move
12494 declarations...
12495 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12496 (add_path, directory_switch, source_path, init_source_path):
12497 ...here.
12498
12499 2018-02-14 Tom Tromey <tom@tromey.com>
12500
12501 * solist.h (exec_file_find, solib_find): Return
12502 unique_xmalloc_ptr.
12503 (solib_bfd_fopen): Take a const char *.
12504 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12505 (exec_file_find, solib_find): Likewise.
12506 (solib_bfd_fopen): Do not take ownership of "pathname".
12507 (solib_bfd_open): Use unique_xmalloc_ptr.
12508 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12509 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12510 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12511 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12512
12513 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12514
12515 * ada-lang.c (name_match_type_from_name): Remove reference to
12516 ada_name_for_lookup in function's documentation.
12517 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12518
12519 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12520
12521 * defs.h (enum openp_flags): New enum.
12522 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12523 Move to enum openp_flags.
12524 (openp_flags): New enum flags.
12525 (openp): Change parameter type to openp_flags.
12526 * source.c (openp): Change parameter type to openp_flags.
12527 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12528 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12529
12530 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12531
12532 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12533 per-command.
12534
12535 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12536
12537 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12538 into...
12539 (class dwarf2_queue_guard): ...the destructor of this new class.
12540 (dw2_do_instantiate_symtab): Create instance of the new class
12541 dwarf2_queue_guard, remove cleanup.
12542
12543 2018-02-09 Tom Tromey <tom@tromey.com>
12544
12545 * source.c (find_source_lines): Don't reference past the end of
12546 the vector.
12547
12548 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12549
12550 * remote.c (remote_btrace_maybe_reopen): Change error message.
12551 * btrace.c (btrace_enable): Likewise.
12552 (parse_xml_btrace): Likewise.
12553 (parse_xml_btrace_conf): Likewise.
12554
12555 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12556
12557 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12558 (linux_enable_pt, linux_enable_bts): Call
12559 diagnose_perf_event_open_fail.
12560
12561 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12562
12563 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12564 Remove parameter and change return type. Update callers. Move it.
12565 (linux_enable_bts, linux_enable_pt): Improve error message.
12566 (linux_enable_pt): Remove zero buffer size check.
12567 (linux_enable_btrace): Improve error messages. Remove NULL return
12568 check.
12569
12570 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12571
12572 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12573 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12574 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12575 (linux_supports_pt, linux_supports_btrace): Remove.
12576 (linux_enable_bts): Call cpu_supports_bts.
12577 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12578 * remote.c (remote_supports_btrace): Remove.
12579 (init_remote_ops): Remove remote_supports_btrace.
12580 * target-delegates.c: Regenerated.
12581 * target.c (target_supports_btrace): Remove.
12582 * target.h (target_ops) <to_supports_btrace>: Remove
12583 (target_supports_btrace): Remove.
12584 * x86-linux-nat.c (x86_linux_create_target): Remove
12585 linux_supports_btrace.
12586
12587 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12588
12589 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12590 btrace failed.
12591 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12592 exception and use message in own exception.
12593
12594 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12595
12596 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12597 (perf_event_pt_event_type): Use gdb_file_up.
12598 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12599 scoped_fd, and scoped_mmap.
12600
12601 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12602
12603 * common/scoped_mmap.h: New.
12604 * unittests/scoped_mmap-selftest.c: New.
12605 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12606 unittests/scoped_mmap-selftest.c.
12607
12608 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12609
12610 * common/scoped_fd.h: New.
12611 * unittests/scoped_fd-selftest.c: New.
12612 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12613 unittests/scoped_fd-selftest.c.
12614
12615 2018-02-09 Tom Tromey <tom@tromey.com>
12616
12617 * auto-load.c (auto_load_section_scripts): Use
12618 gdb::unique_xmalloc_ptr.
12619
12620 2018-02-09 Tom Tromey <tom@tromey.com>
12621
12622 * auto-load.c (execute_script_contents): Use std::string.
12623
12624 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12625
12626 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12627 Python function, rather than a new command.
12628
12629 2018-02-08 Tom Tromey <tom@tromey.com>
12630
12631 * solib.c (solib_find_1): Use std::string.
12632 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12633
12634 2018-02-08 Tom Tromey <tom@tromey.com>
12635
12636 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12637
12638 2018-02-08 Tom Tromey <tom@tromey.com>
12639
12640 * source.c (find_source_lines): Use gdb::def_vector.
12641
12642 2018-02-08 Tom Tromey <tom@tromey.com>
12643
12644 * macrocmd.c (struct temporary_macro_definition): New.
12645 (macro_define_command): Use temporary_macro_definition. Remove
12646 cleanups.
12647 (free_macro_definition_ptr): Remove.
12648
12649 2018-02-08 Tom Tromey <tom@tromey.com>
12650
12651 * macroexp.c (maybe_expand): Use std::string.
12652
12653 2018-02-08 Tom Tromey <tom@tromey.com>
12654
12655 * macroexp.c (struct macro_buffer): Add initializers for some
12656 members.
12657 (init_buffer, init_shared_buffer, free_buffer)
12658 (free_buffer_return_text): Remove.
12659 (macro_buffer): New constructors.
12660 (~macro_buffer): New destructor.
12661 (macro_buffer::set_shared): New method.
12662 (macro_buffer::resize_buffer, macro_buffer::appendc)
12663 (macro_buffer::appendmem): Now methods, not free functions.
12664 (set_token, append_tokens_without_splicing, stringify)
12665 (macro_stringify): Update.
12666 (gather_arguments): Change return type. Remove argc_p argument,
12667 add args_ptr argument. Use std::vector.
12668 (substitute_args): Remove argc argument. Accept std::vector.
12669 (expand): Update. Use std::vector.
12670 (scan, macro_expand, macro_expand_next): Update.
12671
12672 2018-02-08 Tom Tromey <tom@tromey.com>
12673
12674 * symtab.c (default_collect_symbol_completion_matches_break_on):
12675 Use unique_xmalloc_ptr.
12676 * macroscope.h: (sal_macro_scope, user_macro_scope)
12677 (default_macro_scope): Return unique_xmalloc_ptr.
12678 * macroscope.c (sal_macro_scope, user_macro_scope)
12679 (default_macro_scope): Return unique_xmalloc_ptr.
12680 * macroexp.h (macro_expand, macro_expand_once): Return
12681 unique_xmalloc_ptr.
12682 * macroexp.c (macro_expand, macro_expand_once): Return
12683 unique_xmalloc_ptr.
12684 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12685 (info_macro_command, info_macros_command): Use
12686 unique_xmalloc_ptr.
12687 * compile/compile-c-support.c (write_macro_definitions): Use
12688 unique_xmalloc_ptr.
12689 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12690
12691 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12692
12693 * value.c (value_static_field): Assign field type instead of
12694 containing type when returning an optimized out value.
12695
12696 2018-02-06 Yao Qi <yao.qi@linaro.org>
12697
12698 * ft32-tdep.c (ft32_read_pc): Remove.
12699 (ft32_write_pc): Remove.
12700 (ft32_gdbarch_init): Update.
12701 * m32r-tdep.c (m32r_read_pc): Remove.
12702 (m32r_gdbarch_init): Update.
12703 * mep-tdep.c (mep_read_pc): Remove.
12704 (mep_gdbarch_init): Update.
12705 * microblaze-tdep.c (microblaze_write_pc): Remove.
12706 (microblaze_gdbarch_init): Update.
12707 * mn10300-tdep.c (mn10300_read_pc): Remove.
12708 (mn10300_write_pc): Remove.
12709 (mn10300_gdbarch_init): Update.
12710 * moxie-tdep.c (moxie_read_pc): Remove.
12711 (moxie_write_pc): Remove.
12712 (moxie_gdbarch_init): Update.
12713
12714 2018-02-06 Yao Qi <yao.qi@linaro.org>
12715
12716 * expprint.c (print_subexp_standard): Handle
12717 OP_F77_UNDETERMINED_ARGLIST.
12718 (dump_subexp_body_standard): Likewise.
12719
12720 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12721
12722 * target-descriptions.c (tdesc_element_visitor) Add empty
12723 implementations.
12724 (tdesc_type): Move make_gdb_type from here.
12725 (tdesc_type_builtin): Likewise.
12726 (tdesc_type_vector): Likewise.
12727 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12728 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12729 (make_gdb_type_union): Likewise.
12730 (make_gdb_type_flags): Likewise.
12731 (make_gdb_type_enum): Likewise.
12732 (make_gdb_type): New function.
12733 (tdesc_register_type): Use static make_gdb_type.
12734
12735 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12736
12737 * infcmd.c (default_print_one_register_info): Align natural-format
12738 column values consistently one under another.
12739 (pad_to_column): New function.
12740
12741 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12742
12743 * dwarf2read.c (dwarf2_physname): Move commment.
12744
12745 2018-02-01 Leszek Swirski <leszeks@google.com>
12746
12747 * varobj.c (varobj_formatted_print_options): Allow recursive
12748 pretty printing if pretty printing is enabled.
12749
12750 2018-02-01 Leszek Swirski <leszeks@google.com>
12751
12752 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12753 names after a structop as a filename.
12754
12755 2018-02-01 Yao Qi <yao.qi@linaro.org>
12756
12757 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12758 (arm_record_coproc_data_proc): Likewise.
12759
12760 2018-02-01 Yao Qi <yao.qi@linaro.org>
12761
12762 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12763
12764 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12765
12766 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12767 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12768
12769 2018-01-31 Pedro Alves <palves@redhat.com>
12770
12771 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12772 * inflow.c (child_terminal_save_inferior): Wrap reference to
12773 tcgetpgrp in HAVE_TERMIOS_H.
12774 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12775 _WIN32.
12776 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12777 always iterate over all inferiors.
12778 (gdbsim_cntrl_c): Adjust.
12779 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12780
12781 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12782
12783 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12784 index type is objfile-owned if the element type is as well.
12785
12786 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12787
12788 GDB 8.1 released.
12789
12790 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12791
12792 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12793 "features/s390x-linux64.c".
12794 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12795 s390_linux32 and s390x_linux64.
12796 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12797 default tdesc.
12798 * s390-tdep.c: Include "features/s390-linux32.c" and
12799 "features/s390x-linux64.c".
12800 (s390_tdesc_valid): Add check for tdesc_has_registers.
12801 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12802 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12803 tdesc_s390x_linux64.
12804 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12805 tdesc_s390x_linux64 to...
12806 * s390-tdep.h: ...here.
12807
12808 2018-01-30 Pedro Alves <palves@redhat.com>
12809
12810 PR gdb/13211
12811 * config.in, configure: Regenerate.
12812 * configure.ac: Check for getpgid.
12813 * go32-nat.c (go32_pass_ctrlc): New.
12814 (go32_target): Install it.
12815 * inf-child.c (inf_child_target): Install
12816 child_terminal_save_inferior, child_pass_ctrlc and
12817 child_interrupt.
12818 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12819 (inf_ptrace_target): No longer install it.
12820 * infcmd.c (interrupt_target_1): Adjust.
12821 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12822 (child_interrupt): Declare.
12823 (inferior::terminal_state): New.
12824 * inflow.c (struct terminal_info): Update comments.
12825 (inferior_process_group): Delete.
12826 (terminal_is_ours): Delete.
12827 (gdb_tty_state): New.
12828 (child_terminal_init): Adjust.
12829 (is_gdb_terminal, sharing_input_terminal_1)
12830 (sharing_input_terminal): New functions.
12831 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
12832 Set the process's actual process group in the foreground if
12833 possible. Handle is_ours_for_output/is_ours distinction. Don't
12834 mark terminal as the inferior's if not sharing GDB's terminal.
12835 Don't check attach_flag.
12836 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12837 pass down a target_terminal_state.
12838 (child_terminal_save_inferior): New, factored out from ...
12839 (child_terminal_ours_1): ... this. Handle
12840 target_terminal_state::is_ours_for_output.
12841 (child_interrupt, child_pass_ctrlc): New.
12842 (inflow_inferior_exit): Clear the inferior's terminal_state.
12843 (copy_terminal_info): Copy the inferior's terminal state.
12844 (_initialize_inflow): Remove reference to terminal_is_ours.
12845 * inflow.h (inferior_process_group): Delete.
12846 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12847 * procfs.c (procfs_target): Don't install procfs_interrupt.
12848 (procfs_interrupt): Delete.
12849 * remote.c (remote_serial_quit_handler): Adjust.
12850 (remote_interrupt): Remove ptid parameter. Adjust.
12851 * target-delegates.c: Regenerate.
12852 * target.c: Include "terminal.h".
12853 (target_terminal::terminal_state): Rename to ...
12854 (target_terminal::m_terminal_state): ... this.
12855 (target_terminal::init): Adjust.
12856 (target_terminal::inferior): Adjust to per-inferior
12857 terminal_state.
12858 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12859 (target_terminal::ours, target_terminal::ours_for_output): Use
12860 target_terminal_is_ours_kind.
12861 (target_interrupt): Remove ptid parameter. Adjust.
12862 (default_target_pass_ctrlc): Adjust.
12863 * target.h (target_ops::to_terminal_save_inferior): New field.
12864 (target_ops::to_interrupt): Remove ptid_t parameter.
12865 (target_interrupt): Remove ptid_t parameter. Update comment.
12866 (target_pass_ctrlc): Update comment.
12867 * target/target.h (target_terminal_state): New scoped enum,
12868 factored out of ...
12869 (target_terminal::terminal_state): ... here.
12870 (target_terminal::inferior): Update comments.
12871 (target_terminal::restore_inferior): New.
12872 (target_terminal::is_inferior, target_terminal::is_ours)
12873 (target_terminal::is_ours_for_output): Adjust.
12874 (target_terminal::scoped_restore_terminal_state): Adjust to
12875 rename, and call restore_inferior() instead of inferior().
12876 (target_terminal::scoped_restore_terminal_state::m_state): Change
12877 type.
12878 (target_terminal::terminal_state): Rename to ...
12879 (target_terminal::m_terminal_state): ... this and change type.
12880
12881 2018-01-30 Pedro Alves <palves@redhat.com>
12882
12883 * linux-nat.c (wait_for_signal): New function.
12884 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12885 directly.
12886 (async_terminal_is_ours)
12887 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12888 (linux_nat_add_target): Don't override
12889 to_terminal_inferior/to_terminal_ours.
12890
12891 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
12892
12893 * remote.c (remote_follow_fork): Don't call "detach_inferior".
12894
12895 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
12896
12897 * dwarf2read.c (free_dwo_files): Add forward-declaration.
12898 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12899 dwarf2_per_objfile_free here.
12900 (dwarf2_per_objfile_free): Remove.
12901 (_initialize_dwarf2_read): Don't register
12902 dwarf2_per_objfile_free as a registry cleanup.
12903
12904 2018-01-27 Eli Zaretskii <eliz@gnu.org>
12905
12906 Avoid compilation errors in MinGW native builds
12907
12908 The error is triggered by including python-internal.h, and the
12909 error message is:
12910
12911 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12912 from build-gnulib/import/math.h:27,
12913 from d:/usr/Python26/include/pyport.h:235,
12914 from d:/usr/Python26/include/Python.h:58,
12915 from python/python-internal.h:94,
12916 from python/py-arch.c:24:
12917 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12918 using ::hypot;
12919 ^~~~~
12920
12921 This happens because Python headers define 'hypot' to expand t
12922 '_hypot' in the Windows builds.
12923 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12924 'hypoth'. This avoids a compilation error.
12925
12926 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12927
12928 * MAINTAINERS (Write After Approval): Fix ordering.
12929
12930 2018-01-26 Alan Hayward <alan.hayward@arm.com>
12931
12932 * MAINTAINERS (Write After Approval): Add Alan Hayward.
12933
12934 2018-01-26 Alan Modra <amodra@gmail.com>
12935
12936 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12937 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12938 Remove nop. Make const. Comment.
12939 (powerpc32_plt_stub_so_2): New.
12940 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12941 Correct count. Update uses.
12942 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12943 Move common code reading PLT entry word. Correct
12944 powerpc32_plt_stub PLT address calculation.
12945 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12946 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12947 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12948 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12949 (ppc64_standard_linkage8): Likewise.
12950 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12951 Correct insns description.
12952 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12953
12954 2018-01-24 Pedro Alves <palves@redhat.com>
12955
12956 GCC PR libstdc++/83906
12957 * gdbtypes.c (operator==(const dynamic_prop &,
12958 const dynamic_prop &)): New.
12959 (operator==(const range_bounds &, const range_bounds &)): New.
12960 (check_types_equal): Use them instead of memcmp.
12961 * gdbtypes.h (operator==(const dynamic_prop &,
12962 const dynamic_prop &)): Declare.
12963 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12964 (operator==(const range_bounds &, const range_bounds &)): Declare.
12965 (operator!=(const range_bounds &, const range_bounds &)): Declare.
12966
12967 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12968
12969 * s390-linux-tdep.c (s390_record_address_mask)
12970 (s390_record_calc_disp_common, s390_record_calc_disp)
12971 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12972 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12973 (s390_process_record): Move to s390-tdep.c.
12974 (s390_linux_init_abi_any): Adjust.
12975 * s390-tdep.c (s390_record_address_mask)
12976 (s390_record_calc_disp_common, s390_record_calc_disp)
12977 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12978 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12979 (s390_process_record): Moved from s390-linux-tdep.c
12980 (s390_gdbarch_init): Adjust.
12981
12982 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12983
12984 * s390-linux-nat.c (s390-tdep.h): New include.
12985 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12986 (HFILES_NO_SRCDIR): Add s390-tdep.h.
12987 (ALLDEPFILES): Add s390-tdep.c.
12988 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12989 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12990 * s390-tdep.h: ...this. New file.
12991 * s390-linux-tdep.c (s390-tdep.h): New include.
12992 (_initialize_s390_tdep): Rename to...
12993 (_initialize_s390_linux_tdep): ...this and adjust.
12994 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12995 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12996 s390-tdep.h.
12997 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12998 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12999 (s390_is_partial_instruction, s390_software_single_step)
13000 (is_non_branch_ril, s390_displaced_step_copy_insn)
13001 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13002 (s390_prologue_data, s390_addr, s390_store, s390_load)
13003 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13004 (s390_register_call_saved, s390_guess_tracepoint_registers)
13005 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13006 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13007 (s390_pseudo_register_name, s390_pseudo_register_type)
13008 (s390_pseudo_register_read, s390_pseudo_register_write)
13009 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13010 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13011 (s390_addr_bits_remove, s390_address_class_type_flags)
13012 (s390_address_class_type_flags_to_name)
13013 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13014 (s390_function_arg_float, s390_function_arg_vector)
13015 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13016 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13017 (s390_frame_align, s390_register_return_value, s390_return_value)
13018 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13019 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13020 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13021 (s390_trad_frame_prev_register, s390_unwind_cache)
13022 (s390_prologue_frame_unwind_cache)
13023 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13024 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13025 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13026 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13027 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13028 (s390_frame_base_address, s390_local_base_address)
13029 (s390_frame_base, s390_gcc_target_options)
13030 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13031 (s390_validate_reg_range, s390_tdesc_valid)
13032 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13033 * s390-tdep.c: ...this. New file.
13034
13035 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13036
13037 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13038 (s390_process_record, s390_gdbarch_tdep_alloc)
13039 (s390_linux_init_abi_any): Use/set new hook.
13040
13041 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13042
13043 * s390-linux-tdep.c (osabi.h): New include.
13044 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13045 (s390_linux_init_abi_any): New functions.
13046 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13047
13048 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13049
13050 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13051 tdesc_has_registers check
13052
13053 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13054
13055 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13056 (s390_validate_reg_range): New macro.
13057 (s390_gdbarch_init): Adjust.
13058
13059 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13060
13061 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13062 (s390_gdbarch_tdep_alloc): Adjust.
13063 (s390_gdbarch_init): Adjust.
13064
13065 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13066
13067 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13068 <have_tdb>: Change type to bool.
13069 (s390_gdbarch_tdep_alloc): Adjust.
13070 (s390_gdbarch_init): Adjust.
13071
13072 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13073
13074 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13075 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13076 (s390_gdbarch_tdep_alloc): New function.
13077 (s390_gdbarch_init): Allocate tdep at start and use its fields
13078 instead of separate variables.
13079
13080 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13081
13082 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13083 when looking for cached gdbarch and add comment for remaining.
13084
13085 2018-01-22 Pedro Alves <palves@redhat.com>
13086 Sergio Durigan Junior <sergiodj@redhat.com>
13087
13088 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13089 case.
13090
13091 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13092
13093 * MAINTAINERS: Update my company e-mail address.
13094
13095 2018-01-22 Yao Qi <yao.qi@linaro.org>
13096
13097 * regcache.c (cooked_write_test): New function.
13098 (_initialize_regcache): Register the test.
13099
13100 2018-01-22 Yao Qi <yao.qi@linaro.org>
13101
13102 * ia64-tdep.c (ia64_pseudo_register_read): Call
13103 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13104 * m32c-tdep.c (m32c_cat_read): Likewise.
13105 (m32c_r3r2r1r0_read): Likewise.
13106 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13107 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13108
13109 2018-01-22 Yao Qi <yao.qi@linaro.org>
13110
13111 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13112 method raw_read instead of regcache_raw_read.
13113 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13114 * arm-tdep.c (arm_neon_quad_read): Likewise.
13115 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13116 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13117 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13118 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13119 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13120 (i386_pseudo_register_read_into_value): Likewise.
13121 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13122 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13123 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13124 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13125 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13126 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13127 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13128 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13129 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13130
13131 2018-01-22 Yao Qi <yao.qi@linaro.org>
13132
13133 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13134 * configure.tgt: Remove target mt.
13135 * mt-tdep.c: Remove.
13136 * regcache.c (cooked_read_test): Remove the check for mt.
13137
13138 2018-01-22 Yao Qi <yao.qi@linaro.org>
13139
13140 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13141 instead of gdbarch_pseudo_register_read_value.
13142
13143 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13144
13145 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13146 language is Ada.
13147
13148 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13149
13150 * linespec.c (create_sals_line_offset): Remove code that preserved
13151 the symtab_and_line's line number.
13152
13153 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13154
13155 * varobj.c (varobj_create): Don't set valid_block when creating a
13156 floating varobj.
13157
13158 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13159
13160 * varobj.c (varobj_create): Remove out of date comment.
13161
13162 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13163
13164 PR mi/20395
13165 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13166 updating innermost block.
13167 * parse.c (innermost_block_tracker::update): Take extra type
13168 parameter, and check types match before updating innermost block.
13169 (write_dollar_variable): Update innermost block for registers.
13170 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13171 (innermost_block_tracker::innermost_block_tracker): Initialise
13172 m_types member.
13173 (innermost_block_tracker::reset): Take type parameter.
13174 (innermost_block_tracker::update): Take type parameter, and pass
13175 type through as needed.
13176 (innermost_block_tracker::m_types): New member.
13177 * varobj.c (varobj_create): Pass type when reseting innermost
13178 block.
13179
13180 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13181
13182 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13183 * ada-lang.c (resolve_subexp): Likewise.
13184 * breakpoint.c (set_breakpoint_condition) Likewise.
13185 (watch_command_1) Likewise.
13186 * c-exp.y (variable): Likewise.
13187 * d-exp.y (PrimaryExpression): Likewise.
13188 * f-exp.y (variable): Likewise.
13189 * go-exp.y (variable): Likewise.
13190 * m2-exp.y (variable): Likewise.
13191 * objfiles.c (objfile::~objfile): Likewise.
13192 * p-exp.y (variable): Likewise.
13193 * parse.c (innermost_block): Change type.
13194 * parser-defs.h (class innermost_block_tracker): New.
13195 (innermost_block): Change to innermost_block_tracker.
13196 * printcmd.c (display_command): Switch to innermost_block API.
13197 (do_one_display): Likewise.
13198 * rust-exp.y (do_one_display): Likewise.
13199 * symfile.c (clear_symtab_users): Likewise.
13200 * varobj.c (varobj_create): Switch to innermost_block API, replace
13201 use of innermost_block with block stored on varobj object.
13202
13203 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13204
13205 * expression.h (innermost_block): Remove declaration.
13206 * varobj.c: Add 'parser-defs.h' include.
13207
13208 2018-01-19 Tom Tromey <tom@tromey.com>
13209
13210 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13211 symbols in the static and global blocks.
13212
13213 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13214
13215 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13216 gdb_ptrace.h, and move including gdb_wait.h ...
13217 * nat/linux-ptrace.h: ... to here.
13218
13219 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13220
13221 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13222 inf_ptrace_detach_success.
13223 (inf_ptrace_detach_success): Add inferior parameter, use it
13224 instead of inferior_ptid, pass it to detach_inferior.
13225 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13226 parameter.
13227 * inferior.c (detach_inferior): Add overload that takes an
13228 inferior object.
13229 * inferior.h (detach_inferior): Likewise.
13230 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13231 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13232 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13233
13234 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13235
13236 * target.h (struct target_ops) <to_detach>: Add inferior
13237 parameter.
13238 (target_detach): Likewise.
13239 * target.c (dispose_inferior): Pass inferior down.
13240 (target_detach): Pass inferior down. Assert that it is equal to
13241 the current inferior.
13242 * aix-thread.c (aix_thread_detach): Pass inferior down.
13243 * corefile.c (core_file_command): Pass current_inferior() down.
13244 * corelow.c (core_detach): Add inferior parameter.
13245 * darwin-nat.c (darwin_detach): Likewise.
13246 * gnu-nat.c (gnu_detach): Likewise.
13247 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13248 * infcmd.c (detach_command): Pass current_inferior() down to
13249 target_detach.
13250 * infrun.c (follow_fork_inferior): Pass parent_inf to
13251 target_detach.
13252 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13253 target_detach.
13254 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13255 * linux-thread-db.c (thread_db_detach): Likewise.
13256 * nto-procfs.c (procfs_detach): Likewise.
13257 * procfs.c (procfs_detach): Likewise.
13258 * record.c (record_detach): Likewise.
13259 * record.h (struct inferior): Forward-declare.
13260 (record_detach): Add inferior parameter.
13261 * remote-sim.c (gdbsim_detach): Likewise.
13262 * remote.c (remote_detach_1): Likewise.
13263 (remote_detach): Likewise.
13264 (extended_remote_detach): Likewise.
13265 * sol-thread.c (sol_thread_detach): Likewise.
13266 * target-debug.h (target_debug_print_inferior_p): New macro.
13267 * target-delegates.c: Re-generate.
13268 * top.c (kill_or_detach): Pass inferior down to target_detach.
13269 * windows-nat.c (windows_detach): Add inferior parameter.
13270
13271 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13272
13273 * target.h (struct target_ops) <to_detach>: Remove args
13274 parameter.
13275 (target_detach): Likewise.
13276 * target.c (dispose_inferior): Adjust.
13277 (target_detach): Remove args parameter, adjust.
13278 * aix-thread.c (aix_thread_detach): Adjust.
13279 * corefile.c (core_file_command): Adjust.
13280 * corelow.c (core_detach): Adjust.
13281 * darwin-nat.c (darwin_detach): Adjust.
13282 * gnu-nat.c (gnu_detach): Adjust.
13283 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13284 * infcmd.c (detach_command): Adjust
13285 * infrun.c (follow_fork_inferior): Adjust.
13286 (handle_vfork_child_exec_or_exit): Adjust.
13287 * linux-fork.c (linux_fork_detach): Remove args parameter.
13288 * linux-fork.h (linux_fork_detach): Likewise.
13289 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13290 * linux-thread-db.c (thread_db_detach): Likewise.
13291 * nto-procfs.c (procfs_detach): Likewise.
13292 * procfs.c (procfs_detach): Likewise.
13293 (do_detach): Remove signo parameter.
13294 * record.c (record_detach): Remove args parameter.
13295 * record.h (record_detach): Likewise.
13296 * remote-sim.c (gdbsim_detach): Likewise.
13297 * remote.c (remote_detach_1): Likewise.
13298 (remote_detach): Likewise.
13299 (extended_remote_detach): Likewise.
13300 * sol-thread.c (sol_thread_detach): Likewise.
13301 * target-delegates.c: Re-generate.
13302 * top.c (struct qt_args) <args>: Remove field.
13303 (kill_or_detach): Don't pass args.
13304 (quit_force): Don't set args.
13305 * windows-nat.c (windows_detach): Remove args parameter.
13306
13307 2018-01-19 Yao Qi <yao.qi@linaro.org>
13308
13309 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13310 (arm_linux_init_abi): Install it.
13311
13312 2018-01-19 Yao Qi <yao.qi@linaro.org>
13313
13314 * osabi.c (gdb_osabi_names): Extend the regexp for
13315 arm-linux-gnueabihf.
13316
13317 2018-01-18 Yao Qi <yao.qi@linaro.org>
13318
13319 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13320 m_abbrevs.
13321 (abbrev_table::add_abbrev): Update.
13322 (abbrev_table::lookup_abbrev): Update.
13323
13324 2018-01-18 Yao Qi <yao.qi@linaro.org>
13325
13326 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13327
13328 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13329
13330 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13331 to "std::string".
13332
13333 2018-01-17 Tom Tromey <tom@tromey.com>
13334
13335 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13336
13337 2018-01-17 Tom Tromey <tom@tromey.com>
13338
13339 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13340 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13341 (create_array_type_with_stride): Update.
13342 * dwarf2read.c (set_die_type): Update.
13343
13344 2018-01-17 Tom Tromey <tom@tromey.com>
13345
13346 * dwarf2read.c (delayed_method_info): Remove typedef.
13347 (dwarf2_cu::method_info): Now a std::vector.
13348 (add_to_method_list): Update.
13349 (free_delayed_list): Remove.
13350 (compute_delayed_physnames): Update.
13351 (process_full_comp_unit, process_full_type_unit): Clear the method
13352 list. Remove cleanups.
13353 (psymtab_include_file_name): Add name_holder parameter. Use
13354 unique_xmalloc_ptr.
13355 (dwarf_decode_lines): Update.
13356
13357 2018-01-17 Tom Tromey <tom@tromey.com>
13358 Simon Marchi <simon.marchi@ericsson.com>
13359
13360 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13361 (dwarf2_per_objfile::free_cached_comp_units)
13362 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13363 (init_cutu_and_read_dies_no_follow): Update.
13364 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13365 (dwarf2_cu::~dwarf2_cu): New.
13366 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13367 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13368
13369 2018-01-17 Tom Tromey <tom@tromey.com>
13370 Simon Marchi <simon.marchi@ericsson.com>
13371
13372 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13373 (struct die_reader_specs) <abbrev_table>: New member.
13374 (struct abbrev_table): Add constructor.
13375 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13376 <abbrev_obstack>: Now an auto_obstack.
13377 (abbrev_table_up): New typedef.
13378 (init_cu_die_reader): Add abbrev_table parameter.
13379 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13380 Add result_dwo_abbrev_table.
13381 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13382 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13383 Update.
13384 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13385 parameter.
13386 (skip_children): Update.
13387 (abbrev_table::alloc_abbrev): Rename from
13388 abbrev_table_alloc_abbrev.
13389 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13390 (abbrev_table::lookup_abbrev): Rename from
13391 abbrev_table_lookup_abbrev.
13392 (abbrev_table_read_table): Return abbrev_table_up.
13393 (abbrev_table_free, abbrev_table_free_cleanup)
13394 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13395 (load_partial_dies): Update.
13396
13397 2018-01-17 Tom Tromey <tom@tromey.com>
13398
13399 * dwarf2read.c (dwarf2_compute_name): Update comment.
13400 (read_func_scope, read_variable): Update.
13401 (new_symbol): Remove.
13402 (new_symbol_full): Rename to new_symbol.
13403
13404 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13405
13406 PR gdb/16577
13407 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13408 a warning instead of throwing an error, set section size to 0 and return
13409 NULL.
13410 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13411
13412 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13413
13414 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13415 std::string.
13416 (linux_ptrace_attach_fail_reason_string): Likewise.
13417 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13418 Likewise.
13419 (linux_ptrace_attach_fail_reason_string): Likewise.
13420 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13421
13422 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13423
13424 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13425
13426 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13427
13428 PR gdb/21559
13429 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13430 checking for fs_base/gs_base fields in struct user_regs_struct.
13431 * configure: Regenerate.
13432
13433 2018-01-17 Yao Qi <yao.qi@linaro.org>
13434
13435 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13436 function.
13437 (aarch64_linux_init_abi): Install it to gdbarch hook
13438 gcc_target_options.
13439
13440 2018-01-15 Pedro Alves <palves@redhat.com>
13441
13442 * common/signals-state-save-restore.c
13443 (save_original_signals_state): Fix typos.
13444
13445 2017-01-12 Tom Tromey <tom@tromey.com>
13446 Sergio Durigan Junior <sergiodj@redhat.com>
13447
13448 * Makefile.in (install-only): Install gdb-add-index.
13449
13450 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13451
13452 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13453
13454 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13455
13456 * infrun.c (keep_going_pass_signal): Clear step-over info when
13457 insert_breakpoints fails.
13458
13459 2018-01-11 Pedro Alves <palves@redhat.com>
13460
13461 PR gdb/22583
13462 * infrun.c (resume): Rename to ...
13463 (resume_1): ... this.
13464 (resume): Reimplement as wrapper around resume_1.
13465
13466 2018-01-11 Pedro Alves <palves@redhat.com>
13467
13468 PR remote/22597
13469 * remote.c (remote_parse_stop_reply): Default to the last-set
13470 general thread instead of to 'magic_null_ptid'.
13471
13472 2018-01-10 Pedro Alves <palves@redhat.com>
13473
13474 * language.h (language_get_symbol_name_matcher): Rename ...
13475 (get_symbol_name_matcher): ... this.
13476 * language.c (language_get_symbol_name_matcher): Ditto.
13477 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13478 callers adjusted.
13479
13480 2018-01-10 Pedro Alves <palves@redhat.com>
13481
13482 PR gdb/22670
13483 * dwarf2read.c
13484 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13485 Adjust to use language_get_symbol_name_matcher instead of
13486 language_defn::la_get_symbol_name_matcher.
13487 * language.c (language_get_symbol_name_matcher): If in Ada mode
13488 and the lookup name is a verbatim match, return Ada's matcher.
13489 * language.h (language_get_symbol_name_matcher): Adjust comment.
13490 (ada_lookup_name_info::verbatim_p):: New method.
13491
13492 2018-01-10 Pedro Alves <palves@redhat.com>
13493
13494 PR gdb/22670
13495 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13496 minsym's language is language_auto or language_cplus, pass down
13497 language_ada instead.
13498 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13499
13500 2018-01-10 Pedro Alves <palves@redhat.com>
13501
13502 PR gdb/22670
13503 * minsyms.c (linkage_name_str): New function.
13504 (iterate_over_minimal_symbols): Use it.
13505
13506 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13507
13508 * NEWS: Document that 'info proc' now works on FreeBSD.
13509
13510 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13511
13512 * configure.ac: Check for kinfo_getfile in libutil.
13513 * configure: Regenerate.
13514 * config.in: Regenerate.
13515 * fbsd-nat.c: Include "fbsd-tdep.h".
13516 (fbsd_fetch_cmdline): New.
13517 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13518 rather than calling error.
13519 (fbsd_info_proc): New.
13520 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13521 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13522 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13523
13524 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13525
13526 * fbsd-nat.c (struct free_deleter): Remove.
13527 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13528
13529 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13530
13531 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13532 NULL for an empty pathname.
13533
13534 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13535
13536 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13537 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13538 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13539 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13540 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13541 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13542 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13543 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13544 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13545 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13546 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13547 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13548 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13549 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13550 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13551
13552 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13553
13554 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13555 (gnu_xfer_auxv): New function.
13556 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13557 TARGET_OBJECT_AUXV.
13558
13559 2018-01-08 Yao Qi <yao.qi@linaro.org>
13560 Simon Marchi <simon.marchi@ericsson.com>
13561
13562 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13563 common/selftest.c.
13564 (COMMON_OBS): Remove selftest.o.
13565 * configure.ac: Append selftest-arch.c and common/selftest.c to
13566 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13567 * configure: Re-generated.
13568 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13569 GDB_SELF_TEST.
13570 (maintenance_info_selftests): Likewise.
13571
13572 2018-01-08 Xavier Roirand <roirand@adacore.com>
13573
13574 * ada-valprint.c (val_print_packed_array_elements): Use
13575 proper number of elements when printing an array indexed
13576 by an enumeration type.
13577
13578 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13579
13580 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13581 (dw2_get_file_names_reader): Adjust.
13582 (lookup_dwo_signatured_type): Adjust.
13583 (lookup_dwp_signatured_type): Adjust.
13584 (lookup_signatured_type): Adjust.
13585 (create_type_unit_group): Adjust.
13586 (get_type_unit_group): Adjust.
13587 (process_psymtab_comp_unit_reader): Adjust.
13588 (build_type_psymtabs_reader): Adjust.
13589 (scan_partial_symbols): Adjust.
13590 (add_partial_symbol): Adjust.
13591 (add_partial_subprogram): Adjust.
13592 (peek_die_abbrev): Adjust.
13593 (fixup_go_packaging): Adjust.
13594 (process_imported_unit_die): Adjust.
13595 (dwarf2_compute_name): Adjust.
13596 (dwarf2_physname): Adjust.
13597 (read_import_statement): Adjust.
13598 (handle_DW_AT_stmt_list): Adjust.
13599 (read_file_scope): Adjust.
13600 (read_func_scope): Adjust.
13601 (read_lexical_block_scope): Adjust.
13602 (read_call_site_scope): Adjust.
13603 (read_variable): Adjust.
13604 (dwarf2_rnglists_process): Adjust.
13605 (dwarf2_ranges_process): Adjust.
13606 (dwarf2_ranges_read): Adjust.
13607 (dwarf2_get_pc_bounds): Adjust.
13608 (dwarf2_record_block_ranges): Adjust.
13609 (dwarf2_add_field): Adjust.
13610 (dwarf2_add_member_fn): Adjust.
13611 (read_structure_type): Adjust.
13612 (process_structure_scope): Adjust.
13613 (read_enumeration_type): Adjust.
13614 (read_array_type): Adjust.
13615 (mark_common_block_symbol_computed): Adjust.
13616 (read_common_block): Adjust.
13617 (read_namespace_type): Adjust.
13618 (read_namespace): Adjust.
13619 (read_module_type): Adjust.
13620 (read_tag_pointer_type): Adjust.
13621 (read_tag_ptr_to_member_type): Adjust.
13622 (read_tag_string_type): Adjust.
13623 (read_subroutine_type): Adjust.
13624 (read_typedef): Adjust.
13625 (read_base_type): Adjust.
13626 (attr_to_dynamic_prop): Adjust.
13627 (read_subrange_type): Adjust.
13628 (read_unspecified_type): Adjust.
13629 (dwarf2_read_abbrevs): Adjust.
13630 (load_partial_dies): Adjust.
13631 (read_partial_die): Adjust.
13632 (find_partial_die): Adjust.
13633 (guess_partial_die_structure_name): Adjust.
13634 (fixup_partial_die): Adjust.
13635 (read_attribute_value): Adjust.
13636 (read_addr_index): Adjust.
13637 (read_addr_index_from_leb128): Adjust.
13638 (read_str_index): Adjust.
13639 (dwarf2_string_attr): Adjust.
13640 (get_debug_line_section): Adjust.
13641 (dwarf_decode_line_header): Adjust.
13642 (lnp_state_machine::check_line_address): Adjust.
13643 (dwarf_decode_lines_1): Adjust.
13644 (dwarf_decode_lines): Adjust.
13645 (dwarf2_start_symtab): Adjust.
13646 (var_decode_location): Adjust.
13647 (new_symbol_full): Adjust.
13648 (dwarf2_const_value_data): Adjust.
13649 (dwarf2_const_value_attr): Adjust.
13650 (dwarf2_const_value): Adjust.
13651 (die_type): Adjust.
13652 (die_containing_type): Adjust.
13653 (build_error_marker_type): Adjust.
13654 (lookup_die_type): Adjust.
13655 (guess_full_die_structure_name): Adjust.
13656 (anonymous_struct_prefix): Adjust.
13657 (determine_prefix): Adjust.
13658 (dwarf2_name): Adjust.
13659 (follow_die_ref_or_sig): Adjust.
13660 (follow_die_offset): Adjust.
13661 (follow_die_ref): Adjust.
13662 (follow_die_sig_1): Adjust.
13663 (follow_die_sig): Adjust.
13664 (get_signatured_type): Adjust.
13665 (get_DW_AT_signature_type): Adjust.
13666 (decode_locdesc): Adjust.
13667 (dwarf_decode_macros): Adjust.
13668 (cu_debug_loc_section): Adjust.
13669 (fill_in_loclist_baton): Adjust.
13670 (dwarf2_symbol_mark_computed): Adjust.
13671 (init_one_comp_unit): Don't assign
13672 dwarf2_cu::dwarf2_per_objfile.
13673 (set_die_type): Adjust.
13674
13675 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13676
13677 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13678 <dwarf2_per_objfile>: New field.
13679 (dwarf2_per_objfile): Remove global.
13680 (get_dwarf2_per_objfile): New function.
13681 (set_dwarf2_per_objfile): New function.
13682 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13683 dwarf2_per_objfile.
13684 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13685 (read_abbrev_offset): Likewise.
13686 (read_indirect_string): Likewise.
13687 (read_indirect_line_string): Likewise.
13688 (read_indirect_string_at_offset): Likewise.
13689 (read_indirect_string_from_dwz): Likewise.
13690 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13691 dwarf2_per_objfile.
13692 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13693 (create_all_comp_units): Change objfile parameter to
13694 dwarf2_per_objfile.
13695 (create_all_type_units): Likewise.
13696 (process_queue): Add dwarf2_per_objfile parameter.
13697 (read_and_check_comp_unit_head): Likewise.
13698 (lookup_dwo_unit_in_dwp): Likewise.
13699 (get_dwp_file): Likewise.
13700 (process_cu_includes): Likewise.
13701 (struct free_dwo_file_cleanup_data): New struct.
13702 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13703 set_dwarf2_per_objfile.
13704 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13705 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13706 context, adjust calls.
13707 (dw2_instantiate_symtab): Likewise.
13708 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13709 (dw2_get_cu): Likewise.
13710 (create_cu_from_index_list): Change objfile parameter to
13711 dwarf2_per_objfile.
13712 (create_cus_from_index_list): Get dwarf2_per_objfile from
13713 context, adjust calls.
13714 (create_cus_from_index): Likewise.
13715 (create_signatured_type_table_from_index): Change objfile
13716 parameter to dwarf2_per_objfile.
13717 (create_signatured_type_table_from_debug_names): Change objfile
13718 parameter to dwarf2_per_objfile.
13719 (create_addrmap_from_index): Likewise.
13720 (create_addrmap_from_aranges): Likewise.
13721 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13722 (dw2_setup): Remove.
13723 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13724 context.
13725 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13726 get_dwarf2_per_objfile.
13727 (dw2_forget_cached_source_info): Likewise.
13728 (dw2_map_symtabs_matching_filename): Likewise.
13729 (struct dw2_symtab_iterator) <index>: Remove.
13730 <dwarf2_per_objfile>: New field.
13731 (dw2_symtab_iter_init): Replace index parameter with
13732 dwarf2_per_objfile.
13733 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13734 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13735 (dw2_print_stats): Likewise.
13736 (dw2_dump): Likewise.
13737 (dw2_expand_symtabs_for_function): Likewise.
13738 (dw2_expand_all_symtabs): Likewise.
13739 (dw2_expand_symtabs_with_fullname): Likewise.
13740 (dw2_expand_marked_cus): Replace index and objfile parameters
13741 with dwarf2_per_objfile.
13742 (dw_expand_symtabs_matching_file_matcher): Add
13743 dwarf2_per_objfile parameter and adjust calls.
13744 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13745 adjust calls.
13746 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13747 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13748 adjust calls.
13749 (create_cus_from_debug_names_list): Replace objfile parameter
13750 with dwarf2_per_objfile and adjust calls.
13751 (create_cus_from_debug_names): Likewise.
13752 (dwarf2_read_debug_names): Likewise.
13753 (mapped_debug_names::namei_to_name): Adjust call.
13754 (dw2_debug_names_iterator::next): Likewise.
13755 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13756 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13757 (dw2_debug_names_dump): Likewise.
13758 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13759 (dw2_debug_names_expand_symtabs_matching): Likewise.
13760 (dwarf2_initialize_objfile): Likewise.
13761 (dwarf2_build_psymtabs): Likewise.
13762 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13763 this_cu.
13764 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13765 (read_and_check_comp_unit_head): Likewise.
13766 (read_abbrev_offset): Likewise.
13767 (create_debug_type_hash_table): Likewise.
13768 (create_debug_types_hash_table): Likewise.
13769 (create_all_type_units): Replace objfile parameter with
13770 dwarf2_per_objfile.
13771 (add_type_unit): Add dwarf2_per_objfile parameter.
13772 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13773 with dwarf2_per_objfile.
13774 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13775 (lookup_dwp_signatured_type): Likewise.
13776 (lookup_signatured_type): Likewise.
13777 (read_cutu_die_from_dwo): Likewise.
13778 (init_tu_and_read_dwo_dies): Likewise.
13779 (init_cutu_and_read_dies): Likewise.
13780 (init_cutu_and_read_dies_no_follow): Likewise.
13781 (allocate_type_unit_groups_table): Add objfile parameter.
13782 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13783 (get_type_unit_group): Likewise.
13784 (process_psymtab_comp_unit): Update call.
13785 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13786 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13787 (print_tu_stats): Likewise.
13788 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13789 in void* parameter.
13790 (build_type_psymtabs): Change objfile parameter to
13791 dwarf2_per_objfile.
13792 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13793 passed in void* parameter.
13794 (process_skeletonless_type_units): Change objfile parameter to
13795 dwarf2_per_objfile.
13796 (set_partial_user): Likewise.
13797 (dwarf2_build_psymtabs_hard): Likewise.
13798 (read_comp_units_from_section): Likewise.
13799 (create_all_comp_units): Likewise.
13800 (scan_partial_symbols): Update calls.
13801 (add_partial_symbol): Likewise.
13802 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13803 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13804 (process_queue): Add dwarf2_per_objfile parameter.
13805 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13806 (compute_compunit_symtab_includes): Likewise.
13807 (process_cu_includes): Add dwarf2_per_objfile parameter.
13808 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13809 (process_full_type_unit): Likewise.
13810 (process_imported_unit_die): Update call.
13811 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13812 (read_file_scope): Likewise.
13813 (allocate_dwo_file_hash_table): Add objfile parameter.
13814 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13815 (create_cus_hash_table): Likewise.
13816 (create_dwp_hash_table): Likewise.
13817 (create_dwo_unit_in_dwp_v1): Likewise.
13818 (create_dwp_v2_section): Likewise.
13819 (create_dwo_unit_in_dwp_v2): Likewise.
13820 (lookup_dwo_unit_in_dwp): Likewise.
13821 (try_open_dwop_file): Likewise.
13822 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13823 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13824 cleanup to include a reference to dwarf2_per_objfile.
13825 (open_dwp_file): Add dwarf2_per_objfile parameter.
13826 (open_and_init_dwp_file): Likewise.
13827 (get_dwp_file): Likewise.
13828 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13829 (queue_and_load_all_dwo_tus): Update call.
13830 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13831 data.
13832 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13833 (dwarf2_ranges_process): Likewise.
13834 (dwarf2_get_pc_bounds): Likewise.
13835 (mark_common_block_symbol_computed): Likewise.
13836 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13837 (dwarf2_read_abbrevs): Update call.
13838 (read_partial_die): Use dwarf2_per_objfile from cu.
13839 (find_partial_die): Likewise.
13840 (fixup_partial_die): Likewise.
13841 (read_attribute_value): Likewise.
13842 (read_indirect_string_at_offset_from): Add objfile parameter.
13843 (read_indirect_string_at_offset): Add dwarf2_per_objfile
13844 parameter.
13845 (read_indirect_string_from_dwz): Add objfile parameter.
13846 (read_indirect_string): Add objfile parameter.
13847 (read_addr_index_1): Add dwarf2_per_objfile parameter.
13848 (read_addr_index): Use dwarf2_per_objfile from cu.
13849 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13850 call dw2_setup.
13851 (read_str_index): Use dwarf2_per_objfile from cu.
13852 (get_debug_line_section): Likewise.
13853 (read_formatted_entries): Add dwarf2_per_objfile parameter.
13854 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13855 (new_symbol_full): Use dwarf2_per_objfile from cu.
13856 (build_error_marker_type): Likewise.
13857 (lookup_die_type): Likewise.
13858 (determine_prefix): Likewise.
13859 (follow_die_offset): Likewise.
13860 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13861 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13862 (dwarf2_fetch_die_type_sect_off): Likewise.
13863 (dwarf2_get_die_type): Likewise.
13864 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13865 (get_signatured_type): Likewise.
13866 (get_DW_AT_signature_type): Likewise.
13867 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13868 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13869 (cu_debug_loc_section): Likewise.
13870 (fill_in_loclist_baton): Likewise.
13871 (dwarf2_symbol_mark_computed): Likewise.
13872 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13873 dwarf2_per_objfile.
13874 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13875 parameter.
13876 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13877 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13878 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13879 (set_die_type): Use dwarf2_free_objfile from cu.
13880 (get_die_type_at_offset): Likewise.
13881 (dwarf2_per_objfile_free): Don't assign global variable.
13882 (debug_names) <constructor>: Add dwarf2_per_objfile
13883 parameter, update m_debugstrlookup construction.
13884 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13885 parameter.
13886 <m_dwarf2_per_objfile>: New field.
13887 <lookup>: Use m_dwarf2_per_objfile.
13888 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13889 (psyms_seen_size): Likewise.
13890 (write_gdbindex): Replace objfile parameter with
13891 dwarf2_per_objfile.
13892 (write_debug_names): Likewise.
13893 (write_psymtabs_to_index): Likewise.
13894 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13895 calls.
13896
13897 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13898
13899 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13900 <dwarf2_per_objfile>: New field.
13901 (struct dwarf2_per_cu_data) <objfile>: Remove.
13902 <dwarf2_per_objfile>: New field.
13903 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13904 of objfile.
13905 (create_signatured_type_table_from_index): Likewise.
13906 (create_debug_type_hash_table): Likewise.
13907 (fill_in_sig_entry_from_dwo_entry): Likewise.
13908 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13909 (create_type_unit_group): Assign dwarf2_per_objfile instead of
13910 objfile.
13911 (create_partial_symtab): Access objfile through
13912 dwarf2_per_objfile.
13913 (process_psymtab_comp_unit_reader): Likewise.
13914 (read_comp_units_from_section): Likewise.
13915 (scan_partial_symbols): Likewise.
13916 (add_partial_symbol): Likewise.
13917 (add_partial_subprogram): Likewise.
13918 (peek_die_abbrev): Likewise.
13919 (fixup_go_packaging): Likewise.
13920 (process_full_comp_unit): Likewise.
13921 (process_full_type_unit): Likewise.
13922 (process_imported_unit_die): Likewise.
13923 (dwarf2_compute_name): Likewise.
13924 (dwarf2_physname): Likewise.
13925 (read_import_statement): Likewise.
13926 (create_cus_hash_table): Assign dwarf2_physname instead of
13927 objfile.
13928 (read_func_scope): Access objfile through dwarf2_per_objfile.
13929 (read_lexical_block_scope): Likewise.
13930 (read_call_site_scope): Likewise.
13931 (read_variable): Likewise.
13932 (dwarf2_rnglists_process): Likewise.
13933 (dwarf2_ranges_process): Likewise.
13934 (dwarf2_ranges_read): Likewise.
13935 (dwarf2_record_block_ranges): Likewise.
13936 (dwarf2_add_field): Likewise.
13937 (dwarf2_add_member_fn): Likewise.
13938 (read_structure_type): Likewise.
13939 (process_structure_scope): Likewise.
13940 (read_enumeration_type): Likewise.
13941 (read_array_type): Likewise.
13942 (read_common_block): Likewise.
13943 (read_namespace_type): Likewise.
13944 (read_namespace): Likewise.
13945 (read_module_type): Likewise.
13946 (read_tag_pointer_type): Likewise.
13947 (read_tag_ptr_to_member_type): Likewise.
13948 (read_tag_string_type): Likewise.
13949 (read_subroutine_type): Likewise.
13950 (read_typedef): Likewise.
13951 (read_base_type): Likewise.
13952 (attr_to_dynamic_prop): Likewise.
13953 (read_subrange_type): Likewise.
13954 (read_unspecified_type): Likewise.
13955 (load_partial_dies): Likewise.
13956 (read_partial_die): Likewise.
13957 (find_partial_die): Likewise.
13958 (guess_partial_die_structure_name): Likewise.
13959 (fixup_partial_die): Likewise.
13960 (read_attribute_value): Likewise.
13961 (read_addr_index_from_leb128): Likewise.
13962 (dwarf2_read_addr_index): Likewise.
13963 (dwarf2_string_attr): Likewise.
13964 (lnp_state_machine::check_line_address): Likewise.
13965 (dwarf_decode_lines_1): Likewise.
13966 (dwarf_decode_lines): Likewise.
13967 (dwarf2_start_symtab): Likewise.
13968 (var_decode_location): Likewise.
13969 (new_symbol_full): Likewise.
13970 (dwarf2_const_value_data): Likewise.
13971 (dwarf2_const_value_attr): Likewise.
13972 (dwarf2_const_value): Likewise.
13973 (die_type): Likewise.
13974 (die_containing_type): Likewise.
13975 (lookup_die_type): Likewise.
13976 (guess_full_die_structure_name): Likewise.
13977 (anonymous_struct_prefix): Likewise.
13978 (dwarf2_name): Likewise.
13979 (follow_die_ref_or_sig): Likewise.
13980 (follow_die_offset): Likewise.
13981 (follow_die_ref): Likewise.
13982 (dwarf2_fetch_die_loc_sect_off): Likewise.
13983 (dwarf2_fetch_constant_bytes): Likewise.
13984 (dwarf2_fetch_die_type_sect_off): Likewise.
13985 (dwarf2_get_die_type): Likewise.
13986 (follow_die_sig): Likewise.
13987 (decode_locdesc): Likewise.
13988 (dwarf2_per_cu_objfile): Likewise.
13989 (dwarf2_per_cu_text_offset): Likewise.
13990 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13991 objfile.
13992 (set_die_type): Access objfile through
13993 dwarf2_per_objfile.
13994
13995 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13996
13997 * valprint.c (converted_character_d): Remove typedef.
13998 (DEF_VEC_O (converted_character_d)): Remove.
13999 (count_next_character): Use std::vector.
14000 (print_converted_chars_to_obstack): Likewise.
14001 (generic_printstr): Likewise.
14002
14003 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14004
14005 * xml-support.h (struct gdb_xml_value): Add constructor.
14006 <value>: Change type to unique_xmalloc_ptr.
14007 (gdb_xml_value_s): Remove typedef.
14008 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14009 (gdb_xml_element_start_handler): Change parameter type to
14010 std::vector.
14011 (xml_find_attribute): Likewise.
14012 * xml-support.c (xml_find_attribute): Change parameter type to
14013 std::vector and adjust.
14014 (gdb_xml_values_cleanup): Remove.
14015 (gdb_xml_parser::start_element): Adjust to std::vector.
14016 (xinclude_start_include): Change paraeter type to std::vector
14017 and adjust.
14018 * btrace.c (check_xml_btrace_version): Likewise.
14019 (parse_xml_btrace_block): Likewise.
14020 (parse_xml_btrace_pt_config_cpu): Likewise.
14021 (parse_xml_btrace_pt): Likewise.
14022 (parse_xml_btrace_conf_bts): Likewise.
14023 (parse_xml_btrace_conf_pt): Likewise.
14024 * memory-map.c (memory_map_start_memory): Likewise.
14025 (memory_map_start_property): Likewise.
14026 * osdata.c (osdata_start_osdata): Likewise.
14027 (osdata_start_item): Likewise.
14028 (osdata_start_column): Likewise.
14029 * remote.c (start_thread): Likewise.
14030 * solib-aix.c (library_list_start_library): Likewise.
14031 (library_list_start_list): Likewise.
14032 * solib-svr4.c (library_list_start_library): Likewise.
14033 (svr4_library_list_start_list): Likewise.
14034 * solib-target.c (library_list_start_segment): Likewise.
14035 (library_list_start_section): Likewise.
14036 (library_list_start_library): Likewise.
14037 (library_list_start_list): Likewise.
14038 * tracepoint.c (traceframe_info_start_memory): Likewise.
14039 (traceframe_info_start_tvar): Likewise.
14040 * xml-syscall.c (syscall_start_syscall): Likewise.
14041 * xml-tdesc.c (tdesc_start_target): Likewise.
14042 (tdesc_start_feature): Likewise.
14043 (tdesc_start_reg): Likewise.
14044 (tdesc_start_union): Likewise.
14045 (tdesc_start_struct): Likewise.
14046 (tdesc_start_flags): Likewise.
14047 (tdesc_start_enum): Likewise.
14048 (tdesc_start_field): Likewise.
14049 (tdesc_start_enum_value): Likewise.
14050 (tdesc_start_vector): Likewise.
14051
14052 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14053
14054 * extension.h (struct xmethod_worker) <clone>: Remove.
14055 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14056 Remove.
14057 (python_xmethod_worker::clone): Remove.
14058 * valops.c (find_overload_match): Use std::move instead of
14059 clone.
14060
14061 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14062
14063 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14064 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14065 <free_xmethod_worker_data>: Remove.
14066 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14067 <get_xmethod_arg_types>: Remove.
14068 <get_xmethod_result_type>: Remove.
14069 <invoke_xmethod>: Remove.
14070 * extension.c (new_xmethod_worker): Remove.
14071 (clone_xmethod_worker): Remove.
14072 (get_matching_xmethod_workers): Return void, pass std::vector by
14073 pointer.
14074 (get_xmethod_arg_types): Rename to...
14075 (xmethod_worker::get_arg_types): ... this, and adjust.
14076 (get_xmethod_result_type): Rename to...
14077 (xmethod_worker::get_result_type): ... this, and adjust.
14078 (invoke_xmethod): Remove.
14079 (free_xmethod_worker): Remove.
14080 (free_xmethod_worker_vec): Remove.
14081 * extension.h (enum ext_lang_rc): Move here from
14082 extension-priv.h.
14083 (struct xmethod_worker): Add constructor and destructor.
14084 <data>: Remove.
14085 <value>: Remove.
14086 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14087 virtual pure methods.
14088 <get_arg_types, get_result_type>: New methods.
14089 (xmethod_worker_ptr): Remove typedef.
14090 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14091 (xmethod_worker_vec): Remove typedef.
14092 (xmethod_worker_up): New typedef.
14093 (invoke_xmethod): Remove.
14094 (clone_xmethod_worker): Remove.
14095 (free_xmethod_worker): Remove.
14096 (free_xmethod_worker_vec): Remove.
14097 (get_xmethod_arg_types): Remove.
14098 (get_xmethod_result_type): Remove.
14099 * valops.c (find_method_list): Use std::vector, don't use
14100 intermediate vector.
14101 (value_find_oload_method_list): Use std::vector.
14102 (find_overload_match): Use std::vector.
14103 (find_oload_champ): Use std::vector.
14104 * value.c (value_free): Use operator delete.
14105 (value_of_xmethod): Rename to...
14106 (value_from_xmethod): ... this. Don't assign
14107 xmethod_worker::value, take rvalue-reference.
14108 (result_type_of_xmethod): Adjust.
14109 (call_xmethod): Adjust.
14110 * value.h: Include extension.h.
14111 (struct xmethod_worker): Don't forward-declare.
14112 (value_of_xmethod): Rename to...
14113 (value_from_xmethod): ... this, take rvalue-reference.
14114 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14115 (struct python_xmethod_worker): ... this, add constructor and
14116 destructor.
14117 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14118 (gdbpy_free_xmethod_worker_data): Rename to...
14119 (python_xmethod_worker::~python_xmethod_worker): ... this and
14120 adjust.
14121 (gdbpy_clone_xmethod_worker_data): Rename to...
14122 (python_xmethod_worker::clone): ... this and adjust.
14123 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14124 temporary vector.
14125 (gdbpy_get_xmethod_arg_types): Rename to...
14126 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14127 (gdbpy_get_xmethod_result_type): Rename to...
14128 (python_xmethod_worker::do_get_result_type): ... this and
14129 adjust.
14130 (gdbpy_invoke_xmethod): Rename to...
14131 (python_xmethod_worker::invoke): ... this and adjust.
14132 (new_python_xmethod_worker): Rename to...
14133 (python_xmethod_worker::python_xmethod_worker): ... this and
14134 adjust.
14135 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14136 Remove.
14137 (gdbpy_free_xmethod_worker_data): Remove.
14138 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14139 (gdbpy_get_xmethod_arg_types): Remove.
14140 (gdbpy_get_xmethod_result_type): Remove.
14141 (gdbpy_invoke_xmethod): Remove.
14142 * python/python.c (python_extension_ops): Remove obsolete
14143 callbacks.
14144
14145 2018-01-05 Pedro Alves <palves@redhat.com>
14146
14147 PR gdb/18653
14148 * common/signals-state-save-restore.c
14149 (save_original_signals_state): New parameter 'quiet'. Warn if we
14150 find a custom handler preinstalled, instead of internal erroring.
14151 But only warn if !quiet.
14152 * common/signals-state-save-restore.h
14153 (save_original_signals_state): New parameter 'quiet'.
14154 * main.c (captured_main_1): Move save_original_signals_state call
14155 after option handling, and pass QUIET.
14156
14157 2018-01-05 Pedro Alves <palves@redhat.com>
14158
14159 * spu-tdep.c (spu_catch_start): Pass
14160 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14161
14162 2018-01-05 Pedro Alves <palves@redhat.com>
14163
14164 PR gdb/22670
14165 * ada-lang.c (literal_symbol_name_matcher): New function.
14166 (ada_get_symbol_name_matcher): Use it for
14167 symbol_name_match_type::SEARCH_NAME.
14168 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14169 it down instead of assuming symbol_name_match_type::FULL.
14170 * block.h (block_lookup_symbol): New parameter 'match_type'.
14171 * c-valprint.c (print_unpacked_pointer): Use
14172 lookup_symbol_search_name instead of lookup_symbol.
14173 * compile/compile-object-load.c (get_out_value_type): Pass down
14174 symbol_name_match_type::SEARCH_NAME.
14175 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14176 symbol_name_match_type::FULL.
14177 * cp-support.c (cp_get_symbol_name_matcher): Handle
14178 symbol_name_match_type::SEARCH_NAME.
14179 * infrun.c (insert_exception_resume_breakpoint): Use
14180 lookup_symbol_search_name.
14181 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14182 * psymtab.c (maintenance_check_psymtabs): Use
14183 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14184 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14185 SYMBOL_SEARCH_NAME.
14186 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14187 if symbol_name_match_type::SEARCH_NAME.
14188 (lookup_symbol_in_language): Pass down
14189 symbol_name_match_type::FULL.
14190 (lookup_symbol_search_name): New.
14191 (lookup_language_this): Pass down
14192 symbol_name_match_type::SEARCH_NAME.
14193 (lookup_symbol_aux, lookup_local_symbol): New parameter
14194 'match_type'. Pass it down.
14195 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14196 (lookup_symbol_search_name): New declaration.
14197 (lookup_symbol_in_block): New 'match_type' parameter.
14198
14199 2018-01-05 Pedro Alves <palves@redhat.com>
14200
14201 PR gdb/22670
14202 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14203 ada_lookup_symbol.
14204 (ada_lookup_symbol): Reimplement in terms of
14205 ada_lookup_symbol_list, bits factored out from
14206 ada_lookup_encoded_symbol.
14207
14208 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14209
14210 * ada-exp.y (write_object_renaming): When subscripting an array
14211 using a symbol as the index, pass the block in call to
14212 ada_lookup_encoded_symbol when looking that symbol up.
14213
14214 2018-01-05 Jerome Guitton <guitton@adacore.com>
14215
14216 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14217 TYPE_INDEX_TYPE.
14218
14219 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14220
14221 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14222 the case where VALUE_LVAL (val0) is not lval_memory.
14223
14224 2018-01-05 Xavier Roirand <roirand@adacore.com>
14225
14226 * ada-valprint.c (print_optional_low_bound): Handle
14227 character-indexed array printing like boolean-indexed array
14228 printing.
14229
14230 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14231
14232 * NEWS: Create a new section for the next release branch.
14233 Rename the section of the current branch, now that it has
14234 been cut.
14235
14236 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14237
14238 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14239 * version.in: Bump version to 8.1.50.DATE-git.
14240
14241 2018-01-03 Xavier Roirand <roirand@adacore.com>
14242
14243 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14244 Add field.
14245 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14246 Add field.
14247 (default_exception_support_info) <catch_handlers_sym>: Add field.
14248 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14249 (ada_exception_name_addr_1): Add "catch handlers" handling.
14250 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14251 Update all callers.
14252 (create_excep_cond_exprs) <ex>: Add parameter.
14253 (re_set_exception): Update create_excep_cond_exprs call.
14254 (print_it_exception, print_one_exception, print_mention_exception)
14255 (print_recreate_exception): Add "catch handler" handling.
14256 (allocate_location_catch_handlers, re_set_catch_handlers)
14257 (check_status_catch_handlers, print_it_catch_handlers)
14258 (print_one_catch_handlers, print_mention_catch_handlers)
14259 (print_recreate_catch_handlers): New function.
14260 (catch_handlers_breakpoint_ops): New variable.
14261 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14262 Add parameter. Add "catch handler" handling.
14263 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14264 Add "catch handler" handling.
14265 (ada_exception_catchpoint_cond_string): Add "catch handler"
14266 handling.
14267 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14268 call.
14269 (catch_ada_handlers_command): New function.
14270 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14271 operations structure.
14272 (_initialize_ada_language): Add "catch handlers" command entry.
14273 * NEWS: Document "catch handlers" feature.
14274
14275 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14276
14277 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14278 account when creating the array type of the slice.
14279 (ada_value_slice): Likewise.
14280
14281 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14282
14283 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14284 New enum value.
14285 (create_array_type_with_stride): Add byte_stride_prop parameter.
14286 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14287 New parameter. Update all callers in this file.
14288 (array_type_has_dynamic_stride): New function.
14289 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14290 of arrays with dynamic byte strides.
14291 * dwarf2read.c (read_array_type): Add support for dynamic
14292 DW_AT_byte_stride attributes.
14293
14294 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14295
14296 * dwarf2read.c (read_unspecified_type): Treat
14297 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14298
14299 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14300
14301 Update copyright year range in all GDB files.
14302
14303 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
14304
14305 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14306 and gdb/testsuite/gdb.base/step-line.c.
14307
14308 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14309
14310 * copyright.py (main): Dump the contents of
14311 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14312 even if BY_HAND is empty.
14313
14314 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14315
14316 * top.c (print_gdb_version): Update Copyright year in version
14317 message.
14318
14319 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14320
14321 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14322
14323 For older changes see ChangeLog-2017.
14324 \f
14325 Local Variables:
14326 mode: change-log
14327 left-margin: 8
14328 fill-column: 74
14329 version-control: never
14330 coding: utf-8
14331 End: