Translate PyExc_KeyboardInterrupt to gdb "quit"
[binutils-gdb.git] / gdb / ChangeLog
1 2018-12-27 Tom Tromey <tom@tromey.com>
2
3 * python/py-utils.c (gdbpy_handle_exception): Translate
4 PyExc_KeyboardInterrupt to quit.
5
6 2018-12-27 Tom Tromey <tom@tromey.com>
7
8 * python/python-internal.h (gdbpy_print_stack_or_quit): Declare.
9 * python/py-unwind.c (pyuw_sniffer): Use
10 gdbpy_print_stack_or_quit.
11 * python/py-framefilter.c (throw_quit_or_print_exception):
12 Remove.
13 (gdbpy_apply_frame_filter): Use gdbpy_print_stack_or_quit.
14 * python/python.c (gdbpy_print_stack_or_quit): New function.
15
16 2018-12-27 Tom Tromey <tom@tromey.com>
17
18 * python/py-value.c (convert_value_from_python): Use
19 gdbpy_convert_exception.
20 * python/py-param.c (parmpy_init): Use gdbpy_convert_exception.
21 * python/py-cmd.c (cmdpy_init): Use gdbpy_convert_exception.
22 * python/py-breakpoint.c (bppy_init): Use
23 gdbpy_convert_exception.
24
25 2018-12-27 Tom Tromey <tom@tromey.com>
26
27 * configure.nat (NATDEPFILES): Use nat/ prefix.
28 * Makefile.in (CONFIG_SRC_SUBDIR): Add nat.
29 (%.o: ${srcdir}/nat/%.c): Remove rule.
30 (INIT_FILES): Do not filter out NATDEPFILES.
31
32 2018-12-27 Tom Tromey <tom@tromey.com>
33
34 * Makefile.in (INIT_FILES): Redefine.
35 (stamp-init): Remove sed, tr invocations. Use for loop. Don't
36 set LANG or LC_ALL.
37
38 2018-12-27 Tom Tromey <tom@tromey.com>
39
40 * Makefile.in (stamp-init): Remove gdbtypes special case.
41
42 2018-12-27 John Baldwin <jhb@FreeBSD.org>
43
44 * config/i386/nm-fbsd.h: Remove file.
45 * Makefile.in (HFILES_NO_SRCDIR): Remove config/i386/nm-fbsd.h.
46 * configure.nat: Remove NAT_FILE for FreeBSD/i386.
47
48 2018-12-27 Tom Tromey <tom@tromey.com>
49
50 * minsyms.h (class minimal_symbol_reader): Use
51 DISABLE_COPY_AND_ASSIGN.
52
53 2018-12-27 Tom Tromey <tom@tromey.com>
54
55 * python/python.c (python_interactive_command): Use std::string.
56 (gdbpy_parameter): Likewise.
57 * python/py-utils.c (unicode_to_encoded_string): Update comment.
58 * python/py-symtab.c (salpy_str): Use PyString_FromFormat.
59 * python/py-record-btrace.c (recpy_bt_insn_data): Use
60 byte_vector.
61 * python/py-objfile.c (objfpy_get_build_id): Use
62 unique_xmalloc_ptr.
63 * python/py-inferior.c (infpy_read_memory): Use
64 unique_xmalloc_ptr.
65 * python/py-cmd.c (gdbpy_parse_command_name): Use std::string.
66
67 2018-12-26 Simon Marchi <simon.marchi@polymtl.ca>
68
69 * target.c (target_terminal::restore_inferior): Remove struct keyword.
70
71 2018-12-26 Simon Marchi <simon.marchi@ericsson.com>
72
73 * build-id.c (build_id_to_debug_bfd): Enhance debug output.
74 * symfile.c (separate_debug_file_exists): Likewise.
75
76 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
77
78 * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
79 SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
80 names.
81 (typename_stoken): New function.
82
83 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
84
85 * c-exp.y (field_name): New %token, and new rule.
86 (exp): Replace uses of 'name' with 'field_name' where appropriate.
87
88 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
89
90 PR gdb/13368
91 * c-exp.y (typebase): Extend the comment.
92 (ident_tokens): Likewise.
93
94 2018-12-18 Tom Tromey <tom@tromey.com>
95
96 * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
97 address of sect_off.
98
99 2018-12-23 Joel Brobecker <brobecker@adacore.com>
100
101 GDB 8.2.1 released.
102
103 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
104
105 * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
106 assigning locations.
107 (riscv_return_value): Take more care not to read/write outside of
108 argument buffer. Cast return value between the declared type and
109 the abi type.
110
111 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
112
113 * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
114 fflags, and frm registers.
115
116 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
117
118 * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
119 (riscv_gdbarch_init): Register new function with gdbarch.
120 * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
121
122 2018-12-21 Simon Marchi <simon.marchi@ericsson.com>
123
124 * minsyms.c (mst_str): New.
125 (minimal_symbol_reader::record_full): Add debug output.
126
127 2018-12-21 John Baldwin <jhb@FreeBSD.org>
128
129 * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
130 equal PL_FLAG_SI.
131 (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
132
133 2018-12-21 Paul Marechal <paul.marechal@ericsson.com>
134
135 PR gdb/23974
136 * target.c (target_read_stralloc): Check for empty vector.
137
138 2018-12-21 Дилян Палаузов <dilyan.palauzov@aegee.org>
139
140 * top.c (print_gdb_configuration): Print "--without-python"
141 if GDB was configured without Python.
142
143 2018-12-21 Andrew Burgess <andrew.burgess@embecosm.com>
144
145 * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
146 a signed offset as a string.
147
148 2018-12-21 Dave Murphy <davem@devkitpro.org>
149
150 * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
151 initialise.
152 * probe.c (any_static_probe_ops): Ditto.
153 * record-btrace.c (record_btrace_thread_observer_token): Ditto.
154 * stap-probe.c (stap_static_probe_ops): Ditto.
155 * tui/tui-hooks.c (tui_observers_token): Ditto.
156 * unittests/observable-selftests.c (token1, token2, token3): Ditto.
157
158 2018-12-19 Andrew Burgess <andrew.burgess@embecosm.com>
159
160 * gdb/dummy-frame.c (default_dummy_id): Defined new function.
161 * gdb/dummy-frame.h (default_dummy_id): Declare new function.
162 * gdb/frame-unwind.c (default_unwind_pc): Define new function.
163 (default_unwind_sp): Define new function.
164 * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
165 (default_unwind_sp): Declare new function.
166 * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
167 available.
168 (get_frame_sp): Assume that gdbarch_unwind_sp is available.
169 * gdb/gdbarch.c: Regenerate.
170 * gdb/gdbarch.h: Regenerate.
171 * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
172 unwind_sp. Add additional header files to be included in
173 generated file.
174
175 2018-12-19 Dimitar Dimitrov <dimitar@dinux.eu>
176
177 * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
178 sp clobbers.
179
180 2018-12-17 Andrew Burgess <andrew.burgess@embecosm.com>
181
182 * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
183 'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
184 'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
185 'processing_has_namespace_info' from unsigned int to bool. Update
186 comments.
187 (producer_is_icc_lt_14): Update return type.
188 (producer_is_gcc_lt_4_3): Likewise.
189 (producer_is_gxx_lt_4_6): Likewise.
190 (process_die): Write true instead of 1 into predicate fields.
191 (dwarf2_start_symtab): Likewise.
192 (var_decode_location): Likewise.
193 (dwarf2_mark_helper): Likewise.
194 (dwarf2_mark): Likewise.
195 (dwarf2_clear_marks): Write false instead of 0 into predicate
196 field.
197 (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
198 0.
199
200 2018-12-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
201
202 * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
203 asm/sigcontext.h.
204
205 2018-12-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
206
207 * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
208 warning trailing new line.
209
210 2018-12-16 Philippe Waroquiers <philippe.waroquiers@skynet.be>
211
212 * nat/linux-ptrace.c (kill_child): New function.
213 (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
214 Add a call to kill_child in case of early return after fork.
215 (linux_check_ptrace_features): Use kill_child instead of local code.
216 (linux_test_for_tracefork): Likewise.
217
218 2018-12-14 Tom Tromey <tom@tromey.com>
219
220 * Makefile.in: Remove "alloca" comment.
221 (INFOFILES): Remove.
222 (local-maintainer-clean): Don't use INFOFILES.
223
224 2018-12-13 John Baldwin <jhb@FreeBSD.org>
225
226 * syscalls/update-freebsd.sh: New file.
227 * syscalls/freebsd.xml: Regenerate.
228
229 2018-12-13 John Baldwin <jhb@FreeBSD.org>
230
231 * NEWS: Add entry documenting system call aliases.
232 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
233 to get_syscalls_by_name.
234 * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
235 * gdbarch.h: Regenerate.
236 * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
237 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
238 from get_syscall_by_name. Now accepts a pointer to a vector of
239 integers and returns a bool.
240 [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
241 (syscall_create_syscall_desc): Add alias parameter and pass it to
242 syscall_desc constructor.
243 (syscall_start_syscall): Handle alias attribute.
244 (syscall_attr): Add alias attribute.
245 (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
246 Now accepts a pointer to a vector of integers and returns a
247 bool. Add syscalls whose alias or name matches the requested
248 name.
249 (get_syscalls_by_name): Rename from get_syscall_by_name. Now
250 accepts a pointer to a vector of integers and returns a bool.
251 * xml-syscall.h (get_syscalls_by_name): Likewise.
252
253 2018-12-13 John Baldwin <jhb@FreeBSD.org>
254
255 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
256 to get_syscalls_by_group.
257 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
258 false.
259 [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
260 numbers to an existing vector of integers and return a bool.
261 (get_syscalls_by_group): Accept pointer to vector of integers
262 and change return type to bool.
263 * xml-syscall.h (get_syscalls_by_group): Likewise.
264
265 2018-12-13 Jim Wilson <jimw@sifive.com>
266
267 * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
268 comment for SD field, and correct xlen calculation. For MISA, add
269 comment for MXL field, add call to register_size, and correct base
270 calculation.
271
272 2018-12-13 Stafford Horne <shorne@gmail.com>
273
274 * NEWS(New targets): Add or1k*-*-linux*.
275
276 2018-12-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
277
278 * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
279 declare on one line to fix ARI warning.
280
281 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
282
283 * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
284 (infcall_suspend_state::registers): New.
285 (infcall_suspend_state::restore): New.
286 (infcall_suspend_state::thread_suspend): Rename to...
287 (infcall_suspend_state::m_thread_suspend): ...this.
288 (infcall_suspend_state::registers): Rename to...
289 (infcall_suspend_state::m_registers): ...this.
290 (infcall_suspend_state::siginfo_gdbarch): Rename to...
291 (infcall_suspend_state::m_siginfo_gdbarch): ...this.
292 (infcall_suspend_state::siginfo_data): Rename to...
293 (infcall_suspend_state::m_siginfo_data): ...this.
294 (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
295 constructor.
296 (restore_infcall_suspend_state): Rewrite to use
297 infcall_suspend_state::restore method.
298 (get_infcall_suspend_state_regcache): Use
299 infcall_suspend_state::registers method.
300
301 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
302
303 * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
304 arguments are passed in integer registers.
305 (riscv_call_arg_complex_float): Likewise.
306
307 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
308
309 * nat/linux-osdata.c (common_getter): New function.
310 (struct osdata_type): Change getter to take_snapshot.
311 Add LONGEST len_avail and struct buffer buffer.
312 Change all elements in the initializer.
313 Add an element for the list of types.
314 (linux_xfer_osdata_info_os_types): New function.
315 (linux_common_xfer_osdata): Use common_getter for the list of types.
316 Replace getter call by common_getter.
317 (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
318 Add arg BUFFER. Only keep the code that adds data in BUFFER.
319 (linux_xfer_osdata_fds): Likewise.
320 (linux_xfer_osdata_modules): Likewise.
321 (linux_xfer_osdata_msg): Likewise.
322 (linux_xfer_osdata_processes): Likewise.
323 (linux_xfer_osdata_processgroups): Likewise.
324 (linux_xfer_osdata_sem): Likewise.
325 (linux_xfer_osdata_shm): Likewise.
326 (linux_xfer_osdata_isockets): Likewise.
327 (linux_xfer_osdata_threads): Likewise.
328
329 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
330
331 * nat/linux-osdata.c: Removed various trailing spaces.
332
333 2018-12-10 Andrew Burgess <andrew.burgess@embecosm.com>
334
335 * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
336 leading whitespace before #include line.
337
338 2018-12-08 Simon Marchi <simon.marchi@ericsson.com>
339 Дилян Палаузов <dilyan.palauzov@aegee.org>
340
341 PR gdb/23950
342 * configure.ac: Search for tgetent in libtinfow.
343 * configure: Re-generate.
344
345 2018-12-08 Philippe Waroquiers <philippe.waroquiers@skynet.be>
346
347 * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
348 (thread_db_err_str): Forward declare.
349 (delete_thread_db_info): Call td_ta_delete_p if available.
350 (try_thread_db_load_1): Acquire td_ta_delete address.
351 * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
352
353 2018-12-08 Pedro Alves <palves@redhat.com>
354
355 * source.c (forward_search_command): Rename to ...
356 (search_command_helper): ... this. Add 'forward' parameter.
357 Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
358 buffer. Handle backward searches too.
359 (forward_search_command, reverse_search_command): Reimplement by
360 calling search_command_helper.
361
362 2018-12-07 Andrew Burgess <andrew.burgess@embecosm.com>
363
364 * .dir-locals.el: Copy most of the settings from c-mode over to
365 c++-mode.
366
367 2018-12-08 Stafford Horne <shorne@gmail.com>
368
369 * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
370 * configure.tgt: Add or1k*-*-linux*.
371 * or1k-linux-tdep.c: New file.
372 * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
373
374 2018-12-07 Pedro Alves <palves@redhat.com>
375
376 * dwarf2read.c (get_gdb_index_contents_from_section): Use
377 gdb::make_array_view.
378
379 2018-12-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
380
381 * language.c (_initialize_language): Fix leak by assigning
382 a static string to language. Same for range and case_sensitive,
383 even if no leak is detected for these variables.
384
385 2018-12-05 John Baldwin <jhb@FreeBSD.org>
386
387 * configure: Re-generate.
388 * configure.ac: Use separate sed expressions to escape variables
389 in auto-load directories.
390
391 2018-12-05 Andrew Burgess <andrew.burgess@embecosm.com>
392
393 * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
394 (riscv_find_default_target_description): Use new function to
395 extract feature from gdbarch_info.
396 (riscv_gdbarch_init): Add error checks for xlen and flen between
397 target description and bfd headers. Be smarter about when we
398 think the hardware floating point abi should be used.
399
400 2018-12-05 Alan Hayward <alan.hayward@arm.com>
401
402 * nat/aarch64-linux-hw-point.c
403 (aarch64_linux_any_set_debug_regs_state): New function.
404 * nat/aarch64-linux-hw-point.h
405 (aarch64_linux_any_set_debug_regs_state): New declaration.
406 * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
407 BPs or WPs are set.
408
409 2018-11-30 John Baldwin <jhb@FreeBSD.org>
410
411 * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
412 (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
413
414 2018-11-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
415 Simon Marchi <simon.marchi@ericsson.com>
416
417 * linespec.c (symtab_vector_up): Remove.
418 (symtabs_from_filename): Change return type to std::vector.
419 (collect_symtabs_from_filename): Likewise.
420 (create_sals_line_offset): Assign return value of
421 collect_symtabs_from_filename to *ls->file_symtabs.
422 (convert_explicit_location_to_linespec): Remove call to release.
423 (parse_linespec): Likewise.
424 (symtab_collector) <symtab_collector>: Remove initialization of
425 m_symtabs.
426 <release_symtabs>: Change return type to std::vector<symtab *>.
427 <operator ()>: Adjust.
428
429 2018-11-30 John Baldwin <jhb@FreeBSD.org>
430
431 * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
432 defined.
433 (union sigval32, struct siginfo32, fbsd_siginfo_size)
434 (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
435 of KERN_PROC_AUXV and PT_LWPINFO.
436 (fbsd_nat_target::xfer_partial): Define method unconditionally.
437 Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
438 Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
439 Make TARGET_OBJECT_FREEBSD_VMMAP and
440 TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
441 and KERN_PROC_PS_STRINGS.
442 * fbsd-nat.h: Include <sys/proc.h>.
443 (fbsd_nat_target::xfer_partial): Declare method unconditionally.
444
445 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
446
447 * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
448 header files.
449 (riscv_linux_nat_target::read_description): New method.
450
451 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
452
453 * arch/riscv.h (riscv_gdbarch_features::hash): New method.
454 * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
455 (riscv_tdesc_cache): New global.
456 (riscv_create_target_description): Look in the cache before
457 creating a new target description.
458
459 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
460
461 * arch/riscv.h (riscv_gdb_features::operator==): New.
462 (riscv_gdb_features::operator!=): New.
463 * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
464 operator.
465
466 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
467
468 * arch/riscv.h (riscv_create_target_description): Make return type
469 const.
470 * arch/riscv.c (riscv_create_target_description): Likewise.
471 * riscv-tdep.c (riscv_find_default_target_description): Likewise.
472
473 2018-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
474 Keith Seitz <keiths@redhat.com>
475 Tom Tromey <tom@tromey.com>
476 Sergio Durigan Junior <sergiodj@redhat.com>
477
478 https://bugzilla.redhat.com/show_bug.cgi?id=1613614
479 * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
480 'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
481 inside the CU.
482
483 2018-11-30 Pedro Alves <palves@redhat.com>
484
485 * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
486 <stratum>: New override.
487 * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
488 <stratum>: New override.
489 * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
490 <stratum>: New override.
491 * exec.c (exec_target) <exec_target>: Delete.
492 <stratum>: New override.
493 * gdbarch-selftests.c (register_to_value_test): Adjust to use the
494 stratum method instead of the to_stratum field.
495 * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
496 <stratum>: New override.
497 (thread_db_target::thread_db_target): Delete.
498 * make-target-delegates (print_class): Don't print a ctor
499 declaration. Print a stratum method override declaration.
500 * process-stratum-target.h (process_stratum_target)
501 <process_stratum_target>: Delete.
502 <stratum>: New override.
503 * ravenscar-thread.c (ravenscar_thread_target)
504 <ravenscar_thread_target>: Delete.
505 <stratum>: New override.
506 * record-btrace.c (record_btrace_target)
507 <record_btrace_target>: Delete.
508 <stratum>: New override.
509 * record-full.c (record_full_base_target)
510 <record_full_base_target>: Delete.
511 <stratum>: New override.
512 * record.c (record_disconnect, record_detach)
513 (record_mourn_inferior, record_kill): Adjust to use the stratum
514 method instead of the to_stratum field.
515 * regcache.c (cooked_read_test, cooked_write_test): Likewise.
516 * sol-thread.c (sol_thread_target)
517 <sol_thread_target>: Delete.
518 <stratum>: New override.
519 * spu-multiarch.c (spu_multiarch_target)
520 <spu_multiarch_target>: Delete.
521 <stratum>: New override.
522 * target-delegates.c: Regenerate.
523 * target.c (target_stack::push, target_stack::unpush)
524 (pop_all_targets_above, pop_all_targets_at_and_above)
525 (info_target_command, target_require_runnable)
526 (target_stack::find_beneath): Adjust to use the stratum method
527 instead of the to_stratum field.
528 (dummy_target::dummy_target): Delete.
529 (dummy_target::stratum): New.
530 (debug_target::debug_target): Delete.
531 (debug_target::stratum): New.
532 (maintenance_print_target_stack): Adjust to use the stratum method
533 instead of the to_stratum field.
534 * target.h (struct target_ops) <stratum>: New method.
535 <to_stratum>: Delete.
536 <is_pushed>: Adjust to use the stratum method
537 instead of the to_stratum field.
538
539 2018-11-30 Pedro Alves <palves@redhat.com>
540
541 * corelow.c (core_target) <has_all_memory, has_execution>: New
542 overrides.
543 * inf-child.c (inf_child_target::has_all_memory)
544 (inf_child_target::has_memory, inf_child_target::has_stack)
545 (inf_child_target::has_registers)
546 (inf_child_target::has_execution): Delete.
547 * inf-child.h (inf_child_target) <has_all_memory, has_memory,
548 has_stack, has_registers, has_execution>: Delete.
549 * process-stratum-target.c
550 (process_stratum_target::has_all_memory)
551 (process_stratum_target::has_memory)
552 (process_stratum_target::has_stack)
553 (process_stratum_target::has_registers)
554 (process_stratum_target::has_execution): New.
555 * process-stratum-target.h (process_stratum_target)
556 <has_all_memory, has_memory, has_stack, has_registers,
557 has_execution>: New method overrides.
558 * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
559 has_memory, has_stack, has_registers, has_execution>: Delete.
560 * remote-sim.c (gdbsim_target) <has_stack, has_registers,
561 has_execution>: Delete.
562 * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
563 has_registers, has_execution>: Delete.
564 * target.c (default_child_has_all_memory)
565 (default_child_has_memory, default_child_has_stack)
566 (default_child_has_registers, default_child_has_execution):
567 Delete.
568 * target.h (default_child_has_all_memory)
569 (default_child_has_memory, default_child_has_stack)
570 (default_child_has_registers, default_child_has_execution):
571 Delete.
572 * tracefile.h (tracefile_target) <has_execution>: New override.
573
574 2018-11-30 Pedro Alves <palves@redhat.com>
575
576 * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
577 * bsd-kvm.c: Include "process-stratum-target.h".
578 (bsd_kvm_target): Now inherits from process_stratum_target.
579 (bsd_kvm_target::bsd_kvm_target): Default it.
580 * corelow.c: Include "process-stratum-target.h".
581 (core_target): Now inherits from process_stratum_target.
582 (core_target::core_target): Don't set to_stratum here.
583 * inf-child.c (inf_child_target::inf_child_target): Delete.
584 * inf-child.h: Include "process-stratum-target.h".
585 (inf_child_target): Inherit from process_stratum_target.
586 (inf_child_target) <inf_child_target>: Default it.
587 <can_async_p, supports_non_stop, supports_disable_randomization>:
588 Delete overrides.
589 * process-stratum-target.c: New file.
590 * process-stratum-target.h: New file.
591 * remote-sim.c: Include "process-stratum-target.h".
592 (gdbsim_target): Inherit from process_stratum_target.
593 <gdbsim_target>: Default it.
594 * remote.c: Include "process-stratum-target.h".
595 (remote_target): Inherit from process_stratum_target.
596 <remote_target>: Default it.
597 * target.c (default_thread_address_space)
598 (default_thread_architecture): Delete.
599 * target.h (target_ops) <thread_architecture>: Now returns NULL by
600 default.
601 <thread_address_space>: Ditto.
602 * test-target.h: Include "process-stratum-target.h" instead of
603 "target.h".
604 (test_target_ops): Inherit from process_stratum_target.
605 <test_target_ops>: Default it.
606 * tracefile.c (tracefile_target::tracefile_target): Delete.
607 * tracefile.h: Include "process-stratum-target.h".
608 (tracefile_target): Inherit from process_stratum_target.
609 <tracefile_target>: Default it.
610 * target-delegates.c: Regenerate.
611
612 2018-11-30 Pedro Alves <palves@redhat.com>
613
614 * Makefile.in (COMMON_SFILES): Add test-target.c.
615 * gdbarch-selftests.c: Include "test-target.h".
616 * regcache.c: Include "test-target.h".
617 * target.c (test_target_info, test_target_ops::info): Move to ...
618 * test-target.c: ... this new file.
619 * target.h (test_target_ops): Move to ...
620 * test-target.h: ... this new file.
621
622 2018-11-29 Philippe Waroquiers <philippe.waroquiers@skynet.be>
623
624 * source.c (forward_search_command): Fix leak by using
625 xrealloc even for the first allocation in the loop, as buf
626 is static.
627
628 2018-11-29 Rajendra SY <rajendra.sy@gmail.com>
629
630 PR gdb/23093
631 * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
632 (fbsd_gdb_signal_to_target): New.
633 (fbsd_init_abi): Install gdbarch "signal_from_target" and
634 "signal_to_target" methods.
635
636 2018-11-29 Tom Tromey <tom@tromey.com>
637
638 * valarith.c (value_x_unop): Don't set argvec[3].
639
640 2018-11-26 Simon Marchi <simon.marchi@ericsson.com>
641
642 PR gdb/23917
643 * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
644 semicolon.
645
646 2018-11-26 Pedro Alves <palves@redhat.com>
647
648 * procfs.c (procfs_notice_thread): Replace uses of
649 in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
650 * sol-thread.c (sol_thread_target::wait)
651 (sol_update_thread_list_callback): Likewise.
652
653 2018-11-25 Tom Tromey <tom@tromey.com>
654
655 * ui-out.c (ui_out::field_fmt): Remove comment.
656 * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
657 * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
658
659 2018-11-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
660
661 * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
662 leak in open_source_file' has been partially undone by '2179fbc36d23
663 Return scoped_fd from open_source_file'. Re-add the transfer of
664 current s->fullname to the unique_xmalloc_ptr fullname given
665 to find_and_open_source.
666
667 2018-11-23 Pedro Alves <palves@redhat.com>
668
669 * gdbthread.h (enum thread_state): Move comments here.
670 (is_running, is_stopped, is_exited): Remove declarations.
671
672 2018-11-22 Pedro Alves <palves@redhat.com>
673
674 * Makefile.in (COMMON_SFILES): Add thread-iter.c.
675 * breakpoint.c (breakpoints_should_be_inserted_now): Replace
676 ALL_NON_EXITED_THREADS with all_non_exited_threads.
677 (print_one_breakpoint_location): Replace ALL_INFERIORS with
678 all_inferiors.
679 * bsd-kvm.c: Include inferior.h.
680 * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
681 with all_non_exited_threads.
682 * common/filtered-iterator.h: New.
683 * common/safe-iterator.h: New.
684 * corelow.c (core_target_open): Don't call init_thread_list here.
685 * darwin-nat.c (thread_info_from_private_thread_info): Replace
686 ALL_THREADS with all_threads.
687 * fbsd-nat.c (fbsd_nat_target::resume): Replace
688 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
689 * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
690 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
691 * fork-child.c (postfork_hook): Don't call init_thread_list here.
692 * gdbarch-selftests.c (register_to_value_test): Adjust.
693 * gdbthread.h: Don't include "inferior.h" here.
694 (struct inferior): Forward declare.
695 (enum step_over_calls_kind): Moved here from inferior.h.
696 (thread_info::deletable): Definition moved to thread.c.
697 (find_thread_ptid (inferior *, ptid_t)): Declare.
698 (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
699 Include "thread-iter.h".
700 (all_threads, all_non_exited_threads, all_threads_safe): New.
701 (any_thread_p): Declare.
702 (thread_list): Delete.
703 * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
704 all_non_exited_threads.
705 (proceed_after_attach_callback): Delete.
706 (proceed_after_attach): Take an inferior pointer instead of an
707 integer PID. Adjust to use range-for.
708 (attach_post_wait): Pass down inferior pointer instead of pid.
709 Use range-for instead of ALL_NON_EXITED_THREADS.
710 (detach_command): Remove init_thread_list call.
711 * inferior-iter.h: New.
712 * inferior.c (struct delete_thread_of_inferior_arg): Delete.
713 (delete_thread_of_inferior): Delete.
714 (delete_inferior, exit_inferior_1): Use range-for with
715 inf->threads_safe() instead of iterate_over_threads.
716 (inferior_appeared): Call init_thread_list here.
717 (discard_all_inferiors): Use all_non_exited_inferiors.
718 (find_inferior_id, find_inferior_pid): Use all_inferiors.
719 (iterate_over_inferiors): Use all_inferiors_safe.
720 (have_inferiors, number_of_live_inferiors): Use
721 all_non_exited_inferiors.
722 (number_of_inferiors): Use all_inferiors and std::distance.
723 (print_inferior): Use all_inferiors.
724 * inferior.h: Include gdbthread.h.
725 (enum step_over_calls_kind): Moved to gdbthread.h.
726 (struct inferior) <thread_list>: New field.
727 <threads, non_exited_threads, threads_safe>: New methods.
728 (ALL_INFERIORS): Delete.
729 Include "inferior-iter.h".
730 (ALL_NON_EXITED_INFERIORS): Delete.
731 (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
732 functions.
733 * inflow.c (child_interrupt, child_pass_ctrlc): Replace
734 ALL_NON_EXITED_THREADS with all_non_exited_threads.
735 * infrun.c (follow_exec): Use all_threads_safe.
736 (clear_proceed_status, proceed): Use all_non_exited_threads.
737 (init_wait_for_inferior): Don't clear inline frame state here.
738 (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
739 all_threads instead of ALL_NON_EXITED_THREADS.
740 (random_pending_event_thread): Use all_non_exited_threads instead
741 of ALL_NON_EXITED_THREADS. Use a lambda for repeated code.
742 (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
743 instead of ALL_NON_EXITED_THREADS.
744 (handle_no_resumed): Use all_non_exited_threads instead of
745 ALL_NON_EXITED_THREADS. Use all_inferiors instead of
746 ALL_INFERIORS.
747 (restart_threads, switch_back_to_stepped_thread): Use
748 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
749 * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
750 all_inferiors.
751 (kill_unfollowed_fork_children): Use inf->non_exited_threads
752 instead of ALL_NON_EXITED_THREADS.
753 * linux-tdep.c (linux_make_corefile_notes): Use
754 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
755 * linux-thread-db.c (thread_db_target::update_thread_list):
756 Replace ALL_INFERIORS with all_inferiors.
757 (thread_db_target::thread_handle_to_thread_info): Use
758 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
759 * mi/mi-interp.c (multiple_inferiors_p): New.
760 (mi_on_resume_1): Simplify using all_non_exited_threads and
761 multiple_inferiors_p.
762 * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
763 instead of ALL_NON_EXITED_THREADS.
764 * nto-procfs.c (nto_procfs_target::open): Don't call
765 init_thread_list here.
766 * record-btrace.c (record_btrace_target_open)
767 (record_btrace_target::stop_recording)
768 (record_btrace_target::close)
769 (record_btrace_target::record_is_replaying)
770 (record_btrace_target::resume, record_btrace_target::wait)
771 (record_btrace_target::record_stop_replaying): Use
772 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
773 * record-full.c (record_full_wait_1): Use all_non_exited_threads
774 instead of ALL_NON_EXITED_THREADS.
775 * regcache.c (cooked_read_test): Remove reference to global
776 thread_list.
777 * remote-sim.c (gdbsim_target::create_inferior): Don't call
778 init_thread_list here.
779 * remote.c (remote_target::update_thread_list): Use
780 all_threads_safe instead of ALL_NON_EXITED_THREADS.
781 (remote_target::process_initial_stop_replies): Replace
782 ALL_INFERIORS with all_non_exited_inferiors and use
783 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
784 (remote_target::open_1): Don't call init_thread_list here.
785 (remote_target::append_pending_thread_resumptions)
786 (remote_target::remote_resume_with_hc): Use all_non_exited_threads
787 instead of ALL_NON_EXITED_THREADS.
788 (remote_target::commit_resume)
789 (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
790 with all_non_exited_inferiors and use all_non_exited_threads
791 instead of ALL_NON_EXITED_THREADS.
792 (remote_target::kill_new_fork_children): Use
793 all_non_exited_threads instead of ALL_NON_EXITED_THREADS. Remove
794 init_thread_list and init_wait_for_inferior calls.
795 (remote_target::remote_btrace_maybe_reopen)
796 (remote_target::thread_handle_to_thread_info): Use
797 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
798 * target.c (target_terminal::restore_inferior)
799 (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
800 all_non_exited_inferiors.
801 * thread-iter.c: New file.
802 * thread-iter.h: New file.
803 * thread.c: Include "inline-frame.h".
804 (thread_list): Delete.
805 (clear_thread_inferior_resources): Call clear_inline_frame_state.
806 (init_thread_list): Use all_threads_safe instead of
807 ALL_THREADS_SAFE. Adjust to per-inferior thread lists.
808 (new_thread): Adjust to per-inferior thread lists.
809 (add_thread_silent): Pass inferior to find_thread_ptid.
810 (thread_info::deletable): New, moved from the header.
811 (delete_thread_1): Adjust to per-inferior thread lists.
812 (find_thread_global_id): Use inf->threads().
813 (find_thread_ptid): Use find_inferior_ptid and pass inferior to
814 find_thread_ptid.
815 (find_thread_ptid(inferior*, ptid_t)): New overload.
816 (iterate_over_threads): Use all_threads_safe.
817 (any_thread_p): New.
818 (thread_count): Use all_threads and std::distance.
819 (live_threads_count): Use all_non_exited_threads and
820 std::distance.
821 (valid_global_thread_id): Use all_threads.
822 (in_thread_list): Use find_thread_ptid.
823 (first_thread_of_inferior): Adjust to per-inferior thread lists.
824 (any_thread_of_inferior, any_live_thread_of_inferior): Use
825 inf->non_exited_threads().
826 (prune_threads, delete_exited_threads): Use all_threads_safe.
827 (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
828 (set_resumed, set_running): Use all_non_exited_threads.
829 (is_thread_state, is_stopped, is_exited, is_running)
830 (is_executing): Delete.
831 (set_executing, set_stop_requested, finish_thread_state): Use
832 all_non_exited_threads.
833 (print_thread_info_1): Use all_inferiors and all_threads.
834 (thread_apply_all_command): Use all_non_exited_threads.
835 (thread_find_command): Use all_threads.
836 (update_threads_executing): Use all_non_exited_threads.
837 * tid-parse.c (parse_thread_id): Use inf->threads.
838 * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
839
840 2018-11-22 Pedro Alves <palves@redhat.com>
841
842 * infrun.c (follow_exec) <set follow-exec new>: Add thread and
843 switch to it before calling into try_open_exec_file.
844
845 2018-11-22 Pedro Alves <palves@redhat.com>
846
847 * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
848 inferior_thread instead of find_thread_ptid, and only when
849 inferior_ptid is not null_ptid.
850 * inferior.c (add_inferior): Don't include target_pid_to_str
851 output when the inferior is not started.
852 * python/py-inferior.c (python_on_normal_stop): Don't use
853 find_thread_ptid.
854 (tui_on_user_selected_context_changed): Use inferior_thread
855 instead of find_thread_ptid, and only when inferior_ptid is not
856 null_ptid.
857
858 2018-11-21 Benno Fünfstück <benno.fuenfstueck@gmail.com>
859
860 PR python/23714
861 * gdb/python/python.c (execute_gdb_command): Call
862 prevent_dont_repeat earlier to avoid affecting dont_repeat.
863
864 2018-11-21 Andrew Burgess <andrew.burgess@embecosm.com>
865
866 * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
867 (HFILES_NO_SRCDIR): Add arch/riscv.h.
868 * arch/riscv.c: New file.
869 * arch/riscv.h: New file.
870 * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
871 this list, and add arch/riscv.o.
872 * features/Makefile: Add riscv features.
873 * features/riscv/32bit-cpu.c: New file.
874 * features/riscv/32bit-cpu.xml: New file.
875 * features/riscv/32bit-csr.c: New file.
876 * features/riscv/32bit-csr.xml: New file.
877 * features/riscv/32bit-fpu.c: New file.
878 * features/riscv/32bit-fpu.xml: New file.
879 * features/riscv/64bit-cpu.c: New file.
880 * features/riscv/64bit-cpu.xml: New file.
881 * features/riscv/64bit-csr.c: New file.
882 * features/riscv/64bit-csr.xml: New file.
883 * features/riscv/64bit-fpu.c: New file.
884 * features/riscv/64bit-fpu.xml: New file.
885 * features/riscv/rebuild-csr-xml.sh: New file.
886 * riscv-tdep.c: Add 'arch/riscv.h' include.
887 (riscv_gdb_reg_names): Delete.
888 (csr_reggroup): New global.
889 (struct riscv_register_alias): Delete.
890 (struct riscv_register_feature): New structure.
891 (riscv_register_aliases): Delete.
892 (riscv_xreg_feature): New global.
893 (riscv_freg_feature): New global.
894 (riscv_virtual_feature): New global.
895 (riscv_csr_feature): New global.
896 (riscv_create_csr_aliases): New function.
897 (riscv_read_misa_reg): Delete.
898 (riscv_has_feature): Delete.
899 (riscv_isa_xlen): Simplify, just return cached xlen.
900 (riscv_isa_flen): Simplify, just return cached flen.
901 (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
902 (riscv_register_name): Update to make use of tdesc_register_name.
903 Look up xreg and freg names in the new globals riscv_xreg_feature
904 and riscv_freg_feature. Don't supply csr aliases here.
905 (riscv_fpreg_q_type): Delete.
906 (riscv_register_type): Use tdesc_register_type in almost all
907 cases, override the returned type in a few specific cases only.
908 (riscv_print_one_register_info): Handle errors reading registers.
909 (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
910 registers that are otherwise unknown to GDB. Also check the
911 csr_reggroup.
912 (riscv_print_registers_info): Remove assert about upper register
913 number, and use gdbarch_register_reggroup_p instead of
914 short-cutting.
915 (riscv_find_default_target_description): New function.
916 (riscv_check_tdesc_feature): New function.
917 (riscv_add_reggroups): New function.
918 (riscv_setup_register_aliases): New function.
919 (riscv_init_reggroups): New function.
920 (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
921 setup register groups. Register new riscv debug variable.
922 * riscv-tdep.h: Add 'arch/riscv.h' include.
923 (struct gdbarch_tdep): Remove abi union, and add
924 riscv_gdbarch_features field. Remove cached quad floating point
925 type, and provide initialisation for double type field.
926 * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
927 the list of targets using the feature based target descriptions.
928 * NEWS: Mention target description support.
929
930 2018-11-21 Pedro Alves <palves@redhat.com>
931
932 * valops.c (find_method_list, value_find_oload_method_list)
933 (find_overload_match, find_oload_champ): Rename parameters and
934 locals.
935
936 2018-11-21 Pedro Alves <palves@redhat.com>
937
938 * valops.c (find_method_list): Replace pointer and length
939 parameters with an gdb::array_view. Adjust.
940 (value_find_oload_method_list): Likewise.
941 (find_overload_match): Use gdb::array_view for methods list.
942 Adjust to find_oload_champ interface change.
943 (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
944 'num_fns' parameter now a size_t. Eliminate 'fn_count' local.
945
946 2018-11-21 Pedro Alves <palves@redhat.com>
947
948 * gdbtypes.c (compare_badness): Change type of parameters to const
949 reference. Adjust to badness_vector being a std::vector now.
950 (rank_function): Adjust to badness_vector being a std::vector now.
951 * gdbtypes.h (badness_vector): Now a typedef to std::vector.
952 (LENGTH_MATCH): Delete.
953 (compare_badness): Change type of parameters to const reference.
954 (rank_function): Return a badness_vector by value now.
955 (find_overload_match): Adjust to badness_vector being a
956 std::vector now. Remove cleanups.
957 (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
958 badness_vector pointer.
959 (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
960 a badness_vector pointer. Adjust to badness_vector being a
961 std::vector now. Remove cleanups.
962 (find_oload_champ): 'oload_champ_bv' parameter now
963 a badness_vector pointer. Adjust to badness_vector being a
964 std::vector now. Remove cleanups.
965
966 2018-11-21 Pedro Alves <palves@redhat.com>
967
968 * cp-support.c (sym_return_val_size, sym_return_val_index)
969 (sym_return_val): Delete.
970 (overload_list_add_symbol): Add std::vector parameter. Adjust to
971 add to the vector.
972 (make_symbol_overload_list): Adjust to return a std::vector
973 instead of maintaining a global open coded vector.
974 (make_symbol_overload_list_block): Add std::vector parameter.
975 (make_symbol_overload_list_block): Rename to ...
976 (add_symbol_overload_list_block): ... this and add std::vector
977 parameter.
978 (make_symbol_overload_list_namespace): Rename to ...
979 (add_symbol_overload_list_namespace): ... this and add std::vector
980 parameter.
981 (make_symbol_overload_list_adl_namespace): Rename to ...
982 (add_symbol_overload_list_adl_namespace): ... this and add
983 std::vector parameter.
984 (make_symbol_overload_list_adl): Delete.
985 (add_symbol_overload_list_adl): New.
986 (make_symbol_overload_list_using): Rename to ...
987 (add_symbol_overload_list_using): ... this and add std::vector
988 parameter.
989 (make_symbol_overload_list_qualified): Rename to ...
990 (add_symbol_overload_list_qualified): ... this and add std::vector
991 parameter.
992 * cp-support.h: Include "common/array-view.h" and <vector>.
993 (make_symbol_overload_list): Change return type to std::vector.
994 (make_symbol_overload_list_adl): Delete declaration.
995 (add_symbol_overload_list_adl): New declaration.
996 * valops.c (find_overload_match): Local 'oload_syms' now a
997 std::vector.
998 (find_oload_champ_namespace): 'oload_syms' parameter now a
999 std::vector pointer.
1000 (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
1001 std::vector pointer. Adjust to new make_symbol_overload_list
1002 interface.
1003
1004 2018-11-21 Pedro Alves <palves@redhat.com>
1005
1006 * common/array-view.h (array_view::splice(size_type, size_t)): New.
1007 (array_view::splice(size_type)): New.
1008 * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
1009 * extension.c (xmethod_worker::get_arg_types): Adjust to return an
1010 std::vector.
1011 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
1012 * extension.h: Include "common/array-view.h".
1013 (xmethod_worker::invoke): Adjust to use gdb::array_view.
1014 (xmethod_worker::get_arg_types): Adjust to return an std::vector.
1015 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
1016 (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
1017 (xmethod_worker::do_get_result_type): Adjust to use
1018 gdb::array_view.
1019 * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
1020 * gdbtypes.h: Include "common/array-view.h".
1021 (rank_function): Adjust to use gdb::array_view.
1022 * python/py-xmethods.c (python_xmethod_worker::invoke)
1023 (python_xmethod_worker::do_get_arg_types)
1024 (python_xmethod_worker::do_get_result_type)
1025 (python_xmethod_worker::invoke): Adjust to new interfaces.
1026 * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
1027 (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
1028 * valops.c (find_overload_match, find_oload_champ_namespace)
1029 (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
1030 gdb:array_view and the new xmethod_worker interfaces.
1031 * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
1032 gdb::array_view.
1033 * value.h (find_overload_match, result_type_of_xmethod)
1034 (call_xmethod): Adjust to use gdb::array_view.
1035 * unittests/array-view-selftests.c: Add slicing tests.
1036
1037 2018-11-21 Pedro Alves <palves@redhat.com>
1038
1039 * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
1040 * common/array-view.h (make_array_view): New.
1041 * compile/compile-object-run.c (compile_object_run): Adjust to
1042 pass an array_view.
1043 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
1044 * eval.c (eval_call): Adjust to pass an array_view.
1045 (evaluate_subexp_standard): Adjust to pass an array_view.
1046 * gcore.c (call_target_sbrk): Adjust to pass an array_view.
1047 * guile/scm-value.c (gdbscm_value_call): Likewise.
1048 * infcall.c (push_dummy_code): Replace pointer + size parameters
1049 with an array_view parameter.
1050 (call_function_by_hand, call_function_by_hand_dummy): Likewise and
1051 adjust.
1052 * infcall.h: Include "common/array-view.h".
1053 (call_function_by_hand, call_function_by_hand_dummy): Replace
1054 pointer + size parameters with an array_view parameter.
1055 * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
1056 * linux-tdep.c (linux_infcall_mmap): Likewise.
1057 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1058 (value_nsstring, print_object_command): Likewise.
1059 * python/py-value.c (valpy_call): Likewise.
1060 * rust-lang.c (rust_evaluate_funcall): Likewise.
1061 * spu-tdep.c (flush_ea_cache): Likewise.
1062 * valarith.c (value_x_binop, value_x_unop): Likewise.
1063 * valops.c (value_allocate_space_in_inferior): Likewise.
1064 * unittests/array-view-selftests.c (run_tests): Add
1065 gdb::make_array_view test.
1066
1067 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
1068
1069 * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
1070 than a fixed size buffer.
1071
1072 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
1073
1074 * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1075 and remove insertion of extra spaces in GDB's output.
1076 * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1077 Layout field into a temporary buffer, and then output it as a
1078 string field.
1079
1080 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1081
1082 * NEWS: Document the language choice done by
1083 'info [types|functions|variables]|rbreak'.
1084
1085 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1086
1087 * symtab.c (treg_matches_sym_type_name): Use
1088 scoped_switch_to_sym_language_if_auto instead of local logic.
1089 (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1090 to switch to SYM language when language mode is auto.
1091
1092 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1093
1094 * language.h (scoped_switch_to_sym_language_if_auto): New class.
1095
1096 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1097
1098 * symtab.c (search_symbols): Properly check absence of type regexp
1099 before entering the loop scanning the minimal symbols.
1100
1101 2018-11-20 John Darrington <john@darrington.wattle.id.au>
1102
1103 * s12z-tdep.c (s12z_extract_return_value): New function.
1104 (inv_reg_perm) New array.
1105 (s12z_return_value): Populate readbuf if non-null.
1106
1107 2018-11-20 Eli Zaretskii <eliz@gnu.org>
1108
1109 * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1110 with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1111 to MinGW fixed by Gnulib.
1112 (O_NOINHERIT): Define if not defined.
1113
1114 2018-11-19 John Darrington <john@darrington.wattle.id.au>
1115
1116 * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1117
1118 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1119
1120 * infrun.c (displaced_step_inferior_state) <next>: Remove.
1121
1122 2018-11-19 Tom Tromey <tom@tromey.com>
1123
1124 * source.c (get_filename_and_charpos): Return void.
1125
1126 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1127
1128 * skip.c (_initialize_step_skip): Fix "info skip" help.
1129
1130 2018-11-16 Tom Tromey <tom@tromey.com>
1131
1132 PR rust/23625:
1133 * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1134
1135 2018-11-19 Simon Marchi <simon.marchi@ericsson.com>
1136
1137 * infrun.c (displaced_step_inferior_states): Change type to
1138 std::forward_list.
1139 (get_displaced_stepping_state): Adjust.
1140 (displaced_step_in_progress_any_inferior): Adjust.
1141 (add_displaced_stepping_state): Adjust.
1142 (remove_displaced_stepping_state): Adjust.
1143
1144 2018-11-18 Tom Tromey <tom@tromey.com>
1145
1146 PR build/23814:
1147 * target-delegates.c: Rebuild.
1148 * ia64-linux-nat.c (class ia64_linux_nat_target)
1149 <have_steppable_watchpoint>: Use override. Return true, not 1.
1150 (ia64_linux_nat_target::can_use_hw_breakpoint): Rename. Remove
1151 "self" argument.
1152 (ia64_linux_nat_target::low_new_thread): Rename.
1153 (class ia64_linux_nat_target) <read_description>: Don't declare.
1154 * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1155 bool.
1156
1157 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1158
1159 PR gdb/22736:
1160 * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1161 lang_struct_return code.
1162
1163 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1164
1165 * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1166 return_method.
1167 * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1168 * amd64-tdep.c (amd64_push_arguments): Likewise.
1169 (amd64_push_dummy_call): Likewise.
1170 * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1171 * arc-tdep.c (arc_push_dummy_call): Likewise.
1172 * arm-tdep.c (arm_push_dummy_call): Likewise.
1173 * avr-tdep.c (avr_push_dummy_call): Likewise.
1174 * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1175 * cris-tdep.c (cris_push_dummy_call): Likewise.
1176 * csky-tdep.c (csky_push_dummy_call): Likewise.
1177 * frv-tdep.c (frv_push_dummy_call): Likewise.
1178 * gdbarch.c: Regenerate.
1179 * gdbarch.h: Regenerate.
1180 * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1181 return_method.
1182 * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1183 * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1184 (hppa64_push_dummy_call): Likewise.
1185 * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1186 * i386-tdep.c (i386_push_dummy_call): Likewise.
1187 * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1188 * infcall.c (call_function_by_hand_dummy): Likewise.
1189 * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1190 * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1191 * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1192 * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1193 * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1194 * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1195 * mep-tdep.c (mep_push_dummy_call): Likewise.
1196 * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1197 (mips_n32n64_push_dummy_call): Likewise.
1198 (mips_o32_push_dummy_call): Likewise.
1199 (mips_o64_push_dummy_call): Likewise.
1200 * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1201 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1202 * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1203 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1204 * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1205 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1206 (ppc64_sysv_abi_push_dummy_call): Likewise.
1207 * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1208 (ppc64_sysv_abi_push_dummy_call): Likewise.
1209 * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1210 * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1211 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1212 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1213 * rx-tdep.c (rx_push_dummy_call): Likewise.
1214 * s390-tdep.c (s390_push_dummy_call): Likewise.
1215 * score-tdep.c (score_push_dummy_call): Likewise.
1216 * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1217 (sh_push_dummy_call_nofpu): Likewise.
1218 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1219 (sparc32_push_dummy_call): Likewise.
1220 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1221 (sparc64_push_dummy_call): Likewise.
1222 * spu-tdep.c (spu_push_dummy_call): Likewise.
1223 * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1224 * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1225 * v850-tdep.c (v850_push_dummy_call): Likewise.
1226 * vax-tdep.c (vax_push_dummy_call): Likewise.
1227 * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1228 * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1229
1230 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1231
1232 * gdbarch.sh (enum function_call_return_method): Add enum.
1233 * gdbarch.h: Regenerate.
1234 * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1235
1236 2018-11-15 Joel Brobecker <brobecker@adacore.com>
1237
1238 * unittests/copy_bitwise-selftests.c: New file.
1239 * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1240 (selftests::copy_bitwise_tests): Delete, moving this code to
1241 unittests/copy_bitwise-selftests.c instead.
1242 (_initialize_utils): Do not register copy_bitwise tests.
1243 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1244 unittests/copy_bitwise-selftests.c.
1245
1246 2018-11-14 Joel Brobecker <brobecker@adacore.com>
1247
1248 * ada-lang.c (move_bits): Delete. Update all callers to use
1249 copy_bitwise instead.
1250 * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1251 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1252 Move from here to utils.c.
1253 (_initialize_dwarf2loc): Remove call to register copy_bitwise
1254 selftests.
1255 * utils.h (copy_bitwise): Add declaration.
1256 * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1257 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1258 Moved here from dwarf2loc.c.
1259 (_initialize_utils): Register copy_bitwise selftests.
1260
1261 2018-11-14 Jim Wilson <jimw@sifive.com>
1262
1263 * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1264 (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1265 then increment next_regnum if odd.
1266 (riscv_arg_location): New arg is_unnamed. Set ainfo->is_unnamed.
1267 (riscv_push_dummy_call): New local ftype. Call check_typedef to set
1268 function type. Pass new arg to riscv_arg_location based on function
1269 type.
1270 (riscv_return_value): Pass new arg to riscv_arg_location.
1271
1272 * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1273 (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1274 of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1275
1276 * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1277 setting len. New local align, set to max of arg align and xlen,
1278 and pass to first riscv_assign_stack_location call.
1279
1280 2018-11-12 Simon Marchi <simon.marchi@polymtl.ca>
1281
1282 * skip.c (complete_skip_number): New function.
1283 (_initialize_step_skip): Add completers to some skip commands.
1284
1285 2018-11-09 Tom Tromey <tom@tromey.com>
1286
1287 * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1288 (struct remote_g_packet_data): Derive from allocate_on_obstack.
1289 <guesses>: Now a std::vector.
1290 (remote_g_packet_data_init, register_remote_g_packet_guess):
1291 Update.
1292 (remote_read_description_p): Update. Return bool.
1293 (remote_target::read_description): Update.
1294 (struct remote_g_packet_guess): Add constructor.
1295
1296 2018-11-09 Tom Tromey <tom@tromey.com>
1297
1298 * common/scoped_fd.h (class scoped_fd): Add move constructor and
1299 move assignment operator.
1300 * psymtab.c (psymtab_to_fullname): Update.
1301 * source.h (open_source_file): Return scoped_fd.
1302 (find_and_open_source): Likewise.
1303 * source.c (open_source_file): Return scoped_fd.
1304 (get_filename_and_charpos): Update.
1305 (print_source_lines_base): Update. Use scoped_fd::to_file.
1306 (forward_search_command): Likewise.
1307 (reverse_search_command): Likewise.
1308 (find_and_open_source): Return scoped_fd.
1309 * tui/tui-source.c (tui_set_source_content): Update. Use
1310 gdb_file_up.
1311
1312 2018-11-09 John Baldwin <jhb@FreeBSD.org>
1313
1314 * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1315 overflow.
1316
1317 2018-11-09 Hafiz Abid Qadeer <abidh@codesourcery.com>
1318
1319 * configure: Regenerate.
1320
1321 2018-11-09 Tom de Vries <tdevries@suse.de>
1322
1323 * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1324 unconditionally, to set the language of the symbol. Manage freeing
1325 returned pointer using gdb::unique_xmalloc_ptr.
1326
1327 2018-11-08 Tom Tromey <tom@tromey.com>
1328
1329 * record.c (require_record_target): Upper-case "<TAB>".
1330
1331 2018-11-08 Tom Tromey <tom@tromey.com>
1332
1333 * python/lib/gdb/command/pretty_printers.py
1334 (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1335
1336 2018-11-08 Tom Tromey <tom@tromey.com>
1337
1338 PR gdb/23555:
1339 PR gdb/23838:
1340 * target.h (target_supports_terminal_ours): Return bool.
1341 * target.c (target_supports_terminal_ours): Handle case where
1342 current_top_target returns nullptr. Return bool.
1343
1344 2018-11-08 Joel Brobecker <brobecker@adacore.com>
1345
1346 * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1347 return the correct count for potential HFAs.
1348
1349 2018-11-08 Jan Beulich <jbeulich@suse.com>
1350
1351 * i387-tdep.c (i387_supply_xsave): Split handling of
1352 X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1353 (i387_collect_xsave): Likewise.
1354
1355 2018-11-08 Andrew Burgess <andrew.burgess@embecosm.com>
1356
1357 * riscv-tdep.c (riscv_insn::decode): Update header comment.
1358 (riscv_frame_this_id): Catch errors thrown while building the
1359 frame cache, leave the frame id as the default, which is the outer
1360 frame id.
1361
1362 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1363
1364 * ada-lang.c (read_atcb): Only set task_info->called_task if
1365 task_info->state == Entry_Caller_Sleep.
1366 (print_ada_task_info): Do not check task_info->state before
1367 checking task_info->called_task.
1368 (info_task): Likewise.
1369
1370 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1371
1372 * ada-tasks.c (read_atcb): Clear task_info before computing
1373 the value of each of its fields.
1374
1375 2018-11-07 Andrew Burgess <andrew.burgess@embecosm.com>
1376
1377 * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1378 NULL before dereferencing it.
1379
1380 2018-11-06 Tom de Vries <tdevries@suse.de>
1381
1382 * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1383 program headers.
1384
1385 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
1386
1387 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1388 so that it applies to uclinux as well.
1389
1390 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
1391
1392 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1393 when on AAPCS.
1394
1395 2018-11-06 John Baldwin <jhb@FreeBSD.org>
1396
1397 * riscv-fbsd-nat.c (getregs_supplies): Return true for
1398 RISCV_CSR_SSTATUS_REGNUM.
1399
1400 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1401
1402 * source.c (open_source_file): Fix leak by transferring the
1403 current s->fullname to the unique_xmalloc_ptr fullname given
1404 to find_and_open_source.
1405
1406 2018-11-04 Tom Tromey <tom@tromey.com>
1407
1408 * varobj.c (install_default_visualizer): Update.
1409 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1410 Return gdbpy_ref.
1411 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1412 (find_pretty_printer_from_progspace)
1413 (find_pretty_printer_from_gdb, find_pretty_printer)
1414 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1415 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1416 Update.
1417
1418 2018-11-04 Tom Tromey <tom@tromey.com>
1419
1420 * python/python.c (gdbpy_parameter_value): Update.
1421 * python/python-internal.h (python_string_to_unicode)
1422 (python_string_to_target_python_string)
1423 (host_string_to_python_string): Return gdbpy_ref.
1424 * python/py-utils.c (python_string_to_unicode)
1425 (unicode_to_encoded_python_string)
1426 (unicode_to_target_python_string)
1427 (python_string_to_target_string)
1428 (python_string_to_target_python_string): Return gdbpy_ref.
1429 (python_string_to_host_string): Update.
1430 (host_string_to_python_string): Return gdbpy_ref.
1431 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1432 (stpy_fullname): Update.
1433 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1434 Update.
1435 * python/py-prettyprint.c (print_string_repr): Update.
1436 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1437 (objfpy_get_build_id): Update.
1438 * python/py-breakpoint.c (bppy_get_location)
1439 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1440 Update.
1441
1442 2018-11-04 Tom Tromey <tom@tromey.com>
1443
1444 * python/python-internal.h (gdb_py_object_from_longest)
1445 (gdb_py_object_from_ulongest): Return gdbpy_ref.
1446 * python/py-value.c (valpy_int): Update.
1447 * python/py-utils.c (gdb_py_object_from_longest): Return
1448 gdbpy_ref.
1449 (gdb_py_object_from_ulongest): Likewise.
1450 * python/py-type.c (typy_get_alignof): Update.
1451 * python/py-linetable.c (ltpy_get_all_source_lines)
1452 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1453 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1454
1455 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1456
1457 * ada-lang.c (_initialize_ada_language): Fix typo.
1458
1459 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1460
1461 * language.c (type): Remove.
1462 (_initialize_language): Remove assignment to type.
1463
1464 2018-11-02 Joel Brobecker <brobecker@adacore.com>
1465
1466 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1467 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1468 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1469 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1470 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1471 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1472 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1473 and aarch64-ravenscar-thread.o.
1474 * NEWS: Add entry documenting Ravenscar tasking support
1475 on AArch64 ELF.
1476
1477 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
1478
1479 * symtab.c (info_functions_command): Initialize quiet flag.
1480 * stack.c (info_args_command): Likewise.
1481
1482 2018-11-01 Jim Wilson <jimw@sifive.com>
1483
1484 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1485 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
1486 debugging messages.
1487
1488 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1489
1490 * ada-lang.c (ada_watch_location_expression): New function.
1491 (ada_language_defn): Set la_watch_location_expression to
1492 ada_watch_location_expression.
1493
1494 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1495
1496 * print-utils.c (int_string): Remove unnecessary trailing spaces.
1497
1498 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1499
1500 * rs6000-tdep.c (skip_prologue): Fix potential negative left
1501 shifting.
1502
1503 2018-11-01 Jerome Guitton <guitton@adacore.com>
1504 Joel Brobecker <brobecker@adacore.com>
1505
1506 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1507 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1508 * arm-pikeos-tdep.c: New file.
1509 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1510 embedded system.
1511 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1512
1513 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
1514
1515 * common/pathstuff.c (get_standard_temp_dir): New.
1516 * common/pathstuff.h (get_standard_temp_dir): New.
1517 * config.in: Re-generate.
1518 * configure: Re-generate.
1519 * configure.ac: Don't check for mkdtemp.
1520 * gnulib/aclocal-m4-deps.mk: Re-generate.
1521 * gnulib/aclocal.m4: Re-generate.
1522 * gnulib/config.in: Re-generate.
1523 * gnulib/configure: Re-generate.
1524 * gnulib/import/Makefile.am: Re-generate.
1525 * gnulib/import/Makefile.in: Re-generate.
1526 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1527 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1528 * gnulib/import/m4/mkdtemp.m4: New file.
1529 * gnulib/import/mkdtemp.c: New file.
1530 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1531 Add mkdtemp module.
1532 * unittests/mkdir-recursive-selftests.c (test): Use
1533 get_standard_temp_dir.
1534 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1535 ifdef.
1536 * compile/compile.c (get_compile_file_tempdir): Likewise.
1537
1538 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1539
1540 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1541 (SIG_FRAME_LR_OFFSET64): New define.
1542 (SIG_FRAME_FP_OFFSET64): New define.
1543 (aix_sighandle_frame_cache): New Function.
1544 (aix_sighandle_frame_this_id): New Function.
1545 (aix_sighandle_frame_prev_register): New Function.
1546 (aix_sighandle_frame_sniffer): New Function.
1547 (aix_sighandle_frame_unwind): New global variable.
1548 (rs6000_aix_init_osabi): Install new frame unwinder.
1549
1550 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
1551
1552 PR gdb/23835
1553 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1554 already defined.
1555
1556 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1557
1558 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1559
1560 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
1561
1562 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1563 (producer_is_icc): New function.
1564 (check_producer): Set producer_is_icc field on dwarf2_cu.
1565 (dwarf2_init_integer_type): New function.
1566 (read_base_type): Call dwarf2_init_integer_type instead of
1567 init_integer_type in all cases.
1568 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1569 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1570 LEN is greater than 0.
1571
1572 2018-10-30 Tom Tromey <tom@tromey.com>
1573
1574 * main.c (captured_main_1): Check return value of bfd_init.
1575
1576 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
1577
1578 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1579 Adjust comments.
1580
1581 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1582
1583 * procfs.c: Include common/pathstuff.h.
1584
1585 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
1586
1587 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1588 Add missing braces. No functional change.
1589
1590 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1591
1592 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1593 to report a bad option and fix indentation.
1594 * demangle.c (demangle_command): Use report_unrecognized_option_error
1595 to report a bad option and correctly report the bad option.
1596
1597 2018-10-27 Tom Tromey <tom@tromey.com>
1598
1599 PR cli/23364:
1600 * darwin-nat.c (copied_shell): New global.
1601 (may_have_sip): Rename from should_disable_startup_with_shell.
1602 (copy_shell_to_cache, maybe_cache_shell): New functions.
1603 (darwin_nat_target::create_inferior): Update. Use
1604 copied_shell.
1605
1606 2018-10-27 Tom Tromey <tom@tromey.com>
1607
1608 * unittests/scoped_fd-selftests.c (test_to_file): New function.
1609 (run_tests): Call test_to_file.
1610 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1611 temporary files.
1612 * common/scoped_fd.h (scoped_fd::to_file): New method.
1613
1614 2018-10-27 Tom Tromey <tom@tromey.com>
1615
1616 * unittests/scoped_mmap-selftests.c (test_normal): Use
1617 gdb_mkostemp_cloexec.
1618 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1619 Use gdb_mkostemp_cloexec.
1620 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1621 gnulib/config.in, gnulib/configure,
1622 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1623 gnulib/import/m4/gnulib-cache.m4,
1624 gnulib/import/m4/gnulib-comp.m4: Update.
1625 * gnulib/import/m4/mkostemp.m4: New file.
1626 * gnulib/import/m4/mkstemp.m4: Remove.
1627 * gnulib/import/mkostemp.c: New file.
1628 * gnulib/import/mkstemp.m4: Remove.
1629 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1630 mkstemp, add mkostemp. Apply new patch.
1631 * gnulib/import/stdlib.in.h: Apply patch.
1632 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1633 New file.
1634 * dwarf-index-write.c (write_psymtabs_to_index): Use
1635 gdb_mkostemp_cloexec.
1636 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1637
1638 2018-10-27 Tom Tromey <tom@tromey.com>
1639
1640 * unittests/mkdir-recursive-selftests.c: New file.
1641 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1642 unittests/mkdir-recursive-selftests.c.
1643 * dwarf-index-cache.c (mkdir_recursive): Move to
1644 common/filestuff.c.
1645 (index_cache::store): Check return value of mkdir_recursive.
1646 (create_dir_and_check, test_mkdir_recursive): Move to new file.
1647 (_initialize_index_cache): Don't register test.
1648 * common/filestuff.h (mkdir_recursive): Declare.
1649 * common/filestuff.c (mkdir_recursive): Move from
1650 dwarf-index-cache.c. Return bool.
1651
1652 2018-10-27 Tom Tromey <tom@tromey.com>
1653
1654 * dwarf-index-write.c (write_psymtabs_to_index): Move
1655 make_temp_filename to common/pathstuff.c.
1656 * common/pathstuff.h (make_temp_filename): Declare.
1657 * common/pathstuff.c (make_temp_filename): New function, moved
1658 from dwarf-index-write.c.
1659
1660 2018-10-27 Tom Tromey <tom@tromey.com>
1661
1662 * procfs.c (procfs_target::create_inferior): Use get_shell.
1663 * cli/cli-cmds.c (shell_escape): Use get_shell.
1664 * windows-nat.c (windows_nat_target::create_inferior): Use
1665 get_shell.
1666 * common/pathstuff.c (get_shell): New function.
1667 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1668 (fork_inferior): Use get_shell.
1669 * common/pathstuff.h (get_shell): Declare.
1670
1671 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1672
1673 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1674
1675 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1676
1677 * stack.c (print_variable_and_value_data): Add preg and treg.
1678 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1679 and update callers.
1680 (print_frame_arg_vars): Likewise.
1681 (prepare_reg): New function.
1682 (info_locals_command): Extract info print args and use them.
1683 (info_args_command): Likewise.
1684 (_initialize_stack): Modify on-line help.
1685 * symtab.c (treg_matches_sym_type_name): New function.
1686 (search_symbols): New arg t_regexp.
1687 (symtab_symbol_info): New args quiet, regexp, t_regexp.
1688 (info_variables_command): Extract info print args and use them.
1689 (info_functions_command): Likewise.
1690 (info_types_command): Update call to symtab_symbol_info.
1691 (_initialize_symtab): Modify on-line help.
1692 * symtab.h (treg_matches_sym_type_name): New function.
1693 (search_symbols): New t_regexp arg.
1694
1695 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1696
1697 * cli-utils.c (extract_arg_maybe_quoted): New function.
1698 (extract_info_print_args): New function.
1699 (info_print_args_help): New function.
1700 (report_unrecognized_option_error): New function.
1701 * cli-utils.h (extract_arg_maybe_quoted): New function.
1702 (extract_info_print_args): New function.
1703 (info_print_args_help): New function.
1704 (report_unrecognized_option_error): New function.
1705
1706 2018-10-26 Tom Tromey <tom@tromey.com>
1707
1708 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1709 (compute_compunit_symtab_includes): Update.
1710 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
1711 (compunit_symtab_ptr): Likewise.
1712
1713 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1714
1715 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1716 default_print_auxv_entry for specific tag values.
1717
1718 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1719
1720 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1721
1722 2018-10-26 Jim Wilson <jimw@sifive.com>
1723
1724 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1725 (riscv_linux_sigframe_init): Declare.
1726 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1727 (riscv_linux_sigframe): New.
1728 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1729 (riscv_linux_sigframe_init): Define.
1730 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1731
1732 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1733 (riscv_isa_flen): Likewise. Drop static.
1734 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1735 (riscv_isa_flen): Likewise. Declare.
1736
1737 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1738 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1739
1740 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1741 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1742 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1743 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1744 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1745 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1746 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1747 Define.
1748 (struct ppc_linux_features) <htm>: New field.
1749 (ppc_linux_no_features): Add initializer for htm field.
1750 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1751 new tdescs.
1752 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1753 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1754 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1755 Define if not already defined.
1756 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1757 and rs6000/powerpc-isa207-htm-vsx64l.
1758 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1759 rs6000/powerpc-isa207-htm-vsx64l.xml.
1760 * features/rs6000/power-htm-spr.xml: New file.
1761 * features/rs6000/power-htm-core.xml: New file.
1762 * features/rs6000/power64-htm-core.xml: New file.
1763 * features/rs6000/power-htm-fpu.xml: New file.
1764 * features/rs6000/power-htm-altivec.xml: New file.
1765 * features/rs6000/power-htm-vsx.xml: New file.
1766 * features/rs6000/power-htm-ppr.xml: New file.
1767 * features/rs6000/power-htm-dscr.xml: New file.
1768 * features/rs6000/power-htm-tar.xml: New file.
1769 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1770 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1771 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1772 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1773 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1774 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1775 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1776 fetch_regset with HTM regsets.
1777 (store_register, store_ppc_registers): Call store_regset with HTM
1778 regsets.
1779 (ppc_linux_nat_target::read_description): Set htm field in the
1780 features struct if needed.
1781 * ppc-linux-tdep.c: Include
1782 features/rs6000/powerpc-isa207-htm-vsx32l.c and
1783 features/rs6000/powerpc-isa207-htm-vsx64l.c.
1784 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1785 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1786 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1787 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1788 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1789 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1790 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1791 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1792 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1793 (ppc32_linux_ctarregset): New globals.
1794 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1795 (ppc_linux_collect_core_cpgrregset): New function.
1796 (ppc_linux_iterate_over_regset_sections): Call back with the htm
1797 regsets.
1798 (ppc_linux_core_read_description): Check if the tm spr section is
1799 present and set htm in the features struct.
1800 (_initialize_ppc_linux_tdep): Call
1801 initialize_tdesc_powerpc_isa207_htm_vsx32l and
1802 initialize_tdesc_powerpc_isa207_htm_vsx64l.
1803 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1804 Declare.
1805 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1806 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1807 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1808 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1809 New fields.
1810 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1811 Likewise.
1812 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1813 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1814 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1815 New enum fields.
1816 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1817 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1818 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1819 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1820 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1821 <PPC_CTAR_REGNUM>: Likewise.
1822 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1823 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1824 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1825 (IS_CEFP_PSEUDOREG): Define.
1826 (rs6000_register_name): Hide the upper halves of checkpointed VSX
1827 registers. Return names for the checkpointed DFP, VSX, and EFP
1828 pseudo registers.
1829 (rs6000_pseudo_register_type): Remove initial assert and raise an
1830 internal error in the else clause instead. Return types for the
1831 checkpointed DFP, VSX, and EFP pseudo registers.
1832 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1833 checkpointed DFP pseudo registers.
1834 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1835 checkpointed VSX pseudo registers.
1836 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1837 from efpr_pseudo_register_read and
1838 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
1839 registers.
1840 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1841 Handle checkpointed DFP, VSX, and EFP registers.
1842 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1843 (efp_ax_pseudo_register_collect): New functions.
1844 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1845 register logic to new functions. Handle checkpointed DFP, VSX,
1846 and EFP pseudo registers.
1847 (rs6000_gdbarch_init): Look for and validate the htm features.
1848 Include checkpointed DFP, VSX and EFP pseudo-registers.
1849 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1850 HTM registers.
1851
1852 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1853
1854 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1855 without altivec or fpu.
1856
1857 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1858 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1859
1860 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1861 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1862 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1863 Define if not already defined.
1864 * features/rs6000/power-ebb.xml: New file.
1865 * features/rs6000/power-linux-pmu.xml: New file.
1866 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1867 features.
1868 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1869 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1870 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1871 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1872 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1873 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1874 fetch_regset with ebb and pmu regsets.
1875 (store_register, store_ppc_registers): Call store_regset with ebb
1876 and pmu regsets.
1877 (ppc_linux_nat_target::read_description): Set isa207 field in the
1878 features struct if ebb and pmu are avaiable.
1879 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1880 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1881 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1882 and pmu regsets.
1883 (ppc_linux_core_read_description): Check if the pmu section is
1884 present and set isa207 in the features struct.
1885 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1886 (ppc32_linux_pmuregset): Declare.
1887 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1888 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1889 <ppc_sier_regnum>: New field.
1890 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1891 New enum values.
1892 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1893 values.
1894 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1895 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1896 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1897 ebb and pmu features.
1898
1899 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1900 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1901
1902 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1903 (tdesc_powerpc_isa207_vsx64l): Declare.
1904 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1905 (struct ppc_linux_features) <isa207>: New field.
1906 (ppc_linux_no_features): Add initializer for isa207 field.
1907 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1908 new tdescs.
1909 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1910 (NT_PPC_TAR): Define if not already defined.
1911 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1912 rs6000/powerpc-isa207-vsx64l.
1913 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1914 rs6000/powerpc-isa207-vsx64l.xml.
1915 * features/rs6000/power-tar.xml: New file.
1916 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1917 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1918 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1919 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1920 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1921 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1922 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1923 fetch_regset with the TAR regset.
1924 (store_register, store_ppc_registers): Call store_regset with the
1925 TAR regset.
1926 (ppc_linux_nat_target::read_description): Set isa207 field in the
1927 features struct if needed.
1928 * ppc-linux-tdep.c: Include
1929 features/rs6000/powerpc-isa207-vsx32l.c and
1930 features/rs6000/powerpc-isa207-vsx64l.c.
1931 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1932 (ppc_linux_iterate_over_regset_sections): Call back with the tar
1933 regset.
1934 (ppc_linux_core_read_description): Check if the tar section is
1935 present and set isa207 in the features struct.
1936 (_initialize_ppc_linux_tdep): Call
1937 initialize_tdesc_powerpc_isa207_vsx32l and
1938 initialize_tdesc_powerpc_isa207_vsx64l.
1939 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1940 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1941 (enum) <PPC_TAR_REGNUM>: New enum value.
1942 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1943 feature.
1944 (ppc_process_record_op31): Record changes to TAR.
1945
1946 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1947 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1948
1949 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1950 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1951 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1952 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1953 (struct ppc_linux_features) <ppr_dscr>: New field.
1954 (ppc_linux_no_features): Add initializer for ppr_dscr field.
1955 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1956 new tdescs.
1957 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1958 Define if not already defined.
1959 * features/Makefile (WHICH): Add
1960 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1961 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1962 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1963 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1964 * features/rs6000/power-dscr.xml: New file.
1965 * features/rs6000/power-ppr.xml: New file.
1966 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1967 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1968 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1969 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1970 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1971 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1972 * ppc-linux-nat.c: Include <sys/uio.h>.
1973 (fetch_regset, store_regset, check_regset): New functions.
1974 (fetch_register, fetch_ppc_registers): Call fetch_regset with
1975 DSCR and PPR regsets.
1976 (store_register, store_ppc_registers): Call store_regset with
1977 DSCR and PPR regsets.
1978 (ppc_linux_get_hwcap2): New function.
1979 (ppc_linux_nat_target::read_description): Call
1980 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1981 features struct if needed.
1982 * ppc-linux-tdep.c: Include
1983 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1984 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1985 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1986 (ppc32_linux_dscrregset): New globals.
1987 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1988 and dscr regsets.
1989 (ppc_linux_core_read_description): Check if the ppr and dscr
1990 sections are present and set ppr_dscr in the features struct.
1991 (_initialize_ppc_linux_tdep): Call
1992 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1993 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1994 * ppc-linux-tdep.h (ppc32_linux_pprregset)
1995 (ppc32_linux_dscrregset): Declare.
1996 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1997 <ppc_dscr_regnum>: New field.
1998 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1999 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
2000 and dscr features.
2001 (ppc_process_record_op31): Record changes to PPR and DSCR.
2002
2003 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2004
2005 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
2006 second initializer line for the have_* variables. Initialize
2007 have_fpu to 0 instead of 1.
2008
2009 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2010
2011 * arch/ppc-linux-common.c (ppc_linux_match_description):
2012 Parenthesize tdesc assignements and indent them properly.
2013
2014 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2015
2016 * ppc-linux-nat.c (fetch_register): Change if statement to else
2017 if.
2018 (store_register): Likewise.
2019
2020 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2021
2022 * rs6000-tdep.c: Remove reggroups.h include.
2023 (rs6000_pseudo_register_reggroup_p): Remove.
2024 (rs6000_gdbarch_init): Remove call to
2025 set_tdesc_pseudo_register_reggroup_p.
2026
2027 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2028
2029 * reggroups.c (default_register_reggroup_p): Return true for
2030 decfloat registers and float_reggroup.
2031
2032 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2033
2034 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
2035 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
2036 ppc_linux_collect_vrregset by regcache_collect_regset.
2037
2038 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2039
2040 * linux-tdep.c (linux_collect_regset_section_cb): Use
2041 std::vector<gdb_byte> instead of char * and malloc for buf.
2042 Remove xfree.
2043
2044 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
2045
2046 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
2047 symtab_start instead of always using language_unknown.
2048
2049 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
2050
2051 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
2052 READ_P parameter, catch and ignore register access errors from
2053 either the old or new MISA location.
2054 (riscv_has_feature): Update call to riscv_read_misa_reg.
2055
2056 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
2057
2058 * python/py-function.c (convert_values_to_python): Return
2059 gdbpy_ref<>. Add header comment.
2060 (fnpy_call): Adjust.
2061
2062 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
2063
2064 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
2065 (cmdpy_completer_handle_brkchars): Adjust.
2066 (cmdpy_completer): Adjust.
2067
2068 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
2069
2070 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
2071 Pass correct regnum to raw_supply_zeroed.
2072
2073 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
2074
2075 * regcache.c (cooked_read_test): Add CSKY to the list of
2076 architectures with a save_reggroup
2077
2078 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
2079
2080 PR gdb/23368
2081 * infrun.c (follow_exec): In the follow_exec_mode_new case,
2082 transfer terminal state from old new new inferior.
2083 * terminal.h (swap_terminal_info): New function.
2084 * inflow.c (swap_terminal_info): New function.
2085
2086 2018-10-23 Tom Tromey <tom@tromey.com>
2087
2088 * record-btrace.c (get_thread_current_frame_id): Rename from
2089 get_thread_current_frame. Return a frame_id.
2090 (record_btrace_start_replaying): Update.
2091
2092 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2093
2094 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2095 for CSRs.
2096
2097 2018-10-23 Joel Brobecker <brobecker@adacore.com>
2098
2099 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2100 have_nonsteppable_watchpoint attribute to 1.
2101
2102 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2103
2104 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2105 register names.
2106 (struct register_alias): Rename to...
2107 (struct riscv_register_alias): ...this, and update comment.
2108 (riscv_register_aliases): Update type, and alias names. Remove
2109 CSR names from this list.
2110 (riscv_register_name): Use riscv_gdb_reg_names for int and float
2111 register names. Add an extra assertion.
2112 (riscv_is_regnum_a_named_csr): New function.
2113 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2114
2115 2018-10-23 John Darrington <john@darrington.wattle.id.au>
2116
2117 * configure.tgt: Add configuration for s12z.
2118 * s12z-tdep.c: New file.
2119 * NEWS: Mention new target.
2120
2121 2018-10-22 Jim Wilson <jimw@sifive.com>
2122
2123 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2124 FP reg smaller than FP reg size, and fill with -1 instead of 0.
2125
2126 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2127 (riscv_register_type): Use them.
2128 (riscv_print_one_register_info): Handle union of floats same as float.
2129 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2130 riscv_fpreg_q_type fields.
2131
2132 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
2133
2134 * gdbarch.sh (gdbarch_num_cooked_regs): New.
2135 * gdbarch.h: Re-generate.
2136 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2137 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2138 * eval.c (evaluate_subexp_standard): Likewise.
2139 * findvar.c (value_of_register): Likewise.
2140 (value_of_register_lazy): Likewise.
2141 (address_from_register): Likewise.
2142 * frame.c (get_frame_register_bytes): Likewise.
2143 * gdbarch-selftests.c (register_to_value_test): Likewise.
2144 * h8300-tdep.c (h8300_register_type): Likewise.
2145 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2146 (i386_svr4_reg_to_regnum): Likewise.
2147 * infcmd.c (default_print_registers_info): Likewise.
2148 (registers_info): Likewise.
2149 (print_vector_info): Likewise.
2150 (default_print_float_info): Likewise.
2151 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2152 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2153 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2154 (mi_cmd_data_list_changed_registers): Likewise.
2155 (mi_cmd_data_list_register_values): Likewise.
2156 (mi_cmd_data_write_register_values): Likewise.
2157 (mi_cmd_trace_frame_collected): Likewise.
2158 * mips-tdep.c (print_gp_register_row): Likewise.
2159 (mips_print_registers_info): Likewise.
2160 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2161 * regcache.c (init_regcache_descr): Likewise.
2162 (register_size): Likewise.
2163 (register_dump::dump): Likewise.
2164 (cooked_read_test): Likewise.
2165 (cooked_write_test): Likewise.
2166 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2167 (rs6000_gdbarch_init): Likewise.
2168 * stabsread.c (stab_reg_to_regnum): Likewise.
2169 * stack.c (info_frame_command): Likewise.
2170 * target-descriptions.c (tdesc_register_name): Likewise.
2171 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2172 * tui/tui-regs.c (tui_show_register_group): Likewise.
2173 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2174 (user_reg_map_regnum_to_name): Likewise.
2175 (value_of_user_reg): Likewise.
2176 (maintenance_print_user_registers): Likewise.
2177 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2178 (xtensa_register_name): Likewise.
2179 (xtensa_register_type): Likewise.
2180 (xtensa_reg_to_regnum): Likewise.
2181 (xtensa_pseudo_register_read): Likewise.
2182 (xtensa_pseudo_register_write): Likewise.
2183
2184 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2185
2186 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2187 correctly-sized buffer with raw_read.
2188 (amd64_pseudo_register_write): Use correctly-sized buffer for
2189 raw_read/raw_write.
2190
2191 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2192
2193 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2194 in add_prefix_cmd of set print type.
2195
2196 2018-10-19 Tom Tromey <tom@tromey.com>
2197
2198 PR tui/18388:
2199 * NEWS: Mention tabset deprecation.
2200 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2201 (update_tab_width): New function.
2202 (tui_set_tab_width, tui_show_tab_width): New functions.
2203 (tui_set_tab_width_command): Use update_tab_width.
2204 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
2205 Add new "set tui tab-width" command.
2206 * tui/tui-source.c (tui_set_source_content): Update.
2207 * tui/tui-disasm.c (tui_set_disassem_content): Update.
2208 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2209 Don't declare.
2210 (tui_tab_width): Declare.
2211 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2212 (tui_set_default_tab_len): Remove.
2213
2214 2018-10-19 Tom Tromey <tom@tromey.com>
2215
2216 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2217 (key_is_backspace, tui_getc): Don't declare.
2218 * tui/tui-io.c (key_is_start_sequence): Now static.
2219 (key_is_end_sequence, key_is_backspace): Remove.
2220 (tui_getc): Now static.
2221
2222 2018-10-19 Tom Tromey <tom@tromey.com>
2223
2224 * symfile.c (reread_symbols): Clear "static_links".
2225
2226 2018-10-19 Alan Hayward <alan.hayward@arm.com>
2227
2228 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2229 define.
2230 (aarch64_linux_sigframe_init): Extra boundary checks.
2231
2232 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
2233
2234 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2235 the possibly non-existent tdesc type 'vec128', but the type of raw
2236 register v16 instead.
2237
2238 2018-10-19 Gary Benson <gbenson@redhat.com>
2239
2240 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2241
2242 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
2243
2244 PR cli/23785
2245 * cli/cli-dump.c (restore_binary_file): Check if "file" is
2246 NULL.
2247
2248 2018-10-17 Paul Koning <paul_koning@dell.com>
2249
2250 * charset.c (convert_between_encodings): Fix unsigned overflow.
2251
2252 2018-10-17 John Baldwin <jhb@FreeBSD.org>
2253
2254 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2255 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2256 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2257 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2258 New functions.
2259 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2260 and fbsd_info_proc_mappings_header.
2261 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2262 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2263 New.
2264
2265 2018-10-17 Joel Brobecker <brobecker@adacore.com>
2266
2267 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2268 Solaris Maintainer.
2269
2270 2018-10-15 Tom Tromey <tom@tromey.com>
2271
2272 * tui/tui.c (strcat_to_buf): Remove casts.
2273 * tui/tui-winsource.c (tui_show_source_line)
2274 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2275 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2276 * tui/tui-windata.c (tui_first_data_item_displayed)
2277 (tui_delete_data_content_windows, tui_erase_data_content)
2278 (tui_display_all_data, tui_display_data_from)
2279 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2280 * tui/tui-win.c (tui_set_win_height)
2281 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2282 casts.
2283 * tui/tui-win.c (tui_resize_all): Remove casts.
2284 (tui_scroll_backward_command, tui_set_focus)
2285 (tui_set_tab_width_command): Likewise.
2286 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2287 * tui/tui-regs.c (tui_show_register_group): Remove cast.
2288 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2289 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2290 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2291 Remove casts.
2292
2293 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
2294
2295 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2296 AArch64/ARM maintainer.
2297
2298 2018-10-11 Gary Benson <gbenson@redhat.com>
2299
2300 * interps.h (interp::m_name): Make private and mutable.
2301 * interps.c (interp::~interp): Free m_name.
2302
2303 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2304 Simon Marchi <simark@simark.ca>
2305
2306 * README (`configure' options): Add documentation for new
2307 "--enable-unit-tests" option.
2308 * acinclude.m4: Include "selftest.m4".
2309 * configure: Regenerate.
2310 * configure.ac: Use "GDB_AC_SELFTEST".
2311 * maint.c (maintenance_selftest): Update message informing
2312 that selftests have been disabled.
2313 (maintenance_info_selftests): Likewise.
2314 * selftest.m4: New file.
2315
2316 2018-10-10 Gary Benson <gbenson@redhat.com>
2317
2318 * remote.c (remote_target::remote_send_printf): Add
2319 missing va_end found by Coverity.
2320
2321 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
2322
2323 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2324
2325 2018-10-09 Tom Tromey <tom@tromey.com>
2326
2327 * configure: Rebuild.
2328 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2329 * NEWS: Update --enable-ubsan documentation.
2330
2331 2018-10-09 Gary Benson <gbenson@redhat.com>
2332
2333 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2334 found by Coverity.
2335
2336 2018-10-08 Tom Tromey <tom@tromey.com>
2337
2338 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2339 variable.
2340 (riscv_fbsd_init_abi): Likewise.
2341
2342 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2343 * valops.c (value_struct_elt_for_reference): Rename local variable
2344 to work around the shadowing a previous local warning.
2345
2346 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2347
2348 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2349 * NEWS: Mention new FreeBSD/riscv native configuration.
2350 * configure.host: Add riscv*-*-freebsd*.
2351 * configure.nat: Likewise.
2352 * riscv-fbsd-nat.c: New file.
2353
2354 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2355
2356 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2357 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2358 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2359 * NEWS: Mention new FreeBSD/riscv target.
2360 * configure.tgt: Add riscv*-*-freebsd*.
2361 * riscv-fbsd-tdep.c: New file.
2362 * riscv-fbsd-tdep.h: New file.
2363
2364 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2365
2366 * regcache.h (struct regcache_map_entry): Note that this type can
2367 be used with traditional frame caches.
2368 * trad-frame.c (trad_frame_set_reg_regmap): New.
2369 * trad-frame.h (trad_frame_set_reg_regmap): New.
2370
2371 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2372
2373 PR c++/16841
2374 * valops.c (get_virtual_base_offset): New function.
2375 (value_struct_elt_for_reference): Use it to get virtual base offset
2376 and add it in calculating class member address.
2377
2378 2018-10-08 John Darrington <john@darrington.wattle.id.au>
2379
2380 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2381 (check_producer): Check if the producer is codewarrior.
2382 (producer_is_codewarrior): New function.
2383 (lnp_state_machine::record_line): Ignore is_stmt flag for records
2384 produced by codewarrior.
2385 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2386
2387 2018-10-06 Tom Tromey <tom@tromey.com>
2388
2389 PR python/19399:
2390 * python/py-inferior.c: Add "architecture" entry.
2391 (infpy_architecture): New function.
2392
2393 2018-10-06 Tom Tromey <tom@tromey.com>
2394
2395 PR python/21765:
2396 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2397 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2398 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
2399 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2400
2401 2018-10-06 Tom Tromey <tom@tromey.com>
2402
2403 PR build/17077:
2404 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2405 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2406 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2407 #include.
2408
2409 2018-10-06 Tom Tromey <tom@tromey.com>
2410
2411 * python/py-breakpoint.c (bppy_get_location): Handle a
2412 bp_breakpoint without a location.
2413
2414 2018-10-06 Tom Tromey <tom@tromey.com>
2415
2416 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2417 (_RegEx): Reformat help text.
2418 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2419 (AnyCallerIs, AnyCallerMatches): Reformat help text.
2420 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2421 text.
2422 * python/lib/gdb/command/xmethods.py (InfoXMethod)
2423 (EnableXMethod, DisableXMethod): Remove help indentation.
2424 Capitalize meta-syntactic variables.
2425 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2426 (EnableUnwinder, DisableUnwinder): Remove help indentation.
2427 Capitalize meta-syntactic variables.
2428 * python/lib/gdb/command/explore.py (ExploreCommand)
2429 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2430 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2431 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2432 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2433 Remove help indentation.
2434 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2435 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2436 (DisableFrameFilter, SetFrameFilterPriority)
2437 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2438
2439 2018-10-06 Tom Tromey <tom@tromey.com>
2440
2441 PR tui/28819:
2442 * tui/tui-io.c (gdb_wgetch): New function.
2443 (tui_mld_getc, tui_getc): Use it.
2444
2445 2018-10-05 Tom Tromey <tom@tromey.com>
2446
2447 * sol-thread.c (sol_thread_target::wait): Rename inner
2448 "save_ptid".
2449
2450 2018-10-04 Tom Tromey <tom@tromey.com>
2451
2452 * configure: Rebuild.
2453 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2454
2455 2018-10-04 Tom Tromey <tom@tromey.com>
2456
2457 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2458 declaration of "block".
2459
2460 2018-10-04 Tom Tromey <tom@tromey.com>
2461
2462 * common/filestuff.c (fdwalk): Remove inner declaration of
2463 "result".
2464
2465 2018-10-04 Tom Tromey <tom@tromey.com>
2466
2467 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2468 "structs_addr" and hoist declaration.
2469
2470 2018-10-04 Tom Tromey <tom@tromey.com>
2471
2472 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2473 variable "size".
2474
2475 2018-10-04 Tom Tromey <tom@tromey.com>
2476
2477 * mdebugread.c (parse_partial_symbols): Use std::string.
2478
2479 2018-10-04 Tom Tromey <tom@tromey.com>
2480
2481 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2482 * p-valprint.c (pascal_val_print): Split inner "i" variable.
2483 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2484 header.
2485 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2486 more inner scope.
2487 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2488 * varobj.c (varobj_update): Rename inner "newobj",
2489 "type_changed".
2490 * valprint.c (generic_emit_char): Rename inner "buf".
2491 * valops.c (find_overload_match): Rename inner "temp".
2492 (value_struct_elt_for_reference): Declare "v" in more inner
2493 scope.
2494 * v850-tdep.c (v850_push_dummy_call): Rename "len".
2495 * unittests/array-view-selftests.c (run_tests): Rename inner
2496 "vec".
2497 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2498 header.
2499 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2500 "tsv" in more inner scope.
2501 (print_one_static_tracepoint_marker): Rename inner
2502 "tuple_emitter".
2503 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2504 (tic6x_push_dummy_call): Don't redeclare "addr".
2505 * target-float.c: Declare "dto" lower.
2506 * symtab.c (lookup_local_symbol): Rename inner "sym".
2507 (find_pc_sect_line): Rename inner "pc".
2508 * stack.c (print_frame): Don't redeclare "gdbarch".
2509 (return_command): Rename inner "gdbarch".
2510 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2511 "sp".
2512 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2513 header.
2514 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2515 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2516 scope.
2517 * remote.c (remote_target::update_thread_list): Don't redeclare
2518 "tp".
2519 (remote_target::process_initial_stop_replies): Rename inner
2520 "thread".
2521 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2522 (remote_target::wait_as): Don't redeclare "stop_reply".
2523 (remote_target::get_thread_local_address): Rename inner
2524 "result".
2525 (remote_target::get_tib_address): Likewise.
2526
2527 * regcache.c (cooked_read_test): Rename "regnum".
2528 * record-btrace.c (cmd_record_btrace_start): Rename inner
2529 "exception".
2530 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2531 loop header.
2532 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2533 header.
2534 (ppu2spu_sniffer): Rename inner "buf".
2535 * parse.c (operator_check_standard): Rename inner "type",
2536 "objfile".
2537 * p-valprint.c (pascal_val_print): Introduce new scope for
2538 "low_bound", "high_bound".
2539 * p-exp.y (yylex): Declare "i" in loop header.
2540 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2541 Lower declaration of "s".
2542 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2543 header.
2544 (nios2_push_dummy_call): Rename "len".
2545 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2546 "buf".
2547 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2548 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2549 (linux_xfer_osdata_modules): Likewise.
2550 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2551 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2552 (mips_o64_push_dummy_call): Likewise.
2553 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2554 "op".
2555 * mi/mi-main.c (list_available_thread_groups): Rename inner
2556 "tuple_emitter".
2557 (mi_cmd_data_read_memory): Rename inner "opts".
2558 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2559 "tuple_emitter".
2560 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2561 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
2562 more inner scope.
2563 (parse_partial_symbols): Rename inner "pst", "p", "name"
2564 * main.c (captured_main_1): Rename inner "i"s.
2565 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2566 "oso2".
2567 * linux-tdep.c (linux_info_proc): Rename inner "filename".
2568 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2569 * infrun.c (handle_no_resumed): Don't redeclare "thread".
2570 (handle_signal_stop): Rename inner "gdbarch".
2571 (handle_command): Declare "signum" in loop header.
2572 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2573 "status".
2574 (examine_prologue): Rename inner "sol" and "sof".
2575 (ia64_extract_return_value): Rename inner "val". Declare another
2576 "val" in a more inner scope.
2577 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2578 inner scope.
2579 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2580 "except".
2581 * findvar.c (default_read_var_value): Don't redeclare "addr".
2582 * f-exp.y (yylex): Declare "i" in loop header.
2583 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2584 Rename inner "type", "expect_type".
2585 (evaluate_subexp_for_sizeof): Rename inner "pc".
2586 * elfread.c (elf_symfile_read): Rename inner "abfd".
2587 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2588 "bytes_read".
2589 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2590 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2591 (dwarf_decode_line_header): Rename inner "lh".
2592 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2593 "offset". Declare "i" in loop header.
2594 (disassemble_dwarf_expression): Rename inner "addr_size".
2595 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2596 inner "result".
2597 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2598 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2599 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2600 "inner_list_emitter".
2601 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2602 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2603 declaration in a block.
2604 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2605 * cp-valprint.c (cp_print_value_fields): Don't redeclare
2606 "obstack_final_size".
2607 * cp-support.c (inspect_type): Declare "i" in loop header.
2608 * compile/compile.c (compile_instance::insert_symbol_error):
2609 Rename inner "e".
2610 * common/agent.c (agent_run_command): Remove inner "ret"
2611 declaration.
2612 * coffread.c (coff_symfile_read): Rename inner "name".
2613 (coff_symfile_read): Rename inner "abfd".
2614 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2615 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2616 "high".
2617 * c-exp.y (lex_one_token): Move "len" declaration lower.
2618 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2619 "gdbarch".
2620 (create_exception_master_breakpoint): Likewise. Don't redeclare
2621 "b".
2622 (watch_command_1): Declare "mark" later.
2623 (clear_command): Don't shadow "a" or "b".
2624 (delete_command): Rename inner "b".
2625 (delete_trace_command): Likewise.
2626 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2627 "op".
2628 (arm_gdbarch_init): Remove inner "e_flags".
2629 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2630 "offset" in inner blocks.
2631
2632 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
2633
2634 * dwarf-index-write.c (file_write): Don't write if the vector is
2635 empty.
2636
2637 2018-10-05 Tom de Vries <tdevries@suse.de>
2638
2639 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2640 PyArg_ParseTuple call.
2641
2642 2018-10-05 Tom de Vries <tdevries@suse.de>
2643
2644 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2645 PyArg_ParseTuple call.
2646
2647 2018-10-04 Joel Brobecker <brobecker@adacore.com>
2648
2649 * psymtab.c (recursively_search_psymtabs): Reformat parameters
2650 to avoid exceeding 80 characters per line limit.
2651
2652 2018-10-04 Tom Tromey <tom@tromey.com>
2653
2654 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2655 (reread_symbols): Update.
2656 * complaints.h (clear_complaints): Remove argument.
2657 * complaints.c (enum complaint_series): Remove.
2658 (series): Remove global.
2659 (complaint_internal): Update.
2660 (clear_complaints): Remove argument.
2661
2662 2018-10-04 Tom Tromey <tom@tromey.com>
2663
2664 * symfile.c (symbol_file_add_with_addrs): Do not print "no
2665 debugging symbols" message if there is a separate debug objfile.
2666
2667 2018-10-04 Tom Tromey <tom@tromey.com>
2668
2669 PR cli/19551:
2670 * symfile.c (symbol_file_add_with_addrs): Update output.
2671 * psymtab.c (require_partial_symbols): Update output.
2672
2673 2018-10-04 Tom Tromey <tom@tromey.com>
2674
2675 PR cli/22234:
2676 * complaints.c: Emit \n.
2677
2678 2018-10-04 Tom Tromey <tom@tromey.com>
2679
2680 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2681 (separate_debug_file_exists, find_separate_debug_file)
2682 (add_symbol_file_command, reread_symbols, allocate_symtab)
2683 (allocate_compunit_symtab): Use filtered printing, not
2684 unfiltered.
2685 * psymtab.c (require_partial_symbols, dump_psymtab)
2686 (allocate_psymtab): Use filtered printing, not unfiltered.
2687
2688 2018-10-04 Tom Tromey <tom@tromey.com>
2689
2690 * complaints.c (complaint_internal): Correctly check complaint
2691 count.
2692
2693 2018-10-04 Tom Tromey <tom@tromey.com>
2694
2695 * complaints.h (struct complaints): Remove declaration.
2696 * complaints.c (clear_complaints): Remove an unused variable.
2697
2698 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2699
2700 * MAINTAINERS (Write After Approval): Add self.
2701
2702 2018-10-03 Tom Tromey <tom@tromey.com>
2703
2704 * guile/scm-value.c (gdbscm_value_to_string): Initialize
2705 "buffer_contents".
2706 * coffread.c (coff_symtab_read): Initialize "newobj".
2707
2708 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
2709
2710 * dwarf2read.c (read_func_scope): Remove struct keyword in
2711 range-based for.
2712
2713 2018-10-03 Tom Tromey <tom@tromey.com>
2714
2715 * README: Mention --enable-ubsan.
2716 * NEWS: Mention --enable-ubsan.
2717 * acinclude.m4: Include sanitize.m4.
2718 * configure: Rebuild.
2719 * configure.ac: Call AM_GDB_UBSAN.
2720 * sanitize.m4: New file.
2721
2722 2018-10-03 Tom Tromey <tom@tromey.com>
2723
2724 * expression.h (enum exp_opcode): Use uint8_t as base type.
2725 * expprint.c (op_name): Handle invalid opcodes.
2726
2727 2018-10-03 Tom Tromey <tom@tromey.com>
2728
2729 * parse.c (prefixify_expression): Add assert.
2730 (parse_exp_in_context_1): Throw exception if the expression is
2731 empty.
2732
2733 2018-10-03 Tom Tromey <tom@tromey.com>
2734
2735 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2736
2737 2018-10-03 Tom Tromey <tom@tromey.com>
2738
2739 * c-exp.y (parse_number): Work in unsigned. Remove casts.
2740
2741 2018-10-03 Tom Tromey <tom@tromey.com>
2742
2743 * dwarf2read.c (read_subrange_type): Make "negative_mask"
2744 unsigned.
2745
2746 2018-10-03 Tom Tromey <tom@tromey.com>
2747
2748 * findvar.c (extract_integer): Do work in an unsigned type.
2749
2750 2018-10-03 Tom Tromey <tom@tromey.com>
2751
2752 * common/enum-flags.h (enum_flags::operator~): Add static assert.
2753 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2754 base type.
2755 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2756 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2757 type.
2758 * c-lang.h (enum c_string_type_values): Use unsigned as base
2759 type.
2760 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2761
2762 2018-10-03 Tom Tromey <tom@tromey.com>
2763
2764 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2765 <~dwarf2_frame_state_reg_info>: Update.
2766 <dwarf2_frame_state_reg_info>: Update.
2767 <alloc_regs>: Add assertion. Update.
2768 <reg>: Now a std::vector.
2769 <num_regs>: Remove.
2770 <swap>: Update.
2771 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2772 (execute_cfa_program_test, dwarf2_frame_cache): Update.
2773
2774 2018-10-03 Tom Tromey <tom@tromey.com>
2775
2776 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2777
2778 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2779
2780 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2781
2782 2018-10-02 Tom Tromey <tom@tromey.com>
2783
2784 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2785
2786 2018-10-02 John Darrington <john@darrington.wattle.id.au>
2787
2788 * NEWS: Mention changed commands.
2789 * ser-uds.c: New file.
2790 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2791 * configure: Regenerate.
2792 * Makefile.in: Add new file.
2793 * serial.c (serial_open): Check if filename is a socket
2794 and lookup the appropriate interface accordingly.
2795
2796 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2797
2798 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2799 define.
2800 (AARCH64_EXTRA_MAGIC): Likewise.
2801 (AARCH64_FPSIMD_MAGIC): Likewise.
2802 (AARCH64_SVE_MAGIC): Likewise.
2803 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2804 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2805 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2806 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2807 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2808 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2809 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2810 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2811 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2812 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2813 (read_aarch64_ctx): Add function.
2814 (aarch64_linux_sigframe_init): Detect FP registers.
2815
2816 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2817
2818 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2819 (AARCH64_D0_REGNUM): Likewise.
2820 (AARCH64_S0_REGNUM): Likewise.
2821 (AARCH64_H0_REGNUM): Likewise.
2822 (AARCH64_B0_REGNUM): Likewise.
2823 (AARCH64_SVE_V0_REGNUM): Likewise.
2824 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2825 (AARCH64_D0_REGNUM): Likewise.
2826 (AARCH64_S0_REGNUM): Likewise.
2827 (AARCH64_H0_REGNUM): Likewise.
2828 (AARCH64_B0_REGNUM): Likewise.
2829 (AARCH64_SVE_V0_REGNUM): Likewise.
2830
2831 2018-10-01 Gary Benson <gbenson@redhat.com>
2832
2833 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2834 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2835 prfpregset_t instead of gdb_prfpregset_t.
2836 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2837 * configure, config.in: Rebuild.
2838
2839 2018-10-01 Gary Benson <gbenson@redhat.com>
2840
2841 * common/gdb_proc_service.h: New file, factored out from...
2842 * gdb_proc_service.h: Moved common code to the above file.
2843 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2844
2845 2018-10-01 Gary Benson <gbenson@redhat.com>
2846
2847 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2848 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
2849
2850 2018-10-01 Gary Benson <gbenson@redhat.com>
2851
2852 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2853 (AC_CHECK_HEADERS): Check for linux/elf.h.
2854 * configure, config.in: Rebuild.
2855 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2856 doesn't define elf_fpregset_t.
2857
2858 2018-10-01 Gary Benson <gbenson@redhat.com>
2859
2860 * gdb_proc_service.h: Whitespace change.
2861
2862 2018-10-01 Tom Tromey <tom@tromey.com>
2863
2864 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2865 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2866 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2867
2868 2018-10-01 Tom Tromey <tom@tromey.com>
2869
2870 * README: Minor change.
2871
2872 2018-09-30 Pedro Alves <palves@redhat.com>
2873
2874 * darwin-nat-info.c (darwin_debug_regions_recurse)
2875 (info_mach_exceptions_command): Remove unused local variables.
2876 * darwin-nat.c (darwin_decode_notify_message)
2877 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2878 (darwin_stop_inferior, darwin_setup_exceptions)
2879 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2880 (darwin_nat_target::attach, darwin_nat_target::detach)
2881 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2882 local variables.
2883 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2884 variables.
2885
2886 2018-09-29 Tom Tromey <tom@tromey.com>
2887
2888 * README: Remove some leftover text.
2889
2890 2018-09-29 Tom Tromey <tom@tromey.com>
2891
2892 * PROBLEMS: Rewrite.
2893 * README: Update.
2894
2895 2018-09-28 John Baldwin <jhb@FreeBSD.org>
2896
2897 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2898 case with explicit breakpoint kind.
2899 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2900 'additional_info' and related logic.
2901 (riscv_debug_breakpoints): New variable.
2902 (riscv_breakpoint_kind_from_pc): Use the length of the existing
2903 instruction to determine the breakpoint kind.
2904 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2905 flag. Update description of 'set/show riscv
2906 use-compressed-breakpoints' flag.
2907
2908 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
2909
2910 (NEWS): Mention changes to frame related commands.
2911 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2912 (add_prefix_cmd_suppress_notification): New function.
2913 (add_com_suppress_notification): Call
2914 add_cmd_suppress_notification.
2915 * command.h (add_cmd_suppress_notification): Declare.
2916 (add_prefix_cmd_suppress_notification): Declare.
2917 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2918 (parse_frame_specification): Moved from stack.c, with
2919 simplification to handle a single argument.
2920 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2921 switch to the selected frame. Add a header comment.
2922 * stack.c: Remove 'safe-ctype.h' include.
2923 (find_frame_for_function): Add declaration.
2924 (find_frame_for_address): New function.
2925 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2926 (frame_selection_by_function_completer): New function.
2927 (info_frame_command): Rename to...
2928 (info_frame_command_core): ...this, and update parameter types.
2929 (select_frame_command): Rename to...
2930 (select_frame_command_core): ...this, and update parameter types.
2931 (frame_command): Rename to...
2932 (frame_command_core): ...this, and update parameter types.
2933 (class frame_command_helper): New class to wrap implementations of
2934 frame related sub-commands.
2935 (frame_apply_cmd_list): New static global.
2936 (frame_cmd_list): Make static.
2937 (select_frame_cmd_list): New global for sub-commands.
2938 (info_frame_cmd_list): New global for sub-commands.
2939 (_initialize_stack): Register sub-commands for 'frame',
2940 'select-frame', and 'info frame'. Update 'frame apply' commands
2941 to use frame_apply_cmd_list. Move function local static
2942 frame_apply_list to file static frame_apply_cmd_list for
2943 consistency.
2944 * stack.h (select_frame_command): Delete declarationn.
2945 (select_frame_for_mi): Declare new function.
2946
2947 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
2948
2949 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2950 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2951 and NOP.
2952
2953 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
2954
2955 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2956
2957 2018-09-26 Tom Tromey <tom@tromey.com>
2958
2959 * valops.c (auto_abandon): Remove dead code.
2960
2961 2018-09-26 Tom Tromey <tom@tromey.com>
2962
2963 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2964
2965 2018-09-24 Tom Tromey <tom@tromey.com>
2966
2967 * common/pathstuff.c (get_standard_cache_dir): Make
2968 "xdg_cache_home" and "home" const.
2969 * top.c (init_history): Make "tmpenv" const.
2970 * main.c (get_init_files): Make "homedir" const.
2971
2972 2018-09-23 Tom Tromey <tom@tromey.com>
2973
2974 PR python/18852:
2975 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2976
2977 2018-09-23 Tom Tromey <tom@tromey.com>
2978
2979 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2980 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2981 * python/python-internal.h (gdbpy_handle_exception): Declare.
2982 * python/py-utils.c (gdbpy_handle_exception): New function.
2983
2984 2018-09-23 Tom Tromey <tom@tromey.com>
2985
2986 PR python/17284:
2987 * python/py-type.c (typy_template_argument): Check for negative
2988 argument number.
2989
2990 2018-09-23 Tom Tromey <tom@tromey.com>
2991
2992 PR python/14062:
2993 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2994
2995 2018-09-23 Tom Tromey <tom@tromey.com>
2996
2997 PR python/18170:
2998 * python/py-value.c (valpy_int): Allow conversion from pointer
2999 type.
3000
3001 2018-09-23 Tom Tromey <tom@tromey.com>
3002
3003 PR python/20126:
3004 * python/py-value.c (valpy_int): Respect type sign.
3005
3006 2018-09-23 Tom Tromey <tom@tromey.com>
3007
3008 PR python/18352;
3009 * python/py-value.c (valpy_float): Allow conversions from int or
3010 char.
3011 (valpy_int, valpy_long): Allow conversions from float.
3012
3013 2018-09-23 Tom Tromey <tom@tromey.com>
3014
3015 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
3016 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
3017
3018 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3019
3020 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
3021 __sighndlr.
3022 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
3023
3024 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
3025
3026 * windows-nat.c (windows_nat_target::wait): Remove a spurious
3027 target_terminal::ours().
3028
3029 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
3030
3031 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
3032 of vl to ULONGEST.
3033
3034 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
3035
3036 * breakpoint.c (update_inserted_breakpoint_locations): Remove
3037 redundant condition.
3038
3039 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3040
3041 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
3042
3043 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
3044 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
3045 * sol-thread.c (ps_pdmodel): Don't guard definition.
3046
3047 * procfs.c: Fix formatting.
3048
3049 * procfs.c (sysset_t_alloc): Remove.
3050 (create_procinfo): Use XNEW instead of sysset_t_alloc.
3051 (procfs_debug_inferior): Likewise.
3052 (procfs_set_exec_trap): Likewise.
3053 (proc_set_traced_sysentry): Don't allocate argp dynamically.
3054 (proc_set_traced_sysexit): Likewise.
3055
3056 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
3057 (dead_procinfo): Likewise.
3058 (proc_warn): Likewise.
3059 (proc_error): Likewise.
3060 (proc_get_LDT_entry): Likewise.
3061 (do_attach): Likewise.
3062 (procfs_target::pid_to_str): Likewise.
3063 (iterate_over_mappings): Likewise.
3064
3065 * procfs.c (create_procinfo): Fix ARI warning.
3066 (proc_get_status): Likewise.
3067 (proc_stop_process): Likewise.
3068 (proc_run_process): Likewise.
3069 (proc_kill): Likewise.
3070 (proc_get_LDT_entry): Likewise.
3071 (procfs_find_LDT_entry): Likewise.
3072 (proc_update_threads): Likewise.
3073 (proc_iterate_over_threads): Likewise.
3074 (do_attach): Likewise.
3075 (procfs_xfer_memory): Likewise.
3076 (invalidate_cache): Likewise.
3077 (procfs_target::resume): Likewise.
3078 (procfs_init_inferior): Likewise.
3079 (procfs_set_exec_trap): Likewise.
3080 (procfs_target::thread_alive): Likewise.
3081 (procfs_target::pid_to_exec_file): Likewise.
3082 (iterate_over_mappings): Likewise.
3083 (procfs_target::make_corefile_notes): Likewise.
3084 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3085
3086 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3087 (procfs_find_LDT_entry): Likewise.
3088 * sol-thread.c (ps_lgetLDT): Likewise.
3089
3090 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3091
3092 PR tdep/17903
3093 * procfs.c (procfs_target): Declare pid_to_exec_file.
3094 (procfs_target::pid_to_exec_file): New.
3095
3096 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3097
3098 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3099 renaming.
3100 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3101 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3102
3103 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3104
3105 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3106 (supply_fpregset, fill_fpregset): Move ...
3107 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3108 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3109 Remove references to ioctl-based procfs.
3110 Include <sys/reg.h>.
3111 Remove PR_MODEL_NATIVE guards.
3112 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3113 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3114
3115 2018-09-19 Xavier Roirand <roirand@adacore.com>
3116
3117 PR gdb/20981:
3118 * solib-darwin.c (darwin_get_dyld_bfd): New function.
3119 (darwin_solib_get_all_image_info_addr_at_init): Update call.
3120 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3121
3122 2018-09-19 John Baldwin <jhb@FreeBSD.org>
3123
3124 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3125 (fbsd_print_sockaddr_in6): Likewise.
3126
3127 2018-09-19 Richard Bunt <richard.bunt@arm.com>
3128 Chris January <chris.january@arm.com>
3129
3130 * eval.c (skip_undetermined_arglist): Skip argument list helper.
3131 (evaluate_subexp_standard): Return a dummy type when
3132 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3133 OP_F77_UNDETERMINED_ARGLIST case.
3134 * expression.h (enum noside): Update comment.
3135
3136 2018-09-19 George Vasick <george.vasick@oracle.com>
3137
3138 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3139
3140 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
3141 April Chin <april.chin@oracle.com>
3142 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3143
3144 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3145 uint_t lwpid_t.
3146 (create_procinfo): Print pids in /proc without leading zeros.
3147
3148 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
3149
3150 * nios2-tdep.c (nios2_gcc_target_options): New.
3151 (nios2_gdb_arch_init): Install new hook.
3152
3153 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
3154
3155 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3156 New file.
3157 * update-gnulib.sh: Apply patch.
3158 * configure: Re-generate.
3159
3160 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3161
3162 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3163 description. Make "info proc" command descriptions more
3164 consistent.
3165
3166 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3167
3168 * NEWS: Mention 'info proc files' command.
3169
3170 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3171
3172 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3173 descriptors for IP_FILES and IP_ALL.
3174
3175 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3176
3177 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3178 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3179 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3180 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3181 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3182 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3183 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3184 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3185 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3186 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3187 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3188 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3189 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3190 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3191 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3192 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3193 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3194 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3195 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3196 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3197 (struct fbsd_sockaddr_un): New types.
3198 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3199 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3200 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3201 (fbsd_core_info_proc_files): New functions.
3202 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3203 IP_ALL.
3204 * fbsd-tdep.h (fbsd_info_proc_files_header)
3205 (fbsd_info_proc_files_entry): New.
3206
3207 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3208
3209 * defs.h (enum info_proc_what) [IP_FILES]: New value.
3210 * infcmd.c (info_proc_cmd_files): New function.
3211 (_initialize_infcmd): Register 'info proc files' command.
3212
3213 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3214
3215 * gnulib/aclocal-m4-deps.mk: Re-generate.
3216 * gnulib/aclocal.m4: Re-generate.
3217 * gnulib/config.in: Re-generate.
3218 * gnulib/configure: Re-generate.
3219 * gnulib/import/Makefile.am: Re-generate.
3220 * gnulib/import/Makefile.in: Re-generate.
3221 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3222 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3223 * gnulib/import/arpa_inet.in.h: New file.
3224 * gnulib/import/inet_ntop.c: New file.
3225 * gnulib/import/m4/arpa_inet_h.m4: New file.
3226 * gnulib/import/m4/inet_ntop.m4: New file.
3227 * gnulib/import/m4/netinet_in_h.m4: New file.
3228 * gnulib/import/m4/socklen.m4: New file.
3229 * gnulib/import/m4/sockpfaf.m4: New file.
3230 * gnulib/import/m4/stdalign.m4: New file.
3231 * gnulib/import/m4/sys_uio_h.m4: New file.
3232 * gnulib/import/netinet_in.in.h: New file.
3233 * gnulib/import/stdalign.in.h: New file.
3234 * gnulib/import/sys_socket.c: New file.
3235 * gnulib/import/sys_socket.in.h: New file.
3236 * gnulib/import/sys_uio.in.h: New file.
3237 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3238 module.
3239
3240 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3241
3242 * gnulib/aclocal-m4-deps.mk: New file.
3243 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3244 deterministically.
3245
3246 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3247
3248 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3249 KVE_PATH.
3250
3251 2018-09-18 Tom Tromey <tom@tromey.com>
3252
3253 * compile/compile-object-load.c (struct
3254 link_hash_table_cleanup_data): Add constructor and destructor.
3255 Use DISABLE_COPY_AND_ASSIGN.
3256 (~link_hash_table_cleanup_data): Rename from
3257 link_hash_table_free. Now a destructor.
3258 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
3259
3260 2018-09-18 Tom Tromey <tom@tromey.com>
3261
3262 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3263 * compile/compile-object-load.c (struct munmap_list): Move to
3264 header file.
3265 (munmap_list::add): Rename from munmap_list_add; rewrite.
3266 (munmap_list::~munmap_list): Rename from munmap_list_free.
3267 (munmap_listp_free_cleanup): Remove.
3268 (compile_object_load): Update.
3269 * compile/compile-object-load.h (struct munmap_list): Move from
3270 compile-object-load.c. Rewrite.
3271
3272 2018-09-18 Alan Hayward <alan.hayward@arm.com>
3273
3274 * aarch64-tdep.c (pass_in_v): Use register size.
3275 (aarch64_extract_return_value): Likewise.
3276 (aarch64_store_return_value): Likewise.
3277
3278 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3279
3280 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3281 rlim_t.
3282
3283 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3284
3285 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3286 Fix short help line.
3287
3288 2018-09-17 Tom Tromey <tom@tromey.com>
3289
3290 PR python/20445:
3291 * configure: Rebuild.
3292 * configure.ac: Conditionally use -DNDEBUG for Python.
3293
3294 2018-09-17 Tom Tromey <tom@tromey.com>
3295
3296 * configure: Rebuild.
3297 * configure.ac: Use gmp as a library dependency when checking for
3298 mpfr.
3299
3300 2018-09-17 Pedro Alves <palves@redhat.com>
3301
3302 * python/py-inferior.c (find_inferior_object): Delete.
3303
3304 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
3305
3306 * compile/compile-cplus-types.c
3307 (compile_cplus_instance::enter_scope): Don't use new_scope after
3308 std::move.
3309
3310 2018-09-17 Tom Tromey <tom@tromey.com>
3311
3312 * common/pathstuff.c (get_standard_cache_dir): Use
3313 ~/Library/Caches on macOS.
3314 * common/pathstuff.h (get_standard_cache_dir): Update comment.
3315
3316 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
3317
3318 PR python/23669
3319 * breakpoint.c (commands_cmd_element): New.
3320 (_initialize_breakpoint): Assign commands_cmd_element.
3321 * breakpoint.h (commands_cmd_element): New.
3322 * cli/cli-script.c (while_cmd_element, if_command,
3323 define_cmd_element): New.
3324 (command_name_equals): Remove.
3325 (process_next_line): Compare commands by pointer, not by name.
3326 (_initialize_cli_script): Assign the various cmd_list_element
3327 variables.
3328 * compile/compile.c (compile_cmd_element): New.
3329 (_initialize_compile): Assign compile_cmd_element.
3330 * compile/compile.h (compile_cmd_element): New.
3331 * guile/guile.c (guile_cmd_element): New.
3332 (install_gdb_commands): Assign guile_cmd_element.
3333 * guile/guile.h (guile_cmd_element): New.
3334 * python/python.c (python_cmd_element): New.
3335 (_initialize_python): Assign python_cmd_element.
3336 * python/python.h (python_cmd_element): New.
3337 * tracepoint.c (while_stepping_cmd_element): New.
3338 (_initialize_tracepoint): Assign while_stepping_cmd_element.
3339 * tracepoint.h (while_stepping_cmd_element): New.
3340
3341 2018-09-17 Tom Tromey <tom@tromey.com>
3342
3343 * infrun.c (save_infcall_suspend_state): Return
3344 infcall_suspend_state_up.
3345 (save_infcall_control_state): Return infcall_control_state_up.
3346 * inferior.h (save_infcall_suspend_state)
3347 (save_infcall_control_state): Declare later. Return unique
3348 pointers.
3349
3350 2018-09-17 Tom Tromey <tom@tromey.com>
3351
3352 * infrun.c (struct stop_context): Declare constructor,
3353 destructor, "changed" method.
3354 (stop_context::stop_context): Rename from save_stop_context.
3355 (stop_context::~stop_context): Rename from
3356 release_stop_context_cleanup.
3357 (normal_stop): Update.
3358 (stop_context::changed): Rename from stop_context_changed. Return
3359 bool.
3360
3361 2018-09-17 Tom Tromey <tom@tromey.com>
3362
3363 * inferior.h (struct infcall_suspend_state_deleter): New.
3364 (infcall_suspend_state_up): New typedef.
3365 (struct infcall_control_state_deleter): New.
3366 (infcall_control_state_up): New typedef.
3367 (make_cleanup_restore_infcall_suspend_state)
3368 (make_cleanup_restore_infcall_control_state): Don't declare.
3369 * infcall.c (call_function_by_hand_dummy): Update.
3370 * infrun.c (do_restore_infcall_suspend_state_cleanup)
3371 (make_cleanup_restore_infcall_suspend_state): Remove.
3372 (do_restore_infcall_control_state_cleanup)
3373 (make_cleanup_restore_infcall_control_state): Remove.
3374
3375 2018-09-17 Tom Tromey <tom@tromey.com>
3376
3377 * gdbthread.h (struct thread_control_state): Add initializer.
3378 (class thread_info) <control>: Remove initializer.
3379 * inferior.h (struct inferior_control_state): Add initializer.
3380 (class inferior) <control>: Remove initializer.
3381 (exit_inferior_1): Update.
3382 * infrun.c (struct infcall_control_state): Add constructors.
3383 (save_infcall_control_state): Use new.
3384 (restore_infcall_control_state, discard_infcall_control_state):
3385 Use delete.
3386
3387 2018-09-17 Tom Tromey <tom@tromey.com>
3388
3389 * infrun.c (struct infcall_suspend_state) <registers>: Now a
3390 unique_ptr.
3391 <siginfo_data>: Now a unique_xmalloc_ptr.
3392 (save_infcall_suspend_state, restore_infcall_suspend_state)
3393 (discard_infcall_suspend_state)
3394 (get_infcall_suspend_state_regcache): Update.
3395
3396 2018-09-17 Tom Tromey <tom@tromey.com>
3397
3398 * gdbthread.h (struct thread_suspend_state): Add initializers.
3399 (class thread_info) <suspend>: Remove initializer.
3400 * infrun.c (struct infcall_suspend_state): Add initializers.
3401 (save_infcall_suspend_state): Use new.
3402 (discard_infcall_suspend_state): Use delete.
3403
3404 2018-09-16 Tom Tromey <tom@tromey.com>
3405
3406 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3407 Remove.
3408 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3409 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3410 (py_varobj_iter_new): Likewise.
3411 (py_varobj_get_iterator): Use gdbpy_ref.
3412
3413 2018-09-16 Tom Tromey <tom@tromey.com>
3414
3415 * python/py-threadevent.c (py_get_event_thread): Simplify.
3416 * python/py-inferior.c (infpy_thread_from_thread_handle):
3417 Return immediately after calling thread_to_thread_object. Use
3418 Py_RETURN_NONE.
3419 (thread_to_thread_object): Set the exception on a NULL return.
3420
3421 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3422
3423 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3424
3425 2018-09-16 Tom Tromey <tom@tromey.com>
3426
3427 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3428 Remove.
3429
3430 2018-09-16 Tom Tromey <tom@tromey.com>
3431
3432 * python/python-internal.h (thread_to_thread_object): Change
3433 return type.
3434 * python/py-inferior.c (thread_to_thread_object): Return a new
3435 reference.
3436 (infpy_thread_from_thread_handle): Update.
3437 * python/py-infthread.c (gdbpy_selected_thread): Update.
3438 * python/py-stopevent.c (create_stop_event_object): Update.
3439 * python/py-threadevent.c (py_get_event_thread): Return a new
3440 reference.
3441 (py_get_event_thread): Update.
3442 * python/py-event.h (py_get_event_thread): Change return type.
3443 * python/py-continueevent.c (create_continue_event_object):
3444 Update.
3445
3446 2018-09-16 Tom Tromey <tom@tromey.com>
3447
3448 * python/py-progspace.c (pspy_get_objfiles): Update.
3449 * python/python-internal.h (objfile_to_objfile_object): Change
3450 return type.
3451 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3452 Update.
3453 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3454 Update.
3455 * python/python.c (gdbpy_get_current_objfile): Update.
3456 (gdbpy_objfiles): Update.
3457 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3458 Update.
3459 (objfile_to_objfile_object): Return a new reference.
3460 * python/py-symtab.c (stpy_get_objfile): Update.
3461 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3462 Update.
3463
3464 2018-09-16 Tom Tromey <tom@tromey.com>
3465
3466 * python/py-inferior.c (infpy_get_progspace): Update.
3467 * python/python-internal.h (pspace_to_pspace_object): Change
3468 return type.
3469 * python/py-newobjfileevent.c
3470 (create_clear_objfiles_event_object): Update.
3471 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3472 Update.
3473 * python/python.c (gdbpy_get_current_progspace): Update.
3474 (gdbpy_progspaces): Update.
3475 * python/py-progspace.c (pspace_to_pspace_object): Return a new
3476 reference.
3477 * python/py-objfile.c (objfpy_get_progspace): Update.
3478 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3479 Update.
3480
3481 2018-09-16 Tom Tromey <tom@tromey.com>
3482
3483 * python/lib/gdb/__init__.py (current_progspace, objfiles)
3484 (solib_name, block_for_pc, find_pc_line): New functions.
3485 (execute_unwinders): Update.
3486 * python/py-block.c (gdbpy_block_for_pc): Remove.
3487 * python/py-inferior.c (infpy_get_progspace): New function.
3488 (inferior_object_getset) <progspace>: Add.
3489 * python/py-progspace.c (pspy_objfiles): Rewrite.
3490 (pspy_solib_name, pspy_block_for_pc)
3491 (pspy_find_pc_line, pspy_is_valid): New functions.
3492 (progspace_object_methods): Add entries for solib_name,
3493 block_for_pc, find_pc_line, is_valid.
3494 * python/python-internal.h (gdbpy_block_for_pc)
3495 (build_objfiles_list): Don't declare.
3496 * python/python.c: Don't include solib.h.
3497 (gdbpy_solib_name, gdbpy_find_pc_line)
3498 (gdbpy_get_current_progspace, build_objfiles_list)
3499 (gdbpy_objfiles): Remove.
3500 (GdbMethods) <current_progspace, objfiles, block_for_pc,
3501 solib_name, find_pc_line>: Remove entries.
3502
3503 2018-09-16 Tom Tromey <tom@tromey.com>
3504
3505 * top.c (new_ui_command): Use GNU style for metasyntactic
3506 variables.
3507 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3508 variables.
3509 * maint.c (maintenance_translate_address): Remove "<>" around
3510 text.
3511 * interps.c (interpreter_exec_cmd): Use GNU style for
3512 metasyntactic variables.
3513 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3514 metasyntactic variables.
3515 * tracepoint.c (tfind_range_command): Use GNU style for
3516 metasyntactic variables.
3517 (tfind_outside_command): Likewise.
3518 (_initialize_tracepoint): Likewise.
3519 * remote.c (extended_remote_target::create_inferior): Use GNU
3520 style for metasyntactic variables.
3521 * sparc64-tdep.c (adi_examine_command): Use GNU style for
3522 metasyntactic variables.
3523 (adi_assign_command): Likewise.
3524
3525 2018-09-16 Tom Tromey <tom@tromey.com>
3526
3527 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3528 metasyntactic variables. Print message if no disassembler options
3529 are available.
3530
3531 2018-09-15 Tom Tromey <tom@tromey.com>
3532
3533 * infcmd.c (get_inferior_args): Return const char *.
3534 * inferior.h (get_inferior_args): Return type now const.
3535 * linux-tdep.c (linux_fill_prpsinfo): Update.
3536 * procfs.c (procfs_target::make_corefile_notes): Update.
3537
3538 2018-09-07 Tom Tromey <tom@tromey.com>
3539
3540 * python/python.c (execute_gdb_command): Call bpstat_do_actions
3541 inside the TRY.
3542
3543 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
3544
3545 * nios2-tdep.c (nios2_type_align): New.
3546 (nios2_gdb_arch_init): Install type_align hook.
3547
3548 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3549
3550 * eval.c (fake_method::fake_method): Call xzalloc directly for a
3551 type that is neither object file owned, nor gdbarch owned.
3552 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3553 gdbarch is non-NULL.
3554 (alloc_type_instance): Allocate non-objfile owned types on the
3555 gdbarch obstack.
3556 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3557 using TYPE_ALLOC to ensure memory is allocated on the correct
3558 obstack.
3559 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3560 obstack, or the gdbarch obstack.
3561 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3562
3563 2018-09-14 Tom Tromey <tom@tromey.com>
3564
3565 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3566 block.
3567
3568 2018-09-14 Tom Tromey <tom@tromey.com>
3569
3570 * nat/fork-inferior.c (get_startup_shell): Remove "static".
3571
3572 2018-09-13 Tom Tromey <tom@tromey.com>
3573
3574 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3575 static.
3576
3577 2018-09-13 Tom Tromey <tom@tromey.com>
3578
3579 * exec.c (try_open_exec_file): Use std::string.
3580
3581 2018-09-13 Tom Tromey <tom@tromey.com>
3582
3583 * utils.h (gdb_bfd_errmsg): Return std::string.
3584 * exec.c (exec_file_attach): Update.
3585 * compile/compile-object-load.c (compile_object_load): Update.
3586 * utils.c (gdb_bfd_errmsg): Return std::string.
3587
3588 2018-09-13 Tom Tromey <tom@tromey.com>
3589
3590 * procfs.c (struct procinfo_deleter): New.
3591 (procinfo_up): New typedef.
3592 (do_destroy_procinfo_cleanup): Remove.
3593 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
3594
3595 2018-09-13 Tom Tromey <tom@tromey.com>
3596
3597 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3598
3599 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3600 2018-09-13 Tom Tromey <tom@tromey.com>
3601
3602 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3603 (pspy_get_objfiles): New function.
3604 (progspace_object_methods): New.
3605 (pspace_object_type): Add tp_methods callback.
3606 * python/python-internal.h (build_objfiles_list): New
3607 declaration.
3608 * python/python.c (build_objfiles_list): New function.
3609 (gdbpy_objfiles): Implement using build_objfiles_list.
3610 * NEWS: Mention the Progspace.objfiles method.
3611
3612 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3613
3614 * python/py-inferior.c (infpy_get_progspace): New function.
3615 (inferior_object_getset): Add progspace property.
3616 * NEWS: Mention the new property.
3617
3618 2018-09-13 Tom Tromey <tom@tromey.com>
3619
3620 PR rust/23650:
3621 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3622
3623 2018-09-13 Tom Tromey <tom@tromey.com>
3624
3625 PR rust/23626:
3626 * rust-lang.c (rust_enum_variant): Now static.
3627 (rust_empty_enum_p): New function.
3628 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3629 Handle empty enum.
3630
3631 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3632
3633 * python/py-inferior.c (infpy_repr): New.
3634 (inferior_object_type): Register infpy_repr.
3635 * python/py-objfile.c (objfpy_repr): New.
3636 (objfile_object_type): Register objfpy_repr.
3637
3638 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3639
3640 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3641
3642 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3643
3644 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3645 typo.
3646
3647 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
3648
3649 * common/common-utils.c: Don't include '<sys/stat.h>'.
3650 (is_regular_file): Move to...
3651 * common/filestuff.c (is_regular_file): ... here.
3652 * common/common-utils.h (is_regular_file): Move to...
3653 * common/filestuff.h (is_regular_file): ... here.
3654
3655 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
3656
3657 * skip.c (debug_skip): New variable.
3658 (skiplist_entry::do_skip_file_p): Add debug output.
3659 (skiplist_entry::do_skip_gfile_p): Likewise.
3660 (skiplist_entry::skip_function_p): Likewise.
3661 (_initialize_step_skip): Create debug command.
3662 * NEWS: Mention set/show debug skip.
3663
3664 2018-09-11 Xavier Roirand <roirand@adacore.com>
3665
3666 * darwin-nat.c (should_disable_startup_with_shell):
3667 New function.
3668 (darwin_nat_target::create_inferior): Add call.
3669
3670 2018-09-11 Xavier Roirand <roirand@adacore.com>
3671
3672 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3673 inf_port, msg_state>: Initialize.
3674 (struct darwin_thread_info) <signaled, single_step>: Change
3675 type and initialize.
3676 (struct darwin_thread_info) <event>: Initialize.
3677
3678 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3679
3680 PR gdb/23555
3681 PR gdb/23558
3682 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3683 guesses.
3684
3685 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3686
3687 Revert:
3688 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3689
3690 PR gdb/23555
3691 PR gdb/23558
3692 * gnulib/aclocal.m4: Regenerate.
3693 * gnulib/config.in: Regenerate.
3694 * gnulib/configure: Regenerate.
3695 * gnulib/import/Makefile.am: Update.
3696 * gnulib/import/Makefile.in: Update.
3697 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3698 * gnulib/import/_Noreturn.h: ... this.
3699 * gnulib/import/alloca.in.h: Update.
3700 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3701 * gnulib/import/arg-nonnull.h: ... this.
3702 * gnulib/import/assure.h: Update.
3703 * gnulib/import/at-func.c: Update.
3704 * gnulib/import/basename-lgpl.c: Update.
3705 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3706 * gnulib/import/c++defs.h: ... this.
3707 * gnulib/import/canonicalize-lgpl.c: Update.
3708 * gnulib/import/cdefs.h: Update.
3709 * gnulib/import/chdir-long.c: Update.
3710 * gnulib/import/chdir-long.h: Update.
3711 * gnulib/import/cloexec.c: Update.
3712 * gnulib/import/cloexec.h: Update.
3713 * gnulib/import/close.c: Update.
3714 * gnulib/import/closedir.c: Update.
3715 * gnulib/import/config.charset: Update.
3716 * gnulib/import/dirent-private.h: Update.
3717 * gnulib/import/dirent.in.h: Update.
3718 * gnulib/import/dirfd.c: Update.
3719 * gnulib/import/dirname-lgpl.c: Update.
3720 * gnulib/import/dirname.h: Update.
3721 * gnulib/import/dosname.h: Update.
3722 * gnulib/import/dup-safer-flag.c: Update.
3723 * gnulib/import/dup-safer.c: Update.
3724 * gnulib/import/dup.c: Update.
3725 * gnulib/import/dup2.c: Update.
3726 * gnulib/import/errno.in.h: Update.
3727 * gnulib/import/error.c: Update.
3728 * gnulib/import/error.h: Update.
3729 * gnulib/import/exitfail.c: Update.
3730 * gnulib/import/exitfail.h: Update.
3731 * gnulib/import/extra/update-copyright: Update.
3732 * gnulib/import/fchdir.c: Update.
3733 * gnulib/import/fcntl.c: Update.
3734 * gnulib/import/fcntl.in.h: Update.
3735 * gnulib/import/fd-hook.c: Update.
3736 * gnulib/import/fd-hook.h: Update.
3737 * gnulib/import/fd-safer-flag.c: Update.
3738 * gnulib/import/fd-safer.c: Update.
3739 * gnulib/import/fdopendir.c: Update.
3740 * gnulib/import/filename.h: Update.
3741 * gnulib/import/filenamecat-lgpl.c: Update.
3742 * gnulib/import/filenamecat.h: Update.
3743 * gnulib/import/flexmember.h: Update.
3744 * gnulib/import/float+.h: Update.
3745 * gnulib/import/float.c: Update.
3746 * gnulib/import/float.in.h: Update.
3747 * gnulib/import/fnmatch.c: Update.
3748 * gnulib/import/fnmatch.in.h: Update.
3749 * gnulib/import/fnmatch_loop.c: Update.
3750 * gnulib/import/fpucw.h: Update.
3751 * gnulib/import/frexp.c: Update.
3752 * gnulib/import/frexpl.c: Update.
3753 * gnulib/import/fstat.c: Update.
3754 * gnulib/import/fstatat.c: Update.
3755 * gnulib/import/getcwd-lgpl.c: Update.
3756 * gnulib/import/getcwd.c: Update.
3757 * gnulib/import/getdtablesize.c: Update.
3758 * gnulib/import/getlogin_r.c: Update.
3759 * gnulib/import/getprogname.c: Update.
3760 * gnulib/import/getprogname.h: Update.
3761 * gnulib/import/gettext.h: Update.
3762 * gnulib/import/gettimeofday.c: Update.
3763 * gnulib/import/glob-libc.h: Update.
3764 * gnulib/import/glob.c: Update.
3765 * gnulib/import/glob.in.h: Update.
3766 * gnulib/import/glob_internal.h: Update.
3767 * gnulib/import/glob_pattern_p.c: Update.
3768 * gnulib/import/globfree.c: Update.
3769 * gnulib/import/hard-locale.c: Update.
3770 * gnulib/import/hard-locale.h: Update.
3771 * gnulib/import/intprops.h: Update.
3772 * gnulib/import/inttypes.in.h: Update.
3773 * gnulib/import/isnan.c: Update.
3774 * gnulib/import/isnand-nolibm.h: Update.
3775 * gnulib/import/isnand.c: Update.
3776 * gnulib/import/isnanl-nolibm.h: Update.
3777 * gnulib/import/isnanl.c: Update.
3778 * gnulib/import/itold.c: Update.
3779 * gnulib/import/libc-config.h: Update.
3780 * gnulib/import/limits.in.h: Update.
3781 * gnulib/import/localcharset.c: Update.
3782 * gnulib/import/localcharset.h: Update.
3783 * gnulib/import/localtime-buffer.c: Update.
3784 * gnulib/import/localtime-buffer.h: Update.
3785 * gnulib/import/lstat.c: Update.
3786 * gnulib/import/m4/00gnulib.m4: Update.
3787 * gnulib/import/m4/__inline.m4: Update.
3788 * gnulib/import/m4/absolute-header.m4: Update.
3789 * gnulib/import/m4/alloca.m4: Update.
3790 * gnulib/import/m4/builtin-expect.m4: Update.
3791 * gnulib/import/m4/canonicalize.m4: Update.
3792 * gnulib/import/m4/chdir-long.m4: Update.
3793 * gnulib/import/m4/close.m4: Update.
3794 * gnulib/import/m4/closedir.m4: Update.
3795 * gnulib/import/m4/configmake.m4: Update.
3796 * gnulib/import/m4/d-ino.m4: Update.
3797 * gnulib/import/m4/d-type.m4: Update.
3798 * gnulib/import/m4/dirent_h.m4: Update.
3799 * gnulib/import/m4/dirfd.m4: Update.
3800 * gnulib/import/m4/dirname.m4: Update.
3801 * gnulib/import/m4/double-slash-root.m4: Update.
3802 * gnulib/import/m4/dup.m4: Update.
3803 * gnulib/import/m4/dup2.m4: Update.
3804 * gnulib/import/m4/eealloc.m4: Update.
3805 * gnulib/import/m4/environ.m4: Update.
3806 * gnulib/import/m4/errno_h.m4: Update.
3807 * gnulib/import/m4/error.m4: Update.
3808 * gnulib/import/m4/exponentd.m4: Update.
3809 * gnulib/import/m4/exponentl.m4: Update.
3810 * gnulib/import/m4/extensions.m4: Update.
3811 * gnulib/import/m4/extern-inline.m4: Update.
3812 * gnulib/import/m4/fchdir.m4: Update.
3813 * gnulib/import/m4/fcntl-o.m4: Update.
3814 * gnulib/import/m4/fcntl.m4: Update.
3815 * gnulib/import/m4/fcntl_h.m4: Update.
3816 * gnulib/import/m4/fdopendir.m4: Update.
3817 * gnulib/import/m4/filenamecat.m4: Update.
3818 * gnulib/import/m4/flexmember.m4: Update.
3819 * gnulib/import/m4/float_h.m4: Update.
3820 * gnulib/import/m4/fnmatch.m4: Update.
3821 * gnulib/import/m4/fnmatch_h.m4: Update.
3822 * gnulib/import/m4/fpieee.m4: Update.
3823 * gnulib/import/m4/frexp.m4: Update.
3824 * gnulib/import/m4/frexpl.m4: Update.
3825 * gnulib/import/m4/fstat.m4: Update.
3826 * gnulib/import/m4/fstatat.m4: Update.
3827 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3828 * gnulib/import/m4/getcwd-path-max.m4: Update.
3829 * gnulib/import/m4/getcwd.m4: Update.
3830 * gnulib/import/m4/getdtablesize.m4: Update.
3831 * gnulib/import/m4/getlogin.m4: Update.
3832 * gnulib/import/m4/getlogin_r.m4: Update.
3833 * gnulib/import/m4/getpagesize.m4: Update.
3834 * gnulib/import/m4/getprogname.m4: Update.
3835 * gnulib/import/m4/gettimeofday.m4: Update.
3836 * gnulib/import/m4/glibc21.m4: Update.
3837 * gnulib/import/m4/glob.m4: Update.
3838 * gnulib/import/m4/glob_h.m4: Update.
3839 * gnulib/import/m4/gnulib-cache.m4: Update.
3840 * gnulib/import/m4/gnulib-common.m4: Update.
3841 * gnulib/import/m4/gnulib-comp.m4: Update.
3842 * gnulib/import/m4/gnulib-tool.m4: Update.
3843 * gnulib/import/m4/hard-locale.m4: Update.
3844 * gnulib/import/m4/include_next.m4: Update.
3845 * gnulib/import/m4/inttypes-pri.m4: Update.
3846 * gnulib/import/m4/inttypes.m4: Update.
3847 * gnulib/import/m4/isnand.m4: Update.
3848 * gnulib/import/m4/isnanl.m4: Update.
3849 * gnulib/import/m4/largefile.m4: Update.
3850 * gnulib/import/m4/limits-h.m4: Update.
3851 * gnulib/import/m4/localcharset.m4: Update.
3852 * gnulib/import/m4/locale-fr.m4: Update.
3853 * gnulib/import/m4/locale-ja.m4: Update.
3854 * gnulib/import/m4/locale-zh.m4: Update.
3855 * gnulib/import/m4/localtime-buffer.m4: Update.
3856 * gnulib/import/m4/longlong.m4: Update.
3857 * gnulib/import/m4/lstat.m4: Update.
3858 * gnulib/import/m4/malloc.m4: Update.
3859 * gnulib/import/m4/malloca.m4: Update.
3860 * gnulib/import/m4/math_h.m4: Update.
3861 * gnulib/import/m4/mbrtowc.m4: Update.
3862 * gnulib/import/m4/mbsinit.m4: Update.
3863 * gnulib/import/m4/mbsrtowcs.m4: Update.
3864 * gnulib/import/m4/mbstate_t.m4: Update.
3865 * gnulib/import/m4/memchr.m4: Update.
3866 * gnulib/import/m4/memmem.m4: Update.
3867 * gnulib/import/m4/mempcpy.m4: Update.
3868 * gnulib/import/m4/memrchr.m4: Update.
3869 * gnulib/import/m4/mkdir.m4: Update.
3870 * gnulib/import/m4/mkstemp.m4: Update.
3871 * gnulib/import/m4/mmap-anon.m4: Update.
3872 * gnulib/import/m4/mode_t.m4: Update.
3873 * gnulib/import/m4/msvc-inval.m4: Update.
3874 * gnulib/import/m4/msvc-nothrow.m4: Update.
3875 * gnulib/import/m4/multiarch.m4: Update.
3876 * gnulib/import/m4/nocrash.m4: Update.
3877 * gnulib/import/m4/off_t.m4: Update.
3878 * gnulib/import/m4/onceonly.m4: Update.
3879 * gnulib/import/m4/open-cloexec.m4: Update.
3880 * gnulib/import/m4/open.m4: Update.
3881 * gnulib/import/m4/openat.m4: Update.
3882 * gnulib/import/m4/opendir.m4: Update.
3883 * gnulib/import/m4/pathmax.m4: Update.
3884 * gnulib/import/m4/rawmemchr.m4: Update.
3885 * gnulib/import/m4/readdir.m4: Update.
3886 * gnulib/import/m4/readlink.m4: Update.
3887 * gnulib/import/m4/realloc.m4: Update.
3888 * gnulib/import/m4/rename.m4: Update.
3889 * gnulib/import/m4/rewinddir.m4: Update.
3890 * gnulib/import/m4/rmdir.m4: Update.
3891 * gnulib/import/m4/save-cwd.m4: Update.
3892 * gnulib/import/m4/secure_getenv.m4: Update.
3893 * gnulib/import/m4/setenv.m4: Update.
3894 * gnulib/import/m4/signal_h.m4: Update.
3895 * gnulib/import/m4/ssize_t.m4: Update.
3896 * gnulib/import/m4/stat-time.m4: Update.
3897 * gnulib/import/m4/stat.m4: Update.
3898 * gnulib/import/m4/std-gnu11.m4: Update.
3899 * gnulib/import/m4/stdbool.m4: Update.
3900 * gnulib/import/m4/stddef_h.m4: Update.
3901 * gnulib/import/m4/stdint.m4: Update.
3902 * gnulib/import/m4/stdio_h.m4: Update.
3903 * gnulib/import/m4/stdlib_h.m4: Update.
3904 * gnulib/import/m4/strchrnul.m4: Update.
3905 * gnulib/import/m4/strdup.m4: Update.
3906 * gnulib/import/m4/strerror.m4: Update.
3907 * gnulib/import/m4/string_h.m4: Update.
3908 * gnulib/import/m4/strstr.m4: Update.
3909 * gnulib/import/m4/strtok_r.m4: Update.
3910 * gnulib/import/m4/sys_socket_h.m4: Update.
3911 * gnulib/import/m4/sys_stat_h.m4: Update.
3912 * gnulib/import/m4/sys_time_h.m4: Update.
3913 * gnulib/import/m4/sys_types_h.m4: Update.
3914 * gnulib/import/m4/tempname.m4: Update.
3915 * gnulib/import/m4/time_h.m4: Update.
3916 * gnulib/import/m4/unistd-safer.m4: Update.
3917 * gnulib/import/m4/unistd_h.m4: Update.
3918 * gnulib/import/m4/warn-on-use.m4: Update.
3919 * gnulib/import/m4/wchar_h.m4: Update.
3920 * gnulib/import/m4/wchar_t.m4: Update.
3921 * gnulib/import/m4/wctype_h.m4: Update.
3922 * gnulib/import/m4/wint_t.m4: Update.
3923 * gnulib/import/malloc.c: Update.
3924 * gnulib/import/malloc/scratch_buffer.h: Update.
3925 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3926 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3927 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3928 * gnulib/import/malloca.c: Update.
3929 * gnulib/import/malloca.h: Update.
3930 * gnulib/import/malloca.valgrind: Update.
3931 * gnulib/import/math.in.h: Update.
3932 * gnulib/import/mbrtowc.c: Update.
3933 * gnulib/import/mbsinit.c: Update.
3934 * gnulib/import/mbsrtowcs-impl.h: Update.
3935 * gnulib/import/mbsrtowcs-state.c: Update.
3936 * gnulib/import/mbsrtowcs.c: Update.
3937 * gnulib/import/memchr.c: Update.
3938 * gnulib/import/memmem.c: Update.
3939 * gnulib/import/mempcpy.c: Update.
3940 * gnulib/import/memrchr.c: Update.
3941 * gnulib/import/mkdir.c: Update.
3942 * gnulib/import/mkstemp.c: Update.
3943 * gnulib/import/msvc-inval.c: Update.
3944 * gnulib/import/msvc-inval.h: Update.
3945 * gnulib/import/msvc-nothrow.c: Update.
3946 * gnulib/import/msvc-nothrow.h: Update.
3947 * gnulib/import/open.c: Update.
3948 * gnulib/import/openat-die.c: Update.
3949 * gnulib/import/openat-priv.h: Update.
3950 * gnulib/import/openat-proc.c: Update.
3951 * gnulib/import/openat.c: Update.
3952 * gnulib/import/openat.h: Update.
3953 * gnulib/import/opendir.c: Update.
3954 * gnulib/import/pathmax.h: Update.
3955 * gnulib/import/pipe-safer.c: Update.
3956 * gnulib/import/rawmemchr.c: Update.
3957 * gnulib/import/readdir.c: Update.
3958 * gnulib/import/readlink.c: Update.
3959 * gnulib/import/realloc.c: Update.
3960 * gnulib/import/ref-add.sin: Update.
3961 * gnulib/import/ref-del.sin: Update.
3962 * gnulib/import/rename.c: Update.
3963 * gnulib/import/rewinddir.c: Update.
3964 * gnulib/import/rmdir.c: Update.
3965 * gnulib/import/same-inode.h: Update.
3966 * gnulib/import/save-cwd.c: Update.
3967 * gnulib/import/save-cwd.h: Update.
3968 * gnulib/import/scratch_buffer.h: Update.
3969 * gnulib/import/secure_getenv.c: Update.
3970 * gnulib/import/setenv.c: Update.
3971 * gnulib/import/signal.in.h: Update.
3972 * gnulib/import/stat-time.c: Update.
3973 * gnulib/import/stat-time.h: Update.
3974 * gnulib/import/stat-w32.c: Update.
3975 * gnulib/import/stat-w32.h: Update.
3976 * gnulib/import/stat.c: Update.
3977 * gnulib/import/stdbool.in.h: Update.
3978 * gnulib/import/stddef.in.h: Update.
3979 * gnulib/import/stdint.in.h: Update.
3980 * gnulib/import/stdio.in.h: Update.
3981 * gnulib/import/stdlib.in.h: Update.
3982 * gnulib/import/str-two-way.h: Update.
3983 * gnulib/import/strchrnul.c: Update.
3984 * gnulib/import/strdup.c: Update.
3985 * gnulib/import/streq.h: Update.
3986 * gnulib/import/strerror-override.c: Update.
3987 * gnulib/import/strerror-override.h: Update.
3988 * gnulib/import/strerror.c: Update.
3989 * gnulib/import/string.in.h: Update.
3990 * gnulib/import/stripslash.c: Update.
3991 * gnulib/import/strnlen1.c: Update.
3992 * gnulib/import/strnlen1.h: Update.
3993 * gnulib/import/strstr.c: Update.
3994 * gnulib/import/strtok_r.c: Update.
3995 * gnulib/import/sys_stat.in.h: Update.
3996 * gnulib/import/sys_time.in.h: Update.
3997 * gnulib/import/sys_types.in.h: Update.
3998 * gnulib/import/tempname.c: Update.
3999 * gnulib/import/tempname.h: Update.
4000 * gnulib/import/time.in.h: Update.
4001 * gnulib/import/unistd--.h: Update.
4002 * gnulib/import/unistd-safer.h: Update.
4003 * gnulib/import/unistd.in.h: Update.
4004 * gnulib/import/unsetenv.c: Update.
4005 * gnulib/import/verify.h: Update.
4006 * gnulib/import/extra/snippet/warn-on-use.h: Update.
4007 * gnulib/import/wchar.in.h: Update.
4008 * gnulib/import/wctype.in.h: Update.
4009 * gnulib/import/xalloc-oversized.h: Update.
4010 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4011 "53e2c179f26a890fa6685af4b6c1397ee370433b".
4012
4013 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
4014
4015 * record-btrace.c (get_thread_current_frame): Remove
4016 old_inferior_ptid.
4017
4018 2018-09-10 Jerome Guitton <guitton@adacore.com>
4019
4020 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
4021 with check_tag to 1 if and only if the type is tagged and the
4022 component being searched cannot been found in the current
4023 view. Otherwise, always call ada_to_fixed_type with
4024 check_tag to 0.
4025
4026 2018-09-10 Xavier Roirand <roirand@adacore.com>
4027
4028 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
4029 declaration.
4030 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
4031 * ada-varobj.c (ada_varobj_get_number_of_children,
4032 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
4033
4034 2018-09-10 Xavier Roirand <roirand@adacore.com>
4035
4036 * ada-valprint.c (ada_value_print): Use type instead of
4037 enclosing type.
4038
4039 2018-09-10 Xavier Roirand <roirand@adacore.com>
4040
4041 * ada-lang.c (ada_value_subscript): Handle case when parameter is
4042 an array of access to unconstrained array.
4043
4044 2018-09-10 Xavier Roirand <roirand@adacore.com>
4045
4046 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
4047 (ada_check_typedef): Use it.
4048
4049 2018-09-10 Xavier Roirand <roirand@adacore.com>
4050
4051 * ada-varobj.c (ada_varobj_describe_struct_child)
4052 (ada_varobj_describe_child): Handle union case like struct one.
4053
4054 2018-09-10 Tom Tromey <tom@tromey.com>
4055
4056 PR python/18380:
4057 * python/python.c (_initialize_python): Make example in "python"
4058 help work in Python 3.
4059
4060 2018-09-10 Eli Zaretskii <eliz@gnu.org>
4061
4062 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
4063 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
4064 $(EXEEXT) to the script, as it is not a program.
4065
4066 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
4067
4068 * python/py-prettyprint.c (pretty_print_one_value): Return
4069 gdbpy_ref<>.
4070 (print_string_repr): Adjust.
4071 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
4072 * python/python-internal.h (apply_varobj_pretty_printer): Return
4073 gdbpy_ref<>.
4074 * varobj.c (varobj_value_get_print_value): Adjust.
4075
4076 2018-09-08 Tom Tromey <tom@tromey.com>
4077
4078 PR python/16047:
4079 * python/py-prettyprint.c (pretty_print_one_value): Check for
4080 to_string method.
4081
4082 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4083
4084 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4085 replace_operator_with_call.
4086
4087 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4088
4089 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4090
4091 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4092
4093 * ada-typeprint.c (print_range): Print the bounds using TYPE
4094 rather than its TYPE_TARGET_TYPE.
4095
4096 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4097
4098 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4099 call to ada_to_fixed_value_create.
4100
4101 2018-09-08 Jerome Guitton <guitton@adacore.com>
4102
4103 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4104
4105 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4106
4107 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4108 by calls to error.
4109
4110 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4111
4112 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4113 Move update of loop variable "fi".
4114
4115 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4116
4117 * ada-lang.c (value_assign_to_component): In the case of
4118 big-endian targets, extract the bits of the given VAL
4119 using an src_offset of zero if container is not a scalar.
4120
4121 2018-09-06 Simon Ser <contact@emersion.fr>
4122
4123 PR gdb/23105
4124 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4125 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4126 * fbsd-tdep.c (fbsd_make_note_desc): New.
4127 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4128 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4129 * target.h (enum target_object) Add FreeBSD-specific
4130 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4131
4132 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4133
4134 * compile/compile-c.h (generate_c_for_variable_locations):
4135 Change reference to pointer.
4136 * compile/compile-c-support.c (compile_program) <compute>:
4137 Likewise.
4138 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4139 (generate_c_for_for_one_variable): Likewise
4140 (generate_c_for_variable_locations): Likewise
4141 * compile/compile-c-types.c (compile_c_instance::convert_type):
4142 Likewise
4143 * compile/compile-cplus-symbols.c (convert_one_symbol):
4144 std::move the scope passed to enter_scope.
4145 * compile/compile-cplus-types.c
4146 (compile_cplus_instance::enter_scope): Make parameter
4147 rvalue-reference.
4148 (compile_cplus_instance::new_scope): Change reference to
4149 pointer.
4150 (compile_cplus_instance::convert_type): Likewise
4151 (compile_cplus_convert_typedef): std::move the scope passed to
4152 enter_scope.
4153 (compile_cplus_convert_struct_or_union): Likewise.
4154 (compile_cplus_convert_enum): Likewise.
4155 (compile_cplus_convert_namespace): Likewise.
4156 * compile/compile-cplus.h (compile_cplus_instance)
4157 <enter_scope>: Make parameter rvalue-reference.
4158 * compile/compile-internal.h (compile_instance)
4159 <get_cached_type>: Likewise
4160 * compile/compile-loc2c.c (push): Likewise
4161 (pushf): Likewise
4162 (unary): Likewise
4163 (binary): Likewise
4164 (print_label): Likewise
4165 (pushf_register_address): Likewise
4166 (pushf_register): Likewise
4167 (do_compile_dwarf_expr_to_c): Likewise
4168 (compile_dwarf_expr_to_c): Likewise
4169 (compile_dwarf_bounds_to_c): Likewise
4170 * compile/compile.c (compile_instance::get_cached_type):
4171 Likewise
4172 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4173 (compile_dwarf_bounds_to_c): Likewise
4174 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4175 (dwarf2_compile_property_to_c): Likewise
4176 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4177 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4178 Likewise
4179
4180 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4181
4182 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4183 * tui/tui-data.c (init_content_element): Don't initialize it.
4184
4185 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4186
4187 * tui/tui-data.h (struct tui_win_info)
4188 <detail::opaque>: Remove.
4189 * tui/tui-data.c (init_win_info): Remove assignment.
4190
4191 2018-09-05 Tom Tromey <tom@tromey.com>
4192
4193 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4194 -Wformat-nonliteral.
4195 * target-float.c (host_float_ops<T>::to_string)
4196 (host_float_ops<T>::from_string): Use
4197 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4198 * configure: Rebuild.
4199
4200 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
4201
4202 * printcmd.c (printf_c_string): Use
4203 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4204 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4205
4206 2018-09-05 Tom Tromey <tom@tromey.com>
4207
4208 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4209
4210 2018-09-05 Tom de Vries <tdevries@suse.de>
4211
4212 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4213 with resolve_abstract_p == true.
4214 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4215 defaulting to false. Propagate resolve_abstract_p to
4216 dwarf2_fetch_die_loc_sect_off.
4217 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4218 parameter, defaulting to false.
4219 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4220 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4221 parameter.
4222 * dwarf2read.h (struct die_info): Forward-declare.
4223 (die_info_ptr): New typedef.
4224 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4225
4226 2018-09-05 Joel Brobecker <brobecker@adacore.com>
4227
4228 GDB 8.2 released.
4229
4230 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
4231 Pedro Alves <palves@redhat.com>
4232
4233 * gnulib/Makefile.in (aclocal_m4_deps): Move to
4234 "aclocal-m4-deps.mk". Include file here.
4235 $(srcdir)/aclocal.m4: Add "configure.ac".
4236 * gnulib/aclocal-m4-deps.mk: New file.
4237 * gnulib/update-gnulib.sh: Automatically update
4238 "aclocal-m4-deps.mk".
4239
4240 2018-09-04 Tom Tromey <tom@tromey.com>
4241
4242 * configure: Rebuild.
4243 * configure.ac: Remove multi-ice code.
4244
4245 2018-09-04 Tom Tromey <tom@tromey.com>
4246
4247 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4248 (ada-exp.o): Update.
4249
4250 2018-09-04 Tom Tromey <tom@tromey.com>
4251
4252 * Makefile.in (printcmd.o, target-float.o): Remove.
4253 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4254
4255 2018-09-04 Tom Tromey <tom@tromey.com>
4256
4257 * gnulib/Makefile.in: Remove obsolete comment.
4258 * Makefile.in: Remove obsolete comment.
4259
4260 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
4261
4262 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4263 line with '+'.
4264
4265 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4266
4267 * riscv-tdep.c: Add 'prologue-value.h' include.
4268 (struct riscv_unwind_cache): New struct.
4269 (riscv_debug_unwinder): New global.
4270 (riscv_scan_prologue): Update arguments, capture register details
4271 from prologue scan.
4272 (riscv_skip_prologue): Reformat arguments line, move end of
4273 prologue calculation into riscv_scan_prologue.
4274 (riscv_frame_cache): Update return type, create
4275 riscv_unwind_cache, scan the prologue, and fill in remaining cache
4276 details.
4277 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4278 (riscv_frame_prev_register): Use the trad_frame within the
4279 riscv_unwind_cache.
4280 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4281 flag.
4282
4283 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4284
4285 * trad-frame.h (trad_frame_set_realreg): Declare.
4286 (trad_frame_set_addr): Declare.
4287 * trad-frame.c (trad_frame_set_realreg): Define new function.
4288 (trad_frame_set_addr): Define new function.
4289 (trad_frame_set_reg_realreg): Use new function.
4290 (trad_frame_set_reg_addr): Use new function.
4291
4292 2018-09-01 Keith Seitz <keiths@redhat.com>
4293
4294 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4295 pulongest instead of "%lld".
4296 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4297 ATTRIBUTE_UNUSED.
4298
4299 2018-08-31 Tom Tromey <tom@tromey.com>
4300
4301 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4302 variant part type.
4303
4304 2018-08-31 Pedro Alves <palves@redhat.com>
4305
4306 * gdbarch.h: Regenerate.
4307
4308 2018-08-31 Pedro Alves <palves@redhat.com>
4309
4310 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4311 * target.h (Hardware watchpoint interfaces): Describe
4312 continuable/steppable/non-steppable watchpoints.
4313 * gdbarch.h, gdbarch.c: Regenerate.
4314
4315 2018-08-31 Pedro Alves <palves@redhat.com>
4316
4317 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4318 Delete.
4319 * s390-linux-nat.c
4320 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4321 * target.h (target_ops::have_continuable_watchpoint): Delete.
4322 (target_have_continuable_watchpoint): Delete.
4323 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4324 * target-delegates.c: Regenerate.
4325
4326 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4327
4328 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4329 the files present in "gnulib/import/m4/".
4330
4331 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4332
4333 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4334 c.sw, c.swsp, and c.sdsp.
4335
4336 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4337
4338 * riscv-tdep.c (struct riscv_inferior_data): Delete.
4339 (riscv_read_misa_reg): Don't cache value read into inferior data.
4340 (riscv_new_inferior_data): Delete.
4341 (riscv_inferior_data_cleanup): Delete.
4342 (riscv_inferior_data): Delete.
4343 (riscv_invalidate_inferior_data): Delete.
4344 (_initialize_riscv_tdep): Remove initialisation of inferior data.
4345
4346 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
4347
4348 * compile/compile-cplus-types.c
4349 (compile_cplus_instance::leave_scope): Take the address of scope
4350 object.
4351 (compile_cplus_instance::convert_qualified_base): Compare quals
4352 to 0.
4353
4354 2018-08-30 Keith Seitz <keiths@redhat.com>
4355
4356 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4357 Use "%s" and host_address_to_string instead of "%p" in printf.
4358
4359 2018-08-29 Keith Seitz <keiths@redhat.com>
4360
4361 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4362 and compile-cplus-types.c.
4363 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4364 * c-lang.c (cplus_language_defn): Set C++ compile functions.
4365 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4366 Declare.
4367 * compile/compile-c-support.c: Include compile-cplus.h.
4368 (load_libcompile): Templatize.
4369 (get_compile_context): "New" function.
4370 (c_get_compile_context): Use get_compile_context.
4371 (cplus_get_compile_context): New function.
4372 (cplus_push_user_expression, cplus_pop_user_expression)
4373 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4374 (cplus_compute_program): Define new structs/functions.
4375 * compile/compile-cplus-symmbols.c: New file.
4376 * compile/compile-cplus-types.c: New file.
4377 * compile/compile-cplus.h: New file.
4378 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4379 Declare.
4380 * compile/compile-object-load.c (get_out_value_type): Use
4381 strncmp_iw when comparing symbol names.
4382 (compile_object_load): Add mst_bss and mst_data.
4383 * compile/compile.c (_initialize_compile): Remove
4384 -Wno-implicit-function-declaration from `compile_args'.
4385 * compile/gcc-cp-plugin.h: New file.
4386 * NEWS: Mention C++ compile support and new debug options.
4387
4388 2018-08-29 Keith Seitz <keiths@redhat.com>
4389
4390 * linespec.c (collect_info::add_symbol): Make virtual.
4391 (struct symbol_searcher_collect_info): New struct.
4392 (symbol_searcher::find_all_symbols): New method.
4393 * symtab.h (class symbol_searcher): New class.
4394
4395 2018-08-29 Keith Seitz <keiths@redhat.com>
4396
4397 * linespec.c (struct linespec) <function_symbols, label_symbols>:
4398 Change to vector of block_symbol. Update all users.
4399 (struct collect_info) <symbols>: Likewise.
4400 (collect_info::add_symbol): Take block_symbol as argument.
4401 Update all callers.
4402 (decode_compound_collector) <m_symbols>: Change type to vector
4403 of block_symbol. Update all users.
4404 (decode_compound_collector::operator ()): Change parameter type
4405 to block_symbol.
4406 (find_method, find_function_symbols, find_linespec_symbols)
4407 (find_label_symbols_in_block, find_label_symbols): Change symbol
4408 vectors to block_symbol vectors.
4409 * symtab.h (symbol_found_callback_ftype): Change parameter type to
4410 block_symbol.
4411
4412 2018-08-29 Keith Seitz <keiths@redhat.com>
4413
4414 * linespec.c (symbolp): Remove typedef and VEC definitions.
4415 (bound_minimal_symbol_d): Likewise.
4416
4417 2018-08-29 Keith Seitz <keiths@redhat.com>
4418
4419 * linespec.c (decode_compound_collector::decode_compound_collector):
4420 Remove initialization for `m_symtabs'.
4421 (decode_compound_collector::release_symbols): Change return type
4422 to std::vector. Update all callers.
4423 (class decode_compound_collector) <m_symbols>: Change type to
4424 std::vector.
4425 (lookup_prefix_sym): Change return type to std::vector. Update all
4426 callers.
4427 (compare_symbols): Remove.
4428 (std_compare_symbols): Rename to `compare_symbols'.
4429 (find_method): Change `sym_classes' parameter to std::vector.
4430 Update all callers. Use std::sort to sort sym_classes.
4431 (find_linespec_symbols): Remove cleanup.
4432
4433 2018-08-29 Keith Seitz <keiths@redhat.com>
4434
4435 * linespec.c (struct linespec) <minimal_symbols>: Change type to
4436 std::vector. Update all users.
4437 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4438 (struct collect_info) <minimal_symbols>: Likewise.
4439 (compare_msymbols): Return bool. Change parameters to const
4440 bound_minimal_symbol references.
4441 (find_method, find_function_symbols, find_linespec_symbols): Change
4442 `minsyms' parameter to std::vector. Update all callers.
4443
4444 2018-08-29 Keith Seitz <keiths@redhat.com>
4445
4446 * linespec.c (struct linespec) <label_symbols>: Change type to
4447 std::vector. Update all users.
4448 (find_label_symbols_in_block): Change `result' parameter to
4449 std::vector. Update all callers.
4450 (find_label_symbols): Return std::vector. Update all callers.
4451
4452 2018-08-29 Keith Seitz <keiths@redhat.com>
4453
4454 * linespec.c (struct linespec) <function_symbols>: Change type to
4455 std::vector. Update all users.
4456 (struct collect_info) <function_symbols>: Likewise.
4457 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4458 (std_compare_symbols): New function.
4459 (find_method, find_function_symbols, find_linespec_symbols)
4460 (find_label_symbols_in_block): Change `symbols' parameter to
4461 std::vector. Update all callers.
4462 (find_label_symbols): Likewise for `function_symbols' and
4463 `label_funcs_ret'.
4464
4465 2018-08-29 Keith Seitz <keiths@redhat.com>
4466
4467 * linespec.c (symtab_vector_up): Define.
4468 (struct linespec) <file_symtabs>: Change type to std::vector *.
4469 Update all uses.
4470 (struct collect_info) <file_symtabs>: Likewise.
4471 (collect_symtabs_from_filename): Return symtab_vector_up.
4472 Update all callers.
4473 (decode_objc): Remove cleanup.
4474 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4475 (symtab_collector::release_symtabs): Return symtab_vector_up.
4476 Update all callers.
4477 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4478 Update all users.
4479 (collect_symtabs_from_filename, symtabs_from_filename): Return
4480 symtab_vector_up. Update all callers.
4481
4482 2018-08-29 Tom Tromey <tom@tromey.com>
4483
4484 * csky-tdep.c (csky_analyze_prologue): Use
4485 core_addr_to_string_nz.
4486
4487 2018-08-29 Tom Tromey <tom@tromey.com>
4488
4489 * windows-nat.c (struct xlate_exception) <them>: Change type to
4490 DWORD.
4491 (xlate): Fix formatting. Remove last entry.
4492 (struct xlate_exception, xlate): Comment out.
4493 (windows_nat_target::resume): Use ranged for.
4494
4495 2018-08-29 Jim Wilson <jimw@sifive.com>
4496
4497 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4498 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4499 of NT_PRFPREG.
4500 (riscv_linux_nat_target::store_registers): Likewise.
4501
4502 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
4503
4504 PR gdb/23555
4505 PR gdb/23558
4506 * gnulib/aclocal.m4: Regenerate.
4507 * gnulib/config.in: Regenerate.
4508 * gnulib/configure: Regenerate.
4509 * gnulib/import/Makefile.am: Update.
4510 * gnulib/import/Makefile.in: Update.
4511 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4512 * gnulib/import/_Noreturn.h: ... this.
4513 * gnulib/import/alloca.in.h: Update.
4514 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4515 * gnulib/import/arg-nonnull.h: ... this.
4516 * gnulib/import/assure.h: Update.
4517 * gnulib/import/at-func.c: Update.
4518 * gnulib/import/basename-lgpl.c: Update.
4519 * gnulib/import/extra/snippet/c++defs.h: Rename to...
4520 * gnulib/import/c++defs.h: ... this.
4521 * gnulib/import/canonicalize-lgpl.c: Update.
4522 * gnulib/import/cdefs.h: Update.
4523 * gnulib/import/chdir-long.c: Update.
4524 * gnulib/import/chdir-long.h: Update.
4525 * gnulib/import/cloexec.c: Update.
4526 * gnulib/import/cloexec.h: Update.
4527 * gnulib/import/close.c: Update.
4528 * gnulib/import/closedir.c: Update.
4529 * gnulib/import/config.charset: Update.
4530 * gnulib/import/dirent-private.h: Update.
4531 * gnulib/import/dirent.in.h: Update.
4532 * gnulib/import/dirfd.c: Update.
4533 * gnulib/import/dirname-lgpl.c: Update.
4534 * gnulib/import/dirname.h: Update.
4535 * gnulib/import/dosname.h: Update.
4536 * gnulib/import/dup-safer-flag.c: Update.
4537 * gnulib/import/dup-safer.c: Update.
4538 * gnulib/import/dup.c: Update.
4539 * gnulib/import/dup2.c: Update.
4540 * gnulib/import/errno.in.h: Update.
4541 * gnulib/import/error.c: Update.
4542 * gnulib/import/error.h: Update.
4543 * gnulib/import/exitfail.c: Update.
4544 * gnulib/import/exitfail.h: Update.
4545 * gnulib/import/extra/update-copyright: Update.
4546 * gnulib/import/fchdir.c: Update.
4547 * gnulib/import/fcntl.c: Update.
4548 * gnulib/import/fcntl.in.h: Update.
4549 * gnulib/import/fd-hook.c: Update.
4550 * gnulib/import/fd-hook.h: Update.
4551 * gnulib/import/fd-safer-flag.c: Update.
4552 * gnulib/import/fd-safer.c: Update.
4553 * gnulib/import/fdopendir.c: Update.
4554 * gnulib/import/filename.h: Update.
4555 * gnulib/import/filenamecat-lgpl.c: Update.
4556 * gnulib/import/filenamecat.h: Update.
4557 * gnulib/import/flexmember.h: Update.
4558 * gnulib/import/float+.h: Update.
4559 * gnulib/import/float.c: Update.
4560 * gnulib/import/float.in.h: Update.
4561 * gnulib/import/fnmatch.c: Update.
4562 * gnulib/import/fnmatch.in.h: Update.
4563 * gnulib/import/fnmatch_loop.c: Update.
4564 * gnulib/import/fpucw.h: Update.
4565 * gnulib/import/frexp.c: Update.
4566 * gnulib/import/frexpl.c: Update.
4567 * gnulib/import/fstat.c: Update.
4568 * gnulib/import/fstatat.c: Update.
4569 * gnulib/import/getcwd-lgpl.c: Update.
4570 * gnulib/import/getcwd.c: Update.
4571 * gnulib/import/getdtablesize.c: Update.
4572 * gnulib/import/getlogin_r.c: Update.
4573 * gnulib/import/getprogname.c: Update.
4574 * gnulib/import/getprogname.h: Update.
4575 * gnulib/import/gettext.h: Update.
4576 * gnulib/import/gettimeofday.c: Update.
4577 * gnulib/import/glob-libc.h: Update.
4578 * gnulib/import/glob.c: Update.
4579 * gnulib/import/glob.in.h: Update.
4580 * gnulib/import/glob_internal.h: Update.
4581 * gnulib/import/glob_pattern_p.c: Update.
4582 * gnulib/import/globfree.c: Update.
4583 * gnulib/import/hard-locale.c: Update.
4584 * gnulib/import/hard-locale.h: Update.
4585 * gnulib/import/intprops.h: Update.
4586 * gnulib/import/inttypes.in.h: Update.
4587 * gnulib/import/isnan.c: Update.
4588 * gnulib/import/isnand-nolibm.h: Update.
4589 * gnulib/import/isnand.c: Update.
4590 * gnulib/import/isnanl-nolibm.h: Update.
4591 * gnulib/import/isnanl.c: Update.
4592 * gnulib/import/itold.c: Update.
4593 * gnulib/import/libc-config.h: Update.
4594 * gnulib/import/limits.in.h: Update.
4595 * gnulib/import/localcharset.c: Update.
4596 * gnulib/import/localcharset.h: Update.
4597 * gnulib/import/localtime-buffer.c: Update.
4598 * gnulib/import/localtime-buffer.h: Update.
4599 * gnulib/import/lstat.c: Update.
4600 * gnulib/import/m4/00gnulib.m4: Update.
4601 * gnulib/import/m4/__inline.m4: Update.
4602 * gnulib/import/m4/absolute-header.m4: Update.
4603 * gnulib/import/m4/alloca.m4: Update.
4604 * gnulib/import/m4/builtin-expect.m4: Update.
4605 * gnulib/import/m4/canonicalize.m4: Update.
4606 * gnulib/import/m4/chdir-long.m4: Update.
4607 * gnulib/import/m4/close.m4: Update.
4608 * gnulib/import/m4/closedir.m4: Update.
4609 * gnulib/import/m4/configmake.m4: Update.
4610 * gnulib/import/m4/d-ino.m4: Update.
4611 * gnulib/import/m4/d-type.m4: Update.
4612 * gnulib/import/m4/dirent_h.m4: Update.
4613 * gnulib/import/m4/dirfd.m4: Update.
4614 * gnulib/import/m4/dirname.m4: Update.
4615 * gnulib/import/m4/double-slash-root.m4: Update.
4616 * gnulib/import/m4/dup.m4: Update.
4617 * gnulib/import/m4/dup2.m4: Update.
4618 * gnulib/import/m4/eealloc.m4: Update.
4619 * gnulib/import/m4/environ.m4: Update.
4620 * gnulib/import/m4/errno_h.m4: Update.
4621 * gnulib/import/m4/error.m4: Update.
4622 * gnulib/import/m4/exponentd.m4: Update.
4623 * gnulib/import/m4/exponentl.m4: Update.
4624 * gnulib/import/m4/extensions.m4: Update.
4625 * gnulib/import/m4/extern-inline.m4: Update.
4626 * gnulib/import/m4/fchdir.m4: Update.
4627 * gnulib/import/m4/fcntl-o.m4: Update.
4628 * gnulib/import/m4/fcntl.m4: Update.
4629 * gnulib/import/m4/fcntl_h.m4: Update.
4630 * gnulib/import/m4/fdopendir.m4: Update.
4631 * gnulib/import/m4/filenamecat.m4: Update.
4632 * gnulib/import/m4/flexmember.m4: Update.
4633 * gnulib/import/m4/float_h.m4: Update.
4634 * gnulib/import/m4/fnmatch.m4: Update.
4635 * gnulib/import/m4/fnmatch_h.m4: Update.
4636 * gnulib/import/m4/fpieee.m4: Update.
4637 * gnulib/import/m4/frexp.m4: Update.
4638 * gnulib/import/m4/frexpl.m4: Update.
4639 * gnulib/import/m4/fstat.m4: Update.
4640 * gnulib/import/m4/fstatat.m4: Update.
4641 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4642 * gnulib/import/m4/getcwd-path-max.m4: Update.
4643 * gnulib/import/m4/getcwd.m4: Update.
4644 * gnulib/import/m4/getdtablesize.m4: Update.
4645 * gnulib/import/m4/getlogin.m4: Update.
4646 * gnulib/import/m4/getlogin_r.m4: Update.
4647 * gnulib/import/m4/getpagesize.m4: Update.
4648 * gnulib/import/m4/getprogname.m4: Update.
4649 * gnulib/import/m4/gettimeofday.m4: Update.
4650 * gnulib/import/m4/glibc21.m4: Update.
4651 * gnulib/import/m4/glob.m4: Update.
4652 * gnulib/import/m4/glob_h.m4: Update.
4653 * gnulib/import/m4/gnulib-cache.m4: Update.
4654 * gnulib/import/m4/gnulib-common.m4: Update.
4655 * gnulib/import/m4/gnulib-comp.m4: Update.
4656 * gnulib/import/m4/gnulib-tool.m4: Update.
4657 * gnulib/import/m4/hard-locale.m4: Update.
4658 * gnulib/import/m4/include_next.m4: Update.
4659 * gnulib/import/m4/inttypes-pri.m4: Update.
4660 * gnulib/import/m4/inttypes.m4: Update.
4661 * gnulib/import/m4/isnand.m4: Update.
4662 * gnulib/import/m4/isnanl.m4: Update.
4663 * gnulib/import/m4/largefile.m4: Update.
4664 * gnulib/import/m4/limits-h.m4: Update.
4665 * gnulib/import/m4/localcharset.m4: Update.
4666 * gnulib/import/m4/locale-fr.m4: Update.
4667 * gnulib/import/m4/locale-ja.m4: Update.
4668 * gnulib/import/m4/locale-zh.m4: Update.
4669 * gnulib/import/m4/localtime-buffer.m4: Update.
4670 * gnulib/import/m4/longlong.m4: Update.
4671 * gnulib/import/m4/lstat.m4: Update.
4672 * gnulib/import/m4/malloc.m4: Update.
4673 * gnulib/import/m4/malloca.m4: Update.
4674 * gnulib/import/m4/math_h.m4: Update.
4675 * gnulib/import/m4/mbrtowc.m4: Update.
4676 * gnulib/import/m4/mbsinit.m4: Update.
4677 * gnulib/import/m4/mbsrtowcs.m4: Update.
4678 * gnulib/import/m4/mbstate_t.m4: Update.
4679 * gnulib/import/m4/memchr.m4: Update.
4680 * gnulib/import/m4/memmem.m4: Update.
4681 * gnulib/import/m4/mempcpy.m4: Update.
4682 * gnulib/import/m4/memrchr.m4: Update.
4683 * gnulib/import/m4/mkdir.m4: Update.
4684 * gnulib/import/m4/mkstemp.m4: Update.
4685 * gnulib/import/m4/mmap-anon.m4: Update.
4686 * gnulib/import/m4/mode_t.m4: Update.
4687 * gnulib/import/m4/msvc-inval.m4: Update.
4688 * gnulib/import/m4/msvc-nothrow.m4: Update.
4689 * gnulib/import/m4/multiarch.m4: Update.
4690 * gnulib/import/m4/nocrash.m4: Update.
4691 * gnulib/import/m4/off_t.m4: Update.
4692 * gnulib/import/m4/onceonly.m4: Update.
4693 * gnulib/import/m4/open-cloexec.m4: Update.
4694 * gnulib/import/m4/open.m4: Update.
4695 * gnulib/import/m4/openat.m4: Update.
4696 * gnulib/import/m4/opendir.m4: Update.
4697 * gnulib/import/m4/pathmax.m4: Update.
4698 * gnulib/import/m4/rawmemchr.m4: Update.
4699 * gnulib/import/m4/readdir.m4: Update.
4700 * gnulib/import/m4/readlink.m4: Update.
4701 * gnulib/import/m4/realloc.m4: Update.
4702 * gnulib/import/m4/rename.m4: Update.
4703 * gnulib/import/m4/rewinddir.m4: Update.
4704 * gnulib/import/m4/rmdir.m4: Update.
4705 * gnulib/import/m4/save-cwd.m4: Update.
4706 * gnulib/import/m4/secure_getenv.m4: Update.
4707 * gnulib/import/m4/setenv.m4: Update.
4708 * gnulib/import/m4/signal_h.m4: Update.
4709 * gnulib/import/m4/ssize_t.m4: Update.
4710 * gnulib/import/m4/stat-time.m4: Update.
4711 * gnulib/import/m4/stat.m4: Update.
4712 * gnulib/import/m4/std-gnu11.m4: Update.
4713 * gnulib/import/m4/stdbool.m4: Update.
4714 * gnulib/import/m4/stddef_h.m4: Update.
4715 * gnulib/import/m4/stdint.m4: Update.
4716 * gnulib/import/m4/stdio_h.m4: Update.
4717 * gnulib/import/m4/stdlib_h.m4: Update.
4718 * gnulib/import/m4/strchrnul.m4: Update.
4719 * gnulib/import/m4/strdup.m4: Update.
4720 * gnulib/import/m4/strerror.m4: Update.
4721 * gnulib/import/m4/string_h.m4: Update.
4722 * gnulib/import/m4/strstr.m4: Update.
4723 * gnulib/import/m4/strtok_r.m4: Update.
4724 * gnulib/import/m4/sys_socket_h.m4: Update.
4725 * gnulib/import/m4/sys_stat_h.m4: Update.
4726 * gnulib/import/m4/sys_time_h.m4: Update.
4727 * gnulib/import/m4/sys_types_h.m4: Update.
4728 * gnulib/import/m4/tempname.m4: Update.
4729 * gnulib/import/m4/time_h.m4: Update.
4730 * gnulib/import/m4/unistd-safer.m4: Update.
4731 * gnulib/import/m4/unistd_h.m4: Update.
4732 * gnulib/import/m4/warn-on-use.m4: Update.
4733 * gnulib/import/m4/wchar_h.m4: Update.
4734 * gnulib/import/m4/wchar_t.m4: Update.
4735 * gnulib/import/m4/wctype_h.m4: Update.
4736 * gnulib/import/m4/wint_t.m4: Update.
4737 * gnulib/import/malloc.c: Update.
4738 * gnulib/import/malloc/scratch_buffer.h: Update.
4739 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4740 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4741 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4742 * gnulib/import/malloca.c: Update.
4743 * gnulib/import/malloca.h: Update.
4744 * gnulib/import/malloca.valgrind: Update.
4745 * gnulib/import/math.in.h: Update.
4746 * gnulib/import/mbrtowc.c: Update.
4747 * gnulib/import/mbsinit.c: Update.
4748 * gnulib/import/mbsrtowcs-impl.h: Update.
4749 * gnulib/import/mbsrtowcs-state.c: Update.
4750 * gnulib/import/mbsrtowcs.c: Update.
4751 * gnulib/import/memchr.c: Update.
4752 * gnulib/import/memmem.c: Update.
4753 * gnulib/import/mempcpy.c: Update.
4754 * gnulib/import/memrchr.c: Update.
4755 * gnulib/import/mkdir.c: Update.
4756 * gnulib/import/mkstemp.c: Update.
4757 * gnulib/import/msvc-inval.c: Update.
4758 * gnulib/import/msvc-inval.h: Update.
4759 * gnulib/import/msvc-nothrow.c: Update.
4760 * gnulib/import/msvc-nothrow.h: Update.
4761 * gnulib/import/open.c: Update.
4762 * gnulib/import/openat-die.c: Update.
4763 * gnulib/import/openat-priv.h: Update.
4764 * gnulib/import/openat-proc.c: Update.
4765 * gnulib/import/openat.c: Update.
4766 * gnulib/import/openat.h: Update.
4767 * gnulib/import/opendir.c: Update.
4768 * gnulib/import/pathmax.h: Update.
4769 * gnulib/import/pipe-safer.c: Update.
4770 * gnulib/import/rawmemchr.c: Update.
4771 * gnulib/import/readdir.c: Update.
4772 * gnulib/import/readlink.c: Update.
4773 * gnulib/import/realloc.c: Update.
4774 * gnulib/import/ref-add.sin: Update.
4775 * gnulib/import/ref-del.sin: Update.
4776 * gnulib/import/rename.c: Update.
4777 * gnulib/import/rewinddir.c: Update.
4778 * gnulib/import/rmdir.c: Update.
4779 * gnulib/import/same-inode.h: Update.
4780 * gnulib/import/save-cwd.c: Update.
4781 * gnulib/import/save-cwd.h: Update.
4782 * gnulib/import/scratch_buffer.h: Update.
4783 * gnulib/import/secure_getenv.c: Update.
4784 * gnulib/import/setenv.c: Update.
4785 * gnulib/import/signal.in.h: Update.
4786 * gnulib/import/stat-time.c: Update.
4787 * gnulib/import/stat-time.h: Update.
4788 * gnulib/import/stat-w32.c: Update.
4789 * gnulib/import/stat-w32.h: Update.
4790 * gnulib/import/stat.c: Update.
4791 * gnulib/import/stdbool.in.h: Update.
4792 * gnulib/import/stddef.in.h: Update.
4793 * gnulib/import/stdint.in.h: Update.
4794 * gnulib/import/stdio.in.h: Update.
4795 * gnulib/import/stdlib.in.h: Update.
4796 * gnulib/import/str-two-way.h: Update.
4797 * gnulib/import/strchrnul.c: Update.
4798 * gnulib/import/strdup.c: Update.
4799 * gnulib/import/streq.h: Update.
4800 * gnulib/import/strerror-override.c: Update.
4801 * gnulib/import/strerror-override.h: Update.
4802 * gnulib/import/strerror.c: Update.
4803 * gnulib/import/string.in.h: Update.
4804 * gnulib/import/stripslash.c: Update.
4805 * gnulib/import/strnlen1.c: Update.
4806 * gnulib/import/strnlen1.h: Update.
4807 * gnulib/import/strstr.c: Update.
4808 * gnulib/import/strtok_r.c: Update.
4809 * gnulib/import/sys_stat.in.h: Update.
4810 * gnulib/import/sys_time.in.h: Update.
4811 * gnulib/import/sys_types.in.h: Update.
4812 * gnulib/import/tempname.c: Update.
4813 * gnulib/import/tempname.h: Update.
4814 * gnulib/import/time.in.h: Update.
4815 * gnulib/import/unistd--.h: Update.
4816 * gnulib/import/unistd-safer.h: Update.
4817 * gnulib/import/unistd.in.h: Update.
4818 * gnulib/import/unsetenv.c: Update.
4819 * gnulib/import/verify.h: Update.
4820 * gnulib/import/extra/snippet/warn-on-use.h: Update.
4821 * gnulib/import/wchar.in.h: Update.
4822 * gnulib/import/wctype.in.h: Update.
4823 * gnulib/import/xalloc-oversized.h: Update.
4824 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4825 "53e2c179f26a890fa6685af4b6c1397ee370433b".
4826
4827 2018-08-16 Gary Benson <gbenson@redhat.com>
4828
4829 PR gdb/13000:
4830 * gdb/main.c (captured_main_1): Exit with nonzero status
4831 in batch mode if the last command to be executed failed.
4832 * NEWS: Mention the above.
4833
4834 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
4835
4836 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4837 end of warning message.
4838
4839 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4840
4841 PR gdb/22943:
4842 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4843 (aarch64_extract_return_value): Use
4844 aapcs_is_vfp_call_or_return_candidate.
4845 (aarch64_return_in_memory): Likewise.
4846 (aarch64_store_return_value): Likewise.
4847
4848 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4849
4850 * aarch64-tdep.c
4851 (aapcs_is_vfp_call_or_return_candidate): Make static
4852 (pass_in_v_or_stack): Remove function.
4853 (pass_in_v_vfp_candidate): New function.
4854 (aarch64_push_dummy_call): Check for float register candidates.
4855
4856 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4857
4858 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4859 (aapcs_is_vfp_call_or_return_candidate_1): New function.
4860 (aapcs_is_vfp_call_or_return_candidate): Likewise.
4861
4862 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4863
4864 PR build/23399
4865 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4866 (struct ipa_sym_addresses): Rename to...
4867 (struct ipa_sym_addresses_common): ... this.
4868 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4869
4870 2018-08-28 Tom Tromey <tom@tromey.com>
4871
4872 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4873 (token_fifo): Now a std::vector.
4874 (yylex, c_parse): Update.
4875 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4876 (token_fifo): Now a std::vector.
4877 (yylex, d_parse): Update.
4878 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4879 (token_fifo): Now a std::vector.
4880 (yylex, go_parse): Update.
4881
4882 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
4883
4884 * parser-defs.h (struct type_stack) <elements>: Change type to
4885 std::vector<union type_stack_elt>.
4886 <depth, size>: Remove.
4887 * parse.c (parse_exp_in_context_1): Adjust.
4888 (type_stack_reserve): Remove.
4889 (check_type_stack_depth): Remove.
4890 (insert_into_type_stack): Adjust to std::vector.
4891 (insert_type): Likewise.
4892 (push_type): Likewise.
4893 (push_type_int): Likewise.
4894 (insert_type_address_space): Likewise.
4895 (pop_type): Likewise.
4896 (pop_type_int): Likewise.
4897 (pop_typelist): Likewise.
4898 (pop_type_stack): Likewise.
4899 (append_type_stack): Likewise.
4900 (push_type_stack): Likewise.
4901 (get_type_stack): Likewise.
4902 (type_stack_cleanup): Likewise.
4903 (push_typelist): Likewise.
4904 (follow_types): Likewise.
4905 (_initialize_parse): Likewise.
4906
4907 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
4908
4909 * NEWS: Mention csky target.
4910
4911 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
4912 Hafiz Abid Qadeer <abidh@codesourcery.com>
4913 Don Breazeal <donb@codesourcery.com>
4914
4915 * csky-linux-tdep.c: New file.
4916 * csky-tdep.c: Likewise.
4917 * csky-tdep.h: Likewise.
4918 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4919 csky-tdep.o.
4920 (HFILES_NO_SRCDIR): Add csky-tdep.h.
4921 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4922 * configure.tgt: Add csky support.
4923
4924 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
4925
4926 * python/py-framefilter.c (py_print_frame): Print frame architecture
4927 when printing on an MI output.
4928
4929 2018-08-27 Tom Tromey <tom@tromey.com>
4930
4931 PR build/23087:
4932 * configure: Rebuild.
4933 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4934
4935 2018-08-27 Tom Tromey <tom@tromey.com>
4936
4937 * aarch64-linux-tdep.c
4938 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4939 casts to int.
4940
4941 2018-08-27 Tom Tromey <tom@tromey.com>
4942
4943 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4944 unsigned.
4945 (ppc64_standard_linkage1, ppc64_standard_linkage2)
4946 (ppc64_standard_linkage3, ppc64_standard_linkage4)
4947 (ppc64_standard_linkage5, ppc64_standard_linkage6)
4948 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4949 unsigned.
4950
4951 2018-08-27 Tom Tromey <tom@tromey.com>
4952
4953 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4954 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4955
4956 2018-08-27 Tom Tromey <tom@tromey.com>
4957
4958 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4959 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4960 ULONGEST_MAX.
4961 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4962 ULONGEST_MAX.
4963 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4964 ULONGEST_MAX.
4965 * sparc-linux-tdep.c (sparc32_linux_sigframe)
4966 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4967 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4968 ULONGEST_MAX.
4969 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4970 (ppc64_linux_sigaction_tramp_frame)
4971 (ppc32_linux_sighandler_tramp_frame)
4972 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4973 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4974 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4975 * mn10300-linux-tdep.c (am33_linux_sigframe)
4976 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4977 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4978 * mips-linux-tdep.c (mips_linux_o32_sigframe)
4979 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4980 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4981 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4982 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4983 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4984 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4985 * microblaze-linux-tdep.c
4986 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4987 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4988 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4989 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4990 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4991 * common/common-types.h (ULONGEST_MAX): New define.
4992 (CORE_ADDR_MAX): Fix formatting.
4993 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4994 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4995 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4996 (arm_linux_rt_sigreturn_tramp_frame)
4997 (arm_eabi_linux_sigreturn_tramp_frame)
4998 (arm_eabi_linux_rt_sigreturn_tramp_frame)
4999 (thumb2_eabi_linux_sigreturn_tramp_frame)
5000 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
5001 (arm_linux_restart_syscall_tramp_frame)
5002 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
5003 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
5004 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
5005 ULONGEST_MAX.
5006 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
5007
5008 2018-08-27 Tom Tromey <tom@tromey.com>
5009
5010 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
5011 CORE_ADDR_MAX.
5012 * mips-tdep.c (mips_deal_with_atomic_sequence)
5013 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
5014 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
5015 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
5016 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
5017 CORE_ADDR_MAX.
5018 * aarch64-tdep.c (aarch64_software_single_step): Use
5019 CORE_ADDR_MAX.
5020
5021 2018-08-27 Tom Tromey <tom@tromey.com>
5022
5023 * linespec.c (complete_linespec_component): Add cast to "char".
5024 * completer.c (completion_tracker::build_completion_result): Add
5025 cast to "char".
5026
5027 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
5028
5029 * solist.h (struct solist, struct target_so_ops): Fix
5030 indentation.
5031
5032 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
5033
5034 * ada-tasks.c (ada_task_info_s): Remove typedef.
5035 (DEF_VEC_O(ada_task_info_s)): Remove.
5036 (struct ada_tasks_inferior_data): Initialize fields.
5037 <task_list>: Make an std::vector.
5038 (get_ada_tasks_inferior_data): Allocate with new.
5039 (ada_get_task_number): Adjust.
5040 (get_task_number_from_id): Likewise.
5041 (valid_task_id): Likewise.
5042 (ada_get_task_info_from_ptid): Likewise.
5043 (iterate_over_live_ada_tasks): Likewise.
5044 (add_ada_task): Likewise.
5045 (read_known_tasks): Likewise.
5046 (ada_build_task_list): Likewise.
5047 (print_ada_task_info): Likewise.
5048 (info_task): Likewise.
5049 (task_command_1): Likewise.
5050
5051 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
5052
5053 * ada-lang.c (add_angle_brackets): Return std::string.
5054
5055 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
5056
5057 * python/py-threadevent.c (py_get_event_thread): Initialize
5058 pythread.
5059
5060 2018-08-24 Pedro Alves <palves@redhat.com>
5061
5062 * python/py-bpevent.c (create_breakpoint_event_object): Use
5063 copy-initialization.
5064 * python/py-continueevent.c (emit_continue_event): Use
5065 copy-initialization.
5066 * python/py-exitedevent.c (create_exited_event_object): Return a
5067 gdbpy_ref<>.
5068 (emit_exited_event): Use copy-initialization.
5069 * python/py-inferior.c (python_new_inferior)
5070 (python_inferior_deleted, add_thread_object): Use
5071 copy-initialization.
5072 * python/py-infevents.c (create_inferior_call_event_object)
5073 (create_register_changed_event_object)
5074 (create_memory_changed_event_object): Return a gdbpy_ref<>.
5075 (emit_inferior_call_event, emit_memory_changed_event)
5076 (emit_register_changed_event): Use copy-initialization.
5077 * python/py-newobjfileevent.c (create_new_objfile_event_object):
5078 Return a gdbpy_ref<>.
5079 (emit_new_objfile_event): Use copy-initialization.
5080 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5081 (emit_clear_objfiles_event): Use copy-initialization.
5082 * python/py-signalevent.c (create_signal_event_object): Use
5083 copy-initialization.
5084 * python/py-threadevent.c (create_thread_event_object): Use
5085 copy-initialization.
5086
5087 2018-08-24 Pedro Alves <palves@redhat.com>
5088 Simon Marchi <simon.marchi@ericsson.com>
5089
5090 PR gdb/23379
5091 * python/py-continueevent.c: Include "gdbthread.h".
5092 (create_continue_event_object): Add intro comment. Add 'ptid'
5093 parameter. Use it to find thread to pass to
5094 create_thread_event_object.
5095 (emit_continue_event): Pass PTID down to
5096 create_continue_event_object.
5097 * python/py-event.h (py_get_event_thread): Declare.
5098 (create_thread_event_object): Remove default from 'thread'
5099 parameter.
5100 * python/py-stopevent.c (create_stop_event_object): Use
5101 py_get_event_thread.
5102 * python/py-threadevent.c (get_event_thread): Rename to ...
5103 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5104 and use it to find the thread.
5105 (create_thread_event_object): Assert that THREAD isn't null.
5106 Don't find the event thread here.
5107
5108 2018-08-23 Kevin Buettner <kevinb@redhat.com>
5109
5110 * block.h (blockrange, blockranges): New struct declarations.
5111 (struct block): Add new field named `ranges'.
5112 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5113 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5114 macros for accessing ranges in struct block.
5115 (make_blockranges): New declaration.
5116 block.c (make_blockranges): New function.
5117 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5118 for block.
5119 * symtab.h (find_pc_partial_function): Add new parameter `block'.
5120 * blockframe.c (cache_pc_function_block): New static global.
5121 (clear_pc_function_cache): Clear cache_pc_function_block.
5122 (find_pc_partial_function): Move comment to symtab.h. Add
5123 support for non-contiguous blocks.
5124 * cli/cli-cmds.c (block.h): Include.
5125 (print_disassembly): Handle printing of non-contiguous blocks.
5126 (disassemble_current_function): Likewise.
5127 (disassemble_command): Likewise.
5128
5129 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5130 BLOCK_START.
5131 * blockframe.c (get_pc_function_start): Likewise.
5132 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5133 (gcc_symbol_address): Likewise.
5134 * compile/compile-object-run.c (compile_object_run): Likewise.
5135 * compile/compile.c (get_expr_block_and_pc): Likewise.
5136 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5137 (func_addr_to_tail_call_list): Likewise.
5138 * findvar.c (default_read_var_value): Likewise.
5139 * inline-frame.c (inline_frame_this_id): Likewise.
5140 (skip-inline_frames): Likewise.
5141 * infcmd.c (until_next_command): Likewise.
5142 * linespec.c (convert_linespec_to_sals): Likewise.
5143 * parse.c (parse_exp_in_context_1): Likewise.
5144 * printcmd.c (build_address_symbolic): likewise.
5145 (info_address_command): Likewise.
5146 symtab.c (find_function_start_sal): Likewise.
5147 (skip_prologue_sal): Likewise.
5148 (find_function_alias_target): Likewise.
5149 (find_gnu_ifunc): Likewise.
5150 * stack.c (find_frame_funname): Likewise.
5151 * symtab.c (fixup_symbol_section): Likewise.
5152 (find_function_start_sal): Likewise.
5153 (skip_prologue_sal): Likewsie.
5154 (find_function_alias_target): Likewise.
5155 (find_gnu_ifunc): Likewise.
5156 * tracepoint.c (info_scope_command): Likewise.
5157 * value.c (value_fn_field): Likewise.
5158
5159 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5160 in place of find_pc_partial_function.
5161 * blockframe.c (find_function_entry_range_from_pc): New function.
5162 * symtab.h (find_function_entry_range_from_pc): Declare and document.
5163 * objfiles.c (objfile_relocate1): Relocate start and end addresses
5164 for each range in a block.
5165
5166
5167 2018-08-23 Xavier Roirand <roirand@adacore.com>
5168
5169 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5170 incrementation.
5171
5172 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5173
5174 * solib-svr4.c (read_program_headers_from_bfd): Return
5175 gdb::optional<gdb::byte_vector>.
5176 (svr4_exec_displacement): Adjust.
5177
5178 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5179
5180 * solib-svr4.c (read_program_header): Return
5181 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5182 (find_program_interpreter): Return
5183 gdb::optional<gdb::byte_vector>.
5184 (scan_dyntag_auxv): Adjust.
5185 (enable_break): Adjust.
5186 (svr4_exec_displacement): Adjust.
5187
5188 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5189
5190 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5191 * inf-child.c (inf_child_target::terminal_save_inferior): New.
5192
5193 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5194
5195 * guile/scm-string.c (gdbscm_scm_from_printf): Use
5196 string_vprintf.
5197 * guile/scm-utils.c (gdbscm_printf): Likewise.
5198 * serial.c (serial_printf): Likewise.
5199 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5200
5201 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
5202
5203 * stack.c (print_frame): Print frame architecture when printing on
5204 an MI output.
5205 * NEWS: Mention new "arch" attribute in frame output.
5206
5207 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5208
5209 * arch/aarch64.h (aarch64_regnum): Update comment.
5210
5211 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5212
5213 * NEWS: Add SVE to 8.2 section.
5214
5215 2018-08-21 Pedro Alves <palves@redhat.com>
5216
5217 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5218 out from gdbscm_parse_function_args.
5219 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5220 gdbscm_parse_function_args_1.
5221
5222 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
5223
5224 PR gdb/17816
5225 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5226 operator.
5227
5228 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
5229
5230 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5231
5232 2018-08-19 Michael Spang <spang@google.com>
5233
5234 PR gdb/11786
5235 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5236 for PT_TLS segments.
5237
5238 2018-08-18 Kevin Buettner <kevinb@redhat.com>
5239
5240 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5241 dwarf_variable_value.
5242 * dwarf2-frame.c (class dwarf_expr_executor):
5243 Add override for dwarf_variable_value.
5244 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5245 (class symbol_needs_eval_context): Likewise.
5246 (indirect_synthetic_pointer): Add forward declaration.
5247 (sect_variable_value): New function.
5248 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5249 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5250 for DW_OP_GNU_variable_value.
5251
5252 2018-08-16 Tom Tromey <tom@tromey.com>
5253
5254 * top.c (read_command_file): Update.
5255 (command_line_input): Remove "repeat" argument.
5256 * ada-lang.c (get_selections): Update.
5257 * linespec.c (decode_line_2): Update.
5258 * defs.h (command_line_input): Remove argument.
5259 * cli/cli-script.c (read_next_line): Update.
5260 * python/py-gdb-readline.c: Update.
5261
5262 2018-08-17 Tom Tromey <tom@tromey.com>
5263
5264 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5265 command_line_input.
5266
5267 2018-08-15 Tom Tromey <tom@tromey.com>
5268
5269 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5270
5271 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
5272
5273 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5274 If used, use find_pc_partial_function to find address range
5275 to disassemble.
5276 * mi/mi-main.c (mi_cmd_list_features): Report
5277 "data-disassemble-a-option" feature.
5278 * NEWS: Mention new -data-disassemble option -a.
5279
5280 2018-08-13 Tom Tromey <tom@tromey.com>
5281
5282 * common/common-defs.h (_FORTIFY_SOURCE): Define.
5283
5284 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5285
5286 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5287 (aarch64_linux_collect_sve_regset): Likewise.
5288 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5289 * regcache.h (regcache_map_entry_size): New function.
5290
5291 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5292
5293 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5294 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5295 (SVE_HEADER_VL_LENGTH): Likewise.
5296 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5297 (SVE_HEADER_FLAGS_LENGTH): Likewise.
5298 (SVE_HEADER_RESERVED_LENGTH): Likewise.
5299 (SVE_HEADER_SIZE_OFFSET): Likewise.
5300 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5301 (SVE_HEADER_VL_OFFSET): Likewise.
5302 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5303 (SVE_HEADER_FLAGS_OFFSET): Likewise.
5304 (SVE_HEADER_RESERVED_OFFSET): Likewise.
5305 (SVE_HEADER_SIZE): Likewise.
5306 (aarch64_linux_core_read_vq): Add function.
5307 (aarch64_linux_core_read_description): Check for SVE section.
5308
5309 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5310
5311 * aarch64-fbsd-tdep.c
5312 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5313 collect_size.
5314 * aarch64-linux-tdep.c
5315 (aarch64_linux_iterate_over_regset_sections): Likewise.
5316 * alpha-linux-tdep.c
5317 (alpha_linux_iterate_over_regset_sections):
5318 * alpha-nbsd-tdep.c
5319 (alphanbsd_iterate_over_regset_sections): Likewise.
5320 * amd64-fbsd-tdep.c
5321 (amd64fbsd_iterate_over_regset_sections): Likewise.
5322 * amd64-linux-tdep.c
5323 (amd64_linux_iterate_over_regset_sections): Likewise.
5324 * arm-bsd-tdep.c
5325 (armbsd_iterate_over_regset_sections): Likewise.
5326 * arm-fbsd-tdep.c
5327 (arm_fbsd_iterate_over_regset_sections): Likewise.
5328 * arm-linux-tdep.c
5329 (arm_linux_iterate_over_regset_sections): Likewise.
5330 * corelow.c (get_core_registers_cb): Likewise.
5331 (core_target::fetch_registers): Likewise.
5332 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5333 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5334 * gdbarch.h (void): Regenerate.
5335 * gdbarch.sh: Add supply_size and collect_size.
5336 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5337 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5338 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5339 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5340 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5341 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5342 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5343 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5344 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5345 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5346 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5347 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5348 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5349 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5350 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5351 Likewise.
5352 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5353 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5354 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5355 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5356 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5357 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5358 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5359 Likewise.
5360 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5361 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5362 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5363 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5364 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5365 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5366 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5367 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5368
5369 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
5370
5371 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5372 with string_printf.
5373
5374 2018-08-10 Keith Seitz <keiths@redhat.com>
5375
5376 * compile/compile-c-support.c (add_code_header, add_code_footer):
5377 Move into policy class.
5378 (c_push_user_expression, pop_user_expression_nop)
5379 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5380 (compile_program): New host class.
5381 (c_compile_program): New typedef.
5382 (c_compute_porgram): Use c_compile_program.
5383
5384 2018-08-10 Keith Seitz <keiths@redhat.com>
5385
5386 * compile/compile-internal.h (compile_instance::~compile_instance):
5387 Remove calls to htab_delete.
5388 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5389 * compile.c (compile_instance::compile_instance): Initialize
5390 htab unique pointers.
5391 (compile_instance::get_cached_type, compile_instance::insert_type)
5392 (compile_instance::error_symbol_once): Update for unique_ptr.
5393
5394 2018-08-10 Keith Seitz <keiths@redhat.com>
5395
5396 * compile/compile-c-symbols.c (struct symbol_error)
5397 (hash_symbol_error, eq_symbol_error, del_symbol_error)
5398 (compile_instance::insert_symbol_error)
5399 (compile_instance::error_symbol_once): Move to ...
5400 * compile/compile.c: ... here.
5401
5402 2018-08-10 Keith Seitz <keiths@redhat.com>
5403
5404 * compile/compile-c-support.c (c_get_compile_context): Use `new'
5405 instead of `new_compile_instance'.
5406 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5407 Update description.
5408 If the symbol error map is not initialized, create it.
5409 (generate_c_for_for_one_symbol): Do not check/initialize
5410 the symbol error map.
5411 * compile/compile-c-types.c (compile_c_instance): Make a class.
5412 Update all callers.
5413 (compile_instance::compile_instance): Initialize the type cache.
5414 (get_cached_type): New function.
5415 (insert_type): Update description.
5416 (compile_c_instance::m_default_cflags): Define.
5417 (convert_type): Update description. Use get_cached_type.
5418 (delete_instance): Moved to destructor.
5419 (new_compile_instance): Moved to constructor.
5420 * compile/compile-c.h (compile_c_instance): Make class inheriting
5421 from compile_instance.
5422 <base>: Remove field.
5423 <type_map, symbol_err_map>: Move to base class.
5424 <c_plugin>: Rename to `m_plugin' and remove pointer type.
5425 * compile/compile-internal.h (compile_instance): Make class.
5426 <type_map_t, symbol_err_map_t>: Define.
5427 <fe>: Rename to `m_gcc_fe'.
5428 <scope, block, gcc_target_options>: Add `m_' prefix.
5429 <m_type_map, m_symbol_err_map>: New fields, moved from
5430 compile_c_instance.
5431 <destroy>: Remove.
5432 (convert_type, new_compile_instance): Remove.
5433 * compile/compile.c (cleanup_compile_instance): Remove.
5434 (compile_to_object): Use unique_ptr to eliminate cleanups.
5435 (compile_instance::set_print_callback, compile_instance::version)
5436 (compile_instance::set_verbose)
5437 (compile_instance::set_driver_filename)
5438 (compile_instance::set_triplet_regexp)
5439 (compile_instance::set_arguments)
5440 (compile_instance::set_source_file)
5441 (compile_instance::compile): Define.
5442
5443 2018-08-10 Keith Seitz <keiths@redhat.com>
5444
5445 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5446 * compile/compile-c-types.c: Define GCC_METHODN macros and include
5447 gcc-c-fe.def to define C plugin.
5448 (delete_instance): Delete `c_plugin'.
5449 (new_compile_instance): Initialize `c_plugin'.
5450 * compile/compile-c.h: Include gcc_c_plugin.h.
5451 (struct compile_c_instance) <c_plugin>: New member.
5452 * gcc-c-plugin.h: New file.
5453 Update all callers with API change.
5454
5455 2018-08-10 Keith Seitz <keiths@redhat.com>
5456
5457 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5458 (HFILES_NO_SRCDIR): ... to here.
5459 Add compile-internal.h and compile-c.h.
5460 * compile/compile-c-support.c: Include compile-c.h.
5461 * compile/compile-c-symbols.c: Include compile-c.h.
5462 (generate_c_for_variable_locations): Update comment.
5463 * compile/compile-c-types.c: Include compile-c.h.
5464 * compile/compile-c.h: New file -- moved C language declarations
5465 from other files here.
5466 * compile/compile-internal.h: Do not include hashtab.h or
5467 common/enum-flags.h.
5468 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5469 (gcc_convert_symbol, gcc_symbol_address)
5470 (generate_c_for_variable_locations, c_get_mode_for_size)
5471 (c_get_range_decl_name): Definitions moved to compile-c.h.
5472 * compile/compile-loc2c.c: Include compile-c.h.
5473
5474 2018-08-10 Keith Seitz <keiths@redhat.com>
5475
5476 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5477 (c_symbol_substitution_name): ... this.
5478 Update all callers.
5479
5480 2018-08-10 Keith Seitz <keiths@redhat.com>
5481
5482 * compile/compile-c-support.c (c_compute_program): Use
5483 unique_xmalloc_ptr to eliminate cleanup.
5484 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5485 Return a unique_xmalloc_ptr and eliminate cleanup.
5486 * compile/compile-internal.h (generate_c_for_variable_locations):
5487 Return unique_xmalloc_ptr and update description.
5488
5489 2018-08-10 Alan Hayward <alan.hayward@arm.com>
5490
5491 * corelow.c (core_target::get_core_register_section): Rename
5492 min_size to section_min_size.
5493
5494 2018-08-09 Jim Wilson <jimw@sifive.com>
5495
5496 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5497 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5498 * NEWS: Mention new GNU/Linux RISC-V target.
5499 * configure.host: Add riscv*-*-linux*.
5500 * configure.nat: Add riscv*.
5501 * configure.tgt: Add riscv*-*-linux*.
5502 * riscv-linux-nat.c: New file.
5503 * riscv-linux-tdep.c: New file.
5504
5505 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5506
5507 * infrun.c (resume): Make static, add forward declaration.
5508 (proceed): Update header comment.
5509 * infrun.h (resume): Delete declaration.
5510
5511 2018-08-09 Tom Tromey <tom@tromey.com>
5512
5513 * riscv-tdep.h: Minor formatting fixes.
5514
5515 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
5516
5517 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5518 * dwarf-index-cache.c (create_dir_and_check): Likewise.
5519 (test_mkdir_recursive): Likewise.
5520 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5521
5522 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5523
5524 * valarith.c (value_subscripted_rvalue): If an array is not in
5525 memory, and we don't know the upper bound, then we can't know that
5526 the requested element exists or not.
5527
5528 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
5529
5530 * target.c (str_comma_list_concat_elem): Fix typo in comment.
5531 (target_options_to_string): Add comment.
5532
5533 2018-08-08 Tom Tromey <tom@tromey.com>
5534
5535 * unittests/scoped_mmap-selftests.c: Check result of "write".
5536
5537 2018-08-08 Jim Wilson <jimw@sifive.com>
5538
5539 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5540 (decode_register_index_short): New.
5541 (decode_j_type_insn, decode_cj_type_insn): New.
5542 (decode_b_type_insn, decode_cb_type_insn): New.
5543 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
5544 local xlen. Check xlen when decoding ambiguous compressed insns. In
5545 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5546 is_c_sw_insn instead of is_sw_insn.
5547 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5548 (riscv_software_single_step): New.
5549 * riscv-tdep.h (riscv_software_single_step): Declare.
5550
5551 * riscv-tdep.c (riscv_isa_xlen): Drop static.
5552 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5553
5554 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
5555
5556 PR gdb/18050:
5557 * target.c (dispose_inferior): Don't dispose of inferiors that are
5558 already killed.
5559
5560 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
5561
5562 * remote.c (remote_target::download_tracepoint): Change char* to
5563 const char*.
5564
5565 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
5566
5567 * target.h (target_options_to_string): Return an std::string.
5568 * target.c (str_comma_list_concat_elem): Return void, use
5569 std::string.
5570 (do_option): Likewise.
5571 (target_options_to_string): Return an std::string.
5572 * linux-nat.c (linux_nat_target::wait): Adjust.
5573 * target-debug.h (target_debug_print_options): Adjust.
5574
5575 2018-08-07 Tom Tromey <tom@tromey.com>
5576
5577 * Makefile.in (CPPFLAGS): New variable.
5578 (INTERNAL_CPPFLAGS): Use it.
5579
5580 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5581
5582 * NEWS: Mention the index cache.
5583
5584 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5585
5586 * common/pathstuff.h (get_standard_cache_dir): New.
5587 * common/pathstuff.c (get_standard_cache_dir): New.
5588 * build-id.h (build_id_to_string): New.
5589 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5590 DEBUG_STR_SUFFIX): Move to here.
5591 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5592 DEBUG_STR_SUFFIX): Move from there.
5593 (write_psymtabs_to_index): Make non-static, add basename
5594 parameter. Write to temporary files, rename when done.
5595 (save_gdb_index_command): Adjust call to
5596 write_psymtabs_to_index.
5597 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5598 field.
5599 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5600 (get_gdb_index_contents_from_cache): New.
5601 (get_gdb_index_contents_from_cache_dwz): New.
5602 (dwarf2_initialize_objfile): Read index from cache.
5603 (dwarf2_build_psymtabs): Save to index.
5604 * dwarf-index-cache.h: New file.
5605 * dwarf-index-cache.c: New file.
5606 * dwarf-index-write.h: New file.
5607
5608 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5609
5610 * gnulib/aclocal.m4: Re-generate.
5611 * gnulib/config.in: Re-generate.
5612 * gnulib/configure: Re-generate.
5613 * gnulib/import/Makefile.am: Re-generate.
5614 * gnulib/import/Makefile.in: Re-generate.
5615 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5616 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5617 * gnulib/import/m4/mkdir.m4: New file.
5618 * gnulib/import/mkdir.c: New file.
5619 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5620 module.
5621
5622 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5623
5624 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5625 * common/scoped_mmap.c: New file.
5626 * common/scoped_mmap.h (destroy): New method.
5627 (~scoped_mmap, reset): Use destroy.
5628 (scoped_mmap): New move constructor.
5629 (mmap_file): New declaration.
5630 * unittests/scoped_mmap-selftests.c (test_normal,
5631 test_invalid_filename, run_tests): New functions.
5632 (_initialize_scoped_mmap_selftests): Register selftest.
5633
5634 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5635
5636 * dwarf2read.c (read_gdb_index_from_section): Rename to...
5637 (read_gdb_index_from_buffer): ... this. Remove section
5638 parameter, add buffer parameter.
5639 (get_gdb_index_contents_ftype,
5640 get_gdb_index_contents_dwz_ftype): New typedefs.
5641 (dwarf2_read_gdb_index): Add callback parameters to get the
5642 index contents.
5643 (get_gdb_index_contents_from_section): New.
5644 (dwarf2_initialize_objfile): Update call to
5645 dwarf2_read_gdb_index.
5646
5647 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5648
5649 * common/filestuff.h (gdb_fopen_cloexec): New overload.
5650 (gdb_open_cloexec): Likewise.
5651 * nat/linux-osdata.c (command_from_pid): Use string_printf.
5652 (commandline_from_pid): Likewise.
5653 (linux_xfer_osdata_threads): Likewise.
5654 (linux_xfer_osdata_fds): Likewise.
5655 * ada-lang.c (is_package_name): Likewise.
5656 * auxv.c (procfs_xfer_auxv): Likewise.
5657 * breakpoint.c (print_one_breakpoint_location): Use
5658 uiout::field_fmt.
5659 (print_one_catch_solib): Use string_printf.
5660 * coff-pe-read.c (add_pe_exported_sym): Likewise.
5661 (add_pe_forwarded_sym): Likewise.
5662 * dwarf2read.c (create_type_unit_group): Likewise.
5663 (build_error_marker_type): Likewise.
5664 * infcall.c (get_function_name): Likewise.
5665 * valprint.c (print_converted_chars_to_obstack): Likewise.
5666 * xtensa-tdep.c (xtensa_register_type): Likewise.
5667
5668 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
5669
5670 * remote.c (remote_target::download_tracepoint): Fix format
5671 string errors.
5672
5673 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5674
5675 * tracefile.c: Include common/byte-vector.h.
5676 (trace_save): Change type of buf to gdb::byte_vector. Initialize
5677 with trace_regblock_size if needed. Update uses of buf.
5678
5679 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5680
5681 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5682 std::vector<unsigned char>.
5683 * tracepoint.c (collection_list::collection_list): Remove
5684 m_regs_mask initializer from initializer list. Resize
5685 m_regs_mask using the largest remote register number.
5686 (collection_list::add_remote_register): Remove size check on
5687 m_regs_mask. Use at to access element.
5688 (collection_list::stringify): Change type of temp_buf to
5689 gdb::char_vector. Update uses of temp_buf. Resize if needed to
5690 stringify the register mask. Use pack_hex_byte for the register
5691 mask.
5692
5693 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5694
5695 * tracepoint.h (class collection_list) <add_register>: Remove.
5696 <add_remote_register, add_ax_registers, add_local_register>:
5697 Declare.
5698 <add_memrange>: Add scope parameter.
5699 * tracepoint.c (encode_actions_1): Likewise.
5700 (collection_list::add_register): Rename to ...
5701 (collection_list::add_remote_register): ... this. Update
5702 comment.
5703 (collection_list::add_ax_registers, add_local_register): New
5704 methods.
5705 (collection_list::add_memrange): Add scope parameter. Call
5706 add_local_register instead of add_register.
5707 (finalize_tracepoint_aexpr): New function.
5708 (collection_list::collect_symbol): Update calls to add_memrange.
5709 Call add_local_register instead of add_register. Call
5710 add_ax_registers. Call finalize_tracepoint_aexpr.
5711 (encode_actions_1): Get remote regnos for $reg action. Call
5712 add_remote_register, add_ax_registers, and add_local_register.
5713 Update call to add_memrange. Call finalize_tracepoint_aexpr.
5714 (validate_actionline): Call finalize_tracepoint_aexpr.
5715
5716 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5717
5718 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5719 Replace array buf with gdb::char_vector buf, of size
5720 get_remote_packet_size (). Replace references to buf and
5721 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
5722 and xsnprintf with snprintf. Raise errors if the buffer is too
5723 small.
5724
5725 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5726
5727 * remote.c (remote_target::download_tracepoint): Fix the has_more
5728 predicate in the QTDP action list iteration.
5729
5730 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5731
5732 * remote.c (remote_target::download_tracepoint): Fix indentation
5733 in for block.
5734
5735 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5736
5737 * proc-api.c (_initialize_proc_api): Remove c, unused.
5738 * procfs.c (procfs_init_inferior): Remove signals, unused.
5739 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5740 unused.
5741
5742 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
5743 Andrew Burgess <andrew.burgess@embecosm.com>
5744
5745 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5746 'W_STOPCODE (0)' as this could be ambiguous.
5747
5748 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
5749
5750 * ser-tcp.c (net_open): Fix thinko when deciding whether to
5751 disable TCP's Nagle algorithm (use "ai_protocol" instead of
5752 "ai_socktype").
5753
5754 2018-08-02 Tom Tromey <tom@tromey.com>
5755
5756 PR symtab/16842.
5757 * dwarf2read.c (read_func_scope): Set symtab on template parameter
5758 symbols.
5759 (process_structure_scope): Likewise.
5760
5761 2018-08-02 Xavier Roirand <roirand@adacore.com>
5762
5763 PR gdb/22629:
5764 * darwin-nat.c (darwin_kill_inferior): Fix handling of
5765 kill inferior.
5766
5767 2018-08-02 Tom Tromey <tom@tromey.com>
5768
5769 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5770 (darwin_suspend_inferior, darwin_resume_inferior)
5771 (darwin_decode_notify_message, darwin_resume_inferior_threads)
5772 (darwin_check_new_threads): Check result of get_darwin_inferior.
5773
5774 2018-07-31 Joel Brobecker <brobecker@adacore.com>
5775
5776 GDB 8.1.1 released.
5777
5778 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
5779
5780 * varobj.c (varobj_get_path_expr_parent): Report an error if
5781 parent is a dynamic varobj.
5782
5783 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5784
5785 * gnulib/aclocal.m4: Re-generate.
5786 * gnulib/config.in: Re-generate.
5787 * gnulib/configure: Re-generate.
5788 * gnulib/import/Makefile.in: Re-generate.
5789 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5790 * gnulib/import/m4/onceonly.m4: Re-generate.
5791
5792 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5793
5794 * target-descriptions.c (struct xml_test_tdesc): New.
5795 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5796 (record_xml_tdesc): Update.
5797 (maintenance_check_xml_descriptions): Update.
5798 * target-descriptions.h (record_xml_tdesc): Update comment.
5799
5800 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
5801
5802 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5803 checking array bounds are defined.
5804
5805 2018-07-30 Tom Tromey <tom@tromey.com>
5806
5807 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5808 irreflexivity violation.
5809
5810 2018-07-30 Tom Tromey <tom@tromey.com>
5811
5812 * cli/cli-decode.c (lookup_cmd): Remove lint code.
5813 * value.c (unpack_long): Remove lint code.
5814 * valops.c (value_ind): Remove lint code.
5815 * valarith.c (value_x_binop, value_x_unop, value_equal)
5816 (value_pos): Remove lint code.
5817
5818 2018-07-28 Tom de Vries <tdevries@suse.de>
5819
5820 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5821 with undefined upper bound as <optimized out>.
5822
5823 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
5824
5825 * gcore.in: Rename variable "name" to "prefix". Expand
5826 "usage" text.
5827
5828 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
5829
5830 * windows-nat.c (windows_nat_target::create_inferior): Update to
5831 call close() in global namespace.
5832
5833 2018-07-26 Tom Tromey <tom@tromey.com>
5834
5835 * dwarf-index-write.c (add_address_entry): Don't add objfile
5836 offsets.
5837 * dbxread.c (find_stab_function): Rename from
5838 find_stab_function_addr. Return a bound_minimal_symbol.
5839 (read_dbx_symtab): Use raw_text_low, raw_text_high.
5840 Don't add objfile offsets.
5841 (end_psymtab): Use raw_text_low, raw_text_high,
5842 MSYMBOL_VALUE_RAW_ADDRESS.
5843 (read_ofile_symtab): Update.
5844 (process_one_symbol): Update.
5845 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5846 offsets.
5847 (dw2_relocate): Remove.
5848 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5849 searching addrmap.
5850 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5851 Update.
5852 (process_psymtab_comp_unit_reader, add_partial_symbol)
5853 (add_partial_subprogram, dwarf2_ranges_read): Update.
5854 (load_partial_dies): Update.
5855 (add_address_entry): Don't add objfile offsets.
5856 (dwarf2_build_include_psymtabs): Update.
5857 (create_addrmap_from_aranges): Don't add objfile offsets.
5858 (dw2_find_pc_sect_compunit_symtab): Update.
5859 * mdebugread.c (parse_symbol): Don't add objfile offsets.
5860 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5861 Update.
5862 (parse_partial_symbols): Don't add objfile offsets. Use
5863 raw_text_low, raw_text_high. Update.
5864 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5865 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5866 or call 'relocate' quick function. Clear psymbol_map.
5867 * psympriv.h (struct partial_symbol) <address>: Add section
5868 offset.
5869 <set_unrelocated_address>: Rename from set_address.
5870 <raw_text_low, raw_text_high>: New methods.
5871 <text_low, text_high>: Add objfile parameter.
5872 (add_psymbol_to_bcache): Add 'section' parameter. Call
5873 set_unrelocated_address.
5874 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5875 (find_pc_psymbol): Update.
5876 (fixup_psymbol_section, relocate_psymtabs): Remove.
5877 (dump_psymtab, psym_functions): Update.
5878 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5879 parameter.
5880 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5881 (start_psymtab_common): Update.
5882 * symfile-debug.c (debug_qf_relocate): Remove.
5883 (debug_sym_quick_functions): Update.
5884 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5885 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5886 Update.
5887
5888 2018-07-26 Tom Tromey <tromey@redhat.com>
5889
5890 * dbxread.c (end_psymtab): Use text_high_valid and
5891 text_low_valid.
5892 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5893 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5894 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5895 Update comment.
5896 <text_low_valid, text_high_valid>: New fields.
5897 <set_text_low, set_text_high>: Update.
5898 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5899
5900 2018-07-26 Tom Tromey <tom@tromey.com>
5901
5902 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5903 Update.
5904 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5905 textlow and texthigh fields.
5906 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5907 Update.
5908 * mdebugread.c (parse_lines, parse_partial_symbols)
5909 (psymtab_to_symtab_1): Update.
5910 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5911 Rename fields. Update comment. Now private.
5912 <text_low, text_high, set_text_low, set_text_high>: New methods.
5913 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5914 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5915 (start_psymtab_common, maintenance_info_psymtabs)
5916 (maintenance_check_psymtabs): Update.
5917 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5918 texthigh fields.
5919 (scan_xcoff_symtab): Update.
5920
5921 2018-07-26 Tom Tromey <tromey@redhat.com>
5922
5923 * psympriv.h (struct partial_symbol) <unrelocated_address,
5924 address, set_address>: New methods.
5925 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5926 (fixup_psymbol_section, relocate_psymtabs): Update.
5927 (print_partial_symbols): Add 'objfile' parameter. Update.
5928 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5929 Update.
5930
5931 2018-07-26 Tom Tromey <tom@tromey.com>
5932
5933 * dwarf-index-write.c (write_psymbols, debug_names::insert)
5934 (debug_names::write_psymbols): Update.
5935 * psympriv.h (struct partial_symbol): Derive from
5936 general_symbol_info.
5937 <obj_section>: New method.
5938 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5939 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5940 (find_pc_sect_psymbol, fixup_psymbol_section)
5941 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5942 (print_partial_symbols, recursively_search_psymtabs)
5943 (compare_psymbols, psymbol_hash, psymbol_compare)
5944 (add_psymbol_to_bcache, maintenance_check_psymtabs)
5945 (psymbol_name_matches, psym_fill_psymbol_map): Update.
5946
5947 2018-07-26 Tom Tromey <tromey@redhat.com>
5948
5949 * dbxread.c (end_psymtab): Remove dead code.
5950
5951 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
5952
5953 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5954 DWARF unwinders are disabled.
5955 * dwarf2-frame.c: Add dwarf2read.h include.
5956 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5957 disabled.
5958 (dwarf2_frame_unwinders_enabled_p): Define.
5959 (show_dwarf_unwinders_enabled_p): New function.
5960 (_initialize_dwarf2_frame): Register switch to control DWARF
5961 unwinder use.
5962 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5963 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5964 (show_dwarf_cmdlist): Remove static keyword.
5965 * dwarf2read.h (set_dwarf_cmdlist): Declare.
5966 (show_dwarf_cmdlist): Declare.
5967 * NEWS: Document new feature.
5968
5969 2018-07-26 Tom de Vries <tdevries@suse.de>
5970
5971 PR breakpoints/23366
5972 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5973
5974 2018-07-26 Tom de Vries <tdevries@suse.de>
5975
5976 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5977 DW_AT_count can't be translated to a dynamic prop.
5978
5979 2018-07-25 Tom de Vries <tdevries@suse.de>
5980
5981 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5982 try/catch.
5983
5984 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
5985
5986 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5987
5988 2018-07-25 Joel Brobecker <brobecker@adacore.com>
5989
5990 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5991
5992 2018-07-24 Keith Seitz <keiths@redhat.comt
5993
5994 PR symtab/23010
5995 * dwarf2read.c (dw2_add_symbol_to_list): New function.
5996 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5997 instead of add_symbol_to_list.
5998 (read_file_scope): Call prepare_one_comp_unit before reading
5999 any other DIEs.
6000
6001 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
6002
6003 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
6004
6005 2018-07-24 Tom Tromey <tom@tromey.com>
6006
6007 * utils.c (malloc, realloc, free): Don't declare.
6008 * configure, config.in: Rebuild.
6009 * configure.ac: Don't check for declarations of free, malloc, or
6010 realloc.
6011
6012 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
6013
6014 * aarch64-linux-nat.c
6015 (aarch64_linux_nat_target::stopped_data_address): Remove unused
6016 variable.
6017 * arm-linux-nat.c (fetch_regs): Likewise.
6018 (store_regs): Likewise.
6019 (fetch_vfp_regs): Likewise.
6020 (store_vfp_regs): Likewise.
6021 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
6022 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
6023 (arm_linux_nat_target::insert_watchpoint): Likewise.
6024 (arm_linux_nat_target::remove_watchpoint): Likewise.
6025 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
6026 Likewise.
6027 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
6028 Likewise.
6029 * ppc-linux-nat.c (fetch_register): Likewise.
6030 (fetch_all_gp_regs): Likewise.
6031 (fetch_ppc_registers): Likewise.
6032 (store_all_gp_regs): Likewise.
6033 (store_ppc_registers): Likewise.
6034 (hwdebug_insert_point): Likewise.
6035 (can_use_watchpoint_cond_accel): Likewise.
6036 * remote-sim.c (gdb_os_write_stdout): Likewise.
6037
6038 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
6039 Tom Tromey <tom@tromey.com>
6040
6041 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
6042 test for it.
6043 * configure: Rebuild.
6044
6045 2018-07-22 Tom Tromey <tom@tromey.com>
6046
6047 * regformats/regdat.sh: Define xmltarget_${name} inside
6048 #ifndef IN_PROCESS_AGENT.
6049
6050 2018-07-22 Tom Tromey <tom@tromey.com>
6051
6052 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
6053
6054 2018-07-22 Tom Tromey <tom@tromey.com>
6055
6056 * symfile.c (reread_symbols): Notify iter, not objfile.
6057
6058 2018-07-22 Tom Tromey <tom@tromey.com>
6059
6060 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
6061 Use arch_ops.
6062 (ravenscar_thread_target::prepare_to_store): Likewise.
6063
6064 2018-07-22 Tom Tromey <tom@tromey.com>
6065
6066 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
6067 unused variable. Call value_fetch_lazy when needed.
6068 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
6069 Remove unused variable. Call value_fetch_lazy when needed.
6070
6071 2018-07-22 Tom Tromey <tom@tromey.com>
6072
6073 * m32c-tdep.c (mark_dma): Return void.
6074 (make_regs): Remove unused declarations.
6075
6076 2018-07-22 Tom Tromey <tom@tromey.com>
6077
6078 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6079 cmdscm_get_valid_command_smob_arg_unsafe for effect.
6080 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6081 bkscm_get_valid_block_smob_arg_unsafe for effect.
6082
6083 2018-07-22 Tom Tromey <tom@tromey.com>
6084
6085 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6086 value_type.
6087
6088 2018-07-22 Tom Tromey <tom@tromey.com>
6089
6090 * windows-nat.c (saved_context): Conditionally define.
6091 * remote.c (remote_target::remote_btrace_maybe_reopen):
6092 Conditionally declare "warned".
6093 * inflow.c (sigquit_ours): Conditionally define.
6094 (new_tty): Move "tty" declaration inside #if.
6095 * guile/guile.c (guile_datadir): Conditionally define.
6096 * charset.c (set_be_le_names): Move some declarations inside #if.
6097 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6098 #if.
6099 (parse_xml_btrace_conf): Likewise.
6100
6101 2018-07-22 Tom Tromey <tom@tromey.com>
6102
6103 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6104
6105 2018-07-22 Tom Tromey <tom@tromey.com>
6106
6107 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6108 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6109 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6110 * buildsym-legacy.c (get_macro_table): Remove unused variable.
6111 * stack.c (frame_apply_level_command): Remove unused variable.
6112 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6113 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6114 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6115 unused variable.
6116 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6117 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6118 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6119 variable.
6120 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6121 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6122 variable.
6123 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6124 Remove unused variable.
6125 * cli/cli-script.c (recurse_read_control_structure): Remove unused
6126 variable.
6127 * common/tdesc.c (print_xml_feature::visit): Remove unused
6128 variable.
6129 * compile/compile-object-load.c (store_regs): Remove unused
6130 variables.
6131 * complaints.c (clear_complaints): Remove unused variable.
6132 * corelow.c (core_target_open): Remove unused variable.
6133 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6134 variable.
6135 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6136 variable.
6137 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6138 variable.
6139 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6140 variable.
6141 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6142 variable.
6143 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6144 variable.
6145 * ia64-tdep.c (examine_prologue): Remove unused variable.
6146 * infcall.c (run_inferior_call): Remove unused variable.
6147 * inferior.c (exit_inferior): Remove unused variable.
6148 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6149 * linespec.c (decode_line_2): Remove unused variable.
6150 * linux-nat.c (super_close): Remove.
6151 * linux-tdep.c (linux_info_proc): Remove unused variable.
6152 * mi/mi-main.c (mi_execute_command): Remove unused variable.
6153 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6154 Remove unused variable.
6155 * parse.c (find_minsym_type_and_address): Remove unused variable.
6156 * printcmd.c (info_symbol_command, printf_floating): Remove unused
6157 variable.
6158 * python/py-breakpoint.c (bppy_set_commands): Remove unused
6159 variable.
6160 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6161 variables.
6162 * record-btrace.c (record_btrace_target::store_registers): Remove
6163 unused variable.
6164 (cmd_show_record_btrace_cpu): Remove unused variable.
6165 * riscv-tdep.c (riscv_register_reggroup_p)
6166 (riscv_push_dummy_call, riscv_return_value): Remove unused
6167 variable.
6168 * rust-exp.y (literal): Remove unused variable.
6169 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6170 unused variable.
6171 <STRUCTOP_ANONYMOUS>: Likewise.
6172 * s390-linux-tdep.c (s390_linux_init_abi_31)
6173 (s390_linux_init_abi_64): Remove unused variable.
6174 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6175 (file_select_thread, net_windows_open, _initialize_ser_windows):
6176 Remove unused variables.
6177 * symtab.c (find_pc_sect_line): Remove unused variable.
6178 * target-memory.c (compute_garbled_blocks): Remove unused
6179 variable.
6180 (target_write_memory_blocks): Remove unused variable.
6181 * target.c (target_stack::unpush): Remove unused variables.
6182 * tracepoint.c (start_tracing, all_tracepoint_actions)
6183 (merge_uploaded_trace_state_variables)
6184 (print_one_static_tracepoint_marker): Remove unused variable.
6185 * unittests/basic_string_view/element_access/char/1.cc (test01):
6186 Remove unused variable.
6187 * windows-nat.c (windows_continue, windows_add_all_dlls)
6188 (do_initial_windows_stuff, windows_nat_target::create_inferior):
6189 Remove unused variables.
6190
6191 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
6192
6193 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6194 attr_profile in HAVE_ELF.
6195 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6196 HAVE_ELF.
6197
6198 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
6199
6200 * frame.c (frame_register_unwind): Change parameter name.
6201 (frame_unwind_register): Likewise.
6202 (frame_unwind_register_value): Likewise.
6203 (frame_unwind_register_signed): Likewise.
6204 (frame_unwind_register_unsigned): Likewise.
6205 * frame.h (frame_register_unwind): Likewise.
6206 (frame_unwind_register): Likewise.
6207 (frame_unwind_register_value): Likewise.
6208 (frame_unwind_register_signed): Likewise.
6209 (frame_unwind_register_unsigned): Likewise.
6210 (frame_unwind_arch): Likewise.
6211
6212 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6213
6214 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6215 ISA maintenance.
6216
6217 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6218
6219 * mips-linux-nat.c (mips_linux_nat_target::read_description):
6220 Call `get_ptrace_pid' rather than extracting the ptrace PID by
6221 hand.
6222
6223 2018-07-20 Keith Seitz <keiths@redhat.com>
6224
6225 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6226 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6227 m_compunit_symtab, m_language>: Add "m_" prefix.
6228 Update all uses.
6229 * buildsym.c: Update all uses.
6230
6231 2018-07-20 Tom Tromey <tom@tromey.com>
6232
6233 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6234 * buildsym.h (record_line_ftype): Remove typedef.
6235
6236 2018-07-20 Tom Tromey <tom@tromey.com>
6237
6238 * buildsym-legacy.h (augment_type_symtab): Don't declare.
6239 (end_expandable_symtab): Likewise.
6240 (end_symtab_get_static_block): Likewise.
6241 (end_symtab_from_static_block): Likewise.
6242 * buildsym-legacy.c (augment_type_symtab): Remove.
6243 (end_expandable_symtab): Remove.
6244 (end_symtab_get_static_block): Remove.
6245 (end_symtab_from_static_block): Remove.
6246
6247 2018-07-20 Tom Tromey <tom@tromey.com>
6248
6249 * dwarf2read.c: Include buildsym.h.
6250 (struct dwarf2_cu) <builder>: New method.
6251 (fixup_go_packaging): Update.
6252 (process_full_comp_unit, process_full_type_unit): Update. Don't
6253 use scoped_free_pendings.
6254 (using_directives): Add "cu" parameter, remove "language".
6255 (read_import_statement, setup_type_unit_groups, )
6256 (read_func_scope, read_lexical_block_scope)
6257 (dwarf2_record_block_ranges, read_namespace): Update.
6258 (lnp_state_machine::lnp_state_machine): Add cu parameter.
6259 (lnp_state_machine::handle_end_sequence): Update.
6260 (class lnp_state_machine) <m_cu>: New member.
6261 <m_record_line_callback>: Remove.
6262 <m_currently_recording_lines>: New member.
6263 (lnp_state_machine::handle_set_file): Update.
6264 (noop_record_line): Remove.
6265 (dwarf_record_line_p): Add cu parameter.
6266 (dwarf_record_line_1, dwarf_finish_line): Likewise.
6267 (lnp_state_machine::record_line)
6268 (lnp_state_machine::lnp_state_machine)
6269 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6270 (dwarf_decode_lines): Update.
6271 (dwarf2_start_subfile): Add cu parameter.
6272 (dwarf2_start_symtab, new_symbol): Update.
6273 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6274 Remove dwarf2_per_objfile parameter.
6275 (dwarf_decode_macros): Update.
6276
6277 2018-07-20 Tom Tromey <tom@tromey.com>
6278
6279 * stabsread.c (define_symbol): Update.
6280 * buildsym-legacy.h (get_buildsym_compunit): Declare.
6281 * dwarf2read.c (new_symbol): Update.
6282 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6283 * cp-namespace.c: Include buildsym.h.
6284 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6285 * buildsym-legacy.c (get_buildsym_compunit): New function.
6286
6287 2018-07-20 Tom Tromey <tom@tromey.com>
6288
6289 * xcoffread.c: Include buildsym-legacy.h.
6290 * windows-nat.c: Include buildsym-legacy.h.
6291 * stabsread.c: Include buildsym-legacy.h.
6292 * mdebugread.c: Include buildsym-legacy.h.
6293 * buildsym-legacy.h: New file.
6294 * buildsym-legacy.c: New file, from buildsym.c.
6295 * go32-nat.c: Include buildsym-legacy.h.
6296 * dwarf2read.c: Include buildsym-legacy.h.
6297 * dbxread.c: Include buildsym-legacy.h.
6298 * cp-namespace.c: Include buildsym-legacy.h.
6299 * coffread.c: Include buildsym-legacy.h.
6300 * buildsym.h: Move some contents to buildsym-legacy.h.
6301 * buildsym.c: Include buildsym-legacy.h. Move many functions to
6302 buildsym-legacy.c.
6303 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6304
6305 2018-07-20 Tom Tromey <tom@tromey.com>
6306
6307 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6308 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6309 (buildsym_compunit::buildsym_compunit)
6310 (buildsym_compunit::~buildsym_compunit)
6311 (buildsym_compunit::get_macro_table): Define.
6312
6313 2018-07-20 Tom Tromey <tom@tromey.com>
6314
6315 * buildsym.c (reset_symtab_globals): Remove.
6316 (buildsym_compunit::end_symtab_from_static_block): Update.
6317 (buildsym_compunit::augment_type_symtab): Update.
6318 (end_symtab_from_static_block): Call free_buildsym_compunit.
6319 (augment_type_symtab, end_symtab, end_expandable_symtab):
6320 Likewise.
6321
6322 2018-07-20 Tom Tromey <tom@tromey.com>
6323
6324 * arch-utils.c: Do not include buildsym.h.
6325 * mipsread.c: Do not include buildsym.h.
6326 * machoread.c: Do not include buildsym.h.
6327 * elfread.c: Do not include buildsym.h.
6328
6329 2018-07-20 Tom Tromey <tom@tromey.com>
6330
6331 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6332 initialization.
6333 (buildsym_compunit): Add new constructor.
6334 (struct buildsym_compunit) <get_last_source_file, finish_block,
6335 record_block_range, start_subfile, patch_subfile_names,
6336 push_subfile, pop_subfile, record_line, get_compunit_symtab,
6337 set_last_source_start_addr, get_last_source_start_addr,
6338 get_local_using_directives, set_local_using_directives,
6339 get_global_using_directives, outermost_context_p,
6340 get_current_context_stack, get_context_stack_depth,
6341 get_current_subfile, get_local_symbols, get_file_symbols,
6342 get_global_symbols, record_debugformat, record_producer,
6343 push_context, pop_context, end_symtab_get_static_block,
6344 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6345 New public methods.
6346 <record_pending_block, finish_block_internal, make_blockvector,
6347 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6348 private methods.
6349 Update all users.
6350
6351 2018-05-22 Tom Tromey <tom@tromey.com>
6352
6353 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6354 parameter.
6355 (finish_block_internal): Update.
6356
6357 2018-07-20 Tom Tromey <tom@tromey.com>
6358
6359 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6360 parameter.
6361 (finish_block_internal): Update.
6362
6363 2018-07-20 Tom Tromey <tom@tromey.com>
6364
6365 * buildsym.h (EXTERN): Don't define or undef.
6366 * buildsym.c (EXTERN): Don't define.
6367
6368 2018-07-20 Tom Tromey <tom@tromey.com>
6369
6370 * buildsym.c: Remove TODO comment.
6371
6372 2018-07-20 Tom Tromey <tom@tromey.com>
6373
6374 * coffread.c (coff_symtab_read): Update.
6375 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6376 (xcoff_new_init): Update.
6377 * mipsread.c (mipscoff_new_init): Update.
6378 * mdebugread.c (mdebug_build_psymtabs): Update.
6379 * elfread.c (elf_new_init): Update.
6380 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6381 Update.
6382 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6383 (coffstab_build_psymtabs, elfstab_build_psymtabs)
6384 (stabsect_build_psymtabs): Update.
6385 * buildsym.h (buildsym_init): Don't declare.
6386 * buildsym.c: Update comment.
6387 (prepare_for_building): Remove.
6388 (start_symtab, restart_symtab): Update.
6389 (reset_symtab_globals): Update comment.
6390 (buildsym_init): Remove.
6391
6392 2018-07-20 Tom Tromey <tom@tromey.com>
6393
6394 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6395 * stabsread.c (patch_block_stabs, define_symbol, read_type)
6396 (read_enum_type, common_block_start, common_block_end)
6397 (cleanup_undefined_types_1, finish_global_stabs): Update.
6398 * mdebugread.c (psymtab_to_symtab_1): Update.
6399 * dwarf2read.c (fixup_go_packaging, read_func_scope)
6400 (read_lexical_block_scope, new_symbol): Update.
6401 * dbxread.c (process_one_symbol): Update.
6402 * coffread.c (coff_symtab_read, process_coff_symbol)
6403 (coff_read_enum_type): Update.
6404 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6405 declare.
6406 (get_local_symbols, get_file_symbols, get_global_symbols): New
6407 functions.
6408 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6409 m_global_symbols.
6410 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6411 (~scoped_free_pendings): Update.
6412 (finish_block, prepare_for_building, reset_symtab_globals)
6413 (end_symtab_get_static_block, end_symtab_with_blockvector)
6414 (augment_type_symtab, push_context): Update.
6415 (get_local_symbols, get_file_symbols, get_global_symbols): New
6416 functions.
6417 (buildsym_init): Update.
6418
6419 2018-07-20 Tom Tromey <tom@tromey.com>
6420
6421 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6422 (process_full_type_unit): Likewise.
6423 (dwarf2_start_symtab): Set list_in_scope.
6424
6425 2018-07-20 Tom Tromey <tom@tromey.com>
6426
6427 * dwarf2read.c (process_psymtab_comp_unit_reader)
6428 (build_type_psymtabs_reader): Do not set list_in_scope.
6429
6430 2018-07-20 Tom Tromey <tom@tromey.com>
6431
6432 * buildsym.c (free_pendings): Remove.
6433 (add_symbol_to_list, scoped_free_pendings)
6434 (finish_block_internal, buildsym_init): Update.
6435
6436 2018-07-20 Tom Tromey <tom@tromey.com>
6437
6438 * xcoffread.c (read_xcoff_symtab): Update.
6439 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6440 Update.
6441 * dbxread.c (process_one_symbol): Update.
6442 * coffread.c (coff_symtab_read): Update.
6443 * buildsym.h (finish_block): Update.
6444 * buildsym.c (finish_block): Remove "listhead" argument.
6445 (end_symtab_get_static_block): Update.
6446
6447 2018-07-20 Tom Tromey <tom@tromey.com>
6448
6449 * buildsym.h (class scoped_free_pendings): Remove constructor.
6450 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6451 method.
6452 <m_pending_block_obstack, m_pending_blocks>: New members.
6453 (pending_block_obstack, pending_blocks): Remove.
6454 (scoped_free_pendings::scoped_free_pendings): Default.
6455 (~scoped_free_pendings): Update.
6456 (free_pending_blocks): Remove.
6457 (finish_block_internal, record_pending_block, make_blockvector)
6458 (end_symtab_get_static_block, augment_type_symtab, push_context)
6459 (buildsym_init): Update.
6460
6461 2018-07-20 Tom Tromey <tom@tromey.com>
6462
6463 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6464 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6465 members.
6466 (pending_addrmap, pending_addrmap_obstack)
6467 (pending_addrmap_interesting): Remove.
6468 (scoped_free_pendings, record_block_range, make_blockvector)
6469 (prepare_for_building, reset_symtab_globals, buildsym_init):
6470 Update.
6471
6472 2018-07-20 Tom Tromey <tom@tromey.com>
6473
6474 * xcoffread.c (process_linenos): Update.
6475 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6476 * mdebugread.c (psymtab_to_symtab_1): Update.
6477 * dwarf2read.c (setup_type_unit_groups)
6478 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6479 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6480 * dbxread.c (process_one_symbol): Update.
6481 * coffread.c (coff_symtab_read, enter_linenos)
6482 (process_coff_symbol): Update.
6483 * buildsym.h (current_subfile): Don't declare.
6484 (get_current_subfile): Declare.
6485 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6486 member.
6487 (start_subfile, free_buildsym_compunit, push_subfile)
6488 (prepare_for_building, start_symtab): Update.
6489 (get_current_subfile): New function.
6490
6491 2018-07-20 Tom Tromey <tom@tromey.com>
6492
6493 * coffread.c (coff_symtab_read): Update.
6494 * xcoffread.c (read_xcoff_symtab): Update.
6495 * dwarf2read.c (new_symbol): Update.
6496 (read_func_scope, read_lexical_block_scope): Update.
6497 * dbxread.c (process_one_symbol): Update.
6498 * buildsym.h (context_stack, context_stack_depth): Don't declare.
6499 (outermost_context_p): Remove macro.
6500 (outermost_context_p, get_current_context_stack)
6501 (get_context_stack_depth): Declare.
6502 (pop_context): Return struct context_stack.
6503 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6504 member.
6505 (context_stack_size): Remove.
6506 (INITIAL_CONTEXT_STACK_SIZE): Remove.
6507 (prepare_for_building, end_symtab_get_static_block)
6508 (augment_type_symtab, push_context): Update.
6509 (pop_context): Return struct context_stack.
6510 (outermost_context_p, get_current_context_stack)
6511 (get_context_stack_depth): New functions.
6512 (buildsym_init): Update.
6513
6514 2018-07-20 Tom Tromey <tom@tromey.com>
6515
6516 * rust-exp.y: Now a pure parser. Update all rules.
6517 (%union): Move earlier.
6518 (current_parser, work_obstack): Remove globals.
6519 (rust_parser, ~rust_parser): Update.
6520 (class rust_parser) <copy_name, concat3, crate_name, super_name,
6521 lex_character, lex_number, lex_string, lex_identifier,
6522 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6523 convert_name, convert_params_to_expression,
6524 convert_ast_to_expression, ast_basic_type, ast_operation,
6525 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6526 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6527 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6528 ast_array_type, ast_slice_type, ast_reference_type,
6529 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6530 (rust_parse): Update.
6531 (rustyyerror, rustyylex): Add parser parameter.
6532 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6533 (rust_lex_stringish_test, rust_lex_test_sequence)
6534 (rust_lex_test_trailing_dot, rust_lex_test_completion)
6535 (rust_lex_test_push_back, rust_lex_tests): Update.
6536
6537 2018-07-19 Pedro Alves <palves@redhat.com>
6538
6539 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6540 gdb::unique_xmalloc_ptr.
6541 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6542 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6543 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6544 copy-initialization.
6545 * guile/scm-pretty-print.c (ppscm_print_children): Use
6546 gdb::unique_xmalloc_ptr instead of cleanups.
6547 (gdbscm_apply_val_pretty_printer): Remove cleanups.
6548 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6549 gdb::unique_xmalloc_ptr.
6550 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6551 Adjust to use gdb::unique_xmalloc_ptr.
6552 * guile/scm-utils.c (extract_arg): Adjust.
6553 * guile/scm-value.c (gdbscm_value_field): Adjust to use
6554 gdb::unique_xmalloc_ptr instead of a cleanup.
6555
6556 2018-07-19 Tom Tromey <tom@tromey.com>
6557
6558 * utils.c (do_value_free_to_mark)
6559 (make_cleanup_value_free_to_mark): Remove.
6560 * utils.h (make_cleanup_value_free_to_mark): Remove.
6561
6562 2018-07-19 Pedro Alves <palves@redhat.com>
6563
6564 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6565 forwarding reference.
6566
6567 2018-07-18 Pedro Alves <palves@redhat.com>
6568
6569 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6570 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
6571 cleanup.
6572
6573 2018-07-18 Pedro Alves <palves@redhat.com>
6574
6575 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6576 exceptions.
6577 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6578 (gdbscm_wrap): New.
6579 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6580 directly instead of a cleanup.
6581 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6582 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
6583 (vlscm_binop_gdbthrow): New, factored out from ...
6584 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
6585 (vlscm_rich_compare): Use gdbscm_wrap.
6586 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6587 instead of a cleanup.
6588 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6589 cleanup.
6590 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6591 Use xfree directly instead of a cleanup.
6592 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6593 Adjust to use gdbscm_wrap and scoped_value_mark.
6594 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6595 (gdbscm_value_address, gdbscm_value_dereference)
6596 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6597 scoped_value_mark.
6598 (gdbscm_value_dynamic_type): Use scoped_value_mark.
6599 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6600 scoped_value_mark.
6601 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6602 gdbscm_wrap and scoped_value_mark.
6603 (gdbscm_value_to_string): Use xfree directly instead of a
6604 cleanup. Move 'buffer' unique_ptr to TRY scope.
6605 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6606 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
6607 scoped_value_mark.
6608 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6609 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6610 scoped_value_mark.
6611 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6612 gdbscm_wrap.
6613
6614 2018-07-18 Tom de Vries <tdevries@suse.de>
6615
6616 * findvar.c (default_read_var_value): Also resolve dynamic type for
6617 LOC_OPTIMIZED_OUT vars.
6618
6619 2018-07-18 Maciej W. Rozycki <macro@mips.com>
6620
6621 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6622 decoding.
6623
6624 2018-07-17 Tom Tromey <tom@tromey.com>
6625
6626 * guile/scm-param.c (pascm_set_func, pascm_show_func)
6627 (compute_enum_list, pascm_set_param_value_x)
6628 (gdbscm_parameter_value): Update.
6629 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6630 (gdbscm_scm_to_host_string): Update.
6631 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6632 Update.
6633 * guile/scm-cmd.c (cmdscm_add_completion): Update.
6634 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6635 * guile/scm-string.c (gdbscm_scm_to_string): Return
6636 unique_xmalloc_ptr.
6637 (gdbscm_scm_to_host_string): Likewise.
6638
6639 2018-07-17 Tom Tromey <tom@tromey.com>
6640
6641 * guile/guile.c (gdbscm_eval_from_control_command): Update.
6642 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6643 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6644 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6645 unique_xmalloc_ptr.
6646
6647 2018-07-17 Tom Tromey <tom@tromey.com>
6648
6649 * guile/scm-param.c (pascm_signal_setshow_error): Update.
6650 * guile/guile-internal.h (gdbscm_exception_message_to_string):
6651 Update.
6652 * guile/scm-cmd.c (cmdscm_function): Update.
6653 * guile/scm-pretty-print.c
6654 (ppscm_print_exception_unless_memory_error): Update.
6655 * guile/scm-exception.c (gdbscm_exception_message_to_string):
6656 Return unique_xmalloc_ptr.
6657
6658 2018-07-17 Tom Tromey <tom@tromey.com>
6659
6660 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6661 Use string_printf.
6662
6663 2018-07-17 Jim Wilson <jimw@sifive.com>
6664
6665 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6666 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
6667 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
6668 unecessary braces after EF_RISCV_RVC test. Delete call to
6669 set_gdbarch_decr_pc_after_break.
6670
6671 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6672 RISCV_LAST_FP_REGNUM + 1.
6673 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6674
6675 2018-07-17 Tom Tromey <tom@tromey.com>
6676
6677 * configure.ac: Remove --disable-gdbcli.
6678 * configure: Rebuild.
6679 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6680 (SUBDIR_CLI_CFLAGS): Remove.
6681 (SFILES): Use SUBDIR_CLI_SRCS.
6682 (COMMON_OBS): Use SUBDIR_CLI_OBS.
6683
6684 2018-07-17 Tom Tromey <tom@tromey.com>
6685
6686 PR gdb/18624:
6687 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6688
6689 2018-07-16 Jim Wilson <jimw@sifive.com>
6690
6691 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6692
6693 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6694
6695 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6696 variable.
6697 (libunwind_frame_sniffer): Likewise.
6698 (libunwind_frame_prev_register): Likewise.
6699 (libunwind_sigtramp_frame_sniffer): Likewise.
6700 * ia64-tdep.c (ia64_access_reg): Likewise.
6701 (ia64_access_rse_reg): Likewise.
6702 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6703 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6704
6705 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6706
6707 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6708
6709 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6710
6711 * remote-sim.c (gdbsim_target::close,
6712 gdbsim_target::mourn_inferior): Remove unused variables.
6713
6714 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
6715
6716 * ia64-tdep.c (ktab_buf): New global.
6717 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6718 (get_kernel_table): Adjust.
6719
6720 2018-07-16 Tom Tromey <tom@tromey.com>
6721
6722 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6723 * dwarf2read.c (using_directives, new_symbol): Use
6724 outermost_context_p.
6725 * dbxread.c (process_one_symbol): Use outermost_context_p.
6726 * coffread.c (coff_symtab_read): Use outermost_context_p.
6727
6728 2018-07-16 Tom Tromey <tom@tromey.com>
6729
6730 * dwarf2read.c (using_directives, read_func_scope)
6731 (read_lexical_block_scope): Update.
6732 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6733 * buildsym.h (local_using_directives, global_using_directives):
6734 Don't declare.
6735 (get_local_using_directives, set_local_using_directives)
6736 (get_global_using_directives): Declare.
6737 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6738 m_global_using_directives>: New members.
6739 (finish_block_internal, prepare_for_building)
6740 (reset_symtab_globals, end_symtab_get_static_block)
6741 (push_context): Update.
6742 (get_local_using_directives, set_local_using_directives)
6743 (get_global_using_directives): New functions.
6744 (buildsym_init): Update.
6745
6746 2018-07-16 Tom Tromey <tom@tromey.com>
6747
6748 * xcoffread.c (xcoff_initial_scan): Don't call
6749 free_pending_blocks.
6750 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6751 * buildsym.h (class scoped_free_pendings): Add constructor.
6752 (free_pending_blocks): Don't declare.
6753 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6754 (free_pending_blocks): Now static.
6755
6756 2018-07-16 Tom Tromey <tom@tromey.com>
6757
6758 * buildsym.h (push_subfile, pop_subfile): Update declarations.
6759 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6760 member.
6761 (struct subfile_stack): Remove.
6762 (subfile_stack): Remove.
6763 (push_subfile, pop_subfile, buildsym_init): Update.
6764
6765 2018-07-16 Tom Tromey <tom@tromey.com>
6766
6767 * buildsym.c (push_subfile): Use gdb_assert.
6768 (pop_subfile): Use gdb_assert.
6769
6770 2018-07-16 Tom Tromey <tom@tromey.com>
6771
6772 * buildsym.h (merge_symbol_lists): Remove.
6773 * buildsym.c (merge_symbol_lists): Remove.
6774
6775 2018-07-16 Tom Tromey <tom@tromey.com>
6776
6777 * stabsread.c (scan_file_globals): Update comment.
6778 * stabsread.h (scan_file_globals): Move from buildsym.h.
6779 * buildsym.h (scan_file_globals): Move to stabsread.h.
6780
6781 2018-07-16 Tom Tromey <tom@tromey.com>
6782
6783 * xcoffread.c (xcoff_new_init): Update.
6784 * mipsread.c (mipscoff_new_init): Update.
6785 * mdebugread.c (mdebug_build_psymtabs): Update.
6786 * elfread.c (elf_new_init): Update.
6787 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6788 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6789 * buildsym.h (buildsym_new_init): Don't declare.
6790 * buildsym.c (buildsym_new_init): Remove.
6791
6792 2018-07-16 Tom Tromey <tom@tromey.com>
6793
6794 * stabsread.h (within_function): Move from buildsym.h.
6795 * stabsread.c (start_stabs): Clear within_function.
6796 * coffread.c (coff_start_symtab): Clear within_function.
6797 * buildsym.h (within_function): Move to stabsread.h.
6798 * buildsym.c (prepare_for_building): Update.
6799
6800 2018-07-16 Tom Tromey <tom@tromey.com>
6801
6802 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6803 * dwarf2read.c (dwarf2_start_symtab): Don't set
6804 processing_gcc_compilation.
6805 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6806
6807 2018-07-16 Tom Tromey <tom@tromey.com>
6808
6809 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6810 (next_symbol_text_func): Move from buildsym.h.
6811 * stabsread.c (hashname): Move from buildsym.c.
6812 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6813 (next_symbol_text_func, hashname): Move to stabsread.h.
6814 * buildsym.c: Don't include bcache.h
6815 (hashname): Move to stasbread.c.
6816
6817 2018-07-16 Tom Tromey <tom@tromey.com>
6818
6819 * buildsym.h (context_stack_size): Don't declare.
6820 * buildsym.c (context_stack_size): New global.
6821
6822 2018-07-16 Tom Tromey <tom@tromey.com>
6823
6824 * dbxread.c (processing_acc_compilation): New global.
6825 * buildsym.h (processing_acc_compilation): Don't declare.
6826
6827 2018-07-16 Tom Tromey <tom@tromey.com>
6828
6829 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6830 * dbxread.c (read_ofile_symtab): Update.
6831 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6832 * buildsym.h (last_source_start_addr): Remove.
6833 (set_last_source_start_addr, get_last_source_start_addr):
6834 Declare.
6835 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6836 parameter.
6837 (struct buildsym_compunit) <m_last_source_start_addr>: New
6838 member.
6839 (prepare_for_building): Remove start_addr parameter.
6840 (start_symtab, restart_symtab, end_symtab_get_static_block)
6841 (end_symtab_with_blockvector): Update.
6842 (set_last_source_start_addr, get_last_source_start_addr): New
6843 functions.
6844
6845 2018-07-16 Tom Tromey <tom@tromey.com>
6846
6847 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6848 member.
6849 (have_line_numbers): Remove.
6850 (record_line, prepare_for_building, end_symtab_get_static_block)
6851 (augment_type_symtab): Update.
6852
6853 2018-07-16 Tom Tromey <tom@tromey.com>
6854
6855 * buildsym.c (~buildsym_compunit): Free the macro table.
6856 (struct buildsym_compunit) <get_macro_table, release_macros>: New
6857 methods.
6858 <m_pending_macros>: New member.
6859 (pending_macros): Remove.
6860 (~scoped_free_pendings, get_macro_table, prepare_for_building)
6861 (reset_symtab_globals, end_symtab_get_static_block)
6862 (end_symtab_with_blockvector, augment_type_symtab)
6863 (buildsym_init): Update.
6864
6865 2018-07-16 Tom Tromey <tom@tromey.com>
6866
6867 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6868 parameter.
6869 (buildsym_compunit::set_last_source_file): New method.
6870 <m_last_source_file>: New member.
6871 (prepare_for_building): Remove "name" parameter.
6872 (start_symtab, restart_symtab, reset_symtab_globals): Update.
6873 (last_source_file): Remove.
6874 (set_last_source_file, get_last_source_file): Update.
6875
6876 2018-07-16 Tom Tromey <tom@tromey.com>
6877
6878 * buildsym.c (prepare_for_building): Add assert.
6879
6880 2018-07-16 Tom Tromey <tom@tromey.com>
6881
6882 * buildsym.c (~buildsym_compunit): Update.
6883 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6884 (start_subfile, patch_subfile_names)
6885 (end_symtab_with_blockvector): Update.
6886
6887 2018-07-16 Tom Tromey <tom@tromey.com>
6888
6889 * buildsym.c (struct buildsym_compunit): Add constructor,
6890 destructor, initializers.
6891 (start_buildsym_compunit): Remove.
6892 (free_buildsym_compunit): Use "delete".
6893 (start_symtab, restart_symtab): Use "new".
6894
6895 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
6896
6897 * symfile.c (set_objfile_default_section_offset): Remove struct
6898 keyword.
6899
6900 2018-07-14 Stafford Horne <shorne@gmail.com>
6901
6902 * (Responsible Maintainers): Add myself as or1k maintainer.
6903
6904 2018-07-13 Tom Tromey <tom@tromey.com>
6905
6906 * symfile.c (set_objfile_default_section_offset): Use extra braces
6907 around initializer.
6908
6909 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6910
6911 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6912 non-branching basr.
6913
6914 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6915
6916 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6917 unittests/cli-utils-selftests.c
6918 * unittests/cli-utils-selftests.c: New file.
6919
6920 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6921
6922 * NEWS: Mention new commands. Mention change to 'thread apply'.
6923
6924 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6925
6926 * thread.c (thr_try_catch_cmd): New function.
6927 (thread_apply_all_command): Handle qcs flags.
6928 (thread_apply_command): Handle qcs flags.
6929 (taas_command): New function.
6930 (tfaas_command): New function.
6931 (_initialize_thread): Update to setup the new commands 'taas
6932 and 'tfaas'. Change doc string for 'thread apply'.
6933
6934 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6935
6936 * stack.c: (trailing_outermost_frame): New function, mostly
6937 extracted from backtrace_command_1.
6938 (leading_innermost_frame): New function.
6939 (backtrace_command_1): Update to call trailing_outermost_frame.
6940 (frame_apply_command_count): New function.
6941 (frame_apply_level_command): New function.
6942 (frame_apply_all_command): New function.
6943 (frame_apply_command): New function.
6944 (faas_command): New function.
6945 (frame_cmd_list): New variable.
6946 (_initialize_stack): Update to setup the new commands 'frame apply'
6947 and 'faas'.
6948
6949 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6950
6951 * cli-utils.c (number_or_range_parser::get_number): Only handle
6952 numbers or convenience var as numbers.
6953 (parse_flags): New function.
6954 (parse_flags_qcs): New function.
6955 (number_or_range_parser::finished): Ensure parsing end is detected
6956 before end of string.
6957 * cli-utils.h (parse_flags): New function.
6958 (parse_flags_qcs): New function.
6959 (number_or_range_parser): Remove m_finished bool.
6960 (number_or_range_parser::skip_range): Set m_in_range to false.
6961
6962 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
6963
6964 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6965 on Windows.
6966
6967 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6968 Jan Kratochvil <jan.kratochvil@redhat.com>
6969 Paul Fertser <fercerpav@gmail.com>
6970 Tsutomu Seki <sekiriki@gmail.com>
6971 Pedro Alves <palves@redhat.com>
6972
6973 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6974 'unittests/parse-connection-spec-selftests.c'.
6975 (COMMON_SFILES): Add 'common/netstuff.c'.
6976 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6977 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6978 * common/netstuff.c: New file.
6979 * common/netstuff.h: New file.
6980 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6981 (wait_for_connect): Update comment. New parameter
6982 'gdb::optional<int> sock' instead of 'struct serial *scb'.
6983 Use 'sock' directly instead of 'scb->fd'.
6984 (try_connect): New function, with code from 'net_open'.
6985 (net_open): Rewrite main loop to deal with multiple
6986 sockets/addresses. Handle IPv6-style hostnames; implement
6987 support for IPv6 connections.
6988 * unittests/parse-connection-spec-selftests.c: New file.
6989
6990 2018-07-11 Pedro Alves <palves@redhat.com>
6991
6992 PR gdb/23377
6993 * remote.c (remote_target::remote_detach_pid): Call
6994 set_current_process.
6995
6996 2018-07-11 Pedro Alves <palves@redhat.com>
6997
6998 * h8300-tdep.c (h8300_gdbarch_init): Remove
6999 set_gdbarch_ecoff_reg_to_regnum calls.
7000
7001 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
7002
7003 PR c++/23373
7004 * c-typeprint.c (c_type_print_base_struct_union): Don't print
7005 offsets/sizes for static members of a class/struct.
7006
7007 2018-07-11 Alan Hayward <alan.hayward@arm.com>
7008
7009 * target-descriptions.c (tdesc_register_bitsize): Rename.
7010 * target-descriptions.h (tdesc_register_bitsize): Likewise.
7011 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
7012 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
7013
7014 2018-07-10 Tom Tromey <tom@tromey.com>
7015
7016 * breakpoint.c (moribund_locations): Now static and a
7017 std::vector.
7018 (breakpoint_init_inferior, moribund_breakpoint_here_p)
7019 (build_bpstat_chain, update_global_location_list)
7020 (breakpoint_retire_moribund): Update.
7021 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
7022 VEC.
7023
7024 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
7025
7026 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
7027 (riscv_register_reggroup_p): Use new function, remove unneeded
7028 parenthesis.
7029 (riscv_push_dummy_call): Extend assert to compare against xlen or
7030 flen based on register type.
7031
7032 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
7033
7034 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
7035
7036 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
7037
7038 * remote.c (show_hardware_watchpoint_limit): New function.
7039 (show_hardware_watchpoint_length_limit): New function.
7040 (show_hardware_breakpoint_limit): New function.
7041 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
7042 where appropriate, update help text.
7043
7044 2018-07-09 Tom Tromey <tom@tromey.com>
7045
7046 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
7047 (CLIBS): Don't mention NAT_CLIBS.
7048
7049 2018-07-09 Tom Tromey <tom@tromey.com>
7050
7051 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
7052 (LIBGDB_OBS, clean mostlyclean): Update.
7053 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
7054
7055 2018-07-09 Tom Tromey <tom@tromey.com>
7056
7057 * Makefile.in (%.c: %.y): Use ECHO_YACC.
7058 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
7059 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
7060
7061 2018-07-09 Tom Tromey <tom@tromey.com>
7062
7063 * Makefile.in (ALLDEPFILES): Remove exec.c.
7064 (COMMON_OBS): Remove exec.o.
7065 (COMMON_SFILES): Add exec.c.
7066
7067 2018-07-09 Tom Tromey <tom@tromey.com>
7068
7069 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
7070
7071 2018-07-09 Tom Tromey <tom@tromey.com>
7072
7073 * Makefile.in (clean mostlyclean): Remove stamp-version.
7074 (version.c): Depend on stamp-version.
7075 (stamp-version): New rule, from version.c rule.
7076
7077 2018-07-09 Tom Tromey <tom@tromey.com>
7078
7079 * Makefile.in (init.c): Depend on stamp-init.
7080 (stamp-init): New rule, from init.c rule.
7081 (clean mostlyclean): Remove stamp-init.
7082
7083 2018-07-09 Tom Tromey <tom@tromey.com>
7084
7085 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7086 SUBDIR_GCC_COMPILE_SRCS.
7087
7088 2018-07-09 Tom Tromey <tom@tromey.com>
7089
7090 * Makefile.in (init.c): Remove some unused sed rules.
7091
7092 2018-07-09 Tom Tromey <tom@tromey.com>
7093
7094 * Makefile.in (TSOBS): Remove.
7095 (INIT_FILES): Update.
7096 (LIBGDB_OBS): Update.
7097 (COMMON_SFILES): Add inflow.c.
7098 (SFILES): Remove inflow.c.
7099
7100 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7101
7102 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7103
7104 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
7105
7106 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7107 get_saveloc_name, is_signal_frame_name, step_name,
7108 init_remote_name, create_addr_space_name,
7109 destroy_addr_space_name, search_unwind_table_name,
7110 find_dyn_list_name): Constify.
7111
7112 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
7113
7114 * darwin-nat.c (darwin_pthread_kill): New function.
7115 (darwin_resume_thread): Use darwin_pthread_kill.
7116
7117 2018-07-05 Tom de Vries <tdevries@suse.de>
7118
7119 * macroexp.c (macro_buffer) <operator=>: New member function.
7120
7121 2018-07-04 Tom Tromey <tom@tromey.com>
7122
7123 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7124
7125 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
7126
7127 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7128 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7129 * maint.c: Likewise.
7130 * top.c: Likewise.
7131
7132 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7133
7134 * NEWS: Create a new section for the next release branch.
7135 Rename the section of the current branch, now that it has
7136 been cut.
7137
7138 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7139
7140 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7141 * version.in: Bump version to 8.2.50.DATE-git.
7142
7143 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
7144 Pedro Alves <palves@redhat.com>
7145
7146 * linux-nat.c (linux_init_ptrace): Rename to ...
7147 (linux_init_ptrace_procfs): ... this. Call
7148 linux_proc_init_warnings.
7149 (linux_nat_target::post_attach)
7150 (linux_nat_target::post_startup_inferior): Adjust.
7151 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7152 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7153
7154 2018-07-04 Tom de Vries <tdevries@suse.de>
7155
7156 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7157 check ...
7158 (read_comp_unit_head): ... here.
7159
7160 2018-07-03 Tom Tromey <tom@tromey.com>
7161
7162 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7163 (stop_tracing, tstatus_command)
7164 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7165 (print_one_static_tracepoint_marker): Update.
7166 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7167 std::vector.
7168 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
7169 VEC.
7170 (all_tracepoints, static_tracepoints_here): Return std::vector.
7171
7172 2018-07-03 Tom Tromey <tom@tromey.com>
7173
7174 * common/ptid.c (ptid_equal): Remove.
7175 * common/ptid.h (ptid_equal): Don't declare.
7176 * ada-tasks.c: Update.
7177 * breakpoint.c: Update.
7178 * common/agent.c: Update.
7179 * corelow.c: Update.
7180 * darwin-nat-info.c: Update.
7181 * darwin-nat.c: Update.
7182 * dcache.c: Update.
7183 * dtrace-probe.c: Update.
7184 * dummy-frame.c: Update.
7185 * fbsd-nat.c: Update.
7186 * frame.c: Update.
7187 * gdbthread.h: Update.
7188 * gnu-nat.c: Update.
7189 * go32-nat.c: Update.
7190 * inf-loop.c: Update.
7191 * inf-ptrace.c: Update.
7192 * infcall.c: Update.
7193 * infcmd.c: Update.
7194 * inflow.c: Update.
7195 * infrun.c: Update.
7196 * linux-fork.c: Update.
7197 * linux-nat.c: Update.
7198 * linux-thread-db.c: Update.
7199 * mi/mi-cmd-var.c: Update.
7200 * mi/mi-interp.c: Update.
7201 * mi/mi-main.c: Update.
7202 * nto-procfs.c: Update.
7203 * ppc-linux-tdep.c: Update.
7204 * procfs.c: Update.
7205 * python/py-inferior.c: Update.
7206 * python/py-record-btrace.c: Update.
7207 * python/py-record.c: Update.
7208 * ravenscar-thread.c: Update.
7209 * regcache.c: Update.
7210 * remote-sim.c: Update.
7211 * remote.c: Update.
7212 * sol-thread.c: Update.
7213 * solib.c: Update.
7214 * target.c: Update.
7215 * tui/tui-stack.c: Update.
7216 * varobj.c: Update.
7217 * windows-nat.c: Update.
7218 * windows-tdep.c: Update.
7219
7220 2018-07-03 Tom Tromey <tom@tromey.com>
7221
7222 * common/ptid.c (ptid_match): Remove.
7223 * common/ptid.h (ptid_match): Don't declare.
7224 * fbsd-nat.c: Update.
7225 * infcmd.c: Update.
7226 * infrun.c: Update.
7227 * linux-nat.c: Update.
7228 * record-btrace.c: Update.
7229 * regcache.c: Update.
7230 * remote.c: Update.
7231
7232 2018-07-03 Tom Tromey <tom@tromey.com>
7233
7234 * common/ptid.c (ptid_tid_p): Remove.
7235 * common/ptid.h (ptid_tid_p): Don't declare.
7236 * sol-thread.c: Update.
7237
7238 2018-07-03 Tom Tromey <tom@tromey.com>
7239
7240 * common/ptid.c (ptid_lwp_p): Remove.
7241 * common/ptid.h (ptid_lwp_p): Don't declare.
7242 * fbsd-nat.c: Update.
7243 * linux-nat.c: Update.
7244 * nat/linux-procfs.c: Update.
7245 * nat/x86-linux-dregs.c: Update.
7246 * sol-thread.c: Update.
7247
7248 2018-07-03 Tom Tromey <tom@tromey.com>
7249
7250 * common/ptid.c (ptid_is_pid): Remove.
7251 * common/ptid.h (ptid_is_pid): Don't declare.
7252 * infrun.c: Update.
7253 * linux-nat.c: Update.
7254 * mi/mi-interp.c: Update.
7255 * remote.c: Update.
7256 * thread.c: Update.
7257
7258 2018-07-03 Tom Tromey <tom@tromey.com>
7259
7260 * common/ptid.c (ptid_get_tid): Remove.
7261 * common/ptid.h (ptid_get_tid): Don't declare.
7262 * ada-tasks.c: Update.
7263 * aix-thread.c: Update.
7264 * bsd-uthread.c: Update.
7265 * darwin-nat.c: Update.
7266 * fbsd-nat.c: Update.
7267 * i386-darwin-nat.c: Update.
7268 * infrun.c: Update.
7269 * linux-tdep.c: Update.
7270 * nto-procfs.c: Update.
7271 * ppc-ravenscar-thread.c: Update.
7272 * python/py-infthread.c: Update.
7273 * ravenscar-thread.c: Update.
7274 * sol-thread.c: Update.
7275 * sparc-ravenscar-thread.c: Update.
7276 * windows-nat.c: Update.
7277
7278 2018-07-03 Tom Tromey <tom@tromey.com>
7279
7280 * common/ptid.c (ptid_get_lwp): Remove.
7281 * common/ptid.h (ptid_get_lwp): Don't declare.
7282 * aarch64-linux-nat.c: Update.
7283 * ada-tasks.c: Update.
7284 * aix-thread.c: Update.
7285 * amd64-linux-nat.c: Update.
7286 * arm-linux-nat.c: Update.
7287 * corelow.c: Update.
7288 * fbsd-nat.c: Update.
7289 * fbsd-tdep.c: Update.
7290 * gnu-nat.c: Update.
7291 * i386-cygwin-tdep.c: Update.
7292 * i386-gnu-nat.c: Update.
7293 * i386-linux-nat.c: Update.
7294 * ia64-linux-nat.c: Update.
7295 * inf-ptrace.c: Update.
7296 * infrun.c: Update.
7297 * linux-fork.c: Update.
7298 * linux-nat.c: Update.
7299 * linux-tdep.c: Update.
7300 * linux-thread-db.c: Update.
7301 * mips-linux-nat.c: Update.
7302 * nat/aarch64-linux-hw-point.c: Update.
7303 * nat/aarch64-linux.c: Update.
7304 * nat/linux-btrace.c: Update.
7305 * nat/linux-osdata.c: Update.
7306 * nat/linux-procfs.c: Update.
7307 * nat/x86-linux-dregs.c: Update.
7308 * obsd-nat.c: Update.
7309 * ppc-fbsd-nat.c: Update.
7310 * ppc-linux-nat.c: Update.
7311 * procfs.c: Update.
7312 * python/py-infthread.c: Update.
7313 * ravenscar-thread.c: Update.
7314 * remote.c: Update.
7315 * s390-linux-nat.c: Update.
7316 * sol-thread.c: Update.
7317 * sol2-tdep.c: Update.
7318 * spu-linux-nat.c: Update.
7319 * x86-linux-nat.c: Update.
7320 * xtensa-linux-nat.c: Update.
7321
7322 2018-07-03 Tom Tromey <tom@tromey.com>
7323
7324 * common/ptid.c (ptid_get_pid): Remove.
7325 * common/ptid.h (ptid_get_pid): Don't declare.
7326 * aarch64-linux-nat.c: Update.
7327 * ada-lang.c: Update.
7328 * aix-thread.c: Update.
7329 * alpha-bsd-nat.c: Update.
7330 * amd64-fbsd-nat.c: Update.
7331 * amd64-linux-nat.c: Update.
7332 * arm-linux-nat.c: Update.
7333 * arm-nbsd-nat.c: Update.
7334 * auxv.c: Update.
7335 * break-catch-syscall.c: Update.
7336 * breakpoint.c: Update.
7337 * bsd-uthread.c: Update.
7338 * corelow.c: Update.
7339 * ctf.c: Update.
7340 * darwin-nat.c: Update.
7341 * fbsd-nat.c: Update.
7342 * fbsd-tdep.c: Update.
7343 * gcore.c: Update.
7344 * gnu-nat.c: Update.
7345 * hppa-nbsd-nat.c: Update.
7346 * hppa-obsd-nat.c: Update.
7347 * i386-fbsd-nat.c: Update.
7348 * ia64-linux-nat.c: Update.
7349 * inf-ptrace.c: Update.
7350 * infcmd.c: Update.
7351 * inferior.c: Update.
7352 * inferior.h: Update.
7353 * inflow.c: Update.
7354 * infrun.c: Update.
7355 * linux-fork.c: Update.
7356 * linux-nat.c: Update.
7357 * linux-tdep.c: Update.
7358 * linux-thread-db.c: Update.
7359 * m68k-bsd-nat.c: Update.
7360 * mi/mi-interp.c: Update.
7361 * mi/mi-main.c: Update.
7362 * mips-linux-nat.c: Update.
7363 * mips-nbsd-nat.c: Update.
7364 * mips64-obsd-nat.c: Update.
7365 * nat/aarch64-linux-hw-point.c: Update.
7366 * nat/aarch64-linux.c: Update.
7367 * nat/linux-btrace.c: Update.
7368 * nat/linux-osdata.c: Update.
7369 * nat/linux-procfs.c: Update.
7370 * nat/x86-linux-dregs.c: Update.
7371 * nto-procfs.c: Update.
7372 * obsd-nat.c: Update.
7373 * ppc-linux-nat.c: Update.
7374 * ppc-nbsd-nat.c: Update.
7375 * ppc-obsd-nat.c: Update.
7376 * proc-service.c: Update.
7377 * procfs.c: Update.
7378 * python/py-inferior.c: Update.
7379 * python/py-infthread.c: Update.
7380 * ravenscar-thread.c: Update.
7381 * record.c: Update.
7382 * remote-sim.c: Update.
7383 * remote.c: Update.
7384 * rs6000-nat.c: Update.
7385 * s390-linux-nat.c: Update.
7386 * sh-nbsd-nat.c: Update.
7387 * sol-thread.c: Update.
7388 * sparc-nat.c: Update.
7389 * sparc64-tdep.c: Update.
7390 * spu-linux-nat.c: Update.
7391 * spu-tdep.c: Update.
7392 * target-debug.h: Update.
7393 * target.c: Update.
7394 * thread.c: Update.
7395 * tid-parse.c: Update.
7396 * tracefile-tfile.c: Update.
7397 * vax-bsd-nat.c: Update.
7398 * windows-nat.c: Update.
7399 * x86-linux-nat.c: Update.
7400 * x86-nat.c: Update.
7401
7402 2018-07-03 Tom Tromey <tom@tromey.com>
7403
7404 * common/ptid.c (pid_to_ptid): Remove.
7405 * common/ptid.h (pid_to_ptid): Don't declare.
7406 * aix-thread.c: Update.
7407 * arm-linux-nat.c: Update.
7408 * common/ptid.c: Update.
7409 * common/ptid.h: Update.
7410 * corelow.c: Update.
7411 * ctf.c: Update.
7412 * darwin-nat.c: Update.
7413 * fbsd-nat.c: Update.
7414 * fork-child.c: Update.
7415 * gnu-nat.c: Update.
7416 * go32-nat.c: Update.
7417 * inf-ptrace.c: Update.
7418 * infcmd.c: Update.
7419 * inferior.c: Update.
7420 * infrun.c: Update.
7421 * linux-fork.c: Update.
7422 * linux-nat.c: Update.
7423 * nat/aarch64-linux-hw-point.c: Update.
7424 * nat/fork-inferior.c: Update.
7425 * nat/x86-linux-dregs.c: Update.
7426 * nto-procfs.c: Update.
7427 * obsd-nat.c: Update.
7428 * procfs.c: Update.
7429 * progspace.c: Update.
7430 * remote.c: Update.
7431 * rs6000-nat.c: Update.
7432 * s390-linux-nat.c: Update.
7433 * sol-thread.c: Update.
7434 * spu-linux-nat.c: Update.
7435 * target.c: Update.
7436 * top.c: Update.
7437 * tracefile-tfile.c: Update.
7438 * windows-nat.c: Update.
7439
7440 2018-07-03 Tom Tromey <tom@tromey.com>
7441
7442 * common/ptid.h (ptid_build): Don't declare.
7443 * common/ptid.c (ptid_build): Remove.
7444 * aix-thread.c: Update.
7445 * bsd-kvm.c: Update.
7446 * bsd-uthread.c: Update.
7447 * common/agent.c: Update.
7448 * common/ptid.c: Update.
7449 * common/ptid.h: Update.
7450 * corelow.c: Update.
7451 * darwin-nat.c: Update.
7452 * fbsd-nat.c: Update.
7453 * gnu-nat.c: Update.
7454 * linux-fork.c: Update.
7455 * linux-nat.c: Update.
7456 * linux-thread-db.c: Update.
7457 * nat/linux-osdata.c: Update.
7458 * nat/linux-procfs.c: Update.
7459 * nto-procfs.c: Update.
7460 * obsd-nat.c: Update.
7461 * proc-service.c: Update.
7462 * procfs.c: Update.
7463 * ravenscar-thread.c: Update.
7464 * remote-sim.c: Update.
7465 * remote.c: Update.
7466 * sol-thread.c: Update.
7467 * target.c: Update.
7468 * windows-nat.c: Update.
7469
7470 2018-07-03 Tom Tromey <tom@tromey.com>
7471
7472 * infrun.c (follow_exec): Use exit_inferior_silent.
7473 * inferior.c (exit_inferior_num_silent): Remove.
7474 * inferior.h (exit_inferior_num_silent): Don't declare.
7475
7476 2018-07-03 Tom Tromey <tom@tromey.com>
7477
7478 PR cli/23340:
7479 * darwin-nat.c (darwin_attach_pid): Reset inferior and
7480 inferior_ptid on error.
7481
7482 2018-07-02 Maciej W. Rozycki <macro@mips.com>
7483 Simon Marchi <simon.marchi@polymtl.ca>
7484
7485 PR tdep/8282
7486 * disasm.h (gdb_disassembler): Add
7487 `m_disassembler_options_holder'. member
7488 * disasm.c (get_all_disassembler_options): New function.
7489 (gdb_disassembler::gdb_disassembler): Use it.
7490 (gdb_buffered_insn_length_init_dis): Likewise.
7491 (gdb_buffered_insn_length): Adjust accordingly.
7492 (set_disassembler_options): Handle options with arguments.
7493 (show_disassembler_options_sfunc): Likewise. Add a leading new
7494 line if showing options with descriptions.
7495 (disassembler_options_completer): Adapt to using the
7496 `disasm_options_and_args_t' structure.
7497 * mips-tdep.c (mips_disassembler_options): New variable.
7498 (mips_disassembler_options_o32): Likewise.
7499 (mips_disassembler_options_n32): Likewise.
7500 (mips_disassembler_options_n64): Likewise.
7501 (gdb_print_insn_mips): Don't set `disassembler_options'.
7502 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7503 functions.
7504 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7505 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
7506 `gdbarch_disassembler_options_implicit' and
7507 `gdbarch_valid_disassembler_options'.
7508 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7509 `disasm_options_and_args_t' structure.
7510 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7511 method.
7512 (valid_disassembler_options): Switch from `disasm_options_t' to
7513 the `disasm_options_and_args_t' structure.
7514 * NEWS: Document `set disassembler-options' support for the MIPS
7515 target.
7516 * gdbarch.h: Regenerate.
7517 * gdbarch.c: Regenerate.
7518
7519 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
7520
7521 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7522
7523 2018-06-29 Joel Brobecker <brobecker@adacore.com>
7524
7525 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7526 parameter in call to amd64_target_description.
7527 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7528 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7529 (amd64fbsd_init_abi): Likewise.
7530 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7531 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7532 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7533 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7534
7535 2018-06-29 Pedro Alves <palves@redhat.com>
7536
7537 * gdb/amd64-tdep.h (amd64_create_target_description): Add
7538 "segments" parameter.
7539 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7540 (_initialize_amd64_tdep): Update call to
7541 amd64_create_target_description.
7542 (amd64_target_description): Add "segments" parameter. Adjust
7543 the implementation to use it.
7544 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7545 call to amd64_create_target_description.
7546 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7547 * gdb/arch/amd64.h (amd64_create_target_description): Add
7548 "segments" register.
7549 * gdb/arch/amd64.c (amd64_create_target_description): Add
7550 "segments" parameter. Call create_feature_i386_64bit_segments
7551 only if SEGMENTS is true.
7552 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7553 call to amd64_create_target_description.
7554
7555 2018-06-29 Pedro Alves <palves@redhat.com>
7556
7557 * thread.c (thread_target_id_str): New, factored out from ...
7558 (print_thread_info_1): ... here. Use it to compute the max
7559 "Target Id" column width.
7560
7561 2018-06-29 Pedro Alves <palves@redhat.com>
7562
7563 * remote.c (remote_target::extra_thread_info): Delete
7564 'display_buf' and 'n' locals. from the cache, regardless of
7565 packet mechanims is in use. Use cache for qThreadExtra and qP
7566 methods too.
7567
7568 2018-06-29 Pedro Alves <palves@redhat.com>
7569
7570 * blockframe.c (find_pc_sect_containing_function): New function.
7571 * breakpoint.c (print_breakpoint_location): Don't call
7572 find_pc_sect_function.
7573 * linespec.c (create_sals_line_offset): Record the location's
7574 symbol in the sal.
7575 * linespec.c (convert_address_location_to_sals): Fill in sal's
7576 symbol with find_pc_sect_containing_function.
7577 * symtab.c (find_function_start_sal): Rename to ...
7578 (find_function_start_sal_1): ... this.
7579 (find_function_start_sal): Reimplement as wrapper around
7580 find_function_start_sal_1, and use
7581 find_pc_sect_containing_function to fill in the sal's symbol.
7582 (find_function_start_sal(symbol*, bool)): Adjust.
7583 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7584 comments.
7585 (find_pc_sect_containing_function): Declare.
7586
7587 2018-06-29 Pedro Alves <palves@redhat.com>
7588
7589 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7590 true if the the location has no symbol.
7591
7592 2018-06-28 Tom Tromey <tom@tromey.com>
7593
7594 * NEWS: Mention --enable-codesign.
7595 * silent-rules.mk (ECHO_SIGN): New variable.
7596 * configure.ac: Add --enable-codesign.
7597 * configure: Rebuild.
7598 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7599 (gdb$(EXEEXT)): Optionally invoke codesign.
7600
7601 2018-06-28 Pedro Alves <palves@redhat.com>
7602
7603 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7604 comments.
7605 (switch_to_thread_no_regs): Adjust comment.
7606 * infcmd.c (stop_pc): Delete.
7607 (post_create_inferior, info_program_command): Replace references
7608 to stop_pc with references to thread_info->suspend.stop_pc.
7609 * inferior.h (stop_pc): Delete declaration.
7610 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7611 (handle_inferior_event_1, handle_signal_stop)
7612 (process_event_stop_test, keep_going_stepped_thread)
7613 (handle_step_into_function, handle_step_into_function_backward)
7614 (print_stop_location): Replace references to stop_pc with
7615 references to thread_info->suspend.stop_pc.
7616 (struct infcall_suspend_state) <stop_pc>: Delete field.
7617 (save_infcall_suspend_state, restore_infcall_suspend_state):
7618 Remove references to inf_stat->stop_pc.
7619 * linux-fork.c (fork_load_infrun_state): Likewise.
7620 * record-btrace.c (record_btrace_set_replay): Likewise.
7621 * record-full.c (record_full_goto_entry): Likewise.
7622 * remote.c (print_one_stopped_thread): Likewise.
7623 * target.c (target_resume): Extend comment.
7624 * thread.c (set_executing_thread): New.
7625 (set_executing): Use it.
7626 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7627 Remove references to stop_pc.
7628
7629 2018-06-28 Pedro Alves <palves@redhat.com>
7630
7631 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7632 Moving fetching stop_pc until after ecs->event_thread is refreshed.
7633
7634 2018-06-28 Tom Tromey <tom@tromey.com>
7635
7636 * coffread.c (coff_symfile_finish): Update.
7637 * xcoffread.c (xcoff_symfile_finish): Update.
7638 * elfread.c (elf_symfile_finish): Update.
7639 * symfile.h (dwarf2_free_objfile): Don't declare.
7640 * dwarf2read.c (_initialize_dwarf2_read): Use
7641 register_objfile_data_with_cleanup.
7642 (dwarf2_free_objfile): Now static. Change signature.
7643
7644 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7645
7646 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7647 option "-o" to add-symbol-file-load to add an offset to each
7648 section's load address.
7649 * symfile.c (set_objfile_default_section_offset): New function.
7650
7651 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7652
7653 * symfile.c (add_symbol_file_command): Make sure that sections
7654 with the same name are sorted in the same order.
7655
7656 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7657
7658 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7659 require the second argument. If omitted, load sections at the
7660 addresses specified in the file.
7661
7662 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7663
7664 * symfile.c (symbol_file_command, symbol_file_add_main_1)
7665 (_initialize_symfile): Add option "-o" to symbol-file to add an
7666 offset to each section of the symbol file.
7667
7668 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7669
7670 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7671
7672 2018-06-27 Tom Tromey <tom@tromey.com>
7673
7674 * stack.c (_initialize_stack): Update "func" help text.
7675
7676 2018-06-27 Tom Tromey <tom@tromey.com>
7677
7678 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7679 std::vector.
7680 (unwind_infopy_str, pyuw_create_unwind_info)
7681 (unwind_infopy_add_saved_register, pyuw_sniffer)
7682 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7683 Update.
7684 (struct saved_reg): Add constructor.
7685 <value>: Now a gdbpy_ref<>.
7686
7687 2018-06-27 Tom Tromey <tom@tromey.com>
7688
7689 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7690
7691 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7692
7693 * gdb-gdb.py.in: Format using autopep8.
7694
7695 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7696
7697 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7698 (type_lookup_function): Recognize CORE_ADDR values.
7699
7700 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7701
7702 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7703 print tag_name.
7704
7705 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7706
7707 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7708 <__lt__>: Add.
7709
7710 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7711
7712 * gdb-gdb.py: Move to...
7713 * gdb-gdb.py.in: ... here.
7714 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7715 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7716 dependencies.
7717 (distclean): Remove gdb-gdb.py when cleaning.
7718 (gdb-gdb.py, gdb-gdb.gdb): New rules.
7719 * configure: Re-generate.
7720
7721 2018-06-27 Pedro Alves <palves@redhat.com>
7722
7723 * proc-service.c (get_ps_regcache): New.
7724 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7725 (ps_lsetfpregs): Use it.
7726
7727 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
7728
7729 PR gdb/21695
7730 * dwarf2read.c (lnp_state_machine::check_line_address): Update
7731 declaration.
7732 (dwarf_decode_lines_1): Adjust.
7733
7734 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7735
7736 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7737 override.
7738 <info_proc>: Likewise.
7739
7740 2018-06-26 Joel Brobecker <brobecker@adacore.com>
7741
7742 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7743 to windows_fetch_one_register, and only handle the case of
7744 fetching one register. Move the code that reloads the context
7745 and iterates over all registers if R is negative to...
7746 (windows_nat_target::fetch_registers): ... here.
7747 (do_windows_store_inferior_registers): Rename to
7748 windows_store_one_register, and only handle the case of storing
7749 one register. Move the code that handles the case where r is
7750 negative to...
7751 (windows_nat_target::store_registers) ... here.
7752
7753 2018-06-26 Tom Tromey <tom@tromey.com>
7754
7755 PR rust/22574:
7756 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7757 * rust-lang.c (rust_print_struct_def): Add podata parameter.
7758 Update.
7759 (rust_internal_print_type): Add podata parameter.
7760 (rust_print_type): Update.
7761
7762 2018-06-26 Tom Tromey <tom@tromey.com>
7763
7764 * typeprint.h (struct print_offset_data) <update, finish,
7765 maybe_print_hole>: New methods.
7766 <indentation>: New constant.
7767 * typeprint.c (print_offset_data::indentation): Define.
7768 (print_offset_data::maybe_print_hole, print_offset_data::update)
7769 (print_offset_data::finish): Move from c-typeprint.c and rename.
7770 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7771 (print_spaces_filtered_with_print_options): Update.
7772 (c_print_type_union_field_offset, maybe_print_hole)
7773 (c_print_type_struct_field_offset): Move to typeprint.c and
7774 rename.
7775 (c_type_print_base_struct_union): Update.
7776
7777 2018-06-25 Pedro Alves <palves@redhat.com>
7778
7779 * gdbthread.h (thread_info_ref, delete_thread)
7780 (delete_thread_silent, first_thread_of_inferior)
7781 (any_thread_of_inferior, switch_to_thread)
7782 (enable_thread_stack_temporaries)
7783 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7784 (get_last_thread_stack_temporary)
7785 (value_in_thread_stack_temporaries, can_access_registers_thread):
7786 Spell out "struct thread_info" instead of just "thread_info".
7787 * inferior.h (notice_new_inferior): Likewise.
7788
7789 2018-06-25 Pedro Alves <palves@redhat.com>
7790
7791 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7792 pass thread_info pointer to delete_thread.
7793 (windows_nat_target::detach): Pass inferior pointer to
7794 detach_inferior.
7795 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7796 delete_thread.
7797 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7798 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7799 and pass a thread_info pointer to delete_thread.
7800 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7801 pass thread_info pointer to delete_thread.
7802 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7803 delete_thread_silent call.
7804 * procfs.c (procfs_target::detach): Pass inferior pointer to
7805 detach_inferior.
7806 (procfs_target::wait): Pass thread_info pointer to delete_thread.
7807 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7808 delete_thread_silent call.
7809 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7810 pass thread_info pointer to delete_thread.
7811 (windows_nat_target::detach): Pass inferior pointer to
7812 delete_inferior.
7813
7814 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7815
7816 * regcache.c (readable_regcache::read_part): Fix asserts.
7817 (reg_buffer::raw_collect_part): New function.
7818 (regcache::write_part): Fix asserts.
7819 (reg_buffer::raw_supply_part): New function.
7820 (regcache::transfer_regset_register): New helper function.
7821 (regcache::transfer_regset): Call new functions.
7822 (regcache_supply_regset): Use gdb_byte*.
7823 (regcache::supply_regset): Likewise.
7824 (regcache_collect_regset): Likewise.
7825 (regcache::collect_regset): Likewise.
7826 * regcache.h (reg_buffer::raw_collect_part): New declaration.
7827 (reg_buffer::raw_supply_part): Likewise.
7828 (regcache::transfer_regset_register): Likewise.
7829 (regcache::transfer_regset): Use gdb_byte*.
7830
7831 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7832
7833 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7834
7835 2018-06-21 Pedro Alves <palves@redhat.com>
7836
7837 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7838 instead of a ptid_t. All callers adjusted.
7839 * ada-tasks.c (ada_get_task_number): Likewise. All callers
7840 adjusted.
7841 (print_ada_task_info, display_current_task_id, task_command_1):
7842 Adjust.
7843 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7844 inferior_thread.
7845 (breakpoint_kind): Adjust.
7846 (remove_breakpoints_pid): Rename to ...
7847 (remove_breakpoints_inf): ... this. Adjust to take an inferior
7848 pointer. All callers adjusted.
7849 (bpstat_clear_actions): Use inferior_thread.
7850 (get_bpstat_thread): New.
7851 (bpstat_do_actions): Use it.
7852 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7853 to take a thread_info pointer. All callers adjusted.
7854 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7855 (breakpoint_re_set_thread): Use inferior_thread.
7856 * breakpoint.h (struct inferior): Forward declare.
7857 (bpstat_stop_status): Update.
7858 (remove_breakpoints_pid): Delete.
7859 (remove_breakpoints_inf): New.
7860 * bsd-uthread.c (bsd_uthread_target::wait)
7861 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7862 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7863 (maint_btrace_packet_history_cmd)
7864 (maint_btrace_clear_packet_history_cmd): Adjust.
7865 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7866 inferior_thread.
7867 * cli/cli-interp.c: Include "inferior.h".
7868 * common/refcounted-object.h (struct
7869 refcounted_object_ref_policy): New.
7870 * compile/compile-object-load.c: Include gdbthread.h.
7871 (store_regs): Use inferior_thread.
7872 * corelow.c (core_target::close): Use current_inferior.
7873 (core_target_open): Adjust to use first_thread_of_inferior and use
7874 the current inferior.
7875 * ctf.c (ctf_target::close): Adjust to use current_inferior.
7876 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7877 <thread>: ... this new field. All references adjusted.
7878 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7879 Take a thread_info pointer instead of a ptid_t.
7880 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7881 (dummy_frame_discard, register_dummy_frame_dtor): Take a
7882 thread_info pointer instead of a ptid_t.
7883 * elfread.c: Include "inferior.h".
7884 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7885 Use inferior_thread.
7886 * eval.c (evaluate_subexp): Likewise.
7887 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7888 inferior_thread.
7889 * gdb_proc_service.h (struct thread_info): Forward declare.
7890 (struct ps_prochandle) <ptid>: Delete, replaced by ...
7891 <thread>: ... this new field. All references adjusted.
7892 * gdbarch.h, gdbarch.c: Regenerate.
7893 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7894 'thread' parameter. All implementations and callers adjusted.
7895 * gdbthread.h (thread_info) <set_running>: New method.
7896 (delete_thread, delete_thread_silent): Take a thread_info pointer
7897 instead of a ptid.
7898 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7899 (first_thread_of_process): Delete, replaced by ...
7900 (first_thread_of_inferior): ... this new function. All callers
7901 adjusted.
7902 (any_live_thread_of_process): Delete, replaced by ...
7903 (any_live_thread_of_inferior): ... this new function. All callers
7904 adjusted.
7905 (switch_to_thread, switch_to_no_thread): Declare.
7906 (is_executing): Delete.
7907 (enable_thread_stack_temporaries): Update comment.
7908 <enable_thread_stack_temporaries>: Take a thread_info pointer
7909 instead of a ptid_t. Incref the thread.
7910 <~enable_thread_stack_temporaries>: Decref the thread.
7911 <m_ptid>: Delete
7912 <m_thr>: New.
7913 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7914 (get_last_thread_stack_temporary)
7915 (value_in_thread_stack_temporaries, can_access_registers_thread):
7916 Take a thread_info pointer instead of a ptid_t. All callers
7917 adjusted.
7918 * infcall.c (get_call_return_value): Use inferior_thread.
7919 (run_inferior_call): Work with thread pointers instead of ptid_t.
7920 (call_function_by_hand_dummy): Work with thread pointers instead
7921 of ptid_t. Use thread_info_ref.
7922 * infcmd.c (proceed_thread_callback): Access thread's state
7923 directly.
7924 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7925 access thread's state directly.
7926 (continue_command): Use inferior_thread.
7927 (info_program_command): Use find_thread_ptid and access thread
7928 state directly.
7929 (proceed_after_attach_callback): Use thread state directly.
7930 (notice_new_inferior): Take a thread_info pointer instead of a
7931 ptid_t. All callers adjusted.
7932 (exit_inferior): Take an inferior pointer instead of a pid. All
7933 callers adjusted.
7934 (exit_inferior_silent): New.
7935 (detach_inferior): Delete.
7936 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7937 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7938 (detach_inferior_command, kill_inferior_command): Use
7939 find_inferior_id instead of valid_gdb_inferior_id and
7940 gdb_inferior_id_to_pid.
7941 (inferior_command): Use inferior and thread pointers.
7942 * inferior.h (struct thread_info): Forward declare.
7943 (notice_new_inferior): Take a thread_info pointer instead of a
7944 ptid_t. All callers adjusted.
7945 (detach_inferior): Delete declaration.
7946 (exit_inferior, exit_inferior_silent): Take an inferior pointer
7947 instead of a pid. All callers adjusted.
7948 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7949 (valid_gdb_inferior_id): Delete.
7950 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7951 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7952 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7953 ...
7954 <inf>: ... this new field.
7955 <step_ptid>: Delete, replaced by ...
7956 <step_thread>: ... this new field.
7957 (get_displaced_stepping_state): Take an inferior pointer instead
7958 of a pid. All callers adjusted.
7959 (displaced_step_in_progress_any_inferior): Adjust.
7960 (displaced_step_in_progress_thread): Take a thread pointer instead
7961 of a ptid_t. All callers adjusted.
7962 (displaced_step_in_progress, add_displaced_stepping_state): Take
7963 an inferior pointer instead of a pid. All callers adjusted.
7964 (get_displaced_step_closure_by_addr): Adjust.
7965 (remove_displaced_stepping_state): Take an inferior pointer
7966 instead of a pid. All callers adjusted.
7967 (displaced_step_prepare_throw, displaced_step_prepare)
7968 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7969 All callers adjusted.
7970 (start_step_over): Adjust.
7971 (infrun_thread_ptid_changed): Remove bit updating ptids in the
7972 displaced step queue.
7973 (do_target_resume): Adjust.
7974 (fetch_inferior_event): Use inferior_thread.
7975 (context_switch, get_inferior_stop_soon): Take an
7976 execution_control_state pointer instead of a ptid_t. All callers
7977 adjusted.
7978 (switch_to_thread_cleanup): Delete.
7979 (stop_all_threads): Use scoped_restore_current_thread.
7980 * inline-frame.c: Include "gdbthread.h".
7981 (inline_state) <inline_state>: Take a thread pointer instead of a
7982 ptid_t. All callers adjusted.
7983 <ptid>: Delete, replaced by ...
7984 <thread>: ... this new field.
7985 (find_inline_frame_state): Take a thread pointer instead of a
7986 ptid_t. All callers adjusted.
7987 (skip_inline_frames, step_into_inline_frame)
7988 (inline_skipped_frames, inline_skipped_symbol): Take a thread
7989 pointer instead of a ptid_t. All callers adjusted.
7990 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7991 (inline_skipped_frames, inline_skipped_symbol): Likewise.
7992 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7993 pointers directly.
7994 * linux-nat.c (get_detach_signal): Likewise.
7995 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7996 (thread_db_notice_clone): Adjust.
7997 (thread_db_find_new_threads_silently)
7998 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7999 a thread pointer instead of a ptid_t. All callers adjusted.
8000 * mi/mi-cmd-var.c: Include "inferior.h".
8001 (mi_cmd_var_update_iter): Update to use thread pointers.
8002 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
8003 inferior directly.
8004 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
8005 out to ...
8006 (mi_output_running): ... this new function.
8007 (mi_on_resume_1): Adjust to use it.
8008 (mi_user_selected_context_changed): Adjust to use inferior_thread.
8009 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
8010 directly.
8011 (interrupt_thread_callback): : Adjust to use thread and inferior
8012 pointers.
8013 * proc-service.c: Include "gdbthread.h".
8014 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
8015 * progspace-and-thread.c: Include "inferior.h".
8016 * progspace.c: Include "inferior.h".
8017 * python/py-exitedevent.c (create_exited_event_object): Adjust to
8018 hold a reference to an inferior_object.
8019 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
8020 inferior_thread.
8021 * python/py-inferior.c (struct inferior_object): Give the type a
8022 tag name instead of a typedef.
8023 (python_on_normal_stop): No need to check if the current thread is
8024 listed.
8025 (inferior_to_inferior_object): Change return type to
8026 inferior_object. All callers adjusted.
8027 (find_thread_object): Delete, bits factored out to ...
8028 (thread_to_thread_object): ... this new function.
8029 * python/py-infthread.c (create_thread_object): Use
8030 inferior_to_inferior_object.
8031 (thpy_is_stopped): Use thread pointer directly.
8032 (gdbpy_selected_thread): Use inferior_thread.
8033 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
8034 field, replaced with ...
8035 <thread>: ... this new field. All users adjusted.
8036 (btpy_insn_or_gap_new): Drop const.
8037 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
8038 callers adjusted.
8039 * python/py-record.c: Include "gdbthread.h".
8040 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8041 a ptid_t. All callers adjusted.
8042 (gdbpy_current_recording): Use inferior_thread.
8043 * python/py-record.h (recpy_record_object) <ptid>: Delete
8044 field, replaced with ...
8045 <thread>: ... this new field. All users adjusted.
8046 (recpy_element_object) <ptid>: Delete
8047 field, replaced with ...
8048 <thread>: ... this new field. All users adjusted.
8049 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8050 a ptid_t. All callers adjusted.
8051 * python/py-threadevent.c: Include "gdbthread.h".
8052 (get_event_thread): Use thread_to_thread_object.
8053 * python/python-internal.h (struct inferior_object): Forward
8054 declare.
8055 (find_thread_object, find_inferior_object): Delete declarations.
8056 (thread_to_thread_object, inferior_to_inferior_object): New
8057 declarations.
8058 * record-btrace.c: Include "inferior.h".
8059 (require_btrace_thread): Use inferior_thread.
8060 (record_btrace_frame_sniffer)
8061 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
8062 (get_thread_current_frame): Use scoped_restore_current_thread and
8063 switch_to_thread.
8064 (get_thread_current_frame): Use thread pointer directly.
8065 (record_btrace_replay_at_breakpoint): Use thread's inferior
8066 pointer directly.
8067 * record-full.c: Include "inferior.h".
8068 * regcache.c: Include "gdbthread.h".
8069 (get_thread_arch_regcache): Use the inferior's address space
8070 directly.
8071 (get_thread_regcache, registers_changed_thread): New.
8072 * regcache.h (get_thread_regcache(thread_info *thread)): New
8073 overload.
8074 (registers_changed_thread): New.
8075 (remote_target) <remote_detach_1>: Swap order of parameters.
8076 (remote_add_thread): <remote_add_thread>: Return the new thread.
8077 (get_remote_thread_info(ptid_t)): New overload.
8078 (remote_target::remote_notice_new_inferior): Use thread pointers
8079 directly.
8080 (remote_target::process_initial_stop_replies): Use
8081 thread_info::set_running.
8082 (remote_target::remote_detach_1, remote_target::detach)
8083 (extended_remote_target::detach): Adjust.
8084 * stack.c (frame_show_address): Use inferior_thread.
8085 * target-debug.h (target_debug_print_thread_info_pp): New.
8086 * target-delegates.c: Regenerate.
8087 * target.c (default_thread_address_space): Delete.
8088 (memory_xfer_partial_1): Use current_inferior.
8089 (target_detach): Use current_inferior.
8090 (target_thread_address_space): Delete.
8091 (generic_mourn_inferior): Use current_inferior.
8092 * target.h (struct target_ops) <thread_address_space>: Delete.
8093 (target_thread_address_space): Delete.
8094 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
8095 pointers directly.
8096 (delete_thread_1, delete_thread, delete_thread_silent): Take a
8097 thread pointer instead of a ptid_t. Adjust all callers.
8098 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8099 (first_thread_of_process): Delete, replaced by ...
8100 (first_thread_of_inferior): ... this new function. All callers
8101 adjusted.
8102 (any_thread_of_process): Rename to ...
8103 (any_thread_of_inferior): ... this, and take an inferior pointer.
8104 (any_live_thread_of_process): Rename to ...
8105 (any_live_thread_of_inferior): ... this, and take an inferior
8106 pointer.
8107 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8108 (value_in_thread_stack_temporaries)
8109 (get_last_thread_stack_temporary): Take a thread pointer instead
8110 of a ptid_t. Adjust all callers.
8111 (thread_info::set_running): New.
8112 (validate_registers_access): Use inferior_thread.
8113 (can_access_registers_ptid): Rename to ...
8114 (can_access_registers_thread): ... this, and take a thread
8115 pointer.
8116 (print_thread_info_1): Adjust to compare thread pointers instead
8117 of ptids.
8118 (switch_to_no_thread, switch_to_thread): Make extern.
8119 (scoped_restore_current_thread::~scoped_restore_current_thread):
8120 Use m_thread pointer directly.
8121 (scoped_restore_current_thread::scoped_restore_current_thread):
8122 Use inferior_thread.
8123 (thread_command): Use thread pointer directly.
8124 (thread_num_make_value_helper): Use inferior_thread.
8125 * top.c (execute_command): Use inferior_thread.
8126 * tui/tui-interp.c: Include "inferior.h".
8127 * varobj.c (varobj_create): Use inferior_thread.
8128 (value_of_root_1): Use find_thread_global_id instead of
8129 global_thread_id_to_ptid.
8130
8131 2018-06-21 Alan Hayward <alan.hayward@arm.com>
8132
8133 * regcache.c (readable_regcache::read_part): Avoid memcpy when
8134 possible.
8135 (regcache::write_part): Likewise.
8136 (readable_regcache::cooked_read_part): Update comment.
8137 (readable_regcache::cooked_write_part): Likewise.
8138 * regcache.h: (readable_regcache::read_part): Likewise.
8139 (regcache::write_part): Likewise.
8140
8141 2018-06-21 Richard Bunt <richard.bunt@arm.com>
8142 Dirk Schubert <dirk.schubert@arm.com>
8143
8144 * aarch64-linux-nat.c (post_attach): New.
8145 (aarch64_linux_nat_target::post_attach): Override post_attach to
8146 record the number of hardware debug registers.
8147
8148 2018-06-20 Tom Tromey <tom@tromey.com>
8149
8150 * python/py-param.c (add_setshow_generic): Make parameters const.
8151 (parmpy_init): Update.
8152
8153 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8154
8155 * regcache.h (regcache_cooked_read_ftype): Rename to...
8156 (register_read_ftype): ...this, change type to function_view.
8157 (class reg_buffer) <save>: Remove src parameter.
8158 (readonly_detached_regcache) <readonly_detached_regcache>: Make
8159 parameter non-const in first overload. Remove src parameter in
8160 second overload.
8161 * regcache.c (do_cooked_read): Remove.
8162 (readonly_detached_regcache::readonly_detached_regcache): Make
8163 parameter non-const, adjust call to other constructor.
8164 (reg_buffer::save): Remove src parameter.
8165 * frame.c (do_frame_register_read): Remove.
8166 (frame_save_as_regcache): Use lambda function.
8167 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8168 parameter to ppu2spu_data *.
8169 (ppu2spu_sniffer): Use lambda function.
8170
8171 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8172
8173 * record-full.c (record_full_target::insert_breakpoint): Remove
8174 "struct" keyword, add const.
8175
8176 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
8177
8178 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8179 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8180 * configure.ac: Remove AC_PREREQ, add missing quoting.
8181 * gnulib/configure.ac: Modernize usage of
8182 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
8183 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8184 (AUTOMAKE_VERSION): Bump to 1.15.1.
8185 * configure: Re-generate.
8186 * config.in: Re-generate.
8187 * aclocal.m4: Re-generate.
8188 * gnulib/aclocal.m4: Re-generate.
8189 * gnulib/config.in: Re-generate.
8190 * gnulib/configure: Re-generate.
8191 * gnulib/import/Makefile.in: Re-generate.
8192
8193 2018-06-19 Pedro Alves <palves@redhat.com>
8194
8195 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8196 (lookup_minimal_symbol_by_pc_section): ... here with
8197 gdb_assert_not_reached added.
8198
8199 2018-06-19 Pedro Alves <palves@redhat.com>
8200
8201 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8202 parameter with a block parameter. Compare location's block symbol
8203 with the frame's block instead of addresses.
8204 (skip_inline_frames): Pass the current block instead of the
8205 frame's address. Break out as soon as we determine the frame
8206 should not be skipped.
8207
8208 2018-06-18 Tom Tromey <tom@tromey.com>
8209
8210 * solib-aix.c (solib_aix_get_section_offsets): Return
8211 unique_xmalloc_ptr.
8212 (solib_aix_solib_create_inferior_hook): Update.
8213
8214 2018-06-18 Tom Tromey <tom@tromey.com>
8215
8216 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8217
8218 2018-06-18 Tom Tromey <tom@tromey.com>
8219
8220 * solib-frv.c (frv_relocate_main_executable): Use
8221 unique_xmalloc_ptr.
8222 * solib-dsbt.c (dsbt_relocate_main_executable): Use
8223 unique_xmalloc_ptr.
8224
8225 2018-06-18 Tom Tromey <tom@tromey.com>
8226
8227 * objfiles.h (inhibit_section_map_updates): Update.
8228 (resume_section_map_updates, resume_section_map_updates_cleanup):
8229 Remove.
8230 * solib-svr4.c (svr4_handle_solib_event): Update.
8231 * objfiles.c (inhibit_section_map_updates): Return
8232 scoped_restore_tmpl<int>.
8233 (resume_section_map_updates, resume_section_map_updates_cleanup):
8234 Remove.
8235
8236 2018-06-18 Tom Tromey <tom@tromey.com>
8237
8238 * valprint.h (read_string): Update.
8239 * valprint.c (read_string): Change type of "buffer".
8240 (val_print_string): Update.
8241 * python/py-value.c (valpy_string): Update.
8242 * language.h (struct language_defn) <la_get_string>: Change
8243 type of "buffer".
8244 (default_get_string, c_get_string): Update.
8245 * language.c (default_get_string): Change type of "buffer".
8246 * guile/scm-value.c (gdbscm_value_to_string): Update.
8247 * c-lang.c (c_get_string): Change type of "buffer".
8248
8249 2018-06-18 Tom Tromey <tom@tromey.com>
8250
8251 * ser-mingw.c (struct pipe_state_destroyer): New.
8252 (pipe_state_up): New typedef.
8253 (cleanup_pipe_state): Remove.
8254 (pipe_windows_open): Use pipe_state_up. Don't release argv.
8255
8256 2018-06-18 Tom Tromey <tom@tromey.com>
8257
8258 * rust-lang.h (rust_yyerror): Don't declare.
8259 * rust-lang.c (rust_language_defn): Update.
8260 * rust-exp.y (yyerror): Now static.
8261 * parse.c (parse_exp_in_context_1): Update.
8262 * p-lang.h (p_yyerror): Don't declare.
8263 * p-lang.c (p_language_defn): Update.
8264 * p-exp.y (yyerror): Now static.
8265 * opencl-lang.c (opencl_language_defn): Update.
8266 * objc-lang.c (objc_language_defn): Update.
8267 * m2-lang.h (m2_yyerror): Don't declare.
8268 * m2-lang.c (m2_language_defn): Update.
8269 * m2-exp.y (yyerror): Now static.
8270 * language.h (struct language_defn) <la_error>: Remove.
8271 * language.c (unk_lang_error): Remove.
8272 (unknown_language_defn, auto_language_defn): Remove.
8273 * go-lang.h (go_yyerror): Don't declare.
8274 * go-lang.c (go_language_defn): Update.
8275 * go-exp.y (yyerror): Now static.
8276 * f-lang.h (f_yyerror): Don't declare.
8277 * f-lang.c (f_language_defn): Update.
8278 * f-exp.y (yyerror): Now static.
8279 * d-lang.h (d_yyerror): Don't declare.
8280 * d-lang.c (d_language_defn): Update.
8281 * d-exp.y (yyerror): Now static.
8282 * c-lang.h (c_yyerror): Don't declare.
8283 * c-lang.c (c_language_defn, cplus_language_defn)
8284 (asm_language_defn, minimal_language_defn): Update.
8285 * c-exp.y (yyerror): Now static.
8286 * ada-lang.h (ada_yyerror): Don't declare.
8287 * ada-lang.c (ada_language_defn): Update.
8288 * ada-exp.y (yyerror): Now static.
8289
8290 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8291
8292 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8293 (store_sveregs_to_thread): Likewise.
8294 (aarch64_linux_fetch_inferior_registers): Check for SVE.
8295 (aarch64_linux_store_inferior_registers): Likewise.
8296 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8297 function.
8298 (aarch64_sve_regs_copy_to_regcache): Likewise.
8299 (aarch64_sve_regs_copy_from_regcache): Likewise.
8300 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8301 declaration.
8302 (aarch64_sve_regs_copy_to_regcache): Likewise.
8303 (aarch64_sve_regs_copy_from_regcache): Likewise.
8304 (sve_context): Structure from Linux headers.
8305 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8306 (SVE_SIG_ZREG_SIZE): Likewise.
8307 (SVE_SIG_PREG_SIZE): Likewise.
8308 (SVE_SIG_FFR_SIZE): Likewise.
8309 (SVE_SIG_REGS_OFFSET): Likewise.
8310 (SVE_SIG_ZREGS_OFFSET): Likewise.
8311 (SVE_SIG_ZREG_OFFSET): Likewise.
8312 (SVE_SIG_ZREGS_SIZE): Likewise.
8313 (SVE_SIG_PREGS_OFFSET): Likewise.
8314 (SVE_SIG_PREG_OFFSET): Likewise.
8315 (SVE_SIG_PREGS_SIZE): Likewise.
8316 (SVE_SIG_FFR_OFFSET): Likewise.
8317 (SVE_SIG_REGS_SIZE): Likewise.
8318 (SVE_SIG_CONTEXT_SIZE): Likewise.
8319 (SVE_PT_REGS_MASK): Likewise.
8320 (SVE_PT_REGS_FPSIMD): Likewise.
8321 (SVE_PT_REGS_SVE): Likewise.
8322 (SVE_PT_VL_INHERIT): Likewise.
8323 (SVE_PT_VL_ONEXEC): Likewise.
8324 (SVE_PT_REGS_OFFSET): Likewise.
8325 (SVE_PT_FPSIMD_OFFSET): Likewise.
8326 (SVE_PT_FPSIMD_SIZE): Likewise.
8327 (SVE_PT_SVE_ZREG_SIZE): Likewise.
8328 (SVE_PT_SVE_PREG_SIZE): Likewise.
8329 (SVE_PT_SVE_FFR_SIZE): Likewise.
8330 (SVE_PT_SVE_FPSR_SIZE): Likewise.
8331 (SVE_PT_SVE_FPCR_SIZE): Likewise.
8332 (__SVE_SIG_TO_PT): Likewise.
8333 (SVE_PT_SVE_OFFSET): Likewise.
8334 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8335 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8336 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8337 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8338 (SVE_PT_SVE_PREG_OFFSET): Likewise.
8339 (SVE_PT_SVE_PREGS_SIZE): Likewise.
8340 (SVE_PT_SVE_FFR_OFFSET): Likewise.
8341 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8342 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8343 (SVE_PT_SVE_SIZE): Likewise.
8344 (SVE_PT_SIZE): Likewise.
8345 (HAS_SVE_STATE): New define.
8346
8347 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8348
8349 * nat/aarch64-sve-linux-sigcontext.h: New file.
8350 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8351 new files.
8352 (SVE_VQ_MIN): Likewise.
8353 (SVE_VQ_MAX): Likewise.
8354 (SVE_VL_MIN): Likewise.
8355 (SVE_VL_MAX): Likewise.
8356 (SVE_NUM_ZREGS): Likewise.
8357 (SVE_NUM_PREGS): Likewise.
8358 (sve_vl_valid): Likewise.
8359 (struct user_sve_header): Likewise.
8360
8361 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
8362 Richard Bunt <Richard.Bunt@arm.com>
8363
8364 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8365 was requested by GDB.
8366
8367 2018-06-15 Tom de Vries <tdevries@suse.de>
8368
8369 * MAINTAINERS (Write After Approval): Add Tom de Vries.
8370
8371 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
8372
8373 * gnulib/update-gnulib.sh: Print expected versions of
8374 autoconf/aclocal.
8375
8376 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
8377
8378 * arch-utils.c (default_type_align): Use type_length_units.
8379 * gdbtypes.c (type_align): Use type_length_units.
8380
8381 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8382
8383 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8384 of 'define' command.
8385
8386 2018-06-14 Tom de Vries <tdevries@suse.de>
8387
8388 PR cli/22573
8389 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8390 get_no_prettyformat_print_options.
8391
8392 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
8393
8394 * sparc-nat.h: Include target.h.
8395 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8396 <fetch_registers>: Remove this argument in function call.
8397 <store_registers>: Remove this argument in function call, remove
8398 extra semicolon.
8399 <low_forget_process>: Call sparc64_forget_process instead of
8400 sparc_forget_process.
8401
8402 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8403
8404 * procfs.c (_initialize_procfs): Use add_inf_child_target.
8405 (procfs_target::make_corefile_notes): Adjust to new
8406 target_read_alloc return type.
8407
8408 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8409 Stephen Roberts <stephen.roberts@arm.com>
8410
8411 PR gdb/22882
8412 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8413 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8414 Move should_notify_stop local into more inner scope.
8415
8416 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8417 Stephen Roberts <stephen.roberts@arm.com>
8418
8419 PR gdb/22882
8420 * infrun.c (resume_1): Add call to mark_async_event_handler.
8421
8422 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8423
8424 * infrun.c (do_target_wait): Change old version of $pc printed.
8425
8426 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
8427
8428 * dwarf2read.c (read_index_from_section): Rename to...
8429 (read_gdb_index_from_section): ... this, update all callers.
8430 (dwarf2_read_index): Rename to...
8431 (dwarf2_read_gdb_index): ... this, update all callers.
8432
8433 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
8434
8435 * hppa-linux-nat.c
8436 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8437 hppa_linux_nat_target::fetch_registers.
8438
8439 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8440
8441 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8442 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8443 (AARCH64_DWARF_SVE_FFR): Likewise.
8444 (AARCH64_DWARF_SVE_P0): Likewise.
8445 (AARCH64_DWARF_SVE_Z0): Likewise.
8446
8447 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8448
8449 * common/common-regcache.h (raw_compare): New function.
8450 * regcache.c (regcache::raw_compare): Likewise.
8451 * regcache.h (regcache::raw_compare): New declaration.
8452
8453 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8454
8455 * common/common-regcache.h (reg_buffer_common): New structure.
8456 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8457 (reg_buffer::raw_supply): Likewise.
8458 (reg_buffer::raw_supply_integer): Likewise.
8459 (reg_buffer::raw_supply_zeroed): Likewise.
8460 (reg_buffer::raw_collect): Likewise.
8461 (reg_buffer::raw_collect_integer): Likewise.
8462 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8463 (reg_buffer::raw_supply): Likewise.
8464 (reg_buffer::raw_supply_integer): Likewise.
8465 (reg_buffer::raw_supply_zeroed): Likewise.
8466 (reg_buffer::raw_collect): Likewise.
8467 (reg_buffer::raw_collect_integer): Likewise.
8468
8469 2018-06-10 Tom Tromey <tom@tromey.com>
8470
8471 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
8472 (class remote_state) <stop_reply_queue>: Now std::vector.
8473 (remote_state::~remote_state)
8474 (remote_target::stop_reply_queue_length): Update.
8475 (struct queue_iter_param, remove_child_of_pending_fork)
8476 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8477 (check_pending_event_prevents_wildcard_vcont_callback)
8478 (remove_stop_reply_for_inferior)
8479 (remove_stop_reply_of_remote_state)
8480 (remote_notif_remove_once_on_match)
8481 (stop_reply_match_ptid_and_ws)
8482 (remote_kill_child_of_pending_fork): Remove.
8483 (remote_target::remove_new_fork_children)
8484 (remote_target::check_pending_events_prevent_wildcard_vcont)
8485 (remote_target::discard_pending_stop_replies)
8486 (remote_target::discard_pending_stop_replies_in_queue)
8487 (remote_target::remote_notif_remove_queued_reply)
8488 (remote_target::queued_stop_reply)
8489 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8490 (remote_target::wait, remote_target::kill_new_fork_children)
8491 (remote_target::async): Update.
8492
8493 2018-06-10 Tom Tromey <tom@tromey.com>
8494
8495 * record-full.c (record_full_arch_list_cleanups): Remove.
8496 (record_full_message): Use try/catch.
8497 (record_full_wait_cleanups): Remove.
8498 (record_full_wait_1): Use try/catch.
8499 (record_full_restore): Likewise.
8500
8501 2018-06-10 Tom Tromey <tom@tromey.com>
8502
8503 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
8504 declare VEC. Add constructor.
8505 <in_target_beneath>: Now bool.
8506 (record_full_breakpoints): Now a std::vector, static.
8507 (record_full_sync_record_breakpoints)
8508 (record_full_init_record_breakpoints)
8509 (record_full_target::insert_breakpoint)
8510 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
8511
8512 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8513
8514 * dwarf2read.c (process_cu_includes): Remove struct keyword.
8515 * serial.c (serial_interface_lookup): Remove struct keyword.
8516
8517 2018-06-10 Tom Tromey <tom@tromey.com>
8518
8519 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8520 method.
8521 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8522 a method.
8523 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8524 method.
8525 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8526 "beneath" as a method.
8527 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8528 Use "beneath" as a method.
8529
8530 2018-06-10 Tom Tromey <tom@tromey.com>
8531
8532 * tracefile.c (struct trace_file_writer_deleter): New.
8533 <operator()>: Rename from trace_file_writer_xfree.
8534 (trace_file_writer_up): New typedef.
8535 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8536
8537 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8538
8539 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8540 <m_registers, m_register_status>: Change type to
8541 std::unique_ptr.
8542 * regcache.c (reg_buffer::reg_buffer): Use new instead of
8543 XCNEWVEC.
8544
8545 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8546
8547 * common/common-regcache.h (enum register_status): Add
8548 underlying type "signed char".
8549 * regcache.h (reg_buffer) <m_register_status>: Change type to
8550 register_status *.
8551 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8552 register_status instead of signed char.
8553 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8554 (reg_buffer::get_register_status): Remove cast.
8555 (readable_regcache::raw_read): Remove cast.
8556 (readable_regcache::cooked_read): Remove cast.
8557
8558 2018-06-09 Tom Tromey <tom@tromey.com>
8559
8560 * source.c (reverse_search_command, forward_search_command): Use
8561 scoped_fd.
8562
8563 2018-06-09 Tom Tromey <tom@tromey.com>
8564
8565 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
8566 (serial_ops_list): Now static, std::vector.
8567 (serial_interface_lookup, serial_add_interface): Update.
8568
8569 2018-06-09 Tom Tromey <tom@tromey.com>
8570
8571 * dwarf2read.c (process_cu_includes): Update.
8572 (process_full_comp_unit): Update.
8573 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8574 std::vector.
8575
8576 2018-06-08 Paul Koning <paul_koning@dell.com>
8577
8578 PR gdb/23252
8579
8580 * python/python.c (do_start_initialization):
8581 Avoid call to internal Python API.
8582 (init__gdb_module): New function.
8583
8584 2018-06-08 Gary Benson <gbenson@redhat.com>
8585
8586 * linux-thread-db.c (valprint.h): New include.
8587 (struct check_thread_db_info): New structure.
8588 (check_thread_db_on_load, tdb_testinfo): New static globals.
8589 (check_thread_db, check_thread_db_callback): New functions.
8590 (try_thread_db_load_1): Run integrity checks if requested.
8591 (maintenance_check_libthread_db): New function.
8592 (_initialize_thread_db): Register "maint check libthread-db"
8593 and "maint set/show check-libthread-db".
8594 * NEWS: Mention the above new commands.
8595
8596 2018-06-08 Tom Tromey <tom@tromey.com>
8597
8598 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8599 now a method.
8600
8601 2018-06-08 Tom Tromey <tom@tromey.com>
8602
8603 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8604
8605 2018-06-08 Tom Tromey <tom@tromey.com>
8606
8607 * common/btrace-common.h (struct btrace_data): Add constructor,
8608 destructor, move assignment operator.
8609 <empty, clear, fini>: New methods.
8610 <format>: Initialize.
8611 (btrace_data_init, btrace_data_fini, btrace_data_clear)
8612 (btrace_data_empty): Don't declare.
8613 * common/btrace-common.c (btrace_data_init): Remove.
8614 (btrace_data::fini): Rename from btrace_data_fini.
8615 (btrace_data::empty): Rename from btrace_data_empty.
8616 (btrace_data::clear): Rename from btrace_data_clear. Return
8617 bool.
8618 * btrace.h (make_cleanup_btrace_data): Don't declare.
8619 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8620 (parse_xml_btrace): Update.
8621 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8622 (maint_btrace_clear_packet_history_cmd): Update.
8623
8624 2018-06-07 Pedro Alves <palves@redhat.com>
8625
8626 * target.h (target_ops) <beneath>: Now a method. All references
8627 updated.
8628 (class target_stack): New.
8629 * target.c (g_target_stack): New.
8630 (g_current_top_target): Delete.
8631 (current_top_target): Get the top target out of g_target_stack.
8632 (target_stack::push, target_stack::unpush): New.
8633 (push_target, unpush_target): Reimplement.
8634 (target_is_pushed): Reimplement in terms of g_target_stack.
8635 (target_ops::beneath, target_stack::find_beneath): New.
8636
8637 2018-06-07 Pedro Alves <palves@redhat.com>
8638
8639 * target.h (find_target_beneath): Delete declaration.
8640 * target.c (find_target_beneath): Delete definition.
8641 * aix-thread.c: All callers of find_target_beneath adjusted to
8642 call target_ops::beneath instead.
8643 * bsd-uthread.c: Likewise.
8644 * linux-thread-db.c: Likewise.
8645 * ravenscar-thread.c: Likewise.
8646 * sol-thread.c: Likewise.
8647 * spu-multiarch.c: Likewise.
8648
8649 2018-06-07 Pedro Alves <palves@redhat.com>
8650
8651 * target.h (target_ops) <beneath>: Now a method. All references
8652 updated.
8653 (target_ops) <m_beneath>: New.
8654 * target.c (target_ops::beneath): New.
8655 * corelow.c: Adjust all references to target_ops::beneath.
8656 * linux-thread-db.c: Likewise.
8657 * make-target-delegates: Likewise.
8658 * record-btrace.c: Likewise.
8659 * record-full.c: Likewise.
8660 * remote.c: Likewise.
8661 * target.c: Likewise.
8662 * target-delegates.c: Regenerate.
8663
8664 2018-06-07 Pedro Alves <palves@redhat.com>
8665
8666 * target.h (target_stack): Delete.
8667 (current_top_target): Declare function.
8668 * target.c (target_stack): Delete.
8669 (g_current_top_target): New.
8670 (current_top_target): New function.
8671 * auxv.c: Use current_top_target instead of target_stack
8672 throughout.
8673 * avr-tdep.c: Likewise.
8674 * breakpoint.c: Likewise.
8675 * corefile.c: Likewise.
8676 * elfread.c: Likewise.
8677 * eval.c: Likewise.
8678 * exceptions.c: Likewise.
8679 * frame.c: Likewise.
8680 * gdbarch-selftests.c: Likewise.
8681 * gnu-v3-abi.c: Likewise.
8682 * ia64-tdep.c: Likewise.
8683 * ia64-vms-tdep.c: Likewise.
8684 * infcall.c: Likewise.
8685 * infcmd.c: Likewise.
8686 * infrun.c: Likewise.
8687 * linespec.c: Likewise.
8688 * linux-tdep.c: Likewise.
8689 * minsyms.c: Likewise.
8690 * ppc-linux-nat.c: Likewise.
8691 * ppc-linux-tdep.c: Likewise.
8692 * procfs.c: Likewise.
8693 * regcache.c: Likewise.
8694 * remote.c: Likewise.
8695 * rs6000-tdep.c: Likewise.
8696 * s390-linux-nat.c: Likewise.
8697 * s390-tdep.c: Likewise.
8698 * solib-aix.c: Likewise.
8699 * solib-darwin.c: Likewise.
8700 * solib-dsbt.c: Likewise.
8701 * solib-spu.c: Likewise.
8702 * solib-svr4.c: Likewise.
8703 * solib-target.c: Likewise.
8704 * sparc-tdep.c: Likewise.
8705 * sparc64-tdep.c: Likewise.
8706 * spu-tdep.c: Likewise.
8707 * symfile.c: Likewise.
8708 * symtab.c: Likewise.
8709 * target-descriptions.c: Likewise.
8710 * target-memory.c: Likewise.
8711 * target.c: Likewise.
8712 * target.h: Likewise.
8713 * tracefile-tfile.c: Likewise.
8714 * tracepoint.c: Likewise.
8715 * valops.c: Likewise.
8716 * valprint.c: Likewise.
8717 * value.c: Likewise.
8718 * windows-tdep.c: Likewise.
8719 * mi/mi-main.c: Likewise.
8720
8721 2018-06-07 Tom Tromey <tom@tromey.com>
8722
8723 * valprint.h (build_address_symbolic): Declare.
8724 * printcmd.c (print_address_symbolic): Update.
8725 (build_address_symbolic): Change "name" and "filename" to
8726 std::string.
8727 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8728 Update.
8729 * defs.h (build_address_symbolic): Remove declaration.
8730
8731 2018-06-07 Alan Hayward <alan.hayward@arm.com>
8732
8733 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8734 (aarch64_vnv_type): Add function.
8735 (aarch64_pseudo_register_name): Add V regs for SVE.
8736 (aarch64_pseudo_register_type): Likewise.
8737 (aarch64_pseudo_register_reggroup_p): Likewise.
8738 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8739 (aarch64_pseudo_read_value): Add V regs for SVE.
8740 (aarch64_pseudo_write_2): Use V0 offset for SVE
8741 (aarch64_pseudo_write): Add V regs for SVE.
8742 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8743
8744 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
8745
8746 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8747 (sve_vl_from_vq): Likewise.
8748
8749 2018-06-05 Tom Tromey <tom@tromey.com>
8750
8751 * cli/cli-cmds.c (show_version): Update.
8752 * top.c (print_gdb_version): Add "interactive" parameter.
8753 Update.
8754 * main.c (captured_main_1): Update.
8755 * top.h (print_gdb_version): Add "interactive" parameter and a
8756 comment.
8757
8758 2018-06-05 David Malcolm <dmalcolm@redhat.com>
8759
8760 * common/enum-flags.h: Add trailing semicolon to example in
8761 comment.
8762
8763 2018-06-05 Tom Tromey <tom@tromey.com>
8764
8765 PR cli/12326:
8766 * NEWS: Add entry about pager.
8767 * utils.c (pagination_disabled_for_command): New global.
8768 (prompt_for_continue): Allow "c" response to prompt.
8769 (reinitialize_more_filter): Clear
8770 pagination_disabled_for_command.
8771 (fputs_maybe_filtered): Check pagination_disabled_for_command.
8772
8773 2018-06-04 Tom Tromey <tom@tromey.com>
8774
8775 * ada-lang.h (ada_lookup_symbol_list): Update.
8776 * ada-lang.c (resolve_subexp): Update.
8777 (symbols_are_identical_enums): Change type of syms. Remove nsyms
8778 parameter.
8779 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8780 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8781 results parameter to std::vector.
8782 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8783 Update.
8784 * ada-exp.y (block_lookup): Update.
8785 (select_possible_type_sym): Change type of syms. Remove nsyms
8786 parameter.
8787 (write_var_or_type, write_name_assoc): Update.
8788
8789 2018-06-04 Joel Brobecker <brobecker@adacore.com>
8790
8791 * windows-nat.c (windows_nat_target::xfer_partial): Return
8792 TARGET_XFER_E_IO if we need to delegate to the target beneath
8793 but BENEATH is NULL.
8794
8795 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
8796
8797 * Makefile.in (config.status): Add configure.nat as a
8798 dependency.
8799
8800 2018-06-04 Tom Tromey <tom@tromey.com>
8801
8802 * cp-name-parser.y (cpname_state): Add method declarations.
8803 (HANDLE_QUAL): Update.
8804 (cpname_state::d_grab, cpname_state::fill_comp)
8805 (cpname_state::make_operator, cpname_state::make_dtor)
8806 (cpname_state::make_builtin_type, cpname_state::make_name)
8807 (cpname_state::d_qualify, cpname_state::d_int_type)
8808 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8809 (%union): Move earlier.
8810
8811 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8812
8813 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8814
8815 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8816
8817 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8818 (aarch64_pseudo_write_1): Likewise.
8819 (aarch64_pseudo_read_value): Use helper.
8820 (aarch64_pseudo_write): Likewise.
8821
8822 2018-06-04 Pedro Alves <palves@redhat.com>
8823
8824 * darwin-nat.c (darwin_ops): Delete.
8825 (darwin_attach_pid): Use get_native_target.
8826
8827 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8828
8829 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8830 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8831
8832 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8833
8834 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8835 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8836 (aarch64_gdbarch_init): Check for SVE.
8837 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8838
8839 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8840
8841 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8842 * aarch64-tdep.h (aarch64_read_description): Likewise.
8843 * arch/aarch64.c (aarch64_create_target_description): Likewise.
8844 * arch/aarch64.h (aarch64_create_target_description): Likewise.
8845 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8846 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8847 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8848
8849 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
8850
8851 * value.c (value_fetch_lazy_bitfield): New.
8852 (value_fetch_lazy_memory): New.
8853 (value_fetch_lazy_register): New.
8854 (value_fetch_lazy): Factor out to smaller functions.
8855
8856 2018-06-01 Tom Tromey <tom@tromey.com>
8857
8858 * cp-name-parser.y (backslashable, represented): Now const.
8859
8860 2018-06-01 Tom Tromey <tom@tromey.com>
8861
8862 * cp-name-parser.y: Include parser-defs.h.
8863 (parser_fprintf): Remove declaration.
8864
8865 2018-06-01 Tom Tromey <tom@tromey.com>
8866
8867 * cp-name-parser.y: Use %pure-parser, %lex-param, and
8868 %parse-param.
8869 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8870 (global_result): Remove globals.
8871 (struct cpname_state): New.
8872 (yyparse): Don't declare.
8873 (yylex, yyerror): Move declarations after %union.
8874 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8875 (make_name): Add state parameter.
8876 Update all callers.
8877 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8878 parameter.
8879 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8880 Update.
8881 (yylex): Add lvalp, state parameters.
8882 (yyerror): Add state parameter.
8883 (cp_demangled_name_to_comp): Update.
8884
8885 2018-06-01 Tom Tromey <tom@tromey.com>
8886
8887 * cp-name-parser.y (parser_fprintf): Declare.
8888 (GDB_YY_REMAP_PREFIX): Define.
8889 Include yy-remap.h. Don't redefine yy* identifiers.
8890
8891 2018-06-01 Tom Tromey <tom@tromey.com>
8892
8893 * python/py-type.c (typy_legacy_template_argument): Update.
8894 * cp-support.h (cp_demangled_name_to_comp): Update.
8895 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8896 parameter to be a "std::string *".
8897 (main): Update.
8898
8899 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
8900
8901 * ada-lex.l: Include "diagnostics.h" instead of
8902 "common/diagnostics.h".
8903 * unittests/environ-selftests.c: Likewise.
8904 * common/diagnostics.h: Moved to ../include.
8905
8906 2018-06-01 Joel Brobecker <brobecker@adacore.com>
8907
8908 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8909 to language_mode_manual while calling breakpoint_re_set_one.
8910
8911 2018-06-01 Tom Tromey <tom@tromey.com>
8912
8913 * valops.c (value_cast_structs, destructor_name_p): Update.
8914 * symtab.c (gdb_mangle_name): Update.
8915 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8916 Update.
8917 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8918 (pascal_object_print_value_fields, pascal_object_print_value):
8919 Update.
8920 * p-typeprint.c (pascal_type_print_derivation_info): Update.
8921 * linespec.c (find_methods): Update.
8922 * gdbtypes.h (type_name_no_tag): Remove.
8923 (type_name_or_error): Rename from type_name_no_tag_or_error.
8924 * gdbtypes.c (type_name_no_tag): Remove.
8925 (type_name_or_error): Rename from type_name_no_tag_or_error.
8926 (lookup_struct_elt_type, check_typedef): Update.
8927 * expprint.c (print_subexp_standard): Update.
8928 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8929 * d-namespace.c (d_lookup_nested_symbol): Update.
8930 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8931 (cp_print_class_member): Update.
8932 * cp-namespace.c (cp_lookup_nested_symbol): Update.
8933 * completer.c (add_struct_fields): Update.
8934 * c-typeprint.c (cp_type_print_derivation_info)
8935 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8936 Update.
8937 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8938 (ada_prefer_type, ada_is_exception_sym): Update.
8939
8940 2018-06-01 Tom Tromey <tom@tromey.com>
8941
8942 * valops.c (enum_constant_from_type, value_namespace_elt)
8943 (value_maybe_namespace_elt): Update.
8944 * valarith.c (find_size_for_pointer_math): Update.
8945 * target-descriptions.c (make_gdb_type): Update.
8946 * symmisc.c (print_symbol): Update.
8947 * stabsread.c (define_symbol, read_type)
8948 (complain_about_struct_wipeout, add_undefined_type)
8949 (cleanup_undefined_types_1): Update.
8950 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8951 (rust_range_type_p, val_print_struct, rust_print_struct_def)
8952 (rust_internal_print_type, rust_composite_type)
8953 (rust_evaluate_funcall, rust_evaluate_subexp)
8954 (rust_inclusive_range_type_p): Update.
8955 * python/py-type.c (typy_get_tag): Update.
8956 * p-typeprint.c (pascal_type_print_base): Update.
8957 * mdebugread.c (parse_symbol, parse_type): Update.
8958 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8959 Update.
8960 * guile/scm-type.c (gdbscm_type_tag): Update.
8961 * go-lang.c (sixg_string_p): Update.
8962 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8963 Update.
8964 * gdbtypes.h (struct main_type) <tag_name>: Remove.
8965 (TYPE_TAG_NAME): Remove.
8966 * gdbtypes.c (type_name_no_tag): Simplify.
8967 (check_typedef, check_types_equal, recursive_dump_type)
8968 (copy_type_recursive, arch_composite_type): Update.
8969 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
8970 in summary mode when needed.
8971 * eval.c (evaluate_funcall): Update.
8972 * dwarf2read.c (fixup_go_packaging, read_structure_type)
8973 (process_structure_scope, read_enumeration_type)
8974 (read_namespace_type, read_module_type, determine_prefix): Update.
8975 * cp-support.c (inspect_type): Update.
8976 * coffread.c (process_coff_symbol, decode_base_type): Update.
8977 * c-varobj.c (c_is_path_expr_parent): Update.
8978 * c-typeprint.c (c_type_print_base_struct_union): Update.
8979 (c_type_print_base_1): Update. Print struct/class/union/enum in
8980 summary when using C language.
8981 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8982 (gen_maybe_namespace_elt): Update.
8983 * ada-lang.c (ada_type_name): Simplify.
8984 (empty_record, ada_template_to_fixed_record_type_1)
8985 (template_to_static_fixed_type)
8986 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8987
8988 2018-06-01 Tom Tromey <tom@tromey.com>
8989
8990 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8991 c_print_type.
8992 * c-typeprint.c (c_print_type_1): Add "language" parameter.
8993 (c_print_type): Update.
8994 (c_print_type): New overload.
8995 (c_type_print_varspec_prefix, c_type_print_args)
8996 (c_type_print_varspec_suffix, c_print_type_no_offsets)
8997 (c_type_print_base_struct_union, c_type_print_base_1)
8998 (cp_type_print_method_args): Add "language" parameter.
8999 (c_type_print_base): Update.
9000 * c-lang.h (c_print_type): Add new overload.
9001
9002 2018-06-01 Tom Tromey <tom@tromey.com>
9003
9004 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
9005 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
9006
9007 2018-06-01 Alan Hayward <alan.hayward@arm.com>
9008
9009 * aarch64-tdep.c (aarch64_sve_register_names): New const
9010 var.
9011 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
9012 (AARCH64_SVE_Z_REGS_NUM): New define.
9013 (AARCH64_SVE_P_REGS_NUM): Likewise.
9014 (AARCH64_SVE_NUM_REGS): Likewise.
9015
9016 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9017
9018 * nat/linux-ptrace.h [__alpha__]
9019 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
9020 definitions.
9021
9022 2018-05-31 Maciej W. Rozycki <macro@mips.com>
9023
9024 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
9025 the endianness selected.
9026 * NEWS: Document `set endian auto' mode operation update.
9027
9028 2018-05-31 Alan Hayward <alan.hayward@arm.com>
9029
9030 * Makefile.in: Add new header.
9031 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
9032 (sve_vl_from_vg): Likewise.
9033 (sve_vq_from_vl): Likewise.
9034 (sve_vl_from_vq): Likewise.
9035 (sve_vq_from_vg): Likewise.
9036 (sve_vg_from_vq): Likewise.
9037 * configure.nat: Add new c file.
9038 * nat/aarch64-sve-linux-ptrace.c: New file.
9039 * nat/aarch64-sve-linux-ptrace.h: New file.
9040
9041 2018-05-31 Alan Hayward <alan.hayward@arm.com>
9042
9043 * aarch64-linux-nat.c (aarch64_linux_read_description):
9044 Add parmeter zero.
9045 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
9046 Likewise.
9047 * aarch64-tdep.c (tdesc_aarch64_list): Add.
9048 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
9049 (aarch64_gdbarch_init): Add parmeter zero.
9050 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
9051 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
9052 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
9053 parmeter.
9054 * doc/gdb.texinfo: Describe SVE feature
9055 * features/aarch64-sve.c: New file.
9056
9057 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
9058
9059 PR gdb/23210
9060 * gdbarch.sh (significant_addr_bit): Default to zero when
9061 not set by target architecture.
9062 * gdbarch.c: Re-generated.
9063 * utils.c (address_significant): Update.
9064
9065 2018-05-30 Joel Brobecker <brobecker@adacore.com>
9066
9067 * stack.c (func_command): Remove trailing newline in call to error.
9068
9069 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9070
9071 * regcache.h (regcache_raw_collect): Remove, update callers to
9072 use regcache::raw_collect.
9073 * regcache.c (regcache_raw_collect): Remove.
9074
9075 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9076
9077 * regcache.h (regcache_raw_supply): Remove, update callers to
9078 use detached_regcache::raw_supply.
9079 * regcache.c (regcache_raw_supply): Remove.
9080
9081 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9082
9083 * regcache.h (regcache_cooked_write_part): Remove, update
9084 callers to use regcache::cooked_write_part.
9085 * regcache.c (regcache_cooked_write_part): Remove.
9086
9087 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9088
9089 * regcache.h (regcache_cooked_read_part): Remove, update callers
9090 to use readable_regcache::cooked_read_part.
9091 * regcache.c (regcache_cooked_read_part): Remove.
9092
9093 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9094
9095 * regcache.h (regcache_cooked_read_value): Remove, update
9096 callers to use readable_regcache::cooked_read_value.
9097 * regcache.c (regcache_cooked_read_value): Remove.
9098
9099 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9100
9101 * regcache.h (regcache_cooked_write): Remove, update callers to
9102 use regcache::cooked_write.
9103 * regcache.c (regcache_cooked_write): Remove.
9104
9105 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9106
9107 * regcache.h (regcache_invalidate): Remove, update callers to
9108 use detached_regcache::invalidate instead.
9109 * regcache.c (regcache_invalidate): Remove.
9110
9111 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9112
9113 * regcache.h (regcache_raw_write_part): Remove, update callers
9114 to use regcache::raw_write_part instead.
9115 * regcache.c (regcache_raw_write_part): Remove.
9116
9117 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9118
9119 * regcache.h (regcache_raw_read_part): Remove, update callers to
9120 use readable_regcache::raw_read_part instead.
9121 * regcache.c (regcache_raw_read_part): Remove.
9122
9123 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9124
9125 * regcache.h (regcache_cooked_read): Remove, update callers to
9126 use readable_regcache::cooked_read instead.
9127 * regcache.c (regcache_cooked_read): Remove.
9128
9129 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9130
9131 * regcache.h (regcache_raw_write): Remove, update callers to use
9132 regcache::raw_write instead.
9133 * regcache.c (regcache_raw_write): Remove.
9134
9135 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9136
9137 * regcache.h (regcache_raw_read): Remove, update callers to use
9138 readable_regcache::raw_read instead.
9139 * regcache.c (regcache_raw_read): Remove.
9140
9141 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9142
9143 * regcache.h (regcache_raw_update): Remove, update callers to
9144 use readable_regcache::raw_update instead.
9145 * regcache.c (regcache_raw_update): Remove.
9146
9147 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9148
9149 * regcache.h (regcache_register_status): Remove, update callers
9150 to use reg_buffer::get_register_status directly instead.
9151 * regcache.c (regcache_register_status): Remove.
9152
9153 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9154
9155 * regcache.h (regcache_get_ptid): Remove, update all callers to
9156 call regcache::ptid instead.
9157 * regcache.c (regcache_get_ptid): Remove.
9158
9159 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9160
9161 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9162
9163 2018-05-30 Pedro Alves <palves@redhat.com>
9164
9165 * common/common-exceptions.h (exception_rethrow): Use
9166 ATTRIBUTE_NORETURN.
9167
9168 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
9169
9170 * breakpoint.c (print_solib_event, check_status_catch_solib):
9171 Remove struct keyword in range-based for loops.
9172 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9173 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9174 Likewise.
9175 * linespec.c (find_superclass_methods, search_minsyms_for_name):
9176 Likewise.
9177 * symfile.c (addr_info_make_relative): Likewise.
9178 * thread.c (value_in_thread_stack_temporaries): Likewise.
9179
9180 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
9181
9182 PR gdb/16841
9183 * valops.c (value_struct_elt_for_reference): Call check_typedef on
9184 aggregate type to get its real type before accessing it.
9185
9186 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
9187
9188 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9189 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9190 * coff-pe-read.c (add_pe_forwarded_sym): Replace
9191 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9192 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9193 * jit.c (jit_breakpoint_re_set_internal): Likewise.
9194 * printcmd.c (info_address_command): Likewise.
9195
9196 2018-05-29 Tom Tromey <tom@tromey.com>
9197
9198 * windows-nat.c (handle_exception): Update fall-through comment.
9199
9200 2018-05-29 Tom Tromey <tom@tromey.com>
9201
9202 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
9203 (struct program_space) <added_solibs>: Now a std::vector.
9204 * breakpoint.c (print_solib_event): Update.
9205 (check_status_catch_solib): Update.
9206 * progspace.c (clear_program_space_solib_cache): Update.
9207 * solib.c (update_solib_list): Update.
9208
9209 2018-05-29 Tom Tromey <tom@tromey.com>
9210
9211 * python/py-type.c (typy_richcompare): Update.
9212 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9213 * gdbtypes.h (types_deeply_equal): Return bool.
9214 (types_equal): Likewise.
9215 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
9216 declare VEC.
9217 (check_types_equal): Change worklist to std::vector. Return
9218 bool.
9219 (struct type_equality_entry): Add constructor.
9220 (compare_maybe_null_strings): Return bool.
9221 (check_types_worklist): Return bool. Change worklist to
9222 std::vector.
9223 (types_deeply_equal): Use std::vector.
9224 (types_equal): Return bool.
9225 (compare_maybe_null_strings): Simplify.
9226
9227 2018-05-29 Tom Tromey <tom@tromey.com>
9228
9229 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
9230
9231 2018-05-29 Tom Tromey <tom@tromey.com>
9232
9233 * objc-lang.h: Don't include cp-support.h.
9234 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
9235 declare VEC.
9236
9237 2018-05-27 Tom Tromey <tom@tromey.com>
9238
9239 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9240
9241 2018-05-25 Tom Tromey <tom@tromey.com>
9242
9243 * value.c (value::location): Initialize.
9244
9245 2018-05-25 Tom Tromey <tom@tromey.com>
9246
9247 * dbxread.c (init_bincl_list): Remove.
9248 (bincl_list): Now a std::vector.
9249 (bincls_allocated, next_bincl): Remove.
9250 (free_bincl_list, do_free_bincl_list_cleanup)
9251 (make_cleanup_free_bincl_list): Remove.
9252 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9253 unique_xmalloc_ptr.
9254 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9255 (struct header_file_location): Add constructor.
9256 (add_bincl_to_list): Remove.
9257
9258 2018-05-25 Tom Tromey <tom@tromey.com>
9259
9260 * tui/tui.c (tui_enable): Update.
9261 * mi/mi-interp.c (mi_interp::init): Update.
9262 * interps.h (class interp) <name>: New method.
9263 <m_name>: Rename from name.
9264 (~scoped_restore_interp): Update.
9265 * interps.c (interp::interp): Update.
9266 (interp_add, interp_set, interp_lookup_existing)
9267 (current_interp_named_p): Update.
9268
9269 2018-05-25 Tom Tromey <tom@tromey.com>
9270
9271 * interps.c (interp_name): Remove.
9272 * mi/mi-interp.c (mi_interp::init): Update.
9273 * interps.h (interp_name): Remove.
9274 (~scoped_restore_interp): Update.
9275 * tui/tui.c (tui_enable): Update.
9276
9277 2018-05-25 Tom Tromey <tom@tromey.com>
9278
9279 * utils.c (fputs_maybe_filtered): Update.
9280 * linespec.c (decode_line_full): Update.
9281 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9282 (mi_print_breakpoint_for_event, mi_solib_loaded)
9283 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9284 (mi_user_selected_context_changed): Update.
9285 * mi/mi-main.c (mi_execute_command): Update.
9286 * cli/cli-script.c (execute_control_command): Update.
9287 * python/python.c (execute_gdb_command): Update.
9288 * solib.c (info_sharedlibrary_command): Update.
9289 * interps.c (interp_ui_out): Remove.
9290 * interps.h (interp_ui_out): Remove.
9291
9292 2018-05-25 Tom Tromey <tom@tromey.com>
9293
9294 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9295 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9296 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9297
9298 2018-05-25 Tom Tromey <tom@tromey.com>
9299
9300 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9301 * interps.c (interp_exec): Use scoped_restore.
9302
9303 2018-05-25 Tom Tromey <tom@tromey.com>
9304
9305 * remote.c (remote_target::remote_file_get): Use
9306 gdb::byte_vector.
9307 (remote_target::remote_file_put): Likewise.
9308
9309 2018-05-25 Tom Tromey <tom@tromey.com>
9310
9311 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9312 a std::string.
9313 (get_pe_section_index, add_pe_exported_sym): Update.
9314 (read_pe_exported_syms): Use gdb::def_vector.
9315
9316 2018-05-25 Tom Tromey <tom@tromey.com>
9317
9318 * frame.c (remove_prev_frame): Remove.
9319 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9320
9321 2018-05-25 Maciej W. Rozycki <macro@mips.com>
9322
9323 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9324 Remove prototypes.
9325 * mips-linux-nat.c (supply_fpregset): Always call
9326 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9327 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9328 `mips_fill_fpregset'.
9329 * mips-linux-tdep.c (mips_supply_fpregset)
9330 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9331 (mips_fill_fpregset_wrapper): Remove functions.
9332 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9333 (mips_linux_fpregset): Remove variable.
9334 (mips_linux_iterate_over_regset_sections): Use
9335 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9336 (mips_linux_o32_sigframe_init): Remove comment.
9337
9338 2018-05-25 Pedro Alves <palves@redhat.com>
9339
9340 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9341 (struct readahead_cache, struct packet_reg, struct
9342 remote_arch_state, class remote_state): Move higher up in the
9343 file.
9344 (remote_target::m_remote_state): Now an object instead of a pointer.
9345 (remote_target::get_remote_state): Adjust.
9346
9347 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9348
9349 * stack.c (select_and_print_frame): Delete.
9350 (struct function_bounds): Move struct within function.
9351 (func_command): Most content moved into new function
9352 find_frame_for_function, use new function, print result, add
9353 function comment.
9354 (find_frame_for_function): New function, now returns a result.
9355
9356 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9357
9358 * stack.c (iterate_over_block_arg_vars): Fix comment.
9359 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9360
9361 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9362
9363 PR gdb/23203
9364 * frame.c
9365 (scoped_restore_selected_frame::scoped_restore_selected_frame):
9366 Define.
9367 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9368 Define.
9369 * frame.h (class scoped_restore_selected_frame): New class.
9370 * stack.c (print_frame_local_vars): Remove catching and rethrowing
9371 of any exception, use scoped_restore_selected_frame to restore the
9372 frame instead.
9373
9374 2018-05-24 Pedro Alves <palves@redhat.com>
9375
9376 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9377 override.
9378
9379 2018-05-23 Tom Tromey <tom@tromey.com>
9380
9381 * complaints.c (struct complaints): Remove.
9382 (symfile_complaint_book): Remove.
9383 (series): New global.
9384 (complaint_internal): Update.
9385 (clear_complaints): Update.
9386
9387 2018-05-23 Tom Tromey <tom@tromey.com>
9388
9389 * complaints.c (counters): New global.
9390 (struct complain): Remove.
9391 (struct complaints) <root>: Remove.
9392 (complaint_sentinel): Remove.
9393 (symfile_complaint_book): Update.
9394 (find_complaint) Remove.
9395 (complaint_internal, clear_complaints): Update.
9396
9397 2018-05-23 Tom Tromey <tom@tromey.com>
9398
9399 * complaints.c (struct complain) <file, line>: Remove.
9400 (find_complaint): Remove file, line parameters.
9401 (complaint_internal): Update.
9402
9403 2018-05-23 Tom Tromey <tom@tromey.com>
9404
9405 * complaints.c (vcomplaint): Remove.
9406 (complaint_internal) Merge in contents of vcomplaint.
9407
9408 2018-05-23 Tom Tromey <tom@tromey.com>
9409
9410 * complaints.c (struct complaints) <explanation>: Remove.
9411 (symfile_explanations): Remove.
9412 (symfile_complaint_book): Update.
9413 (vcomplaint): Update.
9414 (struct explanation): Remove.
9415
9416 2018-05-23 Tom Tromey <tom@tromey.com>
9417
9418 * complaints.c (symfile_complaints): Remove.
9419 (complaint_internal): Remove "complaints" parameter.
9420 (clear_complaints, vcomplaint): Remove "c" parameter.
9421 (get_complaints): Remove.
9422 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9423 (dwarf2_debug_line_missing_file_complaint)
9424 (dwarf2_debug_line_missing_end_sequence_complaint)
9425 (dwarf2_complex_location_expr_complaint)
9426 (dwarf2_const_value_length_mismatch_complaint)
9427 (dwarf2_section_buffer_overflow_complaint)
9428 (dwarf2_macro_malformed_definition_complaint)
9429 (dwarf2_invalid_attrib_class_complaint)
9430 (create_addrmap_from_index, dw2_symtab_iter_next)
9431 (dw2_expand_marked_cus)
9432 (dw2_debug_names_iterator::find_vec_in_debug_names)
9433 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9434 (create_debug_type_hash_table, init_cutu_and_read_dies)
9435 (partial_die_parent_scope, add_partial_enumeration)
9436 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9437 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9438 (read_import_statement, read_file_scope, create_dwo_cu_reader)
9439 (create_cus_hash_table, create_dwp_hash_table)
9440 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9441 (dwarf2_rnglists_process, dwarf2_ranges_process)
9442 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9443 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9444 (handle_struct_member_die, process_structure_scope)
9445 (read_array_type, read_common_block, read_module_type)
9446 (read_tag_pointer_type, read_typedef, read_base_type)
9447 (read_subrange_type, load_partial_dies, partial_die_info::read)
9448 (partial_die_info::read, partial_die_info::read)
9449 (partial_die_info::read, read_checked_initial_length_and_offset)
9450 (dwarf2_string_attr, read_formatted_entries)
9451 (dwarf_decode_line_header)
9452 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9453 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9454 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9455 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9456 (get_signatured_type, get_DW_AT_signature_type)
9457 (decode_locdesc, file_file_name, consume_improper_spaces)
9458 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9459 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9460 (dwarf2_symbol_mark_computed, set_die_type)
9461 (read_attribute_value): Update.
9462 * stap-probe.c (handle_stap_probe, get_stap_base_address):
9463 Update.
9464 * dbxread.c (unknown_symtype_complaint)
9465 (lbrac_mismatch_complaint, repeated_header_complaint)
9466 (set_namestring, function_outside_compilation_unit_complaint)
9467 (read_dbx_symtab, process_one_symbol): Update.
9468 * gdbtypes.c (stub_noname_complaint): Update.
9469 * windows-nat.c (handle_unload_dll): Update.
9470 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9471 (decode_base_type): Update.
9472 * xcoffread.c (bf_notfound_complaint, ef_complaint)
9473 (eb_complaint, record_include_begin, record_include_end)
9474 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9475 (process_xcoff_symbol, read_symbol)
9476 (function_outside_compilation_unit_complaint)
9477 (scan_xcoff_symtab): Update.
9478 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9479 * buildsym.c (finish_block_internal, make_blockvector)
9480 (end_symtab_get_static_block, augment_type_symtab): Update.
9481 * dtrace-probe.c (dtrace_process_dof)
9482 (dtrace_static_probe_ops::get_probes): Update.
9483 * complaints.h (struct complaint): Don't declare.
9484 (symfile_complaints): Remove.
9485 (complaint_internal): Remove "complaints" parameter.
9486 (complaint): Likewise.
9487 (clear_complaints): Likewise.
9488 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9489 (reread_symbols): Update.
9490 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9491 (dwarf2_frame_cache, decode_frame_entry): Update.
9492 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9493 * objc-lang.c (lookup_objc_class, lookup_child_selector)
9494 (info_selectors_command): Update.
9495 * macrotab.c (macro_include, check_for_redefinition)
9496 (macro_undef): Update.
9497 * objfiles.c (filter_overlapping_sections): Update.
9498 * stabsread.c (invalid_cpp_abbrev_complaint)
9499 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9500 (define_symbol, error_type, read_type, rs6000_builtin_type)
9501 (stabs_method_name_from_physname, read_member_functions)
9502 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9503 (attach_fields_to_type, complain_about_struct_wipeout)
9504 (read_range_type, read_args, common_block_start)
9505 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9506 Update.
9507 * mdebugread.c (index_complaint, unknown_ext_complaint)
9508 (basic_type_complaint, bad_tag_guess_complaint)
9509 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9510 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9511 (parse_procedure, parse_lines)
9512 (function_outside_compilation_unit_complaint)
9513 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9514 (bad_tag_guess_complaint, reg_value_complaint): Update.
9515 * cp-support.c (demangled_name_complaint): Update.
9516 * macroscope.c (sal_macro_scope): Update.
9517 * dwarf-index-write.c (class debug_names): Update.
9518
9519 2018-05-23 Tom Tromey <tom@tromey.com>
9520
9521 * complaints.c (clear_complaints): Remove "noisy" parameter.
9522 * complaints.h (clear_complaints): Update.
9523 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9524 (reread_symbols): Update.
9525
9526 2018-05-23 Tom Tromey <tom@tromey.com>
9527
9528 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9529 SUBSEQUENT_MESSAGE.
9530 (vcomplaint, clear_complaints): Update.
9531 (symfile_explanations): Remove some messages.
9532
9533 2018-05-23 Tom Tromey <tom@tromey.com>
9534
9535 * complaints.c (internal_complaint): Remove.
9536 * complaints.h (internal_complaint): Remove.
9537
9538 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9539
9540 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9541
9542 2018-05-22 Pedro Alves <palves@redhat.com>
9543
9544 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9545 (remote_fileio_badfd, remote_fileio_return_errno)
9546 (remote_fileio_return_success, remote_fileio_func_open)
9547 (remote_fileio_func_open, remote_fileio_func_close)
9548 (remote_fileio_func_read, remote_fileio_func_write)
9549 (remote_fileio_func_lseek, remote_fileio_func_rename)
9550 (remote_fileio_func_unlink, remote_fileio_func_stat)
9551 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9552 (remote_fileio_func_isatty, remote_fileio_func_system): Add
9553 remote_target parameter.
9554 (remote_fio_func_map) <func>: Add remote_target parameter.
9555 (do_remote_fileio_request, remote_fileio_request):
9556 * remote-fileio.h (remote_fileio_request):
9557 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9558 remote_target parameter.
9559 (remote_notif_process, handle_notification): Adjust to pass down
9560 the remote.
9561 (remote_notif_state_allocate): Add remote_target parameter. Save
9562 it.
9563 * remote-notif.h (struct remote_target): Forward declare.
9564 (struct notif_client) <parse, ack, can_get_pending_events>: Add
9565 remote_target parameter.
9566 (struct remote_notif_state) <remote>: New field.
9567 (remote_notif_ack, remote_notif_parse): Add remote_target
9568 parameter.
9569 (remote_notif_state_allocate, remote_notif_state_allocate): Add
9570 remote_target parameter.
9571 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9572 (threads_listing_context, rmt_thread_action, protocol_feature)
9573 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9574 (packet_result, struct threads_listing_context, remote_state):
9575 Move definitions and declarations higher up.
9576 (remote_target) <~remote_target>: Declare.
9577 (remote_download_command_source, remote_file_put, remote_file_get)
9578 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9579 (remote_hostio_pread_vFile, remote_hostio_send_command)
9580 (remote_hostio_set_filesystem, remote_hostio_open)
9581 (remote_hostio_close, remote_hostio_unlink, remote_state)
9582 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9583 (get_memory_write_packet_size, get_memory_read_packet_size)
9584 (append_pending_thread_resumptions, remote_detach_1)
9585 (append_resumption, remote_resume_with_vcont)
9586 (add_current_inferior_and_thread, wait_ns, wait_as)
9587 (process_stop_reply, remote_notice_new_inferior)
9588 (process_initial_stop_replies, remote_add_thread)
9589 (btrace_sync_conf, remote_btrace_maybe_reopen)
9590 (remove_new_fork_children, kill_new_fork_children)
9591 (discard_pending_stop_replies, stop_reply_queue_length)
9592 (check_pending_events_prevent_wildcard_vcont)
9593 (discard_pending_stop_replies_in_queue, stop_reply)
9594 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9595 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9596 (remote_interrupt_as, remote_interrupt_ns)
9597 (remote_get_noisy_reply, remote_query_attached)
9598 (remote_add_inferior, remote_current_thread, get_current_thread)
9599 (set_thread, set_general_thread, set_continue_thread)
9600 (set_general_process, write_ptid)
9601 (remote_unpack_thread_info_response, remote_get_threadinfo)
9602 (parse_threadlist_response, remote_get_threadlist)
9603 (remote_threadlist_iterator, remote_get_threads_with_ql)
9604 (remote_get_threads_with_qxfer)
9605 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9606 (get_offsets, remote_check_symbols, remote_supported_packet)
9607 (remote_query_supported, remote_packet_size)
9608 (remote_serial_quit_handler, remote_detach_pid)
9609 (remote_vcont_probe, remote_resume_with_hc)
9610 (send_interrupt_sequence, interrupt_query)
9611 (remote_notif_get_pending_events, fetch_register_using_p)
9612 (send_g_packet, process_g_packet, fetch_registers_using_g)
9613 (store_register_using_P, store_registers_using_G)
9614 (set_remote_traceframe, check_binary_download)
9615 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9616 (remote_xfer_live_readonly_partial, remote_read_bytes)
9617 (remote_send_printf, remote_flash_write, readchar)
9618 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9619 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9620 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9621 (extended_remote_disable_randomization, extended_remote_run)
9622 (send_environment_packet, extended_remote_environment_support)
9623 (extended_remote_set_inferior_cwd, remote_write_qxfer)
9624 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9625 (packet_command): Now methods of ...
9626 (remote_target): ... this class.
9627 (m_remote_state) <remote_target>: New field.
9628 (struct remote_state) <stop_reply_queue,
9629 remote_async_inferior_event_token, wait_forever_enabled_p>: New
9630 fields.
9631 (remote_state::remote_state): Allocate stop_reply_queue.
9632 (remote_state): Delete global.
9633 (get_remote_state_raw): Delete.
9634 (remote_target::get_remote_state): Allocate m_remote_state on
9635 demand.
9636 (get_current_remote_target): New.
9637 (remote_ops, extended_remote_ops): Delete.
9638 (wait_forever_enabled_p, remote_async_inferior_event_token):
9639 Delete, moved to struct remote_state.
9640 (remote_target::close): Delete self. Destruction bits split to
9641 ...
9642 (remote_target::~remote_target): ... this.
9643 (show_memory_packet_size): Adjust to use
9644 get_current_remote_target.
9645 (struct protocol_feature) <func>: Add remote_target parameter.
9646 All callers adjusted.
9647 (curr_quit_handler_target): New.
9648 (remote_serial_quit_handler): Reimplement.
9649 (remote_target::open_1): Adjust to use get_current_remote_target.
9650 Heap-allocate remote_target/extended_remote_target instances.
9651 (vcont_builder::vcont_builder): Add remote_target parameter, and
9652 save it in m_remote. All callers adjusted.
9653 (vcont_builder::m_remote): New field.
9654 (vcont_builder::restart, vcont_builder::flush)
9655 (vcont_builder::push_action): Use it.
9656 (remote_target::commit_resume): Use it.
9657 (struct queue_iter_param) <remote>: New field.
9658 (remote_target::remove_new_fork_children): Fill in 'remote' field.
9659 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9660 (check_pending_event_prevents_wildcard_vcont_callback)
9661 (remote_target::check_pending_events_prevent_wildcard_vcont)
9662 (remote_target::discard_pending_stop_replies)
9663 (remote_target::discard_pending_stop_replies_in_queue)
9664 (remote_target::remote_notif_remove_queued_reply): Fill in
9665 'remote' field.
9666 (remote_notif_get_pending_events): New.
9667 (remote_target::readchar, remote_target::remote_serial_write):
9668 Save/restore curr_quit_handler_target.
9669 (putpkt): New.
9670 (kill_new_fork_children): Fill in 'remote' field.
9671 (packet_command): Use get_current_remote_target, defer to
9672 remote_target method of same name.
9673 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9674 parameter, and save it in m_remote. All callers adjusted.
9675 (scoped_remote_fd::release): Use m_remote.
9676 (scoped_remote_fd::m_remote): New field.
9677 (remote_file_put, remote_file_get, remote_file_delete): Use
9678 get_current_remote_target, defer to remote_target method of same
9679 name.
9680 (remote_btrace_reset): Add remote_state paremeter. Update all
9681 callers.
9682 (remote_async_inferior_event_handler). Pass down 'data'.
9683 (remote_new_objfile): Use get_current_remote_target.
9684 (remote_target::vcont_r_supported): New.
9685 (set_range_stepping): Use get_current_remote_target and
9686 remote_target::vcont_r_supported.
9687 (_initialize_remote): Don't allocate 'remote_state' and
9688 'stop_reply_queue' globals.
9689 * remote.h (struct remote_target): Forward declare.
9690 (getpkt, putpkt, remote_notif_get_pending_events): Add
9691 'remote_target' parameter.
9692
9693 2018-05-22 Pedro Alves <palves@redhat.com>
9694
9695 * remote.c (vcont_builder): Now a class. Make all data members
9696 private.
9697 (vcont_builder) <vcont_builder, restart, flush, push_action>:
9698 Declare methods.
9699 (vcont_builder_restart): Rename to ...
9700 (vcont_builder::restart): ... this.
9701 (vcont_builder_flush): Rename to ...
9702 (vcont_builder::flush): ... this.
9703 (vcont_builder_push_action): Rename to ...
9704 (vcont_builder::push_action): ... this.
9705 (remote_target::commit_resume): Adjust.
9706
9707 2018-05-22 Pedro Alves <palves@redhat.com>
9708
9709 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9710 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9711 (get_fixed_memory_packet_size): New.
9712 (get_memory_packet_size): Use it.
9713 (set_memory_packet_size): Don't override the config size with
9714 DEFAULT_MAX_MEMORY_PACKET_SIZE.
9715 (show_memory_packet_size): Use get_fixed_memory_packet_size.
9716 Don't refer to get_memory_packet_size if not connected to a remote
9717 target. Show "(default)" if configured size is 0.
9718
9719 2018-05-22 Pedro Alves <palves@redhat.com>
9720
9721 * remote.c (remote_target::mourn_inferior): Move
9722 discard_pending_stop_replies call here from ...
9723 (_initialize_remote): ... here.
9724
9725 2018-05-22 Pedro Alves <palves@redhat.com>
9726
9727 * remote.c (compare_section_command): Remove set_general_process
9728 call.
9729
9730 2018-05-22 Pedro Alves <palves@redhat.com>
9731
9732 * remote.c (struct packet_reg, struct remote_arch_state):
9733 Move higher up in the file.
9734 (remote_state) <m_arch_states>: Store remote_arch_state values
9735 instead of remote_arch_state pointers.
9736 (remote_state::get_remote_arch_state): Adjust.
9737
9738 2018-05-22 Pedro Alves <palves@redhat.com>
9739
9740 * remote.c: Include <unordered_map>.
9741 (remote_state): Now a class.
9742 (remote_state) <get_remote_arch_state>: Declare method.
9743 <get_remote_arch_state>: New field.
9744 (remote_arch_state) <remote_arch_state>: Declare ctor.
9745 <regs>: Now a unique_ptr.
9746 (remote_gdbarch_data_handle): Delete.
9747 (get_remote_arch_state): Delete.
9748 (remote_state::get_remote_arch_state): New.
9749 (get_remote_state): Adjust to call remote_state's
9750 get_remote_arch_state method.
9751 (init_remote_state): Delete, bits factored out to ...
9752 (remote_arch_state::remote_arch_state): ... this new method.
9753 (get_remote_packet_size, get_memory_packet_size)
9754 (process_g_packet, remote_target::fetch_registers)
9755 (remote_target::prepare_to_store, store_registers_using_G)
9756 (remote_target::store_registers, remote_target::get_trace_status):
9757 Adjust to call remote_state's method.
9758 (_initialize_remote): Remove reference to
9759 remote_gdbarch_data_handle.
9760
9761 2018-05-22 Pedro Alves <palves@redhat.com>
9762
9763 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9764 pread>: New method declarations.
9765 (remote_target::open_1): Adjust.
9766 (readahead_cache_invalidate): Rename to ...
9767 (readahead_cache::invalidate): ... this, and adjust to be a class
9768 method.
9769 (readahead_cache_invalidate_fd): Rename to ...
9770 (readahead_cache::invalidate_fd): ... this, and adjust to be a
9771 class method.
9772 (remote_hostio_pwrite): Adjust.
9773 (remote_hostio_pread_from_cache): Rename to ...
9774 (readahead_cache::pread): ... this, and adjust to be a class
9775 method.
9776 (remote_hostio_close): Adjust.
9777
9778 2018-05-22 Pedro Alves <palves@redhat.com>
9779
9780 * remote.c (remote_hostio_close_cleanup): Delete.
9781 (class scoped_remote_fd): New.
9782 (remote_file_put, remote_file_get): Use it.
9783
9784 2018-05-22 Pedro Alves <palves@redhat.com>
9785
9786 (struct vCont_action_support): Use bool and initialize all fields.
9787 (struct readahead_cache): Initialize all fields.
9788 (remote_state): Use bool and initialize all fields.
9789 (remote_state::remote_state, remote_state::~remote_state): New.
9790 (new_remote_state): Delete.
9791 (_initialize_remote): Use new to allocate remote_state.
9792
9793 2018-05-22 Pedro Alves <palves@redhat.com>
9794 張俊芝 <zjz@zjz.name>
9795
9796 PR gdb/22973
9797 * c-exp.y: Include "c-support.h".
9798 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9799 of tolower. Use c_ident_is_alpha to scan names.
9800 * c-lang.c: Include "c-support.h".
9801 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9802 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9803 * c-support.h: New file, with bits factored out from ...
9804 * cp-name-parser.y: ... this file.
9805 Include "c-support.h".
9806 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9807 c-support.h and renamed.
9808 (symbol_end, yylex): Adjust.
9809
9810 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9811
9812 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9813 parameter type to CORE_ADDR.
9814 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9815 parameter type in declaration to CORE_ADDR.
9816 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9817 target_auxv_search to get AT_HWCAP and use the result to get the
9818 target description.
9819 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9820 to CORE_ADDR. Remove the cast of the return value to unsigned
9821 long. Fix error predicate of target_auxv_search.
9822 (ppc_linux_nat_target::read_description): Change the type of the
9823 hwcap variable to CORE_ADDR.
9824
9825 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9826
9827 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9828 if the size of fpscr is larger than 32 bits.
9829
9830 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9831
9832 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9833 (ppc32_linux_vsxregmap): New global.
9834 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9835 regcache_supply_regset, and regcache_collect_regset.
9836 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9837 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9838 (fetch_vsx_register, store_vsx_register): Remove.
9839 (fetch_vsx_registers): Add regno parameter. Get regset using
9840 ppc_linux_vsxregset. Use regset to supply registers.
9841 (store_vsx_registers): Add regno parameter. Get regset using
9842 ppc_linux_vsxregset. Use regset to collect registers.
9843 (fetch_register): Call fetch_vsx_registers instead of
9844 fetch_vsx_register.
9845 (store_register): Call store_vsx_registers instead of
9846 store_vsx_register.
9847 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9848 new regno parameter.
9849 (store_ppc_registers): Call store_vsx_registers with -1 for the
9850 new regno parameter.
9851 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9852 (ppc_collect_vsxregset): Remove.
9853
9854 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9855
9856 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9857 offset fields.
9858 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9859 for vector register offset fields.
9860 (ppc64_fbsd_reg_offsets): Likewise.
9861 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9862 to vector register offset fields.
9863 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9864 to vector register offset fields.
9865 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9866 vector register offset fields.
9867 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9868 initializers for vector register offset fields.
9869 (rs6000_aix64_reg_offsets): Likewise.
9870 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9871 (ppc_supply_vrregset): Remove.
9872 (ppc_collect_vrregset): Remove.
9873 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9874 (ppc_linux_vrregset) : New function.
9875 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9876 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9877 (ppc32_linux_vrregset): Remove.
9878 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9879 and use result instead of ppc32_linux_vrregset.
9880 (ppc32_linux_reg_offsets): Remove initializers for vector register
9881 offset fields.
9882 (ppc64_linux_reg_offsets): Likewise.
9883 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9884 * ppc-linux-nat.c: Include regset.h.
9885 (gdb_vrregset_t): Adjust comment to account for little-endian
9886 mode.
9887 (supply_vrregset, fill_vrregset): Remove.
9888 (fetch_altivec_register, store_altivec_register): Remove.
9889 (fetch_altivec_registers): Add regno parameter. Get regset using
9890 ppc_linux_vrregset. Use regset to supply registers.
9891 (store_altivec_registers): Add regno parameter. Get regset using
9892 ppc_linux_vrregset. Use regset to collect registers.
9893 (fetch_register): Call fetch_altivec_registers instead of
9894 fetch_altivec_register.
9895 (store_register): Call store_altivec_registers instead of
9896 store_altivec_register.
9897 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9898 the new regno parameter.
9899 (store_ppc_registers): Call store_altivec_registers with -1 for
9900 the new regno parameter.
9901
9902 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9903
9904 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9905 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9906 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9907 (gdb_vrregset_t): Change array type size to
9908 PPC_LINUX_SIZEOF_VRREGSET.
9909 (gdb_vsxregset_t): Change array type size to
9910 PPC_LINUX_SIZEOF_VSXREGSET.
9911 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9912 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9913 PPC_LINUX_SIZEOF_VSXREGSET.
9914
9915 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9916
9917 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9918 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9919 nat/ppc-linux.c.
9920 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9921 ppc_linux_target_wordsize with tid.
9922 (ppc_linux_nat_target::read_description): Call ppc_linux_target
9923 wordsize with tid.
9924 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9925 (ppc64_64bit_inferior_p): Add static and inline specifiers.
9926 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9927 tid parameter. Remove static specifier.
9928 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9929 (ppc_linux_target_wordsize): New declaration.
9930
9931 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9932
9933 * arch/ppc-linux-common.c: New file.
9934 * arch/ppc-linux-common.h: New file.
9935 * arch/ppc-linux-tdesc.h: New file.
9936 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9937 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9938 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9939 arch/ppc-linux-tdesc.h.
9940 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9941 arch/ppc-linux-tdesc.h.
9942 (ppc_linux_nat_target::read_description): Remove target
9943 description matching code. Fill a ppc_linux_features struct and
9944 call ppc_linux_match_description with it. Move comment about ISA
9945 2.05 to ppc-linux-common.c.
9946 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9947 arch/ppc-linux-tdesc.h.
9948 (ppc_linux_core_read_description): Remove target description
9949 matching code. Fill a ppc_linux_features struct and call
9950 ppc_linux_match_description with it.
9951 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9952 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9953 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9954 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9955 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9956 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9957 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9958 (tdesc_powerpc_e500l): Remove.
9959
9960 2018-05-22 Joel Brobecker <brobecker@adacore.com>
9961
9962 * ada-lang.c (catch_assert_command): Pass empty string instead
9963 of NULL for excep_string argument.
9964
9965 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9966
9967 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9968 the width of the requested register exceeds the width of the
9969 `ptrace' data type.
9970
9971 2018-05-21 Tom Tromey <tom@tromey.com>
9972
9973 * printcmd.c (output_command): Remove.
9974 (output_command_const): Rename to output_command.
9975 * valprint.h (output_command): Rename from output_command_const.
9976 * tracepoint.c (trace_dump_actions): Call output_command.
9977
9978 2018-05-21 Tom Tromey <tom@tromey.com>
9979
9980 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9981 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9982 * ada-lang.h (create_ada_exception_catchpoint): Update.
9983 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9984 std::string.
9985 (create_excep_cond_exprs, ~ada_catchpoint)
9986 (should_stop_exception, print_one_exception)
9987 (print_mention_exception, print_recreate_exception): Update.
9988 (ada_get_next_arg): Remove.
9989 (catch_ada_exception_command_split): Use std::string. Change type
9990 of "excep_string", "cond_string".
9991 (catch_ada_exception_command): Update.
9992 (create_ada_exception_catchpoint): Change type of excep_string.
9993 (ada_exception_sal): Remove excep_string parameter.
9994 (~ada_catchpoint): Remove.
9995
9996 2018-05-21 Tom Tromey <tom@tromey.com>
9997
9998 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9999 cleanup.
10000
10001 2018-05-21 Tom Tromey <tom@tromey.com>
10002
10003 * ada-lang.c (ada_exception_message_1, ada_exception_message):
10004 Return unique_xmalloc_ptr.
10005 (print_it_exception): Update.
10006
10007 2018-05-21 Tom Tromey <tom@tromey.com>
10008
10009 * tracepoint.c (trace_dump_actions): Use std::string.
10010
10011 2018-05-21 Tom Tromey <tom@tromey.com>
10012
10013 * symfile.c (reread_symbols): Use std::string for original_name.
10014
10015 2018-05-21 Tom Tromey <tom@tromey.com>
10016
10017 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
10018 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
10019 constructor.
10020
10021 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
10022
10023 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
10024 instance to...
10025 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
10026 * objfiles.c (get_objfile_bfd_data): Allocate
10027 objfile_per_bfd_storage with obstack_new when allocating on
10028 obstack.
10029
10030 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
10031
10032 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
10033 OBSTACK_ZALLOC.
10034 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
10035 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
10036 * mdebugread.c (mdebug_build_psymtabs): Likewise.
10037 (add_pending): Likewise.
10038 (parse_symbol): Likewise.
10039 (parse_partial_symbols): Likewise.
10040 (psymtab_to_symtab_1): Likewise.
10041 (new_psymtab): Likewise.
10042 (elfmdebug_build_psymtabs): Likewise.
10043 * minsyms.c (terminate_minimal_symbol_table): Likewise.
10044 * objfiles.c (get_objfile_bfd_data): Likewise.
10045 (objfile_register_static_link): Likewise.
10046 * psymtab.c (allocate_psymtab): Likewise.
10047 * stabsread.c (read_member_functions): Likewise.
10048 * xcoffread.c (xcoff_end_psymtab): Likewise.
10049
10050 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
10051
10052 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
10053 compiler supports std::is_trivially_constructible.
10054 * common/poison.h: Include obstack.h.
10055 (IsMallocable): Define to is_trivially_constructible if the
10056 compiler supports it, define to true_type otherwise.
10057 (xobnew): New.
10058 (XOBNEW): Redefine.
10059 (xobnewvec): New.
10060 (XOBNEWVEC): Redefine.
10061 * gdb_obstack.h (obstack_zalloc): New.
10062 (OBSTACK_ZALLOC): Redefine.
10063 (obstack_calloc): New.
10064 (OBSTACK_CALLOC): Redefine.
10065 (obstack_new): New.
10066 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
10067 (gdbarch_obstack): New declaration in gdbarch.h, definition in
10068 gdbarch.c.
10069 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
10070 obstack_calloc/obstack_zalloc.
10071 (gdbarch_obstack_zalloc): Remove.
10072 * target-descriptions.c (tdesc_data_init): Use obstack_new.
10073
10074 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10075
10076 * stack.c (backtrace_command_1): Remove useless variable int i.
10077
10078 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10079
10080 * stack.c (print_frame_info): Fix comment.
10081
10082 2018-05-18 Tom Tromey <tom@tromey.com>
10083
10084 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10085 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10086 (~dwarf2_per_objfile): Update
10087 (dwarf2_get_dwz_file): Use new.
10088 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10089 unique_ptr.
10090
10091 2018-05-18 Tom Tromey <tom@tromey.com>
10092
10093 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10094 unique_ptr.
10095 * dwarf2read.c (struct dwp_file): Add constructor and
10096 initializers.
10097 (open_and_init_dwp_file): Return a unique_ptr.
10098 (dwarf2_per_objfile, create_dwp_hash_table)
10099 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10100 (lookup_dwo_unit_in_dwp): Update.
10101 (open_and_init_dwp_file, get_dwp_file): Update.
10102
10103 2018-05-18 Tom Tromey <tom@tromey.com>
10104
10105 * dwarf2read.c (dwarf2_per_objfile): Update.
10106 (struct mapped_index): Add initializers.
10107 (dwarf2_read_index): Use new.
10108 (dw2_symtab_iter_init): Update.
10109 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10110 unique_ptr.
10111
10112 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10113
10114 * dwarf2read.c (mapped_index) <total_size>: Remove.
10115
10116 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10117
10118 * unittests/format_pieces-selftests.c (test_format_specifier):
10119 Add ARI comments.
10120
10121 2018-05-18 Tom Tromey <tom@tromey.com>
10122
10123 * c-typeprint.c (maybe_print_hole): New function.
10124 (c_print_type_struct_field_offset): Update.
10125 (c_type_print_base_struct_union): Call maybe_print_hole.
10126
10127 2018-05-17 Keith Seitz <keiths@redhat.com>
10128
10129 * breakpoint.c (build_bpstat_chain): New function, moved from
10130 bpstat_stop_status.
10131 (bpstat_stop_status): Add optional parameter, `stop_chain'.
10132 If no stop chain is passed, call build_bpstat_chain to build it.
10133 * breakpoint.h (build_bpstat_chain): Declare.
10134 (bpstat_stop_status): Move documentation here from breakpoint.c.
10135 * infrun.c (handle_signal_stop): Before eliding inlined frames,
10136 build the stop chain and pass it to skip_inline_frames.
10137 Pass this stop chain to bpstat_stop_status.
10138 * inline-frame.c: Include breakpoint.h.
10139 (stopped_by_user_bp_inline_frame): New function.
10140 (skip_inline_frames): Add parameter `stop_chain'.
10141 Move documention to inline-frame.h.
10142 If non-NULL, use stopped_by_user_bp_inline_frame to determine
10143 whether the frame should be elided.
10144 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10145 Add moved documentation and update for new parameter.
10146
10147 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10148
10149 PR cli/14975
10150 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10151 unittests/format_pieces-selftests.c.
10152 * common/format.h (format_piece) <operator==>: New.
10153 (format_pieces) <operator[]>: Remove.
10154 * common/format.c (format_pieces::format_pieces): Handle \e.
10155 * unittests/format_pieces-selftests.c: New.
10156
10157 2018-05-17 Tom Tromey <tom@tromey.com>
10158
10159 PR symtab/23010:
10160 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10161 (dw2_instantiate_symtab): Add skip_partial parameter.
10162 (dw2_find_last_source_symtab, dw2_map_expand_apply)
10163 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10164 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10165 (dw2_expand_symtabs_matching_one)
10166 (dw2_find_pc_sect_compunit_symtab)
10167 (dw2_debug_names_lookup_symbol)
10168 (dw2_debug_names_expand_symtabs_for_function): Update.
10169 (init_cutu_and_read_dies): Add skip_partial parameter.
10170 (process_psymtab_comp_unit, build_type_psymtabs_1)
10171 (process_skeletonless_type_unit, load_partial_comp_unit)
10172 (psymtab_to_symtab_1): Update.
10173 (load_full_comp_unit): Add skip_partial parameter.
10174 (process_imported_unit_die, dwarf2_read_addr_index)
10175 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10176 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10177 (read_signatured_type): Update.
10178
10179 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10180
10181 * value.c (release_value): Remove unused variable.
10182 (record_latest_value): Likewise.
10183 (access_value_history): Likewise.
10184 (preserve_values): Likewise.
10185
10186 2018-05-17 Tom Tromey <tom@tromey.com>
10187
10188 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10189 Initialize.
10190
10191 2018-05-16 Maciej W. Rozycki <macro@mips.com>
10192
10193 PR gdb/22286
10194 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10195 Also handle registers whose width is not a multiple of
10196 PTRACE_TYPE_RET.
10197 (linux_nat_trad_target::store_register): Likewise.
10198
10199 2018-05-16 Tom Tromey <tom@tromey.com>
10200
10201 * gdbcore.h (core_bfd): Redefine.
10202 * corelow.c (core_target::close): Update.
10203 (core_target_open): Update.
10204 * progspace.h (struct program_space) <cbfd>: Now a
10205 gdb_bfd_ref_ptr.
10206
10207 2018-05-16 Tom Tromey <tom@tromey.com>
10208
10209 PR cli/19551:
10210 * symfile-add-flags.h (enum symfile_add_flags)
10211 <SYMFILE_NOT_FILENAME>: New constant.
10212 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
10213 objfile name from BFD.
10214 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10215 * minidebug.c (find_separate_debug_file_in_section): Put
10216 ".gnu_debugdata" into BFD's file name.
10217
10218 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
10219
10220 * regcache.c (regcache_read_ftype, regcache_write_ftype):
10221 Remove.
10222
10223 2018-05-15 Tamar Christina <tamar.christina@arm.com>
10224
10225 PR binutils/21446
10226 * aarch64-tdep.c (aarch64_analyze_prologue,
10227 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10228 Indicate not interested in errors.
10229
10230 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10231
10232 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10233 Supply the MIPS_ZERO_REGNUM register.
10234
10235 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10236
10237 * mips-tdep.c (mask_address_var): Make variable static.
10238
10239 2018-05-14 Tom Tromey <tom@tromey.com>
10240
10241 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10242
10243 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
10244
10245 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10246 FXSAVE_ADDR for the mxcsr register.
10247
10248 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
10249
10250 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10251
10252 2018-05-11 Pedro Alves <palves@redhat.com>
10253
10254 * corelow.c (core_target) <core_target>: No longer inline.
10255 Initialize m_core_gdbarch, m_core_vec and build the section table
10256 here.
10257 <~core_target>: New.
10258 <core_gdbarch, get_core_register_section>: New methods.
10259 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10260 factored out from ...
10261 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10262 (core_ops): Delete.
10263 (sniff_core_bfd): Add gdbarch parameter.
10264 (core_close): Delete, merged into ...
10265 (core_target::close): ... here. Delete self.
10266 (core_close_cleanup): Delete.
10267 (core_target_open): Allocate a core_target on the heap. Use a
10268 unique_ptr instead of a cleanup. Bits moved into the core_target
10269 ctor. Adjust to use core_target methods instead of globals.
10270 (get_core_register_section): Rename to ...
10271 (core_target::get_core_register_section): ... this and adjust.
10272 (struct get_core_registers_cb_data): New.
10273 (get_core_registers_cb): Use it. Use bool.
10274 (core_target::fetch_registers, core_target::files_info)
10275 (core_target::xfer_partial, core_target::read_description)
10276 (core_target::pid_to, core_target::thread_name): Adjust to
10277 reference class fields instead of globals.
10278 * target.h (struct target_ops_deleter, target_ops_up): New.
10279
10280 2018-05-11 Pedro Alves <palves@redhat.com>
10281
10282 * corefile.c (core_file_command): Move to corelow.c.
10283 * corelow.c (the_core_target): Delete.
10284 (core_file_command): Moved from corefile.c. Check exec_bfd
10285 instead of the_core_target. Use target_detach instead of calling
10286 into the_core_target directly.
10287 (maybe_say_no_core_file_now): New.
10288 (core_target::detach): Use it.
10289 (_initialize_corelow): Remove references to the_core_target.
10290 * gdbcore.h (the_core_target): Delete.
10291
10292 2018-05-11 Tom Tromey <tromey@redhat.com>
10293 Pedro Alves <palves@redhat.com>
10294
10295 * corefile.c (core_bfd): Remove.
10296 * gdbcore.h (core_bfd): Now a macro.
10297 * progspace.h (struct program_space) <cbfd>: New field.
10298
10299 2018-05-11 Tom Tromey <tom@tromey.com>
10300
10301 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10302 gdb::def_vector.
10303
10304 2018-05-10 Tom Tromey <tom@tromey.com>
10305
10306 * configure: Rebuild.
10307 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10308
10309 2018-05-10 Joel Brobecker <brobecker@adacore.com>
10310
10311 PR server/23158:
10312 * regformats/regdat.sh: Adjust script, following the addition
10313 of the new expedite_regs parameter to init_target_desc.
10314
10315 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
10316
10317 PR gdb/23127
10318 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10319 set_gdbarch_significant_addr_bit.
10320 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10321 set_gdbarch_significant_addr_bit.
10322 * utils.c (address_significant): Update to sign extend addr.
10323
10324 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
10325
10326 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10327 (xtensa_linux_init_abi): Limit tdep->num_regs by
10328 tdep->num_nopriv_regs.
10329 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10330 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10331 not initialized.
10332
10333 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
10334
10335 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10336
10337 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
10338
10339 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10340 (I387_MXCSR_INIT_VAL): New constant.
10341 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10342 buffer if it was supplied by the inferior.
10343 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10344 (i387_xsave_get_clear_bv): New function.
10345 (i387_supply_xsave): Only read x87 control registers from the
10346 xsave buffer if the feature is enabled, and the state will have
10347 been written, otherwise, provide a suitable default.
10348 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10349 including x87 control registers. Update control registers if they
10350 have changed from the default value, and mark features as enabled
10351 as required.
10352 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10353
10354 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10355
10356 * spu-tdep.c (info_spu_event_command): Fix output formatting.
10357
10358 2018-05-07 Tom Tromey <tom@tromey.com>
10359
10360 * configure: Rebuild.
10361 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10362
10363 2018-05-07 Tom Tromey <tom@tromey.com>
10364
10365 PR tdep/20362:
10366 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10367 bit. Use correct value for VDIV.
10368
10369 2018-05-04 Tom Tromey <tom@tromey.com>
10370
10371 * configure: Rebuild.
10372 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10373
10374 2018-05-04 Tom Tromey <tom@tromey.com>
10375
10376 * linux-record.c (record_linux_system_call) <case
10377 RECORD_SYS_RECVFROM>: Add "break".
10378
10379 2018-05-04 Tom Tromey <tom@tromey.com>
10380
10381 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10382 Add missing "break".
10383 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10384 Add missing "break".
10385
10386 2018-05-04 Tom Tromey <tom@tromey.com>
10387
10388 * rs6000-tdep.c (ppc_process_record_op4)
10389 (ppc_process_record_op63): Add fall-through comment.
10390
10391 2018-05-04 Tom Tromey <tom@tromey.com>
10392
10393 * i386-tdep.c (i386_process_record): Add fall-through comment.
10394
10395 2018-05-04 Tom Tromey <tom@tromey.com>
10396
10397 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10398 comment.
10399
10400 2018-05-04 Tom Tromey <tom@tromey.com>
10401
10402 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10403 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10404 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10405 comment.
10406 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10407 comment.
10408 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10409 comment.
10410
10411 2018-05-04 Tom Tromey <tom@tromey.com>
10412
10413 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10414
10415 2018-05-04 Tom Tromey <tom@tromey.com>
10416
10417 * s390-tdep.c (s390_process_record): Fix fall-through comments.
10418 * xcoffread.c (scan_xcoff_symtab): Move comment later.
10419 * symfile.c (section_is_mapped): Fix fall-through comment.
10420 * stabsread.c (define_symbol, read_member_functions): Fix
10421 fall-through comment.
10422 * s390-linux-tdep.c (s390_process_record): Fix fall-through
10423 comment.
10424 * remote.c (remote_wait_as): Fix fall-through comment.
10425 * p-exp.y (yylex): Fix fall-through comment.
10426 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10427 comment.
10428 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10429 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10430 * jv-exp.y (yylex): Fix fall-through comment.
10431 * go-exp.y (lex_one_token): Fix fall-through comment.
10432 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10433 fall-through comment.
10434 * f-exp.y (yylex): Fix fall-through comment.
10435 * dwarf2read.c (process_die): Fix fall-through comments.
10436 * dbxread.c (process_one_symbol): Fix fall-through comment.
10437 * d-exp.y (lex_one_token): Fix fall-through comment.
10438 * cp-name-parser.y (yylex): Fix fall-through comment.
10439 * coffread.c (coff_symtab_read): Fix fall-through comment.
10440 * c-exp.y (lex_one_token): Fix fall-through comment.
10441 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10442 comment.
10443 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10444 comment.
10445
10446 2018-05-04 Tom Tromey <tom@tromey.com>
10447
10448 PR python/22730:
10449 * NEWS: Mention gdb.execute change.
10450 * gdbcmd.h (execute_control_command): Don't declare.
10451 * python/python.c (execute_gdb_command): Use read_command_lines_1,
10452 execute_control_commands, execute_control_commands_to_string.
10453 * cli/cli-script.h (execute_control_commands)
10454 (execute_control_commands_to_string): Declare.
10455 (execute_control_command): Add from_tty parameter.
10456 * cli/cli-script.c (execute_control_commands)
10457 (execute_control_commands_to_string): New functions.
10458 (execute_user_command): Use execute_control_commands.
10459 (execute_control_command_1): Add "from_tty" parameter. Update.
10460 (execute_control_command): Likewise.
10461
10462 2018-05-04 Tom Tromey <tom@tromey.com>
10463
10464 PR python/22731:
10465 * NEWS: Mention that breakpoint commands are writable.
10466 * python/py-breakpoint.c (bppy_set_commands): New function.
10467 (breakpoint_object_getset) <"commands">: Use it.
10468
10469 2018-05-04 Tom Tromey <tom@tromey.com>
10470
10471 * tracepoint.c (actions_command): Update.
10472 * mi/mi-cmd-break.c (mi_command_line_array)
10473 (mi_command_line_array_cnt, mi_command_line_array_ptr)
10474 (mi_read_next_line): Remove.
10475 (mi_cmd_break_commands): Update.
10476 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10477 function_view.
10478 * cli/cli-script.c (get_command_line): Update.
10479 (process_next_line): Use function_view. Constify.
10480 (recurse_read_control_structure, read_command_lines)
10481 (read_command_lines_1): Change argument types to function_view.
10482 (do_define_command, document_command): Update.
10483 * breakpoint.h (check_tracepoint_command): Don't declare.
10484 * breakpoint.c (check_tracepoint_command): Remove.
10485 (commands_command_1, create_tracepoint_from_upload): Update.
10486
10487 2018-05-04 Tom Tromey <tom@tromey.com>
10488
10489 PR gdb/11750:
10490 * cli/cli-script.h (enum command_control_type) <define_control>:
10491 New constant.
10492 * cli/cli-script.c (multi_line_command_p): Handle define_control.
10493 (build_command_line, execute_control_command_1)
10494 (process_next_line): Likewise.
10495 (do_define_command): New function, extracted from define_command.
10496 (define_command): Use it.
10497
10498 2018-05-04 Tom Tromey <tom@tromey.com>
10499
10500 * tracepoint.c (actions_command): Update.
10501 * cli/cli-script.h (read_command_lines): Update.
10502 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10503 (MAX_TMPBUF): Remove define.
10504 (define_command): Use string_printf.
10505 (document_command): Likewise.
10506 * breakpoint.c (commands_command_1): Update.
10507
10508 2018-05-04 Tom Tromey <tom@tromey.com>
10509
10510 * top.c (execute_command): Update.
10511 * cli/cli-script.h (print_command_lines): Now varargs.
10512 * cli/cli-script.c (print_command_lines): Now varargs.
10513 (execute_control_command_1) <case while_control, case if_control>:
10514 Update.
10515
10516 2018-05-04 Tom Tromey <tom@tromey.com>
10517
10518 * tracepoint.c (all_tracepoint_actions): Rename from
10519 all_tracepoint_actions_and_cleanup. Change return type.
10520 (actions_command, encode_actions_1, encode_actions)
10521 (trace_dump_actions, tdump_command): Update.
10522 * remote.c (remote_download_command_source): Update.
10523 * python/python.c (gdbpy_eval_from_control_command)
10524 (python_command, python_interactive_command): Update.
10525 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10526 * guile/guile.c (guile_command)
10527 (gdbscm_eval_from_control_command, guile_command): Update.
10528 * compile/compile.c (compile_code_command)
10529 (compile_print_command, compile_to_object): Update.
10530 * cli/cli-script.h (struct command_lines_deleter): New.
10531 (counted_command_line): New typedef.
10532 (struct command_line): Add constructor, destructor.
10533 <body_list>: Remove.
10534 <body_list_0, body_list_1>: New members.
10535 (command_line_up): Remove typedef.
10536 (read_command_lines, read_command_lines_1, get_command_line):
10537 Update.
10538 (copy_command_lines): Don't declare.
10539 * cli/cli-script.c (build_command_line): Use "new".
10540 (get_command_line): Return counted_command_line.
10541 (print_command_lines, execute_user_command)
10542 (execute_control_command_1, while_command, if_command): Update.
10543 (realloc_body_list): Remove.
10544 (process_next_line, recurse_read_control_structure): Update.
10545 (read_command_lines, read_command_lines_1): Return counted_command_line.
10546 (free_command_lines): Use "delete".
10547 (copy_command_lines): Remove.
10548 (define_command, document_command, show_user_1): Update.
10549 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10550 a counted_command_line.
10551 * breakpoint.h (counted_command_line): Remove typedef.
10552 (breakpoint_set_commands): Update.
10553 * breakpoint.c (check_no_tracepoint_commands)
10554 (validate_commands_for_breakpoint): Update.
10555 (breakpoint_set_commands): Change commands to be a
10556 counted_command_line.
10557 (commands_command_1, update_dprintf_command_list)
10558 (create_tracepoint_from_upload): Update.
10559
10560 2018-05-04 Tom Tromey <tom@tromey.com>
10561
10562 * cli/cli-decode.h (cmd_list_element): New constructor.
10563 (~cmd_list_element): New destructor.
10564 (struct cmd_list_element): Add initializers.
10565 * cli/cli-decode.c (do_add_cmd): Use "new".
10566 (delete_cmd): Use "delete".
10567
10568 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
10569 Pedro Alves <palves@redhat.com>
10570
10571 PR breakpoints/19806 and support for PR external/20207.
10572 * NEWS: Mention Aarch64 watchpoint improvements.
10573 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10574 watchpoints and PR external/20207 watchpoints.
10575 * nat/aarch64-linux-hw-point.c
10576 (kernel_supports_any_contiguous_range): New.
10577 (aarch64_watchpoint_offset): New.
10578 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10579 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10580 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10581 (aarch64_align_watchpoint): New parameters aligned_offset_p and
10582 next_addr_orig_p. Support PR external/20207 watchpoints.
10583 (aarch64_downgrade_regs): New.
10584 (aarch64_dr_state_insert_one_point): New parameters offset and
10585 addr_orig.
10586 (aarch64_dr_state_remove_one_point): Likewise.
10587 (aarch64_handle_breakpoint): Update caller.
10588 (aarch64_handle_aligned_watchpoint): Likewise.
10589 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10590 aligned_offset.
10591 (aarch64_linux_set_debug_regs): Remove const from state. Call
10592 aarch64_downgrade_regs.
10593 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10594 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10595 (DR_CONTROL_MASK): ... this.
10596 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10597 (unsigned int aarch64_watchpoint_offset): New prototype.
10598 (aarch64_linux_set_debug_regs): Remove const from state.
10599 * utils.c (align_up, align_down): Move to ...
10600 * common/common-utils.c (align_up, align_down): ... here.
10601 * utils.h (align_up, align_down): Move to ...
10602 * common/common-utils.h (align_up, align_down): ... here.
10603
10604 2018-05-04 Joel Brobecker <brobecker@adacore.com>
10605
10606 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10607 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10608 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10609 Re-implement to match the ABI as summarized in GCC's
10610 gcc/config/sparc/sparc.c. All callers updated.
10611 (sparc32_store_arguments): Remove assertion.
10612
10613 2018-05-04 Tom Tromey <tom@tromey.com>
10614
10615 * printcmd.c: Don't include tui.h.
10616 (decode_format): Use skip_spaces.
10617
10618 2018-05-04 Tom Tromey <tom@tromey.com>
10619
10620 PR gdb/22619:
10621 * printcmd.c (last_count): New global.
10622 (x_command): Use saved count when repeating.
10623
10624 2018-05-04 Tom Tromey <tom@tromey.com>
10625
10626 * nto-procfs.c (do_closedir_cleanup): Remove.
10627 (procfs_pidlist): Use gdb_dir_up.
10628 * procfs.c (do_closedir_cleanup): Remove.
10629 (proc_update_threads): Use gdb_dir_up.
10630 * common/filestuff.h (struct gdb_dir_deleter): New.
10631 (gdb_dir_up): New typedef.
10632
10633 2018-05-04 Tom Tromey <tom@tromey.com>
10634
10635 * ada-lang.c (print_mention_exception): Use std::string.
10636
10637 2018-05-04 Tom Tromey <tom@tromey.com>
10638
10639 * ada-lang.c (create_excep_cond_exprs): Update.
10640 (ada_exception_catchpoint_cond_string): Use std::string.
10641
10642 2018-05-04 Tom Tromey <tom@tromey.com>
10643
10644 * ada-lang.c (xget_renaming_scope): Return std::string.
10645 (old_renaming_is_invisible): Update.
10646
10647 2018-05-04 Tom Tromey <tom@tromey.com>
10648
10649 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10650 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10651
10652 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
10653
10654 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10655
10656 2018-05-04 Tom Tromey <tom@tromey.com>
10657
10658 * remote.c (remote_query_supported_append): Change type.
10659 (remote_check_symbols): Update.
10660
10661 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
10662
10663 PR gdb/11420
10664 * configure.ac: Prepend libpython.
10665 * python/python-config.py: Likewise.
10666 * configure: Regenerate.
10667
10668 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
10669
10670 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10671
10672 2018-05-03 Pedro Alves <palves@redhat.com>
10673
10674 * s390-linux-nat.c
10675 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10676 override. Write 'true' instead of '1'.
10677 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10678 declaration.
10679
10680 2018-05-02 Pedro Alves <palves@redhat.com>
10681
10682 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10683 add_inf_child_target.
10684 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10685 add_inf_child_target.
10686 * aix-thread.c (aix_thread_target_info): New.
10687 (aix_thread_target) <shortname, longname, doc>: Delete.
10688 <info>: New.
10689 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10690 add_inf_child_target.
10691 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10692 add_inf_child_target.
10693 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10694 add_inf_child_target.
10695 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10696 add_inf_child_target.
10697 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10698 add_inf_child_target.
10699 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10700 add_inf_child_target.
10701 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10702 add_inf_child_target.
10703 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10704 add_inf_child_target.
10705 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10706 add_inf_child_target.
10707 * bfd-target.c (target_bfd_target_info): New.
10708 (target_bfd) <shortname, longname, doc>: Delete.
10709 <info>: New.
10710 * bsd-kvm.c (bsd_kvm_target_info): New.
10711 (bsd_kvm_target) <shortname, longname, doc>: Delete.
10712 <info>: New.
10713 (bsd_kvm_target::open): Rename to ...
10714 (bsd_kvm_target_open): ... this. Adjust.
10715 * bsd-uthread.c (bsd_uthread_target_info): New.
10716 (bsd_uthread_target) <shortname, longname, doc>: Delete.
10717 <info>: New.
10718 * corefile.c (core_file_command): Adjust.
10719 * corelow.c (core_target_info): New.
10720 (core_target) <shortname, longname, doc>: Delete.
10721 <info>: New.
10722 (core_target::open): Rename to ...
10723 (core_target_open): ... this. Adjust.
10724 * ctf.c (ctf_target_info): New.
10725 (ctf_target) <shortname, longname, doc>: Delete.
10726 <info>: New.
10727 (ctf_target::open): Rename to ...
10728 (ctf_target_open): ... this.
10729 (_initialize_ctf): Adjust.
10730 * exec.c (exec_target_info): New.
10731 (exec_target) <shortname, longname, doc>: Delete.
10732 <info>: New.
10733 (exec_target::open): Rename to ...
10734 (exec_target_open): ... this.
10735 * gdbcore.h (core_target_open): Declare.
10736 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10737 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10738 add_inf_child_target.
10739 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10740 add_inf_child_target.
10741 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10742 add_inf_child_target.
10743 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10744 add_inf_child_target.
10745 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10746 add_inf_child_target.
10747 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10748 add_inf_child_target.
10749 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10750 add_inf_child_target.
10751 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10752 add_inf_child_target.
10753 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10754 add_inf_child_target.
10755 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10756 add_inf_child_target.
10757 * inf-child.c (inf_child_target_info): New.
10758 (inf_child_target::info): New.
10759 (inf_child_open_target): Remove 'target' parameter. Use
10760 get_native_target instead.
10761 (inf_child_target::open): Delete.
10762 (add_inf_child_target): New.
10763 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10764 Delete.
10765 <info>: New.
10766 (add_inf_child_target): Declare.
10767 (inf_child_open_target): Declare.
10768 * linux-thread-db.c (thread_db_target_info): New.
10769 (thread_db_target) <shortname, longname, doc>: Delete.
10770 <info>: New.
10771 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10772 add_inf_child_target.
10773 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10774 add_inf_child_target.
10775 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10776 add_inf_child_target.
10777 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10778 add_inf_child_target.
10779 * make-target-delegates (print_class): Adjust.
10780 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10781 add_inf_child_target.
10782 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10783 add_inf_child_target.
10784 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10785 add_inf_child_target.
10786 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10787 add_inf_child_target.
10788 * nto-procfs.c (nto_native_target_info): New.
10789 (nto_procfs_target_native) <shortname, longname, doc>:
10790 Delete.
10791 <info>: New.
10792 (nto_procfs_target_info): New.
10793 (nto_procfs_target_procfs) <shortname, longname, doc>:
10794 Delete.
10795 <info>: New.
10796 (init_procfs_targets): Adjust.
10797 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10798 add_inf_child_target.
10799 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10800 add_inf_child_target.
10801 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10802 add_inf_child_target.
10803 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10804 add_inf_child_target.
10805 * ravenscar-thread.c (ravenscar_target_info): New.
10806 (ravenscar_thread_target) <shortname, longname, doc>:
10807 Delete.
10808 <info>: New.
10809 * record-btrace.c (record_btrace_target_info):
10810 (record_btrace_target) <shortname, longname, doc>: Delete.
10811 <info>: New.
10812 (record_btrace_target::open): Rename to ...
10813 (record_btrace_target_open): ... this. Adjust.
10814 * record-full.c (record_longname, record_doc): New.
10815 (record_full_base_target) <shortname, longname, doc>: Delete.
10816 <info>: New.
10817 (record_full_target_info): New.
10818 (record_full_target): <shortname>: Delete.
10819 <info>: New.
10820 (record_full_core_open_1, record_full_open_1): Update comments.
10821 (record_full_base_target::open): Rename to ...
10822 (record_full_open): ... this.
10823 (cmd_record_full_restore): Update.
10824 (_initialize_record_full): Update.
10825 * remote-sim.c (remote_sim_target_info): New.
10826 (gdbsim_target) <shortname, longname, doc>: Delete.
10827 <info>: New.
10828 (gdbsim_target::open): Rename to ...
10829 (gdbsim_target_open): ... this.
10830 (_initialize_remote_sim): Adjust.
10831 * remote.c (remote_doc): New.
10832 (remote_target_info): New.
10833 (remote_target) <shortname, longname, doc>: Delete.
10834 <info>: New.
10835 (extended_remote_target_info): New.
10836 (extended_remote_target) <shortname, longname, doc>: Delete.
10837 <info>: New.
10838 (remote_target::open_1): Make static. Adjust.
10839 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10840 * s390-linux-nat.c (_initialize_s390_nat): Use
10841 add_inf_child_target.
10842 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10843 add_inf_child_target.
10844 * sol-thread.c (thread_db_target_info): New.
10845 (sol_thread_target) <shortname, longname, doc>: Delete.
10846 <info>: New.
10847 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10848 add_inf_child_target.
10849 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10850 add_inf_child_target.
10851 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10852 add_inf_child_target.
10853 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10854 add_inf_child_target.
10855 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10856 add_inf_child_target.
10857 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10858 add_inf_child_target.
10859 * spu-linux-nat.c (_initialize_spu_nat): Use
10860 add_inf_child_target.
10861 * spu-multiarch.c (spu_multiarch_target_info): New.
10862 (spu_multiarch_target) <shortname, longname, doc>: Delete.
10863 <info>: New.
10864 * target-delegates.c: Regenerate.
10865 * target.c: Include <unordered_map>.
10866 (target_ops_p): Delete.
10867 (DEF_VEC_P(target_ops_p)): Delete.
10868 (target_factories): New.
10869 (test_target_info): New.
10870 (test_target_ops::info): New.
10871 (open_target): Adjust to use target_factories.
10872 (add_target_with_completer): Rename to ...
10873 (add_target): ... this. Change prototype. Register target_info
10874 and open callback in target_factories. Register target_info in
10875 command context instead of target_ops.
10876 (add_target): Delete old implementation.
10877 (add_deprecated_target_alias): Change prototype. Adjust.
10878 (the_native_target): New.
10879 (set_native_target, get_native_target): New.
10880 (find_default_run_target): Use the_native_target.
10881 (find_attach_target, find_run_target): Simplify.
10882 (target_ops::open): Delete.
10883 (dummy_target_info): New.
10884 (dummy_target::shortname, dummy_target::longname)
10885 (dummy_target::doc): Delete.
10886 (dummy_target::info): New.
10887 (debug_target::shortname, debug_target::longname)
10888 (debug_target::doc): Delete.
10889 (debug_target::info): New.
10890 * target.h (struct target_info): New.
10891 (target_ops::~target_ops): Add comment.
10892 (target_ops::info): New.
10893 (target_ops::shortname, target_ops::longname, target_ops::doc): No
10894 longer virtual. Implement in terms of target_info.
10895 (set_native_target, get_native_target): Declare.
10896 (target_open_ftype): New.
10897 (add_target, add_target_with_completer)
10898 (add_deprecated_target_alias): Change prototype.
10899 (test_target) <shortname, longname, doc>: Delete.
10900 <info>: New.
10901 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10902 add_inf_child_target.
10903 * tracefile-tfile.c (tfile_target_info): New.
10904 (tfile_target) <shortname, longname, doc>: Delete.
10905 <info>: New.
10906 (tfile_target::open): Rename to ...
10907 (tfile_target_open): ... this.
10908 (_initialize_tracefile_tfile): Adjust.
10909 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10910 add_inf_child_target.
10911 * windows-nat.c (_initialize_windows_nat): Use
10912 add_inf_child_target.
10913 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10914 add_inf_child_target.
10915
10916 2018-05-02 Pedro Alves <palves@redhat.com>
10917
10918 * linux-nat.h (linux_nat_target) <low_new_thread,
10919 low_delete_thread, low_new_fork, low_forget_process,
10920 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10921 New virtual methods.
10922 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10923 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10924 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10925 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10926 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10927 Delete.
10928 * linux-fork.c (delete_fork): Adjust to call low method.
10929 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10930 (linux_nat_new_fork, linux_nat_forget_process_hook)
10931 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10932 (linux_nat_status_is_event):
10933 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10934 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10935 to call low method.
10936 (sigtrap_is_event): Rename to ...
10937 (linux_nat_target::low_status_is_event): ... this.
10938 (linux_nat_set_status_is_event): Delete.
10939 (save_stop_reason, linux_nat_wait_1)
10940 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10941 low methods.
10942 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10943 (linux_nat_set_new_fork, linux_nat_set_forget_process)
10944 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10945 (linux_nat_set_prepare_to_resume): Delete.
10946 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10947 low virtual methods.
10948 * amd64-linux-nat.c: Likewise.
10949 * arm-linux-nat.c: Likewise.
10950 * i386-linux-nat.c: Likewise.
10951 * ia64-linux-nat.c: Likewise.
10952 * mips-linux-nat.c: Likewise.
10953 * ppc-linux-nat.c: Likewise.
10954 * s390-linux-nat.c: Likewise.
10955 * sparc64-linux-nat.c: Likewise.
10956 * x86-linux-nat.c: Likewise.
10957 * x86-linux-nat.h: Include "nat/x86-linux.h".
10958 (x86_linux_nat_target) <low_new_fork, low_forget_process,
10959 low_prepare_to_resume, low_new_thread, low_delete_thread>:
10960 Override methods.
10961
10962 2018-05-02 Pedro Alves <palves@redhat.com>
10963
10964 * target.h (target_ops)
10965 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10966 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10967 stopped_by_watchpoint, have_continuable_watchpoint,
10968 stopped_data_address, watchpoint_addr_within_range,
10969 can_accel_watchpoint_condition, can_run, thread_alive,
10970 has_all_memory, has_memory, has_stack, has_registers,
10971 has_execution, can_async_p, is_async_p, supports_non_stop,
10972 always_non_stop_p, can_execute_reverse, supports_multi_process,
10973 supports_enable_disable_tracepoint,
10974 supports_disable_randomization, supports_string_tracing,
10975 supports_evaluation_of_breakpoint_conditions,
10976 can_run_breakpoint_commands, filesystem_is_local,
10977 can_download_tracepoint, get_trace_state_variable_value,
10978 set_trace_notes, get_tib_address, use_agent, can_use_agent,
10979 record_is_replaying, record_will_replay,
10980 augmented_libraries_svr4_read>: Adjust to return bool.
10981 * aarch64-linux-nat.c: All implementations adjusted.
10982 * aix-thread.c: All implementations adjusted.
10983 * arm-linux-nat.c: All implementations adjusted.
10984 * breakpoint.c: All implementations adjusted.
10985 * bsd-kvm.c: All implementations adjusted.
10986 * bsd-uthread.c: All implementations adjusted.
10987 * corelow.c: All implementations adjusted.
10988 * ctf.c: All implementations adjusted.
10989 * darwin-nat.c: All implementations adjusted.
10990 * darwin-nat.h: All implementations adjusted.
10991 * exec.c: All implementations adjusted.
10992 * fbsd-nat.c: All implementations adjusted.
10993 * fbsd-nat.h: All implementations adjusted.
10994 * gnu-nat.c: All implementations adjusted.
10995 * gnu-nat.h: All implementations adjusted.
10996 * go32-nat.c: All implementations adjusted.
10997 * ia64-linux-nat.c: All implementations adjusted.
10998 * inf-child.c: All implementations adjusted.
10999 * inf-child.h: All implementations adjusted.
11000 * inf-ptrace.c: All implementations adjusted.
11001 * inf-ptrace.h: All implementations adjusted.
11002 * linux-nat.c: All implementations adjusted.
11003 * linux-nat.h: All implementations adjusted.
11004 * mips-linux-nat.c: All implementations adjusted.
11005 * nto-procfs.c: All implementations adjusted.
11006 * ppc-linux-nat.c: All implementations adjusted.
11007 * procfs.c: All implementations adjusted.
11008 * ravenscar-thread.c: All implementations adjusted.
11009 * record-btrace.c: All implementations adjusted.
11010 * record-full.c: All implementations adjusted.
11011 * remote-sim.c: All implementations adjusted.
11012 * remote.c: All implementations adjusted.
11013 * s390-linux-nat.c: All implementations adjusted.
11014 * sol-thread.c: All implementations adjusted.
11015 * spu-multiarch.c: All implementations adjusted.
11016 * target-delegates.c: All implementations adjusted.
11017 * target.c: All implementations adjusted.
11018 * target.h: All implementations adjusted.
11019 * tracefile-tfile.c: All implementations adjusted.
11020 * tracefile.c: All implementations adjusted.
11021 * tracefile.h: All implementations adjusted.
11022 * windows-nat.c: All implementations adjusted.
11023 * x86-linux-nat.h: All implementations adjusted.
11024 * x86-nat.h: All implementations adjusted.
11025
11026 2018-05-02 Pedro Alves <palves@redhat.com>
11027
11028 * make-target-delegates (scan_target_h): Don't trim lines here.
11029 Replace sequences of tabs and/or whitespace with a single
11030 whitespace.
11031 (top level, parsing methods): Trim each line before processing it
11032 here.
11033
11034 2018-05-02 Pedro Alves <palves@redhat.com>
11035 John Baldwin <jhb@freebsd.org>
11036
11037 * target.h (enum strata) <debug_stratum>: New.
11038 (struct target_ops) <all delegation methods>: Replace by C++
11039 virtual methods, and drop "to_" prefix. All references updated
11040 throughout.
11041 <to_shortname, to_longname, to_doc, to_data,
11042 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
11043 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
11044 virtual methods. All references updated throughout.
11045 <can_attach, supports_terminal_ours, can_create_inferior,
11046 get_thread_control_capabilities, attach_no_wait>: New
11047 virtual methods.
11048 <insert_breakpoint, remove_breakpoint>: Now
11049 TARGET_DEFAULT_NORETURN methods.
11050 <info_proc>: Now returns bool.
11051 <to_magic>: Delete.
11052 (OPS_MAGIC): Delete.
11053 (current_target): Delete. All references replaced by references
11054 to ...
11055 (target_stack): ... this. New.
11056 (target_shortname, target_longname): Adjust.
11057 (target_can_run): Now a function declaration.
11058 (default_child_has_all_memory, default_child_has_memory)
11059 (default_child_has_stack, default_child_has_registers)
11060 (default_child_has_execution): Remove target_ops parameter.
11061 (complete_target_initialization): Delete.
11062 (memory_breakpoint_target): New template class.
11063 (test_target_ops): Refactor as a C++ class with virtual methods.
11064 * make-target-delegates (NAME_PART): Tighten.
11065 (POINTER_PART, CP_SYMBOL): New.
11066 (SIMPLE_RETURN_PART): Reimplement.
11067 (VEC_RETURN_PART): Expect less.
11068 (RETURN_PART, VIRTUAL_PART): New.
11069 (METHOD): Adjust to C++ virtual methods.
11070 (scan_target_h): Remove reference to C99.
11071 (dname): Output "target_ops::" prefix.
11072 (write_function_header): Adjust to output a C++ class method.
11073 (write_declaration): New.
11074 (write_delegator): Adjust to output a C++ class method.
11075 (tdname): Output "dummy_target::" prefix.
11076 (write_tdefault, write_debugmethod): Adjust to output a C++ class
11077 method.
11078 (tdefault_names, debug_names): Delete.
11079 (return_types, tdefaults, styles, argtypes_array): New.
11080 (top level): All methods are delegators.
11081 (print_class): New.
11082 (top level): Print dummy_target and debug_target classes.
11083 * target-delegates.c: Regenerate.
11084 * target-debug.h (target_debug_print_enum_info_proc_what)
11085 (target_debug_print_thread_control_capabilities)
11086 (target_debug_print_thread_info_p): New.
11087 * target.c (dummy_target): Delete.
11088 (the_dummy_target, the_debug_target): New.
11089 (target_stack): Now extern.
11090 (set_targetdebug): Push/unpush debug target.
11091 (default_child_has_all_memory, default_child_has_memory)
11092 (default_child_has_stack, default_child_has_registers)
11093 (default_child_has_execution): Remove target_ops parameter.
11094 (complete_target_initialization): Delete.
11095 (add_target_with_completer): No longer call
11096 complete_target_initialization.
11097 (target_supports_terminal_ours): Use regular delegation.
11098 (update_current_target): Delete.
11099 (push_target): No longer check magic number. Don't call
11100 update_current_target.
11101 (unpush_target): Don't call update_current_target.
11102 (target_is_pushed): No longer check magic number.
11103 (target_require_runnable): Skip for all stratums over
11104 process_stratum.
11105 (target_ops::info_proc): New.
11106 (target_info_proc): Use find_target_at and
11107 find_default_run_target.
11108 (target_supports_disable_randomization): Use regular delegation.
11109 (target_get_osdata): Use find_target_at.
11110 (target_ops::open, target_ops::close, target_ops::can_attach)
11111 (target_ops::attach, target_ops::can_create_inferior)
11112 (target_ops::create_inferior, target_ops::can_run)
11113 (target_can_run): New.
11114 (default_fileio_target): Use regular delegation.
11115 (target_ops::fileio_open, target_ops::fileio_pwrite)
11116 (target_ops::fileio_pread, target_ops::fileio_fstat)
11117 (target_ops::fileio_close, target_ops::fileio_unlink)
11118 (target_ops::fileio_readlink): New.
11119 (target_fileio_open_1, target_fileio_unlink)
11120 (target_fileio_readlink): Always call the target method. Handle
11121 FILEIO_ENOSYS.
11122 (return_zero, return_zero_has_execution): Delete.
11123 (init_dummy_target): Delete.
11124 (dummy_target::dummy_target, dummy_target::shortname)
11125 (dummy_target::longname, dummy_target::doc)
11126 (debug_target::debug_target, debug_target::shortname)
11127 (debug_target::longname, debug_target::doc): New.
11128 (target_supports_delete_record): Use regular delegation.
11129 (setup_target_debug): Delete.
11130 (maintenance_print_target_stack): Skip debug_stratum.
11131 (initialize_targets): Instantiate the_dummy_target and
11132 the_debug_target.
11133 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
11134 use target_stack.
11135 (target_auxv_search, fprint_target_auxv): Adjust.
11136 (info_auxv_command): Adjust to use target_stack.
11137 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11138 * exceptions.c (print_flush): Handle a NULL target_stack.
11139 * regcache.c (target_ops_no_register): Refactor as class with
11140 virtual methods.
11141
11142 * exec.c (exec_target): New class.
11143 (exec_ops): Now an exec_target.
11144 (exec_open, exec_close_1, exec_get_section_table)
11145 (exec_xfer_partial, exec_files_info, exec_has_memory)
11146 (exec_make_note_section): Refactor as exec_target methods.
11147 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11148 Delete.
11149 (exec_target::find_memory_regions): New.
11150 (_initialize_exec): Don't call init_exec_ops.
11151 * gdbcore.h (exec_file_clear): Delete.
11152
11153 * corefile.c (core_target): Delete.
11154 (core_file_command): Adjust.
11155 * corelow.c (core_target): New class.
11156 (the_core_target): New.
11157 (core_close): Remove target_ops parameter.
11158 (core_close_cleanup): Adjust.
11159 (core_target::close): New.
11160 (core_open, core_detach, get_core_registers, core_files_info)
11161 (core_xfer_partial, core_thread_alive, core_read_description)
11162 (core_pid_to_str, core_thread_name, core_has_memory)
11163 (core_has_stack, core_has_registers, core_info_proc): Rework as
11164 core_target methods.
11165 (ignore, core_remove_breakpoint, init_core_ops): Delete.
11166 (_initialize_corelow): Initialize the_core_target.
11167 * gdbcore.h (core_target): Delete.
11168 (the_core_target): New.
11169
11170 * ctf.c: (ctf_target): New class.
11171 (ctf_ops): Now a ctf_target.
11172 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11173 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11174 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11175 methods.
11176 (init_ctf_ops): Delete.
11177 (_initialize_ctf): Don't call it.
11178 * tracefile-tfile.c (tfile_target): New class.
11179 (tfile_ops): Now a tfile_target.
11180 (tfile_open, tfile_close, tfile_files_info)
11181 (tfile_get_tracepoint_status, tfile_trace_find)
11182 (tfile_fetch_registers, tfile_xfer_partial)
11183 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11184 Refactor as tfile_target methods.
11185 (tfile_xfer_partial_features): Remove target_ops parameter.
11186 (init_tfile_ops): Delete.
11187 (_initialize_tracefile_tfile): Don't call it.
11188 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11189 (tracefile_has_stack, tracefile_has_registers)
11190 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11191 tracefile_target methods.
11192 (init_tracefile_ops): Delete.
11193 (tracefile_target::tracefile_target): New.
11194 * tracefile.h: Include "target.h".
11195 (tracefile_target): New class.
11196 (init_tracefile_ops): Delete.
11197
11198 * spu-multiarch.c (spu_multiarch_target): New class.
11199 (spu_ops): Now a spu_multiarch_target.
11200 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11201 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11202 (spu_search_memory, spu_mourn_inferior): Refactor as
11203 spu_multiarch_target methods.
11204 (init_spu_ops): Delete.
11205 (_initialize_spu_multiarch): Remove references to init_spu_ops,
11206 complete_target_initialization.
11207
11208 * ravenscar-thread.c (ravenscar_thread_target): New class.
11209 (ravenscar_ops): Now a ravenscar_thread_target.
11210 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11211 (ravenscar_thread_alive, ravenscar_pid_to_str)
11212 (ravenscar_fetch_registers, ravenscar_store_registers)
11213 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11214 (ravenscar_stopped_by_hw_breakpoint)
11215 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11216 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11217 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11218 methods.
11219 (init_ravenscar_thread_ops): Delete.
11220 (_initialize_ravenscar): Remove references to
11221 init_ravenscar_thread_ops and complete_target_initialization.
11222
11223 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11224 (bsd_uthread_target): New class.
11225 (bsd_uthread_ops): Now a bsd_uthread_target.
11226 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11227 (bsd_uthread_close, bsd_uthread_mourn_inferior)
11228 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11229 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11230 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11231 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11232 (bsd_uthread_target): Delete function.
11233 (_initialize_bsd_uthread): Remove reference to
11234 complete_target_initialization.
11235
11236 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
11237 (target_bfd): ... this new class.
11238 (target_bfd_xfer_partial, target_bfd_get_section_table)
11239 (target_bfd_close): Refactor as target_bfd methods.
11240 (target_bfd::~target_bfd): New.
11241 (target_bfd_reopen): Adjust.
11242 (target_bfd::close): New.
11243
11244 * record-btrace.c (record_btrace_target): New class.
11245 (record_btrace_ops): Now a record_btrace_target.
11246 (record_btrace_open, record_btrace_stop_recording)
11247 (record_btrace_disconnect, record_btrace_close)
11248 (record_btrace_async, record_btrace_info)
11249 (record_btrace_insn_history, record_btrace_insn_history_range)
11250 (record_btrace_insn_history_from, record_btrace_call_history)
11251 (record_btrace_call_history_range)
11252 (record_btrace_call_history_from, record_btrace_record_method)
11253 (record_btrace_is_replaying, record_btrace_will_replay)
11254 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11255 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11256 (record_btrace_store_registers, record_btrace_prepare_to_store)
11257 (record_btrace_to_get_unwinder)
11258 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11259 (record_btrace_commit_resume, record_btrace_wait)
11260 (record_btrace_stop, record_btrace_can_execute_reverse)
11261 (record_btrace_stopped_by_sw_breakpoint)
11262 (record_btrace_supports_stopped_by_sw_breakpoint)
11263 (record_btrace_stopped_by_hw_breakpoint)
11264 (record_btrace_supports_stopped_by_hw_breakpoint)
11265 (record_btrace_update_thread_list, record_btrace_thread_alive)
11266 (record_btrace_goto_begin, record_btrace_goto_end)
11267 (record_btrace_goto, record_btrace_stop_replaying_all)
11268 (record_btrace_execution_direction)
11269 (record_btrace_prepare_to_generate_core)
11270 (record_btrace_done_generating_core): Refactor as
11271 record_btrace_target methods.
11272 (init_record_btrace_ops): Delete.
11273 (_initialize_record_btrace): Remove reference to
11274 init_record_btrace_ops.
11275 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11276 the execution_direction global.
11277 (record_full_base_target, record_full_target)
11278 (record_full_core_target): New classes.
11279 (record_full_ops): Now a record_full_target.
11280 (record_full_core_ops): Now a record_full_core_target.
11281 (record_full_target::detach, record_full_target::disconnect)
11282 (record_full_core_target::disconnect)
11283 (record_full_target::mourn_inferior, record_full_target::kill):
11284 New.
11285 (record_full_open, record_full_close, record_full_async): Refactor
11286 as methods of the record_full_base_target class.
11287 (record_full_resume, record_full_commit_resume): Refactor
11288 as methods of the record_full_target class.
11289 (record_full_wait, record_full_stopped_by_watchpoint)
11290 (record_full_stopped_data_address)
11291 (record_full_stopped_by_sw_breakpoint)
11292 (record_full_supports_stopped_by_sw_breakpoint)
11293 (record_full_stopped_by_hw_breakpoint)
11294 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11295 methods of the record_full_base_target class.
11296 (record_full_store_registers, record_full_xfer_partial)
11297 (record_full_insert_breakpoint, record_full_remove_breakpoint):
11298 Refactor as methods of the record_full_target class.
11299 (record_full_can_execute_reverse, record_full_get_bookmark)
11300 (record_full_goto_bookmark, record_full_execution_direction)
11301 (record_full_record_method, record_full_info, record_full_delete)
11302 (record_full_is_replaying, record_full_will_replay)
11303 (record_full_goto_begin, record_full_goto_end, record_full_goto)
11304 (record_full_stop_replaying): Refactor as methods of the
11305 record_full_base_target class.
11306 (record_full_core_resume, record_full_core_kill)
11307 (record_full_core_fetch_registers)
11308 (record_full_core_prepare_to_store)
11309 (record_full_core_store_registers, record_full_core_xfer_partial)
11310 (record_full_core_insert_breakpoint)
11311 (record_full_core_remove_breakpoint)
11312 (record_full_core_has_execution): Refactor
11313 as methods of the record_full_core_target class.
11314 (record_full_base_target::supports_delete_record): New.
11315 (init_record_full_ops): Delete.
11316 (init_record_full_core_ops): Delete.
11317 (record_full_save): Refactor as method of the
11318 record_full_base_target class.
11319 (_initialize_record_full): Remove references to
11320 init_record_full_ops and init_record_full_core_ops.
11321
11322 * remote.c (remote_target, extended_remote_target): New classes.
11323 (remote_ops): Now a remote_target.
11324 (extended_remote_ops): Now an extended_remote_target.
11325 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11326 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11327 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11328 (remote_pass_signals, remote_set_syscall_catchpoint)
11329 (remote_program_signals, )
11330 (remote_thread_always_alive): Remove target_ops parameter.
11331 (remote_thread_alive, remote_thread_name)
11332 (remote_update_thread_list, remote_threads_extra_info)
11333 (remote_static_tracepoint_marker_at)
11334 (remote_static_tracepoint_markers_by_strid)
11335 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11336 (remote_open): Refactor as methods of remote_target.
11337 (extended_remote_open, extended_remote_detach)
11338 (extended_remote_attach, extended_remote_post_attach):
11339 (extended_remote_supports_disable_randomization)
11340 (extended_remote_create_inferior): : Refactor as method of
11341 extended_remote_target.
11342 (remote_set_permissions, remote_open_1, remote_detach)
11343 (remote_follow_fork, remote_follow_exec, remote_disconnect)
11344 (remote_resume, remote_commit_resume, remote_stop)
11345 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11346 (remote_terminal_ours, remote_wait, remote_fetch_registers)
11347 (remote_prepare_to_store, remote_store_registers)
11348 (remote_flash_erase, remote_flash_done, remote_files_info)
11349 (remote_kill, remote_mourn, remote_insert_breakpoint)
11350 (remote_remove_breakpoint, remote_insert_watchpoint)
11351 (remote_watchpoint_addr_within_range)
11352 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11353 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11354 (remote_supports_stopped_by_sw_breakpoint)
11355 (remote_stopped_by_hw_breakpoint)
11356 (remote_supports_stopped_by_hw_breakpoint)
11357 (remote_stopped_by_watchpoint, remote_stopped_data_address)
11358 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11359 (remote_verify_memory): Refactor as methods of remote_target.
11360 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11361 parameter.
11362 (remote_xfer_partial, remote_get_memory_xfer_limit)
11363 (remote_search_memory, remote_rcmd, remote_memory_map)
11364 (remote_pid_to_str, remote_get_thread_local_address)
11365 (remote_get_tib_address, remote_read_description): Refactor as
11366 methods of remote_target.
11367 (remote_target::fileio_open, remote_target::fileio_pwrite)
11368 (remote_target::fileio_pread, remote_target::fileio_close): New.
11369 (remote_hostio_readlink, remote_hostio_fstat)
11370 (remote_filesystem_is_local, remote_can_execute_reverse)
11371 (remote_supports_non_stop, remote_supports_disable_randomization)
11372 (remote_supports_multi_process, remote_supports_cond_breakpoints)
11373 (remote_supports_enable_disable_tracepoint)
11374 (remote_supports_string_tracing)
11375 (remote_can_run_breakpoint_commands, remote_trace_init)
11376 (remote_download_tracepoint, remote_can_download_tracepoint)
11377 (remote_download_trace_state_variable, remote_enable_tracepoint)
11378 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11379 (remote_trace_start, remote_get_trace_status)
11380 (remote_get_tracepoint_status, remote_trace_stop)
11381 (remote_trace_find, remote_get_trace_state_variable_value)
11382 (remote_save_trace_data, remote_get_raw_trace_data)
11383 (remote_set_disconnected_tracing, remote_core_of_thread)
11384 (remote_set_circular_trace_buffer, remote_traceframe_info)
11385 (remote_get_min_fast_tracepoint_insn_len)
11386 (remote_set_trace_buffer_size, remote_set_trace_notes)
11387 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11388 (remote_disable_btrace, remote_teardown_btrace)
11389 (remote_read_btrace, remote_btrace_conf)
11390 (remote_augmented_libraries_svr4_read, remote_load)
11391 (remote_pid_to_exec_file, remote_can_do_single_step)
11392 (remote_execution_direction, remote_thread_handle_to_thread_info):
11393 Refactor as methods of remote_target.
11394 (init_remote_ops, init_extended_remote_ops): Delete.
11395 (remote_can_async_p, remote_is_async_p, remote_async)
11396 (remote_thread_events, remote_upload_tracepoints)
11397 (remote_upload_trace_state_variables): Refactor as methods of
11398 remote_target.
11399 (_initialize_remote): Remove references to init_remote_ops and
11400 init_extended_remote_ops.
11401
11402 * remote-sim.c (gdbsim_target): New class.
11403 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11404 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11405 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11406 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11407 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11408 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11409 Refactor as methods of gdbsim_target.
11410 (gdbsim_ops): Now a gdbsim_target.
11411 (init_gdbsim_ops): Delete.
11412 (gdbsim_cntrl_c): Adjust.
11413 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11414
11415 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11416 (the_amd64_linux_nat_target): New.
11417 (amd64_linux_fetch_inferior_registers)
11418 (amd64_linux_store_inferior_registers): Refactor as methods of
11419 amd64_linux_nat_target.
11420 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
11421 * i386-linux-nat.c: Don't include "linux-nat.h".
11422 (i386_linux_nat_target): New class.
11423 (the_i386_linux_nat_target): New.
11424 (i386_linux_fetch_inferior_registers)
11425 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11426 as methods of i386_linux_nat_target.
11427 (_initialize_i386_linux_nat): Adjust. Set linux_target.
11428 * inf-child.c (inf_child_ops): Delete.
11429 (inf_child_fetch_inferior_registers)
11430 (inf_child_store_inferior_registers): Delete.
11431 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11432 methods of inf_child_target.
11433 (inf_child_target::supports_terminal_ours)
11434 (inf_child_target::terminal_init)
11435 (inf_child_target::terminal_inferior)
11436 (inf_child_target::terminal_ours_for_output)
11437 (inf_child_target::terminal_ours, inf_child_target::interrupt)
11438 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11439 New.
11440 (inf_child_open, inf_child_disconnect, inf_child_close)
11441 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11442 (inf_child_post_startup_inferior, inf_child_can_run)
11443 (inf_child_pid_to_exec_file): Refactor as methods of
11444 inf_child_target.
11445 (inf_child_follow_fork): Delete.
11446 (inf_child_target::can_create_inferior)
11447 (inf_child_target::can_attach): New.
11448 (inf_child_target::has_all_memory, inf_child_target::has_memory)
11449 (inf_child_target::has_stack, inf_child_target::has_registers)
11450 (inf_child_target::has_execution): New.
11451 (inf_child_fileio_open, inf_child_fileio_pwrite)
11452 (inf_child_fileio_pread, inf_child_fileio_fstat)
11453 (inf_child_fileio_close, inf_child_fileio_unlink)
11454 (inf_child_fileio_readlink, inf_child_use_agent)
11455 (inf_child_can_use_agent): Refactor as methods of
11456 inf_child_target.
11457 (return_zero, inf_child_target): Delete.
11458 (inf_child_target::inf_child_target): New.
11459 * inf-child.h: Include "target.h".
11460 (inf_child_target): Delete function prototype.
11461 (inf_child_target): New class.
11462 (inf_child_open_target, inf_child_mourn_inferior)
11463 (inf_child_maybe_unpush_target): Delete.
11464 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11465 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11466 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11467 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11468 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11469 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11470 (inf_ptrace_wait, inf_ptrace_xfer_partial)
11471 (inf_ptrace_thread_alive, inf_ptrace_files_info)
11472 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11473 methods of inf_ptrace_target.
11474 (inf_ptrace_target): Delete function.
11475 * inf-ptrace.h: Include "inf-child.h".
11476 (inf_ptrace_target): Delete function declaration.
11477 (inf_ptrace_target): New class.
11478 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11479 * linux-nat.c (linux_target): New.
11480 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11481 (linux_nat_target::~linux_nat_target): New.
11482 (linux_child_post_attach, linux_child_post_startup_inferior)
11483 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11484 (linux_child_remove_fork_catchpoint)
11485 (linux_child_insert_vfork_catchpoint)
11486 (linux_child_remove_vfork_catchpoint)
11487 (linux_child_insert_exec_catchpoint)
11488 (linux_child_remove_exec_catchpoint)
11489 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11490 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11491 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11492 (linux_nat_stopped_data_address)
11493 (linux_nat_stopped_by_sw_breakpoint)
11494 (linux_nat_supports_stopped_by_sw_breakpoint)
11495 (linux_nat_stopped_by_hw_breakpoint)
11496 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11497 (linux_nat_kill, linux_nat_mourn_inferior)
11498 (linux_nat_xfer_partial, linux_nat_thread_alive)
11499 (linux_nat_update_thread_list, linux_nat_pid_to_str)
11500 (linux_nat_thread_name, linux_child_pid_to_exec_file)
11501 (linux_child_static_tracepoint_markers_by_strid)
11502 (linux_nat_is_async_p, linux_nat_can_async_p)
11503 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11504 (linux_nat_supports_multi_process)
11505 (linux_nat_supports_disable_randomization, linux_nat_async)
11506 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11507 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11508 (linux_nat_fileio_open, linux_nat_fileio_readlink)
11509 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11510 methods of linux_nat_target.
11511 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11512 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11513 parameter.
11514 (check_stopped_by_watchpoint): Adjust.
11515 (linux_xfer_partial): Delete.
11516 (linux_target_install_ops, linux_target, linux_nat_add_target):
11517 Delete.
11518 (linux_nat_target::linux_nat_target): New.
11519 * linux-nat.h: Include "inf-ptrace.h".
11520 (linux_nat_target): New.
11521 (linux_target, linux_target_install_ops, linux_nat_add_target):
11522 Delete function declarations.
11523 (linux_target): Declare global.
11524 * linux-thread-db.c (thread_db_target): New.
11525 (thread_db_target::thread_db_target): New.
11526 (thread_db_ops): Delete.
11527 (the_thread_db_target): New.
11528 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11529 (thread_db_update_thread_list, thread_db_pid_to_str)
11530 (thread_db_extra_thread_info)
11531 (thread_db_thread_handle_to_thread_info)
11532 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11533 (thread_db_resume): Refactor as methods of thread_db_target.
11534 (init_thread_db_ops): Delete.
11535 (_initialize_thread_db): Remove reference to init_thread_db_ops.
11536 * x86-linux-nat.c: Don't include "linux-nat.h".
11537 (super_post_startup_inferior): Delete.
11538 (x86_linux_nat_target::~x86_linux_nat_target): New.
11539 (x86_linux_child_post_startup_inferior)
11540 (x86_linux_read_description, x86_linux_enable_btrace)
11541 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11542 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11543 methods of x86_linux_nat_target.
11544 (x86_linux_create_target): Delete. Bits folded ...
11545 (x86_linux_add_target): ... here. Now takes a linux_nat_target
11546 pointer.
11547 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11548 (x86_linux_nat_target): New class.
11549 (x86_linux_create_target): Delete.
11550 (x86_linux_add_target): Now takes a linux_nat_target pointer.
11551 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11552 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11553 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11554 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11555 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11556 make extern.
11557 (x86_use_watchpoints): Delete.
11558 * x86-nat.h: Include "breakpoint.h" and "target.h".
11559 (x86_use_watchpoints): Delete.
11560 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11561 (x86_stopped_by_watchpoint, x86_stopped_data_address)
11562 (x86_insert_watchpoint, x86_remove_watchpoint)
11563 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11564 (x86_stopped_by_hw_breakpoint): New declarations.
11565 (x86_nat_target): New template class.
11566
11567 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11568 (the_ppc_linux_nat_target): New.
11569 (ppc_linux_fetch_inferior_registers)
11570 (ppc_linux_can_use_hw_breakpoint)
11571 (ppc_linux_region_ok_for_hw_watchpoint)
11572 (ppc_linux_ranged_break_num_registers)
11573 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11574 (ppc_linux_insert_mask_watchpoint)
11575 (ppc_linux_remove_mask_watchpoint)
11576 (ppc_linux_can_accel_watchpoint_condition)
11577 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11578 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11579 (ppc_linux_watchpoint_addr_within_range)
11580 (ppc_linux_masked_watch_num_registers)
11581 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11582 (ppc_linux_read_description): Refactor as methods of
11583 ppc_linux_nat_target.
11584 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
11585
11586 * procfs.c (procfs_xfer_partial): Delete forward declaration.
11587 (procfs_target): New class.
11588 (the_procfs_target): New.
11589 (procfs_target): Delete function.
11590 (procfs_auxv_parse, procfs_attach, procfs_detach)
11591 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11592 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11593 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11594 (procfs_create_inferior, procfs_update_thread_list)
11595 (procfs_thread_alive, procfs_pid_to_str)
11596 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11597 (procfs_stopped_data_address, procfs_insert_watchpoint)
11598 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11599 (proc_find_memory_regions, procfs_info_proc)
11600 (procfs_make_note_section): Refactor as methods of procfs_target.
11601 (_initialize_procfs): Adjust.
11602 * sol-thread.c (sol_thread_target): New class.
11603 (sol_thread_ops): Now a sol_thread_target.
11604 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11605 (sol_thread_fetch_registers, sol_thread_store_registers)
11606 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11607 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11608 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11609 (init_sol_thread_ops): Delete.
11610 (_initialize_sol_thread): Adjust. Remove references to
11611 init_sol_thread_ops and complete_target_initialization.
11612
11613 * windows-nat.c (windows_nat_target): New class.
11614 (windows_fetch_inferior_registers)
11615 (windows_store_inferior_registers, windows_resume, windows_wait)
11616 (windows_attach, windows_detach, windows_pid_to_exec_file)
11617 (windows_files_info, windows_create_inferior)
11618 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11619 (windows_close, windows_pid_to_str, windows_xfer_partial)
11620 (windows_get_tib_address, windows_get_ada_task_ptid)
11621 (windows_thread_name, windows_thread_alive): Refactor as
11622 windows_nat_target methods.
11623 (do_initial_windows_stuff): Adjust.
11624 (windows_target): Delete function.
11625 (_initialize_windows_nat): Adjust.
11626
11627 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11628 (darwin_mourn_inferior, darwin_kill_inferior)
11629 (darwin_create_inferior, darwin_attach, darwin_detach)
11630 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11631 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11632 (darwin_supports_multi_process): Refactor as darwin_nat_target
11633 methods.
11634 (darwin_resume_to, darwin_files_info): Delete.
11635 (_initialize_darwin_inferior): Rename to ...
11636 (_initialize_darwin_nat): ... this. Adjust to C++ification.
11637 * darwin-nat.h: Include "inf-child.h".
11638 (darwin_nat_target): New class.
11639 (darwin_complete_target): Delete.
11640 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11641 (darwin_target): New.
11642 (i386_darwin_fetch_inferior_registers)
11643 (i386_darwin_store_inferior_registers): Refactor as methods of
11644 darwin_nat_target.
11645 (darwin_complete_target): Delete, with ...
11646 (_initialize_i386_darwin_nat): ... bits factored out here.
11647
11648 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11649 (the_alpha_linux_nat_target): New.
11650 (alpha_linux_register_u_offset): Refactor as
11651 alpha_linux_nat_target method.
11652 (_initialize_alpha_linux_nat): Adjust.
11653 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11654 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11655 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11656 methods of linux_nat_trad_target.
11657 (linux_trad_target): Delete.
11658 * linux-nat-trad.h (linux_trad_target): Delete function.
11659 (linux_nat_trad_target): New class.
11660 * mips-linux-nat.c (mips_linux_nat_target): New class.
11661 (super_fetch_registers, super_store_registers, super_close):
11662 Delete.
11663 (the_mips_linux_nat_target): New.
11664 (mips64_linux_regsets_fetch_registers)
11665 (mips64_linux_regsets_store_registers)
11666 (mips64_linux_fetch_registers, mips64_linux_store_registers)
11667 (mips_linux_register_u_offset, mips_linux_read_description)
11668 (mips_linux_can_use_hw_breakpoint)
11669 (mips_linux_stopped_by_watchpoint)
11670 (mips_linux_stopped_data_address)
11671 (mips_linux_region_ok_for_hw_watchpoint)
11672 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11673 (mips_linux_close): Refactor as methods of mips_linux_nat.
11674 (_initialize_mips_linux_nat): Adjust to C++ification.
11675
11676 * aix-thread.c (aix_thread_target): New class.
11677 (aix_thread_ops): Now an aix_thread_target.
11678 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11679 (aix_thread_fetch_registers, aix_thread_store_registers)
11680 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11681 (aix_thread_thread_alive, aix_thread_pid_to_str)
11682 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11683 Refactor as methods of aix_thread_target.
11684 (init_aix_thread_ops): Delete.
11685 (_initialize_aix_thread): Remove references to init_aix_thread_ops
11686 and complete_target_initialization.
11687 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11688 (rs6000_nat_target): New class.
11689 (the_rs6000_nat_target): New.
11690 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11691 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11692 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11693 (super_create_inferior): Delete.
11694 (_initialize_rs6000_nat): Adjust to C++ification.
11695
11696 * arm-linux-nat.c (arm_linux_nat_target): New class.
11697 (the_arm_linux_nat_target): New.
11698 (arm_linux_fetch_inferior_registers)
11699 (arm_linux_store_inferior_registers, arm_linux_read_description)
11700 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11701 (arm_linux_remove_hw_breakpoint)
11702 (arm_linux_region_ok_for_hw_watchpoint)
11703 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11704 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11705 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11706 arm_linux_nat_target.
11707 (_initialize_arm_linux_nat): Adjust to C++ification.
11708
11709 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11710 (the_aarch64_linux_nat_target): New.
11711 (aarch64_linux_fetch_inferior_registers)
11712 (aarch64_linux_store_inferior_registers)
11713 (aarch64_linux_child_post_startup_inferior)
11714 (aarch64_linux_read_description)
11715 (aarch64_linux_can_use_hw_breakpoint)
11716 (aarch64_linux_insert_hw_breakpoint)
11717 (aarch64_linux_remove_hw_breakpoint)
11718 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11719 (aarch64_linux_region_ok_for_hw_watchpoint)
11720 (aarch64_linux_stopped_data_address)
11721 (aarch64_linux_stopped_by_watchpoint)
11722 (aarch64_linux_watchpoint_addr_within_range)
11723 (aarch64_linux_can_do_single_step): Refactor as methods of
11724 aarch64_linux_nat_target.
11725 (super_post_startup_inferior): Delete.
11726 (_initialize_aarch64_linux_nat): Adjust to C++ification.
11727
11728 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11729 (the_hppa_linux_nat_target): New.
11730 (hppa_linux_fetch_inferior_registers)
11731 (hppa_linux_store_inferior_registers): Refactor as methods of
11732 hppa_linux_nat_target.
11733 (_initialize_hppa_linux_nat): Adjust to C++ification.
11734
11735 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11736 (the_ia64_linux_nat_target): New.
11737 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11738 (ia64_linux_stopped_data_address)
11739 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11740 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11741 ia64_linux_nat_target methods.
11742 (super_xfer_partial): Delete.
11743 (_initialize_ia64_linux_nat): Adjust to C++ification.
11744
11745 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11746 (the_m32r_linux_nat_target): New.
11747 (m32r_linux_fetch_inferior_registers)
11748 (m32r_linux_store_inferior_registers): Refactor as
11749 m32r_linux_nat_target methods.
11750 (_initialize_m32r_linux_nat): Adjust to C++ification.
11751
11752 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11753 (the_m68k_linux_nat_target): New.
11754 (m68k_linux_fetch_inferior_registers)
11755 (m68k_linux_store_inferior_registers): Refactor as
11756 m68k_linux_nat_target methods.
11757 (_initialize_m68k_linux_nat): Adjust to C++ification.
11758
11759 * s390-linux-nat.c (s390_linux_nat_target): New class.
11760 (the_s390_linux_nat_target): New.
11761 (s390_linux_fetch_inferior_registers)
11762 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11763 (s390_insert_watchpoint, s390_remove_watchpoint)
11764 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11765 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11766 (s390_auxv_parse, s390_read_description): Refactor as methods of
11767 s390_linux_nat_target.
11768 (_initialize_s390_nat): Adjust to C++ification.
11769
11770 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11771 (the_sparc_linux_nat_target): New.
11772 (_initialize_sparc_linux_nat): Adjust to C++ification.
11773 * sparc-nat.c (sparc_fetch_inferior_registers)
11774 (sparc_store_inferior_registers): Remove target_ops parameter.
11775 * sparc-nat.h (sparc_fetch_inferior_registers)
11776 (sparc_store_inferior_registers): Remove target_ops parameter.
11777 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11778 (the_sparc64_linux_nat_target): New.
11779 (_initialize_sparc64_linux_nat): Adjust to C++ification.
11780
11781 * spu-linux-nat.c (spu_linux_nat_target): New class.
11782 (the_spu_linux_nat_target): New.
11783 (spu_child_post_startup_inferior, spu_child_post_attach)
11784 (spu_child_wait, spu_fetch_inferior_registers)
11785 (spu_store_inferior_registers, spu_xfer_partial)
11786 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11787 methods.
11788 (_initialize_spu_nat): Adjust to C++ification.
11789
11790 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11791 (the_tilegx_linux_nat_target): New.
11792 (fetch_inferior_registers, store_inferior_registers):
11793 Refactor as methods.
11794 (_initialize_tile_linux_nat): Adjust to C++ification.
11795
11796 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11797 (the_xtensa_linux_nat_target): New.
11798 (xtensa_linux_fetch_inferior_registers)
11799 (xtensa_linux_store_inferior_registers): Refactor as
11800 xtensa_linux_nat_target methods.
11801 (_initialize_xtensa_linux_nat): Adjust to C++ification.
11802
11803 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11804 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11805 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11806 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11807 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11808 (fbsd_stopped_by_sw_breakpoint)
11809 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11810 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11811 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11812 (fbsd_post_startup_inferior, fbsd_post_attach)
11813 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11814 (fbsd_set_syscall_catchpoint)
11815 (super_xfer_partial, super_resume, super_wait)
11816 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11817 (fbsd_handle_debug_trap): Remove target_ops parameter.
11818 (fbsd_nat_add_target): Delete.
11819 * fbsd-nat.h: Include "inf-ptrace.h".
11820 (fbsd_nat_add_target): Delete.
11821 (USE_SIGTRAP_SIGINFO): Define.
11822 (fbsd_nat_target): New class.
11823
11824 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11825 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11826 (amd64bsd_target): Delete.
11827 * amd64-bsd-nat.h: New file.
11828 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11829 "x86-bsd-nat.h".
11830 (amd64_fbsd_nat_target): New class.
11831 (the_amd64_fbsd_nat_target): New.
11832 (amd64fbsd_read_description): Refactor as method of
11833 amd64_fbsd_nat_target.
11834 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11835 (_initialize_amd64fbsd_nat): Adjust to C++ification.
11836 * amd64-nat.h (amd64bsd_target): Delete function declaration.
11837 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11838 (i386bsd_store_inferior_registers): Remove target_ops parameter.
11839 (i386bsd_target): Delete.
11840 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11841 (i386bsd_fetch_inferior_registers)
11842 (i386bsd_store_inferior_registers): Declare.
11843 (i386_bsd_nat_target): New class.
11844 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11845 (the_i386_fbsd_nat_target): New.
11846 (i386fbsd_resume, i386fbsd_read_description): Refactor as
11847 i386_fbsd_nat_target methods.
11848 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11849 (_initialize_i386fbsd_nat): Adjust to C++ification.
11850 * x86-bsd-nat.c (super_mourn_inferior): Delete.
11851 (x86bsd_mourn_inferior, x86bsd_target): Delete.
11852 (_initialize_x86_bsd_nat): Adjust to C++ification.
11853 * x86-bsd-nat.h: Include "x86-nat.h".
11854 (x86bsd_target): Delete declaration.
11855 (x86bsd_nat_target): New class.
11856
11857 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11858 (the_aarch64_fbsd_nat_target): New.
11859 (aarch64_fbsd_fetch_inferior_registers)
11860 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11861 aarch64_fbsd_nat_target.
11862 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11863 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11864 (the_alpha_bsd_nat_target): New.
11865 (alphabsd_fetch_inferior_registers)
11866 (alphabsd_store_inferior_registers): Refactor as
11867 alpha_bsd_nat_target methods.
11868 (_initialize_alphabsd_nat): Refactor as methods of
11869 alpha_bsd_nat_target.
11870 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11871 (the_amd64_nbsd_nat_target): New.
11872 (_initialize_amd64nbsd_nat): Adjust to C++ification.
11873 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11874 (the_amd64_obsd_nat_target): New.
11875 (_initialize_amd64obsd_nat): Adjust to C++ification.
11876 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11877 (the_arm_fbsd_nat_target): New.
11878 (arm_fbsd_fetch_inferior_registers)
11879 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11880 (_initialize_arm_fbsd_nat): Refactor as methods of
11881 arm_fbsd_nat_target.
11882 (_initialize_arm_fbsd_nat): Adjust to C++ification.
11883 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11884 (the_arm_netbsd_nat_target): New.
11885 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11886 arm_netbsd_nat_target.
11887 (_initialize_arm_netbsd_nat): Adjust to C++ification.
11888 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11889 (the_hppa_nbsd_nat_target): New.
11890 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11891 hppa_nbsd_nat_target methods.
11892 (_initialize_hppanbsd_nat): Adjust to C++ification.
11893 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11894 (the_hppa_obsd_nat_target): New.
11895 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11896 methods of hppa_obsd_nat_target.
11897 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
11898 add_target.
11899 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11900 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
11901 add_target.
11902 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11903 (_initialize_i386obsd_nat): Use add_target.
11904 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11905 (the_m68k_bsd_nat_target): New.
11906 (m68kbsd_fetch_inferior_registers)
11907 (m68kbsd_store_inferior_registers): Refactor as methods of
11908 m68k_bsd_nat_target.
11909 (_initialize_m68kbsd_nat): Adjust to C++ification.
11910 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11911 (the_mips_fbsd_nat_target): New.
11912 (mips_fbsd_fetch_inferior_registers)
11913 (mips_fbsd_store_inferior_registers): Refactor as methods of
11914 mips_fbsd_nat_target.
11915 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
11916 add_target.
11917 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11918 (the_mips_nbsd_nat_target): New.
11919 (mipsnbsd_fetch_inferior_registers)
11920 (mipsnbsd_store_inferior_registers): Refactor as methods of
11921 mips_nbsd_nat_target.
11922 (_initialize_mipsnbsd_nat): Adjust to C++ification.
11923 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11924 (the_mips64_obsd_nat_target): New.
11925 (mips64obsd_fetch_inferior_registers)
11926 (mips64obsd_store_inferior_registers): Refactor as methods of
11927 mips64_obsd_nat_target.
11928 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
11929 add_target.
11930 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11931 nbsd_nat_target.
11932 * nbsd-nat.h: Include "inf-ptrace.h".
11933 (nbsd_nat_target): New class.
11934 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11935 (obsd_wait): Refactor as methods of obsd_nat_target.
11936 (obsd_add_target): Delete.
11937 * obsd-nat.h: Include "inf-ptrace.h".
11938 (obsd_nat_target): New class.
11939 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11940 (the_ppc_fbsd_nat_target): New.
11941 (ppcfbsd_fetch_inferior_registers)
11942 (ppcfbsd_store_inferior_registers): Refactor as methods of
11943 ppc_fbsd_nat_target.
11944 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
11945 add_target.
11946 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11947 (the_ppc_nbsd_nat_target): New.
11948 (ppcnbsd_fetch_inferior_registers)
11949 (ppcnbsd_store_inferior_registers): Refactor as methods of
11950 ppc_nbsd_nat_target.
11951 (_initialize_ppcnbsd_nat): Adjust to C++ification.
11952 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11953 (the_ppc_obsd_nat_target): New.
11954 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11955 methods of ppc_obsd_nat_target.
11956 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
11957 add_target.
11958 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11959 (the_sh_nbsd_nat_target): New.
11960 (shnbsd_fetch_inferior_registers)
11961 (shnbsd_store_inferior_registers): Refactor as methods of
11962 sh_nbsd_nat_target.
11963 (_initialize_shnbsd_nat): Adjust to C++ification.
11964 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11965 (inf_ptrace_xfer_partial): Delete.
11966 (sparc_xfer_partial, sparc_target): Delete.
11967 * sparc-nat.h (sparc_fetch_inferior_registers)
11968 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11969 (sparc_target): Delete function declaration.
11970 (sparc_target): New template class.
11971 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11972 (_initialize_sparcnbsd_nat): Adjust to C++ification.
11973 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11974 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
11975 add_target.
11976 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11977 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11978 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11979 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
11980 add_target.
11981 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11982 (the_vax_bsd_nat_target): New.
11983 (vaxbsd_fetch_inferior_registers)
11984 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11985 methods.
11986 (_initialize_vaxbsd_nat): Adjust to C++ification.
11987
11988 * bsd-kvm.c (bsd_kvm_target): New class.
11989 (bsd_kvm_ops): Now a bsd_kvm_target.
11990 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11991 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11992 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11993 bsd_kvm_target.
11994 (bsd_kvm_return_one): Delete.
11995 (bsd_kvm_add_target): Adjust to C++ification.
11996
11997 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11998 (nto_procfs_target_procfs): New classes.
11999 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
12000 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
12001 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
12002 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
12003 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
12004 (procfs_remove_hw_breakpoint, procfs_resume)
12005 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
12006 (procfs_kill_inferior, procfs_store_registers)
12007 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
12008 as methods of nto_procfs_target.
12009 (nto_procfs_ops): Now an nto_procfs_target_procfs.
12010 (nto_native_ops): Delete.
12011 (procfs_open, procfs_native_open): Delete.
12012 (nto_native_ops): Now an nto_procfs_target_native.
12013 (init_procfs_targets): Adjust to C++ification.
12014 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
12015 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
12016 Refactor as methods of nto_procfs_target.
12017
12018 * go32-nat.c (go32_nat_target): New class.
12019 (the_go32_nat_target): New.
12020 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
12021 (go32_store_registers, go32_xfer_partial, go32_files_info)
12022 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
12023 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
12024 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
12025 (go32_pid_to_str): Refactor as methods of go32_nat_target.
12026 (go32_target): Delete.
12027 (_initialize_go32_nat): Adjust to C++ification.
12028
12029 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
12030 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
12031 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
12032 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
12033 gnu_nat_target.
12034 (gnu_target): Delete.
12035 * gnu-nat.h (gnu_target): Delete.
12036 (gnu_nat_target): New class.
12037 * i386-gnu-nat.c (gnu_base_target): New.
12038 (i386_gnu_nat_target): New class.
12039 (the_i386_gnu_nat_target): New.
12040 (_initialize_i386gnu_nat): Adjust to C++ification.
12041
12042 2018-05-02 Pedro Alves <palves@redhat.com>
12043
12044 * bfd-target.c (target_bfd_xclose): Rename to ...
12045 (target_bfd_close): ... this.
12046 (target_bfd_reopen): Adjust.
12047 * target.c (target_close): Remove references to to_xclose.
12048 * target.h (target_ops::to_xclose): Delete.
12049 (target_ops::to_close): Update comments.
12050
12051 2018-05-02 Pedro Alves <palves@redhat.com>
12052
12053 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
12054 "linux-nat.h".
12055 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
12056 * inf-ptrace.c (inf_ptrace_register_u_offset)
12057 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
12058 (inf_ptrace_store_register, inf_ptrace_store_registers)
12059 (inf_ptrace_trad_target): Move to ...
12060 * linux-nat-trad.c: ... this new file.
12061 * linux-nat-trad.h: New file.
12062 * linux-nat.c (linux_target_install_ops): Make extern.
12063 (linux_trad_target): Delete.
12064 * linux-nat.h (linux_trad_target): Delete declaration.
12065 (linux_target_install_ops): Declare.
12066 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
12067 "linux-nat.h".
12068
12069 2018-05-02 Pedro Alves <palves@redhat.com>
12070
12071 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12072 procfs_target/add_target here.
12073 * procfs.c (procfs_target): Make static.
12074 (_initialize_procfs): Call add_target here.
12075 * procfs.h (struct target_ops): Remove forward declaration.
12076 (procfs_target): Remove declaration.
12077 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12078
12079 2018-05-02 Pedro Alves <palves@redhat.com>
12080
12081 * procfs.c (procfs_stopped_by_watchpoint)
12082 (procfs_insert_watchpoint, procfs_remove_watchpoint)
12083 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12084 Forward declare.
12085 (procfs_use_watchpoints): Delete, move contents...
12086 (procfs_target): ... here.
12087 * procfs.h (procfs_use_watchpoints): Delete declaration.
12088 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12089 procfs_use_watchpoints.
12090 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12091 procfs_use_watchpoints.
12092
12093 2018-05-02 Tom Tromey <tom@tromey.com>
12094
12095 PR python/20084:
12096 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12097 and var_zuinteger_unlimited.
12098 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12099 and PARAM_ZUINTEGER_UNLIMITED.
12100 (set_parameter_value): Handle var_zuinteger and
12101 var_zuinteger_unlimited.
12102 (add_setshow_generic): Likewise.
12103 (parmpy_init): Likewise.
12104
12105 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
12106
12107 PR rust/23124
12108 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12109 pointer is not null before dereferencing it.
12110
12111 2018-04-30 Tom Tromey <tom@tromey.com>
12112
12113 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12114 is_mi_like_p.
12115
12116 2018-04-30 Tom Tromey <tom@tromey.com>
12117
12118 * breakpoint.c (mention): Remove use of is_mi_like_p.
12119 (print_mention_ranged_breakpoint): Likewise.
12120 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12121 of is_mi_like_p.
12122
12123 2018-04-30 Tom Tromey <tom@tromey.com>
12124
12125 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12126
12127 2018-04-30 Tom Tromey <tom@tromey.com>
12128
12129 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12130 (info_spu_event_command): Remove some uses of is_mi_like_p.
12131
12132 2018-04-30 Tom Tromey <tom@tromey.com>
12133
12134 * python/py-framefilter.c (py_print_single_arg)
12135 (enumerate_locals, py_print_args, py_print_frame): Remove some
12136 uses of is_mi_like_p.
12137
12138 2018-04-30 Tom Tromey <tom@tromey.com>
12139
12140 * ui-out.c: Update.
12141 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12142 * ui-out.h (ui_out::is_mi_like_p): Now const.
12143 (ui_out::do_is_mi_like_p): Now const.
12144 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12145
12146 2018-04-30 Tom Tromey <tom@tromey.com>
12147
12148 * varobj.c (varobj_set_visualizer): Use new_reference.
12149 * python/python.c (gdbpy_decode_line): Use new_reference.
12150 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12151 new_reference.
12152
12153 2018-04-30 Tom Tromey <tom@tromey.com>
12154
12155 * varobj.c (install_new_value): Use new_reference.
12156 * value.h (value_incref): Return void. Swap intro comment with
12157 value_decref.
12158 * value.c (set_value_parent): Use new_reference.
12159 (value_incref): Return void. Update intro comment.
12160 (release_value): Use new_reference.
12161 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12162
12163 2018-04-30 Tom Tromey <tom@tromey.com>
12164
12165 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12166 * gdb_bfd.h (new_bfd_ref): Remove.
12167 (gdb_bfd_open): Update comment.
12168 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12169 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12170 (gdb_bfd_fdopenr): Use new_reference.
12171 * exec.c (exec_file_attach): Use new_reference.
12172
12173 2018-04-30 Tom Tromey <tom@tromey.com>
12174
12175 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12176 method.
12177
12178 2018-04-30 Tom Tromey <tom@tromey.com>
12179
12180 * jit.c (jit_read_code_entry): Use type_align.
12181 * i386-tdep.c (i386_gdbarch_init): Don't call
12182 set_gdbarch_long_long_align_bit.
12183 * gdbarch.sh: Remove long_long_align_bit.
12184 * gdbarch.c, gdbarch.h: Rebuild.
12185 * arc-tdep.c (arc_type_align): New function.
12186 (arc_gdbarch_init): Use arc_type_align. Don't call
12187 set_gdbarch_long_long_align_bit.
12188
12189 2018-04-30 Tom Tromey <tom@tromey.com>
12190
12191 * rust-lang.c (rust_type_alignment): Remove.
12192 (rust_composite_type): Use type_align.
12193
12194 2018-04-30 Tom Tromey <tom@tromey.com>
12195
12196 * NEWS: Mention Type.align.
12197 * python/py-type.c (typy_get_alignof): New function.
12198 (type_object_getset): Add "alignof".
12199
12200 2018-04-30 Tom Tromey <tom@tromey.com>
12201
12202 PR exp/17095:
12203 * NEWS: Update.
12204 * std-operator.def (UNOP_ALIGNOF): New operator.
12205 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12206 New.
12207 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12208 * c-lang.c (c_op_print_tab): Add alignof.
12209 * c-exp.y (ALIGNOF): New token.
12210 (exp): Add "ALIGNOF" production.
12211 (ident_tokens): Add _Alignof and alignof.
12212
12213 2018-04-30 Tom Tromey <tom@tromey.com>
12214
12215 * i386-tdep.c (i386_type_align): New function.
12216 (i386_gdbarch_init): Update.
12217 * gdbarch.sh (type_align): New method.
12218 * gdbarch.c, gdbarch.h: Rebuild.
12219 * arch-utils.h (default_type_align): Declare.
12220 * arch-utils.c (default_type_align): New function.
12221 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12222 (struct type) <align_log2>: New field.
12223 <instance_flags>: Now a bitfield.
12224 (TYPE_RAW_ALIGN): New macro.
12225 (type_align, type_raw_align, set_type_align): Declare.
12226 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12227 functions.
12228 * dwarf2read.c (quirk_rust_enum): Set type alignment.
12229 (get_alignment, maybe_set_alignment): New functions.
12230 (read_structure_type, read_enumeration_type, read_array_type)
12231 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12232 (read_subrange_type, read_base_type): Set type alignment.
12233
12234 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
12235
12236 * dwarf2read.c (read_index_from_section): Use bool.
12237
12238 2018-04-29 Fabian Groffen <grobian@gentoo.org>
12239
12240 PR gdb/22950
12241 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12242 with #ifdef.
12243
12244 2018-04-29 John Reiser <jreiser@BitWagon.com>
12245
12246 PR build/22873
12247 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12248 last step, and do it atomically.
12249
12250 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
12251
12252 * compile/compile-c-types.c (convert_int, convert_float):
12253 Update for C FE v1.
12254
12255 2018-04-27 Tom Tromey <tom@tromey.com>
12256
12257 PR rust/22545:
12258 * rust-lang.c (rust_inclusive_range_type_p): New function.
12259 (rust_range): Handle inclusive ranges.
12260 (rust_compute_range): Likewise.
12261 * rust-exp.y (struct rust_op) <inclusive>: New field.
12262 (DOTDOTEQ): New constant.
12263 (range_expr): Add "..=" productions.
12264 (operator_tokens): Add "..=" token.
12265 (ast_range): Add "inclusive" parameter.
12266 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12267 ranges.
12268 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12269 bounds values.
12270 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12271 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12272 Update comments.
12273 * expprint.c (print_subexp_standard): Handle new bounds values.
12274 (dump_subexp_body_standard): Likewise.
12275
12276 2018-04-27 Tom Tromey <tom@tromey.com>
12277
12278 * configure: Rebuild.
12279 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12280 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12281 "OVERRIDE".
12282 (class symbol_needs_eval_context): Likewise.
12283 * dwarf2read.c (mock_mapped_index::symbol_name_count)
12284 (mock_mapped_index::symbol_name_at): Use "override". Remove
12285 "virtual".
12286 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12287 "override".
12288 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12289 * aarch64-tdep.c (instruction_reader::read): Use "override".
12290 (instruction_reader_test::read): Likewise.
12291 * arm-tdep.c (instruction_reader::read): Use "override".
12292 (instruction_reader_thumb::read): Likewise.
12293
12294 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
12295
12296 PR remote/9665
12297 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12298 instead of remote_send.
12299 (remote_send): Remove.
12300
12301 2018-04-26 Pedro Alves <palves@redhat.com>
12302
12303 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12304 find_function_start_sal instead of find_pc_line.
12305
12306 2018-04-26 Pedro Alves <palves@redhat.com>
12307
12308 * breakpoint.c (set_breakpoint_location_function): Handle
12309 mst_data_gnu_ifunc.
12310 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12311 * elfread.c (elf_symtab_read): Give data symbols with
12312 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12313 (elf_rel_plt_read): Update comment.
12314 * linespec.c (convert_linespec_to_sals): Handle
12315 mst_data_gnu_ifunc.
12316 (minsym_found): Handle mst_data_gnu_ifunc.
12317 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12318 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12319 * parse.c (find_minsym_type_and_address): Handle
12320 mst_data_gnu_ifunc.
12321 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12322 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12323 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12324 comment.
12325 <mst_data_gnu_ifunc>: New enumerator.
12326
12327 2018-04-26 Pedro Alves <palves@redhat.com>
12328
12329 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12330 (lookup_minimal_symbol_by_pc_section): ... this. Replace
12331 'want_trampoline' parameter by a lookup_msym_prefer parameter.
12332 Handle it.
12333 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12334 (lookup_minimal_symbol_by_pc): Adjust.
12335 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12336 (lookup_solib_trampoline_symbol_by_pc): Adjust.
12337 * minsyms.h (lookup_msym_prefer): New enum.
12338 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12339 parameter by a lookup_msym_prefer parameter.
12340
12341 2018-04-26 Pedro Alves <palves@redhat.com>
12342
12343 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12344 ends in "@plt" instead of looking at the symbol's section.
12345
12346 2018-04-26 Pedro Alves <palves@redhat.com>
12347
12348 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
12349 all references.
12350 (find_pc_partial_function_gnu_ifunc): Rename to ...
12351 (find_pc_partial_function): ... this, and remove references to
12352 'is_gnu_ifunc_p'.
12353 (find_pc_partial_function): Delete old implementation.
12354 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12355
12356 2018-04-26 Pedro Alves <palves@redhat.com>
12357
12358 * linespec.c (struct bound_minimal_symbol_search_key): New.
12359 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
12360 skip first line if we found a GNU ifunc minimal symbol by name.
12361 (compare_msymbols): Change parameters to work with a destructured
12362 lhs minsym.
12363 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12364 functions.
12365
12366 2018-04-26 Pedro Alves <palves@redhat.com>
12367
12368 * breakpoint.c (set_breakpoint_location_function): Don't resolve
12369 ifunc targets here. Instead, if we have an ifunc minsym, use its
12370 address/name.
12371 (add_location_to_breakpoint): Store the minsym and the objfile in
12372 the breakpoint location.
12373 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12374 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12375 Record the minsym in the sal.
12376 * symtab.h (symtab_and_line) <msymbol>: New field.
12377
12378 2018-04-26 Pedro Alves <palves@redhat.com>
12379
12380 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12381 unless we actually resolved the ifunc.
12382
12383 2018-04-26 Pedro Alves <palves@redhat.com>
12384
12385 * c-exp.y (variable production): Prefer ifunc minsyms over
12386 regular function symbols.
12387 * symtab.c (find_gnu_ifunc): New function.
12388 * minsyms.h (lookup_msym_prefer): New enum.
12389 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12390 parameter by a lookup_msym_prefer parameter.
12391 * symtab.h (find_gnu_ifunc): New declaration.
12392
12393 2018-04-26 Pedro Alves <palves@redhat.com>
12394
12395 * blockframe.c (find_gnu_ifunc_target_type): New function.
12396 (find_function_type): New.
12397 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12398 return a value with a memory address.
12399 (eval_call): For calls to GNU ifunc functions, try to find the
12400 type of the target function from the type that the resolver
12401 returns.
12402 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12403 symbols.
12404 * infcall.c (find_function_return_type): Delete.
12405 (find_function_addr): Add 'function_type' parameter. For calls to
12406 GNU ifunc functions, try to find the type of the target function
12407 from the type that the resolver returns, and return it via
12408 FUNCTION_TYPE.
12409 (call_function_by_hand_dummy): Adjust to use the function type
12410 returned by find_function_addr.
12411 (find_function_addr): Add 'function_type' parameter and move
12412 description here.
12413 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12414 declarations.
12415
12416 2018-04-26 Pedro Alves <palves@redhat.com>
12417
12418 * c-exp.y (variable production): Skip finding an alias for ifunc
12419 symbols.
12420
12421 2018-04-26 Pedro Alves <palves@redhat.com>
12422
12423 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12424
12425 2018-04-25 Pedro Alves <palves@redhat.com>
12426
12427 * infcmd.c (kill_command): Print the pid as string, not the whole
12428 thread's ptid. Add comment. s/has been killed/killed/ in output
12429 message.
12430 * remote.c (remote_detach_1): Print the pid as string, not the
12431 whole thread's ptid.
12432
12433 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12434 Sergio Durigan Junior <sergiodj@redhat.com>
12435 Pedro Alves <palves@redhat.com>
12436
12437 * infcmd.c (kill_command): Print message when inferior has
12438 been killed.
12439 * inferior.c (print_inferior_events): Remove 'static'. Set as
12440 '1'.
12441 (add_inferior): Improve message printed when
12442 'print_inferior_events' is on.
12443 (exit_inferior): Remove message printed when
12444 'print_inferior_events' is on.
12445 (detach_inferior): Improve message printed when
12446 'print_inferior_events' is on.
12447 (initialize_inferiors): Use 'add_inferior_silent' to set
12448 'current_inferior_'.
12449 * inferior.h (print_inferior_events): Declare here as
12450 'extern'.
12451 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12452 '[Detaching...]' messages when 'print_inferior_events' is on.
12453 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
12454 as prefix/suffix for messages. Remove periods. Fix erroneous
12455 'Detaching after fork from child...', replace it by '... from
12456 parent...'.
12457 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12458 prefix/suffix when printing 'Detaching...' messages. Print
12459 them when 'print_inferior_events' is on.
12460 * remote.c (remote_detach_1): Print message when detaching
12461 from inferior and '!is_fork_parent'.
12462
12463 2018-04-24 Tom Tromey <tom@tromey.com>
12464
12465 * cli-out.h: Reindent.
12466
12467 2018-04-24 Tom Tromey <tom@tromey.com>
12468
12469 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12470 (cli_ui_out::do_field_string): Use fputs_filtered.
12471 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12472
12473 2018-04-23 Tom Tromey <tom@tromey.com>
12474
12475 * guile/scm-frame.c (gdbscm_frame_read_var): Use
12476 gdb::unique_xmalloc_ptr.
12477
12478 2018-04-23 Tom Tromey <tom@tromey.com>
12479
12480 * configure: Rebuild.
12481
12482 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
12483
12484 PR gdb/23095
12485 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12486 prepare_for_testing. Set normal_bp to r_debug_state if target
12487 is bsd.
12488
12489 2018-04-21 Pedro Alves <palves@redhat.com>
12490 Rajendra SY <rajendra.sy@gmail.com>
12491
12492 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12493 * remote.c (extended_remote_attach): In all-stop mode, mark the
12494 thread as executing.
12495
12496 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
12497
12498 * thread.c (thread_apply_all_command): Fix comment.
12499 (thread_command): Fix comment.
12500
12501 2018-04-10 Alan Hayward <alan.hayward@arm.com>
12502
12503 * common/tdesc.h (tdesc_create_feature): Remove xml filename
12504 parameter.
12505 * features/aarch64-core.c (create_feature_aarch64_core):
12506 Regenerate.
12507 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12508 Likewise.
12509 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12510 Likewise.
12511 * features/i386/32bit-avx512.c
12512 (create_feature_i386_32bit_avx512): Likewise.
12513 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12514 Likewise.
12515 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12516 Likewise.
12517 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12518 Likewise.
12519 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12520 Likewise.
12521 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12522 Likewise.
12523 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12524 Likewise.
12525 * features/i386/64bit-avx512.c
12526 (create_feature_i386_64bit_avx512): Likewise.
12527 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12528 Likewise.
12529 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12530 Likewise.
12531 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12532 Likewise.
12533 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12534 Likewise.
12535 * features/i386/64bit-segments.c
12536 (create_feature_i386_64bit_segments): Likewise.
12537 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12538 Likewise.
12539 * features/i386/x32-core.c
12540 (create_feature_i386_x32_core): Likewise.
12541 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12542 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12543 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12544 * target-descriptions.c: In generated code, don't pass xml
12545 filename.
12546
12547 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12548
12549 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12550 (print_xml_feature::visit_post): Likewise.
12551 (print_xml_feature::visit): Likewise.
12552 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12553 (print_xml_feature): Add new class.
12554 * regformats/regdat.sh: Null xmltarget on feature targets.
12555 * target-descriptions.c (struct target_desc): Add xmltarget.
12556 (maintenance_check_tdesc_xml_convert): Add unittest function.
12557 (tdesc_get_features_xml): Add function to get xml.
12558 (maintenance_check_xml_descriptions): Test xml generation.
12559 * xml-tdesc.c (string_read_description_xml): Add function.
12560 * xml-tdesc.h (string_read_description_xml): Add declaration.
12561
12562 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12563
12564 * features/Makefile: Add feature marker to targets with new style
12565 target descriptions.
12566 * regformats/aarch64.dat: Regenerate.
12567 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12568 * regformats/i386/amd64-avx-linux.dat: Likewise.
12569 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12570 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12571 * regformats/i386/amd64-linux.dat: Likewise.
12572 * regformats/i386/amd64-mpx-linux.dat: Likewise.
12573 * regformats/i386/amd64.dat: Likewise.
12574 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12575 * regformats/i386/i386-avx-linux.dat: Likewise.
12576 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12577 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12578 * regformats/i386/i386-linux.dat: Likewise.
12579 * regformats/i386/i386-mmx-linux.dat: Likewise.
12580 * regformats/i386/i386-mpx-linux.dat: Likewise.
12581 * regformats/i386/i386.dat: Likewise.
12582 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12583 * regformats/i386/x32-avx-linux.dat: Likewise.
12584 * regformats/i386/x32-linux.dat: Likewise.
12585 * regformats/tic6x-c62x-linux.dat: Likewise.
12586 * regformats/tic6x-c64x-linux.dat: Likewise.
12587 * regformats/tic6x-c64xp-linux.dat: Likewise.
12588 * regformats/regdat.sh: Parse feature marker.
12589
12590 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12591
12592 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12593 (tdesc_osabi_name): Likewise.
12594 * target-descriptions.c (tdesc_architecture_name): Add new
12595 function.
12596 (tdesc_osabi_name): Likewise.
12597
12598 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12599
12600 * common/tdesc.c (tdesc_predefined_type): Move to here.
12601 (tdesc_named_type): Likewise.
12602 (tdesc_create_vector): Likewise.
12603 (tdesc_create_struct): Likewise.
12604 (tdesc_set_struct_size): Likewise.
12605 (tdesc_create_union): Likewise.
12606 (tdesc_create_flags): Likewise.
12607 (tdesc_create_enum): Likewise.
12608 (tdesc_add_field): Likewise.
12609 (tdesc_add_typed_bitfield): Likewise.
12610 (tdesc_add_bitfield): Likewise.
12611 (tdesc_add_flag): Likewise.
12612 (tdesc_add_enum_value): Likewise.
12613 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12614 (struct tdesc_type_vector): Likewise.
12615 (struct tdesc_type_field): Likewise.
12616 (struct tdesc_type_with_fields): Likewise.
12617 (tdesc_create_enum): Add declaration.
12618 (tdesc_add_typed_bitfield): Likewise.
12619 (tdesc_add_enum_value): Likewise.
12620 * target-descriptions.c (tdesc_type_field): Move from here.
12621 (tdesc_type_builtin): Likewise.
12622 (tdesc_type_vector): Likewise.
12623 (tdesc_type_with_fields): Likewise.
12624 (tdesc_predefined_types): Likewise.
12625 (tdesc_named_type): Likewise.
12626 (tdesc_create_vector): Likewise.
12627 (tdesc_create_struct): Likewise.
12628 (tdesc_set_struct_size): Likewise.
12629 (tdesc_create_union): Likewise.
12630 (tdesc_create_flags): Likewise.
12631 (tdesc_create_enum): Likewise.
12632 (tdesc_add_field): Likewise.
12633 (tdesc_add_typed_bitfield): Likewise.
12634 (tdesc_add_bitfield): Likewise.
12635 (tdesc_add_flag): Likewise.
12636 (tdesc_add_enum_value): Likewise.
12637 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12638 (tdesc_add_typed_bitfield): Likewise.
12639 (tdesc_add_enum_value): Likewise.
12640
12641 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12642
12643 * common/tdesc.c (tdesc_feature::accept): Move to here.
12644 (tdesc_feature::operator==): Likewise.
12645 (tdesc_create_reg): Likewise.
12646 * common/tdesc.h (tdesc_type_kind): Likewise.
12647 (struct tdesc_type): Likewise.
12648 (struct tdesc_feature): Likewise.
12649 * regformats/regdat.sh: Create a feature.
12650 * target-descriptions.c (tdesc_type_kind): Move from here.
12651 (tdesc_type): Likewise.
12652 (tdesc_type_up): Likewise.
12653 (tdesc_feature): Likewise.
12654 (tdesc_create_reg): Likewise.
12655
12656 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12657
12658 * Makefile.in: Add arch/tdesc.c
12659 * common/tdesc.c: New file.
12660 * common/tdesc.h (tdesc_element_visitor): Move to here.
12661 (tdesc_element): Likewise.
12662 (tdesc_reg): Likewise.
12663 (tdesc_reg_up): Likewise.
12664 * regformats/regdef.h (reg): Add offset to constructors.
12665 * target-descriptions.c (tdesc_element_visitor): Move from here.
12666 (tdesc_element): Likewise.
12667 (tdesc_reg): Likewise.
12668 (tdesc_reg_up): Likewise.
12669
12670 2018-04-17 Tom Tromey <tom@tromey.com>
12671
12672 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12673 discriminant field.
12674
12675 2018-04-17 Tom Tromey <tom@tromey.com>
12676
12677 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12678
12679 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
12680
12681 * symtab.c (print_symbol_info): Skip printing filename and line
12682 number when `last' is NULL.
12683 (symtab_symbol_info): Use empty string instead of NULL for first
12684 invocation of print_symbol_info.
12685 (rbreak_command): Pass NULL to `last' parameter of
12686 print_symbol_info.
12687
12688 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
12689
12690 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12691 instead of nullptr.
12692
12693 2018-04-16 Pedro Alves <palves@redhat.com>
12694
12695 * MAINTAINERS (sh): Remove.
12696 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12697 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12698 (ALLDEPFILES): Remove sh64-tdep.c.
12699 * NEWS: Mentions that support for SH-5/SH64 is removed.
12700 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12701 (sh*-*-openbsd*): Ditto.
12702 (sh64-*-elf*): Remove.
12703 (sh*): Remove.
12704 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12705 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12706 * sh-tdep.c: No longer include "sh64-tdep.h".
12707 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12708 * sh64-tdep.c, sh64-tdep.h: Remove files.
12709
12710 2018-04-16 Pedro Alves <palves@redhat.com>
12711
12712 * MAINTAINERS: Remove m88k.
12713 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12714 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12715 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12716 * NEWS: Mention that support for m88k was removed.
12717 * configure.host (m88*-*-*): Remove support.
12718 * configure.nat (m88k-*-*): Remove support.
12719 * configure.tgt (m88*-*-openbsd*): Remove.
12720 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12721
12722 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
12723
12724 * configure.tgt (x86_tobjs): New variable.
12725 (amd64_tobjs, i386_tobjs): Use it.
12726
12727 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12728
12729 * symtab.c (print_symbol_info): Precede the symbol definition by
12730 the line number when available.
12731 * NEWS: Advertise this enhancement.
12732
12733 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12734
12735 * NEWS (New options): announce set/show record btrace cpu.
12736 * btrace.c: Include record-btrace.h.
12737 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12738 the vendor is unknown.
12739 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
12740 Maybe overwrite the btrace configuration's cpu.
12741 (btrace_compute_ftrace): Add cpu parameter. Update callers.
12742 (btrace_fetch): Add cpu parameter. Update callers.
12743 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12744 Maybe overwrite the btrace configuration's cpu. Skip enabling
12745 errata workarounds if the vendor is unknown.
12746 * python/py-record-btrace.c: Include record-btrace.h.
12747 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12748 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12749 * record-btrace.c (record_btrace_cpu_state_kind): New.
12750 (record_btrace_cpu): New.
12751 (set_record_btrace_cpu_cmdlist): New.
12752 (record_btrace_get_cpu): New.
12753 (require_btrace_thread, record_btrace_info)
12754 (record_btrace_resume_thread): Call record_btrace_get_cpu.
12755 (cmd_set_record_btrace_cpu_none): New.
12756 (cmd_set_record_btrace_cpu_auto): New.
12757 (cmd_set_record_btrace_cpu): New.
12758 (cmd_show_record_btrace_cpu): New.
12759 (_initialize_record_btrace): Initialize set/show record btrace cpu
12760 commands.
12761 * record-btrace.h (record_btrace_get_cpu): New.
12762
12763 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12764
12765 * record.c (set_record_command): Fix typo in message.
12766
12767 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12768
12769 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12770
12771 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12772
12773 * infrun.c (process_event_stop_test): Call
12774 gdbarch_in_indirect_branch_thunk.
12775 * gdbarch.sh (in_indirect_branch_thunk): New.
12776 * gdbarch.c: Regenerated.
12777 * gdbarch.h: Regenerated.
12778 * x86-tdep.h: New.
12779 * x86-tdep.c: New.
12780 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12781 (HFILES_NO_SRCDIR): Add x86-tdep.h.
12782 (ALLDEPFILES): Add x86-tdep.c.
12783 * arch-utils.h (default_in_indirect_branch_thunk): New.
12784 * arch-utils.c (default_in_indirect_branch_thunk): New.
12785 * i386-tdep: Include x86-tdep.h.
12786 (i386_in_indirect_branch_thunk): New.
12787 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12788 function.
12789 * amd64-tdep: Include x86-tdep.h.
12790 (amd64_in_indirect_branch_thunk): New.
12791 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12792
12793 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12794
12795 PR gdb/23053
12796 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12797 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12798 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12799 regression.
12800
12801 2018-04-12 Tom Tromey <tom@tromey.com>
12802
12803 * rust-lang.c (rust_print_struct_def): Remove univariant code.
12804 (rust_evaluate_subexp): Likewise.
12805
12806 2018-04-12 Pedro Alves <palves@redhat.com>
12807
12808 * procfs.c (procfs_detach): Make forward declaration's prototype
12809 match definition's protototype.
12810 (proc_get_LDT_entry): Remove stale do_cleanups call.
12811
12812 2018-04-12 Pedro Alves <palves@redhat.com>
12813
12814 * target.h (target_ops::to_has_exited): Delete.
12815 (target_has_exited): Delete.
12816 * target-delegates.c: Regenerate.
12817
12818 2018-04-11 Pedro Alves <palves@redhat.com>
12819
12820 * target.c (fileio_fh_t::t): Add comment.
12821 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12822 (target_fileio_close): Handle a NULL target.
12823 (invalidate_fileio_fh): New.
12824 (target_close): Call it.
12825 * remote.c (remote_hostio_send_command): No longer check whether
12826 remote_desc is open.
12827
12828 2018-04-11 Pedro Alves <palves@redhat.com>
12829
12830 * target.c (fileio_fh_t): Make it a named struct instead of a
12831 typedef.
12832 (fileio_fh_t::is_closed): New method.
12833 (DEF_VEC_O (fileio_fh_t)): Remove.
12834 (fileio_fhandles): Now a std::vector.
12835 (is_closed_fileio_fh): Delete.
12836 (acquire_fileio_fd): Adjust. Rename parameters.
12837 (release_fileio_fd): Adjust.
12838 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12839 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12840 (target_fileio_close): Adjust.
12841
12842 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
12843
12844 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12845 index.
12846
12847 2018-04-10 Pedro Alves <palves@redhat.com>
12848
12849 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12850 (scoped_finish_thread_state): New class.
12851 * infcmd.c (run_command_1): Use it instead of finish_thread_state
12852 cleanup.
12853 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12854 (fetch_inferior_event, normal_stop): Likewise.
12855 * thread.c (finish_thread_state_cleanup): Delete.
12856
12857 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12858 Pedro Alves <palves@redhat.com>
12859
12860 * value.c: Include "selftest.h" and "common/array-view.h".
12861 (struct range) <operator ==>: New.
12862 (test_ranges_contain): New.
12863 (check_ranges_vector): New.
12864 (test_insert_into_bit_range_vector): New.
12865 (_initialize_values): Register selftests.
12866 * common/array-view.h (operator==, operator!=): New.
12867
12868 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12869
12870 * common/gdb_vecs.h (unordered_remove): Add overload that takes
12871 an iterator.
12872 * inline-frame.c: Include <algorithm>.
12873 (struct inline_state): Add constructor.
12874 (inline_state_s): Remove.
12875 (DEF_VEC_O(inline_state_s)): Remove.
12876 (inline_states): Change type to std::vector.
12877 (find_inline_frame_state): Adjust to std::vector.
12878 (allocate_inline_frame_state): Remove.
12879 (clear_inline_frame_state): Adjust to std::vector.
12880 (skip_inline_frames): Adjust to std::vector.
12881
12882 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12883
12884 * tracepoint.h (struct trace_state_variable): Add constructor.
12885 <name>: Change type to std::string.
12886 * tracepoint.c (tsv_s): Remove.
12887 (DEF_VEC_O(tsv_s)): Remove.
12888 (tvariables): Change to std::vector.
12889 (create_trace_state_variable): Adjust to std::vector.
12890 (find_trace_state_variable): Likewise.
12891 (find_trace_state_variable_by_number): Likewise.
12892 (delete_trace_state_variable): Likewise.
12893 (trace_variable_command): Adjust to std::string.
12894 (delete_trace_variable_command): Likewise.
12895 (tvariables_info_1): Adjust to std::vector.
12896 (save_trace_state_variables): Likewise.
12897 (start_tracing): Likewise.
12898 (merge_uploaded_trace_state_variables): Adjust to std::vector
12899 and std::string.
12900 * target.h (struct target_ops)
12901 <to_download_trace_state_variable>: Pass reference to
12902 trace_state_variable.
12903 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12904 * target-delegates.c: Re-generate.
12905 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12906 (mi_tsv_deleted): Likewise.
12907 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12908 * remote.c (remote_download_trace_state_variable): Change
12909 pointer to reference and adjust.
12910 * make-target-delegates (parse_argtypes): Handle references.
12911 (write_function_header): Likewise.
12912 (munge_type): Likewise.
12913
12914 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12915
12916 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12917 string_view-selftests.c.
12918 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12919 testsuite.
12920 * unittests/basic_string_view/cons/char/1.cc: Likewise.
12921 * unittests/basic_string_view/cons/char/2.cc: Likewise.
12922 * unittests/basic_string_view/cons/char/3.cc: Likewise.
12923 * unittests/basic_string_view/element_access/char/1.cc:
12924 Likewise.
12925 * unittests/basic_string_view/element_access/char/empty.cc:
12926 Likewise.
12927 * unittests/basic_string_view/element_access/char/front_back.cc:
12928 Likewise.
12929 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12930 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12931 Likewise.
12932 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12933 Likewise.
12934 * unittests/basic_string_view/modifiers/swap/char/1.cc:
12935 Likewise.
12936 * unittests/basic_string_view/operations/compare/char/1.cc:
12937 Likewise.
12938 * unittests/basic_string_view/operations/compare/char/13650.cc:
12939 Likewise.
12940 * unittests/basic_string_view/operations/copy/char/1.cc:
12941 Likewise.
12942 * unittests/basic_string_view/operations/data/char/1.cc:
12943 Likewise.
12944 * unittests/basic_string_view/operations/find/char/1.cc:
12945 Likewise.
12946 * unittests/basic_string_view/operations/find/char/2.cc:
12947 Likewise.
12948 * unittests/basic_string_view/operations/find/char/3.cc:
12949 Likewise.
12950 * unittests/basic_string_view/operations/find/char/4.cc:
12951 Likewise.
12952 * unittests/basic_string_view/operations/rfind/char/1.cc:
12953 Likewise.
12954 * unittests/basic_string_view/operations/rfind/char/2.cc:
12955 Likewise.
12956 * unittests/basic_string_view/operations/rfind/char/3.cc:
12957 Likewise.
12958 * unittests/basic_string_view/operations/substr/char/1.cc:
12959 Likewise.
12960 * unittests/basic_string_view/operators/char/2.cc: Likewise.
12961 * unittests/string_view-selftests.c: New file.
12962
12963 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12964
12965 * unittests/basic_string_view/capacity/1.cc: New file.
12966 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12967 * unittests/basic_string_view/cons/char/1.cc: New file.
12968 * unittests/basic_string_view/cons/char/2.cc: New file.
12969 * unittests/basic_string_view/cons/char/3.cc: New file.
12970 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12971 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12972 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12973 * unittests/basic_string_view/element_access/char/1.cc: New file.
12974 * unittests/basic_string_view/element_access/char/2.cc: New file.
12975 * unittests/basic_string_view/element_access/char/empty.cc: New file.
12976 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12977 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12978 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12979 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12980 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12981 * unittests/basic_string_view/include.cc: New file.
12982 * unittests/basic_string_view/inserters/char/1.cc: New file.
12983 * unittests/basic_string_view/inserters/char/2.cc: New file.
12984 * unittests/basic_string_view/inserters/char/3.cc: New file.
12985 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12986 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12987 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12988 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12989 * unittests/basic_string_view/literals/types.cc: New file.
12990 * unittests/basic_string_view/literals/values.cc: New file.
12991 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12992 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12993 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12994 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12995 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12996 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12997 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12998 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12999 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
13000 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
13001 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
13002 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
13003 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
13004 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
13005 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
13006 * unittests/basic_string_view/operations/data/char/1.cc: New file.
13007 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
13008 * unittests/basic_string_view/operations/find/char/1.cc: New file.
13009 * unittests/basic_string_view/operations/find/char/2.cc: New file.
13010 * unittests/basic_string_view/operations/find/char/3.cc: New file.
13011 * unittests/basic_string_view/operations/find/char/4.cc: New file.
13012 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
13013 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
13014 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
13015 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
13016 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
13017 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
13018 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
13019 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
13020 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
13021 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
13022 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
13023 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
13024 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
13025 * unittests/basic_string_view/operators/char/2.cc: New file.
13026 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
13027 * unittests/basic_string_view/range_access/char/1.cc: New file.
13028 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
13029 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
13030 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
13031 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
13032 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
13033 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
13034 * unittests/basic_string_view/requirements/typedefs.cc: New file.
13035 * unittests/basic_string_view/typedefs.cc: New file.
13036 * unittests/basic_string_view/types/1.cc: New file.
13037
13038 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13039
13040 * common/gdb_string_view.h: Remove libstdc++ implementation
13041 details, adjust to gdb reality.
13042 * common/gdb_string_view.tcc: Likewise.
13043 * cli/cli-script.c (struct string_view): Remove.
13044 (user_args) <m_args>: Change element type to gdb::string_view.
13045 (user_args::insert_args): Adjust.
13046
13047 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13048
13049 * common/gdb_string_view.h: New file.
13050 * common/gdb_string_view.tcc: New file.
13051
13052 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13053
13054 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
13055 * configure: Re-generate.
13056
13057 2018-04-09 Pedro Alves <palves@redhat.com>
13058
13059 * gdbarch.sh: Include "observable.h" instead of "observer.h".
13060 (set_target_gdbarch): Call
13061 gdb::observers::architecture_changed.notify instead of
13062 observer_notify_architecture_changed.
13063
13064 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13065
13066 * tracepoint.c (struct current_traceframe_cleanup): Remove.
13067 (do_restore_current_traceframe_cleanup): Remove.
13068 (restore_current_traceframe_cleanup_dtor): Remove.
13069 (make_cleanup_restore_current_traceframe): Remove.
13070 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
13071 New.
13072 * tracepoint.h (struct scoped_restore_current_traceframe): New.
13073 * infrun.c (fetch_inferior_event): Use
13074 scoped_restore_current_traceframe.
13075
13076 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13077
13078 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13079 Remove.
13080 <n_allocated_type_units>: Remove.
13081 <all_type_units>: Change to std::vector.
13082 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13083 to std::vector change.
13084 (dwarf2_per_objfile::get_cutu): Likewise.
13085 (dwarf2_per_objfile::get_tu): Likewise.
13086 (create_signatured_type_table_from_index): Likewise.
13087 (create_signatured_type_table_from_debug_names): Likewise.
13088 (dw2_symtab_iter_next): Likewise.
13089 (dw2_print_stats): Likewise.
13090 (dw2_expand_all_symtabs): Likewise.
13091 (dw2_expand_marked_cus): Likewise.
13092 (dw2_debug_names_iterator::next): Likewise.
13093 (dwarf2_initialize_objfile): Likewise.
13094 (add_signatured_type_cu_to_table): Likewise.
13095 (create_all_type_units): Likewise.
13096 (add_type_unit): Likewise.
13097 (struct tu_abbrev_offset): Add constructor.
13098 (build_type_psymtabs_1): Adjust to std::vector change.
13099 (print_tu_stats): Likewise.
13100 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13101 (write_debug_names): Likewise.
13102
13103 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13104
13105 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13106 Make an std::vector.
13107 <n_comp_units>: Remove.
13108 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13109 to std::vector change.
13110 (dwarf2_per_objfile::get_cutu): Likewise.
13111 (dwarf2_per_objfile::get_cu): Likewise.
13112 (create_cus_from_index): Likewise.
13113 (create_addrmap_from_index): Likewise.
13114 (create_addrmap_from_aranges): Likewise.
13115 (dwarf2_read_index): Likewise.
13116 (dw2_find_last_source_symtab): Likewise.
13117 (dw2_map_symtabs_matching_filename): Likewise.
13118 (dw2_symtab_iter_next): Likewise.
13119 (dw2_print_stats): Likewise.
13120 (dw2_expand_all_symtabs): Likewise.
13121 (dw2_expand_symtabs_with_fullname): Likewise.
13122 (dw2_expand_marked_cus): Likewise.
13123 (dw2_map_symbol_filenames): Likewise.
13124 (create_cus_from_debug_names): Likewise.
13125 (dwarf2_read_debug_names): Likewise.
13126 (dw2_debug_names_iterator::next): Likewise.
13127 (dwarf2_initialize_objfile): Likewise.
13128 (set_partial_user): Likewise.
13129 (dwarf2_build_psymtabs_hard): Likewise.
13130 (read_comp_units_from_section): Remove arguments, adjust to
13131 std::vector change.
13132 (create_all_comp_units): Adjust to std::vector and
13133 read_comp_units_from_section changes.
13134 (dwarf2_find_containing_comp_unit): Adjust to std::vector
13135 change.
13136 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13137 (psyms_seen_size): Likewise.
13138 (write_gdbindex): Likewise.
13139 (write_debug_names): Likewise.
13140
13141 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13142
13143 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13144 with dwarf2_per_objfile.
13145 (create_cus_from_index): Likewise.
13146 (create_signatured_type_table_from_index): Likewise.
13147 (dwarf2_read_index): Likewise.
13148 (dwarf2_initialize_objfile): Likewise.
13149 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
13150 per_cu rather than get_dwarf2_per_objfile.
13151
13152 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13153
13154 * dwarf2read.h (struct signatured_type): Forward declare.
13155 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13156 New methods.
13157 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13158 (dw2_get_cutu): ...this.
13159 (dwarf2_per_objfile::get_cu): Rename from...
13160 (dw2_get_cu): ...this.
13161 (dwarf2_per_objfile::get_tu): New.
13162 (create_addrmap_from_index): Adjust.
13163 (create_addrmap_from_aranges): Adjust.
13164 (dw2_find_last_source_symtab): Adjust.
13165 (dw2_map_symtabs_matching_filename): Adjust.
13166 (dw2_symtab_iter_next): Adjust.
13167 (dw2_print_stats): Adjust.
13168 (dw2_expand_all_symtabs): Adjust.
13169 (dw2_expand_symtabs_with_fullname): Adjust.
13170 (dw2_expand_marked_cus): Adjust.
13171 (dw_expand_symtabs_matching_file_matcher): Adjust.
13172 (dw2_map_symbol_filenames): Adjust.
13173 (dw2_debug_names_iterator::next): Adjust.
13174 (dwarf2_initialize_objfile): Adjust.
13175 (set_partial_user): Adjust.
13176 (dwarf2_build_psymtabs_hard): Adjust.
13177
13178 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13179
13180 * dwarf2read.c (create_signatured_type_table_from_debug_names):
13181 Remove unused variables.
13182 (dw2_map_symtabs_matching_filename): Likewise.
13183 (dwarf2_record_block_ranges): Likewise.
13184 (dwarf2_read_addr_index): Likewise.
13185 (follow_die_offset): Likewise.
13186
13187 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13188
13189 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13190 to symbol_file_add_main.
13191
13192 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13193
13194 PR mi/22299
13195 * mi/mi-console.c (do_fputc_async_safe): New.
13196 (mi_console_file::write_async_safe): New.
13197 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13198 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13199 New.
13200 * ui-file.c (ui_file::putstrn): Adjust call to
13201 fputstrn_unfiltered.
13202 * utils.c (printchar): Replace do_fputs and do_fprintf
13203 parameters by do_fputc.
13204 (fputstr_filtered): Adjust call to printchar.
13205 (fputstr_unfiltered): Likewise.
13206 (fputstrn_filtered): Likewise.
13207 (fputstrn_unfiltered): Add do_fputc parameter, pass to
13208 printchar.
13209 * utils.h (do_fputc_ftype): New typedef.
13210 (fputstrn_unfiltered): Add do_fputc parameter.
13211
13212 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13213
13214 * regformats/i386/i386-avx.dat: Remove.
13215
13216 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13217
13218 PR gdb/22979
13219 * amd64-tdep.c (amd64_none_init_abi): New function.
13220 (amd64_x32_none_init_abi): New function.
13221 (_initialize_amd64_tdep): Register handlers for x86-64 and
13222 x64_32 with GDB_OSABI_NONE.
13223 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13224 GDB_OSABI_NONE osabi.
13225
13226 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13227
13228 PR gdb/22980
13229 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13230 GDB_OSABI_NONE.
13231 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13232 * osabi.c (gdb_osabi_names): Add "unknown" entry.
13233
13234 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13235
13236 * common/byte-vector.h (char_vector): New type.
13237 * target.h (target_read_alloc): Return
13238 gdb::optional<byte_vector>.
13239 (target_read_stralloc): Return gdb::optional<char_vector>.
13240 (target_get_osdata): Return gdb::optional<char_vector>.
13241 * target.c (target_read_alloc_1): Templatize. Replacement
13242 manual memory management with vector.
13243 (target_read_alloc): Change return type, adjust.
13244 (target_read_stralloc): Change return type, adjust.
13245 (target_get_osdata): Change return type, adjust.
13246 * auxv.c (struct auxv_info) <length>: Remove.
13247 <data>: Change type to gdb::optional<byte_vector>.
13248 (auxv_inferior_data_cleanup): Free auxv_info with delete.
13249 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13250 (target_auxv_search): Adjust.
13251 (fprint_target_auxv): Adjust.
13252 * avr-tdep.c (avr_io_reg_read_command): Adjust.
13253 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13254 (linux_make_corefile_notes): Adjust.
13255 * osdata.c (get_osdata): Adjust.
13256 * remote.c (remote_get_threads_with_qxfer): Adjust.
13257 (remote_memory_map): Adjust.
13258 (remote_traceframe_info): Adjust.
13259 (btrace_read_config): Adjust.
13260 (remote_read_btrace): Adjust.
13261 (remote_pid_to_exec_file): Adjust.
13262 * solib-aix.c (solib_aix_get_library_list): Adjust.
13263 * solib-dsbt.c (decode_loadmap): Don't free buf.
13264 (dsbt_get_initial_loadmaps): Adjust.
13265 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13266 * solib-target.c (solib_target_current_sos): Adjust.
13267 * tracepoint.c (sdata_make_value): Adjust.
13268 * xml-support.c (xinclude_start_include): Adjust.
13269 (xml_fetch_content_from_file): Adjust.
13270 * xml-support.h (xml_fetch_another): Change return type.
13271 (xml_fetch_content_from_file): Change return type.
13272 * xml-syscall.c (xml_init_syscalls_info): Adjust.
13273 * xml-tdesc.c (file_read_description_xml): Adjust.
13274 (fetch_available_features_from_target): Change return type.
13275 (target_fetch_description_xml): Adjust.
13276 (target_read_description_xml): Adjust.
13277
13278 2018-04-06 Tom Tromey <tom@tromey.com>
13279
13280 * value.c (~value): Update.
13281 (struct value) <contents>: Now unique_xmalloc_ptr.
13282 (value_contents_bits_eq, allocate_value_contents)
13283 (value_contents_raw, value_contents_all_raw)
13284 (value_contents_for_printing, value_contents_for_printing_const)
13285 (set_value_enclosing_type): Update.
13286
13287 2018-04-06 Tom Tromey <tom@tromey.com>
13288
13289 * value.c (range_s): Remove typedef, VEC.
13290 (struct range): Add operator<.
13291 (range_lessthan): Remove.
13292 (ranges_contain): Change type.
13293 (~value): Update.
13294 (struct value) <unavailable, optimized_out>: Now std::vector.
13295 (value_entirely_available)
13296 (value_entirely_covered_by_range_vector)
13297 (value_entirely_unavailable, value_entirely_optimized_out):
13298 Update.
13299 (insert_into_bit_range_vector): Change argument type.
13300 (find_first_range_overlap): Likewise.
13301 (struct ranges_and_idx, value_contents_bits_eq)
13302 (require_not_optimized_out, require_available): Update.
13303 (ranges_copy_adjusted): Change argument types.
13304 (value_optimized_out, value_copy, value_fetch_lazy): Update.
13305
13306 2018-04-06 Tom Tromey <tom@tromey.com>
13307
13308 * value.c (~value): Update.
13309 (struct value) <parent>: Now a value_ref_ptr.
13310 (value_parent, set_value_parent, value_address, value_copy):
13311 Update.
13312
13313 2018-04-06 Tom Tromey <tom@tromey.com>
13314
13315 * value.c (struct value): Add constructor, destructor, and member
13316 initializers.
13317 (allocate_value_lazy, value_decref): Update.
13318
13319 2018-04-06 Tom Tromey <tom@tromey.com>
13320
13321 * value.c (struct value) <released, next>: Remove.
13322 (all_values): Now a std::vector.
13323 (allocate_value_lazy): Update.
13324 (value_next): Remove.
13325 (value_mark, value_free_to_mark, release_value)
13326 (value_release_to_mark): Update.
13327
13328 2018-04-06 Tom Tromey <tom@tromey.com>
13329
13330 * value.h (fetch_subexp_value, value_release_to_mark): Update.
13331 (free_value_chain): Remove.
13332 * value.c (free_value_chain): Remove.
13333 (value_release_to_mark): Return a std::vector.
13334 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13335 std::vector.
13336 (check_condition): Update.
13337 * eval.c (fetch_subexp_value): Change "val_chain" to a
13338 std::vector.
13339 * breakpoint.c (update_watchpoint): Update.
13340 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13341
13342 2018-04-06 Tom Tromey <tom@tromey.com>
13343
13344 * value.h (free_all_values): Remove.
13345 * value.c (free_all_values): Remove.
13346
13347 2018-04-06 Tom Tromey <tom@tromey.com>
13348
13349 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13350 (value_history_chain, value_history_count): Remove.
13351 (value_history): New global.
13352 (record_latest_value, access_value_history, show_values)
13353 (preserve_values): Update.
13354
13355 2018-04-06 Tom Tromey <tom@tromey.com>
13356
13357 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13358 * varobj.c (varobj_set_display_format, varobj_set_value)
13359 (install_default_visualizer, construct_visualizer)
13360 (install_new_value, ~varobj, varobj_get_value_type)
13361 (my_value_of_variable, varobj_editable_p): Update.
13362 * c-varobj.c (c_describe_child, c_value_of_variable)
13363 (cplus_number_of_children, cplus_describe_child): Update.
13364 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13365 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13366 (ada_value_of_variable, ada_value_is_changeable_p): Update.
13367
13368 2018-04-06 Tom Tromey <tom@tromey.com>
13369
13370 * printcmd.c (last_examine_address): Change type to
13371 value_ref_ptr.
13372 (do_examine, x_command): Update.
13373
13374 2018-04-06 Tom Tromey <tom@tromey.com>
13375
13376 * value.c (release_value): Update.
13377 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13378 (struct bpstats) <val>: Now a value_ref_ptr.
13379 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13380 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13381 (~watchpoint, print_it_watchpoint, watch_command_1)
13382 (invalidate_bp_value_on_memory_change): Update.
13383
13384 2018-04-06 Tom Tromey <tom@tromey.com>
13385
13386 * varobj.c (varobj_clear_saved_item)
13387 (update_dynamic_varobj_children, install_new_value, ~varobj):
13388 Update.
13389 * value.h (value_incref): Move declaration earlier.
13390 (value_decref): Rename from value_free.
13391 (struct value_ref_policy): New.
13392 (value_ref_ptr): New typedef.
13393 (struct value_deleter): Remove.
13394 (gdb_value_up): Remove typedef.
13395 (release_value): Change return type.
13396 (release_value_or_incref): Remove.
13397 * value.c (set_value_parent): Update.
13398 (value_incref): Change return type.
13399 (value_decref): Rename from value_free.
13400 (value_free_to_mark, free_all_values, free_value_chain): Update.
13401 (release_value): Return value_ref_ptr.
13402 (release_value_or_incref): Remove.
13403 (record_latest_value, set_internalvar, clear_internalvar):
13404 Update.
13405 * stack.c (info_frame_command): Don't call value_free.
13406 * python/py-value.c (valpy_dealloc, valpy_new)
13407 (value_to_value_object): Update.
13408 * printcmd.c (do_examine): Update.
13409 * opencl-lang.c (lval_func_free_closure): Update.
13410 * mi/mi-main.c (register_changed_p): Don't call value_free.
13411 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13412 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13413 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13414 value_free.
13415 * guile/scm-value.c (vlscm_free_value_smob)
13416 (vlscm_scm_from_value): Update.
13417 * frame.c (frame_register_unwind, frame_unwind_register_signed)
13418 (frame_unwind_register_unsigned, get_frame_register_bytes)
13419 (put_frame_register_bytes): Don't call value_free.
13420 * findvar.c (address_from_register): Don't call value_free.
13421 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13422 * dwarf2loc.c (entry_data_value_free_closure)
13423 (value_of_dwarf_reg_entry, free_pieced_value_closure)
13424 (dwarf2_evaluate_loc_desc_full): Update.
13425 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13426 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13427 (~watchpoint, watch_command_1)
13428 (invalidate_bp_value_on_memory_change): Update.
13429 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13430
13431 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
13432
13433 PR gdb/23022
13434 * warning.m4: Add -Wno-error=deprecated-register.
13435 * configure: Re-generate.
13436
13437 2018-04-05 Tom Tromey <tom@tromey.com>
13438
13439 * linespec.h: Remove include of "vec.h".
13440
13441 2018-04-05 Tom Tromey <tom@tromey.com>
13442
13443 * linespec.c (typep): Remove typedef.
13444 (find_methods, find_superclass_methods): Take a std::vector.
13445 (find_method): Use std::vector.
13446
13447 2018-04-05 Tom Tromey <tom@tromey.com>
13448
13449 * utils.c (compare_strings): Remove.
13450 * utils.h (compare_strings): Remove.
13451 * objc-lang.h (find_imps): Update.
13452 * objc-lang.c (find_methods): Take a std::vector.
13453 (uniquify_strings, find_imps): Likewise.
13454 * linespec.c (find_methods): Take a std::vector.
13455 (decode_objc): Use std::vector.
13456 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13457 a std::vector.
13458 (find_method, find_function_symbols): Use std::vector.
13459
13460 2018-04-05 Tom Tromey <tom@tromey.com>
13461
13462 * completer.c (completion_tracker::completion_tracker): Remove
13463 cast.
13464 (completion_tracker::discard_completions): Likewise.
13465 * breakpoint.c (ambiguous_names_p): Remove cast.
13466 * ada-lang.c (_initialize_ada_language): Remove cast.
13467 * utils.h (streq): Update.
13468 (streq_hash): Add new declaration.
13469 * utils.c (streq): Return bool.
13470 (streq_hash): New function.
13471
13472 2018-04-05 Tom Tromey <tom@tromey.com>
13473
13474 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13475 Remove a string copy.
13476
13477 2018-04-05 Tom Tromey <tom@tromey.com>
13478
13479 * linespec.c (filter_results): Use std::vector.
13480 (decode_line_2, decode_line_full): Update.
13481
13482 2018-04-05 Tom Tromey <tom@tromey.com>
13483
13484 * linespec.c (canonical_to_fullform): Return std::string.
13485 (filter_results): Update.
13486 (struct decode_line_2_item): Add constructor.
13487 <fullform, displayform>: Now std::string.
13488 (decode_line_2_compare_items): Now a std::sort comparator.
13489 (decode_line_2): Update.
13490
13491 2018-04-05 Tom Tromey <tom@tromey.com>
13492
13493 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13494 (unexpected_linespec_error): Update.
13495 (linespec_parse_basic, parse_linespec): Update.
13496
13497 2018-04-05 Tom Tromey <tom@tromey.com>
13498
13499 * linespec.c (linespec_parse_basic): Reindent.
13500
13501 2018-04-05 Tom Tromey <tom@tromey.com>
13502
13503 * minsyms.h (iterate_over_minimal_symbols): Update.
13504 * minsyms.c (iterate_over_minimal_symbols): Take a
13505 gdb::function_view.
13506 * linespec.c (struct collect_minsyms): Remove.
13507 (compare_msyms): Now a std::sort comparator.
13508 (add_minsym): Add parameters.
13509 (search_minsyms_for_name): Update. Use std::vector.
13510
13511 2018-04-03 Tom Tromey <tom@tromey.com>
13512
13513 * mipsread.c (read_alphacoff_dynamic_symtab): Use
13514 gdb::byte_vector.
13515
13516 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13517
13518 * MAINTAINERS (Write After Approval): Add Weimin Pan.
13519
13520 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13521
13522 PR gdb/16959
13523 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
13524 printing static type.
13525
13526 2018-04-01 Tom Tromey <tom@tromey.com>
13527
13528 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13529 (rs6000_xfer_shared_libraries): Update.
13530
13531 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
13532
13533 * common/gdb_vecs.h (char_ptr): Remove.
13534 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13535
13536 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13537
13538 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13539 with std::vector.
13540 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13541
13542 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13543
13544 * tracepoint.h (struct uploaded_tp): Initialize fields.
13545 <actions, step_actions, cmd_strings>: Change type to
13546 std::vector<char *>.
13547 * tracepoint.c (get_uploaded_tp): Allocate with new.
13548 (free_uploaded_tps): Free with delete.
13549 (parse_tracepoint_definition): Adjust to std::vector change.
13550 * breakpoint.c (read_uploaded_action): Likewise.
13551 (create_tracepoint_from_upload): Likewise.
13552 * ctf.c (ctf_write_uploaded_tp): Likewise.
13553 (SET_ARRAY_FIELD): Likewise.
13554 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13555
13556 2018-03-30 Tom Tromey <tom@tromey.com>
13557
13558 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
13559 std::unique_ptr.
13560 (svr4_keep_data_in_core): Update.
13561 (svr4_read_so_list): Update.
13562
13563 2018-03-30 Tom Tromey <tom@tromey.com>
13564
13565 * windows-nat.c (handle_output_debug_string, handle_exception):
13566 Update.
13567 * target.h (target_read_string): Update.
13568 * target.c (target_read_string): Change "string" to
13569 unique_xmalloc_ptr.
13570 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13571 Update.
13572 * solib-frv.c (frv_current_sos): Update.
13573 * solib-dsbt.c (dsbt_current_sos): Update.
13574 * solib-darwin.c (darwin_current_sos): Update.
13575 * linux-thread-db.c (inferior_has_bug): Update.
13576 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13577 Update. Remove alloca.
13578 * ada-lang.c (ada_main_name): Update.
13579
13580 2018-03-30 Tom Tromey <tom@tromey.com>
13581
13582 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13583 (struct dwo_file_deleter): New.
13584 (dwo_file_up): New typedef.
13585 (open_and_init_dwo_file): Use dwo_file_up.
13586 (free_dwo_file_cleanup): Remove.
13587
13588 2018-03-30 Tom Tromey <tom@tromey.com>
13589
13590 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13591 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13592
13593 2018-03-30 Tom Tromey <tom@tromey.com>
13594
13595 * dwarf2read.c (class free_cached_comp_units): New class.
13596 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13597 (free_cached_comp_units): Remove function.
13598
13599 2018-03-30 Tom Tromey <tom@tromey.com>
13600
13601 * utils.h (make_cleanup_unpush_target): Remove.
13602 * inf-ptrace.c (struct target_unpusher): New.
13603 (target_unpush_up) New typedef.
13604 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13605 target_unpush_up.
13606 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13607
13608 2018-03-27 Tom Tromey <tom@tromey.com>
13609
13610 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13611
13612 2018-03-27 Pedro Alves <palves@redhat.com>
13613 Tom Tromey <tom@tromey.com>
13614
13615 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13616 destructor. Now a class.
13617 (gdb_readline_wrapper_cleanup): Remove function.
13618 (gdb_readline_wrapper): Remove cleanups.
13619
13620 2018-03-27 Tom Tromey <tom@tromey.com>
13621
13622 * typeprint.h (struct type_print_options) <local_typedefs,
13623 global_typedefs>: Remove "struct" keyword.
13624 (class typedef_hash_table): New class.
13625 (recursively_update_typedef_hash, add_template_parameters)
13626 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13627 (find_typedef_in_hash): Don't declare.
13628 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13629 (typedef_hash_table::recursively_update): Rename from
13630 recursively_update_typedef_hash. Now a member.
13631 (typedef_hash_table::add_template_parameters): Rename from
13632 add_template_parameters. Now a member.
13633 (typedef_hash_table::typedef_hash_table): Now a constructor;
13634 rename from create_typedef_hash.
13635 (typedef_hash_table::~typedef_hash_table): Now a destructor;
13636 rename from free_typedef_hash.
13637 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13638 (do_free_global_table): Remove.
13639 (typedef_hash_table::typedef_hash_table): New constructor; renamed
13640 from copy_type_recursive.
13641 (create_global_typedef_table): Remove.
13642 (typedef_hash_table::find_global_typedef): Now a member of
13643 typedef_hash_table.
13644 (typedef_hash_table::find_typedef): Rename from
13645 find_typedef_in_hash; now a member.
13646 (whatis_exp): Update.
13647 * extension.h (struct ext_lang_type_printers): Add constructor and
13648 destructor.
13649 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13650 declare.
13651 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13652 Now a constructor; rename from start_ext_lang_type_printers.
13653 (ext_lang_type_printers): Now a destructor; rename from
13654 free_ext_lang_type_printers.
13655 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13656 Update.
13657 (c_type_print_base_struct_union): Update. Remove cleanups.
13658
13659 2018-03-27 Tom Tromey <tom@tromey.com>
13660
13661 * dwarf-index-write.c: Include <cmath>.
13662
13663 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13664
13665 * NEWS: Add entry describing new "set|show varsize-limit" command.
13666 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13667 command.
13668 * printcmd.c (_initialize_printcmd): Add "set var" alias of
13669 "set variable".
13670
13671 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
13672
13673 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13674 dwarf-index-write.c
13675 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13676 * dwarf-index-common.c: New file.
13677 * dwarf-index-common.h: New file.
13678 * dwarf-index-write.c: New file.
13679 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13680 (struct dwarf2_section_info): Move from here.
13681 (dwarf2_section_info_def): Likewise.
13682 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13683 (offset_type): Likewise.
13684 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13685 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13686 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13687 (byte_swap): Likewise.
13688 (MAYBE_SWAP): Likewise.
13689 (dwarf2_per_cu_ptr): Likewise.
13690 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13691 (struct tu_stats): Likewise.
13692 (struct dwarf2_per_objfile): Likewise.
13693 (struct dwarf2_per_cu_data): Likewise.
13694 (struct signatured_type): Likewise.
13695 (sig_type_ptr): Likewise.
13696 (DEF_VEC_P (sig_type_ptr)): Likewise.
13697 (INDEX4_SUFFIX): Likewise.
13698 (INDEX5_SUFFIX): Likewise.
13699 (DEBUG_STR_SUFFIX): Likewise.
13700 (dwarf2_read_section): Make non-static.
13701 (mapped_index_string_hash): Move from here.
13702 (dwarf5_djb_hash): Likewise.
13703 (file_write): Likewise.
13704 (class data_buf): Likewise.
13705 (struct symtab_index_entry): Likewise.
13706 (struct mapped_symtab): Likewise.
13707 (find_slot): Likewise.
13708 (hash_expand): Likewise.
13709 (add_index_entry): Likewise.
13710 (uniquify_cu_indices): Likewise.
13711 (class c_str_view): Likewise.
13712 (class c_str_view_hasher): Likewise.
13713 (class vector_hasher): Likewise.
13714 (write_hash_table): Likewise.
13715 (psym_index_map): Likewise.
13716 (struct addrmap_index_data): Likewise.
13717 (add_address_entry): Likewise.
13718 (add_address_entry_worker): Likewise.
13719 (write_address_map): Likewise.
13720 (symbol_kind): Likewise.
13721 (write_psymbols): Likewise.
13722 (struct signatured_type_index_data): Likewise.
13723 (write_one_signatured_type): Likewise.
13724 (recursively_count_psymbols): Likewise.
13725 (recursively_write_psymbols): Likewise.
13726 (class debug_names): Likewise.
13727 (check_dwarf64_offsets): Likewise.
13728 (psyms_seen_size): Likewise.
13729 (write_gdbindex): Likewise.
13730 (write_debug_names): Likewise.
13731 (assert_file_size): Likewise.
13732 (write_psymtabs_to_index): Likewise.
13733 (save_gdb_index_command): Likewise.
13734 (_initialize_dwarf2_read): Don't register the "save gdb-index"
13735 command.
13736 * dwarf2read.h: New file.
13737
13738 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13739
13740 PR gdb/22670
13741 * dwarf2read.c (dwarf2_physname): Do not return the demangled
13742 symbol name if the CU's language stores symbol names in linkage
13743 format.
13744 * language.h (struct language_defn)
13745 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
13746 all instances of this struct.
13747
13748 2018-03-26 Tom Tromey <tom@tromey.com>
13749
13750 * stack.c (backtrace_command_1): Remove verbose code.
13751
13752 2018-03-26 Tom Tromey <tom@tromey.com>
13753
13754 * python/py-framefilter.c (py_print_type): Don't catch
13755 exceptions. Return void.
13756 (py_print_value): Likewise.
13757 (py_print_single_arg): Likewise.
13758 (enumerate_args): Don't catch exceptions.
13759 (py_print_args): Likewise.
13760 (py_print_frame): Likewise.
13761 (gdbpy_apply_frame_filter): Catch exceptions here.
13762
13763 2018-03-26 Tom Tromey <tom@tromey.com>
13764
13765 * stack.c (_initialize_stack): Remove trailing newlines from help
13766 text. Add "Usage" line to "backtrace" help.
13767
13768 2018-03-26 Tom Tromey <tom@tromey.com>
13769
13770 PR python/16486:
13771 * python/py-framefilter.c (py_print_args): Call wrap_hint.
13772
13773 2018-03-26 Tom Tromey <tom@tromey.com>
13774
13775 * python/py-framefilter.c (py_print_single_arg): Return
13776 EXT_LANG_BT_ERROR from catch.
13777
13778 2018-03-26 Tom Tromey <tom@tromey.com>
13779
13780 PR backtrace/15584:
13781 * stack.c (backtrace_command_1): Move some code into no-filters
13782 "if".
13783
13784 2018-03-26 Tom Tromey <tom@tromey.com>
13785
13786 * python/py-framefilter.c (throw_quit_or_print_exception): New
13787 function.
13788 (gdbpy_apply_frame_filter): Use it.
13789
13790 2018-03-26 Tom Tromey <tom@tromey.com>
13791
13792 PR cli/17716:
13793 * python/py-framefilter.c (py_print_type, py_print_value)
13794 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13795 RETURN_MASK_ERROR.
13796
13797 2018-03-26 Tom Tromey <tom@tromey.com>
13798
13799 * python/py-framefilter.c (enumerate_args): Use
13800 gdb::unique_xmalloc_ptr.
13801
13802 2018-03-26 Tom Tromey <tom@tromey.com>
13803
13804 * python/py-framefilter.c (py_print_frame): Return
13805 EXT_LANG_BT_OK.
13806 (gdbpy_apply_frame_filter): Update comment.
13807 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13808 Remove.
13809 <EXT_LANG_BT_NO_FILTERS>: Change value.
13810
13811 2018-03-26 Tom Tromey <tom@tromey.com>
13812
13813 PR backtrace/15582:
13814 * stack.c (backtrace_command): Parse "hide" argument.
13815 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13816 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13817 constant.
13818
13819 2018-03-26 Tom Tromey <tom@tromey.com>
13820
13821 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13822 add "flags".
13823 (backtrace_command): Remove "fulltrace", add "flags".
13824
13825 2018-03-26 Tom Tromey <tom@tromey.com>
13826
13827 * stack.c (backtrace_command): Rewrite command line parsing.
13828
13829 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13830
13831 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13832
13833 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13834
13835 * filename-seen-cache.h: Add include guard.
13836
13837 2018-03-26 Keith Seitz <keiths@redhat.com>
13838
13839 * symfile.c (place_section): Remove "struct" from section_addr_info
13840 in comment.
13841 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13842 "struct" keyword from section_addr_info.
13843
13844 2018-03-26 Alan Hayward <alan.hayward@arm.com>
13845
13846 * regformats/regdef.h (reg): Add constructors.
13847
13848 2018-03-25 Pedro Alves <palves@redhat.com>
13849
13850 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13851 if then/else bodies in var_func_name extraction.
13852
13853 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
13854
13855 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13856 lookup_minimal_symbol() to find symbol entry.
13857 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13858
13859 2018-03-23 Keith Seitz <keiths@redhat.com>
13860
13861 PR c++/22968
13862 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13863 nested type definitions for C++, too.
13864
13865 2018-03-23 Tom Tromey <tom@tromey.com>
13866
13867 * machoread.c (struct oso_el): Add a constructor. Don't define as
13868 a typedef.
13869 (macho_register_oso): Remove.
13870 (macho_symtab_read): Take a std::vector.
13871 (oso_el_compare_name): Now a std::sort comparator.
13872 (macho_symfile_read_all_oso): Take a std::vector.
13873 (macho_symfile_read): Use std::vector. Remove cleanups.
13874
13875 2018-03-22 Tom Tromey <tom@tromey.com>
13876
13877 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13878 (record_full_goto_bookmark): Use std::string.
13879
13880 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13881
13882 PR tdep/18295
13883 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13884 a single mask.
13885
13886 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13887
13888 * rs6000-tdep.c (store_insn_p): New function.
13889 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13890 and cr_reg to their unshifted values. Use store_insn_p to
13891 match LR saves using either R1 or fdata->alloca_reg. Use
13892 store_insn_p to match CR saves. Set alloca_reg_offset
13893 when alloca_reg and framep are set. Remove lr_reg shift
13894 when assigning to fdata->lr_register.
13895
13896 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
13897
13898 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13899 command line args instead of emitting a warning.
13900
13901 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13902
13903 * tracepoint.h (struct static_tracepoint_marker): Initialize
13904 fields, define default constructor, move constructor and move
13905 assignment, disable the rest.
13906 <str_id, extra>: Make std::string.
13907 (release_static_tracepoint_marker): Remove.
13908 (free_current_marker): Remove.
13909 * tracepoint.c (free_current_marker): Remove.
13910 (parse_static_tracepoint_marker_definition): Adjust to
13911 std::string, use new hex2str overload.
13912 (release_static_tracepoint_marker): Remove.
13913 (print_one_static_tracepoint_marker): Get marker by reference
13914 and adjust to std::string.
13915 (info_static_tracepoint_markers_command): Adjust to std::vector
13916 changes
13917 * target.h (static_tracepoint_marker_p): Remove typedef.
13918 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13919 (struct target_ops) <to_static_tracepoint_marker_at>: Return
13920 bool.
13921 <to_static_tracepoint_markers_by_strid>: Return std::vector.
13922 * target-debug.h
13923 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13924 (target_debug_print_std_vector_static_tracepoint_marker): New.
13925 (target_debug_print_struct_static_tracepoint_marker_p): Rename
13926 to...
13927 (target_debug_print_static_tracepoint_marker_p): ... this.
13928 * target-delegates.c: Re-generate.
13929 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13930 Make std::string.
13931 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13932 (decode_static_tracepoint_spec): Adjust to std::vector.
13933 (tracepoint_print_one_detail): Adjust to std::string.
13934 (strace_marker_decode_location): Adjust to std::string.
13935 (update_static_tracepoint): Adjust to std::string, remove call
13936 to release_static_tracepoint_marker.
13937 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13938 Adjust to std::vector.
13939 * remote.c (remote_static_tracepoint_marker_at): Return bool.
13940 (remote_static_tracepoint_markers_by_strid): Adjust to
13941 std::vector.
13942 * common/rsp-low.h (hex2str): New overload with explicit count
13943 of bytes.
13944 * common/rsp-low.c (hex2str): New overload with explicit count
13945 of bytes.
13946 * unittests/rsp-low-selftests.c (test_hex2str): New function.
13947 (_initialize_rsp_low_selftests): Add test_hex2str test.
13948 * unittests/tracepoint-selftests.c
13949 (test_parse_static_tracepoint_marker_definition): Adjust to
13950 std::string.
13951
13952 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13953
13954 * tracepoint.c (parse_static_tracepoint_marker_definition):
13955 Consider case where the definition is followed by more
13956 definitions.
13957 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13958 tracepoint-selftests.c.
13959 * unittests/tracepoint-selftests.c: New.
13960
13961 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13962
13963 * MAINTAINERS (Write After Approval): Add Pedro Franco de
13964 Carvalho.
13965
13966 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13967
13968 * symtab.c (find_pc_sect_line): fixed indentation.
13969
13970 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13971
13972 * symtab.c (find_pc_sect_line): now uses binary search.
13973
13974 2018-03-19 Tom Tromey <tom@tromey.com>
13975
13976 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13977 "IDENT" production.
13978
13979 2018-03-19 Pedro Alves <palves@redhat.com>
13980 Tom Tromey <tom@tromey.com>
13981
13982 * unittests/observable-selftests.c: New file.
13983 * common/observable.h: New file.
13984 * observable.h: New file.
13985 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13986 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13987 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13988 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13989 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13990 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13991 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13992 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13993 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13994 python/py-breakpoint.c, python/py-finishbreakpoint.c,
13995 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13996 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13997 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13998 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13999 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
14000 tui/tui-interp.c, valops.c: Update all users.
14001 * tui/tui-hooks.c (tui_bp_created_observer)
14002 (tui_bp_deleted_observer, tui_bp_modified_observer)
14003 (tui_inferior_exit_observer, tui_before_prompt_observer)
14004 (tui_normal_stop_observer, tui_register_changed_observer):
14005 Remove.
14006 (tui_observers_token): New global.
14007 (attach_or_detach, tui_attach_detach_observers): New functions.
14008 (tui_install_hooks, tui_remove_hooks): Use
14009 tui_attach_detach_observers.
14010 * record-btrace.c (record_btrace_thread_observer): Remove.
14011 (record_btrace_thread_observer_token): New global.
14012 * observer.sh: Remove.
14013 * observer.c: Rename to observable.c.
14014 * observable.c (namespace gdb_observers): Define new objects.
14015 (observer_debug): Move into gdb_observers namespace.
14016 (struct observer, struct observer_list, xalloc_observer_list_node)
14017 (xfree_observer_list_node, generic_observer_attach)
14018 (generic_observer_detach, generic_observer_notify): Remove.
14019 (_initialize_observer): Update.
14020 Don't include observer.inc.
14021 * Makefile.in (generated_files): Remove observer.h, observer.inc.
14022 (clean mostlyclean): Likewise.
14023 (observer.h, observer.inc): Remove targets.
14024 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
14025 (COMMON_SFILES): Use observable.c, not observer.c.
14026 * .gitignore: Remove observer.h.
14027
14028 2018-03-18 Tom Tromey <tom@tromey.com>
14029
14030 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
14031 gdb::def_vector.
14032 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
14033
14034 2018-03-17 Tom Tromey <tom@tromey.com>
14035
14036 * auto-load.c (auto_load_objfile_script_1): Use std::string.
14037
14038 2018-03-17 Tom Tromey <tom@tromey.com>
14039
14040 * target.c (class scoped_target_fd): New.
14041 (target_fileio_close_cleanup): Remove.
14042 (target_fileio_read_alloc_1): Use scoped_target_fd.
14043
14044 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
14045
14046 * silent-rules.mk: New.
14047 * Makefile.in: Include silent-rules.mk
14048 (srcdir, VPATH, top_srcdir): Move up.
14049 (COMPILE): Add ECHO_CXX.
14050 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
14051 (init.c): Add ECHO_INIT_C.
14052 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
14053 (version.c): Add ECHO_GEN.
14054 (printcmd.o): Add ECHO_CXX.
14055 (target-float.o): Add ECHO_CXX.
14056 (ada-exp.o): Add ECHO_CXX.
14057 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
14058 (insight$(EXEEXT)): Add ECHO_CXXLD.
14059 * gnulib/configure.ac: Add AM_SILENT_RULES.
14060 * gnulib/aclocal.m4: Re-generate.
14061 * gnulib/configure: Re-generate.
14062 * gnulib/import/Makefile.in: Re-generate.
14063
14064 2018-03-16 Tom Tromey <tom@tromey.com>
14065
14066 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
14067 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
14068 * utils.c (do_free_section_addr_info)
14069 (make_cleanup_free_section_addr_info): Remove.
14070 * symfile.h (struct other_sections): Add constructor.
14071 (struct section_addr_info): Remove.
14072 (section_addr_info): New typedef.
14073 (struct sym_fns) <sym_offsets>: Change type of parameter.
14074 (build_section_addr_info_from_objfile)
14075 (relative_addr_info_to_section_offsets, addr_info_make_relative)
14076 (default_symfile_offsets, symbol_file_add)
14077 (symbol_file_add_from_bfd)
14078 (build_section_addr_info_from_section_table): Update.
14079 (alloc_section_addr_info, free_section_addr_info): Don't declare.
14080 * symfile.c (alloc_section_addr_info): Remove.
14081 (build_section_addr_info_from_section_table): Change return type.
14082 Update.
14083 (build_section_addr_info_from_bfd)
14084 (build_section_addr_info_from_objfile): Likewise.
14085 (free_section_addr_info): Remove.
14086 (relative_addr_info_to_section_offsets): Change type of "addrs".
14087 (addrs_section_compar): Now a std::sort comparator.
14088 (addrs_section_sort): Change return type.
14089 (addr_info_make_relative): Change type of "addrs". Update.
14090 (default_symfile_offsets, syms_from_objfile_1)
14091 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14092 (symbol_file_add_separate): Update.
14093 (symbol_file_add): Change type of "addrs". Update.
14094 (add_symbol_file_command): Update. Remove cleanups.
14095 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
14096 cleanups.
14097 * symfile-debug.c (debug_sym_offsets): Change type of "info".
14098 * solib.c (solib_read_symbols): Update.
14099 * objfiles.c (objfile_relocate): Update. Remove cleanups.
14100 * machoread.c (macho_symfile_offsets): Update.
14101 * jit.c (jit_bfd_try_read_symtab): Update.
14102
14103 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
14104
14105 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14106 unittests/utils-selftests.c.
14107 * unittests/utils-selftests.c: New file.
14108
14109 2018-03-14 Tom Tromey <tom@tromey.com>
14110
14111 PR cli/14977:
14112 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14113 for NULL.
14114
14115 2018-03-14 Tom Tromey <tom@tromey.com>
14116
14117 PR cli/19918:
14118 * printcmd.c (printf_pointer): Allow "-" in format.
14119
14120 2018-03-14 Tom Tromey <tom@tromey.com>
14121
14122 * printcmd.c (_initialize_printcmd): Add usage to printf.
14123
14124 2018-03-14 Yao Qi <qiyao@sourceware.org>
14125
14126 * MAINTAINERS: Update my email address.
14127
14128 2018-03-13 Tom Tromey <tom@tromey.com>
14129
14130 * machoread.c (macho_check_dsym): Change filenamep to a
14131 std::string*.
14132 (macho_symfile_read): Update.
14133 * symfile.c (load_command): Use std::string.
14134
14135 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
14136
14137 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14138 to error message string.
14139 (riscv_register_name): Use xsnprintf instead of sprintf.
14140 (riscv_insn::fetch_instruction): Use gdb_assert instead of
14141 internal_error.
14142 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14143 error.
14144 (riscv_push_dummy_call): Likewise.
14145
14146 2018-03-12 Tom Tromey <tom@tromey.com>
14147
14148 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14149 Use gdb::byte_vector.
14150 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14151
14152 2018-03-12 Yao Qi <yao.qi@linaro.org>
14153
14154 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14155 parameter type to readable_regcache.
14156 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14157 the declaration.
14158
14159 2018-03-11 Tom Tromey <tom@tromey.com>
14160
14161 * dwarf2read.c (struct nextfield): Add initializers.
14162 (struct nextfnfield): Remove.
14163 (struct fnfieldlist): Add initializers. Remove "length" and
14164 "head", use std::vector.
14165 (struct decl_field_list): Remove.
14166 (struct field_info): Add initializers.
14167 <fields, baseclasses>: Now std::vector.
14168 <nbaseclasses, nfnfields, typedef_field_list_count,
14169 nested_types_list_count>: Remove.
14170 (dwarf2_add_field, dwarf2_add_type_defn)
14171 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14172 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14173 (process_structure_scope): Update.
14174
14175 2018-03-11 Tom Tromey <tom@tromey.com>
14176
14177 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14178 for use by std::sort.
14179 (build_type_psymtabs_1): Use std::vector.
14180
14181 2018-03-09 Eli Zaretskii <eliz@gnu.org>
14182
14183 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14184 and LIBMPFR in the printed configuration.
14185
14186 2018-03-08 Tom Tromey <tom@tromey.com>
14187
14188 * source.c (get_filename_and_charpos): Use scoped_fd.
14189 * nto-procfs.c (procfs_open_1): Use scoped_fd.
14190 (procfs_pidlist): Likewise.
14191 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14192 (iterate_over_mappings): Likewise.
14193
14194 2018-03-08 Tom Tromey <tom@tromey.com>
14195
14196 * infcall.c (struct call_return_meta_info)
14197 <stack_temporaries_enabled>: Remove.
14198 (get_call_return_value, call_function_by_hand_dummy): Update.
14199 * thread.c (disable_thread_stack_temporaries): Remove.
14200 (enable_thread_stack_temporaries): Remove.
14201 (thread_stack_temporaries_enabled_p): Return bool.
14202 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14203 (get_last_thread_stack_temporary): Update.
14204 * eval.c (evaluate_subexp): Update.
14205 * gdbthread.h (class enable_thread_stack_temporaries): Now a
14206 class, not a function.
14207 (value_ptr, value_vec): Remove typedefs.
14208 (class thread_info) <stack_temporaries_enabled>: Now bool.
14209 <stack_temporaries>: Now a std::vector.
14210 (thread_stack_temporaries_enabled_p)
14211 (value_in_thread_stack_temporaries): Return bool.
14212
14213 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
14214
14215 * remote.c (putpkt_binary): Fix omitted bytes reporting.
14216 (getpkt_or_notif_sane_1): Likewise.
14217
14218 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14219
14220 * build-id.c (build_id_to_debug_bfd): Use std::string.
14221
14222 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14223
14224 * build-id.c (find_separate_debug_file_by_buildid): Return
14225 std::string.
14226 * build-id.h (find_separate_debug_file_by_buildid): Return
14227 std::string.
14228 * coffread.c (coff_symfile_read): Adjust to std::string.
14229 * elfread.c (elf_symfile_read): Adjust to std::string.
14230 * symfile.c (separate_debug_file_exists): Change parameter to
14231 std::string.
14232 (find_separate_debug_file): Return std::string.
14233 (find_separate_debug_file_by_debuglink): Return std::string.
14234 * symfile.h (find_separate_debug_file_by_debuglink): Return
14235 std::string.
14236
14237 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14238
14239 * common/xml-utils.c (xml_escape_text): Move code to...
14240 (xml_escape_text_append): ... this new function.
14241 * common/xml-utils.h (xml_escape_text_append): New declaration.
14242 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14243 New function.
14244 (_initialize_xml_utils): register test_xml_escape_text_append as
14245 a selftest.
14246
14247 2018-03-07 Alan Hayward <alan.hayward@arm.com>
14248
14249 * defs.h: Remove MAX_REGISTER_SIZE.
14250 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14251 asserts.
14252 * python/py-unwind.c (pyuw_sniffer): Likewise.
14253
14254 2018-03-07 Tom Tromey <tom@tromey.com>
14255
14256 * linux-tdep.c (linux_info_proc): Update.
14257 * target.h (struct target_ops) <to_fileio_readlink>: Return
14258 optional<string>.
14259 (target_fileio_readlink): Return optional<string>.
14260 * remote.c (remote_hostio_readlink): Return optional<string>.
14261 * inf-child.c (inf_child_fileio_readlink): Return
14262 optional<string>.
14263 * target.c (target_fileio_readlink): Return optional<string>.
14264
14265 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
14266
14267 * regcache.c (cooked_read_test): Add riscv to the list of
14268 architectures that have a save_reggroup.
14269
14270 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
14271
14272 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14273 value is not a dynamic class object.
14274
14275 2018-03-06 Tom Tromey <tom@tromey.com>
14276
14277 * rust-exp.y: Formatting fixes.
14278
14279 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14280
14281 * riscv-tdep.c (riscv_register_name): Remove target description
14282 support.
14283 (riscv_gdbarch_init): Remove target description check.
14284
14285 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14286
14287 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14288 comment.
14289 * riscv-tdep.h: Likewise.
14290
14291 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14292
14293 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14294 (riscv_pseudo_register_write): Delete.
14295 (riscv_gdbarch_init): Remove all use of pseudo registers.
14296
14297 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14298
14299 * record-btrace.c (btrace_print_lines): Replace cleanup
14300 parameter with RAII equivalents.
14301 (btrace_insn_history): Replace cleanup with RAII equivalents.
14302 * ui-out.h (make_cleanup_ui_out_list_begin_end,
14303 make_cleanup_ui_out_tuple_begin_end): Remove.
14304 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14305 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14306 make_cleanup_ui_out_list_begin_end): Remove.
14307
14308 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14309
14310 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14311 parameter types to std::vector. Use bool.
14312 (record_btrace_wait): Replace VEC(tp_t) with
14313 std::vector<thread_info *>.
14314 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14315
14316 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14317
14318 * record-btrace.c (record_btrace_disable_callback): Remove.
14319 (struct scoped_btrace_disable): New.
14320 (record_btrace_open): Use scoped_btrace_disable.
14321
14322 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14323
14324 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14325 reading values from registers.
14326
14327 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14328
14329 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14330 where appropriate.
14331
14332 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14333
14334 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14335 change parameter type. Use GDB's print functions, and use
14336 core_addr_to_string where appropriate.
14337 (riscv_push_dummy_call): Use core_addr_to_string where
14338 appropriate, update call to riscv_print_arg_location, and reindent
14339 a few lines.
14340 (riscv_return_value): Update call to riscv_print_arg_location.
14341
14342 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14343 Tim Newsome <tim@sifive.com>
14344 Albert Ou <a0u@eecs.berkeley.edu>
14345 Darius Rad <darius@bluespec.com>
14346
14347 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14348 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14349 (ALLDEPFILES): Add riscv-tdep.c
14350 * configure.tgt: Add riscv support.
14351 * riscv-tdep.c: New file.
14352 * riscv-tdep.h: New file.
14353 * NEWS: Mention new target.
14354 * MAINTAINERS: Add entry for riscv.
14355
14356 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14357
14358 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14359 fields within aggregates.
14360
14361 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
14362
14363 * record-btrace.c (btrace_print_lines): Change type of flags to
14364 gdb_disassembly_flags.
14365
14366 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14367
14368 * fbsd-nat.c: Include "inf-ptrace.h".
14369 (USE_SIGTRAP_SIGINFO): Conditionally define.
14370 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14371 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14372 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14373 function.
14374 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14375 Likewise.
14376 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14377 Likewise.
14378 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14379 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14380 "supports_stopped_by_hw_breakpoint" target methods.
14381
14382 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14383
14384 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14385 * fbsd-nat.c (debug_fbsd_nat): New variable.
14386 (show_fbsd_nat_debug): New function.
14387 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14388 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14389
14390 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14391
14392 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14393 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14394 prototype.
14395 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14396 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14397 method.
14398
14399 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14400
14401 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14402 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14403
14404 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14405
14406 * charset.c (struct charset_vector): New.
14407 (charsets): Change type to charset_vector.
14408 (find_charset_names): Adjust.
14409 (add_one): Adjust.
14410 (_initialize_charset): Adjust.
14411
14412 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14413
14414 * progspace.h (struct program_space) <deleted_solibs>: Change
14415 type to std::vector<std::string>.
14416 * progspace.c (clear_program_space_solib_cache): Adjust.
14417 * breakpoint.c (print_solib_event): Adjust.
14418 (check_status_catch_solib): Adjust.
14419 * solib.c (update_solib_list): Adjust.
14420 * ui-out.h (class ui_out) <field_string>: New overload.
14421 * ui-out.c (ui_out::field_string): New overload.
14422
14423 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14424
14425 * progspace.h (struct program_space): Add constructor and
14426 destructor, initialize fields.
14427 (add_program_space): Remove.
14428 * progspace.c (add_program_space): Rename to...
14429 (program_space::program_space): ... this.
14430 (release_program_space): Rename to...
14431 (program_space::~program_space): ... this.
14432 (delete_program_space): Use delete to delete program_space.
14433 (initialize_progspace): Use new to allocate program_space.
14434 * inferior.c (add_inferior_with_spaces): Likewise.
14435 (clone_inferior_command): Likewise.
14436 * infrun.c (follow_fork_inferior): Likewise.
14437 (handle_vfork_child_exec_or_exit): Likewise.
14438
14439 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14440
14441 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14442 (delim_string_to_char_ptr_vec): Return std::vector of
14443 gdb::unique_xmalloc_ptr.
14444 (dirnames_to_char_ptr_vec_append): Take std::vector of
14445 gdb::unique_xmalloc_ptr.
14446 (dirnames_to_char_ptr_vec): Return std::vector of
14447 gdb::unique_xmalloc_ptr.
14448 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14449 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14450 (delim_string_to_char_ptr_vec): Return an std::vector of
14451 gdb::unique_xmalloc_ptr, adjust the code.
14452 (dirnames_to_char_ptr_vec_append): Take an std::vector of
14453 gdb::unique_xmalloc_ptr, adjust the code.
14454 (dirnames_to_char_ptr_vec): Return an std::vector of
14455 gdb::unique_xmalloc_ptr, adjust the code.
14456 * auto-load.c (auto_load_safe_path_vec): Change type to
14457 std::vector of gdb::unique_xmalloc_ptr.
14458 (auto_load_expand_dir_vars): Return an std::vector of
14459 gdb::unique_xmalloc_ptr, adjust the code.
14460 (auto_load_safe_path_vec_update): Adjust.
14461 (filename_is_in_auto_load_safe_path_vec): Adjust.
14462 (auto_load_objfile_script_1): Adjust.
14463 * build-id.c (build_id_to_debug_bfd): Adjust.
14464 * linux-thread-db.c (thread_db_load_search): Adjust.
14465 * source.c (add_path): Adjust.
14466 (openp): Adjust.
14467 * symfile.c (find_separate_debug_file): Adjust.
14468 * utils.c (do_free_char_ptr_vec): Remove.
14469 (make_cleanup_free_char_ptr_vec): Remove.
14470
14471 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
14472
14473 PR gdb/22907
14474 * common/pathstuff.c: Conditionally include "<windows.h>".
14475
14476 2018-03-01 Georg Sauthoff <mail@georg.so>
14477
14478 PR gdb/22888
14479 * gcore.in: Quote variables and switch interpreter to bash.
14480
14481 2018-03-01 Tom Tromey <tom@tromey.com>
14482
14483 * dwarf2read.c (alloc_discriminant_info): Fix default_index
14484 assertion. Add assertion for discriminant_index.
14485 (quirk_rust_enum): Use correct base type name in univariant case.
14486
14487 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
14488
14489 * record.c (get_call_history_modifiers): Return a
14490 record_print_flags.
14491 (cmd_record_call_history): Adjust.
14492 * record-btrace.c (record_btrace_call_history): Adjust.
14493 (record_btrace_call_history_range): Adjust.
14494 (record_btrace_call_history_from): Adjust.
14495 * target-debug.h (target_debug_print_record_print_flags): New.
14496 * target-delegates.c: Re-generate.
14497 * target.c (target_call_history): Change flags type.
14498 (target_call_history_from): Likewise.
14499 (target_call_history_range): Likewise.
14500 * target.h (struct target_ops) <target_call_history>: Likewise.
14501 (target_call_history_from): Likewise.
14502 (target_call_history_range): Likewise.
14503
14504 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14505 Simon Marchi <simon.marchi@polymtl.ca>
14506
14507 * common/common-utils.c: Include "sys/stat.h".
14508 (is_regular_file): Move here from "source.c"; change return
14509 type to "bool".
14510 * common/common-utils.h (is_regular_file): New prototype.
14511 * common/pathstuff.c (contains_dir_separator): New function.
14512 * common/pathstuff.h (contains_dir_separator): New prototype.
14513 * source.c: Don't include "sys/stat.h".
14514 (is_regular_file): Move to "common/common-utils.c".
14515
14516 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14517
14518 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14519 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14520 * auto-load.c: Include "common/pathstuff.h".
14521 * common/common-def.h (current_directory): Move here.
14522 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14523 function.
14524 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14525 prototype.
14526 * common/pathstuff.c: New file.
14527 * common/pathstuff.h: New file.
14528 * compile/compile.c: Include "common/pathstuff.h".
14529 * defs.h (current_directory): Move to "common/common-defs.h".
14530 * dwarf2read.c: Include "common/pathstuff.h".
14531 * exec.c: Likewise.
14532 * guile/scm-safe-call.c: Likewise.
14533 * linux-thread-db.c: Likewise.
14534 * main.c: Likewise.
14535 * nto-tdep.c: Likewise.
14536 * objfiles.c: Likewise.
14537 * source.c: Likewise.
14538 * symtab.c: Likewise.
14539 * utils.c: Include "common/pathstuff.h".
14540 (gdb_realpath): Move to "common/pathstuff.c".
14541 (gdb_realpath_keepfile): Likewise.
14542 (gdb_abspath): Likewise.
14543 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14544 (gdb_realpath_keepfile): Likewise.
14545 (gdb_abspath): Likewise.
14546
14547 2018-02-28 John Baldwin <jhb@FreeBSD.org>
14548
14549 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14550 wildcard process pid for super_resume for kernels with a
14551 specific bug.
14552
14553 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
14554
14555 * compile/compile.c (get_args): Add additional comments
14556 explaining function.
14557
14558 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
14559 Tom Tromey <tom@tromey.com>
14560
14561 * target.h (memory_write_request_s): Remove typedef. Don't define
14562 VEC.
14563 (target_write_memory_blocks): Change argument to std::vector.
14564 (struct memory_write_request): Add constructor.
14565 * target-memory.c (compare_block_starting_address): Return bool.
14566 Change argument types.
14567 (claim_memory): Change arguments to use std::vector.
14568 (split_regular_and_flash_blocks, blocks_to_erase)
14569 (compute_garbled_blocks): Likewise.
14570 (cleanup_request_data, cleanup_write_requests_vector): Remove.
14571 (target_write_memory_blocks): Change argument to std::vector.
14572 * symfile.c (struct load_section_data): Add constructor and
14573 destructor. Use std::vector for "requests".
14574 (struct load_progress_data): Add initializers.
14575 (load_section_callback): Update. Use "new".
14576 (clear_memory_write_data): Remove.
14577 (generic_load): Update.
14578
14579 2018-02-27 Alan Hayward <alan.hayward@arm.com>
14580
14581 * arch/aarch64.h: Use common/tdesc.h.
14582
14583 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14584
14585 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14586 architecture with a 64-bit ABI.
14587
14588 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14589
14590 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14591 ahead of target description loading.
14592
14593 2018-02-26 Tom Tromey <tom@tromey.com>
14594
14595 * stack.c (backtrace_command_1): Update.
14596 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14597 of "flags".
14598 * python/py-framefilter.c (py_print_frame)
14599 (gdbpy_apply_frame_filter): Change type of "flags".
14600 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14601 of "flags".
14602 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14603 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14604 * extension.h (enum frame_filter_flag): Rename from
14605 frame_filter_flags.
14606 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14607 (apply_ext_lang_frame_filter): Change type of "flags".
14608 * extension.c (apply_ext_lang_frame_filter): Change type of
14609 "flags".
14610 * extension-priv.h (struct extension_language_ops)
14611 <apply_frame_filter>: Change type of "flags".
14612
14613 2018-02-26 Tom Tromey <tom@tromey.com>
14614
14615 PR python/16497:
14616 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
14617 off-by-one in py_end computation.
14618 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14619 PRINT_MORE_FRAMES.
14620 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14621 constant.
14622
14623 2018-02-26 Tom Tromey <tom@tromey.com>
14624
14625 * dwarf2read.c (struct variant_field): New.
14626 (struct nextfield) <variant>: New field.
14627 (dwarf2_add_field): Handle DW_TAG_variant_part.
14628 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14629 discriminated union.
14630 (read_structure_type): Handle DW_TAG_variant_part.
14631 (handle_struct_member_die): New function, extracted from
14632 process_structure_scope. Handle DW_TAG_variant.
14633 (process_structure_scope): Handle discriminated unions. Call
14634 handle_struct_member_die.
14635
14636 2018-02-26 Tom Tromey <tom@tromey.com>
14637
14638 * rust-lang.h (rust_last_path_segment): Declare.
14639 * rust-lang.c (rust_last_path_segment): Now public. Change
14640 contract.
14641 (struct disr_info): Remove.
14642 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14643 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14644 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14645 (rust_enum_p, rust_enum_variant): New function.
14646 (rust_underscore_fields): Remove "offset" parameter.
14647 (rust_print_enum): New function.
14648 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14649 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14650 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
14651 enums.
14652 (rust_internal_print_type): New function, from rust_print_type.
14653 Remove enum code.
14654 (rust_print_type): Call rust_internal_print_type.
14655 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14656 Update enum handling.
14657 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14658 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14659 (rust_union_quirks): New functions.
14660 (process_full_comp_unit, process_full_type_unit): Call
14661 rust_union_quirks.
14662 (process_structure_scope): Update rust_unions if necessary.
14663
14664 2018-02-26 Tom Tromey <tom@tromey.com>
14665
14666 * value.h (value_union_variant): Declare.
14667 * valops.c (value_union_variant): New function.
14668 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14669 (struct discriminant_info): New.
14670 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14671 enumerator.
14672 (struct main_type) <flag_discriminated_union>: New field.
14673
14674 2018-02-26 Tom Tromey <tom@tromey.com>
14675
14676 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14677 unittests/unpack-selftests.c.
14678 * unittests/unpack-selftests.c: New file.
14679 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14680
14681 2018-02-26 Yao Qi <yao.qi@linaro.org>
14682
14683 * dwarf2read.c (struct partial_die_info) <read>: New method.
14684 (read_partial_die): Remove the declaration.
14685 (load_partial_dies): Update.
14686 (partial_die_info::partial_die_info):
14687 (read_partial_die): Change it to partial_die_info::read.
14688
14689 2018-02-26 Yao Qi <yao.qi@linaro.org>
14690
14691 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14692 (fixup_partial_die): Remove declaration.
14693 (scan_partial_symbols): Update.
14694 (partial_die_parent_scope): Likewise.
14695 (partial_die_full_name): Likewise.
14696 (fixup_partial_die): Change it to partial_die_info::fixup.
14697
14698 2018-02-26 Yao Qi <yao.qi@linaro.org>
14699
14700 * dwarf2read.c (read_partial_die): Update the declaration.
14701 (load_partial_dies): Caller update.
14702 (read_partial_die): Remove one argument abbrev_len.
14703
14704 2018-02-26 Yao Qi <yao.qi@linaro.org>
14705
14706 * dwarf2read.c (struct partial_die_info): Add ctor, delete
14707 assignment operator.
14708 (load_partial_dies): Use ctor and copy ctor.
14709 (read_partial_die): Update.
14710 (dwarf2_cu::find_partial_die): Use ctor.
14711
14712 2018-02-26 Yao Qi <yao.qi@linaro.org>
14713
14714 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14715 (find_partial_die_in_comp_unit): Change it to
14716 dwarf2_cu::find_partial_die.
14717 (find_partial_die): Update.
14718
14719 2018-02-26 Yao Qi <yao.qi@linaro.org>
14720
14721 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14722 is NULL.
14723
14724 2018-02-26 Yao Qi <yao.qi@linaro.org>
14725
14726 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14727
14728 2018-02-26 Alan Hayward <alan.hayward@arm.com>
14729
14730 * arch/amd64.h: Use common/tdesc.h.
14731 * arch/i386.c: Likewise.
14732 * arch/i386.h: Likewise.
14733 * arch/tic6x.c: Likewise.
14734 * arch/tdesc.h: Move file from here...
14735 * common/tdesc.h: ...to here.
14736 * features/aarch64-core.c: Regenerate.
14737 * features/aarch64-fpu.c: Regenerate.
14738 * features/i386/32bit-avx.c: Regenerate.
14739 * features/i386/32bit-avx512.c: Regenerate.
14740 * features/i386/32bit-core.c: Regenerate.
14741 * features/i386/32bit-linux.c: Regenerate.
14742 * features/i386/32bit-mpx.c: Regenerate.
14743 * features/i386/32bit-pkeys.c: Regenerate.
14744 * features/i386/32bit-sse.c: Regenerate.
14745 * features/i386/64bit-avx.c: Regenerate.
14746 * features/i386/64bit-avx512.c: Regenerate.
14747 * features/i386/64bit-core.c: Regenerate.
14748 * features/i386/64bit-linux.c: Regenerate.
14749 * features/i386/64bit-mpx.c: Regenerate.
14750 * features/i386/64bit-pkeys.c: Regenerate.
14751 * features/i386/64bit-segments.c: Regenerate.
14752 * features/i386/64bit-sse.c: Regenerate.
14753 * features/i386/x32-core.c: Regenerate.
14754 * features/tic6x-c6xp.c: Regenerate.
14755 * features/tic6x-core.c: Regenerate.
14756 * features/tic6x-gp.c: Regenerate.
14757 * target-descriptions.c: Use common/tdesc.h.
14758 * target-descriptions.h: Likewise.
14759
14760 2018-02-24 Tom Tromey <tom@tromey.com>
14761
14762 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14763 (try_thread_db_load_from_dir, thread_db_load_search): Use
14764 std::string.
14765 (info_auto_load_libthread_db_compare): Return bool. Change
14766 argument types.
14767 (info_auto_load_libthread_db): Use std::vector, std::string.
14768 Remove cleanups.
14769
14770 2018-02-24 Tom Tromey <tom@tromey.com>
14771
14772 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14773 std::string.
14774 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14775 std::string*.
14776 * gdbarch.c: Rebuild.
14777 * gdbarch.h: Rebuild.
14778 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14779 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14780 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14781 std::string*.
14782
14783 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
14784
14785 * gdbtypes.h (sect_offset): Change type to uint64_t.
14786 (sect_offset_str): New function.
14787 * dwarf2read.c (create_addrmap_from_aranges): Use
14788 sect_offset_str.
14789 (error_check_comp_unit_head): Likewise.
14790 (create_debug_type_hash_table): Likewise.
14791 (read_cutu_die_from_dwo): Likewise.
14792 (init_cutu_and_read_dies): Likewise.
14793 (init_cutu_and_read_dies_no_follow): Likewise.
14794 (process_psymtab_comp_unit_reader): Likewise.
14795 (partial_die_parent_scope): Likewise.
14796 (peek_die_abbrev): Likewise.
14797 (process_queue): Likewise.
14798 (dwarf2_physname): Likewise.
14799 (read_namespace_alias): Likewise.
14800 (read_import_statement): Likewise.
14801 (create_dwo_cu_reader): Likewise.
14802 (create_cus_hash_table): Likewise.
14803 (lookup_dwo_cutu): Likewise.
14804 (inherit_abstract_dies): Likewise.
14805 (read_func_scope): Likewise.
14806 (read_call_site_scope): Likewise.
14807 (dwarf2_add_member_fn): Likewise.
14808 (read_common_block): Likewise.
14809 (read_module_type): Likewise.
14810 (read_typedef): Likewise.
14811 (read_subrange_type): Likewise.
14812 (load_partial_dies): Likewise.
14813 (read_partial_die): Likewise.
14814 (find_partial_die): Likewise.
14815 (read_str_index): Likewise.
14816 (dwarf2_string_attr): Likewise.
14817 (build_error_marker_type): Likewise.
14818 (lookup_die_type): Likewise.
14819 (dump_die_shallow): Likewise.
14820 (follow_die_ref): Likewise.
14821 (dwarf2_fetch_die_loc_sect_off): Likewise.
14822 (dwarf2_fetch_constant_bytes): Likewise.
14823 (follow_die_sig): Likewise.
14824 (get_signatured_type): Likewise.
14825 (get_DW_AT_signature_type): Likewise.
14826 (dwarf2_find_containing_comp_unit): Likewise.
14827 (set_die_type): Likewise.
14828
14829 2018-02-21 John Baldwin <jhb@FreeBSD.org>
14830
14831 * arch/aarch64.c: Include "common-defs.h".
14832 * arch/amd64.c: Likewise.
14833 * arch/i386.c: Likewise.
14834
14835 2018-02-21 Tom Tromey <tom@tromey.com>
14836
14837 * value.h: (extract_field_op): Update.
14838 * eval.c (extract_field_op): Return a const char *.
14839 * expression.h (parse_expression_for_completion): Update.
14840 * completer.c (complete_expression): Update.
14841 (add_struct_fields): Make fieldname const.
14842 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14843 (mark_completion_tag, parse_exp_in_context_1): Update.
14844 (parse_expression_for_completion): Change "name" to
14845 unique_xmalloc_ptr*.
14846
14847 2018-02-21 Tom Tromey <tom@tromey.com>
14848
14849 * infcall.c (call_function_by_hand_dummy): Use std::vector.
14850
14851 2018-02-21 Yao Qi <yao.qi@linaro.org>
14852
14853 * avr-tdep.c (avr_read_pc): Change parameter type to
14854 readable_regcache.
14855 * gdbarch.sh (read_pc): Likewise.
14856 * gdbarch.c: Re-generated.
14857 * gdbarch.h: Re-generated.
14858 * hppa-tdep.c (hppa_read_pc): Change parameter type to
14859 readable_regcache.
14860 * ia64-tdep.c (ia64_read_pc): Likewise.
14861 * mips-tdep.c (mips_read_pc): Likewise.
14862 * spu-tdep.c (spu_read_pc): Likewise.
14863
14864 2018-02-21 Yao Qi <yao.qi@linaro.org>
14865
14866 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14867 * regcache-dump.c: New file.
14868 * regcache.c: Move register_dump to regcache-dump.c.
14869 (maintenance_print_registers): Likewise.
14870 (maintenance_print_raw_registers): Likewise.
14871 (maintenance_print_cooked_registers): Likewise.
14872 (maintenance_print_register_groups): Likewise.
14873 (maintenance_print_remote_registers): Likewise.
14874 (_initialize_regcache): Likewise.
14875 * regcache.h (register_dump): Moved from regcache.c.
14876
14877 2018-02-21 Yao Qi <yao.qi@linaro.org>
14878
14879 * regcache.c (regcache::regcache): Update.
14880 (regcache::invalidate): Move it to detached_regcache::invalidate.
14881 (get_thread_arch_aspace_regcache): Update.
14882 (regcache::raw_update): Update.
14883 (regcache::cooked_read): Remove some code.
14884 (regcache::cooked_read_value): Likewise.
14885 (regcache::raw_write): Remove assert on m_readonly_p.
14886 (regcache::raw_supply_integer): Move it to
14887 detached_regcache::raw_supply_integer.
14888 (regcache::raw_supply_zeroed): Likewise.
14889 * regcache.h (detached_regcache) <raw_supply_integer>: New
14890 declaration.
14891 <raw_supply_zeroed, invalidate>: Likewise.
14892 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14893 <invalidate>: Likewise.
14894 <m_readonly_p>: Removed.
14895
14896 2018-02-21 Yao Qi <yao.qi@linaro.org>
14897
14898 * infcmd.c (get_return_value): Let stop_regs point to
14899 get_current_regcache.
14900 * regcache.c (regcache::regcache): Remove.
14901 (register_dump_reg_buffer): New class.
14902 (regcache_print): Adjust.
14903 * regcache.h (regcache): Remove constructors.
14904
14905 2018-02-21 Yao Qi <yao.qi@linaro.org>
14906
14907 * regcache.c (class register_dump): New class.
14908 (register_dump_regcache, register_dump_none): New class.
14909 (register_dump_remote, register_dump_groups): New class.
14910 (regcache_print): Update.
14911 * regcache.h (regcache_dump_what): Move it to regcache.c.
14912 (regcache) <dump>: Remove.
14913
14914 2018-02-21 Yao Qi <yao.qi@linaro.org>
14915
14916 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14917 reg_buffer_rw *.
14918 (jit_unwind_reg_set_impl): Call raw_supply.
14919 (jit_frame_sniffer): Use reg_buffer_rw.
14920 * record-full.c (record_full_core_regbuf): Change its type.
14921 (record_full_core_open_1): Use reg_buffer_rw.
14922 (record_full_close): Likewise.
14923 (record_full_core_fetch_registers): Use regcache->raw_supply.
14924 (record_full_core_store_registers): Likewise.
14925 * regcache.c (regcache::get_register_status): Move it to
14926 reg_buffer.
14927 (regcache_raw_set_cached_value): Remove.
14928 (regcache::raw_set_cached_value): Remove.
14929 (regcache::raw_write): Call raw_supply.
14930 (regcache::raw_supply): Move it to reg_buffer_rw.
14931 * regcache.h (regcache_raw_set_cached_value): Remove.
14932 (reg_buffer_rw): New class.
14933
14934 2018-02-21 Yao Qi <yao.qi@linaro.org>
14935
14936 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14937 readonly_detached_regcache.
14938 (dummy_frame_prev_register): Use regcache->cooked_read.
14939 * frame.c (frame_save_as_regcache): Change return type.
14940 (frame_pop): Update.
14941 * frame.h (frame_save_as_regcache): Update declaration.
14942 * inferior.h (get_infcall_suspend_state_regcache): Update
14943 declaration.
14944 * infrun.c (infcall_suspend_state) <registers>: use
14945 readonly_detached_regcache.
14946 (save_infcall_suspend_state): Don't use regcache_dup.
14947 (get_infcall_suspend_state_regcache): Change return type.
14948 * linux-fork.c (struct fork_info) <savedregs>: Change to
14949 readonly_detached_regcache.
14950 <pc>: New field.
14951 (fork_save_infrun_state): Don't use regcache_dup.
14952 (info_checkpoints_command): Adjust.
14953 * mi/mi-main.c (register_changed_p): Update declaration.
14954 (mi_cmd_data_list_changed_registers): Use
14955 readonly_detached_regcache.
14956 (register_changed_p): Change parameter type to
14957 readonly_detached_regcache.
14958 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14959 readonly_detached_regcache.
14960 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14961 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14962 New.
14963 (regcache::save): Move it to reg_buffer.
14964 (regcache::restore): Change parameter type.
14965 (regcache_dup): Remove.
14966 * regcache.h (reg_buffer) <save>: New method.
14967 (readonly_detached_regcache): New class.
14968 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14969 readonly_detached_regcache.
14970 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14971
14972 2018-02-21 Yao Qi <yao.qi@linaro.org>
14973
14974 * frame.c (frame_save_as_regcache): Use regcache method save.
14975 (frame_pop): Use regcache method restore.
14976 * infrun.c (restore_infcall_suspend_state): Likewise.
14977 * linux-fork.c (fork_load_infrun_state): Likewise.
14978 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14979 save.
14980 * regcache.c (regcache_save): Remove.
14981 (regcache::restore): More asserts.
14982 (regcache_cpy): Remove.
14983 * regcache.h (regcache_save): Remove the declaration.
14984 (regcache::restore): Move from private to public.
14985 Remove the friend declaration of regcache_cpy.
14986 (regcache_cpy): Remove declaration.
14987
14988 2018-02-21 Yao Qi <yao.qi@linaro.org>
14989
14990 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14991 parameter type to 'readable_regcache *'.
14992 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14993 * arm-tdep.c (arm_neon_quad_read): Likewise.
14994 (arm_pseudo_read): Likewise.
14995 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14996 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14997 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14998 * gdbarch.c: Re-generated.
14999 * gdbarch.h: Re-generated.
15000 * gdbarch.sh (pseudo_register_read): Change parameter type to
15001 'readable_regcache *'.
15002 (pseudo_register_read_value): Likewise.
15003 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
15004 (h8300_pseudo_register_read): Likewise.
15005 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
15006 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15007 (i386_pseudo_register_read_into_value): Likewise.
15008 (i386_pseudo_register_read_value): Likewise.
15009 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
15010 declaration.
15011 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
15012 * m32c-tdep.c (m32c_raw_read): Likewise.
15013 (m32c_read_flg): Likewise.
15014 (m32c_banked_register): Likewise.
15015 (m32c_banked_read): Likewise.
15016 (m32c_sb_read): Likewise.
15017 (m32c_part_read): Likewise.
15018 (m32c_cat_read): Likewise.
15019 (m32c_r3r2r1r0_read): Likewise.
15020 (m32c_pseudo_register_read): Likewise.
15021 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15022 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15023 (mep_pseudo_cr64_read): Likewise.
15024 (mep_pseudo_register_read): Likewise.
15025 * mips-tdep.c (mips_pseudo_register_read): Likewise.
15026 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15027 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15028 * regcache.c (regcache::raw_read): Move it to readable_regcache.
15029 (regcache::cooked_read): Likewise.
15030 (regcache::cooked_read_value): Likewise.
15031 (regcache_cooked_read_signed):
15032 (regcache::cooked_read): Likewise.
15033 * regcache.h (readable_regcache): New class.
15034 (regcache): Inherit readable_regcache. Move some methods to
15035 readable_regcache.
15036 * rl78-tdep.c (rl78_pseudo_register_read): Change
15037 parameter type to 'readable_regcache *'.
15038 * rs6000-tdep.c (do_regcache_raw_read): Remove.
15039 (e500_pseudo_register_read): Change parameter type to
15040 'readable_regcache *'.
15041 (dfp_pseudo_register_read): Likewise.
15042 (vsx_pseudo_register_read): Likewise.
15043 (efpr_pseudo_register_read): Likewise.
15044 * s390-tdep.c (s390_pseudo_register_read): Likewise.
15045 * sh-tdep.c (sh_pseudo_register_read): Likewise.
15046 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
15047 (sh64_pseudo_register_read): Likewise.
15048 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15049 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15050 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15051 (spu_pseudo_register_read): Likewise.
15052 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15053 (xtensa_pseudo_register_read): Likewise.
15054
15055 2018-02-21 Yao Qi <yao.qi@linaro.org>
15056
15057 * regcache.c (regcache::regcache): Call reg_buffer ctor.
15058 (regcache::arch): Move it to reg_buffer::arch.
15059 (regcache::register_buffer): Likewise.
15060 (regcache::assert_regnum): Likewise.
15061 (regcache::num_raw_registers): Likewise.
15062 * regcache.h (reg_buffer): New class.
15063 (regcache): Inherit reg_buffer.
15064
15065 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
15066
15067 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
15068 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
15069
15070 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
15071
15072 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
15073
15074 2018-02-19 Alan Hayward <alan.hayward@arm.com>
15075
15076 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15077 (SFILES): Remove common/*.c files.
15078 (COMMON_OBS): Remove some *.o files built from common/*.c files.
15079 * common/common.host: Add common reference.
15080 * configure.ac: Likewise.
15081 * configure: Regenerate.
15082
15083 2018-02-16 Yao Qi <yao.qi@linaro.org>
15084
15085 * block.c (block_namespace_info): Inherit allocate_on_obstack.
15086 (block_initialize_namespace): Use new.
15087 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15088 (dwarf2_free_objfile): Use delete.
15089 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15090 (copy_type_recursive): Use new.
15091 * gdb_obstack.h (allocate_on_obstack): New.
15092
15093 2018-02-15 Yao Qi <yao.qi@linaro.org>
15094
15095 PR gdb/22849
15096 * inferior.c (exit_inferior_1): Reset inf->control.
15097
15098 2018-02-15 Joel Brobecker <brobecker@adacore.com>
15099
15100 * ada-lang.c (ada_to_fixed_value_create): Delete advance
15101 declaration.
15102
15103 2018-02-14 Pedro Alves <palves@redhat.com>
15104
15105 * frame-unwind.c (frame_unwind_try_unwinder): Always call
15106 frame_cleanup_after_sniffer on exception.
15107
15108 2018-02-14 Tom Tromey <tom@tromey.com>
15109
15110 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15111 const.
15112 (solib_bfd_open): Make pathname const.
15113 * solib.c (solib_bfd_open): Make pathname const.
15114 * solib-spu.c (spu_bfd_fopen): Make name const.
15115 (spu_bfd_open): Make pathname const.
15116 * solib-darwin.c (darwin_bfd_open): Make pathname const.
15117 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15118
15119 2018-02-14 Tom Tromey <tom@tromey.com>
15120
15121 * symfile.c (symfile_bfd_open): Update.
15122 * source.h (openp, source_full_path_of, find_and_open_source):
15123 Change argument type to unique_xmalloc_ptr.
15124 * source.c (openp): Take a unique_xmalloc_ptr.
15125 (source_full_path_of, find_and_open_source): Likewise.
15126 (open_source_file, symtab_to_fullname): Update.
15127 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15128 unique_xmalloc_ptr.
15129 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15130 (exec_file_find): Update.
15131 * psymtab.c (psymtab_to_fullname): Update.
15132 * nto-tdep.h (nto_find_and_open_solib): Update.
15133 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15134 unique_xmalloc_ptr.
15135 * exec.c (exec_file_attach): Update.
15136 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15137 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15138
15139 2018-02-14 Tom Tromey <tom@tromey.com>
15140
15141 * solib.c: Include source.h.
15142 * nto-tdep.c: Include source.h.
15143 * mi/mi-cmd-env.c: Include source.h.
15144 * infcmd.c: Include source.h.
15145 * exec.c: Include source.h.
15146 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15147 (add_path, directory_switch, source_path, init_source_path): Move
15148 declarations...
15149 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15150 (add_path, directory_switch, source_path, init_source_path):
15151 ...here.
15152
15153 2018-02-14 Tom Tromey <tom@tromey.com>
15154
15155 * solist.h (exec_file_find, solib_find): Return
15156 unique_xmalloc_ptr.
15157 (solib_bfd_fopen): Take a const char *.
15158 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15159 (exec_file_find, solib_find): Likewise.
15160 (solib_bfd_fopen): Do not take ownership of "pathname".
15161 (solib_bfd_open): Use unique_xmalloc_ptr.
15162 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15163 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15164 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15165 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15166
15167 2018-02-14 Joel Brobecker <brobecker@adacore.com>
15168
15169 * ada-lang.c (name_match_type_from_name): Remove reference to
15170 ada_name_for_lookup in function's documentation.
15171 * ada-lang.h (ada_name_for_lookup): Delete declaration.
15172
15173 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15174
15175 * defs.h (enum openp_flags): New enum.
15176 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15177 Move to enum openp_flags.
15178 (openp_flags): New enum flags.
15179 (openp): Change parameter type to openp_flags.
15180 * source.c (openp): Change parameter type to openp_flags.
15181 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15182 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15183
15184 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15185
15186 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15187 per-command.
15188
15189 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
15190
15191 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15192 into...
15193 (class dwarf2_queue_guard): ...the destructor of this new class.
15194 (dw2_do_instantiate_symtab): Create instance of the new class
15195 dwarf2_queue_guard, remove cleanup.
15196
15197 2018-02-09 Tom Tromey <tom@tromey.com>
15198
15199 * source.c (find_source_lines): Don't reference past the end of
15200 the vector.
15201
15202 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15203
15204 * remote.c (remote_btrace_maybe_reopen): Change error message.
15205 * btrace.c (btrace_enable): Likewise.
15206 (parse_xml_btrace): Likewise.
15207 (parse_xml_btrace_conf): Likewise.
15208
15209 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15210
15211 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15212 (linux_enable_pt, linux_enable_bts): Call
15213 diagnose_perf_event_open_fail.
15214
15215 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15216
15217 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15218 Remove parameter and change return type. Update callers. Move it.
15219 (linux_enable_bts, linux_enable_pt): Improve error message.
15220 (linux_enable_pt): Remove zero buffer size check.
15221 (linux_enable_btrace): Improve error messages. Remove NULL return
15222 check.
15223
15224 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15225
15226 * btrace.c (btrace_enable): Remove target_supports_btrace call.
15227 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15228 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15229 (linux_supports_pt, linux_supports_btrace): Remove.
15230 (linux_enable_bts): Call cpu_supports_bts.
15231 * nat/linux-btrace.h (linux_supports_btrace): Remove.
15232 * remote.c (remote_supports_btrace): Remove.
15233 (init_remote_ops): Remove remote_supports_btrace.
15234 * target-delegates.c: Regenerated.
15235 * target.c (target_supports_btrace): Remove.
15236 * target.h (target_ops) <to_supports_btrace>: Remove
15237 (target_supports_btrace): Remove.
15238 * x86-linux-nat.c (x86_linux_create_target): Remove
15239 linux_supports_btrace.
15240
15241 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15242
15243 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15244 btrace failed.
15245 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15246 exception and use message in own exception.
15247
15248 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15249
15250 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15251 (perf_event_pt_event_type): Use gdb_file_up.
15252 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15253 scoped_fd, and scoped_mmap.
15254
15255 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15256
15257 * common/scoped_mmap.h: New.
15258 * unittests/scoped_mmap-selftest.c: New.
15259 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15260 unittests/scoped_mmap-selftest.c.
15261
15262 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15263
15264 * common/scoped_fd.h: New.
15265 * unittests/scoped_fd-selftest.c: New.
15266 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15267 unittests/scoped_fd-selftest.c.
15268
15269 2018-02-09 Tom Tromey <tom@tromey.com>
15270
15271 * auto-load.c (auto_load_section_scripts): Use
15272 gdb::unique_xmalloc_ptr.
15273
15274 2018-02-09 Tom Tromey <tom@tromey.com>
15275
15276 * auto-load.c (execute_script_contents): Use std::string.
15277
15278 2018-02-09 Joel Brobecker <brobecker@adacore.com>
15279
15280 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15281 Python function, rather than a new command.
15282
15283 2018-02-08 Tom Tromey <tom@tromey.com>
15284
15285 * solib.c (solib_find_1): Use std::string.
15286 (solib_bfd_fopen): Use unique_xmalloc_ptr.
15287
15288 2018-02-08 Tom Tromey <tom@tromey.com>
15289
15290 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15291
15292 2018-02-08 Tom Tromey <tom@tromey.com>
15293
15294 * source.c (find_source_lines): Use gdb::def_vector.
15295
15296 2018-02-08 Tom Tromey <tom@tromey.com>
15297
15298 * macrocmd.c (struct temporary_macro_definition): New.
15299 (macro_define_command): Use temporary_macro_definition. Remove
15300 cleanups.
15301 (free_macro_definition_ptr): Remove.
15302
15303 2018-02-08 Tom Tromey <tom@tromey.com>
15304
15305 * macroexp.c (maybe_expand): Use std::string.
15306
15307 2018-02-08 Tom Tromey <tom@tromey.com>
15308
15309 * macroexp.c (struct macro_buffer): Add initializers for some
15310 members.
15311 (init_buffer, init_shared_buffer, free_buffer)
15312 (free_buffer_return_text): Remove.
15313 (macro_buffer): New constructors.
15314 (~macro_buffer): New destructor.
15315 (macro_buffer::set_shared): New method.
15316 (macro_buffer::resize_buffer, macro_buffer::appendc)
15317 (macro_buffer::appendmem): Now methods, not free functions.
15318 (set_token, append_tokens_without_splicing, stringify)
15319 (macro_stringify): Update.
15320 (gather_arguments): Change return type. Remove argc_p argument,
15321 add args_ptr argument. Use std::vector.
15322 (substitute_args): Remove argc argument. Accept std::vector.
15323 (expand): Update. Use std::vector.
15324 (scan, macro_expand, macro_expand_next): Update.
15325
15326 2018-02-08 Tom Tromey <tom@tromey.com>
15327
15328 * symtab.c (default_collect_symbol_completion_matches_break_on):
15329 Use unique_xmalloc_ptr.
15330 * macroscope.h: (sal_macro_scope, user_macro_scope)
15331 (default_macro_scope): Return unique_xmalloc_ptr.
15332 * macroscope.c (sal_macro_scope, user_macro_scope)
15333 (default_macro_scope): Return unique_xmalloc_ptr.
15334 * macroexp.h (macro_expand, macro_expand_once): Return
15335 unique_xmalloc_ptr.
15336 * macroexp.c (macro_expand, macro_expand_once): Return
15337 unique_xmalloc_ptr.
15338 * macrocmd.c (macro_expand_command, macro_expand_once_command)
15339 (info_macro_command, info_macros_command): Use
15340 unique_xmalloc_ptr.
15341 * compile/compile-c-support.c (write_macro_definitions): Use
15342 unique_xmalloc_ptr.
15343 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15344
15345 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
15346
15347 * value.c (value_static_field): Assign field type instead of
15348 containing type when returning an optimized out value.
15349
15350 2018-02-06 Yao Qi <yao.qi@linaro.org>
15351
15352 * ft32-tdep.c (ft32_read_pc): Remove.
15353 (ft32_write_pc): Remove.
15354 (ft32_gdbarch_init): Update.
15355 * m32r-tdep.c (m32r_read_pc): Remove.
15356 (m32r_gdbarch_init): Update.
15357 * mep-tdep.c (mep_read_pc): Remove.
15358 (mep_gdbarch_init): Update.
15359 * microblaze-tdep.c (microblaze_write_pc): Remove.
15360 (microblaze_gdbarch_init): Update.
15361 * mn10300-tdep.c (mn10300_read_pc): Remove.
15362 (mn10300_write_pc): Remove.
15363 (mn10300_gdbarch_init): Update.
15364 * moxie-tdep.c (moxie_read_pc): Remove.
15365 (moxie_write_pc): Remove.
15366 (moxie_gdbarch_init): Update.
15367
15368 2018-02-06 Yao Qi <yao.qi@linaro.org>
15369
15370 * expprint.c (print_subexp_standard): Handle
15371 OP_F77_UNDETERMINED_ARGLIST.
15372 (dump_subexp_body_standard): Likewise.
15373
15374 2018-02-05 Alan Hayward <alan.hayward@arm.com>
15375
15376 * target-descriptions.c (tdesc_element_visitor) Add empty
15377 implementations.
15378 (tdesc_type): Move make_gdb_type from here.
15379 (tdesc_type_builtin): Likewise.
15380 (tdesc_type_vector): Likewise.
15381 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15382 (make_gdb_type_struct): Move from tdesc_type_with_fields.
15383 (make_gdb_type_union): Likewise.
15384 (make_gdb_type_flags): Likewise.
15385 (make_gdb_type_enum): Likewise.
15386 (make_gdb_type): New function.
15387 (tdesc_register_type): Use static make_gdb_type.
15388
15389 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
15390
15391 * infcmd.c (default_print_one_register_info): Align natural-format
15392 column values consistently one under another.
15393 (pad_to_column): New function.
15394
15395 2018-02-05 Joel Brobecker <brobecker@adacore.com>
15396
15397 * dwarf2read.c (dwarf2_physname): Move commment.
15398
15399 2018-02-01 Leszek Swirski <leszeks@google.com>
15400
15401 * varobj.c (varobj_formatted_print_options): Allow recursive
15402 pretty printing if pretty printing is enabled.
15403
15404 2018-02-01 Leszek Swirski <leszeks@google.com>
15405
15406 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15407 names after a structop as a filename.
15408
15409 2018-02-01 Yao Qi <yao.qi@linaro.org>
15410
15411 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15412 (arm_record_coproc_data_proc): Likewise.
15413
15414 2018-02-01 Yao Qi <yao.qi@linaro.org>
15415
15416 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15417
15418 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
15419
15420 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15421 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15422
15423 2018-01-31 Pedro Alves <palves@redhat.com>
15424
15425 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15426 * inflow.c (child_terminal_save_inferior): Wrap reference to
15427 tcgetpgrp in HAVE_TERMIOS_H.
15428 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15429 _WIN32.
15430 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15431 always iterate over all inferiors.
15432 (gdbsim_cntrl_c): Adjust.
15433 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15434
15435 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15436
15437 * gdbtypes.c (lookup_array_range_type): Make sure the array's
15438 index type is objfile-owned if the element type is as well.
15439
15440 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15441
15442 GDB 8.1 released.
15443
15444 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
15445
15446 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15447 "features/s390x-linux64.c".
15448 (_initialize_s390_linux_tdep): Remove initialization of tdescs
15449 s390_linux32 and s390x_linux64.
15450 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15451 default tdesc.
15452 * s390-tdep.c: Include "features/s390-linux32.c" and
15453 "features/s390x-linux64.c".
15454 (s390_tdesc_valid): Add check for tdesc_has_registers.
15455 (s390_gdbarch_init): Make sure there is always a valid tdesc.
15456 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15457 tdesc_s390x_linux64.
15458 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15459 tdesc_s390x_linux64 to...
15460 * s390-tdep.h: ...here.
15461
15462 2018-01-30 Pedro Alves <palves@redhat.com>
15463
15464 PR gdb/13211
15465 * config.in, configure: Regenerate.
15466 * configure.ac: Check for getpgid.
15467 * go32-nat.c (go32_pass_ctrlc): New.
15468 (go32_target): Install it.
15469 * inf-child.c (inf_child_target): Install
15470 child_terminal_save_inferior, child_pass_ctrlc and
15471 child_interrupt.
15472 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15473 (inf_ptrace_target): No longer install it.
15474 * infcmd.c (interrupt_target_1): Adjust.
15475 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15476 (child_interrupt): Declare.
15477 (inferior::terminal_state): New.
15478 * inflow.c (struct terminal_info): Update comments.
15479 (inferior_process_group): Delete.
15480 (terminal_is_ours): Delete.
15481 (gdb_tty_state): New.
15482 (child_terminal_init): Adjust.
15483 (is_gdb_terminal, sharing_input_terminal_1)
15484 (sharing_input_terminal): New functions.
15485 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
15486 Set the process's actual process group in the foreground if
15487 possible. Handle is_ours_for_output/is_ours distinction. Don't
15488 mark terminal as the inferior's if not sharing GDB's terminal.
15489 Don't check attach_flag.
15490 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15491 pass down a target_terminal_state.
15492 (child_terminal_save_inferior): New, factored out from ...
15493 (child_terminal_ours_1): ... this. Handle
15494 target_terminal_state::is_ours_for_output.
15495 (child_interrupt, child_pass_ctrlc): New.
15496 (inflow_inferior_exit): Clear the inferior's terminal_state.
15497 (copy_terminal_info): Copy the inferior's terminal state.
15498 (_initialize_inflow): Remove reference to terminal_is_ours.
15499 * inflow.h (inferior_process_group): Delete.
15500 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15501 * procfs.c (procfs_target): Don't install procfs_interrupt.
15502 (procfs_interrupt): Delete.
15503 * remote.c (remote_serial_quit_handler): Adjust.
15504 (remote_interrupt): Remove ptid parameter. Adjust.
15505 * target-delegates.c: Regenerate.
15506 * target.c: Include "terminal.h".
15507 (target_terminal::terminal_state): Rename to ...
15508 (target_terminal::m_terminal_state): ... this.
15509 (target_terminal::init): Adjust.
15510 (target_terminal::inferior): Adjust to per-inferior
15511 terminal_state.
15512 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15513 (target_terminal::ours, target_terminal::ours_for_output): Use
15514 target_terminal_is_ours_kind.
15515 (target_interrupt): Remove ptid parameter. Adjust.
15516 (default_target_pass_ctrlc): Adjust.
15517 * target.h (target_ops::to_terminal_save_inferior): New field.
15518 (target_ops::to_interrupt): Remove ptid_t parameter.
15519 (target_interrupt): Remove ptid_t parameter. Update comment.
15520 (target_pass_ctrlc): Update comment.
15521 * target/target.h (target_terminal_state): New scoped enum,
15522 factored out of ...
15523 (target_terminal::terminal_state): ... here.
15524 (target_terminal::inferior): Update comments.
15525 (target_terminal::restore_inferior): New.
15526 (target_terminal::is_inferior, target_terminal::is_ours)
15527 (target_terminal::is_ours_for_output): Adjust.
15528 (target_terminal::scoped_restore_terminal_state): Adjust to
15529 rename, and call restore_inferior() instead of inferior().
15530 (target_terminal::scoped_restore_terminal_state::m_state): Change
15531 type.
15532 (target_terminal::terminal_state): Rename to ...
15533 (target_terminal::m_terminal_state): ... this and change type.
15534
15535 2018-01-30 Pedro Alves <palves@redhat.com>
15536
15537 * linux-nat.c (wait_for_signal): New function.
15538 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15539 directly.
15540 (async_terminal_is_ours)
15541 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15542 (linux_nat_add_target): Don't override
15543 to_terminal_inferior/to_terminal_ours.
15544
15545 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
15546
15547 * remote.c (remote_follow_fork): Don't call "detach_inferior".
15548
15549 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
15550
15551 * dwarf2read.c (free_dwo_files): Add forward-declaration.
15552 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15553 dwarf2_per_objfile_free here.
15554 (dwarf2_per_objfile_free): Remove.
15555 (_initialize_dwarf2_read): Don't register
15556 dwarf2_per_objfile_free as a registry cleanup.
15557
15558 2018-01-27 Eli Zaretskii <eliz@gnu.org>
15559
15560 Avoid compilation errors in MinGW native builds
15561
15562 The error is triggered by including python-internal.h, and the
15563 error message is:
15564
15565 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15566 from build-gnulib/import/math.h:27,
15567 from d:/usr/Python26/include/pyport.h:235,
15568 from d:/usr/Python26/include/Python.h:58,
15569 from python/python-internal.h:94,
15570 from python/py-arch.c:24:
15571 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15572 using ::hypot;
15573 ^~~~~
15574
15575 This happens because Python headers define 'hypot' to expand t
15576 '_hypot' in the Windows builds.
15577 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15578 'hypoth'. This avoids a compilation error.
15579
15580 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15581
15582 * MAINTAINERS (Write After Approval): Fix ordering.
15583
15584 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15585
15586 * MAINTAINERS (Write After Approval): Add Alan Hayward.
15587
15588 2018-01-26 Alan Modra <amodra@gmail.com>
15589
15590 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15591 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15592 Remove nop. Make const. Comment.
15593 (powerpc32_plt_stub_so_2): New.
15594 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15595 Correct count. Update uses.
15596 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15597 Move common code reading PLT entry word. Correct
15598 powerpc32_plt_stub PLT address calculation.
15599 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15600 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15601 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15602 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15603 (ppc64_standard_linkage8): Likewise.
15604 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15605 Correct insns description.
15606 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15607
15608 2018-01-24 Pedro Alves <palves@redhat.com>
15609
15610 GCC PR libstdc++/83906
15611 * gdbtypes.c (operator==(const dynamic_prop &,
15612 const dynamic_prop &)): New.
15613 (operator==(const range_bounds &, const range_bounds &)): New.
15614 (check_types_equal): Use them instead of memcmp.
15615 * gdbtypes.h (operator==(const dynamic_prop &,
15616 const dynamic_prop &)): Declare.
15617 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15618 (operator==(const range_bounds &, const range_bounds &)): Declare.
15619 (operator!=(const range_bounds &, const range_bounds &)): Declare.
15620
15621 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15622
15623 * s390-linux-tdep.c (s390_record_address_mask)
15624 (s390_record_calc_disp_common, s390_record_calc_disp)
15625 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15626 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15627 (s390_process_record): Move to s390-tdep.c.
15628 (s390_linux_init_abi_any): Adjust.
15629 * s390-tdep.c (s390_record_address_mask)
15630 (s390_record_calc_disp_common, s390_record_calc_disp)
15631 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15632 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15633 (s390_process_record): Moved from s390-linux-tdep.c
15634 (s390_gdbarch_init): Adjust.
15635
15636 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15637
15638 * s390-linux-nat.c (s390-tdep.h): New include.
15639 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15640 (HFILES_NO_SRCDIR): Add s390-tdep.h.
15641 (ALLDEPFILES): Add s390-tdep.c.
15642 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15643 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15644 * s390-tdep.h: ...this. New file.
15645 * s390-linux-tdep.c (s390-tdep.h): New include.
15646 (_initialize_s390_tdep): Rename to...
15647 (_initialize_s390_linux_tdep): ...this and adjust.
15648 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15649 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15650 s390-tdep.h.
15651 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15652 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15653 (s390_is_partial_instruction, s390_software_single_step)
15654 (is_non_branch_ril, s390_displaced_step_copy_insn)
15655 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15656 (s390_prologue_data, s390_addr, s390_store, s390_load)
15657 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15658 (s390_register_call_saved, s390_guess_tracepoint_registers)
15659 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15660 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15661 (s390_pseudo_register_name, s390_pseudo_register_type)
15662 (s390_pseudo_register_read, s390_pseudo_register_write)
15663 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15664 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15665 (s390_addr_bits_remove, s390_address_class_type_flags)
15666 (s390_address_class_type_flags_to_name)
15667 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15668 (s390_function_arg_float, s390_function_arg_vector)
15669 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15670 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15671 (s390_frame_align, s390_register_return_value, s390_return_value)
15672 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15673 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15674 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15675 (s390_trad_frame_prev_register, s390_unwind_cache)
15676 (s390_prologue_frame_unwind_cache)
15677 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15678 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15679 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15680 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15681 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15682 (s390_frame_base_address, s390_local_base_address)
15683 (s390_frame_base, s390_gcc_target_options)
15684 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15685 (s390_validate_reg_range, s390_tdesc_valid)
15686 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15687 * s390-tdep.c: ...this. New file.
15688
15689 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15690
15691 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15692 (s390_process_record, s390_gdbarch_tdep_alloc)
15693 (s390_linux_init_abi_any): Use/set new hook.
15694
15695 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15696
15697 * s390-linux-tdep.c (osabi.h): New include.
15698 (s390_linux_init_abi_31, s390_linux_init_abi_64)
15699 (s390_linux_init_abi_any): New functions.
15700 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15701
15702 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15703
15704 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15705 tdesc_has_registers check
15706
15707 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15708
15709 * s390-linux-tdep.c (s390_tdesc_valid): New function.
15710 (s390_validate_reg_range): New macro.
15711 (s390_gdbarch_init): Adjust.
15712
15713 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15714
15715 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15716 (s390_gdbarch_tdep_alloc): Adjust.
15717 (s390_gdbarch_init): Adjust.
15718
15719 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15720
15721 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15722 <have_tdb>: Change type to bool.
15723 (s390_gdbarch_tdep_alloc): Adjust.
15724 (s390_gdbarch_init): Adjust.
15725
15726 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15727
15728 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15729 (gdbarch_tdep) <have_upper, have_vx>: New fields.
15730 (s390_gdbarch_tdep_alloc): New function.
15731 (s390_gdbarch_init): Allocate tdep at start and use its fields
15732 instead of separate variables.
15733
15734 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15735
15736 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15737 when looking for cached gdbarch and add comment for remaining.
15738
15739 2018-01-22 Pedro Alves <palves@redhat.com>
15740 Sergio Durigan Junior <sergiodj@redhat.com>
15741
15742 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15743 case.
15744
15745 2018-01-22 Maciej W. Rozycki <macro@mips.com>
15746
15747 * MAINTAINERS: Update my company e-mail address.
15748
15749 2018-01-22 Yao Qi <yao.qi@linaro.org>
15750
15751 * regcache.c (cooked_write_test): New function.
15752 (_initialize_regcache): Register the test.
15753
15754 2018-01-22 Yao Qi <yao.qi@linaro.org>
15755
15756 * ia64-tdep.c (ia64_pseudo_register_read): Call
15757 regcache->cooked_read instead of regcache_cooked_read_unsigned.
15758 * m32c-tdep.c (m32c_cat_read): Likewise.
15759 (m32c_r3r2r1r0_read): Likewise.
15760 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15761 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15762
15763 2018-01-22 Yao Qi <yao.qi@linaro.org>
15764
15765 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15766 method raw_read instead of regcache_raw_read.
15767 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15768 * arm-tdep.c (arm_neon_quad_read): Likewise.
15769 * avr-tdep.c (avr_pseudo_register_read): Likewise.
15770 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15771 * frv-tdep.c (frv_pseudo_register_read): Likewise.
15772 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15773 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15774 (i386_pseudo_register_read_into_value): Likewise.
15775 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15776 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15777 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15778 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15779 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15780 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15781 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15782 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15783 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15784
15785 2018-01-22 Yao Qi <yao.qi@linaro.org>
15786
15787 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15788 * configure.tgt: Remove target mt.
15789 * mt-tdep.c: Remove.
15790 * regcache.c (cooked_read_test): Remove the check for mt.
15791
15792 2018-01-22 Yao Qi <yao.qi@linaro.org>
15793
15794 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15795 instead of gdbarch_pseudo_register_read_value.
15796
15797 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15798
15799 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15800 language is Ada.
15801
15802 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15803
15804 * linespec.c (create_sals_line_offset): Remove code that preserved
15805 the symtab_and_line's line number.
15806
15807 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15808
15809 * varobj.c (varobj_create): Don't set valid_block when creating a
15810 floating varobj.
15811
15812 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15813
15814 * varobj.c (varobj_create): Remove out of date comment.
15815
15816 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15817
15818 PR mi/20395
15819 * ada-exp.y (write_var_from_sym): Pass extra parameter when
15820 updating innermost block.
15821 * parse.c (innermost_block_tracker::update): Take extra type
15822 parameter, and check types match before updating innermost block.
15823 (write_dollar_variable): Update innermost block for registers.
15824 * parser-defs.h (enum innermost_block_tracker_type): New enum.
15825 (innermost_block_tracker::innermost_block_tracker): Initialise
15826 m_types member.
15827 (innermost_block_tracker::reset): Take type parameter.
15828 (innermost_block_tracker::update): Take type parameter, and pass
15829 type through as needed.
15830 (innermost_block_tracker::m_types): New member.
15831 * varobj.c (varobj_create): Pass type when reseting innermost
15832 block.
15833
15834 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15835
15836 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15837 * ada-lang.c (resolve_subexp): Likewise.
15838 * breakpoint.c (set_breakpoint_condition) Likewise.
15839 (watch_command_1) Likewise.
15840 * c-exp.y (variable): Likewise.
15841 * d-exp.y (PrimaryExpression): Likewise.
15842 * f-exp.y (variable): Likewise.
15843 * go-exp.y (variable): Likewise.
15844 * m2-exp.y (variable): Likewise.
15845 * objfiles.c (objfile::~objfile): Likewise.
15846 * p-exp.y (variable): Likewise.
15847 * parse.c (innermost_block): Change type.
15848 * parser-defs.h (class innermost_block_tracker): New.
15849 (innermost_block): Change to innermost_block_tracker.
15850 * printcmd.c (display_command): Switch to innermost_block API.
15851 (do_one_display): Likewise.
15852 * rust-exp.y (do_one_display): Likewise.
15853 * symfile.c (clear_symtab_users): Likewise.
15854 * varobj.c (varobj_create): Switch to innermost_block API, replace
15855 use of innermost_block with block stored on varobj object.
15856
15857 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15858
15859 * expression.h (innermost_block): Remove declaration.
15860 * varobj.c: Add 'parser-defs.h' include.
15861
15862 2018-01-19 Tom Tromey <tom@tromey.com>
15863
15864 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15865 symbols in the static and global blocks.
15866
15867 2018-01-19 James Clarke <jrtc27@jrtc27.com>
15868
15869 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15870 gdb_ptrace.h, and move including gdb_wait.h ...
15871 * nat/linux-ptrace.h: ... to here.
15872
15873 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15874
15875 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15876 inf_ptrace_detach_success.
15877 (inf_ptrace_detach_success): Add inferior parameter, use it
15878 instead of inferior_ptid, pass it to detach_inferior.
15879 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15880 parameter.
15881 * inferior.c (detach_inferior): Add overload that takes an
15882 inferior object.
15883 * inferior.h (detach_inferior): Likewise.
15884 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15885 use inferior_ptid, adjust call to inf_ptrace_detach_success.
15886 * linux-thread-db.c (thread_db_detach): Use inf parameter.
15887
15888 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15889
15890 * target.h (struct target_ops) <to_detach>: Add inferior
15891 parameter.
15892 (target_detach): Likewise.
15893 * target.c (dispose_inferior): Pass inferior down.
15894 (target_detach): Pass inferior down. Assert that it is equal to
15895 the current inferior.
15896 * aix-thread.c (aix_thread_detach): Pass inferior down.
15897 * corefile.c (core_file_command): Pass current_inferior() down.
15898 * corelow.c (core_detach): Add inferior parameter.
15899 * darwin-nat.c (darwin_detach): Likewise.
15900 * gnu-nat.c (gnu_detach): Likewise.
15901 * inf-ptrace.c (inf_ptrace_detach): Likewise.
15902 * infcmd.c (detach_command): Pass current_inferior() down to
15903 target_detach.
15904 * infrun.c (follow_fork_inferior): Pass parent_inf to
15905 target_detach.
15906 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15907 target_detach.
15908 * linux-nat.c (linux_nat_detach): Add inferior parameter.
15909 * linux-thread-db.c (thread_db_detach): Likewise.
15910 * nto-procfs.c (procfs_detach): Likewise.
15911 * procfs.c (procfs_detach): Likewise.
15912 * record.c (record_detach): Likewise.
15913 * record.h (struct inferior): Forward-declare.
15914 (record_detach): Add inferior parameter.
15915 * remote-sim.c (gdbsim_detach): Likewise.
15916 * remote.c (remote_detach_1): Likewise.
15917 (remote_detach): Likewise.
15918 (extended_remote_detach): Likewise.
15919 * sol-thread.c (sol_thread_detach): Likewise.
15920 * target-debug.h (target_debug_print_inferior_p): New macro.
15921 * target-delegates.c: Re-generate.
15922 * top.c (kill_or_detach): Pass inferior down to target_detach.
15923 * windows-nat.c (windows_detach): Add inferior parameter.
15924
15925 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15926
15927 * target.h (struct target_ops) <to_detach>: Remove args
15928 parameter.
15929 (target_detach): Likewise.
15930 * target.c (dispose_inferior): Adjust.
15931 (target_detach): Remove args parameter, adjust.
15932 * aix-thread.c (aix_thread_detach): Adjust.
15933 * corefile.c (core_file_command): Adjust.
15934 * corelow.c (core_detach): Adjust.
15935 * darwin-nat.c (darwin_detach): Adjust.
15936 * gnu-nat.c (gnu_detach): Adjust.
15937 * inf-ptrace.c (inf_ptrace_detach): Adjust.
15938 * infcmd.c (detach_command): Adjust
15939 * infrun.c (follow_fork_inferior): Adjust.
15940 (handle_vfork_child_exec_or_exit): Adjust.
15941 * linux-fork.c (linux_fork_detach): Remove args parameter.
15942 * linux-fork.h (linux_fork_detach): Likewise.
15943 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15944 * linux-thread-db.c (thread_db_detach): Likewise.
15945 * nto-procfs.c (procfs_detach): Likewise.
15946 * procfs.c (procfs_detach): Likewise.
15947 (do_detach): Remove signo parameter.
15948 * record.c (record_detach): Remove args parameter.
15949 * record.h (record_detach): Likewise.
15950 * remote-sim.c (gdbsim_detach): Likewise.
15951 * remote.c (remote_detach_1): Likewise.
15952 (remote_detach): Likewise.
15953 (extended_remote_detach): Likewise.
15954 * sol-thread.c (sol_thread_detach): Likewise.
15955 * target-delegates.c: Re-generate.
15956 * top.c (struct qt_args) <args>: Remove field.
15957 (kill_or_detach): Don't pass args.
15958 (quit_force): Don't set args.
15959 * windows-nat.c (windows_detach): Remove args parameter.
15960
15961 2018-01-19 Yao Qi <yao.qi@linaro.org>
15962
15963 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15964 (arm_linux_init_abi): Install it.
15965
15966 2018-01-19 Yao Qi <yao.qi@linaro.org>
15967
15968 * osabi.c (gdb_osabi_names): Extend the regexp for
15969 arm-linux-gnueabihf.
15970
15971 2018-01-18 Yao Qi <yao.qi@linaro.org>
15972
15973 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15974 m_abbrevs.
15975 (abbrev_table::add_abbrev): Update.
15976 (abbrev_table::lookup_abbrev): Update.
15977
15978 2018-01-18 Yao Qi <yao.qi@linaro.org>
15979
15980 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15981
15982 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
15983
15984 * compile/compile.c (compile_to_object): Convert "triplet_rx"
15985 to "std::string".
15986
15987 2018-01-17 Tom Tromey <tom@tromey.com>
15988
15989 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
15990
15991 2018-01-17 Tom Tromey <tom@tromey.com>
15992
15993 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15994 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15995 (create_array_type_with_stride): Update.
15996 * dwarf2read.c (set_die_type): Update.
15997
15998 2018-01-17 Tom Tromey <tom@tromey.com>
15999
16000 * dwarf2read.c (delayed_method_info): Remove typedef.
16001 (dwarf2_cu::method_info): Now a std::vector.
16002 (add_to_method_list): Update.
16003 (free_delayed_list): Remove.
16004 (compute_delayed_physnames): Update.
16005 (process_full_comp_unit, process_full_type_unit): Clear the method
16006 list. Remove cleanups.
16007 (psymtab_include_file_name): Add name_holder parameter. Use
16008 unique_xmalloc_ptr.
16009 (dwarf_decode_lines): Update.
16010
16011 2018-01-17 Tom Tromey <tom@tromey.com>
16012 Simon Marchi <simon.marchi@ericsson.com>
16013
16014 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
16015 (dwarf2_per_objfile::free_cached_comp_units)
16016 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
16017 (init_cutu_and_read_dies_no_follow): Update.
16018 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
16019 (dwarf2_cu::~dwarf2_cu): New.
16020 (free_heap_comp_unit, free_stack_comp_unit): Remove.
16021 (age_cached_comp_units, free_one_cached_comp_unit): Update.
16022
16023 2018-01-17 Tom Tromey <tom@tromey.com>
16024 Simon Marchi <simon.marchi@ericsson.com>
16025
16026 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
16027 (struct die_reader_specs) <abbrev_table>: New member.
16028 (struct abbrev_table): Add constructor.
16029 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
16030 <abbrev_obstack>: Now an auto_obstack.
16031 (abbrev_table_up): New typedef.
16032 (init_cu_die_reader): Add abbrev_table parameter.
16033 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
16034 Add result_dwo_abbrev_table.
16035 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
16036 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
16037 Update.
16038 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
16039 parameter.
16040 (skip_children): Update.
16041 (abbrev_table::alloc_abbrev): Rename from
16042 abbrev_table_alloc_abbrev.
16043 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
16044 (abbrev_table::lookup_abbrev): Rename from
16045 abbrev_table_lookup_abbrev.
16046 (abbrev_table_read_table): Return abbrev_table_up.
16047 (abbrev_table_free, abbrev_table_free_cleanup)
16048 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
16049 (load_partial_dies): Update.
16050
16051 2018-01-17 Tom Tromey <tom@tromey.com>
16052
16053 * dwarf2read.c (dwarf2_compute_name): Update comment.
16054 (read_func_scope, read_variable): Update.
16055 (new_symbol): Remove.
16056 (new_symbol_full): Rename to new_symbol.
16057
16058 2018-01-17 Mike Gulick <mgulick@mathworks.com>
16059
16060 PR gdb/16577
16061 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
16062 a warning instead of throwing an error, set section size to 0 and return
16063 NULL.
16064 * gdb_bfd.h (gdb_bfd_map_section): Update description.
16065
16066 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
16067
16068 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
16069 std::string.
16070 (linux_ptrace_attach_fail_reason_string): Likewise.
16071 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
16072 Likewise.
16073 (linux_ptrace_attach_fail_reason_string): Likewise.
16074 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16075
16076 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
16077
16078 * linux-nat.c (linux_nat_attach): Remove xstrdup.
16079
16080 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
16081
16082 PR gdb/21559
16083 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16084 checking for fs_base/gs_base fields in struct user_regs_struct.
16085 * configure: Regenerate.
16086
16087 2018-01-17 Yao Qi <yao.qi@linaro.org>
16088
16089 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16090 function.
16091 (aarch64_linux_init_abi): Install it to gdbarch hook
16092 gcc_target_options.
16093
16094 2018-01-15 Pedro Alves <palves@redhat.com>
16095
16096 * common/signals-state-save-restore.c
16097 (save_original_signals_state): Fix typos.
16098
16099 2017-01-12 Tom Tromey <tom@tromey.com>
16100 Sergio Durigan Junior <sergiodj@redhat.com>
16101
16102 * Makefile.in (install-only): Install gdb-add-index.
16103
16104 2018-01-12 John Baldwin <jhb@FreeBSD.org>
16105
16106 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16107
16108 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
16109
16110 * infrun.c (keep_going_pass_signal): Clear step-over info when
16111 insert_breakpoints fails.
16112
16113 2018-01-11 Pedro Alves <palves@redhat.com>
16114
16115 PR gdb/22583
16116 * infrun.c (resume): Rename to ...
16117 (resume_1): ... this.
16118 (resume): Reimplement as wrapper around resume_1.
16119
16120 2018-01-11 Pedro Alves <palves@redhat.com>
16121
16122 PR remote/22597
16123 * remote.c (remote_parse_stop_reply): Default to the last-set
16124 general thread instead of to 'magic_null_ptid'.
16125
16126 2018-01-10 Pedro Alves <palves@redhat.com>
16127
16128 * language.h (language_get_symbol_name_matcher): Rename ...
16129 (get_symbol_name_matcher): ... this.
16130 * language.c (language_get_symbol_name_matcher): Ditto.
16131 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16132 callers adjusted.
16133
16134 2018-01-10 Pedro Alves <palves@redhat.com>
16135
16136 PR gdb/22670
16137 * dwarf2read.c
16138 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16139 Adjust to use language_get_symbol_name_matcher instead of
16140 language_defn::la_get_symbol_name_matcher.
16141 * language.c (language_get_symbol_name_matcher): If in Ada mode
16142 and the lookup name is a verbatim match, return Ada's matcher.
16143 * language.h (language_get_symbol_name_matcher): Adjust comment.
16144 (ada_lookup_name_info::verbatim_p):: New method.
16145
16146 2018-01-10 Pedro Alves <palves@redhat.com>
16147
16148 PR gdb/22670
16149 * ada-lang.c (ada_collect_symbol_completion_matches): If the
16150 minsym's language is language_auto or language_cplus, pass down
16151 language_ada instead.
16152 * symtab.c (compare_symbol_name): Don't frob symbol language here.
16153
16154 2018-01-10 Pedro Alves <palves@redhat.com>
16155
16156 PR gdb/22670
16157 * minsyms.c (linkage_name_str): New function.
16158 (iterate_over_minimal_symbols): Use it.
16159
16160 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16161
16162 * NEWS: Document that 'info proc' now works on FreeBSD.
16163
16164 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16165
16166 * configure.ac: Check for kinfo_getfile in libutil.
16167 * configure: Regenerate.
16168 * config.in: Regenerate.
16169 * fbsd-nat.c: Include "fbsd-tdep.h".
16170 (fbsd_fetch_cmdline): New.
16171 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16172 rather than calling error.
16173 (fbsd_info_proc): New.
16174 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16175 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16176 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16177
16178 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16179
16180 * fbsd-nat.c (struct free_deleter): Remove.
16181 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16182
16183 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16184
16185 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16186 NULL for an empty pathname.
16187
16188 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16189
16190 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16191 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16192 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16193 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16194 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16195 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16196 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16197 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16198 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16199 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16200 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16201 (fbsd_core_fetch_timeval, fbsd_print_sigset)
16202 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16203 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
16204 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16205
16206 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
16207
16208 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16209 (gnu_xfer_auxv): New function.
16210 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16211 TARGET_OBJECT_AUXV.
16212
16213 2018-01-08 Yao Qi <yao.qi@linaro.org>
16214 Simon Marchi <simon.marchi@ericsson.com>
16215
16216 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16217 common/selftest.c.
16218 (COMMON_OBS): Remove selftest.o.
16219 * configure.ac: Append selftest-arch.c and common/selftest.c to
16220 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
16221 * configure: Re-generated.
16222 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16223 GDB_SELF_TEST.
16224 (maintenance_info_selftests): Likewise.
16225
16226 2018-01-08 Xavier Roirand <roirand@adacore.com>
16227
16228 * ada-valprint.c (val_print_packed_array_elements): Use
16229 proper number of elements when printing an array indexed
16230 by an enumeration type.
16231
16232 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16233
16234 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16235 (dw2_get_file_names_reader): Adjust.
16236 (lookup_dwo_signatured_type): Adjust.
16237 (lookup_dwp_signatured_type): Adjust.
16238 (lookup_signatured_type): Adjust.
16239 (create_type_unit_group): Adjust.
16240 (get_type_unit_group): Adjust.
16241 (process_psymtab_comp_unit_reader): Adjust.
16242 (build_type_psymtabs_reader): Adjust.
16243 (scan_partial_symbols): Adjust.
16244 (add_partial_symbol): Adjust.
16245 (add_partial_subprogram): Adjust.
16246 (peek_die_abbrev): Adjust.
16247 (fixup_go_packaging): Adjust.
16248 (process_imported_unit_die): Adjust.
16249 (dwarf2_compute_name): Adjust.
16250 (dwarf2_physname): Adjust.
16251 (read_import_statement): Adjust.
16252 (handle_DW_AT_stmt_list): Adjust.
16253 (read_file_scope): Adjust.
16254 (read_func_scope): Adjust.
16255 (read_lexical_block_scope): Adjust.
16256 (read_call_site_scope): Adjust.
16257 (read_variable): Adjust.
16258 (dwarf2_rnglists_process): Adjust.
16259 (dwarf2_ranges_process): Adjust.
16260 (dwarf2_ranges_read): Adjust.
16261 (dwarf2_get_pc_bounds): Adjust.
16262 (dwarf2_record_block_ranges): Adjust.
16263 (dwarf2_add_field): Adjust.
16264 (dwarf2_add_member_fn): Adjust.
16265 (read_structure_type): Adjust.
16266 (process_structure_scope): Adjust.
16267 (read_enumeration_type): Adjust.
16268 (read_array_type): Adjust.
16269 (mark_common_block_symbol_computed): Adjust.
16270 (read_common_block): Adjust.
16271 (read_namespace_type): Adjust.
16272 (read_namespace): Adjust.
16273 (read_module_type): Adjust.
16274 (read_tag_pointer_type): Adjust.
16275 (read_tag_ptr_to_member_type): Adjust.
16276 (read_tag_string_type): Adjust.
16277 (read_subroutine_type): Adjust.
16278 (read_typedef): Adjust.
16279 (read_base_type): Adjust.
16280 (attr_to_dynamic_prop): Adjust.
16281 (read_subrange_type): Adjust.
16282 (read_unspecified_type): Adjust.
16283 (dwarf2_read_abbrevs): Adjust.
16284 (load_partial_dies): Adjust.
16285 (read_partial_die): Adjust.
16286 (find_partial_die): Adjust.
16287 (guess_partial_die_structure_name): Adjust.
16288 (fixup_partial_die): Adjust.
16289 (read_attribute_value): Adjust.
16290 (read_addr_index): Adjust.
16291 (read_addr_index_from_leb128): Adjust.
16292 (read_str_index): Adjust.
16293 (dwarf2_string_attr): Adjust.
16294 (get_debug_line_section): Adjust.
16295 (dwarf_decode_line_header): Adjust.
16296 (lnp_state_machine::check_line_address): Adjust.
16297 (dwarf_decode_lines_1): Adjust.
16298 (dwarf_decode_lines): Adjust.
16299 (dwarf2_start_symtab): Adjust.
16300 (var_decode_location): Adjust.
16301 (new_symbol_full): Adjust.
16302 (dwarf2_const_value_data): Adjust.
16303 (dwarf2_const_value_attr): Adjust.
16304 (dwarf2_const_value): Adjust.
16305 (die_type): Adjust.
16306 (die_containing_type): Adjust.
16307 (build_error_marker_type): Adjust.
16308 (lookup_die_type): Adjust.
16309 (guess_full_die_structure_name): Adjust.
16310 (anonymous_struct_prefix): Adjust.
16311 (determine_prefix): Adjust.
16312 (dwarf2_name): Adjust.
16313 (follow_die_ref_or_sig): Adjust.
16314 (follow_die_offset): Adjust.
16315 (follow_die_ref): Adjust.
16316 (follow_die_sig_1): Adjust.
16317 (follow_die_sig): Adjust.
16318 (get_signatured_type): Adjust.
16319 (get_DW_AT_signature_type): Adjust.
16320 (decode_locdesc): Adjust.
16321 (dwarf_decode_macros): Adjust.
16322 (cu_debug_loc_section): Adjust.
16323 (fill_in_loclist_baton): Adjust.
16324 (dwarf2_symbol_mark_computed): Adjust.
16325 (init_one_comp_unit): Don't assign
16326 dwarf2_cu::dwarf2_per_objfile.
16327 (set_die_type): Adjust.
16328
16329 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16330
16331 * dwarf2read.c (struct mapped_debug_names): Add constructor.
16332 <dwarf2_per_objfile>: New field.
16333 (dwarf2_per_objfile): Remove global.
16334 (get_dwarf2_per_objfile): New function.
16335 (set_dwarf2_per_objfile): New function.
16336 (dwarf2_build_psymtabs_hard): Change objfile parameter to
16337 dwarf2_per_objfile.
16338 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16339 (read_abbrev_offset): Likewise.
16340 (read_indirect_string): Likewise.
16341 (read_indirect_line_string): Likewise.
16342 (read_indirect_string_at_offset): Likewise.
16343 (read_indirect_string_from_dwz): Likewise.
16344 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16345 dwarf2_per_objfile.
16346 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16347 (create_all_comp_units): Change objfile parameter to
16348 dwarf2_per_objfile.
16349 (create_all_type_units): Likewise.
16350 (process_queue): Add dwarf2_per_objfile parameter.
16351 (read_and_check_comp_unit_head): Likewise.
16352 (lookup_dwo_unit_in_dwp): Likewise.
16353 (get_dwp_file): Likewise.
16354 (process_cu_includes): Likewise.
16355 (struct free_dwo_file_cleanup_data): New struct.
16356 (dwarf2_has_info): Use get_dwarf2_per_objfile and
16357 set_dwarf2_per_objfile.
16358 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16359 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16360 context, adjust calls.
16361 (dw2_instantiate_symtab): Likewise.
16362 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16363 (dw2_get_cu): Likewise.
16364 (create_cu_from_index_list): Change objfile parameter to
16365 dwarf2_per_objfile.
16366 (create_cus_from_index_list): Get dwarf2_per_objfile from
16367 context, adjust calls.
16368 (create_cus_from_index): Likewise.
16369 (create_signatured_type_table_from_index): Change objfile
16370 parameter to dwarf2_per_objfile.
16371 (create_signatured_type_table_from_debug_names): Change objfile
16372 parameter to dwarf2_per_objfile.
16373 (create_addrmap_from_index): Likewise.
16374 (create_addrmap_from_aranges): Likewise.
16375 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16376 (dw2_setup): Remove.
16377 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16378 context.
16379 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16380 get_dwarf2_per_objfile.
16381 (dw2_forget_cached_source_info): Likewise.
16382 (dw2_map_symtabs_matching_filename): Likewise.
16383 (struct dw2_symtab_iterator) <index>: Remove.
16384 <dwarf2_per_objfile>: New field.
16385 (dw2_symtab_iter_init): Replace index parameter with
16386 dwarf2_per_objfile.
16387 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16388 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16389 (dw2_print_stats): Likewise.
16390 (dw2_dump): Likewise.
16391 (dw2_expand_symtabs_for_function): Likewise.
16392 (dw2_expand_all_symtabs): Likewise.
16393 (dw2_expand_symtabs_with_fullname): Likewise.
16394 (dw2_expand_marked_cus): Replace index and objfile parameters
16395 with dwarf2_per_objfile.
16396 (dw_expand_symtabs_matching_file_matcher): Add
16397 dwarf2_per_objfile parameter and adjust calls.
16398 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16399 adjust calls.
16400 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16401 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16402 adjust calls.
16403 (create_cus_from_debug_names_list): Replace objfile parameter
16404 with dwarf2_per_objfile and adjust calls.
16405 (create_cus_from_debug_names): Likewise.
16406 (dwarf2_read_debug_names): Likewise.
16407 (mapped_debug_names::namei_to_name): Adjust call.
16408 (dw2_debug_names_iterator::next): Likewise.
16409 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16410 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16411 (dw2_debug_names_dump): Likewise.
16412 (dw2_debug_names_expand_symtabs_for_function): Likewise.
16413 (dw2_debug_names_expand_symtabs_matching): Likewise.
16414 (dwarf2_initialize_objfile): Likewise.
16415 (dwarf2_build_psymtabs): Likewise.
16416 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16417 this_cu.
16418 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16419 (read_and_check_comp_unit_head): Likewise.
16420 (read_abbrev_offset): Likewise.
16421 (create_debug_type_hash_table): Likewise.
16422 (create_debug_types_hash_table): Likewise.
16423 (create_all_type_units): Replace objfile parameter with
16424 dwarf2_per_objfile.
16425 (add_type_unit): Add dwarf2_per_objfile parameter.
16426 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16427 with dwarf2_per_objfile.
16428 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16429 (lookup_dwp_signatured_type): Likewise.
16430 (lookup_signatured_type): Likewise.
16431 (read_cutu_die_from_dwo): Likewise.
16432 (init_tu_and_read_dwo_dies): Likewise.
16433 (init_cutu_and_read_dies): Likewise.
16434 (init_cutu_and_read_dies_no_follow): Likewise.
16435 (allocate_type_unit_groups_table): Add objfile parameter.
16436 (create_type_unit_group): Use dwarf2_per_objfile from cu.
16437 (get_type_unit_group): Likewise.
16438 (process_psymtab_comp_unit): Update call.
16439 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16440 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16441 (print_tu_stats): Likewise.
16442 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16443 in void* parameter.
16444 (build_type_psymtabs): Change objfile parameter to
16445 dwarf2_per_objfile.
16446 (process_skeletonless_type_unit): Use dwarf2_per_objfile
16447 passed in void* parameter.
16448 (process_skeletonless_type_units): Change objfile parameter to
16449 dwarf2_per_objfile.
16450 (set_partial_user): Likewise.
16451 (dwarf2_build_psymtabs_hard): Likewise.
16452 (read_comp_units_from_section): Likewise.
16453 (create_all_comp_units): Likewise.
16454 (scan_partial_symbols): Update calls.
16455 (add_partial_symbol): Likewise.
16456 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16457 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16458 (process_queue): Add dwarf2_per_objfile parameter.
16459 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16460 (compute_compunit_symtab_includes): Likewise.
16461 (process_cu_includes): Add dwarf2_per_objfile parameter.
16462 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16463 (process_full_type_unit): Likewise.
16464 (process_imported_unit_die): Update call.
16465 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16466 (read_file_scope): Likewise.
16467 (allocate_dwo_file_hash_table): Add objfile parameter.
16468 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16469 (create_cus_hash_table): Likewise.
16470 (create_dwp_hash_table): Likewise.
16471 (create_dwo_unit_in_dwp_v1): Likewise.
16472 (create_dwp_v2_section): Likewise.
16473 (create_dwo_unit_in_dwp_v2): Likewise.
16474 (lookup_dwo_unit_in_dwp): Likewise.
16475 (try_open_dwop_file): Likewise.
16476 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16477 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16478 cleanup to include a reference to dwarf2_per_objfile.
16479 (open_dwp_file): Add dwarf2_per_objfile parameter.
16480 (open_and_init_dwp_file): Likewise.
16481 (get_dwp_file): Likewise.
16482 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16483 (queue_and_load_all_dwo_tus): Update call.
16484 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16485 data.
16486 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16487 (dwarf2_ranges_process): Likewise.
16488 (dwarf2_get_pc_bounds): Likewise.
16489 (mark_common_block_symbol_computed): Likewise.
16490 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16491 (dwarf2_read_abbrevs): Update call.
16492 (read_partial_die): Use dwarf2_per_objfile from cu.
16493 (find_partial_die): Likewise.
16494 (fixup_partial_die): Likewise.
16495 (read_attribute_value): Likewise.
16496 (read_indirect_string_at_offset_from): Add objfile parameter.
16497 (read_indirect_string_at_offset): Add dwarf2_per_objfile
16498 parameter.
16499 (read_indirect_string_from_dwz): Add objfile parameter.
16500 (read_indirect_string): Add objfile parameter.
16501 (read_addr_index_1): Add dwarf2_per_objfile parameter.
16502 (read_addr_index): Use dwarf2_per_objfile from cu.
16503 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16504 call dw2_setup.
16505 (read_str_index): Use dwarf2_per_objfile from cu.
16506 (get_debug_line_section): Likewise.
16507 (read_formatted_entries): Add dwarf2_per_objfile parameter.
16508 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16509 (new_symbol_full): Use dwarf2_per_objfile from cu.
16510 (build_error_marker_type): Likewise.
16511 (lookup_die_type): Likewise.
16512 (determine_prefix): Likewise.
16513 (follow_die_offset): Likewise.
16514 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16515 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16516 (dwarf2_fetch_die_type_sect_off): Likewise.
16517 (dwarf2_get_die_type): Likewise.
16518 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16519 (get_signatured_type): Likewise.
16520 (get_DW_AT_signature_type): Likewise.
16521 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16522 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16523 (cu_debug_loc_section): Likewise.
16524 (fill_in_loclist_baton): Likewise.
16525 (dwarf2_symbol_mark_computed): Likewise.
16526 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16527 dwarf2_per_objfile.
16528 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16529 parameter.
16530 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16531 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16532 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16533 (set_die_type): Use dwarf2_free_objfile from cu.
16534 (get_die_type_at_offset): Likewise.
16535 (dwarf2_per_objfile_free): Don't assign global variable.
16536 (debug_names) <constructor>: Add dwarf2_per_objfile
16537 parameter, update m_debugstrlookup construction.
16538 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16539 parameter.
16540 <m_dwarf2_per_objfile>: New field.
16541 <lookup>: Use m_dwarf2_per_objfile.
16542 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16543 (psyms_seen_size): Likewise.
16544 (write_gdbindex): Replace objfile parameter with
16545 dwarf2_per_objfile.
16546 (write_debug_names): Likewise.
16547 (write_psymtabs_to_index): Likewise.
16548 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16549 calls.
16550
16551 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16552
16553 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16554 <dwarf2_per_objfile>: New field.
16555 (struct dwarf2_per_cu_data) <objfile>: Remove.
16556 <dwarf2_per_objfile>: New field.
16557 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16558 of objfile.
16559 (create_signatured_type_table_from_index): Likewise.
16560 (create_debug_type_hash_table): Likewise.
16561 (fill_in_sig_entry_from_dwo_entry): Likewise.
16562 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16563 (create_type_unit_group): Assign dwarf2_per_objfile instead of
16564 objfile.
16565 (create_partial_symtab): Access objfile through
16566 dwarf2_per_objfile.
16567 (process_psymtab_comp_unit_reader): Likewise.
16568 (read_comp_units_from_section): Likewise.
16569 (scan_partial_symbols): Likewise.
16570 (add_partial_symbol): Likewise.
16571 (add_partial_subprogram): Likewise.
16572 (peek_die_abbrev): Likewise.
16573 (fixup_go_packaging): Likewise.
16574 (process_full_comp_unit): Likewise.
16575 (process_full_type_unit): Likewise.
16576 (process_imported_unit_die): Likewise.
16577 (dwarf2_compute_name): Likewise.
16578 (dwarf2_physname): Likewise.
16579 (read_import_statement): Likewise.
16580 (create_cus_hash_table): Assign dwarf2_physname instead of
16581 objfile.
16582 (read_func_scope): Access objfile through dwarf2_per_objfile.
16583 (read_lexical_block_scope): Likewise.
16584 (read_call_site_scope): Likewise.
16585 (read_variable): Likewise.
16586 (dwarf2_rnglists_process): Likewise.
16587 (dwarf2_ranges_process): Likewise.
16588 (dwarf2_ranges_read): Likewise.
16589 (dwarf2_record_block_ranges): Likewise.
16590 (dwarf2_add_field): Likewise.
16591 (dwarf2_add_member_fn): Likewise.
16592 (read_structure_type): Likewise.
16593 (process_structure_scope): Likewise.
16594 (read_enumeration_type): Likewise.
16595 (read_array_type): Likewise.
16596 (read_common_block): Likewise.
16597 (read_namespace_type): Likewise.
16598 (read_namespace): Likewise.
16599 (read_module_type): Likewise.
16600 (read_tag_pointer_type): Likewise.
16601 (read_tag_ptr_to_member_type): Likewise.
16602 (read_tag_string_type): Likewise.
16603 (read_subroutine_type): Likewise.
16604 (read_typedef): Likewise.
16605 (read_base_type): Likewise.
16606 (attr_to_dynamic_prop): Likewise.
16607 (read_subrange_type): Likewise.
16608 (read_unspecified_type): Likewise.
16609 (load_partial_dies): Likewise.
16610 (read_partial_die): Likewise.
16611 (find_partial_die): Likewise.
16612 (guess_partial_die_structure_name): Likewise.
16613 (fixup_partial_die): Likewise.
16614 (read_attribute_value): Likewise.
16615 (read_addr_index_from_leb128): Likewise.
16616 (dwarf2_read_addr_index): Likewise.
16617 (dwarf2_string_attr): Likewise.
16618 (lnp_state_machine::check_line_address): Likewise.
16619 (dwarf_decode_lines_1): Likewise.
16620 (dwarf_decode_lines): Likewise.
16621 (dwarf2_start_symtab): Likewise.
16622 (var_decode_location): Likewise.
16623 (new_symbol_full): Likewise.
16624 (dwarf2_const_value_data): Likewise.
16625 (dwarf2_const_value_attr): Likewise.
16626 (dwarf2_const_value): Likewise.
16627 (die_type): Likewise.
16628 (die_containing_type): Likewise.
16629 (lookup_die_type): Likewise.
16630 (guess_full_die_structure_name): Likewise.
16631 (anonymous_struct_prefix): Likewise.
16632 (dwarf2_name): Likewise.
16633 (follow_die_ref_or_sig): Likewise.
16634 (follow_die_offset): Likewise.
16635 (follow_die_ref): Likewise.
16636 (dwarf2_fetch_die_loc_sect_off): Likewise.
16637 (dwarf2_fetch_constant_bytes): Likewise.
16638 (dwarf2_fetch_die_type_sect_off): Likewise.
16639 (dwarf2_get_die_type): Likewise.
16640 (follow_die_sig): Likewise.
16641 (decode_locdesc): Likewise.
16642 (dwarf2_per_cu_objfile): Likewise.
16643 (dwarf2_per_cu_text_offset): Likewise.
16644 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16645 objfile.
16646 (set_die_type): Access objfile through
16647 dwarf2_per_objfile.
16648
16649 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16650
16651 * valprint.c (converted_character_d): Remove typedef.
16652 (DEF_VEC_O (converted_character_d)): Remove.
16653 (count_next_character): Use std::vector.
16654 (print_converted_chars_to_obstack): Likewise.
16655 (generic_printstr): Likewise.
16656
16657 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16658
16659 * xml-support.h (struct gdb_xml_value): Add constructor.
16660 <value>: Change type to unique_xmalloc_ptr.
16661 (gdb_xml_value_s): Remove typedef.
16662 (DEF_VEC_O (gdb_xml_value_s)): Remove.
16663 (gdb_xml_element_start_handler): Change parameter type to
16664 std::vector.
16665 (xml_find_attribute): Likewise.
16666 * xml-support.c (xml_find_attribute): Change parameter type to
16667 std::vector and adjust.
16668 (gdb_xml_values_cleanup): Remove.
16669 (gdb_xml_parser::start_element): Adjust to std::vector.
16670 (xinclude_start_include): Change paraeter type to std::vector
16671 and adjust.
16672 * btrace.c (check_xml_btrace_version): Likewise.
16673 (parse_xml_btrace_block): Likewise.
16674 (parse_xml_btrace_pt_config_cpu): Likewise.
16675 (parse_xml_btrace_pt): Likewise.
16676 (parse_xml_btrace_conf_bts): Likewise.
16677 (parse_xml_btrace_conf_pt): Likewise.
16678 * memory-map.c (memory_map_start_memory): Likewise.
16679 (memory_map_start_property): Likewise.
16680 * osdata.c (osdata_start_osdata): Likewise.
16681 (osdata_start_item): Likewise.
16682 (osdata_start_column): Likewise.
16683 * remote.c (start_thread): Likewise.
16684 * solib-aix.c (library_list_start_library): Likewise.
16685 (library_list_start_list): Likewise.
16686 * solib-svr4.c (library_list_start_library): Likewise.
16687 (svr4_library_list_start_list): Likewise.
16688 * solib-target.c (library_list_start_segment): Likewise.
16689 (library_list_start_section): Likewise.
16690 (library_list_start_library): Likewise.
16691 (library_list_start_list): Likewise.
16692 * tracepoint.c (traceframe_info_start_memory): Likewise.
16693 (traceframe_info_start_tvar): Likewise.
16694 * xml-syscall.c (syscall_start_syscall): Likewise.
16695 * xml-tdesc.c (tdesc_start_target): Likewise.
16696 (tdesc_start_feature): Likewise.
16697 (tdesc_start_reg): Likewise.
16698 (tdesc_start_union): Likewise.
16699 (tdesc_start_struct): Likewise.
16700 (tdesc_start_flags): Likewise.
16701 (tdesc_start_enum): Likewise.
16702 (tdesc_start_field): Likewise.
16703 (tdesc_start_enum_value): Likewise.
16704 (tdesc_start_vector): Likewise.
16705
16706 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16707
16708 * extension.h (struct xmethod_worker) <clone>: Remove.
16709 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16710 Remove.
16711 (python_xmethod_worker::clone): Remove.
16712 * valops.c (find_overload_match): Use std::move instead of
16713 clone.
16714
16715 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16716
16717 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16718 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16719 <free_xmethod_worker_data>: Remove.
16720 <get_matching_xmethod_workers>: Chance VEC to std::vector.
16721 <get_xmethod_arg_types>: Remove.
16722 <get_xmethod_result_type>: Remove.
16723 <invoke_xmethod>: Remove.
16724 * extension.c (new_xmethod_worker): Remove.
16725 (clone_xmethod_worker): Remove.
16726 (get_matching_xmethod_workers): Return void, pass std::vector by
16727 pointer.
16728 (get_xmethod_arg_types): Rename to...
16729 (xmethod_worker::get_arg_types): ... this, and adjust.
16730 (get_xmethod_result_type): Rename to...
16731 (xmethod_worker::get_result_type): ... this, and adjust.
16732 (invoke_xmethod): Remove.
16733 (free_xmethod_worker): Remove.
16734 (free_xmethod_worker_vec): Remove.
16735 * extension.h (enum ext_lang_rc): Move here from
16736 extension-priv.h.
16737 (struct xmethod_worker): Add constructor and destructor.
16738 <data>: Remove.
16739 <value>: Remove.
16740 <invoke, clone, do_get_result_type, do_get_arg_types>: New
16741 virtual pure methods.
16742 <get_arg_types, get_result_type>: New methods.
16743 (xmethod_worker_ptr): Remove typedef.
16744 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16745 (xmethod_worker_vec): Remove typedef.
16746 (xmethod_worker_up): New typedef.
16747 (invoke_xmethod): Remove.
16748 (clone_xmethod_worker): Remove.
16749 (free_xmethod_worker): Remove.
16750 (free_xmethod_worker_vec): Remove.
16751 (get_xmethod_arg_types): Remove.
16752 (get_xmethod_result_type): Remove.
16753 * valops.c (find_method_list): Use std::vector, don't use
16754 intermediate vector.
16755 (value_find_oload_method_list): Use std::vector.
16756 (find_overload_match): Use std::vector.
16757 (find_oload_champ): Use std::vector.
16758 * value.c (value_free): Use operator delete.
16759 (value_of_xmethod): Rename to...
16760 (value_from_xmethod): ... this. Don't assign
16761 xmethod_worker::value, take rvalue-reference.
16762 (result_type_of_xmethod): Adjust.
16763 (call_xmethod): Adjust.
16764 * value.h: Include extension.h.
16765 (struct xmethod_worker): Don't forward-declare.
16766 (value_of_xmethod): Rename to...
16767 (value_from_xmethod): ... this, take rvalue-reference.
16768 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16769 (struct python_xmethod_worker): ... this, add constructor and
16770 destructor.
16771 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16772 (gdbpy_free_xmethod_worker_data): Rename to...
16773 (python_xmethod_worker::~python_xmethod_worker): ... this and
16774 adjust.
16775 (gdbpy_clone_xmethod_worker_data): Rename to...
16776 (python_xmethod_worker::clone): ... this and adjust.
16777 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16778 temporary vector.
16779 (gdbpy_get_xmethod_arg_types): Rename to...
16780 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16781 (gdbpy_get_xmethod_result_type): Rename to...
16782 (python_xmethod_worker::do_get_result_type): ... this and
16783 adjust.
16784 (gdbpy_invoke_xmethod): Rename to...
16785 (python_xmethod_worker::invoke): ... this and adjust.
16786 (new_python_xmethod_worker): Rename to...
16787 (python_xmethod_worker::python_xmethod_worker): ... this and
16788 adjust.
16789 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16790 Remove.
16791 (gdbpy_free_xmethod_worker_data): Remove.
16792 (gdbpy_get_matching_xmethod_workers): Use std::vector.
16793 (gdbpy_get_xmethod_arg_types): Remove.
16794 (gdbpy_get_xmethod_result_type): Remove.
16795 (gdbpy_invoke_xmethod): Remove.
16796 * python/python.c (python_extension_ops): Remove obsolete
16797 callbacks.
16798
16799 2018-01-05 Pedro Alves <palves@redhat.com>
16800
16801 PR gdb/18653
16802 * common/signals-state-save-restore.c
16803 (save_original_signals_state): New parameter 'quiet'. Warn if we
16804 find a custom handler preinstalled, instead of internal erroring.
16805 But only warn if !quiet.
16806 * common/signals-state-save-restore.h
16807 (save_original_signals_state): New parameter 'quiet'.
16808 * main.c (captured_main_1): Move save_original_signals_state call
16809 after option handling, and pass QUIET.
16810
16811 2018-01-05 Pedro Alves <palves@redhat.com>
16812
16813 * spu-tdep.c (spu_catch_start): Pass
16814 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16815
16816 2018-01-05 Pedro Alves <palves@redhat.com>
16817
16818 PR gdb/22670
16819 * ada-lang.c (literal_symbol_name_matcher): New function.
16820 (ada_get_symbol_name_matcher): Use it for
16821 symbol_name_match_type::SEARCH_NAME.
16822 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
16823 it down instead of assuming symbol_name_match_type::FULL.
16824 * block.h (block_lookup_symbol): New parameter 'match_type'.
16825 * c-valprint.c (print_unpacked_pointer): Use
16826 lookup_symbol_search_name instead of lookup_symbol.
16827 * compile/compile-object-load.c (get_out_value_type): Pass down
16828 symbol_name_match_type::SEARCH_NAME.
16829 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16830 symbol_name_match_type::FULL.
16831 * cp-support.c (cp_get_symbol_name_matcher): Handle
16832 symbol_name_match_type::SEARCH_NAME.
16833 * infrun.c (insert_exception_resume_breakpoint): Use
16834 lookup_symbol_search_name.
16835 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16836 * psymtab.c (maintenance_check_psymtabs): Use
16837 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16838 * stack.c (print_frame_args): Use lookup_symbol_search_name and
16839 SYMBOL_SEARCH_NAME.
16840 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16841 if symbol_name_match_type::SEARCH_NAME.
16842 (lookup_symbol_in_language): Pass down
16843 symbol_name_match_type::FULL.
16844 (lookup_symbol_search_name): New.
16845 (lookup_language_this): Pass down
16846 symbol_name_match_type::SEARCH_NAME.
16847 (lookup_symbol_aux, lookup_local_symbol): New parameter
16848 'match_type'. Pass it down.
16849 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16850 (lookup_symbol_search_name): New declaration.
16851 (lookup_symbol_in_block): New 'match_type' parameter.
16852
16853 2018-01-05 Pedro Alves <palves@redhat.com>
16854
16855 PR gdb/22670
16856 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16857 ada_lookup_symbol.
16858 (ada_lookup_symbol): Reimplement in terms of
16859 ada_lookup_symbol_list, bits factored out from
16860 ada_lookup_encoded_symbol.
16861
16862 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16863
16864 * ada-exp.y (write_object_renaming): When subscripting an array
16865 using a symbol as the index, pass the block in call to
16866 ada_lookup_encoded_symbol when looking that symbol up.
16867
16868 2018-01-05 Jerome Guitton <guitton@adacore.com>
16869
16870 * ada-lang.c (ada_array_length): Use ada_index_type instead of
16871 TYPE_INDEX_TYPE.
16872
16873 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16874
16875 * ada-lang.c (ada_to_fixed_value_create): Add handling of
16876 the case where VALUE_LVAL (val0) is not lval_memory.
16877
16878 2018-01-05 Xavier Roirand <roirand@adacore.com>
16879
16880 * ada-valprint.c (print_optional_low_bound): Handle
16881 character-indexed array printing like boolean-indexed array
16882 printing.
16883
16884 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16885
16886 * NEWS: Create a new section for the next release branch.
16887 Rename the section of the current branch, now that it has
16888 been cut.
16889
16890 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16891
16892 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16893 * version.in: Bump version to 8.1.50.DATE-git.
16894
16895 2018-01-03 Xavier Roirand <roirand@adacore.com>
16896
16897 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16898 Add field.
16899 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16900 Add field.
16901 (default_exception_support_info) <catch_handlers_sym>: Add field.
16902 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16903 (ada_exception_name_addr_1): Add "catch handlers" handling.
16904 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16905 Update all callers.
16906 (create_excep_cond_exprs) <ex>: Add parameter.
16907 (re_set_exception): Update create_excep_cond_exprs call.
16908 (print_it_exception, print_one_exception, print_mention_exception)
16909 (print_recreate_exception): Add "catch handler" handling.
16910 (allocate_location_catch_handlers, re_set_catch_handlers)
16911 (check_status_catch_handlers, print_it_catch_handlers)
16912 (print_one_catch_handlers, print_mention_catch_handlers)
16913 (print_recreate_catch_handlers): New function.
16914 (catch_handlers_breakpoint_ops): New variable.
16915 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16916 Add parameter. Add "catch handler" handling.
16917 (ada_exception_sym_name, ada_exception_breakpoint_ops):
16918 Add "catch handler" handling.
16919 (ada_exception_catchpoint_cond_string): Add "catch handler"
16920 handling.
16921 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16922 call.
16923 (catch_ada_handlers_command): New function.
16924 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16925 operations structure.
16926 (_initialize_ada_language): Add "catch handlers" command entry.
16927 * NEWS: Document "catch handlers" feature.
16928
16929 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16930
16931 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16932 account when creating the array type of the slice.
16933 (ada_value_slice): Likewise.
16934
16935 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16936
16937 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16938 New enum value.
16939 (create_array_type_with_stride): Add byte_stride_prop parameter.
16940 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16941 New parameter. Update all callers in this file.
16942 (array_type_has_dynamic_stride): New function.
16943 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16944 of arrays with dynamic byte strides.
16945 * dwarf2read.c (read_array_type): Add support for dynamic
16946 DW_AT_byte_stride attributes.
16947
16948 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16949
16950 * dwarf2read.c (read_unspecified_type): Treat
16951 DW_TAG_enumeration_type DIEs from Ada units as stubs.
16952
16953 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16954
16955 Update copyright year range in all GDB files.
16956
16957 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
16958
16959 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16960 and gdb/testsuite/gdb.base/step-line.c.
16961
16962 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16963
16964 * copyright.py (main): Dump the contents of
16965 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16966 even if BY_HAND is empty.
16967
16968 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16969
16970 * top.c (print_gdb_version): Update Copyright year in version
16971 message.
16972
16973 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16974
16975 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16976
16977 For older changes see ChangeLog-2017.
16978 \f
16979 Local Variables:
16980 mode: change-log
16981 left-margin: 8
16982 fill-column: 74
16983 version-control: never
16984 coding: utf-8
16985 End: