48baa3742f04140eb3bbe8fbd5f4f0858854bef3
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-11-08 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * riscv-tdep.c (riscv_insn::decode): Update header comment.
4 (riscv_frame_this_id): Catch errors thrown while building the
5 frame cache, leave the frame id as the default, which is the outer
6 frame id.
7
8 2018-11-07 Joel Brobecker <brobecker@adacore.com>
9
10 * ada-lang.c (read_atcb): Only set task_info->called_task if
11 task_info->state == Entry_Caller_Sleep.
12 (print_ada_task_info): Do not check task_info->state before
13 checking task_info->called_task.
14 (info_task): Likewise.
15
16 2018-11-07 Joel Brobecker <brobecker@adacore.com>
17
18 * ada-tasks.c (read_atcb): Clear task_info before computing
19 the value of each of its fields.
20
21 2018-11-07 Andrew Burgess <andrew.burgess@embecosm.com>
22
23 * dwarf2read.c (dwarf2_init_integer_type): Check for name being
24 NULL before dereferencing it.
25
26 2018-11-06 Tom de Vries <tdevries@suse.de>
27
28 * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
29 program headers.
30
31 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
32
33 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
34 so that it applies to uclinux as well.
35
36 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
37
38 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
39 when on AAPCS.
40
41 2018-11-06 John Baldwin <jhb@FreeBSD.org>
42
43 * riscv-fbsd-nat.c (getregs_supplies): Return true for
44 RISCV_CSR_SSTATUS_REGNUM.
45
46 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
47
48 * source.c (open_source_file): Fix leak by transferring the
49 current s->fullname to the unique_xmalloc_ptr fullname given
50 to find_and_open_source.
51
52 2018-11-04 Tom Tromey <tom@tromey.com>
53
54 * varobj.c (install_default_visualizer): Update.
55 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
56 Return gdbpy_ref.
57 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
58 (find_pretty_printer_from_progspace)
59 (find_pretty_printer_from_gdb, find_pretty_printer)
60 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
61 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
62 Update.
63
64 2018-11-04 Tom Tromey <tom@tromey.com>
65
66 * python/python.c (gdbpy_parameter_value): Update.
67 * python/python-internal.h (python_string_to_unicode)
68 (python_string_to_target_python_string)
69 (host_string_to_python_string): Return gdbpy_ref.
70 * python/py-utils.c (python_string_to_unicode)
71 (unicode_to_encoded_python_string)
72 (unicode_to_target_python_string)
73 (python_string_to_target_string)
74 (python_string_to_target_python_string): Return gdbpy_ref.
75 (python_string_to_host_string): Update.
76 (host_string_to_python_string): Return gdbpy_ref.
77 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
78 (stpy_fullname): Update.
79 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
80 Update.
81 * python/py-prettyprint.c (print_string_repr): Update.
82 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
83 (objfpy_get_build_id): Update.
84 * python/py-breakpoint.c (bppy_get_location)
85 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
86 Update.
87
88 2018-11-04 Tom Tromey <tom@tromey.com>
89
90 * python/python-internal.h (gdb_py_object_from_longest)
91 (gdb_py_object_from_ulongest): Return gdbpy_ref.
92 * python/py-value.c (valpy_int): Update.
93 * python/py-utils.c (gdb_py_object_from_longest): Return
94 gdbpy_ref.
95 (gdb_py_object_from_ulongest): Likewise.
96 * python/py-type.c (typy_get_alignof): Update.
97 * python/py-linetable.c (ltpy_get_all_source_lines)
98 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
99 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
100
101 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
102
103 * ada-lang.c (_initialize_ada_language): Fix typo.
104
105 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
106
107 * language.c (type): Remove.
108 (_initialize_language): Remove assignment to type.
109
110 2018-11-02 Joel Brobecker <brobecker@adacore.com>
111
112 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
113 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
114 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
115 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
116 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
117 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
118 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
119 and aarch64-ravenscar-thread.o.
120 * NEWS: Add entry documenting Ravenscar tasking support
121 on AArch64 ELF.
122
123 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
124
125 * symtab.c (info_functions_command): Initialize quiet flag.
126 * stack.c (info_args_command): Likewise.
127
128 2018-11-01 Jim Wilson <jimw@sifive.com>
129
130 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
131 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
132 debugging messages.
133
134 2018-11-01 Joel Brobecker <brobecker@adacore.com>
135
136 * ada-lang.c (ada_watch_location_expression): New function.
137 (ada_language_defn): Set la_watch_location_expression to
138 ada_watch_location_expression.
139
140 2018-11-01 Joel Brobecker <brobecker@adacore.com>
141
142 * print-utils.c (int_string): Remove unnecessary trailing spaces.
143
144 2018-11-01 Joel Brobecker <brobecker@adacore.com>
145
146 * rs6000-tdep.c (skip_prologue): Fix potential negative left
147 shifting.
148
149 2018-11-01 Jerome Guitton <guitton@adacore.com>
150 Joel Brobecker <brobecker@adacore.com>
151
152 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
153 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
154 * arm-pikeos-tdep.c: New file.
155 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
156 embedded system.
157 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
158
159 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
160
161 * common/pathstuff.c (get_standard_temp_dir): New.
162 * common/pathstuff.h (get_standard_temp_dir): New.
163 * config.in: Re-generate.
164 * configure: Re-generate.
165 * configure.ac: Don't check for mkdtemp.
166 * gnulib/aclocal-m4-deps.mk: Re-generate.
167 * gnulib/aclocal.m4: Re-generate.
168 * gnulib/config.in: Re-generate.
169 * gnulib/configure: Re-generate.
170 * gnulib/import/Makefile.am: Re-generate.
171 * gnulib/import/Makefile.in: Re-generate.
172 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
173 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
174 * gnulib/import/m4/mkdtemp.m4: New file.
175 * gnulib/import/mkdtemp.c: New file.
176 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
177 Add mkdtemp module.
178 * unittests/mkdir-recursive-selftests.c (test): Use
179 get_standard_temp_dir.
180 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
181 ifdef.
182 * compile/compile.c (get_compile_file_tempdir): Likewise.
183
184 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
185
186 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
187 (SIG_FRAME_LR_OFFSET64): New define.
188 (SIG_FRAME_FP_OFFSET64): New define.
189 (aix_sighandle_frame_cache): New Function.
190 (aix_sighandle_frame_this_id): New Function.
191 (aix_sighandle_frame_prev_register): New Function.
192 (aix_sighandle_frame_sniffer): New Function.
193 (aix_sighandle_frame_unwind): New global variable.
194 (rs6000_aix_init_osabi): Install new frame unwinder.
195
196 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
197
198 PR gdb/23835
199 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
200 already defined.
201
202 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
203
204 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
205
206 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
207
208 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
209 (producer_is_icc): New function.
210 (check_producer): Set producer_is_icc field on dwarf2_cu.
211 (dwarf2_init_integer_type): New function.
212 (read_base_type): Call dwarf2_init_integer_type instead of
213 init_integer_type in all cases.
214 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
215 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
216 LEN is greater than 0.
217
218 2018-10-30 Tom Tromey <tom@tromey.com>
219
220 * main.c (captured_main_1): Check return value of bfd_init.
221
222 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
223
224 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
225 Adjust comments.
226
227 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
228
229 * procfs.c: Include common/pathstuff.h.
230
231 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
232
233 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
234 Add missing braces. No functional change.
235
236 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
237
238 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
239 to report a bad option and fix indentation.
240 * demangle.c (demangle_command): Use report_unrecognized_option_error
241 to report a bad option and correctly report the bad option.
242
243 2018-10-27 Tom Tromey <tom@tromey.com>
244
245 PR cli/23364:
246 * darwin-nat.c (copied_shell): New global.
247 (may_have_sip): Rename from should_disable_startup_with_shell.
248 (copy_shell_to_cache, maybe_cache_shell): New functions.
249 (darwin_nat_target::create_inferior): Update. Use
250 copied_shell.
251
252 2018-10-27 Tom Tromey <tom@tromey.com>
253
254 * unittests/scoped_fd-selftests.c (test_to_file): New function.
255 (run_tests): Call test_to_file.
256 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
257 temporary files.
258 * common/scoped_fd.h (scoped_fd::to_file): New method.
259
260 2018-10-27 Tom Tromey <tom@tromey.com>
261
262 * unittests/scoped_mmap-selftests.c (test_normal): Use
263 gdb_mkostemp_cloexec.
264 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
265 Use gdb_mkostemp_cloexec.
266 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
267 gnulib/config.in, gnulib/configure,
268 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
269 gnulib/import/m4/gnulib-cache.m4,
270 gnulib/import/m4/gnulib-comp.m4: Update.
271 * gnulib/import/m4/mkostemp.m4: New file.
272 * gnulib/import/m4/mkstemp.m4: Remove.
273 * gnulib/import/mkostemp.c: New file.
274 * gnulib/import/mkstemp.m4: Remove.
275 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
276 mkstemp, add mkostemp. Apply new patch.
277 * gnulib/import/stdlib.in.h: Apply patch.
278 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
279 New file.
280 * dwarf-index-write.c (write_psymtabs_to_index): Use
281 gdb_mkostemp_cloexec.
282 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
283
284 2018-10-27 Tom Tromey <tom@tromey.com>
285
286 * unittests/mkdir-recursive-selftests.c: New file.
287 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
288 unittests/mkdir-recursive-selftests.c.
289 * dwarf-index-cache.c (mkdir_recursive): Move to
290 common/filestuff.c.
291 (index_cache::store): Check return value of mkdir_recursive.
292 (create_dir_and_check, test_mkdir_recursive): Move to new file.
293 (_initialize_index_cache): Don't register test.
294 * common/filestuff.h (mkdir_recursive): Declare.
295 * common/filestuff.c (mkdir_recursive): Move from
296 dwarf-index-cache.c. Return bool.
297
298 2018-10-27 Tom Tromey <tom@tromey.com>
299
300 * dwarf-index-write.c (write_psymtabs_to_index): Move
301 make_temp_filename to common/pathstuff.c.
302 * common/pathstuff.h (make_temp_filename): Declare.
303 * common/pathstuff.c (make_temp_filename): New function, moved
304 from dwarf-index-write.c.
305
306 2018-10-27 Tom Tromey <tom@tromey.com>
307
308 * procfs.c (procfs_target::create_inferior): Use get_shell.
309 * cli/cli-cmds.c (shell_escape): Use get_shell.
310 * windows-nat.c (windows_nat_target::create_inferior): Use
311 get_shell.
312 * common/pathstuff.c (get_shell): New function.
313 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
314 (fork_inferior): Use get_shell.
315 * common/pathstuff.h (get_shell): Declare.
316
317 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
318
319 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
320
321 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
322
323 * stack.c (print_variable_and_value_data): Add preg and treg.
324 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
325 and update callers.
326 (print_frame_arg_vars): Likewise.
327 (prepare_reg): New function.
328 (info_locals_command): Extract info print args and use them.
329 (info_args_command): Likewise.
330 (_initialize_stack): Modify on-line help.
331 * symtab.c (treg_matches_sym_type_name): New function.
332 (search_symbols): New arg t_regexp.
333 (symtab_symbol_info): New args quiet, regexp, t_regexp.
334 (info_variables_command): Extract info print args and use them.
335 (info_functions_command): Likewise.
336 (info_types_command): Update call to symtab_symbol_info.
337 (_initialize_symtab): Modify on-line help.
338 * symtab.h (treg_matches_sym_type_name): New function.
339 (search_symbols): New t_regexp arg.
340
341 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
342
343 * cli-utils.c (extract_arg_maybe_quoted): New function.
344 (extract_info_print_args): New function.
345 (info_print_args_help): New function.
346 (report_unrecognized_option_error): New function.
347 * cli-utils.h (extract_arg_maybe_quoted): New function.
348 (extract_info_print_args): New function.
349 (info_print_args_help): New function.
350 (report_unrecognized_option_error): New function.
351
352 2018-10-26 Tom Tromey <tom@tromey.com>
353
354 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
355 (compute_compunit_symtab_includes): Update.
356 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
357 (compunit_symtab_ptr): Likewise.
358
359 2018-10-26 John Baldwin <jhb@FreeBSD.org>
360
361 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
362 default_print_auxv_entry for specific tag values.
363
364 2018-10-26 John Baldwin <jhb@FreeBSD.org>
365
366 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
367
368 2018-10-26 Jim Wilson <jimw@sifive.com>
369
370 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
371 (riscv_linux_sigframe_init): Declare.
372 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
373 (riscv_linux_sigframe): New.
374 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
375 (riscv_linux_sigframe_init): Define.
376 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
377
378 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
379 (riscv_isa_flen): Likewise. Drop static.
380 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
381 (riscv_isa_flen): Likewise. Declare.
382
383 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
384 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
385
386 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
387 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
388 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
389 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
390 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
391 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
392 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
393 Define.
394 (struct ppc_linux_features) <htm>: New field.
395 (ppc_linux_no_features): Add initializer for htm field.
396 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
397 new tdescs.
398 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
399 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
400 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
401 Define if not already defined.
402 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
403 and rs6000/powerpc-isa207-htm-vsx64l.
404 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
405 rs6000/powerpc-isa207-htm-vsx64l.xml.
406 * features/rs6000/power-htm-spr.xml: New file.
407 * features/rs6000/power-htm-core.xml: New file.
408 * features/rs6000/power64-htm-core.xml: New file.
409 * features/rs6000/power-htm-fpu.xml: New file.
410 * features/rs6000/power-htm-altivec.xml: New file.
411 * features/rs6000/power-htm-vsx.xml: New file.
412 * features/rs6000/power-htm-ppr.xml: New file.
413 * features/rs6000/power-htm-dscr.xml: New file.
414 * features/rs6000/power-htm-tar.xml: New file.
415 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
416 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
417 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
418 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
419 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
420 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
421 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
422 fetch_regset with HTM regsets.
423 (store_register, store_ppc_registers): Call store_regset with HTM
424 regsets.
425 (ppc_linux_nat_target::read_description): Set htm field in the
426 features struct if needed.
427 * ppc-linux-tdep.c: Include
428 features/rs6000/powerpc-isa207-htm-vsx32l.c and
429 features/rs6000/powerpc-isa207-htm-vsx64l.c.
430 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
431 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
432 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
433 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
434 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
435 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
436 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
437 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
438 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
439 (ppc32_linux_ctarregset): New globals.
440 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
441 (ppc_linux_collect_core_cpgrregset): New function.
442 (ppc_linux_iterate_over_regset_sections): Call back with the htm
443 regsets.
444 (ppc_linux_core_read_description): Check if the tm spr section is
445 present and set htm in the features struct.
446 (_initialize_ppc_linux_tdep): Call
447 initialize_tdesc_powerpc_isa207_htm_vsx32l and
448 initialize_tdesc_powerpc_isa207_htm_vsx64l.
449 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
450 Declare.
451 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
452 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
453 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
454 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
455 New fields.
456 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
457 Likewise.
458 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
459 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
460 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
461 New enum fields.
462 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
463 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
464 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
465 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
466 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
467 <PPC_CTAR_REGNUM>: Likewise.
468 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
469 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
470 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
471 (IS_CEFP_PSEUDOREG): Define.
472 (rs6000_register_name): Hide the upper halves of checkpointed VSX
473 registers. Return names for the checkpointed DFP, VSX, and EFP
474 pseudo registers.
475 (rs6000_pseudo_register_type): Remove initial assert and raise an
476 internal error in the else clause instead. Return types for the
477 checkpointed DFP, VSX, and EFP pseudo registers.
478 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
479 checkpointed DFP pseudo registers.
480 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
481 checkpointed VSX pseudo registers.
482 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
483 from efpr_pseudo_register_read and
484 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
485 registers.
486 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
487 Handle checkpointed DFP, VSX, and EFP registers.
488 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
489 (efp_ax_pseudo_register_collect): New functions.
490 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
491 register logic to new functions. Handle checkpointed DFP, VSX,
492 and EFP pseudo registers.
493 (rs6000_gdbarch_init): Look for and validate the htm features.
494 Include checkpointed DFP, VSX and EFP pseudo-registers.
495 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
496 HTM registers.
497
498 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
499
500 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
501 without altivec or fpu.
502
503 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
504 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
505
506 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
507 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
508 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
509 Define if not already defined.
510 * features/rs6000/power-ebb.xml: New file.
511 * features/rs6000/power-linux-pmu.xml: New file.
512 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
513 features.
514 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
515 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
516 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
517 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
518 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
519 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
520 fetch_regset with ebb and pmu regsets.
521 (store_register, store_ppc_registers): Call store_regset with ebb
522 and pmu regsets.
523 (ppc_linux_nat_target::read_description): Set isa207 field in the
524 features struct if ebb and pmu are avaiable.
525 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
526 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
527 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
528 and pmu regsets.
529 (ppc_linux_core_read_description): Check if the pmu section is
530 present and set isa207 in the features struct.
531 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
532 (ppc32_linux_pmuregset): Declare.
533 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
534 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
535 <ppc_sier_regnum>: New field.
536 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
537 New enum values.
538 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
539 values.
540 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
541 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
542 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
543 ebb and pmu features.
544
545 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
546 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
547
548 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
549 (tdesc_powerpc_isa207_vsx64l): Declare.
550 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
551 (struct ppc_linux_features) <isa207>: New field.
552 (ppc_linux_no_features): Add initializer for isa207 field.
553 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
554 new tdescs.
555 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
556 (NT_PPC_TAR): Define if not already defined.
557 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
558 rs6000/powerpc-isa207-vsx64l.
559 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
560 rs6000/powerpc-isa207-vsx64l.xml.
561 * features/rs6000/power-tar.xml: New file.
562 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
563 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
564 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
565 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
566 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
567 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
568 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
569 fetch_regset with the TAR regset.
570 (store_register, store_ppc_registers): Call store_regset with the
571 TAR regset.
572 (ppc_linux_nat_target::read_description): Set isa207 field in the
573 features struct if needed.
574 * ppc-linux-tdep.c: Include
575 features/rs6000/powerpc-isa207-vsx32l.c and
576 features/rs6000/powerpc-isa207-vsx64l.c.
577 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
578 (ppc_linux_iterate_over_regset_sections): Call back with the tar
579 regset.
580 (ppc_linux_core_read_description): Check if the tar section is
581 present and set isa207 in the features struct.
582 (_initialize_ppc_linux_tdep): Call
583 initialize_tdesc_powerpc_isa207_vsx32l and
584 initialize_tdesc_powerpc_isa207_vsx64l.
585 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
586 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
587 (enum) <PPC_TAR_REGNUM>: New enum value.
588 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
589 feature.
590 (ppc_process_record_op31): Record changes to TAR.
591
592 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
593 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
594
595 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
596 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
597 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
598 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
599 (struct ppc_linux_features) <ppr_dscr>: New field.
600 (ppc_linux_no_features): Add initializer for ppr_dscr field.
601 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
602 new tdescs.
603 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
604 Define if not already defined.
605 * features/Makefile (WHICH): Add
606 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
607 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
608 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
609 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
610 * features/rs6000/power-dscr.xml: New file.
611 * features/rs6000/power-ppr.xml: New file.
612 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
613 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
614 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
615 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
616 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
617 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
618 * ppc-linux-nat.c: Include <sys/uio.h>.
619 (fetch_regset, store_regset, check_regset): New functions.
620 (fetch_register, fetch_ppc_registers): Call fetch_regset with
621 DSCR and PPR regsets.
622 (store_register, store_ppc_registers): Call store_regset with
623 DSCR and PPR regsets.
624 (ppc_linux_get_hwcap2): New function.
625 (ppc_linux_nat_target::read_description): Call
626 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
627 features struct if needed.
628 * ppc-linux-tdep.c: Include
629 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
630 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
631 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
632 (ppc32_linux_dscrregset): New globals.
633 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
634 and dscr regsets.
635 (ppc_linux_core_read_description): Check if the ppr and dscr
636 sections are present and set ppr_dscr in the features struct.
637 (_initialize_ppc_linux_tdep): Call
638 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
639 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
640 * ppc-linux-tdep.h (ppc32_linux_pprregset)
641 (ppc32_linux_dscrregset): Declare.
642 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
643 <ppc_dscr_regnum>: New field.
644 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
645 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
646 and dscr features.
647 (ppc_process_record_op31): Record changes to PPR and DSCR.
648
649 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
650
651 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
652 second initializer line for the have_* variables. Initialize
653 have_fpu to 0 instead of 1.
654
655 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
656
657 * arch/ppc-linux-common.c (ppc_linux_match_description):
658 Parenthesize tdesc assignements and indent them properly.
659
660 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
661
662 * ppc-linux-nat.c (fetch_register): Change if statement to else
663 if.
664 (store_register): Likewise.
665
666 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
667
668 * rs6000-tdep.c: Remove reggroups.h include.
669 (rs6000_pseudo_register_reggroup_p): Remove.
670 (rs6000_gdbarch_init): Remove call to
671 set_tdesc_pseudo_register_reggroup_p.
672
673 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
674
675 * reggroups.c (default_register_reggroup_p): Return true for
676 decfloat registers and float_reggroup.
677
678 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
679
680 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
681 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
682 ppc_linux_collect_vrregset by regcache_collect_regset.
683
684 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
685
686 * linux-tdep.c (linux_collect_regset_section_cb): Use
687 std::vector<gdb_byte> instead of char * and malloc for buf.
688 Remove xfree.
689
690 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
691
692 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
693 symtab_start instead of always using language_unknown.
694
695 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
696
697 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
698 READ_P parameter, catch and ignore register access errors from
699 either the old or new MISA location.
700 (riscv_has_feature): Update call to riscv_read_misa_reg.
701
702 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
703
704 * python/py-function.c (convert_values_to_python): Return
705 gdbpy_ref<>. Add header comment.
706 (fnpy_call): Adjust.
707
708 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
709
710 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
711 (cmdpy_completer_handle_brkchars): Adjust.
712 (cmdpy_completer): Adjust.
713
714 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
715
716 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
717 Pass correct regnum to raw_supply_zeroed.
718
719 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
720
721 * regcache.c (cooked_read_test): Add CSKY to the list of
722 architectures with a save_reggroup
723
724 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
725
726 PR gdb/23368
727 * infrun.c (follow_exec): In the follow_exec_mode_new case,
728 transfer terminal state from old new new inferior.
729 * terminal.h (swap_terminal_info): New function.
730 * inflow.c (swap_terminal_info): New function.
731
732 2018-10-23 Tom Tromey <tom@tromey.com>
733
734 * record-btrace.c (get_thread_current_frame_id): Rename from
735 get_thread_current_frame. Return a frame_id.
736 (record_btrace_start_replaying): Update.
737
738 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
739
740 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
741 for CSRs.
742
743 2018-10-23 Joel Brobecker <brobecker@adacore.com>
744
745 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
746 have_nonsteppable_watchpoint attribute to 1.
747
748 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
749
750 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
751 register names.
752 (struct register_alias): Rename to...
753 (struct riscv_register_alias): ...this, and update comment.
754 (riscv_register_aliases): Update type, and alias names. Remove
755 CSR names from this list.
756 (riscv_register_name): Use riscv_gdb_reg_names for int and float
757 register names. Add an extra assertion.
758 (riscv_is_regnum_a_named_csr): New function.
759 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
760
761 2018-10-22 Jim Wilson <jimw@sifive.com>
762
763 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
764 FP reg smaller than FP reg size, and fill with -1 instead of 0.
765
766 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
767 (riscv_register_type): Use them.
768 (riscv_print_one_register_info): Handle union of floats same as float.
769 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
770 riscv_fpreg_q_type fields.
771
772 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
773
774 * gdbarch.sh (gdbarch_num_cooked_regs): New.
775 * gdbarch.h: Re-generate.
776 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
777 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
778 * eval.c (evaluate_subexp_standard): Likewise.
779 * findvar.c (value_of_register): Likewise.
780 (value_of_register_lazy): Likewise.
781 (address_from_register): Likewise.
782 * frame.c (get_frame_register_bytes): Likewise.
783 * gdbarch-selftests.c (register_to_value_test): Likewise.
784 * h8300-tdep.c (h8300_register_type): Likewise.
785 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
786 (i386_svr4_reg_to_regnum): Likewise.
787 * infcmd.c (default_print_registers_info): Likewise.
788 (registers_info): Likewise.
789 (print_vector_info): Likewise.
790 (default_print_float_info): Likewise.
791 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
792 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
793 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
794 (mi_cmd_data_list_changed_registers): Likewise.
795 (mi_cmd_data_list_register_values): Likewise.
796 (mi_cmd_data_write_register_values): Likewise.
797 (mi_cmd_trace_frame_collected): Likewise.
798 * mips-tdep.c (print_gp_register_row): Likewise.
799 (mips_print_registers_info): Likewise.
800 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
801 * regcache.c (init_regcache_descr): Likewise.
802 (register_size): Likewise.
803 (register_dump::dump): Likewise.
804 (cooked_read_test): Likewise.
805 (cooked_write_test): Likewise.
806 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
807 (rs6000_gdbarch_init): Likewise.
808 * stabsread.c (stab_reg_to_regnum): Likewise.
809 * stack.c (info_frame_command): Likewise.
810 * target-descriptions.c (tdesc_register_name): Likewise.
811 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
812 * tui/tui-regs.c (tui_show_register_group): Likewise.
813 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
814 (user_reg_map_regnum_to_name): Likewise.
815 (value_of_user_reg): Likewise.
816 (maintenance_print_user_registers): Likewise.
817 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
818 (xtensa_register_name): Likewise.
819 (xtensa_register_type): Likewise.
820 (xtensa_reg_to_regnum): Likewise.
821 (xtensa_pseudo_register_read): Likewise.
822 (xtensa_pseudo_register_write): Likewise.
823
824 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
825
826 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
827 correctly-sized buffer with raw_read.
828 (amd64_pseudo_register_write): Use correctly-sized buffer for
829 raw_read/raw_write.
830
831 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
832
833 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
834 in add_prefix_cmd of set print type.
835
836 2018-10-19 Tom Tromey <tom@tromey.com>
837
838 PR tui/18388:
839 * NEWS: Mention tabset deprecation.
840 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
841 (update_tab_width): New function.
842 (tui_set_tab_width, tui_show_tab_width): New functions.
843 (tui_set_tab_width_command): Use update_tab_width.
844 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
845 Add new "set tui tab-width" command.
846 * tui/tui-source.c (tui_set_source_content): Update.
847 * tui/tui-disasm.c (tui_set_disassem_content): Update.
848 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
849 Don't declare.
850 (tui_tab_width): Declare.
851 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
852 (tui_set_default_tab_len): Remove.
853
854 2018-10-19 Tom Tromey <tom@tromey.com>
855
856 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
857 (key_is_backspace, tui_getc): Don't declare.
858 * tui/tui-io.c (key_is_start_sequence): Now static.
859 (key_is_end_sequence, key_is_backspace): Remove.
860 (tui_getc): Now static.
861
862 2018-10-19 Tom Tromey <tom@tromey.com>
863
864 * symfile.c (reread_symbols): Clear "static_links".
865
866 2018-10-19 Alan Hayward <alan.hayward@arm.com>
867
868 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
869 define.
870 (aarch64_linux_sigframe_init): Extra boundary checks.
871
872 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
873
874 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
875 the possibly non-existent tdesc type 'vec128', but the type of raw
876 register v16 instead.
877
878 2018-10-19 Gary Benson <gbenson@redhat.com>
879
880 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
881
882 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
883
884 PR cli/23785
885 * cli/cli-dump.c (restore_binary_file): Check if "file" is
886 NULL.
887
888 2018-10-17 Paul Koning <paul_koning@dell.com>
889
890 * charset.c (convert_between_encodings): Fix unsigned overflow.
891
892 2018-10-17 John Baldwin <jhb@FreeBSD.org>
893
894 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
895 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
896 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
897 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
898 New functions.
899 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
900 and fbsd_info_proc_mappings_header.
901 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
902 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
903 New.
904
905 2018-10-17 Joel Brobecker <brobecker@adacore.com>
906
907 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
908 Solaris Maintainer.
909
910 2018-10-15 Tom Tromey <tom@tromey.com>
911
912 * tui/tui.c (strcat_to_buf): Remove casts.
913 * tui/tui-winsource.c (tui_show_source_line)
914 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
915 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
916 * tui/tui-windata.c (tui_first_data_item_displayed)
917 (tui_delete_data_content_windows, tui_erase_data_content)
918 (tui_display_all_data, tui_display_data_from)
919 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
920 * tui/tui-win.c (tui_set_win_height)
921 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
922 casts.
923 * tui/tui-win.c (tui_resize_all): Remove casts.
924 (tui_scroll_backward_command, tui_set_focus)
925 (tui_set_tab_width_command): Likewise.
926 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
927 * tui/tui-regs.c (tui_show_register_group): Remove cast.
928 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
929 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
930 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
931 Remove casts.
932
933 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
934
935 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
936 AArch64/ARM maintainer.
937
938 2018-10-11 Gary Benson <gbenson@redhat.com>
939
940 * interps.h (interp::m_name): Make private and mutable.
941 * interps.c (interp::~interp): Free m_name.
942
943 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
944 Simon Marchi <simark@simark.ca>
945
946 * README (`configure' options): Add documentation for new
947 "--enable-unit-tests" option.
948 * acinclude.m4: Include "selftest.m4".
949 * configure: Regenerate.
950 * configure.ac: Use "GDB_AC_SELFTEST".
951 * maint.c (maintenance_selftest): Update message informing
952 that selftests have been disabled.
953 (maintenance_info_selftests): Likewise.
954 * selftest.m4: New file.
955
956 2018-10-10 Gary Benson <gbenson@redhat.com>
957
958 * remote.c (remote_target::remote_send_printf): Add
959 missing va_end found by Coverity.
960
961 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
962
963 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
964
965 2018-10-09 Tom Tromey <tom@tromey.com>
966
967 * configure: Rebuild.
968 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
969 * NEWS: Update --enable-ubsan documentation.
970
971 2018-10-09 Gary Benson <gbenson@redhat.com>
972
973 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
974 found by Coverity.
975
976 2018-10-08 Tom Tromey <tom@tromey.com>
977
978 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
979 variable.
980 (riscv_fbsd_init_abi): Likewise.
981
982 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
983 * valops.c (value_struct_elt_for_reference): Rename local variable
984 to work around the shadowing a previous local warning.
985
986 2018-10-08 John Baldwin <jhb@FreeBSD.org>
987
988 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
989 * NEWS: Mention new FreeBSD/riscv native configuration.
990 * configure.host: Add riscv*-*-freebsd*.
991 * configure.nat: Likewise.
992 * riscv-fbsd-nat.c: New file.
993
994 2018-10-08 John Baldwin <jhb@FreeBSD.org>
995
996 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
997 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
998 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
999 * NEWS: Mention new FreeBSD/riscv target.
1000 * configure.tgt: Add riscv*-*-freebsd*.
1001 * riscv-fbsd-tdep.c: New file.
1002 * riscv-fbsd-tdep.h: New file.
1003
1004 2018-10-08 John Baldwin <jhb@FreeBSD.org>
1005
1006 * regcache.h (struct regcache_map_entry): Note that this type can
1007 be used with traditional frame caches.
1008 * trad-frame.c (trad_frame_set_reg_regmap): New.
1009 * trad-frame.h (trad_frame_set_reg_regmap): New.
1010
1011 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
1012
1013 PR c++/16841
1014 * valops.c (get_virtual_base_offset): New function.
1015 (value_struct_elt_for_reference): Use it to get virtual base offset
1016 and add it in calculating class member address.
1017
1018 2018-10-08 John Darrington <john@darrington.wattle.id.au>
1019
1020 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1021 (check_producer): Check if the producer is codewarrior.
1022 (producer_is_codewarrior): New function.
1023 (lnp_state_machine::record_line): Ignore is_stmt flag for records
1024 produced by codewarrior.
1025 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1026
1027 2018-10-06 Tom Tromey <tom@tromey.com>
1028
1029 PR python/19399:
1030 * python/py-inferior.c: Add "architecture" entry.
1031 (infpy_architecture): New function.
1032
1033 2018-10-06 Tom Tromey <tom@tromey.com>
1034
1035 PR python/21765:
1036 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1037 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1038 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
1039 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1040
1041 2018-10-06 Tom Tromey <tom@tromey.com>
1042
1043 PR build/17077:
1044 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1045 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1046 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1047 #include.
1048
1049 2018-10-06 Tom Tromey <tom@tromey.com>
1050
1051 * python/py-breakpoint.c (bppy_get_location): Handle a
1052 bp_breakpoint without a location.
1053
1054 2018-10-06 Tom Tromey <tom@tromey.com>
1055
1056 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1057 (_RegEx): Reformat help text.
1058 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1059 (AnyCallerIs, AnyCallerMatches): Reformat help text.
1060 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1061 text.
1062 * python/lib/gdb/command/xmethods.py (InfoXMethod)
1063 (EnableXMethod, DisableXMethod): Remove help indentation.
1064 Capitalize meta-syntactic variables.
1065 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1066 (EnableUnwinder, DisableUnwinder): Remove help indentation.
1067 Capitalize meta-syntactic variables.
1068 * python/lib/gdb/command/explore.py (ExploreCommand)
1069 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1070 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1071 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1072 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1073 Remove help indentation.
1074 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1075 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1076 (DisableFrameFilter, SetFrameFilterPriority)
1077 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1078
1079 2018-10-06 Tom Tromey <tom@tromey.com>
1080
1081 PR tui/28819:
1082 * tui/tui-io.c (gdb_wgetch): New function.
1083 (tui_mld_getc, tui_getc): Use it.
1084
1085 2018-10-05 Tom Tromey <tom@tromey.com>
1086
1087 * sol-thread.c (sol_thread_target::wait): Rename inner
1088 "save_ptid".
1089
1090 2018-10-04 Tom Tromey <tom@tromey.com>
1091
1092 * configure: Rebuild.
1093 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1094
1095 2018-10-04 Tom Tromey <tom@tromey.com>
1096
1097 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1098 declaration of "block".
1099
1100 2018-10-04 Tom Tromey <tom@tromey.com>
1101
1102 * common/filestuff.c (fdwalk): Remove inner declaration of
1103 "result".
1104
1105 2018-10-04 Tom Tromey <tom@tromey.com>
1106
1107 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1108 "structs_addr" and hoist declaration.
1109
1110 2018-10-04 Tom Tromey <tom@tromey.com>
1111
1112 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1113 variable "size".
1114
1115 2018-10-04 Tom Tromey <tom@tromey.com>
1116
1117 * mdebugread.c (parse_partial_symbols): Use std::string.
1118
1119 2018-10-04 Tom Tromey <tom@tromey.com>
1120
1121 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1122 * p-valprint.c (pascal_val_print): Split inner "i" variable.
1123 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1124 header.
1125 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1126 more inner scope.
1127 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1128 * varobj.c (varobj_update): Rename inner "newobj",
1129 "type_changed".
1130 * valprint.c (generic_emit_char): Rename inner "buf".
1131 * valops.c (find_overload_match): Rename inner "temp".
1132 (value_struct_elt_for_reference): Declare "v" in more inner
1133 scope.
1134 * v850-tdep.c (v850_push_dummy_call): Rename "len".
1135 * unittests/array-view-selftests.c (run_tests): Rename inner
1136 "vec".
1137 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1138 header.
1139 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1140 "tsv" in more inner scope.
1141 (print_one_static_tracepoint_marker): Rename inner
1142 "tuple_emitter".
1143 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1144 (tic6x_push_dummy_call): Don't redeclare "addr".
1145 * target-float.c: Declare "dto" lower.
1146 * symtab.c (lookup_local_symbol): Rename inner "sym".
1147 (find_pc_sect_line): Rename inner "pc".
1148 * stack.c (print_frame): Don't redeclare "gdbarch".
1149 (return_command): Rename inner "gdbarch".
1150 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1151 "sp".
1152 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1153 header.
1154 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1155 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1156 scope.
1157 * remote.c (remote_target::update_thread_list): Don't redeclare
1158 "tp".
1159 (remote_target::process_initial_stop_replies): Rename inner
1160 "thread".
1161 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1162 (remote_target::wait_as): Don't redeclare "stop_reply".
1163 (remote_target::get_thread_local_address): Rename inner
1164 "result".
1165 (remote_target::get_tib_address): Likewise.
1166
1167 * regcache.c (cooked_read_test): Rename "regnum".
1168 * record-btrace.c (cmd_record_btrace_start): Rename inner
1169 "exception".
1170 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1171 loop header.
1172 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1173 header.
1174 (ppu2spu_sniffer): Rename inner "buf".
1175 * parse.c (operator_check_standard): Rename inner "type",
1176 "objfile".
1177 * p-valprint.c (pascal_val_print): Introduce new scope for
1178 "low_bound", "high_bound".
1179 * p-exp.y (yylex): Declare "i" in loop header.
1180 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1181 Lower declaration of "s".
1182 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1183 header.
1184 (nios2_push_dummy_call): Rename "len".
1185 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1186 "buf".
1187 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1188 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1189 (linux_xfer_osdata_modules): Likewise.
1190 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1191 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1192 (mips_o64_push_dummy_call): Likewise.
1193 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1194 "op".
1195 * mi/mi-main.c (list_available_thread_groups): Rename inner
1196 "tuple_emitter".
1197 (mi_cmd_data_read_memory): Rename inner "opts".
1198 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1199 "tuple_emitter".
1200 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1201 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
1202 more inner scope.
1203 (parse_partial_symbols): Rename inner "pst", "p", "name"
1204 * main.c (captured_main_1): Rename inner "i"s.
1205 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1206 "oso2".
1207 * linux-tdep.c (linux_info_proc): Rename inner "filename".
1208 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1209 * infrun.c (handle_no_resumed): Don't redeclare "thread".
1210 (handle_signal_stop): Rename inner "gdbarch".
1211 (handle_command): Declare "signum" in loop header.
1212 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1213 "status".
1214 (examine_prologue): Rename inner "sol" and "sof".
1215 (ia64_extract_return_value): Rename inner "val". Declare another
1216 "val" in a more inner scope.
1217 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1218 inner scope.
1219 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1220 "except".
1221 * findvar.c (default_read_var_value): Don't redeclare "addr".
1222 * f-exp.y (yylex): Declare "i" in loop header.
1223 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1224 Rename inner "type", "expect_type".
1225 (evaluate_subexp_for_sizeof): Rename inner "pc".
1226 * elfread.c (elf_symfile_read): Rename inner "abfd".
1227 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1228 "bytes_read".
1229 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1230 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1231 (dwarf_decode_line_header): Rename inner "lh".
1232 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1233 "offset". Declare "i" in loop header.
1234 (disassemble_dwarf_expression): Rename inner "addr_size".
1235 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1236 inner "result".
1237 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1238 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1239 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1240 "inner_list_emitter".
1241 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1242 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1243 declaration in a block.
1244 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1245 * cp-valprint.c (cp_print_value_fields): Don't redeclare
1246 "obstack_final_size".
1247 * cp-support.c (inspect_type): Declare "i" in loop header.
1248 * compile/compile.c (compile_instance::insert_symbol_error):
1249 Rename inner "e".
1250 * common/agent.c (agent_run_command): Remove inner "ret"
1251 declaration.
1252 * coffread.c (coff_symfile_read): Rename inner "name".
1253 (coff_symfile_read): Rename inner "abfd".
1254 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1255 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1256 "high".
1257 * c-exp.y (lex_one_token): Move "len" declaration lower.
1258 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1259 "gdbarch".
1260 (create_exception_master_breakpoint): Likewise. Don't redeclare
1261 "b".
1262 (watch_command_1): Declare "mark" later.
1263 (clear_command): Don't shadow "a" or "b".
1264 (delete_command): Rename inner "b".
1265 (delete_trace_command): Likewise.
1266 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1267 "op".
1268 (arm_gdbarch_init): Remove inner "e_flags".
1269 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1270 "offset" in inner blocks.
1271
1272 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
1273
1274 * dwarf-index-write.c (file_write): Don't write if the vector is
1275 empty.
1276
1277 2018-10-05 Tom de Vries <tdevries@suse.de>
1278
1279 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1280 PyArg_ParseTuple call.
1281
1282 2018-10-05 Tom de Vries <tdevries@suse.de>
1283
1284 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1285 PyArg_ParseTuple call.
1286
1287 2018-10-04 Joel Brobecker <brobecker@adacore.com>
1288
1289 * psymtab.c (recursively_search_psymtabs): Reformat parameters
1290 to avoid exceeding 80 characters per line limit.
1291
1292 2018-10-04 Tom Tromey <tom@tromey.com>
1293
1294 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1295 (reread_symbols): Update.
1296 * complaints.h (clear_complaints): Remove argument.
1297 * complaints.c (enum complaint_series): Remove.
1298 (series): Remove global.
1299 (complaint_internal): Update.
1300 (clear_complaints): Remove argument.
1301
1302 2018-10-04 Tom Tromey <tom@tromey.com>
1303
1304 * symfile.c (symbol_file_add_with_addrs): Do not print "no
1305 debugging symbols" message if there is a separate debug objfile.
1306
1307 2018-10-04 Tom Tromey <tom@tromey.com>
1308
1309 PR cli/19551:
1310 * symfile.c (symbol_file_add_with_addrs): Update output.
1311 * psymtab.c (require_partial_symbols): Update output.
1312
1313 2018-10-04 Tom Tromey <tom@tromey.com>
1314
1315 PR cli/22234:
1316 * complaints.c: Emit \n.
1317
1318 2018-10-04 Tom Tromey <tom@tromey.com>
1319
1320 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1321 (separate_debug_file_exists, find_separate_debug_file)
1322 (add_symbol_file_command, reread_symbols, allocate_symtab)
1323 (allocate_compunit_symtab): Use filtered printing, not
1324 unfiltered.
1325 * psymtab.c (require_partial_symbols, dump_psymtab)
1326 (allocate_psymtab): Use filtered printing, not unfiltered.
1327
1328 2018-10-04 Tom Tromey <tom@tromey.com>
1329
1330 * complaints.c (complaint_internal): Correctly check complaint
1331 count.
1332
1333 2018-10-04 Tom Tromey <tom@tromey.com>
1334
1335 * complaints.h (struct complaints): Remove declaration.
1336 * complaints.c (clear_complaints): Remove an unused variable.
1337
1338 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1339
1340 * MAINTAINERS (Write After Approval): Add self.
1341
1342 2018-10-03 Tom Tromey <tom@tromey.com>
1343
1344 * guile/scm-value.c (gdbscm_value_to_string): Initialize
1345 "buffer_contents".
1346 * coffread.c (coff_symtab_read): Initialize "newobj".
1347
1348 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
1349
1350 * dwarf2read.c (read_func_scope): Remove struct keyword in
1351 range-based for.
1352
1353 2018-10-03 Tom Tromey <tom@tromey.com>
1354
1355 * README: Mention --enable-ubsan.
1356 * NEWS: Mention --enable-ubsan.
1357 * acinclude.m4: Include sanitize.m4.
1358 * configure: Rebuild.
1359 * configure.ac: Call AM_GDB_UBSAN.
1360 * sanitize.m4: New file.
1361
1362 2018-10-03 Tom Tromey <tom@tromey.com>
1363
1364 * expression.h (enum exp_opcode): Use uint8_t as base type.
1365 * expprint.c (op_name): Handle invalid opcodes.
1366
1367 2018-10-03 Tom Tromey <tom@tromey.com>
1368
1369 * parse.c (prefixify_expression): Add assert.
1370 (parse_exp_in_context_1): Throw exception if the expression is
1371 empty.
1372
1373 2018-10-03 Tom Tromey <tom@tromey.com>
1374
1375 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1376
1377 2018-10-03 Tom Tromey <tom@tromey.com>
1378
1379 * c-exp.y (parse_number): Work in unsigned. Remove casts.
1380
1381 2018-10-03 Tom Tromey <tom@tromey.com>
1382
1383 * dwarf2read.c (read_subrange_type): Make "negative_mask"
1384 unsigned.
1385
1386 2018-10-03 Tom Tromey <tom@tromey.com>
1387
1388 * findvar.c (extract_integer): Do work in an unsigned type.
1389
1390 2018-10-03 Tom Tromey <tom@tromey.com>
1391
1392 * common/enum-flags.h (enum_flags::operator~): Add static assert.
1393 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1394 base type.
1395 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1396 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1397 type.
1398 * c-lang.h (enum c_string_type_values): Use unsigned as base
1399 type.
1400 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1401
1402 2018-10-03 Tom Tromey <tom@tromey.com>
1403
1404 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1405 <~dwarf2_frame_state_reg_info>: Update.
1406 <dwarf2_frame_state_reg_info>: Update.
1407 <alloc_regs>: Add assertion. Update.
1408 <reg>: Now a std::vector.
1409 <num_regs>: Remove.
1410 <swap>: Update.
1411 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1412 (execute_cfa_program_test, dwarf2_frame_cache): Update.
1413
1414 2018-10-03 Tom Tromey <tom@tromey.com>
1415
1416 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1417
1418 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1419
1420 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1421
1422 2018-10-02 Tom Tromey <tom@tromey.com>
1423
1424 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1425
1426 2018-10-02 John Darrington <john@darrington.wattle.id.au>
1427
1428 * NEWS: Mention changed commands.
1429 * ser-uds.c: New file.
1430 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1431 * configure: Regenerate.
1432 * Makefile.in: Add new file.
1433 * serial.c (serial_open): Check if filename is a socket
1434 and lookup the appropriate interface accordingly.
1435
1436 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1437
1438 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1439 define.
1440 (AARCH64_EXTRA_MAGIC): Likewise.
1441 (AARCH64_FPSIMD_MAGIC): Likewise.
1442 (AARCH64_SVE_MAGIC): Likewise.
1443 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1444 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1445 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1446 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1447 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1448 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1449 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1450 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1451 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1452 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1453 (read_aarch64_ctx): Add function.
1454 (aarch64_linux_sigframe_init): Detect FP registers.
1455
1456 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1457
1458 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1459 (AARCH64_D0_REGNUM): Likewise.
1460 (AARCH64_S0_REGNUM): Likewise.
1461 (AARCH64_H0_REGNUM): Likewise.
1462 (AARCH64_B0_REGNUM): Likewise.
1463 (AARCH64_SVE_V0_REGNUM): Likewise.
1464 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1465 (AARCH64_D0_REGNUM): Likewise.
1466 (AARCH64_S0_REGNUM): Likewise.
1467 (AARCH64_H0_REGNUM): Likewise.
1468 (AARCH64_B0_REGNUM): Likewise.
1469 (AARCH64_SVE_V0_REGNUM): Likewise.
1470
1471 2018-10-01 Gary Benson <gbenson@redhat.com>
1472
1473 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1474 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1475 prfpregset_t instead of gdb_prfpregset_t.
1476 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1477 * configure, config.in: Rebuild.
1478
1479 2018-10-01 Gary Benson <gbenson@redhat.com>
1480
1481 * common/gdb_proc_service.h: New file, factored out from...
1482 * gdb_proc_service.h: Moved common code to the above file.
1483 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1484
1485 2018-10-01 Gary Benson <gbenson@redhat.com>
1486
1487 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1488 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
1489
1490 2018-10-01 Gary Benson <gbenson@redhat.com>
1491
1492 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1493 (AC_CHECK_HEADERS): Check for linux/elf.h.
1494 * configure, config.in: Rebuild.
1495 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1496 doesn't define elf_fpregset_t.
1497
1498 2018-10-01 Gary Benson <gbenson@redhat.com>
1499
1500 * gdb_proc_service.h: Whitespace change.
1501
1502 2018-10-01 Tom Tromey <tom@tromey.com>
1503
1504 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1505 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1506 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1507
1508 2018-10-01 Tom Tromey <tom@tromey.com>
1509
1510 * README: Minor change.
1511
1512 2018-09-30 Pedro Alves <palves@redhat.com>
1513
1514 * darwin-nat-info.c (darwin_debug_regions_recurse)
1515 (info_mach_exceptions_command): Remove unused local variables.
1516 * darwin-nat.c (darwin_decode_notify_message)
1517 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1518 (darwin_stop_inferior, darwin_setup_exceptions)
1519 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1520 (darwin_nat_target::attach, darwin_nat_target::detach)
1521 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1522 local variables.
1523 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1524 variables.
1525
1526 2018-09-29 Tom Tromey <tom@tromey.com>
1527
1528 * README: Remove some leftover text.
1529
1530 2018-09-29 Tom Tromey <tom@tromey.com>
1531
1532 * PROBLEMS: Rewrite.
1533 * README: Update.
1534
1535 2018-09-28 John Baldwin <jhb@FreeBSD.org>
1536
1537 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1538 case with explicit breakpoint kind.
1539 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1540 'additional_info' and related logic.
1541 (riscv_debug_breakpoints): New variable.
1542 (riscv_breakpoint_kind_from_pc): Use the length of the existing
1543 instruction to determine the breakpoint kind.
1544 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1545 flag. Update description of 'set/show riscv
1546 use-compressed-breakpoints' flag.
1547
1548 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
1549
1550 (NEWS): Mention changes to frame related commands.
1551 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1552 (add_prefix_cmd_suppress_notification): New function.
1553 (add_com_suppress_notification): Call
1554 add_cmd_suppress_notification.
1555 * command.h (add_cmd_suppress_notification): Declare.
1556 (add_prefix_cmd_suppress_notification): Declare.
1557 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1558 (parse_frame_specification): Moved from stack.c, with
1559 simplification to handle a single argument.
1560 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1561 switch to the selected frame. Add a header comment.
1562 * stack.c: Remove 'safe-ctype.h' include.
1563 (find_frame_for_function): Add declaration.
1564 (find_frame_for_address): New function.
1565 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1566 (frame_selection_by_function_completer): New function.
1567 (info_frame_command): Rename to...
1568 (info_frame_command_core): ...this, and update parameter types.
1569 (select_frame_command): Rename to...
1570 (select_frame_command_core): ...this, and update parameter types.
1571 (frame_command): Rename to...
1572 (frame_command_core): ...this, and update parameter types.
1573 (class frame_command_helper): New class to wrap implementations of
1574 frame related sub-commands.
1575 (frame_apply_cmd_list): New static global.
1576 (frame_cmd_list): Make static.
1577 (select_frame_cmd_list): New global for sub-commands.
1578 (info_frame_cmd_list): New global for sub-commands.
1579 (_initialize_stack): Register sub-commands for 'frame',
1580 'select-frame', and 'info frame'. Update 'frame apply' commands
1581 to use frame_apply_cmd_list. Move function local static
1582 frame_apply_list to file static frame_apply_cmd_list for
1583 consistency.
1584 * stack.h (select_frame_command): Delete declarationn.
1585 (select_frame_for_mi): Declare new function.
1586
1587 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
1588
1589 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1590 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1591 and NOP.
1592
1593 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
1594
1595 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1596
1597 2018-09-26 Tom Tromey <tom@tromey.com>
1598
1599 * valops.c (auto_abandon): Remove dead code.
1600
1601 2018-09-26 Tom Tromey <tom@tromey.com>
1602
1603 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1604
1605 2018-09-24 Tom Tromey <tom@tromey.com>
1606
1607 * common/pathstuff.c (get_standard_cache_dir): Make
1608 "xdg_cache_home" and "home" const.
1609 * top.c (init_history): Make "tmpenv" const.
1610 * main.c (get_init_files): Make "homedir" const.
1611
1612 2018-09-23 Tom Tromey <tom@tromey.com>
1613
1614 PR python/18852:
1615 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1616
1617 2018-09-23 Tom Tromey <tom@tromey.com>
1618
1619 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1620 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1621 * python/python-internal.h (gdbpy_handle_exception): Declare.
1622 * python/py-utils.c (gdbpy_handle_exception): New function.
1623
1624 2018-09-23 Tom Tromey <tom@tromey.com>
1625
1626 PR python/17284:
1627 * python/py-type.c (typy_template_argument): Check for negative
1628 argument number.
1629
1630 2018-09-23 Tom Tromey <tom@tromey.com>
1631
1632 PR python/14062:
1633 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1634
1635 2018-09-23 Tom Tromey <tom@tromey.com>
1636
1637 PR python/18170:
1638 * python/py-value.c (valpy_int): Allow conversion from pointer
1639 type.
1640
1641 2018-09-23 Tom Tromey <tom@tromey.com>
1642
1643 PR python/20126:
1644 * python/py-value.c (valpy_int): Respect type sign.
1645
1646 2018-09-23 Tom Tromey <tom@tromey.com>
1647
1648 PR python/18352;
1649 * python/py-value.c (valpy_float): Allow conversions from int or
1650 char.
1651 (valpy_int, valpy_long): Allow conversions from float.
1652
1653 2018-09-23 Tom Tromey <tom@tromey.com>
1654
1655 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1656 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1657
1658 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1659
1660 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1661 __sighndlr.
1662 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1663
1664 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
1665
1666 * windows-nat.c (windows_nat_target::wait): Remove a spurious
1667 target_terminal::ours().
1668
1669 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
1670
1671 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1672 of vl to ULONGEST.
1673
1674 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
1675
1676 * breakpoint.c (update_inserted_breakpoint_locations): Remove
1677 redundant condition.
1678
1679 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1680
1681 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1682
1683 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1684 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
1685 * sol-thread.c (ps_pdmodel): Don't guard definition.
1686
1687 * procfs.c: Fix formatting.
1688
1689 * procfs.c (sysset_t_alloc): Remove.
1690 (create_procinfo): Use XNEW instead of sysset_t_alloc.
1691 (procfs_debug_inferior): Likewise.
1692 (procfs_set_exec_trap): Likewise.
1693 (proc_set_traced_sysentry): Don't allocate argp dynamically.
1694 (proc_set_traced_sysexit): Likewise.
1695
1696 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1697 (dead_procinfo): Likewise.
1698 (proc_warn): Likewise.
1699 (proc_error): Likewise.
1700 (proc_get_LDT_entry): Likewise.
1701 (do_attach): Likewise.
1702 (procfs_target::pid_to_str): Likewise.
1703 (iterate_over_mappings): Likewise.
1704
1705 * procfs.c (create_procinfo): Fix ARI warning.
1706 (proc_get_status): Likewise.
1707 (proc_stop_process): Likewise.
1708 (proc_run_process): Likewise.
1709 (proc_kill): Likewise.
1710 (proc_get_LDT_entry): Likewise.
1711 (procfs_find_LDT_entry): Likewise.
1712 (proc_update_threads): Likewise.
1713 (proc_iterate_over_threads): Likewise.
1714 (do_attach): Likewise.
1715 (procfs_xfer_memory): Likewise.
1716 (invalidate_cache): Likewise.
1717 (procfs_target::resume): Likewise.
1718 (procfs_init_inferior): Likewise.
1719 (procfs_set_exec_trap): Likewise.
1720 (procfs_target::thread_alive): Likewise.
1721 (procfs_target::pid_to_exec_file): Likewise.
1722 (iterate_over_mappings): Likewise.
1723 (procfs_target::make_corefile_notes): Likewise.
1724 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1725
1726 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1727 (procfs_find_LDT_entry): Likewise.
1728 * sol-thread.c (ps_lgetLDT): Likewise.
1729
1730 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1731
1732 PR tdep/17903
1733 * procfs.c (procfs_target): Declare pid_to_exec_file.
1734 (procfs_target::pid_to_exec_file): New.
1735
1736 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1737
1738 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1739 renaming.
1740 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1741 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1742
1743 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1744
1745 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1746 (supply_fpregset, fill_fpregset): Move ...
1747 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1748 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1749 Remove references to ioctl-based procfs.
1750 Include <sys/reg.h>.
1751 Remove PR_MODEL_NATIVE guards.
1752 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1753 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1754
1755 2018-09-19 Xavier Roirand <roirand@adacore.com>
1756
1757 PR gdb/20981:
1758 * solib-darwin.c (darwin_get_dyld_bfd): New function.
1759 (darwin_solib_get_all_image_info_addr_at_init): Update call.
1760 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1761
1762 2018-09-19 John Baldwin <jhb@FreeBSD.org>
1763
1764 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1765 (fbsd_print_sockaddr_in6): Likewise.
1766
1767 2018-09-19 Richard Bunt <richard.bunt@arm.com>
1768 Chris January <chris.january@arm.com>
1769
1770 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1771 (evaluate_subexp_standard): Return a dummy type when
1772 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1773 OP_F77_UNDETERMINED_ARGLIST case.
1774 * expression.h (enum noside): Update comment.
1775
1776 2018-09-19 George Vasick <george.vasick@oracle.com>
1777
1778 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1779
1780 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1781 April Chin <april.chin@oracle.com>
1782 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1783
1784 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1785 uint_t lwpid_t.
1786 (create_procinfo): Print pids in /proc without leading zeros.
1787
1788 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1789
1790 * nios2-tdep.c (nios2_gcc_target_options): New.
1791 (nios2_gdb_arch_init): Install new hook.
1792
1793 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1794
1795 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1796 New file.
1797 * update-gnulib.sh: Apply patch.
1798 * configure: Re-generate.
1799
1800 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1801
1802 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1803 description. Make "info proc" command descriptions more
1804 consistent.
1805
1806 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1807
1808 * NEWS: Mention 'info proc files' command.
1809
1810 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1811
1812 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1813 descriptors for IP_FILES and IP_ALL.
1814
1815 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1816
1817 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1818 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1819 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1820 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1821 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1822 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1823 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1824 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1825 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1826 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1827 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1828 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1829 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1830 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1831 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1832 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1833 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1834 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1835 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1836 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1837 (struct fbsd_sockaddr_un): New types.
1838 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1839 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1840 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1841 (fbsd_core_info_proc_files): New functions.
1842 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1843 IP_ALL.
1844 * fbsd-tdep.h (fbsd_info_proc_files_header)
1845 (fbsd_info_proc_files_entry): New.
1846
1847 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1848
1849 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1850 * infcmd.c (info_proc_cmd_files): New function.
1851 (_initialize_infcmd): Register 'info proc files' command.
1852
1853 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1854
1855 * gnulib/aclocal-m4-deps.mk: Re-generate.
1856 * gnulib/aclocal.m4: Re-generate.
1857 * gnulib/config.in: Re-generate.
1858 * gnulib/configure: Re-generate.
1859 * gnulib/import/Makefile.am: Re-generate.
1860 * gnulib/import/Makefile.in: Re-generate.
1861 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1862 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1863 * gnulib/import/arpa_inet.in.h: New file.
1864 * gnulib/import/inet_ntop.c: New file.
1865 * gnulib/import/m4/arpa_inet_h.m4: New file.
1866 * gnulib/import/m4/inet_ntop.m4: New file.
1867 * gnulib/import/m4/netinet_in_h.m4: New file.
1868 * gnulib/import/m4/socklen.m4: New file.
1869 * gnulib/import/m4/sockpfaf.m4: New file.
1870 * gnulib/import/m4/stdalign.m4: New file.
1871 * gnulib/import/m4/sys_uio_h.m4: New file.
1872 * gnulib/import/netinet_in.in.h: New file.
1873 * gnulib/import/stdalign.in.h: New file.
1874 * gnulib/import/sys_socket.c: New file.
1875 * gnulib/import/sys_socket.in.h: New file.
1876 * gnulib/import/sys_uio.in.h: New file.
1877 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1878 module.
1879
1880 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1881
1882 * gnulib/aclocal-m4-deps.mk: New file.
1883 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1884 deterministically.
1885
1886 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1887
1888 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1889 KVE_PATH.
1890
1891 2018-09-18 Tom Tromey <tom@tromey.com>
1892
1893 * compile/compile-object-load.c (struct
1894 link_hash_table_cleanup_data): Add constructor and destructor.
1895 Use DISABLE_COPY_AND_ASSIGN.
1896 (~link_hash_table_cleanup_data): Rename from
1897 link_hash_table_free. Now a destructor.
1898 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1899
1900 2018-09-18 Tom Tromey <tom@tromey.com>
1901
1902 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1903 * compile/compile-object-load.c (struct munmap_list): Move to
1904 header file.
1905 (munmap_list::add): Rename from munmap_list_add; rewrite.
1906 (munmap_list::~munmap_list): Rename from munmap_list_free.
1907 (munmap_listp_free_cleanup): Remove.
1908 (compile_object_load): Update.
1909 * compile/compile-object-load.h (struct munmap_list): Move from
1910 compile-object-load.c. Rewrite.
1911
1912 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1913
1914 * aarch64-tdep.c (pass_in_v): Use register size.
1915 (aarch64_extract_return_value): Likewise.
1916 (aarch64_store_return_value): Likewise.
1917
1918 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1919
1920 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1921 rlim_t.
1922
1923 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1924
1925 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1926 Fix short help line.
1927
1928 2018-09-17 Tom Tromey <tom@tromey.com>
1929
1930 PR python/20445:
1931 * configure: Rebuild.
1932 * configure.ac: Conditionally use -DNDEBUG for Python.
1933
1934 2018-09-17 Tom Tromey <tom@tromey.com>
1935
1936 * configure: Rebuild.
1937 * configure.ac: Use gmp as a library dependency when checking for
1938 mpfr.
1939
1940 2018-09-17 Pedro Alves <palves@redhat.com>
1941
1942 * python/py-inferior.c (find_inferior_object): Delete.
1943
1944 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1945
1946 * compile/compile-cplus-types.c
1947 (compile_cplus_instance::enter_scope): Don't use new_scope after
1948 std::move.
1949
1950 2018-09-17 Tom Tromey <tom@tromey.com>
1951
1952 * common/pathstuff.c (get_standard_cache_dir): Use
1953 ~/Library/Caches on macOS.
1954 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1955
1956 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1957
1958 PR python/23669
1959 * breakpoint.c (commands_cmd_element): New.
1960 (_initialize_breakpoint): Assign commands_cmd_element.
1961 * breakpoint.h (commands_cmd_element): New.
1962 * cli/cli-script.c (while_cmd_element, if_command,
1963 define_cmd_element): New.
1964 (command_name_equals): Remove.
1965 (process_next_line): Compare commands by pointer, not by name.
1966 (_initialize_cli_script): Assign the various cmd_list_element
1967 variables.
1968 * compile/compile.c (compile_cmd_element): New.
1969 (_initialize_compile): Assign compile_cmd_element.
1970 * compile/compile.h (compile_cmd_element): New.
1971 * guile/guile.c (guile_cmd_element): New.
1972 (install_gdb_commands): Assign guile_cmd_element.
1973 * guile/guile.h (guile_cmd_element): New.
1974 * python/python.c (python_cmd_element): New.
1975 (_initialize_python): Assign python_cmd_element.
1976 * python/python.h (python_cmd_element): New.
1977 * tracepoint.c (while_stepping_cmd_element): New.
1978 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1979 * tracepoint.h (while_stepping_cmd_element): New.
1980
1981 2018-09-17 Tom Tromey <tom@tromey.com>
1982
1983 * infrun.c (save_infcall_suspend_state): Return
1984 infcall_suspend_state_up.
1985 (save_infcall_control_state): Return infcall_control_state_up.
1986 * inferior.h (save_infcall_suspend_state)
1987 (save_infcall_control_state): Declare later. Return unique
1988 pointers.
1989
1990 2018-09-17 Tom Tromey <tom@tromey.com>
1991
1992 * infrun.c (struct stop_context): Declare constructor,
1993 destructor, "changed" method.
1994 (stop_context::stop_context): Rename from save_stop_context.
1995 (stop_context::~stop_context): Rename from
1996 release_stop_context_cleanup.
1997 (normal_stop): Update.
1998 (stop_context::changed): Rename from stop_context_changed. Return
1999 bool.
2000
2001 2018-09-17 Tom Tromey <tom@tromey.com>
2002
2003 * inferior.h (struct infcall_suspend_state_deleter): New.
2004 (infcall_suspend_state_up): New typedef.
2005 (struct infcall_control_state_deleter): New.
2006 (infcall_control_state_up): New typedef.
2007 (make_cleanup_restore_infcall_suspend_state)
2008 (make_cleanup_restore_infcall_control_state): Don't declare.
2009 * infcall.c (call_function_by_hand_dummy): Update.
2010 * infrun.c (do_restore_infcall_suspend_state_cleanup)
2011 (make_cleanup_restore_infcall_suspend_state): Remove.
2012 (do_restore_infcall_control_state_cleanup)
2013 (make_cleanup_restore_infcall_control_state): Remove.
2014
2015 2018-09-17 Tom Tromey <tom@tromey.com>
2016
2017 * gdbthread.h (struct thread_control_state): Add initializer.
2018 (class thread_info) <control>: Remove initializer.
2019 * inferior.h (struct inferior_control_state): Add initializer.
2020 (class inferior) <control>: Remove initializer.
2021 (exit_inferior_1): Update.
2022 * infrun.c (struct infcall_control_state): Add constructors.
2023 (save_infcall_control_state): Use new.
2024 (restore_infcall_control_state, discard_infcall_control_state):
2025 Use delete.
2026
2027 2018-09-17 Tom Tromey <tom@tromey.com>
2028
2029 * infrun.c (struct infcall_suspend_state) <registers>: Now a
2030 unique_ptr.
2031 <siginfo_data>: Now a unique_xmalloc_ptr.
2032 (save_infcall_suspend_state, restore_infcall_suspend_state)
2033 (discard_infcall_suspend_state)
2034 (get_infcall_suspend_state_regcache): Update.
2035
2036 2018-09-17 Tom Tromey <tom@tromey.com>
2037
2038 * gdbthread.h (struct thread_suspend_state): Add initializers.
2039 (class thread_info) <suspend>: Remove initializer.
2040 * infrun.c (struct infcall_suspend_state): Add initializers.
2041 (save_infcall_suspend_state): Use new.
2042 (discard_infcall_suspend_state): Use delete.
2043
2044 2018-09-16 Tom Tromey <tom@tromey.com>
2045
2046 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2047 Remove.
2048 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2049 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2050 (py_varobj_iter_new): Likewise.
2051 (py_varobj_get_iterator): Use gdbpy_ref.
2052
2053 2018-09-16 Tom Tromey <tom@tromey.com>
2054
2055 * python/py-threadevent.c (py_get_event_thread): Simplify.
2056 * python/py-inferior.c (infpy_thread_from_thread_handle):
2057 Return immediately after calling thread_to_thread_object. Use
2058 Py_RETURN_NONE.
2059 (thread_to_thread_object): Set the exception on a NULL return.
2060
2061 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2062
2063 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2064
2065 2018-09-16 Tom Tromey <tom@tromey.com>
2066
2067 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2068 Remove.
2069
2070 2018-09-16 Tom Tromey <tom@tromey.com>
2071
2072 * python/python-internal.h (thread_to_thread_object): Change
2073 return type.
2074 * python/py-inferior.c (thread_to_thread_object): Return a new
2075 reference.
2076 (infpy_thread_from_thread_handle): Update.
2077 * python/py-infthread.c (gdbpy_selected_thread): Update.
2078 * python/py-stopevent.c (create_stop_event_object): Update.
2079 * python/py-threadevent.c (py_get_event_thread): Return a new
2080 reference.
2081 (py_get_event_thread): Update.
2082 * python/py-event.h (py_get_event_thread): Change return type.
2083 * python/py-continueevent.c (create_continue_event_object):
2084 Update.
2085
2086 2018-09-16 Tom Tromey <tom@tromey.com>
2087
2088 * python/py-progspace.c (pspy_get_objfiles): Update.
2089 * python/python-internal.h (objfile_to_objfile_object): Change
2090 return type.
2091 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2092 Update.
2093 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2094 Update.
2095 * python/python.c (gdbpy_get_current_objfile): Update.
2096 (gdbpy_objfiles): Update.
2097 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2098 Update.
2099 (objfile_to_objfile_object): Return a new reference.
2100 * python/py-symtab.c (stpy_get_objfile): Update.
2101 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2102 Update.
2103
2104 2018-09-16 Tom Tromey <tom@tromey.com>
2105
2106 * python/py-inferior.c (infpy_get_progspace): Update.
2107 * python/python-internal.h (pspace_to_pspace_object): Change
2108 return type.
2109 * python/py-newobjfileevent.c
2110 (create_clear_objfiles_event_object): Update.
2111 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2112 Update.
2113 * python/python.c (gdbpy_get_current_progspace): Update.
2114 (gdbpy_progspaces): Update.
2115 * python/py-progspace.c (pspace_to_pspace_object): Return a new
2116 reference.
2117 * python/py-objfile.c (objfpy_get_progspace): Update.
2118 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2119 Update.
2120
2121 2018-09-16 Tom Tromey <tom@tromey.com>
2122
2123 * python/lib/gdb/__init__.py (current_progspace, objfiles)
2124 (solib_name, block_for_pc, find_pc_line): New functions.
2125 (execute_unwinders): Update.
2126 * python/py-block.c (gdbpy_block_for_pc): Remove.
2127 * python/py-inferior.c (infpy_get_progspace): New function.
2128 (inferior_object_getset) <progspace>: Add.
2129 * python/py-progspace.c (pspy_objfiles): Rewrite.
2130 (pspy_solib_name, pspy_block_for_pc)
2131 (pspy_find_pc_line, pspy_is_valid): New functions.
2132 (progspace_object_methods): Add entries for solib_name,
2133 block_for_pc, find_pc_line, is_valid.
2134 * python/python-internal.h (gdbpy_block_for_pc)
2135 (build_objfiles_list): Don't declare.
2136 * python/python.c: Don't include solib.h.
2137 (gdbpy_solib_name, gdbpy_find_pc_line)
2138 (gdbpy_get_current_progspace, build_objfiles_list)
2139 (gdbpy_objfiles): Remove.
2140 (GdbMethods) <current_progspace, objfiles, block_for_pc,
2141 solib_name, find_pc_line>: Remove entries.
2142
2143 2018-09-16 Tom Tromey <tom@tromey.com>
2144
2145 * top.c (new_ui_command): Use GNU style for metasyntactic
2146 variables.
2147 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2148 variables.
2149 * maint.c (maintenance_translate_address): Remove "<>" around
2150 text.
2151 * interps.c (interpreter_exec_cmd): Use GNU style for
2152 metasyntactic variables.
2153 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2154 metasyntactic variables.
2155 * tracepoint.c (tfind_range_command): Use GNU style for
2156 metasyntactic variables.
2157 (tfind_outside_command): Likewise.
2158 (_initialize_tracepoint): Likewise.
2159 * remote.c (extended_remote_target::create_inferior): Use GNU
2160 style for metasyntactic variables.
2161 * sparc64-tdep.c (adi_examine_command): Use GNU style for
2162 metasyntactic variables.
2163 (adi_assign_command): Likewise.
2164
2165 2018-09-16 Tom Tromey <tom@tromey.com>
2166
2167 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2168 metasyntactic variables. Print message if no disassembler options
2169 are available.
2170
2171 2018-09-15 Tom Tromey <tom@tromey.com>
2172
2173 * infcmd.c (get_inferior_args): Return const char *.
2174 * inferior.h (get_inferior_args): Return type now const.
2175 * linux-tdep.c (linux_fill_prpsinfo): Update.
2176 * procfs.c (procfs_target::make_corefile_notes): Update.
2177
2178 2018-09-07 Tom Tromey <tom@tromey.com>
2179
2180 * python/python.c (execute_gdb_command): Call bpstat_do_actions
2181 inside the TRY.
2182
2183 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
2184
2185 * nios2-tdep.c (nios2_type_align): New.
2186 (nios2_gdb_arch_init): Install type_align hook.
2187
2188 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2189
2190 * eval.c (fake_method::fake_method): Call xzalloc directly for a
2191 type that is neither object file owned, nor gdbarch owned.
2192 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2193 gdbarch is non-NULL.
2194 (alloc_type_instance): Allocate non-objfile owned types on the
2195 gdbarch obstack.
2196 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2197 using TYPE_ALLOC to ensure memory is allocated on the correct
2198 obstack.
2199 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2200 obstack, or the gdbarch obstack.
2201 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2202
2203 2018-09-14 Tom Tromey <tom@tromey.com>
2204
2205 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2206 block.
2207
2208 2018-09-14 Tom Tromey <tom@tromey.com>
2209
2210 * nat/fork-inferior.c (get_startup_shell): Remove "static".
2211
2212 2018-09-13 Tom Tromey <tom@tromey.com>
2213
2214 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2215 static.
2216
2217 2018-09-13 Tom Tromey <tom@tromey.com>
2218
2219 * exec.c (try_open_exec_file): Use std::string.
2220
2221 2018-09-13 Tom Tromey <tom@tromey.com>
2222
2223 * utils.h (gdb_bfd_errmsg): Return std::string.
2224 * exec.c (exec_file_attach): Update.
2225 * compile/compile-object-load.c (compile_object_load): Update.
2226 * utils.c (gdb_bfd_errmsg): Return std::string.
2227
2228 2018-09-13 Tom Tromey <tom@tromey.com>
2229
2230 * procfs.c (struct procinfo_deleter): New.
2231 (procinfo_up): New typedef.
2232 (do_destroy_procinfo_cleanup): Remove.
2233 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
2234
2235 2018-09-13 Tom Tromey <tom@tromey.com>
2236
2237 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2238
2239 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2240 2018-09-13 Tom Tromey <tom@tromey.com>
2241
2242 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2243 (pspy_get_objfiles): New function.
2244 (progspace_object_methods): New.
2245 (pspace_object_type): Add tp_methods callback.
2246 * python/python-internal.h (build_objfiles_list): New
2247 declaration.
2248 * python/python.c (build_objfiles_list): New function.
2249 (gdbpy_objfiles): Implement using build_objfiles_list.
2250 * NEWS: Mention the Progspace.objfiles method.
2251
2252 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2253
2254 * python/py-inferior.c (infpy_get_progspace): New function.
2255 (inferior_object_getset): Add progspace property.
2256 * NEWS: Mention the new property.
2257
2258 2018-09-13 Tom Tromey <tom@tromey.com>
2259
2260 PR rust/23650:
2261 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2262
2263 2018-09-13 Tom Tromey <tom@tromey.com>
2264
2265 PR rust/23626:
2266 * rust-lang.c (rust_enum_variant): Now static.
2267 (rust_empty_enum_p): New function.
2268 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2269 Handle empty enum.
2270
2271 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2272
2273 * python/py-inferior.c (infpy_repr): New.
2274 (inferior_object_type): Register infpy_repr.
2275 * python/py-objfile.c (objfpy_repr): New.
2276 (objfile_object_type): Register objfpy_repr.
2277
2278 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2279
2280 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2281
2282 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2283
2284 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2285 typo.
2286
2287 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
2288
2289 * common/common-utils.c: Don't include '<sys/stat.h>'.
2290 (is_regular_file): Move to...
2291 * common/filestuff.c (is_regular_file): ... here.
2292 * common/common-utils.h (is_regular_file): Move to...
2293 * common/filestuff.h (is_regular_file): ... here.
2294
2295 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
2296
2297 * skip.c (debug_skip): New variable.
2298 (skiplist_entry::do_skip_file_p): Add debug output.
2299 (skiplist_entry::do_skip_gfile_p): Likewise.
2300 (skiplist_entry::skip_function_p): Likewise.
2301 (_initialize_step_skip): Create debug command.
2302 * NEWS: Mention set/show debug skip.
2303
2304 2018-09-11 Xavier Roirand <roirand@adacore.com>
2305
2306 * darwin-nat.c (should_disable_startup_with_shell):
2307 New function.
2308 (darwin_nat_target::create_inferior): Add call.
2309
2310 2018-09-11 Xavier Roirand <roirand@adacore.com>
2311
2312 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2313 inf_port, msg_state>: Initialize.
2314 (struct darwin_thread_info) <signaled, single_step>: Change
2315 type and initialize.
2316 (struct darwin_thread_info) <event>: Initialize.
2317
2318 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2319
2320 PR gdb/23555
2321 PR gdb/23558
2322 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2323 guesses.
2324
2325 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2326
2327 Revert:
2328 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2329
2330 PR gdb/23555
2331 PR gdb/23558
2332 * gnulib/aclocal.m4: Regenerate.
2333 * gnulib/config.in: Regenerate.
2334 * gnulib/configure: Regenerate.
2335 * gnulib/import/Makefile.am: Update.
2336 * gnulib/import/Makefile.in: Update.
2337 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2338 * gnulib/import/_Noreturn.h: ... this.
2339 * gnulib/import/alloca.in.h: Update.
2340 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2341 * gnulib/import/arg-nonnull.h: ... this.
2342 * gnulib/import/assure.h: Update.
2343 * gnulib/import/at-func.c: Update.
2344 * gnulib/import/basename-lgpl.c: Update.
2345 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2346 * gnulib/import/c++defs.h: ... this.
2347 * gnulib/import/canonicalize-lgpl.c: Update.
2348 * gnulib/import/cdefs.h: Update.
2349 * gnulib/import/chdir-long.c: Update.
2350 * gnulib/import/chdir-long.h: Update.
2351 * gnulib/import/cloexec.c: Update.
2352 * gnulib/import/cloexec.h: Update.
2353 * gnulib/import/close.c: Update.
2354 * gnulib/import/closedir.c: Update.
2355 * gnulib/import/config.charset: Update.
2356 * gnulib/import/dirent-private.h: Update.
2357 * gnulib/import/dirent.in.h: Update.
2358 * gnulib/import/dirfd.c: Update.
2359 * gnulib/import/dirname-lgpl.c: Update.
2360 * gnulib/import/dirname.h: Update.
2361 * gnulib/import/dosname.h: Update.
2362 * gnulib/import/dup-safer-flag.c: Update.
2363 * gnulib/import/dup-safer.c: Update.
2364 * gnulib/import/dup.c: Update.
2365 * gnulib/import/dup2.c: Update.
2366 * gnulib/import/errno.in.h: Update.
2367 * gnulib/import/error.c: Update.
2368 * gnulib/import/error.h: Update.
2369 * gnulib/import/exitfail.c: Update.
2370 * gnulib/import/exitfail.h: Update.
2371 * gnulib/import/extra/update-copyright: Update.
2372 * gnulib/import/fchdir.c: Update.
2373 * gnulib/import/fcntl.c: Update.
2374 * gnulib/import/fcntl.in.h: Update.
2375 * gnulib/import/fd-hook.c: Update.
2376 * gnulib/import/fd-hook.h: Update.
2377 * gnulib/import/fd-safer-flag.c: Update.
2378 * gnulib/import/fd-safer.c: Update.
2379 * gnulib/import/fdopendir.c: Update.
2380 * gnulib/import/filename.h: Update.
2381 * gnulib/import/filenamecat-lgpl.c: Update.
2382 * gnulib/import/filenamecat.h: Update.
2383 * gnulib/import/flexmember.h: Update.
2384 * gnulib/import/float+.h: Update.
2385 * gnulib/import/float.c: Update.
2386 * gnulib/import/float.in.h: Update.
2387 * gnulib/import/fnmatch.c: Update.
2388 * gnulib/import/fnmatch.in.h: Update.
2389 * gnulib/import/fnmatch_loop.c: Update.
2390 * gnulib/import/fpucw.h: Update.
2391 * gnulib/import/frexp.c: Update.
2392 * gnulib/import/frexpl.c: Update.
2393 * gnulib/import/fstat.c: Update.
2394 * gnulib/import/fstatat.c: Update.
2395 * gnulib/import/getcwd-lgpl.c: Update.
2396 * gnulib/import/getcwd.c: Update.
2397 * gnulib/import/getdtablesize.c: Update.
2398 * gnulib/import/getlogin_r.c: Update.
2399 * gnulib/import/getprogname.c: Update.
2400 * gnulib/import/getprogname.h: Update.
2401 * gnulib/import/gettext.h: Update.
2402 * gnulib/import/gettimeofday.c: Update.
2403 * gnulib/import/glob-libc.h: Update.
2404 * gnulib/import/glob.c: Update.
2405 * gnulib/import/glob.in.h: Update.
2406 * gnulib/import/glob_internal.h: Update.
2407 * gnulib/import/glob_pattern_p.c: Update.
2408 * gnulib/import/globfree.c: Update.
2409 * gnulib/import/hard-locale.c: Update.
2410 * gnulib/import/hard-locale.h: Update.
2411 * gnulib/import/intprops.h: Update.
2412 * gnulib/import/inttypes.in.h: Update.
2413 * gnulib/import/isnan.c: Update.
2414 * gnulib/import/isnand-nolibm.h: Update.
2415 * gnulib/import/isnand.c: Update.
2416 * gnulib/import/isnanl-nolibm.h: Update.
2417 * gnulib/import/isnanl.c: Update.
2418 * gnulib/import/itold.c: Update.
2419 * gnulib/import/libc-config.h: Update.
2420 * gnulib/import/limits.in.h: Update.
2421 * gnulib/import/localcharset.c: Update.
2422 * gnulib/import/localcharset.h: Update.
2423 * gnulib/import/localtime-buffer.c: Update.
2424 * gnulib/import/localtime-buffer.h: Update.
2425 * gnulib/import/lstat.c: Update.
2426 * gnulib/import/m4/00gnulib.m4: Update.
2427 * gnulib/import/m4/__inline.m4: Update.
2428 * gnulib/import/m4/absolute-header.m4: Update.
2429 * gnulib/import/m4/alloca.m4: Update.
2430 * gnulib/import/m4/builtin-expect.m4: Update.
2431 * gnulib/import/m4/canonicalize.m4: Update.
2432 * gnulib/import/m4/chdir-long.m4: Update.
2433 * gnulib/import/m4/close.m4: Update.
2434 * gnulib/import/m4/closedir.m4: Update.
2435 * gnulib/import/m4/configmake.m4: Update.
2436 * gnulib/import/m4/d-ino.m4: Update.
2437 * gnulib/import/m4/d-type.m4: Update.
2438 * gnulib/import/m4/dirent_h.m4: Update.
2439 * gnulib/import/m4/dirfd.m4: Update.
2440 * gnulib/import/m4/dirname.m4: Update.
2441 * gnulib/import/m4/double-slash-root.m4: Update.
2442 * gnulib/import/m4/dup.m4: Update.
2443 * gnulib/import/m4/dup2.m4: Update.
2444 * gnulib/import/m4/eealloc.m4: Update.
2445 * gnulib/import/m4/environ.m4: Update.
2446 * gnulib/import/m4/errno_h.m4: Update.
2447 * gnulib/import/m4/error.m4: Update.
2448 * gnulib/import/m4/exponentd.m4: Update.
2449 * gnulib/import/m4/exponentl.m4: Update.
2450 * gnulib/import/m4/extensions.m4: Update.
2451 * gnulib/import/m4/extern-inline.m4: Update.
2452 * gnulib/import/m4/fchdir.m4: Update.
2453 * gnulib/import/m4/fcntl-o.m4: Update.
2454 * gnulib/import/m4/fcntl.m4: Update.
2455 * gnulib/import/m4/fcntl_h.m4: Update.
2456 * gnulib/import/m4/fdopendir.m4: Update.
2457 * gnulib/import/m4/filenamecat.m4: Update.
2458 * gnulib/import/m4/flexmember.m4: Update.
2459 * gnulib/import/m4/float_h.m4: Update.
2460 * gnulib/import/m4/fnmatch.m4: Update.
2461 * gnulib/import/m4/fnmatch_h.m4: Update.
2462 * gnulib/import/m4/fpieee.m4: Update.
2463 * gnulib/import/m4/frexp.m4: Update.
2464 * gnulib/import/m4/frexpl.m4: Update.
2465 * gnulib/import/m4/fstat.m4: Update.
2466 * gnulib/import/m4/fstatat.m4: Update.
2467 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2468 * gnulib/import/m4/getcwd-path-max.m4: Update.
2469 * gnulib/import/m4/getcwd.m4: Update.
2470 * gnulib/import/m4/getdtablesize.m4: Update.
2471 * gnulib/import/m4/getlogin.m4: Update.
2472 * gnulib/import/m4/getlogin_r.m4: Update.
2473 * gnulib/import/m4/getpagesize.m4: Update.
2474 * gnulib/import/m4/getprogname.m4: Update.
2475 * gnulib/import/m4/gettimeofday.m4: Update.
2476 * gnulib/import/m4/glibc21.m4: Update.
2477 * gnulib/import/m4/glob.m4: Update.
2478 * gnulib/import/m4/glob_h.m4: Update.
2479 * gnulib/import/m4/gnulib-cache.m4: Update.
2480 * gnulib/import/m4/gnulib-common.m4: Update.
2481 * gnulib/import/m4/gnulib-comp.m4: Update.
2482 * gnulib/import/m4/gnulib-tool.m4: Update.
2483 * gnulib/import/m4/hard-locale.m4: Update.
2484 * gnulib/import/m4/include_next.m4: Update.
2485 * gnulib/import/m4/inttypes-pri.m4: Update.
2486 * gnulib/import/m4/inttypes.m4: Update.
2487 * gnulib/import/m4/isnand.m4: Update.
2488 * gnulib/import/m4/isnanl.m4: Update.
2489 * gnulib/import/m4/largefile.m4: Update.
2490 * gnulib/import/m4/limits-h.m4: Update.
2491 * gnulib/import/m4/localcharset.m4: Update.
2492 * gnulib/import/m4/locale-fr.m4: Update.
2493 * gnulib/import/m4/locale-ja.m4: Update.
2494 * gnulib/import/m4/locale-zh.m4: Update.
2495 * gnulib/import/m4/localtime-buffer.m4: Update.
2496 * gnulib/import/m4/longlong.m4: Update.
2497 * gnulib/import/m4/lstat.m4: Update.
2498 * gnulib/import/m4/malloc.m4: Update.
2499 * gnulib/import/m4/malloca.m4: Update.
2500 * gnulib/import/m4/math_h.m4: Update.
2501 * gnulib/import/m4/mbrtowc.m4: Update.
2502 * gnulib/import/m4/mbsinit.m4: Update.
2503 * gnulib/import/m4/mbsrtowcs.m4: Update.
2504 * gnulib/import/m4/mbstate_t.m4: Update.
2505 * gnulib/import/m4/memchr.m4: Update.
2506 * gnulib/import/m4/memmem.m4: Update.
2507 * gnulib/import/m4/mempcpy.m4: Update.
2508 * gnulib/import/m4/memrchr.m4: Update.
2509 * gnulib/import/m4/mkdir.m4: Update.
2510 * gnulib/import/m4/mkstemp.m4: Update.
2511 * gnulib/import/m4/mmap-anon.m4: Update.
2512 * gnulib/import/m4/mode_t.m4: Update.
2513 * gnulib/import/m4/msvc-inval.m4: Update.
2514 * gnulib/import/m4/msvc-nothrow.m4: Update.
2515 * gnulib/import/m4/multiarch.m4: Update.
2516 * gnulib/import/m4/nocrash.m4: Update.
2517 * gnulib/import/m4/off_t.m4: Update.
2518 * gnulib/import/m4/onceonly.m4: Update.
2519 * gnulib/import/m4/open-cloexec.m4: Update.
2520 * gnulib/import/m4/open.m4: Update.
2521 * gnulib/import/m4/openat.m4: Update.
2522 * gnulib/import/m4/opendir.m4: Update.
2523 * gnulib/import/m4/pathmax.m4: Update.
2524 * gnulib/import/m4/rawmemchr.m4: Update.
2525 * gnulib/import/m4/readdir.m4: Update.
2526 * gnulib/import/m4/readlink.m4: Update.
2527 * gnulib/import/m4/realloc.m4: Update.
2528 * gnulib/import/m4/rename.m4: Update.
2529 * gnulib/import/m4/rewinddir.m4: Update.
2530 * gnulib/import/m4/rmdir.m4: Update.
2531 * gnulib/import/m4/save-cwd.m4: Update.
2532 * gnulib/import/m4/secure_getenv.m4: Update.
2533 * gnulib/import/m4/setenv.m4: Update.
2534 * gnulib/import/m4/signal_h.m4: Update.
2535 * gnulib/import/m4/ssize_t.m4: Update.
2536 * gnulib/import/m4/stat-time.m4: Update.
2537 * gnulib/import/m4/stat.m4: Update.
2538 * gnulib/import/m4/std-gnu11.m4: Update.
2539 * gnulib/import/m4/stdbool.m4: Update.
2540 * gnulib/import/m4/stddef_h.m4: Update.
2541 * gnulib/import/m4/stdint.m4: Update.
2542 * gnulib/import/m4/stdio_h.m4: Update.
2543 * gnulib/import/m4/stdlib_h.m4: Update.
2544 * gnulib/import/m4/strchrnul.m4: Update.
2545 * gnulib/import/m4/strdup.m4: Update.
2546 * gnulib/import/m4/strerror.m4: Update.
2547 * gnulib/import/m4/string_h.m4: Update.
2548 * gnulib/import/m4/strstr.m4: Update.
2549 * gnulib/import/m4/strtok_r.m4: Update.
2550 * gnulib/import/m4/sys_socket_h.m4: Update.
2551 * gnulib/import/m4/sys_stat_h.m4: Update.
2552 * gnulib/import/m4/sys_time_h.m4: Update.
2553 * gnulib/import/m4/sys_types_h.m4: Update.
2554 * gnulib/import/m4/tempname.m4: Update.
2555 * gnulib/import/m4/time_h.m4: Update.
2556 * gnulib/import/m4/unistd-safer.m4: Update.
2557 * gnulib/import/m4/unistd_h.m4: Update.
2558 * gnulib/import/m4/warn-on-use.m4: Update.
2559 * gnulib/import/m4/wchar_h.m4: Update.
2560 * gnulib/import/m4/wchar_t.m4: Update.
2561 * gnulib/import/m4/wctype_h.m4: Update.
2562 * gnulib/import/m4/wint_t.m4: Update.
2563 * gnulib/import/malloc.c: Update.
2564 * gnulib/import/malloc/scratch_buffer.h: Update.
2565 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2566 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2567 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2568 * gnulib/import/malloca.c: Update.
2569 * gnulib/import/malloca.h: Update.
2570 * gnulib/import/malloca.valgrind: Update.
2571 * gnulib/import/math.in.h: Update.
2572 * gnulib/import/mbrtowc.c: Update.
2573 * gnulib/import/mbsinit.c: Update.
2574 * gnulib/import/mbsrtowcs-impl.h: Update.
2575 * gnulib/import/mbsrtowcs-state.c: Update.
2576 * gnulib/import/mbsrtowcs.c: Update.
2577 * gnulib/import/memchr.c: Update.
2578 * gnulib/import/memmem.c: Update.
2579 * gnulib/import/mempcpy.c: Update.
2580 * gnulib/import/memrchr.c: Update.
2581 * gnulib/import/mkdir.c: Update.
2582 * gnulib/import/mkstemp.c: Update.
2583 * gnulib/import/msvc-inval.c: Update.
2584 * gnulib/import/msvc-inval.h: Update.
2585 * gnulib/import/msvc-nothrow.c: Update.
2586 * gnulib/import/msvc-nothrow.h: Update.
2587 * gnulib/import/open.c: Update.
2588 * gnulib/import/openat-die.c: Update.
2589 * gnulib/import/openat-priv.h: Update.
2590 * gnulib/import/openat-proc.c: Update.
2591 * gnulib/import/openat.c: Update.
2592 * gnulib/import/openat.h: Update.
2593 * gnulib/import/opendir.c: Update.
2594 * gnulib/import/pathmax.h: Update.
2595 * gnulib/import/pipe-safer.c: Update.
2596 * gnulib/import/rawmemchr.c: Update.
2597 * gnulib/import/readdir.c: Update.
2598 * gnulib/import/readlink.c: Update.
2599 * gnulib/import/realloc.c: Update.
2600 * gnulib/import/ref-add.sin: Update.
2601 * gnulib/import/ref-del.sin: Update.
2602 * gnulib/import/rename.c: Update.
2603 * gnulib/import/rewinddir.c: Update.
2604 * gnulib/import/rmdir.c: Update.
2605 * gnulib/import/same-inode.h: Update.
2606 * gnulib/import/save-cwd.c: Update.
2607 * gnulib/import/save-cwd.h: Update.
2608 * gnulib/import/scratch_buffer.h: Update.
2609 * gnulib/import/secure_getenv.c: Update.
2610 * gnulib/import/setenv.c: Update.
2611 * gnulib/import/signal.in.h: Update.
2612 * gnulib/import/stat-time.c: Update.
2613 * gnulib/import/stat-time.h: Update.
2614 * gnulib/import/stat-w32.c: Update.
2615 * gnulib/import/stat-w32.h: Update.
2616 * gnulib/import/stat.c: Update.
2617 * gnulib/import/stdbool.in.h: Update.
2618 * gnulib/import/stddef.in.h: Update.
2619 * gnulib/import/stdint.in.h: Update.
2620 * gnulib/import/stdio.in.h: Update.
2621 * gnulib/import/stdlib.in.h: Update.
2622 * gnulib/import/str-two-way.h: Update.
2623 * gnulib/import/strchrnul.c: Update.
2624 * gnulib/import/strdup.c: Update.
2625 * gnulib/import/streq.h: Update.
2626 * gnulib/import/strerror-override.c: Update.
2627 * gnulib/import/strerror-override.h: Update.
2628 * gnulib/import/strerror.c: Update.
2629 * gnulib/import/string.in.h: Update.
2630 * gnulib/import/stripslash.c: Update.
2631 * gnulib/import/strnlen1.c: Update.
2632 * gnulib/import/strnlen1.h: Update.
2633 * gnulib/import/strstr.c: Update.
2634 * gnulib/import/strtok_r.c: Update.
2635 * gnulib/import/sys_stat.in.h: Update.
2636 * gnulib/import/sys_time.in.h: Update.
2637 * gnulib/import/sys_types.in.h: Update.
2638 * gnulib/import/tempname.c: Update.
2639 * gnulib/import/tempname.h: Update.
2640 * gnulib/import/time.in.h: Update.
2641 * gnulib/import/unistd--.h: Update.
2642 * gnulib/import/unistd-safer.h: Update.
2643 * gnulib/import/unistd.in.h: Update.
2644 * gnulib/import/unsetenv.c: Update.
2645 * gnulib/import/verify.h: Update.
2646 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2647 * gnulib/import/wchar.in.h: Update.
2648 * gnulib/import/wctype.in.h: Update.
2649 * gnulib/import/xalloc-oversized.h: Update.
2650 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2651 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2652
2653 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
2654
2655 * record-btrace.c (get_thread_current_frame): Remove
2656 old_inferior_ptid.
2657
2658 2018-09-10 Jerome Guitton <guitton@adacore.com>
2659
2660 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2661 with check_tag to 1 if and only if the type is tagged and the
2662 component being searched cannot been found in the current
2663 view. Otherwise, always call ada_to_fixed_type with
2664 check_tag to 0.
2665
2666 2018-09-10 Xavier Roirand <roirand@adacore.com>
2667
2668 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2669 declaration.
2670 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2671 * ada-varobj.c (ada_varobj_get_number_of_children,
2672 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2673
2674 2018-09-10 Xavier Roirand <roirand@adacore.com>
2675
2676 * ada-valprint.c (ada_value_print): Use type instead of
2677 enclosing type.
2678
2679 2018-09-10 Xavier Roirand <roirand@adacore.com>
2680
2681 * ada-lang.c (ada_value_subscript): Handle case when parameter is
2682 an array of access to unconstrained array.
2683
2684 2018-09-10 Xavier Roirand <roirand@adacore.com>
2685
2686 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2687 (ada_check_typedef): Use it.
2688
2689 2018-09-10 Xavier Roirand <roirand@adacore.com>
2690
2691 * ada-varobj.c (ada_varobj_describe_struct_child)
2692 (ada_varobj_describe_child): Handle union case like struct one.
2693
2694 2018-09-10 Tom Tromey <tom@tromey.com>
2695
2696 PR python/18380:
2697 * python/python.c (_initialize_python): Make example in "python"
2698 help work in Python 3.
2699
2700 2018-09-10 Eli Zaretskii <eliz@gnu.org>
2701
2702 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2703 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
2704 $(EXEEXT) to the script, as it is not a program.
2705
2706 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
2707
2708 * python/py-prettyprint.c (pretty_print_one_value): Return
2709 gdbpy_ref<>.
2710 (print_string_repr): Adjust.
2711 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2712 * python/python-internal.h (apply_varobj_pretty_printer): Return
2713 gdbpy_ref<>.
2714 * varobj.c (varobj_value_get_print_value): Adjust.
2715
2716 2018-09-08 Tom Tromey <tom@tromey.com>
2717
2718 PR python/16047:
2719 * python/py-prettyprint.c (pretty_print_one_value): Check for
2720 to_string method.
2721
2722 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2723
2724 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2725 replace_operator_with_call.
2726
2727 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2728
2729 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2730
2731 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2732
2733 * ada-typeprint.c (print_range): Print the bounds using TYPE
2734 rather than its TYPE_TARGET_TYPE.
2735
2736 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2737
2738 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2739 call to ada_to_fixed_value_create.
2740
2741 2018-09-08 Jerome Guitton <guitton@adacore.com>
2742
2743 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2744
2745 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2746
2747 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2748 by calls to error.
2749
2750 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2751
2752 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2753 Move update of loop variable "fi".
2754
2755 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2756
2757 * ada-lang.c (value_assign_to_component): In the case of
2758 big-endian targets, extract the bits of the given VAL
2759 using an src_offset of zero if container is not a scalar.
2760
2761 2018-09-06 Simon Ser <contact@emersion.fr>
2762
2763 PR gdb/23105
2764 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2765 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2766 * fbsd-tdep.c (fbsd_make_note_desc): New.
2767 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2768 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2769 * target.h (enum target_object) Add FreeBSD-specific
2770 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2771
2772 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2773
2774 * compile/compile-c.h (generate_c_for_variable_locations):
2775 Change reference to pointer.
2776 * compile/compile-c-support.c (compile_program) <compute>:
2777 Likewise.
2778 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2779 (generate_c_for_for_one_variable): Likewise
2780 (generate_c_for_variable_locations): Likewise
2781 * compile/compile-c-types.c (compile_c_instance::convert_type):
2782 Likewise
2783 * compile/compile-cplus-symbols.c (convert_one_symbol):
2784 std::move the scope passed to enter_scope.
2785 * compile/compile-cplus-types.c
2786 (compile_cplus_instance::enter_scope): Make parameter
2787 rvalue-reference.
2788 (compile_cplus_instance::new_scope): Change reference to
2789 pointer.
2790 (compile_cplus_instance::convert_type): Likewise
2791 (compile_cplus_convert_typedef): std::move the scope passed to
2792 enter_scope.
2793 (compile_cplus_convert_struct_or_union): Likewise.
2794 (compile_cplus_convert_enum): Likewise.
2795 (compile_cplus_convert_namespace): Likewise.
2796 * compile/compile-cplus.h (compile_cplus_instance)
2797 <enter_scope>: Make parameter rvalue-reference.
2798 * compile/compile-internal.h (compile_instance)
2799 <get_cached_type>: Likewise
2800 * compile/compile-loc2c.c (push): Likewise
2801 (pushf): Likewise
2802 (unary): Likewise
2803 (binary): Likewise
2804 (print_label): Likewise
2805 (pushf_register_address): Likewise
2806 (pushf_register): Likewise
2807 (do_compile_dwarf_expr_to_c): Likewise
2808 (compile_dwarf_expr_to_c): Likewise
2809 (compile_dwarf_bounds_to_c): Likewise
2810 * compile/compile.c (compile_instance::get_cached_type):
2811 Likewise
2812 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2813 (compile_dwarf_bounds_to_c): Likewise
2814 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2815 (dwarf2_compile_property_to_c): Likewise
2816 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2817 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2818 Likewise
2819
2820 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2821
2822 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2823 * tui/tui-data.c (init_content_element): Don't initialize it.
2824
2825 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2826
2827 * tui/tui-data.h (struct tui_win_info)
2828 <detail::opaque>: Remove.
2829 * tui/tui-data.c (init_win_info): Remove assignment.
2830
2831 2018-09-05 Tom Tromey <tom@tromey.com>
2832
2833 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2834 -Wformat-nonliteral.
2835 * target-float.c (host_float_ops<T>::to_string)
2836 (host_float_ops<T>::from_string): Use
2837 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2838 * configure: Rebuild.
2839
2840 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2841
2842 * printcmd.c (printf_c_string): Use
2843 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2844 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2845
2846 2018-09-05 Tom Tromey <tom@tromey.com>
2847
2848 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2849
2850 2018-09-05 Tom de Vries <tdevries@suse.de>
2851
2852 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2853 with resolve_abstract_p == true.
2854 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2855 defaulting to false. Propagate resolve_abstract_p to
2856 dwarf2_fetch_die_loc_sect_off.
2857 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2858 parameter, defaulting to false.
2859 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2860 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2861 parameter.
2862 * dwarf2read.h (struct die_info): Forward-declare.
2863 (die_info_ptr): New typedef.
2864 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2865
2866 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2867
2868 GDB 8.2 released.
2869
2870 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2871 Pedro Alves <palves@redhat.com>
2872
2873 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2874 "aclocal-m4-deps.mk". Include file here.
2875 $(srcdir)/aclocal.m4: Add "configure.ac".
2876 * gnulib/aclocal-m4-deps.mk: New file.
2877 * gnulib/update-gnulib.sh: Automatically update
2878 "aclocal-m4-deps.mk".
2879
2880 2018-09-04 Tom Tromey <tom@tromey.com>
2881
2882 * configure: Rebuild.
2883 * configure.ac: Remove multi-ice code.
2884
2885 2018-09-04 Tom Tromey <tom@tromey.com>
2886
2887 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2888 (ada-exp.o): Update.
2889
2890 2018-09-04 Tom Tromey <tom@tromey.com>
2891
2892 * Makefile.in (printcmd.o, target-float.o): Remove.
2893 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2894
2895 2018-09-04 Tom Tromey <tom@tromey.com>
2896
2897 * gnulib/Makefile.in: Remove obsolete comment.
2898 * Makefile.in: Remove obsolete comment.
2899
2900 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2901
2902 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2903 line with '+'.
2904
2905 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2906
2907 * riscv-tdep.c: Add 'prologue-value.h' include.
2908 (struct riscv_unwind_cache): New struct.
2909 (riscv_debug_unwinder): New global.
2910 (riscv_scan_prologue): Update arguments, capture register details
2911 from prologue scan.
2912 (riscv_skip_prologue): Reformat arguments line, move end of
2913 prologue calculation into riscv_scan_prologue.
2914 (riscv_frame_cache): Update return type, create
2915 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2916 details.
2917 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2918 (riscv_frame_prev_register): Use the trad_frame within the
2919 riscv_unwind_cache.
2920 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2921 flag.
2922
2923 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2924
2925 * trad-frame.h (trad_frame_set_realreg): Declare.
2926 (trad_frame_set_addr): Declare.
2927 * trad-frame.c (trad_frame_set_realreg): Define new function.
2928 (trad_frame_set_addr): Define new function.
2929 (trad_frame_set_reg_realreg): Use new function.
2930 (trad_frame_set_reg_addr): Use new function.
2931
2932 2018-09-01 Keith Seitz <keiths@redhat.com>
2933
2934 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2935 pulongest instead of "%lld".
2936 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2937 ATTRIBUTE_UNUSED.
2938
2939 2018-08-31 Tom Tromey <tom@tromey.com>
2940
2941 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2942 variant part type.
2943
2944 2018-08-31 Pedro Alves <palves@redhat.com>
2945
2946 * gdbarch.h: Regenerate.
2947
2948 2018-08-31 Pedro Alves <palves@redhat.com>
2949
2950 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2951 * target.h (Hardware watchpoint interfaces): Describe
2952 continuable/steppable/non-steppable watchpoints.
2953 * gdbarch.h, gdbarch.c: Regenerate.
2954
2955 2018-08-31 Pedro Alves <palves@redhat.com>
2956
2957 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2958 Delete.
2959 * s390-linux-nat.c
2960 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2961 * target.h (target_ops::have_continuable_watchpoint): Delete.
2962 (target_have_continuable_watchpoint): Delete.
2963 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2964 * target-delegates.c: Regenerate.
2965
2966 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2967
2968 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2969 the files present in "gnulib/import/m4/".
2970
2971 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2972
2973 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2974 c.sw, c.swsp, and c.sdsp.
2975
2976 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2977
2978 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2979 (riscv_read_misa_reg): Don't cache value read into inferior data.
2980 (riscv_new_inferior_data): Delete.
2981 (riscv_inferior_data_cleanup): Delete.
2982 (riscv_inferior_data): Delete.
2983 (riscv_invalidate_inferior_data): Delete.
2984 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2985
2986 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2987
2988 * compile/compile-cplus-types.c
2989 (compile_cplus_instance::leave_scope): Take the address of scope
2990 object.
2991 (compile_cplus_instance::convert_qualified_base): Compare quals
2992 to 0.
2993
2994 2018-08-30 Keith Seitz <keiths@redhat.com>
2995
2996 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2997 Use "%s" and host_address_to_string instead of "%p" in printf.
2998
2999 2018-08-29 Keith Seitz <keiths@redhat.com>
3000
3001 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3002 and compile-cplus-types.c.
3003 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3004 * c-lang.c (cplus_language_defn): Set C++ compile functions.
3005 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3006 Declare.
3007 * compile/compile-c-support.c: Include compile-cplus.h.
3008 (load_libcompile): Templatize.
3009 (get_compile_context): "New" function.
3010 (c_get_compile_context): Use get_compile_context.
3011 (cplus_get_compile_context): New function.
3012 (cplus_push_user_expression, cplus_pop_user_expression)
3013 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3014 (cplus_compute_program): Define new structs/functions.
3015 * compile/compile-cplus-symmbols.c: New file.
3016 * compile/compile-cplus-types.c: New file.
3017 * compile/compile-cplus.h: New file.
3018 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3019 Declare.
3020 * compile/compile-object-load.c (get_out_value_type): Use
3021 strncmp_iw when comparing symbol names.
3022 (compile_object_load): Add mst_bss and mst_data.
3023 * compile/compile.c (_initialize_compile): Remove
3024 -Wno-implicit-function-declaration from `compile_args'.
3025 * compile/gcc-cp-plugin.h: New file.
3026 * NEWS: Mention C++ compile support and new debug options.
3027
3028 2018-08-29 Keith Seitz <keiths@redhat.com>
3029
3030 * linespec.c (collect_info::add_symbol): Make virtual.
3031 (struct symbol_searcher_collect_info): New struct.
3032 (symbol_searcher::find_all_symbols): New method.
3033 * symtab.h (class symbol_searcher): New class.
3034
3035 2018-08-29 Keith Seitz <keiths@redhat.com>
3036
3037 * linespec.c (struct linespec) <function_symbols, label_symbols>:
3038 Change to vector of block_symbol. Update all users.
3039 (struct collect_info) <symbols>: Likewise.
3040 (collect_info::add_symbol): Take block_symbol as argument.
3041 Update all callers.
3042 (decode_compound_collector) <m_symbols>: Change type to vector
3043 of block_symbol. Update all users.
3044 (decode_compound_collector::operator ()): Change parameter type
3045 to block_symbol.
3046 (find_method, find_function_symbols, find_linespec_symbols)
3047 (find_label_symbols_in_block, find_label_symbols): Change symbol
3048 vectors to block_symbol vectors.
3049 * symtab.h (symbol_found_callback_ftype): Change parameter type to
3050 block_symbol.
3051
3052 2018-08-29 Keith Seitz <keiths@redhat.com>
3053
3054 * linespec.c (symbolp): Remove typedef and VEC definitions.
3055 (bound_minimal_symbol_d): Likewise.
3056
3057 2018-08-29 Keith Seitz <keiths@redhat.com>
3058
3059 * linespec.c (decode_compound_collector::decode_compound_collector):
3060 Remove initialization for `m_symtabs'.
3061 (decode_compound_collector::release_symbols): Change return type
3062 to std::vector. Update all callers.
3063 (class decode_compound_collector) <m_symbols>: Change type to
3064 std::vector.
3065 (lookup_prefix_sym): Change return type to std::vector. Update all
3066 callers.
3067 (compare_symbols): Remove.
3068 (std_compare_symbols): Rename to `compare_symbols'.
3069 (find_method): Change `sym_classes' parameter to std::vector.
3070 Update all callers. Use std::sort to sort sym_classes.
3071 (find_linespec_symbols): Remove cleanup.
3072
3073 2018-08-29 Keith Seitz <keiths@redhat.com>
3074
3075 * linespec.c (struct linespec) <minimal_symbols>: Change type to
3076 std::vector. Update all users.
3077 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3078 (struct collect_info) <minimal_symbols>: Likewise.
3079 (compare_msymbols): Return bool. Change parameters to const
3080 bound_minimal_symbol references.
3081 (find_method, find_function_symbols, find_linespec_symbols): Change
3082 `minsyms' parameter to std::vector. Update all callers.
3083
3084 2018-08-29 Keith Seitz <keiths@redhat.com>
3085
3086 * linespec.c (struct linespec) <label_symbols>: Change type to
3087 std::vector. Update all users.
3088 (find_label_symbols_in_block): Change `result' parameter to
3089 std::vector. Update all callers.
3090 (find_label_symbols): Return std::vector. Update all callers.
3091
3092 2018-08-29 Keith Seitz <keiths@redhat.com>
3093
3094 * linespec.c (struct linespec) <function_symbols>: Change type to
3095 std::vector. Update all users.
3096 (struct collect_info) <function_symbols>: Likewise.
3097 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3098 (std_compare_symbols): New function.
3099 (find_method, find_function_symbols, find_linespec_symbols)
3100 (find_label_symbols_in_block): Change `symbols' parameter to
3101 std::vector. Update all callers.
3102 (find_label_symbols): Likewise for `function_symbols' and
3103 `label_funcs_ret'.
3104
3105 2018-08-29 Keith Seitz <keiths@redhat.com>
3106
3107 * linespec.c (symtab_vector_up): Define.
3108 (struct linespec) <file_symtabs>: Change type to std::vector *.
3109 Update all uses.
3110 (struct collect_info) <file_symtabs>: Likewise.
3111 (collect_symtabs_from_filename): Return symtab_vector_up.
3112 Update all callers.
3113 (decode_objc): Remove cleanup.
3114 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3115 (symtab_collector::release_symtabs): Return symtab_vector_up.
3116 Update all callers.
3117 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3118 Update all users.
3119 (collect_symtabs_from_filename, symtabs_from_filename): Return
3120 symtab_vector_up. Update all callers.
3121
3122 2018-08-29 Tom Tromey <tom@tromey.com>
3123
3124 * csky-tdep.c (csky_analyze_prologue): Use
3125 core_addr_to_string_nz.
3126
3127 2018-08-29 Tom Tromey <tom@tromey.com>
3128
3129 * windows-nat.c (struct xlate_exception) <them>: Change type to
3130 DWORD.
3131 (xlate): Fix formatting. Remove last entry.
3132 (struct xlate_exception, xlate): Comment out.
3133 (windows_nat_target::resume): Use ranged for.
3134
3135 2018-08-29 Jim Wilson <jimw@sifive.com>
3136
3137 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3138 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3139 of NT_PRFPREG.
3140 (riscv_linux_nat_target::store_registers): Likewise.
3141
3142 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3143
3144 PR gdb/23555
3145 PR gdb/23558
3146 * gnulib/aclocal.m4: Regenerate.
3147 * gnulib/config.in: Regenerate.
3148 * gnulib/configure: Regenerate.
3149 * gnulib/import/Makefile.am: Update.
3150 * gnulib/import/Makefile.in: Update.
3151 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3152 * gnulib/import/_Noreturn.h: ... this.
3153 * gnulib/import/alloca.in.h: Update.
3154 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3155 * gnulib/import/arg-nonnull.h: ... this.
3156 * gnulib/import/assure.h: Update.
3157 * gnulib/import/at-func.c: Update.
3158 * gnulib/import/basename-lgpl.c: Update.
3159 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3160 * gnulib/import/c++defs.h: ... this.
3161 * gnulib/import/canonicalize-lgpl.c: Update.
3162 * gnulib/import/cdefs.h: Update.
3163 * gnulib/import/chdir-long.c: Update.
3164 * gnulib/import/chdir-long.h: Update.
3165 * gnulib/import/cloexec.c: Update.
3166 * gnulib/import/cloexec.h: Update.
3167 * gnulib/import/close.c: Update.
3168 * gnulib/import/closedir.c: Update.
3169 * gnulib/import/config.charset: Update.
3170 * gnulib/import/dirent-private.h: Update.
3171 * gnulib/import/dirent.in.h: Update.
3172 * gnulib/import/dirfd.c: Update.
3173 * gnulib/import/dirname-lgpl.c: Update.
3174 * gnulib/import/dirname.h: Update.
3175 * gnulib/import/dosname.h: Update.
3176 * gnulib/import/dup-safer-flag.c: Update.
3177 * gnulib/import/dup-safer.c: Update.
3178 * gnulib/import/dup.c: Update.
3179 * gnulib/import/dup2.c: Update.
3180 * gnulib/import/errno.in.h: Update.
3181 * gnulib/import/error.c: Update.
3182 * gnulib/import/error.h: Update.
3183 * gnulib/import/exitfail.c: Update.
3184 * gnulib/import/exitfail.h: Update.
3185 * gnulib/import/extra/update-copyright: Update.
3186 * gnulib/import/fchdir.c: Update.
3187 * gnulib/import/fcntl.c: Update.
3188 * gnulib/import/fcntl.in.h: Update.
3189 * gnulib/import/fd-hook.c: Update.
3190 * gnulib/import/fd-hook.h: Update.
3191 * gnulib/import/fd-safer-flag.c: Update.
3192 * gnulib/import/fd-safer.c: Update.
3193 * gnulib/import/fdopendir.c: Update.
3194 * gnulib/import/filename.h: Update.
3195 * gnulib/import/filenamecat-lgpl.c: Update.
3196 * gnulib/import/filenamecat.h: Update.
3197 * gnulib/import/flexmember.h: Update.
3198 * gnulib/import/float+.h: Update.
3199 * gnulib/import/float.c: Update.
3200 * gnulib/import/float.in.h: Update.
3201 * gnulib/import/fnmatch.c: Update.
3202 * gnulib/import/fnmatch.in.h: Update.
3203 * gnulib/import/fnmatch_loop.c: Update.
3204 * gnulib/import/fpucw.h: Update.
3205 * gnulib/import/frexp.c: Update.
3206 * gnulib/import/frexpl.c: Update.
3207 * gnulib/import/fstat.c: Update.
3208 * gnulib/import/fstatat.c: Update.
3209 * gnulib/import/getcwd-lgpl.c: Update.
3210 * gnulib/import/getcwd.c: Update.
3211 * gnulib/import/getdtablesize.c: Update.
3212 * gnulib/import/getlogin_r.c: Update.
3213 * gnulib/import/getprogname.c: Update.
3214 * gnulib/import/getprogname.h: Update.
3215 * gnulib/import/gettext.h: Update.
3216 * gnulib/import/gettimeofday.c: Update.
3217 * gnulib/import/glob-libc.h: Update.
3218 * gnulib/import/glob.c: Update.
3219 * gnulib/import/glob.in.h: Update.
3220 * gnulib/import/glob_internal.h: Update.
3221 * gnulib/import/glob_pattern_p.c: Update.
3222 * gnulib/import/globfree.c: Update.
3223 * gnulib/import/hard-locale.c: Update.
3224 * gnulib/import/hard-locale.h: Update.
3225 * gnulib/import/intprops.h: Update.
3226 * gnulib/import/inttypes.in.h: Update.
3227 * gnulib/import/isnan.c: Update.
3228 * gnulib/import/isnand-nolibm.h: Update.
3229 * gnulib/import/isnand.c: Update.
3230 * gnulib/import/isnanl-nolibm.h: Update.
3231 * gnulib/import/isnanl.c: Update.
3232 * gnulib/import/itold.c: Update.
3233 * gnulib/import/libc-config.h: Update.
3234 * gnulib/import/limits.in.h: Update.
3235 * gnulib/import/localcharset.c: Update.
3236 * gnulib/import/localcharset.h: Update.
3237 * gnulib/import/localtime-buffer.c: Update.
3238 * gnulib/import/localtime-buffer.h: Update.
3239 * gnulib/import/lstat.c: Update.
3240 * gnulib/import/m4/00gnulib.m4: Update.
3241 * gnulib/import/m4/__inline.m4: Update.
3242 * gnulib/import/m4/absolute-header.m4: Update.
3243 * gnulib/import/m4/alloca.m4: Update.
3244 * gnulib/import/m4/builtin-expect.m4: Update.
3245 * gnulib/import/m4/canonicalize.m4: Update.
3246 * gnulib/import/m4/chdir-long.m4: Update.
3247 * gnulib/import/m4/close.m4: Update.
3248 * gnulib/import/m4/closedir.m4: Update.
3249 * gnulib/import/m4/configmake.m4: Update.
3250 * gnulib/import/m4/d-ino.m4: Update.
3251 * gnulib/import/m4/d-type.m4: Update.
3252 * gnulib/import/m4/dirent_h.m4: Update.
3253 * gnulib/import/m4/dirfd.m4: Update.
3254 * gnulib/import/m4/dirname.m4: Update.
3255 * gnulib/import/m4/double-slash-root.m4: Update.
3256 * gnulib/import/m4/dup.m4: Update.
3257 * gnulib/import/m4/dup2.m4: Update.
3258 * gnulib/import/m4/eealloc.m4: Update.
3259 * gnulib/import/m4/environ.m4: Update.
3260 * gnulib/import/m4/errno_h.m4: Update.
3261 * gnulib/import/m4/error.m4: Update.
3262 * gnulib/import/m4/exponentd.m4: Update.
3263 * gnulib/import/m4/exponentl.m4: Update.
3264 * gnulib/import/m4/extensions.m4: Update.
3265 * gnulib/import/m4/extern-inline.m4: Update.
3266 * gnulib/import/m4/fchdir.m4: Update.
3267 * gnulib/import/m4/fcntl-o.m4: Update.
3268 * gnulib/import/m4/fcntl.m4: Update.
3269 * gnulib/import/m4/fcntl_h.m4: Update.
3270 * gnulib/import/m4/fdopendir.m4: Update.
3271 * gnulib/import/m4/filenamecat.m4: Update.
3272 * gnulib/import/m4/flexmember.m4: Update.
3273 * gnulib/import/m4/float_h.m4: Update.
3274 * gnulib/import/m4/fnmatch.m4: Update.
3275 * gnulib/import/m4/fnmatch_h.m4: Update.
3276 * gnulib/import/m4/fpieee.m4: Update.
3277 * gnulib/import/m4/frexp.m4: Update.
3278 * gnulib/import/m4/frexpl.m4: Update.
3279 * gnulib/import/m4/fstat.m4: Update.
3280 * gnulib/import/m4/fstatat.m4: Update.
3281 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3282 * gnulib/import/m4/getcwd-path-max.m4: Update.
3283 * gnulib/import/m4/getcwd.m4: Update.
3284 * gnulib/import/m4/getdtablesize.m4: Update.
3285 * gnulib/import/m4/getlogin.m4: Update.
3286 * gnulib/import/m4/getlogin_r.m4: Update.
3287 * gnulib/import/m4/getpagesize.m4: Update.
3288 * gnulib/import/m4/getprogname.m4: Update.
3289 * gnulib/import/m4/gettimeofday.m4: Update.
3290 * gnulib/import/m4/glibc21.m4: Update.
3291 * gnulib/import/m4/glob.m4: Update.
3292 * gnulib/import/m4/glob_h.m4: Update.
3293 * gnulib/import/m4/gnulib-cache.m4: Update.
3294 * gnulib/import/m4/gnulib-common.m4: Update.
3295 * gnulib/import/m4/gnulib-comp.m4: Update.
3296 * gnulib/import/m4/gnulib-tool.m4: Update.
3297 * gnulib/import/m4/hard-locale.m4: Update.
3298 * gnulib/import/m4/include_next.m4: Update.
3299 * gnulib/import/m4/inttypes-pri.m4: Update.
3300 * gnulib/import/m4/inttypes.m4: Update.
3301 * gnulib/import/m4/isnand.m4: Update.
3302 * gnulib/import/m4/isnanl.m4: Update.
3303 * gnulib/import/m4/largefile.m4: Update.
3304 * gnulib/import/m4/limits-h.m4: Update.
3305 * gnulib/import/m4/localcharset.m4: Update.
3306 * gnulib/import/m4/locale-fr.m4: Update.
3307 * gnulib/import/m4/locale-ja.m4: Update.
3308 * gnulib/import/m4/locale-zh.m4: Update.
3309 * gnulib/import/m4/localtime-buffer.m4: Update.
3310 * gnulib/import/m4/longlong.m4: Update.
3311 * gnulib/import/m4/lstat.m4: Update.
3312 * gnulib/import/m4/malloc.m4: Update.
3313 * gnulib/import/m4/malloca.m4: Update.
3314 * gnulib/import/m4/math_h.m4: Update.
3315 * gnulib/import/m4/mbrtowc.m4: Update.
3316 * gnulib/import/m4/mbsinit.m4: Update.
3317 * gnulib/import/m4/mbsrtowcs.m4: Update.
3318 * gnulib/import/m4/mbstate_t.m4: Update.
3319 * gnulib/import/m4/memchr.m4: Update.
3320 * gnulib/import/m4/memmem.m4: Update.
3321 * gnulib/import/m4/mempcpy.m4: Update.
3322 * gnulib/import/m4/memrchr.m4: Update.
3323 * gnulib/import/m4/mkdir.m4: Update.
3324 * gnulib/import/m4/mkstemp.m4: Update.
3325 * gnulib/import/m4/mmap-anon.m4: Update.
3326 * gnulib/import/m4/mode_t.m4: Update.
3327 * gnulib/import/m4/msvc-inval.m4: Update.
3328 * gnulib/import/m4/msvc-nothrow.m4: Update.
3329 * gnulib/import/m4/multiarch.m4: Update.
3330 * gnulib/import/m4/nocrash.m4: Update.
3331 * gnulib/import/m4/off_t.m4: Update.
3332 * gnulib/import/m4/onceonly.m4: Update.
3333 * gnulib/import/m4/open-cloexec.m4: Update.
3334 * gnulib/import/m4/open.m4: Update.
3335 * gnulib/import/m4/openat.m4: Update.
3336 * gnulib/import/m4/opendir.m4: Update.
3337 * gnulib/import/m4/pathmax.m4: Update.
3338 * gnulib/import/m4/rawmemchr.m4: Update.
3339 * gnulib/import/m4/readdir.m4: Update.
3340 * gnulib/import/m4/readlink.m4: Update.
3341 * gnulib/import/m4/realloc.m4: Update.
3342 * gnulib/import/m4/rename.m4: Update.
3343 * gnulib/import/m4/rewinddir.m4: Update.
3344 * gnulib/import/m4/rmdir.m4: Update.
3345 * gnulib/import/m4/save-cwd.m4: Update.
3346 * gnulib/import/m4/secure_getenv.m4: Update.
3347 * gnulib/import/m4/setenv.m4: Update.
3348 * gnulib/import/m4/signal_h.m4: Update.
3349 * gnulib/import/m4/ssize_t.m4: Update.
3350 * gnulib/import/m4/stat-time.m4: Update.
3351 * gnulib/import/m4/stat.m4: Update.
3352 * gnulib/import/m4/std-gnu11.m4: Update.
3353 * gnulib/import/m4/stdbool.m4: Update.
3354 * gnulib/import/m4/stddef_h.m4: Update.
3355 * gnulib/import/m4/stdint.m4: Update.
3356 * gnulib/import/m4/stdio_h.m4: Update.
3357 * gnulib/import/m4/stdlib_h.m4: Update.
3358 * gnulib/import/m4/strchrnul.m4: Update.
3359 * gnulib/import/m4/strdup.m4: Update.
3360 * gnulib/import/m4/strerror.m4: Update.
3361 * gnulib/import/m4/string_h.m4: Update.
3362 * gnulib/import/m4/strstr.m4: Update.
3363 * gnulib/import/m4/strtok_r.m4: Update.
3364 * gnulib/import/m4/sys_socket_h.m4: Update.
3365 * gnulib/import/m4/sys_stat_h.m4: Update.
3366 * gnulib/import/m4/sys_time_h.m4: Update.
3367 * gnulib/import/m4/sys_types_h.m4: Update.
3368 * gnulib/import/m4/tempname.m4: Update.
3369 * gnulib/import/m4/time_h.m4: Update.
3370 * gnulib/import/m4/unistd-safer.m4: Update.
3371 * gnulib/import/m4/unistd_h.m4: Update.
3372 * gnulib/import/m4/warn-on-use.m4: Update.
3373 * gnulib/import/m4/wchar_h.m4: Update.
3374 * gnulib/import/m4/wchar_t.m4: Update.
3375 * gnulib/import/m4/wctype_h.m4: Update.
3376 * gnulib/import/m4/wint_t.m4: Update.
3377 * gnulib/import/malloc.c: Update.
3378 * gnulib/import/malloc/scratch_buffer.h: Update.
3379 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3380 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3381 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3382 * gnulib/import/malloca.c: Update.
3383 * gnulib/import/malloca.h: Update.
3384 * gnulib/import/malloca.valgrind: Update.
3385 * gnulib/import/math.in.h: Update.
3386 * gnulib/import/mbrtowc.c: Update.
3387 * gnulib/import/mbsinit.c: Update.
3388 * gnulib/import/mbsrtowcs-impl.h: Update.
3389 * gnulib/import/mbsrtowcs-state.c: Update.
3390 * gnulib/import/mbsrtowcs.c: Update.
3391 * gnulib/import/memchr.c: Update.
3392 * gnulib/import/memmem.c: Update.
3393 * gnulib/import/mempcpy.c: Update.
3394 * gnulib/import/memrchr.c: Update.
3395 * gnulib/import/mkdir.c: Update.
3396 * gnulib/import/mkstemp.c: Update.
3397 * gnulib/import/msvc-inval.c: Update.
3398 * gnulib/import/msvc-inval.h: Update.
3399 * gnulib/import/msvc-nothrow.c: Update.
3400 * gnulib/import/msvc-nothrow.h: Update.
3401 * gnulib/import/open.c: Update.
3402 * gnulib/import/openat-die.c: Update.
3403 * gnulib/import/openat-priv.h: Update.
3404 * gnulib/import/openat-proc.c: Update.
3405 * gnulib/import/openat.c: Update.
3406 * gnulib/import/openat.h: Update.
3407 * gnulib/import/opendir.c: Update.
3408 * gnulib/import/pathmax.h: Update.
3409 * gnulib/import/pipe-safer.c: Update.
3410 * gnulib/import/rawmemchr.c: Update.
3411 * gnulib/import/readdir.c: Update.
3412 * gnulib/import/readlink.c: Update.
3413 * gnulib/import/realloc.c: Update.
3414 * gnulib/import/ref-add.sin: Update.
3415 * gnulib/import/ref-del.sin: Update.
3416 * gnulib/import/rename.c: Update.
3417 * gnulib/import/rewinddir.c: Update.
3418 * gnulib/import/rmdir.c: Update.
3419 * gnulib/import/same-inode.h: Update.
3420 * gnulib/import/save-cwd.c: Update.
3421 * gnulib/import/save-cwd.h: Update.
3422 * gnulib/import/scratch_buffer.h: Update.
3423 * gnulib/import/secure_getenv.c: Update.
3424 * gnulib/import/setenv.c: Update.
3425 * gnulib/import/signal.in.h: Update.
3426 * gnulib/import/stat-time.c: Update.
3427 * gnulib/import/stat-time.h: Update.
3428 * gnulib/import/stat-w32.c: Update.
3429 * gnulib/import/stat-w32.h: Update.
3430 * gnulib/import/stat.c: Update.
3431 * gnulib/import/stdbool.in.h: Update.
3432 * gnulib/import/stddef.in.h: Update.
3433 * gnulib/import/stdint.in.h: Update.
3434 * gnulib/import/stdio.in.h: Update.
3435 * gnulib/import/stdlib.in.h: Update.
3436 * gnulib/import/str-two-way.h: Update.
3437 * gnulib/import/strchrnul.c: Update.
3438 * gnulib/import/strdup.c: Update.
3439 * gnulib/import/streq.h: Update.
3440 * gnulib/import/strerror-override.c: Update.
3441 * gnulib/import/strerror-override.h: Update.
3442 * gnulib/import/strerror.c: Update.
3443 * gnulib/import/string.in.h: Update.
3444 * gnulib/import/stripslash.c: Update.
3445 * gnulib/import/strnlen1.c: Update.
3446 * gnulib/import/strnlen1.h: Update.
3447 * gnulib/import/strstr.c: Update.
3448 * gnulib/import/strtok_r.c: Update.
3449 * gnulib/import/sys_stat.in.h: Update.
3450 * gnulib/import/sys_time.in.h: Update.
3451 * gnulib/import/sys_types.in.h: Update.
3452 * gnulib/import/tempname.c: Update.
3453 * gnulib/import/tempname.h: Update.
3454 * gnulib/import/time.in.h: Update.
3455 * gnulib/import/unistd--.h: Update.
3456 * gnulib/import/unistd-safer.h: Update.
3457 * gnulib/import/unistd.in.h: Update.
3458 * gnulib/import/unsetenv.c: Update.
3459 * gnulib/import/verify.h: Update.
3460 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3461 * gnulib/import/wchar.in.h: Update.
3462 * gnulib/import/wctype.in.h: Update.
3463 * gnulib/import/xalloc-oversized.h: Update.
3464 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3465 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3466
3467 2018-08-16 Gary Benson <gbenson@redhat.com>
3468
3469 PR gdb/13000:
3470 * gdb/main.c (captured_main_1): Exit with nonzero status
3471 in batch mode if the last command to be executed failed.
3472 * NEWS: Mention the above.
3473
3474 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
3475
3476 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3477 end of warning message.
3478
3479 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3480
3481 PR gdb/22943:
3482 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3483 (aarch64_extract_return_value): Use
3484 aapcs_is_vfp_call_or_return_candidate.
3485 (aarch64_return_in_memory): Likewise.
3486 (aarch64_store_return_value): Likewise.
3487
3488 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3489
3490 * aarch64-tdep.c
3491 (aapcs_is_vfp_call_or_return_candidate): Make static
3492 (pass_in_v_or_stack): Remove function.
3493 (pass_in_v_vfp_candidate): New function.
3494 (aarch64_push_dummy_call): Check for float register candidates.
3495
3496 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3497
3498 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3499 (aapcs_is_vfp_call_or_return_candidate_1): New function.
3500 (aapcs_is_vfp_call_or_return_candidate): Likewise.
3501
3502 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3503
3504 PR build/23399
3505 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3506 (struct ipa_sym_addresses): Rename to...
3507 (struct ipa_sym_addresses_common): ... this.
3508 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3509
3510 2018-08-28 Tom Tromey <tom@tromey.com>
3511
3512 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3513 (token_fifo): Now a std::vector.
3514 (yylex, c_parse): Update.
3515 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3516 (token_fifo): Now a std::vector.
3517 (yylex, d_parse): Update.
3518 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3519 (token_fifo): Now a std::vector.
3520 (yylex, go_parse): Update.
3521
3522 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
3523
3524 * parser-defs.h (struct type_stack) <elements>: Change type to
3525 std::vector<union type_stack_elt>.
3526 <depth, size>: Remove.
3527 * parse.c (parse_exp_in_context_1): Adjust.
3528 (type_stack_reserve): Remove.
3529 (check_type_stack_depth): Remove.
3530 (insert_into_type_stack): Adjust to std::vector.
3531 (insert_type): Likewise.
3532 (push_type): Likewise.
3533 (push_type_int): Likewise.
3534 (insert_type_address_space): Likewise.
3535 (pop_type): Likewise.
3536 (pop_type_int): Likewise.
3537 (pop_typelist): Likewise.
3538 (pop_type_stack): Likewise.
3539 (append_type_stack): Likewise.
3540 (push_type_stack): Likewise.
3541 (get_type_stack): Likewise.
3542 (type_stack_cleanup): Likewise.
3543 (push_typelist): Likewise.
3544 (follow_types): Likewise.
3545 (_initialize_parse): Likewise.
3546
3547 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
3548
3549 * NEWS: Mention csky target.
3550
3551 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
3552 Hafiz Abid Qadeer <abidh@codesourcery.com>
3553 Don Breazeal <donb@codesourcery.com>
3554
3555 * csky-linux-tdep.c: New file.
3556 * csky-tdep.c: Likewise.
3557 * csky-tdep.h: Likewise.
3558 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3559 csky-tdep.o.
3560 (HFILES_NO_SRCDIR): Add csky-tdep.h.
3561 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3562 * configure.tgt: Add csky support.
3563
3564 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
3565
3566 * python/py-framefilter.c (py_print_frame): Print frame architecture
3567 when printing on an MI output.
3568
3569 2018-08-27 Tom Tromey <tom@tromey.com>
3570
3571 PR build/23087:
3572 * configure: Rebuild.
3573 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3574
3575 2018-08-27 Tom Tromey <tom@tromey.com>
3576
3577 * aarch64-linux-tdep.c
3578 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3579 casts to int.
3580
3581 2018-08-27 Tom Tromey <tom@tromey.com>
3582
3583 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3584 unsigned.
3585 (ppc64_standard_linkage1, ppc64_standard_linkage2)
3586 (ppc64_standard_linkage3, ppc64_standard_linkage4)
3587 (ppc64_standard_linkage5, ppc64_standard_linkage6)
3588 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3589 unsigned.
3590
3591 2018-08-27 Tom Tromey <tom@tromey.com>
3592
3593 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3594 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3595
3596 2018-08-27 Tom Tromey <tom@tromey.com>
3597
3598 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3599 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3600 ULONGEST_MAX.
3601 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3602 ULONGEST_MAX.
3603 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3604 ULONGEST_MAX.
3605 * sparc-linux-tdep.c (sparc32_linux_sigframe)
3606 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3607 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3608 ULONGEST_MAX.
3609 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3610 (ppc64_linux_sigaction_tramp_frame)
3611 (ppc32_linux_sighandler_tramp_frame)
3612 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3613 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3614 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3615 * mn10300-linux-tdep.c (am33_linux_sigframe)
3616 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3617 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3618 * mips-linux-tdep.c (mips_linux_o32_sigframe)
3619 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3620 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3621 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3622 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3623 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3624 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3625 * microblaze-linux-tdep.c
3626 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3627 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3628 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3629 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3630 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3631 * common/common-types.h (ULONGEST_MAX): New define.
3632 (CORE_ADDR_MAX): Fix formatting.
3633 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3634 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3635 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3636 (arm_linux_rt_sigreturn_tramp_frame)
3637 (arm_eabi_linux_sigreturn_tramp_frame)
3638 (arm_eabi_linux_rt_sigreturn_tramp_frame)
3639 (thumb2_eabi_linux_sigreturn_tramp_frame)
3640 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3641 (arm_linux_restart_syscall_tramp_frame)
3642 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3643 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3644 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3645 ULONGEST_MAX.
3646 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3647
3648 2018-08-27 Tom Tromey <tom@tromey.com>
3649
3650 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3651 CORE_ADDR_MAX.
3652 * mips-tdep.c (mips_deal_with_atomic_sequence)
3653 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3654 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3655 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3656 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3657 CORE_ADDR_MAX.
3658 * aarch64-tdep.c (aarch64_software_single_step): Use
3659 CORE_ADDR_MAX.
3660
3661 2018-08-27 Tom Tromey <tom@tromey.com>
3662
3663 * linespec.c (complete_linespec_component): Add cast to "char".
3664 * completer.c (completion_tracker::build_completion_result): Add
3665 cast to "char".
3666
3667 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3668
3669 * solist.h (struct solist, struct target_so_ops): Fix
3670 indentation.
3671
3672 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3673
3674 * ada-tasks.c (ada_task_info_s): Remove typedef.
3675 (DEF_VEC_O(ada_task_info_s)): Remove.
3676 (struct ada_tasks_inferior_data): Initialize fields.
3677 <task_list>: Make an std::vector.
3678 (get_ada_tasks_inferior_data): Allocate with new.
3679 (ada_get_task_number): Adjust.
3680 (get_task_number_from_id): Likewise.
3681 (valid_task_id): Likewise.
3682 (ada_get_task_info_from_ptid): Likewise.
3683 (iterate_over_live_ada_tasks): Likewise.
3684 (add_ada_task): Likewise.
3685 (read_known_tasks): Likewise.
3686 (ada_build_task_list): Likewise.
3687 (print_ada_task_info): Likewise.
3688 (info_task): Likewise.
3689 (task_command_1): Likewise.
3690
3691 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3692
3693 * ada-lang.c (add_angle_brackets): Return std::string.
3694
3695 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
3696
3697 * python/py-threadevent.c (py_get_event_thread): Initialize
3698 pythread.
3699
3700 2018-08-24 Pedro Alves <palves@redhat.com>
3701
3702 * python/py-bpevent.c (create_breakpoint_event_object): Use
3703 copy-initialization.
3704 * python/py-continueevent.c (emit_continue_event): Use
3705 copy-initialization.
3706 * python/py-exitedevent.c (create_exited_event_object): Return a
3707 gdbpy_ref<>.
3708 (emit_exited_event): Use copy-initialization.
3709 * python/py-inferior.c (python_new_inferior)
3710 (python_inferior_deleted, add_thread_object): Use
3711 copy-initialization.
3712 * python/py-infevents.c (create_inferior_call_event_object)
3713 (create_register_changed_event_object)
3714 (create_memory_changed_event_object): Return a gdbpy_ref<>.
3715 (emit_inferior_call_event, emit_memory_changed_event)
3716 (emit_register_changed_event): Use copy-initialization.
3717 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3718 Return a gdbpy_ref<>.
3719 (emit_new_objfile_event): Use copy-initialization.
3720 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3721 (emit_clear_objfiles_event): Use copy-initialization.
3722 * python/py-signalevent.c (create_signal_event_object): Use
3723 copy-initialization.
3724 * python/py-threadevent.c (create_thread_event_object): Use
3725 copy-initialization.
3726
3727 2018-08-24 Pedro Alves <palves@redhat.com>
3728 Simon Marchi <simon.marchi@ericsson.com>
3729
3730 PR gdb/23379
3731 * python/py-continueevent.c: Include "gdbthread.h".
3732 (create_continue_event_object): Add intro comment. Add 'ptid'
3733 parameter. Use it to find thread to pass to
3734 create_thread_event_object.
3735 (emit_continue_event): Pass PTID down to
3736 create_continue_event_object.
3737 * python/py-event.h (py_get_event_thread): Declare.
3738 (create_thread_event_object): Remove default from 'thread'
3739 parameter.
3740 * python/py-stopevent.c (create_stop_event_object): Use
3741 py_get_event_thread.
3742 * python/py-threadevent.c (get_event_thread): Rename to ...
3743 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3744 and use it to find the thread.
3745 (create_thread_event_object): Assert that THREAD isn't null.
3746 Don't find the event thread here.
3747
3748 2018-08-23 Kevin Buettner <kevinb@redhat.com>
3749
3750 * block.h (blockrange, blockranges): New struct declarations.
3751 (struct block): Add new field named `ranges'.
3752 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3753 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3754 macros for accessing ranges in struct block.
3755 (make_blockranges): New declaration.
3756 block.c (make_blockranges): New function.
3757 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3758 for block.
3759 * symtab.h (find_pc_partial_function): Add new parameter `block'.
3760 * blockframe.c (cache_pc_function_block): New static global.
3761 (clear_pc_function_cache): Clear cache_pc_function_block.
3762 (find_pc_partial_function): Move comment to symtab.h. Add
3763 support for non-contiguous blocks.
3764 * cli/cli-cmds.c (block.h): Include.
3765 (print_disassembly): Handle printing of non-contiguous blocks.
3766 (disassemble_current_function): Likewise.
3767 (disassemble_command): Likewise.
3768
3769 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3770 BLOCK_START.
3771 * blockframe.c (get_pc_function_start): Likewise.
3772 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3773 (gcc_symbol_address): Likewise.
3774 * compile/compile-object-run.c (compile_object_run): Likewise.
3775 * compile/compile.c (get_expr_block_and_pc): Likewise.
3776 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3777 (func_addr_to_tail_call_list): Likewise.
3778 * findvar.c (default_read_var_value): Likewise.
3779 * inline-frame.c (inline_frame_this_id): Likewise.
3780 (skip-inline_frames): Likewise.
3781 * infcmd.c (until_next_command): Likewise.
3782 * linespec.c (convert_linespec_to_sals): Likewise.
3783 * parse.c (parse_exp_in_context_1): Likewise.
3784 * printcmd.c (build_address_symbolic): likewise.
3785 (info_address_command): Likewise.
3786 symtab.c (find_function_start_sal): Likewise.
3787 (skip_prologue_sal): Likewise.
3788 (find_function_alias_target): Likewise.
3789 (find_gnu_ifunc): Likewise.
3790 * stack.c (find_frame_funname): Likewise.
3791 * symtab.c (fixup_symbol_section): Likewise.
3792 (find_function_start_sal): Likewise.
3793 (skip_prologue_sal): Likewsie.
3794 (find_function_alias_target): Likewise.
3795 (find_gnu_ifunc): Likewise.
3796 * tracepoint.c (info_scope_command): Likewise.
3797 * value.c (value_fn_field): Likewise.
3798
3799 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3800 in place of find_pc_partial_function.
3801 * blockframe.c (find_function_entry_range_from_pc): New function.
3802 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3803 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3804 for each range in a block.
3805
3806
3807 2018-08-23 Xavier Roirand <roirand@adacore.com>
3808
3809 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3810 incrementation.
3811
3812 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3813
3814 * solib-svr4.c (read_program_headers_from_bfd): Return
3815 gdb::optional<gdb::byte_vector>.
3816 (svr4_exec_displacement): Adjust.
3817
3818 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3819
3820 * solib-svr4.c (read_program_header): Return
3821 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3822 (find_program_interpreter): Return
3823 gdb::optional<gdb::byte_vector>.
3824 (scan_dyntag_auxv): Adjust.
3825 (enable_break): Adjust.
3826 (svr4_exec_displacement): Adjust.
3827
3828 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3829
3830 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3831 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3832
3833 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3834
3835 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3836 string_vprintf.
3837 * guile/scm-utils.c (gdbscm_printf): Likewise.
3838 * serial.c (serial_printf): Likewise.
3839 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3840
3841 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3842
3843 * stack.c (print_frame): Print frame architecture when printing on
3844 an MI output.
3845 * NEWS: Mention new "arch" attribute in frame output.
3846
3847 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3848
3849 * arch/aarch64.h (aarch64_regnum): Update comment.
3850
3851 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3852
3853 * NEWS: Add SVE to 8.2 section.
3854
3855 2018-08-21 Pedro Alves <palves@redhat.com>
3856
3857 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3858 out from gdbscm_parse_function_args.
3859 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3860 gdbscm_parse_function_args_1.
3861
3862 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3863
3864 PR gdb/17816
3865 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3866 operator.
3867
3868 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3869
3870 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3871
3872 2018-08-19 Michael Spang <spang@google.com>
3873
3874 PR gdb/11786
3875 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3876 for PT_TLS segments.
3877
3878 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3879
3880 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3881 dwarf_variable_value.
3882 * dwarf2-frame.c (class dwarf_expr_executor):
3883 Add override for dwarf_variable_value.
3884 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3885 (class symbol_needs_eval_context): Likewise.
3886 (indirect_synthetic_pointer): Add forward declaration.
3887 (sect_variable_value): New function.
3888 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3889 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3890 for DW_OP_GNU_variable_value.
3891
3892 2018-08-16 Tom Tromey <tom@tromey.com>
3893
3894 * top.c (read_command_file): Update.
3895 (command_line_input): Remove "repeat" argument.
3896 * ada-lang.c (get_selections): Update.
3897 * linespec.c (decode_line_2): Update.
3898 * defs.h (command_line_input): Remove argument.
3899 * cli/cli-script.c (read_next_line): Update.
3900 * python/py-gdb-readline.c: Update.
3901
3902 2018-08-17 Tom Tromey <tom@tromey.com>
3903
3904 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3905 command_line_input.
3906
3907 2018-08-15 Tom Tromey <tom@tromey.com>
3908
3909 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3910
3911 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3912
3913 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3914 If used, use find_pc_partial_function to find address range
3915 to disassemble.
3916 * mi/mi-main.c (mi_cmd_list_features): Report
3917 "data-disassemble-a-option" feature.
3918 * NEWS: Mention new -data-disassemble option -a.
3919
3920 2018-08-13 Tom Tromey <tom@tromey.com>
3921
3922 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3923
3924 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3925
3926 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3927 (aarch64_linux_collect_sve_regset): Likewise.
3928 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3929 * regcache.h (regcache_map_entry_size): New function.
3930
3931 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3932
3933 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3934 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3935 (SVE_HEADER_VL_LENGTH): Likewise.
3936 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3937 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3938 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3939 (SVE_HEADER_SIZE_OFFSET): Likewise.
3940 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3941 (SVE_HEADER_VL_OFFSET): Likewise.
3942 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3943 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3944 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3945 (SVE_HEADER_SIZE): Likewise.
3946 (aarch64_linux_core_read_vq): Add function.
3947 (aarch64_linux_core_read_description): Check for SVE section.
3948
3949 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3950
3951 * aarch64-fbsd-tdep.c
3952 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3953 collect_size.
3954 * aarch64-linux-tdep.c
3955 (aarch64_linux_iterate_over_regset_sections): Likewise.
3956 * alpha-linux-tdep.c
3957 (alpha_linux_iterate_over_regset_sections):
3958 * alpha-nbsd-tdep.c
3959 (alphanbsd_iterate_over_regset_sections): Likewise.
3960 * amd64-fbsd-tdep.c
3961 (amd64fbsd_iterate_over_regset_sections): Likewise.
3962 * amd64-linux-tdep.c
3963 (amd64_linux_iterate_over_regset_sections): Likewise.
3964 * arm-bsd-tdep.c
3965 (armbsd_iterate_over_regset_sections): Likewise.
3966 * arm-fbsd-tdep.c
3967 (arm_fbsd_iterate_over_regset_sections): Likewise.
3968 * arm-linux-tdep.c
3969 (arm_linux_iterate_over_regset_sections): Likewise.
3970 * corelow.c (get_core_registers_cb): Likewise.
3971 (core_target::fetch_registers): Likewise.
3972 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3973 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3974 * gdbarch.h (void): Regenerate.
3975 * gdbarch.sh: Add supply_size and collect_size.
3976 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3977 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3978 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3979 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3980 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3981 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3982 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3983 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3984 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3985 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3986 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3987 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3988 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3989 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3990 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3991 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3992 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3993 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3994 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3995 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3996 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3997 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3998 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3999 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4000 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4001 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4002 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4003 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4004 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4005 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4006
4007 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
4008
4009 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4010 with string_printf.
4011
4012 2018-08-10 Keith Seitz <keiths@redhat.com>
4013
4014 * compile/compile-c-support.c (add_code_header, add_code_footer):
4015 Move into policy class.
4016 (c_push_user_expression, pop_user_expression_nop)
4017 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4018 (compile_program): New host class.
4019 (c_compile_program): New typedef.
4020 (c_compute_porgram): Use c_compile_program.
4021
4022 2018-08-10 Keith Seitz <keiths@redhat.com>
4023
4024 * compile/compile-internal.h (compile_instance::~compile_instance):
4025 Remove calls to htab_delete.
4026 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4027 * compile.c (compile_instance::compile_instance): Initialize
4028 htab unique pointers.
4029 (compile_instance::get_cached_type, compile_instance::insert_type)
4030 (compile_instance::error_symbol_once): Update for unique_ptr.
4031
4032 2018-08-10 Keith Seitz <keiths@redhat.com>
4033
4034 * compile/compile-c-symbols.c (struct symbol_error)
4035 (hash_symbol_error, eq_symbol_error, del_symbol_error)
4036 (compile_instance::insert_symbol_error)
4037 (compile_instance::error_symbol_once): Move to ...
4038 * compile/compile.c: ... here.
4039
4040 2018-08-10 Keith Seitz <keiths@redhat.com>
4041
4042 * compile/compile-c-support.c (c_get_compile_context): Use `new'
4043 instead of `new_compile_instance'.
4044 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4045 Update description.
4046 If the symbol error map is not initialized, create it.
4047 (generate_c_for_for_one_symbol): Do not check/initialize
4048 the symbol error map.
4049 * compile/compile-c-types.c (compile_c_instance): Make a class.
4050 Update all callers.
4051 (compile_instance::compile_instance): Initialize the type cache.
4052 (get_cached_type): New function.
4053 (insert_type): Update description.
4054 (compile_c_instance::m_default_cflags): Define.
4055 (convert_type): Update description. Use get_cached_type.
4056 (delete_instance): Moved to destructor.
4057 (new_compile_instance): Moved to constructor.
4058 * compile/compile-c.h (compile_c_instance): Make class inheriting
4059 from compile_instance.
4060 <base>: Remove field.
4061 <type_map, symbol_err_map>: Move to base class.
4062 <c_plugin>: Rename to `m_plugin' and remove pointer type.
4063 * compile/compile-internal.h (compile_instance): Make class.
4064 <type_map_t, symbol_err_map_t>: Define.
4065 <fe>: Rename to `m_gcc_fe'.
4066 <scope, block, gcc_target_options>: Add `m_' prefix.
4067 <m_type_map, m_symbol_err_map>: New fields, moved from
4068 compile_c_instance.
4069 <destroy>: Remove.
4070 (convert_type, new_compile_instance): Remove.
4071 * compile/compile.c (cleanup_compile_instance): Remove.
4072 (compile_to_object): Use unique_ptr to eliminate cleanups.
4073 (compile_instance::set_print_callback, compile_instance::version)
4074 (compile_instance::set_verbose)
4075 (compile_instance::set_driver_filename)
4076 (compile_instance::set_triplet_regexp)
4077 (compile_instance::set_arguments)
4078 (compile_instance::set_source_file)
4079 (compile_instance::compile): Define.
4080
4081 2018-08-10 Keith Seitz <keiths@redhat.com>
4082
4083 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4084 * compile/compile-c-types.c: Define GCC_METHODN macros and include
4085 gcc-c-fe.def to define C plugin.
4086 (delete_instance): Delete `c_plugin'.
4087 (new_compile_instance): Initialize `c_plugin'.
4088 * compile/compile-c.h: Include gcc_c_plugin.h.
4089 (struct compile_c_instance) <c_plugin>: New member.
4090 * gcc-c-plugin.h: New file.
4091 Update all callers with API change.
4092
4093 2018-08-10 Keith Seitz <keiths@redhat.com>
4094
4095 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4096 (HFILES_NO_SRCDIR): ... to here.
4097 Add compile-internal.h and compile-c.h.
4098 * compile/compile-c-support.c: Include compile-c.h.
4099 * compile/compile-c-symbols.c: Include compile-c.h.
4100 (generate_c_for_variable_locations): Update comment.
4101 * compile/compile-c-types.c: Include compile-c.h.
4102 * compile/compile-c.h: New file -- moved C language declarations
4103 from other files here.
4104 * compile/compile-internal.h: Do not include hashtab.h or
4105 common/enum-flags.h.
4106 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4107 (gcc_convert_symbol, gcc_symbol_address)
4108 (generate_c_for_variable_locations, c_get_mode_for_size)
4109 (c_get_range_decl_name): Definitions moved to compile-c.h.
4110 * compile/compile-loc2c.c: Include compile-c.h.
4111
4112 2018-08-10 Keith Seitz <keiths@redhat.com>
4113
4114 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4115 (c_symbol_substitution_name): ... this.
4116 Update all callers.
4117
4118 2018-08-10 Keith Seitz <keiths@redhat.com>
4119
4120 * compile/compile-c-support.c (c_compute_program): Use
4121 unique_xmalloc_ptr to eliminate cleanup.
4122 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4123 Return a unique_xmalloc_ptr and eliminate cleanup.
4124 * compile/compile-internal.h (generate_c_for_variable_locations):
4125 Return unique_xmalloc_ptr and update description.
4126
4127 2018-08-10 Alan Hayward <alan.hayward@arm.com>
4128
4129 * corelow.c (core_target::get_core_register_section): Rename
4130 min_size to section_min_size.
4131
4132 2018-08-09 Jim Wilson <jimw@sifive.com>
4133
4134 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4135 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4136 * NEWS: Mention new GNU/Linux RISC-V target.
4137 * configure.host: Add riscv*-*-linux*.
4138 * configure.nat: Add riscv*.
4139 * configure.tgt: Add riscv*-*-linux*.
4140 * riscv-linux-nat.c: New file.
4141 * riscv-linux-tdep.c: New file.
4142
4143 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4144
4145 * infrun.c (resume): Make static, add forward declaration.
4146 (proceed): Update header comment.
4147 * infrun.h (resume): Delete declaration.
4148
4149 2018-08-09 Tom Tromey <tom@tromey.com>
4150
4151 * riscv-tdep.h: Minor formatting fixes.
4152
4153 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
4154
4155 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4156 * dwarf-index-cache.c (create_dir_and_check): Likewise.
4157 (test_mkdir_recursive): Likewise.
4158 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4159
4160 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4161
4162 * valarith.c (value_subscripted_rvalue): If an array is not in
4163 memory, and we don't know the upper bound, then we can't know that
4164 the requested element exists or not.
4165
4166 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
4167
4168 * target.c (str_comma_list_concat_elem): Fix typo in comment.
4169 (target_options_to_string): Add comment.
4170
4171 2018-08-08 Tom Tromey <tom@tromey.com>
4172
4173 * unittests/scoped_mmap-selftests.c: Check result of "write".
4174
4175 2018-08-08 Jim Wilson <jimw@sifive.com>
4176
4177 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4178 (decode_register_index_short): New.
4179 (decode_j_type_insn, decode_cj_type_insn): New.
4180 (decode_b_type_insn, decode_cb_type_insn): New.
4181 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
4182 local xlen. Check xlen when decoding ambiguous compressed insns. In
4183 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4184 is_c_sw_insn instead of is_sw_insn.
4185 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4186 (riscv_software_single_step): New.
4187 * riscv-tdep.h (riscv_software_single_step): Declare.
4188
4189 * riscv-tdep.c (riscv_isa_xlen): Drop static.
4190 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4191
4192 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
4193
4194 PR gdb/18050:
4195 * target.c (dispose_inferior): Don't dispose of inferiors that are
4196 already killed.
4197
4198 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
4199
4200 * remote.c (remote_target::download_tracepoint): Change char* to
4201 const char*.
4202
4203 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
4204
4205 * target.h (target_options_to_string): Return an std::string.
4206 * target.c (str_comma_list_concat_elem): Return void, use
4207 std::string.
4208 (do_option): Likewise.
4209 (target_options_to_string): Return an std::string.
4210 * linux-nat.c (linux_nat_target::wait): Adjust.
4211 * target-debug.h (target_debug_print_options): Adjust.
4212
4213 2018-08-07 Tom Tromey <tom@tromey.com>
4214
4215 * Makefile.in (CPPFLAGS): New variable.
4216 (INTERNAL_CPPFLAGS): Use it.
4217
4218 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4219
4220 * NEWS: Mention the index cache.
4221
4222 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4223
4224 * common/pathstuff.h (get_standard_cache_dir): New.
4225 * common/pathstuff.c (get_standard_cache_dir): New.
4226 * build-id.h (build_id_to_string): New.
4227 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4228 DEBUG_STR_SUFFIX): Move to here.
4229 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4230 DEBUG_STR_SUFFIX): Move from there.
4231 (write_psymtabs_to_index): Make non-static, add basename
4232 parameter. Write to temporary files, rename when done.
4233 (save_gdb_index_command): Adjust call to
4234 write_psymtabs_to_index.
4235 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4236 field.
4237 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4238 (get_gdb_index_contents_from_cache): New.
4239 (get_gdb_index_contents_from_cache_dwz): New.
4240 (dwarf2_initialize_objfile): Read index from cache.
4241 (dwarf2_build_psymtabs): Save to index.
4242 * dwarf-index-cache.h: New file.
4243 * dwarf-index-cache.c: New file.
4244 * dwarf-index-write.h: New file.
4245
4246 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4247
4248 * gnulib/aclocal.m4: Re-generate.
4249 * gnulib/config.in: Re-generate.
4250 * gnulib/configure: Re-generate.
4251 * gnulib/import/Makefile.am: Re-generate.
4252 * gnulib/import/Makefile.in: Re-generate.
4253 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4254 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4255 * gnulib/import/m4/mkdir.m4: New file.
4256 * gnulib/import/mkdir.c: New file.
4257 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4258 module.
4259
4260 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4261
4262 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4263 * common/scoped_mmap.c: New file.
4264 * common/scoped_mmap.h (destroy): New method.
4265 (~scoped_mmap, reset): Use destroy.
4266 (scoped_mmap): New move constructor.
4267 (mmap_file): New declaration.
4268 * unittests/scoped_mmap-selftests.c (test_normal,
4269 test_invalid_filename, run_tests): New functions.
4270 (_initialize_scoped_mmap_selftests): Register selftest.
4271
4272 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4273
4274 * dwarf2read.c (read_gdb_index_from_section): Rename to...
4275 (read_gdb_index_from_buffer): ... this. Remove section
4276 parameter, add buffer parameter.
4277 (get_gdb_index_contents_ftype,
4278 get_gdb_index_contents_dwz_ftype): New typedefs.
4279 (dwarf2_read_gdb_index): Add callback parameters to get the
4280 index contents.
4281 (get_gdb_index_contents_from_section): New.
4282 (dwarf2_initialize_objfile): Update call to
4283 dwarf2_read_gdb_index.
4284
4285 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4286
4287 * common/filestuff.h (gdb_fopen_cloexec): New overload.
4288 (gdb_open_cloexec): Likewise.
4289 * nat/linux-osdata.c (command_from_pid): Use string_printf.
4290 (commandline_from_pid): Likewise.
4291 (linux_xfer_osdata_threads): Likewise.
4292 (linux_xfer_osdata_fds): Likewise.
4293 * ada-lang.c (is_package_name): Likewise.
4294 * auxv.c (procfs_xfer_auxv): Likewise.
4295 * breakpoint.c (print_one_breakpoint_location): Use
4296 uiout::field_fmt.
4297 (print_one_catch_solib): Use string_printf.
4298 * coff-pe-read.c (add_pe_exported_sym): Likewise.
4299 (add_pe_forwarded_sym): Likewise.
4300 * dwarf2read.c (create_type_unit_group): Likewise.
4301 (build_error_marker_type): Likewise.
4302 * infcall.c (get_function_name): Likewise.
4303 * valprint.c (print_converted_chars_to_obstack): Likewise.
4304 * xtensa-tdep.c (xtensa_register_type): Likewise.
4305
4306 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
4307
4308 * remote.c (remote_target::download_tracepoint): Fix format
4309 string errors.
4310
4311 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4312
4313 * tracefile.c: Include common/byte-vector.h.
4314 (trace_save): Change type of buf to gdb::byte_vector. Initialize
4315 with trace_regblock_size if needed. Update uses of buf.
4316
4317 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4318
4319 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4320 std::vector<unsigned char>.
4321 * tracepoint.c (collection_list::collection_list): Remove
4322 m_regs_mask initializer from initializer list. Resize
4323 m_regs_mask using the largest remote register number.
4324 (collection_list::add_remote_register): Remove size check on
4325 m_regs_mask. Use at to access element.
4326 (collection_list::stringify): Change type of temp_buf to
4327 gdb::char_vector. Update uses of temp_buf. Resize if needed to
4328 stringify the register mask. Use pack_hex_byte for the register
4329 mask.
4330
4331 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4332
4333 * tracepoint.h (class collection_list) <add_register>: Remove.
4334 <add_remote_register, add_ax_registers, add_local_register>:
4335 Declare.
4336 <add_memrange>: Add scope parameter.
4337 * tracepoint.c (encode_actions_1): Likewise.
4338 (collection_list::add_register): Rename to ...
4339 (collection_list::add_remote_register): ... this. Update
4340 comment.
4341 (collection_list::add_ax_registers, add_local_register): New
4342 methods.
4343 (collection_list::add_memrange): Add scope parameter. Call
4344 add_local_register instead of add_register.
4345 (finalize_tracepoint_aexpr): New function.
4346 (collection_list::collect_symbol): Update calls to add_memrange.
4347 Call add_local_register instead of add_register. Call
4348 add_ax_registers. Call finalize_tracepoint_aexpr.
4349 (encode_actions_1): Get remote regnos for $reg action. Call
4350 add_remote_register, add_ax_registers, and add_local_register.
4351 Update call to add_memrange. Call finalize_tracepoint_aexpr.
4352 (validate_actionline): Call finalize_tracepoint_aexpr.
4353
4354 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4355
4356 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4357 Replace array buf with gdb::char_vector buf, of size
4358 get_remote_packet_size (). Replace references to buf and
4359 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
4360 and xsnprintf with snprintf. Raise errors if the buffer is too
4361 small.
4362
4363 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4364
4365 * remote.c (remote_target::download_tracepoint): Fix the has_more
4366 predicate in the QTDP action list iteration.
4367
4368 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4369
4370 * remote.c (remote_target::download_tracepoint): Fix indentation
4371 in for block.
4372
4373 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4374
4375 * proc-api.c (_initialize_proc_api): Remove c, unused.
4376 * procfs.c (procfs_init_inferior): Remove signals, unused.
4377 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4378 unused.
4379
4380 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
4381 Andrew Burgess <andrew.burgess@embecosm.com>
4382
4383 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4384 'W_STOPCODE (0)' as this could be ambiguous.
4385
4386 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
4387
4388 * ser-tcp.c (net_open): Fix thinko when deciding whether to
4389 disable TCP's Nagle algorithm (use "ai_protocol" instead of
4390 "ai_socktype").
4391
4392 2018-08-02 Tom Tromey <tom@tromey.com>
4393
4394 PR symtab/16842.
4395 * dwarf2read.c (read_func_scope): Set symtab on template parameter
4396 symbols.
4397 (process_structure_scope): Likewise.
4398
4399 2018-08-02 Xavier Roirand <roirand@adacore.com>
4400
4401 PR gdb/22629:
4402 * darwin-nat.c (darwin_kill_inferior): Fix handling of
4403 kill inferior.
4404
4405 2018-08-02 Tom Tromey <tom@tromey.com>
4406
4407 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4408 (darwin_suspend_inferior, darwin_resume_inferior)
4409 (darwin_decode_notify_message, darwin_resume_inferior_threads)
4410 (darwin_check_new_threads): Check result of get_darwin_inferior.
4411
4412 2018-07-31 Joel Brobecker <brobecker@adacore.com>
4413
4414 GDB 8.1.1 released.
4415
4416 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
4417
4418 * varobj.c (varobj_get_path_expr_parent): Report an error if
4419 parent is a dynamic varobj.
4420
4421 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4422
4423 * gnulib/aclocal.m4: Re-generate.
4424 * gnulib/config.in: Re-generate.
4425 * gnulib/configure: Re-generate.
4426 * gnulib/import/Makefile.in: Re-generate.
4427 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4428 * gnulib/import/m4/onceonly.m4: Re-generate.
4429
4430 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4431
4432 * target-descriptions.c (struct xml_test_tdesc): New.
4433 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4434 (record_xml_tdesc): Update.
4435 (maintenance_check_xml_descriptions): Update.
4436 * target-descriptions.h (record_xml_tdesc): Update comment.
4437
4438 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
4439
4440 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4441 checking array bounds are defined.
4442
4443 2018-07-30 Tom Tromey <tom@tromey.com>
4444
4445 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4446 irreflexivity violation.
4447
4448 2018-07-30 Tom Tromey <tom@tromey.com>
4449
4450 * cli/cli-decode.c (lookup_cmd): Remove lint code.
4451 * value.c (unpack_long): Remove lint code.
4452 * valops.c (value_ind): Remove lint code.
4453 * valarith.c (value_x_binop, value_x_unop, value_equal)
4454 (value_pos): Remove lint code.
4455
4456 2018-07-28 Tom de Vries <tdevries@suse.de>
4457
4458 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4459 with undefined upper bound as <optimized out>.
4460
4461 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
4462
4463 * gcore.in: Rename variable "name" to "prefix". Expand
4464 "usage" text.
4465
4466 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
4467
4468 * windows-nat.c (windows_nat_target::create_inferior): Update to
4469 call close() in global namespace.
4470
4471 2018-07-26 Tom Tromey <tom@tromey.com>
4472
4473 * dwarf-index-write.c (add_address_entry): Don't add objfile
4474 offsets.
4475 * dbxread.c (find_stab_function): Rename from
4476 find_stab_function_addr. Return a bound_minimal_symbol.
4477 (read_dbx_symtab): Use raw_text_low, raw_text_high.
4478 Don't add objfile offsets.
4479 (end_psymtab): Use raw_text_low, raw_text_high,
4480 MSYMBOL_VALUE_RAW_ADDRESS.
4481 (read_ofile_symtab): Update.
4482 (process_one_symbol): Update.
4483 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4484 offsets.
4485 (dw2_relocate): Remove.
4486 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4487 searching addrmap.
4488 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4489 Update.
4490 (process_psymtab_comp_unit_reader, add_partial_symbol)
4491 (add_partial_subprogram, dwarf2_ranges_read): Update.
4492 (load_partial_dies): Update.
4493 (add_address_entry): Don't add objfile offsets.
4494 (dwarf2_build_include_psymtabs): Update.
4495 (create_addrmap_from_aranges): Don't add objfile offsets.
4496 (dw2_find_pc_sect_compunit_symtab): Update.
4497 * mdebugread.c (parse_symbol): Don't add objfile offsets.
4498 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4499 Update.
4500 (parse_partial_symbols): Don't add objfile offsets. Use
4501 raw_text_low, raw_text_high. Update.
4502 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4503 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4504 or call 'relocate' quick function. Clear psymbol_map.
4505 * psympriv.h (struct partial_symbol) <address>: Add section
4506 offset.
4507 <set_unrelocated_address>: Rename from set_address.
4508 <raw_text_low, raw_text_high>: New methods.
4509 <text_low, text_high>: Add objfile parameter.
4510 (add_psymbol_to_bcache): Add 'section' parameter. Call
4511 set_unrelocated_address.
4512 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4513 (find_pc_psymbol): Update.
4514 (fixup_psymbol_section, relocate_psymtabs): Remove.
4515 (dump_psymtab, psym_functions): Update.
4516 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4517 parameter.
4518 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4519 (start_psymtab_common): Update.
4520 * symfile-debug.c (debug_qf_relocate): Remove.
4521 (debug_sym_quick_functions): Update.
4522 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4523 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4524 Update.
4525
4526 2018-07-26 Tom Tromey <tromey@redhat.com>
4527
4528 * dbxread.c (end_psymtab): Use text_high_valid and
4529 text_low_valid.
4530 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4531 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4532 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4533 Update comment.
4534 <text_low_valid, text_high_valid>: New fields.
4535 <set_text_low, set_text_high>: Update.
4536 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4537
4538 2018-07-26 Tom Tromey <tom@tromey.com>
4539
4540 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4541 Update.
4542 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4543 textlow and texthigh fields.
4544 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4545 Update.
4546 * mdebugread.c (parse_lines, parse_partial_symbols)
4547 (psymtab_to_symtab_1): Update.
4548 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4549 Rename fields. Update comment. Now private.
4550 <text_low, text_high, set_text_low, set_text_high>: New methods.
4551 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4552 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4553 (start_psymtab_common, maintenance_info_psymtabs)
4554 (maintenance_check_psymtabs): Update.
4555 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4556 texthigh fields.
4557 (scan_xcoff_symtab): Update.
4558
4559 2018-07-26 Tom Tromey <tromey@redhat.com>
4560
4561 * psympriv.h (struct partial_symbol) <unrelocated_address,
4562 address, set_address>: New methods.
4563 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4564 (fixup_psymbol_section, relocate_psymtabs): Update.
4565 (print_partial_symbols): Add 'objfile' parameter. Update.
4566 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4567 Update.
4568
4569 2018-07-26 Tom Tromey <tom@tromey.com>
4570
4571 * dwarf-index-write.c (write_psymbols, debug_names::insert)
4572 (debug_names::write_psymbols): Update.
4573 * psympriv.h (struct partial_symbol): Derive from
4574 general_symbol_info.
4575 <obj_section>: New method.
4576 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4577 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4578 (find_pc_sect_psymbol, fixup_psymbol_section)
4579 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4580 (print_partial_symbols, recursively_search_psymtabs)
4581 (compare_psymbols, psymbol_hash, psymbol_compare)
4582 (add_psymbol_to_bcache, maintenance_check_psymtabs)
4583 (psymbol_name_matches, psym_fill_psymbol_map): Update.
4584
4585 2018-07-26 Tom Tromey <tromey@redhat.com>
4586
4587 * dbxread.c (end_psymtab): Remove dead code.
4588
4589 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
4590
4591 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4592 DWARF unwinders are disabled.
4593 * dwarf2-frame.c: Add dwarf2read.h include.
4594 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4595 disabled.
4596 (dwarf2_frame_unwinders_enabled_p): Define.
4597 (show_dwarf_unwinders_enabled_p): New function.
4598 (_initialize_dwarf2_frame): Register switch to control DWARF
4599 unwinder use.
4600 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4601 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4602 (show_dwarf_cmdlist): Remove static keyword.
4603 * dwarf2read.h (set_dwarf_cmdlist): Declare.
4604 (show_dwarf_cmdlist): Declare.
4605 * NEWS: Document new feature.
4606
4607 2018-07-26 Tom de Vries <tdevries@suse.de>
4608
4609 PR breakpoints/23366
4610 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4611
4612 2018-07-26 Tom de Vries <tdevries@suse.de>
4613
4614 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4615 DW_AT_count can't be translated to a dynamic prop.
4616
4617 2018-07-25 Tom de Vries <tdevries@suse.de>
4618
4619 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4620 try/catch.
4621
4622 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
4623
4624 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4625
4626 2018-07-25 Joel Brobecker <brobecker@adacore.com>
4627
4628 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4629
4630 2018-07-24 Keith Seitz <keiths@redhat.comt
4631
4632 PR symtab/23010
4633 * dwarf2read.c (dw2_add_symbol_to_list): New function.
4634 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4635 instead of add_symbol_to_list.
4636 (read_file_scope): Call prepare_one_comp_unit before reading
4637 any other DIEs.
4638
4639 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
4640
4641 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4642
4643 2018-07-24 Tom Tromey <tom@tromey.com>
4644
4645 * utils.c (malloc, realloc, free): Don't declare.
4646 * configure, config.in: Rebuild.
4647 * configure.ac: Don't check for declarations of free, malloc, or
4648 realloc.
4649
4650 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4651
4652 * aarch64-linux-nat.c
4653 (aarch64_linux_nat_target::stopped_data_address): Remove unused
4654 variable.
4655 * arm-linux-nat.c (fetch_regs): Likewise.
4656 (store_regs): Likewise.
4657 (fetch_vfp_regs): Likewise.
4658 (store_vfp_regs): Likewise.
4659 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4660 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4661 (arm_linux_nat_target::insert_watchpoint): Likewise.
4662 (arm_linux_nat_target::remove_watchpoint): Likewise.
4663 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4664 Likewise.
4665 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4666 Likewise.
4667 * ppc-linux-nat.c (fetch_register): Likewise.
4668 (fetch_all_gp_regs): Likewise.
4669 (fetch_ppc_registers): Likewise.
4670 (store_all_gp_regs): Likewise.
4671 (store_ppc_registers): Likewise.
4672 (hwdebug_insert_point): Likewise.
4673 (can_use_watchpoint_cond_accel): Likewise.
4674 * remote-sim.c (gdb_os_write_stdout): Likewise.
4675
4676 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4677 Tom Tromey <tom@tromey.com>
4678
4679 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4680 test for it.
4681 * configure: Rebuild.
4682
4683 2018-07-22 Tom Tromey <tom@tromey.com>
4684
4685 * regformats/regdat.sh: Define xmltarget_${name} inside
4686 #ifndef IN_PROCESS_AGENT.
4687
4688 2018-07-22 Tom Tromey <tom@tromey.com>
4689
4690 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4691
4692 2018-07-22 Tom Tromey <tom@tromey.com>
4693
4694 * symfile.c (reread_symbols): Notify iter, not objfile.
4695
4696 2018-07-22 Tom Tromey <tom@tromey.com>
4697
4698 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4699 Use arch_ops.
4700 (ravenscar_thread_target::prepare_to_store): Likewise.
4701
4702 2018-07-22 Tom Tromey <tom@tromey.com>
4703
4704 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4705 unused variable. Call value_fetch_lazy when needed.
4706 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4707 Remove unused variable. Call value_fetch_lazy when needed.
4708
4709 2018-07-22 Tom Tromey <tom@tromey.com>
4710
4711 * m32c-tdep.c (mark_dma): Return void.
4712 (make_regs): Remove unused declarations.
4713
4714 2018-07-22 Tom Tromey <tom@tromey.com>
4715
4716 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4717 cmdscm_get_valid_command_smob_arg_unsafe for effect.
4718 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4719 bkscm_get_valid_block_smob_arg_unsafe for effect.
4720
4721 2018-07-22 Tom Tromey <tom@tromey.com>
4722
4723 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4724 value_type.
4725
4726 2018-07-22 Tom Tromey <tom@tromey.com>
4727
4728 * windows-nat.c (saved_context): Conditionally define.
4729 * remote.c (remote_target::remote_btrace_maybe_reopen):
4730 Conditionally declare "warned".
4731 * inflow.c (sigquit_ours): Conditionally define.
4732 (new_tty): Move "tty" declaration inside #if.
4733 * guile/guile.c (guile_datadir): Conditionally define.
4734 * charset.c (set_be_le_names): Move some declarations inside #if.
4735 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4736 #if.
4737 (parse_xml_btrace_conf): Likewise.
4738
4739 2018-07-22 Tom Tromey <tom@tromey.com>
4740
4741 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4742
4743 2018-07-22 Tom Tromey <tom@tromey.com>
4744
4745 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4746 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4747 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4748 * buildsym-legacy.c (get_macro_table): Remove unused variable.
4749 * stack.c (frame_apply_level_command): Remove unused variable.
4750 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4751 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4752 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4753 unused variable.
4754 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4755 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4756 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4757 variable.
4758 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4759 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4760 variable.
4761 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4762 Remove unused variable.
4763 * cli/cli-script.c (recurse_read_control_structure): Remove unused
4764 variable.
4765 * common/tdesc.c (print_xml_feature::visit): Remove unused
4766 variable.
4767 * compile/compile-object-load.c (store_regs): Remove unused
4768 variables.
4769 * complaints.c (clear_complaints): Remove unused variable.
4770 * corelow.c (core_target_open): Remove unused variable.
4771 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4772 variable.
4773 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4774 variable.
4775 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4776 variable.
4777 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4778 variable.
4779 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4780 variable.
4781 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4782 variable.
4783 * ia64-tdep.c (examine_prologue): Remove unused variable.
4784 * infcall.c (run_inferior_call): Remove unused variable.
4785 * inferior.c (exit_inferior): Remove unused variable.
4786 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4787 * linespec.c (decode_line_2): Remove unused variable.
4788 * linux-nat.c (super_close): Remove.
4789 * linux-tdep.c (linux_info_proc): Remove unused variable.
4790 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4791 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4792 Remove unused variable.
4793 * parse.c (find_minsym_type_and_address): Remove unused variable.
4794 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4795 variable.
4796 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4797 variable.
4798 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4799 variables.
4800 * record-btrace.c (record_btrace_target::store_registers): Remove
4801 unused variable.
4802 (cmd_show_record_btrace_cpu): Remove unused variable.
4803 * riscv-tdep.c (riscv_register_reggroup_p)
4804 (riscv_push_dummy_call, riscv_return_value): Remove unused
4805 variable.
4806 * rust-exp.y (literal): Remove unused variable.
4807 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4808 unused variable.
4809 <STRUCTOP_ANONYMOUS>: Likewise.
4810 * s390-linux-tdep.c (s390_linux_init_abi_31)
4811 (s390_linux_init_abi_64): Remove unused variable.
4812 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4813 (file_select_thread, net_windows_open, _initialize_ser_windows):
4814 Remove unused variables.
4815 * symtab.c (find_pc_sect_line): Remove unused variable.
4816 * target-memory.c (compute_garbled_blocks): Remove unused
4817 variable.
4818 (target_write_memory_blocks): Remove unused variable.
4819 * target.c (target_stack::unpush): Remove unused variables.
4820 * tracepoint.c (start_tracing, all_tracepoint_actions)
4821 (merge_uploaded_trace_state_variables)
4822 (print_one_static_tracepoint_marker): Remove unused variable.
4823 * unittests/basic_string_view/element_access/char/1.cc (test01):
4824 Remove unused variable.
4825 * windows-nat.c (windows_continue, windows_add_all_dlls)
4826 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4827 Remove unused variables.
4828
4829 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4830
4831 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4832 attr_profile in HAVE_ELF.
4833 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4834 HAVE_ELF.
4835
4836 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4837
4838 * frame.c (frame_register_unwind): Change parameter name.
4839 (frame_unwind_register): Likewise.
4840 (frame_unwind_register_value): Likewise.
4841 (frame_unwind_register_signed): Likewise.
4842 (frame_unwind_register_unsigned): Likewise.
4843 * frame.h (frame_register_unwind): Likewise.
4844 (frame_unwind_register): Likewise.
4845 (frame_unwind_register_value): Likewise.
4846 (frame_unwind_register_signed): Likewise.
4847 (frame_unwind_register_unsigned): Likewise.
4848 (frame_unwind_arch): Likewise.
4849
4850 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4851
4852 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4853 ISA maintenance.
4854
4855 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4856
4857 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4858 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4859 hand.
4860
4861 2018-07-20 Keith Seitz <keiths@redhat.com>
4862
4863 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4864 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4865 m_compunit_symtab, m_language>: Add "m_" prefix.
4866 Update all uses.
4867 * buildsym.c: Update all uses.
4868
4869 2018-07-20 Tom Tromey <tom@tromey.com>
4870
4871 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4872 * buildsym.h (record_line_ftype): Remove typedef.
4873
4874 2018-07-20 Tom Tromey <tom@tromey.com>
4875
4876 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4877 (end_expandable_symtab): Likewise.
4878 (end_symtab_get_static_block): Likewise.
4879 (end_symtab_from_static_block): Likewise.
4880 * buildsym-legacy.c (augment_type_symtab): Remove.
4881 (end_expandable_symtab): Remove.
4882 (end_symtab_get_static_block): Remove.
4883 (end_symtab_from_static_block): Remove.
4884
4885 2018-07-20 Tom Tromey <tom@tromey.com>
4886
4887 * dwarf2read.c: Include buildsym.h.
4888 (struct dwarf2_cu) <builder>: New method.
4889 (fixup_go_packaging): Update.
4890 (process_full_comp_unit, process_full_type_unit): Update. Don't
4891 use scoped_free_pendings.
4892 (using_directives): Add "cu" parameter, remove "language".
4893 (read_import_statement, setup_type_unit_groups, )
4894 (read_func_scope, read_lexical_block_scope)
4895 (dwarf2_record_block_ranges, read_namespace): Update.
4896 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4897 (lnp_state_machine::handle_end_sequence): Update.
4898 (class lnp_state_machine) <m_cu>: New member.
4899 <m_record_line_callback>: Remove.
4900 <m_currently_recording_lines>: New member.
4901 (lnp_state_machine::handle_set_file): Update.
4902 (noop_record_line): Remove.
4903 (dwarf_record_line_p): Add cu parameter.
4904 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4905 (lnp_state_machine::record_line)
4906 (lnp_state_machine::lnp_state_machine)
4907 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4908 (dwarf_decode_lines): Update.
4909 (dwarf2_start_subfile): Add cu parameter.
4910 (dwarf2_start_symtab, new_symbol): Update.
4911 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4912 Remove dwarf2_per_objfile parameter.
4913 (dwarf_decode_macros): Update.
4914
4915 2018-07-20 Tom Tromey <tom@tromey.com>
4916
4917 * stabsread.c (define_symbol): Update.
4918 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4919 * dwarf2read.c (new_symbol): Update.
4920 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4921 * cp-namespace.c: Include buildsym.h.
4922 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4923 * buildsym-legacy.c (get_buildsym_compunit): New function.
4924
4925 2018-07-20 Tom Tromey <tom@tromey.com>
4926
4927 * xcoffread.c: Include buildsym-legacy.h.
4928 * windows-nat.c: Include buildsym-legacy.h.
4929 * stabsread.c: Include buildsym-legacy.h.
4930 * mdebugread.c: Include buildsym-legacy.h.
4931 * buildsym-legacy.h: New file.
4932 * buildsym-legacy.c: New file, from buildsym.c.
4933 * go32-nat.c: Include buildsym-legacy.h.
4934 * dwarf2read.c: Include buildsym-legacy.h.
4935 * dbxread.c: Include buildsym-legacy.h.
4936 * cp-namespace.c: Include buildsym-legacy.h.
4937 * coffread.c: Include buildsym-legacy.h.
4938 * buildsym.h: Move some contents to buildsym-legacy.h.
4939 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4940 buildsym-legacy.c.
4941 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4942
4943 2018-07-20 Tom Tromey <tom@tromey.com>
4944
4945 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4946 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4947 (buildsym_compunit::buildsym_compunit)
4948 (buildsym_compunit::~buildsym_compunit)
4949 (buildsym_compunit::get_macro_table): Define.
4950
4951 2018-07-20 Tom Tromey <tom@tromey.com>
4952
4953 * buildsym.c (reset_symtab_globals): Remove.
4954 (buildsym_compunit::end_symtab_from_static_block): Update.
4955 (buildsym_compunit::augment_type_symtab): Update.
4956 (end_symtab_from_static_block): Call free_buildsym_compunit.
4957 (augment_type_symtab, end_symtab, end_expandable_symtab):
4958 Likewise.
4959
4960 2018-07-20 Tom Tromey <tom@tromey.com>
4961
4962 * arch-utils.c: Do not include buildsym.h.
4963 * mipsread.c: Do not include buildsym.h.
4964 * machoread.c: Do not include buildsym.h.
4965 * elfread.c: Do not include buildsym.h.
4966
4967 2018-07-20 Tom Tromey <tom@tromey.com>
4968
4969 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4970 initialization.
4971 (buildsym_compunit): Add new constructor.
4972 (struct buildsym_compunit) <get_last_source_file, finish_block,
4973 record_block_range, start_subfile, patch_subfile_names,
4974 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4975 set_last_source_start_addr, get_last_source_start_addr,
4976 get_local_using_directives, set_local_using_directives,
4977 get_global_using_directives, outermost_context_p,
4978 get_current_context_stack, get_context_stack_depth,
4979 get_current_subfile, get_local_symbols, get_file_symbols,
4980 get_global_symbols, record_debugformat, record_producer,
4981 push_context, pop_context, end_symtab_get_static_block,
4982 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4983 New public methods.
4984 <record_pending_block, finish_block_internal, make_blockvector,
4985 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4986 private methods.
4987 Update all users.
4988
4989 2018-05-22 Tom Tromey <tom@tromey.com>
4990
4991 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4992 parameter.
4993 (finish_block_internal): Update.
4994
4995 2018-07-20 Tom Tromey <tom@tromey.com>
4996
4997 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4998 parameter.
4999 (finish_block_internal): Update.
5000
5001 2018-07-20 Tom Tromey <tom@tromey.com>
5002
5003 * buildsym.h (EXTERN): Don't define or undef.
5004 * buildsym.c (EXTERN): Don't define.
5005
5006 2018-07-20 Tom Tromey <tom@tromey.com>
5007
5008 * buildsym.c: Remove TODO comment.
5009
5010 2018-07-20 Tom Tromey <tom@tromey.com>
5011
5012 * coffread.c (coff_symtab_read): Update.
5013 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5014 (xcoff_new_init): Update.
5015 * mipsread.c (mipscoff_new_init): Update.
5016 * mdebugread.c (mdebug_build_psymtabs): Update.
5017 * elfread.c (elf_new_init): Update.
5018 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5019 Update.
5020 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5021 (coffstab_build_psymtabs, elfstab_build_psymtabs)
5022 (stabsect_build_psymtabs): Update.
5023 * buildsym.h (buildsym_init): Don't declare.
5024 * buildsym.c: Update comment.
5025 (prepare_for_building): Remove.
5026 (start_symtab, restart_symtab): Update.
5027 (reset_symtab_globals): Update comment.
5028 (buildsym_init): Remove.
5029
5030 2018-07-20 Tom Tromey <tom@tromey.com>
5031
5032 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5033 * stabsread.c (patch_block_stabs, define_symbol, read_type)
5034 (read_enum_type, common_block_start, common_block_end)
5035 (cleanup_undefined_types_1, finish_global_stabs): Update.
5036 * mdebugread.c (psymtab_to_symtab_1): Update.
5037 * dwarf2read.c (fixup_go_packaging, read_func_scope)
5038 (read_lexical_block_scope, new_symbol): Update.
5039 * dbxread.c (process_one_symbol): Update.
5040 * coffread.c (coff_symtab_read, process_coff_symbol)
5041 (coff_read_enum_type): Update.
5042 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5043 declare.
5044 (get_local_symbols, get_file_symbols, get_global_symbols): New
5045 functions.
5046 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5047 m_global_symbols.
5048 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5049 (~scoped_free_pendings): Update.
5050 (finish_block, prepare_for_building, reset_symtab_globals)
5051 (end_symtab_get_static_block, end_symtab_with_blockvector)
5052 (augment_type_symtab, push_context): Update.
5053 (get_local_symbols, get_file_symbols, get_global_symbols): New
5054 functions.
5055 (buildsym_init): Update.
5056
5057 2018-07-20 Tom Tromey <tom@tromey.com>
5058
5059 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5060 (process_full_type_unit): Likewise.
5061 (dwarf2_start_symtab): Set list_in_scope.
5062
5063 2018-07-20 Tom Tromey <tom@tromey.com>
5064
5065 * dwarf2read.c (process_psymtab_comp_unit_reader)
5066 (build_type_psymtabs_reader): Do not set list_in_scope.
5067
5068 2018-07-20 Tom Tromey <tom@tromey.com>
5069
5070 * buildsym.c (free_pendings): Remove.
5071 (add_symbol_to_list, scoped_free_pendings)
5072 (finish_block_internal, buildsym_init): Update.
5073
5074 2018-07-20 Tom Tromey <tom@tromey.com>
5075
5076 * xcoffread.c (read_xcoff_symtab): Update.
5077 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5078 Update.
5079 * dbxread.c (process_one_symbol): Update.
5080 * coffread.c (coff_symtab_read): Update.
5081 * buildsym.h (finish_block): Update.
5082 * buildsym.c (finish_block): Remove "listhead" argument.
5083 (end_symtab_get_static_block): Update.
5084
5085 2018-07-20 Tom Tromey <tom@tromey.com>
5086
5087 * buildsym.h (class scoped_free_pendings): Remove constructor.
5088 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5089 method.
5090 <m_pending_block_obstack, m_pending_blocks>: New members.
5091 (pending_block_obstack, pending_blocks): Remove.
5092 (scoped_free_pendings::scoped_free_pendings): Default.
5093 (~scoped_free_pendings): Update.
5094 (free_pending_blocks): Remove.
5095 (finish_block_internal, record_pending_block, make_blockvector)
5096 (end_symtab_get_static_block, augment_type_symtab, push_context)
5097 (buildsym_init): Update.
5098
5099 2018-07-20 Tom Tromey <tom@tromey.com>
5100
5101 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5102 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5103 members.
5104 (pending_addrmap, pending_addrmap_obstack)
5105 (pending_addrmap_interesting): Remove.
5106 (scoped_free_pendings, record_block_range, make_blockvector)
5107 (prepare_for_building, reset_symtab_globals, buildsym_init):
5108 Update.
5109
5110 2018-07-20 Tom Tromey <tom@tromey.com>
5111
5112 * xcoffread.c (process_linenos): Update.
5113 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5114 * mdebugread.c (psymtab_to_symtab_1): Update.
5115 * dwarf2read.c (setup_type_unit_groups)
5116 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5117 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5118 * dbxread.c (process_one_symbol): Update.
5119 * coffread.c (coff_symtab_read, enter_linenos)
5120 (process_coff_symbol): Update.
5121 * buildsym.h (current_subfile): Don't declare.
5122 (get_current_subfile): Declare.
5123 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5124 member.
5125 (start_subfile, free_buildsym_compunit, push_subfile)
5126 (prepare_for_building, start_symtab): Update.
5127 (get_current_subfile): New function.
5128
5129 2018-07-20 Tom Tromey <tom@tromey.com>
5130
5131 * coffread.c (coff_symtab_read): Update.
5132 * xcoffread.c (read_xcoff_symtab): Update.
5133 * dwarf2read.c (new_symbol): Update.
5134 (read_func_scope, read_lexical_block_scope): Update.
5135 * dbxread.c (process_one_symbol): Update.
5136 * buildsym.h (context_stack, context_stack_depth): Don't declare.
5137 (outermost_context_p): Remove macro.
5138 (outermost_context_p, get_current_context_stack)
5139 (get_context_stack_depth): Declare.
5140 (pop_context): Return struct context_stack.
5141 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5142 member.
5143 (context_stack_size): Remove.
5144 (INITIAL_CONTEXT_STACK_SIZE): Remove.
5145 (prepare_for_building, end_symtab_get_static_block)
5146 (augment_type_symtab, push_context): Update.
5147 (pop_context): Return struct context_stack.
5148 (outermost_context_p, get_current_context_stack)
5149 (get_context_stack_depth): New functions.
5150 (buildsym_init): Update.
5151
5152 2018-07-20 Tom Tromey <tom@tromey.com>
5153
5154 * rust-exp.y: Now a pure parser. Update all rules.
5155 (%union): Move earlier.
5156 (current_parser, work_obstack): Remove globals.
5157 (rust_parser, ~rust_parser): Update.
5158 (class rust_parser) <copy_name, concat3, crate_name, super_name,
5159 lex_character, lex_number, lex_string, lex_identifier,
5160 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5161 convert_name, convert_params_to_expression,
5162 convert_ast_to_expression, ast_basic_type, ast_operation,
5163 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5164 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5165 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5166 ast_array_type, ast_slice_type, ast_reference_type,
5167 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5168 (rust_parse): Update.
5169 (rustyyerror, rustyylex): Add parser parameter.
5170 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5171 (rust_lex_stringish_test, rust_lex_test_sequence)
5172 (rust_lex_test_trailing_dot, rust_lex_test_completion)
5173 (rust_lex_test_push_back, rust_lex_tests): Update.
5174
5175 2018-07-19 Pedro Alves <palves@redhat.com>
5176
5177 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5178 gdb::unique_xmalloc_ptr.
5179 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5180 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5181 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5182 copy-initialization.
5183 * guile/scm-pretty-print.c (ppscm_print_children): Use
5184 gdb::unique_xmalloc_ptr instead of cleanups.
5185 (gdbscm_apply_val_pretty_printer): Remove cleanups.
5186 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5187 gdb::unique_xmalloc_ptr.
5188 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5189 Adjust to use gdb::unique_xmalloc_ptr.
5190 * guile/scm-utils.c (extract_arg): Adjust.
5191 * guile/scm-value.c (gdbscm_value_field): Adjust to use
5192 gdb::unique_xmalloc_ptr instead of a cleanup.
5193
5194 2018-07-19 Tom Tromey <tom@tromey.com>
5195
5196 * utils.c (do_value_free_to_mark)
5197 (make_cleanup_value_free_to_mark): Remove.
5198 * utils.h (make_cleanup_value_free_to_mark): Remove.
5199
5200 2018-07-19 Pedro Alves <palves@redhat.com>
5201
5202 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5203 forwarding reference.
5204
5205 2018-07-18 Pedro Alves <palves@redhat.com>
5206
5207 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5208 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
5209 cleanup.
5210
5211 2018-07-18 Pedro Alves <palves@redhat.com>
5212
5213 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5214 exceptions.
5215 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5216 (gdbscm_wrap): New.
5217 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5218 directly instead of a cleanup.
5219 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5220 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
5221 (vlscm_binop_gdbthrow): New, factored out from ...
5222 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
5223 (vlscm_rich_compare): Use gdbscm_wrap.
5224 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5225 instead of a cleanup.
5226 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5227 cleanup.
5228 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5229 Use xfree directly instead of a cleanup.
5230 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5231 Adjust to use gdbscm_wrap and scoped_value_mark.
5232 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5233 (gdbscm_value_address, gdbscm_value_dereference)
5234 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5235 scoped_value_mark.
5236 (gdbscm_value_dynamic_type): Use scoped_value_mark.
5237 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5238 scoped_value_mark.
5239 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5240 gdbscm_wrap and scoped_value_mark.
5241 (gdbscm_value_to_string): Use xfree directly instead of a
5242 cleanup. Move 'buffer' unique_ptr to TRY scope.
5243 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5244 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
5245 scoped_value_mark.
5246 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5247 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5248 scoped_value_mark.
5249 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5250 gdbscm_wrap.
5251
5252 2018-07-18 Tom de Vries <tdevries@suse.de>
5253
5254 * findvar.c (default_read_var_value): Also resolve dynamic type for
5255 LOC_OPTIMIZED_OUT vars.
5256
5257 2018-07-18 Maciej W. Rozycki <macro@mips.com>
5258
5259 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5260 decoding.
5261
5262 2018-07-17 Tom Tromey <tom@tromey.com>
5263
5264 * guile/scm-param.c (pascm_set_func, pascm_show_func)
5265 (compute_enum_list, pascm_set_param_value_x)
5266 (gdbscm_parameter_value): Update.
5267 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5268 (gdbscm_scm_to_host_string): Update.
5269 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5270 Update.
5271 * guile/scm-cmd.c (cmdscm_add_completion): Update.
5272 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5273 * guile/scm-string.c (gdbscm_scm_to_string): Return
5274 unique_xmalloc_ptr.
5275 (gdbscm_scm_to_host_string): Likewise.
5276
5277 2018-07-17 Tom Tromey <tom@tromey.com>
5278
5279 * guile/guile.c (gdbscm_eval_from_control_command): Update.
5280 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5281 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5282 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5283 unique_xmalloc_ptr.
5284
5285 2018-07-17 Tom Tromey <tom@tromey.com>
5286
5287 * guile/scm-param.c (pascm_signal_setshow_error): Update.
5288 * guile/guile-internal.h (gdbscm_exception_message_to_string):
5289 Update.
5290 * guile/scm-cmd.c (cmdscm_function): Update.
5291 * guile/scm-pretty-print.c
5292 (ppscm_print_exception_unless_memory_error): Update.
5293 * guile/scm-exception.c (gdbscm_exception_message_to_string):
5294 Return unique_xmalloc_ptr.
5295
5296 2018-07-17 Tom Tromey <tom@tromey.com>
5297
5298 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5299 Use string_printf.
5300
5301 2018-07-17 Jim Wilson <jimw@sifive.com>
5302
5303 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5304 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
5305 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
5306 unecessary braces after EF_RISCV_RVC test. Delete call to
5307 set_gdbarch_decr_pc_after_break.
5308
5309 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5310 RISCV_LAST_FP_REGNUM + 1.
5311 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5312
5313 2018-07-17 Tom Tromey <tom@tromey.com>
5314
5315 * configure.ac: Remove --disable-gdbcli.
5316 * configure: Rebuild.
5317 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5318 (SUBDIR_CLI_CFLAGS): Remove.
5319 (SFILES): Use SUBDIR_CLI_SRCS.
5320 (COMMON_OBS): Use SUBDIR_CLI_OBS.
5321
5322 2018-07-17 Tom Tromey <tom@tromey.com>
5323
5324 PR gdb/18624:
5325 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5326
5327 2018-07-16 Jim Wilson <jimw@sifive.com>
5328
5329 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5330
5331 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5332
5333 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5334 variable.
5335 (libunwind_frame_sniffer): Likewise.
5336 (libunwind_frame_prev_register): Likewise.
5337 (libunwind_sigtramp_frame_sniffer): Likewise.
5338 * ia64-tdep.c (ia64_access_reg): Likewise.
5339 (ia64_access_rse_reg): Likewise.
5340 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5341 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5342
5343 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5344
5345 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5346
5347 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5348
5349 * remote-sim.c (gdbsim_target::close,
5350 gdbsim_target::mourn_inferior): Remove unused variables.
5351
5352 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
5353
5354 * ia64-tdep.c (ktab_buf): New global.
5355 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5356 (get_kernel_table): Adjust.
5357
5358 2018-07-16 Tom Tromey <tom@tromey.com>
5359
5360 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5361 * dwarf2read.c (using_directives, new_symbol): Use
5362 outermost_context_p.
5363 * dbxread.c (process_one_symbol): Use outermost_context_p.
5364 * coffread.c (coff_symtab_read): Use outermost_context_p.
5365
5366 2018-07-16 Tom Tromey <tom@tromey.com>
5367
5368 * dwarf2read.c (using_directives, read_func_scope)
5369 (read_lexical_block_scope): Update.
5370 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5371 * buildsym.h (local_using_directives, global_using_directives):
5372 Don't declare.
5373 (get_local_using_directives, set_local_using_directives)
5374 (get_global_using_directives): Declare.
5375 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5376 m_global_using_directives>: New members.
5377 (finish_block_internal, prepare_for_building)
5378 (reset_symtab_globals, end_symtab_get_static_block)
5379 (push_context): Update.
5380 (get_local_using_directives, set_local_using_directives)
5381 (get_global_using_directives): New functions.
5382 (buildsym_init): Update.
5383
5384 2018-07-16 Tom Tromey <tom@tromey.com>
5385
5386 * xcoffread.c (xcoff_initial_scan): Don't call
5387 free_pending_blocks.
5388 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5389 * buildsym.h (class scoped_free_pendings): Add constructor.
5390 (free_pending_blocks): Don't declare.
5391 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5392 (free_pending_blocks): Now static.
5393
5394 2018-07-16 Tom Tromey <tom@tromey.com>
5395
5396 * buildsym.h (push_subfile, pop_subfile): Update declarations.
5397 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5398 member.
5399 (struct subfile_stack): Remove.
5400 (subfile_stack): Remove.
5401 (push_subfile, pop_subfile, buildsym_init): Update.
5402
5403 2018-07-16 Tom Tromey <tom@tromey.com>
5404
5405 * buildsym.c (push_subfile): Use gdb_assert.
5406 (pop_subfile): Use gdb_assert.
5407
5408 2018-07-16 Tom Tromey <tom@tromey.com>
5409
5410 * buildsym.h (merge_symbol_lists): Remove.
5411 * buildsym.c (merge_symbol_lists): Remove.
5412
5413 2018-07-16 Tom Tromey <tom@tromey.com>
5414
5415 * stabsread.c (scan_file_globals): Update comment.
5416 * stabsread.h (scan_file_globals): Move from buildsym.h.
5417 * buildsym.h (scan_file_globals): Move to stabsread.h.
5418
5419 2018-07-16 Tom Tromey <tom@tromey.com>
5420
5421 * xcoffread.c (xcoff_new_init): Update.
5422 * mipsread.c (mipscoff_new_init): Update.
5423 * mdebugread.c (mdebug_build_psymtabs): Update.
5424 * elfread.c (elf_new_init): Update.
5425 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5426 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5427 * buildsym.h (buildsym_new_init): Don't declare.
5428 * buildsym.c (buildsym_new_init): Remove.
5429
5430 2018-07-16 Tom Tromey <tom@tromey.com>
5431
5432 * stabsread.h (within_function): Move from buildsym.h.
5433 * stabsread.c (start_stabs): Clear within_function.
5434 * coffread.c (coff_start_symtab): Clear within_function.
5435 * buildsym.h (within_function): Move to stabsread.h.
5436 * buildsym.c (prepare_for_building): Update.
5437
5438 2018-07-16 Tom Tromey <tom@tromey.com>
5439
5440 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5441 * dwarf2read.c (dwarf2_start_symtab): Don't set
5442 processing_gcc_compilation.
5443 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5444
5445 2018-07-16 Tom Tromey <tom@tromey.com>
5446
5447 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5448 (next_symbol_text_func): Move from buildsym.h.
5449 * stabsread.c (hashname): Move from buildsym.c.
5450 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5451 (next_symbol_text_func, hashname): Move to stabsread.h.
5452 * buildsym.c: Don't include bcache.h
5453 (hashname): Move to stasbread.c.
5454
5455 2018-07-16 Tom Tromey <tom@tromey.com>
5456
5457 * buildsym.h (context_stack_size): Don't declare.
5458 * buildsym.c (context_stack_size): New global.
5459
5460 2018-07-16 Tom Tromey <tom@tromey.com>
5461
5462 * dbxread.c (processing_acc_compilation): New global.
5463 * buildsym.h (processing_acc_compilation): Don't declare.
5464
5465 2018-07-16 Tom Tromey <tom@tromey.com>
5466
5467 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5468 * dbxread.c (read_ofile_symtab): Update.
5469 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5470 * buildsym.h (last_source_start_addr): Remove.
5471 (set_last_source_start_addr, get_last_source_start_addr):
5472 Declare.
5473 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5474 parameter.
5475 (struct buildsym_compunit) <m_last_source_start_addr>: New
5476 member.
5477 (prepare_for_building): Remove start_addr parameter.
5478 (start_symtab, restart_symtab, end_symtab_get_static_block)
5479 (end_symtab_with_blockvector): Update.
5480 (set_last_source_start_addr, get_last_source_start_addr): New
5481 functions.
5482
5483 2018-07-16 Tom Tromey <tom@tromey.com>
5484
5485 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5486 member.
5487 (have_line_numbers): Remove.
5488 (record_line, prepare_for_building, end_symtab_get_static_block)
5489 (augment_type_symtab): Update.
5490
5491 2018-07-16 Tom Tromey <tom@tromey.com>
5492
5493 * buildsym.c (~buildsym_compunit): Free the macro table.
5494 (struct buildsym_compunit) <get_macro_table, release_macros>: New
5495 methods.
5496 <m_pending_macros>: New member.
5497 (pending_macros): Remove.
5498 (~scoped_free_pendings, get_macro_table, prepare_for_building)
5499 (reset_symtab_globals, end_symtab_get_static_block)
5500 (end_symtab_with_blockvector, augment_type_symtab)
5501 (buildsym_init): Update.
5502
5503 2018-07-16 Tom Tromey <tom@tromey.com>
5504
5505 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5506 parameter.
5507 (buildsym_compunit::set_last_source_file): New method.
5508 <m_last_source_file>: New member.
5509 (prepare_for_building): Remove "name" parameter.
5510 (start_symtab, restart_symtab, reset_symtab_globals): Update.
5511 (last_source_file): Remove.
5512 (set_last_source_file, get_last_source_file): Update.
5513
5514 2018-07-16 Tom Tromey <tom@tromey.com>
5515
5516 * buildsym.c (prepare_for_building): Add assert.
5517
5518 2018-07-16 Tom Tromey <tom@tromey.com>
5519
5520 * buildsym.c (~buildsym_compunit): Update.
5521 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5522 (start_subfile, patch_subfile_names)
5523 (end_symtab_with_blockvector): Update.
5524
5525 2018-07-16 Tom Tromey <tom@tromey.com>
5526
5527 * buildsym.c (struct buildsym_compunit): Add constructor,
5528 destructor, initializers.
5529 (start_buildsym_compunit): Remove.
5530 (free_buildsym_compunit): Use "delete".
5531 (start_symtab, restart_symtab): Use "new".
5532
5533 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
5534
5535 * symfile.c (set_objfile_default_section_offset): Remove struct
5536 keyword.
5537
5538 2018-07-14 Stafford Horne <shorne@gmail.com>
5539
5540 * (Responsible Maintainers): Add myself as or1k maintainer.
5541
5542 2018-07-13 Tom Tromey <tom@tromey.com>
5543
5544 * symfile.c (set_objfile_default_section_offset): Use extra braces
5545 around initializer.
5546
5547 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5548
5549 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5550 non-branching basr.
5551
5552 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5553
5554 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5555 unittests/cli-utils-selftests.c
5556 * unittests/cli-utils-selftests.c: New file.
5557
5558 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5559
5560 * NEWS: Mention new commands. Mention change to 'thread apply'.
5561
5562 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5563
5564 * thread.c (thr_try_catch_cmd): New function.
5565 (thread_apply_all_command): Handle qcs flags.
5566 (thread_apply_command): Handle qcs flags.
5567 (taas_command): New function.
5568 (tfaas_command): New function.
5569 (_initialize_thread): Update to setup the new commands 'taas
5570 and 'tfaas'. Change doc string for 'thread apply'.
5571
5572 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5573
5574 * stack.c: (trailing_outermost_frame): New function, mostly
5575 extracted from backtrace_command_1.
5576 (leading_innermost_frame): New function.
5577 (backtrace_command_1): Update to call trailing_outermost_frame.
5578 (frame_apply_command_count): New function.
5579 (frame_apply_level_command): New function.
5580 (frame_apply_all_command): New function.
5581 (frame_apply_command): New function.
5582 (faas_command): New function.
5583 (frame_cmd_list): New variable.
5584 (_initialize_stack): Update to setup the new commands 'frame apply'
5585 and 'faas'.
5586
5587 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5588
5589 * cli-utils.c (number_or_range_parser::get_number): Only handle
5590 numbers or convenience var as numbers.
5591 (parse_flags): New function.
5592 (parse_flags_qcs): New function.
5593 (number_or_range_parser::finished): Ensure parsing end is detected
5594 before end of string.
5595 * cli-utils.h (parse_flags): New function.
5596 (parse_flags_qcs): New function.
5597 (number_or_range_parser): Remove m_finished bool.
5598 (number_or_range_parser::skip_range): Set m_in_range to false.
5599
5600 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
5601
5602 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5603 on Windows.
5604
5605 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5606 Jan Kratochvil <jan.kratochvil@redhat.com>
5607 Paul Fertser <fercerpav@gmail.com>
5608 Tsutomu Seki <sekiriki@gmail.com>
5609 Pedro Alves <palves@redhat.com>
5610
5611 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5612 'unittests/parse-connection-spec-selftests.c'.
5613 (COMMON_SFILES): Add 'common/netstuff.c'.
5614 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5615 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5616 * common/netstuff.c: New file.
5617 * common/netstuff.h: New file.
5618 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5619 (wait_for_connect): Update comment. New parameter
5620 'gdb::optional<int> sock' instead of 'struct serial *scb'.
5621 Use 'sock' directly instead of 'scb->fd'.
5622 (try_connect): New function, with code from 'net_open'.
5623 (net_open): Rewrite main loop to deal with multiple
5624 sockets/addresses. Handle IPv6-style hostnames; implement
5625 support for IPv6 connections.
5626 * unittests/parse-connection-spec-selftests.c: New file.
5627
5628 2018-07-11 Pedro Alves <palves@redhat.com>
5629
5630 PR gdb/23377
5631 * remote.c (remote_target::remote_detach_pid): Call
5632 set_current_process.
5633
5634 2018-07-11 Pedro Alves <palves@redhat.com>
5635
5636 * h8300-tdep.c (h8300_gdbarch_init): Remove
5637 set_gdbarch_ecoff_reg_to_regnum calls.
5638
5639 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5640
5641 PR c++/23373
5642 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5643 offsets/sizes for static members of a class/struct.
5644
5645 2018-07-11 Alan Hayward <alan.hayward@arm.com>
5646
5647 * target-descriptions.c (tdesc_register_bitsize): Rename.
5648 * target-descriptions.h (tdesc_register_bitsize): Likewise.
5649 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5650 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5651
5652 2018-07-10 Tom Tromey <tom@tromey.com>
5653
5654 * breakpoint.c (moribund_locations): Now static and a
5655 std::vector.
5656 (breakpoint_init_inferior, moribund_breakpoint_here_p)
5657 (build_bpstat_chain, update_global_location_list)
5658 (breakpoint_retire_moribund): Update.
5659 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
5660 VEC.
5661
5662 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5663
5664 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5665 (riscv_register_reggroup_p): Use new function, remove unneeded
5666 parenthesis.
5667 (riscv_push_dummy_call): Extend assert to compare against xlen or
5668 flen based on register type.
5669
5670 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5671
5672 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5673
5674 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
5675
5676 * remote.c (show_hardware_watchpoint_limit): New function.
5677 (show_hardware_watchpoint_length_limit): New function.
5678 (show_hardware_breakpoint_limit): New function.
5679 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5680 where appropriate, update help text.
5681
5682 2018-07-09 Tom Tromey <tom@tromey.com>
5683
5684 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5685 (CLIBS): Don't mention NAT_CLIBS.
5686
5687 2018-07-09 Tom Tromey <tom@tromey.com>
5688
5689 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5690 (LIBGDB_OBS, clean mostlyclean): Update.
5691 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5692
5693 2018-07-09 Tom Tromey <tom@tromey.com>
5694
5695 * Makefile.in (%.c: %.y): Use ECHO_YACC.
5696 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
5697 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5698
5699 2018-07-09 Tom Tromey <tom@tromey.com>
5700
5701 * Makefile.in (ALLDEPFILES): Remove exec.c.
5702 (COMMON_OBS): Remove exec.o.
5703 (COMMON_SFILES): Add exec.c.
5704
5705 2018-07-09 Tom Tromey <tom@tromey.com>
5706
5707 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5708
5709 2018-07-09 Tom Tromey <tom@tromey.com>
5710
5711 * Makefile.in (clean mostlyclean): Remove stamp-version.
5712 (version.c): Depend on stamp-version.
5713 (stamp-version): New rule, from version.c rule.
5714
5715 2018-07-09 Tom Tromey <tom@tromey.com>
5716
5717 * Makefile.in (init.c): Depend on stamp-init.
5718 (stamp-init): New rule, from init.c rule.
5719 (clean mostlyclean): Remove stamp-init.
5720
5721 2018-07-09 Tom Tromey <tom@tromey.com>
5722
5723 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5724 SUBDIR_GCC_COMPILE_SRCS.
5725
5726 2018-07-09 Tom Tromey <tom@tromey.com>
5727
5728 * Makefile.in (init.c): Remove some unused sed rules.
5729
5730 2018-07-09 Tom Tromey <tom@tromey.com>
5731
5732 * Makefile.in (TSOBS): Remove.
5733 (INIT_FILES): Update.
5734 (LIBGDB_OBS): Update.
5735 (COMMON_SFILES): Add inflow.c.
5736 (SFILES): Remove inflow.c.
5737
5738 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5739
5740 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5741
5742 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
5743
5744 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5745 get_saveloc_name, is_signal_frame_name, step_name,
5746 init_remote_name, create_addr_space_name,
5747 destroy_addr_space_name, search_unwind_table_name,
5748 find_dyn_list_name): Constify.
5749
5750 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
5751
5752 * darwin-nat.c (darwin_pthread_kill): New function.
5753 (darwin_resume_thread): Use darwin_pthread_kill.
5754
5755 2018-07-05 Tom de Vries <tdevries@suse.de>
5756
5757 * macroexp.c (macro_buffer) <operator=>: New member function.
5758
5759 2018-07-04 Tom Tromey <tom@tromey.com>
5760
5761 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5762
5763 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
5764
5765 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5766 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5767 * maint.c: Likewise.
5768 * top.c: Likewise.
5769
5770 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5771
5772 * NEWS: Create a new section for the next release branch.
5773 Rename the section of the current branch, now that it has
5774 been cut.
5775
5776 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5777
5778 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5779 * version.in: Bump version to 8.2.50.DATE-git.
5780
5781 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5782 Pedro Alves <palves@redhat.com>
5783
5784 * linux-nat.c (linux_init_ptrace): Rename to ...
5785 (linux_init_ptrace_procfs): ... this. Call
5786 linux_proc_init_warnings.
5787 (linux_nat_target::post_attach)
5788 (linux_nat_target::post_startup_inferior): Adjust.
5789 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5790 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5791
5792 2018-07-04 Tom de Vries <tdevries@suse.de>
5793
5794 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5795 check ...
5796 (read_comp_unit_head): ... here.
5797
5798 2018-07-03 Tom Tromey <tom@tromey.com>
5799
5800 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5801 (stop_tracing, tstatus_command)
5802 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5803 (print_one_static_tracepoint_marker): Update.
5804 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5805 std::vector.
5806 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5807 VEC.
5808 (all_tracepoints, static_tracepoints_here): Return std::vector.
5809
5810 2018-07-03 Tom Tromey <tom@tromey.com>
5811
5812 * common/ptid.c (ptid_equal): Remove.
5813 * common/ptid.h (ptid_equal): Don't declare.
5814 * ada-tasks.c: Update.
5815 * breakpoint.c: Update.
5816 * common/agent.c: Update.
5817 * corelow.c: Update.
5818 * darwin-nat-info.c: Update.
5819 * darwin-nat.c: Update.
5820 * dcache.c: Update.
5821 * dtrace-probe.c: Update.
5822 * dummy-frame.c: Update.
5823 * fbsd-nat.c: Update.
5824 * frame.c: Update.
5825 * gdbthread.h: Update.
5826 * gnu-nat.c: Update.
5827 * go32-nat.c: Update.
5828 * inf-loop.c: Update.
5829 * inf-ptrace.c: Update.
5830 * infcall.c: Update.
5831 * infcmd.c: Update.
5832 * inflow.c: Update.
5833 * infrun.c: Update.
5834 * linux-fork.c: Update.
5835 * linux-nat.c: Update.
5836 * linux-thread-db.c: Update.
5837 * mi/mi-cmd-var.c: Update.
5838 * mi/mi-interp.c: Update.
5839 * mi/mi-main.c: Update.
5840 * nto-procfs.c: Update.
5841 * ppc-linux-tdep.c: Update.
5842 * procfs.c: Update.
5843 * python/py-inferior.c: Update.
5844 * python/py-record-btrace.c: Update.
5845 * python/py-record.c: Update.
5846 * ravenscar-thread.c: Update.
5847 * regcache.c: Update.
5848 * remote-sim.c: Update.
5849 * remote.c: Update.
5850 * sol-thread.c: Update.
5851 * solib.c: Update.
5852 * target.c: Update.
5853 * tui/tui-stack.c: Update.
5854 * varobj.c: Update.
5855 * windows-nat.c: Update.
5856 * windows-tdep.c: Update.
5857
5858 2018-07-03 Tom Tromey <tom@tromey.com>
5859
5860 * common/ptid.c (ptid_match): Remove.
5861 * common/ptid.h (ptid_match): Don't declare.
5862 * fbsd-nat.c: Update.
5863 * infcmd.c: Update.
5864 * infrun.c: Update.
5865 * linux-nat.c: Update.
5866 * record-btrace.c: Update.
5867 * regcache.c: Update.
5868 * remote.c: Update.
5869
5870 2018-07-03 Tom Tromey <tom@tromey.com>
5871
5872 * common/ptid.c (ptid_tid_p): Remove.
5873 * common/ptid.h (ptid_tid_p): Don't declare.
5874 * sol-thread.c: Update.
5875
5876 2018-07-03 Tom Tromey <tom@tromey.com>
5877
5878 * common/ptid.c (ptid_lwp_p): Remove.
5879 * common/ptid.h (ptid_lwp_p): Don't declare.
5880 * fbsd-nat.c: Update.
5881 * linux-nat.c: Update.
5882 * nat/linux-procfs.c: Update.
5883 * nat/x86-linux-dregs.c: Update.
5884 * sol-thread.c: Update.
5885
5886 2018-07-03 Tom Tromey <tom@tromey.com>
5887
5888 * common/ptid.c (ptid_is_pid): Remove.
5889 * common/ptid.h (ptid_is_pid): Don't declare.
5890 * infrun.c: Update.
5891 * linux-nat.c: Update.
5892 * mi/mi-interp.c: Update.
5893 * remote.c: Update.
5894 * thread.c: Update.
5895
5896 2018-07-03 Tom Tromey <tom@tromey.com>
5897
5898 * common/ptid.c (ptid_get_tid): Remove.
5899 * common/ptid.h (ptid_get_tid): Don't declare.
5900 * ada-tasks.c: Update.
5901 * aix-thread.c: Update.
5902 * bsd-uthread.c: Update.
5903 * darwin-nat.c: Update.
5904 * fbsd-nat.c: Update.
5905 * i386-darwin-nat.c: Update.
5906 * infrun.c: Update.
5907 * linux-tdep.c: Update.
5908 * nto-procfs.c: Update.
5909 * ppc-ravenscar-thread.c: Update.
5910 * python/py-infthread.c: Update.
5911 * ravenscar-thread.c: Update.
5912 * sol-thread.c: Update.
5913 * sparc-ravenscar-thread.c: Update.
5914 * windows-nat.c: Update.
5915
5916 2018-07-03 Tom Tromey <tom@tromey.com>
5917
5918 * common/ptid.c (ptid_get_lwp): Remove.
5919 * common/ptid.h (ptid_get_lwp): Don't declare.
5920 * aarch64-linux-nat.c: Update.
5921 * ada-tasks.c: Update.
5922 * aix-thread.c: Update.
5923 * amd64-linux-nat.c: Update.
5924 * arm-linux-nat.c: Update.
5925 * corelow.c: Update.
5926 * fbsd-nat.c: Update.
5927 * fbsd-tdep.c: Update.
5928 * gnu-nat.c: Update.
5929 * i386-cygwin-tdep.c: Update.
5930 * i386-gnu-nat.c: Update.
5931 * i386-linux-nat.c: Update.
5932 * ia64-linux-nat.c: Update.
5933 * inf-ptrace.c: Update.
5934 * infrun.c: Update.
5935 * linux-fork.c: Update.
5936 * linux-nat.c: Update.
5937 * linux-tdep.c: Update.
5938 * linux-thread-db.c: Update.
5939 * mips-linux-nat.c: Update.
5940 * nat/aarch64-linux-hw-point.c: Update.
5941 * nat/aarch64-linux.c: Update.
5942 * nat/linux-btrace.c: Update.
5943 * nat/linux-osdata.c: Update.
5944 * nat/linux-procfs.c: Update.
5945 * nat/x86-linux-dregs.c: Update.
5946 * obsd-nat.c: Update.
5947 * ppc-fbsd-nat.c: Update.
5948 * ppc-linux-nat.c: Update.
5949 * procfs.c: Update.
5950 * python/py-infthread.c: Update.
5951 * ravenscar-thread.c: Update.
5952 * remote.c: Update.
5953 * s390-linux-nat.c: Update.
5954 * sol-thread.c: Update.
5955 * sol2-tdep.c: Update.
5956 * spu-linux-nat.c: Update.
5957 * x86-linux-nat.c: Update.
5958 * xtensa-linux-nat.c: Update.
5959
5960 2018-07-03 Tom Tromey <tom@tromey.com>
5961
5962 * common/ptid.c (ptid_get_pid): Remove.
5963 * common/ptid.h (ptid_get_pid): Don't declare.
5964 * aarch64-linux-nat.c: Update.
5965 * ada-lang.c: Update.
5966 * aix-thread.c: Update.
5967 * alpha-bsd-nat.c: Update.
5968 * amd64-fbsd-nat.c: Update.
5969 * amd64-linux-nat.c: Update.
5970 * arm-linux-nat.c: Update.
5971 * arm-nbsd-nat.c: Update.
5972 * auxv.c: Update.
5973 * break-catch-syscall.c: Update.
5974 * breakpoint.c: Update.
5975 * bsd-uthread.c: Update.
5976 * corelow.c: Update.
5977 * ctf.c: Update.
5978 * darwin-nat.c: Update.
5979 * fbsd-nat.c: Update.
5980 * fbsd-tdep.c: Update.
5981 * gcore.c: Update.
5982 * gnu-nat.c: Update.
5983 * hppa-nbsd-nat.c: Update.
5984 * hppa-obsd-nat.c: Update.
5985 * i386-fbsd-nat.c: Update.
5986 * ia64-linux-nat.c: Update.
5987 * inf-ptrace.c: Update.
5988 * infcmd.c: Update.
5989 * inferior.c: Update.
5990 * inferior.h: Update.
5991 * inflow.c: Update.
5992 * infrun.c: Update.
5993 * linux-fork.c: Update.
5994 * linux-nat.c: Update.
5995 * linux-tdep.c: Update.
5996 * linux-thread-db.c: Update.
5997 * m68k-bsd-nat.c: Update.
5998 * mi/mi-interp.c: Update.
5999 * mi/mi-main.c: Update.
6000 * mips-linux-nat.c: Update.
6001 * mips-nbsd-nat.c: Update.
6002 * mips64-obsd-nat.c: Update.
6003 * nat/aarch64-linux-hw-point.c: Update.
6004 * nat/aarch64-linux.c: Update.
6005 * nat/linux-btrace.c: Update.
6006 * nat/linux-osdata.c: Update.
6007 * nat/linux-procfs.c: Update.
6008 * nat/x86-linux-dregs.c: Update.
6009 * nto-procfs.c: Update.
6010 * obsd-nat.c: Update.
6011 * ppc-linux-nat.c: Update.
6012 * ppc-nbsd-nat.c: Update.
6013 * ppc-obsd-nat.c: Update.
6014 * proc-service.c: Update.
6015 * procfs.c: Update.
6016 * python/py-inferior.c: Update.
6017 * python/py-infthread.c: Update.
6018 * ravenscar-thread.c: Update.
6019 * record.c: Update.
6020 * remote-sim.c: Update.
6021 * remote.c: Update.
6022 * rs6000-nat.c: Update.
6023 * s390-linux-nat.c: Update.
6024 * sh-nbsd-nat.c: Update.
6025 * sol-thread.c: Update.
6026 * sparc-nat.c: Update.
6027 * sparc64-tdep.c: Update.
6028 * spu-linux-nat.c: Update.
6029 * spu-tdep.c: Update.
6030 * target-debug.h: Update.
6031 * target.c: Update.
6032 * thread.c: Update.
6033 * tid-parse.c: Update.
6034 * tracefile-tfile.c: Update.
6035 * vax-bsd-nat.c: Update.
6036 * windows-nat.c: Update.
6037 * x86-linux-nat.c: Update.
6038 * x86-nat.c: Update.
6039
6040 2018-07-03 Tom Tromey <tom@tromey.com>
6041
6042 * common/ptid.c (pid_to_ptid): Remove.
6043 * common/ptid.h (pid_to_ptid): Don't declare.
6044 * aix-thread.c: Update.
6045 * arm-linux-nat.c: Update.
6046 * common/ptid.c: Update.
6047 * common/ptid.h: Update.
6048 * corelow.c: Update.
6049 * ctf.c: Update.
6050 * darwin-nat.c: Update.
6051 * fbsd-nat.c: Update.
6052 * fork-child.c: Update.
6053 * gnu-nat.c: Update.
6054 * go32-nat.c: Update.
6055 * inf-ptrace.c: Update.
6056 * infcmd.c: Update.
6057 * inferior.c: Update.
6058 * infrun.c: Update.
6059 * linux-fork.c: Update.
6060 * linux-nat.c: Update.
6061 * nat/aarch64-linux-hw-point.c: Update.
6062 * nat/fork-inferior.c: Update.
6063 * nat/x86-linux-dregs.c: Update.
6064 * nto-procfs.c: Update.
6065 * obsd-nat.c: Update.
6066 * procfs.c: Update.
6067 * progspace.c: Update.
6068 * remote.c: Update.
6069 * rs6000-nat.c: Update.
6070 * s390-linux-nat.c: Update.
6071 * sol-thread.c: Update.
6072 * spu-linux-nat.c: Update.
6073 * target.c: Update.
6074 * top.c: Update.
6075 * tracefile-tfile.c: Update.
6076 * windows-nat.c: Update.
6077
6078 2018-07-03 Tom Tromey <tom@tromey.com>
6079
6080 * common/ptid.h (ptid_build): Don't declare.
6081 * common/ptid.c (ptid_build): Remove.
6082 * aix-thread.c: Update.
6083 * bsd-kvm.c: Update.
6084 * bsd-uthread.c: Update.
6085 * common/agent.c: Update.
6086 * common/ptid.c: Update.
6087 * common/ptid.h: Update.
6088 * corelow.c: Update.
6089 * darwin-nat.c: Update.
6090 * fbsd-nat.c: Update.
6091 * gnu-nat.c: Update.
6092 * linux-fork.c: Update.
6093 * linux-nat.c: Update.
6094 * linux-thread-db.c: Update.
6095 * nat/linux-osdata.c: Update.
6096 * nat/linux-procfs.c: Update.
6097 * nto-procfs.c: Update.
6098 * obsd-nat.c: Update.
6099 * proc-service.c: Update.
6100 * procfs.c: Update.
6101 * ravenscar-thread.c: Update.
6102 * remote-sim.c: Update.
6103 * remote.c: Update.
6104 * sol-thread.c: Update.
6105 * target.c: Update.
6106 * windows-nat.c: Update.
6107
6108 2018-07-03 Tom Tromey <tom@tromey.com>
6109
6110 * infrun.c (follow_exec): Use exit_inferior_silent.
6111 * inferior.c (exit_inferior_num_silent): Remove.
6112 * inferior.h (exit_inferior_num_silent): Don't declare.
6113
6114 2018-07-03 Tom Tromey <tom@tromey.com>
6115
6116 PR cli/23340:
6117 * darwin-nat.c (darwin_attach_pid): Reset inferior and
6118 inferior_ptid on error.
6119
6120 2018-07-02 Maciej W. Rozycki <macro@mips.com>
6121 Simon Marchi <simon.marchi@polymtl.ca>
6122
6123 PR tdep/8282
6124 * disasm.h (gdb_disassembler): Add
6125 `m_disassembler_options_holder'. member
6126 * disasm.c (get_all_disassembler_options): New function.
6127 (gdb_disassembler::gdb_disassembler): Use it.
6128 (gdb_buffered_insn_length_init_dis): Likewise.
6129 (gdb_buffered_insn_length): Adjust accordingly.
6130 (set_disassembler_options): Handle options with arguments.
6131 (show_disassembler_options_sfunc): Likewise. Add a leading new
6132 line if showing options with descriptions.
6133 (disassembler_options_completer): Adapt to using the
6134 `disasm_options_and_args_t' structure.
6135 * mips-tdep.c (mips_disassembler_options): New variable.
6136 (mips_disassembler_options_o32): Likewise.
6137 (mips_disassembler_options_n32): Likewise.
6138 (mips_disassembler_options_n64): Likewise.
6139 (gdb_print_insn_mips): Don't set `disassembler_options'.
6140 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6141 functions.
6142 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6143 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
6144 `gdbarch_disassembler_options_implicit' and
6145 `gdbarch_valid_disassembler_options'.
6146 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6147 `disasm_options_and_args_t' structure.
6148 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6149 method.
6150 (valid_disassembler_options): Switch from `disasm_options_t' to
6151 the `disasm_options_and_args_t' structure.
6152 * NEWS: Document `set disassembler-options' support for the MIPS
6153 target.
6154 * gdbarch.h: Regenerate.
6155 * gdbarch.c: Regenerate.
6156
6157 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
6158
6159 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6160
6161 2018-06-29 Joel Brobecker <brobecker@adacore.com>
6162
6163 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6164 parameter in call to amd64_target_description.
6165 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6166 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6167 (amd64fbsd_init_abi): Likewise.
6168 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6169 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6170 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6171 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6172
6173 2018-06-29 Pedro Alves <palves@redhat.com>
6174
6175 * gdb/amd64-tdep.h (amd64_create_target_description): Add
6176 "segments" parameter.
6177 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6178 (_initialize_amd64_tdep): Update call to
6179 amd64_create_target_description.
6180 (amd64_target_description): Add "segments" parameter. Adjust
6181 the implementation to use it.
6182 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6183 call to amd64_create_target_description.
6184 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6185 * gdb/arch/amd64.h (amd64_create_target_description): Add
6186 "segments" register.
6187 * gdb/arch/amd64.c (amd64_create_target_description): Add
6188 "segments" parameter. Call create_feature_i386_64bit_segments
6189 only if SEGMENTS is true.
6190 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6191 call to amd64_create_target_description.
6192
6193 2018-06-29 Pedro Alves <palves@redhat.com>
6194
6195 * thread.c (thread_target_id_str): New, factored out from ...
6196 (print_thread_info_1): ... here. Use it to compute the max
6197 "Target Id" column width.
6198
6199 2018-06-29 Pedro Alves <palves@redhat.com>
6200
6201 * remote.c (remote_target::extra_thread_info): Delete
6202 'display_buf' and 'n' locals. from the cache, regardless of
6203 packet mechanims is in use. Use cache for qThreadExtra and qP
6204 methods too.
6205
6206 2018-06-29 Pedro Alves <palves@redhat.com>
6207
6208 * blockframe.c (find_pc_sect_containing_function): New function.
6209 * breakpoint.c (print_breakpoint_location): Don't call
6210 find_pc_sect_function.
6211 * linespec.c (create_sals_line_offset): Record the location's
6212 symbol in the sal.
6213 * linespec.c (convert_address_location_to_sals): Fill in sal's
6214 symbol with find_pc_sect_containing_function.
6215 * symtab.c (find_function_start_sal): Rename to ...
6216 (find_function_start_sal_1): ... this.
6217 (find_function_start_sal): Reimplement as wrapper around
6218 find_function_start_sal_1, and use
6219 find_pc_sect_containing_function to fill in the sal's symbol.
6220 (find_function_start_sal(symbol*, bool)): Adjust.
6221 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6222 comments.
6223 (find_pc_sect_containing_function): Declare.
6224
6225 2018-06-29 Pedro Alves <palves@redhat.com>
6226
6227 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6228 true if the the location has no symbol.
6229
6230 2018-06-28 Tom Tromey <tom@tromey.com>
6231
6232 * NEWS: Mention --enable-codesign.
6233 * silent-rules.mk (ECHO_SIGN): New variable.
6234 * configure.ac: Add --enable-codesign.
6235 * configure: Rebuild.
6236 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6237 (gdb$(EXEEXT)): Optionally invoke codesign.
6238
6239 2018-06-28 Pedro Alves <palves@redhat.com>
6240
6241 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6242 comments.
6243 (switch_to_thread_no_regs): Adjust comment.
6244 * infcmd.c (stop_pc): Delete.
6245 (post_create_inferior, info_program_command): Replace references
6246 to stop_pc with references to thread_info->suspend.stop_pc.
6247 * inferior.h (stop_pc): Delete declaration.
6248 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6249 (handle_inferior_event_1, handle_signal_stop)
6250 (process_event_stop_test, keep_going_stepped_thread)
6251 (handle_step_into_function, handle_step_into_function_backward)
6252 (print_stop_location): Replace references to stop_pc with
6253 references to thread_info->suspend.stop_pc.
6254 (struct infcall_suspend_state) <stop_pc>: Delete field.
6255 (save_infcall_suspend_state, restore_infcall_suspend_state):
6256 Remove references to inf_stat->stop_pc.
6257 * linux-fork.c (fork_load_infrun_state): Likewise.
6258 * record-btrace.c (record_btrace_set_replay): Likewise.
6259 * record-full.c (record_full_goto_entry): Likewise.
6260 * remote.c (print_one_stopped_thread): Likewise.
6261 * target.c (target_resume): Extend comment.
6262 * thread.c (set_executing_thread): New.
6263 (set_executing): Use it.
6264 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6265 Remove references to stop_pc.
6266
6267 2018-06-28 Pedro Alves <palves@redhat.com>
6268
6269 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6270 Moving fetching stop_pc until after ecs->event_thread is refreshed.
6271
6272 2018-06-28 Tom Tromey <tom@tromey.com>
6273
6274 * coffread.c (coff_symfile_finish): Update.
6275 * xcoffread.c (xcoff_symfile_finish): Update.
6276 * elfread.c (elf_symfile_finish): Update.
6277 * symfile.h (dwarf2_free_objfile): Don't declare.
6278 * dwarf2read.c (_initialize_dwarf2_read): Use
6279 register_objfile_data_with_cleanup.
6280 (dwarf2_free_objfile): Now static. Change signature.
6281
6282 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6283
6284 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6285 option "-o" to add-symbol-file-load to add an offset to each
6286 section's load address.
6287 * symfile.c (set_objfile_default_section_offset): New function.
6288
6289 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6290
6291 * symfile.c (add_symbol_file_command): Make sure that sections
6292 with the same name are sorted in the same order.
6293
6294 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6295
6296 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6297 require the second argument. If omitted, load sections at the
6298 addresses specified in the file.
6299
6300 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6301
6302 * symfile.c (symbol_file_command, symbol_file_add_main_1)
6303 (_initialize_symfile): Add option "-o" to symbol-file to add an
6304 offset to each section of the symbol file.
6305
6306 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6307
6308 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6309
6310 2018-06-27 Tom Tromey <tom@tromey.com>
6311
6312 * stack.c (_initialize_stack): Update "func" help text.
6313
6314 2018-06-27 Tom Tromey <tom@tromey.com>
6315
6316 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6317 std::vector.
6318 (unwind_infopy_str, pyuw_create_unwind_info)
6319 (unwind_infopy_add_saved_register, pyuw_sniffer)
6320 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6321 Update.
6322 (struct saved_reg): Add constructor.
6323 <value>: Now a gdbpy_ref<>.
6324
6325 2018-06-27 Tom Tromey <tom@tromey.com>
6326
6327 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6328
6329 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6330
6331 * gdb-gdb.py.in: Format using autopep8.
6332
6333 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6334
6335 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6336 (type_lookup_function): Recognize CORE_ADDR values.
6337
6338 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6339
6340 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6341 print tag_name.
6342
6343 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6344
6345 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6346 <__lt__>: Add.
6347
6348 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6349
6350 * gdb-gdb.py: Move to...
6351 * gdb-gdb.py.in: ... here.
6352 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6353 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6354 dependencies.
6355 (distclean): Remove gdb-gdb.py when cleaning.
6356 (gdb-gdb.py, gdb-gdb.gdb): New rules.
6357 * configure: Re-generate.
6358
6359 2018-06-27 Pedro Alves <palves@redhat.com>
6360
6361 * proc-service.c (get_ps_regcache): New.
6362 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6363 (ps_lsetfpregs): Use it.
6364
6365 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
6366
6367 PR gdb/21695
6368 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6369 (dwarf_decode_lines_1): Adjust.
6370
6371 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6372
6373 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6374 override.
6375 <info_proc>: Likewise.
6376
6377 2018-06-26 Joel Brobecker <brobecker@adacore.com>
6378
6379 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6380 to windows_fetch_one_register, and only handle the case of
6381 fetching one register. Move the code that reloads the context
6382 and iterates over all registers if R is negative to...
6383 (windows_nat_target::fetch_registers): ... here.
6384 (do_windows_store_inferior_registers): Rename to
6385 windows_store_one_register, and only handle the case of storing
6386 one register. Move the code that handles the case where r is
6387 negative to...
6388 (windows_nat_target::store_registers) ... here.
6389
6390 2018-06-26 Tom Tromey <tom@tromey.com>
6391
6392 PR rust/22574:
6393 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6394 * rust-lang.c (rust_print_struct_def): Add podata parameter.
6395 Update.
6396 (rust_internal_print_type): Add podata parameter.
6397 (rust_print_type): Update.
6398
6399 2018-06-26 Tom Tromey <tom@tromey.com>
6400
6401 * typeprint.h (struct print_offset_data) <update, finish,
6402 maybe_print_hole>: New methods.
6403 <indentation>: New constant.
6404 * typeprint.c (print_offset_data::indentation): Define.
6405 (print_offset_data::maybe_print_hole, print_offset_data::update)
6406 (print_offset_data::finish): Move from c-typeprint.c and rename.
6407 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6408 (print_spaces_filtered_with_print_options): Update.
6409 (c_print_type_union_field_offset, maybe_print_hole)
6410 (c_print_type_struct_field_offset): Move to typeprint.c and
6411 rename.
6412 (c_type_print_base_struct_union): Update.
6413
6414 2018-06-25 Pedro Alves <palves@redhat.com>
6415
6416 * gdbthread.h (thread_info_ref, delete_thread)
6417 (delete_thread_silent, first_thread_of_inferior)
6418 (any_thread_of_inferior, switch_to_thread)
6419 (enable_thread_stack_temporaries)
6420 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6421 (get_last_thread_stack_temporary)
6422 (value_in_thread_stack_temporaries, can_access_registers_thread):
6423 Spell out "struct thread_info" instead of just "thread_info".
6424 * inferior.h (notice_new_inferior): Likewise.
6425
6426 2018-06-25 Pedro Alves <palves@redhat.com>
6427
6428 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6429 pass thread_info pointer to delete_thread.
6430 (windows_nat_target::detach): Pass inferior pointer to
6431 detach_inferior.
6432 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6433 delete_thread.
6434 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6435 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6436 and pass a thread_info pointer to delete_thread.
6437 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6438 pass thread_info pointer to delete_thread.
6439 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6440 delete_thread_silent call.
6441 * procfs.c (procfs_target::detach): Pass inferior pointer to
6442 detach_inferior.
6443 (procfs_target::wait): Pass thread_info pointer to delete_thread.
6444 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6445 delete_thread_silent call.
6446 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6447 pass thread_info pointer to delete_thread.
6448 (windows_nat_target::detach): Pass inferior pointer to
6449 delete_inferior.
6450
6451 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6452
6453 * regcache.c (readable_regcache::read_part): Fix asserts.
6454 (reg_buffer::raw_collect_part): New function.
6455 (regcache::write_part): Fix asserts.
6456 (reg_buffer::raw_supply_part): New function.
6457 (regcache::transfer_regset_register): New helper function.
6458 (regcache::transfer_regset): Call new functions.
6459 (regcache_supply_regset): Use gdb_byte*.
6460 (regcache::supply_regset): Likewise.
6461 (regcache_collect_regset): Likewise.
6462 (regcache::collect_regset): Likewise.
6463 * regcache.h (reg_buffer::raw_collect_part): New declaration.
6464 (reg_buffer::raw_supply_part): Likewise.
6465 (regcache::transfer_regset_register): Likewise.
6466 (regcache::transfer_regset): Use gdb_byte*.
6467
6468 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6469
6470 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6471
6472 2018-06-21 Pedro Alves <palves@redhat.com>
6473
6474 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6475 instead of a ptid_t. All callers adjusted.
6476 * ada-tasks.c (ada_get_task_number): Likewise. All callers
6477 adjusted.
6478 (print_ada_task_info, display_current_task_id, task_command_1):
6479 Adjust.
6480 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6481 inferior_thread.
6482 (breakpoint_kind): Adjust.
6483 (remove_breakpoints_pid): Rename to ...
6484 (remove_breakpoints_inf): ... this. Adjust to take an inferior
6485 pointer. All callers adjusted.
6486 (bpstat_clear_actions): Use inferior_thread.
6487 (get_bpstat_thread): New.
6488 (bpstat_do_actions): Use it.
6489 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6490 to take a thread_info pointer. All callers adjusted.
6491 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6492 (breakpoint_re_set_thread): Use inferior_thread.
6493 * breakpoint.h (struct inferior): Forward declare.
6494 (bpstat_stop_status): Update.
6495 (remove_breakpoints_pid): Delete.
6496 (remove_breakpoints_inf): New.
6497 * bsd-uthread.c (bsd_uthread_target::wait)
6498 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6499 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6500 (maint_btrace_packet_history_cmd)
6501 (maint_btrace_clear_packet_history_cmd): Adjust.
6502 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6503 inferior_thread.
6504 * cli/cli-interp.c: Include "inferior.h".
6505 * common/refcounted-object.h (struct
6506 refcounted_object_ref_policy): New.
6507 * compile/compile-object-load.c: Include gdbthread.h.
6508 (store_regs): Use inferior_thread.
6509 * corelow.c (core_target::close): Use current_inferior.
6510 (core_target_open): Adjust to use first_thread_of_inferior and use
6511 the current inferior.
6512 * ctf.c (ctf_target::close): Adjust to use current_inferior.
6513 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6514 <thread>: ... this new field. All references adjusted.
6515 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6516 Take a thread_info pointer instead of a ptid_t.
6517 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6518 (dummy_frame_discard, register_dummy_frame_dtor): Take a
6519 thread_info pointer instead of a ptid_t.
6520 * elfread.c: Include "inferior.h".
6521 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6522 Use inferior_thread.
6523 * eval.c (evaluate_subexp): Likewise.
6524 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6525 inferior_thread.
6526 * gdb_proc_service.h (struct thread_info): Forward declare.
6527 (struct ps_prochandle) <ptid>: Delete, replaced by ...
6528 <thread>: ... this new field. All references adjusted.
6529 * gdbarch.h, gdbarch.c: Regenerate.
6530 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6531 'thread' parameter. All implementations and callers adjusted.
6532 * gdbthread.h (thread_info) <set_running>: New method.
6533 (delete_thread, delete_thread_silent): Take a thread_info pointer
6534 instead of a ptid.
6535 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6536 (first_thread_of_process): Delete, replaced by ...
6537 (first_thread_of_inferior): ... this new function. All callers
6538 adjusted.
6539 (any_live_thread_of_process): Delete, replaced by ...
6540 (any_live_thread_of_inferior): ... this new function. All callers
6541 adjusted.
6542 (switch_to_thread, switch_to_no_thread): Declare.
6543 (is_executing): Delete.
6544 (enable_thread_stack_temporaries): Update comment.
6545 <enable_thread_stack_temporaries>: Take a thread_info pointer
6546 instead of a ptid_t. Incref the thread.
6547 <~enable_thread_stack_temporaries>: Decref the thread.
6548 <m_ptid>: Delete
6549 <m_thr>: New.
6550 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6551 (get_last_thread_stack_temporary)
6552 (value_in_thread_stack_temporaries, can_access_registers_thread):
6553 Take a thread_info pointer instead of a ptid_t. All callers
6554 adjusted.
6555 * infcall.c (get_call_return_value): Use inferior_thread.
6556 (run_inferior_call): Work with thread pointers instead of ptid_t.
6557 (call_function_by_hand_dummy): Work with thread pointers instead
6558 of ptid_t. Use thread_info_ref.
6559 * infcmd.c (proceed_thread_callback): Access thread's state
6560 directly.
6561 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6562 access thread's state directly.
6563 (continue_command): Use inferior_thread.
6564 (info_program_command): Use find_thread_ptid and access thread
6565 state directly.
6566 (proceed_after_attach_callback): Use thread state directly.
6567 (notice_new_inferior): Take a thread_info pointer instead of a
6568 ptid_t. All callers adjusted.
6569 (exit_inferior): Take an inferior pointer instead of a pid. All
6570 callers adjusted.
6571 (exit_inferior_silent): New.
6572 (detach_inferior): Delete.
6573 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6574 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6575 (detach_inferior_command, kill_inferior_command): Use
6576 find_inferior_id instead of valid_gdb_inferior_id and
6577 gdb_inferior_id_to_pid.
6578 (inferior_command): Use inferior and thread pointers.
6579 * inferior.h (struct thread_info): Forward declare.
6580 (notice_new_inferior): Take a thread_info pointer instead of a
6581 ptid_t. All callers adjusted.
6582 (detach_inferior): Delete declaration.
6583 (exit_inferior, exit_inferior_silent): Take an inferior pointer
6584 instead of a pid. All callers adjusted.
6585 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6586 (valid_gdb_inferior_id): Delete.
6587 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6588 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6589 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6590 ...
6591 <inf>: ... this new field.
6592 <step_ptid>: Delete, replaced by ...
6593 <step_thread>: ... this new field.
6594 (get_displaced_stepping_state): Take an inferior pointer instead
6595 of a pid. All callers adjusted.
6596 (displaced_step_in_progress_any_inferior): Adjust.
6597 (displaced_step_in_progress_thread): Take a thread pointer instead
6598 of a ptid_t. All callers adjusted.
6599 (displaced_step_in_progress, add_displaced_stepping_state): Take
6600 an inferior pointer instead of a pid. All callers adjusted.
6601 (get_displaced_step_closure_by_addr): Adjust.
6602 (remove_displaced_stepping_state): Take an inferior pointer
6603 instead of a pid. All callers adjusted.
6604 (displaced_step_prepare_throw, displaced_step_prepare)
6605 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6606 All callers adjusted.
6607 (start_step_over): Adjust.
6608 (infrun_thread_ptid_changed): Remove bit updating ptids in the
6609 displaced step queue.
6610 (do_target_resume): Adjust.
6611 (fetch_inferior_event): Use inferior_thread.
6612 (context_switch, get_inferior_stop_soon): Take an
6613 execution_control_state pointer instead of a ptid_t. All callers
6614 adjusted.
6615 (switch_to_thread_cleanup): Delete.
6616 (stop_all_threads): Use scoped_restore_current_thread.
6617 * inline-frame.c: Include "gdbthread.h".
6618 (inline_state) <inline_state>: Take a thread pointer instead of a
6619 ptid_t. All callers adjusted.
6620 <ptid>: Delete, replaced by ...
6621 <thread>: ... this new field.
6622 (find_inline_frame_state): Take a thread pointer instead of a
6623 ptid_t. All callers adjusted.
6624 (skip_inline_frames, step_into_inline_frame)
6625 (inline_skipped_frames, inline_skipped_symbol): Take a thread
6626 pointer instead of a ptid_t. All callers adjusted.
6627 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6628 (inline_skipped_frames, inline_skipped_symbol): Likewise.
6629 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6630 pointers directly.
6631 * linux-nat.c (get_detach_signal): Likewise.
6632 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6633 (thread_db_notice_clone): Adjust.
6634 (thread_db_find_new_threads_silently)
6635 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6636 a thread pointer instead of a ptid_t. All callers adjusted.
6637 * mi/mi-cmd-var.c: Include "inferior.h".
6638 (mi_cmd_var_update_iter): Update to use thread pointers.
6639 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6640 inferior directly.
6641 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6642 out to ...
6643 (mi_output_running): ... this new function.
6644 (mi_on_resume_1): Adjust to use it.
6645 (mi_user_selected_context_changed): Adjust to use inferior_thread.
6646 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6647 directly.
6648 (interrupt_thread_callback): : Adjust to use thread and inferior
6649 pointers.
6650 * proc-service.c: Include "gdbthread.h".
6651 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6652 * progspace-and-thread.c: Include "inferior.h".
6653 * progspace.c: Include "inferior.h".
6654 * python/py-exitedevent.c (create_exited_event_object): Adjust to
6655 hold a reference to an inferior_object.
6656 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6657 inferior_thread.
6658 * python/py-inferior.c (struct inferior_object): Give the type a
6659 tag name instead of a typedef.
6660 (python_on_normal_stop): No need to check if the current thread is
6661 listed.
6662 (inferior_to_inferior_object): Change return type to
6663 inferior_object. All callers adjusted.
6664 (find_thread_object): Delete, bits factored out to ...
6665 (thread_to_thread_object): ... this new function.
6666 * python/py-infthread.c (create_thread_object): Use
6667 inferior_to_inferior_object.
6668 (thpy_is_stopped): Use thread pointer directly.
6669 (gdbpy_selected_thread): Use inferior_thread.
6670 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6671 field, replaced with ...
6672 <thread>: ... this new field. All users adjusted.
6673 (btpy_insn_or_gap_new): Drop const.
6674 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
6675 callers adjusted.
6676 * python/py-record.c: Include "gdbthread.h".
6677 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6678 a ptid_t. All callers adjusted.
6679 (gdbpy_current_recording): Use inferior_thread.
6680 * python/py-record.h (recpy_record_object) <ptid>: Delete
6681 field, replaced with ...
6682 <thread>: ... this new field. All users adjusted.
6683 (recpy_element_object) <ptid>: Delete
6684 field, replaced with ...
6685 <thread>: ... this new field. All users adjusted.
6686 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6687 a ptid_t. All callers adjusted.
6688 * python/py-threadevent.c: Include "gdbthread.h".
6689 (get_event_thread): Use thread_to_thread_object.
6690 * python/python-internal.h (struct inferior_object): Forward
6691 declare.
6692 (find_thread_object, find_inferior_object): Delete declarations.
6693 (thread_to_thread_object, inferior_to_inferior_object): New
6694 declarations.
6695 * record-btrace.c: Include "inferior.h".
6696 (require_btrace_thread): Use inferior_thread.
6697 (record_btrace_frame_sniffer)
6698 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6699 (get_thread_current_frame): Use scoped_restore_current_thread and
6700 switch_to_thread.
6701 (get_thread_current_frame): Use thread pointer directly.
6702 (record_btrace_replay_at_breakpoint): Use thread's inferior
6703 pointer directly.
6704 * record-full.c: Include "inferior.h".
6705 * regcache.c: Include "gdbthread.h".
6706 (get_thread_arch_regcache): Use the inferior's address space
6707 directly.
6708 (get_thread_regcache, registers_changed_thread): New.
6709 * regcache.h (get_thread_regcache(thread_info *thread)): New
6710 overload.
6711 (registers_changed_thread): New.
6712 (remote_target) <remote_detach_1>: Swap order of parameters.
6713 (remote_add_thread): <remote_add_thread>: Return the new thread.
6714 (get_remote_thread_info(ptid_t)): New overload.
6715 (remote_target::remote_notice_new_inferior): Use thread pointers
6716 directly.
6717 (remote_target::process_initial_stop_replies): Use
6718 thread_info::set_running.
6719 (remote_target::remote_detach_1, remote_target::detach)
6720 (extended_remote_target::detach): Adjust.
6721 * stack.c (frame_show_address): Use inferior_thread.
6722 * target-debug.h (target_debug_print_thread_info_pp): New.
6723 * target-delegates.c: Regenerate.
6724 * target.c (default_thread_address_space): Delete.
6725 (memory_xfer_partial_1): Use current_inferior.
6726 (target_detach): Use current_inferior.
6727 (target_thread_address_space): Delete.
6728 (generic_mourn_inferior): Use current_inferior.
6729 * target.h (struct target_ops) <thread_address_space>: Delete.
6730 (target_thread_address_space): Delete.
6731 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
6732 pointers directly.
6733 (delete_thread_1, delete_thread, delete_thread_silent): Take a
6734 thread pointer instead of a ptid_t. Adjust all callers.
6735 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6736 (first_thread_of_process): Delete, replaced by ...
6737 (first_thread_of_inferior): ... this new function. All callers
6738 adjusted.
6739 (any_thread_of_process): Rename to ...
6740 (any_thread_of_inferior): ... this, and take an inferior pointer.
6741 (any_live_thread_of_process): Rename to ...
6742 (any_live_thread_of_inferior): ... this, and take an inferior
6743 pointer.
6744 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6745 (value_in_thread_stack_temporaries)
6746 (get_last_thread_stack_temporary): Take a thread pointer instead
6747 of a ptid_t. Adjust all callers.
6748 (thread_info::set_running): New.
6749 (validate_registers_access): Use inferior_thread.
6750 (can_access_registers_ptid): Rename to ...
6751 (can_access_registers_thread): ... this, and take a thread
6752 pointer.
6753 (print_thread_info_1): Adjust to compare thread pointers instead
6754 of ptids.
6755 (switch_to_no_thread, switch_to_thread): Make extern.
6756 (scoped_restore_current_thread::~scoped_restore_current_thread):
6757 Use m_thread pointer directly.
6758 (scoped_restore_current_thread::scoped_restore_current_thread):
6759 Use inferior_thread.
6760 (thread_command): Use thread pointer directly.
6761 (thread_num_make_value_helper): Use inferior_thread.
6762 * top.c (execute_command): Use inferior_thread.
6763 * tui/tui-interp.c: Include "inferior.h".
6764 * varobj.c (varobj_create): Use inferior_thread.
6765 (value_of_root_1): Use find_thread_global_id instead of
6766 global_thread_id_to_ptid.
6767
6768 2018-06-21 Alan Hayward <alan.hayward@arm.com>
6769
6770 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6771 possible.
6772 (regcache::write_part): Likewise.
6773 (readable_regcache::cooked_read_part): Update comment.
6774 (readable_regcache::cooked_write_part): Likewise.
6775 * regcache.h: (readable_regcache::read_part): Likewise.
6776 (regcache::write_part): Likewise.
6777
6778 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6779 Dirk Schubert <dirk.schubert@arm.com>
6780
6781 * aarch64-linux-nat.c (post_attach): New.
6782 (aarch64_linux_nat_target::post_attach): Override post_attach to
6783 record the number of hardware debug registers.
6784
6785 2018-06-20 Tom Tromey <tom@tromey.com>
6786
6787 * python/py-param.c (add_setshow_generic): Make parameters const.
6788 (parmpy_init): Update.
6789
6790 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6791
6792 * regcache.h (regcache_cooked_read_ftype): Rename to...
6793 (register_read_ftype): ...this, change type to function_view.
6794 (class reg_buffer) <save>: Remove src parameter.
6795 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6796 parameter non-const in first overload. Remove src parameter in
6797 second overload.
6798 * regcache.c (do_cooked_read): Remove.
6799 (readonly_detached_regcache::readonly_detached_regcache): Make
6800 parameter non-const, adjust call to other constructor.
6801 (reg_buffer::save): Remove src parameter.
6802 * frame.c (do_frame_register_read): Remove.
6803 (frame_save_as_regcache): Use lambda function.
6804 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6805 parameter to ppu2spu_data *.
6806 (ppu2spu_sniffer): Use lambda function.
6807
6808 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6809
6810 * record-full.c (record_full_target::insert_breakpoint): Remove
6811 "struct" keyword, add const.
6812
6813 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6814
6815 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6816 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6817 * configure.ac: Remove AC_PREREQ, add missing quoting.
6818 * gnulib/configure.ac: Modernize usage of
6819 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6820 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6821 (AUTOMAKE_VERSION): Bump to 1.15.1.
6822 * configure: Re-generate.
6823 * config.in: Re-generate.
6824 * aclocal.m4: Re-generate.
6825 * gnulib/aclocal.m4: Re-generate.
6826 * gnulib/config.in: Re-generate.
6827 * gnulib/configure: Re-generate.
6828 * gnulib/import/Makefile.in: Re-generate.
6829
6830 2018-06-19 Pedro Alves <palves@redhat.com>
6831
6832 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6833 (lookup_minimal_symbol_by_pc_section): ... here with
6834 gdb_assert_not_reached added.
6835
6836 2018-06-19 Pedro Alves <palves@redhat.com>
6837
6838 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6839 parameter with a block parameter. Compare location's block symbol
6840 with the frame's block instead of addresses.
6841 (skip_inline_frames): Pass the current block instead of the
6842 frame's address. Break out as soon as we determine the frame
6843 should not be skipped.
6844
6845 2018-06-18 Tom Tromey <tom@tromey.com>
6846
6847 * solib-aix.c (solib_aix_get_section_offsets): Return
6848 unique_xmalloc_ptr.
6849 (solib_aix_solib_create_inferior_hook): Update.
6850
6851 2018-06-18 Tom Tromey <tom@tromey.com>
6852
6853 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6854
6855 2018-06-18 Tom Tromey <tom@tromey.com>
6856
6857 * solib-frv.c (frv_relocate_main_executable): Use
6858 unique_xmalloc_ptr.
6859 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6860 unique_xmalloc_ptr.
6861
6862 2018-06-18 Tom Tromey <tom@tromey.com>
6863
6864 * objfiles.h (inhibit_section_map_updates): Update.
6865 (resume_section_map_updates, resume_section_map_updates_cleanup):
6866 Remove.
6867 * solib-svr4.c (svr4_handle_solib_event): Update.
6868 * objfiles.c (inhibit_section_map_updates): Return
6869 scoped_restore_tmpl<int>.
6870 (resume_section_map_updates, resume_section_map_updates_cleanup):
6871 Remove.
6872
6873 2018-06-18 Tom Tromey <tom@tromey.com>
6874
6875 * valprint.h (read_string): Update.
6876 * valprint.c (read_string): Change type of "buffer".
6877 (val_print_string): Update.
6878 * python/py-value.c (valpy_string): Update.
6879 * language.h (struct language_defn) <la_get_string>: Change
6880 type of "buffer".
6881 (default_get_string, c_get_string): Update.
6882 * language.c (default_get_string): Change type of "buffer".
6883 * guile/scm-value.c (gdbscm_value_to_string): Update.
6884 * c-lang.c (c_get_string): Change type of "buffer".
6885
6886 2018-06-18 Tom Tromey <tom@tromey.com>
6887
6888 * ser-mingw.c (struct pipe_state_destroyer): New.
6889 (pipe_state_up): New typedef.
6890 (cleanup_pipe_state): Remove.
6891 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6892
6893 2018-06-18 Tom Tromey <tom@tromey.com>
6894
6895 * rust-lang.h (rust_yyerror): Don't declare.
6896 * rust-lang.c (rust_language_defn): Update.
6897 * rust-exp.y (yyerror): Now static.
6898 * parse.c (parse_exp_in_context_1): Update.
6899 * p-lang.h (p_yyerror): Don't declare.
6900 * p-lang.c (p_language_defn): Update.
6901 * p-exp.y (yyerror): Now static.
6902 * opencl-lang.c (opencl_language_defn): Update.
6903 * objc-lang.c (objc_language_defn): Update.
6904 * m2-lang.h (m2_yyerror): Don't declare.
6905 * m2-lang.c (m2_language_defn): Update.
6906 * m2-exp.y (yyerror): Now static.
6907 * language.h (struct language_defn) <la_error>: Remove.
6908 * language.c (unk_lang_error): Remove.
6909 (unknown_language_defn, auto_language_defn): Remove.
6910 * go-lang.h (go_yyerror): Don't declare.
6911 * go-lang.c (go_language_defn): Update.
6912 * go-exp.y (yyerror): Now static.
6913 * f-lang.h (f_yyerror): Don't declare.
6914 * f-lang.c (f_language_defn): Update.
6915 * f-exp.y (yyerror): Now static.
6916 * d-lang.h (d_yyerror): Don't declare.
6917 * d-lang.c (d_language_defn): Update.
6918 * d-exp.y (yyerror): Now static.
6919 * c-lang.h (c_yyerror): Don't declare.
6920 * c-lang.c (c_language_defn, cplus_language_defn)
6921 (asm_language_defn, minimal_language_defn): Update.
6922 * c-exp.y (yyerror): Now static.
6923 * ada-lang.h (ada_yyerror): Don't declare.
6924 * ada-lang.c (ada_language_defn): Update.
6925 * ada-exp.y (yyerror): Now static.
6926
6927 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6928
6929 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6930 (store_sveregs_to_thread): Likewise.
6931 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6932 (aarch64_linux_store_inferior_registers): Likewise.
6933 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6934 function.
6935 (aarch64_sve_regs_copy_to_regcache): Likewise.
6936 (aarch64_sve_regs_copy_from_regcache): Likewise.
6937 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6938 declaration.
6939 (aarch64_sve_regs_copy_to_regcache): Likewise.
6940 (aarch64_sve_regs_copy_from_regcache): Likewise.
6941 (sve_context): Structure from Linux headers.
6942 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6943 (SVE_SIG_ZREG_SIZE): Likewise.
6944 (SVE_SIG_PREG_SIZE): Likewise.
6945 (SVE_SIG_FFR_SIZE): Likewise.
6946 (SVE_SIG_REGS_OFFSET): Likewise.
6947 (SVE_SIG_ZREGS_OFFSET): Likewise.
6948 (SVE_SIG_ZREG_OFFSET): Likewise.
6949 (SVE_SIG_ZREGS_SIZE): Likewise.
6950 (SVE_SIG_PREGS_OFFSET): Likewise.
6951 (SVE_SIG_PREG_OFFSET): Likewise.
6952 (SVE_SIG_PREGS_SIZE): Likewise.
6953 (SVE_SIG_FFR_OFFSET): Likewise.
6954 (SVE_SIG_REGS_SIZE): Likewise.
6955 (SVE_SIG_CONTEXT_SIZE): Likewise.
6956 (SVE_PT_REGS_MASK): Likewise.
6957 (SVE_PT_REGS_FPSIMD): Likewise.
6958 (SVE_PT_REGS_SVE): Likewise.
6959 (SVE_PT_VL_INHERIT): Likewise.
6960 (SVE_PT_VL_ONEXEC): Likewise.
6961 (SVE_PT_REGS_OFFSET): Likewise.
6962 (SVE_PT_FPSIMD_OFFSET): Likewise.
6963 (SVE_PT_FPSIMD_SIZE): Likewise.
6964 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6965 (SVE_PT_SVE_PREG_SIZE): Likewise.
6966 (SVE_PT_SVE_FFR_SIZE): Likewise.
6967 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6968 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6969 (__SVE_SIG_TO_PT): Likewise.
6970 (SVE_PT_SVE_OFFSET): Likewise.
6971 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6972 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6973 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6974 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6975 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6976 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6977 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6978 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6979 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6980 (SVE_PT_SVE_SIZE): Likewise.
6981 (SVE_PT_SIZE): Likewise.
6982 (HAS_SVE_STATE): New define.
6983
6984 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6985
6986 * nat/aarch64-sve-linux-sigcontext.h: New file.
6987 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6988 new files.
6989 (SVE_VQ_MIN): Likewise.
6990 (SVE_VQ_MAX): Likewise.
6991 (SVE_VL_MIN): Likewise.
6992 (SVE_VL_MAX): Likewise.
6993 (SVE_NUM_ZREGS): Likewise.
6994 (SVE_NUM_PREGS): Likewise.
6995 (sve_vl_valid): Likewise.
6996 (struct user_sve_header): Likewise.
6997
6998 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6999 Richard Bunt <Richard.Bunt@arm.com>
7000
7001 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7002 was requested by GDB.
7003
7004 2018-06-15 Tom de Vries <tdevries@suse.de>
7005
7006 * MAINTAINERS (Write After Approval): Add Tom de Vries.
7007
7008 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
7009
7010 * gnulib/update-gnulib.sh: Print expected versions of
7011 autoconf/aclocal.
7012
7013 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
7014
7015 * arch-utils.c (default_type_align): Use type_length_units.
7016 * gdbtypes.c (type_align): Use type_length_units.
7017
7018 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7019
7020 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7021 of 'define' command.
7022
7023 2018-06-14 Tom de Vries <tdevries@suse.de>
7024
7025 PR cli/22573
7026 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7027 get_no_prettyformat_print_options.
7028
7029 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
7030
7031 * sparc-nat.h: Include target.h.
7032 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7033 <fetch_registers>: Remove this argument in function call.
7034 <store_registers>: Remove this argument in function call, remove
7035 extra semicolon.
7036 <low_forget_process>: Call sparc64_forget_process instead of
7037 sparc_forget_process.
7038
7039 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7040
7041 * procfs.c (_initialize_procfs): Use add_inf_child_target.
7042 (procfs_target::make_corefile_notes): Adjust to new
7043 target_read_alloc return type.
7044
7045 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7046 Stephen Roberts <stephen.roberts@arm.com>
7047
7048 PR gdb/22882
7049 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7050 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7051 Move should_notify_stop local into more inner scope.
7052
7053 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7054 Stephen Roberts <stephen.roberts@arm.com>
7055
7056 PR gdb/22882
7057 * infrun.c (resume_1): Add call to mark_async_event_handler.
7058
7059 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7060
7061 * infrun.c (do_target_wait): Change old version of $pc printed.
7062
7063 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
7064
7065 * dwarf2read.c (read_index_from_section): Rename to...
7066 (read_gdb_index_from_section): ... this, update all callers.
7067 (dwarf2_read_index): Rename to...
7068 (dwarf2_read_gdb_index): ... this, update all callers.
7069
7070 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
7071
7072 * gdb/hppa-linux-nat.c
7073 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7074 hppa_linux_nat_target::fetch_registers.
7075
7076 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7077
7078 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7079 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7080 (AARCH64_DWARF_SVE_FFR): Likewise.
7081 (AARCH64_DWARF_SVE_P0): Likewise.
7082 (AARCH64_DWARF_SVE_Z0): Likewise.
7083
7084 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7085
7086 * common/common-regcache.h (raw_compare): New function.
7087 * regcache.c (regcache::raw_compare): Likewise.
7088 * regcache.h (regcache::raw_compare): New declaration.
7089
7090 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7091
7092 * common/common-regcache.h (reg_buffer_common): New structure.
7093 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7094 (reg_buffer::raw_supply): Likewise.
7095 (reg_buffer::raw_supply_integer): Likewise.
7096 (reg_buffer::raw_supply_zeroed): Likewise.
7097 (reg_buffer::raw_collect): Likewise.
7098 (reg_buffer::raw_collect_integer): Likewise.
7099 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7100 (reg_buffer::raw_supply): Likewise.
7101 (reg_buffer::raw_supply_integer): Likewise.
7102 (reg_buffer::raw_supply_zeroed): Likewise.
7103 (reg_buffer::raw_collect): Likewise.
7104 (reg_buffer::raw_collect_integer): Likewise.
7105
7106 2018-06-10 Tom Tromey <tom@tromey.com>
7107
7108 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
7109 (class remote_state) <stop_reply_queue>: Now std::vector.
7110 (remote_state::~remote_state)
7111 (remote_target::stop_reply_queue_length): Update.
7112 (struct queue_iter_param, remove_child_of_pending_fork)
7113 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7114 (check_pending_event_prevents_wildcard_vcont_callback)
7115 (remove_stop_reply_for_inferior)
7116 (remove_stop_reply_of_remote_state)
7117 (remote_notif_remove_once_on_match)
7118 (stop_reply_match_ptid_and_ws)
7119 (remote_kill_child_of_pending_fork): Remove.
7120 (remote_target::remove_new_fork_children)
7121 (remote_target::check_pending_events_prevent_wildcard_vcont)
7122 (remote_target::discard_pending_stop_replies)
7123 (remote_target::discard_pending_stop_replies_in_queue)
7124 (remote_target::remote_notif_remove_queued_reply)
7125 (remote_target::queued_stop_reply)
7126 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7127 (remote_target::wait, remote_target::kill_new_fork_children)
7128 (remote_target::async): Update.
7129
7130 2018-06-10 Tom Tromey <tom@tromey.com>
7131
7132 * record-full.c (record_full_arch_list_cleanups): Remove.
7133 (record_full_message): Use try/catch.
7134 (record_full_wait_cleanups): Remove.
7135 (record_full_wait_1): Use try/catch.
7136 (record_full_restore): Likewise.
7137
7138 2018-06-10 Tom Tromey <tom@tromey.com>
7139
7140 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
7141 declare VEC. Add constructor.
7142 <in_target_beneath>: Now bool.
7143 (record_full_breakpoints): Now a std::vector, static.
7144 (record_full_sync_record_breakpoints)
7145 (record_full_init_record_breakpoints)
7146 (record_full_target::insert_breakpoint)
7147 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
7148
7149 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7150
7151 * dwarf2read.c (process_cu_includes): Remove struct keyword.
7152 * serial.c (serial_interface_lookup): Remove struct keyword.
7153
7154 2018-06-10 Tom Tromey <tom@tromey.com>
7155
7156 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7157 method.
7158 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7159 a method.
7160 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7161 method.
7162 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7163 "beneath" as a method.
7164 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7165 Use "beneath" as a method.
7166
7167 2018-06-10 Tom Tromey <tom@tromey.com>
7168
7169 * tracefile.c (struct trace_file_writer_deleter): New.
7170 <operator()>: Rename from trace_file_writer_xfree.
7171 (trace_file_writer_up): New typedef.
7172 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7173
7174 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7175
7176 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7177 <m_registers, m_register_status>: Change type to
7178 std::unique_ptr.
7179 * regcache.c (reg_buffer::reg_buffer): Use new instead of
7180 XCNEWVEC.
7181
7182 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7183
7184 * common/common-regcache.h (enum register_status): Add
7185 underlying type "signed char".
7186 * regcache.h (reg_buffer) <m_register_status>: Change type to
7187 register_status *.
7188 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7189 register_status instead of signed char.
7190 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7191 (reg_buffer::get_register_status): Remove cast.
7192 (readable_regcache::raw_read): Remove cast.
7193 (readable_regcache::cooked_read): Remove cast.
7194
7195 2018-06-09 Tom Tromey <tom@tromey.com>
7196
7197 * source.c (reverse_search_command, forward_search_command): Use
7198 scoped_fd.
7199
7200 2018-06-09 Tom Tromey <tom@tromey.com>
7201
7202 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
7203 (serial_ops_list): Now static, std::vector.
7204 (serial_interface_lookup, serial_add_interface): Update.
7205
7206 2018-06-09 Tom Tromey <tom@tromey.com>
7207
7208 * dwarf2read.c (process_cu_includes): Update.
7209 (process_full_comp_unit): Update.
7210 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7211 std::vector.
7212
7213 2018-06-08 Paul Koning <paul_koning@dell.com>
7214
7215 PR gdb/23252
7216
7217 * python/python.c (do_start_initialization):
7218 Avoid call to internal Python API.
7219 (init__gdb_module): New function.
7220
7221 2018-06-08 Gary Benson <gbenson@redhat.com>
7222
7223 * linux-thread-db.c (valprint.h): New include.
7224 (struct check_thread_db_info): New structure.
7225 (check_thread_db_on_load, tdb_testinfo): New static globals.
7226 (check_thread_db, check_thread_db_callback): New functions.
7227 (try_thread_db_load_1): Run integrity checks if requested.
7228 (maintenance_check_libthread_db): New function.
7229 (_initialize_thread_db): Register "maint check libthread-db"
7230 and "maint set/show check-libthread-db".
7231 * NEWS: Mention the above new commands.
7232
7233 2018-06-08 Tom Tromey <tom@tromey.com>
7234
7235 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7236 now a method.
7237
7238 2018-06-08 Tom Tromey <tom@tromey.com>
7239
7240 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7241
7242 2018-06-08 Tom Tromey <tom@tromey.com>
7243
7244 * common/btrace-common.h (struct btrace_data): Add constructor,
7245 destructor, move assignment operator.
7246 <empty, clear, fini>: New methods.
7247 <format>: Initialize.
7248 (btrace_data_init, btrace_data_fini, btrace_data_clear)
7249 (btrace_data_empty): Don't declare.
7250 * common/btrace-common.c (btrace_data_init): Remove.
7251 (btrace_data::fini): Rename from btrace_data_fini.
7252 (btrace_data::empty): Rename from btrace_data_empty.
7253 (btrace_data::clear): Rename from btrace_data_clear. Return
7254 bool.
7255 * btrace.h (make_cleanup_btrace_data): Don't declare.
7256 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7257 (parse_xml_btrace): Update.
7258 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7259 (maint_btrace_clear_packet_history_cmd): Update.
7260
7261 2018-06-07 Pedro Alves <palves@redhat.com>
7262
7263 * target.h (target_ops) <beneath>: Now a method. All references
7264 updated.
7265 (class target_stack): New.
7266 * target.c (g_target_stack): New.
7267 (g_current_top_target): Delete.
7268 (current_top_target): Get the top target out of g_target_stack.
7269 (target_stack::push, target_stack::unpush): New.
7270 (push_target, unpush_target): Reimplement.
7271 (target_is_pushed): Reimplement in terms of g_target_stack.
7272 (target_ops::beneath, target_stack::find_beneath): New.
7273
7274 2018-06-07 Pedro Alves <palves@redhat.com>
7275
7276 * target.h (find_target_beneath): Delete declaration.
7277 * target.c (find_target_beneath): Delete definition.
7278 * aix-thread.c: All callers of find_target_beneath adjusted to
7279 call target_ops::beneath instead.
7280 * bsd-uthread.c: Likewise.
7281 * linux-thread-db.c: Likewise.
7282 * ravenscar-thread.c: Likewise.
7283 * sol-thread.c: Likewise.
7284 * spu-multiarch.c: Likewise.
7285
7286 2018-06-07 Pedro Alves <palves@redhat.com>
7287
7288 * target.h (target_ops) <beneath>: Now a method. All references
7289 updated.
7290 (target_ops) <m_beneath>: New.
7291 * target.c (target_ops::beneath): New.
7292 * corelow.c: Adjust all references to target_ops::beneath.
7293 * linux-thread-db.c: Likewise.
7294 * make-target-delegates: Likewise.
7295 * record-btrace.c: Likewise.
7296 * record-full.c: Likewise.
7297 * remote.c: Likewise.
7298 * target.c: Likewise.
7299 * target-delegates.c: Regenerate.
7300
7301 2018-06-07 Pedro Alves <palves@redhat.com>
7302
7303 * target.h (target_stack): Delete.
7304 (current_top_target): Declare function.
7305 * target.c (target_stack): Delete.
7306 (g_current_top_target): New.
7307 (current_top_target): New function.
7308 * auxv.c: Use current_top_target instead of target_stack
7309 throughout.
7310 * avr-tdep.c: Likewise.
7311 * breakpoint.c: Likewise.
7312 * corefile.c: Likewise.
7313 * elfread.c: Likewise.
7314 * eval.c: Likewise.
7315 * exceptions.c: Likewise.
7316 * frame.c: Likewise.
7317 * gdbarch-selftests.c: Likewise.
7318 * gnu-v3-abi.c: Likewise.
7319 * ia64-tdep.c: Likewise.
7320 * ia64-vms-tdep.c: Likewise.
7321 * infcall.c: Likewise.
7322 * infcmd.c: Likewise.
7323 * infrun.c: Likewise.
7324 * linespec.c: Likewise.
7325 * linux-tdep.c: Likewise.
7326 * minsyms.c: Likewise.
7327 * ppc-linux-nat.c: Likewise.
7328 * ppc-linux-tdep.c: Likewise.
7329 * procfs.c: Likewise.
7330 * regcache.c: Likewise.
7331 * remote.c: Likewise.
7332 * rs6000-tdep.c: Likewise.
7333 * s390-linux-nat.c: Likewise.
7334 * s390-tdep.c: Likewise.
7335 * solib-aix.c: Likewise.
7336 * solib-darwin.c: Likewise.
7337 * solib-dsbt.c: Likewise.
7338 * solib-spu.c: Likewise.
7339 * solib-svr4.c: Likewise.
7340 * solib-target.c: Likewise.
7341 * sparc-tdep.c: Likewise.
7342 * sparc64-tdep.c: Likewise.
7343 * spu-tdep.c: Likewise.
7344 * symfile.c: Likewise.
7345 * symtab.c: Likewise.
7346 * target-descriptions.c: Likewise.
7347 * target-memory.c: Likewise.
7348 * target.c: Likewise.
7349 * target.h: Likewise.
7350 * tracefile-tfile.c: Likewise.
7351 * tracepoint.c: Likewise.
7352 * valops.c: Likewise.
7353 * valprint.c: Likewise.
7354 * value.c: Likewise.
7355 * windows-tdep.c: Likewise.
7356 * mi/mi-main.c: Likewise.
7357
7358 2018-06-07 Tom Tromey <tom@tromey.com>
7359
7360 * valprint.h (build_address_symbolic): Declare.
7361 * printcmd.c (print_address_symbolic): Update.
7362 (build_address_symbolic): Change "name" and "filename" to
7363 std::string.
7364 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7365 Update.
7366 * defs.h (build_address_symbolic): Remove declaration.
7367
7368 2018-06-07 Alan Hayward <alan.hayward@arm.com>
7369
7370 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7371 (aarch64_vnv_type): Add function.
7372 (aarch64_pseudo_register_name): Add V regs for SVE.
7373 (aarch64_pseudo_register_type): Likewise.
7374 (aarch64_pseudo_register_reggroup_p): Likewise.
7375 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7376 (aarch64_pseudo_read_value): Add V regs for SVE.
7377 (aarch64_pseudo_write_2): Use V0 offset for SVE
7378 (aarch64_pseudo_write): Add V regs for SVE.
7379 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7380
7381 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
7382
7383 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7384 (sve_vl_from_vq): Likewise.
7385
7386 2018-06-05 Tom Tromey <tom@tromey.com>
7387
7388 * cli/cli-cmds.c (show_version): Update.
7389 * top.c (print_gdb_version): Add "interactive" parameter.
7390 Update.
7391 * main.c (captured_main_1): Update.
7392 * top.h (print_gdb_version): Add "interactive" parameter and a
7393 comment.
7394
7395 2018-06-05 David Malcolm <dmalcolm@redhat.com>
7396
7397 * common/enum-flags.h: Add trailing semicolon to example in
7398 comment.
7399
7400 2018-06-05 Tom Tromey <tom@tromey.com>
7401
7402 PR cli/12326:
7403 * NEWS: Add entry about pager.
7404 * utils.c (pagination_disabled_for_command): New global.
7405 (prompt_for_continue): Allow "c" response to prompt.
7406 (reinitialize_more_filter): Clear
7407 pagination_disabled_for_command.
7408 (fputs_maybe_filtered): Check pagination_disabled_for_command.
7409
7410 2018-06-04 Tom Tromey <tom@tromey.com>
7411
7412 * ada-lang.h (ada_lookup_symbol_list): Update.
7413 * ada-lang.c (resolve_subexp): Update.
7414 (symbols_are_identical_enums): Change type of syms. Remove nsyms
7415 parameter.
7416 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7417 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7418 results parameter to std::vector.
7419 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7420 Update.
7421 * ada-exp.y (block_lookup): Update.
7422 (select_possible_type_sym): Change type of syms. Remove nsyms
7423 parameter.
7424 (write_var_or_type, write_name_assoc): Update.
7425
7426 2018-06-04 Joel Brobecker <brobecker@adacore.com>
7427
7428 * windows-nat.c (windows_nat_target::xfer_partial): Return
7429 TARGET_XFER_E_IO if we need to delegate to the target beneath
7430 but BENEATH is NULL.
7431
7432 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
7433
7434 * Makefile.in (config.status): Add configure.nat as a
7435 dependency.
7436
7437 2018-06-04 Tom Tromey <tom@tromey.com>
7438
7439 * cp-name-parser.y (cpname_state): Add method declarations.
7440 (HANDLE_QUAL): Update.
7441 (cpname_state::d_grab, cpname_state::fill_comp)
7442 (cpname_state::make_operator, cpname_state::make_dtor)
7443 (cpname_state::make_builtin_type, cpname_state::make_name)
7444 (cpname_state::d_qualify, cpname_state::d_int_type)
7445 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7446 (%union): Move earlier.
7447
7448 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7449
7450 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7451
7452 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7453
7454 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7455 (aarch64_pseudo_write_1): Likewise.
7456 (aarch64_pseudo_read_value): Use helper.
7457 (aarch64_pseudo_write): Likewise.
7458
7459 2018-06-04 Pedro Alves <palves@redhat.com>
7460
7461 * darwin-nat.c (darwin_ops): Delete.
7462 (darwin_attach_pid): Use get_native_target.
7463
7464 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7465
7466 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7467 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7468
7469 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7470
7471 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7472 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7473 (aarch64_gdbarch_init): Check for SVE.
7474 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7475
7476 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7477
7478 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7479 * aarch64-tdep.h (aarch64_read_description): Likewise.
7480 * arch/aarch64.c (aarch64_create_target_description): Likewise.
7481 * arch/aarch64.h (aarch64_create_target_description): Likewise.
7482 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7483 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7484 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7485
7486 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
7487
7488 * value.c (value_fetch_lazy_bitfield): New.
7489 (value_fetch_lazy_memory): New.
7490 (value_fetch_lazy_register): New.
7491 (value_fetch_lazy): Factor out to smaller functions.
7492
7493 2018-06-01 Tom Tromey <tom@tromey.com>
7494
7495 * cp-name-parser.y (backslashable, represented): Now const.
7496
7497 2018-06-01 Tom Tromey <tom@tromey.com>
7498
7499 * cp-name-parser.y: Include parser-defs.h.
7500 (parser_fprintf): Remove declaration.
7501
7502 2018-06-01 Tom Tromey <tom@tromey.com>
7503
7504 * cp-name-parser.y: Use %pure-parser, %lex-param, and
7505 %parse-param.
7506 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7507 (global_result): Remove globals.
7508 (struct cpname_state): New.
7509 (yyparse): Don't declare.
7510 (yylex, yyerror): Move declarations after %union.
7511 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7512 (make_name): Add state parameter.
7513 Update all callers.
7514 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7515 parameter.
7516 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7517 Update.
7518 (yylex): Add lvalp, state parameters.
7519 (yyerror): Add state parameter.
7520 (cp_demangled_name_to_comp): Update.
7521
7522 2018-06-01 Tom Tromey <tom@tromey.com>
7523
7524 * cp-name-parser.y (parser_fprintf): Declare.
7525 (GDB_YY_REMAP_PREFIX): Define.
7526 Include yy-remap.h. Don't redefine yy* identifiers.
7527
7528 2018-06-01 Tom Tromey <tom@tromey.com>
7529
7530 * python/py-type.c (typy_legacy_template_argument): Update.
7531 * cp-support.h (cp_demangled_name_to_comp): Update.
7532 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7533 parameter to be a "std::string *".
7534 (main): Update.
7535
7536 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
7537
7538 * ada-lex.l: Include "diagnostics.h" instead of
7539 "common/diagnostics.h".
7540 * unittests/environ-selftests.c: Likewise.
7541 * common/diagnostics.h: Moved to ../include.
7542
7543 2018-06-01 Joel Brobecker <brobecker@adacore.com>
7544
7545 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7546 to language_mode_manual while calling breakpoint_re_set_one.
7547
7548 2018-06-01 Tom Tromey <tom@tromey.com>
7549
7550 * valops.c (value_cast_structs, destructor_name_p): Update.
7551 * symtab.c (gdb_mangle_name): Update.
7552 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7553 Update.
7554 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7555 (pascal_object_print_value_fields, pascal_object_print_value):
7556 Update.
7557 * p-typeprint.c (pascal_type_print_derivation_info): Update.
7558 * linespec.c (find_methods): Update.
7559 * gdbtypes.h (type_name_no_tag): Remove.
7560 (type_name_or_error): Rename from type_name_no_tag_or_error.
7561 * gdbtypes.c (type_name_no_tag): Remove.
7562 (type_name_or_error): Rename from type_name_no_tag_or_error.
7563 (lookup_struct_elt_type, check_typedef): Update.
7564 * expprint.c (print_subexp_standard): Update.
7565 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7566 * d-namespace.c (d_lookup_nested_symbol): Update.
7567 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7568 (cp_print_class_member): Update.
7569 * cp-namespace.c (cp_lookup_nested_symbol): Update.
7570 * completer.c (add_struct_fields): Update.
7571 * c-typeprint.c (cp_type_print_derivation_info)
7572 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7573 Update.
7574 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7575 (ada_prefer_type, ada_is_exception_sym): Update.
7576
7577 2018-06-01 Tom Tromey <tom@tromey.com>
7578
7579 * valops.c (enum_constant_from_type, value_namespace_elt)
7580 (value_maybe_namespace_elt): Update.
7581 * valarith.c (find_size_for_pointer_math): Update.
7582 * target-descriptions.c (make_gdb_type): Update.
7583 * symmisc.c (print_symbol): Update.
7584 * stabsread.c (define_symbol, read_type)
7585 (complain_about_struct_wipeout, add_undefined_type)
7586 (cleanup_undefined_types_1): Update.
7587 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7588 (rust_range_type_p, val_print_struct, rust_print_struct_def)
7589 (rust_internal_print_type, rust_composite_type)
7590 (rust_evaluate_funcall, rust_evaluate_subexp)
7591 (rust_inclusive_range_type_p): Update.
7592 * python/py-type.c (typy_get_tag): Update.
7593 * p-typeprint.c (pascal_type_print_base): Update.
7594 * mdebugread.c (parse_symbol, parse_type): Update.
7595 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7596 Update.
7597 * guile/scm-type.c (gdbscm_type_tag): Update.
7598 * go-lang.c (sixg_string_p): Update.
7599 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7600 Update.
7601 * gdbtypes.h (struct main_type) <tag_name>: Remove.
7602 (TYPE_TAG_NAME): Remove.
7603 * gdbtypes.c (type_name_no_tag): Simplify.
7604 (check_typedef, check_types_equal, recursive_dump_type)
7605 (copy_type_recursive, arch_composite_type): Update.
7606 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
7607 in summary mode when needed.
7608 * eval.c (evaluate_funcall): Update.
7609 * dwarf2read.c (fixup_go_packaging, read_structure_type)
7610 (process_structure_scope, read_enumeration_type)
7611 (read_namespace_type, read_module_type, determine_prefix): Update.
7612 * cp-support.c (inspect_type): Update.
7613 * coffread.c (process_coff_symbol, decode_base_type): Update.
7614 * c-varobj.c (c_is_path_expr_parent): Update.
7615 * c-typeprint.c (c_type_print_base_struct_union): Update.
7616 (c_type_print_base_1): Update. Print struct/class/union/enum in
7617 summary when using C language.
7618 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7619 (gen_maybe_namespace_elt): Update.
7620 * ada-lang.c (ada_type_name): Simplify.
7621 (empty_record, ada_template_to_fixed_record_type_1)
7622 (template_to_static_fixed_type)
7623 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7624
7625 2018-06-01 Tom Tromey <tom@tromey.com>
7626
7627 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7628 c_print_type.
7629 * c-typeprint.c (c_print_type_1): Add "language" parameter.
7630 (c_print_type): Update.
7631 (c_print_type): New overload.
7632 (c_type_print_varspec_prefix, c_type_print_args)
7633 (c_type_print_varspec_suffix, c_print_type_no_offsets)
7634 (c_type_print_base_struct_union, c_type_print_base_1)
7635 (cp_type_print_method_args): Add "language" parameter.
7636 (c_type_print_base): Update.
7637 * c-lang.h (c_print_type): Add new overload.
7638
7639 2018-06-01 Tom Tromey <tom@tromey.com>
7640
7641 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7642 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7643
7644 2018-06-01 Alan Hayward <alan.hayward@arm.com>
7645
7646 * aarch64-tdep.c (aarch64_sve_register_names): New const
7647 var.
7648 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7649 (AARCH64_SVE_Z_REGS_NUM): New define.
7650 (AARCH64_SVE_P_REGS_NUM): Likewise.
7651 (AARCH64_SVE_NUM_REGS): Likewise.
7652
7653 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7654
7655 * nat/linux-ptrace.h [__alpha__]
7656 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7657 definitions.
7658
7659 2018-05-31 Maciej W. Rozycki <macro@mips.com>
7660
7661 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7662 the endianness selected.
7663 * NEWS: Document `set endian auto' mode operation update.
7664
7665 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7666
7667 * Makefile.in: Add new header.
7668 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7669 (sve_vl_from_vg): Likewise.
7670 (sve_vq_from_vl): Likewise.
7671 (sve_vl_from_vq): Likewise.
7672 (sve_vq_from_vg): Likewise.
7673 (sve_vg_from_vq): Likewise.
7674 * configure.nat: Add new c file.
7675 * nat/aarch64-sve-linux-ptrace.c: New file.
7676 * nat/aarch64-sve-linux-ptrace.h: New file.
7677
7678 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7679
7680 * aarch64-linux-nat.c (aarch64_linux_read_description):
7681 Add parmeter zero.
7682 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7683 Likewise.
7684 * aarch64-tdep.c (tdesc_aarch64_list): Add.
7685 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7686 (aarch64_gdbarch_init): Add parmeter zero.
7687 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7688 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7689 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7690 parmeter.
7691 * doc/gdb.texinfo: Describe SVE feature
7692 * features/aarch64-sve.c: New file.
7693
7694 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
7695
7696 PR gdb/23210
7697 * gdbarch.sh (significant_addr_bit): Default to zero when
7698 not set by target architecture.
7699 * gdbarch.c: Re-generated.
7700 * utils.c (address_significant): Update.
7701
7702 2018-05-30 Joel Brobecker <brobecker@adacore.com>
7703
7704 * stack.c (func_command): Remove trailing newline in call to error.
7705
7706 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7707
7708 * regcache.h (regcache_raw_collect): Remove, update callers to
7709 use regcache::raw_collect.
7710 * regcache.c (regcache_raw_collect): Remove.
7711
7712 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7713
7714 * regcache.h (regcache_raw_supply): Remove, update callers to
7715 use detached_regcache::raw_supply.
7716 * regcache.c (regcache_raw_supply): Remove.
7717
7718 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7719
7720 * regcache.h (regcache_cooked_write_part): Remove, update
7721 callers to use regcache::cooked_write_part.
7722 * regcache.c (regcache_cooked_write_part): Remove.
7723
7724 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7725
7726 * regcache.h (regcache_cooked_read_part): Remove, update callers
7727 to use readable_regcache::cooked_read_part.
7728 * regcache.c (regcache_cooked_read_part): Remove.
7729
7730 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7731
7732 * regcache.h (regcache_cooked_read_value): Remove, update
7733 callers to use readable_regcache::cooked_read_value.
7734 * regcache.c (regcache_cooked_read_value): Remove.
7735
7736 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7737
7738 * regcache.h (regcache_cooked_write): Remove, update callers to
7739 use regcache::cooked_write.
7740 * regcache.c (regcache_cooked_write): Remove.
7741
7742 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7743
7744 * regcache.h (regcache_invalidate): Remove, update callers to
7745 use detached_regcache::invalidate instead.
7746 * regcache.c (regcache_invalidate): Remove.
7747
7748 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7749
7750 * regcache.h (regcache_raw_write_part): Remove, update callers
7751 to use regcache::raw_write_part instead.
7752 * regcache.c (regcache_raw_write_part): Remove.
7753
7754 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7755
7756 * regcache.h (regcache_raw_read_part): Remove, update callers to
7757 use readable_regcache::raw_read_part instead.
7758 * regcache.c (regcache_raw_read_part): Remove.
7759
7760 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7761
7762 * regcache.h (regcache_cooked_read): Remove, update callers to
7763 use readable_regcache::cooked_read instead.
7764 * regcache.c (regcache_cooked_read): Remove.
7765
7766 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7767
7768 * regcache.h (regcache_raw_write): Remove, update callers to use
7769 regcache::raw_write instead.
7770 * regcache.c (regcache_raw_write): Remove.
7771
7772 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7773
7774 * regcache.h (regcache_raw_read): Remove, update callers to use
7775 readable_regcache::raw_read instead.
7776 * regcache.c (regcache_raw_read): Remove.
7777
7778 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7779
7780 * regcache.h (regcache_raw_update): Remove, update callers to
7781 use readable_regcache::raw_update instead.
7782 * regcache.c (regcache_raw_update): Remove.
7783
7784 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7785
7786 * regcache.h (regcache_register_status): Remove, update callers
7787 to use reg_buffer::get_register_status directly instead.
7788 * regcache.c (regcache_register_status): Remove.
7789
7790 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7791
7792 * regcache.h (regcache_get_ptid): Remove, update all callers to
7793 call regcache::ptid instead.
7794 * regcache.c (regcache_get_ptid): Remove.
7795
7796 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7797
7798 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7799
7800 2018-05-30 Pedro Alves <palves@redhat.com>
7801
7802 * common/common-exceptions.h (exception_rethrow): Use
7803 ATTRIBUTE_NORETURN.
7804
7805 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7806
7807 * breakpoint.c (print_solib_event, check_status_catch_solib):
7808 Remove struct keyword in range-based for loops.
7809 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7810 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7811 Likewise.
7812 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7813 Likewise.
7814 * symfile.c (addr_info_make_relative): Likewise.
7815 * thread.c (value_in_thread_stack_temporaries): Likewise.
7816
7817 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7818
7819 PR gdb/16841
7820 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7821 aggregate type to get its real type before accessing it.
7822
7823 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7824
7825 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7826 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7827 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7828 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7829 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7830 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7831 * printcmd.c (info_address_command): Likewise.
7832
7833 2018-05-29 Tom Tromey <tom@tromey.com>
7834
7835 * windows-nat.c (handle_exception): Update fall-through comment.
7836
7837 2018-05-29 Tom Tromey <tom@tromey.com>
7838
7839 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7840 (struct program_space) <added_solibs>: Now a std::vector.
7841 * breakpoint.c (print_solib_event): Update.
7842 (check_status_catch_solib): Update.
7843 * progspace.c (clear_program_space_solib_cache): Update.
7844 * solib.c (update_solib_list): Update.
7845
7846 2018-05-29 Tom Tromey <tom@tromey.com>
7847
7848 * python/py-type.c (typy_richcompare): Update.
7849 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7850 * gdbtypes.h (types_deeply_equal): Return bool.
7851 (types_equal): Likewise.
7852 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7853 declare VEC.
7854 (check_types_equal): Change worklist to std::vector. Return
7855 bool.
7856 (struct type_equality_entry): Add constructor.
7857 (compare_maybe_null_strings): Return bool.
7858 (check_types_worklist): Return bool. Change worklist to
7859 std::vector.
7860 (types_deeply_equal): Use std::vector.
7861 (types_equal): Return bool.
7862 (compare_maybe_null_strings): Simplify.
7863
7864 2018-05-29 Tom Tromey <tom@tromey.com>
7865
7866 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7867
7868 2018-05-29 Tom Tromey <tom@tromey.com>
7869
7870 * objc-lang.h: Don't include cp-support.h.
7871 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7872 declare VEC.
7873
7874 2018-05-27 Tom Tromey <tom@tromey.com>
7875
7876 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7877
7878 2018-05-25 Tom Tromey <tom@tromey.com>
7879
7880 * value.c (value::location): Initialize.
7881
7882 2018-05-25 Tom Tromey <tom@tromey.com>
7883
7884 * dbxread.c (init_bincl_list): Remove.
7885 (bincl_list): Now a std::vector.
7886 (bincls_allocated, next_bincl): Remove.
7887 (free_bincl_list, do_free_bincl_list_cleanup)
7888 (make_cleanup_free_bincl_list): Remove.
7889 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7890 unique_xmalloc_ptr.
7891 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7892 (struct header_file_location): Add constructor.
7893 (add_bincl_to_list): Remove.
7894
7895 2018-05-25 Tom Tromey <tom@tromey.com>
7896
7897 * tui/tui.c (tui_enable): Update.
7898 * mi/mi-interp.c (mi_interp::init): Update.
7899 * interps.h (class interp) <name>: New method.
7900 <m_name>: Rename from name.
7901 (~scoped_restore_interp): Update.
7902 * interps.c (interp::interp): Update.
7903 (interp_add, interp_set, interp_lookup_existing)
7904 (current_interp_named_p): Update.
7905
7906 2018-05-25 Tom Tromey <tom@tromey.com>
7907
7908 * interps.c (interp_name): Remove.
7909 * mi/mi-interp.c (mi_interp::init): Update.
7910 * interps.h (interp_name): Remove.
7911 (~scoped_restore_interp): Update.
7912 * tui/tui.c (tui_enable): Update.
7913
7914 2018-05-25 Tom Tromey <tom@tromey.com>
7915
7916 * utils.c (fputs_maybe_filtered): Update.
7917 * linespec.c (decode_line_full): Update.
7918 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7919 (mi_print_breakpoint_for_event, mi_solib_loaded)
7920 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7921 (mi_user_selected_context_changed): Update.
7922 * mi/mi-main.c (mi_execute_command): Update.
7923 * cli/cli-script.c (execute_control_command): Update.
7924 * python/python.c (execute_gdb_command): Update.
7925 * solib.c (info_sharedlibrary_command): Update.
7926 * interps.c (interp_ui_out): Remove.
7927 * interps.h (interp_ui_out): Remove.
7928
7929 2018-05-25 Tom Tromey <tom@tromey.com>
7930
7931 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7932 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7933 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7934
7935 2018-05-25 Tom Tromey <tom@tromey.com>
7936
7937 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7938 * interps.c (interp_exec): Use scoped_restore.
7939
7940 2018-05-25 Tom Tromey <tom@tromey.com>
7941
7942 * remote.c (remote_target::remote_file_get): Use
7943 gdb::byte_vector.
7944 (remote_target::remote_file_put): Likewise.
7945
7946 2018-05-25 Tom Tromey <tom@tromey.com>
7947
7948 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7949 a std::string.
7950 (get_pe_section_index, add_pe_exported_sym): Update.
7951 (read_pe_exported_syms): Use gdb::def_vector.
7952
7953 2018-05-25 Tom Tromey <tom@tromey.com>
7954
7955 * frame.c (remove_prev_frame): Remove.
7956 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7957
7958 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7959
7960 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7961 Remove prototypes.
7962 * mips-linux-nat.c (supply_fpregset): Always call
7963 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7964 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7965 `mips_fill_fpregset'.
7966 * mips-linux-tdep.c (mips_supply_fpregset)
7967 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7968 (mips_fill_fpregset_wrapper): Remove functions.
7969 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7970 (mips_linux_fpregset): Remove variable.
7971 (mips_linux_iterate_over_regset_sections): Use
7972 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7973 (mips_linux_o32_sigframe_init): Remove comment.
7974
7975 2018-05-25 Pedro Alves <palves@redhat.com>
7976
7977 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7978 (struct readahead_cache, struct packet_reg, struct
7979 remote_arch_state, class remote_state): Move higher up in the
7980 file.
7981 (remote_target::m_remote_state): Now an object instead of a pointer.
7982 (remote_target::get_remote_state): Adjust.
7983
7984 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7985
7986 * stack.c (select_and_print_frame): Delete.
7987 (struct function_bounds): Move struct within function.
7988 (func_command): Most content moved into new function
7989 find_frame_for_function, use new function, print result, add
7990 function comment.
7991 (find_frame_for_function): New function, now returns a result.
7992
7993 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7994
7995 * stack.c (iterate_over_block_arg_vars): Fix comment.
7996 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7997
7998 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7999
8000 PR gdb/23203
8001 * frame.c
8002 (scoped_restore_selected_frame::scoped_restore_selected_frame):
8003 Define.
8004 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8005 Define.
8006 * frame.h (class scoped_restore_selected_frame): New class.
8007 * stack.c (print_frame_local_vars): Remove catching and rethrowing
8008 of any exception, use scoped_restore_selected_frame to restore the
8009 frame instead.
8010
8011 2018-05-24 Pedro Alves <palves@redhat.com>
8012
8013 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8014 override.
8015
8016 2018-05-23 Tom Tromey <tom@tromey.com>
8017
8018 * complaints.c (struct complaints): Remove.
8019 (symfile_complaint_book): Remove.
8020 (series): New global.
8021 (complaint_internal): Update.
8022 (clear_complaints): Update.
8023
8024 2018-05-23 Tom Tromey <tom@tromey.com>
8025
8026 * complaints.c (counters): New global.
8027 (struct complain): Remove.
8028 (struct complaints) <root>: Remove.
8029 (complaint_sentinel): Remove.
8030 (symfile_complaint_book): Update.
8031 (find_complaint) Remove.
8032 (complaint_internal, clear_complaints): Update.
8033
8034 2018-05-23 Tom Tromey <tom@tromey.com>
8035
8036 * complaints.c (struct complain) <file, line>: Remove.
8037 (find_complaint): Remove file, line parameters.
8038 (complaint_internal): Update.
8039
8040 2018-05-23 Tom Tromey <tom@tromey.com>
8041
8042 * complaints.c (vcomplaint): Remove.
8043 (complaint_internal) Merge in contents of vcomplaint.
8044
8045 2018-05-23 Tom Tromey <tom@tromey.com>
8046
8047 * complaints.c (struct complaints) <explanation>: Remove.
8048 (symfile_explanations): Remove.
8049 (symfile_complaint_book): Update.
8050 (vcomplaint): Update.
8051 (struct explanation): Remove.
8052
8053 2018-05-23 Tom Tromey <tom@tromey.com>
8054
8055 * complaints.c (symfile_complaints): Remove.
8056 (complaint_internal): Remove "complaints" parameter.
8057 (clear_complaints, vcomplaint): Remove "c" parameter.
8058 (get_complaints): Remove.
8059 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8060 (dwarf2_debug_line_missing_file_complaint)
8061 (dwarf2_debug_line_missing_end_sequence_complaint)
8062 (dwarf2_complex_location_expr_complaint)
8063 (dwarf2_const_value_length_mismatch_complaint)
8064 (dwarf2_section_buffer_overflow_complaint)
8065 (dwarf2_macro_malformed_definition_complaint)
8066 (dwarf2_invalid_attrib_class_complaint)
8067 (create_addrmap_from_index, dw2_symtab_iter_next)
8068 (dw2_expand_marked_cus)
8069 (dw2_debug_names_iterator::find_vec_in_debug_names)
8070 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8071 (create_debug_type_hash_table, init_cutu_and_read_dies)
8072 (partial_die_parent_scope, add_partial_enumeration)
8073 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8074 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8075 (read_import_statement, read_file_scope, create_dwo_cu_reader)
8076 (create_cus_hash_table, create_dwp_hash_table)
8077 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8078 (dwarf2_rnglists_process, dwarf2_ranges_process)
8079 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8080 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8081 (handle_struct_member_die, process_structure_scope)
8082 (read_array_type, read_common_block, read_module_type)
8083 (read_tag_pointer_type, read_typedef, read_base_type)
8084 (read_subrange_type, load_partial_dies, partial_die_info::read)
8085 (partial_die_info::read, partial_die_info::read)
8086 (partial_die_info::read, read_checked_initial_length_and_offset)
8087 (dwarf2_string_attr, read_formatted_entries)
8088 (dwarf_decode_line_header)
8089 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8090 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8091 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8092 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8093 (get_signatured_type, get_DW_AT_signature_type)
8094 (decode_locdesc, file_file_name, consume_improper_spaces)
8095 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8096 (dwarf_decode_macro_bytes, dwarf_decode_macros)
8097 (dwarf2_symbol_mark_computed, set_die_type)
8098 (read_attribute_value): Update.
8099 * stap-probe.c (handle_stap_probe, get_stap_base_address):
8100 Update.
8101 * dbxread.c (unknown_symtype_complaint)
8102 (lbrac_mismatch_complaint, repeated_header_complaint)
8103 (set_namestring, function_outside_compilation_unit_complaint)
8104 (read_dbx_symtab, process_one_symbol): Update.
8105 * gdbtypes.c (stub_noname_complaint): Update.
8106 * windows-nat.c (handle_unload_dll): Update.
8107 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8108 (decode_base_type): Update.
8109 * xcoffread.c (bf_notfound_complaint, ef_complaint)
8110 (eb_complaint, record_include_begin, record_include_end)
8111 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8112 (process_xcoff_symbol, read_symbol)
8113 (function_outside_compilation_unit_complaint)
8114 (scan_xcoff_symtab): Update.
8115 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8116 * buildsym.c (finish_block_internal, make_blockvector)
8117 (end_symtab_get_static_block, augment_type_symtab): Update.
8118 * dtrace-probe.c (dtrace_process_dof)
8119 (dtrace_static_probe_ops::get_probes): Update.
8120 * complaints.h (struct complaint): Don't declare.
8121 (symfile_complaints): Remove.
8122 (complaint_internal): Remove "complaints" parameter.
8123 (complaint): Likewise.
8124 (clear_complaints): Likewise.
8125 * symfile.c (syms_from_objfile_1, finish_new_objfile)
8126 (reread_symbols): Update.
8127 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8128 (dwarf2_frame_cache, decode_frame_entry): Update.
8129 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8130 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8131 (info_selectors_command): Update.
8132 * macrotab.c (macro_include, check_for_redefinition)
8133 (macro_undef): Update.
8134 * objfiles.c (filter_overlapping_sections): Update.
8135 * stabsread.c (invalid_cpp_abbrev_complaint)
8136 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8137 (define_symbol, error_type, read_type, rs6000_builtin_type)
8138 (stabs_method_name_from_physname, read_member_functions)
8139 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8140 (attach_fields_to_type, complain_about_struct_wipeout)
8141 (read_range_type, read_args, common_block_start)
8142 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8143 Update.
8144 * mdebugread.c (index_complaint, unknown_ext_complaint)
8145 (basic_type_complaint, bad_tag_guess_complaint)
8146 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8147 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8148 (parse_procedure, parse_lines)
8149 (function_outside_compilation_unit_complaint)
8150 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8151 (bad_tag_guess_complaint, reg_value_complaint): Update.
8152 * cp-support.c (demangled_name_complaint): Update.
8153 * macroscope.c (sal_macro_scope): Update.
8154 * dwarf-index-write.c (class debug_names): Update.
8155
8156 2018-05-23 Tom Tromey <tom@tromey.com>
8157
8158 * complaints.c (clear_complaints): Remove "noisy" parameter.
8159 * complaints.h (clear_complaints): Update.
8160 * symfile.c (syms_from_objfile_1, finish_new_objfile)
8161 (reread_symbols): Update.
8162
8163 2018-05-23 Tom Tromey <tom@tromey.com>
8164
8165 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8166 SUBSEQUENT_MESSAGE.
8167 (vcomplaint, clear_complaints): Update.
8168 (symfile_explanations): Remove some messages.
8169
8170 2018-05-23 Tom Tromey <tom@tromey.com>
8171
8172 * complaints.c (internal_complaint): Remove.
8173 * complaints.h (internal_complaint): Remove.
8174
8175 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8176
8177 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8178
8179 2018-05-22 Pedro Alves <palves@redhat.com>
8180
8181 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8182 (remote_fileio_badfd, remote_fileio_return_errno)
8183 (remote_fileio_return_success, remote_fileio_func_open)
8184 (remote_fileio_func_open, remote_fileio_func_close)
8185 (remote_fileio_func_read, remote_fileio_func_write)
8186 (remote_fileio_func_lseek, remote_fileio_func_rename)
8187 (remote_fileio_func_unlink, remote_fileio_func_stat)
8188 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8189 (remote_fileio_func_isatty, remote_fileio_func_system): Add
8190 remote_target parameter.
8191 (remote_fio_func_map) <func>: Add remote_target parameter.
8192 (do_remote_fileio_request, remote_fileio_request):
8193 * remote-fileio.h (remote_fileio_request):
8194 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8195 remote_target parameter.
8196 (remote_notif_process, handle_notification): Adjust to pass down
8197 the remote.
8198 (remote_notif_state_allocate): Add remote_target parameter. Save
8199 it.
8200 * remote-notif.h (struct remote_target): Forward declare.
8201 (struct notif_client) <parse, ack, can_get_pending_events>: Add
8202 remote_target parameter.
8203 (struct remote_notif_state) <remote>: New field.
8204 (remote_notif_ack, remote_notif_parse): Add remote_target
8205 parameter.
8206 (remote_notif_state_allocate, remote_notif_state_allocate): Add
8207 remote_target parameter.
8208 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8209 (threads_listing_context, rmt_thread_action, protocol_feature)
8210 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8211 (packet_result, struct threads_listing_context, remote_state):
8212 Move definitions and declarations higher up.
8213 (remote_target) <~remote_target>: Declare.
8214 (remote_download_command_source, remote_file_put, remote_file_get)
8215 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8216 (remote_hostio_pread_vFile, remote_hostio_send_command)
8217 (remote_hostio_set_filesystem, remote_hostio_open)
8218 (remote_hostio_close, remote_hostio_unlink, remote_state)
8219 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8220 (get_memory_write_packet_size, get_memory_read_packet_size)
8221 (append_pending_thread_resumptions, remote_detach_1)
8222 (append_resumption, remote_resume_with_vcont)
8223 (add_current_inferior_and_thread, wait_ns, wait_as)
8224 (process_stop_reply, remote_notice_new_inferior)
8225 (process_initial_stop_replies, remote_add_thread)
8226 (btrace_sync_conf, remote_btrace_maybe_reopen)
8227 (remove_new_fork_children, kill_new_fork_children)
8228 (discard_pending_stop_replies, stop_reply_queue_length)
8229 (check_pending_events_prevent_wildcard_vcont)
8230 (discard_pending_stop_replies_in_queue, stop_reply)
8231 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8232 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8233 (remote_interrupt_as, remote_interrupt_ns)
8234 (remote_get_noisy_reply, remote_query_attached)
8235 (remote_add_inferior, remote_current_thread, get_current_thread)
8236 (set_thread, set_general_thread, set_continue_thread)
8237 (set_general_process, write_ptid)
8238 (remote_unpack_thread_info_response, remote_get_threadinfo)
8239 (parse_threadlist_response, remote_get_threadlist)
8240 (remote_threadlist_iterator, remote_get_threads_with_ql)
8241 (remote_get_threads_with_qxfer)
8242 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8243 (get_offsets, remote_check_symbols, remote_supported_packet)
8244 (remote_query_supported, remote_packet_size)
8245 (remote_serial_quit_handler, remote_detach_pid)
8246 (remote_vcont_probe, remote_resume_with_hc)
8247 (send_interrupt_sequence, interrupt_query)
8248 (remote_notif_get_pending_events, fetch_register_using_p)
8249 (send_g_packet, process_g_packet, fetch_registers_using_g)
8250 (store_register_using_P, store_registers_using_G)
8251 (set_remote_traceframe, check_binary_download)
8252 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8253 (remote_xfer_live_readonly_partial, remote_read_bytes)
8254 (remote_send_printf, remote_flash_write, readchar)
8255 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8256 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8257 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8258 (extended_remote_disable_randomization, extended_remote_run)
8259 (send_environment_packet, extended_remote_environment_support)
8260 (extended_remote_set_inferior_cwd, remote_write_qxfer)
8261 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8262 (packet_command): Now methods of ...
8263 (remote_target): ... this class.
8264 (m_remote_state) <remote_target>: New field.
8265 (struct remote_state) <stop_reply_queue,
8266 remote_async_inferior_event_token, wait_forever_enabled_p>: New
8267 fields.
8268 (remote_state::remote_state): Allocate stop_reply_queue.
8269 (remote_state): Delete global.
8270 (get_remote_state_raw): Delete.
8271 (remote_target::get_remote_state): Allocate m_remote_state on
8272 demand.
8273 (get_current_remote_target): New.
8274 (remote_ops, extended_remote_ops): Delete.
8275 (wait_forever_enabled_p, remote_async_inferior_event_token):
8276 Delete, moved to struct remote_state.
8277 (remote_target::close): Delete self. Destruction bits split to
8278 ...
8279 (remote_target::~remote_target): ... this.
8280 (show_memory_packet_size): Adjust to use
8281 get_current_remote_target.
8282 (struct protocol_feature) <func>: Add remote_target parameter.
8283 All callers adjusted.
8284 (curr_quit_handler_target): New.
8285 (remote_serial_quit_handler): Reimplement.
8286 (remote_target::open_1): Adjust to use get_current_remote_target.
8287 Heap-allocate remote_target/extended_remote_target instances.
8288 (vcont_builder::vcont_builder): Add remote_target parameter, and
8289 save it in m_remote. All callers adjusted.
8290 (vcont_builder::m_remote): New field.
8291 (vcont_builder::restart, vcont_builder::flush)
8292 (vcont_builder::push_action): Use it.
8293 (remote_target::commit_resume): Use it.
8294 (struct queue_iter_param) <remote>: New field.
8295 (remote_target::remove_new_fork_children): Fill in 'remote' field.
8296 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8297 (check_pending_event_prevents_wildcard_vcont_callback)
8298 (remote_target::check_pending_events_prevent_wildcard_vcont)
8299 (remote_target::discard_pending_stop_replies)
8300 (remote_target::discard_pending_stop_replies_in_queue)
8301 (remote_target::remote_notif_remove_queued_reply): Fill in
8302 'remote' field.
8303 (remote_notif_get_pending_events): New.
8304 (remote_target::readchar, remote_target::remote_serial_write):
8305 Save/restore curr_quit_handler_target.
8306 (putpkt): New.
8307 (kill_new_fork_children): Fill in 'remote' field.
8308 (packet_command): Use get_current_remote_target, defer to
8309 remote_target method of same name.
8310 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8311 parameter, and save it in m_remote. All callers adjusted.
8312 (scoped_remote_fd::release): Use m_remote.
8313 (scoped_remote_fd::m_remote): New field.
8314 (remote_file_put, remote_file_get, remote_file_delete): Use
8315 get_current_remote_target, defer to remote_target method of same
8316 name.
8317 (remote_btrace_reset): Add remote_state paremeter. Update all
8318 callers.
8319 (remote_async_inferior_event_handler). Pass down 'data'.
8320 (remote_new_objfile): Use get_current_remote_target.
8321 (remote_target::vcont_r_supported): New.
8322 (set_range_stepping): Use get_current_remote_target and
8323 remote_target::vcont_r_supported.
8324 (_initialize_remote): Don't allocate 'remote_state' and
8325 'stop_reply_queue' globals.
8326 * remote.h (struct remote_target): Forward declare.
8327 (getpkt, putpkt, remote_notif_get_pending_events): Add
8328 'remote_target' parameter.
8329
8330 2018-05-22 Pedro Alves <palves@redhat.com>
8331
8332 * remote.c (vcont_builder): Now a class. Make all data members
8333 private.
8334 (vcont_builder) <vcont_builder, restart, flush, push_action>:
8335 Declare methods.
8336 (vcont_builder_restart): Rename to ...
8337 (vcont_builder::restart): ... this.
8338 (vcont_builder_flush): Rename to ...
8339 (vcont_builder::flush): ... this.
8340 (vcont_builder_push_action): Rename to ...
8341 (vcont_builder::push_action): ... this.
8342 (remote_target::commit_resume): Adjust.
8343
8344 2018-05-22 Pedro Alves <palves@redhat.com>
8345
8346 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8347 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8348 (get_fixed_memory_packet_size): New.
8349 (get_memory_packet_size): Use it.
8350 (set_memory_packet_size): Don't override the config size with
8351 DEFAULT_MAX_MEMORY_PACKET_SIZE.
8352 (show_memory_packet_size): Use get_fixed_memory_packet_size.
8353 Don't refer to get_memory_packet_size if not connected to a remote
8354 target. Show "(default)" if configured size is 0.
8355
8356 2018-05-22 Pedro Alves <palves@redhat.com>
8357
8358 * remote.c (remote_target::mourn_inferior): Move
8359 discard_pending_stop_replies call here from ...
8360 (_initialize_remote): ... here.
8361
8362 2018-05-22 Pedro Alves <palves@redhat.com>
8363
8364 * remote.c (compare_section_command): Remove set_general_process
8365 call.
8366
8367 2018-05-22 Pedro Alves <palves@redhat.com>
8368
8369 * remote.c (struct packet_reg, struct remote_arch_state):
8370 Move higher up in the file.
8371 (remote_state) <m_arch_states>: Store remote_arch_state values
8372 instead of remote_arch_state pointers.
8373 (remote_state::get_remote_arch_state): Adjust.
8374
8375 2018-05-22 Pedro Alves <palves@redhat.com>
8376
8377 * remote.c: Include <unordered_map>.
8378 (remote_state): Now a class.
8379 (remote_state) <get_remote_arch_state>: Declare method.
8380 <get_remote_arch_state>: New field.
8381 (remote_arch_state) <remote_arch_state>: Declare ctor.
8382 <regs>: Now a unique_ptr.
8383 (remote_gdbarch_data_handle): Delete.
8384 (get_remote_arch_state): Delete.
8385 (remote_state::get_remote_arch_state): New.
8386 (get_remote_state): Adjust to call remote_state's
8387 get_remote_arch_state method.
8388 (init_remote_state): Delete, bits factored out to ...
8389 (remote_arch_state::remote_arch_state): ... this new method.
8390 (get_remote_packet_size, get_memory_packet_size)
8391 (process_g_packet, remote_target::fetch_registers)
8392 (remote_target::prepare_to_store, store_registers_using_G)
8393 (remote_target::store_registers, remote_target::get_trace_status):
8394 Adjust to call remote_state's method.
8395 (_initialize_remote): Remove reference to
8396 remote_gdbarch_data_handle.
8397
8398 2018-05-22 Pedro Alves <palves@redhat.com>
8399
8400 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8401 pread>: New method declarations.
8402 (remote_target::open_1): Adjust.
8403 (readahead_cache_invalidate): Rename to ...
8404 (readahead_cache::invalidate): ... this, and adjust to be a class
8405 method.
8406 (readahead_cache_invalidate_fd): Rename to ...
8407 (readahead_cache::invalidate_fd): ... this, and adjust to be a
8408 class method.
8409 (remote_hostio_pwrite): Adjust.
8410 (remote_hostio_pread_from_cache): Rename to ...
8411 (readahead_cache::pread): ... this, and adjust to be a class
8412 method.
8413 (remote_hostio_close): Adjust.
8414
8415 2018-05-22 Pedro Alves <palves@redhat.com>
8416
8417 * remote.c (remote_hostio_close_cleanup): Delete.
8418 (class scoped_remote_fd): New.
8419 (remote_file_put, remote_file_get): Use it.
8420
8421 2018-05-22 Pedro Alves <palves@redhat.com>
8422
8423 (struct vCont_action_support): Use bool and initialize all fields.
8424 (struct readahead_cache): Initialize all fields.
8425 (remote_state): Use bool and initialize all fields.
8426 (remote_state::remote_state, remote_state::~remote_state): New.
8427 (new_remote_state): Delete.
8428 (_initialize_remote): Use new to allocate remote_state.
8429
8430 2018-05-22 Pedro Alves <palves@redhat.com>
8431 張俊芝 <zjz@zjz.name>
8432
8433 PR gdb/22973
8434 * c-exp.y: Include "c-support.h".
8435 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8436 of tolower. Use c_ident_is_alpha to scan names.
8437 * c-lang.c: Include "c-support.h".
8438 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8439 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8440 * c-support.h: New file, with bits factored out from ...
8441 * cp-name-parser.y: ... this file.
8442 Include "c-support.h".
8443 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8444 c-support.h and renamed.
8445 (symbol_end, yylex): Adjust.
8446
8447 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8448
8449 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8450 parameter type to CORE_ADDR.
8451 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8452 parameter type in declaration to CORE_ADDR.
8453 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8454 target_auxv_search to get AT_HWCAP and use the result to get the
8455 target description.
8456 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8457 to CORE_ADDR. Remove the cast of the return value to unsigned
8458 long. Fix error predicate of target_auxv_search.
8459 (ppc_linux_nat_target::read_description): Change the type of the
8460 hwcap variable to CORE_ADDR.
8461
8462 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8463
8464 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8465 if the size of fpscr is larger than 32 bits.
8466
8467 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8468
8469 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8470 (ppc32_linux_vsxregmap): New global.
8471 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8472 regcache_supply_regset, and regcache_collect_regset.
8473 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8474 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8475 (fetch_vsx_register, store_vsx_register): Remove.
8476 (fetch_vsx_registers): Add regno parameter. Get regset using
8477 ppc_linux_vsxregset. Use regset to supply registers.
8478 (store_vsx_registers): Add regno parameter. Get regset using
8479 ppc_linux_vsxregset. Use regset to collect registers.
8480 (fetch_register): Call fetch_vsx_registers instead of
8481 fetch_vsx_register.
8482 (store_register): Call store_vsx_registers instead of
8483 store_vsx_register.
8484 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8485 new regno parameter.
8486 (store_ppc_registers): Call store_vsx_registers with -1 for the
8487 new regno parameter.
8488 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8489 (ppc_collect_vsxregset): Remove.
8490
8491 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8492
8493 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8494 offset fields.
8495 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8496 for vector register offset fields.
8497 (ppc64_fbsd_reg_offsets): Likewise.
8498 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8499 to vector register offset fields.
8500 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8501 to vector register offset fields.
8502 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8503 vector register offset fields.
8504 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8505 initializers for vector register offset fields.
8506 (rs6000_aix64_reg_offsets): Likewise.
8507 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8508 (ppc_supply_vrregset): Remove.
8509 (ppc_collect_vrregset): Remove.
8510 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8511 (ppc_linux_vrregset) : New function.
8512 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8513 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8514 (ppc32_linux_vrregset): Remove.
8515 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8516 and use result instead of ppc32_linux_vrregset.
8517 (ppc32_linux_reg_offsets): Remove initializers for vector register
8518 offset fields.
8519 (ppc64_linux_reg_offsets): Likewise.
8520 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8521 * ppc-linux-nat.c: Include regset.h.
8522 (gdb_vrregset_t): Adjust comment to account for little-endian
8523 mode.
8524 (supply_vrregset, fill_vrregset): Remove.
8525 (fetch_altivec_register, store_altivec_register): Remove.
8526 (fetch_altivec_registers): Add regno parameter. Get regset using
8527 ppc_linux_vrregset. Use regset to supply registers.
8528 (store_altivec_registers): Add regno parameter. Get regset using
8529 ppc_linux_vrregset. Use regset to collect registers.
8530 (fetch_register): Call fetch_altivec_registers instead of
8531 fetch_altivec_register.
8532 (store_register): Call store_altivec_registers instead of
8533 store_altivec_register.
8534 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8535 the new regno parameter.
8536 (store_ppc_registers): Call store_altivec_registers with -1 for
8537 the new regno parameter.
8538
8539 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8540
8541 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8542 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8543 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8544 (gdb_vrregset_t): Change array type size to
8545 PPC_LINUX_SIZEOF_VRREGSET.
8546 (gdb_vsxregset_t): Change array type size to
8547 PPC_LINUX_SIZEOF_VSXREGSET.
8548 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8549 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8550 PPC_LINUX_SIZEOF_VSXREGSET.
8551
8552 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8553
8554 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8555 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8556 nat/ppc-linux.c.
8557 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8558 ppc_linux_target_wordsize with tid.
8559 (ppc_linux_nat_target::read_description): Call ppc_linux_target
8560 wordsize with tid.
8561 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8562 (ppc64_64bit_inferior_p): Add static and inline specifiers.
8563 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8564 tid parameter. Remove static specifier.
8565 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8566 (ppc_linux_target_wordsize): New declaration.
8567
8568 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8569
8570 * arch/ppc-linux-common.c: New file.
8571 * arch/ppc-linux-common.h: New file.
8572 * arch/ppc-linux-tdesc.h: New file.
8573 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8574 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8575 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8576 arch/ppc-linux-tdesc.h.
8577 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8578 arch/ppc-linux-tdesc.h.
8579 (ppc_linux_nat_target::read_description): Remove target
8580 description matching code. Fill a ppc_linux_features struct and
8581 call ppc_linux_match_description with it. Move comment about ISA
8582 2.05 to ppc-linux-common.c.
8583 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8584 arch/ppc-linux-tdesc.h.
8585 (ppc_linux_core_read_description): Remove target description
8586 matching code. Fill a ppc_linux_features struct and call
8587 ppc_linux_match_description with it.
8588 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8589 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8590 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8591 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8592 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8593 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8594 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8595 (tdesc_powerpc_e500l): Remove.
8596
8597 2018-05-22 Joel Brobecker <brobecker@adacore.com>
8598
8599 * ada-lang.c (catch_assert_command): Pass empty string instead
8600 of NULL for excep_string argument.
8601
8602 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8603
8604 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8605 the width of the requested register exceeds the width of the
8606 `ptrace' data type.
8607
8608 2018-05-21 Tom Tromey <tom@tromey.com>
8609
8610 * printcmd.c (output_command): Remove.
8611 (output_command_const): Rename to output_command.
8612 * valprint.h (output_command): Rename from output_command_const.
8613 * tracepoint.c (trace_dump_actions): Call output_command.
8614
8615 2018-05-21 Tom Tromey <tom@tromey.com>
8616
8617 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8618 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8619 * ada-lang.h (create_ada_exception_catchpoint): Update.
8620 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8621 std::string.
8622 (create_excep_cond_exprs, ~ada_catchpoint)
8623 (should_stop_exception, print_one_exception)
8624 (print_mention_exception, print_recreate_exception): Update.
8625 (ada_get_next_arg): Remove.
8626 (catch_ada_exception_command_split): Use std::string. Change type
8627 of "excep_string", "cond_string".
8628 (catch_ada_exception_command): Update.
8629 (create_ada_exception_catchpoint): Change type of excep_string.
8630 (ada_exception_sal): Remove excep_string parameter.
8631 (~ada_catchpoint): Remove.
8632
8633 2018-05-21 Tom Tromey <tom@tromey.com>
8634
8635 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8636 cleanup.
8637
8638 2018-05-21 Tom Tromey <tom@tromey.com>
8639
8640 * ada-lang.c (ada_exception_message_1, ada_exception_message):
8641 Return unique_xmalloc_ptr.
8642 (print_it_exception): Update.
8643
8644 2018-05-21 Tom Tromey <tom@tromey.com>
8645
8646 * tracepoint.c (trace_dump_actions): Use std::string.
8647
8648 2018-05-21 Tom Tromey <tom@tromey.com>
8649
8650 * symfile.c (reread_symbols): Use std::string for original_name.
8651
8652 2018-05-21 Tom Tromey <tom@tromey.com>
8653
8654 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8655 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
8656 constructor.
8657
8658 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
8659
8660 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8661 instance to...
8662 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8663 * objfiles.c (get_objfile_bfd_data): Allocate
8664 objfile_per_bfd_storage with obstack_new when allocating on
8665 obstack.
8666
8667 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8668
8669 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8670 OBSTACK_ZALLOC.
8671 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8672 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8673 * mdebugread.c (mdebug_build_psymtabs): Likewise.
8674 (add_pending): Likewise.
8675 (parse_symbol): Likewise.
8676 (parse_partial_symbols): Likewise.
8677 (psymtab_to_symtab_1): Likewise.
8678 (new_psymtab): Likewise.
8679 (elfmdebug_build_psymtabs): Likewise.
8680 * minsyms.c (terminate_minimal_symbol_table): Likewise.
8681 * objfiles.c (get_objfile_bfd_data): Likewise.
8682 (objfile_register_static_link): Likewise.
8683 * psymtab.c (allocate_psymtab): Likewise.
8684 * stabsread.c (read_member_functions): Likewise.
8685 * xcoffread.c (xcoff_end_psymtab): Likewise.
8686
8687 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8688
8689 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8690 compiler supports std::is_trivially_constructible.
8691 * common/poison.h: Include obstack.h.
8692 (IsMallocable): Define to is_trivially_constructible if the
8693 compiler supports it, define to true_type otherwise.
8694 (xobnew): New.
8695 (XOBNEW): Redefine.
8696 (xobnewvec): New.
8697 (XOBNEWVEC): Redefine.
8698 * gdb_obstack.h (obstack_zalloc): New.
8699 (OBSTACK_ZALLOC): Redefine.
8700 (obstack_calloc): New.
8701 (OBSTACK_CALLOC): Redefine.
8702 (obstack_new): New.
8703 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8704 (gdbarch_obstack): New declaration in gdbarch.h, definition in
8705 gdbarch.c.
8706 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8707 obstack_calloc/obstack_zalloc.
8708 (gdbarch_obstack_zalloc): Remove.
8709 * target-descriptions.c (tdesc_data_init): Use obstack_new.
8710
8711 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8712
8713 * stack.c (backtrace_command_1): Remove useless variable int i.
8714
8715 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8716
8717 * stack.c (print_frame_info): Fix comment.
8718
8719 2018-05-18 Tom Tromey <tom@tromey.com>
8720
8721 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8722 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8723 (~dwarf2_per_objfile): Update
8724 (dwarf2_get_dwz_file): Use new.
8725 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8726 unique_ptr.
8727
8728 2018-05-18 Tom Tromey <tom@tromey.com>
8729
8730 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8731 unique_ptr.
8732 * dwarf2read.c (struct dwp_file): Add constructor and
8733 initializers.
8734 (open_and_init_dwp_file): Return a unique_ptr.
8735 (dwarf2_per_objfile, create_dwp_hash_table)
8736 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8737 (lookup_dwo_unit_in_dwp): Update.
8738 (open_and_init_dwp_file, get_dwp_file): Update.
8739
8740 2018-05-18 Tom Tromey <tom@tromey.com>
8741
8742 * dwarf2read.c (dwarf2_per_objfile): Update.
8743 (struct mapped_index): Add initializers.
8744 (dwarf2_read_index): Use new.
8745 (dw2_symtab_iter_init): Update.
8746 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8747 unique_ptr.
8748
8749 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8750
8751 * dwarf2read.c (mapped_index) <total_size>: Remove.
8752
8753 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8754
8755 * unittests/format_pieces-selftests.c (test_format_specifier):
8756 Add ARI comments.
8757
8758 2018-05-18 Tom Tromey <tom@tromey.com>
8759
8760 * c-typeprint.c (maybe_print_hole): New function.
8761 (c_print_type_struct_field_offset): Update.
8762 (c_type_print_base_struct_union): Call maybe_print_hole.
8763
8764 2018-05-17 Keith Seitz <keiths@redhat.com>
8765
8766 * breakpoint.c (build_bpstat_chain): New function, moved from
8767 bpstat_stop_status.
8768 (bpstat_stop_status): Add optional parameter, `stop_chain'.
8769 If no stop chain is passed, call build_bpstat_chain to build it.
8770 * breakpoint.h (build_bpstat_chain): Declare.
8771 (bpstat_stop_status): Move documentation here from breakpoint.c.
8772 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8773 build the stop chain and pass it to skip_inline_frames.
8774 Pass this stop chain to bpstat_stop_status.
8775 * inline-frame.c: Include breakpoint.h.
8776 (stopped_by_user_bp_inline_frame): New function.
8777 (skip_inline_frames): Add parameter `stop_chain'.
8778 Move documention to inline-frame.h.
8779 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8780 whether the frame should be elided.
8781 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8782 Add moved documentation and update for new parameter.
8783
8784 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8785
8786 PR cli/14975
8787 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8788 unittests/format_pieces-selftests.c.
8789 * common/format.h (format_piece) <operator==>: New.
8790 (format_pieces) <operator[]>: Remove.
8791 * common/format.c (format_pieces::format_pieces): Handle \e.
8792 * unittests/format_pieces-selftests.c: New.
8793
8794 2018-05-17 Tom Tromey <tom@tromey.com>
8795
8796 PR symtab/23010:
8797 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8798 (dw2_instantiate_symtab): Add skip_partial parameter.
8799 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8800 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8801 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8802 (dw2_expand_symtabs_matching_one)
8803 (dw2_find_pc_sect_compunit_symtab)
8804 (dw2_debug_names_lookup_symbol)
8805 (dw2_debug_names_expand_symtabs_for_function): Update.
8806 (init_cutu_and_read_dies): Add skip_partial parameter.
8807 (process_psymtab_comp_unit, build_type_psymtabs_1)
8808 (process_skeletonless_type_unit, load_partial_comp_unit)
8809 (psymtab_to_symtab_1): Update.
8810 (load_full_comp_unit): Add skip_partial parameter.
8811 (process_imported_unit_die, dwarf2_read_addr_index)
8812 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8813 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8814 (read_signatured_type): Update.
8815
8816 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8817
8818 * value.c (release_value): Remove unused variable.
8819 (record_latest_value): Likewise.
8820 (access_value_history): Likewise.
8821 (preserve_values): Likewise.
8822
8823 2018-05-17 Tom Tromey <tom@tromey.com>
8824
8825 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8826 Initialize.
8827
8828 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8829
8830 PR gdb/22286
8831 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8832 Also handle registers whose width is not a multiple of
8833 PTRACE_TYPE_RET.
8834 (linux_nat_trad_target::store_register): Likewise.
8835
8836 2018-05-16 Tom Tromey <tom@tromey.com>
8837
8838 * gdbcore.h (core_bfd): Redefine.
8839 * corelow.c (core_target::close): Update.
8840 (core_target_open): Update.
8841 * progspace.h (struct program_space) <cbfd>: Now a
8842 gdb_bfd_ref_ptr.
8843
8844 2018-05-16 Tom Tromey <tom@tromey.com>
8845
8846 PR cli/19551:
8847 * symfile-add-flags.h (enum symfile_add_flags)
8848 <SYMFILE_NOT_FILENAME>: New constant.
8849 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8850 objfile name from BFD.
8851 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8852 * minidebug.c (find_separate_debug_file_in_section): Put
8853 ".gnu_debugdata" into BFD's file name.
8854
8855 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8856
8857 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8858 Remove.
8859
8860 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8861
8862 PR binutils/21446
8863 * aarch64-tdep.c (aarch64_analyze_prologue,
8864 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8865 Indicate not interested in errors.
8866
8867 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8868
8869 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8870 Supply the MIPS_ZERO_REGNUM register.
8871
8872 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8873
8874 * mips-tdep.c (mask_address_var): Make variable static.
8875
8876 2018-05-14 Tom Tromey <tom@tromey.com>
8877
8878 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8879
8880 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8881
8882 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8883 FXSAVE_ADDR for the mxcsr register.
8884
8885 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8886
8887 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8888
8889 2018-05-11 Pedro Alves <palves@redhat.com>
8890
8891 * corelow.c (core_target) <core_target>: No longer inline.
8892 Initialize m_core_gdbarch, m_core_vec and build the section table
8893 here.
8894 <~core_target>: New.
8895 <core_gdbarch, get_core_register_section>: New methods.
8896 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8897 factored out from ...
8898 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8899 (core_ops): Delete.
8900 (sniff_core_bfd): Add gdbarch parameter.
8901 (core_close): Delete, merged into ...
8902 (core_target::close): ... here. Delete self.
8903 (core_close_cleanup): Delete.
8904 (core_target_open): Allocate a core_target on the heap. Use a
8905 unique_ptr instead of a cleanup. Bits moved into the core_target
8906 ctor. Adjust to use core_target methods instead of globals.
8907 (get_core_register_section): Rename to ...
8908 (core_target::get_core_register_section): ... this and adjust.
8909 (struct get_core_registers_cb_data): New.
8910 (get_core_registers_cb): Use it. Use bool.
8911 (core_target::fetch_registers, core_target::files_info)
8912 (core_target::xfer_partial, core_target::read_description)
8913 (core_target::pid_to, core_target::thread_name): Adjust to
8914 reference class fields instead of globals.
8915 * target.h (struct target_ops_deleter, target_ops_up): New.
8916
8917 2018-05-11 Pedro Alves <palves@redhat.com>
8918
8919 * corefile.c (core_file_command): Move to corelow.c.
8920 * corelow.c (the_core_target): Delete.
8921 (core_file_command): Moved from corefile.c. Check exec_bfd
8922 instead of the_core_target. Use target_detach instead of calling
8923 into the_core_target directly.
8924 (maybe_say_no_core_file_now): New.
8925 (core_target::detach): Use it.
8926 (_initialize_corelow): Remove references to the_core_target.
8927 * gdbcore.h (the_core_target): Delete.
8928
8929 2018-05-11 Tom Tromey <tromey@redhat.com>
8930 Pedro Alves <palves@redhat.com>
8931
8932 * corefile.c (core_bfd): Remove.
8933 * gdbcore.h (core_bfd): Now a macro.
8934 * progspace.h (struct program_space) <cbfd>: New field.
8935
8936 2018-05-11 Tom Tromey <tom@tromey.com>
8937
8938 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8939 gdb::def_vector.
8940
8941 2018-05-10 Tom Tromey <tom@tromey.com>
8942
8943 * configure: Rebuild.
8944 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8945
8946 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8947
8948 PR server/23158:
8949 * regformats/regdat.sh: Adjust script, following the addition
8950 of the new expedite_regs parameter to init_target_desc.
8951
8952 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8953
8954 PR gdb/23127
8955 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8956 set_gdbarch_significant_addr_bit.
8957 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8958 set_gdbarch_significant_addr_bit.
8959 * utils.c (address_significant): Update to sign extend addr.
8960
8961 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8962
8963 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8964 (xtensa_linux_init_abi): Limit tdep->num_regs by
8965 tdep->num_nopriv_regs.
8966 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8967 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8968 not initialized.
8969
8970 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8971
8972 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8973
8974 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8975
8976 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8977 (I387_MXCSR_INIT_VAL): New constant.
8978 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8979 buffer if it was supplied by the inferior.
8980 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8981 (i387_xsave_get_clear_bv): New function.
8982 (i387_supply_xsave): Only read x87 control registers from the
8983 xsave buffer if the feature is enabled, and the state will have
8984 been written, otherwise, provide a suitable default.
8985 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8986 including x87 control registers. Update control registers if they
8987 have changed from the default value, and mark features as enabled
8988 as required.
8989 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8990
8991 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8992
8993 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8994
8995 2018-05-07 Tom Tromey <tom@tromey.com>
8996
8997 * configure: Rebuild.
8998 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8999
9000 2018-05-07 Tom Tromey <tom@tromey.com>
9001
9002 PR tdep/20362:
9003 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9004 bit. Use correct value for VDIV.
9005
9006 2018-05-04 Tom Tromey <tom@tromey.com>
9007
9008 * configure: Rebuild.
9009 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9010
9011 2018-05-04 Tom Tromey <tom@tromey.com>
9012
9013 * linux-record.c (record_linux_system_call) <case
9014 RECORD_SYS_RECVFROM>: Add "break".
9015
9016 2018-05-04 Tom Tromey <tom@tromey.com>
9017
9018 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9019 Add missing "break".
9020 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9021 Add missing "break".
9022
9023 2018-05-04 Tom Tromey <tom@tromey.com>
9024
9025 * rs6000-tdep.c (ppc_process_record_op4)
9026 (ppc_process_record_op63): Add fall-through comment.
9027
9028 2018-05-04 Tom Tromey <tom@tromey.com>
9029
9030 * i386-tdep.c (i386_process_record): Add fall-through comment.
9031
9032 2018-05-04 Tom Tromey <tom@tromey.com>
9033
9034 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9035 comment.
9036
9037 2018-05-04 Tom Tromey <tom@tromey.com>
9038
9039 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9040 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9041 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9042 comment.
9043 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9044 comment.
9045 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9046 comment.
9047
9048 2018-05-04 Tom Tromey <tom@tromey.com>
9049
9050 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9051
9052 2018-05-04 Tom Tromey <tom@tromey.com>
9053
9054 * s390-tdep.c (s390_process_record): Fix fall-through comments.
9055 * xcoffread.c (scan_xcoff_symtab): Move comment later.
9056 * symfile.c (section_is_mapped): Fix fall-through comment.
9057 * stabsread.c (define_symbol, read_member_functions): Fix
9058 fall-through comment.
9059 * s390-linux-tdep.c (s390_process_record): Fix fall-through
9060 comment.
9061 * remote.c (remote_wait_as): Fix fall-through comment.
9062 * p-exp.y (yylex): Fix fall-through comment.
9063 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9064 comment.
9065 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9066 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9067 * jv-exp.y (yylex): Fix fall-through comment.
9068 * go-exp.y (lex_one_token): Fix fall-through comment.
9069 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9070 fall-through comment.
9071 * f-exp.y (yylex): Fix fall-through comment.
9072 * dwarf2read.c (process_die): Fix fall-through comments.
9073 * dbxread.c (process_one_symbol): Fix fall-through comment.
9074 * d-exp.y (lex_one_token): Fix fall-through comment.
9075 * cp-name-parser.y (yylex): Fix fall-through comment.
9076 * coffread.c (coff_symtab_read): Fix fall-through comment.
9077 * c-exp.y (lex_one_token): Fix fall-through comment.
9078 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9079 comment.
9080 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9081 comment.
9082
9083 2018-05-04 Tom Tromey <tom@tromey.com>
9084
9085 PR python/22730:
9086 * NEWS: Mention gdb.execute change.
9087 * gdbcmd.h (execute_control_command): Don't declare.
9088 * python/python.c (execute_gdb_command): Use read_command_lines_1,
9089 execute_control_commands, execute_control_commands_to_string.
9090 * cli/cli-script.h (execute_control_commands)
9091 (execute_control_commands_to_string): Declare.
9092 (execute_control_command): Add from_tty parameter.
9093 * cli/cli-script.c (execute_control_commands)
9094 (execute_control_commands_to_string): New functions.
9095 (execute_user_command): Use execute_control_commands.
9096 (execute_control_command_1): Add "from_tty" parameter. Update.
9097 (execute_control_command): Likewise.
9098
9099 2018-05-04 Tom Tromey <tom@tromey.com>
9100
9101 PR python/22731:
9102 * NEWS: Mention that breakpoint commands are writable.
9103 * python/py-breakpoint.c (bppy_set_commands): New function.
9104 (breakpoint_object_getset) <"commands">: Use it.
9105
9106 2018-05-04 Tom Tromey <tom@tromey.com>
9107
9108 * tracepoint.c (actions_command): Update.
9109 * mi/mi-cmd-break.c (mi_command_line_array)
9110 (mi_command_line_array_cnt, mi_command_line_array_ptr)
9111 (mi_read_next_line): Remove.
9112 (mi_cmd_break_commands): Update.
9113 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9114 function_view.
9115 * cli/cli-script.c (get_command_line): Update.
9116 (process_next_line): Use function_view. Constify.
9117 (recurse_read_control_structure, read_command_lines)
9118 (read_command_lines_1): Change argument types to function_view.
9119 (do_define_command, document_command): Update.
9120 * breakpoint.h (check_tracepoint_command): Don't declare.
9121 * breakpoint.c (check_tracepoint_command): Remove.
9122 (commands_command_1, create_tracepoint_from_upload): Update.
9123
9124 2018-05-04 Tom Tromey <tom@tromey.com>
9125
9126 PR gdb/11750:
9127 * cli/cli-script.h (enum command_control_type) <define_control>:
9128 New constant.
9129 * cli/cli-script.c (multi_line_command_p): Handle define_control.
9130 (build_command_line, execute_control_command_1)
9131 (process_next_line): Likewise.
9132 (do_define_command): New function, extracted from define_command.
9133 (define_command): Use it.
9134
9135 2018-05-04 Tom Tromey <tom@tromey.com>
9136
9137 * tracepoint.c (actions_command): Update.
9138 * cli/cli-script.h (read_command_lines): Update.
9139 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9140 (MAX_TMPBUF): Remove define.
9141 (define_command): Use string_printf.
9142 (document_command): Likewise.
9143 * breakpoint.c (commands_command_1): Update.
9144
9145 2018-05-04 Tom Tromey <tom@tromey.com>
9146
9147 * top.c (execute_command): Update.
9148 * cli/cli-script.h (print_command_lines): Now varargs.
9149 * cli/cli-script.c (print_command_lines): Now varargs.
9150 (execute_control_command_1) <case while_control, case if_control>:
9151 Update.
9152
9153 2018-05-04 Tom Tromey <tom@tromey.com>
9154
9155 * tracepoint.c (all_tracepoint_actions): Rename from
9156 all_tracepoint_actions_and_cleanup. Change return type.
9157 (actions_command, encode_actions_1, encode_actions)
9158 (trace_dump_actions, tdump_command): Update.
9159 * remote.c (remote_download_command_source): Update.
9160 * python/python.c (gdbpy_eval_from_control_command)
9161 (python_command, python_interactive_command): Update.
9162 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9163 * guile/guile.c (guile_command)
9164 (gdbscm_eval_from_control_command, guile_command): Update.
9165 * compile/compile.c (compile_code_command)
9166 (compile_print_command, compile_to_object): Update.
9167 * cli/cli-script.h (struct command_lines_deleter): New.
9168 (counted_command_line): New typedef.
9169 (struct command_line): Add constructor, destructor.
9170 <body_list>: Remove.
9171 <body_list_0, body_list_1>: New members.
9172 (command_line_up): Remove typedef.
9173 (read_command_lines, read_command_lines_1, get_command_line):
9174 Update.
9175 (copy_command_lines): Don't declare.
9176 * cli/cli-script.c (build_command_line): Use "new".
9177 (get_command_line): Return counted_command_line.
9178 (print_command_lines, execute_user_command)
9179 (execute_control_command_1, while_command, if_command): Update.
9180 (realloc_body_list): Remove.
9181 (process_next_line, recurse_read_control_structure): Update.
9182 (read_command_lines, read_command_lines_1): Return counted_command_line.
9183 (free_command_lines): Use "delete".
9184 (copy_command_lines): Remove.
9185 (define_command, document_command, show_user_1): Update.
9186 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9187 a counted_command_line.
9188 * breakpoint.h (counted_command_line): Remove typedef.
9189 (breakpoint_set_commands): Update.
9190 * breakpoint.c (check_no_tracepoint_commands)
9191 (validate_commands_for_breakpoint): Update.
9192 (breakpoint_set_commands): Change commands to be a
9193 counted_command_line.
9194 (commands_command_1, update_dprintf_command_list)
9195 (create_tracepoint_from_upload): Update.
9196
9197 2018-05-04 Tom Tromey <tom@tromey.com>
9198
9199 * cli/cli-decode.h (cmd_list_element): New constructor.
9200 (~cmd_list_element): New destructor.
9201 (struct cmd_list_element): Add initializers.
9202 * cli/cli-decode.c (do_add_cmd): Use "new".
9203 (delete_cmd): Use "delete".
9204
9205 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
9206 Pedro Alves <palves@redhat.com>
9207
9208 PR breakpoints/19806 and support for PR external/20207.
9209 * NEWS: Mention Aarch64 watchpoint improvements.
9210 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9211 watchpoints and PR external/20207 watchpoints.
9212 * nat/aarch64-linux-hw-point.c
9213 (kernel_supports_any_contiguous_range): New.
9214 (aarch64_watchpoint_offset): New.
9215 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9216 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9217 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9218 (aarch64_align_watchpoint): New parameters aligned_offset_p and
9219 next_addr_orig_p. Support PR external/20207 watchpoints.
9220 (aarch64_downgrade_regs): New.
9221 (aarch64_dr_state_insert_one_point): New parameters offset and
9222 addr_orig.
9223 (aarch64_dr_state_remove_one_point): Likewise.
9224 (aarch64_handle_breakpoint): Update caller.
9225 (aarch64_handle_aligned_watchpoint): Likewise.
9226 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9227 aligned_offset.
9228 (aarch64_linux_set_debug_regs): Remove const from state. Call
9229 aarch64_downgrade_regs.
9230 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9231 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9232 (DR_CONTROL_MASK): ... this.
9233 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9234 (unsigned int aarch64_watchpoint_offset): New prototype.
9235 (aarch64_linux_set_debug_regs): Remove const from state.
9236 * utils.c (align_up, align_down): Move to ...
9237 * common/common-utils.c (align_up, align_down): ... here.
9238 * utils.h (align_up, align_down): Move to ...
9239 * common/common-utils.h (align_up, align_down): ... here.
9240
9241 2018-05-04 Joel Brobecker <brobecker@adacore.com>
9242
9243 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9244 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9245 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9246 Re-implement to match the ABI as summarized in GCC's
9247 gcc/config/sparc/sparc.c. All callers updated.
9248 (sparc32_store_arguments): Remove assertion.
9249
9250 2018-05-04 Tom Tromey <tom@tromey.com>
9251
9252 * printcmd.c: Don't include tui.h.
9253 (decode_format): Use skip_spaces.
9254
9255 2018-05-04 Tom Tromey <tom@tromey.com>
9256
9257 PR gdb/22619:
9258 * printcmd.c (last_count): New global.
9259 (x_command): Use saved count when repeating.
9260
9261 2018-05-04 Tom Tromey <tom@tromey.com>
9262
9263 * nto-procfs.c (do_closedir_cleanup): Remove.
9264 (procfs_pidlist): Use gdb_dir_up.
9265 * procfs.c (do_closedir_cleanup): Remove.
9266 (proc_update_threads): Use gdb_dir_up.
9267 * common/filestuff.h (struct gdb_dir_deleter): New.
9268 (gdb_dir_up): New typedef.
9269
9270 2018-05-04 Tom Tromey <tom@tromey.com>
9271
9272 * ada-lang.c (print_mention_exception): Use std::string.
9273
9274 2018-05-04 Tom Tromey <tom@tromey.com>
9275
9276 * ada-lang.c (create_excep_cond_exprs): Update.
9277 (ada_exception_catchpoint_cond_string): Use std::string.
9278
9279 2018-05-04 Tom Tromey <tom@tromey.com>
9280
9281 * ada-lang.c (xget_renaming_scope): Return std::string.
9282 (old_renaming_is_invisible): Update.
9283
9284 2018-05-04 Tom Tromey <tom@tromey.com>
9285
9286 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9287 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9288
9289 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
9290
9291 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9292
9293 2018-05-04 Tom Tromey <tom@tromey.com>
9294
9295 * remote.c (remote_query_supported_append): Change type.
9296 (remote_check_symbols): Update.
9297
9298 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
9299
9300 PR gdb/11420
9301 * configure.ac: Prepend libpython.
9302 * python/python-config.py: Likewise.
9303 * configure: Regenerate.
9304
9305 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
9306
9307 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9308
9309 2018-05-03 Pedro Alves <palves@redhat.com>
9310
9311 * s390-linux-nat.c
9312 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9313 override. Write 'true' instead of '1'.
9314 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9315 declaration.
9316
9317 2018-05-02 Pedro Alves <palves@redhat.com>
9318
9319 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9320 add_inf_child_target.
9321 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9322 add_inf_child_target.
9323 * aix-thread.c (aix_thread_target_info): New.
9324 (aix_thread_target) <shortname, longname, doc>: Delete.
9325 <info>: New.
9326 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9327 add_inf_child_target.
9328 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9329 add_inf_child_target.
9330 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9331 add_inf_child_target.
9332 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9333 add_inf_child_target.
9334 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9335 add_inf_child_target.
9336 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9337 add_inf_child_target.
9338 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9339 add_inf_child_target.
9340 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9341 add_inf_child_target.
9342 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9343 add_inf_child_target.
9344 * bfd-target.c (target_bfd_target_info): New.
9345 (target_bfd) <shortname, longname, doc>: Delete.
9346 <info>: New.
9347 * bsd-kvm.c (bsd_kvm_target_info): New.
9348 (bsd_kvm_target) <shortname, longname, doc>: Delete.
9349 <info>: New.
9350 (bsd_kvm_target::open): Rename to ...
9351 (bsd_kvm_target_open): ... this. Adjust.
9352 * bsd-uthread.c (bsd_uthread_target_info): New.
9353 (bsd_uthread_target) <shortname, longname, doc>: Delete.
9354 <info>: New.
9355 * corefile.c (core_file_command): Adjust.
9356 * corelow.c (core_target_info): New.
9357 (core_target) <shortname, longname, doc>: Delete.
9358 <info>: New.
9359 (core_target::open): Rename to ...
9360 (core_target_open): ... this. Adjust.
9361 * ctf.c (ctf_target_info): New.
9362 (ctf_target) <shortname, longname, doc>: Delete.
9363 <info>: New.
9364 (ctf_target::open): Rename to ...
9365 (ctf_target_open): ... this.
9366 (_initialize_ctf): Adjust.
9367 * exec.c (exec_target_info): New.
9368 (exec_target) <shortname, longname, doc>: Delete.
9369 <info>: New.
9370 (exec_target::open): Rename to ...
9371 (exec_target_open): ... this.
9372 * gdbcore.h (core_target_open): Declare.
9373 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9374 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9375 add_inf_child_target.
9376 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9377 add_inf_child_target.
9378 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9379 add_inf_child_target.
9380 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9381 add_inf_child_target.
9382 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9383 add_inf_child_target.
9384 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9385 add_inf_child_target.
9386 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9387 add_inf_child_target.
9388 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9389 add_inf_child_target.
9390 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9391 add_inf_child_target.
9392 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9393 add_inf_child_target.
9394 * inf-child.c (inf_child_target_info): New.
9395 (inf_child_target::info): New.
9396 (inf_child_open_target): Remove 'target' parameter. Use
9397 get_native_target instead.
9398 (inf_child_target::open): Delete.
9399 (add_inf_child_target): New.
9400 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9401 Delete.
9402 <info>: New.
9403 (add_inf_child_target): Declare.
9404 (inf_child_open_target): Declare.
9405 * linux-thread-db.c (thread_db_target_info): New.
9406 (thread_db_target) <shortname, longname, doc>: Delete.
9407 <info>: New.
9408 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9409 add_inf_child_target.
9410 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9411 add_inf_child_target.
9412 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9413 add_inf_child_target.
9414 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9415 add_inf_child_target.
9416 * make-target-delegates (print_class): Adjust.
9417 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9418 add_inf_child_target.
9419 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9420 add_inf_child_target.
9421 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9422 add_inf_child_target.
9423 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9424 add_inf_child_target.
9425 * nto-procfs.c (nto_native_target_info): New.
9426 (nto_procfs_target_native) <shortname, longname, doc>:
9427 Delete.
9428 <info>: New.
9429 (nto_procfs_target_info): New.
9430 (nto_procfs_target_procfs) <shortname, longname, doc>:
9431 Delete.
9432 <info>: New.
9433 (init_procfs_targets): Adjust.
9434 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9435 add_inf_child_target.
9436 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9437 add_inf_child_target.
9438 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9439 add_inf_child_target.
9440 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9441 add_inf_child_target.
9442 * ravenscar-thread.c (ravenscar_target_info): New.
9443 (ravenscar_thread_target) <shortname, longname, doc>:
9444 Delete.
9445 <info>: New.
9446 * record-btrace.c (record_btrace_target_info):
9447 (record_btrace_target) <shortname, longname, doc>: Delete.
9448 <info>: New.
9449 (record_btrace_target::open): Rename to ...
9450 (record_btrace_target_open): ... this. Adjust.
9451 * record-full.c (record_longname, record_doc): New.
9452 (record_full_base_target) <shortname, longname, doc>: Delete.
9453 <info>: New.
9454 (record_full_target_info): New.
9455 (record_full_target): <shortname>: Delete.
9456 <info>: New.
9457 (record_full_core_open_1, record_full_open_1): Update comments.
9458 (record_full_base_target::open): Rename to ...
9459 (record_full_open): ... this.
9460 (cmd_record_full_restore): Update.
9461 (_initialize_record_full): Update.
9462 * remote-sim.c (remote_sim_target_info): New.
9463 (gdbsim_target) <shortname, longname, doc>: Delete.
9464 <info>: New.
9465 (gdbsim_target::open): Rename to ...
9466 (gdbsim_target_open): ... this.
9467 (_initialize_remote_sim): Adjust.
9468 * remote.c (remote_doc): New.
9469 (remote_target_info): New.
9470 (remote_target) <shortname, longname, doc>: Delete.
9471 <info>: New.
9472 (extended_remote_target_info): New.
9473 (extended_remote_target) <shortname, longname, doc>: Delete.
9474 <info>: New.
9475 (remote_target::open_1): Make static. Adjust.
9476 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9477 * s390-linux-nat.c (_initialize_s390_nat): Use
9478 add_inf_child_target.
9479 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9480 add_inf_child_target.
9481 * sol-thread.c (thread_db_target_info): New.
9482 (sol_thread_target) <shortname, longname, doc>: Delete.
9483 <info>: New.
9484 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9485 add_inf_child_target.
9486 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9487 add_inf_child_target.
9488 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9489 add_inf_child_target.
9490 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9491 add_inf_child_target.
9492 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9493 add_inf_child_target.
9494 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9495 add_inf_child_target.
9496 * spu-linux-nat.c (_initialize_spu_nat): Use
9497 add_inf_child_target.
9498 * spu-multiarch.c (spu_multiarch_target_info): New.
9499 (spu_multiarch_target) <shortname, longname, doc>: Delete.
9500 <info>: New.
9501 * target-delegates.c: Regenerate.
9502 * target.c: Include <unordered_map>.
9503 (target_ops_p): Delete.
9504 (DEF_VEC_P(target_ops_p)): Delete.
9505 (target_factories): New.
9506 (test_target_info): New.
9507 (test_target_ops::info): New.
9508 (open_target): Adjust to use target_factories.
9509 (add_target_with_completer): Rename to ...
9510 (add_target): ... this. Change prototype. Register target_info
9511 and open callback in target_factories. Register target_info in
9512 command context instead of target_ops.
9513 (add_target): Delete old implementation.
9514 (add_deprecated_target_alias): Change prototype. Adjust.
9515 (the_native_target): New.
9516 (set_native_target, get_native_target): New.
9517 (find_default_run_target): Use the_native_target.
9518 (find_attach_target, find_run_target): Simplify.
9519 (target_ops::open): Delete.
9520 (dummy_target_info): New.
9521 (dummy_target::shortname, dummy_target::longname)
9522 (dummy_target::doc): Delete.
9523 (dummy_target::info): New.
9524 (debug_target::shortname, debug_target::longname)
9525 (debug_target::doc): Delete.
9526 (debug_target::info): New.
9527 * target.h (struct target_info): New.
9528 (target_ops::~target_ops): Add comment.
9529 (target_ops::info): New.
9530 (target_ops::shortname, target_ops::longname, target_ops::doc): No
9531 longer virtual. Implement in terms of target_info.
9532 (set_native_target, get_native_target): Declare.
9533 (target_open_ftype): New.
9534 (add_target, add_target_with_completer)
9535 (add_deprecated_target_alias): Change prototype.
9536 (test_target) <shortname, longname, doc>: Delete.
9537 <info>: New.
9538 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9539 add_inf_child_target.
9540 * tracefile-tfile.c (tfile_target_info): New.
9541 (tfile_target) <shortname, longname, doc>: Delete.
9542 <info>: New.
9543 (tfile_target::open): Rename to ...
9544 (tfile_target_open): ... this.
9545 (_initialize_tracefile_tfile): Adjust.
9546 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9547 add_inf_child_target.
9548 * windows-nat.c (_initialize_windows_nat): Use
9549 add_inf_child_target.
9550 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9551 add_inf_child_target.
9552
9553 2018-05-02 Pedro Alves <palves@redhat.com>
9554
9555 * linux-nat.h (linux_nat_target) <low_new_thread,
9556 low_delete_thread, low_new_fork, low_forget_process,
9557 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9558 New virtual methods.
9559 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9560 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9561 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9562 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9563 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9564 Delete.
9565 * linux-fork.c (delete_fork): Adjust to call low method.
9566 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9567 (linux_nat_new_fork, linux_nat_forget_process_hook)
9568 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9569 (linux_nat_status_is_event):
9570 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9571 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9572 to call low method.
9573 (sigtrap_is_event): Rename to ...
9574 (linux_nat_target::low_status_is_event): ... this.
9575 (linux_nat_set_status_is_event): Delete.
9576 (save_stop_reason, linux_nat_wait_1)
9577 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9578 low methods.
9579 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9580 (linux_nat_set_new_fork, linux_nat_set_forget_process)
9581 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9582 (linux_nat_set_prepare_to_resume): Delete.
9583 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9584 low virtual methods.
9585 * amd64-linux-nat.c: Likewise.
9586 * arm-linux-nat.c: Likewise.
9587 * i386-linux-nat.c: Likewise.
9588 * ia64-linux-nat.c: Likewise.
9589 * mips-linux-nat.c: Likewise.
9590 * ppc-linux-nat.c: Likewise.
9591 * s390-linux-nat.c: Likewise.
9592 * sparc64-linux-nat.c: Likewise.
9593 * x86-linux-nat.c: Likewise.
9594 * x86-linux-nat.h: Include "nat/x86-linux.h".
9595 (x86_linux_nat_target) <low_new_fork, low_forget_process,
9596 low_prepare_to_resume, low_new_thread, low_delete_thread>:
9597 Override methods.
9598
9599 2018-05-02 Pedro Alves <palves@redhat.com>
9600
9601 * target.h (target_ops)
9602 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9603 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9604 stopped_by_watchpoint, have_continuable_watchpoint,
9605 stopped_data_address, watchpoint_addr_within_range,
9606 can_accel_watchpoint_condition, can_run, thread_alive,
9607 has_all_memory, has_memory, has_stack, has_registers,
9608 has_execution, can_async_p, is_async_p, supports_non_stop,
9609 always_non_stop_p, can_execute_reverse, supports_multi_process,
9610 supports_enable_disable_tracepoint,
9611 supports_disable_randomization, supports_string_tracing,
9612 supports_evaluation_of_breakpoint_conditions,
9613 can_run_breakpoint_commands, filesystem_is_local,
9614 can_download_tracepoint, get_trace_state_variable_value,
9615 set_trace_notes, get_tib_address, use_agent, can_use_agent,
9616 record_is_replaying, record_will_replay,
9617 augmented_libraries_svr4_read>: Adjust to return bool.
9618 * aarch64-linux-nat.c: All implementations adjusted.
9619 * aix-thread.c: All implementations adjusted.
9620 * arm-linux-nat.c: All implementations adjusted.
9621 * breakpoint.c: All implementations adjusted.
9622 * bsd-kvm.c: All implementations adjusted.
9623 * bsd-uthread.c: All implementations adjusted.
9624 * corelow.c: All implementations adjusted.
9625 * ctf.c: All implementations adjusted.
9626 * darwin-nat.c: All implementations adjusted.
9627 * darwin-nat.h: All implementations adjusted.
9628 * exec.c: All implementations adjusted.
9629 * fbsd-nat.c: All implementations adjusted.
9630 * fbsd-nat.h: All implementations adjusted.
9631 * gnu-nat.c: All implementations adjusted.
9632 * gnu-nat.h: All implementations adjusted.
9633 * go32-nat.c: All implementations adjusted.
9634 * ia64-linux-nat.c: All implementations adjusted.
9635 * inf-child.c: All implementations adjusted.
9636 * inf-child.h: All implementations adjusted.
9637 * inf-ptrace.c: All implementations adjusted.
9638 * inf-ptrace.h: All implementations adjusted.
9639 * linux-nat.c: All implementations adjusted.
9640 * linux-nat.h: All implementations adjusted.
9641 * mips-linux-nat.c: All implementations adjusted.
9642 * nto-procfs.c: All implementations adjusted.
9643 * ppc-linux-nat.c: All implementations adjusted.
9644 * procfs.c: All implementations adjusted.
9645 * ravenscar-thread.c: All implementations adjusted.
9646 * record-btrace.c: All implementations adjusted.
9647 * record-full.c: All implementations adjusted.
9648 * remote-sim.c: All implementations adjusted.
9649 * remote.c: All implementations adjusted.
9650 * s390-linux-nat.c: All implementations adjusted.
9651 * sol-thread.c: All implementations adjusted.
9652 * spu-multiarch.c: All implementations adjusted.
9653 * target-delegates.c: All implementations adjusted.
9654 * target.c: All implementations adjusted.
9655 * target.h: All implementations adjusted.
9656 * tracefile-tfile.c: All implementations adjusted.
9657 * tracefile.c: All implementations adjusted.
9658 * tracefile.h: All implementations adjusted.
9659 * windows-nat.c: All implementations adjusted.
9660 * x86-linux-nat.h: All implementations adjusted.
9661 * x86-nat.h: All implementations adjusted.
9662
9663 2018-05-02 Pedro Alves <palves@redhat.com>
9664
9665 * make-target-delegates (scan_target_h): Don't trim lines here.
9666 Replace sequences of tabs and/or whitespace with a single
9667 whitespace.
9668 (top level, parsing methods): Trim each line before processing it
9669 here.
9670
9671 2018-05-02 Pedro Alves <palves@redhat.com>
9672 John Baldwin <jhb@freebsd.org>
9673
9674 * target.h (enum strata) <debug_stratum>: New.
9675 (struct target_ops) <all delegation methods>: Replace by C++
9676 virtual methods, and drop "to_" prefix. All references updated
9677 throughout.
9678 <to_shortname, to_longname, to_doc, to_data,
9679 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9680 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9681 virtual methods. All references updated throughout.
9682 <can_attach, supports_terminal_ours, can_create_inferior,
9683 get_thread_control_capabilities, attach_no_wait>: New
9684 virtual methods.
9685 <insert_breakpoint, remove_breakpoint>: Now
9686 TARGET_DEFAULT_NORETURN methods.
9687 <info_proc>: Now returns bool.
9688 <to_magic>: Delete.
9689 (OPS_MAGIC): Delete.
9690 (current_target): Delete. All references replaced by references
9691 to ...
9692 (target_stack): ... this. New.
9693 (target_shortname, target_longname): Adjust.
9694 (target_can_run): Now a function declaration.
9695 (default_child_has_all_memory, default_child_has_memory)
9696 (default_child_has_stack, default_child_has_registers)
9697 (default_child_has_execution): Remove target_ops parameter.
9698 (complete_target_initialization): Delete.
9699 (memory_breakpoint_target): New template class.
9700 (test_target_ops): Refactor as a C++ class with virtual methods.
9701 * make-target-delegates (NAME_PART): Tighten.
9702 (POINTER_PART, CP_SYMBOL): New.
9703 (SIMPLE_RETURN_PART): Reimplement.
9704 (VEC_RETURN_PART): Expect less.
9705 (RETURN_PART, VIRTUAL_PART): New.
9706 (METHOD): Adjust to C++ virtual methods.
9707 (scan_target_h): Remove reference to C99.
9708 (dname): Output "target_ops::" prefix.
9709 (write_function_header): Adjust to output a C++ class method.
9710 (write_declaration): New.
9711 (write_delegator): Adjust to output a C++ class method.
9712 (tdname): Output "dummy_target::" prefix.
9713 (write_tdefault, write_debugmethod): Adjust to output a C++ class
9714 method.
9715 (tdefault_names, debug_names): Delete.
9716 (return_types, tdefaults, styles, argtypes_array): New.
9717 (top level): All methods are delegators.
9718 (print_class): New.
9719 (top level): Print dummy_target and debug_target classes.
9720 * target-delegates.c: Regenerate.
9721 * target-debug.h (target_debug_print_enum_info_proc_what)
9722 (target_debug_print_thread_control_capabilities)
9723 (target_debug_print_thread_info_p): New.
9724 * target.c (dummy_target): Delete.
9725 (the_dummy_target, the_debug_target): New.
9726 (target_stack): Now extern.
9727 (set_targetdebug): Push/unpush debug target.
9728 (default_child_has_all_memory, default_child_has_memory)
9729 (default_child_has_stack, default_child_has_registers)
9730 (default_child_has_execution): Remove target_ops parameter.
9731 (complete_target_initialization): Delete.
9732 (add_target_with_completer): No longer call
9733 complete_target_initialization.
9734 (target_supports_terminal_ours): Use regular delegation.
9735 (update_current_target): Delete.
9736 (push_target): No longer check magic number. Don't call
9737 update_current_target.
9738 (unpush_target): Don't call update_current_target.
9739 (target_is_pushed): No longer check magic number.
9740 (target_require_runnable): Skip for all stratums over
9741 process_stratum.
9742 (target_ops::info_proc): New.
9743 (target_info_proc): Use find_target_at and
9744 find_default_run_target.
9745 (target_supports_disable_randomization): Use regular delegation.
9746 (target_get_osdata): Use find_target_at.
9747 (target_ops::open, target_ops::close, target_ops::can_attach)
9748 (target_ops::attach, target_ops::can_create_inferior)
9749 (target_ops::create_inferior, target_ops::can_run)
9750 (target_can_run): New.
9751 (default_fileio_target): Use regular delegation.
9752 (target_ops::fileio_open, target_ops::fileio_pwrite)
9753 (target_ops::fileio_pread, target_ops::fileio_fstat)
9754 (target_ops::fileio_close, target_ops::fileio_unlink)
9755 (target_ops::fileio_readlink): New.
9756 (target_fileio_open_1, target_fileio_unlink)
9757 (target_fileio_readlink): Always call the target method. Handle
9758 FILEIO_ENOSYS.
9759 (return_zero, return_zero_has_execution): Delete.
9760 (init_dummy_target): Delete.
9761 (dummy_target::dummy_target, dummy_target::shortname)
9762 (dummy_target::longname, dummy_target::doc)
9763 (debug_target::debug_target, debug_target::shortname)
9764 (debug_target::longname, debug_target::doc): New.
9765 (target_supports_delete_record): Use regular delegation.
9766 (setup_target_debug): Delete.
9767 (maintenance_print_target_stack): Skip debug_stratum.
9768 (initialize_targets): Instantiate the_dummy_target and
9769 the_debug_target.
9770 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9771 use target_stack.
9772 (target_auxv_search, fprint_target_auxv): Adjust.
9773 (info_auxv_command): Adjust to use target_stack.
9774 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9775 * exceptions.c (print_flush): Handle a NULL target_stack.
9776 * regcache.c (target_ops_no_register): Refactor as class with
9777 virtual methods.
9778
9779 * exec.c (exec_target): New class.
9780 (exec_ops): Now an exec_target.
9781 (exec_open, exec_close_1, exec_get_section_table)
9782 (exec_xfer_partial, exec_files_info, exec_has_memory)
9783 (exec_make_note_section): Refactor as exec_target methods.
9784 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9785 Delete.
9786 (exec_target::find_memory_regions): New.
9787 (_initialize_exec): Don't call init_exec_ops.
9788 * gdbcore.h (exec_file_clear): Delete.
9789
9790 * corefile.c (core_target): Delete.
9791 (core_file_command): Adjust.
9792 * corelow.c (core_target): New class.
9793 (the_core_target): New.
9794 (core_close): Remove target_ops parameter.
9795 (core_close_cleanup): Adjust.
9796 (core_target::close): New.
9797 (core_open, core_detach, get_core_registers, core_files_info)
9798 (core_xfer_partial, core_thread_alive, core_read_description)
9799 (core_pid_to_str, core_thread_name, core_has_memory)
9800 (core_has_stack, core_has_registers, core_info_proc): Rework as
9801 core_target methods.
9802 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9803 (_initialize_corelow): Initialize the_core_target.
9804 * gdbcore.h (core_target): Delete.
9805 (the_core_target): New.
9806
9807 * ctf.c: (ctf_target): New class.
9808 (ctf_ops): Now a ctf_target.
9809 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9810 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9811 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9812 methods.
9813 (init_ctf_ops): Delete.
9814 (_initialize_ctf): Don't call it.
9815 * tracefile-tfile.c (tfile_target): New class.
9816 (tfile_ops): Now a tfile_target.
9817 (tfile_open, tfile_close, tfile_files_info)
9818 (tfile_get_tracepoint_status, tfile_trace_find)
9819 (tfile_fetch_registers, tfile_xfer_partial)
9820 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9821 Refactor as tfile_target methods.
9822 (tfile_xfer_partial_features): Remove target_ops parameter.
9823 (init_tfile_ops): Delete.
9824 (_initialize_tracefile_tfile): Don't call it.
9825 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9826 (tracefile_has_stack, tracefile_has_registers)
9827 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9828 tracefile_target methods.
9829 (init_tracefile_ops): Delete.
9830 (tracefile_target::tracefile_target): New.
9831 * tracefile.h: Include "target.h".
9832 (tracefile_target): New class.
9833 (init_tracefile_ops): Delete.
9834
9835 * spu-multiarch.c (spu_multiarch_target): New class.
9836 (spu_ops): Now a spu_multiarch_target.
9837 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9838 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9839 (spu_search_memory, spu_mourn_inferior): Refactor as
9840 spu_multiarch_target methods.
9841 (init_spu_ops): Delete.
9842 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9843 complete_target_initialization.
9844
9845 * ravenscar-thread.c (ravenscar_thread_target): New class.
9846 (ravenscar_ops): Now a ravenscar_thread_target.
9847 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9848 (ravenscar_thread_alive, ravenscar_pid_to_str)
9849 (ravenscar_fetch_registers, ravenscar_store_registers)
9850 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9851 (ravenscar_stopped_by_hw_breakpoint)
9852 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9853 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9854 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9855 methods.
9856 (init_ravenscar_thread_ops): Delete.
9857 (_initialize_ravenscar): Remove references to
9858 init_ravenscar_thread_ops and complete_target_initialization.
9859
9860 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9861 (bsd_uthread_target): New class.
9862 (bsd_uthread_ops): Now a bsd_uthread_target.
9863 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9864 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9865 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9866 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9867 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9868 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9869 (bsd_uthread_target): Delete function.
9870 (_initialize_bsd_uthread): Remove reference to
9871 complete_target_initialization.
9872
9873 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9874 (target_bfd): ... this new class.
9875 (target_bfd_xfer_partial, target_bfd_get_section_table)
9876 (target_bfd_close): Refactor as target_bfd methods.
9877 (target_bfd::~target_bfd): New.
9878 (target_bfd_reopen): Adjust.
9879 (target_bfd::close): New.
9880
9881 * record-btrace.c (record_btrace_target): New class.
9882 (record_btrace_ops): Now a record_btrace_target.
9883 (record_btrace_open, record_btrace_stop_recording)
9884 (record_btrace_disconnect, record_btrace_close)
9885 (record_btrace_async, record_btrace_info)
9886 (record_btrace_insn_history, record_btrace_insn_history_range)
9887 (record_btrace_insn_history_from, record_btrace_call_history)
9888 (record_btrace_call_history_range)
9889 (record_btrace_call_history_from, record_btrace_record_method)
9890 (record_btrace_is_replaying, record_btrace_will_replay)
9891 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9892 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9893 (record_btrace_store_registers, record_btrace_prepare_to_store)
9894 (record_btrace_to_get_unwinder)
9895 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9896 (record_btrace_commit_resume, record_btrace_wait)
9897 (record_btrace_stop, record_btrace_can_execute_reverse)
9898 (record_btrace_stopped_by_sw_breakpoint)
9899 (record_btrace_supports_stopped_by_sw_breakpoint)
9900 (record_btrace_stopped_by_hw_breakpoint)
9901 (record_btrace_supports_stopped_by_hw_breakpoint)
9902 (record_btrace_update_thread_list, record_btrace_thread_alive)
9903 (record_btrace_goto_begin, record_btrace_goto_end)
9904 (record_btrace_goto, record_btrace_stop_replaying_all)
9905 (record_btrace_execution_direction)
9906 (record_btrace_prepare_to_generate_core)
9907 (record_btrace_done_generating_core): Refactor as
9908 record_btrace_target methods.
9909 (init_record_btrace_ops): Delete.
9910 (_initialize_record_btrace): Remove reference to
9911 init_record_btrace_ops.
9912 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9913 the execution_direction global.
9914 (record_full_base_target, record_full_target)
9915 (record_full_core_target): New classes.
9916 (record_full_ops): Now a record_full_target.
9917 (record_full_core_ops): Now a record_full_core_target.
9918 (record_full_target::detach, record_full_target::disconnect)
9919 (record_full_core_target::disconnect)
9920 (record_full_target::mourn_inferior, record_full_target::kill):
9921 New.
9922 (record_full_open, record_full_close, record_full_async): Refactor
9923 as methods of the record_full_base_target class.
9924 (record_full_resume, record_full_commit_resume): Refactor
9925 as methods of the record_full_target class.
9926 (record_full_wait, record_full_stopped_by_watchpoint)
9927 (record_full_stopped_data_address)
9928 (record_full_stopped_by_sw_breakpoint)
9929 (record_full_supports_stopped_by_sw_breakpoint)
9930 (record_full_stopped_by_hw_breakpoint)
9931 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9932 methods of the record_full_base_target class.
9933 (record_full_store_registers, record_full_xfer_partial)
9934 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9935 Refactor as methods of the record_full_target class.
9936 (record_full_can_execute_reverse, record_full_get_bookmark)
9937 (record_full_goto_bookmark, record_full_execution_direction)
9938 (record_full_record_method, record_full_info, record_full_delete)
9939 (record_full_is_replaying, record_full_will_replay)
9940 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9941 (record_full_stop_replaying): Refactor as methods of the
9942 record_full_base_target class.
9943 (record_full_core_resume, record_full_core_kill)
9944 (record_full_core_fetch_registers)
9945 (record_full_core_prepare_to_store)
9946 (record_full_core_store_registers, record_full_core_xfer_partial)
9947 (record_full_core_insert_breakpoint)
9948 (record_full_core_remove_breakpoint)
9949 (record_full_core_has_execution): Refactor
9950 as methods of the record_full_core_target class.
9951 (record_full_base_target::supports_delete_record): New.
9952 (init_record_full_ops): Delete.
9953 (init_record_full_core_ops): Delete.
9954 (record_full_save): Refactor as method of the
9955 record_full_base_target class.
9956 (_initialize_record_full): Remove references to
9957 init_record_full_ops and init_record_full_core_ops.
9958
9959 * remote.c (remote_target, extended_remote_target): New classes.
9960 (remote_ops): Now a remote_target.
9961 (extended_remote_ops): Now an extended_remote_target.
9962 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9963 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9964 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9965 (remote_pass_signals, remote_set_syscall_catchpoint)
9966 (remote_program_signals, )
9967 (remote_thread_always_alive): Remove target_ops parameter.
9968 (remote_thread_alive, remote_thread_name)
9969 (remote_update_thread_list, remote_threads_extra_info)
9970 (remote_static_tracepoint_marker_at)
9971 (remote_static_tracepoint_markers_by_strid)
9972 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9973 (remote_open): Refactor as methods of remote_target.
9974 (extended_remote_open, extended_remote_detach)
9975 (extended_remote_attach, extended_remote_post_attach):
9976 (extended_remote_supports_disable_randomization)
9977 (extended_remote_create_inferior): : Refactor as method of
9978 extended_remote_target.
9979 (remote_set_permissions, remote_open_1, remote_detach)
9980 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9981 (remote_resume, remote_commit_resume, remote_stop)
9982 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9983 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9984 (remote_prepare_to_store, remote_store_registers)
9985 (remote_flash_erase, remote_flash_done, remote_files_info)
9986 (remote_kill, remote_mourn, remote_insert_breakpoint)
9987 (remote_remove_breakpoint, remote_insert_watchpoint)
9988 (remote_watchpoint_addr_within_range)
9989 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9990 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9991 (remote_supports_stopped_by_sw_breakpoint)
9992 (remote_stopped_by_hw_breakpoint)
9993 (remote_supports_stopped_by_hw_breakpoint)
9994 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9995 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9996 (remote_verify_memory): Refactor as methods of remote_target.
9997 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9998 parameter.
9999 (remote_xfer_partial, remote_get_memory_xfer_limit)
10000 (remote_search_memory, remote_rcmd, remote_memory_map)
10001 (remote_pid_to_str, remote_get_thread_local_address)
10002 (remote_get_tib_address, remote_read_description): Refactor as
10003 methods of remote_target.
10004 (remote_target::fileio_open, remote_target::fileio_pwrite)
10005 (remote_target::fileio_pread, remote_target::fileio_close): New.
10006 (remote_hostio_readlink, remote_hostio_fstat)
10007 (remote_filesystem_is_local, remote_can_execute_reverse)
10008 (remote_supports_non_stop, remote_supports_disable_randomization)
10009 (remote_supports_multi_process, remote_supports_cond_breakpoints)
10010 (remote_supports_enable_disable_tracepoint)
10011 (remote_supports_string_tracing)
10012 (remote_can_run_breakpoint_commands, remote_trace_init)
10013 (remote_download_tracepoint, remote_can_download_tracepoint)
10014 (remote_download_trace_state_variable, remote_enable_tracepoint)
10015 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10016 (remote_trace_start, remote_get_trace_status)
10017 (remote_get_tracepoint_status, remote_trace_stop)
10018 (remote_trace_find, remote_get_trace_state_variable_value)
10019 (remote_save_trace_data, remote_get_raw_trace_data)
10020 (remote_set_disconnected_tracing, remote_core_of_thread)
10021 (remote_set_circular_trace_buffer, remote_traceframe_info)
10022 (remote_get_min_fast_tracepoint_insn_len)
10023 (remote_set_trace_buffer_size, remote_set_trace_notes)
10024 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10025 (remote_disable_btrace, remote_teardown_btrace)
10026 (remote_read_btrace, remote_btrace_conf)
10027 (remote_augmented_libraries_svr4_read, remote_load)
10028 (remote_pid_to_exec_file, remote_can_do_single_step)
10029 (remote_execution_direction, remote_thread_handle_to_thread_info):
10030 Refactor as methods of remote_target.
10031 (init_remote_ops, init_extended_remote_ops): Delete.
10032 (remote_can_async_p, remote_is_async_p, remote_async)
10033 (remote_thread_events, remote_upload_tracepoints)
10034 (remote_upload_trace_state_variables): Refactor as methods of
10035 remote_target.
10036 (_initialize_remote): Remove references to init_remote_ops and
10037 init_extended_remote_ops.
10038
10039 * remote-sim.c (gdbsim_target): New class.
10040 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10041 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10042 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10043 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10044 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10045 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10046 Refactor as methods of gdbsim_target.
10047 (gdbsim_ops): Now a gdbsim_target.
10048 (init_gdbsim_ops): Delete.
10049 (gdbsim_cntrl_c): Adjust.
10050 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10051
10052 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10053 (the_amd64_linux_nat_target): New.
10054 (amd64_linux_fetch_inferior_registers)
10055 (amd64_linux_store_inferior_registers): Refactor as methods of
10056 amd64_linux_nat_target.
10057 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
10058 * i386-linux-nat.c: Don't include "linux-nat.h".
10059 (i386_linux_nat_target): New class.
10060 (the_i386_linux_nat_target): New.
10061 (i386_linux_fetch_inferior_registers)
10062 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10063 as methods of i386_linux_nat_target.
10064 (_initialize_i386_linux_nat): Adjust. Set linux_target.
10065 * inf-child.c (inf_child_ops): Delete.
10066 (inf_child_fetch_inferior_registers)
10067 (inf_child_store_inferior_registers): Delete.
10068 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10069 methods of inf_child_target.
10070 (inf_child_target::supports_terminal_ours)
10071 (inf_child_target::terminal_init)
10072 (inf_child_target::terminal_inferior)
10073 (inf_child_target::terminal_ours_for_output)
10074 (inf_child_target::terminal_ours, inf_child_target::interrupt)
10075 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10076 New.
10077 (inf_child_open, inf_child_disconnect, inf_child_close)
10078 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10079 (inf_child_post_startup_inferior, inf_child_can_run)
10080 (inf_child_pid_to_exec_file): Refactor as methods of
10081 inf_child_target.
10082 (inf_child_follow_fork): Delete.
10083 (inf_child_target::can_create_inferior)
10084 (inf_child_target::can_attach): New.
10085 (inf_child_target::has_all_memory, inf_child_target::has_memory)
10086 (inf_child_target::has_stack, inf_child_target::has_registers)
10087 (inf_child_target::has_execution): New.
10088 (inf_child_fileio_open, inf_child_fileio_pwrite)
10089 (inf_child_fileio_pread, inf_child_fileio_fstat)
10090 (inf_child_fileio_close, inf_child_fileio_unlink)
10091 (inf_child_fileio_readlink, inf_child_use_agent)
10092 (inf_child_can_use_agent): Refactor as methods of
10093 inf_child_target.
10094 (return_zero, inf_child_target): Delete.
10095 (inf_child_target::inf_child_target): New.
10096 * inf-child.h: Include "target.h".
10097 (inf_child_target): Delete function prototype.
10098 (inf_child_target): New class.
10099 (inf_child_open_target, inf_child_mourn_inferior)
10100 (inf_child_maybe_unpush_target): Delete.
10101 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10102 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10103 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10104 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10105 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10106 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10107 (inf_ptrace_wait, inf_ptrace_xfer_partial)
10108 (inf_ptrace_thread_alive, inf_ptrace_files_info)
10109 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10110 methods of inf_ptrace_target.
10111 (inf_ptrace_target): Delete function.
10112 * inf-ptrace.h: Include "inf-child.h".
10113 (inf_ptrace_target): Delete function declaration.
10114 (inf_ptrace_target): New class.
10115 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10116 * linux-nat.c (linux_target): New.
10117 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10118 (linux_nat_target::~linux_nat_target): New.
10119 (linux_child_post_attach, linux_child_post_startup_inferior)
10120 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10121 (linux_child_remove_fork_catchpoint)
10122 (linux_child_insert_vfork_catchpoint)
10123 (linux_child_remove_vfork_catchpoint)
10124 (linux_child_insert_exec_catchpoint)
10125 (linux_child_remove_exec_catchpoint)
10126 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10127 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10128 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10129 (linux_nat_stopped_data_address)
10130 (linux_nat_stopped_by_sw_breakpoint)
10131 (linux_nat_supports_stopped_by_sw_breakpoint)
10132 (linux_nat_stopped_by_hw_breakpoint)
10133 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10134 (linux_nat_kill, linux_nat_mourn_inferior)
10135 (linux_nat_xfer_partial, linux_nat_thread_alive)
10136 (linux_nat_update_thread_list, linux_nat_pid_to_str)
10137 (linux_nat_thread_name, linux_child_pid_to_exec_file)
10138 (linux_child_static_tracepoint_markers_by_strid)
10139 (linux_nat_is_async_p, linux_nat_can_async_p)
10140 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10141 (linux_nat_supports_multi_process)
10142 (linux_nat_supports_disable_randomization, linux_nat_async)
10143 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10144 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10145 (linux_nat_fileio_open, linux_nat_fileio_readlink)
10146 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10147 methods of linux_nat_target.
10148 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10149 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10150 parameter.
10151 (check_stopped_by_watchpoint): Adjust.
10152 (linux_xfer_partial): Delete.
10153 (linux_target_install_ops, linux_target, linux_nat_add_target):
10154 Delete.
10155 (linux_nat_target::linux_nat_target): New.
10156 * linux-nat.h: Include "inf-ptrace.h".
10157 (linux_nat_target): New.
10158 (linux_target, linux_target_install_ops, linux_nat_add_target):
10159 Delete function declarations.
10160 (linux_target): Declare global.
10161 * linux-thread-db.c (thread_db_target): New.
10162 (thread_db_target::thread_db_target): New.
10163 (thread_db_ops): Delete.
10164 (the_thread_db_target): New.
10165 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10166 (thread_db_update_thread_list, thread_db_pid_to_str)
10167 (thread_db_extra_thread_info)
10168 (thread_db_thread_handle_to_thread_info)
10169 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10170 (thread_db_resume): Refactor as methods of thread_db_target.
10171 (init_thread_db_ops): Delete.
10172 (_initialize_thread_db): Remove reference to init_thread_db_ops.
10173 * x86-linux-nat.c: Don't include "linux-nat.h".
10174 (super_post_startup_inferior): Delete.
10175 (x86_linux_nat_target::~x86_linux_nat_target): New.
10176 (x86_linux_child_post_startup_inferior)
10177 (x86_linux_read_description, x86_linux_enable_btrace)
10178 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10179 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10180 methods of x86_linux_nat_target.
10181 (x86_linux_create_target): Delete. Bits folded ...
10182 (x86_linux_add_target): ... here. Now takes a linux_nat_target
10183 pointer.
10184 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10185 (x86_linux_nat_target): New class.
10186 (x86_linux_create_target): Delete.
10187 (x86_linux_add_target): Now takes a linux_nat_target pointer.
10188 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10189 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10190 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10191 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10192 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10193 make extern.
10194 (x86_use_watchpoints): Delete.
10195 * x86-nat.h: Include "breakpoint.h" and "target.h".
10196 (x86_use_watchpoints): Delete.
10197 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10198 (x86_stopped_by_watchpoint, x86_stopped_data_address)
10199 (x86_insert_watchpoint, x86_remove_watchpoint)
10200 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10201 (x86_stopped_by_hw_breakpoint): New declarations.
10202 (x86_nat_target): New template class.
10203
10204 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10205 (the_ppc_linux_nat_target): New.
10206 (ppc_linux_fetch_inferior_registers)
10207 (ppc_linux_can_use_hw_breakpoint)
10208 (ppc_linux_region_ok_for_hw_watchpoint)
10209 (ppc_linux_ranged_break_num_registers)
10210 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10211 (ppc_linux_insert_mask_watchpoint)
10212 (ppc_linux_remove_mask_watchpoint)
10213 (ppc_linux_can_accel_watchpoint_condition)
10214 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10215 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10216 (ppc_linux_watchpoint_addr_within_range)
10217 (ppc_linux_masked_watch_num_registers)
10218 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10219 (ppc_linux_read_description): Refactor as methods of
10220 ppc_linux_nat_target.
10221 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
10222
10223 * procfs.c (procfs_xfer_partial): Delete forward declaration.
10224 (procfs_target): New class.
10225 (the_procfs_target): New.
10226 (procfs_target): Delete function.
10227 (procfs_auxv_parse, procfs_attach, procfs_detach)
10228 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10229 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10230 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10231 (procfs_create_inferior, procfs_update_thread_list)
10232 (procfs_thread_alive, procfs_pid_to_str)
10233 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10234 (procfs_stopped_data_address, procfs_insert_watchpoint)
10235 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10236 (proc_find_memory_regions, procfs_info_proc)
10237 (procfs_make_note_section): Refactor as methods of procfs_target.
10238 (_initialize_procfs): Adjust.
10239 * sol-thread.c (sol_thread_target): New class.
10240 (sol_thread_ops): Now a sol_thread_target.
10241 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10242 (sol_thread_fetch_registers, sol_thread_store_registers)
10243 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10244 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10245 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10246 (init_sol_thread_ops): Delete.
10247 (_initialize_sol_thread): Adjust. Remove references to
10248 init_sol_thread_ops and complete_target_initialization.
10249
10250 * windows-nat.c (windows_nat_target): New class.
10251 (windows_fetch_inferior_registers)
10252 (windows_store_inferior_registers, windows_resume, windows_wait)
10253 (windows_attach, windows_detach, windows_pid_to_exec_file)
10254 (windows_files_info, windows_create_inferior)
10255 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10256 (windows_close, windows_pid_to_str, windows_xfer_partial)
10257 (windows_get_tib_address, windows_get_ada_task_ptid)
10258 (windows_thread_name, windows_thread_alive): Refactor as
10259 windows_nat_target methods.
10260 (do_initial_windows_stuff): Adjust.
10261 (windows_target): Delete function.
10262 (_initialize_windows_nat): Adjust.
10263
10264 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10265 (darwin_mourn_inferior, darwin_kill_inferior)
10266 (darwin_create_inferior, darwin_attach, darwin_detach)
10267 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10268 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10269 (darwin_supports_multi_process): Refactor as darwin_nat_target
10270 methods.
10271 (darwin_resume_to, darwin_files_info): Delete.
10272 (_initialize_darwin_inferior): Rename to ...
10273 (_initialize_darwin_nat): ... this. Adjust to C++ification.
10274 * darwin-nat.h: Include "inf-child.h".
10275 (darwin_nat_target): New class.
10276 (darwin_complete_target): Delete.
10277 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10278 (darwin_target): New.
10279 (i386_darwin_fetch_inferior_registers)
10280 (i386_darwin_store_inferior_registers): Refactor as methods of
10281 darwin_nat_target.
10282 (darwin_complete_target): Delete, with ...
10283 (_initialize_i386_darwin_nat): ... bits factored out here.
10284
10285 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10286 (the_alpha_linux_nat_target): New.
10287 (alpha_linux_register_u_offset): Refactor as
10288 alpha_linux_nat_target method.
10289 (_initialize_alpha_linux_nat): Adjust.
10290 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10291 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10292 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10293 methods of linux_nat_trad_target.
10294 (linux_trad_target): Delete.
10295 * linux-nat-trad.h (linux_trad_target): Delete function.
10296 (linux_nat_trad_target): New class.
10297 * mips-linux-nat.c (mips_linux_nat_target): New class.
10298 (super_fetch_registers, super_store_registers, super_close):
10299 Delete.
10300 (the_mips_linux_nat_target): New.
10301 (mips64_linux_regsets_fetch_registers)
10302 (mips64_linux_regsets_store_registers)
10303 (mips64_linux_fetch_registers, mips64_linux_store_registers)
10304 (mips_linux_register_u_offset, mips_linux_read_description)
10305 (mips_linux_can_use_hw_breakpoint)
10306 (mips_linux_stopped_by_watchpoint)
10307 (mips_linux_stopped_data_address)
10308 (mips_linux_region_ok_for_hw_watchpoint)
10309 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10310 (mips_linux_close): Refactor as methods of mips_linux_nat.
10311 (_initialize_mips_linux_nat): Adjust to C++ification.
10312
10313 * aix-thread.c (aix_thread_target): New class.
10314 (aix_thread_ops): Now an aix_thread_target.
10315 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10316 (aix_thread_fetch_registers, aix_thread_store_registers)
10317 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10318 (aix_thread_thread_alive, aix_thread_pid_to_str)
10319 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10320 Refactor as methods of aix_thread_target.
10321 (init_aix_thread_ops): Delete.
10322 (_initialize_aix_thread): Remove references to init_aix_thread_ops
10323 and complete_target_initialization.
10324 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10325 (rs6000_nat_target): New class.
10326 (the_rs6000_nat_target): New.
10327 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10328 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10329 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10330 (super_create_inferior): Delete.
10331 (_initialize_rs6000_nat): Adjust to C++ification.
10332
10333 * arm-linux-nat.c (arm_linux_nat_target): New class.
10334 (the_arm_linux_nat_target): New.
10335 (arm_linux_fetch_inferior_registers)
10336 (arm_linux_store_inferior_registers, arm_linux_read_description)
10337 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10338 (arm_linux_remove_hw_breakpoint)
10339 (arm_linux_region_ok_for_hw_watchpoint)
10340 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10341 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10342 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10343 arm_linux_nat_target.
10344 (_initialize_arm_linux_nat): Adjust to C++ification.
10345
10346 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10347 (the_aarch64_linux_nat_target): New.
10348 (aarch64_linux_fetch_inferior_registers)
10349 (aarch64_linux_store_inferior_registers)
10350 (aarch64_linux_child_post_startup_inferior)
10351 (aarch64_linux_read_description)
10352 (aarch64_linux_can_use_hw_breakpoint)
10353 (aarch64_linux_insert_hw_breakpoint)
10354 (aarch64_linux_remove_hw_breakpoint)
10355 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10356 (aarch64_linux_region_ok_for_hw_watchpoint)
10357 (aarch64_linux_stopped_data_address)
10358 (aarch64_linux_stopped_by_watchpoint)
10359 (aarch64_linux_watchpoint_addr_within_range)
10360 (aarch64_linux_can_do_single_step): Refactor as methods of
10361 aarch64_linux_nat_target.
10362 (super_post_startup_inferior): Delete.
10363 (_initialize_aarch64_linux_nat): Adjust to C++ification.
10364
10365 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10366 (the_hppa_linux_nat_target): New.
10367 (hppa_linux_fetch_inferior_registers)
10368 (hppa_linux_store_inferior_registers): Refactor as methods of
10369 hppa_linux_nat_target.
10370 (_initialize_hppa_linux_nat): Adjust to C++ification.
10371
10372 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10373 (the_ia64_linux_nat_target): New.
10374 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10375 (ia64_linux_stopped_data_address)
10376 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10377 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10378 ia64_linux_nat_target methods.
10379 (super_xfer_partial): Delete.
10380 (_initialize_ia64_linux_nat): Adjust to C++ification.
10381
10382 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10383 (the_m32r_linux_nat_target): New.
10384 (m32r_linux_fetch_inferior_registers)
10385 (m32r_linux_store_inferior_registers): Refactor as
10386 m32r_linux_nat_target methods.
10387 (_initialize_m32r_linux_nat): Adjust to C++ification.
10388
10389 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10390 (the_m68k_linux_nat_target): New.
10391 (m68k_linux_fetch_inferior_registers)
10392 (m68k_linux_store_inferior_registers): Refactor as
10393 m68k_linux_nat_target methods.
10394 (_initialize_m68k_linux_nat): Adjust to C++ification.
10395
10396 * s390-linux-nat.c (s390_linux_nat_target): New class.
10397 (the_s390_linux_nat_target): New.
10398 (s390_linux_fetch_inferior_registers)
10399 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10400 (s390_insert_watchpoint, s390_remove_watchpoint)
10401 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10402 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10403 (s390_auxv_parse, s390_read_description): Refactor as methods of
10404 s390_linux_nat_target.
10405 (_initialize_s390_nat): Adjust to C++ification.
10406
10407 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10408 (the_sparc_linux_nat_target): New.
10409 (_initialize_sparc_linux_nat): Adjust to C++ification.
10410 * sparc-nat.c (sparc_fetch_inferior_registers)
10411 (sparc_store_inferior_registers): Remove target_ops parameter.
10412 * sparc-nat.h (sparc_fetch_inferior_registers)
10413 (sparc_store_inferior_registers): Remove target_ops parameter.
10414 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10415 (the_sparc64_linux_nat_target): New.
10416 (_initialize_sparc64_linux_nat): Adjust to C++ification.
10417
10418 * spu-linux-nat.c (spu_linux_nat_target): New class.
10419 (the_spu_linux_nat_target): New.
10420 (spu_child_post_startup_inferior, spu_child_post_attach)
10421 (spu_child_wait, spu_fetch_inferior_registers)
10422 (spu_store_inferior_registers, spu_xfer_partial)
10423 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10424 methods.
10425 (_initialize_spu_nat): Adjust to C++ification.
10426
10427 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10428 (the_tilegx_linux_nat_target): New.
10429 (fetch_inferior_registers, store_inferior_registers):
10430 Refactor as methods.
10431 (_initialize_tile_linux_nat): Adjust to C++ification.
10432
10433 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10434 (the_xtensa_linux_nat_target): New.
10435 (xtensa_linux_fetch_inferior_registers)
10436 (xtensa_linux_store_inferior_registers): Refactor as
10437 xtensa_linux_nat_target methods.
10438 (_initialize_xtensa_linux_nat): Adjust to C++ification.
10439
10440 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10441 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10442 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10443 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10444 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10445 (fbsd_stopped_by_sw_breakpoint)
10446 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10447 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10448 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10449 (fbsd_post_startup_inferior, fbsd_post_attach)
10450 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10451 (fbsd_set_syscall_catchpoint)
10452 (super_xfer_partial, super_resume, super_wait)
10453 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10454 (fbsd_handle_debug_trap): Remove target_ops parameter.
10455 (fbsd_nat_add_target): Delete.
10456 * fbsd-nat.h: Include "inf-ptrace.h".
10457 (fbsd_nat_add_target): Delete.
10458 (USE_SIGTRAP_SIGINFO): Define.
10459 (fbsd_nat_target): New class.
10460
10461 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10462 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10463 (amd64bsd_target): Delete.
10464 * amd64-bsd-nat.h: New file.
10465 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10466 "x86-bsd-nat.h".
10467 (amd64_fbsd_nat_target): New class.
10468 (the_amd64_fbsd_nat_target): New.
10469 (amd64fbsd_read_description): Refactor as method of
10470 amd64_fbsd_nat_target.
10471 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10472 (_initialize_amd64fbsd_nat): Adjust to C++ification.
10473 * amd64-nat.h (amd64bsd_target): Delete function declaration.
10474 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10475 (i386bsd_store_inferior_registers): Remove target_ops parameter.
10476 (i386bsd_target): Delete.
10477 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10478 (i386bsd_fetch_inferior_registers)
10479 (i386bsd_store_inferior_registers): Declare.
10480 (i386_bsd_nat_target): New class.
10481 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10482 (the_i386_fbsd_nat_target): New.
10483 (i386fbsd_resume, i386fbsd_read_description): Refactor as
10484 i386_fbsd_nat_target methods.
10485 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10486 (_initialize_i386fbsd_nat): Adjust to C++ification.
10487 * x86-bsd-nat.c (super_mourn_inferior): Delete.
10488 (x86bsd_mourn_inferior, x86bsd_target): Delete.
10489 (_initialize_x86_bsd_nat): Adjust to C++ification.
10490 * x86-bsd-nat.h: Include "x86-nat.h".
10491 (x86bsd_target): Delete declaration.
10492 (x86bsd_nat_target): New class.
10493
10494 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10495 (the_aarch64_fbsd_nat_target): New.
10496 (aarch64_fbsd_fetch_inferior_registers)
10497 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10498 aarch64_fbsd_nat_target.
10499 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10500 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10501 (the_alpha_bsd_nat_target): New.
10502 (alphabsd_fetch_inferior_registers)
10503 (alphabsd_store_inferior_registers): Refactor as
10504 alpha_bsd_nat_target methods.
10505 (_initialize_alphabsd_nat): Refactor as methods of
10506 alpha_bsd_nat_target.
10507 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10508 (the_amd64_nbsd_nat_target): New.
10509 (_initialize_amd64nbsd_nat): Adjust to C++ification.
10510 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10511 (the_amd64_obsd_nat_target): New.
10512 (_initialize_amd64obsd_nat): Adjust to C++ification.
10513 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10514 (the_arm_fbsd_nat_target): New.
10515 (arm_fbsd_fetch_inferior_registers)
10516 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10517 (_initialize_arm_fbsd_nat): Refactor as methods of
10518 arm_fbsd_nat_target.
10519 (_initialize_arm_fbsd_nat): Adjust to C++ification.
10520 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10521 (the_arm_netbsd_nat_target): New.
10522 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10523 arm_netbsd_nat_target.
10524 (_initialize_arm_netbsd_nat): Adjust to C++ification.
10525 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10526 (the_hppa_nbsd_nat_target): New.
10527 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10528 hppa_nbsd_nat_target methods.
10529 (_initialize_hppanbsd_nat): Adjust to C++ification.
10530 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10531 (the_hppa_obsd_nat_target): New.
10532 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10533 methods of hppa_obsd_nat_target.
10534 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
10535 add_target.
10536 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10537 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
10538 add_target.
10539 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10540 (_initialize_i386obsd_nat): Use add_target.
10541 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10542 (the_m68k_bsd_nat_target): New.
10543 (m68kbsd_fetch_inferior_registers)
10544 (m68kbsd_store_inferior_registers): Refactor as methods of
10545 m68k_bsd_nat_target.
10546 (_initialize_m68kbsd_nat): Adjust to C++ification.
10547 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10548 (the_mips_fbsd_nat_target): New.
10549 (mips_fbsd_fetch_inferior_registers)
10550 (mips_fbsd_store_inferior_registers): Refactor as methods of
10551 mips_fbsd_nat_target.
10552 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
10553 add_target.
10554 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10555 (the_mips_nbsd_nat_target): New.
10556 (mipsnbsd_fetch_inferior_registers)
10557 (mipsnbsd_store_inferior_registers): Refactor as methods of
10558 mips_nbsd_nat_target.
10559 (_initialize_mipsnbsd_nat): Adjust to C++ification.
10560 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10561 (the_mips64_obsd_nat_target): New.
10562 (mips64obsd_fetch_inferior_registers)
10563 (mips64obsd_store_inferior_registers): Refactor as methods of
10564 mips64_obsd_nat_target.
10565 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
10566 add_target.
10567 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10568 nbsd_nat_target.
10569 * nbsd-nat.h: Include "inf-ptrace.h".
10570 (nbsd_nat_target): New class.
10571 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10572 (obsd_wait): Refactor as methods of obsd_nat_target.
10573 (obsd_add_target): Delete.
10574 * obsd-nat.h: Include "inf-ptrace.h".
10575 (obsd_nat_target): New class.
10576 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10577 (the_ppc_fbsd_nat_target): New.
10578 (ppcfbsd_fetch_inferior_registers)
10579 (ppcfbsd_store_inferior_registers): Refactor as methods of
10580 ppc_fbsd_nat_target.
10581 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
10582 add_target.
10583 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10584 (the_ppc_nbsd_nat_target): New.
10585 (ppcnbsd_fetch_inferior_registers)
10586 (ppcnbsd_store_inferior_registers): Refactor as methods of
10587 ppc_nbsd_nat_target.
10588 (_initialize_ppcnbsd_nat): Adjust to C++ification.
10589 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10590 (the_ppc_obsd_nat_target): New.
10591 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10592 methods of ppc_obsd_nat_target.
10593 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
10594 add_target.
10595 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10596 (the_sh_nbsd_nat_target): New.
10597 (shnbsd_fetch_inferior_registers)
10598 (shnbsd_store_inferior_registers): Refactor as methods of
10599 sh_nbsd_nat_target.
10600 (_initialize_shnbsd_nat): Adjust to C++ification.
10601 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10602 (inf_ptrace_xfer_partial): Delete.
10603 (sparc_xfer_partial, sparc_target): Delete.
10604 * sparc-nat.h (sparc_fetch_inferior_registers)
10605 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10606 (sparc_target): Delete function declaration.
10607 (sparc_target): New template class.
10608 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10609 (_initialize_sparcnbsd_nat): Adjust to C++ification.
10610 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10611 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
10612 add_target.
10613 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10614 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10615 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10616 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
10617 add_target.
10618 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10619 (the_vax_bsd_nat_target): New.
10620 (vaxbsd_fetch_inferior_registers)
10621 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10622 methods.
10623 (_initialize_vaxbsd_nat): Adjust to C++ification.
10624
10625 * bsd-kvm.c (bsd_kvm_target): New class.
10626 (bsd_kvm_ops): Now a bsd_kvm_target.
10627 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10628 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10629 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10630 bsd_kvm_target.
10631 (bsd_kvm_return_one): Delete.
10632 (bsd_kvm_add_target): Adjust to C++ification.
10633
10634 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10635 (nto_procfs_target_procfs): New classes.
10636 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10637 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10638 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10639 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10640 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10641 (procfs_remove_hw_breakpoint, procfs_resume)
10642 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10643 (procfs_kill_inferior, procfs_store_registers)
10644 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10645 as methods of nto_procfs_target.
10646 (nto_procfs_ops): Now an nto_procfs_target_procfs.
10647 (nto_native_ops): Delete.
10648 (procfs_open, procfs_native_open): Delete.
10649 (nto_native_ops): Now an nto_procfs_target_native.
10650 (init_procfs_targets): Adjust to C++ification.
10651 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10652 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10653 Refactor as methods of nto_procfs_target.
10654
10655 * go32-nat.c (go32_nat_target): New class.
10656 (the_go32_nat_target): New.
10657 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10658 (go32_store_registers, go32_xfer_partial, go32_files_info)
10659 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10660 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10661 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10662 (go32_pid_to_str): Refactor as methods of go32_nat_target.
10663 (go32_target): Delete.
10664 (_initialize_go32_nat): Adjust to C++ification.
10665
10666 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10667 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10668 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10669 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10670 gnu_nat_target.
10671 (gnu_target): Delete.
10672 * gnu-nat.h (gnu_target): Delete.
10673 (gnu_nat_target): New class.
10674 * i386-gnu-nat.c (gnu_base_target): New.
10675 (i386_gnu_nat_target): New class.
10676 (the_i386_gnu_nat_target): New.
10677 (_initialize_i386gnu_nat): Adjust to C++ification.
10678
10679 2018-05-02 Pedro Alves <palves@redhat.com>
10680
10681 * bfd-target.c (target_bfd_xclose): Rename to ...
10682 (target_bfd_close): ... this.
10683 (target_bfd_reopen): Adjust.
10684 * target.c (target_close): Remove references to to_xclose.
10685 * target.h (target_ops::to_xclose): Delete.
10686 (target_ops::to_close): Update comments.
10687
10688 2018-05-02 Pedro Alves <palves@redhat.com>
10689
10690 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10691 "linux-nat.h".
10692 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10693 * inf-ptrace.c (inf_ptrace_register_u_offset)
10694 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10695 (inf_ptrace_store_register, inf_ptrace_store_registers)
10696 (inf_ptrace_trad_target): Move to ...
10697 * linux-nat-trad.c: ... this new file.
10698 * linux-nat-trad.h: New file.
10699 * linux-nat.c (linux_target_install_ops): Make extern.
10700 (linux_trad_target): Delete.
10701 * linux-nat.h (linux_trad_target): Delete declaration.
10702 (linux_target_install_ops): Declare.
10703 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10704 "linux-nat.h".
10705
10706 2018-05-02 Pedro Alves <palves@redhat.com>
10707
10708 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10709 procfs_target/add_target here.
10710 * procfs.c (procfs_target): Make static.
10711 (_initialize_procfs): Call add_target here.
10712 * procfs.h (struct target_ops): Remove forward declaration.
10713 (procfs_target): Remove declaration.
10714 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10715
10716 2018-05-02 Pedro Alves <palves@redhat.com>
10717
10718 * procfs.c (procfs_stopped_by_watchpoint)
10719 (procfs_insert_watchpoint, procfs_remove_watchpoint)
10720 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10721 Forward declare.
10722 (procfs_use_watchpoints): Delete, move contents...
10723 (procfs_target): ... here.
10724 * procfs.h (procfs_use_watchpoints): Delete declaration.
10725 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10726 procfs_use_watchpoints.
10727 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10728 procfs_use_watchpoints.
10729
10730 2018-05-02 Tom Tromey <tom@tromey.com>
10731
10732 PR python/20084:
10733 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10734 and var_zuinteger_unlimited.
10735 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10736 and PARAM_ZUINTEGER_UNLIMITED.
10737 (set_parameter_value): Handle var_zuinteger and
10738 var_zuinteger_unlimited.
10739 (add_setshow_generic): Likewise.
10740 (parmpy_init): Likewise.
10741
10742 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
10743
10744 PR rust/23124
10745 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10746 pointer is not null before dereferencing it.
10747
10748 2018-04-30 Tom Tromey <tom@tromey.com>
10749
10750 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10751 is_mi_like_p.
10752
10753 2018-04-30 Tom Tromey <tom@tromey.com>
10754
10755 * breakpoint.c (mention): Remove use of is_mi_like_p.
10756 (print_mention_ranged_breakpoint): Likewise.
10757 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10758 of is_mi_like_p.
10759
10760 2018-04-30 Tom Tromey <tom@tromey.com>
10761
10762 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10763
10764 2018-04-30 Tom Tromey <tom@tromey.com>
10765
10766 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10767 (info_spu_event_command): Remove some uses of is_mi_like_p.
10768
10769 2018-04-30 Tom Tromey <tom@tromey.com>
10770
10771 * python/py-framefilter.c (py_print_single_arg)
10772 (enumerate_locals, py_print_args, py_print_frame): Remove some
10773 uses of is_mi_like_p.
10774
10775 2018-04-30 Tom Tromey <tom@tromey.com>
10776
10777 * ui-out.c: Update.
10778 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10779 * ui-out.h (ui_out::is_mi_like_p): Now const.
10780 (ui_out::do_is_mi_like_p): Now const.
10781 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10782
10783 2018-04-30 Tom Tromey <tom@tromey.com>
10784
10785 * varobj.c (varobj_set_visualizer): Use new_reference.
10786 * python/python.c (gdbpy_decode_line): Use new_reference.
10787 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10788 new_reference.
10789
10790 2018-04-30 Tom Tromey <tom@tromey.com>
10791
10792 * varobj.c (install_new_value): Use new_reference.
10793 * value.h (value_incref): Return void. Swap intro comment with
10794 value_decref.
10795 * value.c (set_value_parent): Use new_reference.
10796 (value_incref): Return void. Update intro comment.
10797 (release_value): Use new_reference.
10798 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10799
10800 2018-04-30 Tom Tromey <tom@tromey.com>
10801
10802 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10803 * gdb_bfd.h (new_bfd_ref): Remove.
10804 (gdb_bfd_open): Update comment.
10805 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10806 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10807 (gdb_bfd_fdopenr): Use new_reference.
10808 * exec.c (exec_file_attach): Use new_reference.
10809
10810 2018-04-30 Tom Tromey <tom@tromey.com>
10811
10812 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10813 method.
10814
10815 2018-04-30 Tom Tromey <tom@tromey.com>
10816
10817 * jit.c (jit_read_code_entry): Use type_align.
10818 * i386-tdep.c (i386_gdbarch_init): Don't call
10819 set_gdbarch_long_long_align_bit.
10820 * gdbarch.sh: Remove long_long_align_bit.
10821 * gdbarch.c, gdbarch.h: Rebuild.
10822 * arc-tdep.c (arc_type_align): New function.
10823 (arc_gdbarch_init): Use arc_type_align. Don't call
10824 set_gdbarch_long_long_align_bit.
10825
10826 2018-04-30 Tom Tromey <tom@tromey.com>
10827
10828 * rust-lang.c (rust_type_alignment): Remove.
10829 (rust_composite_type): Use type_align.
10830
10831 2018-04-30 Tom Tromey <tom@tromey.com>
10832
10833 * NEWS: Mention Type.align.
10834 * python/py-type.c (typy_get_alignof): New function.
10835 (type_object_getset): Add "alignof".
10836
10837 2018-04-30 Tom Tromey <tom@tromey.com>
10838
10839 PR exp/17095:
10840 * NEWS: Update.
10841 * std-operator.def (UNOP_ALIGNOF): New operator.
10842 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10843 New.
10844 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10845 * c-lang.c (c_op_print_tab): Add alignof.
10846 * c-exp.y (ALIGNOF): New token.
10847 (exp): Add "ALIGNOF" production.
10848 (ident_tokens): Add _Alignof and alignof.
10849
10850 2018-04-30 Tom Tromey <tom@tromey.com>
10851
10852 * i386-tdep.c (i386_type_align): New function.
10853 (i386_gdbarch_init): Update.
10854 * gdbarch.sh (type_align): New method.
10855 * gdbarch.c, gdbarch.h: Rebuild.
10856 * arch-utils.h (default_type_align): Declare.
10857 * arch-utils.c (default_type_align): New function.
10858 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10859 (struct type) <align_log2>: New field.
10860 <instance_flags>: Now a bitfield.
10861 (TYPE_RAW_ALIGN): New macro.
10862 (type_align, type_raw_align, set_type_align): Declare.
10863 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10864 functions.
10865 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10866 (get_alignment, maybe_set_alignment): New functions.
10867 (read_structure_type, read_enumeration_type, read_array_type)
10868 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10869 (read_subrange_type, read_base_type): Set type alignment.
10870
10871 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10872
10873 * dwarf2read.c (read_index_from_section): Use bool.
10874
10875 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10876
10877 PR gdb/22950
10878 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10879 with #ifdef.
10880
10881 2018-04-29 John Reiser <jreiser@BitWagon.com>
10882
10883 PR build/22873
10884 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10885 last step, and do it atomically.
10886
10887 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10888
10889 * compile/compile-c-types.c (convert_int, convert_float):
10890 Update for C FE v1.
10891
10892 2018-04-27 Tom Tromey <tom@tromey.com>
10893
10894 PR rust/22545:
10895 * rust-lang.c (rust_inclusive_range_type_p): New function.
10896 (rust_range): Handle inclusive ranges.
10897 (rust_compute_range): Likewise.
10898 * rust-exp.y (struct rust_op) <inclusive>: New field.
10899 (DOTDOTEQ): New constant.
10900 (range_expr): Add "..=" productions.
10901 (operator_tokens): Add "..=" token.
10902 (ast_range): Add "inclusive" parameter.
10903 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10904 ranges.
10905 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10906 bounds values.
10907 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10908 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10909 Update comments.
10910 * expprint.c (print_subexp_standard): Handle new bounds values.
10911 (dump_subexp_body_standard): Likewise.
10912
10913 2018-04-27 Tom Tromey <tom@tromey.com>
10914
10915 * configure: Rebuild.
10916 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10917 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10918 "OVERRIDE".
10919 (class symbol_needs_eval_context): Likewise.
10920 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10921 (mock_mapped_index::symbol_name_at): Use "override". Remove
10922 "virtual".
10923 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10924 "override".
10925 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10926 * aarch64-tdep.c (instruction_reader::read): Use "override".
10927 (instruction_reader_test::read): Likewise.
10928 * arm-tdep.c (instruction_reader::read): Use "override".
10929 (instruction_reader_thumb::read): Likewise.
10930
10931 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10932
10933 PR remote/9665
10934 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10935 instead of remote_send.
10936 (remote_send): Remove.
10937
10938 2018-04-26 Pedro Alves <palves@redhat.com>
10939
10940 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10941 find_function_start_sal instead of find_pc_line.
10942
10943 2018-04-26 Pedro Alves <palves@redhat.com>
10944
10945 * breakpoint.c (set_breakpoint_location_function): Handle
10946 mst_data_gnu_ifunc.
10947 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10948 * elfread.c (elf_symtab_read): Give data symbols with
10949 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10950 (elf_rel_plt_read): Update comment.
10951 * linespec.c (convert_linespec_to_sals): Handle
10952 mst_data_gnu_ifunc.
10953 (minsym_found): Handle mst_data_gnu_ifunc.
10954 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10955 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10956 * parse.c (find_minsym_type_and_address): Handle
10957 mst_data_gnu_ifunc.
10958 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10959 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10960 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10961 comment.
10962 <mst_data_gnu_ifunc>: New enumerator.
10963
10964 2018-04-26 Pedro Alves <palves@redhat.com>
10965
10966 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10967 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10968 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10969 Handle it.
10970 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10971 (lookup_minimal_symbol_by_pc): Adjust.
10972 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10973 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10974 * minsyms.h (lookup_msym_prefer): New enum.
10975 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10976 parameter by a lookup_msym_prefer parameter.
10977
10978 2018-04-26 Pedro Alves <palves@redhat.com>
10979
10980 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10981 ends in "@plt" instead of looking at the symbol's section.
10982
10983 2018-04-26 Pedro Alves <palves@redhat.com>
10984
10985 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10986 all references.
10987 (find_pc_partial_function_gnu_ifunc): Rename to ...
10988 (find_pc_partial_function): ... this, and remove references to
10989 'is_gnu_ifunc_p'.
10990 (find_pc_partial_function): Delete old implementation.
10991 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10992
10993 2018-04-26 Pedro Alves <palves@redhat.com>
10994
10995 * linespec.c (struct bound_minimal_symbol_search_key): New.
10996 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10997 skip first line if we found a GNU ifunc minimal symbol by name.
10998 (compare_msymbols): Change parameters to work with a destructured
10999 lhs minsym.
11000 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11001 functions.
11002
11003 2018-04-26 Pedro Alves <palves@redhat.com>
11004
11005 * breakpoint.c (set_breakpoint_location_function): Don't resolve
11006 ifunc targets here. Instead, if we have an ifunc minsym, use its
11007 address/name.
11008 (add_location_to_breakpoint): Store the minsym and the objfile in
11009 the breakpoint location.
11010 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11011 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11012 Record the minsym in the sal.
11013 * symtab.h (symtab_and_line) <msymbol>: New field.
11014
11015 2018-04-26 Pedro Alves <palves@redhat.com>
11016
11017 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11018 unless we actually resolved the ifunc.
11019
11020 2018-04-26 Pedro Alves <palves@redhat.com>
11021
11022 * c-exp.y (variable production): Prefer ifunc minsyms over
11023 regular function symbols.
11024 * symtab.c (find_gnu_ifunc): New function.
11025 * minsyms.h (lookup_msym_prefer): New enum.
11026 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11027 parameter by a lookup_msym_prefer parameter.
11028 * symtab.h (find_gnu_ifunc): New declaration.
11029
11030 2018-04-26 Pedro Alves <palves@redhat.com>
11031
11032 * blockframe.c (find_gnu_ifunc_target_type): New function.
11033 (find_function_type): New.
11034 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11035 return a value with a memory address.
11036 (eval_call): For calls to GNU ifunc functions, try to find the
11037 type of the target function from the type that the resolver
11038 returns.
11039 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11040 symbols.
11041 * infcall.c (find_function_return_type): Delete.
11042 (find_function_addr): Add 'function_type' parameter. For calls to
11043 GNU ifunc functions, try to find the type of the target function
11044 from the type that the resolver returns, and return it via
11045 FUNCTION_TYPE.
11046 (call_function_by_hand_dummy): Adjust to use the function type
11047 returned by find_function_addr.
11048 (find_function_addr): Add 'function_type' parameter and move
11049 description here.
11050 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11051 declarations.
11052
11053 2018-04-26 Pedro Alves <palves@redhat.com>
11054
11055 * c-exp.y (variable production): Skip finding an alias for ifunc
11056 symbols.
11057
11058 2018-04-26 Pedro Alves <palves@redhat.com>
11059
11060 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11061
11062 2018-04-25 Pedro Alves <palves@redhat.com>
11063
11064 * infcmd.c (kill_command): Print the pid as string, not the whole
11065 thread's ptid. Add comment. s/has been killed/killed/ in output
11066 message.
11067 * remote.c (remote_detach_1): Print the pid as string, not the
11068 whole thread's ptid.
11069
11070 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11071 Sergio Durigan Junior <sergiodj@redhat.com>
11072 Pedro Alves <palves@redhat.com>
11073
11074 * infcmd.c (kill_command): Print message when inferior has
11075 been killed.
11076 * inferior.c (print_inferior_events): Remove 'static'. Set as
11077 '1'.
11078 (add_inferior): Improve message printed when
11079 'print_inferior_events' is on.
11080 (exit_inferior): Remove message printed when
11081 'print_inferior_events' is on.
11082 (detach_inferior): Improve message printed when
11083 'print_inferior_events' is on.
11084 (initialize_inferiors): Use 'add_inferior_silent' to set
11085 'current_inferior_'.
11086 * inferior.h (print_inferior_events): Declare here as
11087 'extern'.
11088 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11089 '[Detaching...]' messages when 'print_inferior_events' is on.
11090 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
11091 as prefix/suffix for messages. Remove periods. Fix erroneous
11092 'Detaching after fork from child...', replace it by '... from
11093 parent...'.
11094 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11095 prefix/suffix when printing 'Detaching...' messages. Print
11096 them when 'print_inferior_events' is on.
11097 * remote.c (remote_detach_1): Print message when detaching
11098 from inferior and '!is_fork_parent'.
11099
11100 2018-04-24 Tom Tromey <tom@tromey.com>
11101
11102 * cli-out.h: Reindent.
11103
11104 2018-04-24 Tom Tromey <tom@tromey.com>
11105
11106 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11107 (cli_ui_out::do_field_string): Use fputs_filtered.
11108 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11109
11110 2018-04-23 Tom Tromey <tom@tromey.com>
11111
11112 * guile/scm-frame.c (gdbscm_frame_read_var): Use
11113 gdb::unique_xmalloc_ptr.
11114
11115 2018-04-23 Tom Tromey <tom@tromey.com>
11116
11117 * configure: Rebuild.
11118
11119 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
11120
11121 PR gdb/23095
11122 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11123 prepare_for_testing. Set normal_bp to r_debug_state if target
11124 is bsd.
11125
11126 2018-04-21 Pedro Alves <palves@redhat.com>
11127 Rajendra SY <rajendra.sy@gmail.com>
11128
11129 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11130 * remote.c (extended_remote_attach): In all-stop mode, mark the
11131 thread as executing.
11132
11133 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
11134
11135 * thread.c (thread_apply_all_command): Fix comment.
11136 (thread_command): Fix comment.
11137
11138 2018-04-10 Alan Hayward <alan.hayward@arm.com>
11139
11140 * common/tdesc.h (tdesc_create_feature): Remove xml filename
11141 parameter.
11142 * features/aarch64-core.c (create_feature_aarch64_core):
11143 Regenerate.
11144 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11145 Likewise.
11146 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11147 Likewise.
11148 * features/i386/32bit-avx512.c
11149 (create_feature_i386_32bit_avx512): Likewise.
11150 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11151 Likewise.
11152 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11153 Likewise.
11154 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11155 Likewise.
11156 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11157 Likewise.
11158 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11159 Likewise.
11160 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11161 Likewise.
11162 * features/i386/64bit-avx512.c
11163 (create_feature_i386_64bit_avx512): Likewise.
11164 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11165 Likewise.
11166 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11167 Likewise.
11168 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11169 Likewise.
11170 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11171 Likewise.
11172 * features/i386/64bit-segments.c
11173 (create_feature_i386_64bit_segments): Likewise.
11174 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11175 Likewise.
11176 * features/i386/x32-core.c
11177 (create_feature_i386_x32_core): Likewise.
11178 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11179 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11180 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11181 * target-descriptions.c: In generated code, don't pass xml
11182 filename.
11183
11184 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11185
11186 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11187 (print_xml_feature::visit_post): Likewise.
11188 (print_xml_feature::visit): Likewise.
11189 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11190 (print_xml_feature): Add new class.
11191 * regformats/regdat.sh: Null xmltarget on feature targets.
11192 * target-descriptions.c (struct target_desc): Add xmltarget.
11193 (maintenance_check_tdesc_xml_convert): Add unittest function.
11194 (tdesc_get_features_xml): Add function to get xml.
11195 (maintenance_check_xml_descriptions): Test xml generation.
11196 * xml-tdesc.c (string_read_description_xml): Add function.
11197 * xml-tdesc.h (string_read_description_xml): Add declaration.
11198
11199 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11200
11201 * features/Makefile: Add feature marker to targets with new style
11202 target descriptions.
11203 * regformats/aarch64.dat: Regenerate.
11204 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11205 * regformats/i386/amd64-avx-linux.dat: Likewise.
11206 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11207 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11208 * regformats/i386/amd64-linux.dat: Likewise.
11209 * regformats/i386/amd64-mpx-linux.dat: Likewise.
11210 * regformats/i386/amd64.dat: Likewise.
11211 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11212 * regformats/i386/i386-avx-linux.dat: Likewise.
11213 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11214 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11215 * regformats/i386/i386-linux.dat: Likewise.
11216 * regformats/i386/i386-mmx-linux.dat: Likewise.
11217 * regformats/i386/i386-mpx-linux.dat: Likewise.
11218 * regformats/i386/i386.dat: Likewise.
11219 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11220 * regformats/i386/x32-avx-linux.dat: Likewise.
11221 * regformats/i386/x32-linux.dat: Likewise.
11222 * regformats/tic6x-c62x-linux.dat: Likewise.
11223 * regformats/tic6x-c64x-linux.dat: Likewise.
11224 * regformats/tic6x-c64xp-linux.dat: Likewise.
11225 * regformats/regdat.sh: Parse feature marker.
11226
11227 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11228
11229 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11230 (tdesc_osabi_name): Likewise.
11231 * target-descriptions.c (tdesc_architecture_name): Add new
11232 function.
11233 (tdesc_osabi_name): Likewise.
11234
11235 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11236
11237 * common/tdesc.c (tdesc_predefined_type): Move to here.
11238 (tdesc_named_type): Likewise.
11239 (tdesc_create_vector): Likewise.
11240 (tdesc_create_struct): Likewise.
11241 (tdesc_set_struct_size): Likewise.
11242 (tdesc_create_union): Likewise.
11243 (tdesc_create_flags): Likewise.
11244 (tdesc_create_enum): Likewise.
11245 (tdesc_add_field): Likewise.
11246 (tdesc_add_typed_bitfield): Likewise.
11247 (tdesc_add_bitfield): Likewise.
11248 (tdesc_add_flag): Likewise.
11249 (tdesc_add_enum_value): Likewise.
11250 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11251 (struct tdesc_type_vector): Likewise.
11252 (struct tdesc_type_field): Likewise.
11253 (struct tdesc_type_with_fields): Likewise.
11254 (tdesc_create_enum): Add declaration.
11255 (tdesc_add_typed_bitfield): Likewise.
11256 (tdesc_add_enum_value): Likewise.
11257 * target-descriptions.c (tdesc_type_field): Move from here.
11258 (tdesc_type_builtin): Likewise.
11259 (tdesc_type_vector): Likewise.
11260 (tdesc_type_with_fields): Likewise.
11261 (tdesc_predefined_types): Likewise.
11262 (tdesc_named_type): Likewise.
11263 (tdesc_create_vector): Likewise.
11264 (tdesc_create_struct): Likewise.
11265 (tdesc_set_struct_size): Likewise.
11266 (tdesc_create_union): Likewise.
11267 (tdesc_create_flags): Likewise.
11268 (tdesc_create_enum): Likewise.
11269 (tdesc_add_field): Likewise.
11270 (tdesc_add_typed_bitfield): Likewise.
11271 (tdesc_add_bitfield): Likewise.
11272 (tdesc_add_flag): Likewise.
11273 (tdesc_add_enum_value): Likewise.
11274 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11275 (tdesc_add_typed_bitfield): Likewise.
11276 (tdesc_add_enum_value): Likewise.
11277
11278 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11279
11280 * common/tdesc.c (tdesc_feature::accept): Move to here.
11281 (tdesc_feature::operator==): Likewise.
11282 (tdesc_create_reg): Likewise.
11283 * common/tdesc.h (tdesc_type_kind): Likewise.
11284 (struct tdesc_type): Likewise.
11285 (struct tdesc_feature): Likewise.
11286 * regformats/regdat.sh: Create a feature.
11287 * target-descriptions.c (tdesc_type_kind): Move from here.
11288 (tdesc_type): Likewise.
11289 (tdesc_type_up): Likewise.
11290 (tdesc_feature): Likewise.
11291 (tdesc_create_reg): Likewise.
11292
11293 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11294
11295 * Makefile.in: Add arch/tdesc.c
11296 * common/tdesc.c: New file.
11297 * common/tdesc.h (tdesc_element_visitor): Move to here.
11298 (tdesc_element): Likewise.
11299 (tdesc_reg): Likewise.
11300 (tdesc_reg_up): Likewise.
11301 * regformats/regdef.h (reg): Add offset to constructors.
11302 * target-descriptions.c (tdesc_element_visitor): Move from here.
11303 (tdesc_element): Likewise.
11304 (tdesc_reg): Likewise.
11305 (tdesc_reg_up): Likewise.
11306
11307 2018-04-17 Tom Tromey <tom@tromey.com>
11308
11309 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11310 discriminant field.
11311
11312 2018-04-17 Tom Tromey <tom@tromey.com>
11313
11314 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11315
11316 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
11317
11318 * symtab.c (print_symbol_info): Skip printing filename and line
11319 number when `last' is NULL.
11320 (symtab_symbol_info): Use empty string instead of NULL for first
11321 invocation of print_symbol_info.
11322 (rbreak_command): Pass NULL to `last' parameter of
11323 print_symbol_info.
11324
11325 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
11326
11327 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11328 instead of nullptr.
11329
11330 2018-04-16 Pedro Alves <palves@redhat.com>
11331
11332 * MAINTAINERS (sh): Remove.
11333 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11334 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11335 (ALLDEPFILES): Remove sh64-tdep.c.
11336 * NEWS: Mentions that support for SH-5/SH64 is removed.
11337 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11338 (sh*-*-openbsd*): Ditto.
11339 (sh64-*-elf*): Remove.
11340 (sh*): Remove.
11341 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11342 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11343 * sh-tdep.c: No longer include "sh64-tdep.h".
11344 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11345 * sh64-tdep.c, sh64-tdep.h: Remove files.
11346
11347 2018-04-16 Pedro Alves <palves@redhat.com>
11348
11349 * MAINTAINERS: Remove m88k.
11350 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11351 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11352 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11353 * NEWS: Mention that support for m88k was removed.
11354 * configure.host (m88*-*-*): Remove support.
11355 * configure.nat (m88k-*-*): Remove support.
11356 * configure.tgt (m88*-*-openbsd*): Remove.
11357 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11358
11359 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
11360
11361 * configure.tgt (x86_tobjs): New variable.
11362 (amd64_tobjs, i386_tobjs): Use it.
11363
11364 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11365
11366 * symtab.c (print_symbol_info): Precede the symbol definition by
11367 the line number when available.
11368 * NEWS: Advertise this enhancement.
11369
11370 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11371
11372 * NEWS (New options): announce set/show record btrace cpu.
11373 * btrace.c: Include record-btrace.h.
11374 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11375 the vendor is unknown.
11376 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
11377 Maybe overwrite the btrace configuration's cpu.
11378 (btrace_compute_ftrace): Add cpu parameter. Update callers.
11379 (btrace_fetch): Add cpu parameter. Update callers.
11380 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11381 Maybe overwrite the btrace configuration's cpu. Skip enabling
11382 errata workarounds if the vendor is unknown.
11383 * python/py-record-btrace.c: Include record-btrace.h.
11384 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11385 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11386 * record-btrace.c (record_btrace_cpu_state_kind): New.
11387 (record_btrace_cpu): New.
11388 (set_record_btrace_cpu_cmdlist): New.
11389 (record_btrace_get_cpu): New.
11390 (require_btrace_thread, record_btrace_info)
11391 (record_btrace_resume_thread): Call record_btrace_get_cpu.
11392 (cmd_set_record_btrace_cpu_none): New.
11393 (cmd_set_record_btrace_cpu_auto): New.
11394 (cmd_set_record_btrace_cpu): New.
11395 (cmd_show_record_btrace_cpu): New.
11396 (_initialize_record_btrace): Initialize set/show record btrace cpu
11397 commands.
11398 * record-btrace.h (record_btrace_get_cpu): New.
11399
11400 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11401
11402 * record.c (set_record_command): Fix typo in message.
11403
11404 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11405
11406 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11407
11408 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11409
11410 * infrun.c (process_event_stop_test): Call
11411 gdbarch_in_indirect_branch_thunk.
11412 * gdbarch.sh (in_indirect_branch_thunk): New.
11413 * gdbarch.c: Regenerated.
11414 * gdbarch.h: Regenerated.
11415 * x86-tdep.h: New.
11416 * x86-tdep.c: New.
11417 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11418 (HFILES_NO_SRCDIR): Add x86-tdep.h.
11419 (ALLDEPFILES): Add x86-tdep.c.
11420 * arch-utils.h (default_in_indirect_branch_thunk): New.
11421 * arch-utils.c (default_in_indirect_branch_thunk): New.
11422 * i386-tdep: Include x86-tdep.h.
11423 (i386_in_indirect_branch_thunk): New.
11424 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11425 function.
11426 * amd64-tdep: Include x86-tdep.h.
11427 (amd64_in_indirect_branch_thunk): New.
11428 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11429
11430 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11431
11432 PR gdb/23053
11433 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11434 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11435 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11436 regression.
11437
11438 2018-04-12 Tom Tromey <tom@tromey.com>
11439
11440 * rust-lang.c (rust_print_struct_def): Remove univariant code.
11441 (rust_evaluate_subexp): Likewise.
11442
11443 2018-04-12 Pedro Alves <palves@redhat.com>
11444
11445 * procfs.c (procfs_detach): Make forward declaration's prototype
11446 match definition's protototype.
11447 (proc_get_LDT_entry): Remove stale do_cleanups call.
11448
11449 2018-04-12 Pedro Alves <palves@redhat.com>
11450
11451 * target.h (target_ops::to_has_exited): Delete.
11452 (target_has_exited): Delete.
11453 * target-delegates.c: Regenerate.
11454
11455 2018-04-11 Pedro Alves <palves@redhat.com>
11456
11457 * target.c (fileio_fh_t::t): Add comment.
11458 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11459 (target_fileio_close): Handle a NULL target.
11460 (invalidate_fileio_fh): New.
11461 (target_close): Call it.
11462 * remote.c (remote_hostio_send_command): No longer check whether
11463 remote_desc is open.
11464
11465 2018-04-11 Pedro Alves <palves@redhat.com>
11466
11467 * target.c (fileio_fh_t): Make it a named struct instead of a
11468 typedef.
11469 (fileio_fh_t::is_closed): New method.
11470 (DEF_VEC_O (fileio_fh_t)): Remove.
11471 (fileio_fhandles): Now a std::vector.
11472 (is_closed_fileio_fh): Delete.
11473 (acquire_fileio_fd): Adjust. Rename parameters.
11474 (release_fileio_fd): Adjust.
11475 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11476 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11477 (target_fileio_close): Adjust.
11478
11479 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
11480
11481 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11482 index.
11483
11484 2018-04-10 Pedro Alves <palves@redhat.com>
11485
11486 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11487 (scoped_finish_thread_state): New class.
11488 * infcmd.c (run_command_1): Use it instead of finish_thread_state
11489 cleanup.
11490 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11491 (fetch_inferior_event, normal_stop): Likewise.
11492 * thread.c (finish_thread_state_cleanup): Delete.
11493
11494 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11495 Pedro Alves <palves@redhat.com>
11496
11497 * value.c: Include "selftest.h" and "common/array-view.h".
11498 (struct range) <operator ==>: New.
11499 (test_ranges_contain): New.
11500 (check_ranges_vector): New.
11501 (test_insert_into_bit_range_vector): New.
11502 (_initialize_values): Register selftests.
11503 * common/array-view.h (operator==, operator!=): New.
11504
11505 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11506
11507 * common/gdb_vecs.h (unordered_remove): Add overload that takes
11508 an iterator.
11509 * inline-frame.c: Include <algorithm>.
11510 (struct inline_state): Add constructor.
11511 (inline_state_s): Remove.
11512 (DEF_VEC_O(inline_state_s)): Remove.
11513 (inline_states): Change type to std::vector.
11514 (find_inline_frame_state): Adjust to std::vector.
11515 (allocate_inline_frame_state): Remove.
11516 (clear_inline_frame_state): Adjust to std::vector.
11517 (skip_inline_frames): Adjust to std::vector.
11518
11519 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11520
11521 * tracepoint.h (struct trace_state_variable): Add constructor.
11522 <name>: Change type to std::string.
11523 * tracepoint.c (tsv_s): Remove.
11524 (DEF_VEC_O(tsv_s)): Remove.
11525 (tvariables): Change to std::vector.
11526 (create_trace_state_variable): Adjust to std::vector.
11527 (find_trace_state_variable): Likewise.
11528 (find_trace_state_variable_by_number): Likewise.
11529 (delete_trace_state_variable): Likewise.
11530 (trace_variable_command): Adjust to std::string.
11531 (delete_trace_variable_command): Likewise.
11532 (tvariables_info_1): Adjust to std::vector.
11533 (save_trace_state_variables): Likewise.
11534 (start_tracing): Likewise.
11535 (merge_uploaded_trace_state_variables): Adjust to std::vector
11536 and std::string.
11537 * target.h (struct target_ops)
11538 <to_download_trace_state_variable>: Pass reference to
11539 trace_state_variable.
11540 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11541 * target-delegates.c: Re-generate.
11542 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11543 (mi_tsv_deleted): Likewise.
11544 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11545 * remote.c (remote_download_trace_state_variable): Change
11546 pointer to reference and adjust.
11547 * make-target-delegates (parse_argtypes): Handle references.
11548 (write_function_header): Likewise.
11549 (munge_type): Likewise.
11550
11551 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11552
11553 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11554 string_view-selftests.c.
11555 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11556 testsuite.
11557 * unittests/basic_string_view/cons/char/1.cc: Likewise.
11558 * unittests/basic_string_view/cons/char/2.cc: Likewise.
11559 * unittests/basic_string_view/cons/char/3.cc: Likewise.
11560 * unittests/basic_string_view/element_access/char/1.cc:
11561 Likewise.
11562 * unittests/basic_string_view/element_access/char/empty.cc:
11563 Likewise.
11564 * unittests/basic_string_view/element_access/char/front_back.cc:
11565 Likewise.
11566 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11567 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11568 Likewise.
11569 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11570 Likewise.
11571 * unittests/basic_string_view/modifiers/swap/char/1.cc:
11572 Likewise.
11573 * unittests/basic_string_view/operations/compare/char/1.cc:
11574 Likewise.
11575 * unittests/basic_string_view/operations/compare/char/13650.cc:
11576 Likewise.
11577 * unittests/basic_string_view/operations/copy/char/1.cc:
11578 Likewise.
11579 * unittests/basic_string_view/operations/data/char/1.cc:
11580 Likewise.
11581 * unittests/basic_string_view/operations/find/char/1.cc:
11582 Likewise.
11583 * unittests/basic_string_view/operations/find/char/2.cc:
11584 Likewise.
11585 * unittests/basic_string_view/operations/find/char/3.cc:
11586 Likewise.
11587 * unittests/basic_string_view/operations/find/char/4.cc:
11588 Likewise.
11589 * unittests/basic_string_view/operations/rfind/char/1.cc:
11590 Likewise.
11591 * unittests/basic_string_view/operations/rfind/char/2.cc:
11592 Likewise.
11593 * unittests/basic_string_view/operations/rfind/char/3.cc:
11594 Likewise.
11595 * unittests/basic_string_view/operations/substr/char/1.cc:
11596 Likewise.
11597 * unittests/basic_string_view/operators/char/2.cc: Likewise.
11598 * unittests/string_view-selftests.c: New file.
11599
11600 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11601
11602 * unittests/basic_string_view/capacity/1.cc: New file.
11603 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11604 * unittests/basic_string_view/cons/char/1.cc: New file.
11605 * unittests/basic_string_view/cons/char/2.cc: New file.
11606 * unittests/basic_string_view/cons/char/3.cc: New file.
11607 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11608 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11609 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11610 * unittests/basic_string_view/element_access/char/1.cc: New file.
11611 * unittests/basic_string_view/element_access/char/2.cc: New file.
11612 * unittests/basic_string_view/element_access/char/empty.cc: New file.
11613 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11614 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11615 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11616 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11617 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11618 * unittests/basic_string_view/include.cc: New file.
11619 * unittests/basic_string_view/inserters/char/1.cc: New file.
11620 * unittests/basic_string_view/inserters/char/2.cc: New file.
11621 * unittests/basic_string_view/inserters/char/3.cc: New file.
11622 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11623 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11624 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11625 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11626 * unittests/basic_string_view/literals/types.cc: New file.
11627 * unittests/basic_string_view/literals/values.cc: New file.
11628 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11629 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11630 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11631 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11632 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11633 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11634 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11635 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11636 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11637 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11638 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11639 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11640 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11641 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11642 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11643 * unittests/basic_string_view/operations/data/char/1.cc: New file.
11644 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11645 * unittests/basic_string_view/operations/find/char/1.cc: New file.
11646 * unittests/basic_string_view/operations/find/char/2.cc: New file.
11647 * unittests/basic_string_view/operations/find/char/3.cc: New file.
11648 * unittests/basic_string_view/operations/find/char/4.cc: New file.
11649 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11650 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11651 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11652 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11653 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11654 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11655 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11656 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11657 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11658 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11659 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11660 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11661 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11662 * unittests/basic_string_view/operators/char/2.cc: New file.
11663 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11664 * unittests/basic_string_view/range_access/char/1.cc: New file.
11665 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11666 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11667 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11668 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11669 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11670 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11671 * unittests/basic_string_view/requirements/typedefs.cc: New file.
11672 * unittests/basic_string_view/typedefs.cc: New file.
11673 * unittests/basic_string_view/types/1.cc: New file.
11674
11675 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11676
11677 * common/gdb_string_view.h: Remove libstdc++ implementation
11678 details, adjust to gdb reality.
11679 * common/gdb_string_view.tcc: Likewise.
11680 * cli/cli-script.c (struct string_view): Remove.
11681 (user_args) <m_args>: Change element type to gdb::string_view.
11682 (user_args::insert_args): Adjust.
11683
11684 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11685
11686 * common/gdb_string_view.h: New file.
11687 * common/gdb_string_view.tcc: New file.
11688
11689 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11690
11691 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11692 * configure: Re-generate.
11693
11694 2018-04-09 Pedro Alves <palves@redhat.com>
11695
11696 * gdbarch.sh: Include "observable.h" instead of "observer.h".
11697 (set_target_gdbarch): Call
11698 gdb::observers::architecture_changed.notify instead of
11699 observer_notify_architecture_changed.
11700
11701 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11702
11703 * tracepoint.c (struct current_traceframe_cleanup): Remove.
11704 (do_restore_current_traceframe_cleanup): Remove.
11705 (restore_current_traceframe_cleanup_dtor): Remove.
11706 (make_cleanup_restore_current_traceframe): Remove.
11707 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11708 New.
11709 * tracepoint.h (struct scoped_restore_current_traceframe): New.
11710 * infrun.c (fetch_inferior_event): Use
11711 scoped_restore_current_traceframe.
11712
11713 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11714
11715 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11716 Remove.
11717 <n_allocated_type_units>: Remove.
11718 <all_type_units>: Change to std::vector.
11719 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11720 to std::vector change.
11721 (dwarf2_per_objfile::get_cutu): Likewise.
11722 (dwarf2_per_objfile::get_tu): Likewise.
11723 (create_signatured_type_table_from_index): Likewise.
11724 (create_signatured_type_table_from_debug_names): Likewise.
11725 (dw2_symtab_iter_next): Likewise.
11726 (dw2_print_stats): Likewise.
11727 (dw2_expand_all_symtabs): Likewise.
11728 (dw2_expand_marked_cus): Likewise.
11729 (dw2_debug_names_iterator::next): Likewise.
11730 (dwarf2_initialize_objfile): Likewise.
11731 (add_signatured_type_cu_to_table): Likewise.
11732 (create_all_type_units): Likewise.
11733 (add_type_unit): Likewise.
11734 (struct tu_abbrev_offset): Add constructor.
11735 (build_type_psymtabs_1): Adjust to std::vector change.
11736 (print_tu_stats): Likewise.
11737 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11738 (write_debug_names): Likewise.
11739
11740 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11741
11742 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11743 Make an std::vector.
11744 <n_comp_units>: Remove.
11745 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11746 to std::vector change.
11747 (dwarf2_per_objfile::get_cutu): Likewise.
11748 (dwarf2_per_objfile::get_cu): Likewise.
11749 (create_cus_from_index): Likewise.
11750 (create_addrmap_from_index): Likewise.
11751 (create_addrmap_from_aranges): Likewise.
11752 (dwarf2_read_index): Likewise.
11753 (dw2_find_last_source_symtab): Likewise.
11754 (dw2_map_symtabs_matching_filename): Likewise.
11755 (dw2_symtab_iter_next): Likewise.
11756 (dw2_print_stats): Likewise.
11757 (dw2_expand_all_symtabs): Likewise.
11758 (dw2_expand_symtabs_with_fullname): Likewise.
11759 (dw2_expand_marked_cus): Likewise.
11760 (dw2_map_symbol_filenames): Likewise.
11761 (create_cus_from_debug_names): Likewise.
11762 (dwarf2_read_debug_names): Likewise.
11763 (dw2_debug_names_iterator::next): Likewise.
11764 (dwarf2_initialize_objfile): Likewise.
11765 (set_partial_user): Likewise.
11766 (dwarf2_build_psymtabs_hard): Likewise.
11767 (read_comp_units_from_section): Remove arguments, adjust to
11768 std::vector change.
11769 (create_all_comp_units): Adjust to std::vector and
11770 read_comp_units_from_section changes.
11771 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11772 change.
11773 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11774 (psyms_seen_size): Likewise.
11775 (write_gdbindex): Likewise.
11776 (write_debug_names): Likewise.
11777
11778 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11779
11780 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11781 with dwarf2_per_objfile.
11782 (create_cus_from_index): Likewise.
11783 (create_signatured_type_table_from_index): Likewise.
11784 (dwarf2_read_index): Likewise.
11785 (dwarf2_initialize_objfile): Likewise.
11786 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11787 per_cu rather than get_dwarf2_per_objfile.
11788
11789 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11790
11791 * dwarf2read.h (struct signatured_type): Forward declare.
11792 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11793 New methods.
11794 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11795 (dw2_get_cutu): ...this.
11796 (dwarf2_per_objfile::get_cu): Rename from...
11797 (dw2_get_cu): ...this.
11798 (dwarf2_per_objfile::get_tu): New.
11799 (create_addrmap_from_index): Adjust.
11800 (create_addrmap_from_aranges): Adjust.
11801 (dw2_find_last_source_symtab): Adjust.
11802 (dw2_map_symtabs_matching_filename): Adjust.
11803 (dw2_symtab_iter_next): Adjust.
11804 (dw2_print_stats): Adjust.
11805 (dw2_expand_all_symtabs): Adjust.
11806 (dw2_expand_symtabs_with_fullname): Adjust.
11807 (dw2_expand_marked_cus): Adjust.
11808 (dw_expand_symtabs_matching_file_matcher): Adjust.
11809 (dw2_map_symbol_filenames): Adjust.
11810 (dw2_debug_names_iterator::next): Adjust.
11811 (dwarf2_initialize_objfile): Adjust.
11812 (set_partial_user): Adjust.
11813 (dwarf2_build_psymtabs_hard): Adjust.
11814
11815 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11816
11817 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11818 Remove unused variables.
11819 (dw2_map_symtabs_matching_filename): Likewise.
11820 (dwarf2_record_block_ranges): Likewise.
11821 (dwarf2_read_addr_index): Likewise.
11822 (follow_die_offset): Likewise.
11823
11824 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11825
11826 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11827 to symbol_file_add_main.
11828
11829 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11830
11831 PR mi/22299
11832 * mi/mi-console.c (do_fputc_async_safe): New.
11833 (mi_console_file::write_async_safe): New.
11834 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11835 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11836 New.
11837 * ui-file.c (ui_file::putstrn): Adjust call to
11838 fputstrn_unfiltered.
11839 * utils.c (printchar): Replace do_fputs and do_fprintf
11840 parameters by do_fputc.
11841 (fputstr_filtered): Adjust call to printchar.
11842 (fputstr_unfiltered): Likewise.
11843 (fputstrn_filtered): Likewise.
11844 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11845 printchar.
11846 * utils.h (do_fputc_ftype): New typedef.
11847 (fputstrn_unfiltered): Add do_fputc parameter.
11848
11849 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11850
11851 * regformats/i386/i386-avx.dat: Remove.
11852
11853 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11854
11855 PR gdb/22979
11856 * amd64-tdep.c (amd64_none_init_abi): New function.
11857 (amd64_x32_none_init_abi): New function.
11858 (_initialize_amd64_tdep): Register handlers for x86-64 and
11859 x64_32 with GDB_OSABI_NONE.
11860 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11861 GDB_OSABI_NONE osabi.
11862
11863 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11864
11865 PR gdb/22980
11866 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11867 GDB_OSABI_NONE.
11868 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11869 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11870
11871 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11872
11873 * common/byte-vector.h (char_vector): New type.
11874 * target.h (target_read_alloc): Return
11875 gdb::optional<byte_vector>.
11876 (target_read_stralloc): Return gdb::optional<char_vector>.
11877 (target_get_osdata): Return gdb::optional<char_vector>.
11878 * target.c (target_read_alloc_1): Templatize. Replacement
11879 manual memory management with vector.
11880 (target_read_alloc): Change return type, adjust.
11881 (target_read_stralloc): Change return type, adjust.
11882 (target_get_osdata): Change return type, adjust.
11883 * auxv.c (struct auxv_info) <length>: Remove.
11884 <data>: Change type to gdb::optional<byte_vector>.
11885 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11886 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11887 (target_auxv_search): Adjust.
11888 (fprint_target_auxv): Adjust.
11889 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11890 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11891 (linux_make_corefile_notes): Adjust.
11892 * osdata.c (get_osdata): Adjust.
11893 * remote.c (remote_get_threads_with_qxfer): Adjust.
11894 (remote_memory_map): Adjust.
11895 (remote_traceframe_info): Adjust.
11896 (btrace_read_config): Adjust.
11897 (remote_read_btrace): Adjust.
11898 (remote_pid_to_exec_file): Adjust.
11899 * solib-aix.c (solib_aix_get_library_list): Adjust.
11900 * solib-dsbt.c (decode_loadmap): Don't free buf.
11901 (dsbt_get_initial_loadmaps): Adjust.
11902 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11903 * solib-target.c (solib_target_current_sos): Adjust.
11904 * tracepoint.c (sdata_make_value): Adjust.
11905 * xml-support.c (xinclude_start_include): Adjust.
11906 (xml_fetch_content_from_file): Adjust.
11907 * xml-support.h (xml_fetch_another): Change return type.
11908 (xml_fetch_content_from_file): Change return type.
11909 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11910 * xml-tdesc.c (file_read_description_xml): Adjust.
11911 (fetch_available_features_from_target): Change return type.
11912 (target_fetch_description_xml): Adjust.
11913 (target_read_description_xml): Adjust.
11914
11915 2018-04-06 Tom Tromey <tom@tromey.com>
11916
11917 * value.c (~value): Update.
11918 (struct value) <contents>: Now unique_xmalloc_ptr.
11919 (value_contents_bits_eq, allocate_value_contents)
11920 (value_contents_raw, value_contents_all_raw)
11921 (value_contents_for_printing, value_contents_for_printing_const)
11922 (set_value_enclosing_type): Update.
11923
11924 2018-04-06 Tom Tromey <tom@tromey.com>
11925
11926 * value.c (range_s): Remove typedef, VEC.
11927 (struct range): Add operator<.
11928 (range_lessthan): Remove.
11929 (ranges_contain): Change type.
11930 (~value): Update.
11931 (struct value) <unavailable, optimized_out>: Now std::vector.
11932 (value_entirely_available)
11933 (value_entirely_covered_by_range_vector)
11934 (value_entirely_unavailable, value_entirely_optimized_out):
11935 Update.
11936 (insert_into_bit_range_vector): Change argument type.
11937 (find_first_range_overlap): Likewise.
11938 (struct ranges_and_idx, value_contents_bits_eq)
11939 (require_not_optimized_out, require_available): Update.
11940 (ranges_copy_adjusted): Change argument types.
11941 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11942
11943 2018-04-06 Tom Tromey <tom@tromey.com>
11944
11945 * value.c (~value): Update.
11946 (struct value) <parent>: Now a value_ref_ptr.
11947 (value_parent, set_value_parent, value_address, value_copy):
11948 Update.
11949
11950 2018-04-06 Tom Tromey <tom@tromey.com>
11951
11952 * value.c (struct value): Add constructor, destructor, and member
11953 initializers.
11954 (allocate_value_lazy, value_decref): Update.
11955
11956 2018-04-06 Tom Tromey <tom@tromey.com>
11957
11958 * value.c (struct value) <released, next>: Remove.
11959 (all_values): Now a std::vector.
11960 (allocate_value_lazy): Update.
11961 (value_next): Remove.
11962 (value_mark, value_free_to_mark, release_value)
11963 (value_release_to_mark): Update.
11964
11965 2018-04-06 Tom Tromey <tom@tromey.com>
11966
11967 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11968 (free_value_chain): Remove.
11969 * value.c (free_value_chain): Remove.
11970 (value_release_to_mark): Return a std::vector.
11971 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11972 std::vector.
11973 (check_condition): Update.
11974 * eval.c (fetch_subexp_value): Change "val_chain" to a
11975 std::vector.
11976 * breakpoint.c (update_watchpoint): Update.
11977 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11978
11979 2018-04-06 Tom Tromey <tom@tromey.com>
11980
11981 * value.h (free_all_values): Remove.
11982 * value.c (free_all_values): Remove.
11983
11984 2018-04-06 Tom Tromey <tom@tromey.com>
11985
11986 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11987 (value_history_chain, value_history_count): Remove.
11988 (value_history): New global.
11989 (record_latest_value, access_value_history, show_values)
11990 (preserve_values): Update.
11991
11992 2018-04-06 Tom Tromey <tom@tromey.com>
11993
11994 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11995 * varobj.c (varobj_set_display_format, varobj_set_value)
11996 (install_default_visualizer, construct_visualizer)
11997 (install_new_value, ~varobj, varobj_get_value_type)
11998 (my_value_of_variable, varobj_editable_p): Update.
11999 * c-varobj.c (c_describe_child, c_value_of_variable)
12000 (cplus_number_of_children, cplus_describe_child): Update.
12001 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12002 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12003 (ada_value_of_variable, ada_value_is_changeable_p): Update.
12004
12005 2018-04-06 Tom Tromey <tom@tromey.com>
12006
12007 * printcmd.c (last_examine_address): Change type to
12008 value_ref_ptr.
12009 (do_examine, x_command): Update.
12010
12011 2018-04-06 Tom Tromey <tom@tromey.com>
12012
12013 * value.c (release_value): Update.
12014 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12015 (struct bpstats) <val>: Now a value_ref_ptr.
12016 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12017 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12018 (~watchpoint, print_it_watchpoint, watch_command_1)
12019 (invalidate_bp_value_on_memory_change): Update.
12020
12021 2018-04-06 Tom Tromey <tom@tromey.com>
12022
12023 * varobj.c (varobj_clear_saved_item)
12024 (update_dynamic_varobj_children, install_new_value, ~varobj):
12025 Update.
12026 * value.h (value_incref): Move declaration earlier.
12027 (value_decref): Rename from value_free.
12028 (struct value_ref_policy): New.
12029 (value_ref_ptr): New typedef.
12030 (struct value_deleter): Remove.
12031 (gdb_value_up): Remove typedef.
12032 (release_value): Change return type.
12033 (release_value_or_incref): Remove.
12034 * value.c (set_value_parent): Update.
12035 (value_incref): Change return type.
12036 (value_decref): Rename from value_free.
12037 (value_free_to_mark, free_all_values, free_value_chain): Update.
12038 (release_value): Return value_ref_ptr.
12039 (release_value_or_incref): Remove.
12040 (record_latest_value, set_internalvar, clear_internalvar):
12041 Update.
12042 * stack.c (info_frame_command): Don't call value_free.
12043 * python/py-value.c (valpy_dealloc, valpy_new)
12044 (value_to_value_object): Update.
12045 * printcmd.c (do_examine): Update.
12046 * opencl-lang.c (lval_func_free_closure): Update.
12047 * mi/mi-main.c (register_changed_p): Don't call value_free.
12048 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12049 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12050 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12051 value_free.
12052 * guile/scm-value.c (vlscm_free_value_smob)
12053 (vlscm_scm_from_value): Update.
12054 * frame.c (frame_register_unwind, frame_unwind_register_signed)
12055 (frame_unwind_register_unsigned, get_frame_register_bytes)
12056 (put_frame_register_bytes): Don't call value_free.
12057 * findvar.c (address_from_register): Don't call value_free.
12058 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12059 * dwarf2loc.c (entry_data_value_free_closure)
12060 (value_of_dwarf_reg_entry, free_pieced_value_closure)
12061 (dwarf2_evaluate_loc_desc_full): Update.
12062 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12063 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12064 (~watchpoint, watch_command_1)
12065 (invalidate_bp_value_on_memory_change): Update.
12066 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12067
12068 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
12069
12070 PR gdb/23022
12071 * warning.m4: Add -Wno-error=deprecated-register.
12072 * configure: Re-generate.
12073
12074 2018-04-05 Tom Tromey <tom@tromey.com>
12075
12076 * linespec.h: Remove include of "vec.h".
12077
12078 2018-04-05 Tom Tromey <tom@tromey.com>
12079
12080 * linespec.c (typep): Remove typedef.
12081 (find_methods, find_superclass_methods): Take a std::vector.
12082 (find_method): Use std::vector.
12083
12084 2018-04-05 Tom Tromey <tom@tromey.com>
12085
12086 * utils.c (compare_strings): Remove.
12087 * utils.h (compare_strings): Remove.
12088 * objc-lang.h (find_imps): Update.
12089 * objc-lang.c (find_methods): Take a std::vector.
12090 (uniquify_strings, find_imps): Likewise.
12091 * linespec.c (find_methods): Take a std::vector.
12092 (decode_objc): Use std::vector.
12093 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12094 a std::vector.
12095 (find_method, find_function_symbols): Use std::vector.
12096
12097 2018-04-05 Tom Tromey <tom@tromey.com>
12098
12099 * completer.c (completion_tracker::completion_tracker): Remove
12100 cast.
12101 (completion_tracker::discard_completions): Likewise.
12102 * breakpoint.c (ambiguous_names_p): Remove cast.
12103 * ada-lang.c (_initialize_ada_language): Remove cast.
12104 * utils.h (streq): Update.
12105 (streq_hash): Add new declaration.
12106 * utils.c (streq): Return bool.
12107 (streq_hash): New function.
12108
12109 2018-04-05 Tom Tromey <tom@tromey.com>
12110
12111 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12112 Remove a string copy.
12113
12114 2018-04-05 Tom Tromey <tom@tromey.com>
12115
12116 * linespec.c (filter_results): Use std::vector.
12117 (decode_line_2, decode_line_full): Update.
12118
12119 2018-04-05 Tom Tromey <tom@tromey.com>
12120
12121 * linespec.c (canonical_to_fullform): Return std::string.
12122 (filter_results): Update.
12123 (struct decode_line_2_item): Add constructor.
12124 <fullform, displayform>: Now std::string.
12125 (decode_line_2_compare_items): Now a std::sort comparator.
12126 (decode_line_2): Update.
12127
12128 2018-04-05 Tom Tromey <tom@tromey.com>
12129
12130 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12131 (unexpected_linespec_error): Update.
12132 (linespec_parse_basic, parse_linespec): Update.
12133
12134 2018-04-05 Tom Tromey <tom@tromey.com>
12135
12136 * linespec.c (linespec_parse_basic): Reindent.
12137
12138 2018-04-05 Tom Tromey <tom@tromey.com>
12139
12140 * minsyms.h (iterate_over_minimal_symbols): Update.
12141 * minsyms.c (iterate_over_minimal_symbols): Take a
12142 gdb::function_view.
12143 * linespec.c (struct collect_minsyms): Remove.
12144 (compare_msyms): Now a std::sort comparator.
12145 (add_minsym): Add parameters.
12146 (search_minsyms_for_name): Update. Use std::vector.
12147
12148 2018-04-03 Tom Tromey <tom@tromey.com>
12149
12150 * mipsread.c (read_alphacoff_dynamic_symtab): Use
12151 gdb::byte_vector.
12152
12153 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12154
12155 * MAINTAINERS (Write After Approval): Add Weimin Pan.
12156
12157 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12158
12159 PR gdb/16959
12160 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
12161 printing static type.
12162
12163 2018-04-01 Tom Tromey <tom@tromey.com>
12164
12165 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12166 (rs6000_xfer_shared_libraries): Update.
12167
12168 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
12169
12170 * common/gdb_vecs.h (char_ptr): Remove.
12171 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12172
12173 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12174
12175 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12176 with std::vector.
12177 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12178
12179 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12180
12181 * tracepoint.h (struct uploaded_tp): Initialize fields.
12182 <actions, step_actions, cmd_strings>: Change type to
12183 std::vector<char *>.
12184 * tracepoint.c (get_uploaded_tp): Allocate with new.
12185 (free_uploaded_tps): Free with delete.
12186 (parse_tracepoint_definition): Adjust to std::vector change.
12187 * breakpoint.c (read_uploaded_action): Likewise.
12188 (create_tracepoint_from_upload): Likewise.
12189 * ctf.c (ctf_write_uploaded_tp): Likewise.
12190 (SET_ARRAY_FIELD): Likewise.
12191 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12192
12193 2018-03-30 Tom Tromey <tom@tromey.com>
12194
12195 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
12196 std::unique_ptr.
12197 (svr4_keep_data_in_core): Update.
12198 (svr4_read_so_list): Update.
12199
12200 2018-03-30 Tom Tromey <tom@tromey.com>
12201
12202 * windows-nat.c (handle_output_debug_string, handle_exception):
12203 Update.
12204 * target.h (target_read_string): Update.
12205 * target.c (target_read_string): Change "string" to
12206 unique_xmalloc_ptr.
12207 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12208 Update.
12209 * solib-frv.c (frv_current_sos): Update.
12210 * solib-dsbt.c (dsbt_current_sos): Update.
12211 * solib-darwin.c (darwin_current_sos): Update.
12212 * linux-thread-db.c (inferior_has_bug): Update.
12213 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12214 Update. Remove alloca.
12215 * ada-lang.c (ada_main_name): Update.
12216
12217 2018-03-30 Tom Tromey <tom@tromey.com>
12218
12219 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12220 (struct dwo_file_deleter): New.
12221 (dwo_file_up): New typedef.
12222 (open_and_init_dwo_file): Use dwo_file_up.
12223 (free_dwo_file_cleanup): Remove.
12224
12225 2018-03-30 Tom Tromey <tom@tromey.com>
12226
12227 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12228 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12229
12230 2018-03-30 Tom Tromey <tom@tromey.com>
12231
12232 * dwarf2read.c (class free_cached_comp_units): New class.
12233 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12234 (free_cached_comp_units): Remove function.
12235
12236 2018-03-30 Tom Tromey <tom@tromey.com>
12237
12238 * utils.h (make_cleanup_unpush_target): Remove.
12239 * inf-ptrace.c (struct target_unpusher): New.
12240 (target_unpush_up) New typedef.
12241 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12242 target_unpush_up.
12243 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12244
12245 2018-03-27 Tom Tromey <tom@tromey.com>
12246
12247 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12248
12249 2018-03-27 Pedro Alves <palves@redhat.com>
12250 Tom Tromey <tom@tromey.com>
12251
12252 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12253 destructor. Now a class.
12254 (gdb_readline_wrapper_cleanup): Remove function.
12255 (gdb_readline_wrapper): Remove cleanups.
12256
12257 2018-03-27 Tom Tromey <tom@tromey.com>
12258
12259 * typeprint.h (struct type_print_options) <local_typedefs,
12260 global_typedefs>: Remove "struct" keyword.
12261 (class typedef_hash_table): New class.
12262 (recursively_update_typedef_hash, add_template_parameters)
12263 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12264 (find_typedef_in_hash): Don't declare.
12265 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12266 (typedef_hash_table::recursively_update): Rename from
12267 recursively_update_typedef_hash. Now a member.
12268 (typedef_hash_table::add_template_parameters): Rename from
12269 add_template_parameters. Now a member.
12270 (typedef_hash_table::typedef_hash_table): Now a constructor;
12271 rename from create_typedef_hash.
12272 (typedef_hash_table::~typedef_hash_table): Now a destructor;
12273 rename from free_typedef_hash.
12274 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12275 (do_free_global_table): Remove.
12276 (typedef_hash_table::typedef_hash_table): New constructor; renamed
12277 from copy_type_recursive.
12278 (create_global_typedef_table): Remove.
12279 (typedef_hash_table::find_global_typedef): Now a member of
12280 typedef_hash_table.
12281 (typedef_hash_table::find_typedef): Rename from
12282 find_typedef_in_hash; now a member.
12283 (whatis_exp): Update.
12284 * extension.h (struct ext_lang_type_printers): Add constructor and
12285 destructor.
12286 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12287 declare.
12288 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12289 Now a constructor; rename from start_ext_lang_type_printers.
12290 (ext_lang_type_printers): Now a destructor; rename from
12291 free_ext_lang_type_printers.
12292 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12293 Update.
12294 (c_type_print_base_struct_union): Update. Remove cleanups.
12295
12296 2018-03-27 Tom Tromey <tom@tromey.com>
12297
12298 * dwarf-index-write.c: Include <cmath>.
12299
12300 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12301
12302 * NEWS: Add entry describing new "set|show varsize-limit" command.
12303 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12304 command.
12305 * printcmd.c (_initialize_printcmd): Add "set var" alias of
12306 "set variable".
12307
12308 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
12309
12310 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12311 dwarf-index-write.c
12312 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12313 * dwarf-index-common.c: New file.
12314 * dwarf-index-common.h: New file.
12315 * dwarf-index-write.c: New file.
12316 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12317 (struct dwarf2_section_info): Move from here.
12318 (dwarf2_section_info_def): Likewise.
12319 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12320 (offset_type): Likewise.
12321 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12322 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12323 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12324 (byte_swap): Likewise.
12325 (MAYBE_SWAP): Likewise.
12326 (dwarf2_per_cu_ptr): Likewise.
12327 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12328 (struct tu_stats): Likewise.
12329 (struct dwarf2_per_objfile): Likewise.
12330 (struct dwarf2_per_cu_data): Likewise.
12331 (struct signatured_type): Likewise.
12332 (sig_type_ptr): Likewise.
12333 (DEF_VEC_P (sig_type_ptr)): Likewise.
12334 (INDEX4_SUFFIX): Likewise.
12335 (INDEX5_SUFFIX): Likewise.
12336 (DEBUG_STR_SUFFIX): Likewise.
12337 (dwarf2_read_section): Make non-static.
12338 (mapped_index_string_hash): Move from here.
12339 (dwarf5_djb_hash): Likewise.
12340 (file_write): Likewise.
12341 (class data_buf): Likewise.
12342 (struct symtab_index_entry): Likewise.
12343 (struct mapped_symtab): Likewise.
12344 (find_slot): Likewise.
12345 (hash_expand): Likewise.
12346 (add_index_entry): Likewise.
12347 (uniquify_cu_indices): Likewise.
12348 (class c_str_view): Likewise.
12349 (class c_str_view_hasher): Likewise.
12350 (class vector_hasher): Likewise.
12351 (write_hash_table): Likewise.
12352 (psym_index_map): Likewise.
12353 (struct addrmap_index_data): Likewise.
12354 (add_address_entry): Likewise.
12355 (add_address_entry_worker): Likewise.
12356 (write_address_map): Likewise.
12357 (symbol_kind): Likewise.
12358 (write_psymbols): Likewise.
12359 (struct signatured_type_index_data): Likewise.
12360 (write_one_signatured_type): Likewise.
12361 (recursively_count_psymbols): Likewise.
12362 (recursively_write_psymbols): Likewise.
12363 (class debug_names): Likewise.
12364 (check_dwarf64_offsets): Likewise.
12365 (psyms_seen_size): Likewise.
12366 (write_gdbindex): Likewise.
12367 (write_debug_names): Likewise.
12368 (assert_file_size): Likewise.
12369 (write_psymtabs_to_index): Likewise.
12370 (save_gdb_index_command): Likewise.
12371 (_initialize_dwarf2_read): Don't register the "save gdb-index"
12372 command.
12373 * dwarf2read.h: New file.
12374
12375 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12376
12377 PR gdb/22670
12378 * dwarf2read.c (dwarf2_physname): Do not return the demangled
12379 symbol name if the CU's language stores symbol names in linkage
12380 format.
12381 * language.h (struct language_defn)
12382 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
12383 all instances of this struct.
12384
12385 2018-03-26 Tom Tromey <tom@tromey.com>
12386
12387 * stack.c (backtrace_command_1): Remove verbose code.
12388
12389 2018-03-26 Tom Tromey <tom@tromey.com>
12390
12391 * python/py-framefilter.c (py_print_type): Don't catch
12392 exceptions. Return void.
12393 (py_print_value): Likewise.
12394 (py_print_single_arg): Likewise.
12395 (enumerate_args): Don't catch exceptions.
12396 (py_print_args): Likewise.
12397 (py_print_frame): Likewise.
12398 (gdbpy_apply_frame_filter): Catch exceptions here.
12399
12400 2018-03-26 Tom Tromey <tom@tromey.com>
12401
12402 * stack.c (_initialize_stack): Remove trailing newlines from help
12403 text. Add "Usage" line to "backtrace" help.
12404
12405 2018-03-26 Tom Tromey <tom@tromey.com>
12406
12407 PR python/16486:
12408 * python/py-framefilter.c (py_print_args): Call wrap_hint.
12409
12410 2018-03-26 Tom Tromey <tom@tromey.com>
12411
12412 * python/py-framefilter.c (py_print_single_arg): Return
12413 EXT_LANG_BT_ERROR from catch.
12414
12415 2018-03-26 Tom Tromey <tom@tromey.com>
12416
12417 PR backtrace/15584:
12418 * stack.c (backtrace_command_1): Move some code into no-filters
12419 "if".
12420
12421 2018-03-26 Tom Tromey <tom@tromey.com>
12422
12423 * python/py-framefilter.c (throw_quit_or_print_exception): New
12424 function.
12425 (gdbpy_apply_frame_filter): Use it.
12426
12427 2018-03-26 Tom Tromey <tom@tromey.com>
12428
12429 PR cli/17716:
12430 * python/py-framefilter.c (py_print_type, py_print_value)
12431 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12432 RETURN_MASK_ERROR.
12433
12434 2018-03-26 Tom Tromey <tom@tromey.com>
12435
12436 * python/py-framefilter.c (enumerate_args): Use
12437 gdb::unique_xmalloc_ptr.
12438
12439 2018-03-26 Tom Tromey <tom@tromey.com>
12440
12441 * python/py-framefilter.c (py_print_frame): Return
12442 EXT_LANG_BT_OK.
12443 (gdbpy_apply_frame_filter): Update comment.
12444 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12445 Remove.
12446 <EXT_LANG_BT_NO_FILTERS>: Change value.
12447
12448 2018-03-26 Tom Tromey <tom@tromey.com>
12449
12450 PR backtrace/15582:
12451 * stack.c (backtrace_command): Parse "hide" argument.
12452 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12453 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12454 constant.
12455
12456 2018-03-26 Tom Tromey <tom@tromey.com>
12457
12458 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12459 add "flags".
12460 (backtrace_command): Remove "fulltrace", add "flags".
12461
12462 2018-03-26 Tom Tromey <tom@tromey.com>
12463
12464 * stack.c (backtrace_command): Rewrite command line parsing.
12465
12466 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12467
12468 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12469
12470 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12471
12472 * filename-seen-cache.h: Add include guard.
12473
12474 2018-03-26 Keith Seitz <keiths@redhat.com>
12475
12476 * symfile.c (place_section): Remove "struct" from section_addr_info
12477 in comment.
12478 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12479 "struct" keyword from section_addr_info.
12480
12481 2018-03-26 Alan Hayward <alan.hayward@arm.com>
12482
12483 * regformats/regdef.h (reg): Add constructors.
12484
12485 2018-03-25 Pedro Alves <palves@redhat.com>
12486
12487 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12488 if then/else bodies in var_func_name extraction.
12489
12490 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
12491
12492 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12493 lookup_minimal_symbol() to find symbol entry.
12494 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12495
12496 2018-03-23 Keith Seitz <keiths@redhat.com>
12497
12498 PR c++/22968
12499 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12500 nested type definitions for C++, too.
12501
12502 2018-03-23 Tom Tromey <tom@tromey.com>
12503
12504 * machoread.c (struct oso_el): Add a constructor. Don't define as
12505 a typedef.
12506 (macho_register_oso): Remove.
12507 (macho_symtab_read): Take a std::vector.
12508 (oso_el_compare_name): Now a std::sort comparator.
12509 (macho_symfile_read_all_oso): Take a std::vector.
12510 (macho_symfile_read): Use std::vector. Remove cleanups.
12511
12512 2018-03-22 Tom Tromey <tom@tromey.com>
12513
12514 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12515 (record_full_goto_bookmark): Use std::string.
12516
12517 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12518
12519 PR tdep/18295
12520 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12521 a single mask.
12522
12523 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12524
12525 * rs6000-tdep.c (store_insn_p): New function.
12526 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12527 and cr_reg to their unshifted values. Use store_insn_p to
12528 match LR saves using either R1 or fdata->alloca_reg. Use
12529 store_insn_p to match CR saves. Set alloca_reg_offset
12530 when alloca_reg and framep are set. Remove lr_reg shift
12531 when assigning to fdata->lr_register.
12532
12533 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
12534
12535 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12536 command line args instead of emitting a warning.
12537
12538 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12539
12540 * tracepoint.h (struct static_tracepoint_marker): Initialize
12541 fields, define default constructor, move constructor and move
12542 assignment, disable the rest.
12543 <str_id, extra>: Make std::string.
12544 (release_static_tracepoint_marker): Remove.
12545 (free_current_marker): Remove.
12546 * tracepoint.c (free_current_marker): Remove.
12547 (parse_static_tracepoint_marker_definition): Adjust to
12548 std::string, use new hex2str overload.
12549 (release_static_tracepoint_marker): Remove.
12550 (print_one_static_tracepoint_marker): Get marker by reference
12551 and adjust to std::string.
12552 (info_static_tracepoint_markers_command): Adjust to std::vector
12553 changes
12554 * target.h (static_tracepoint_marker_p): Remove typedef.
12555 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12556 (struct target_ops) <to_static_tracepoint_marker_at>: Return
12557 bool.
12558 <to_static_tracepoint_markers_by_strid>: Return std::vector.
12559 * target-debug.h
12560 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12561 (target_debug_print_std_vector_static_tracepoint_marker): New.
12562 (target_debug_print_struct_static_tracepoint_marker_p): Rename
12563 to...
12564 (target_debug_print_static_tracepoint_marker_p): ... this.
12565 * target-delegates.c: Re-generate.
12566 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12567 Make std::string.
12568 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12569 (decode_static_tracepoint_spec): Adjust to std::vector.
12570 (tracepoint_print_one_detail): Adjust to std::string.
12571 (strace_marker_decode_location): Adjust to std::string.
12572 (update_static_tracepoint): Adjust to std::string, remove call
12573 to release_static_tracepoint_marker.
12574 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12575 Adjust to std::vector.
12576 * remote.c (remote_static_tracepoint_marker_at): Return bool.
12577 (remote_static_tracepoint_markers_by_strid): Adjust to
12578 std::vector.
12579 * common/rsp-low.h (hex2str): New overload with explicit count
12580 of bytes.
12581 * common/rsp-low.c (hex2str): New overload with explicit count
12582 of bytes.
12583 * unittests/rsp-low-selftests.c (test_hex2str): New function.
12584 (_initialize_rsp_low_selftests): Add test_hex2str test.
12585 * unittests/tracepoint-selftests.c
12586 (test_parse_static_tracepoint_marker_definition): Adjust to
12587 std::string.
12588
12589 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12590
12591 * tracepoint.c (parse_static_tracepoint_marker_definition):
12592 Consider case where the definition is followed by more
12593 definitions.
12594 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12595 tracepoint-selftests.c.
12596 * unittests/tracepoint-selftests.c: New.
12597
12598 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12599
12600 * MAINTAINERS (Write After Approval): Add Pedro Franco de
12601 Carvalho.
12602
12603 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12604
12605 * symtab.c (find_pc_sect_line): fixed indentation.
12606
12607 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12608
12609 * symtab.c (find_pc_sect_line): now uses binary search.
12610
12611 2018-03-19 Tom Tromey <tom@tromey.com>
12612
12613 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12614 "IDENT" production.
12615
12616 2018-03-19 Pedro Alves <palves@redhat.com>
12617 Tom Tromey <tom@tromey.com>
12618
12619 * unittests/observable-selftests.c: New file.
12620 * common/observable.h: New file.
12621 * observable.h: New file.
12622 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12623 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12624 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12625 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12626 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12627 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12628 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12629 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12630 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12631 python/py-breakpoint.c, python/py-finishbreakpoint.c,
12632 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12633 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12634 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12635 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12636 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12637 tui/tui-interp.c, valops.c: Update all users.
12638 * tui/tui-hooks.c (tui_bp_created_observer)
12639 (tui_bp_deleted_observer, tui_bp_modified_observer)
12640 (tui_inferior_exit_observer, tui_before_prompt_observer)
12641 (tui_normal_stop_observer, tui_register_changed_observer):
12642 Remove.
12643 (tui_observers_token): New global.
12644 (attach_or_detach, tui_attach_detach_observers): New functions.
12645 (tui_install_hooks, tui_remove_hooks): Use
12646 tui_attach_detach_observers.
12647 * record-btrace.c (record_btrace_thread_observer): Remove.
12648 (record_btrace_thread_observer_token): New global.
12649 * observer.sh: Remove.
12650 * observer.c: Rename to observable.c.
12651 * observable.c (namespace gdb_observers): Define new objects.
12652 (observer_debug): Move into gdb_observers namespace.
12653 (struct observer, struct observer_list, xalloc_observer_list_node)
12654 (xfree_observer_list_node, generic_observer_attach)
12655 (generic_observer_detach, generic_observer_notify): Remove.
12656 (_initialize_observer): Update.
12657 Don't include observer.inc.
12658 * Makefile.in (generated_files): Remove observer.h, observer.inc.
12659 (clean mostlyclean): Likewise.
12660 (observer.h, observer.inc): Remove targets.
12661 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12662 (COMMON_SFILES): Use observable.c, not observer.c.
12663 * .gitignore: Remove observer.h.
12664
12665 2018-03-18 Tom Tromey <tom@tromey.com>
12666
12667 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12668 gdb::def_vector.
12669 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12670
12671 2018-03-17 Tom Tromey <tom@tromey.com>
12672
12673 * auto-load.c (auto_load_objfile_script_1): Use std::string.
12674
12675 2018-03-17 Tom Tromey <tom@tromey.com>
12676
12677 * target.c (class scoped_target_fd): New.
12678 (target_fileio_close_cleanup): Remove.
12679 (target_fileio_read_alloc_1): Use scoped_target_fd.
12680
12681 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12682
12683 * silent-rules.mk: New.
12684 * Makefile.in: Include silent-rules.mk
12685 (srcdir, VPATH, top_srcdir): Move up.
12686 (COMPILE): Add ECHO_CXX.
12687 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12688 (init.c): Add ECHO_INIT_C.
12689 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12690 (version.c): Add ECHO_GEN.
12691 (printcmd.o): Add ECHO_CXX.
12692 (target-float.o): Add ECHO_CXX.
12693 (ada-exp.o): Add ECHO_CXX.
12694 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12695 (insight$(EXEEXT)): Add ECHO_CXXLD.
12696 * gnulib/configure.ac: Add AM_SILENT_RULES.
12697 * gnulib/aclocal.m4: Re-generate.
12698 * gnulib/configure: Re-generate.
12699 * gnulib/import/Makefile.in: Re-generate.
12700
12701 2018-03-16 Tom Tromey <tom@tromey.com>
12702
12703 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12704 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12705 * utils.c (do_free_section_addr_info)
12706 (make_cleanup_free_section_addr_info): Remove.
12707 * symfile.h (struct other_sections): Add constructor.
12708 (struct section_addr_info): Remove.
12709 (section_addr_info): New typedef.
12710 (struct sym_fns) <sym_offsets>: Change type of parameter.
12711 (build_section_addr_info_from_objfile)
12712 (relative_addr_info_to_section_offsets, addr_info_make_relative)
12713 (default_symfile_offsets, symbol_file_add)
12714 (symbol_file_add_from_bfd)
12715 (build_section_addr_info_from_section_table): Update.
12716 (alloc_section_addr_info, free_section_addr_info): Don't declare.
12717 * symfile.c (alloc_section_addr_info): Remove.
12718 (build_section_addr_info_from_section_table): Change return type.
12719 Update.
12720 (build_section_addr_info_from_bfd)
12721 (build_section_addr_info_from_objfile): Likewise.
12722 (free_section_addr_info): Remove.
12723 (relative_addr_info_to_section_offsets): Change type of "addrs".
12724 (addrs_section_compar): Now a std::sort comparator.
12725 (addrs_section_sort): Change return type.
12726 (addr_info_make_relative): Change type of "addrs". Update.
12727 (default_symfile_offsets, syms_from_objfile_1)
12728 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12729 (symbol_file_add_separate): Update.
12730 (symbol_file_add): Change type of "addrs". Update.
12731 (add_symbol_file_command): Update. Remove cleanups.
12732 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
12733 cleanups.
12734 * symfile-debug.c (debug_sym_offsets): Change type of "info".
12735 * solib.c (solib_read_symbols): Update.
12736 * objfiles.c (objfile_relocate): Update. Remove cleanups.
12737 * machoread.c (macho_symfile_offsets): Update.
12738 * jit.c (jit_bfd_try_read_symtab): Update.
12739
12740 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
12741
12742 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12743 unittests/utils-selftests.c.
12744 * unittests/utils-selftests.c: New file.
12745
12746 2018-03-14 Tom Tromey <tom@tromey.com>
12747
12748 PR cli/14977:
12749 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12750 for NULL.
12751
12752 2018-03-14 Tom Tromey <tom@tromey.com>
12753
12754 PR cli/19918:
12755 * printcmd.c (printf_pointer): Allow "-" in format.
12756
12757 2018-03-14 Tom Tromey <tom@tromey.com>
12758
12759 * printcmd.c (_initialize_printcmd): Add usage to printf.
12760
12761 2018-03-14 Yao Qi <qiyao@sourceware.org>
12762
12763 * MAINTAINERS: Update my email address.
12764
12765 2018-03-13 Tom Tromey <tom@tromey.com>
12766
12767 * machoread.c (macho_check_dsym): Change filenamep to a
12768 std::string*.
12769 (macho_symfile_read): Update.
12770 * symfile.c (load_command): Use std::string.
12771
12772 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12773
12774 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12775 to error message string.
12776 (riscv_register_name): Use xsnprintf instead of sprintf.
12777 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12778 internal_error.
12779 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12780 error.
12781 (riscv_push_dummy_call): Likewise.
12782
12783 2018-03-12 Tom Tromey <tom@tromey.com>
12784
12785 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12786 Use gdb::byte_vector.
12787 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12788
12789 2018-03-12 Yao Qi <yao.qi@linaro.org>
12790
12791 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12792 parameter type to readable_regcache.
12793 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12794 the declaration.
12795
12796 2018-03-11 Tom Tromey <tom@tromey.com>
12797
12798 * dwarf2read.c (struct nextfield): Add initializers.
12799 (struct nextfnfield): Remove.
12800 (struct fnfieldlist): Add initializers. Remove "length" and
12801 "head", use std::vector.
12802 (struct decl_field_list): Remove.
12803 (struct field_info): Add initializers.
12804 <fields, baseclasses>: Now std::vector.
12805 <nbaseclasses, nfnfields, typedef_field_list_count,
12806 nested_types_list_count>: Remove.
12807 (dwarf2_add_field, dwarf2_add_type_defn)
12808 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12809 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12810 (process_structure_scope): Update.
12811
12812 2018-03-11 Tom Tromey <tom@tromey.com>
12813
12814 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12815 for use by std::sort.
12816 (build_type_psymtabs_1): Use std::vector.
12817
12818 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12819
12820 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12821 and LIBMPFR in the printed configuration.
12822
12823 2018-03-08 Tom Tromey <tom@tromey.com>
12824
12825 * source.c (get_filename_and_charpos): Use scoped_fd.
12826 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12827 (procfs_pidlist): Likewise.
12828 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12829 (iterate_over_mappings): Likewise.
12830
12831 2018-03-08 Tom Tromey <tom@tromey.com>
12832
12833 * infcall.c (struct call_return_meta_info)
12834 <stack_temporaries_enabled>: Remove.
12835 (get_call_return_value, call_function_by_hand_dummy): Update.
12836 * thread.c (disable_thread_stack_temporaries): Remove.
12837 (enable_thread_stack_temporaries): Remove.
12838 (thread_stack_temporaries_enabled_p): Return bool.
12839 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12840 (get_last_thread_stack_temporary): Update.
12841 * eval.c (evaluate_subexp): Update.
12842 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12843 class, not a function.
12844 (value_ptr, value_vec): Remove typedefs.
12845 (class thread_info) <stack_temporaries_enabled>: Now bool.
12846 <stack_temporaries>: Now a std::vector.
12847 (thread_stack_temporaries_enabled_p)
12848 (value_in_thread_stack_temporaries): Return bool.
12849
12850 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12851
12852 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12853 (getpkt_or_notif_sane_1): Likewise.
12854
12855 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12856
12857 * build-id.c (build_id_to_debug_bfd): Use std::string.
12858
12859 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12860
12861 * build-id.c (find_separate_debug_file_by_buildid): Return
12862 std::string.
12863 * build-id.h (find_separate_debug_file_by_buildid): Return
12864 std::string.
12865 * coffread.c (coff_symfile_read): Adjust to std::string.
12866 * elfread.c (elf_symfile_read): Adjust to std::string.
12867 * symfile.c (separate_debug_file_exists): Change parameter to
12868 std::string.
12869 (find_separate_debug_file): Return std::string.
12870 (find_separate_debug_file_by_debuglink): Return std::string.
12871 * symfile.h (find_separate_debug_file_by_debuglink): Return
12872 std::string.
12873
12874 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12875
12876 * common/xml-utils.c (xml_escape_text): Move code to...
12877 (xml_escape_text_append): ... this new function.
12878 * common/xml-utils.h (xml_escape_text_append): New declaration.
12879 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12880 New function.
12881 (_initialize_xml_utils): register test_xml_escape_text_append as
12882 a selftest.
12883
12884 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12885
12886 * defs.h: Remove MAX_REGISTER_SIZE.
12887 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12888 asserts.
12889 * python/py-unwind.c (pyuw_sniffer): Likewise.
12890
12891 2018-03-07 Tom Tromey <tom@tromey.com>
12892
12893 * linux-tdep.c (linux_info_proc): Update.
12894 * target.h (struct target_ops) <to_fileio_readlink>: Return
12895 optional<string>.
12896 (target_fileio_readlink): Return optional<string>.
12897 * remote.c (remote_hostio_readlink): Return optional<string>.
12898 * inf-child.c (inf_child_fileio_readlink): Return
12899 optional<string>.
12900 * target.c (target_fileio_readlink): Return optional<string>.
12901
12902 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12903
12904 * regcache.c (cooked_read_test): Add riscv to the list of
12905 architectures that have a save_reggroup.
12906
12907 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12908
12909 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12910 value is not a dynamic class object.
12911
12912 2018-03-06 Tom Tromey <tom@tromey.com>
12913
12914 * rust-exp.y: Formatting fixes.
12915
12916 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12917
12918 * riscv-tdep.c (riscv_register_name): Remove target description
12919 support.
12920 (riscv_gdbarch_init): Remove target description check.
12921
12922 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12923
12924 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12925 comment.
12926 * riscv-tdep.h: Likewise.
12927
12928 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12929
12930 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12931 (riscv_pseudo_register_write): Delete.
12932 (riscv_gdbarch_init): Remove all use of pseudo registers.
12933
12934 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12935
12936 * record-btrace.c (btrace_print_lines): Replace cleanup
12937 parameter with RAII equivalents.
12938 (btrace_insn_history): Replace cleanup with RAII equivalents.
12939 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12940 make_cleanup_ui_out_tuple_begin_end): Remove.
12941 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12942 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12943 make_cleanup_ui_out_list_begin_end): Remove.
12944
12945 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12946
12947 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12948 parameter types to std::vector. Use bool.
12949 (record_btrace_wait): Replace VEC(tp_t) with
12950 std::vector<thread_info *>.
12951 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12952
12953 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12954
12955 * record-btrace.c (record_btrace_disable_callback): Remove.
12956 (struct scoped_btrace_disable): New.
12957 (record_btrace_open): Use scoped_btrace_disable.
12958
12959 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12960
12961 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12962 reading values from registers.
12963
12964 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12965
12966 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12967 where appropriate.
12968
12969 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12970
12971 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12972 change parameter type. Use GDB's print functions, and use
12973 core_addr_to_string where appropriate.
12974 (riscv_push_dummy_call): Use core_addr_to_string where
12975 appropriate, update call to riscv_print_arg_location, and reindent
12976 a few lines.
12977 (riscv_return_value): Update call to riscv_print_arg_location.
12978
12979 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12980 Tim Newsome <tim@sifive.com>
12981 Albert Ou <a0u@eecs.berkeley.edu>
12982 Darius Rad <darius@bluespec.com>
12983
12984 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12985 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12986 (ALLDEPFILES): Add riscv-tdep.c
12987 * configure.tgt: Add riscv support.
12988 * riscv-tdep.c: New file.
12989 * riscv-tdep.h: New file.
12990 * NEWS: Mention new target.
12991 * MAINTAINERS: Add entry for riscv.
12992
12993 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12994
12995 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12996 fields within aggregates.
12997
12998 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12999
13000 * record-btrace.c (btrace_print_lines): Change type of flags to
13001 gdb_disassembly_flags.
13002
13003 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13004
13005 * fbsd-nat.c: Include "inf-ptrace.h".
13006 (USE_SIGTRAP_SIGINFO): Conditionally define.
13007 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13008 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13009 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13010 function.
13011 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13012 Likewise.
13013 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13014 Likewise.
13015 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13016 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13017 "supports_stopped_by_hw_breakpoint" target methods.
13018
13019 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13020
13021 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13022 * fbsd-nat.c (debug_fbsd_nat): New variable.
13023 (show_fbsd_nat_debug): New function.
13024 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13025 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13026
13027 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13028
13029 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13030 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13031 prototype.
13032 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13033 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13034 method.
13035
13036 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13037
13038 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13039 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13040
13041 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13042
13043 * charset.c (struct charset_vector): New.
13044 (charsets): Change type to charset_vector.
13045 (find_charset_names): Adjust.
13046 (add_one): Adjust.
13047 (_initialize_charset): Adjust.
13048
13049 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13050
13051 * progspace.h (struct program_space) <deleted_solibs>: Change
13052 type to std::vector<std::string>.
13053 * progspace.c (clear_program_space_solib_cache): Adjust.
13054 * breakpoint.c (print_solib_event): Adjust.
13055 (check_status_catch_solib): Adjust.
13056 * solib.c (update_solib_list): Adjust.
13057 * ui-out.h (class ui_out) <field_string>: New overload.
13058 * ui-out.c (ui_out::field_string): New overload.
13059
13060 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13061
13062 * progspace.h (struct program_space): Add constructor and
13063 destructor, initialize fields.
13064 (add_program_space): Remove.
13065 * progspace.c (add_program_space): Rename to...
13066 (program_space::program_space): ... this.
13067 (release_program_space): Rename to...
13068 (program_space::~program_space): ... this.
13069 (delete_program_space): Use delete to delete program_space.
13070 (initialize_progspace): Use new to allocate program_space.
13071 * inferior.c (add_inferior_with_spaces): Likewise.
13072 (clone_inferior_command): Likewise.
13073 * infrun.c (follow_fork_inferior): Likewise.
13074 (handle_vfork_child_exec_or_exit): Likewise.
13075
13076 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13077
13078 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13079 (delim_string_to_char_ptr_vec): Return std::vector of
13080 gdb::unique_xmalloc_ptr.
13081 (dirnames_to_char_ptr_vec_append): Take std::vector of
13082 gdb::unique_xmalloc_ptr.
13083 (dirnames_to_char_ptr_vec): Return std::vector of
13084 gdb::unique_xmalloc_ptr.
13085 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13086 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13087 (delim_string_to_char_ptr_vec): Return an std::vector of
13088 gdb::unique_xmalloc_ptr, adjust the code.
13089 (dirnames_to_char_ptr_vec_append): Take an std::vector of
13090 gdb::unique_xmalloc_ptr, adjust the code.
13091 (dirnames_to_char_ptr_vec): Return an std::vector of
13092 gdb::unique_xmalloc_ptr, adjust the code.
13093 * auto-load.c (auto_load_safe_path_vec): Change type to
13094 std::vector of gdb::unique_xmalloc_ptr.
13095 (auto_load_expand_dir_vars): Return an std::vector of
13096 gdb::unique_xmalloc_ptr, adjust the code.
13097 (auto_load_safe_path_vec_update): Adjust.
13098 (filename_is_in_auto_load_safe_path_vec): Adjust.
13099 (auto_load_objfile_script_1): Adjust.
13100 * build-id.c (build_id_to_debug_bfd): Adjust.
13101 * linux-thread-db.c (thread_db_load_search): Adjust.
13102 * source.c (add_path): Adjust.
13103 (openp): Adjust.
13104 * symfile.c (find_separate_debug_file): Adjust.
13105 * utils.c (do_free_char_ptr_vec): Remove.
13106 (make_cleanup_free_char_ptr_vec): Remove.
13107
13108 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
13109
13110 PR gdb/22907
13111 * common/pathstuff.c: Conditionally include "<windows.h>".
13112
13113 2018-03-01 Georg Sauthoff <mail@georg.so>
13114
13115 PR gdb/22888
13116 * gcore.in: Quote variables and switch interpreter to bash.
13117
13118 2018-03-01 Tom Tromey <tom@tromey.com>
13119
13120 * dwarf2read.c (alloc_discriminant_info): Fix default_index
13121 assertion. Add assertion for discriminant_index.
13122 (quirk_rust_enum): Use correct base type name in univariant case.
13123
13124 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
13125
13126 * record.c (get_call_history_modifiers): Return a
13127 record_print_flags.
13128 (cmd_record_call_history): Adjust.
13129 * record-btrace.c (record_btrace_call_history): Adjust.
13130 (record_btrace_call_history_range): Adjust.
13131 (record_btrace_call_history_from): Adjust.
13132 * target-debug.h (target_debug_print_record_print_flags): New.
13133 * target-delegates.c: Re-generate.
13134 * target.c (target_call_history): Change flags type.
13135 (target_call_history_from): Likewise.
13136 (target_call_history_range): Likewise.
13137 * target.h (struct target_ops) <target_call_history>: Likewise.
13138 (target_call_history_from): Likewise.
13139 (target_call_history_range): Likewise.
13140
13141 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13142 Simon Marchi <simon.marchi@polymtl.ca>
13143
13144 * common/common-utils.c: Include "sys/stat.h".
13145 (is_regular_file): Move here from "source.c"; change return
13146 type to "bool".
13147 * common/common-utils.h (is_regular_file): New prototype.
13148 * common/pathstuff.c (contains_dir_separator): New function.
13149 * common/pathstuff.h (contains_dir_separator): New prototype.
13150 * source.c: Don't include "sys/stat.h".
13151 (is_regular_file): Move to "common/common-utils.c".
13152
13153 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13154
13155 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13156 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13157 * auto-load.c: Include "common/pathstuff.h".
13158 * common/common-def.h (current_directory): Move here.
13159 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13160 function.
13161 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13162 prototype.
13163 * common/pathstuff.c: New file.
13164 * common/pathstuff.h: New file.
13165 * compile/compile.c: Include "common/pathstuff.h".
13166 * defs.h (current_directory): Move to "common/common-defs.h".
13167 * dwarf2read.c: Include "common/pathstuff.h".
13168 * exec.c: Likewise.
13169 * guile/scm-safe-call.c: Likewise.
13170 * linux-thread-db.c: Likewise.
13171 * main.c: Likewise.
13172 * nto-tdep.c: Likewise.
13173 * objfiles.c: Likewise.
13174 * source.c: Likewise.
13175 * symtab.c: Likewise.
13176 * utils.c: Include "common/pathstuff.h".
13177 (gdb_realpath): Move to "common/pathstuff.c".
13178 (gdb_realpath_keepfile): Likewise.
13179 (gdb_abspath): Likewise.
13180 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13181 (gdb_realpath_keepfile): Likewise.
13182 (gdb_abspath): Likewise.
13183
13184 2018-02-28 John Baldwin <jhb@FreeBSD.org>
13185
13186 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13187 wildcard process pid for super_resume for kernels with a
13188 specific bug.
13189
13190 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
13191
13192 * compile/compile.c (get_args): Add additional comments
13193 explaining function.
13194
13195 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
13196 Tom Tromey <tom@tromey.com>
13197
13198 * target.h (memory_write_request_s): Remove typedef. Don't define
13199 VEC.
13200 (target_write_memory_blocks): Change argument to std::vector.
13201 (struct memory_write_request): Add constructor.
13202 * target-memory.c (compare_block_starting_address): Return bool.
13203 Change argument types.
13204 (claim_memory): Change arguments to use std::vector.
13205 (split_regular_and_flash_blocks, blocks_to_erase)
13206 (compute_garbled_blocks): Likewise.
13207 (cleanup_request_data, cleanup_write_requests_vector): Remove.
13208 (target_write_memory_blocks): Change argument to std::vector.
13209 * symfile.c (struct load_section_data): Add constructor and
13210 destructor. Use std::vector for "requests".
13211 (struct load_progress_data): Add initializers.
13212 (load_section_callback): Update. Use "new".
13213 (clear_memory_write_data): Remove.
13214 (generic_load): Update.
13215
13216 2018-02-27 Alan Hayward <alan.hayward@arm.com>
13217
13218 * arch/aarch64.h: Use common/tdesc.h.
13219
13220 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13221
13222 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13223 architecture with a 64-bit ABI.
13224
13225 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13226
13227 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13228 ahead of target description loading.
13229
13230 2018-02-26 Tom Tromey <tom@tromey.com>
13231
13232 * stack.c (backtrace_command_1): Update.
13233 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13234 of "flags".
13235 * python/py-framefilter.c (py_print_frame)
13236 (gdbpy_apply_frame_filter): Change type of "flags".
13237 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13238 of "flags".
13239 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13240 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13241 * extension.h (enum frame_filter_flag): Rename from
13242 frame_filter_flags.
13243 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13244 (apply_ext_lang_frame_filter): Change type of "flags".
13245 * extension.c (apply_ext_lang_frame_filter): Change type of
13246 "flags".
13247 * extension-priv.h (struct extension_language_ops)
13248 <apply_frame_filter>: Change type of "flags".
13249
13250 2018-02-26 Tom Tromey <tom@tromey.com>
13251
13252 PR python/16497:
13253 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
13254 off-by-one in py_end computation.
13255 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13256 PRINT_MORE_FRAMES.
13257 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13258 constant.
13259
13260 2018-02-26 Tom Tromey <tom@tromey.com>
13261
13262 * dwarf2read.c (struct variant_field): New.
13263 (struct nextfield) <variant>: New field.
13264 (dwarf2_add_field): Handle DW_TAG_variant_part.
13265 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13266 discriminated union.
13267 (read_structure_type): Handle DW_TAG_variant_part.
13268 (handle_struct_member_die): New function, extracted from
13269 process_structure_scope. Handle DW_TAG_variant.
13270 (process_structure_scope): Handle discriminated unions. Call
13271 handle_struct_member_die.
13272
13273 2018-02-26 Tom Tromey <tom@tromey.com>
13274
13275 * rust-lang.h (rust_last_path_segment): Declare.
13276 * rust-lang.c (rust_last_path_segment): Now public. Change
13277 contract.
13278 (struct disr_info): Remove.
13279 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13280 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13281 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13282 (rust_enum_p, rust_enum_variant): New function.
13283 (rust_underscore_fields): Remove "offset" parameter.
13284 (rust_print_enum): New function.
13285 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13286 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13287 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
13288 enums.
13289 (rust_internal_print_type): New function, from rust_print_type.
13290 Remove enum code.
13291 (rust_print_type): Call rust_internal_print_type.
13292 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13293 Update enum handling.
13294 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13295 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13296 (rust_union_quirks): New functions.
13297 (process_full_comp_unit, process_full_type_unit): Call
13298 rust_union_quirks.
13299 (process_structure_scope): Update rust_unions if necessary.
13300
13301 2018-02-26 Tom Tromey <tom@tromey.com>
13302
13303 * value.h (value_union_variant): Declare.
13304 * valops.c (value_union_variant): New function.
13305 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13306 (struct discriminant_info): New.
13307 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13308 enumerator.
13309 (struct main_type) <flag_discriminated_union>: New field.
13310
13311 2018-02-26 Tom Tromey <tom@tromey.com>
13312
13313 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13314 unittests/unpack-selftests.c.
13315 * unittests/unpack-selftests.c: New file.
13316 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13317
13318 2018-02-26 Yao Qi <yao.qi@linaro.org>
13319
13320 * dwarf2read.c (struct partial_die_info) <read>: New method.
13321 (read_partial_die): Remove the declaration.
13322 (load_partial_dies): Update.
13323 (partial_die_info::partial_die_info):
13324 (read_partial_die): Change it to partial_die_info::read.
13325
13326 2018-02-26 Yao Qi <yao.qi@linaro.org>
13327
13328 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13329 (fixup_partial_die): Remove declaration.
13330 (scan_partial_symbols): Update.
13331 (partial_die_parent_scope): Likewise.
13332 (partial_die_full_name): Likewise.
13333 (fixup_partial_die): Change it to partial_die_info::fixup.
13334
13335 2018-02-26 Yao Qi <yao.qi@linaro.org>
13336
13337 * dwarf2read.c (read_partial_die): Update the declaration.
13338 (load_partial_dies): Caller update.
13339 (read_partial_die): Remove one argument abbrev_len.
13340
13341 2018-02-26 Yao Qi <yao.qi@linaro.org>
13342
13343 * dwarf2read.c (struct partial_die_info): Add ctor, delete
13344 assignment operator.
13345 (load_partial_dies): Use ctor and copy ctor.
13346 (read_partial_die): Update.
13347 (dwarf2_cu::find_partial_die): Use ctor.
13348
13349 2018-02-26 Yao Qi <yao.qi@linaro.org>
13350
13351 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13352 (find_partial_die_in_comp_unit): Change it to
13353 dwarf2_cu::find_partial_die.
13354 (find_partial_die): Update.
13355
13356 2018-02-26 Yao Qi <yao.qi@linaro.org>
13357
13358 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13359 is NULL.
13360
13361 2018-02-26 Yao Qi <yao.qi@linaro.org>
13362
13363 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13364
13365 2018-02-26 Alan Hayward <alan.hayward@arm.com>
13366
13367 * arch/amd64.h: Use common/tdesc.h.
13368 * arch/i386.c: Likewise.
13369 * arch/i386.h: Likewise.
13370 * arch/tic6x.c: Likewise.
13371 * arch/tdesc.h: Move file from here...
13372 * common/tdesc.h: ...to here.
13373 * features/aarch64-core.c: Regenerate.
13374 * features/aarch64-fpu.c: Regenerate.
13375 * features/i386/32bit-avx.c: Regenerate.
13376 * features/i386/32bit-avx512.c: Regenerate.
13377 * features/i386/32bit-core.c: Regenerate.
13378 * features/i386/32bit-linux.c: Regenerate.
13379 * features/i386/32bit-mpx.c: Regenerate.
13380 * features/i386/32bit-pkeys.c: Regenerate.
13381 * features/i386/32bit-sse.c: Regenerate.
13382 * features/i386/64bit-avx.c: Regenerate.
13383 * features/i386/64bit-avx512.c: Regenerate.
13384 * features/i386/64bit-core.c: Regenerate.
13385 * features/i386/64bit-linux.c: Regenerate.
13386 * features/i386/64bit-mpx.c: Regenerate.
13387 * features/i386/64bit-pkeys.c: Regenerate.
13388 * features/i386/64bit-segments.c: Regenerate.
13389 * features/i386/64bit-sse.c: Regenerate.
13390 * features/i386/x32-core.c: Regenerate.
13391 * features/tic6x-c6xp.c: Regenerate.
13392 * features/tic6x-core.c: Regenerate.
13393 * features/tic6x-gp.c: Regenerate.
13394 * target-descriptions.c: Use common/tdesc.h.
13395 * target-descriptions.h: Likewise.
13396
13397 2018-02-24 Tom Tromey <tom@tromey.com>
13398
13399 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13400 (try_thread_db_load_from_dir, thread_db_load_search): Use
13401 std::string.
13402 (info_auto_load_libthread_db_compare): Return bool. Change
13403 argument types.
13404 (info_auto_load_libthread_db): Use std::vector, std::string.
13405 Remove cleanups.
13406
13407 2018-02-24 Tom Tromey <tom@tromey.com>
13408
13409 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13410 std::string.
13411 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13412 std::string*.
13413 * gdbarch.c: Rebuild.
13414 * gdbarch.h: Rebuild.
13415 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13416 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13417 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13418 std::string*.
13419
13420 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
13421
13422 * gdbtypes.h (sect_offset): Change type to uint64_t.
13423 (sect_offset_str): New function.
13424 * dwarf2read.c (create_addrmap_from_aranges): Use
13425 sect_offset_str.
13426 (error_check_comp_unit_head): Likewise.
13427 (create_debug_type_hash_table): Likewise.
13428 (read_cutu_die_from_dwo): Likewise.
13429 (init_cutu_and_read_dies): Likewise.
13430 (init_cutu_and_read_dies_no_follow): Likewise.
13431 (process_psymtab_comp_unit_reader): Likewise.
13432 (partial_die_parent_scope): Likewise.
13433 (peek_die_abbrev): Likewise.
13434 (process_queue): Likewise.
13435 (dwarf2_physname): Likewise.
13436 (read_namespace_alias): Likewise.
13437 (read_import_statement): Likewise.
13438 (create_dwo_cu_reader): Likewise.
13439 (create_cus_hash_table): Likewise.
13440 (lookup_dwo_cutu): Likewise.
13441 (inherit_abstract_dies): Likewise.
13442 (read_func_scope): Likewise.
13443 (read_call_site_scope): Likewise.
13444 (dwarf2_add_member_fn): Likewise.
13445 (read_common_block): Likewise.
13446 (read_module_type): Likewise.
13447 (read_typedef): Likewise.
13448 (read_subrange_type): Likewise.
13449 (load_partial_dies): Likewise.
13450 (read_partial_die): Likewise.
13451 (find_partial_die): Likewise.
13452 (read_str_index): Likewise.
13453 (dwarf2_string_attr): Likewise.
13454 (build_error_marker_type): Likewise.
13455 (lookup_die_type): Likewise.
13456 (dump_die_shallow): Likewise.
13457 (follow_die_ref): Likewise.
13458 (dwarf2_fetch_die_loc_sect_off): Likewise.
13459 (dwarf2_fetch_constant_bytes): Likewise.
13460 (follow_die_sig): Likewise.
13461 (get_signatured_type): Likewise.
13462 (get_DW_AT_signature_type): Likewise.
13463 (dwarf2_find_containing_comp_unit): Likewise.
13464 (set_die_type): Likewise.
13465
13466 2018-02-21 John Baldwin <jhb@FreeBSD.org>
13467
13468 * arch/aarch64.c: Include "common-defs.h".
13469 * arch/amd64.c: Likewise.
13470 * arch/i386.c: Likewise.
13471
13472 2018-02-21 Tom Tromey <tom@tromey.com>
13473
13474 * value.h: (extract_field_op): Update.
13475 * eval.c (extract_field_op): Return a const char *.
13476 * expression.h (parse_expression_for_completion): Update.
13477 * completer.c (complete_expression): Update.
13478 (add_struct_fields): Make fieldname const.
13479 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13480 (mark_completion_tag, parse_exp_in_context_1): Update.
13481 (parse_expression_for_completion): Change "name" to
13482 unique_xmalloc_ptr*.
13483
13484 2018-02-21 Tom Tromey <tom@tromey.com>
13485
13486 * infcall.c (call_function_by_hand_dummy): Use std::vector.
13487
13488 2018-02-21 Yao Qi <yao.qi@linaro.org>
13489
13490 * avr-tdep.c (avr_read_pc): Change parameter type to
13491 readable_regcache.
13492 * gdbarch.sh (read_pc): Likewise.
13493 * gdbarch.c: Re-generated.
13494 * gdbarch.h: Re-generated.
13495 * hppa-tdep.c (hppa_read_pc): Change parameter type to
13496 readable_regcache.
13497 * ia64-tdep.c (ia64_read_pc): Likewise.
13498 * mips-tdep.c (mips_read_pc): Likewise.
13499 * spu-tdep.c (spu_read_pc): Likewise.
13500
13501 2018-02-21 Yao Qi <yao.qi@linaro.org>
13502
13503 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13504 * regcache-dump.c: New file.
13505 * regcache.c: Move register_dump to regcache-dump.c.
13506 (maintenance_print_registers): Likewise.
13507 (maintenance_print_raw_registers): Likewise.
13508 (maintenance_print_cooked_registers): Likewise.
13509 (maintenance_print_register_groups): Likewise.
13510 (maintenance_print_remote_registers): Likewise.
13511 (_initialize_regcache): Likewise.
13512 * regcache.h (register_dump): Moved from regcache.c.
13513
13514 2018-02-21 Yao Qi <yao.qi@linaro.org>
13515
13516 * regcache.c (regcache::regcache): Update.
13517 (regcache::invalidate): Move it to detached_regcache::invalidate.
13518 (get_thread_arch_aspace_regcache): Update.
13519 (regcache::raw_update): Update.
13520 (regcache::cooked_read): Remove some code.
13521 (regcache::cooked_read_value): Likewise.
13522 (regcache::raw_write): Remove assert on m_readonly_p.
13523 (regcache::raw_supply_integer): Move it to
13524 detached_regcache::raw_supply_integer.
13525 (regcache::raw_supply_zeroed): Likewise.
13526 * regcache.h (detached_regcache) <raw_supply_integer>: New
13527 declaration.
13528 <raw_supply_zeroed, invalidate>: Likewise.
13529 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13530 <invalidate>: Likewise.
13531 <m_readonly_p>: Removed.
13532
13533 2018-02-21 Yao Qi <yao.qi@linaro.org>
13534
13535 * infcmd.c (get_return_value): Let stop_regs point to
13536 get_current_regcache.
13537 * regcache.c (regcache::regcache): Remove.
13538 (register_dump_reg_buffer): New class.
13539 (regcache_print): Adjust.
13540 * regcache.h (regcache): Remove constructors.
13541
13542 2018-02-21 Yao Qi <yao.qi@linaro.org>
13543
13544 * regcache.c (class register_dump): New class.
13545 (register_dump_regcache, register_dump_none): New class.
13546 (register_dump_remote, register_dump_groups): New class.
13547 (regcache_print): Update.
13548 * regcache.h (regcache_dump_what): Move it to regcache.c.
13549 (regcache) <dump>: Remove.
13550
13551 2018-02-21 Yao Qi <yao.qi@linaro.org>
13552
13553 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13554 reg_buffer_rw *.
13555 (jit_unwind_reg_set_impl): Call raw_supply.
13556 (jit_frame_sniffer): Use reg_buffer_rw.
13557 * record-full.c (record_full_core_regbuf): Change its type.
13558 (record_full_core_open_1): Use reg_buffer_rw.
13559 (record_full_close): Likewise.
13560 (record_full_core_fetch_registers): Use regcache->raw_supply.
13561 (record_full_core_store_registers): Likewise.
13562 * regcache.c (regcache::get_register_status): Move it to
13563 reg_buffer.
13564 (regcache_raw_set_cached_value): Remove.
13565 (regcache::raw_set_cached_value): Remove.
13566 (regcache::raw_write): Call raw_supply.
13567 (regcache::raw_supply): Move it to reg_buffer_rw.
13568 * regcache.h (regcache_raw_set_cached_value): Remove.
13569 (reg_buffer_rw): New class.
13570
13571 2018-02-21 Yao Qi <yao.qi@linaro.org>
13572
13573 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13574 readonly_detached_regcache.
13575 (dummy_frame_prev_register): Use regcache->cooked_read.
13576 * frame.c (frame_save_as_regcache): Change return type.
13577 (frame_pop): Update.
13578 * frame.h (frame_save_as_regcache): Update declaration.
13579 * inferior.h (get_infcall_suspend_state_regcache): Update
13580 declaration.
13581 * infrun.c (infcall_suspend_state) <registers>: use
13582 readonly_detached_regcache.
13583 (save_infcall_suspend_state): Don't use regcache_dup.
13584 (get_infcall_suspend_state_regcache): Change return type.
13585 * linux-fork.c (struct fork_info) <savedregs>: Change to
13586 readonly_detached_regcache.
13587 <pc>: New field.
13588 (fork_save_infrun_state): Don't use regcache_dup.
13589 (info_checkpoints_command): Adjust.
13590 * mi/mi-main.c (register_changed_p): Update declaration.
13591 (mi_cmd_data_list_changed_registers): Use
13592 readonly_detached_regcache.
13593 (register_changed_p): Change parameter type to
13594 readonly_detached_regcache.
13595 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13596 readonly_detached_regcache.
13597 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13598 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13599 New.
13600 (regcache::save): Move it to reg_buffer.
13601 (regcache::restore): Change parameter type.
13602 (regcache_dup): Remove.
13603 * regcache.h (reg_buffer) <save>: New method.
13604 (readonly_detached_regcache): New class.
13605 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13606 readonly_detached_regcache.
13607 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13608
13609 2018-02-21 Yao Qi <yao.qi@linaro.org>
13610
13611 * frame.c (frame_save_as_regcache): Use regcache method save.
13612 (frame_pop): Use regcache method restore.
13613 * infrun.c (restore_infcall_suspend_state): Likewise.
13614 * linux-fork.c (fork_load_infrun_state): Likewise.
13615 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13616 save.
13617 * regcache.c (regcache_save): Remove.
13618 (regcache::restore): More asserts.
13619 (regcache_cpy): Remove.
13620 * regcache.h (regcache_save): Remove the declaration.
13621 (regcache::restore): Move from private to public.
13622 Remove the friend declaration of regcache_cpy.
13623 (regcache_cpy): Remove declaration.
13624
13625 2018-02-21 Yao Qi <yao.qi@linaro.org>
13626
13627 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13628 parameter type to 'readable_regcache *'.
13629 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13630 * arm-tdep.c (arm_neon_quad_read): Likewise.
13631 (arm_pseudo_read): Likewise.
13632 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13633 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13634 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13635 * gdbarch.c: Re-generated.
13636 * gdbarch.h: Re-generated.
13637 * gdbarch.sh (pseudo_register_read): Change parameter type to
13638 'readable_regcache *'.
13639 (pseudo_register_read_value): Likewise.
13640 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13641 (h8300_pseudo_register_read): Likewise.
13642 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13643 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13644 (i386_pseudo_register_read_into_value): Likewise.
13645 (i386_pseudo_register_read_value): Likewise.
13646 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13647 declaration.
13648 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13649 * m32c-tdep.c (m32c_raw_read): Likewise.
13650 (m32c_read_flg): Likewise.
13651 (m32c_banked_register): Likewise.
13652 (m32c_banked_read): Likewise.
13653 (m32c_sb_read): Likewise.
13654 (m32c_part_read): Likewise.
13655 (m32c_cat_read): Likewise.
13656 (m32c_r3r2r1r0_read): Likewise.
13657 (m32c_pseudo_register_read): Likewise.
13658 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13659 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13660 (mep_pseudo_cr64_read): Likewise.
13661 (mep_pseudo_register_read): Likewise.
13662 * mips-tdep.c (mips_pseudo_register_read): Likewise.
13663 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13664 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13665 * regcache.c (regcache::raw_read): Move it to readable_regcache.
13666 (regcache::cooked_read): Likewise.
13667 (regcache::cooked_read_value): Likewise.
13668 (regcache_cooked_read_signed):
13669 (regcache::cooked_read): Likewise.
13670 * regcache.h (readable_regcache): New class.
13671 (regcache): Inherit readable_regcache. Move some methods to
13672 readable_regcache.
13673 * rl78-tdep.c (rl78_pseudo_register_read): Change
13674 parameter type to 'readable_regcache *'.
13675 * rs6000-tdep.c (do_regcache_raw_read): Remove.
13676 (e500_pseudo_register_read): Change parameter type to
13677 'readable_regcache *'.
13678 (dfp_pseudo_register_read): Likewise.
13679 (vsx_pseudo_register_read): Likewise.
13680 (efpr_pseudo_register_read): Likewise.
13681 * s390-tdep.c (s390_pseudo_register_read): Likewise.
13682 * sh-tdep.c (sh_pseudo_register_read): Likewise.
13683 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13684 (sh64_pseudo_register_read): Likewise.
13685 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13686 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13687 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13688 (spu_pseudo_register_read): Likewise.
13689 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13690 (xtensa_pseudo_register_read): Likewise.
13691
13692 2018-02-21 Yao Qi <yao.qi@linaro.org>
13693
13694 * regcache.c (regcache::regcache): Call reg_buffer ctor.
13695 (regcache::arch): Move it to reg_buffer::arch.
13696 (regcache::register_buffer): Likewise.
13697 (regcache::assert_regnum): Likewise.
13698 (regcache::num_raw_registers): Likewise.
13699 * regcache.h (reg_buffer): New class.
13700 (regcache): Inherit reg_buffer.
13701
13702 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
13703
13704 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13705 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13706
13707 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
13708
13709 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13710
13711 2018-02-19 Alan Hayward <alan.hayward@arm.com>
13712
13713 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13714 (SFILES): Remove common/*.c files.
13715 (COMMON_OBS): Remove some *.o files built from common/*.c files.
13716 * common/common.host: Add common reference.
13717 * configure.ac: Likewise.
13718 * configure: Regenerate.
13719
13720 2018-02-16 Yao Qi <yao.qi@linaro.org>
13721
13722 * block.c (block_namespace_info): Inherit allocate_on_obstack.
13723 (block_initialize_namespace): Use new.
13724 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13725 (dwarf2_free_objfile): Use delete.
13726 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13727 (copy_type_recursive): Use new.
13728 * gdb_obstack.h (allocate_on_obstack): New.
13729
13730 2018-02-15 Yao Qi <yao.qi@linaro.org>
13731
13732 PR gdb/22849
13733 * inferior.c (exit_inferior_1): Reset inf->control.
13734
13735 2018-02-15 Joel Brobecker <brobecker@adacore.com>
13736
13737 * ada-lang.c (ada_to_fixed_value_create): Delete advance
13738 declaration.
13739
13740 2018-02-14 Pedro Alves <palves@redhat.com>
13741
13742 * frame-unwind.c (frame_unwind_try_unwinder): Always call
13743 frame_cleanup_after_sniffer on exception.
13744
13745 2018-02-14 Tom Tromey <tom@tromey.com>
13746
13747 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13748 const.
13749 (solib_bfd_open): Make pathname const.
13750 * solib.c (solib_bfd_open): Make pathname const.
13751 * solib-spu.c (spu_bfd_fopen): Make name const.
13752 (spu_bfd_open): Make pathname const.
13753 * solib-darwin.c (darwin_bfd_open): Make pathname const.
13754 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13755
13756 2018-02-14 Tom Tromey <tom@tromey.com>
13757
13758 * symfile.c (symfile_bfd_open): Update.
13759 * source.h (openp, source_full_path_of, find_and_open_source):
13760 Change argument type to unique_xmalloc_ptr.
13761 * source.c (openp): Take a unique_xmalloc_ptr.
13762 (source_full_path_of, find_and_open_source): Likewise.
13763 (open_source_file, symtab_to_fullname): Update.
13764 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13765 unique_xmalloc_ptr.
13766 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13767 (exec_file_find): Update.
13768 * psymtab.c (psymtab_to_fullname): Update.
13769 * nto-tdep.h (nto_find_and_open_solib): Update.
13770 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13771 unique_xmalloc_ptr.
13772 * exec.c (exec_file_attach): Update.
13773 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13774 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13775
13776 2018-02-14 Tom Tromey <tom@tromey.com>
13777
13778 * solib.c: Include source.h.
13779 * nto-tdep.c: Include source.h.
13780 * mi/mi-cmd-env.c: Include source.h.
13781 * infcmd.c: Include source.h.
13782 * exec.c: Include source.h.
13783 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13784 (add_path, directory_switch, source_path, init_source_path): Move
13785 declarations...
13786 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13787 (add_path, directory_switch, source_path, init_source_path):
13788 ...here.
13789
13790 2018-02-14 Tom Tromey <tom@tromey.com>
13791
13792 * solist.h (exec_file_find, solib_find): Return
13793 unique_xmalloc_ptr.
13794 (solib_bfd_fopen): Take a const char *.
13795 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13796 (exec_file_find, solib_find): Likewise.
13797 (solib_bfd_fopen): Do not take ownership of "pathname".
13798 (solib_bfd_open): Use unique_xmalloc_ptr.
13799 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13800 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13801 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13802 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13803
13804 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13805
13806 * ada-lang.c (name_match_type_from_name): Remove reference to
13807 ada_name_for_lookup in function's documentation.
13808 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13809
13810 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13811
13812 * defs.h (enum openp_flags): New enum.
13813 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13814 Move to enum openp_flags.
13815 (openp_flags): New enum flags.
13816 (openp): Change parameter type to openp_flags.
13817 * source.c (openp): Change parameter type to openp_flags.
13818 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13819 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13820
13821 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13822
13823 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13824 per-command.
13825
13826 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13827
13828 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13829 into...
13830 (class dwarf2_queue_guard): ...the destructor of this new class.
13831 (dw2_do_instantiate_symtab): Create instance of the new class
13832 dwarf2_queue_guard, remove cleanup.
13833
13834 2018-02-09 Tom Tromey <tom@tromey.com>
13835
13836 * source.c (find_source_lines): Don't reference past the end of
13837 the vector.
13838
13839 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13840
13841 * remote.c (remote_btrace_maybe_reopen): Change error message.
13842 * btrace.c (btrace_enable): Likewise.
13843 (parse_xml_btrace): Likewise.
13844 (parse_xml_btrace_conf): Likewise.
13845
13846 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13847
13848 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13849 (linux_enable_pt, linux_enable_bts): Call
13850 diagnose_perf_event_open_fail.
13851
13852 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13853
13854 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13855 Remove parameter and change return type. Update callers. Move it.
13856 (linux_enable_bts, linux_enable_pt): Improve error message.
13857 (linux_enable_pt): Remove zero buffer size check.
13858 (linux_enable_btrace): Improve error messages. Remove NULL return
13859 check.
13860
13861 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13862
13863 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13864 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13865 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13866 (linux_supports_pt, linux_supports_btrace): Remove.
13867 (linux_enable_bts): Call cpu_supports_bts.
13868 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13869 * remote.c (remote_supports_btrace): Remove.
13870 (init_remote_ops): Remove remote_supports_btrace.
13871 * target-delegates.c: Regenerated.
13872 * target.c (target_supports_btrace): Remove.
13873 * target.h (target_ops) <to_supports_btrace>: Remove
13874 (target_supports_btrace): Remove.
13875 * x86-linux-nat.c (x86_linux_create_target): Remove
13876 linux_supports_btrace.
13877
13878 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13879
13880 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13881 btrace failed.
13882 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13883 exception and use message in own exception.
13884
13885 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13886
13887 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13888 (perf_event_pt_event_type): Use gdb_file_up.
13889 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13890 scoped_fd, and scoped_mmap.
13891
13892 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13893
13894 * common/scoped_mmap.h: New.
13895 * unittests/scoped_mmap-selftest.c: New.
13896 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13897 unittests/scoped_mmap-selftest.c.
13898
13899 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13900
13901 * common/scoped_fd.h: New.
13902 * unittests/scoped_fd-selftest.c: New.
13903 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13904 unittests/scoped_fd-selftest.c.
13905
13906 2018-02-09 Tom Tromey <tom@tromey.com>
13907
13908 * auto-load.c (auto_load_section_scripts): Use
13909 gdb::unique_xmalloc_ptr.
13910
13911 2018-02-09 Tom Tromey <tom@tromey.com>
13912
13913 * auto-load.c (execute_script_contents): Use std::string.
13914
13915 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13916
13917 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13918 Python function, rather than a new command.
13919
13920 2018-02-08 Tom Tromey <tom@tromey.com>
13921
13922 * solib.c (solib_find_1): Use std::string.
13923 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13924
13925 2018-02-08 Tom Tromey <tom@tromey.com>
13926
13927 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13928
13929 2018-02-08 Tom Tromey <tom@tromey.com>
13930
13931 * source.c (find_source_lines): Use gdb::def_vector.
13932
13933 2018-02-08 Tom Tromey <tom@tromey.com>
13934
13935 * macrocmd.c (struct temporary_macro_definition): New.
13936 (macro_define_command): Use temporary_macro_definition. Remove
13937 cleanups.
13938 (free_macro_definition_ptr): Remove.
13939
13940 2018-02-08 Tom Tromey <tom@tromey.com>
13941
13942 * macroexp.c (maybe_expand): Use std::string.
13943
13944 2018-02-08 Tom Tromey <tom@tromey.com>
13945
13946 * macroexp.c (struct macro_buffer): Add initializers for some
13947 members.
13948 (init_buffer, init_shared_buffer, free_buffer)
13949 (free_buffer_return_text): Remove.
13950 (macro_buffer): New constructors.
13951 (~macro_buffer): New destructor.
13952 (macro_buffer::set_shared): New method.
13953 (macro_buffer::resize_buffer, macro_buffer::appendc)
13954 (macro_buffer::appendmem): Now methods, not free functions.
13955 (set_token, append_tokens_without_splicing, stringify)
13956 (macro_stringify): Update.
13957 (gather_arguments): Change return type. Remove argc_p argument,
13958 add args_ptr argument. Use std::vector.
13959 (substitute_args): Remove argc argument. Accept std::vector.
13960 (expand): Update. Use std::vector.
13961 (scan, macro_expand, macro_expand_next): Update.
13962
13963 2018-02-08 Tom Tromey <tom@tromey.com>
13964
13965 * symtab.c (default_collect_symbol_completion_matches_break_on):
13966 Use unique_xmalloc_ptr.
13967 * macroscope.h: (sal_macro_scope, user_macro_scope)
13968 (default_macro_scope): Return unique_xmalloc_ptr.
13969 * macroscope.c (sal_macro_scope, user_macro_scope)
13970 (default_macro_scope): Return unique_xmalloc_ptr.
13971 * macroexp.h (macro_expand, macro_expand_once): Return
13972 unique_xmalloc_ptr.
13973 * macroexp.c (macro_expand, macro_expand_once): Return
13974 unique_xmalloc_ptr.
13975 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13976 (info_macro_command, info_macros_command): Use
13977 unique_xmalloc_ptr.
13978 * compile/compile-c-support.c (write_macro_definitions): Use
13979 unique_xmalloc_ptr.
13980 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13981
13982 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13983
13984 * value.c (value_static_field): Assign field type instead of
13985 containing type when returning an optimized out value.
13986
13987 2018-02-06 Yao Qi <yao.qi@linaro.org>
13988
13989 * ft32-tdep.c (ft32_read_pc): Remove.
13990 (ft32_write_pc): Remove.
13991 (ft32_gdbarch_init): Update.
13992 * m32r-tdep.c (m32r_read_pc): Remove.
13993 (m32r_gdbarch_init): Update.
13994 * mep-tdep.c (mep_read_pc): Remove.
13995 (mep_gdbarch_init): Update.
13996 * microblaze-tdep.c (microblaze_write_pc): Remove.
13997 (microblaze_gdbarch_init): Update.
13998 * mn10300-tdep.c (mn10300_read_pc): Remove.
13999 (mn10300_write_pc): Remove.
14000 (mn10300_gdbarch_init): Update.
14001 * moxie-tdep.c (moxie_read_pc): Remove.
14002 (moxie_write_pc): Remove.
14003 (moxie_gdbarch_init): Update.
14004
14005 2018-02-06 Yao Qi <yao.qi@linaro.org>
14006
14007 * expprint.c (print_subexp_standard): Handle
14008 OP_F77_UNDETERMINED_ARGLIST.
14009 (dump_subexp_body_standard): Likewise.
14010
14011 2018-02-05 Alan Hayward <alan.hayward@arm.com>
14012
14013 * target-descriptions.c (tdesc_element_visitor) Add empty
14014 implementations.
14015 (tdesc_type): Move make_gdb_type from here.
14016 (tdesc_type_builtin): Likewise.
14017 (tdesc_type_vector): Likewise.
14018 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14019 (make_gdb_type_struct): Move from tdesc_type_with_fields.
14020 (make_gdb_type_union): Likewise.
14021 (make_gdb_type_flags): Likewise.
14022 (make_gdb_type_enum): Likewise.
14023 (make_gdb_type): New function.
14024 (tdesc_register_type): Use static make_gdb_type.
14025
14026 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
14027
14028 * infcmd.c (default_print_one_register_info): Align natural-format
14029 column values consistently one under another.
14030 (pad_to_column): New function.
14031
14032 2018-02-05 Joel Brobecker <brobecker@adacore.com>
14033
14034 * dwarf2read.c (dwarf2_physname): Move commment.
14035
14036 2018-02-01 Leszek Swirski <leszeks@google.com>
14037
14038 * varobj.c (varobj_formatted_print_options): Allow recursive
14039 pretty printing if pretty printing is enabled.
14040
14041 2018-02-01 Leszek Swirski <leszeks@google.com>
14042
14043 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14044 names after a structop as a filename.
14045
14046 2018-02-01 Yao Qi <yao.qi@linaro.org>
14047
14048 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14049 (arm_record_coproc_data_proc): Likewise.
14050
14051 2018-02-01 Yao Qi <yao.qi@linaro.org>
14052
14053 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14054
14055 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
14056
14057 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14058 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14059
14060 2018-01-31 Pedro Alves <palves@redhat.com>
14061
14062 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14063 * inflow.c (child_terminal_save_inferior): Wrap reference to
14064 tcgetpgrp in HAVE_TERMIOS_H.
14065 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14066 _WIN32.
14067 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14068 always iterate over all inferiors.
14069 (gdbsim_cntrl_c): Adjust.
14070 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14071
14072 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14073
14074 * gdbtypes.c (lookup_array_range_type): Make sure the array's
14075 index type is objfile-owned if the element type is as well.
14076
14077 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14078
14079 GDB 8.1 released.
14080
14081 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
14082
14083 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14084 "features/s390x-linux64.c".
14085 (_initialize_s390_linux_tdep): Remove initialization of tdescs
14086 s390_linux32 and s390x_linux64.
14087 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14088 default tdesc.
14089 * s390-tdep.c: Include "features/s390-linux32.c" and
14090 "features/s390x-linux64.c".
14091 (s390_tdesc_valid): Add check for tdesc_has_registers.
14092 (s390_gdbarch_init): Make sure there is always a valid tdesc.
14093 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14094 tdesc_s390x_linux64.
14095 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14096 tdesc_s390x_linux64 to...
14097 * s390-tdep.h: ...here.
14098
14099 2018-01-30 Pedro Alves <palves@redhat.com>
14100
14101 PR gdb/13211
14102 * config.in, configure: Regenerate.
14103 * configure.ac: Check for getpgid.
14104 * go32-nat.c (go32_pass_ctrlc): New.
14105 (go32_target): Install it.
14106 * inf-child.c (inf_child_target): Install
14107 child_terminal_save_inferior, child_pass_ctrlc and
14108 child_interrupt.
14109 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14110 (inf_ptrace_target): No longer install it.
14111 * infcmd.c (interrupt_target_1): Adjust.
14112 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14113 (child_interrupt): Declare.
14114 (inferior::terminal_state): New.
14115 * inflow.c (struct terminal_info): Update comments.
14116 (inferior_process_group): Delete.
14117 (terminal_is_ours): Delete.
14118 (gdb_tty_state): New.
14119 (child_terminal_init): Adjust.
14120 (is_gdb_terminal, sharing_input_terminal_1)
14121 (sharing_input_terminal): New functions.
14122 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
14123 Set the process's actual process group in the foreground if
14124 possible. Handle is_ours_for_output/is_ours distinction. Don't
14125 mark terminal as the inferior's if not sharing GDB's terminal.
14126 Don't check attach_flag.
14127 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14128 pass down a target_terminal_state.
14129 (child_terminal_save_inferior): New, factored out from ...
14130 (child_terminal_ours_1): ... this. Handle
14131 target_terminal_state::is_ours_for_output.
14132 (child_interrupt, child_pass_ctrlc): New.
14133 (inflow_inferior_exit): Clear the inferior's terminal_state.
14134 (copy_terminal_info): Copy the inferior's terminal state.
14135 (_initialize_inflow): Remove reference to terminal_is_ours.
14136 * inflow.h (inferior_process_group): Delete.
14137 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14138 * procfs.c (procfs_target): Don't install procfs_interrupt.
14139 (procfs_interrupt): Delete.
14140 * remote.c (remote_serial_quit_handler): Adjust.
14141 (remote_interrupt): Remove ptid parameter. Adjust.
14142 * target-delegates.c: Regenerate.
14143 * target.c: Include "terminal.h".
14144 (target_terminal::terminal_state): Rename to ...
14145 (target_terminal::m_terminal_state): ... this.
14146 (target_terminal::init): Adjust.
14147 (target_terminal::inferior): Adjust to per-inferior
14148 terminal_state.
14149 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14150 (target_terminal::ours, target_terminal::ours_for_output): Use
14151 target_terminal_is_ours_kind.
14152 (target_interrupt): Remove ptid parameter. Adjust.
14153 (default_target_pass_ctrlc): Adjust.
14154 * target.h (target_ops::to_terminal_save_inferior): New field.
14155 (target_ops::to_interrupt): Remove ptid_t parameter.
14156 (target_interrupt): Remove ptid_t parameter. Update comment.
14157 (target_pass_ctrlc): Update comment.
14158 * target/target.h (target_terminal_state): New scoped enum,
14159 factored out of ...
14160 (target_terminal::terminal_state): ... here.
14161 (target_terminal::inferior): Update comments.
14162 (target_terminal::restore_inferior): New.
14163 (target_terminal::is_inferior, target_terminal::is_ours)
14164 (target_terminal::is_ours_for_output): Adjust.
14165 (target_terminal::scoped_restore_terminal_state): Adjust to
14166 rename, and call restore_inferior() instead of inferior().
14167 (target_terminal::scoped_restore_terminal_state::m_state): Change
14168 type.
14169 (target_terminal::terminal_state): Rename to ...
14170 (target_terminal::m_terminal_state): ... this and change type.
14171
14172 2018-01-30 Pedro Alves <palves@redhat.com>
14173
14174 * linux-nat.c (wait_for_signal): New function.
14175 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14176 directly.
14177 (async_terminal_is_ours)
14178 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14179 (linux_nat_add_target): Don't override
14180 to_terminal_inferior/to_terminal_ours.
14181
14182 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
14183
14184 * remote.c (remote_follow_fork): Don't call "detach_inferior".
14185
14186 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
14187
14188 * dwarf2read.c (free_dwo_files): Add forward-declaration.
14189 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14190 dwarf2_per_objfile_free here.
14191 (dwarf2_per_objfile_free): Remove.
14192 (_initialize_dwarf2_read): Don't register
14193 dwarf2_per_objfile_free as a registry cleanup.
14194
14195 2018-01-27 Eli Zaretskii <eliz@gnu.org>
14196
14197 Avoid compilation errors in MinGW native builds
14198
14199 The error is triggered by including python-internal.h, and the
14200 error message is:
14201
14202 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14203 from build-gnulib/import/math.h:27,
14204 from d:/usr/Python26/include/pyport.h:235,
14205 from d:/usr/Python26/include/Python.h:58,
14206 from python/python-internal.h:94,
14207 from python/py-arch.c:24:
14208 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14209 using ::hypot;
14210 ^~~~~
14211
14212 This happens because Python headers define 'hypot' to expand t
14213 '_hypot' in the Windows builds.
14214 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14215 'hypoth'. This avoids a compilation error.
14216
14217 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14218
14219 * MAINTAINERS (Write After Approval): Fix ordering.
14220
14221 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14222
14223 * MAINTAINERS (Write After Approval): Add Alan Hayward.
14224
14225 2018-01-26 Alan Modra <amodra@gmail.com>
14226
14227 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14228 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14229 Remove nop. Make const. Comment.
14230 (powerpc32_plt_stub_so_2): New.
14231 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14232 Correct count. Update uses.
14233 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14234 Move common code reading PLT entry word. Correct
14235 powerpc32_plt_stub PLT address calculation.
14236 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14237 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14238 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14239 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14240 (ppc64_standard_linkage8): Likewise.
14241 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14242 Correct insns description.
14243 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14244
14245 2018-01-24 Pedro Alves <palves@redhat.com>
14246
14247 GCC PR libstdc++/83906
14248 * gdbtypes.c (operator==(const dynamic_prop &,
14249 const dynamic_prop &)): New.
14250 (operator==(const range_bounds &, const range_bounds &)): New.
14251 (check_types_equal): Use them instead of memcmp.
14252 * gdbtypes.h (operator==(const dynamic_prop &,
14253 const dynamic_prop &)): Declare.
14254 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14255 (operator==(const range_bounds &, const range_bounds &)): Declare.
14256 (operator!=(const range_bounds &, const range_bounds &)): Declare.
14257
14258 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14259
14260 * s390-linux-tdep.c (s390_record_address_mask)
14261 (s390_record_calc_disp_common, s390_record_calc_disp)
14262 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14263 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14264 (s390_process_record): Move to s390-tdep.c.
14265 (s390_linux_init_abi_any): Adjust.
14266 * s390-tdep.c (s390_record_address_mask)
14267 (s390_record_calc_disp_common, s390_record_calc_disp)
14268 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14269 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14270 (s390_process_record): Moved from s390-linux-tdep.c
14271 (s390_gdbarch_init): Adjust.
14272
14273 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14274
14275 * s390-linux-nat.c (s390-tdep.h): New include.
14276 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14277 (HFILES_NO_SRCDIR): Add s390-tdep.h.
14278 (ALLDEPFILES): Add s390-tdep.c.
14279 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14280 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14281 * s390-tdep.h: ...this. New file.
14282 * s390-linux-tdep.c (s390-tdep.h): New include.
14283 (_initialize_s390_tdep): Rename to...
14284 (_initialize_s390_linux_tdep): ...this and adjust.
14285 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14286 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14287 s390-tdep.h.
14288 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14289 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14290 (s390_is_partial_instruction, s390_software_single_step)
14291 (is_non_branch_ril, s390_displaced_step_copy_insn)
14292 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14293 (s390_prologue_data, s390_addr, s390_store, s390_load)
14294 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14295 (s390_register_call_saved, s390_guess_tracepoint_registers)
14296 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14297 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14298 (s390_pseudo_register_name, s390_pseudo_register_type)
14299 (s390_pseudo_register_read, s390_pseudo_register_write)
14300 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14301 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14302 (s390_addr_bits_remove, s390_address_class_type_flags)
14303 (s390_address_class_type_flags_to_name)
14304 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14305 (s390_function_arg_float, s390_function_arg_vector)
14306 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14307 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14308 (s390_frame_align, s390_register_return_value, s390_return_value)
14309 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14310 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14311 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14312 (s390_trad_frame_prev_register, s390_unwind_cache)
14313 (s390_prologue_frame_unwind_cache)
14314 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14315 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14316 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14317 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14318 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14319 (s390_frame_base_address, s390_local_base_address)
14320 (s390_frame_base, s390_gcc_target_options)
14321 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14322 (s390_validate_reg_range, s390_tdesc_valid)
14323 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14324 * s390-tdep.c: ...this. New file.
14325
14326 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14327
14328 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14329 (s390_process_record, s390_gdbarch_tdep_alloc)
14330 (s390_linux_init_abi_any): Use/set new hook.
14331
14332 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14333
14334 * s390-linux-tdep.c (osabi.h): New include.
14335 (s390_linux_init_abi_31, s390_linux_init_abi_64)
14336 (s390_linux_init_abi_any): New functions.
14337 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14338
14339 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14340
14341 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14342 tdesc_has_registers check
14343
14344 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14345
14346 * s390-linux-tdep.c (s390_tdesc_valid): New function.
14347 (s390_validate_reg_range): New macro.
14348 (s390_gdbarch_init): Adjust.
14349
14350 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14351
14352 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14353 (s390_gdbarch_tdep_alloc): Adjust.
14354 (s390_gdbarch_init): Adjust.
14355
14356 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14357
14358 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14359 <have_tdb>: Change type to bool.
14360 (s390_gdbarch_tdep_alloc): Adjust.
14361 (s390_gdbarch_init): Adjust.
14362
14363 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14364
14365 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14366 (gdbarch_tdep) <have_upper, have_vx>: New fields.
14367 (s390_gdbarch_tdep_alloc): New function.
14368 (s390_gdbarch_init): Allocate tdep at start and use its fields
14369 instead of separate variables.
14370
14371 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14372
14373 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14374 when looking for cached gdbarch and add comment for remaining.
14375
14376 2018-01-22 Pedro Alves <palves@redhat.com>
14377 Sergio Durigan Junior <sergiodj@redhat.com>
14378
14379 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14380 case.
14381
14382 2018-01-22 Maciej W. Rozycki <macro@mips.com>
14383
14384 * MAINTAINERS: Update my company e-mail address.
14385
14386 2018-01-22 Yao Qi <yao.qi@linaro.org>
14387
14388 * regcache.c (cooked_write_test): New function.
14389 (_initialize_regcache): Register the test.
14390
14391 2018-01-22 Yao Qi <yao.qi@linaro.org>
14392
14393 * ia64-tdep.c (ia64_pseudo_register_read): Call
14394 regcache->cooked_read instead of regcache_cooked_read_unsigned.
14395 * m32c-tdep.c (m32c_cat_read): Likewise.
14396 (m32c_r3r2r1r0_read): Likewise.
14397 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14398 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14399
14400 2018-01-22 Yao Qi <yao.qi@linaro.org>
14401
14402 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14403 method raw_read instead of regcache_raw_read.
14404 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14405 * arm-tdep.c (arm_neon_quad_read): Likewise.
14406 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14407 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14408 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14409 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14410 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14411 (i386_pseudo_register_read_into_value): Likewise.
14412 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14413 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14414 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14415 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14416 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14417 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14418 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14419 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14420 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14421
14422 2018-01-22 Yao Qi <yao.qi@linaro.org>
14423
14424 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14425 * configure.tgt: Remove target mt.
14426 * mt-tdep.c: Remove.
14427 * regcache.c (cooked_read_test): Remove the check for mt.
14428
14429 2018-01-22 Yao Qi <yao.qi@linaro.org>
14430
14431 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14432 instead of gdbarch_pseudo_register_read_value.
14433
14434 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14435
14436 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14437 language is Ada.
14438
14439 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14440
14441 * linespec.c (create_sals_line_offset): Remove code that preserved
14442 the symtab_and_line's line number.
14443
14444 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14445
14446 * varobj.c (varobj_create): Don't set valid_block when creating a
14447 floating varobj.
14448
14449 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14450
14451 * varobj.c (varobj_create): Remove out of date comment.
14452
14453 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14454
14455 PR mi/20395
14456 * ada-exp.y (write_var_from_sym): Pass extra parameter when
14457 updating innermost block.
14458 * parse.c (innermost_block_tracker::update): Take extra type
14459 parameter, and check types match before updating innermost block.
14460 (write_dollar_variable): Update innermost block for registers.
14461 * parser-defs.h (enum innermost_block_tracker_type): New enum.
14462 (innermost_block_tracker::innermost_block_tracker): Initialise
14463 m_types member.
14464 (innermost_block_tracker::reset): Take type parameter.
14465 (innermost_block_tracker::update): Take type parameter, and pass
14466 type through as needed.
14467 (innermost_block_tracker::m_types): New member.
14468 * varobj.c (varobj_create): Pass type when reseting innermost
14469 block.
14470
14471 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14472
14473 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14474 * ada-lang.c (resolve_subexp): Likewise.
14475 * breakpoint.c (set_breakpoint_condition) Likewise.
14476 (watch_command_1) Likewise.
14477 * c-exp.y (variable): Likewise.
14478 * d-exp.y (PrimaryExpression): Likewise.
14479 * f-exp.y (variable): Likewise.
14480 * go-exp.y (variable): Likewise.
14481 * m2-exp.y (variable): Likewise.
14482 * objfiles.c (objfile::~objfile): Likewise.
14483 * p-exp.y (variable): Likewise.
14484 * parse.c (innermost_block): Change type.
14485 * parser-defs.h (class innermost_block_tracker): New.
14486 (innermost_block): Change to innermost_block_tracker.
14487 * printcmd.c (display_command): Switch to innermost_block API.
14488 (do_one_display): Likewise.
14489 * rust-exp.y (do_one_display): Likewise.
14490 * symfile.c (clear_symtab_users): Likewise.
14491 * varobj.c (varobj_create): Switch to innermost_block API, replace
14492 use of innermost_block with block stored on varobj object.
14493
14494 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14495
14496 * expression.h (innermost_block): Remove declaration.
14497 * varobj.c: Add 'parser-defs.h' include.
14498
14499 2018-01-19 Tom Tromey <tom@tromey.com>
14500
14501 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14502 symbols in the static and global blocks.
14503
14504 2018-01-19 James Clarke <jrtc27@jrtc27.com>
14505
14506 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14507 gdb_ptrace.h, and move including gdb_wait.h ...
14508 * nat/linux-ptrace.h: ... to here.
14509
14510 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14511
14512 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14513 inf_ptrace_detach_success.
14514 (inf_ptrace_detach_success): Add inferior parameter, use it
14515 instead of inferior_ptid, pass it to detach_inferior.
14516 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14517 parameter.
14518 * inferior.c (detach_inferior): Add overload that takes an
14519 inferior object.
14520 * inferior.h (detach_inferior): Likewise.
14521 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14522 use inferior_ptid, adjust call to inf_ptrace_detach_success.
14523 * linux-thread-db.c (thread_db_detach): Use inf parameter.
14524
14525 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14526
14527 * target.h (struct target_ops) <to_detach>: Add inferior
14528 parameter.
14529 (target_detach): Likewise.
14530 * target.c (dispose_inferior): Pass inferior down.
14531 (target_detach): Pass inferior down. Assert that it is equal to
14532 the current inferior.
14533 * aix-thread.c (aix_thread_detach): Pass inferior down.
14534 * corefile.c (core_file_command): Pass current_inferior() down.
14535 * corelow.c (core_detach): Add inferior parameter.
14536 * darwin-nat.c (darwin_detach): Likewise.
14537 * gnu-nat.c (gnu_detach): Likewise.
14538 * inf-ptrace.c (inf_ptrace_detach): Likewise.
14539 * infcmd.c (detach_command): Pass current_inferior() down to
14540 target_detach.
14541 * infrun.c (follow_fork_inferior): Pass parent_inf to
14542 target_detach.
14543 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14544 target_detach.
14545 * linux-nat.c (linux_nat_detach): Add inferior parameter.
14546 * linux-thread-db.c (thread_db_detach): Likewise.
14547 * nto-procfs.c (procfs_detach): Likewise.
14548 * procfs.c (procfs_detach): Likewise.
14549 * record.c (record_detach): Likewise.
14550 * record.h (struct inferior): Forward-declare.
14551 (record_detach): Add inferior parameter.
14552 * remote-sim.c (gdbsim_detach): Likewise.
14553 * remote.c (remote_detach_1): Likewise.
14554 (remote_detach): Likewise.
14555 (extended_remote_detach): Likewise.
14556 * sol-thread.c (sol_thread_detach): Likewise.
14557 * target-debug.h (target_debug_print_inferior_p): New macro.
14558 * target-delegates.c: Re-generate.
14559 * top.c (kill_or_detach): Pass inferior down to target_detach.
14560 * windows-nat.c (windows_detach): Add inferior parameter.
14561
14562 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14563
14564 * target.h (struct target_ops) <to_detach>: Remove args
14565 parameter.
14566 (target_detach): Likewise.
14567 * target.c (dispose_inferior): Adjust.
14568 (target_detach): Remove args parameter, adjust.
14569 * aix-thread.c (aix_thread_detach): Adjust.
14570 * corefile.c (core_file_command): Adjust.
14571 * corelow.c (core_detach): Adjust.
14572 * darwin-nat.c (darwin_detach): Adjust.
14573 * gnu-nat.c (gnu_detach): Adjust.
14574 * inf-ptrace.c (inf_ptrace_detach): Adjust.
14575 * infcmd.c (detach_command): Adjust
14576 * infrun.c (follow_fork_inferior): Adjust.
14577 (handle_vfork_child_exec_or_exit): Adjust.
14578 * linux-fork.c (linux_fork_detach): Remove args parameter.
14579 * linux-fork.h (linux_fork_detach): Likewise.
14580 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14581 * linux-thread-db.c (thread_db_detach): Likewise.
14582 * nto-procfs.c (procfs_detach): Likewise.
14583 * procfs.c (procfs_detach): Likewise.
14584 (do_detach): Remove signo parameter.
14585 * record.c (record_detach): Remove args parameter.
14586 * record.h (record_detach): Likewise.
14587 * remote-sim.c (gdbsim_detach): Likewise.
14588 * remote.c (remote_detach_1): Likewise.
14589 (remote_detach): Likewise.
14590 (extended_remote_detach): Likewise.
14591 * sol-thread.c (sol_thread_detach): Likewise.
14592 * target-delegates.c: Re-generate.
14593 * top.c (struct qt_args) <args>: Remove field.
14594 (kill_or_detach): Don't pass args.
14595 (quit_force): Don't set args.
14596 * windows-nat.c (windows_detach): Remove args parameter.
14597
14598 2018-01-19 Yao Qi <yao.qi@linaro.org>
14599
14600 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14601 (arm_linux_init_abi): Install it.
14602
14603 2018-01-19 Yao Qi <yao.qi@linaro.org>
14604
14605 * osabi.c (gdb_osabi_names): Extend the regexp for
14606 arm-linux-gnueabihf.
14607
14608 2018-01-18 Yao Qi <yao.qi@linaro.org>
14609
14610 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14611 m_abbrevs.
14612 (abbrev_table::add_abbrev): Update.
14613 (abbrev_table::lookup_abbrev): Update.
14614
14615 2018-01-18 Yao Qi <yao.qi@linaro.org>
14616
14617 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14618
14619 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
14620
14621 * compile/compile.c (compile_to_object): Convert "triplet_rx"
14622 to "std::string".
14623
14624 2018-01-17 Tom Tromey <tom@tromey.com>
14625
14626 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
14627
14628 2018-01-17 Tom Tromey <tom@tromey.com>
14629
14630 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14631 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14632 (create_array_type_with_stride): Update.
14633 * dwarf2read.c (set_die_type): Update.
14634
14635 2018-01-17 Tom Tromey <tom@tromey.com>
14636
14637 * dwarf2read.c (delayed_method_info): Remove typedef.
14638 (dwarf2_cu::method_info): Now a std::vector.
14639 (add_to_method_list): Update.
14640 (free_delayed_list): Remove.
14641 (compute_delayed_physnames): Update.
14642 (process_full_comp_unit, process_full_type_unit): Clear the method
14643 list. Remove cleanups.
14644 (psymtab_include_file_name): Add name_holder parameter. Use
14645 unique_xmalloc_ptr.
14646 (dwarf_decode_lines): Update.
14647
14648 2018-01-17 Tom Tromey <tom@tromey.com>
14649 Simon Marchi <simon.marchi@ericsson.com>
14650
14651 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14652 (dwarf2_per_objfile::free_cached_comp_units)
14653 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14654 (init_cutu_and_read_dies_no_follow): Update.
14655 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14656 (dwarf2_cu::~dwarf2_cu): New.
14657 (free_heap_comp_unit, free_stack_comp_unit): Remove.
14658 (age_cached_comp_units, free_one_cached_comp_unit): Update.
14659
14660 2018-01-17 Tom Tromey <tom@tromey.com>
14661 Simon Marchi <simon.marchi@ericsson.com>
14662
14663 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14664 (struct die_reader_specs) <abbrev_table>: New member.
14665 (struct abbrev_table): Add constructor.
14666 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14667 <abbrev_obstack>: Now an auto_obstack.
14668 (abbrev_table_up): New typedef.
14669 (init_cu_die_reader): Add abbrev_table parameter.
14670 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14671 Add result_dwo_abbrev_table.
14672 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14673 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14674 Update.
14675 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14676 parameter.
14677 (skip_children): Update.
14678 (abbrev_table::alloc_abbrev): Rename from
14679 abbrev_table_alloc_abbrev.
14680 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14681 (abbrev_table::lookup_abbrev): Rename from
14682 abbrev_table_lookup_abbrev.
14683 (abbrev_table_read_table): Return abbrev_table_up.
14684 (abbrev_table_free, abbrev_table_free_cleanup)
14685 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14686 (load_partial_dies): Update.
14687
14688 2018-01-17 Tom Tromey <tom@tromey.com>
14689
14690 * dwarf2read.c (dwarf2_compute_name): Update comment.
14691 (read_func_scope, read_variable): Update.
14692 (new_symbol): Remove.
14693 (new_symbol_full): Rename to new_symbol.
14694
14695 2018-01-17 Mike Gulick <mgulick@mathworks.com>
14696
14697 PR gdb/16577
14698 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14699 a warning instead of throwing an error, set section size to 0 and return
14700 NULL.
14701 * gdb_bfd.h (gdb_bfd_map_section): Update description.
14702
14703 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14704
14705 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14706 std::string.
14707 (linux_ptrace_attach_fail_reason_string): Likewise.
14708 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14709 Likewise.
14710 (linux_ptrace_attach_fail_reason_string): Likewise.
14711 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14712
14713 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14714
14715 * linux-nat.c (linux_nat_attach): Remove xstrdup.
14716
14717 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
14718
14719 PR gdb/21559
14720 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14721 checking for fs_base/gs_base fields in struct user_regs_struct.
14722 * configure: Regenerate.
14723
14724 2018-01-17 Yao Qi <yao.qi@linaro.org>
14725
14726 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14727 function.
14728 (aarch64_linux_init_abi): Install it to gdbarch hook
14729 gcc_target_options.
14730
14731 2018-01-15 Pedro Alves <palves@redhat.com>
14732
14733 * common/signals-state-save-restore.c
14734 (save_original_signals_state): Fix typos.
14735
14736 2017-01-12 Tom Tromey <tom@tromey.com>
14737 Sergio Durigan Junior <sergiodj@redhat.com>
14738
14739 * Makefile.in (install-only): Install gdb-add-index.
14740
14741 2018-01-12 John Baldwin <jhb@FreeBSD.org>
14742
14743 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14744
14745 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
14746
14747 * infrun.c (keep_going_pass_signal): Clear step-over info when
14748 insert_breakpoints fails.
14749
14750 2018-01-11 Pedro Alves <palves@redhat.com>
14751
14752 PR gdb/22583
14753 * infrun.c (resume): Rename to ...
14754 (resume_1): ... this.
14755 (resume): Reimplement as wrapper around resume_1.
14756
14757 2018-01-11 Pedro Alves <palves@redhat.com>
14758
14759 PR remote/22597
14760 * remote.c (remote_parse_stop_reply): Default to the last-set
14761 general thread instead of to 'magic_null_ptid'.
14762
14763 2018-01-10 Pedro Alves <palves@redhat.com>
14764
14765 * language.h (language_get_symbol_name_matcher): Rename ...
14766 (get_symbol_name_matcher): ... this.
14767 * language.c (language_get_symbol_name_matcher): Ditto.
14768 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14769 callers adjusted.
14770
14771 2018-01-10 Pedro Alves <palves@redhat.com>
14772
14773 PR gdb/22670
14774 * dwarf2read.c
14775 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14776 Adjust to use language_get_symbol_name_matcher instead of
14777 language_defn::la_get_symbol_name_matcher.
14778 * language.c (language_get_symbol_name_matcher): If in Ada mode
14779 and the lookup name is a verbatim match, return Ada's matcher.
14780 * language.h (language_get_symbol_name_matcher): Adjust comment.
14781 (ada_lookup_name_info::verbatim_p):: New method.
14782
14783 2018-01-10 Pedro Alves <palves@redhat.com>
14784
14785 PR gdb/22670
14786 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14787 minsym's language is language_auto or language_cplus, pass down
14788 language_ada instead.
14789 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14790
14791 2018-01-10 Pedro Alves <palves@redhat.com>
14792
14793 PR gdb/22670
14794 * minsyms.c (linkage_name_str): New function.
14795 (iterate_over_minimal_symbols): Use it.
14796
14797 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14798
14799 * NEWS: Document that 'info proc' now works on FreeBSD.
14800
14801 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14802
14803 * configure.ac: Check for kinfo_getfile in libutil.
14804 * configure: Regenerate.
14805 * config.in: Regenerate.
14806 * fbsd-nat.c: Include "fbsd-tdep.h".
14807 (fbsd_fetch_cmdline): New.
14808 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14809 rather than calling error.
14810 (fbsd_info_proc): New.
14811 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14812 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14813 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14814
14815 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14816
14817 * fbsd-nat.c (struct free_deleter): Remove.
14818 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14819
14820 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14821
14822 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14823 NULL for an empty pathname.
14824
14825 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14826
14827 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14828 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14829 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14830 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14831 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14832 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14833 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14834 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14835 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14836 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14837 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14838 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14839 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14840 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14841 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14842
14843 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14844
14845 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14846 (gnu_xfer_auxv): New function.
14847 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14848 TARGET_OBJECT_AUXV.
14849
14850 2018-01-08 Yao Qi <yao.qi@linaro.org>
14851 Simon Marchi <simon.marchi@ericsson.com>
14852
14853 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14854 common/selftest.c.
14855 (COMMON_OBS): Remove selftest.o.
14856 * configure.ac: Append selftest-arch.c and common/selftest.c to
14857 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14858 * configure: Re-generated.
14859 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14860 GDB_SELF_TEST.
14861 (maintenance_info_selftests): Likewise.
14862
14863 2018-01-08 Xavier Roirand <roirand@adacore.com>
14864
14865 * ada-valprint.c (val_print_packed_array_elements): Use
14866 proper number of elements when printing an array indexed
14867 by an enumeration type.
14868
14869 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14870
14871 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14872 (dw2_get_file_names_reader): Adjust.
14873 (lookup_dwo_signatured_type): Adjust.
14874 (lookup_dwp_signatured_type): Adjust.
14875 (lookup_signatured_type): Adjust.
14876 (create_type_unit_group): Adjust.
14877 (get_type_unit_group): Adjust.
14878 (process_psymtab_comp_unit_reader): Adjust.
14879 (build_type_psymtabs_reader): Adjust.
14880 (scan_partial_symbols): Adjust.
14881 (add_partial_symbol): Adjust.
14882 (add_partial_subprogram): Adjust.
14883 (peek_die_abbrev): Adjust.
14884 (fixup_go_packaging): Adjust.
14885 (process_imported_unit_die): Adjust.
14886 (dwarf2_compute_name): Adjust.
14887 (dwarf2_physname): Adjust.
14888 (read_import_statement): Adjust.
14889 (handle_DW_AT_stmt_list): Adjust.
14890 (read_file_scope): Adjust.
14891 (read_func_scope): Adjust.
14892 (read_lexical_block_scope): Adjust.
14893 (read_call_site_scope): Adjust.
14894 (read_variable): Adjust.
14895 (dwarf2_rnglists_process): Adjust.
14896 (dwarf2_ranges_process): Adjust.
14897 (dwarf2_ranges_read): Adjust.
14898 (dwarf2_get_pc_bounds): Adjust.
14899 (dwarf2_record_block_ranges): Adjust.
14900 (dwarf2_add_field): Adjust.
14901 (dwarf2_add_member_fn): Adjust.
14902 (read_structure_type): Adjust.
14903 (process_structure_scope): Adjust.
14904 (read_enumeration_type): Adjust.
14905 (read_array_type): Adjust.
14906 (mark_common_block_symbol_computed): Adjust.
14907 (read_common_block): Adjust.
14908 (read_namespace_type): Adjust.
14909 (read_namespace): Adjust.
14910 (read_module_type): Adjust.
14911 (read_tag_pointer_type): Adjust.
14912 (read_tag_ptr_to_member_type): Adjust.
14913 (read_tag_string_type): Adjust.
14914 (read_subroutine_type): Adjust.
14915 (read_typedef): Adjust.
14916 (read_base_type): Adjust.
14917 (attr_to_dynamic_prop): Adjust.
14918 (read_subrange_type): Adjust.
14919 (read_unspecified_type): Adjust.
14920 (dwarf2_read_abbrevs): Adjust.
14921 (load_partial_dies): Adjust.
14922 (read_partial_die): Adjust.
14923 (find_partial_die): Adjust.
14924 (guess_partial_die_structure_name): Adjust.
14925 (fixup_partial_die): Adjust.
14926 (read_attribute_value): Adjust.
14927 (read_addr_index): Adjust.
14928 (read_addr_index_from_leb128): Adjust.
14929 (read_str_index): Adjust.
14930 (dwarf2_string_attr): Adjust.
14931 (get_debug_line_section): Adjust.
14932 (dwarf_decode_line_header): Adjust.
14933 (lnp_state_machine::check_line_address): Adjust.
14934 (dwarf_decode_lines_1): Adjust.
14935 (dwarf_decode_lines): Adjust.
14936 (dwarf2_start_symtab): Adjust.
14937 (var_decode_location): Adjust.
14938 (new_symbol_full): Adjust.
14939 (dwarf2_const_value_data): Adjust.
14940 (dwarf2_const_value_attr): Adjust.
14941 (dwarf2_const_value): Adjust.
14942 (die_type): Adjust.
14943 (die_containing_type): Adjust.
14944 (build_error_marker_type): Adjust.
14945 (lookup_die_type): Adjust.
14946 (guess_full_die_structure_name): Adjust.
14947 (anonymous_struct_prefix): Adjust.
14948 (determine_prefix): Adjust.
14949 (dwarf2_name): Adjust.
14950 (follow_die_ref_or_sig): Adjust.
14951 (follow_die_offset): Adjust.
14952 (follow_die_ref): Adjust.
14953 (follow_die_sig_1): Adjust.
14954 (follow_die_sig): Adjust.
14955 (get_signatured_type): Adjust.
14956 (get_DW_AT_signature_type): Adjust.
14957 (decode_locdesc): Adjust.
14958 (dwarf_decode_macros): Adjust.
14959 (cu_debug_loc_section): Adjust.
14960 (fill_in_loclist_baton): Adjust.
14961 (dwarf2_symbol_mark_computed): Adjust.
14962 (init_one_comp_unit): Don't assign
14963 dwarf2_cu::dwarf2_per_objfile.
14964 (set_die_type): Adjust.
14965
14966 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14967
14968 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14969 <dwarf2_per_objfile>: New field.
14970 (dwarf2_per_objfile): Remove global.
14971 (get_dwarf2_per_objfile): New function.
14972 (set_dwarf2_per_objfile): New function.
14973 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14974 dwarf2_per_objfile.
14975 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14976 (read_abbrev_offset): Likewise.
14977 (read_indirect_string): Likewise.
14978 (read_indirect_line_string): Likewise.
14979 (read_indirect_string_at_offset): Likewise.
14980 (read_indirect_string_from_dwz): Likewise.
14981 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14982 dwarf2_per_objfile.
14983 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14984 (create_all_comp_units): Change objfile parameter to
14985 dwarf2_per_objfile.
14986 (create_all_type_units): Likewise.
14987 (process_queue): Add dwarf2_per_objfile parameter.
14988 (read_and_check_comp_unit_head): Likewise.
14989 (lookup_dwo_unit_in_dwp): Likewise.
14990 (get_dwp_file): Likewise.
14991 (process_cu_includes): Likewise.
14992 (struct free_dwo_file_cleanup_data): New struct.
14993 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14994 set_dwarf2_per_objfile.
14995 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14996 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14997 context, adjust calls.
14998 (dw2_instantiate_symtab): Likewise.
14999 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15000 (dw2_get_cu): Likewise.
15001 (create_cu_from_index_list): Change objfile parameter to
15002 dwarf2_per_objfile.
15003 (create_cus_from_index_list): Get dwarf2_per_objfile from
15004 context, adjust calls.
15005 (create_cus_from_index): Likewise.
15006 (create_signatured_type_table_from_index): Change objfile
15007 parameter to dwarf2_per_objfile.
15008 (create_signatured_type_table_from_debug_names): Change objfile
15009 parameter to dwarf2_per_objfile.
15010 (create_addrmap_from_index): Likewise.
15011 (create_addrmap_from_aranges): Likewise.
15012 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15013 (dw2_setup): Remove.
15014 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15015 context.
15016 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15017 get_dwarf2_per_objfile.
15018 (dw2_forget_cached_source_info): Likewise.
15019 (dw2_map_symtabs_matching_filename): Likewise.
15020 (struct dw2_symtab_iterator) <index>: Remove.
15021 <dwarf2_per_objfile>: New field.
15022 (dw2_symtab_iter_init): Replace index parameter with
15023 dwarf2_per_objfile.
15024 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15025 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15026 (dw2_print_stats): Likewise.
15027 (dw2_dump): Likewise.
15028 (dw2_expand_symtabs_for_function): Likewise.
15029 (dw2_expand_all_symtabs): Likewise.
15030 (dw2_expand_symtabs_with_fullname): Likewise.
15031 (dw2_expand_marked_cus): Replace index and objfile parameters
15032 with dwarf2_per_objfile.
15033 (dw_expand_symtabs_matching_file_matcher): Add
15034 dwarf2_per_objfile parameter and adjust calls.
15035 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15036 adjust calls.
15037 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15038 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15039 adjust calls.
15040 (create_cus_from_debug_names_list): Replace objfile parameter
15041 with dwarf2_per_objfile and adjust calls.
15042 (create_cus_from_debug_names): Likewise.
15043 (dwarf2_read_debug_names): Likewise.
15044 (mapped_debug_names::namei_to_name): Adjust call.
15045 (dw2_debug_names_iterator::next): Likewise.
15046 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15047 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15048 (dw2_debug_names_dump): Likewise.
15049 (dw2_debug_names_expand_symtabs_for_function): Likewise.
15050 (dw2_debug_names_expand_symtabs_matching): Likewise.
15051 (dwarf2_initialize_objfile): Likewise.
15052 (dwarf2_build_psymtabs): Likewise.
15053 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15054 this_cu.
15055 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15056 (read_and_check_comp_unit_head): Likewise.
15057 (read_abbrev_offset): Likewise.
15058 (create_debug_type_hash_table): Likewise.
15059 (create_debug_types_hash_table): Likewise.
15060 (create_all_type_units): Replace objfile parameter with
15061 dwarf2_per_objfile.
15062 (add_type_unit): Add dwarf2_per_objfile parameter.
15063 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15064 with dwarf2_per_objfile.
15065 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15066 (lookup_dwp_signatured_type): Likewise.
15067 (lookup_signatured_type): Likewise.
15068 (read_cutu_die_from_dwo): Likewise.
15069 (init_tu_and_read_dwo_dies): Likewise.
15070 (init_cutu_and_read_dies): Likewise.
15071 (init_cutu_and_read_dies_no_follow): Likewise.
15072 (allocate_type_unit_groups_table): Add objfile parameter.
15073 (create_type_unit_group): Use dwarf2_per_objfile from cu.
15074 (get_type_unit_group): Likewise.
15075 (process_psymtab_comp_unit): Update call.
15076 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15077 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15078 (print_tu_stats): Likewise.
15079 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15080 in void* parameter.
15081 (build_type_psymtabs): Change objfile parameter to
15082 dwarf2_per_objfile.
15083 (process_skeletonless_type_unit): Use dwarf2_per_objfile
15084 passed in void* parameter.
15085 (process_skeletonless_type_units): Change objfile parameter to
15086 dwarf2_per_objfile.
15087 (set_partial_user): Likewise.
15088 (dwarf2_build_psymtabs_hard): Likewise.
15089 (read_comp_units_from_section): Likewise.
15090 (create_all_comp_units): Likewise.
15091 (scan_partial_symbols): Update calls.
15092 (add_partial_symbol): Likewise.
15093 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15094 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15095 (process_queue): Add dwarf2_per_objfile parameter.
15096 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15097 (compute_compunit_symtab_includes): Likewise.
15098 (process_cu_includes): Add dwarf2_per_objfile parameter.
15099 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15100 (process_full_type_unit): Likewise.
15101 (process_imported_unit_die): Update call.
15102 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15103 (read_file_scope): Likewise.
15104 (allocate_dwo_file_hash_table): Add objfile parameter.
15105 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15106 (create_cus_hash_table): Likewise.
15107 (create_dwp_hash_table): Likewise.
15108 (create_dwo_unit_in_dwp_v1): Likewise.
15109 (create_dwp_v2_section): Likewise.
15110 (create_dwo_unit_in_dwp_v2): Likewise.
15111 (lookup_dwo_unit_in_dwp): Likewise.
15112 (try_open_dwop_file): Likewise.
15113 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15114 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15115 cleanup to include a reference to dwarf2_per_objfile.
15116 (open_dwp_file): Add dwarf2_per_objfile parameter.
15117 (open_and_init_dwp_file): Likewise.
15118 (get_dwp_file): Likewise.
15119 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15120 (queue_and_load_all_dwo_tus): Update call.
15121 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15122 data.
15123 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15124 (dwarf2_ranges_process): Likewise.
15125 (dwarf2_get_pc_bounds): Likewise.
15126 (mark_common_block_symbol_computed): Likewise.
15127 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15128 (dwarf2_read_abbrevs): Update call.
15129 (read_partial_die): Use dwarf2_per_objfile from cu.
15130 (find_partial_die): Likewise.
15131 (fixup_partial_die): Likewise.
15132 (read_attribute_value): Likewise.
15133 (read_indirect_string_at_offset_from): Add objfile parameter.
15134 (read_indirect_string_at_offset): Add dwarf2_per_objfile
15135 parameter.
15136 (read_indirect_string_from_dwz): Add objfile parameter.
15137 (read_indirect_string): Add objfile parameter.
15138 (read_addr_index_1): Add dwarf2_per_objfile parameter.
15139 (read_addr_index): Use dwarf2_per_objfile from cu.
15140 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15141 call dw2_setup.
15142 (read_str_index): Use dwarf2_per_objfile from cu.
15143 (get_debug_line_section): Likewise.
15144 (read_formatted_entries): Add dwarf2_per_objfile parameter.
15145 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15146 (new_symbol_full): Use dwarf2_per_objfile from cu.
15147 (build_error_marker_type): Likewise.
15148 (lookup_die_type): Likewise.
15149 (determine_prefix): Likewise.
15150 (follow_die_offset): Likewise.
15151 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15152 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15153 (dwarf2_fetch_die_type_sect_off): Likewise.
15154 (dwarf2_get_die_type): Likewise.
15155 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15156 (get_signatured_type): Likewise.
15157 (get_DW_AT_signature_type): Likewise.
15158 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15159 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15160 (cu_debug_loc_section): Likewise.
15161 (fill_in_loclist_baton): Likewise.
15162 (dwarf2_symbol_mark_computed): Likewise.
15163 (dwarf2_find_containing_comp_unit): Change objfile parameter to
15164 dwarf2_per_objfile.
15165 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15166 parameter.
15167 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15168 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15169 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15170 (set_die_type): Use dwarf2_free_objfile from cu.
15171 (get_die_type_at_offset): Likewise.
15172 (dwarf2_per_objfile_free): Don't assign global variable.
15173 (debug_names) <constructor>: Add dwarf2_per_objfile
15174 parameter, update m_debugstrlookup construction.
15175 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15176 parameter.
15177 <m_dwarf2_per_objfile>: New field.
15178 <lookup>: Use m_dwarf2_per_objfile.
15179 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15180 (psyms_seen_size): Likewise.
15181 (write_gdbindex): Replace objfile parameter with
15182 dwarf2_per_objfile.
15183 (write_debug_names): Likewise.
15184 (write_psymtabs_to_index): Likewise.
15185 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15186 calls.
15187
15188 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15189
15190 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15191 <dwarf2_per_objfile>: New field.
15192 (struct dwarf2_per_cu_data) <objfile>: Remove.
15193 <dwarf2_per_objfile>: New field.
15194 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15195 of objfile.
15196 (create_signatured_type_table_from_index): Likewise.
15197 (create_debug_type_hash_table): Likewise.
15198 (fill_in_sig_entry_from_dwo_entry): Likewise.
15199 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15200 (create_type_unit_group): Assign dwarf2_per_objfile instead of
15201 objfile.
15202 (create_partial_symtab): Access objfile through
15203 dwarf2_per_objfile.
15204 (process_psymtab_comp_unit_reader): Likewise.
15205 (read_comp_units_from_section): Likewise.
15206 (scan_partial_symbols): Likewise.
15207 (add_partial_symbol): Likewise.
15208 (add_partial_subprogram): Likewise.
15209 (peek_die_abbrev): Likewise.
15210 (fixup_go_packaging): Likewise.
15211 (process_full_comp_unit): Likewise.
15212 (process_full_type_unit): Likewise.
15213 (process_imported_unit_die): Likewise.
15214 (dwarf2_compute_name): Likewise.
15215 (dwarf2_physname): Likewise.
15216 (read_import_statement): Likewise.
15217 (create_cus_hash_table): Assign dwarf2_physname instead of
15218 objfile.
15219 (read_func_scope): Access objfile through dwarf2_per_objfile.
15220 (read_lexical_block_scope): Likewise.
15221 (read_call_site_scope): Likewise.
15222 (read_variable): Likewise.
15223 (dwarf2_rnglists_process): Likewise.
15224 (dwarf2_ranges_process): Likewise.
15225 (dwarf2_ranges_read): Likewise.
15226 (dwarf2_record_block_ranges): Likewise.
15227 (dwarf2_add_field): Likewise.
15228 (dwarf2_add_member_fn): Likewise.
15229 (read_structure_type): Likewise.
15230 (process_structure_scope): Likewise.
15231 (read_enumeration_type): Likewise.
15232 (read_array_type): Likewise.
15233 (read_common_block): Likewise.
15234 (read_namespace_type): Likewise.
15235 (read_namespace): Likewise.
15236 (read_module_type): Likewise.
15237 (read_tag_pointer_type): Likewise.
15238 (read_tag_ptr_to_member_type): Likewise.
15239 (read_tag_string_type): Likewise.
15240 (read_subroutine_type): Likewise.
15241 (read_typedef): Likewise.
15242 (read_base_type): Likewise.
15243 (attr_to_dynamic_prop): Likewise.
15244 (read_subrange_type): Likewise.
15245 (read_unspecified_type): Likewise.
15246 (load_partial_dies): Likewise.
15247 (read_partial_die): Likewise.
15248 (find_partial_die): Likewise.
15249 (guess_partial_die_structure_name): Likewise.
15250 (fixup_partial_die): Likewise.
15251 (read_attribute_value): Likewise.
15252 (read_addr_index_from_leb128): Likewise.
15253 (dwarf2_read_addr_index): Likewise.
15254 (dwarf2_string_attr): Likewise.
15255 (lnp_state_machine::check_line_address): Likewise.
15256 (dwarf_decode_lines_1): Likewise.
15257 (dwarf_decode_lines): Likewise.
15258 (dwarf2_start_symtab): Likewise.
15259 (var_decode_location): Likewise.
15260 (new_symbol_full): Likewise.
15261 (dwarf2_const_value_data): Likewise.
15262 (dwarf2_const_value_attr): Likewise.
15263 (dwarf2_const_value): Likewise.
15264 (die_type): Likewise.
15265 (die_containing_type): Likewise.
15266 (lookup_die_type): Likewise.
15267 (guess_full_die_structure_name): Likewise.
15268 (anonymous_struct_prefix): Likewise.
15269 (dwarf2_name): Likewise.
15270 (follow_die_ref_or_sig): Likewise.
15271 (follow_die_offset): Likewise.
15272 (follow_die_ref): Likewise.
15273 (dwarf2_fetch_die_loc_sect_off): Likewise.
15274 (dwarf2_fetch_constant_bytes): Likewise.
15275 (dwarf2_fetch_die_type_sect_off): Likewise.
15276 (dwarf2_get_die_type): Likewise.
15277 (follow_die_sig): Likewise.
15278 (decode_locdesc): Likewise.
15279 (dwarf2_per_cu_objfile): Likewise.
15280 (dwarf2_per_cu_text_offset): Likewise.
15281 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15282 objfile.
15283 (set_die_type): Access objfile through
15284 dwarf2_per_objfile.
15285
15286 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15287
15288 * valprint.c (converted_character_d): Remove typedef.
15289 (DEF_VEC_O (converted_character_d)): Remove.
15290 (count_next_character): Use std::vector.
15291 (print_converted_chars_to_obstack): Likewise.
15292 (generic_printstr): Likewise.
15293
15294 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15295
15296 * xml-support.h (struct gdb_xml_value): Add constructor.
15297 <value>: Change type to unique_xmalloc_ptr.
15298 (gdb_xml_value_s): Remove typedef.
15299 (DEF_VEC_O (gdb_xml_value_s)): Remove.
15300 (gdb_xml_element_start_handler): Change parameter type to
15301 std::vector.
15302 (xml_find_attribute): Likewise.
15303 * xml-support.c (xml_find_attribute): Change parameter type to
15304 std::vector and adjust.
15305 (gdb_xml_values_cleanup): Remove.
15306 (gdb_xml_parser::start_element): Adjust to std::vector.
15307 (xinclude_start_include): Change paraeter type to std::vector
15308 and adjust.
15309 * btrace.c (check_xml_btrace_version): Likewise.
15310 (parse_xml_btrace_block): Likewise.
15311 (parse_xml_btrace_pt_config_cpu): Likewise.
15312 (parse_xml_btrace_pt): Likewise.
15313 (parse_xml_btrace_conf_bts): Likewise.
15314 (parse_xml_btrace_conf_pt): Likewise.
15315 * memory-map.c (memory_map_start_memory): Likewise.
15316 (memory_map_start_property): Likewise.
15317 * osdata.c (osdata_start_osdata): Likewise.
15318 (osdata_start_item): Likewise.
15319 (osdata_start_column): Likewise.
15320 * remote.c (start_thread): Likewise.
15321 * solib-aix.c (library_list_start_library): Likewise.
15322 (library_list_start_list): Likewise.
15323 * solib-svr4.c (library_list_start_library): Likewise.
15324 (svr4_library_list_start_list): Likewise.
15325 * solib-target.c (library_list_start_segment): Likewise.
15326 (library_list_start_section): Likewise.
15327 (library_list_start_library): Likewise.
15328 (library_list_start_list): Likewise.
15329 * tracepoint.c (traceframe_info_start_memory): Likewise.
15330 (traceframe_info_start_tvar): Likewise.
15331 * xml-syscall.c (syscall_start_syscall): Likewise.
15332 * xml-tdesc.c (tdesc_start_target): Likewise.
15333 (tdesc_start_feature): Likewise.
15334 (tdesc_start_reg): Likewise.
15335 (tdesc_start_union): Likewise.
15336 (tdesc_start_struct): Likewise.
15337 (tdesc_start_flags): Likewise.
15338 (tdesc_start_enum): Likewise.
15339 (tdesc_start_field): Likewise.
15340 (tdesc_start_enum_value): Likewise.
15341 (tdesc_start_vector): Likewise.
15342
15343 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15344
15345 * extension.h (struct xmethod_worker) <clone>: Remove.
15346 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15347 Remove.
15348 (python_xmethod_worker::clone): Remove.
15349 * valops.c (find_overload_match): Use std::move instead of
15350 clone.
15351
15352 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15353
15354 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15355 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15356 <free_xmethod_worker_data>: Remove.
15357 <get_matching_xmethod_workers>: Chance VEC to std::vector.
15358 <get_xmethod_arg_types>: Remove.
15359 <get_xmethod_result_type>: Remove.
15360 <invoke_xmethod>: Remove.
15361 * extension.c (new_xmethod_worker): Remove.
15362 (clone_xmethod_worker): Remove.
15363 (get_matching_xmethod_workers): Return void, pass std::vector by
15364 pointer.
15365 (get_xmethod_arg_types): Rename to...
15366 (xmethod_worker::get_arg_types): ... this, and adjust.
15367 (get_xmethod_result_type): Rename to...
15368 (xmethod_worker::get_result_type): ... this, and adjust.
15369 (invoke_xmethod): Remove.
15370 (free_xmethod_worker): Remove.
15371 (free_xmethod_worker_vec): Remove.
15372 * extension.h (enum ext_lang_rc): Move here from
15373 extension-priv.h.
15374 (struct xmethod_worker): Add constructor and destructor.
15375 <data>: Remove.
15376 <value>: Remove.
15377 <invoke, clone, do_get_result_type, do_get_arg_types>: New
15378 virtual pure methods.
15379 <get_arg_types, get_result_type>: New methods.
15380 (xmethod_worker_ptr): Remove typedef.
15381 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15382 (xmethod_worker_vec): Remove typedef.
15383 (xmethod_worker_up): New typedef.
15384 (invoke_xmethod): Remove.
15385 (clone_xmethod_worker): Remove.
15386 (free_xmethod_worker): Remove.
15387 (free_xmethod_worker_vec): Remove.
15388 (get_xmethod_arg_types): Remove.
15389 (get_xmethod_result_type): Remove.
15390 * valops.c (find_method_list): Use std::vector, don't use
15391 intermediate vector.
15392 (value_find_oload_method_list): Use std::vector.
15393 (find_overload_match): Use std::vector.
15394 (find_oload_champ): Use std::vector.
15395 * value.c (value_free): Use operator delete.
15396 (value_of_xmethod): Rename to...
15397 (value_from_xmethod): ... this. Don't assign
15398 xmethod_worker::value, take rvalue-reference.
15399 (result_type_of_xmethod): Adjust.
15400 (call_xmethod): Adjust.
15401 * value.h: Include extension.h.
15402 (struct xmethod_worker): Don't forward-declare.
15403 (value_of_xmethod): Rename to...
15404 (value_from_xmethod): ... this, take rvalue-reference.
15405 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15406 (struct python_xmethod_worker): ... this, add constructor and
15407 destructor.
15408 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15409 (gdbpy_free_xmethod_worker_data): Rename to...
15410 (python_xmethod_worker::~python_xmethod_worker): ... this and
15411 adjust.
15412 (gdbpy_clone_xmethod_worker_data): Rename to...
15413 (python_xmethod_worker::clone): ... this and adjust.
15414 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15415 temporary vector.
15416 (gdbpy_get_xmethod_arg_types): Rename to...
15417 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15418 (gdbpy_get_xmethod_result_type): Rename to...
15419 (python_xmethod_worker::do_get_result_type): ... this and
15420 adjust.
15421 (gdbpy_invoke_xmethod): Rename to...
15422 (python_xmethod_worker::invoke): ... this and adjust.
15423 (new_python_xmethod_worker): Rename to...
15424 (python_xmethod_worker::python_xmethod_worker): ... this and
15425 adjust.
15426 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15427 Remove.
15428 (gdbpy_free_xmethod_worker_data): Remove.
15429 (gdbpy_get_matching_xmethod_workers): Use std::vector.
15430 (gdbpy_get_xmethod_arg_types): Remove.
15431 (gdbpy_get_xmethod_result_type): Remove.
15432 (gdbpy_invoke_xmethod): Remove.
15433 * python/python.c (python_extension_ops): Remove obsolete
15434 callbacks.
15435
15436 2018-01-05 Pedro Alves <palves@redhat.com>
15437
15438 PR gdb/18653
15439 * common/signals-state-save-restore.c
15440 (save_original_signals_state): New parameter 'quiet'. Warn if we
15441 find a custom handler preinstalled, instead of internal erroring.
15442 But only warn if !quiet.
15443 * common/signals-state-save-restore.h
15444 (save_original_signals_state): New parameter 'quiet'.
15445 * main.c (captured_main_1): Move save_original_signals_state call
15446 after option handling, and pass QUIET.
15447
15448 2018-01-05 Pedro Alves <palves@redhat.com>
15449
15450 * spu-tdep.c (spu_catch_start): Pass
15451 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15452
15453 2018-01-05 Pedro Alves <palves@redhat.com>
15454
15455 PR gdb/22670
15456 * ada-lang.c (literal_symbol_name_matcher): New function.
15457 (ada_get_symbol_name_matcher): Use it for
15458 symbol_name_match_type::SEARCH_NAME.
15459 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
15460 it down instead of assuming symbol_name_match_type::FULL.
15461 * block.h (block_lookup_symbol): New parameter 'match_type'.
15462 * c-valprint.c (print_unpacked_pointer): Use
15463 lookup_symbol_search_name instead of lookup_symbol.
15464 * compile/compile-object-load.c (get_out_value_type): Pass down
15465 symbol_name_match_type::SEARCH_NAME.
15466 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15467 symbol_name_match_type::FULL.
15468 * cp-support.c (cp_get_symbol_name_matcher): Handle
15469 symbol_name_match_type::SEARCH_NAME.
15470 * infrun.c (insert_exception_resume_breakpoint): Use
15471 lookup_symbol_search_name.
15472 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15473 * psymtab.c (maintenance_check_psymtabs): Use
15474 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15475 * stack.c (print_frame_args): Use lookup_symbol_search_name and
15476 SYMBOL_SEARCH_NAME.
15477 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15478 if symbol_name_match_type::SEARCH_NAME.
15479 (lookup_symbol_in_language): Pass down
15480 symbol_name_match_type::FULL.
15481 (lookup_symbol_search_name): New.
15482 (lookup_language_this): Pass down
15483 symbol_name_match_type::SEARCH_NAME.
15484 (lookup_symbol_aux, lookup_local_symbol): New parameter
15485 'match_type'. Pass it down.
15486 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15487 (lookup_symbol_search_name): New declaration.
15488 (lookup_symbol_in_block): New 'match_type' parameter.
15489
15490 2018-01-05 Pedro Alves <palves@redhat.com>
15491
15492 PR gdb/22670
15493 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15494 ada_lookup_symbol.
15495 (ada_lookup_symbol): Reimplement in terms of
15496 ada_lookup_symbol_list, bits factored out from
15497 ada_lookup_encoded_symbol.
15498
15499 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15500
15501 * ada-exp.y (write_object_renaming): When subscripting an array
15502 using a symbol as the index, pass the block in call to
15503 ada_lookup_encoded_symbol when looking that symbol up.
15504
15505 2018-01-05 Jerome Guitton <guitton@adacore.com>
15506
15507 * ada-lang.c (ada_array_length): Use ada_index_type instead of
15508 TYPE_INDEX_TYPE.
15509
15510 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15511
15512 * ada-lang.c (ada_to_fixed_value_create): Add handling of
15513 the case where VALUE_LVAL (val0) is not lval_memory.
15514
15515 2018-01-05 Xavier Roirand <roirand@adacore.com>
15516
15517 * ada-valprint.c (print_optional_low_bound): Handle
15518 character-indexed array printing like boolean-indexed array
15519 printing.
15520
15521 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15522
15523 * NEWS: Create a new section for the next release branch.
15524 Rename the section of the current branch, now that it has
15525 been cut.
15526
15527 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15528
15529 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15530 * version.in: Bump version to 8.1.50.DATE-git.
15531
15532 2018-01-03 Xavier Roirand <roirand@adacore.com>
15533
15534 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15535 Add field.
15536 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15537 Add field.
15538 (default_exception_support_info) <catch_handlers_sym>: Add field.
15539 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15540 (ada_exception_name_addr_1): Add "catch handlers" handling.
15541 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15542 Update all callers.
15543 (create_excep_cond_exprs) <ex>: Add parameter.
15544 (re_set_exception): Update create_excep_cond_exprs call.
15545 (print_it_exception, print_one_exception, print_mention_exception)
15546 (print_recreate_exception): Add "catch handler" handling.
15547 (allocate_location_catch_handlers, re_set_catch_handlers)
15548 (check_status_catch_handlers, print_it_catch_handlers)
15549 (print_one_catch_handlers, print_mention_catch_handlers)
15550 (print_recreate_catch_handlers): New function.
15551 (catch_handlers_breakpoint_ops): New variable.
15552 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15553 Add parameter. Add "catch handler" handling.
15554 (ada_exception_sym_name, ada_exception_breakpoint_ops):
15555 Add "catch handler" handling.
15556 (ada_exception_catchpoint_cond_string): Add "catch handler"
15557 handling.
15558 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15559 call.
15560 (catch_ada_handlers_command): New function.
15561 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15562 operations structure.
15563 (_initialize_ada_language): Add "catch handlers" command entry.
15564 * NEWS: Document "catch handlers" feature.
15565
15566 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15567
15568 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15569 account when creating the array type of the slice.
15570 (ada_value_slice): Likewise.
15571
15572 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15573
15574 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15575 New enum value.
15576 (create_array_type_with_stride): Add byte_stride_prop parameter.
15577 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15578 New parameter. Update all callers in this file.
15579 (array_type_has_dynamic_stride): New function.
15580 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15581 of arrays with dynamic byte strides.
15582 * dwarf2read.c (read_array_type): Add support for dynamic
15583 DW_AT_byte_stride attributes.
15584
15585 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15586
15587 * dwarf2read.c (read_unspecified_type): Treat
15588 DW_TAG_enumeration_type DIEs from Ada units as stubs.
15589
15590 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15591
15592 Update copyright year range in all GDB files.
15593
15594 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
15595
15596 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15597 and gdb/testsuite/gdb.base/step-line.c.
15598
15599 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15600
15601 * copyright.py (main): Dump the contents of
15602 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15603 even if BY_HAND is empty.
15604
15605 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15606
15607 * top.c (print_gdb_version): Update Copyright year in version
15608 message.
15609
15610 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15611
15612 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15613
15614 For older changes see ChangeLog-2017.
15615 \f
15616 Local Variables:
15617 mode: change-log
15618 left-margin: 8
15619 fill-column: 74
15620 version-control: never
15621 coding: utf-8
15622 End:
This page took 0.61883 seconds and 4 git commands to generate.