a6adc5396607bd30fc912890b583998448b35800
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-12-27 Tom Tromey <tom@tromey.com>
2
3 * python/python.c (python_interactive_command): Use std::string.
4 (gdbpy_parameter): Likewise.
5 * python/py-utils.c (unicode_to_encoded_string): Update comment.
6 * python/py-symtab.c (salpy_str): Use PyString_FromFormat.
7 * python/py-record-btrace.c (recpy_bt_insn_data): Use
8 byte_vector.
9 * python/py-objfile.c (objfpy_get_build_id): Use
10 unique_xmalloc_ptr.
11 * python/py-inferior.c (infpy_read_memory): Use
12 unique_xmalloc_ptr.
13 * python/py-cmd.c (gdbpy_parse_command_name): Use std::string.
14
15 2018-12-26 Simon Marchi <simon.marchi@polymtl.ca>
16
17 * target.c (target_terminal::restore_inferior): Remove struct keyword.
18
19 2018-12-26 Simon Marchi <simon.marchi@ericsson.com>
20
21 * build-id.c (build_id_to_debug_bfd): Enhance debug output.
22 * symfile.c (separate_debug_file_exists): Likewise.
23
24 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
25
26 * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
27 SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
28 names.
29 (typename_stoken): New function.
30
31 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
32
33 * c-exp.y (field_name): New %token, and new rule.
34 (exp): Replace uses of 'name' with 'field_name' where appropriate.
35
36 2018-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
37
38 PR gdb/13368
39 * c-exp.y (typebase): Extend the comment.
40 (ident_tokens): Likewise.
41
42 2018-12-18 Tom Tromey <tom@tromey.com>
43
44 * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
45 address of sect_off.
46
47 2018-12-23 Joel Brobecker <brobecker@adacore.com>
48
49 GDB 8.2.1 released.
50
51 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
52
53 * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
54 assigning locations.
55 (riscv_return_value): Take more care not to read/write outside of
56 argument buffer. Cast return value between the declared type and
57 the abi type.
58
59 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
60
61 * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
62 fflags, and frm registers.
63
64 2018-12-22 Andrew Burgess <andrew.burgess@embecosm.com>
65
66 * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
67 (riscv_gdbarch_init): Register new function with gdbarch.
68 * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
69
70 2018-12-21 Simon Marchi <simon.marchi@ericsson.com>
71
72 * minsyms.c (mst_str): New.
73 (minimal_symbol_reader::record_full): Add debug output.
74
75 2018-12-21 John Baldwin <jhb@FreeBSD.org>
76
77 * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
78 equal PL_FLAG_SI.
79 (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
80
81 2018-12-21 Paul Marechal <paul.marechal@ericsson.com>
82
83 PR gdb/23974
84 * target.c (target_read_stralloc): Check for empty vector.
85
86 2018-12-21 Дилян Палаузов <dilyan.palauzov@aegee.org>
87
88 * top.c (print_gdb_configuration): Print "--without-python"
89 if GDB was configured without Python.
90
91 2018-12-21 Andrew Burgess <andrew.burgess@embecosm.com>
92
93 * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
94 a signed offset as a string.
95
96 2018-12-21 Dave Murphy <davem@devkitpro.org>
97
98 * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
99 initialise.
100 * probe.c (any_static_probe_ops): Ditto.
101 * record-btrace.c (record_btrace_thread_observer_token): Ditto.
102 * stap-probe.c (stap_static_probe_ops): Ditto.
103 * tui/tui-hooks.c (tui_observers_token): Ditto.
104 * unittests/observable-selftests.c (token1, token2, token3): Ditto.
105
106 2018-12-19 Andrew Burgess <andrew.burgess@embecosm.com>
107
108 * gdb/dummy-frame.c (default_dummy_id): Defined new function.
109 * gdb/dummy-frame.h (default_dummy_id): Declare new function.
110 * gdb/frame-unwind.c (default_unwind_pc): Define new function.
111 (default_unwind_sp): Define new function.
112 * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
113 (default_unwind_sp): Declare new function.
114 * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
115 available.
116 (get_frame_sp): Assume that gdbarch_unwind_sp is available.
117 * gdb/gdbarch.c: Regenerate.
118 * gdb/gdbarch.h: Regenerate.
119 * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
120 unwind_sp. Add additional header files to be included in
121 generated file.
122
123 2018-12-19 Dimitar Dimitrov <dimitar@dinux.eu>
124
125 * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
126 sp clobbers.
127
128 2018-12-17 Andrew Burgess <andrew.burgess@embecosm.com>
129
130 * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
131 'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
132 'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
133 'processing_has_namespace_info' from unsigned int to bool. Update
134 comments.
135 (producer_is_icc_lt_14): Update return type.
136 (producer_is_gcc_lt_4_3): Likewise.
137 (producer_is_gxx_lt_4_6): Likewise.
138 (process_die): Write true instead of 1 into predicate fields.
139 (dwarf2_start_symtab): Likewise.
140 (var_decode_location): Likewise.
141 (dwarf2_mark_helper): Likewise.
142 (dwarf2_mark): Likewise.
143 (dwarf2_clear_marks): Write false instead of 0 into predicate
144 field.
145 (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
146 0.
147
148 2018-12-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
149
150 * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
151 asm/sigcontext.h.
152
153 2018-12-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
154
155 * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
156 warning trailing new line.
157
158 2018-12-16 Philippe Waroquiers <philippe.waroquiers@skynet.be>
159
160 * nat/linux-ptrace.c (kill_child): New function.
161 (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
162 Add a call to kill_child in case of early return after fork.
163 (linux_check_ptrace_features): Use kill_child instead of local code.
164 (linux_test_for_tracefork): Likewise.
165
166 2018-12-14 Tom Tromey <tom@tromey.com>
167
168 * Makefile.in: Remove "alloca" comment.
169 (INFOFILES): Remove.
170 (local-maintainer-clean): Don't use INFOFILES.
171
172 2018-12-13 John Baldwin <jhb@FreeBSD.org>
173
174 * syscalls/update-freebsd.sh: New file.
175 * syscalls/freebsd.xml: Regenerate.
176
177 2018-12-13 John Baldwin <jhb@FreeBSD.org>
178
179 * NEWS: Add entry documenting system call aliases.
180 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
181 to get_syscalls_by_name.
182 * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
183 * gdbarch.h: Regenerate.
184 * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
185 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
186 from get_syscall_by_name. Now accepts a pointer to a vector of
187 integers and returns a bool.
188 [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
189 (syscall_create_syscall_desc): Add alias parameter and pass it to
190 syscall_desc constructor.
191 (syscall_start_syscall): Handle alias attribute.
192 (syscall_attr): Add alias attribute.
193 (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
194 Now accepts a pointer to a vector of integers and returns a
195 bool. Add syscalls whose alias or name matches the requested
196 name.
197 (get_syscalls_by_name): Rename from get_syscall_by_name. Now
198 accepts a pointer to a vector of integers and returns a bool.
199 * xml-syscall.h (get_syscalls_by_name): Likewise.
200
201 2018-12-13 John Baldwin <jhb@FreeBSD.org>
202
203 * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
204 to get_syscalls_by_group.
205 * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
206 false.
207 [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
208 numbers to an existing vector of integers and return a bool.
209 (get_syscalls_by_group): Accept pointer to vector of integers
210 and change return type to bool.
211 * xml-syscall.h (get_syscalls_by_group): Likewise.
212
213 2018-12-13 Jim Wilson <jimw@sifive.com>
214
215 * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
216 comment for SD field, and correct xlen calculation. For MISA, add
217 comment for MXL field, add call to register_size, and correct base
218 calculation.
219
220 2018-12-13 Stafford Horne <shorne@gmail.com>
221
222 * NEWS(New targets): Add or1k*-*-linux*.
223
224 2018-12-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
225
226 * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
227 declare on one line to fix ARI warning.
228
229 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
230
231 * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
232 (infcall_suspend_state::registers): New.
233 (infcall_suspend_state::restore): New.
234 (infcall_suspend_state::thread_suspend): Rename to...
235 (infcall_suspend_state::m_thread_suspend): ...this.
236 (infcall_suspend_state::registers): Rename to...
237 (infcall_suspend_state::m_registers): ...this.
238 (infcall_suspend_state::siginfo_gdbarch): Rename to...
239 (infcall_suspend_state::m_siginfo_gdbarch): ...this.
240 (infcall_suspend_state::siginfo_data): Rename to...
241 (infcall_suspend_state::m_siginfo_data): ...this.
242 (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
243 constructor.
244 (restore_infcall_suspend_state): Rewrite to use
245 infcall_suspend_state::restore method.
246 (get_infcall_suspend_state_regcache): Use
247 infcall_suspend_state::registers method.
248
249 2018-12-12 Andrew Burgess <andrew.burgess@embecosm.com>
250
251 * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
252 arguments are passed in integer registers.
253 (riscv_call_arg_complex_float): Likewise.
254
255 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
256
257 * nat/linux-osdata.c (common_getter): New function.
258 (struct osdata_type): Change getter to take_snapshot.
259 Add LONGEST len_avail and struct buffer buffer.
260 Change all elements in the initializer.
261 Add an element for the list of types.
262 (linux_xfer_osdata_info_os_types): New function.
263 (linux_common_xfer_osdata): Use common_getter for the list of types.
264 Replace getter call by common_getter.
265 (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
266 Add arg BUFFER. Only keep the code that adds data in BUFFER.
267 (linux_xfer_osdata_fds): Likewise.
268 (linux_xfer_osdata_modules): Likewise.
269 (linux_xfer_osdata_msg): Likewise.
270 (linux_xfer_osdata_processes): Likewise.
271 (linux_xfer_osdata_processgroups): Likewise.
272 (linux_xfer_osdata_sem): Likewise.
273 (linux_xfer_osdata_shm): Likewise.
274 (linux_xfer_osdata_isockets): Likewise.
275 (linux_xfer_osdata_threads): Likewise.
276
277 2018-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
278
279 * nat/linux-osdata.c: Removed various trailing spaces.
280
281 2018-12-10 Andrew Burgess <andrew.burgess@embecosm.com>
282
283 * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
284 leading whitespace before #include line.
285
286 2018-12-08 Simon Marchi <simon.marchi@ericsson.com>
287 Дилян Палаузов <dilyan.palauzov@aegee.org>
288
289 PR gdb/23950
290 * configure.ac: Search for tgetent in libtinfow.
291 * configure: Re-generate.
292
293 2018-12-08 Philippe Waroquiers <philippe.waroquiers@skynet.be>
294
295 * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
296 (thread_db_err_str): Forward declare.
297 (delete_thread_db_info): Call td_ta_delete_p if available.
298 (try_thread_db_load_1): Acquire td_ta_delete address.
299 * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
300
301 2018-12-08 Pedro Alves <palves@redhat.com>
302
303 * source.c (forward_search_command): Rename to ...
304 (search_command_helper): ... this. Add 'forward' parameter.
305 Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
306 buffer. Handle backward searches too.
307 (forward_search_command, reverse_search_command): Reimplement by
308 calling search_command_helper.
309
310 2018-12-07 Andrew Burgess <andrew.burgess@embecosm.com>
311
312 * .dir-locals.el: Copy most of the settings from c-mode over to
313 c++-mode.
314
315 2018-12-08 Stafford Horne <shorne@gmail.com>
316
317 * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
318 * configure.tgt: Add or1k*-*-linux*.
319 * or1k-linux-tdep.c: New file.
320 * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
321
322 2018-12-07 Pedro Alves <palves@redhat.com>
323
324 * dwarf2read.c (get_gdb_index_contents_from_section): Use
325 gdb::make_array_view.
326
327 2018-12-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
328
329 * language.c (_initialize_language): Fix leak by assigning
330 a static string to language. Same for range and case_sensitive,
331 even if no leak is detected for these variables.
332
333 2018-12-05 John Baldwin <jhb@FreeBSD.org>
334
335 * configure: Re-generate.
336 * configure.ac: Use separate sed expressions to escape variables
337 in auto-load directories.
338
339 2018-12-05 Andrew Burgess <andrew.burgess@embecosm.com>
340
341 * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
342 (riscv_find_default_target_description): Use new function to
343 extract feature from gdbarch_info.
344 (riscv_gdbarch_init): Add error checks for xlen and flen between
345 target description and bfd headers. Be smarter about when we
346 think the hardware floating point abi should be used.
347
348 2018-12-05 Alan Hayward <alan.hayward@arm.com>
349
350 * nat/aarch64-linux-hw-point.c
351 (aarch64_linux_any_set_debug_regs_state): New function.
352 * nat/aarch64-linux-hw-point.h
353 (aarch64_linux_any_set_debug_regs_state): New declaration.
354 * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
355 BPs or WPs are set.
356
357 2018-11-30 John Baldwin <jhb@FreeBSD.org>
358
359 * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
360 (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
361
362 2018-11-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
363 Simon Marchi <simon.marchi@ericsson.com>
364
365 * linespec.c (symtab_vector_up): Remove.
366 (symtabs_from_filename): Change return type to std::vector.
367 (collect_symtabs_from_filename): Likewise.
368 (create_sals_line_offset): Assign return value of
369 collect_symtabs_from_filename to *ls->file_symtabs.
370 (convert_explicit_location_to_linespec): Remove call to release.
371 (parse_linespec): Likewise.
372 (symtab_collector) <symtab_collector>: Remove initialization of
373 m_symtabs.
374 <release_symtabs>: Change return type to std::vector<symtab *>.
375 <operator ()>: Adjust.
376
377 2018-11-30 John Baldwin <jhb@FreeBSD.org>
378
379 * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
380 defined.
381 (union sigval32, struct siginfo32, fbsd_siginfo_size)
382 (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
383 of KERN_PROC_AUXV and PT_LWPINFO.
384 (fbsd_nat_target::xfer_partial): Define method unconditionally.
385 Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
386 Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
387 Make TARGET_OBJECT_FREEBSD_VMMAP and
388 TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
389 and KERN_PROC_PS_STRINGS.
390 * fbsd-nat.h: Include <sys/proc.h>.
391 (fbsd_nat_target::xfer_partial): Declare method unconditionally.
392
393 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
394
395 * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
396 header files.
397 (riscv_linux_nat_target::read_description): New method.
398
399 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
400
401 * arch/riscv.h (riscv_gdbarch_features::hash): New method.
402 * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
403 (riscv_tdesc_cache): New global.
404 (riscv_create_target_description): Look in the cache before
405 creating a new target description.
406
407 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
408
409 * arch/riscv.h (riscv_gdb_features::operator==): New.
410 (riscv_gdb_features::operator!=): New.
411 * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
412 operator.
413
414 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
415
416 * arch/riscv.h (riscv_create_target_description): Make return type
417 const.
418 * arch/riscv.c (riscv_create_target_description): Likewise.
419 * riscv-tdep.c (riscv_find_default_target_description): Likewise.
420
421 2018-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
422 Keith Seitz <keiths@redhat.com>
423 Tom Tromey <tom@tromey.com>
424 Sergio Durigan Junior <sergiodj@redhat.com>
425
426 https://bugzilla.redhat.com/show_bug.cgi?id=1613614
427 * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
428 'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
429 inside the CU.
430
431 2018-11-30 Pedro Alves <palves@redhat.com>
432
433 * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
434 <stratum>: New override.
435 * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
436 <stratum>: New override.
437 * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
438 <stratum>: New override.
439 * exec.c (exec_target) <exec_target>: Delete.
440 <stratum>: New override.
441 * gdbarch-selftests.c (register_to_value_test): Adjust to use the
442 stratum method instead of the to_stratum field.
443 * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
444 <stratum>: New override.
445 (thread_db_target::thread_db_target): Delete.
446 * make-target-delegates (print_class): Don't print a ctor
447 declaration. Print a stratum method override declaration.
448 * process-stratum-target.h (process_stratum_target)
449 <process_stratum_target>: Delete.
450 <stratum>: New override.
451 * ravenscar-thread.c (ravenscar_thread_target)
452 <ravenscar_thread_target>: Delete.
453 <stratum>: New override.
454 * record-btrace.c (record_btrace_target)
455 <record_btrace_target>: Delete.
456 <stratum>: New override.
457 * record-full.c (record_full_base_target)
458 <record_full_base_target>: Delete.
459 <stratum>: New override.
460 * record.c (record_disconnect, record_detach)
461 (record_mourn_inferior, record_kill): Adjust to use the stratum
462 method instead of the to_stratum field.
463 * regcache.c (cooked_read_test, cooked_write_test): Likewise.
464 * sol-thread.c (sol_thread_target)
465 <sol_thread_target>: Delete.
466 <stratum>: New override.
467 * spu-multiarch.c (spu_multiarch_target)
468 <spu_multiarch_target>: Delete.
469 <stratum>: New override.
470 * target-delegates.c: Regenerate.
471 * target.c (target_stack::push, target_stack::unpush)
472 (pop_all_targets_above, pop_all_targets_at_and_above)
473 (info_target_command, target_require_runnable)
474 (target_stack::find_beneath): Adjust to use the stratum method
475 instead of the to_stratum field.
476 (dummy_target::dummy_target): Delete.
477 (dummy_target::stratum): New.
478 (debug_target::debug_target): Delete.
479 (debug_target::stratum): New.
480 (maintenance_print_target_stack): Adjust to use the stratum method
481 instead of the to_stratum field.
482 * target.h (struct target_ops) <stratum>: New method.
483 <to_stratum>: Delete.
484 <is_pushed>: Adjust to use the stratum method
485 instead of the to_stratum field.
486
487 2018-11-30 Pedro Alves <palves@redhat.com>
488
489 * corelow.c (core_target) <has_all_memory, has_execution>: New
490 overrides.
491 * inf-child.c (inf_child_target::has_all_memory)
492 (inf_child_target::has_memory, inf_child_target::has_stack)
493 (inf_child_target::has_registers)
494 (inf_child_target::has_execution): Delete.
495 * inf-child.h (inf_child_target) <has_all_memory, has_memory,
496 has_stack, has_registers, has_execution>: Delete.
497 * process-stratum-target.c
498 (process_stratum_target::has_all_memory)
499 (process_stratum_target::has_memory)
500 (process_stratum_target::has_stack)
501 (process_stratum_target::has_registers)
502 (process_stratum_target::has_execution): New.
503 * process-stratum-target.h (process_stratum_target)
504 <has_all_memory, has_memory, has_stack, has_registers,
505 has_execution>: New method overrides.
506 * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
507 has_memory, has_stack, has_registers, has_execution>: Delete.
508 * remote-sim.c (gdbsim_target) <has_stack, has_registers,
509 has_execution>: Delete.
510 * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
511 has_registers, has_execution>: Delete.
512 * target.c (default_child_has_all_memory)
513 (default_child_has_memory, default_child_has_stack)
514 (default_child_has_registers, default_child_has_execution):
515 Delete.
516 * target.h (default_child_has_all_memory)
517 (default_child_has_memory, default_child_has_stack)
518 (default_child_has_registers, default_child_has_execution):
519 Delete.
520 * tracefile.h (tracefile_target) <has_execution>: New override.
521
522 2018-11-30 Pedro Alves <palves@redhat.com>
523
524 * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
525 * bsd-kvm.c: Include "process-stratum-target.h".
526 (bsd_kvm_target): Now inherits from process_stratum_target.
527 (bsd_kvm_target::bsd_kvm_target): Default it.
528 * corelow.c: Include "process-stratum-target.h".
529 (core_target): Now inherits from process_stratum_target.
530 (core_target::core_target): Don't set to_stratum here.
531 * inf-child.c (inf_child_target::inf_child_target): Delete.
532 * inf-child.h: Include "process-stratum-target.h".
533 (inf_child_target): Inherit from process_stratum_target.
534 (inf_child_target) <inf_child_target>: Default it.
535 <can_async_p, supports_non_stop, supports_disable_randomization>:
536 Delete overrides.
537 * process-stratum-target.c: New file.
538 * process-stratum-target.h: New file.
539 * remote-sim.c: Include "process-stratum-target.h".
540 (gdbsim_target): Inherit from process_stratum_target.
541 <gdbsim_target>: Default it.
542 * remote.c: Include "process-stratum-target.h".
543 (remote_target): Inherit from process_stratum_target.
544 <remote_target>: Default it.
545 * target.c (default_thread_address_space)
546 (default_thread_architecture): Delete.
547 * target.h (target_ops) <thread_architecture>: Now returns NULL by
548 default.
549 <thread_address_space>: Ditto.
550 * test-target.h: Include "process-stratum-target.h" instead of
551 "target.h".
552 (test_target_ops): Inherit from process_stratum_target.
553 <test_target_ops>: Default it.
554 * tracefile.c (tracefile_target::tracefile_target): Delete.
555 * tracefile.h: Include "process-stratum-target.h".
556 (tracefile_target): Inherit from process_stratum_target.
557 <tracefile_target>: Default it.
558 * target-delegates.c: Regenerate.
559
560 2018-11-30 Pedro Alves <palves@redhat.com>
561
562 * Makefile.in (COMMON_SFILES): Add test-target.c.
563 * gdbarch-selftests.c: Include "test-target.h".
564 * regcache.c: Include "test-target.h".
565 * target.c (test_target_info, test_target_ops::info): Move to ...
566 * test-target.c: ... this new file.
567 * target.h (test_target_ops): Move to ...
568 * test-target.h: ... this new file.
569
570 2018-11-29 Philippe Waroquiers <philippe.waroquiers@skynet.be>
571
572 * source.c (forward_search_command): Fix leak by using
573 xrealloc even for the first allocation in the loop, as buf
574 is static.
575
576 2018-11-29 Rajendra SY <rajendra.sy@gmail.com>
577
578 PR gdb/23093
579 * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
580 (fbsd_gdb_signal_to_target): New.
581 (fbsd_init_abi): Install gdbarch "signal_from_target" and
582 "signal_to_target" methods.
583
584 2018-11-29 Tom Tromey <tom@tromey.com>
585
586 * valarith.c (value_x_unop): Don't set argvec[3].
587
588 2018-11-26 Simon Marchi <simon.marchi@ericsson.com>
589
590 PR gdb/23917
591 * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
592 semicolon.
593
594 2018-11-26 Pedro Alves <palves@redhat.com>
595
596 * procfs.c (procfs_notice_thread): Replace uses of
597 in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
598 * sol-thread.c (sol_thread_target::wait)
599 (sol_update_thread_list_callback): Likewise.
600
601 2018-11-25 Tom Tromey <tom@tromey.com>
602
603 * ui-out.c (ui_out::field_fmt): Remove comment.
604 * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
605 * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
606
607 2018-11-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
608
609 * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
610 leak in open_source_file' has been partially undone by '2179fbc36d23
611 Return scoped_fd from open_source_file'. Re-add the transfer of
612 current s->fullname to the unique_xmalloc_ptr fullname given
613 to find_and_open_source.
614
615 2018-11-23 Pedro Alves <palves@redhat.com>
616
617 * gdbthread.h (enum thread_state): Move comments here.
618 (is_running, is_stopped, is_exited): Remove declarations.
619
620 2018-11-22 Pedro Alves <palves@redhat.com>
621
622 * Makefile.in (COMMON_SFILES): Add thread-iter.c.
623 * breakpoint.c (breakpoints_should_be_inserted_now): Replace
624 ALL_NON_EXITED_THREADS with all_non_exited_threads.
625 (print_one_breakpoint_location): Replace ALL_INFERIORS with
626 all_inferiors.
627 * bsd-kvm.c: Include inferior.h.
628 * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
629 with all_non_exited_threads.
630 * common/filtered-iterator.h: New.
631 * common/safe-iterator.h: New.
632 * corelow.c (core_target_open): Don't call init_thread_list here.
633 * darwin-nat.c (thread_info_from_private_thread_info): Replace
634 ALL_THREADS with all_threads.
635 * fbsd-nat.c (fbsd_nat_target::resume): Replace
636 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
637 * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
638 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
639 * fork-child.c (postfork_hook): Don't call init_thread_list here.
640 * gdbarch-selftests.c (register_to_value_test): Adjust.
641 * gdbthread.h: Don't include "inferior.h" here.
642 (struct inferior): Forward declare.
643 (enum step_over_calls_kind): Moved here from inferior.h.
644 (thread_info::deletable): Definition moved to thread.c.
645 (find_thread_ptid (inferior *, ptid_t)): Declare.
646 (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
647 Include "thread-iter.h".
648 (all_threads, all_non_exited_threads, all_threads_safe): New.
649 (any_thread_p): Declare.
650 (thread_list): Delete.
651 * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
652 all_non_exited_threads.
653 (proceed_after_attach_callback): Delete.
654 (proceed_after_attach): Take an inferior pointer instead of an
655 integer PID. Adjust to use range-for.
656 (attach_post_wait): Pass down inferior pointer instead of pid.
657 Use range-for instead of ALL_NON_EXITED_THREADS.
658 (detach_command): Remove init_thread_list call.
659 * inferior-iter.h: New.
660 * inferior.c (struct delete_thread_of_inferior_arg): Delete.
661 (delete_thread_of_inferior): Delete.
662 (delete_inferior, exit_inferior_1): Use range-for with
663 inf->threads_safe() instead of iterate_over_threads.
664 (inferior_appeared): Call init_thread_list here.
665 (discard_all_inferiors): Use all_non_exited_inferiors.
666 (find_inferior_id, find_inferior_pid): Use all_inferiors.
667 (iterate_over_inferiors): Use all_inferiors_safe.
668 (have_inferiors, number_of_live_inferiors): Use
669 all_non_exited_inferiors.
670 (number_of_inferiors): Use all_inferiors and std::distance.
671 (print_inferior): Use all_inferiors.
672 * inferior.h: Include gdbthread.h.
673 (enum step_over_calls_kind): Moved to gdbthread.h.
674 (struct inferior) <thread_list>: New field.
675 <threads, non_exited_threads, threads_safe>: New methods.
676 (ALL_INFERIORS): Delete.
677 Include "inferior-iter.h".
678 (ALL_NON_EXITED_INFERIORS): Delete.
679 (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
680 functions.
681 * inflow.c (child_interrupt, child_pass_ctrlc): Replace
682 ALL_NON_EXITED_THREADS with all_non_exited_threads.
683 * infrun.c (follow_exec): Use all_threads_safe.
684 (clear_proceed_status, proceed): Use all_non_exited_threads.
685 (init_wait_for_inferior): Don't clear inline frame state here.
686 (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
687 all_threads instead of ALL_NON_EXITED_THREADS.
688 (random_pending_event_thread): Use all_non_exited_threads instead
689 of ALL_NON_EXITED_THREADS. Use a lambda for repeated code.
690 (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
691 instead of ALL_NON_EXITED_THREADS.
692 (handle_no_resumed): Use all_non_exited_threads instead of
693 ALL_NON_EXITED_THREADS. Use all_inferiors instead of
694 ALL_INFERIORS.
695 (restart_threads, switch_back_to_stepped_thread): Use
696 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
697 * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
698 all_inferiors.
699 (kill_unfollowed_fork_children): Use inf->non_exited_threads
700 instead of ALL_NON_EXITED_THREADS.
701 * linux-tdep.c (linux_make_corefile_notes): Use
702 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
703 * linux-thread-db.c (thread_db_target::update_thread_list):
704 Replace ALL_INFERIORS with all_inferiors.
705 (thread_db_target::thread_handle_to_thread_info): Use
706 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
707 * mi/mi-interp.c (multiple_inferiors_p): New.
708 (mi_on_resume_1): Simplify using all_non_exited_threads and
709 multiple_inferiors_p.
710 * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
711 instead of ALL_NON_EXITED_THREADS.
712 * nto-procfs.c (nto_procfs_target::open): Don't call
713 init_thread_list here.
714 * record-btrace.c (record_btrace_target_open)
715 (record_btrace_target::stop_recording)
716 (record_btrace_target::close)
717 (record_btrace_target::record_is_replaying)
718 (record_btrace_target::resume, record_btrace_target::wait)
719 (record_btrace_target::record_stop_replaying): Use
720 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
721 * record-full.c (record_full_wait_1): Use all_non_exited_threads
722 instead of ALL_NON_EXITED_THREADS.
723 * regcache.c (cooked_read_test): Remove reference to global
724 thread_list.
725 * remote-sim.c (gdbsim_target::create_inferior): Don't call
726 init_thread_list here.
727 * remote.c (remote_target::update_thread_list): Use
728 all_threads_safe instead of ALL_NON_EXITED_THREADS.
729 (remote_target::process_initial_stop_replies): Replace
730 ALL_INFERIORS with all_non_exited_inferiors and use
731 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
732 (remote_target::open_1): Don't call init_thread_list here.
733 (remote_target::append_pending_thread_resumptions)
734 (remote_target::remote_resume_with_hc): Use all_non_exited_threads
735 instead of ALL_NON_EXITED_THREADS.
736 (remote_target::commit_resume)
737 (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
738 with all_non_exited_inferiors and use all_non_exited_threads
739 instead of ALL_NON_EXITED_THREADS.
740 (remote_target::kill_new_fork_children): Use
741 all_non_exited_threads instead of ALL_NON_EXITED_THREADS. Remove
742 init_thread_list and init_wait_for_inferior calls.
743 (remote_target::remote_btrace_maybe_reopen)
744 (remote_target::thread_handle_to_thread_info): Use
745 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
746 * target.c (target_terminal::restore_inferior)
747 (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
748 all_non_exited_inferiors.
749 * thread-iter.c: New file.
750 * thread-iter.h: New file.
751 * thread.c: Include "inline-frame.h".
752 (thread_list): Delete.
753 (clear_thread_inferior_resources): Call clear_inline_frame_state.
754 (init_thread_list): Use all_threads_safe instead of
755 ALL_THREADS_SAFE. Adjust to per-inferior thread lists.
756 (new_thread): Adjust to per-inferior thread lists.
757 (add_thread_silent): Pass inferior to find_thread_ptid.
758 (thread_info::deletable): New, moved from the header.
759 (delete_thread_1): Adjust to per-inferior thread lists.
760 (find_thread_global_id): Use inf->threads().
761 (find_thread_ptid): Use find_inferior_ptid and pass inferior to
762 find_thread_ptid.
763 (find_thread_ptid(inferior*, ptid_t)): New overload.
764 (iterate_over_threads): Use all_threads_safe.
765 (any_thread_p): New.
766 (thread_count): Use all_threads and std::distance.
767 (live_threads_count): Use all_non_exited_threads and
768 std::distance.
769 (valid_global_thread_id): Use all_threads.
770 (in_thread_list): Use find_thread_ptid.
771 (first_thread_of_inferior): Adjust to per-inferior thread lists.
772 (any_thread_of_inferior, any_live_thread_of_inferior): Use
773 inf->non_exited_threads().
774 (prune_threads, delete_exited_threads): Use all_threads_safe.
775 (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
776 (set_resumed, set_running): Use all_non_exited_threads.
777 (is_thread_state, is_stopped, is_exited, is_running)
778 (is_executing): Delete.
779 (set_executing, set_stop_requested, finish_thread_state): Use
780 all_non_exited_threads.
781 (print_thread_info_1): Use all_inferiors and all_threads.
782 (thread_apply_all_command): Use all_non_exited_threads.
783 (thread_find_command): Use all_threads.
784 (update_threads_executing): Use all_non_exited_threads.
785 * tid-parse.c (parse_thread_id): Use inf->threads.
786 * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
787
788 2018-11-22 Pedro Alves <palves@redhat.com>
789
790 * infrun.c (follow_exec) <set follow-exec new>: Add thread and
791 switch to it before calling into try_open_exec_file.
792
793 2018-11-22 Pedro Alves <palves@redhat.com>
794
795 * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
796 inferior_thread instead of find_thread_ptid, and only when
797 inferior_ptid is not null_ptid.
798 * inferior.c (add_inferior): Don't include target_pid_to_str
799 output when the inferior is not started.
800 * python/py-inferior.c (python_on_normal_stop): Don't use
801 find_thread_ptid.
802 (tui_on_user_selected_context_changed): Use inferior_thread
803 instead of find_thread_ptid, and only when inferior_ptid is not
804 null_ptid.
805
806 2018-11-21 Benno Fünfstück <benno.fuenfstueck@gmail.com>
807
808 PR python/23714
809 * gdb/python/python.c (execute_gdb_command): Call
810 prevent_dont_repeat earlier to avoid affecting dont_repeat.
811
812 2018-11-21 Andrew Burgess <andrew.burgess@embecosm.com>
813
814 * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
815 (HFILES_NO_SRCDIR): Add arch/riscv.h.
816 * arch/riscv.c: New file.
817 * arch/riscv.h: New file.
818 * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
819 this list, and add arch/riscv.o.
820 * features/Makefile: Add riscv features.
821 * features/riscv/32bit-cpu.c: New file.
822 * features/riscv/32bit-cpu.xml: New file.
823 * features/riscv/32bit-csr.c: New file.
824 * features/riscv/32bit-csr.xml: New file.
825 * features/riscv/32bit-fpu.c: New file.
826 * features/riscv/32bit-fpu.xml: New file.
827 * features/riscv/64bit-cpu.c: New file.
828 * features/riscv/64bit-cpu.xml: New file.
829 * features/riscv/64bit-csr.c: New file.
830 * features/riscv/64bit-csr.xml: New file.
831 * features/riscv/64bit-fpu.c: New file.
832 * features/riscv/64bit-fpu.xml: New file.
833 * features/riscv/rebuild-csr-xml.sh: New file.
834 * riscv-tdep.c: Add 'arch/riscv.h' include.
835 (riscv_gdb_reg_names): Delete.
836 (csr_reggroup): New global.
837 (struct riscv_register_alias): Delete.
838 (struct riscv_register_feature): New structure.
839 (riscv_register_aliases): Delete.
840 (riscv_xreg_feature): New global.
841 (riscv_freg_feature): New global.
842 (riscv_virtual_feature): New global.
843 (riscv_csr_feature): New global.
844 (riscv_create_csr_aliases): New function.
845 (riscv_read_misa_reg): Delete.
846 (riscv_has_feature): Delete.
847 (riscv_isa_xlen): Simplify, just return cached xlen.
848 (riscv_isa_flen): Simplify, just return cached flen.
849 (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
850 (riscv_register_name): Update to make use of tdesc_register_name.
851 Look up xreg and freg names in the new globals riscv_xreg_feature
852 and riscv_freg_feature. Don't supply csr aliases here.
853 (riscv_fpreg_q_type): Delete.
854 (riscv_register_type): Use tdesc_register_type in almost all
855 cases, override the returned type in a few specific cases only.
856 (riscv_print_one_register_info): Handle errors reading registers.
857 (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
858 registers that are otherwise unknown to GDB. Also check the
859 csr_reggroup.
860 (riscv_print_registers_info): Remove assert about upper register
861 number, and use gdbarch_register_reggroup_p instead of
862 short-cutting.
863 (riscv_find_default_target_description): New function.
864 (riscv_check_tdesc_feature): New function.
865 (riscv_add_reggroups): New function.
866 (riscv_setup_register_aliases): New function.
867 (riscv_init_reggroups): New function.
868 (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
869 setup register groups. Register new riscv debug variable.
870 * riscv-tdep.h: Add 'arch/riscv.h' include.
871 (struct gdbarch_tdep): Remove abi union, and add
872 riscv_gdbarch_features field. Remove cached quad floating point
873 type, and provide initialisation for double type field.
874 * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
875 the list of targets using the feature based target descriptions.
876 * NEWS: Mention target description support.
877
878 2018-11-21 Pedro Alves <palves@redhat.com>
879
880 * valops.c (find_method_list, value_find_oload_method_list)
881 (find_overload_match, find_oload_champ): Rename parameters and
882 locals.
883
884 2018-11-21 Pedro Alves <palves@redhat.com>
885
886 * valops.c (find_method_list): Replace pointer and length
887 parameters with an gdb::array_view. Adjust.
888 (value_find_oload_method_list): Likewise.
889 (find_overload_match): Use gdb::array_view for methods list.
890 Adjust to find_oload_champ interface change.
891 (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
892 'num_fns' parameter now a size_t. Eliminate 'fn_count' local.
893
894 2018-11-21 Pedro Alves <palves@redhat.com>
895
896 * gdbtypes.c (compare_badness): Change type of parameters to const
897 reference. Adjust to badness_vector being a std::vector now.
898 (rank_function): Adjust to badness_vector being a std::vector now.
899 * gdbtypes.h (badness_vector): Now a typedef to std::vector.
900 (LENGTH_MATCH): Delete.
901 (compare_badness): Change type of parameters to const reference.
902 (rank_function): Return a badness_vector by value now.
903 (find_overload_match): Adjust to badness_vector being a
904 std::vector now. Remove cleanups.
905 (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
906 badness_vector pointer.
907 (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
908 a badness_vector pointer. Adjust to badness_vector being a
909 std::vector now. Remove cleanups.
910 (find_oload_champ): 'oload_champ_bv' parameter now
911 a badness_vector pointer. Adjust to badness_vector being a
912 std::vector now. Remove cleanups.
913
914 2018-11-21 Pedro Alves <palves@redhat.com>
915
916 * cp-support.c (sym_return_val_size, sym_return_val_index)
917 (sym_return_val): Delete.
918 (overload_list_add_symbol): Add std::vector parameter. Adjust to
919 add to the vector.
920 (make_symbol_overload_list): Adjust to return a std::vector
921 instead of maintaining a global open coded vector.
922 (make_symbol_overload_list_block): Add std::vector parameter.
923 (make_symbol_overload_list_block): Rename to ...
924 (add_symbol_overload_list_block): ... this and add std::vector
925 parameter.
926 (make_symbol_overload_list_namespace): Rename to ...
927 (add_symbol_overload_list_namespace): ... this and add std::vector
928 parameter.
929 (make_symbol_overload_list_adl_namespace): Rename to ...
930 (add_symbol_overload_list_adl_namespace): ... this and add
931 std::vector parameter.
932 (make_symbol_overload_list_adl): Delete.
933 (add_symbol_overload_list_adl): New.
934 (make_symbol_overload_list_using): Rename to ...
935 (add_symbol_overload_list_using): ... this and add std::vector
936 parameter.
937 (make_symbol_overload_list_qualified): Rename to ...
938 (add_symbol_overload_list_qualified): ... this and add std::vector
939 parameter.
940 * cp-support.h: Include "common/array-view.h" and <vector>.
941 (make_symbol_overload_list): Change return type to std::vector.
942 (make_symbol_overload_list_adl): Delete declaration.
943 (add_symbol_overload_list_adl): New declaration.
944 * valops.c (find_overload_match): Local 'oload_syms' now a
945 std::vector.
946 (find_oload_champ_namespace): 'oload_syms' parameter now a
947 std::vector pointer.
948 (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
949 std::vector pointer. Adjust to new make_symbol_overload_list
950 interface.
951
952 2018-11-21 Pedro Alves <palves@redhat.com>
953
954 * common/array-view.h (array_view::splice(size_type, size_t)): New.
955 (array_view::splice(size_type)): New.
956 * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
957 * extension.c (xmethod_worker::get_arg_types): Adjust to return an
958 std::vector.
959 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
960 * extension.h: Include "common/array-view.h".
961 (xmethod_worker::invoke): Adjust to use gdb::array_view.
962 (xmethod_worker::get_arg_types): Adjust to return an std::vector.
963 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
964 (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
965 (xmethod_worker::do_get_result_type): Adjust to use
966 gdb::array_view.
967 * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
968 * gdbtypes.h: Include "common/array-view.h".
969 (rank_function): Adjust to use gdb::array_view.
970 * python/py-xmethods.c (python_xmethod_worker::invoke)
971 (python_xmethod_worker::do_get_arg_types)
972 (python_xmethod_worker::do_get_result_type)
973 (python_xmethod_worker::invoke): Adjust to new interfaces.
974 * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
975 (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
976 * valops.c (find_overload_match, find_oload_champ_namespace)
977 (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
978 gdb:array_view and the new xmethod_worker interfaces.
979 * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
980 gdb::array_view.
981 * value.h (find_overload_match, result_type_of_xmethod)
982 (call_xmethod): Adjust to use gdb::array_view.
983 * unittests/array-view-selftests.c: Add slicing tests.
984
985 2018-11-21 Pedro Alves <palves@redhat.com>
986
987 * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
988 * common/array-view.h (make_array_view): New.
989 * compile/compile-object-run.c (compile_object_run): Adjust to
990 pass an array_view.
991 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
992 * eval.c (eval_call): Adjust to pass an array_view.
993 (evaluate_subexp_standard): Adjust to pass an array_view.
994 * gcore.c (call_target_sbrk): Adjust to pass an array_view.
995 * guile/scm-value.c (gdbscm_value_call): Likewise.
996 * infcall.c (push_dummy_code): Replace pointer + size parameters
997 with an array_view parameter.
998 (call_function_by_hand, call_function_by_hand_dummy): Likewise and
999 adjust.
1000 * infcall.h: Include "common/array-view.h".
1001 (call_function_by_hand, call_function_by_hand_dummy): Replace
1002 pointer + size parameters with an array_view parameter.
1003 * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
1004 * linux-tdep.c (linux_infcall_mmap): Likewise.
1005 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1006 (value_nsstring, print_object_command): Likewise.
1007 * python/py-value.c (valpy_call): Likewise.
1008 * rust-lang.c (rust_evaluate_funcall): Likewise.
1009 * spu-tdep.c (flush_ea_cache): Likewise.
1010 * valarith.c (value_x_binop, value_x_unop): Likewise.
1011 * valops.c (value_allocate_space_in_inferior): Likewise.
1012 * unittests/array-view-selftests.c (run_tests): Add
1013 gdb::make_array_view test.
1014
1015 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
1016
1017 * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
1018 than a fixed size buffer.
1019
1020 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
1021
1022 * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1023 and remove insertion of extra spaces in GDB's output.
1024 * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1025 Layout field into a temporary buffer, and then output it as a
1026 string field.
1027
1028 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1029
1030 * NEWS: Document the language choice done by
1031 'info [types|functions|variables]|rbreak'.
1032
1033 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1034
1035 * symtab.c (treg_matches_sym_type_name): Use
1036 scoped_switch_to_sym_language_if_auto instead of local logic.
1037 (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1038 to switch to SYM language when language mode is auto.
1039
1040 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1041
1042 * language.h (scoped_switch_to_sym_language_if_auto): New class.
1043
1044 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1045
1046 * symtab.c (search_symbols): Properly check absence of type regexp
1047 before entering the loop scanning the minimal symbols.
1048
1049 2018-11-20 John Darrington <john@darrington.wattle.id.au>
1050
1051 * s12z-tdep.c (s12z_extract_return_value): New function.
1052 (inv_reg_perm) New array.
1053 (s12z_return_value): Populate readbuf if non-null.
1054
1055 2018-11-20 Eli Zaretskii <eliz@gnu.org>
1056
1057 * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1058 with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1059 to MinGW fixed by Gnulib.
1060 (O_NOINHERIT): Define if not defined.
1061
1062 2018-11-19 John Darrington <john@darrington.wattle.id.au>
1063
1064 * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1065
1066 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1067
1068 * infrun.c (displaced_step_inferior_state) <next>: Remove.
1069
1070 2018-11-19 Tom Tromey <tom@tromey.com>
1071
1072 * source.c (get_filename_and_charpos): Return void.
1073
1074 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
1075
1076 * skip.c (_initialize_step_skip): Fix "info skip" help.
1077
1078 2018-11-16 Tom Tromey <tom@tromey.com>
1079
1080 PR rust/23625:
1081 * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1082
1083 2018-11-19 Simon Marchi <simon.marchi@ericsson.com>
1084
1085 * infrun.c (displaced_step_inferior_states): Change type to
1086 std::forward_list.
1087 (get_displaced_stepping_state): Adjust.
1088 (displaced_step_in_progress_any_inferior): Adjust.
1089 (add_displaced_stepping_state): Adjust.
1090 (remove_displaced_stepping_state): Adjust.
1091
1092 2018-11-18 Tom Tromey <tom@tromey.com>
1093
1094 PR build/23814:
1095 * target-delegates.c: Rebuild.
1096 * ia64-linux-nat.c (class ia64_linux_nat_target)
1097 <have_steppable_watchpoint>: Use override. Return true, not 1.
1098 (ia64_linux_nat_target::can_use_hw_breakpoint): Rename. Remove
1099 "self" argument.
1100 (ia64_linux_nat_target::low_new_thread): Rename.
1101 (class ia64_linux_nat_target) <read_description>: Don't declare.
1102 * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1103 bool.
1104
1105 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1106
1107 PR gdb/22736:
1108 * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1109 lang_struct_return code.
1110
1111 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1112
1113 * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1114 return_method.
1115 * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1116 * amd64-tdep.c (amd64_push_arguments): Likewise.
1117 (amd64_push_dummy_call): Likewise.
1118 * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1119 * arc-tdep.c (arc_push_dummy_call): Likewise.
1120 * arm-tdep.c (arm_push_dummy_call): Likewise.
1121 * avr-tdep.c (avr_push_dummy_call): Likewise.
1122 * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1123 * cris-tdep.c (cris_push_dummy_call): Likewise.
1124 * csky-tdep.c (csky_push_dummy_call): Likewise.
1125 * frv-tdep.c (frv_push_dummy_call): Likewise.
1126 * gdbarch.c: Regenerate.
1127 * gdbarch.h: Regenerate.
1128 * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1129 return_method.
1130 * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1131 * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1132 (hppa64_push_dummy_call): Likewise.
1133 * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1134 * i386-tdep.c (i386_push_dummy_call): Likewise.
1135 * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1136 * infcall.c (call_function_by_hand_dummy): Likewise.
1137 * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1138 * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1139 * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1140 * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1141 * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1142 * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1143 * mep-tdep.c (mep_push_dummy_call): Likewise.
1144 * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1145 (mips_n32n64_push_dummy_call): Likewise.
1146 (mips_o32_push_dummy_call): Likewise.
1147 (mips_o64_push_dummy_call): Likewise.
1148 * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1149 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1150 * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1151 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1152 * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1153 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1154 (ppc64_sysv_abi_push_dummy_call): Likewise.
1155 * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1156 (ppc64_sysv_abi_push_dummy_call): Likewise.
1157 * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1158 * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1159 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1160 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1161 * rx-tdep.c (rx_push_dummy_call): Likewise.
1162 * s390-tdep.c (s390_push_dummy_call): Likewise.
1163 * score-tdep.c (score_push_dummy_call): Likewise.
1164 * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1165 (sh_push_dummy_call_nofpu): Likewise.
1166 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1167 (sparc32_push_dummy_call): Likewise.
1168 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1169 (sparc64_push_dummy_call): Likewise.
1170 * spu-tdep.c (spu_push_dummy_call): Likewise.
1171 * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1172 * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1173 * v850-tdep.c (v850_push_dummy_call): Likewise.
1174 * vax-tdep.c (vax_push_dummy_call): Likewise.
1175 * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1176 * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1177
1178 2018-11-16 Alan Hayward <alan.hayward@arm.com>
1179
1180 * gdbarch.sh (enum function_call_return_method): Add enum.
1181 * gdbarch.h: Regenerate.
1182 * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1183
1184 2018-11-15 Joel Brobecker <brobecker@adacore.com>
1185
1186 * unittests/copy_bitwise-selftests.c: New file.
1187 * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1188 (selftests::copy_bitwise_tests): Delete, moving this code to
1189 unittests/copy_bitwise-selftests.c instead.
1190 (_initialize_utils): Do not register copy_bitwise tests.
1191 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1192 unittests/copy_bitwise-selftests.c.
1193
1194 2018-11-14 Joel Brobecker <brobecker@adacore.com>
1195
1196 * ada-lang.c (move_bits): Delete. Update all callers to use
1197 copy_bitwise instead.
1198 * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1199 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1200 Move from here to utils.c.
1201 (_initialize_dwarf2loc): Remove call to register copy_bitwise
1202 selftests.
1203 * utils.h (copy_bitwise): Add declaration.
1204 * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1205 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1206 Moved here from dwarf2loc.c.
1207 (_initialize_utils): Register copy_bitwise selftests.
1208
1209 2018-11-14 Jim Wilson <jimw@sifive.com>
1210
1211 * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1212 (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1213 then increment next_regnum if odd.
1214 (riscv_arg_location): New arg is_unnamed. Set ainfo->is_unnamed.
1215 (riscv_push_dummy_call): New local ftype. Call check_typedef to set
1216 function type. Pass new arg to riscv_arg_location based on function
1217 type.
1218 (riscv_return_value): Pass new arg to riscv_arg_location.
1219
1220 * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1221 (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1222 of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1223
1224 * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1225 setting len. New local align, set to max of arg align and xlen,
1226 and pass to first riscv_assign_stack_location call.
1227
1228 2018-11-12 Simon Marchi <simon.marchi@polymtl.ca>
1229
1230 * skip.c (complete_skip_number): New function.
1231 (_initialize_step_skip): Add completers to some skip commands.
1232
1233 2018-11-09 Tom Tromey <tom@tromey.com>
1234
1235 * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1236 (struct remote_g_packet_data): Derive from allocate_on_obstack.
1237 <guesses>: Now a std::vector.
1238 (remote_g_packet_data_init, register_remote_g_packet_guess):
1239 Update.
1240 (remote_read_description_p): Update. Return bool.
1241 (remote_target::read_description): Update.
1242 (struct remote_g_packet_guess): Add constructor.
1243
1244 2018-11-09 Tom Tromey <tom@tromey.com>
1245
1246 * common/scoped_fd.h (class scoped_fd): Add move constructor and
1247 move assignment operator.
1248 * psymtab.c (psymtab_to_fullname): Update.
1249 * source.h (open_source_file): Return scoped_fd.
1250 (find_and_open_source): Likewise.
1251 * source.c (open_source_file): Return scoped_fd.
1252 (get_filename_and_charpos): Update.
1253 (print_source_lines_base): Update. Use scoped_fd::to_file.
1254 (forward_search_command): Likewise.
1255 (reverse_search_command): Likewise.
1256 (find_and_open_source): Return scoped_fd.
1257 * tui/tui-source.c (tui_set_source_content): Update. Use
1258 gdb_file_up.
1259
1260 2018-11-09 John Baldwin <jhb@FreeBSD.org>
1261
1262 * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1263 overflow.
1264
1265 2018-11-09 Hafiz Abid Qadeer <abidh@codesourcery.com>
1266
1267 * configure: Regenerate.
1268
1269 2018-11-09 Tom de Vries <tdevries@suse.de>
1270
1271 * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1272 unconditionally, to set the language of the symbol. Manage freeing
1273 returned pointer using gdb::unique_xmalloc_ptr.
1274
1275 2018-11-08 Tom Tromey <tom@tromey.com>
1276
1277 * record.c (require_record_target): Upper-case "<TAB>".
1278
1279 2018-11-08 Tom Tromey <tom@tromey.com>
1280
1281 * python/lib/gdb/command/pretty_printers.py
1282 (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1283
1284 2018-11-08 Tom Tromey <tom@tromey.com>
1285
1286 PR gdb/23555:
1287 PR gdb/23838:
1288 * target.h (target_supports_terminal_ours): Return bool.
1289 * target.c (target_supports_terminal_ours): Handle case where
1290 current_top_target returns nullptr. Return bool.
1291
1292 2018-11-08 Joel Brobecker <brobecker@adacore.com>
1293
1294 * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1295 return the correct count for potential HFAs.
1296
1297 2018-11-08 Jan Beulich <jbeulich@suse.com>
1298
1299 * i387-tdep.c (i387_supply_xsave): Split handling of
1300 X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1301 (i387_collect_xsave): Likewise.
1302
1303 2018-11-08 Andrew Burgess <andrew.burgess@embecosm.com>
1304
1305 * riscv-tdep.c (riscv_insn::decode): Update header comment.
1306 (riscv_frame_this_id): Catch errors thrown while building the
1307 frame cache, leave the frame id as the default, which is the outer
1308 frame id.
1309
1310 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1311
1312 * ada-lang.c (read_atcb): Only set task_info->called_task if
1313 task_info->state == Entry_Caller_Sleep.
1314 (print_ada_task_info): Do not check task_info->state before
1315 checking task_info->called_task.
1316 (info_task): Likewise.
1317
1318 2018-11-07 Joel Brobecker <brobecker@adacore.com>
1319
1320 * ada-tasks.c (read_atcb): Clear task_info before computing
1321 the value of each of its fields.
1322
1323 2018-11-07 Andrew Burgess <andrew.burgess@embecosm.com>
1324
1325 * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1326 NULL before dereferencing it.
1327
1328 2018-11-06 Tom de Vries <tdevries@suse.de>
1329
1330 * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1331 program headers.
1332
1333 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
1334
1335 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1336 so that it applies to uclinux as well.
1337
1338 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
1339
1340 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1341 when on AAPCS.
1342
1343 2018-11-06 John Baldwin <jhb@FreeBSD.org>
1344
1345 * riscv-fbsd-nat.c (getregs_supplies): Return true for
1346 RISCV_CSR_SSTATUS_REGNUM.
1347
1348 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1349
1350 * source.c (open_source_file): Fix leak by transferring the
1351 current s->fullname to the unique_xmalloc_ptr fullname given
1352 to find_and_open_source.
1353
1354 2018-11-04 Tom Tromey <tom@tromey.com>
1355
1356 * varobj.c (install_default_visualizer): Update.
1357 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1358 Return gdbpy_ref.
1359 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1360 (find_pretty_printer_from_progspace)
1361 (find_pretty_printer_from_gdb, find_pretty_printer)
1362 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1363 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1364 Update.
1365
1366 2018-11-04 Tom Tromey <tom@tromey.com>
1367
1368 * python/python.c (gdbpy_parameter_value): Update.
1369 * python/python-internal.h (python_string_to_unicode)
1370 (python_string_to_target_python_string)
1371 (host_string_to_python_string): Return gdbpy_ref.
1372 * python/py-utils.c (python_string_to_unicode)
1373 (unicode_to_encoded_python_string)
1374 (unicode_to_target_python_string)
1375 (python_string_to_target_string)
1376 (python_string_to_target_python_string): Return gdbpy_ref.
1377 (python_string_to_host_string): Update.
1378 (host_string_to_python_string): Return gdbpy_ref.
1379 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1380 (stpy_fullname): Update.
1381 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1382 Update.
1383 * python/py-prettyprint.c (print_string_repr): Update.
1384 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1385 (objfpy_get_build_id): Update.
1386 * python/py-breakpoint.c (bppy_get_location)
1387 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1388 Update.
1389
1390 2018-11-04 Tom Tromey <tom@tromey.com>
1391
1392 * python/python-internal.h (gdb_py_object_from_longest)
1393 (gdb_py_object_from_ulongest): Return gdbpy_ref.
1394 * python/py-value.c (valpy_int): Update.
1395 * python/py-utils.c (gdb_py_object_from_longest): Return
1396 gdbpy_ref.
1397 (gdb_py_object_from_ulongest): Likewise.
1398 * python/py-type.c (typy_get_alignof): Update.
1399 * python/py-linetable.c (ltpy_get_all_source_lines)
1400 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1401 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1402
1403 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1404
1405 * ada-lang.c (_initialize_ada_language): Fix typo.
1406
1407 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1408
1409 * language.c (type): Remove.
1410 (_initialize_language): Remove assignment to type.
1411
1412 2018-11-02 Joel Brobecker <brobecker@adacore.com>
1413
1414 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1415 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1416 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1417 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1418 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1419 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1420 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1421 and aarch64-ravenscar-thread.o.
1422 * NEWS: Add entry documenting Ravenscar tasking support
1423 on AArch64 ELF.
1424
1425 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
1426
1427 * symtab.c (info_functions_command): Initialize quiet flag.
1428 * stack.c (info_args_command): Likewise.
1429
1430 2018-11-01 Jim Wilson <jimw@sifive.com>
1431
1432 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1433 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
1434 debugging messages.
1435
1436 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1437
1438 * ada-lang.c (ada_watch_location_expression): New function.
1439 (ada_language_defn): Set la_watch_location_expression to
1440 ada_watch_location_expression.
1441
1442 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1443
1444 * print-utils.c (int_string): Remove unnecessary trailing spaces.
1445
1446 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1447
1448 * rs6000-tdep.c (skip_prologue): Fix potential negative left
1449 shifting.
1450
1451 2018-11-01 Jerome Guitton <guitton@adacore.com>
1452 Joel Brobecker <brobecker@adacore.com>
1453
1454 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1455 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1456 * arm-pikeos-tdep.c: New file.
1457 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1458 embedded system.
1459 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1460
1461 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
1462
1463 * common/pathstuff.c (get_standard_temp_dir): New.
1464 * common/pathstuff.h (get_standard_temp_dir): New.
1465 * config.in: Re-generate.
1466 * configure: Re-generate.
1467 * configure.ac: Don't check for mkdtemp.
1468 * gnulib/aclocal-m4-deps.mk: Re-generate.
1469 * gnulib/aclocal.m4: Re-generate.
1470 * gnulib/config.in: Re-generate.
1471 * gnulib/configure: Re-generate.
1472 * gnulib/import/Makefile.am: Re-generate.
1473 * gnulib/import/Makefile.in: Re-generate.
1474 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1475 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1476 * gnulib/import/m4/mkdtemp.m4: New file.
1477 * gnulib/import/mkdtemp.c: New file.
1478 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1479 Add mkdtemp module.
1480 * unittests/mkdir-recursive-selftests.c (test): Use
1481 get_standard_temp_dir.
1482 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1483 ifdef.
1484 * compile/compile.c (get_compile_file_tempdir): Likewise.
1485
1486 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1487
1488 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1489 (SIG_FRAME_LR_OFFSET64): New define.
1490 (SIG_FRAME_FP_OFFSET64): New define.
1491 (aix_sighandle_frame_cache): New Function.
1492 (aix_sighandle_frame_this_id): New Function.
1493 (aix_sighandle_frame_prev_register): New Function.
1494 (aix_sighandle_frame_sniffer): New Function.
1495 (aix_sighandle_frame_unwind): New global variable.
1496 (rs6000_aix_init_osabi): Install new frame unwinder.
1497
1498 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
1499
1500 PR gdb/23835
1501 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1502 already defined.
1503
1504 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1505
1506 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1507
1508 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
1509
1510 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1511 (producer_is_icc): New function.
1512 (check_producer): Set producer_is_icc field on dwarf2_cu.
1513 (dwarf2_init_integer_type): New function.
1514 (read_base_type): Call dwarf2_init_integer_type instead of
1515 init_integer_type in all cases.
1516 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1517 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1518 LEN is greater than 0.
1519
1520 2018-10-30 Tom Tromey <tom@tromey.com>
1521
1522 * main.c (captured_main_1): Check return value of bfd_init.
1523
1524 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
1525
1526 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1527 Adjust comments.
1528
1529 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1530
1531 * procfs.c: Include common/pathstuff.h.
1532
1533 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
1534
1535 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1536 Add missing braces. No functional change.
1537
1538 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1539
1540 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1541 to report a bad option and fix indentation.
1542 * demangle.c (demangle_command): Use report_unrecognized_option_error
1543 to report a bad option and correctly report the bad option.
1544
1545 2018-10-27 Tom Tromey <tom@tromey.com>
1546
1547 PR cli/23364:
1548 * darwin-nat.c (copied_shell): New global.
1549 (may_have_sip): Rename from should_disable_startup_with_shell.
1550 (copy_shell_to_cache, maybe_cache_shell): New functions.
1551 (darwin_nat_target::create_inferior): Update. Use
1552 copied_shell.
1553
1554 2018-10-27 Tom Tromey <tom@tromey.com>
1555
1556 * unittests/scoped_fd-selftests.c (test_to_file): New function.
1557 (run_tests): Call test_to_file.
1558 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1559 temporary files.
1560 * common/scoped_fd.h (scoped_fd::to_file): New method.
1561
1562 2018-10-27 Tom Tromey <tom@tromey.com>
1563
1564 * unittests/scoped_mmap-selftests.c (test_normal): Use
1565 gdb_mkostemp_cloexec.
1566 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1567 Use gdb_mkostemp_cloexec.
1568 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1569 gnulib/config.in, gnulib/configure,
1570 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1571 gnulib/import/m4/gnulib-cache.m4,
1572 gnulib/import/m4/gnulib-comp.m4: Update.
1573 * gnulib/import/m4/mkostemp.m4: New file.
1574 * gnulib/import/m4/mkstemp.m4: Remove.
1575 * gnulib/import/mkostemp.c: New file.
1576 * gnulib/import/mkstemp.m4: Remove.
1577 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1578 mkstemp, add mkostemp. Apply new patch.
1579 * gnulib/import/stdlib.in.h: Apply patch.
1580 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1581 New file.
1582 * dwarf-index-write.c (write_psymtabs_to_index): Use
1583 gdb_mkostemp_cloexec.
1584 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1585
1586 2018-10-27 Tom Tromey <tom@tromey.com>
1587
1588 * unittests/mkdir-recursive-selftests.c: New file.
1589 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1590 unittests/mkdir-recursive-selftests.c.
1591 * dwarf-index-cache.c (mkdir_recursive): Move to
1592 common/filestuff.c.
1593 (index_cache::store): Check return value of mkdir_recursive.
1594 (create_dir_and_check, test_mkdir_recursive): Move to new file.
1595 (_initialize_index_cache): Don't register test.
1596 * common/filestuff.h (mkdir_recursive): Declare.
1597 * common/filestuff.c (mkdir_recursive): Move from
1598 dwarf-index-cache.c. Return bool.
1599
1600 2018-10-27 Tom Tromey <tom@tromey.com>
1601
1602 * dwarf-index-write.c (write_psymtabs_to_index): Move
1603 make_temp_filename to common/pathstuff.c.
1604 * common/pathstuff.h (make_temp_filename): Declare.
1605 * common/pathstuff.c (make_temp_filename): New function, moved
1606 from dwarf-index-write.c.
1607
1608 2018-10-27 Tom Tromey <tom@tromey.com>
1609
1610 * procfs.c (procfs_target::create_inferior): Use get_shell.
1611 * cli/cli-cmds.c (shell_escape): Use get_shell.
1612 * windows-nat.c (windows_nat_target::create_inferior): Use
1613 get_shell.
1614 * common/pathstuff.c (get_shell): New function.
1615 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1616 (fork_inferior): Use get_shell.
1617 * common/pathstuff.h (get_shell): Declare.
1618
1619 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1620
1621 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1622
1623 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1624
1625 * stack.c (print_variable_and_value_data): Add preg and treg.
1626 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1627 and update callers.
1628 (print_frame_arg_vars): Likewise.
1629 (prepare_reg): New function.
1630 (info_locals_command): Extract info print args and use them.
1631 (info_args_command): Likewise.
1632 (_initialize_stack): Modify on-line help.
1633 * symtab.c (treg_matches_sym_type_name): New function.
1634 (search_symbols): New arg t_regexp.
1635 (symtab_symbol_info): New args quiet, regexp, t_regexp.
1636 (info_variables_command): Extract info print args and use them.
1637 (info_functions_command): Likewise.
1638 (info_types_command): Update call to symtab_symbol_info.
1639 (_initialize_symtab): Modify on-line help.
1640 * symtab.h (treg_matches_sym_type_name): New function.
1641 (search_symbols): New t_regexp arg.
1642
1643 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1644
1645 * cli-utils.c (extract_arg_maybe_quoted): New function.
1646 (extract_info_print_args): New function.
1647 (info_print_args_help): New function.
1648 (report_unrecognized_option_error): New function.
1649 * cli-utils.h (extract_arg_maybe_quoted): New function.
1650 (extract_info_print_args): New function.
1651 (info_print_args_help): New function.
1652 (report_unrecognized_option_error): New function.
1653
1654 2018-10-26 Tom Tromey <tom@tromey.com>
1655
1656 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1657 (compute_compunit_symtab_includes): Update.
1658 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
1659 (compunit_symtab_ptr): Likewise.
1660
1661 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1662
1663 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1664 default_print_auxv_entry for specific tag values.
1665
1666 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1667
1668 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1669
1670 2018-10-26 Jim Wilson <jimw@sifive.com>
1671
1672 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1673 (riscv_linux_sigframe_init): Declare.
1674 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1675 (riscv_linux_sigframe): New.
1676 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1677 (riscv_linux_sigframe_init): Define.
1678 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1679
1680 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1681 (riscv_isa_flen): Likewise. Drop static.
1682 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1683 (riscv_isa_flen): Likewise. Declare.
1684
1685 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1686 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1687
1688 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1689 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1690 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1691 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1692 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1693 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1694 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1695 Define.
1696 (struct ppc_linux_features) <htm>: New field.
1697 (ppc_linux_no_features): Add initializer for htm field.
1698 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1699 new tdescs.
1700 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1701 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1702 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1703 Define if not already defined.
1704 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1705 and rs6000/powerpc-isa207-htm-vsx64l.
1706 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1707 rs6000/powerpc-isa207-htm-vsx64l.xml.
1708 * features/rs6000/power-htm-spr.xml: New file.
1709 * features/rs6000/power-htm-core.xml: New file.
1710 * features/rs6000/power64-htm-core.xml: New file.
1711 * features/rs6000/power-htm-fpu.xml: New file.
1712 * features/rs6000/power-htm-altivec.xml: New file.
1713 * features/rs6000/power-htm-vsx.xml: New file.
1714 * features/rs6000/power-htm-ppr.xml: New file.
1715 * features/rs6000/power-htm-dscr.xml: New file.
1716 * features/rs6000/power-htm-tar.xml: New file.
1717 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1718 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1719 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1720 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1721 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1722 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1723 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1724 fetch_regset with HTM regsets.
1725 (store_register, store_ppc_registers): Call store_regset with HTM
1726 regsets.
1727 (ppc_linux_nat_target::read_description): Set htm field in the
1728 features struct if needed.
1729 * ppc-linux-tdep.c: Include
1730 features/rs6000/powerpc-isa207-htm-vsx32l.c and
1731 features/rs6000/powerpc-isa207-htm-vsx64l.c.
1732 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1733 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1734 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1735 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1736 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1737 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1738 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1739 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1740 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1741 (ppc32_linux_ctarregset): New globals.
1742 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1743 (ppc_linux_collect_core_cpgrregset): New function.
1744 (ppc_linux_iterate_over_regset_sections): Call back with the htm
1745 regsets.
1746 (ppc_linux_core_read_description): Check if the tm spr section is
1747 present and set htm in the features struct.
1748 (_initialize_ppc_linux_tdep): Call
1749 initialize_tdesc_powerpc_isa207_htm_vsx32l and
1750 initialize_tdesc_powerpc_isa207_htm_vsx64l.
1751 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1752 Declare.
1753 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1754 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1755 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1756 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1757 New fields.
1758 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1759 Likewise.
1760 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1761 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1762 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1763 New enum fields.
1764 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1765 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1766 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1767 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1768 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1769 <PPC_CTAR_REGNUM>: Likewise.
1770 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1771 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1772 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1773 (IS_CEFP_PSEUDOREG): Define.
1774 (rs6000_register_name): Hide the upper halves of checkpointed VSX
1775 registers. Return names for the checkpointed DFP, VSX, and EFP
1776 pseudo registers.
1777 (rs6000_pseudo_register_type): Remove initial assert and raise an
1778 internal error in the else clause instead. Return types for the
1779 checkpointed DFP, VSX, and EFP pseudo registers.
1780 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1781 checkpointed DFP pseudo registers.
1782 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1783 checkpointed VSX pseudo registers.
1784 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1785 from efpr_pseudo_register_read and
1786 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
1787 registers.
1788 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1789 Handle checkpointed DFP, VSX, and EFP registers.
1790 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1791 (efp_ax_pseudo_register_collect): New functions.
1792 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1793 register logic to new functions. Handle checkpointed DFP, VSX,
1794 and EFP pseudo registers.
1795 (rs6000_gdbarch_init): Look for and validate the htm features.
1796 Include checkpointed DFP, VSX and EFP pseudo-registers.
1797 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1798 HTM registers.
1799
1800 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1801
1802 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1803 without altivec or fpu.
1804
1805 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1806 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1807
1808 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1809 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1810 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1811 Define if not already defined.
1812 * features/rs6000/power-ebb.xml: New file.
1813 * features/rs6000/power-linux-pmu.xml: New file.
1814 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1815 features.
1816 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1817 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1818 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1819 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1820 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1821 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1822 fetch_regset with ebb and pmu regsets.
1823 (store_register, store_ppc_registers): Call store_regset with ebb
1824 and pmu regsets.
1825 (ppc_linux_nat_target::read_description): Set isa207 field in the
1826 features struct if ebb and pmu are avaiable.
1827 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1828 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1829 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1830 and pmu regsets.
1831 (ppc_linux_core_read_description): Check if the pmu section is
1832 present and set isa207 in the features struct.
1833 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1834 (ppc32_linux_pmuregset): Declare.
1835 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1836 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1837 <ppc_sier_regnum>: New field.
1838 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1839 New enum values.
1840 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1841 values.
1842 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1843 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1844 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1845 ebb and pmu features.
1846
1847 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1848 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1849
1850 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1851 (tdesc_powerpc_isa207_vsx64l): Declare.
1852 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1853 (struct ppc_linux_features) <isa207>: New field.
1854 (ppc_linux_no_features): Add initializer for isa207 field.
1855 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1856 new tdescs.
1857 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1858 (NT_PPC_TAR): Define if not already defined.
1859 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1860 rs6000/powerpc-isa207-vsx64l.
1861 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1862 rs6000/powerpc-isa207-vsx64l.xml.
1863 * features/rs6000/power-tar.xml: New file.
1864 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1865 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1866 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1867 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1868 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1869 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1870 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1871 fetch_regset with the TAR regset.
1872 (store_register, store_ppc_registers): Call store_regset with the
1873 TAR regset.
1874 (ppc_linux_nat_target::read_description): Set isa207 field in the
1875 features struct if needed.
1876 * ppc-linux-tdep.c: Include
1877 features/rs6000/powerpc-isa207-vsx32l.c and
1878 features/rs6000/powerpc-isa207-vsx64l.c.
1879 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1880 (ppc_linux_iterate_over_regset_sections): Call back with the tar
1881 regset.
1882 (ppc_linux_core_read_description): Check if the tar section is
1883 present and set isa207 in the features struct.
1884 (_initialize_ppc_linux_tdep): Call
1885 initialize_tdesc_powerpc_isa207_vsx32l and
1886 initialize_tdesc_powerpc_isa207_vsx64l.
1887 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1888 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1889 (enum) <PPC_TAR_REGNUM>: New enum value.
1890 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1891 feature.
1892 (ppc_process_record_op31): Record changes to TAR.
1893
1894 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1895 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1896
1897 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1898 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1899 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1900 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1901 (struct ppc_linux_features) <ppr_dscr>: New field.
1902 (ppc_linux_no_features): Add initializer for ppr_dscr field.
1903 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1904 new tdescs.
1905 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1906 Define if not already defined.
1907 * features/Makefile (WHICH): Add
1908 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1909 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1910 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1911 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1912 * features/rs6000/power-dscr.xml: New file.
1913 * features/rs6000/power-ppr.xml: New file.
1914 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1915 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1916 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1917 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1918 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1919 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1920 * ppc-linux-nat.c: Include <sys/uio.h>.
1921 (fetch_regset, store_regset, check_regset): New functions.
1922 (fetch_register, fetch_ppc_registers): Call fetch_regset with
1923 DSCR and PPR regsets.
1924 (store_register, store_ppc_registers): Call store_regset with
1925 DSCR and PPR regsets.
1926 (ppc_linux_get_hwcap2): New function.
1927 (ppc_linux_nat_target::read_description): Call
1928 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1929 features struct if needed.
1930 * ppc-linux-tdep.c: Include
1931 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1932 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1933 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1934 (ppc32_linux_dscrregset): New globals.
1935 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1936 and dscr regsets.
1937 (ppc_linux_core_read_description): Check if the ppr and dscr
1938 sections are present and set ppr_dscr in the features struct.
1939 (_initialize_ppc_linux_tdep): Call
1940 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1941 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1942 * ppc-linux-tdep.h (ppc32_linux_pprregset)
1943 (ppc32_linux_dscrregset): Declare.
1944 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1945 <ppc_dscr_regnum>: New field.
1946 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1947 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1948 and dscr features.
1949 (ppc_process_record_op31): Record changes to PPR and DSCR.
1950
1951 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1952
1953 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1954 second initializer line for the have_* variables. Initialize
1955 have_fpu to 0 instead of 1.
1956
1957 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1958
1959 * arch/ppc-linux-common.c (ppc_linux_match_description):
1960 Parenthesize tdesc assignements and indent them properly.
1961
1962 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1963
1964 * ppc-linux-nat.c (fetch_register): Change if statement to else
1965 if.
1966 (store_register): Likewise.
1967
1968 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1969
1970 * rs6000-tdep.c: Remove reggroups.h include.
1971 (rs6000_pseudo_register_reggroup_p): Remove.
1972 (rs6000_gdbarch_init): Remove call to
1973 set_tdesc_pseudo_register_reggroup_p.
1974
1975 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1976
1977 * reggroups.c (default_register_reggroup_p): Return true for
1978 decfloat registers and float_reggroup.
1979
1980 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1981
1982 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1983 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1984 ppc_linux_collect_vrregset by regcache_collect_regset.
1985
1986 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1987
1988 * linux-tdep.c (linux_collect_regset_section_cb): Use
1989 std::vector<gdb_byte> instead of char * and malloc for buf.
1990 Remove xfree.
1991
1992 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1993
1994 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1995 symtab_start instead of always using language_unknown.
1996
1997 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
1998
1999 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
2000 READ_P parameter, catch and ignore register access errors from
2001 either the old or new MISA location.
2002 (riscv_has_feature): Update call to riscv_read_misa_reg.
2003
2004 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
2005
2006 * python/py-function.c (convert_values_to_python): Return
2007 gdbpy_ref<>. Add header comment.
2008 (fnpy_call): Adjust.
2009
2010 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
2011
2012 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
2013 (cmdpy_completer_handle_brkchars): Adjust.
2014 (cmdpy_completer): Adjust.
2015
2016 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
2017
2018 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
2019 Pass correct regnum to raw_supply_zeroed.
2020
2021 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
2022
2023 * regcache.c (cooked_read_test): Add CSKY to the list of
2024 architectures with a save_reggroup
2025
2026 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
2027
2028 PR gdb/23368
2029 * infrun.c (follow_exec): In the follow_exec_mode_new case,
2030 transfer terminal state from old new new inferior.
2031 * terminal.h (swap_terminal_info): New function.
2032 * inflow.c (swap_terminal_info): New function.
2033
2034 2018-10-23 Tom Tromey <tom@tromey.com>
2035
2036 * record-btrace.c (get_thread_current_frame_id): Rename from
2037 get_thread_current_frame. Return a frame_id.
2038 (record_btrace_start_replaying): Update.
2039
2040 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2041
2042 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2043 for CSRs.
2044
2045 2018-10-23 Joel Brobecker <brobecker@adacore.com>
2046
2047 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2048 have_nonsteppable_watchpoint attribute to 1.
2049
2050 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
2051
2052 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2053 register names.
2054 (struct register_alias): Rename to...
2055 (struct riscv_register_alias): ...this, and update comment.
2056 (riscv_register_aliases): Update type, and alias names. Remove
2057 CSR names from this list.
2058 (riscv_register_name): Use riscv_gdb_reg_names for int and float
2059 register names. Add an extra assertion.
2060 (riscv_is_regnum_a_named_csr): New function.
2061 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2062
2063 2018-10-23 John Darrington <john@darrington.wattle.id.au>
2064
2065 * configure.tgt: Add configuration for s12z.
2066 * s12z-tdep.c: New file.
2067 * NEWS: Mention new target.
2068
2069 2018-10-22 Jim Wilson <jimw@sifive.com>
2070
2071 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2072 FP reg smaller than FP reg size, and fill with -1 instead of 0.
2073
2074 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2075 (riscv_register_type): Use them.
2076 (riscv_print_one_register_info): Handle union of floats same as float.
2077 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2078 riscv_fpreg_q_type fields.
2079
2080 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
2081
2082 * gdbarch.sh (gdbarch_num_cooked_regs): New.
2083 * gdbarch.h: Re-generate.
2084 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2085 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2086 * eval.c (evaluate_subexp_standard): Likewise.
2087 * findvar.c (value_of_register): Likewise.
2088 (value_of_register_lazy): Likewise.
2089 (address_from_register): Likewise.
2090 * frame.c (get_frame_register_bytes): Likewise.
2091 * gdbarch-selftests.c (register_to_value_test): Likewise.
2092 * h8300-tdep.c (h8300_register_type): Likewise.
2093 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2094 (i386_svr4_reg_to_regnum): Likewise.
2095 * infcmd.c (default_print_registers_info): Likewise.
2096 (registers_info): Likewise.
2097 (print_vector_info): Likewise.
2098 (default_print_float_info): Likewise.
2099 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2100 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2101 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2102 (mi_cmd_data_list_changed_registers): Likewise.
2103 (mi_cmd_data_list_register_values): Likewise.
2104 (mi_cmd_data_write_register_values): Likewise.
2105 (mi_cmd_trace_frame_collected): Likewise.
2106 * mips-tdep.c (print_gp_register_row): Likewise.
2107 (mips_print_registers_info): Likewise.
2108 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2109 * regcache.c (init_regcache_descr): Likewise.
2110 (register_size): Likewise.
2111 (register_dump::dump): Likewise.
2112 (cooked_read_test): Likewise.
2113 (cooked_write_test): Likewise.
2114 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2115 (rs6000_gdbarch_init): Likewise.
2116 * stabsread.c (stab_reg_to_regnum): Likewise.
2117 * stack.c (info_frame_command): Likewise.
2118 * target-descriptions.c (tdesc_register_name): Likewise.
2119 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2120 * tui/tui-regs.c (tui_show_register_group): Likewise.
2121 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2122 (user_reg_map_regnum_to_name): Likewise.
2123 (value_of_user_reg): Likewise.
2124 (maintenance_print_user_registers): Likewise.
2125 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2126 (xtensa_register_name): Likewise.
2127 (xtensa_register_type): Likewise.
2128 (xtensa_reg_to_regnum): Likewise.
2129 (xtensa_pseudo_register_read): Likewise.
2130 (xtensa_pseudo_register_write): Likewise.
2131
2132 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2133
2134 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2135 correctly-sized buffer with raw_read.
2136 (amd64_pseudo_register_write): Use correctly-sized buffer for
2137 raw_read/raw_write.
2138
2139 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2140
2141 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2142 in add_prefix_cmd of set print type.
2143
2144 2018-10-19 Tom Tromey <tom@tromey.com>
2145
2146 PR tui/18388:
2147 * NEWS: Mention tabset deprecation.
2148 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2149 (update_tab_width): New function.
2150 (tui_set_tab_width, tui_show_tab_width): New functions.
2151 (tui_set_tab_width_command): Use update_tab_width.
2152 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
2153 Add new "set tui tab-width" command.
2154 * tui/tui-source.c (tui_set_source_content): Update.
2155 * tui/tui-disasm.c (tui_set_disassem_content): Update.
2156 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2157 Don't declare.
2158 (tui_tab_width): Declare.
2159 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2160 (tui_set_default_tab_len): Remove.
2161
2162 2018-10-19 Tom Tromey <tom@tromey.com>
2163
2164 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2165 (key_is_backspace, tui_getc): Don't declare.
2166 * tui/tui-io.c (key_is_start_sequence): Now static.
2167 (key_is_end_sequence, key_is_backspace): Remove.
2168 (tui_getc): Now static.
2169
2170 2018-10-19 Tom Tromey <tom@tromey.com>
2171
2172 * symfile.c (reread_symbols): Clear "static_links".
2173
2174 2018-10-19 Alan Hayward <alan.hayward@arm.com>
2175
2176 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2177 define.
2178 (aarch64_linux_sigframe_init): Extra boundary checks.
2179
2180 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
2181
2182 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2183 the possibly non-existent tdesc type 'vec128', but the type of raw
2184 register v16 instead.
2185
2186 2018-10-19 Gary Benson <gbenson@redhat.com>
2187
2188 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2189
2190 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
2191
2192 PR cli/23785
2193 * cli/cli-dump.c (restore_binary_file): Check if "file" is
2194 NULL.
2195
2196 2018-10-17 Paul Koning <paul_koning@dell.com>
2197
2198 * charset.c (convert_between_encodings): Fix unsigned overflow.
2199
2200 2018-10-17 John Baldwin <jhb@FreeBSD.org>
2201
2202 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2203 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2204 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2205 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2206 New functions.
2207 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2208 and fbsd_info_proc_mappings_header.
2209 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2210 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2211 New.
2212
2213 2018-10-17 Joel Brobecker <brobecker@adacore.com>
2214
2215 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2216 Solaris Maintainer.
2217
2218 2018-10-15 Tom Tromey <tom@tromey.com>
2219
2220 * tui/tui.c (strcat_to_buf): Remove casts.
2221 * tui/tui-winsource.c (tui_show_source_line)
2222 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2223 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2224 * tui/tui-windata.c (tui_first_data_item_displayed)
2225 (tui_delete_data_content_windows, tui_erase_data_content)
2226 (tui_display_all_data, tui_display_data_from)
2227 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2228 * tui/tui-win.c (tui_set_win_height)
2229 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2230 casts.
2231 * tui/tui-win.c (tui_resize_all): Remove casts.
2232 (tui_scroll_backward_command, tui_set_focus)
2233 (tui_set_tab_width_command): Likewise.
2234 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2235 * tui/tui-regs.c (tui_show_register_group): Remove cast.
2236 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2237 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2238 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2239 Remove casts.
2240
2241 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
2242
2243 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2244 AArch64/ARM maintainer.
2245
2246 2018-10-11 Gary Benson <gbenson@redhat.com>
2247
2248 * interps.h (interp::m_name): Make private and mutable.
2249 * interps.c (interp::~interp): Free m_name.
2250
2251 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2252 Simon Marchi <simark@simark.ca>
2253
2254 * README (`configure' options): Add documentation for new
2255 "--enable-unit-tests" option.
2256 * acinclude.m4: Include "selftest.m4".
2257 * configure: Regenerate.
2258 * configure.ac: Use "GDB_AC_SELFTEST".
2259 * maint.c (maintenance_selftest): Update message informing
2260 that selftests have been disabled.
2261 (maintenance_info_selftests): Likewise.
2262 * selftest.m4: New file.
2263
2264 2018-10-10 Gary Benson <gbenson@redhat.com>
2265
2266 * remote.c (remote_target::remote_send_printf): Add
2267 missing va_end found by Coverity.
2268
2269 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
2270
2271 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2272
2273 2018-10-09 Tom Tromey <tom@tromey.com>
2274
2275 * configure: Rebuild.
2276 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2277 * NEWS: Update --enable-ubsan documentation.
2278
2279 2018-10-09 Gary Benson <gbenson@redhat.com>
2280
2281 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2282 found by Coverity.
2283
2284 2018-10-08 Tom Tromey <tom@tromey.com>
2285
2286 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2287 variable.
2288 (riscv_fbsd_init_abi): Likewise.
2289
2290 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2291 * valops.c (value_struct_elt_for_reference): Rename local variable
2292 to work around the shadowing a previous local warning.
2293
2294 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2295
2296 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2297 * NEWS: Mention new FreeBSD/riscv native configuration.
2298 * configure.host: Add riscv*-*-freebsd*.
2299 * configure.nat: Likewise.
2300 * riscv-fbsd-nat.c: New file.
2301
2302 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2303
2304 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2305 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2306 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2307 * NEWS: Mention new FreeBSD/riscv target.
2308 * configure.tgt: Add riscv*-*-freebsd*.
2309 * riscv-fbsd-tdep.c: New file.
2310 * riscv-fbsd-tdep.h: New file.
2311
2312 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2313
2314 * regcache.h (struct regcache_map_entry): Note that this type can
2315 be used with traditional frame caches.
2316 * trad-frame.c (trad_frame_set_reg_regmap): New.
2317 * trad-frame.h (trad_frame_set_reg_regmap): New.
2318
2319 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
2320
2321 PR c++/16841
2322 * valops.c (get_virtual_base_offset): New function.
2323 (value_struct_elt_for_reference): Use it to get virtual base offset
2324 and add it in calculating class member address.
2325
2326 2018-10-08 John Darrington <john@darrington.wattle.id.au>
2327
2328 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2329 (check_producer): Check if the producer is codewarrior.
2330 (producer_is_codewarrior): New function.
2331 (lnp_state_machine::record_line): Ignore is_stmt flag for records
2332 produced by codewarrior.
2333 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2334
2335 2018-10-06 Tom Tromey <tom@tromey.com>
2336
2337 PR python/19399:
2338 * python/py-inferior.c: Add "architecture" entry.
2339 (infpy_architecture): New function.
2340
2341 2018-10-06 Tom Tromey <tom@tromey.com>
2342
2343 PR python/21765:
2344 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2345 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2346 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
2347 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2348
2349 2018-10-06 Tom Tromey <tom@tromey.com>
2350
2351 PR build/17077:
2352 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2353 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2354 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2355 #include.
2356
2357 2018-10-06 Tom Tromey <tom@tromey.com>
2358
2359 * python/py-breakpoint.c (bppy_get_location): Handle a
2360 bp_breakpoint without a location.
2361
2362 2018-10-06 Tom Tromey <tom@tromey.com>
2363
2364 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2365 (_RegEx): Reformat help text.
2366 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2367 (AnyCallerIs, AnyCallerMatches): Reformat help text.
2368 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2369 text.
2370 * python/lib/gdb/command/xmethods.py (InfoXMethod)
2371 (EnableXMethod, DisableXMethod): Remove help indentation.
2372 Capitalize meta-syntactic variables.
2373 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2374 (EnableUnwinder, DisableUnwinder): Remove help indentation.
2375 Capitalize meta-syntactic variables.
2376 * python/lib/gdb/command/explore.py (ExploreCommand)
2377 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2378 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2379 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2380 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2381 Remove help indentation.
2382 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2383 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2384 (DisableFrameFilter, SetFrameFilterPriority)
2385 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2386
2387 2018-10-06 Tom Tromey <tom@tromey.com>
2388
2389 PR tui/28819:
2390 * tui/tui-io.c (gdb_wgetch): New function.
2391 (tui_mld_getc, tui_getc): Use it.
2392
2393 2018-10-05 Tom Tromey <tom@tromey.com>
2394
2395 * sol-thread.c (sol_thread_target::wait): Rename inner
2396 "save_ptid".
2397
2398 2018-10-04 Tom Tromey <tom@tromey.com>
2399
2400 * configure: Rebuild.
2401 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2402
2403 2018-10-04 Tom Tromey <tom@tromey.com>
2404
2405 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2406 declaration of "block".
2407
2408 2018-10-04 Tom Tromey <tom@tromey.com>
2409
2410 * common/filestuff.c (fdwalk): Remove inner declaration of
2411 "result".
2412
2413 2018-10-04 Tom Tromey <tom@tromey.com>
2414
2415 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2416 "structs_addr" and hoist declaration.
2417
2418 2018-10-04 Tom Tromey <tom@tromey.com>
2419
2420 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2421 variable "size".
2422
2423 2018-10-04 Tom Tromey <tom@tromey.com>
2424
2425 * mdebugread.c (parse_partial_symbols): Use std::string.
2426
2427 2018-10-04 Tom Tromey <tom@tromey.com>
2428
2429 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2430 * p-valprint.c (pascal_val_print): Split inner "i" variable.
2431 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2432 header.
2433 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2434 more inner scope.
2435 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2436 * varobj.c (varobj_update): Rename inner "newobj",
2437 "type_changed".
2438 * valprint.c (generic_emit_char): Rename inner "buf".
2439 * valops.c (find_overload_match): Rename inner "temp".
2440 (value_struct_elt_for_reference): Declare "v" in more inner
2441 scope.
2442 * v850-tdep.c (v850_push_dummy_call): Rename "len".
2443 * unittests/array-view-selftests.c (run_tests): Rename inner
2444 "vec".
2445 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2446 header.
2447 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2448 "tsv" in more inner scope.
2449 (print_one_static_tracepoint_marker): Rename inner
2450 "tuple_emitter".
2451 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2452 (tic6x_push_dummy_call): Don't redeclare "addr".
2453 * target-float.c: Declare "dto" lower.
2454 * symtab.c (lookup_local_symbol): Rename inner "sym".
2455 (find_pc_sect_line): Rename inner "pc".
2456 * stack.c (print_frame): Don't redeclare "gdbarch".
2457 (return_command): Rename inner "gdbarch".
2458 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2459 "sp".
2460 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2461 header.
2462 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2463 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2464 scope.
2465 * remote.c (remote_target::update_thread_list): Don't redeclare
2466 "tp".
2467 (remote_target::process_initial_stop_replies): Rename inner
2468 "thread".
2469 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2470 (remote_target::wait_as): Don't redeclare "stop_reply".
2471 (remote_target::get_thread_local_address): Rename inner
2472 "result".
2473 (remote_target::get_tib_address): Likewise.
2474
2475 * regcache.c (cooked_read_test): Rename "regnum".
2476 * record-btrace.c (cmd_record_btrace_start): Rename inner
2477 "exception".
2478 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2479 loop header.
2480 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2481 header.
2482 (ppu2spu_sniffer): Rename inner "buf".
2483 * parse.c (operator_check_standard): Rename inner "type",
2484 "objfile".
2485 * p-valprint.c (pascal_val_print): Introduce new scope for
2486 "low_bound", "high_bound".
2487 * p-exp.y (yylex): Declare "i" in loop header.
2488 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2489 Lower declaration of "s".
2490 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2491 header.
2492 (nios2_push_dummy_call): Rename "len".
2493 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2494 "buf".
2495 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2496 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2497 (linux_xfer_osdata_modules): Likewise.
2498 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2499 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2500 (mips_o64_push_dummy_call): Likewise.
2501 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2502 "op".
2503 * mi/mi-main.c (list_available_thread_groups): Rename inner
2504 "tuple_emitter".
2505 (mi_cmd_data_read_memory): Rename inner "opts".
2506 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2507 "tuple_emitter".
2508 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2509 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
2510 more inner scope.
2511 (parse_partial_symbols): Rename inner "pst", "p", "name"
2512 * main.c (captured_main_1): Rename inner "i"s.
2513 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2514 "oso2".
2515 * linux-tdep.c (linux_info_proc): Rename inner "filename".
2516 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2517 * infrun.c (handle_no_resumed): Don't redeclare "thread".
2518 (handle_signal_stop): Rename inner "gdbarch".
2519 (handle_command): Declare "signum" in loop header.
2520 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2521 "status".
2522 (examine_prologue): Rename inner "sol" and "sof".
2523 (ia64_extract_return_value): Rename inner "val". Declare another
2524 "val" in a more inner scope.
2525 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2526 inner scope.
2527 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2528 "except".
2529 * findvar.c (default_read_var_value): Don't redeclare "addr".
2530 * f-exp.y (yylex): Declare "i" in loop header.
2531 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2532 Rename inner "type", "expect_type".
2533 (evaluate_subexp_for_sizeof): Rename inner "pc".
2534 * elfread.c (elf_symfile_read): Rename inner "abfd".
2535 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2536 "bytes_read".
2537 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2538 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2539 (dwarf_decode_line_header): Rename inner "lh".
2540 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2541 "offset". Declare "i" in loop header.
2542 (disassemble_dwarf_expression): Rename inner "addr_size".
2543 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2544 inner "result".
2545 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2546 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2547 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2548 "inner_list_emitter".
2549 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2550 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2551 declaration in a block.
2552 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2553 * cp-valprint.c (cp_print_value_fields): Don't redeclare
2554 "obstack_final_size".
2555 * cp-support.c (inspect_type): Declare "i" in loop header.
2556 * compile/compile.c (compile_instance::insert_symbol_error):
2557 Rename inner "e".
2558 * common/agent.c (agent_run_command): Remove inner "ret"
2559 declaration.
2560 * coffread.c (coff_symfile_read): Rename inner "name".
2561 (coff_symfile_read): Rename inner "abfd".
2562 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2563 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2564 "high".
2565 * c-exp.y (lex_one_token): Move "len" declaration lower.
2566 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2567 "gdbarch".
2568 (create_exception_master_breakpoint): Likewise. Don't redeclare
2569 "b".
2570 (watch_command_1): Declare "mark" later.
2571 (clear_command): Don't shadow "a" or "b".
2572 (delete_command): Rename inner "b".
2573 (delete_trace_command): Likewise.
2574 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2575 "op".
2576 (arm_gdbarch_init): Remove inner "e_flags".
2577 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2578 "offset" in inner blocks.
2579
2580 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
2581
2582 * dwarf-index-write.c (file_write): Don't write if the vector is
2583 empty.
2584
2585 2018-10-05 Tom de Vries <tdevries@suse.de>
2586
2587 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2588 PyArg_ParseTuple call.
2589
2590 2018-10-05 Tom de Vries <tdevries@suse.de>
2591
2592 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2593 PyArg_ParseTuple call.
2594
2595 2018-10-04 Joel Brobecker <brobecker@adacore.com>
2596
2597 * psymtab.c (recursively_search_psymtabs): Reformat parameters
2598 to avoid exceeding 80 characters per line limit.
2599
2600 2018-10-04 Tom Tromey <tom@tromey.com>
2601
2602 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2603 (reread_symbols): Update.
2604 * complaints.h (clear_complaints): Remove argument.
2605 * complaints.c (enum complaint_series): Remove.
2606 (series): Remove global.
2607 (complaint_internal): Update.
2608 (clear_complaints): Remove argument.
2609
2610 2018-10-04 Tom Tromey <tom@tromey.com>
2611
2612 * symfile.c (symbol_file_add_with_addrs): Do not print "no
2613 debugging symbols" message if there is a separate debug objfile.
2614
2615 2018-10-04 Tom Tromey <tom@tromey.com>
2616
2617 PR cli/19551:
2618 * symfile.c (symbol_file_add_with_addrs): Update output.
2619 * psymtab.c (require_partial_symbols): Update output.
2620
2621 2018-10-04 Tom Tromey <tom@tromey.com>
2622
2623 PR cli/22234:
2624 * complaints.c: Emit \n.
2625
2626 2018-10-04 Tom Tromey <tom@tromey.com>
2627
2628 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2629 (separate_debug_file_exists, find_separate_debug_file)
2630 (add_symbol_file_command, reread_symbols, allocate_symtab)
2631 (allocate_compunit_symtab): Use filtered printing, not
2632 unfiltered.
2633 * psymtab.c (require_partial_symbols, dump_psymtab)
2634 (allocate_psymtab): Use filtered printing, not unfiltered.
2635
2636 2018-10-04 Tom Tromey <tom@tromey.com>
2637
2638 * complaints.c (complaint_internal): Correctly check complaint
2639 count.
2640
2641 2018-10-04 Tom Tromey <tom@tromey.com>
2642
2643 * complaints.h (struct complaints): Remove declaration.
2644 * complaints.c (clear_complaints): Remove an unused variable.
2645
2646 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2647
2648 * MAINTAINERS (Write After Approval): Add self.
2649
2650 2018-10-03 Tom Tromey <tom@tromey.com>
2651
2652 * guile/scm-value.c (gdbscm_value_to_string): Initialize
2653 "buffer_contents".
2654 * coffread.c (coff_symtab_read): Initialize "newobj".
2655
2656 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
2657
2658 * dwarf2read.c (read_func_scope): Remove struct keyword in
2659 range-based for.
2660
2661 2018-10-03 Tom Tromey <tom@tromey.com>
2662
2663 * README: Mention --enable-ubsan.
2664 * NEWS: Mention --enable-ubsan.
2665 * acinclude.m4: Include sanitize.m4.
2666 * configure: Rebuild.
2667 * configure.ac: Call AM_GDB_UBSAN.
2668 * sanitize.m4: New file.
2669
2670 2018-10-03 Tom Tromey <tom@tromey.com>
2671
2672 * expression.h (enum exp_opcode): Use uint8_t as base type.
2673 * expprint.c (op_name): Handle invalid opcodes.
2674
2675 2018-10-03 Tom Tromey <tom@tromey.com>
2676
2677 * parse.c (prefixify_expression): Add assert.
2678 (parse_exp_in_context_1): Throw exception if the expression is
2679 empty.
2680
2681 2018-10-03 Tom Tromey <tom@tromey.com>
2682
2683 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2684
2685 2018-10-03 Tom Tromey <tom@tromey.com>
2686
2687 * c-exp.y (parse_number): Work in unsigned. Remove casts.
2688
2689 2018-10-03 Tom Tromey <tom@tromey.com>
2690
2691 * dwarf2read.c (read_subrange_type): Make "negative_mask"
2692 unsigned.
2693
2694 2018-10-03 Tom Tromey <tom@tromey.com>
2695
2696 * findvar.c (extract_integer): Do work in an unsigned type.
2697
2698 2018-10-03 Tom Tromey <tom@tromey.com>
2699
2700 * common/enum-flags.h (enum_flags::operator~): Add static assert.
2701 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2702 base type.
2703 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2704 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2705 type.
2706 * c-lang.h (enum c_string_type_values): Use unsigned as base
2707 type.
2708 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2709
2710 2018-10-03 Tom Tromey <tom@tromey.com>
2711
2712 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2713 <~dwarf2_frame_state_reg_info>: Update.
2714 <dwarf2_frame_state_reg_info>: Update.
2715 <alloc_regs>: Add assertion. Update.
2716 <reg>: Now a std::vector.
2717 <num_regs>: Remove.
2718 <swap>: Update.
2719 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2720 (execute_cfa_program_test, dwarf2_frame_cache): Update.
2721
2722 2018-10-03 Tom Tromey <tom@tromey.com>
2723
2724 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2725
2726 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2727
2728 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2729
2730 2018-10-02 Tom Tromey <tom@tromey.com>
2731
2732 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2733
2734 2018-10-02 John Darrington <john@darrington.wattle.id.au>
2735
2736 * NEWS: Mention changed commands.
2737 * ser-uds.c: New file.
2738 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2739 * configure: Regenerate.
2740 * Makefile.in: Add new file.
2741 * serial.c (serial_open): Check if filename is a socket
2742 and lookup the appropriate interface accordingly.
2743
2744 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2745
2746 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2747 define.
2748 (AARCH64_EXTRA_MAGIC): Likewise.
2749 (AARCH64_FPSIMD_MAGIC): Likewise.
2750 (AARCH64_SVE_MAGIC): Likewise.
2751 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2752 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2753 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2754 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2755 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2756 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2757 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2758 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2759 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2760 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2761 (read_aarch64_ctx): Add function.
2762 (aarch64_linux_sigframe_init): Detect FP registers.
2763
2764 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2765
2766 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2767 (AARCH64_D0_REGNUM): Likewise.
2768 (AARCH64_S0_REGNUM): Likewise.
2769 (AARCH64_H0_REGNUM): Likewise.
2770 (AARCH64_B0_REGNUM): Likewise.
2771 (AARCH64_SVE_V0_REGNUM): Likewise.
2772 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2773 (AARCH64_D0_REGNUM): Likewise.
2774 (AARCH64_S0_REGNUM): Likewise.
2775 (AARCH64_H0_REGNUM): Likewise.
2776 (AARCH64_B0_REGNUM): Likewise.
2777 (AARCH64_SVE_V0_REGNUM): Likewise.
2778
2779 2018-10-01 Gary Benson <gbenson@redhat.com>
2780
2781 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2782 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2783 prfpregset_t instead of gdb_prfpregset_t.
2784 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2785 * configure, config.in: Rebuild.
2786
2787 2018-10-01 Gary Benson <gbenson@redhat.com>
2788
2789 * common/gdb_proc_service.h: New file, factored out from...
2790 * gdb_proc_service.h: Moved common code to the above file.
2791 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2792
2793 2018-10-01 Gary Benson <gbenson@redhat.com>
2794
2795 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2796 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
2797
2798 2018-10-01 Gary Benson <gbenson@redhat.com>
2799
2800 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2801 (AC_CHECK_HEADERS): Check for linux/elf.h.
2802 * configure, config.in: Rebuild.
2803 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2804 doesn't define elf_fpregset_t.
2805
2806 2018-10-01 Gary Benson <gbenson@redhat.com>
2807
2808 * gdb_proc_service.h: Whitespace change.
2809
2810 2018-10-01 Tom Tromey <tom@tromey.com>
2811
2812 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2813 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2814 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2815
2816 2018-10-01 Tom Tromey <tom@tromey.com>
2817
2818 * README: Minor change.
2819
2820 2018-09-30 Pedro Alves <palves@redhat.com>
2821
2822 * darwin-nat-info.c (darwin_debug_regions_recurse)
2823 (info_mach_exceptions_command): Remove unused local variables.
2824 * darwin-nat.c (darwin_decode_notify_message)
2825 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2826 (darwin_stop_inferior, darwin_setup_exceptions)
2827 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2828 (darwin_nat_target::attach, darwin_nat_target::detach)
2829 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2830 local variables.
2831 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2832 variables.
2833
2834 2018-09-29 Tom Tromey <tom@tromey.com>
2835
2836 * README: Remove some leftover text.
2837
2838 2018-09-29 Tom Tromey <tom@tromey.com>
2839
2840 * PROBLEMS: Rewrite.
2841 * README: Update.
2842
2843 2018-09-28 John Baldwin <jhb@FreeBSD.org>
2844
2845 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2846 case with explicit breakpoint kind.
2847 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2848 'additional_info' and related logic.
2849 (riscv_debug_breakpoints): New variable.
2850 (riscv_breakpoint_kind_from_pc): Use the length of the existing
2851 instruction to determine the breakpoint kind.
2852 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2853 flag. Update description of 'set/show riscv
2854 use-compressed-breakpoints' flag.
2855
2856 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
2857
2858 (NEWS): Mention changes to frame related commands.
2859 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2860 (add_prefix_cmd_suppress_notification): New function.
2861 (add_com_suppress_notification): Call
2862 add_cmd_suppress_notification.
2863 * command.h (add_cmd_suppress_notification): Declare.
2864 (add_prefix_cmd_suppress_notification): Declare.
2865 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2866 (parse_frame_specification): Moved from stack.c, with
2867 simplification to handle a single argument.
2868 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2869 switch to the selected frame. Add a header comment.
2870 * stack.c: Remove 'safe-ctype.h' include.
2871 (find_frame_for_function): Add declaration.
2872 (find_frame_for_address): New function.
2873 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2874 (frame_selection_by_function_completer): New function.
2875 (info_frame_command): Rename to...
2876 (info_frame_command_core): ...this, and update parameter types.
2877 (select_frame_command): Rename to...
2878 (select_frame_command_core): ...this, and update parameter types.
2879 (frame_command): Rename to...
2880 (frame_command_core): ...this, and update parameter types.
2881 (class frame_command_helper): New class to wrap implementations of
2882 frame related sub-commands.
2883 (frame_apply_cmd_list): New static global.
2884 (frame_cmd_list): Make static.
2885 (select_frame_cmd_list): New global for sub-commands.
2886 (info_frame_cmd_list): New global for sub-commands.
2887 (_initialize_stack): Register sub-commands for 'frame',
2888 'select-frame', and 'info frame'. Update 'frame apply' commands
2889 to use frame_apply_cmd_list. Move function local static
2890 frame_apply_list to file static frame_apply_cmd_list for
2891 consistency.
2892 * stack.h (select_frame_command): Delete declarationn.
2893 (select_frame_for_mi): Declare new function.
2894
2895 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
2896
2897 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2898 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2899 and NOP.
2900
2901 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
2902
2903 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2904
2905 2018-09-26 Tom Tromey <tom@tromey.com>
2906
2907 * valops.c (auto_abandon): Remove dead code.
2908
2909 2018-09-26 Tom Tromey <tom@tromey.com>
2910
2911 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2912
2913 2018-09-24 Tom Tromey <tom@tromey.com>
2914
2915 * common/pathstuff.c (get_standard_cache_dir): Make
2916 "xdg_cache_home" and "home" const.
2917 * top.c (init_history): Make "tmpenv" const.
2918 * main.c (get_init_files): Make "homedir" const.
2919
2920 2018-09-23 Tom Tromey <tom@tromey.com>
2921
2922 PR python/18852:
2923 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2924
2925 2018-09-23 Tom Tromey <tom@tromey.com>
2926
2927 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2928 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2929 * python/python-internal.h (gdbpy_handle_exception): Declare.
2930 * python/py-utils.c (gdbpy_handle_exception): New function.
2931
2932 2018-09-23 Tom Tromey <tom@tromey.com>
2933
2934 PR python/17284:
2935 * python/py-type.c (typy_template_argument): Check for negative
2936 argument number.
2937
2938 2018-09-23 Tom Tromey <tom@tromey.com>
2939
2940 PR python/14062:
2941 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2942
2943 2018-09-23 Tom Tromey <tom@tromey.com>
2944
2945 PR python/18170:
2946 * python/py-value.c (valpy_int): Allow conversion from pointer
2947 type.
2948
2949 2018-09-23 Tom Tromey <tom@tromey.com>
2950
2951 PR python/20126:
2952 * python/py-value.c (valpy_int): Respect type sign.
2953
2954 2018-09-23 Tom Tromey <tom@tromey.com>
2955
2956 PR python/18352;
2957 * python/py-value.c (valpy_float): Allow conversions from int or
2958 char.
2959 (valpy_int, valpy_long): Allow conversions from float.
2960
2961 2018-09-23 Tom Tromey <tom@tromey.com>
2962
2963 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2964 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2965
2966 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2967
2968 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2969 __sighndlr.
2970 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2971
2972 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
2973
2974 * windows-nat.c (windows_nat_target::wait): Remove a spurious
2975 target_terminal::ours().
2976
2977 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
2978
2979 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2980 of vl to ULONGEST.
2981
2982 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
2983
2984 * breakpoint.c (update_inserted_breakpoint_locations): Remove
2985 redundant condition.
2986
2987 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2988
2989 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2990
2991 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2992 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
2993 * sol-thread.c (ps_pdmodel): Don't guard definition.
2994
2995 * procfs.c: Fix formatting.
2996
2997 * procfs.c (sysset_t_alloc): Remove.
2998 (create_procinfo): Use XNEW instead of sysset_t_alloc.
2999 (procfs_debug_inferior): Likewise.
3000 (procfs_set_exec_trap): Likewise.
3001 (proc_set_traced_sysentry): Don't allocate argp dynamically.
3002 (proc_set_traced_sysexit): Likewise.
3003
3004 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
3005 (dead_procinfo): Likewise.
3006 (proc_warn): Likewise.
3007 (proc_error): Likewise.
3008 (proc_get_LDT_entry): Likewise.
3009 (do_attach): Likewise.
3010 (procfs_target::pid_to_str): Likewise.
3011 (iterate_over_mappings): Likewise.
3012
3013 * procfs.c (create_procinfo): Fix ARI warning.
3014 (proc_get_status): Likewise.
3015 (proc_stop_process): Likewise.
3016 (proc_run_process): Likewise.
3017 (proc_kill): Likewise.
3018 (proc_get_LDT_entry): Likewise.
3019 (procfs_find_LDT_entry): Likewise.
3020 (proc_update_threads): Likewise.
3021 (proc_iterate_over_threads): Likewise.
3022 (do_attach): Likewise.
3023 (procfs_xfer_memory): Likewise.
3024 (invalidate_cache): Likewise.
3025 (procfs_target::resume): Likewise.
3026 (procfs_init_inferior): Likewise.
3027 (procfs_set_exec_trap): Likewise.
3028 (procfs_target::thread_alive): Likewise.
3029 (procfs_target::pid_to_exec_file): Likewise.
3030 (iterate_over_mappings): Likewise.
3031 (procfs_target::make_corefile_notes): Likewise.
3032 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3033
3034 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3035 (procfs_find_LDT_entry): Likewise.
3036 * sol-thread.c (ps_lgetLDT): Likewise.
3037
3038 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3039
3040 PR tdep/17903
3041 * procfs.c (procfs_target): Declare pid_to_exec_file.
3042 (procfs_target::pid_to_exec_file): New.
3043
3044 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3045
3046 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3047 renaming.
3048 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3049 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3050
3051 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3052
3053 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3054 (supply_fpregset, fill_fpregset): Move ...
3055 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3056 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3057 Remove references to ioctl-based procfs.
3058 Include <sys/reg.h>.
3059 Remove PR_MODEL_NATIVE guards.
3060 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3061 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3062
3063 2018-09-19 Xavier Roirand <roirand@adacore.com>
3064
3065 PR gdb/20981:
3066 * solib-darwin.c (darwin_get_dyld_bfd): New function.
3067 (darwin_solib_get_all_image_info_addr_at_init): Update call.
3068 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3069
3070 2018-09-19 John Baldwin <jhb@FreeBSD.org>
3071
3072 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3073 (fbsd_print_sockaddr_in6): Likewise.
3074
3075 2018-09-19 Richard Bunt <richard.bunt@arm.com>
3076 Chris January <chris.january@arm.com>
3077
3078 * eval.c (skip_undetermined_arglist): Skip argument list helper.
3079 (evaluate_subexp_standard): Return a dummy type when
3080 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3081 OP_F77_UNDETERMINED_ARGLIST case.
3082 * expression.h (enum noside): Update comment.
3083
3084 2018-09-19 George Vasick <george.vasick@oracle.com>
3085
3086 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3087
3088 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
3089 April Chin <april.chin@oracle.com>
3090 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3091
3092 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3093 uint_t lwpid_t.
3094 (create_procinfo): Print pids in /proc without leading zeros.
3095
3096 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
3097
3098 * nios2-tdep.c (nios2_gcc_target_options): New.
3099 (nios2_gdb_arch_init): Install new hook.
3100
3101 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
3102
3103 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3104 New file.
3105 * update-gnulib.sh: Apply patch.
3106 * configure: Re-generate.
3107
3108 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3109
3110 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3111 description. Make "info proc" command descriptions more
3112 consistent.
3113
3114 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3115
3116 * NEWS: Mention 'info proc files' command.
3117
3118 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3119
3120 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3121 descriptors for IP_FILES and IP_ALL.
3122
3123 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3124
3125 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3126 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3127 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3128 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3129 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3130 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3131 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3132 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3133 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3134 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3135 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3136 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3137 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3138 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3139 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3140 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3141 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3142 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3143 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3144 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3145 (struct fbsd_sockaddr_un): New types.
3146 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3147 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3148 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3149 (fbsd_core_info_proc_files): New functions.
3150 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3151 IP_ALL.
3152 * fbsd-tdep.h (fbsd_info_proc_files_header)
3153 (fbsd_info_proc_files_entry): New.
3154
3155 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3156
3157 * defs.h (enum info_proc_what) [IP_FILES]: New value.
3158 * infcmd.c (info_proc_cmd_files): New function.
3159 (_initialize_infcmd): Register 'info proc files' command.
3160
3161 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3162
3163 * gnulib/aclocal-m4-deps.mk: Re-generate.
3164 * gnulib/aclocal.m4: Re-generate.
3165 * gnulib/config.in: Re-generate.
3166 * gnulib/configure: Re-generate.
3167 * gnulib/import/Makefile.am: Re-generate.
3168 * gnulib/import/Makefile.in: Re-generate.
3169 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3170 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3171 * gnulib/import/arpa_inet.in.h: New file.
3172 * gnulib/import/inet_ntop.c: New file.
3173 * gnulib/import/m4/arpa_inet_h.m4: New file.
3174 * gnulib/import/m4/inet_ntop.m4: New file.
3175 * gnulib/import/m4/netinet_in_h.m4: New file.
3176 * gnulib/import/m4/socklen.m4: New file.
3177 * gnulib/import/m4/sockpfaf.m4: New file.
3178 * gnulib/import/m4/stdalign.m4: New file.
3179 * gnulib/import/m4/sys_uio_h.m4: New file.
3180 * gnulib/import/netinet_in.in.h: New file.
3181 * gnulib/import/stdalign.in.h: New file.
3182 * gnulib/import/sys_socket.c: New file.
3183 * gnulib/import/sys_socket.in.h: New file.
3184 * gnulib/import/sys_uio.in.h: New file.
3185 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3186 module.
3187
3188 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3189
3190 * gnulib/aclocal-m4-deps.mk: New file.
3191 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3192 deterministically.
3193
3194 2018-09-18 John Baldwin <jhb@FreeBSD.org>
3195
3196 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3197 KVE_PATH.
3198
3199 2018-09-18 Tom Tromey <tom@tromey.com>
3200
3201 * compile/compile-object-load.c (struct
3202 link_hash_table_cleanup_data): Add constructor and destructor.
3203 Use DISABLE_COPY_AND_ASSIGN.
3204 (~link_hash_table_cleanup_data): Rename from
3205 link_hash_table_free. Now a destructor.
3206 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
3207
3208 2018-09-18 Tom Tromey <tom@tromey.com>
3209
3210 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3211 * compile/compile-object-load.c (struct munmap_list): Move to
3212 header file.
3213 (munmap_list::add): Rename from munmap_list_add; rewrite.
3214 (munmap_list::~munmap_list): Rename from munmap_list_free.
3215 (munmap_listp_free_cleanup): Remove.
3216 (compile_object_load): Update.
3217 * compile/compile-object-load.h (struct munmap_list): Move from
3218 compile-object-load.c. Rewrite.
3219
3220 2018-09-18 Alan Hayward <alan.hayward@arm.com>
3221
3222 * aarch64-tdep.c (pass_in_v): Use register size.
3223 (aarch64_extract_return_value): Likewise.
3224 (aarch64_store_return_value): Likewise.
3225
3226 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3227
3228 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3229 rlim_t.
3230
3231 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3232
3233 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3234 Fix short help line.
3235
3236 2018-09-17 Tom Tromey <tom@tromey.com>
3237
3238 PR python/20445:
3239 * configure: Rebuild.
3240 * configure.ac: Conditionally use -DNDEBUG for Python.
3241
3242 2018-09-17 Tom Tromey <tom@tromey.com>
3243
3244 * configure: Rebuild.
3245 * configure.ac: Use gmp as a library dependency when checking for
3246 mpfr.
3247
3248 2018-09-17 Pedro Alves <palves@redhat.com>
3249
3250 * python/py-inferior.c (find_inferior_object): Delete.
3251
3252 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
3253
3254 * compile/compile-cplus-types.c
3255 (compile_cplus_instance::enter_scope): Don't use new_scope after
3256 std::move.
3257
3258 2018-09-17 Tom Tromey <tom@tromey.com>
3259
3260 * common/pathstuff.c (get_standard_cache_dir): Use
3261 ~/Library/Caches on macOS.
3262 * common/pathstuff.h (get_standard_cache_dir): Update comment.
3263
3264 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
3265
3266 PR python/23669
3267 * breakpoint.c (commands_cmd_element): New.
3268 (_initialize_breakpoint): Assign commands_cmd_element.
3269 * breakpoint.h (commands_cmd_element): New.
3270 * cli/cli-script.c (while_cmd_element, if_command,
3271 define_cmd_element): New.
3272 (command_name_equals): Remove.
3273 (process_next_line): Compare commands by pointer, not by name.
3274 (_initialize_cli_script): Assign the various cmd_list_element
3275 variables.
3276 * compile/compile.c (compile_cmd_element): New.
3277 (_initialize_compile): Assign compile_cmd_element.
3278 * compile/compile.h (compile_cmd_element): New.
3279 * guile/guile.c (guile_cmd_element): New.
3280 (install_gdb_commands): Assign guile_cmd_element.
3281 * guile/guile.h (guile_cmd_element): New.
3282 * python/python.c (python_cmd_element): New.
3283 (_initialize_python): Assign python_cmd_element.
3284 * python/python.h (python_cmd_element): New.
3285 * tracepoint.c (while_stepping_cmd_element): New.
3286 (_initialize_tracepoint): Assign while_stepping_cmd_element.
3287 * tracepoint.h (while_stepping_cmd_element): New.
3288
3289 2018-09-17 Tom Tromey <tom@tromey.com>
3290
3291 * infrun.c (save_infcall_suspend_state): Return
3292 infcall_suspend_state_up.
3293 (save_infcall_control_state): Return infcall_control_state_up.
3294 * inferior.h (save_infcall_suspend_state)
3295 (save_infcall_control_state): Declare later. Return unique
3296 pointers.
3297
3298 2018-09-17 Tom Tromey <tom@tromey.com>
3299
3300 * infrun.c (struct stop_context): Declare constructor,
3301 destructor, "changed" method.
3302 (stop_context::stop_context): Rename from save_stop_context.
3303 (stop_context::~stop_context): Rename from
3304 release_stop_context_cleanup.
3305 (normal_stop): Update.
3306 (stop_context::changed): Rename from stop_context_changed. Return
3307 bool.
3308
3309 2018-09-17 Tom Tromey <tom@tromey.com>
3310
3311 * inferior.h (struct infcall_suspend_state_deleter): New.
3312 (infcall_suspend_state_up): New typedef.
3313 (struct infcall_control_state_deleter): New.
3314 (infcall_control_state_up): New typedef.
3315 (make_cleanup_restore_infcall_suspend_state)
3316 (make_cleanup_restore_infcall_control_state): Don't declare.
3317 * infcall.c (call_function_by_hand_dummy): Update.
3318 * infrun.c (do_restore_infcall_suspend_state_cleanup)
3319 (make_cleanup_restore_infcall_suspend_state): Remove.
3320 (do_restore_infcall_control_state_cleanup)
3321 (make_cleanup_restore_infcall_control_state): Remove.
3322
3323 2018-09-17 Tom Tromey <tom@tromey.com>
3324
3325 * gdbthread.h (struct thread_control_state): Add initializer.
3326 (class thread_info) <control>: Remove initializer.
3327 * inferior.h (struct inferior_control_state): Add initializer.
3328 (class inferior) <control>: Remove initializer.
3329 (exit_inferior_1): Update.
3330 * infrun.c (struct infcall_control_state): Add constructors.
3331 (save_infcall_control_state): Use new.
3332 (restore_infcall_control_state, discard_infcall_control_state):
3333 Use delete.
3334
3335 2018-09-17 Tom Tromey <tom@tromey.com>
3336
3337 * infrun.c (struct infcall_suspend_state) <registers>: Now a
3338 unique_ptr.
3339 <siginfo_data>: Now a unique_xmalloc_ptr.
3340 (save_infcall_suspend_state, restore_infcall_suspend_state)
3341 (discard_infcall_suspend_state)
3342 (get_infcall_suspend_state_regcache): Update.
3343
3344 2018-09-17 Tom Tromey <tom@tromey.com>
3345
3346 * gdbthread.h (struct thread_suspend_state): Add initializers.
3347 (class thread_info) <suspend>: Remove initializer.
3348 * infrun.c (struct infcall_suspend_state): Add initializers.
3349 (save_infcall_suspend_state): Use new.
3350 (discard_infcall_suspend_state): Use delete.
3351
3352 2018-09-16 Tom Tromey <tom@tromey.com>
3353
3354 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3355 Remove.
3356 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3357 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3358 (py_varobj_iter_new): Likewise.
3359 (py_varobj_get_iterator): Use gdbpy_ref.
3360
3361 2018-09-16 Tom Tromey <tom@tromey.com>
3362
3363 * python/py-threadevent.c (py_get_event_thread): Simplify.
3364 * python/py-inferior.c (infpy_thread_from_thread_handle):
3365 Return immediately after calling thread_to_thread_object. Use
3366 Py_RETURN_NONE.
3367 (thread_to_thread_object): Set the exception on a NULL return.
3368
3369 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3370
3371 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3372
3373 2018-09-16 Tom Tromey <tom@tromey.com>
3374
3375 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3376 Remove.
3377
3378 2018-09-16 Tom Tromey <tom@tromey.com>
3379
3380 * python/python-internal.h (thread_to_thread_object): Change
3381 return type.
3382 * python/py-inferior.c (thread_to_thread_object): Return a new
3383 reference.
3384 (infpy_thread_from_thread_handle): Update.
3385 * python/py-infthread.c (gdbpy_selected_thread): Update.
3386 * python/py-stopevent.c (create_stop_event_object): Update.
3387 * python/py-threadevent.c (py_get_event_thread): Return a new
3388 reference.
3389 (py_get_event_thread): Update.
3390 * python/py-event.h (py_get_event_thread): Change return type.
3391 * python/py-continueevent.c (create_continue_event_object):
3392 Update.
3393
3394 2018-09-16 Tom Tromey <tom@tromey.com>
3395
3396 * python/py-progspace.c (pspy_get_objfiles): Update.
3397 * python/python-internal.h (objfile_to_objfile_object): Change
3398 return type.
3399 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3400 Update.
3401 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3402 Update.
3403 * python/python.c (gdbpy_get_current_objfile): Update.
3404 (gdbpy_objfiles): Update.
3405 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3406 Update.
3407 (objfile_to_objfile_object): Return a new reference.
3408 * python/py-symtab.c (stpy_get_objfile): Update.
3409 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3410 Update.
3411
3412 2018-09-16 Tom Tromey <tom@tromey.com>
3413
3414 * python/py-inferior.c (infpy_get_progspace): Update.
3415 * python/python-internal.h (pspace_to_pspace_object): Change
3416 return type.
3417 * python/py-newobjfileevent.c
3418 (create_clear_objfiles_event_object): Update.
3419 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3420 Update.
3421 * python/python.c (gdbpy_get_current_progspace): Update.
3422 (gdbpy_progspaces): Update.
3423 * python/py-progspace.c (pspace_to_pspace_object): Return a new
3424 reference.
3425 * python/py-objfile.c (objfpy_get_progspace): Update.
3426 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3427 Update.
3428
3429 2018-09-16 Tom Tromey <tom@tromey.com>
3430
3431 * python/lib/gdb/__init__.py (current_progspace, objfiles)
3432 (solib_name, block_for_pc, find_pc_line): New functions.
3433 (execute_unwinders): Update.
3434 * python/py-block.c (gdbpy_block_for_pc): Remove.
3435 * python/py-inferior.c (infpy_get_progspace): New function.
3436 (inferior_object_getset) <progspace>: Add.
3437 * python/py-progspace.c (pspy_objfiles): Rewrite.
3438 (pspy_solib_name, pspy_block_for_pc)
3439 (pspy_find_pc_line, pspy_is_valid): New functions.
3440 (progspace_object_methods): Add entries for solib_name,
3441 block_for_pc, find_pc_line, is_valid.
3442 * python/python-internal.h (gdbpy_block_for_pc)
3443 (build_objfiles_list): Don't declare.
3444 * python/python.c: Don't include solib.h.
3445 (gdbpy_solib_name, gdbpy_find_pc_line)
3446 (gdbpy_get_current_progspace, build_objfiles_list)
3447 (gdbpy_objfiles): Remove.
3448 (GdbMethods) <current_progspace, objfiles, block_for_pc,
3449 solib_name, find_pc_line>: Remove entries.
3450
3451 2018-09-16 Tom Tromey <tom@tromey.com>
3452
3453 * top.c (new_ui_command): Use GNU style for metasyntactic
3454 variables.
3455 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3456 variables.
3457 * maint.c (maintenance_translate_address): Remove "<>" around
3458 text.
3459 * interps.c (interpreter_exec_cmd): Use GNU style for
3460 metasyntactic variables.
3461 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3462 metasyntactic variables.
3463 * tracepoint.c (tfind_range_command): Use GNU style for
3464 metasyntactic variables.
3465 (tfind_outside_command): Likewise.
3466 (_initialize_tracepoint): Likewise.
3467 * remote.c (extended_remote_target::create_inferior): Use GNU
3468 style for metasyntactic variables.
3469 * sparc64-tdep.c (adi_examine_command): Use GNU style for
3470 metasyntactic variables.
3471 (adi_assign_command): Likewise.
3472
3473 2018-09-16 Tom Tromey <tom@tromey.com>
3474
3475 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3476 metasyntactic variables. Print message if no disassembler options
3477 are available.
3478
3479 2018-09-15 Tom Tromey <tom@tromey.com>
3480
3481 * infcmd.c (get_inferior_args): Return const char *.
3482 * inferior.h (get_inferior_args): Return type now const.
3483 * linux-tdep.c (linux_fill_prpsinfo): Update.
3484 * procfs.c (procfs_target::make_corefile_notes): Update.
3485
3486 2018-09-07 Tom Tromey <tom@tromey.com>
3487
3488 * python/python.c (execute_gdb_command): Call bpstat_do_actions
3489 inside the TRY.
3490
3491 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
3492
3493 * nios2-tdep.c (nios2_type_align): New.
3494 (nios2_gdb_arch_init): Install type_align hook.
3495
3496 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3497
3498 * eval.c (fake_method::fake_method): Call xzalloc directly for a
3499 type that is neither object file owned, nor gdbarch owned.
3500 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3501 gdbarch is non-NULL.
3502 (alloc_type_instance): Allocate non-objfile owned types on the
3503 gdbarch obstack.
3504 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3505 using TYPE_ALLOC to ensure memory is allocated on the correct
3506 obstack.
3507 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3508 obstack, or the gdbarch obstack.
3509 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3510
3511 2018-09-14 Tom Tromey <tom@tromey.com>
3512
3513 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3514 block.
3515
3516 2018-09-14 Tom Tromey <tom@tromey.com>
3517
3518 * nat/fork-inferior.c (get_startup_shell): Remove "static".
3519
3520 2018-09-13 Tom Tromey <tom@tromey.com>
3521
3522 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3523 static.
3524
3525 2018-09-13 Tom Tromey <tom@tromey.com>
3526
3527 * exec.c (try_open_exec_file): Use std::string.
3528
3529 2018-09-13 Tom Tromey <tom@tromey.com>
3530
3531 * utils.h (gdb_bfd_errmsg): Return std::string.
3532 * exec.c (exec_file_attach): Update.
3533 * compile/compile-object-load.c (compile_object_load): Update.
3534 * utils.c (gdb_bfd_errmsg): Return std::string.
3535
3536 2018-09-13 Tom Tromey <tom@tromey.com>
3537
3538 * procfs.c (struct procinfo_deleter): New.
3539 (procinfo_up): New typedef.
3540 (do_destroy_procinfo_cleanup): Remove.
3541 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
3542
3543 2018-09-13 Tom Tromey <tom@tromey.com>
3544
3545 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3546
3547 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3548 2018-09-13 Tom Tromey <tom@tromey.com>
3549
3550 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3551 (pspy_get_objfiles): New function.
3552 (progspace_object_methods): New.
3553 (pspace_object_type): Add tp_methods callback.
3554 * python/python-internal.h (build_objfiles_list): New
3555 declaration.
3556 * python/python.c (build_objfiles_list): New function.
3557 (gdbpy_objfiles): Implement using build_objfiles_list.
3558 * NEWS: Mention the Progspace.objfiles method.
3559
3560 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3561
3562 * python/py-inferior.c (infpy_get_progspace): New function.
3563 (inferior_object_getset): Add progspace property.
3564 * NEWS: Mention the new property.
3565
3566 2018-09-13 Tom Tromey <tom@tromey.com>
3567
3568 PR rust/23650:
3569 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3570
3571 2018-09-13 Tom Tromey <tom@tromey.com>
3572
3573 PR rust/23626:
3574 * rust-lang.c (rust_enum_variant): Now static.
3575 (rust_empty_enum_p): New function.
3576 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3577 Handle empty enum.
3578
3579 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3580
3581 * python/py-inferior.c (infpy_repr): New.
3582 (inferior_object_type): Register infpy_repr.
3583 * python/py-objfile.c (objfpy_repr): New.
3584 (objfile_object_type): Register objfpy_repr.
3585
3586 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3587
3588 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3589
3590 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3591
3592 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3593 typo.
3594
3595 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
3596
3597 * common/common-utils.c: Don't include '<sys/stat.h>'.
3598 (is_regular_file): Move to...
3599 * common/filestuff.c (is_regular_file): ... here.
3600 * common/common-utils.h (is_regular_file): Move to...
3601 * common/filestuff.h (is_regular_file): ... here.
3602
3603 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
3604
3605 * skip.c (debug_skip): New variable.
3606 (skiplist_entry::do_skip_file_p): Add debug output.
3607 (skiplist_entry::do_skip_gfile_p): Likewise.
3608 (skiplist_entry::skip_function_p): Likewise.
3609 (_initialize_step_skip): Create debug command.
3610 * NEWS: Mention set/show debug skip.
3611
3612 2018-09-11 Xavier Roirand <roirand@adacore.com>
3613
3614 * darwin-nat.c (should_disable_startup_with_shell):
3615 New function.
3616 (darwin_nat_target::create_inferior): Add call.
3617
3618 2018-09-11 Xavier Roirand <roirand@adacore.com>
3619
3620 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3621 inf_port, msg_state>: Initialize.
3622 (struct darwin_thread_info) <signaled, single_step>: Change
3623 type and initialize.
3624 (struct darwin_thread_info) <event>: Initialize.
3625
3626 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3627
3628 PR gdb/23555
3629 PR gdb/23558
3630 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3631 guesses.
3632
3633 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3634
3635 Revert:
3636 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3637
3638 PR gdb/23555
3639 PR gdb/23558
3640 * gnulib/aclocal.m4: Regenerate.
3641 * gnulib/config.in: Regenerate.
3642 * gnulib/configure: Regenerate.
3643 * gnulib/import/Makefile.am: Update.
3644 * gnulib/import/Makefile.in: Update.
3645 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3646 * gnulib/import/_Noreturn.h: ... this.
3647 * gnulib/import/alloca.in.h: Update.
3648 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3649 * gnulib/import/arg-nonnull.h: ... this.
3650 * gnulib/import/assure.h: Update.
3651 * gnulib/import/at-func.c: Update.
3652 * gnulib/import/basename-lgpl.c: Update.
3653 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3654 * gnulib/import/c++defs.h: ... this.
3655 * gnulib/import/canonicalize-lgpl.c: Update.
3656 * gnulib/import/cdefs.h: Update.
3657 * gnulib/import/chdir-long.c: Update.
3658 * gnulib/import/chdir-long.h: Update.
3659 * gnulib/import/cloexec.c: Update.
3660 * gnulib/import/cloexec.h: Update.
3661 * gnulib/import/close.c: Update.
3662 * gnulib/import/closedir.c: Update.
3663 * gnulib/import/config.charset: Update.
3664 * gnulib/import/dirent-private.h: Update.
3665 * gnulib/import/dirent.in.h: Update.
3666 * gnulib/import/dirfd.c: Update.
3667 * gnulib/import/dirname-lgpl.c: Update.
3668 * gnulib/import/dirname.h: Update.
3669 * gnulib/import/dosname.h: Update.
3670 * gnulib/import/dup-safer-flag.c: Update.
3671 * gnulib/import/dup-safer.c: Update.
3672 * gnulib/import/dup.c: Update.
3673 * gnulib/import/dup2.c: Update.
3674 * gnulib/import/errno.in.h: Update.
3675 * gnulib/import/error.c: Update.
3676 * gnulib/import/error.h: Update.
3677 * gnulib/import/exitfail.c: Update.
3678 * gnulib/import/exitfail.h: Update.
3679 * gnulib/import/extra/update-copyright: Update.
3680 * gnulib/import/fchdir.c: Update.
3681 * gnulib/import/fcntl.c: Update.
3682 * gnulib/import/fcntl.in.h: Update.
3683 * gnulib/import/fd-hook.c: Update.
3684 * gnulib/import/fd-hook.h: Update.
3685 * gnulib/import/fd-safer-flag.c: Update.
3686 * gnulib/import/fd-safer.c: Update.
3687 * gnulib/import/fdopendir.c: Update.
3688 * gnulib/import/filename.h: Update.
3689 * gnulib/import/filenamecat-lgpl.c: Update.
3690 * gnulib/import/filenamecat.h: Update.
3691 * gnulib/import/flexmember.h: Update.
3692 * gnulib/import/float+.h: Update.
3693 * gnulib/import/float.c: Update.
3694 * gnulib/import/float.in.h: Update.
3695 * gnulib/import/fnmatch.c: Update.
3696 * gnulib/import/fnmatch.in.h: Update.
3697 * gnulib/import/fnmatch_loop.c: Update.
3698 * gnulib/import/fpucw.h: Update.
3699 * gnulib/import/frexp.c: Update.
3700 * gnulib/import/frexpl.c: Update.
3701 * gnulib/import/fstat.c: Update.
3702 * gnulib/import/fstatat.c: Update.
3703 * gnulib/import/getcwd-lgpl.c: Update.
3704 * gnulib/import/getcwd.c: Update.
3705 * gnulib/import/getdtablesize.c: Update.
3706 * gnulib/import/getlogin_r.c: Update.
3707 * gnulib/import/getprogname.c: Update.
3708 * gnulib/import/getprogname.h: Update.
3709 * gnulib/import/gettext.h: Update.
3710 * gnulib/import/gettimeofday.c: Update.
3711 * gnulib/import/glob-libc.h: Update.
3712 * gnulib/import/glob.c: Update.
3713 * gnulib/import/glob.in.h: Update.
3714 * gnulib/import/glob_internal.h: Update.
3715 * gnulib/import/glob_pattern_p.c: Update.
3716 * gnulib/import/globfree.c: Update.
3717 * gnulib/import/hard-locale.c: Update.
3718 * gnulib/import/hard-locale.h: Update.
3719 * gnulib/import/intprops.h: Update.
3720 * gnulib/import/inttypes.in.h: Update.
3721 * gnulib/import/isnan.c: Update.
3722 * gnulib/import/isnand-nolibm.h: Update.
3723 * gnulib/import/isnand.c: Update.
3724 * gnulib/import/isnanl-nolibm.h: Update.
3725 * gnulib/import/isnanl.c: Update.
3726 * gnulib/import/itold.c: Update.
3727 * gnulib/import/libc-config.h: Update.
3728 * gnulib/import/limits.in.h: Update.
3729 * gnulib/import/localcharset.c: Update.
3730 * gnulib/import/localcharset.h: Update.
3731 * gnulib/import/localtime-buffer.c: Update.
3732 * gnulib/import/localtime-buffer.h: Update.
3733 * gnulib/import/lstat.c: Update.
3734 * gnulib/import/m4/00gnulib.m4: Update.
3735 * gnulib/import/m4/__inline.m4: Update.
3736 * gnulib/import/m4/absolute-header.m4: Update.
3737 * gnulib/import/m4/alloca.m4: Update.
3738 * gnulib/import/m4/builtin-expect.m4: Update.
3739 * gnulib/import/m4/canonicalize.m4: Update.
3740 * gnulib/import/m4/chdir-long.m4: Update.
3741 * gnulib/import/m4/close.m4: Update.
3742 * gnulib/import/m4/closedir.m4: Update.
3743 * gnulib/import/m4/configmake.m4: Update.
3744 * gnulib/import/m4/d-ino.m4: Update.
3745 * gnulib/import/m4/d-type.m4: Update.
3746 * gnulib/import/m4/dirent_h.m4: Update.
3747 * gnulib/import/m4/dirfd.m4: Update.
3748 * gnulib/import/m4/dirname.m4: Update.
3749 * gnulib/import/m4/double-slash-root.m4: Update.
3750 * gnulib/import/m4/dup.m4: Update.
3751 * gnulib/import/m4/dup2.m4: Update.
3752 * gnulib/import/m4/eealloc.m4: Update.
3753 * gnulib/import/m4/environ.m4: Update.
3754 * gnulib/import/m4/errno_h.m4: Update.
3755 * gnulib/import/m4/error.m4: Update.
3756 * gnulib/import/m4/exponentd.m4: Update.
3757 * gnulib/import/m4/exponentl.m4: Update.
3758 * gnulib/import/m4/extensions.m4: Update.
3759 * gnulib/import/m4/extern-inline.m4: Update.
3760 * gnulib/import/m4/fchdir.m4: Update.
3761 * gnulib/import/m4/fcntl-o.m4: Update.
3762 * gnulib/import/m4/fcntl.m4: Update.
3763 * gnulib/import/m4/fcntl_h.m4: Update.
3764 * gnulib/import/m4/fdopendir.m4: Update.
3765 * gnulib/import/m4/filenamecat.m4: Update.
3766 * gnulib/import/m4/flexmember.m4: Update.
3767 * gnulib/import/m4/float_h.m4: Update.
3768 * gnulib/import/m4/fnmatch.m4: Update.
3769 * gnulib/import/m4/fnmatch_h.m4: Update.
3770 * gnulib/import/m4/fpieee.m4: Update.
3771 * gnulib/import/m4/frexp.m4: Update.
3772 * gnulib/import/m4/frexpl.m4: Update.
3773 * gnulib/import/m4/fstat.m4: Update.
3774 * gnulib/import/m4/fstatat.m4: Update.
3775 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3776 * gnulib/import/m4/getcwd-path-max.m4: Update.
3777 * gnulib/import/m4/getcwd.m4: Update.
3778 * gnulib/import/m4/getdtablesize.m4: Update.
3779 * gnulib/import/m4/getlogin.m4: Update.
3780 * gnulib/import/m4/getlogin_r.m4: Update.
3781 * gnulib/import/m4/getpagesize.m4: Update.
3782 * gnulib/import/m4/getprogname.m4: Update.
3783 * gnulib/import/m4/gettimeofday.m4: Update.
3784 * gnulib/import/m4/glibc21.m4: Update.
3785 * gnulib/import/m4/glob.m4: Update.
3786 * gnulib/import/m4/glob_h.m4: Update.
3787 * gnulib/import/m4/gnulib-cache.m4: Update.
3788 * gnulib/import/m4/gnulib-common.m4: Update.
3789 * gnulib/import/m4/gnulib-comp.m4: Update.
3790 * gnulib/import/m4/gnulib-tool.m4: Update.
3791 * gnulib/import/m4/hard-locale.m4: Update.
3792 * gnulib/import/m4/include_next.m4: Update.
3793 * gnulib/import/m4/inttypes-pri.m4: Update.
3794 * gnulib/import/m4/inttypes.m4: Update.
3795 * gnulib/import/m4/isnand.m4: Update.
3796 * gnulib/import/m4/isnanl.m4: Update.
3797 * gnulib/import/m4/largefile.m4: Update.
3798 * gnulib/import/m4/limits-h.m4: Update.
3799 * gnulib/import/m4/localcharset.m4: Update.
3800 * gnulib/import/m4/locale-fr.m4: Update.
3801 * gnulib/import/m4/locale-ja.m4: Update.
3802 * gnulib/import/m4/locale-zh.m4: Update.
3803 * gnulib/import/m4/localtime-buffer.m4: Update.
3804 * gnulib/import/m4/longlong.m4: Update.
3805 * gnulib/import/m4/lstat.m4: Update.
3806 * gnulib/import/m4/malloc.m4: Update.
3807 * gnulib/import/m4/malloca.m4: Update.
3808 * gnulib/import/m4/math_h.m4: Update.
3809 * gnulib/import/m4/mbrtowc.m4: Update.
3810 * gnulib/import/m4/mbsinit.m4: Update.
3811 * gnulib/import/m4/mbsrtowcs.m4: Update.
3812 * gnulib/import/m4/mbstate_t.m4: Update.
3813 * gnulib/import/m4/memchr.m4: Update.
3814 * gnulib/import/m4/memmem.m4: Update.
3815 * gnulib/import/m4/mempcpy.m4: Update.
3816 * gnulib/import/m4/memrchr.m4: Update.
3817 * gnulib/import/m4/mkdir.m4: Update.
3818 * gnulib/import/m4/mkstemp.m4: Update.
3819 * gnulib/import/m4/mmap-anon.m4: Update.
3820 * gnulib/import/m4/mode_t.m4: Update.
3821 * gnulib/import/m4/msvc-inval.m4: Update.
3822 * gnulib/import/m4/msvc-nothrow.m4: Update.
3823 * gnulib/import/m4/multiarch.m4: Update.
3824 * gnulib/import/m4/nocrash.m4: Update.
3825 * gnulib/import/m4/off_t.m4: Update.
3826 * gnulib/import/m4/onceonly.m4: Update.
3827 * gnulib/import/m4/open-cloexec.m4: Update.
3828 * gnulib/import/m4/open.m4: Update.
3829 * gnulib/import/m4/openat.m4: Update.
3830 * gnulib/import/m4/opendir.m4: Update.
3831 * gnulib/import/m4/pathmax.m4: Update.
3832 * gnulib/import/m4/rawmemchr.m4: Update.
3833 * gnulib/import/m4/readdir.m4: Update.
3834 * gnulib/import/m4/readlink.m4: Update.
3835 * gnulib/import/m4/realloc.m4: Update.
3836 * gnulib/import/m4/rename.m4: Update.
3837 * gnulib/import/m4/rewinddir.m4: Update.
3838 * gnulib/import/m4/rmdir.m4: Update.
3839 * gnulib/import/m4/save-cwd.m4: Update.
3840 * gnulib/import/m4/secure_getenv.m4: Update.
3841 * gnulib/import/m4/setenv.m4: Update.
3842 * gnulib/import/m4/signal_h.m4: Update.
3843 * gnulib/import/m4/ssize_t.m4: Update.
3844 * gnulib/import/m4/stat-time.m4: Update.
3845 * gnulib/import/m4/stat.m4: Update.
3846 * gnulib/import/m4/std-gnu11.m4: Update.
3847 * gnulib/import/m4/stdbool.m4: Update.
3848 * gnulib/import/m4/stddef_h.m4: Update.
3849 * gnulib/import/m4/stdint.m4: Update.
3850 * gnulib/import/m4/stdio_h.m4: Update.
3851 * gnulib/import/m4/stdlib_h.m4: Update.
3852 * gnulib/import/m4/strchrnul.m4: Update.
3853 * gnulib/import/m4/strdup.m4: Update.
3854 * gnulib/import/m4/strerror.m4: Update.
3855 * gnulib/import/m4/string_h.m4: Update.
3856 * gnulib/import/m4/strstr.m4: Update.
3857 * gnulib/import/m4/strtok_r.m4: Update.
3858 * gnulib/import/m4/sys_socket_h.m4: Update.
3859 * gnulib/import/m4/sys_stat_h.m4: Update.
3860 * gnulib/import/m4/sys_time_h.m4: Update.
3861 * gnulib/import/m4/sys_types_h.m4: Update.
3862 * gnulib/import/m4/tempname.m4: Update.
3863 * gnulib/import/m4/time_h.m4: Update.
3864 * gnulib/import/m4/unistd-safer.m4: Update.
3865 * gnulib/import/m4/unistd_h.m4: Update.
3866 * gnulib/import/m4/warn-on-use.m4: Update.
3867 * gnulib/import/m4/wchar_h.m4: Update.
3868 * gnulib/import/m4/wchar_t.m4: Update.
3869 * gnulib/import/m4/wctype_h.m4: Update.
3870 * gnulib/import/m4/wint_t.m4: Update.
3871 * gnulib/import/malloc.c: Update.
3872 * gnulib/import/malloc/scratch_buffer.h: Update.
3873 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3874 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3875 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3876 * gnulib/import/malloca.c: Update.
3877 * gnulib/import/malloca.h: Update.
3878 * gnulib/import/malloca.valgrind: Update.
3879 * gnulib/import/math.in.h: Update.
3880 * gnulib/import/mbrtowc.c: Update.
3881 * gnulib/import/mbsinit.c: Update.
3882 * gnulib/import/mbsrtowcs-impl.h: Update.
3883 * gnulib/import/mbsrtowcs-state.c: Update.
3884 * gnulib/import/mbsrtowcs.c: Update.
3885 * gnulib/import/memchr.c: Update.
3886 * gnulib/import/memmem.c: Update.
3887 * gnulib/import/mempcpy.c: Update.
3888 * gnulib/import/memrchr.c: Update.
3889 * gnulib/import/mkdir.c: Update.
3890 * gnulib/import/mkstemp.c: Update.
3891 * gnulib/import/msvc-inval.c: Update.
3892 * gnulib/import/msvc-inval.h: Update.
3893 * gnulib/import/msvc-nothrow.c: Update.
3894 * gnulib/import/msvc-nothrow.h: Update.
3895 * gnulib/import/open.c: Update.
3896 * gnulib/import/openat-die.c: Update.
3897 * gnulib/import/openat-priv.h: Update.
3898 * gnulib/import/openat-proc.c: Update.
3899 * gnulib/import/openat.c: Update.
3900 * gnulib/import/openat.h: Update.
3901 * gnulib/import/opendir.c: Update.
3902 * gnulib/import/pathmax.h: Update.
3903 * gnulib/import/pipe-safer.c: Update.
3904 * gnulib/import/rawmemchr.c: Update.
3905 * gnulib/import/readdir.c: Update.
3906 * gnulib/import/readlink.c: Update.
3907 * gnulib/import/realloc.c: Update.
3908 * gnulib/import/ref-add.sin: Update.
3909 * gnulib/import/ref-del.sin: Update.
3910 * gnulib/import/rename.c: Update.
3911 * gnulib/import/rewinddir.c: Update.
3912 * gnulib/import/rmdir.c: Update.
3913 * gnulib/import/same-inode.h: Update.
3914 * gnulib/import/save-cwd.c: Update.
3915 * gnulib/import/save-cwd.h: Update.
3916 * gnulib/import/scratch_buffer.h: Update.
3917 * gnulib/import/secure_getenv.c: Update.
3918 * gnulib/import/setenv.c: Update.
3919 * gnulib/import/signal.in.h: Update.
3920 * gnulib/import/stat-time.c: Update.
3921 * gnulib/import/stat-time.h: Update.
3922 * gnulib/import/stat-w32.c: Update.
3923 * gnulib/import/stat-w32.h: Update.
3924 * gnulib/import/stat.c: Update.
3925 * gnulib/import/stdbool.in.h: Update.
3926 * gnulib/import/stddef.in.h: Update.
3927 * gnulib/import/stdint.in.h: Update.
3928 * gnulib/import/stdio.in.h: Update.
3929 * gnulib/import/stdlib.in.h: Update.
3930 * gnulib/import/str-two-way.h: Update.
3931 * gnulib/import/strchrnul.c: Update.
3932 * gnulib/import/strdup.c: Update.
3933 * gnulib/import/streq.h: Update.
3934 * gnulib/import/strerror-override.c: Update.
3935 * gnulib/import/strerror-override.h: Update.
3936 * gnulib/import/strerror.c: Update.
3937 * gnulib/import/string.in.h: Update.
3938 * gnulib/import/stripslash.c: Update.
3939 * gnulib/import/strnlen1.c: Update.
3940 * gnulib/import/strnlen1.h: Update.
3941 * gnulib/import/strstr.c: Update.
3942 * gnulib/import/strtok_r.c: Update.
3943 * gnulib/import/sys_stat.in.h: Update.
3944 * gnulib/import/sys_time.in.h: Update.
3945 * gnulib/import/sys_types.in.h: Update.
3946 * gnulib/import/tempname.c: Update.
3947 * gnulib/import/tempname.h: Update.
3948 * gnulib/import/time.in.h: Update.
3949 * gnulib/import/unistd--.h: Update.
3950 * gnulib/import/unistd-safer.h: Update.
3951 * gnulib/import/unistd.in.h: Update.
3952 * gnulib/import/unsetenv.c: Update.
3953 * gnulib/import/verify.h: Update.
3954 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3955 * gnulib/import/wchar.in.h: Update.
3956 * gnulib/import/wctype.in.h: Update.
3957 * gnulib/import/xalloc-oversized.h: Update.
3958 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3959 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3960
3961 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
3962
3963 * record-btrace.c (get_thread_current_frame): Remove
3964 old_inferior_ptid.
3965
3966 2018-09-10 Jerome Guitton <guitton@adacore.com>
3967
3968 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3969 with check_tag to 1 if and only if the type is tagged and the
3970 component being searched cannot been found in the current
3971 view. Otherwise, always call ada_to_fixed_type with
3972 check_tag to 0.
3973
3974 2018-09-10 Xavier Roirand <roirand@adacore.com>
3975
3976 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3977 declaration.
3978 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3979 * ada-varobj.c (ada_varobj_get_number_of_children,
3980 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3981
3982 2018-09-10 Xavier Roirand <roirand@adacore.com>
3983
3984 * ada-valprint.c (ada_value_print): Use type instead of
3985 enclosing type.
3986
3987 2018-09-10 Xavier Roirand <roirand@adacore.com>
3988
3989 * ada-lang.c (ada_value_subscript): Handle case when parameter is
3990 an array of access to unconstrained array.
3991
3992 2018-09-10 Xavier Roirand <roirand@adacore.com>
3993
3994 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3995 (ada_check_typedef): Use it.
3996
3997 2018-09-10 Xavier Roirand <roirand@adacore.com>
3998
3999 * ada-varobj.c (ada_varobj_describe_struct_child)
4000 (ada_varobj_describe_child): Handle union case like struct one.
4001
4002 2018-09-10 Tom Tromey <tom@tromey.com>
4003
4004 PR python/18380:
4005 * python/python.c (_initialize_python): Make example in "python"
4006 help work in Python 3.
4007
4008 2018-09-10 Eli Zaretskii <eliz@gnu.org>
4009
4010 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
4011 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
4012 $(EXEEXT) to the script, as it is not a program.
4013
4014 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
4015
4016 * python/py-prettyprint.c (pretty_print_one_value): Return
4017 gdbpy_ref<>.
4018 (print_string_repr): Adjust.
4019 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
4020 * python/python-internal.h (apply_varobj_pretty_printer): Return
4021 gdbpy_ref<>.
4022 * varobj.c (varobj_value_get_print_value): Adjust.
4023
4024 2018-09-08 Tom Tromey <tom@tromey.com>
4025
4026 PR python/16047:
4027 * python/py-prettyprint.c (pretty_print_one_value): Check for
4028 to_string method.
4029
4030 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4031
4032 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4033 replace_operator_with_call.
4034
4035 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4036
4037 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4038
4039 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4040
4041 * ada-typeprint.c (print_range): Print the bounds using TYPE
4042 rather than its TYPE_TARGET_TYPE.
4043
4044 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4045
4046 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4047 call to ada_to_fixed_value_create.
4048
4049 2018-09-08 Jerome Guitton <guitton@adacore.com>
4050
4051 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4052
4053 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4054
4055 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4056 by calls to error.
4057
4058 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4059
4060 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4061 Move update of loop variable "fi".
4062
4063 2018-09-08 Joel Brobecker <brobecker@adacore.com>
4064
4065 * ada-lang.c (value_assign_to_component): In the case of
4066 big-endian targets, extract the bits of the given VAL
4067 using an src_offset of zero if container is not a scalar.
4068
4069 2018-09-06 Simon Ser <contact@emersion.fr>
4070
4071 PR gdb/23105
4072 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4073 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4074 * fbsd-tdep.c (fbsd_make_note_desc): New.
4075 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4076 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4077 * target.h (enum target_object) Add FreeBSD-specific
4078 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4079
4080 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4081
4082 * compile/compile-c.h (generate_c_for_variable_locations):
4083 Change reference to pointer.
4084 * compile/compile-c-support.c (compile_program) <compute>:
4085 Likewise.
4086 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4087 (generate_c_for_for_one_variable): Likewise
4088 (generate_c_for_variable_locations): Likewise
4089 * compile/compile-c-types.c (compile_c_instance::convert_type):
4090 Likewise
4091 * compile/compile-cplus-symbols.c (convert_one_symbol):
4092 std::move the scope passed to enter_scope.
4093 * compile/compile-cplus-types.c
4094 (compile_cplus_instance::enter_scope): Make parameter
4095 rvalue-reference.
4096 (compile_cplus_instance::new_scope): Change reference to
4097 pointer.
4098 (compile_cplus_instance::convert_type): Likewise
4099 (compile_cplus_convert_typedef): std::move the scope passed to
4100 enter_scope.
4101 (compile_cplus_convert_struct_or_union): Likewise.
4102 (compile_cplus_convert_enum): Likewise.
4103 (compile_cplus_convert_namespace): Likewise.
4104 * compile/compile-cplus.h (compile_cplus_instance)
4105 <enter_scope>: Make parameter rvalue-reference.
4106 * compile/compile-internal.h (compile_instance)
4107 <get_cached_type>: Likewise
4108 * compile/compile-loc2c.c (push): Likewise
4109 (pushf): Likewise
4110 (unary): Likewise
4111 (binary): Likewise
4112 (print_label): Likewise
4113 (pushf_register_address): Likewise
4114 (pushf_register): Likewise
4115 (do_compile_dwarf_expr_to_c): Likewise
4116 (compile_dwarf_expr_to_c): Likewise
4117 (compile_dwarf_bounds_to_c): Likewise
4118 * compile/compile.c (compile_instance::get_cached_type):
4119 Likewise
4120 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4121 (compile_dwarf_bounds_to_c): Likewise
4122 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4123 (dwarf2_compile_property_to_c): Likewise
4124 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4125 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4126 Likewise
4127
4128 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4129
4130 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4131 * tui/tui-data.c (init_content_element): Don't initialize it.
4132
4133 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
4134
4135 * tui/tui-data.h (struct tui_win_info)
4136 <detail::opaque>: Remove.
4137 * tui/tui-data.c (init_win_info): Remove assignment.
4138
4139 2018-09-05 Tom Tromey <tom@tromey.com>
4140
4141 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4142 -Wformat-nonliteral.
4143 * target-float.c (host_float_ops<T>::to_string)
4144 (host_float_ops<T>::from_string): Use
4145 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4146 * configure: Rebuild.
4147
4148 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
4149
4150 * printcmd.c (printf_c_string): Use
4151 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4152 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4153
4154 2018-09-05 Tom Tromey <tom@tromey.com>
4155
4156 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4157
4158 2018-09-05 Tom de Vries <tdevries@suse.de>
4159
4160 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4161 with resolve_abstract_p == true.
4162 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4163 defaulting to false. Propagate resolve_abstract_p to
4164 dwarf2_fetch_die_loc_sect_off.
4165 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4166 parameter, defaulting to false.
4167 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4168 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4169 parameter.
4170 * dwarf2read.h (struct die_info): Forward-declare.
4171 (die_info_ptr): New typedef.
4172 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4173
4174 2018-09-05 Joel Brobecker <brobecker@adacore.com>
4175
4176 GDB 8.2 released.
4177
4178 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
4179 Pedro Alves <palves@redhat.com>
4180
4181 * gnulib/Makefile.in (aclocal_m4_deps): Move to
4182 "aclocal-m4-deps.mk". Include file here.
4183 $(srcdir)/aclocal.m4: Add "configure.ac".
4184 * gnulib/aclocal-m4-deps.mk: New file.
4185 * gnulib/update-gnulib.sh: Automatically update
4186 "aclocal-m4-deps.mk".
4187
4188 2018-09-04 Tom Tromey <tom@tromey.com>
4189
4190 * configure: Rebuild.
4191 * configure.ac: Remove multi-ice code.
4192
4193 2018-09-04 Tom Tromey <tom@tromey.com>
4194
4195 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4196 (ada-exp.o): Update.
4197
4198 2018-09-04 Tom Tromey <tom@tromey.com>
4199
4200 * Makefile.in (printcmd.o, target-float.o): Remove.
4201 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4202
4203 2018-09-04 Tom Tromey <tom@tromey.com>
4204
4205 * gnulib/Makefile.in: Remove obsolete comment.
4206 * Makefile.in: Remove obsolete comment.
4207
4208 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
4209
4210 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4211 line with '+'.
4212
4213 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4214
4215 * riscv-tdep.c: Add 'prologue-value.h' include.
4216 (struct riscv_unwind_cache): New struct.
4217 (riscv_debug_unwinder): New global.
4218 (riscv_scan_prologue): Update arguments, capture register details
4219 from prologue scan.
4220 (riscv_skip_prologue): Reformat arguments line, move end of
4221 prologue calculation into riscv_scan_prologue.
4222 (riscv_frame_cache): Update return type, create
4223 riscv_unwind_cache, scan the prologue, and fill in remaining cache
4224 details.
4225 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4226 (riscv_frame_prev_register): Use the trad_frame within the
4227 riscv_unwind_cache.
4228 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4229 flag.
4230
4231 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
4232
4233 * trad-frame.h (trad_frame_set_realreg): Declare.
4234 (trad_frame_set_addr): Declare.
4235 * trad-frame.c (trad_frame_set_realreg): Define new function.
4236 (trad_frame_set_addr): Define new function.
4237 (trad_frame_set_reg_realreg): Use new function.
4238 (trad_frame_set_reg_addr): Use new function.
4239
4240 2018-09-01 Keith Seitz <keiths@redhat.com>
4241
4242 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4243 pulongest instead of "%lld".
4244 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4245 ATTRIBUTE_UNUSED.
4246
4247 2018-08-31 Tom Tromey <tom@tromey.com>
4248
4249 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4250 variant part type.
4251
4252 2018-08-31 Pedro Alves <palves@redhat.com>
4253
4254 * gdbarch.h: Regenerate.
4255
4256 2018-08-31 Pedro Alves <palves@redhat.com>
4257
4258 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4259 * target.h (Hardware watchpoint interfaces): Describe
4260 continuable/steppable/non-steppable watchpoints.
4261 * gdbarch.h, gdbarch.c: Regenerate.
4262
4263 2018-08-31 Pedro Alves <palves@redhat.com>
4264
4265 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4266 Delete.
4267 * s390-linux-nat.c
4268 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4269 * target.h (target_ops::have_continuable_watchpoint): Delete.
4270 (target_have_continuable_watchpoint): Delete.
4271 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4272 * target-delegates.c: Regenerate.
4273
4274 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4275
4276 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4277 the files present in "gnulib/import/m4/".
4278
4279 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4280
4281 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4282 c.sw, c.swsp, and c.sdsp.
4283
4284 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
4285
4286 * riscv-tdep.c (struct riscv_inferior_data): Delete.
4287 (riscv_read_misa_reg): Don't cache value read into inferior data.
4288 (riscv_new_inferior_data): Delete.
4289 (riscv_inferior_data_cleanup): Delete.
4290 (riscv_inferior_data): Delete.
4291 (riscv_invalidate_inferior_data): Delete.
4292 (_initialize_riscv_tdep): Remove initialisation of inferior data.
4293
4294 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
4295
4296 * compile/compile-cplus-types.c
4297 (compile_cplus_instance::leave_scope): Take the address of scope
4298 object.
4299 (compile_cplus_instance::convert_qualified_base): Compare quals
4300 to 0.
4301
4302 2018-08-30 Keith Seitz <keiths@redhat.com>
4303
4304 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4305 Use "%s" and host_address_to_string instead of "%p" in printf.
4306
4307 2018-08-29 Keith Seitz <keiths@redhat.com>
4308
4309 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4310 and compile-cplus-types.c.
4311 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4312 * c-lang.c (cplus_language_defn): Set C++ compile functions.
4313 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4314 Declare.
4315 * compile/compile-c-support.c: Include compile-cplus.h.
4316 (load_libcompile): Templatize.
4317 (get_compile_context): "New" function.
4318 (c_get_compile_context): Use get_compile_context.
4319 (cplus_get_compile_context): New function.
4320 (cplus_push_user_expression, cplus_pop_user_expression)
4321 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4322 (cplus_compute_program): Define new structs/functions.
4323 * compile/compile-cplus-symmbols.c: New file.
4324 * compile/compile-cplus-types.c: New file.
4325 * compile/compile-cplus.h: New file.
4326 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4327 Declare.
4328 * compile/compile-object-load.c (get_out_value_type): Use
4329 strncmp_iw when comparing symbol names.
4330 (compile_object_load): Add mst_bss and mst_data.
4331 * compile/compile.c (_initialize_compile): Remove
4332 -Wno-implicit-function-declaration from `compile_args'.
4333 * compile/gcc-cp-plugin.h: New file.
4334 * NEWS: Mention C++ compile support and new debug options.
4335
4336 2018-08-29 Keith Seitz <keiths@redhat.com>
4337
4338 * linespec.c (collect_info::add_symbol): Make virtual.
4339 (struct symbol_searcher_collect_info): New struct.
4340 (symbol_searcher::find_all_symbols): New method.
4341 * symtab.h (class symbol_searcher): New class.
4342
4343 2018-08-29 Keith Seitz <keiths@redhat.com>
4344
4345 * linespec.c (struct linespec) <function_symbols, label_symbols>:
4346 Change to vector of block_symbol. Update all users.
4347 (struct collect_info) <symbols>: Likewise.
4348 (collect_info::add_symbol): Take block_symbol as argument.
4349 Update all callers.
4350 (decode_compound_collector) <m_symbols>: Change type to vector
4351 of block_symbol. Update all users.
4352 (decode_compound_collector::operator ()): Change parameter type
4353 to block_symbol.
4354 (find_method, find_function_symbols, find_linespec_symbols)
4355 (find_label_symbols_in_block, find_label_symbols): Change symbol
4356 vectors to block_symbol vectors.
4357 * symtab.h (symbol_found_callback_ftype): Change parameter type to
4358 block_symbol.
4359
4360 2018-08-29 Keith Seitz <keiths@redhat.com>
4361
4362 * linespec.c (symbolp): Remove typedef and VEC definitions.
4363 (bound_minimal_symbol_d): Likewise.
4364
4365 2018-08-29 Keith Seitz <keiths@redhat.com>
4366
4367 * linespec.c (decode_compound_collector::decode_compound_collector):
4368 Remove initialization for `m_symtabs'.
4369 (decode_compound_collector::release_symbols): Change return type
4370 to std::vector. Update all callers.
4371 (class decode_compound_collector) <m_symbols>: Change type to
4372 std::vector.
4373 (lookup_prefix_sym): Change return type to std::vector. Update all
4374 callers.
4375 (compare_symbols): Remove.
4376 (std_compare_symbols): Rename to `compare_symbols'.
4377 (find_method): Change `sym_classes' parameter to std::vector.
4378 Update all callers. Use std::sort to sort sym_classes.
4379 (find_linespec_symbols): Remove cleanup.
4380
4381 2018-08-29 Keith Seitz <keiths@redhat.com>
4382
4383 * linespec.c (struct linespec) <minimal_symbols>: Change type to
4384 std::vector. Update all users.
4385 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4386 (struct collect_info) <minimal_symbols>: Likewise.
4387 (compare_msymbols): Return bool. Change parameters to const
4388 bound_minimal_symbol references.
4389 (find_method, find_function_symbols, find_linespec_symbols): Change
4390 `minsyms' parameter to std::vector. Update all callers.
4391
4392 2018-08-29 Keith Seitz <keiths@redhat.com>
4393
4394 * linespec.c (struct linespec) <label_symbols>: Change type to
4395 std::vector. Update all users.
4396 (find_label_symbols_in_block): Change `result' parameter to
4397 std::vector. Update all callers.
4398 (find_label_symbols): Return std::vector. Update all callers.
4399
4400 2018-08-29 Keith Seitz <keiths@redhat.com>
4401
4402 * linespec.c (struct linespec) <function_symbols>: Change type to
4403 std::vector. Update all users.
4404 (struct collect_info) <function_symbols>: Likewise.
4405 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4406 (std_compare_symbols): New function.
4407 (find_method, find_function_symbols, find_linespec_symbols)
4408 (find_label_symbols_in_block): Change `symbols' parameter to
4409 std::vector. Update all callers.
4410 (find_label_symbols): Likewise for `function_symbols' and
4411 `label_funcs_ret'.
4412
4413 2018-08-29 Keith Seitz <keiths@redhat.com>
4414
4415 * linespec.c (symtab_vector_up): Define.
4416 (struct linespec) <file_symtabs>: Change type to std::vector *.
4417 Update all uses.
4418 (struct collect_info) <file_symtabs>: Likewise.
4419 (collect_symtabs_from_filename): Return symtab_vector_up.
4420 Update all callers.
4421 (decode_objc): Remove cleanup.
4422 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4423 (symtab_collector::release_symtabs): Return symtab_vector_up.
4424 Update all callers.
4425 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4426 Update all users.
4427 (collect_symtabs_from_filename, symtabs_from_filename): Return
4428 symtab_vector_up. Update all callers.
4429
4430 2018-08-29 Tom Tromey <tom@tromey.com>
4431
4432 * csky-tdep.c (csky_analyze_prologue): Use
4433 core_addr_to_string_nz.
4434
4435 2018-08-29 Tom Tromey <tom@tromey.com>
4436
4437 * windows-nat.c (struct xlate_exception) <them>: Change type to
4438 DWORD.
4439 (xlate): Fix formatting. Remove last entry.
4440 (struct xlate_exception, xlate): Comment out.
4441 (windows_nat_target::resume): Use ranged for.
4442
4443 2018-08-29 Jim Wilson <jimw@sifive.com>
4444
4445 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4446 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4447 of NT_PRFPREG.
4448 (riscv_linux_nat_target::store_registers): Likewise.
4449
4450 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
4451
4452 PR gdb/23555
4453 PR gdb/23558
4454 * gnulib/aclocal.m4: Regenerate.
4455 * gnulib/config.in: Regenerate.
4456 * gnulib/configure: Regenerate.
4457 * gnulib/import/Makefile.am: Update.
4458 * gnulib/import/Makefile.in: Update.
4459 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4460 * gnulib/import/_Noreturn.h: ... this.
4461 * gnulib/import/alloca.in.h: Update.
4462 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4463 * gnulib/import/arg-nonnull.h: ... this.
4464 * gnulib/import/assure.h: Update.
4465 * gnulib/import/at-func.c: Update.
4466 * gnulib/import/basename-lgpl.c: Update.
4467 * gnulib/import/extra/snippet/c++defs.h: Rename to...
4468 * gnulib/import/c++defs.h: ... this.
4469 * gnulib/import/canonicalize-lgpl.c: Update.
4470 * gnulib/import/cdefs.h: Update.
4471 * gnulib/import/chdir-long.c: Update.
4472 * gnulib/import/chdir-long.h: Update.
4473 * gnulib/import/cloexec.c: Update.
4474 * gnulib/import/cloexec.h: Update.
4475 * gnulib/import/close.c: Update.
4476 * gnulib/import/closedir.c: Update.
4477 * gnulib/import/config.charset: Update.
4478 * gnulib/import/dirent-private.h: Update.
4479 * gnulib/import/dirent.in.h: Update.
4480 * gnulib/import/dirfd.c: Update.
4481 * gnulib/import/dirname-lgpl.c: Update.
4482 * gnulib/import/dirname.h: Update.
4483 * gnulib/import/dosname.h: Update.
4484 * gnulib/import/dup-safer-flag.c: Update.
4485 * gnulib/import/dup-safer.c: Update.
4486 * gnulib/import/dup.c: Update.
4487 * gnulib/import/dup2.c: Update.
4488 * gnulib/import/errno.in.h: Update.
4489 * gnulib/import/error.c: Update.
4490 * gnulib/import/error.h: Update.
4491 * gnulib/import/exitfail.c: Update.
4492 * gnulib/import/exitfail.h: Update.
4493 * gnulib/import/extra/update-copyright: Update.
4494 * gnulib/import/fchdir.c: Update.
4495 * gnulib/import/fcntl.c: Update.
4496 * gnulib/import/fcntl.in.h: Update.
4497 * gnulib/import/fd-hook.c: Update.
4498 * gnulib/import/fd-hook.h: Update.
4499 * gnulib/import/fd-safer-flag.c: Update.
4500 * gnulib/import/fd-safer.c: Update.
4501 * gnulib/import/fdopendir.c: Update.
4502 * gnulib/import/filename.h: Update.
4503 * gnulib/import/filenamecat-lgpl.c: Update.
4504 * gnulib/import/filenamecat.h: Update.
4505 * gnulib/import/flexmember.h: Update.
4506 * gnulib/import/float+.h: Update.
4507 * gnulib/import/float.c: Update.
4508 * gnulib/import/float.in.h: Update.
4509 * gnulib/import/fnmatch.c: Update.
4510 * gnulib/import/fnmatch.in.h: Update.
4511 * gnulib/import/fnmatch_loop.c: Update.
4512 * gnulib/import/fpucw.h: Update.
4513 * gnulib/import/frexp.c: Update.
4514 * gnulib/import/frexpl.c: Update.
4515 * gnulib/import/fstat.c: Update.
4516 * gnulib/import/fstatat.c: Update.
4517 * gnulib/import/getcwd-lgpl.c: Update.
4518 * gnulib/import/getcwd.c: Update.
4519 * gnulib/import/getdtablesize.c: Update.
4520 * gnulib/import/getlogin_r.c: Update.
4521 * gnulib/import/getprogname.c: Update.
4522 * gnulib/import/getprogname.h: Update.
4523 * gnulib/import/gettext.h: Update.
4524 * gnulib/import/gettimeofday.c: Update.
4525 * gnulib/import/glob-libc.h: Update.
4526 * gnulib/import/glob.c: Update.
4527 * gnulib/import/glob.in.h: Update.
4528 * gnulib/import/glob_internal.h: Update.
4529 * gnulib/import/glob_pattern_p.c: Update.
4530 * gnulib/import/globfree.c: Update.
4531 * gnulib/import/hard-locale.c: Update.
4532 * gnulib/import/hard-locale.h: Update.
4533 * gnulib/import/intprops.h: Update.
4534 * gnulib/import/inttypes.in.h: Update.
4535 * gnulib/import/isnan.c: Update.
4536 * gnulib/import/isnand-nolibm.h: Update.
4537 * gnulib/import/isnand.c: Update.
4538 * gnulib/import/isnanl-nolibm.h: Update.
4539 * gnulib/import/isnanl.c: Update.
4540 * gnulib/import/itold.c: Update.
4541 * gnulib/import/libc-config.h: Update.
4542 * gnulib/import/limits.in.h: Update.
4543 * gnulib/import/localcharset.c: Update.
4544 * gnulib/import/localcharset.h: Update.
4545 * gnulib/import/localtime-buffer.c: Update.
4546 * gnulib/import/localtime-buffer.h: Update.
4547 * gnulib/import/lstat.c: Update.
4548 * gnulib/import/m4/00gnulib.m4: Update.
4549 * gnulib/import/m4/__inline.m4: Update.
4550 * gnulib/import/m4/absolute-header.m4: Update.
4551 * gnulib/import/m4/alloca.m4: Update.
4552 * gnulib/import/m4/builtin-expect.m4: Update.
4553 * gnulib/import/m4/canonicalize.m4: Update.
4554 * gnulib/import/m4/chdir-long.m4: Update.
4555 * gnulib/import/m4/close.m4: Update.
4556 * gnulib/import/m4/closedir.m4: Update.
4557 * gnulib/import/m4/configmake.m4: Update.
4558 * gnulib/import/m4/d-ino.m4: Update.
4559 * gnulib/import/m4/d-type.m4: Update.
4560 * gnulib/import/m4/dirent_h.m4: Update.
4561 * gnulib/import/m4/dirfd.m4: Update.
4562 * gnulib/import/m4/dirname.m4: Update.
4563 * gnulib/import/m4/double-slash-root.m4: Update.
4564 * gnulib/import/m4/dup.m4: Update.
4565 * gnulib/import/m4/dup2.m4: Update.
4566 * gnulib/import/m4/eealloc.m4: Update.
4567 * gnulib/import/m4/environ.m4: Update.
4568 * gnulib/import/m4/errno_h.m4: Update.
4569 * gnulib/import/m4/error.m4: Update.
4570 * gnulib/import/m4/exponentd.m4: Update.
4571 * gnulib/import/m4/exponentl.m4: Update.
4572 * gnulib/import/m4/extensions.m4: Update.
4573 * gnulib/import/m4/extern-inline.m4: Update.
4574 * gnulib/import/m4/fchdir.m4: Update.
4575 * gnulib/import/m4/fcntl-o.m4: Update.
4576 * gnulib/import/m4/fcntl.m4: Update.
4577 * gnulib/import/m4/fcntl_h.m4: Update.
4578 * gnulib/import/m4/fdopendir.m4: Update.
4579 * gnulib/import/m4/filenamecat.m4: Update.
4580 * gnulib/import/m4/flexmember.m4: Update.
4581 * gnulib/import/m4/float_h.m4: Update.
4582 * gnulib/import/m4/fnmatch.m4: Update.
4583 * gnulib/import/m4/fnmatch_h.m4: Update.
4584 * gnulib/import/m4/fpieee.m4: Update.
4585 * gnulib/import/m4/frexp.m4: Update.
4586 * gnulib/import/m4/frexpl.m4: Update.
4587 * gnulib/import/m4/fstat.m4: Update.
4588 * gnulib/import/m4/fstatat.m4: Update.
4589 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4590 * gnulib/import/m4/getcwd-path-max.m4: Update.
4591 * gnulib/import/m4/getcwd.m4: Update.
4592 * gnulib/import/m4/getdtablesize.m4: Update.
4593 * gnulib/import/m4/getlogin.m4: Update.
4594 * gnulib/import/m4/getlogin_r.m4: Update.
4595 * gnulib/import/m4/getpagesize.m4: Update.
4596 * gnulib/import/m4/getprogname.m4: Update.
4597 * gnulib/import/m4/gettimeofday.m4: Update.
4598 * gnulib/import/m4/glibc21.m4: Update.
4599 * gnulib/import/m4/glob.m4: Update.
4600 * gnulib/import/m4/glob_h.m4: Update.
4601 * gnulib/import/m4/gnulib-cache.m4: Update.
4602 * gnulib/import/m4/gnulib-common.m4: Update.
4603 * gnulib/import/m4/gnulib-comp.m4: Update.
4604 * gnulib/import/m4/gnulib-tool.m4: Update.
4605 * gnulib/import/m4/hard-locale.m4: Update.
4606 * gnulib/import/m4/include_next.m4: Update.
4607 * gnulib/import/m4/inttypes-pri.m4: Update.
4608 * gnulib/import/m4/inttypes.m4: Update.
4609 * gnulib/import/m4/isnand.m4: Update.
4610 * gnulib/import/m4/isnanl.m4: Update.
4611 * gnulib/import/m4/largefile.m4: Update.
4612 * gnulib/import/m4/limits-h.m4: Update.
4613 * gnulib/import/m4/localcharset.m4: Update.
4614 * gnulib/import/m4/locale-fr.m4: Update.
4615 * gnulib/import/m4/locale-ja.m4: Update.
4616 * gnulib/import/m4/locale-zh.m4: Update.
4617 * gnulib/import/m4/localtime-buffer.m4: Update.
4618 * gnulib/import/m4/longlong.m4: Update.
4619 * gnulib/import/m4/lstat.m4: Update.
4620 * gnulib/import/m4/malloc.m4: Update.
4621 * gnulib/import/m4/malloca.m4: Update.
4622 * gnulib/import/m4/math_h.m4: Update.
4623 * gnulib/import/m4/mbrtowc.m4: Update.
4624 * gnulib/import/m4/mbsinit.m4: Update.
4625 * gnulib/import/m4/mbsrtowcs.m4: Update.
4626 * gnulib/import/m4/mbstate_t.m4: Update.
4627 * gnulib/import/m4/memchr.m4: Update.
4628 * gnulib/import/m4/memmem.m4: Update.
4629 * gnulib/import/m4/mempcpy.m4: Update.
4630 * gnulib/import/m4/memrchr.m4: Update.
4631 * gnulib/import/m4/mkdir.m4: Update.
4632 * gnulib/import/m4/mkstemp.m4: Update.
4633 * gnulib/import/m4/mmap-anon.m4: Update.
4634 * gnulib/import/m4/mode_t.m4: Update.
4635 * gnulib/import/m4/msvc-inval.m4: Update.
4636 * gnulib/import/m4/msvc-nothrow.m4: Update.
4637 * gnulib/import/m4/multiarch.m4: Update.
4638 * gnulib/import/m4/nocrash.m4: Update.
4639 * gnulib/import/m4/off_t.m4: Update.
4640 * gnulib/import/m4/onceonly.m4: Update.
4641 * gnulib/import/m4/open-cloexec.m4: Update.
4642 * gnulib/import/m4/open.m4: Update.
4643 * gnulib/import/m4/openat.m4: Update.
4644 * gnulib/import/m4/opendir.m4: Update.
4645 * gnulib/import/m4/pathmax.m4: Update.
4646 * gnulib/import/m4/rawmemchr.m4: Update.
4647 * gnulib/import/m4/readdir.m4: Update.
4648 * gnulib/import/m4/readlink.m4: Update.
4649 * gnulib/import/m4/realloc.m4: Update.
4650 * gnulib/import/m4/rename.m4: Update.
4651 * gnulib/import/m4/rewinddir.m4: Update.
4652 * gnulib/import/m4/rmdir.m4: Update.
4653 * gnulib/import/m4/save-cwd.m4: Update.
4654 * gnulib/import/m4/secure_getenv.m4: Update.
4655 * gnulib/import/m4/setenv.m4: Update.
4656 * gnulib/import/m4/signal_h.m4: Update.
4657 * gnulib/import/m4/ssize_t.m4: Update.
4658 * gnulib/import/m4/stat-time.m4: Update.
4659 * gnulib/import/m4/stat.m4: Update.
4660 * gnulib/import/m4/std-gnu11.m4: Update.
4661 * gnulib/import/m4/stdbool.m4: Update.
4662 * gnulib/import/m4/stddef_h.m4: Update.
4663 * gnulib/import/m4/stdint.m4: Update.
4664 * gnulib/import/m4/stdio_h.m4: Update.
4665 * gnulib/import/m4/stdlib_h.m4: Update.
4666 * gnulib/import/m4/strchrnul.m4: Update.
4667 * gnulib/import/m4/strdup.m4: Update.
4668 * gnulib/import/m4/strerror.m4: Update.
4669 * gnulib/import/m4/string_h.m4: Update.
4670 * gnulib/import/m4/strstr.m4: Update.
4671 * gnulib/import/m4/strtok_r.m4: Update.
4672 * gnulib/import/m4/sys_socket_h.m4: Update.
4673 * gnulib/import/m4/sys_stat_h.m4: Update.
4674 * gnulib/import/m4/sys_time_h.m4: Update.
4675 * gnulib/import/m4/sys_types_h.m4: Update.
4676 * gnulib/import/m4/tempname.m4: Update.
4677 * gnulib/import/m4/time_h.m4: Update.
4678 * gnulib/import/m4/unistd-safer.m4: Update.
4679 * gnulib/import/m4/unistd_h.m4: Update.
4680 * gnulib/import/m4/warn-on-use.m4: Update.
4681 * gnulib/import/m4/wchar_h.m4: Update.
4682 * gnulib/import/m4/wchar_t.m4: Update.
4683 * gnulib/import/m4/wctype_h.m4: Update.
4684 * gnulib/import/m4/wint_t.m4: Update.
4685 * gnulib/import/malloc.c: Update.
4686 * gnulib/import/malloc/scratch_buffer.h: Update.
4687 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4688 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4689 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4690 * gnulib/import/malloca.c: Update.
4691 * gnulib/import/malloca.h: Update.
4692 * gnulib/import/malloca.valgrind: Update.
4693 * gnulib/import/math.in.h: Update.
4694 * gnulib/import/mbrtowc.c: Update.
4695 * gnulib/import/mbsinit.c: Update.
4696 * gnulib/import/mbsrtowcs-impl.h: Update.
4697 * gnulib/import/mbsrtowcs-state.c: Update.
4698 * gnulib/import/mbsrtowcs.c: Update.
4699 * gnulib/import/memchr.c: Update.
4700 * gnulib/import/memmem.c: Update.
4701 * gnulib/import/mempcpy.c: Update.
4702 * gnulib/import/memrchr.c: Update.
4703 * gnulib/import/mkdir.c: Update.
4704 * gnulib/import/mkstemp.c: Update.
4705 * gnulib/import/msvc-inval.c: Update.
4706 * gnulib/import/msvc-inval.h: Update.
4707 * gnulib/import/msvc-nothrow.c: Update.
4708 * gnulib/import/msvc-nothrow.h: Update.
4709 * gnulib/import/open.c: Update.
4710 * gnulib/import/openat-die.c: Update.
4711 * gnulib/import/openat-priv.h: Update.
4712 * gnulib/import/openat-proc.c: Update.
4713 * gnulib/import/openat.c: Update.
4714 * gnulib/import/openat.h: Update.
4715 * gnulib/import/opendir.c: Update.
4716 * gnulib/import/pathmax.h: Update.
4717 * gnulib/import/pipe-safer.c: Update.
4718 * gnulib/import/rawmemchr.c: Update.
4719 * gnulib/import/readdir.c: Update.
4720 * gnulib/import/readlink.c: Update.
4721 * gnulib/import/realloc.c: Update.
4722 * gnulib/import/ref-add.sin: Update.
4723 * gnulib/import/ref-del.sin: Update.
4724 * gnulib/import/rename.c: Update.
4725 * gnulib/import/rewinddir.c: Update.
4726 * gnulib/import/rmdir.c: Update.
4727 * gnulib/import/same-inode.h: Update.
4728 * gnulib/import/save-cwd.c: Update.
4729 * gnulib/import/save-cwd.h: Update.
4730 * gnulib/import/scratch_buffer.h: Update.
4731 * gnulib/import/secure_getenv.c: Update.
4732 * gnulib/import/setenv.c: Update.
4733 * gnulib/import/signal.in.h: Update.
4734 * gnulib/import/stat-time.c: Update.
4735 * gnulib/import/stat-time.h: Update.
4736 * gnulib/import/stat-w32.c: Update.
4737 * gnulib/import/stat-w32.h: Update.
4738 * gnulib/import/stat.c: Update.
4739 * gnulib/import/stdbool.in.h: Update.
4740 * gnulib/import/stddef.in.h: Update.
4741 * gnulib/import/stdint.in.h: Update.
4742 * gnulib/import/stdio.in.h: Update.
4743 * gnulib/import/stdlib.in.h: Update.
4744 * gnulib/import/str-two-way.h: Update.
4745 * gnulib/import/strchrnul.c: Update.
4746 * gnulib/import/strdup.c: Update.
4747 * gnulib/import/streq.h: Update.
4748 * gnulib/import/strerror-override.c: Update.
4749 * gnulib/import/strerror-override.h: Update.
4750 * gnulib/import/strerror.c: Update.
4751 * gnulib/import/string.in.h: Update.
4752 * gnulib/import/stripslash.c: Update.
4753 * gnulib/import/strnlen1.c: Update.
4754 * gnulib/import/strnlen1.h: Update.
4755 * gnulib/import/strstr.c: Update.
4756 * gnulib/import/strtok_r.c: Update.
4757 * gnulib/import/sys_stat.in.h: Update.
4758 * gnulib/import/sys_time.in.h: Update.
4759 * gnulib/import/sys_types.in.h: Update.
4760 * gnulib/import/tempname.c: Update.
4761 * gnulib/import/tempname.h: Update.
4762 * gnulib/import/time.in.h: Update.
4763 * gnulib/import/unistd--.h: Update.
4764 * gnulib/import/unistd-safer.h: Update.
4765 * gnulib/import/unistd.in.h: Update.
4766 * gnulib/import/unsetenv.c: Update.
4767 * gnulib/import/verify.h: Update.
4768 * gnulib/import/extra/snippet/warn-on-use.h: Update.
4769 * gnulib/import/wchar.in.h: Update.
4770 * gnulib/import/wctype.in.h: Update.
4771 * gnulib/import/xalloc-oversized.h: Update.
4772 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4773 "53e2c179f26a890fa6685af4b6c1397ee370433b".
4774
4775 2018-08-16 Gary Benson <gbenson@redhat.com>
4776
4777 PR gdb/13000:
4778 * gdb/main.c (captured_main_1): Exit with nonzero status
4779 in batch mode if the last command to be executed failed.
4780 * NEWS: Mention the above.
4781
4782 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
4783
4784 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4785 end of warning message.
4786
4787 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4788
4789 PR gdb/22943:
4790 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4791 (aarch64_extract_return_value): Use
4792 aapcs_is_vfp_call_or_return_candidate.
4793 (aarch64_return_in_memory): Likewise.
4794 (aarch64_store_return_value): Likewise.
4795
4796 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4797
4798 * aarch64-tdep.c
4799 (aapcs_is_vfp_call_or_return_candidate): Make static
4800 (pass_in_v_or_stack): Remove function.
4801 (pass_in_v_vfp_candidate): New function.
4802 (aarch64_push_dummy_call): Check for float register candidates.
4803
4804 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4805
4806 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4807 (aapcs_is_vfp_call_or_return_candidate_1): New function.
4808 (aapcs_is_vfp_call_or_return_candidate): Likewise.
4809
4810 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4811
4812 PR build/23399
4813 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4814 (struct ipa_sym_addresses): Rename to...
4815 (struct ipa_sym_addresses_common): ... this.
4816 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4817
4818 2018-08-28 Tom Tromey <tom@tromey.com>
4819
4820 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4821 (token_fifo): Now a std::vector.
4822 (yylex, c_parse): Update.
4823 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4824 (token_fifo): Now a std::vector.
4825 (yylex, d_parse): Update.
4826 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4827 (token_fifo): Now a std::vector.
4828 (yylex, go_parse): Update.
4829
4830 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
4831
4832 * parser-defs.h (struct type_stack) <elements>: Change type to
4833 std::vector<union type_stack_elt>.
4834 <depth, size>: Remove.
4835 * parse.c (parse_exp_in_context_1): Adjust.
4836 (type_stack_reserve): Remove.
4837 (check_type_stack_depth): Remove.
4838 (insert_into_type_stack): Adjust to std::vector.
4839 (insert_type): Likewise.
4840 (push_type): Likewise.
4841 (push_type_int): Likewise.
4842 (insert_type_address_space): Likewise.
4843 (pop_type): Likewise.
4844 (pop_type_int): Likewise.
4845 (pop_typelist): Likewise.
4846 (pop_type_stack): Likewise.
4847 (append_type_stack): Likewise.
4848 (push_type_stack): Likewise.
4849 (get_type_stack): Likewise.
4850 (type_stack_cleanup): Likewise.
4851 (push_typelist): Likewise.
4852 (follow_types): Likewise.
4853 (_initialize_parse): Likewise.
4854
4855 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
4856
4857 * NEWS: Mention csky target.
4858
4859 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
4860 Hafiz Abid Qadeer <abidh@codesourcery.com>
4861 Don Breazeal <donb@codesourcery.com>
4862
4863 * csky-linux-tdep.c: New file.
4864 * csky-tdep.c: Likewise.
4865 * csky-tdep.h: Likewise.
4866 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4867 csky-tdep.o.
4868 (HFILES_NO_SRCDIR): Add csky-tdep.h.
4869 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4870 * configure.tgt: Add csky support.
4871
4872 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
4873
4874 * python/py-framefilter.c (py_print_frame): Print frame architecture
4875 when printing on an MI output.
4876
4877 2018-08-27 Tom Tromey <tom@tromey.com>
4878
4879 PR build/23087:
4880 * configure: Rebuild.
4881 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4882
4883 2018-08-27 Tom Tromey <tom@tromey.com>
4884
4885 * aarch64-linux-tdep.c
4886 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4887 casts to int.
4888
4889 2018-08-27 Tom Tromey <tom@tromey.com>
4890
4891 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4892 unsigned.
4893 (ppc64_standard_linkage1, ppc64_standard_linkage2)
4894 (ppc64_standard_linkage3, ppc64_standard_linkage4)
4895 (ppc64_standard_linkage5, ppc64_standard_linkage6)
4896 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4897 unsigned.
4898
4899 2018-08-27 Tom Tromey <tom@tromey.com>
4900
4901 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4902 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4903
4904 2018-08-27 Tom Tromey <tom@tromey.com>
4905
4906 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4907 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4908 ULONGEST_MAX.
4909 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4910 ULONGEST_MAX.
4911 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4912 ULONGEST_MAX.
4913 * sparc-linux-tdep.c (sparc32_linux_sigframe)
4914 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4915 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4916 ULONGEST_MAX.
4917 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4918 (ppc64_linux_sigaction_tramp_frame)
4919 (ppc32_linux_sighandler_tramp_frame)
4920 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4921 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4922 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4923 * mn10300-linux-tdep.c (am33_linux_sigframe)
4924 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4925 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4926 * mips-linux-tdep.c (mips_linux_o32_sigframe)
4927 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4928 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4929 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4930 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4931 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4932 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4933 * microblaze-linux-tdep.c
4934 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4935 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4936 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4937 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4938 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4939 * common/common-types.h (ULONGEST_MAX): New define.
4940 (CORE_ADDR_MAX): Fix formatting.
4941 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4942 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4943 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4944 (arm_linux_rt_sigreturn_tramp_frame)
4945 (arm_eabi_linux_sigreturn_tramp_frame)
4946 (arm_eabi_linux_rt_sigreturn_tramp_frame)
4947 (thumb2_eabi_linux_sigreturn_tramp_frame)
4948 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4949 (arm_linux_restart_syscall_tramp_frame)
4950 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4951 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4952 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4953 ULONGEST_MAX.
4954 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4955
4956 2018-08-27 Tom Tromey <tom@tromey.com>
4957
4958 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4959 CORE_ADDR_MAX.
4960 * mips-tdep.c (mips_deal_with_atomic_sequence)
4961 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4962 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4963 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4964 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4965 CORE_ADDR_MAX.
4966 * aarch64-tdep.c (aarch64_software_single_step): Use
4967 CORE_ADDR_MAX.
4968
4969 2018-08-27 Tom Tromey <tom@tromey.com>
4970
4971 * linespec.c (complete_linespec_component): Add cast to "char".
4972 * completer.c (completion_tracker::build_completion_result): Add
4973 cast to "char".
4974
4975 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4976
4977 * solist.h (struct solist, struct target_so_ops): Fix
4978 indentation.
4979
4980 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4981
4982 * ada-tasks.c (ada_task_info_s): Remove typedef.
4983 (DEF_VEC_O(ada_task_info_s)): Remove.
4984 (struct ada_tasks_inferior_data): Initialize fields.
4985 <task_list>: Make an std::vector.
4986 (get_ada_tasks_inferior_data): Allocate with new.
4987 (ada_get_task_number): Adjust.
4988 (get_task_number_from_id): Likewise.
4989 (valid_task_id): Likewise.
4990 (ada_get_task_info_from_ptid): Likewise.
4991 (iterate_over_live_ada_tasks): Likewise.
4992 (add_ada_task): Likewise.
4993 (read_known_tasks): Likewise.
4994 (ada_build_task_list): Likewise.
4995 (print_ada_task_info): Likewise.
4996 (info_task): Likewise.
4997 (task_command_1): Likewise.
4998
4999 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
5000
5001 * ada-lang.c (add_angle_brackets): Return std::string.
5002
5003 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
5004
5005 * python/py-threadevent.c (py_get_event_thread): Initialize
5006 pythread.
5007
5008 2018-08-24 Pedro Alves <palves@redhat.com>
5009
5010 * python/py-bpevent.c (create_breakpoint_event_object): Use
5011 copy-initialization.
5012 * python/py-continueevent.c (emit_continue_event): Use
5013 copy-initialization.
5014 * python/py-exitedevent.c (create_exited_event_object): Return a
5015 gdbpy_ref<>.
5016 (emit_exited_event): Use copy-initialization.
5017 * python/py-inferior.c (python_new_inferior)
5018 (python_inferior_deleted, add_thread_object): Use
5019 copy-initialization.
5020 * python/py-infevents.c (create_inferior_call_event_object)
5021 (create_register_changed_event_object)
5022 (create_memory_changed_event_object): Return a gdbpy_ref<>.
5023 (emit_inferior_call_event, emit_memory_changed_event)
5024 (emit_register_changed_event): Use copy-initialization.
5025 * python/py-newobjfileevent.c (create_new_objfile_event_object):
5026 Return a gdbpy_ref<>.
5027 (emit_new_objfile_event): Use copy-initialization.
5028 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5029 (emit_clear_objfiles_event): Use copy-initialization.
5030 * python/py-signalevent.c (create_signal_event_object): Use
5031 copy-initialization.
5032 * python/py-threadevent.c (create_thread_event_object): Use
5033 copy-initialization.
5034
5035 2018-08-24 Pedro Alves <palves@redhat.com>
5036 Simon Marchi <simon.marchi@ericsson.com>
5037
5038 PR gdb/23379
5039 * python/py-continueevent.c: Include "gdbthread.h".
5040 (create_continue_event_object): Add intro comment. Add 'ptid'
5041 parameter. Use it to find thread to pass to
5042 create_thread_event_object.
5043 (emit_continue_event): Pass PTID down to
5044 create_continue_event_object.
5045 * python/py-event.h (py_get_event_thread): Declare.
5046 (create_thread_event_object): Remove default from 'thread'
5047 parameter.
5048 * python/py-stopevent.c (create_stop_event_object): Use
5049 py_get_event_thread.
5050 * python/py-threadevent.c (get_event_thread): Rename to ...
5051 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5052 and use it to find the thread.
5053 (create_thread_event_object): Assert that THREAD isn't null.
5054 Don't find the event thread here.
5055
5056 2018-08-23 Kevin Buettner <kevinb@redhat.com>
5057
5058 * block.h (blockrange, blockranges): New struct declarations.
5059 (struct block): Add new field named `ranges'.
5060 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5061 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5062 macros for accessing ranges in struct block.
5063 (make_blockranges): New declaration.
5064 block.c (make_blockranges): New function.
5065 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5066 for block.
5067 * symtab.h (find_pc_partial_function): Add new parameter `block'.
5068 * blockframe.c (cache_pc_function_block): New static global.
5069 (clear_pc_function_cache): Clear cache_pc_function_block.
5070 (find_pc_partial_function): Move comment to symtab.h. Add
5071 support for non-contiguous blocks.
5072 * cli/cli-cmds.c (block.h): Include.
5073 (print_disassembly): Handle printing of non-contiguous blocks.
5074 (disassemble_current_function): Likewise.
5075 (disassemble_command): Likewise.
5076
5077 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5078 BLOCK_START.
5079 * blockframe.c (get_pc_function_start): Likewise.
5080 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5081 (gcc_symbol_address): Likewise.
5082 * compile/compile-object-run.c (compile_object_run): Likewise.
5083 * compile/compile.c (get_expr_block_and_pc): Likewise.
5084 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5085 (func_addr_to_tail_call_list): Likewise.
5086 * findvar.c (default_read_var_value): Likewise.
5087 * inline-frame.c (inline_frame_this_id): Likewise.
5088 (skip-inline_frames): Likewise.
5089 * infcmd.c (until_next_command): Likewise.
5090 * linespec.c (convert_linespec_to_sals): Likewise.
5091 * parse.c (parse_exp_in_context_1): Likewise.
5092 * printcmd.c (build_address_symbolic): likewise.
5093 (info_address_command): Likewise.
5094 symtab.c (find_function_start_sal): Likewise.
5095 (skip_prologue_sal): Likewise.
5096 (find_function_alias_target): Likewise.
5097 (find_gnu_ifunc): Likewise.
5098 * stack.c (find_frame_funname): Likewise.
5099 * symtab.c (fixup_symbol_section): Likewise.
5100 (find_function_start_sal): Likewise.
5101 (skip_prologue_sal): Likewsie.
5102 (find_function_alias_target): Likewise.
5103 (find_gnu_ifunc): Likewise.
5104 * tracepoint.c (info_scope_command): Likewise.
5105 * value.c (value_fn_field): Likewise.
5106
5107 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5108 in place of find_pc_partial_function.
5109 * blockframe.c (find_function_entry_range_from_pc): New function.
5110 * symtab.h (find_function_entry_range_from_pc): Declare and document.
5111 * objfiles.c (objfile_relocate1): Relocate start and end addresses
5112 for each range in a block.
5113
5114
5115 2018-08-23 Xavier Roirand <roirand@adacore.com>
5116
5117 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5118 incrementation.
5119
5120 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5121
5122 * solib-svr4.c (read_program_headers_from_bfd): Return
5123 gdb::optional<gdb::byte_vector>.
5124 (svr4_exec_displacement): Adjust.
5125
5126 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5127
5128 * solib-svr4.c (read_program_header): Return
5129 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5130 (find_program_interpreter): Return
5131 gdb::optional<gdb::byte_vector>.
5132 (scan_dyntag_auxv): Adjust.
5133 (enable_break): Adjust.
5134 (svr4_exec_displacement): Adjust.
5135
5136 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5137
5138 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5139 * inf-child.c (inf_child_target::terminal_save_inferior): New.
5140
5141 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
5142
5143 * guile/scm-string.c (gdbscm_scm_from_printf): Use
5144 string_vprintf.
5145 * guile/scm-utils.c (gdbscm_printf): Likewise.
5146 * serial.c (serial_printf): Likewise.
5147 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5148
5149 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
5150
5151 * stack.c (print_frame): Print frame architecture when printing on
5152 an MI output.
5153 * NEWS: Mention new "arch" attribute in frame output.
5154
5155 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5156
5157 * arch/aarch64.h (aarch64_regnum): Update comment.
5158
5159 2018-08-21 Alan Hayward <alan.hayward@arm.com>
5160
5161 * NEWS: Add SVE to 8.2 section.
5162
5163 2018-08-21 Pedro Alves <palves@redhat.com>
5164
5165 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5166 out from gdbscm_parse_function_args.
5167 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5168 gdbscm_parse_function_args_1.
5169
5170 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
5171
5172 PR gdb/17816
5173 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5174 operator.
5175
5176 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
5177
5178 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5179
5180 2018-08-19 Michael Spang <spang@google.com>
5181
5182 PR gdb/11786
5183 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5184 for PT_TLS segments.
5185
5186 2018-08-18 Kevin Buettner <kevinb@redhat.com>
5187
5188 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5189 dwarf_variable_value.
5190 * dwarf2-frame.c (class dwarf_expr_executor):
5191 Add override for dwarf_variable_value.
5192 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5193 (class symbol_needs_eval_context): Likewise.
5194 (indirect_synthetic_pointer): Add forward declaration.
5195 (sect_variable_value): New function.
5196 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5197 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5198 for DW_OP_GNU_variable_value.
5199
5200 2018-08-16 Tom Tromey <tom@tromey.com>
5201
5202 * top.c (read_command_file): Update.
5203 (command_line_input): Remove "repeat" argument.
5204 * ada-lang.c (get_selections): Update.
5205 * linespec.c (decode_line_2): Update.
5206 * defs.h (command_line_input): Remove argument.
5207 * cli/cli-script.c (read_next_line): Update.
5208 * python/py-gdb-readline.c: Update.
5209
5210 2018-08-17 Tom Tromey <tom@tromey.com>
5211
5212 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5213 command_line_input.
5214
5215 2018-08-15 Tom Tromey <tom@tromey.com>
5216
5217 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5218
5219 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
5220
5221 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5222 If used, use find_pc_partial_function to find address range
5223 to disassemble.
5224 * mi/mi-main.c (mi_cmd_list_features): Report
5225 "data-disassemble-a-option" feature.
5226 * NEWS: Mention new -data-disassemble option -a.
5227
5228 2018-08-13 Tom Tromey <tom@tromey.com>
5229
5230 * common/common-defs.h (_FORTIFY_SOURCE): Define.
5231
5232 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5233
5234 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5235 (aarch64_linux_collect_sve_regset): Likewise.
5236 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5237 * regcache.h (regcache_map_entry_size): New function.
5238
5239 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5240
5241 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5242 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5243 (SVE_HEADER_VL_LENGTH): Likewise.
5244 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5245 (SVE_HEADER_FLAGS_LENGTH): Likewise.
5246 (SVE_HEADER_RESERVED_LENGTH): Likewise.
5247 (SVE_HEADER_SIZE_OFFSET): Likewise.
5248 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5249 (SVE_HEADER_VL_OFFSET): Likewise.
5250 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5251 (SVE_HEADER_FLAGS_OFFSET): Likewise.
5252 (SVE_HEADER_RESERVED_OFFSET): Likewise.
5253 (SVE_HEADER_SIZE): Likewise.
5254 (aarch64_linux_core_read_vq): Add function.
5255 (aarch64_linux_core_read_description): Check for SVE section.
5256
5257 2018-08-13 Alan Hayward <alan.hayward@arm.com>
5258
5259 * aarch64-fbsd-tdep.c
5260 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5261 collect_size.
5262 * aarch64-linux-tdep.c
5263 (aarch64_linux_iterate_over_regset_sections): Likewise.
5264 * alpha-linux-tdep.c
5265 (alpha_linux_iterate_over_regset_sections):
5266 * alpha-nbsd-tdep.c
5267 (alphanbsd_iterate_over_regset_sections): Likewise.
5268 * amd64-fbsd-tdep.c
5269 (amd64fbsd_iterate_over_regset_sections): Likewise.
5270 * amd64-linux-tdep.c
5271 (amd64_linux_iterate_over_regset_sections): Likewise.
5272 * arm-bsd-tdep.c
5273 (armbsd_iterate_over_regset_sections): Likewise.
5274 * arm-fbsd-tdep.c
5275 (arm_fbsd_iterate_over_regset_sections): Likewise.
5276 * arm-linux-tdep.c
5277 (arm_linux_iterate_over_regset_sections): Likewise.
5278 * corelow.c (get_core_registers_cb): Likewise.
5279 (core_target::fetch_registers): Likewise.
5280 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5281 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5282 * gdbarch.h (void): Regenerate.
5283 * gdbarch.sh: Add supply_size and collect_size.
5284 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5285 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5286 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5287 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5288 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5289 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5290 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5291 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5292 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5293 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5294 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5295 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5296 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5297 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5298 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5299 Likewise.
5300 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5301 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5302 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5303 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5304 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5305 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5306 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5307 Likewise.
5308 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5309 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5310 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5311 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5312 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5313 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5314 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5315 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5316
5317 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
5318
5319 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5320 with string_printf.
5321
5322 2018-08-10 Keith Seitz <keiths@redhat.com>
5323
5324 * compile/compile-c-support.c (add_code_header, add_code_footer):
5325 Move into policy class.
5326 (c_push_user_expression, pop_user_expression_nop)
5327 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5328 (compile_program): New host class.
5329 (c_compile_program): New typedef.
5330 (c_compute_porgram): Use c_compile_program.
5331
5332 2018-08-10 Keith Seitz <keiths@redhat.com>
5333
5334 * compile/compile-internal.h (compile_instance::~compile_instance):
5335 Remove calls to htab_delete.
5336 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5337 * compile.c (compile_instance::compile_instance): Initialize
5338 htab unique pointers.
5339 (compile_instance::get_cached_type, compile_instance::insert_type)
5340 (compile_instance::error_symbol_once): Update for unique_ptr.
5341
5342 2018-08-10 Keith Seitz <keiths@redhat.com>
5343
5344 * compile/compile-c-symbols.c (struct symbol_error)
5345 (hash_symbol_error, eq_symbol_error, del_symbol_error)
5346 (compile_instance::insert_symbol_error)
5347 (compile_instance::error_symbol_once): Move to ...
5348 * compile/compile.c: ... here.
5349
5350 2018-08-10 Keith Seitz <keiths@redhat.com>
5351
5352 * compile/compile-c-support.c (c_get_compile_context): Use `new'
5353 instead of `new_compile_instance'.
5354 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5355 Update description.
5356 If the symbol error map is not initialized, create it.
5357 (generate_c_for_for_one_symbol): Do not check/initialize
5358 the symbol error map.
5359 * compile/compile-c-types.c (compile_c_instance): Make a class.
5360 Update all callers.
5361 (compile_instance::compile_instance): Initialize the type cache.
5362 (get_cached_type): New function.
5363 (insert_type): Update description.
5364 (compile_c_instance::m_default_cflags): Define.
5365 (convert_type): Update description. Use get_cached_type.
5366 (delete_instance): Moved to destructor.
5367 (new_compile_instance): Moved to constructor.
5368 * compile/compile-c.h (compile_c_instance): Make class inheriting
5369 from compile_instance.
5370 <base>: Remove field.
5371 <type_map, symbol_err_map>: Move to base class.
5372 <c_plugin>: Rename to `m_plugin' and remove pointer type.
5373 * compile/compile-internal.h (compile_instance): Make class.
5374 <type_map_t, symbol_err_map_t>: Define.
5375 <fe>: Rename to `m_gcc_fe'.
5376 <scope, block, gcc_target_options>: Add `m_' prefix.
5377 <m_type_map, m_symbol_err_map>: New fields, moved from
5378 compile_c_instance.
5379 <destroy>: Remove.
5380 (convert_type, new_compile_instance): Remove.
5381 * compile/compile.c (cleanup_compile_instance): Remove.
5382 (compile_to_object): Use unique_ptr to eliminate cleanups.
5383 (compile_instance::set_print_callback, compile_instance::version)
5384 (compile_instance::set_verbose)
5385 (compile_instance::set_driver_filename)
5386 (compile_instance::set_triplet_regexp)
5387 (compile_instance::set_arguments)
5388 (compile_instance::set_source_file)
5389 (compile_instance::compile): Define.
5390
5391 2018-08-10 Keith Seitz <keiths@redhat.com>
5392
5393 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5394 * compile/compile-c-types.c: Define GCC_METHODN macros and include
5395 gcc-c-fe.def to define C plugin.
5396 (delete_instance): Delete `c_plugin'.
5397 (new_compile_instance): Initialize `c_plugin'.
5398 * compile/compile-c.h: Include gcc_c_plugin.h.
5399 (struct compile_c_instance) <c_plugin>: New member.
5400 * gcc-c-plugin.h: New file.
5401 Update all callers with API change.
5402
5403 2018-08-10 Keith Seitz <keiths@redhat.com>
5404
5405 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5406 (HFILES_NO_SRCDIR): ... to here.
5407 Add compile-internal.h and compile-c.h.
5408 * compile/compile-c-support.c: Include compile-c.h.
5409 * compile/compile-c-symbols.c: Include compile-c.h.
5410 (generate_c_for_variable_locations): Update comment.
5411 * compile/compile-c-types.c: Include compile-c.h.
5412 * compile/compile-c.h: New file -- moved C language declarations
5413 from other files here.
5414 * compile/compile-internal.h: Do not include hashtab.h or
5415 common/enum-flags.h.
5416 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5417 (gcc_convert_symbol, gcc_symbol_address)
5418 (generate_c_for_variable_locations, c_get_mode_for_size)
5419 (c_get_range_decl_name): Definitions moved to compile-c.h.
5420 * compile/compile-loc2c.c: Include compile-c.h.
5421
5422 2018-08-10 Keith Seitz <keiths@redhat.com>
5423
5424 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5425 (c_symbol_substitution_name): ... this.
5426 Update all callers.
5427
5428 2018-08-10 Keith Seitz <keiths@redhat.com>
5429
5430 * compile/compile-c-support.c (c_compute_program): Use
5431 unique_xmalloc_ptr to eliminate cleanup.
5432 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5433 Return a unique_xmalloc_ptr and eliminate cleanup.
5434 * compile/compile-internal.h (generate_c_for_variable_locations):
5435 Return unique_xmalloc_ptr and update description.
5436
5437 2018-08-10 Alan Hayward <alan.hayward@arm.com>
5438
5439 * corelow.c (core_target::get_core_register_section): Rename
5440 min_size to section_min_size.
5441
5442 2018-08-09 Jim Wilson <jimw@sifive.com>
5443
5444 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5445 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5446 * NEWS: Mention new GNU/Linux RISC-V target.
5447 * configure.host: Add riscv*-*-linux*.
5448 * configure.nat: Add riscv*.
5449 * configure.tgt: Add riscv*-*-linux*.
5450 * riscv-linux-nat.c: New file.
5451 * riscv-linux-tdep.c: New file.
5452
5453 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5454
5455 * infrun.c (resume): Make static, add forward declaration.
5456 (proceed): Update header comment.
5457 * infrun.h (resume): Delete declaration.
5458
5459 2018-08-09 Tom Tromey <tom@tromey.com>
5460
5461 * riscv-tdep.h: Minor formatting fixes.
5462
5463 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
5464
5465 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5466 * dwarf-index-cache.c (create_dir_and_check): Likewise.
5467 (test_mkdir_recursive): Likewise.
5468 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5469
5470 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5471
5472 * valarith.c (value_subscripted_rvalue): If an array is not in
5473 memory, and we don't know the upper bound, then we can't know that
5474 the requested element exists or not.
5475
5476 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
5477
5478 * target.c (str_comma_list_concat_elem): Fix typo in comment.
5479 (target_options_to_string): Add comment.
5480
5481 2018-08-08 Tom Tromey <tom@tromey.com>
5482
5483 * unittests/scoped_mmap-selftests.c: Check result of "write".
5484
5485 2018-08-08 Jim Wilson <jimw@sifive.com>
5486
5487 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5488 (decode_register_index_short): New.
5489 (decode_j_type_insn, decode_cj_type_insn): New.
5490 (decode_b_type_insn, decode_cb_type_insn): New.
5491 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
5492 local xlen. Check xlen when decoding ambiguous compressed insns. In
5493 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5494 is_c_sw_insn instead of is_sw_insn.
5495 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5496 (riscv_software_single_step): New.
5497 * riscv-tdep.h (riscv_software_single_step): Declare.
5498
5499 * riscv-tdep.c (riscv_isa_xlen): Drop static.
5500 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5501
5502 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
5503
5504 PR gdb/18050:
5505 * target.c (dispose_inferior): Don't dispose of inferiors that are
5506 already killed.
5507
5508 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
5509
5510 * remote.c (remote_target::download_tracepoint): Change char* to
5511 const char*.
5512
5513 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
5514
5515 * target.h (target_options_to_string): Return an std::string.
5516 * target.c (str_comma_list_concat_elem): Return void, use
5517 std::string.
5518 (do_option): Likewise.
5519 (target_options_to_string): Return an std::string.
5520 * linux-nat.c (linux_nat_target::wait): Adjust.
5521 * target-debug.h (target_debug_print_options): Adjust.
5522
5523 2018-08-07 Tom Tromey <tom@tromey.com>
5524
5525 * Makefile.in (CPPFLAGS): New variable.
5526 (INTERNAL_CPPFLAGS): Use it.
5527
5528 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5529
5530 * NEWS: Mention the index cache.
5531
5532 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5533
5534 * common/pathstuff.h (get_standard_cache_dir): New.
5535 * common/pathstuff.c (get_standard_cache_dir): New.
5536 * build-id.h (build_id_to_string): New.
5537 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5538 DEBUG_STR_SUFFIX): Move to here.
5539 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5540 DEBUG_STR_SUFFIX): Move from there.
5541 (write_psymtabs_to_index): Make non-static, add basename
5542 parameter. Write to temporary files, rename when done.
5543 (save_gdb_index_command): Adjust call to
5544 write_psymtabs_to_index.
5545 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5546 field.
5547 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5548 (get_gdb_index_contents_from_cache): New.
5549 (get_gdb_index_contents_from_cache_dwz): New.
5550 (dwarf2_initialize_objfile): Read index from cache.
5551 (dwarf2_build_psymtabs): Save to index.
5552 * dwarf-index-cache.h: New file.
5553 * dwarf-index-cache.c: New file.
5554 * dwarf-index-write.h: New file.
5555
5556 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5557
5558 * gnulib/aclocal.m4: Re-generate.
5559 * gnulib/config.in: Re-generate.
5560 * gnulib/configure: Re-generate.
5561 * gnulib/import/Makefile.am: Re-generate.
5562 * gnulib/import/Makefile.in: Re-generate.
5563 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5564 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5565 * gnulib/import/m4/mkdir.m4: New file.
5566 * gnulib/import/mkdir.c: New file.
5567 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5568 module.
5569
5570 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5571
5572 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5573 * common/scoped_mmap.c: New file.
5574 * common/scoped_mmap.h (destroy): New method.
5575 (~scoped_mmap, reset): Use destroy.
5576 (scoped_mmap): New move constructor.
5577 (mmap_file): New declaration.
5578 * unittests/scoped_mmap-selftests.c (test_normal,
5579 test_invalid_filename, run_tests): New functions.
5580 (_initialize_scoped_mmap_selftests): Register selftest.
5581
5582 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5583
5584 * dwarf2read.c (read_gdb_index_from_section): Rename to...
5585 (read_gdb_index_from_buffer): ... this. Remove section
5586 parameter, add buffer parameter.
5587 (get_gdb_index_contents_ftype,
5588 get_gdb_index_contents_dwz_ftype): New typedefs.
5589 (dwarf2_read_gdb_index): Add callback parameters to get the
5590 index contents.
5591 (get_gdb_index_contents_from_section): New.
5592 (dwarf2_initialize_objfile): Update call to
5593 dwarf2_read_gdb_index.
5594
5595 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5596
5597 * common/filestuff.h (gdb_fopen_cloexec): New overload.
5598 (gdb_open_cloexec): Likewise.
5599 * nat/linux-osdata.c (command_from_pid): Use string_printf.
5600 (commandline_from_pid): Likewise.
5601 (linux_xfer_osdata_threads): Likewise.
5602 (linux_xfer_osdata_fds): Likewise.
5603 * ada-lang.c (is_package_name): Likewise.
5604 * auxv.c (procfs_xfer_auxv): Likewise.
5605 * breakpoint.c (print_one_breakpoint_location): Use
5606 uiout::field_fmt.
5607 (print_one_catch_solib): Use string_printf.
5608 * coff-pe-read.c (add_pe_exported_sym): Likewise.
5609 (add_pe_forwarded_sym): Likewise.
5610 * dwarf2read.c (create_type_unit_group): Likewise.
5611 (build_error_marker_type): Likewise.
5612 * infcall.c (get_function_name): Likewise.
5613 * valprint.c (print_converted_chars_to_obstack): Likewise.
5614 * xtensa-tdep.c (xtensa_register_type): Likewise.
5615
5616 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
5617
5618 * remote.c (remote_target::download_tracepoint): Fix format
5619 string errors.
5620
5621 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5622
5623 * tracefile.c: Include common/byte-vector.h.
5624 (trace_save): Change type of buf to gdb::byte_vector. Initialize
5625 with trace_regblock_size if needed. Update uses of buf.
5626
5627 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5628
5629 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5630 std::vector<unsigned char>.
5631 * tracepoint.c (collection_list::collection_list): Remove
5632 m_regs_mask initializer from initializer list. Resize
5633 m_regs_mask using the largest remote register number.
5634 (collection_list::add_remote_register): Remove size check on
5635 m_regs_mask. Use at to access element.
5636 (collection_list::stringify): Change type of temp_buf to
5637 gdb::char_vector. Update uses of temp_buf. Resize if needed to
5638 stringify the register mask. Use pack_hex_byte for the register
5639 mask.
5640
5641 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5642
5643 * tracepoint.h (class collection_list) <add_register>: Remove.
5644 <add_remote_register, add_ax_registers, add_local_register>:
5645 Declare.
5646 <add_memrange>: Add scope parameter.
5647 * tracepoint.c (encode_actions_1): Likewise.
5648 (collection_list::add_register): Rename to ...
5649 (collection_list::add_remote_register): ... this. Update
5650 comment.
5651 (collection_list::add_ax_registers, add_local_register): New
5652 methods.
5653 (collection_list::add_memrange): Add scope parameter. Call
5654 add_local_register instead of add_register.
5655 (finalize_tracepoint_aexpr): New function.
5656 (collection_list::collect_symbol): Update calls to add_memrange.
5657 Call add_local_register instead of add_register. Call
5658 add_ax_registers. Call finalize_tracepoint_aexpr.
5659 (encode_actions_1): Get remote regnos for $reg action. Call
5660 add_remote_register, add_ax_registers, and add_local_register.
5661 Update call to add_memrange. Call finalize_tracepoint_aexpr.
5662 (validate_actionline): Call finalize_tracepoint_aexpr.
5663
5664 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5665
5666 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5667 Replace array buf with gdb::char_vector buf, of size
5668 get_remote_packet_size (). Replace references to buf and
5669 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
5670 and xsnprintf with snprintf. Raise errors if the buffer is too
5671 small.
5672
5673 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5674
5675 * remote.c (remote_target::download_tracepoint): Fix the has_more
5676 predicate in the QTDP action list iteration.
5677
5678 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5679
5680 * remote.c (remote_target::download_tracepoint): Fix indentation
5681 in for block.
5682
5683 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5684
5685 * proc-api.c (_initialize_proc_api): Remove c, unused.
5686 * procfs.c (procfs_init_inferior): Remove signals, unused.
5687 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5688 unused.
5689
5690 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
5691 Andrew Burgess <andrew.burgess@embecosm.com>
5692
5693 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5694 'W_STOPCODE (0)' as this could be ambiguous.
5695
5696 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
5697
5698 * ser-tcp.c (net_open): Fix thinko when deciding whether to
5699 disable TCP's Nagle algorithm (use "ai_protocol" instead of
5700 "ai_socktype").
5701
5702 2018-08-02 Tom Tromey <tom@tromey.com>
5703
5704 PR symtab/16842.
5705 * dwarf2read.c (read_func_scope): Set symtab on template parameter
5706 symbols.
5707 (process_structure_scope): Likewise.
5708
5709 2018-08-02 Xavier Roirand <roirand@adacore.com>
5710
5711 PR gdb/22629:
5712 * darwin-nat.c (darwin_kill_inferior): Fix handling of
5713 kill inferior.
5714
5715 2018-08-02 Tom Tromey <tom@tromey.com>
5716
5717 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5718 (darwin_suspend_inferior, darwin_resume_inferior)
5719 (darwin_decode_notify_message, darwin_resume_inferior_threads)
5720 (darwin_check_new_threads): Check result of get_darwin_inferior.
5721
5722 2018-07-31 Joel Brobecker <brobecker@adacore.com>
5723
5724 GDB 8.1.1 released.
5725
5726 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
5727
5728 * varobj.c (varobj_get_path_expr_parent): Report an error if
5729 parent is a dynamic varobj.
5730
5731 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5732
5733 * gnulib/aclocal.m4: Re-generate.
5734 * gnulib/config.in: Re-generate.
5735 * gnulib/configure: Re-generate.
5736 * gnulib/import/Makefile.in: Re-generate.
5737 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5738 * gnulib/import/m4/onceonly.m4: Re-generate.
5739
5740 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5741
5742 * target-descriptions.c (struct xml_test_tdesc): New.
5743 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5744 (record_xml_tdesc): Update.
5745 (maintenance_check_xml_descriptions): Update.
5746 * target-descriptions.h (record_xml_tdesc): Update comment.
5747
5748 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
5749
5750 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5751 checking array bounds are defined.
5752
5753 2018-07-30 Tom Tromey <tom@tromey.com>
5754
5755 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5756 irreflexivity violation.
5757
5758 2018-07-30 Tom Tromey <tom@tromey.com>
5759
5760 * cli/cli-decode.c (lookup_cmd): Remove lint code.
5761 * value.c (unpack_long): Remove lint code.
5762 * valops.c (value_ind): Remove lint code.
5763 * valarith.c (value_x_binop, value_x_unop, value_equal)
5764 (value_pos): Remove lint code.
5765
5766 2018-07-28 Tom de Vries <tdevries@suse.de>
5767
5768 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5769 with undefined upper bound as <optimized out>.
5770
5771 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
5772
5773 * gcore.in: Rename variable "name" to "prefix". Expand
5774 "usage" text.
5775
5776 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
5777
5778 * windows-nat.c (windows_nat_target::create_inferior): Update to
5779 call close() in global namespace.
5780
5781 2018-07-26 Tom Tromey <tom@tromey.com>
5782
5783 * dwarf-index-write.c (add_address_entry): Don't add objfile
5784 offsets.
5785 * dbxread.c (find_stab_function): Rename from
5786 find_stab_function_addr. Return a bound_minimal_symbol.
5787 (read_dbx_symtab): Use raw_text_low, raw_text_high.
5788 Don't add objfile offsets.
5789 (end_psymtab): Use raw_text_low, raw_text_high,
5790 MSYMBOL_VALUE_RAW_ADDRESS.
5791 (read_ofile_symtab): Update.
5792 (process_one_symbol): Update.
5793 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5794 offsets.
5795 (dw2_relocate): Remove.
5796 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5797 searching addrmap.
5798 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5799 Update.
5800 (process_psymtab_comp_unit_reader, add_partial_symbol)
5801 (add_partial_subprogram, dwarf2_ranges_read): Update.
5802 (load_partial_dies): Update.
5803 (add_address_entry): Don't add objfile offsets.
5804 (dwarf2_build_include_psymtabs): Update.
5805 (create_addrmap_from_aranges): Don't add objfile offsets.
5806 (dw2_find_pc_sect_compunit_symtab): Update.
5807 * mdebugread.c (parse_symbol): Don't add objfile offsets.
5808 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5809 Update.
5810 (parse_partial_symbols): Don't add objfile offsets. Use
5811 raw_text_low, raw_text_high. Update.
5812 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5813 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5814 or call 'relocate' quick function. Clear psymbol_map.
5815 * psympriv.h (struct partial_symbol) <address>: Add section
5816 offset.
5817 <set_unrelocated_address>: Rename from set_address.
5818 <raw_text_low, raw_text_high>: New methods.
5819 <text_low, text_high>: Add objfile parameter.
5820 (add_psymbol_to_bcache): Add 'section' parameter. Call
5821 set_unrelocated_address.
5822 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5823 (find_pc_psymbol): Update.
5824 (fixup_psymbol_section, relocate_psymtabs): Remove.
5825 (dump_psymtab, psym_functions): Update.
5826 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5827 parameter.
5828 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5829 (start_psymtab_common): Update.
5830 * symfile-debug.c (debug_qf_relocate): Remove.
5831 (debug_sym_quick_functions): Update.
5832 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5833 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5834 Update.
5835
5836 2018-07-26 Tom Tromey <tromey@redhat.com>
5837
5838 * dbxread.c (end_psymtab): Use text_high_valid and
5839 text_low_valid.
5840 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5841 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5842 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5843 Update comment.
5844 <text_low_valid, text_high_valid>: New fields.
5845 <set_text_low, set_text_high>: Update.
5846 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5847
5848 2018-07-26 Tom Tromey <tom@tromey.com>
5849
5850 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5851 Update.
5852 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5853 textlow and texthigh fields.
5854 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5855 Update.
5856 * mdebugread.c (parse_lines, parse_partial_symbols)
5857 (psymtab_to_symtab_1): Update.
5858 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5859 Rename fields. Update comment. Now private.
5860 <text_low, text_high, set_text_low, set_text_high>: New methods.
5861 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5862 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5863 (start_psymtab_common, maintenance_info_psymtabs)
5864 (maintenance_check_psymtabs): Update.
5865 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5866 texthigh fields.
5867 (scan_xcoff_symtab): Update.
5868
5869 2018-07-26 Tom Tromey <tromey@redhat.com>
5870
5871 * psympriv.h (struct partial_symbol) <unrelocated_address,
5872 address, set_address>: New methods.
5873 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5874 (fixup_psymbol_section, relocate_psymtabs): Update.
5875 (print_partial_symbols): Add 'objfile' parameter. Update.
5876 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5877 Update.
5878
5879 2018-07-26 Tom Tromey <tom@tromey.com>
5880
5881 * dwarf-index-write.c (write_psymbols, debug_names::insert)
5882 (debug_names::write_psymbols): Update.
5883 * psympriv.h (struct partial_symbol): Derive from
5884 general_symbol_info.
5885 <obj_section>: New method.
5886 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5887 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5888 (find_pc_sect_psymbol, fixup_psymbol_section)
5889 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5890 (print_partial_symbols, recursively_search_psymtabs)
5891 (compare_psymbols, psymbol_hash, psymbol_compare)
5892 (add_psymbol_to_bcache, maintenance_check_psymtabs)
5893 (psymbol_name_matches, psym_fill_psymbol_map): Update.
5894
5895 2018-07-26 Tom Tromey <tromey@redhat.com>
5896
5897 * dbxread.c (end_psymtab): Remove dead code.
5898
5899 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
5900
5901 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5902 DWARF unwinders are disabled.
5903 * dwarf2-frame.c: Add dwarf2read.h include.
5904 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5905 disabled.
5906 (dwarf2_frame_unwinders_enabled_p): Define.
5907 (show_dwarf_unwinders_enabled_p): New function.
5908 (_initialize_dwarf2_frame): Register switch to control DWARF
5909 unwinder use.
5910 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5911 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5912 (show_dwarf_cmdlist): Remove static keyword.
5913 * dwarf2read.h (set_dwarf_cmdlist): Declare.
5914 (show_dwarf_cmdlist): Declare.
5915 * NEWS: Document new feature.
5916
5917 2018-07-26 Tom de Vries <tdevries@suse.de>
5918
5919 PR breakpoints/23366
5920 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5921
5922 2018-07-26 Tom de Vries <tdevries@suse.de>
5923
5924 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5925 DW_AT_count can't be translated to a dynamic prop.
5926
5927 2018-07-25 Tom de Vries <tdevries@suse.de>
5928
5929 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5930 try/catch.
5931
5932 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
5933
5934 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5935
5936 2018-07-25 Joel Brobecker <brobecker@adacore.com>
5937
5938 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5939
5940 2018-07-24 Keith Seitz <keiths@redhat.comt
5941
5942 PR symtab/23010
5943 * dwarf2read.c (dw2_add_symbol_to_list): New function.
5944 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5945 instead of add_symbol_to_list.
5946 (read_file_scope): Call prepare_one_comp_unit before reading
5947 any other DIEs.
5948
5949 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
5950
5951 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5952
5953 2018-07-24 Tom Tromey <tom@tromey.com>
5954
5955 * utils.c (malloc, realloc, free): Don't declare.
5956 * configure, config.in: Rebuild.
5957 * configure.ac: Don't check for declarations of free, malloc, or
5958 realloc.
5959
5960 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5961
5962 * aarch64-linux-nat.c
5963 (aarch64_linux_nat_target::stopped_data_address): Remove unused
5964 variable.
5965 * arm-linux-nat.c (fetch_regs): Likewise.
5966 (store_regs): Likewise.
5967 (fetch_vfp_regs): Likewise.
5968 (store_vfp_regs): Likewise.
5969 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5970 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5971 (arm_linux_nat_target::insert_watchpoint): Likewise.
5972 (arm_linux_nat_target::remove_watchpoint): Likewise.
5973 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5974 Likewise.
5975 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5976 Likewise.
5977 * ppc-linux-nat.c (fetch_register): Likewise.
5978 (fetch_all_gp_regs): Likewise.
5979 (fetch_ppc_registers): Likewise.
5980 (store_all_gp_regs): Likewise.
5981 (store_ppc_registers): Likewise.
5982 (hwdebug_insert_point): Likewise.
5983 (can_use_watchpoint_cond_accel): Likewise.
5984 * remote-sim.c (gdb_os_write_stdout): Likewise.
5985
5986 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5987 Tom Tromey <tom@tromey.com>
5988
5989 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5990 test for it.
5991 * configure: Rebuild.
5992
5993 2018-07-22 Tom Tromey <tom@tromey.com>
5994
5995 * regformats/regdat.sh: Define xmltarget_${name} inside
5996 #ifndef IN_PROCESS_AGENT.
5997
5998 2018-07-22 Tom Tromey <tom@tromey.com>
5999
6000 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
6001
6002 2018-07-22 Tom Tromey <tom@tromey.com>
6003
6004 * symfile.c (reread_symbols): Notify iter, not objfile.
6005
6006 2018-07-22 Tom Tromey <tom@tromey.com>
6007
6008 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
6009 Use arch_ops.
6010 (ravenscar_thread_target::prepare_to_store): Likewise.
6011
6012 2018-07-22 Tom Tromey <tom@tromey.com>
6013
6014 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
6015 unused variable. Call value_fetch_lazy when needed.
6016 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
6017 Remove unused variable. Call value_fetch_lazy when needed.
6018
6019 2018-07-22 Tom Tromey <tom@tromey.com>
6020
6021 * m32c-tdep.c (mark_dma): Return void.
6022 (make_regs): Remove unused declarations.
6023
6024 2018-07-22 Tom Tromey <tom@tromey.com>
6025
6026 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6027 cmdscm_get_valid_command_smob_arg_unsafe for effect.
6028 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6029 bkscm_get_valid_block_smob_arg_unsafe for effect.
6030
6031 2018-07-22 Tom Tromey <tom@tromey.com>
6032
6033 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6034 value_type.
6035
6036 2018-07-22 Tom Tromey <tom@tromey.com>
6037
6038 * windows-nat.c (saved_context): Conditionally define.
6039 * remote.c (remote_target::remote_btrace_maybe_reopen):
6040 Conditionally declare "warned".
6041 * inflow.c (sigquit_ours): Conditionally define.
6042 (new_tty): Move "tty" declaration inside #if.
6043 * guile/guile.c (guile_datadir): Conditionally define.
6044 * charset.c (set_be_le_names): Move some declarations inside #if.
6045 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6046 #if.
6047 (parse_xml_btrace_conf): Likewise.
6048
6049 2018-07-22 Tom Tromey <tom@tromey.com>
6050
6051 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6052
6053 2018-07-22 Tom Tromey <tom@tromey.com>
6054
6055 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6056 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6057 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6058 * buildsym-legacy.c (get_macro_table): Remove unused variable.
6059 * stack.c (frame_apply_level_command): Remove unused variable.
6060 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6061 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6062 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6063 unused variable.
6064 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6065 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6066 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6067 variable.
6068 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6069 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6070 variable.
6071 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6072 Remove unused variable.
6073 * cli/cli-script.c (recurse_read_control_structure): Remove unused
6074 variable.
6075 * common/tdesc.c (print_xml_feature::visit): Remove unused
6076 variable.
6077 * compile/compile-object-load.c (store_regs): Remove unused
6078 variables.
6079 * complaints.c (clear_complaints): Remove unused variable.
6080 * corelow.c (core_target_open): Remove unused variable.
6081 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6082 variable.
6083 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6084 variable.
6085 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6086 variable.
6087 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6088 variable.
6089 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6090 variable.
6091 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6092 variable.
6093 * ia64-tdep.c (examine_prologue): Remove unused variable.
6094 * infcall.c (run_inferior_call): Remove unused variable.
6095 * inferior.c (exit_inferior): Remove unused variable.
6096 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6097 * linespec.c (decode_line_2): Remove unused variable.
6098 * linux-nat.c (super_close): Remove.
6099 * linux-tdep.c (linux_info_proc): Remove unused variable.
6100 * mi/mi-main.c (mi_execute_command): Remove unused variable.
6101 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6102 Remove unused variable.
6103 * parse.c (find_minsym_type_and_address): Remove unused variable.
6104 * printcmd.c (info_symbol_command, printf_floating): Remove unused
6105 variable.
6106 * python/py-breakpoint.c (bppy_set_commands): Remove unused
6107 variable.
6108 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6109 variables.
6110 * record-btrace.c (record_btrace_target::store_registers): Remove
6111 unused variable.
6112 (cmd_show_record_btrace_cpu): Remove unused variable.
6113 * riscv-tdep.c (riscv_register_reggroup_p)
6114 (riscv_push_dummy_call, riscv_return_value): Remove unused
6115 variable.
6116 * rust-exp.y (literal): Remove unused variable.
6117 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6118 unused variable.
6119 <STRUCTOP_ANONYMOUS>: Likewise.
6120 * s390-linux-tdep.c (s390_linux_init_abi_31)
6121 (s390_linux_init_abi_64): Remove unused variable.
6122 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6123 (file_select_thread, net_windows_open, _initialize_ser_windows):
6124 Remove unused variables.
6125 * symtab.c (find_pc_sect_line): Remove unused variable.
6126 * target-memory.c (compute_garbled_blocks): Remove unused
6127 variable.
6128 (target_write_memory_blocks): Remove unused variable.
6129 * target.c (target_stack::unpush): Remove unused variables.
6130 * tracepoint.c (start_tracing, all_tracepoint_actions)
6131 (merge_uploaded_trace_state_variables)
6132 (print_one_static_tracepoint_marker): Remove unused variable.
6133 * unittests/basic_string_view/element_access/char/1.cc (test01):
6134 Remove unused variable.
6135 * windows-nat.c (windows_continue, windows_add_all_dlls)
6136 (do_initial_windows_stuff, windows_nat_target::create_inferior):
6137 Remove unused variables.
6138
6139 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
6140
6141 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6142 attr_profile in HAVE_ELF.
6143 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6144 HAVE_ELF.
6145
6146 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
6147
6148 * frame.c (frame_register_unwind): Change parameter name.
6149 (frame_unwind_register): Likewise.
6150 (frame_unwind_register_value): Likewise.
6151 (frame_unwind_register_signed): Likewise.
6152 (frame_unwind_register_unsigned): Likewise.
6153 * frame.h (frame_register_unwind): Likewise.
6154 (frame_unwind_register): Likewise.
6155 (frame_unwind_register_value): Likewise.
6156 (frame_unwind_register_signed): Likewise.
6157 (frame_unwind_register_unsigned): Likewise.
6158 (frame_unwind_arch): Likewise.
6159
6160 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6161
6162 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6163 ISA maintenance.
6164
6165 2018-07-20 Maciej W. Rozycki <macro@mips.com>
6166
6167 * mips-linux-nat.c (mips_linux_nat_target::read_description):
6168 Call `get_ptrace_pid' rather than extracting the ptrace PID by
6169 hand.
6170
6171 2018-07-20 Keith Seitz <keiths@redhat.com>
6172
6173 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6174 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6175 m_compunit_symtab, m_language>: Add "m_" prefix.
6176 Update all uses.
6177 * buildsym.c: Update all uses.
6178
6179 2018-07-20 Tom Tromey <tom@tromey.com>
6180
6181 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6182 * buildsym.h (record_line_ftype): Remove typedef.
6183
6184 2018-07-20 Tom Tromey <tom@tromey.com>
6185
6186 * buildsym-legacy.h (augment_type_symtab): Don't declare.
6187 (end_expandable_symtab): Likewise.
6188 (end_symtab_get_static_block): Likewise.
6189 (end_symtab_from_static_block): Likewise.
6190 * buildsym-legacy.c (augment_type_symtab): Remove.
6191 (end_expandable_symtab): Remove.
6192 (end_symtab_get_static_block): Remove.
6193 (end_symtab_from_static_block): Remove.
6194
6195 2018-07-20 Tom Tromey <tom@tromey.com>
6196
6197 * dwarf2read.c: Include buildsym.h.
6198 (struct dwarf2_cu) <builder>: New method.
6199 (fixup_go_packaging): Update.
6200 (process_full_comp_unit, process_full_type_unit): Update. Don't
6201 use scoped_free_pendings.
6202 (using_directives): Add "cu" parameter, remove "language".
6203 (read_import_statement, setup_type_unit_groups, )
6204 (read_func_scope, read_lexical_block_scope)
6205 (dwarf2_record_block_ranges, read_namespace): Update.
6206 (lnp_state_machine::lnp_state_machine): Add cu parameter.
6207 (lnp_state_machine::handle_end_sequence): Update.
6208 (class lnp_state_machine) <m_cu>: New member.
6209 <m_record_line_callback>: Remove.
6210 <m_currently_recording_lines>: New member.
6211 (lnp_state_machine::handle_set_file): Update.
6212 (noop_record_line): Remove.
6213 (dwarf_record_line_p): Add cu parameter.
6214 (dwarf_record_line_1, dwarf_finish_line): Likewise.
6215 (lnp_state_machine::record_line)
6216 (lnp_state_machine::lnp_state_machine)
6217 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6218 (dwarf_decode_lines): Update.
6219 (dwarf2_start_subfile): Add cu parameter.
6220 (dwarf2_start_symtab, new_symbol): Update.
6221 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6222 Remove dwarf2_per_objfile parameter.
6223 (dwarf_decode_macros): Update.
6224
6225 2018-07-20 Tom Tromey <tom@tromey.com>
6226
6227 * stabsread.c (define_symbol): Update.
6228 * buildsym-legacy.h (get_buildsym_compunit): Declare.
6229 * dwarf2read.c (new_symbol): Update.
6230 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6231 * cp-namespace.c: Include buildsym.h.
6232 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6233 * buildsym-legacy.c (get_buildsym_compunit): New function.
6234
6235 2018-07-20 Tom Tromey <tom@tromey.com>
6236
6237 * xcoffread.c: Include buildsym-legacy.h.
6238 * windows-nat.c: Include buildsym-legacy.h.
6239 * stabsread.c: Include buildsym-legacy.h.
6240 * mdebugread.c: Include buildsym-legacy.h.
6241 * buildsym-legacy.h: New file.
6242 * buildsym-legacy.c: New file, from buildsym.c.
6243 * go32-nat.c: Include buildsym-legacy.h.
6244 * dwarf2read.c: Include buildsym-legacy.h.
6245 * dbxread.c: Include buildsym-legacy.h.
6246 * cp-namespace.c: Include buildsym-legacy.h.
6247 * coffread.c: Include buildsym-legacy.h.
6248 * buildsym.h: Move some contents to buildsym-legacy.h.
6249 * buildsym.c: Include buildsym-legacy.h. Move many functions to
6250 buildsym-legacy.c.
6251 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6252
6253 2018-07-20 Tom Tromey <tom@tromey.com>
6254
6255 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6256 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6257 (buildsym_compunit::buildsym_compunit)
6258 (buildsym_compunit::~buildsym_compunit)
6259 (buildsym_compunit::get_macro_table): Define.
6260
6261 2018-07-20 Tom Tromey <tom@tromey.com>
6262
6263 * buildsym.c (reset_symtab_globals): Remove.
6264 (buildsym_compunit::end_symtab_from_static_block): Update.
6265 (buildsym_compunit::augment_type_symtab): Update.
6266 (end_symtab_from_static_block): Call free_buildsym_compunit.
6267 (augment_type_symtab, end_symtab, end_expandable_symtab):
6268 Likewise.
6269
6270 2018-07-20 Tom Tromey <tom@tromey.com>
6271
6272 * arch-utils.c: Do not include buildsym.h.
6273 * mipsread.c: Do not include buildsym.h.
6274 * machoread.c: Do not include buildsym.h.
6275 * elfread.c: Do not include buildsym.h.
6276
6277 2018-07-20 Tom Tromey <tom@tromey.com>
6278
6279 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6280 initialization.
6281 (buildsym_compunit): Add new constructor.
6282 (struct buildsym_compunit) <get_last_source_file, finish_block,
6283 record_block_range, start_subfile, patch_subfile_names,
6284 push_subfile, pop_subfile, record_line, get_compunit_symtab,
6285 set_last_source_start_addr, get_last_source_start_addr,
6286 get_local_using_directives, set_local_using_directives,
6287 get_global_using_directives, outermost_context_p,
6288 get_current_context_stack, get_context_stack_depth,
6289 get_current_subfile, get_local_symbols, get_file_symbols,
6290 get_global_symbols, record_debugformat, record_producer,
6291 push_context, pop_context, end_symtab_get_static_block,
6292 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6293 New public methods.
6294 <record_pending_block, finish_block_internal, make_blockvector,
6295 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6296 private methods.
6297 Update all users.
6298
6299 2018-05-22 Tom Tromey <tom@tromey.com>
6300
6301 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6302 parameter.
6303 (finish_block_internal): Update.
6304
6305 2018-07-20 Tom Tromey <tom@tromey.com>
6306
6307 * buildsym.c (record_pending_block): Move earlier. Remove objfile
6308 parameter.
6309 (finish_block_internal): Update.
6310
6311 2018-07-20 Tom Tromey <tom@tromey.com>
6312
6313 * buildsym.h (EXTERN): Don't define or undef.
6314 * buildsym.c (EXTERN): Don't define.
6315
6316 2018-07-20 Tom Tromey <tom@tromey.com>
6317
6318 * buildsym.c: Remove TODO comment.
6319
6320 2018-07-20 Tom Tromey <tom@tromey.com>
6321
6322 * coffread.c (coff_symtab_read): Update.
6323 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6324 (xcoff_new_init): Update.
6325 * mipsread.c (mipscoff_new_init): Update.
6326 * mdebugread.c (mdebug_build_psymtabs): Update.
6327 * elfread.c (elf_new_init): Update.
6328 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6329 Update.
6330 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6331 (coffstab_build_psymtabs, elfstab_build_psymtabs)
6332 (stabsect_build_psymtabs): Update.
6333 * buildsym.h (buildsym_init): Don't declare.
6334 * buildsym.c: Update comment.
6335 (prepare_for_building): Remove.
6336 (start_symtab, restart_symtab): Update.
6337 (reset_symtab_globals): Update comment.
6338 (buildsym_init): Remove.
6339
6340 2018-07-20 Tom Tromey <tom@tromey.com>
6341
6342 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6343 * stabsread.c (patch_block_stabs, define_symbol, read_type)
6344 (read_enum_type, common_block_start, common_block_end)
6345 (cleanup_undefined_types_1, finish_global_stabs): Update.
6346 * mdebugread.c (psymtab_to_symtab_1): Update.
6347 * dwarf2read.c (fixup_go_packaging, read_func_scope)
6348 (read_lexical_block_scope, new_symbol): Update.
6349 * dbxread.c (process_one_symbol): Update.
6350 * coffread.c (coff_symtab_read, process_coff_symbol)
6351 (coff_read_enum_type): Update.
6352 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6353 declare.
6354 (get_local_symbols, get_file_symbols, get_global_symbols): New
6355 functions.
6356 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6357 m_global_symbols.
6358 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6359 (~scoped_free_pendings): Update.
6360 (finish_block, prepare_for_building, reset_symtab_globals)
6361 (end_symtab_get_static_block, end_symtab_with_blockvector)
6362 (augment_type_symtab, push_context): Update.
6363 (get_local_symbols, get_file_symbols, get_global_symbols): New
6364 functions.
6365 (buildsym_init): Update.
6366
6367 2018-07-20 Tom Tromey <tom@tromey.com>
6368
6369 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6370 (process_full_type_unit): Likewise.
6371 (dwarf2_start_symtab): Set list_in_scope.
6372
6373 2018-07-20 Tom Tromey <tom@tromey.com>
6374
6375 * dwarf2read.c (process_psymtab_comp_unit_reader)
6376 (build_type_psymtabs_reader): Do not set list_in_scope.
6377
6378 2018-07-20 Tom Tromey <tom@tromey.com>
6379
6380 * buildsym.c (free_pendings): Remove.
6381 (add_symbol_to_list, scoped_free_pendings)
6382 (finish_block_internal, buildsym_init): Update.
6383
6384 2018-07-20 Tom Tromey <tom@tromey.com>
6385
6386 * xcoffread.c (read_xcoff_symtab): Update.
6387 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6388 Update.
6389 * dbxread.c (process_one_symbol): Update.
6390 * coffread.c (coff_symtab_read): Update.
6391 * buildsym.h (finish_block): Update.
6392 * buildsym.c (finish_block): Remove "listhead" argument.
6393 (end_symtab_get_static_block): Update.
6394
6395 2018-07-20 Tom Tromey <tom@tromey.com>
6396
6397 * buildsym.h (class scoped_free_pendings): Remove constructor.
6398 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6399 method.
6400 <m_pending_block_obstack, m_pending_blocks>: New members.
6401 (pending_block_obstack, pending_blocks): Remove.
6402 (scoped_free_pendings::scoped_free_pendings): Default.
6403 (~scoped_free_pendings): Update.
6404 (free_pending_blocks): Remove.
6405 (finish_block_internal, record_pending_block, make_blockvector)
6406 (end_symtab_get_static_block, augment_type_symtab, push_context)
6407 (buildsym_init): Update.
6408
6409 2018-07-20 Tom Tromey <tom@tromey.com>
6410
6411 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6412 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6413 members.
6414 (pending_addrmap, pending_addrmap_obstack)
6415 (pending_addrmap_interesting): Remove.
6416 (scoped_free_pendings, record_block_range, make_blockvector)
6417 (prepare_for_building, reset_symtab_globals, buildsym_init):
6418 Update.
6419
6420 2018-07-20 Tom Tromey <tom@tromey.com>
6421
6422 * xcoffread.c (process_linenos): Update.
6423 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6424 * mdebugread.c (psymtab_to_symtab_1): Update.
6425 * dwarf2read.c (setup_type_unit_groups)
6426 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6427 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6428 * dbxread.c (process_one_symbol): Update.
6429 * coffread.c (coff_symtab_read, enter_linenos)
6430 (process_coff_symbol): Update.
6431 * buildsym.h (current_subfile): Don't declare.
6432 (get_current_subfile): Declare.
6433 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6434 member.
6435 (start_subfile, free_buildsym_compunit, push_subfile)
6436 (prepare_for_building, start_symtab): Update.
6437 (get_current_subfile): New function.
6438
6439 2018-07-20 Tom Tromey <tom@tromey.com>
6440
6441 * coffread.c (coff_symtab_read): Update.
6442 * xcoffread.c (read_xcoff_symtab): Update.
6443 * dwarf2read.c (new_symbol): Update.
6444 (read_func_scope, read_lexical_block_scope): Update.
6445 * dbxread.c (process_one_symbol): Update.
6446 * buildsym.h (context_stack, context_stack_depth): Don't declare.
6447 (outermost_context_p): Remove macro.
6448 (outermost_context_p, get_current_context_stack)
6449 (get_context_stack_depth): Declare.
6450 (pop_context): Return struct context_stack.
6451 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6452 member.
6453 (context_stack_size): Remove.
6454 (INITIAL_CONTEXT_STACK_SIZE): Remove.
6455 (prepare_for_building, end_symtab_get_static_block)
6456 (augment_type_symtab, push_context): Update.
6457 (pop_context): Return struct context_stack.
6458 (outermost_context_p, get_current_context_stack)
6459 (get_context_stack_depth): New functions.
6460 (buildsym_init): Update.
6461
6462 2018-07-20 Tom Tromey <tom@tromey.com>
6463
6464 * rust-exp.y: Now a pure parser. Update all rules.
6465 (%union): Move earlier.
6466 (current_parser, work_obstack): Remove globals.
6467 (rust_parser, ~rust_parser): Update.
6468 (class rust_parser) <copy_name, concat3, crate_name, super_name,
6469 lex_character, lex_number, lex_string, lex_identifier,
6470 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6471 convert_name, convert_params_to_expression,
6472 convert_ast_to_expression, ast_basic_type, ast_operation,
6473 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6474 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6475 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6476 ast_array_type, ast_slice_type, ast_reference_type,
6477 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6478 (rust_parse): Update.
6479 (rustyyerror, rustyylex): Add parser parameter.
6480 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6481 (rust_lex_stringish_test, rust_lex_test_sequence)
6482 (rust_lex_test_trailing_dot, rust_lex_test_completion)
6483 (rust_lex_test_push_back, rust_lex_tests): Update.
6484
6485 2018-07-19 Pedro Alves <palves@redhat.com>
6486
6487 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6488 gdb::unique_xmalloc_ptr.
6489 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6490 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6491 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6492 copy-initialization.
6493 * guile/scm-pretty-print.c (ppscm_print_children): Use
6494 gdb::unique_xmalloc_ptr instead of cleanups.
6495 (gdbscm_apply_val_pretty_printer): Remove cleanups.
6496 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6497 gdb::unique_xmalloc_ptr.
6498 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6499 Adjust to use gdb::unique_xmalloc_ptr.
6500 * guile/scm-utils.c (extract_arg): Adjust.
6501 * guile/scm-value.c (gdbscm_value_field): Adjust to use
6502 gdb::unique_xmalloc_ptr instead of a cleanup.
6503
6504 2018-07-19 Tom Tromey <tom@tromey.com>
6505
6506 * utils.c (do_value_free_to_mark)
6507 (make_cleanup_value_free_to_mark): Remove.
6508 * utils.h (make_cleanup_value_free_to_mark): Remove.
6509
6510 2018-07-19 Pedro Alves <palves@redhat.com>
6511
6512 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6513 forwarding reference.
6514
6515 2018-07-18 Pedro Alves <palves@redhat.com>
6516
6517 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6518 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
6519 cleanup.
6520
6521 2018-07-18 Pedro Alves <palves@redhat.com>
6522
6523 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6524 exceptions.
6525 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6526 (gdbscm_wrap): New.
6527 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6528 directly instead of a cleanup.
6529 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6530 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
6531 (vlscm_binop_gdbthrow): New, factored out from ...
6532 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
6533 (vlscm_rich_compare): Use gdbscm_wrap.
6534 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6535 instead of a cleanup.
6536 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6537 cleanup.
6538 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6539 Use xfree directly instead of a cleanup.
6540 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6541 Adjust to use gdbscm_wrap and scoped_value_mark.
6542 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6543 (gdbscm_value_address, gdbscm_value_dereference)
6544 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6545 scoped_value_mark.
6546 (gdbscm_value_dynamic_type): Use scoped_value_mark.
6547 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6548 scoped_value_mark.
6549 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6550 gdbscm_wrap and scoped_value_mark.
6551 (gdbscm_value_to_string): Use xfree directly instead of a
6552 cleanup. Move 'buffer' unique_ptr to TRY scope.
6553 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6554 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
6555 scoped_value_mark.
6556 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6557 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6558 scoped_value_mark.
6559 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6560 gdbscm_wrap.
6561
6562 2018-07-18 Tom de Vries <tdevries@suse.de>
6563
6564 * findvar.c (default_read_var_value): Also resolve dynamic type for
6565 LOC_OPTIMIZED_OUT vars.
6566
6567 2018-07-18 Maciej W. Rozycki <macro@mips.com>
6568
6569 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6570 decoding.
6571
6572 2018-07-17 Tom Tromey <tom@tromey.com>
6573
6574 * guile/scm-param.c (pascm_set_func, pascm_show_func)
6575 (compute_enum_list, pascm_set_param_value_x)
6576 (gdbscm_parameter_value): Update.
6577 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6578 (gdbscm_scm_to_host_string): Update.
6579 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6580 Update.
6581 * guile/scm-cmd.c (cmdscm_add_completion): Update.
6582 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6583 * guile/scm-string.c (gdbscm_scm_to_string): Return
6584 unique_xmalloc_ptr.
6585 (gdbscm_scm_to_host_string): Likewise.
6586
6587 2018-07-17 Tom Tromey <tom@tromey.com>
6588
6589 * guile/guile.c (gdbscm_eval_from_control_command): Update.
6590 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6591 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6592 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6593 unique_xmalloc_ptr.
6594
6595 2018-07-17 Tom Tromey <tom@tromey.com>
6596
6597 * guile/scm-param.c (pascm_signal_setshow_error): Update.
6598 * guile/guile-internal.h (gdbscm_exception_message_to_string):
6599 Update.
6600 * guile/scm-cmd.c (cmdscm_function): Update.
6601 * guile/scm-pretty-print.c
6602 (ppscm_print_exception_unless_memory_error): Update.
6603 * guile/scm-exception.c (gdbscm_exception_message_to_string):
6604 Return unique_xmalloc_ptr.
6605
6606 2018-07-17 Tom Tromey <tom@tromey.com>
6607
6608 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6609 Use string_printf.
6610
6611 2018-07-17 Jim Wilson <jimw@sifive.com>
6612
6613 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6614 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
6615 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
6616 unecessary braces after EF_RISCV_RVC test. Delete call to
6617 set_gdbarch_decr_pc_after_break.
6618
6619 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6620 RISCV_LAST_FP_REGNUM + 1.
6621 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6622
6623 2018-07-17 Tom Tromey <tom@tromey.com>
6624
6625 * configure.ac: Remove --disable-gdbcli.
6626 * configure: Rebuild.
6627 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6628 (SUBDIR_CLI_CFLAGS): Remove.
6629 (SFILES): Use SUBDIR_CLI_SRCS.
6630 (COMMON_OBS): Use SUBDIR_CLI_OBS.
6631
6632 2018-07-17 Tom Tromey <tom@tromey.com>
6633
6634 PR gdb/18624:
6635 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6636
6637 2018-07-16 Jim Wilson <jimw@sifive.com>
6638
6639 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6640
6641 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6642
6643 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6644 variable.
6645 (libunwind_frame_sniffer): Likewise.
6646 (libunwind_frame_prev_register): Likewise.
6647 (libunwind_sigtramp_frame_sniffer): Likewise.
6648 * ia64-tdep.c (ia64_access_reg): Likewise.
6649 (ia64_access_rse_reg): Likewise.
6650 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6651 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6652
6653 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6654
6655 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6656
6657 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6658
6659 * remote-sim.c (gdbsim_target::close,
6660 gdbsim_target::mourn_inferior): Remove unused variables.
6661
6662 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
6663
6664 * ia64-tdep.c (ktab_buf): New global.
6665 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6666 (get_kernel_table): Adjust.
6667
6668 2018-07-16 Tom Tromey <tom@tromey.com>
6669
6670 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6671 * dwarf2read.c (using_directives, new_symbol): Use
6672 outermost_context_p.
6673 * dbxread.c (process_one_symbol): Use outermost_context_p.
6674 * coffread.c (coff_symtab_read): Use outermost_context_p.
6675
6676 2018-07-16 Tom Tromey <tom@tromey.com>
6677
6678 * dwarf2read.c (using_directives, read_func_scope)
6679 (read_lexical_block_scope): Update.
6680 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6681 * buildsym.h (local_using_directives, global_using_directives):
6682 Don't declare.
6683 (get_local_using_directives, set_local_using_directives)
6684 (get_global_using_directives): Declare.
6685 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6686 m_global_using_directives>: New members.
6687 (finish_block_internal, prepare_for_building)
6688 (reset_symtab_globals, end_symtab_get_static_block)
6689 (push_context): Update.
6690 (get_local_using_directives, set_local_using_directives)
6691 (get_global_using_directives): New functions.
6692 (buildsym_init): Update.
6693
6694 2018-07-16 Tom Tromey <tom@tromey.com>
6695
6696 * xcoffread.c (xcoff_initial_scan): Don't call
6697 free_pending_blocks.
6698 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6699 * buildsym.h (class scoped_free_pendings): Add constructor.
6700 (free_pending_blocks): Don't declare.
6701 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6702 (free_pending_blocks): Now static.
6703
6704 2018-07-16 Tom Tromey <tom@tromey.com>
6705
6706 * buildsym.h (push_subfile, pop_subfile): Update declarations.
6707 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6708 member.
6709 (struct subfile_stack): Remove.
6710 (subfile_stack): Remove.
6711 (push_subfile, pop_subfile, buildsym_init): Update.
6712
6713 2018-07-16 Tom Tromey <tom@tromey.com>
6714
6715 * buildsym.c (push_subfile): Use gdb_assert.
6716 (pop_subfile): Use gdb_assert.
6717
6718 2018-07-16 Tom Tromey <tom@tromey.com>
6719
6720 * buildsym.h (merge_symbol_lists): Remove.
6721 * buildsym.c (merge_symbol_lists): Remove.
6722
6723 2018-07-16 Tom Tromey <tom@tromey.com>
6724
6725 * stabsread.c (scan_file_globals): Update comment.
6726 * stabsread.h (scan_file_globals): Move from buildsym.h.
6727 * buildsym.h (scan_file_globals): Move to stabsread.h.
6728
6729 2018-07-16 Tom Tromey <tom@tromey.com>
6730
6731 * xcoffread.c (xcoff_new_init): Update.
6732 * mipsread.c (mipscoff_new_init): Update.
6733 * mdebugread.c (mdebug_build_psymtabs): Update.
6734 * elfread.c (elf_new_init): Update.
6735 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6736 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6737 * buildsym.h (buildsym_new_init): Don't declare.
6738 * buildsym.c (buildsym_new_init): Remove.
6739
6740 2018-07-16 Tom Tromey <tom@tromey.com>
6741
6742 * stabsread.h (within_function): Move from buildsym.h.
6743 * stabsread.c (start_stabs): Clear within_function.
6744 * coffread.c (coff_start_symtab): Clear within_function.
6745 * buildsym.h (within_function): Move to stabsread.h.
6746 * buildsym.c (prepare_for_building): Update.
6747
6748 2018-07-16 Tom Tromey <tom@tromey.com>
6749
6750 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6751 * dwarf2read.c (dwarf2_start_symtab): Don't set
6752 processing_gcc_compilation.
6753 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6754
6755 2018-07-16 Tom Tromey <tom@tromey.com>
6756
6757 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6758 (next_symbol_text_func): Move from buildsym.h.
6759 * stabsread.c (hashname): Move from buildsym.c.
6760 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6761 (next_symbol_text_func, hashname): Move to stabsread.h.
6762 * buildsym.c: Don't include bcache.h
6763 (hashname): Move to stasbread.c.
6764
6765 2018-07-16 Tom Tromey <tom@tromey.com>
6766
6767 * buildsym.h (context_stack_size): Don't declare.
6768 * buildsym.c (context_stack_size): New global.
6769
6770 2018-07-16 Tom Tromey <tom@tromey.com>
6771
6772 * dbxread.c (processing_acc_compilation): New global.
6773 * buildsym.h (processing_acc_compilation): Don't declare.
6774
6775 2018-07-16 Tom Tromey <tom@tromey.com>
6776
6777 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6778 * dbxread.c (read_ofile_symtab): Update.
6779 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6780 * buildsym.h (last_source_start_addr): Remove.
6781 (set_last_source_start_addr, get_last_source_start_addr):
6782 Declare.
6783 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6784 parameter.
6785 (struct buildsym_compunit) <m_last_source_start_addr>: New
6786 member.
6787 (prepare_for_building): Remove start_addr parameter.
6788 (start_symtab, restart_symtab, end_symtab_get_static_block)
6789 (end_symtab_with_blockvector): Update.
6790 (set_last_source_start_addr, get_last_source_start_addr): New
6791 functions.
6792
6793 2018-07-16 Tom Tromey <tom@tromey.com>
6794
6795 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6796 member.
6797 (have_line_numbers): Remove.
6798 (record_line, prepare_for_building, end_symtab_get_static_block)
6799 (augment_type_symtab): Update.
6800
6801 2018-07-16 Tom Tromey <tom@tromey.com>
6802
6803 * buildsym.c (~buildsym_compunit): Free the macro table.
6804 (struct buildsym_compunit) <get_macro_table, release_macros>: New
6805 methods.
6806 <m_pending_macros>: New member.
6807 (pending_macros): Remove.
6808 (~scoped_free_pendings, get_macro_table, prepare_for_building)
6809 (reset_symtab_globals, end_symtab_get_static_block)
6810 (end_symtab_with_blockvector, augment_type_symtab)
6811 (buildsym_init): Update.
6812
6813 2018-07-16 Tom Tromey <tom@tromey.com>
6814
6815 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6816 parameter.
6817 (buildsym_compunit::set_last_source_file): New method.
6818 <m_last_source_file>: New member.
6819 (prepare_for_building): Remove "name" parameter.
6820 (start_symtab, restart_symtab, reset_symtab_globals): Update.
6821 (last_source_file): Remove.
6822 (set_last_source_file, get_last_source_file): Update.
6823
6824 2018-07-16 Tom Tromey <tom@tromey.com>
6825
6826 * buildsym.c (prepare_for_building): Add assert.
6827
6828 2018-07-16 Tom Tromey <tom@tromey.com>
6829
6830 * buildsym.c (~buildsym_compunit): Update.
6831 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6832 (start_subfile, patch_subfile_names)
6833 (end_symtab_with_blockvector): Update.
6834
6835 2018-07-16 Tom Tromey <tom@tromey.com>
6836
6837 * buildsym.c (struct buildsym_compunit): Add constructor,
6838 destructor, initializers.
6839 (start_buildsym_compunit): Remove.
6840 (free_buildsym_compunit): Use "delete".
6841 (start_symtab, restart_symtab): Use "new".
6842
6843 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
6844
6845 * symfile.c (set_objfile_default_section_offset): Remove struct
6846 keyword.
6847
6848 2018-07-14 Stafford Horne <shorne@gmail.com>
6849
6850 * (Responsible Maintainers): Add myself as or1k maintainer.
6851
6852 2018-07-13 Tom Tromey <tom@tromey.com>
6853
6854 * symfile.c (set_objfile_default_section_offset): Use extra braces
6855 around initializer.
6856
6857 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6858
6859 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6860 non-branching basr.
6861
6862 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6863
6864 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6865 unittests/cli-utils-selftests.c
6866 * unittests/cli-utils-selftests.c: New file.
6867
6868 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6869
6870 * NEWS: Mention new commands. Mention change to 'thread apply'.
6871
6872 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6873
6874 * thread.c (thr_try_catch_cmd): New function.
6875 (thread_apply_all_command): Handle qcs flags.
6876 (thread_apply_command): Handle qcs flags.
6877 (taas_command): New function.
6878 (tfaas_command): New function.
6879 (_initialize_thread): Update to setup the new commands 'taas
6880 and 'tfaas'. Change doc string for 'thread apply'.
6881
6882 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6883
6884 * stack.c: (trailing_outermost_frame): New function, mostly
6885 extracted from backtrace_command_1.
6886 (leading_innermost_frame): New function.
6887 (backtrace_command_1): Update to call trailing_outermost_frame.
6888 (frame_apply_command_count): New function.
6889 (frame_apply_level_command): New function.
6890 (frame_apply_all_command): New function.
6891 (frame_apply_command): New function.
6892 (faas_command): New function.
6893 (frame_cmd_list): New variable.
6894 (_initialize_stack): Update to setup the new commands 'frame apply'
6895 and 'faas'.
6896
6897 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6898
6899 * cli-utils.c (number_or_range_parser::get_number): Only handle
6900 numbers or convenience var as numbers.
6901 (parse_flags): New function.
6902 (parse_flags_qcs): New function.
6903 (number_or_range_parser::finished): Ensure parsing end is detected
6904 before end of string.
6905 * cli-utils.h (parse_flags): New function.
6906 (parse_flags_qcs): New function.
6907 (number_or_range_parser): Remove m_finished bool.
6908 (number_or_range_parser::skip_range): Set m_in_range to false.
6909
6910 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
6911
6912 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6913 on Windows.
6914
6915 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6916 Jan Kratochvil <jan.kratochvil@redhat.com>
6917 Paul Fertser <fercerpav@gmail.com>
6918 Tsutomu Seki <sekiriki@gmail.com>
6919 Pedro Alves <palves@redhat.com>
6920
6921 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6922 'unittests/parse-connection-spec-selftests.c'.
6923 (COMMON_SFILES): Add 'common/netstuff.c'.
6924 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6925 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6926 * common/netstuff.c: New file.
6927 * common/netstuff.h: New file.
6928 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6929 (wait_for_connect): Update comment. New parameter
6930 'gdb::optional<int> sock' instead of 'struct serial *scb'.
6931 Use 'sock' directly instead of 'scb->fd'.
6932 (try_connect): New function, with code from 'net_open'.
6933 (net_open): Rewrite main loop to deal with multiple
6934 sockets/addresses. Handle IPv6-style hostnames; implement
6935 support for IPv6 connections.
6936 * unittests/parse-connection-spec-selftests.c: New file.
6937
6938 2018-07-11 Pedro Alves <palves@redhat.com>
6939
6940 PR gdb/23377
6941 * remote.c (remote_target::remote_detach_pid): Call
6942 set_current_process.
6943
6944 2018-07-11 Pedro Alves <palves@redhat.com>
6945
6946 * h8300-tdep.c (h8300_gdbarch_init): Remove
6947 set_gdbarch_ecoff_reg_to_regnum calls.
6948
6949 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6950
6951 PR c++/23373
6952 * c-typeprint.c (c_type_print_base_struct_union): Don't print
6953 offsets/sizes for static members of a class/struct.
6954
6955 2018-07-11 Alan Hayward <alan.hayward@arm.com>
6956
6957 * target-descriptions.c (tdesc_register_bitsize): Rename.
6958 * target-descriptions.h (tdesc_register_bitsize): Likewise.
6959 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6960 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6961
6962 2018-07-10 Tom Tromey <tom@tromey.com>
6963
6964 * breakpoint.c (moribund_locations): Now static and a
6965 std::vector.
6966 (breakpoint_init_inferior, moribund_breakpoint_here_p)
6967 (build_bpstat_chain, update_global_location_list)
6968 (breakpoint_retire_moribund): Update.
6969 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
6970 VEC.
6971
6972 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6973
6974 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6975 (riscv_register_reggroup_p): Use new function, remove unneeded
6976 parenthesis.
6977 (riscv_push_dummy_call): Extend assert to compare against xlen or
6978 flen based on register type.
6979
6980 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6981
6982 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6983
6984 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
6985
6986 * remote.c (show_hardware_watchpoint_limit): New function.
6987 (show_hardware_watchpoint_length_limit): New function.
6988 (show_hardware_breakpoint_limit): New function.
6989 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6990 where appropriate, update help text.
6991
6992 2018-07-09 Tom Tromey <tom@tromey.com>
6993
6994 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6995 (CLIBS): Don't mention NAT_CLIBS.
6996
6997 2018-07-09 Tom Tromey <tom@tromey.com>
6998
6999 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
7000 (LIBGDB_OBS, clean mostlyclean): Update.
7001 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
7002
7003 2018-07-09 Tom Tromey <tom@tromey.com>
7004
7005 * Makefile.in (%.c: %.y): Use ECHO_YACC.
7006 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
7007 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
7008
7009 2018-07-09 Tom Tromey <tom@tromey.com>
7010
7011 * Makefile.in (ALLDEPFILES): Remove exec.c.
7012 (COMMON_OBS): Remove exec.o.
7013 (COMMON_SFILES): Add exec.c.
7014
7015 2018-07-09 Tom Tromey <tom@tromey.com>
7016
7017 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
7018
7019 2018-07-09 Tom Tromey <tom@tromey.com>
7020
7021 * Makefile.in (clean mostlyclean): Remove stamp-version.
7022 (version.c): Depend on stamp-version.
7023 (stamp-version): New rule, from version.c rule.
7024
7025 2018-07-09 Tom Tromey <tom@tromey.com>
7026
7027 * Makefile.in (init.c): Depend on stamp-init.
7028 (stamp-init): New rule, from init.c rule.
7029 (clean mostlyclean): Remove stamp-init.
7030
7031 2018-07-09 Tom Tromey <tom@tromey.com>
7032
7033 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7034 SUBDIR_GCC_COMPILE_SRCS.
7035
7036 2018-07-09 Tom Tromey <tom@tromey.com>
7037
7038 * Makefile.in (init.c): Remove some unused sed rules.
7039
7040 2018-07-09 Tom Tromey <tom@tromey.com>
7041
7042 * Makefile.in (TSOBS): Remove.
7043 (INIT_FILES): Update.
7044 (LIBGDB_OBS): Update.
7045 (COMMON_SFILES): Add inflow.c.
7046 (SFILES): Remove inflow.c.
7047
7048 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7049
7050 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7051
7052 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
7053
7054 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7055 get_saveloc_name, is_signal_frame_name, step_name,
7056 init_remote_name, create_addr_space_name,
7057 destroy_addr_space_name, search_unwind_table_name,
7058 find_dyn_list_name): Constify.
7059
7060 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
7061
7062 * darwin-nat.c (darwin_pthread_kill): New function.
7063 (darwin_resume_thread): Use darwin_pthread_kill.
7064
7065 2018-07-05 Tom de Vries <tdevries@suse.de>
7066
7067 * macroexp.c (macro_buffer) <operator=>: New member function.
7068
7069 2018-07-04 Tom Tromey <tom@tromey.com>
7070
7071 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7072
7073 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
7074
7075 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7076 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7077 * maint.c: Likewise.
7078 * top.c: Likewise.
7079
7080 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7081
7082 * NEWS: Create a new section for the next release branch.
7083 Rename the section of the current branch, now that it has
7084 been cut.
7085
7086 2018-07-04 Joel Brobecker <brobecker@adacore.com>
7087
7088 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7089 * version.in: Bump version to 8.2.50.DATE-git.
7090
7091 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
7092 Pedro Alves <palves@redhat.com>
7093
7094 * linux-nat.c (linux_init_ptrace): Rename to ...
7095 (linux_init_ptrace_procfs): ... this. Call
7096 linux_proc_init_warnings.
7097 (linux_nat_target::post_attach)
7098 (linux_nat_target::post_startup_inferior): Adjust.
7099 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7100 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7101
7102 2018-07-04 Tom de Vries <tdevries@suse.de>
7103
7104 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7105 check ...
7106 (read_comp_unit_head): ... here.
7107
7108 2018-07-03 Tom Tromey <tom@tromey.com>
7109
7110 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7111 (stop_tracing, tstatus_command)
7112 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7113 (print_one_static_tracepoint_marker): Update.
7114 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7115 std::vector.
7116 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
7117 VEC.
7118 (all_tracepoints, static_tracepoints_here): Return std::vector.
7119
7120 2018-07-03 Tom Tromey <tom@tromey.com>
7121
7122 * common/ptid.c (ptid_equal): Remove.
7123 * common/ptid.h (ptid_equal): Don't declare.
7124 * ada-tasks.c: Update.
7125 * breakpoint.c: Update.
7126 * common/agent.c: Update.
7127 * corelow.c: Update.
7128 * darwin-nat-info.c: Update.
7129 * darwin-nat.c: Update.
7130 * dcache.c: Update.
7131 * dtrace-probe.c: Update.
7132 * dummy-frame.c: Update.
7133 * fbsd-nat.c: Update.
7134 * frame.c: Update.
7135 * gdbthread.h: Update.
7136 * gnu-nat.c: Update.
7137 * go32-nat.c: Update.
7138 * inf-loop.c: Update.
7139 * inf-ptrace.c: Update.
7140 * infcall.c: Update.
7141 * infcmd.c: Update.
7142 * inflow.c: Update.
7143 * infrun.c: Update.
7144 * linux-fork.c: Update.
7145 * linux-nat.c: Update.
7146 * linux-thread-db.c: Update.
7147 * mi/mi-cmd-var.c: Update.
7148 * mi/mi-interp.c: Update.
7149 * mi/mi-main.c: Update.
7150 * nto-procfs.c: Update.
7151 * ppc-linux-tdep.c: Update.
7152 * procfs.c: Update.
7153 * python/py-inferior.c: Update.
7154 * python/py-record-btrace.c: Update.
7155 * python/py-record.c: Update.
7156 * ravenscar-thread.c: Update.
7157 * regcache.c: Update.
7158 * remote-sim.c: Update.
7159 * remote.c: Update.
7160 * sol-thread.c: Update.
7161 * solib.c: Update.
7162 * target.c: Update.
7163 * tui/tui-stack.c: Update.
7164 * varobj.c: Update.
7165 * windows-nat.c: Update.
7166 * windows-tdep.c: Update.
7167
7168 2018-07-03 Tom Tromey <tom@tromey.com>
7169
7170 * common/ptid.c (ptid_match): Remove.
7171 * common/ptid.h (ptid_match): Don't declare.
7172 * fbsd-nat.c: Update.
7173 * infcmd.c: Update.
7174 * infrun.c: Update.
7175 * linux-nat.c: Update.
7176 * record-btrace.c: Update.
7177 * regcache.c: Update.
7178 * remote.c: Update.
7179
7180 2018-07-03 Tom Tromey <tom@tromey.com>
7181
7182 * common/ptid.c (ptid_tid_p): Remove.
7183 * common/ptid.h (ptid_tid_p): Don't declare.
7184 * sol-thread.c: Update.
7185
7186 2018-07-03 Tom Tromey <tom@tromey.com>
7187
7188 * common/ptid.c (ptid_lwp_p): Remove.
7189 * common/ptid.h (ptid_lwp_p): Don't declare.
7190 * fbsd-nat.c: Update.
7191 * linux-nat.c: Update.
7192 * nat/linux-procfs.c: Update.
7193 * nat/x86-linux-dregs.c: Update.
7194 * sol-thread.c: Update.
7195
7196 2018-07-03 Tom Tromey <tom@tromey.com>
7197
7198 * common/ptid.c (ptid_is_pid): Remove.
7199 * common/ptid.h (ptid_is_pid): Don't declare.
7200 * infrun.c: Update.
7201 * linux-nat.c: Update.
7202 * mi/mi-interp.c: Update.
7203 * remote.c: Update.
7204 * thread.c: Update.
7205
7206 2018-07-03 Tom Tromey <tom@tromey.com>
7207
7208 * common/ptid.c (ptid_get_tid): Remove.
7209 * common/ptid.h (ptid_get_tid): Don't declare.
7210 * ada-tasks.c: Update.
7211 * aix-thread.c: Update.
7212 * bsd-uthread.c: Update.
7213 * darwin-nat.c: Update.
7214 * fbsd-nat.c: Update.
7215 * i386-darwin-nat.c: Update.
7216 * infrun.c: Update.
7217 * linux-tdep.c: Update.
7218 * nto-procfs.c: Update.
7219 * ppc-ravenscar-thread.c: Update.
7220 * python/py-infthread.c: Update.
7221 * ravenscar-thread.c: Update.
7222 * sol-thread.c: Update.
7223 * sparc-ravenscar-thread.c: Update.
7224 * windows-nat.c: Update.
7225
7226 2018-07-03 Tom Tromey <tom@tromey.com>
7227
7228 * common/ptid.c (ptid_get_lwp): Remove.
7229 * common/ptid.h (ptid_get_lwp): Don't declare.
7230 * aarch64-linux-nat.c: Update.
7231 * ada-tasks.c: Update.
7232 * aix-thread.c: Update.
7233 * amd64-linux-nat.c: Update.
7234 * arm-linux-nat.c: Update.
7235 * corelow.c: Update.
7236 * fbsd-nat.c: Update.
7237 * fbsd-tdep.c: Update.
7238 * gnu-nat.c: Update.
7239 * i386-cygwin-tdep.c: Update.
7240 * i386-gnu-nat.c: Update.
7241 * i386-linux-nat.c: Update.
7242 * ia64-linux-nat.c: Update.
7243 * inf-ptrace.c: Update.
7244 * infrun.c: Update.
7245 * linux-fork.c: Update.
7246 * linux-nat.c: Update.
7247 * linux-tdep.c: Update.
7248 * linux-thread-db.c: Update.
7249 * mips-linux-nat.c: Update.
7250 * nat/aarch64-linux-hw-point.c: Update.
7251 * nat/aarch64-linux.c: Update.
7252 * nat/linux-btrace.c: Update.
7253 * nat/linux-osdata.c: Update.
7254 * nat/linux-procfs.c: Update.
7255 * nat/x86-linux-dregs.c: Update.
7256 * obsd-nat.c: Update.
7257 * ppc-fbsd-nat.c: Update.
7258 * ppc-linux-nat.c: Update.
7259 * procfs.c: Update.
7260 * python/py-infthread.c: Update.
7261 * ravenscar-thread.c: Update.
7262 * remote.c: Update.
7263 * s390-linux-nat.c: Update.
7264 * sol-thread.c: Update.
7265 * sol2-tdep.c: Update.
7266 * spu-linux-nat.c: Update.
7267 * x86-linux-nat.c: Update.
7268 * xtensa-linux-nat.c: Update.
7269
7270 2018-07-03 Tom Tromey <tom@tromey.com>
7271
7272 * common/ptid.c (ptid_get_pid): Remove.
7273 * common/ptid.h (ptid_get_pid): Don't declare.
7274 * aarch64-linux-nat.c: Update.
7275 * ada-lang.c: Update.
7276 * aix-thread.c: Update.
7277 * alpha-bsd-nat.c: Update.
7278 * amd64-fbsd-nat.c: Update.
7279 * amd64-linux-nat.c: Update.
7280 * arm-linux-nat.c: Update.
7281 * arm-nbsd-nat.c: Update.
7282 * auxv.c: Update.
7283 * break-catch-syscall.c: Update.
7284 * breakpoint.c: Update.
7285 * bsd-uthread.c: Update.
7286 * corelow.c: Update.
7287 * ctf.c: Update.
7288 * darwin-nat.c: Update.
7289 * fbsd-nat.c: Update.
7290 * fbsd-tdep.c: Update.
7291 * gcore.c: Update.
7292 * gnu-nat.c: Update.
7293 * hppa-nbsd-nat.c: Update.
7294 * hppa-obsd-nat.c: Update.
7295 * i386-fbsd-nat.c: Update.
7296 * ia64-linux-nat.c: Update.
7297 * inf-ptrace.c: Update.
7298 * infcmd.c: Update.
7299 * inferior.c: Update.
7300 * inferior.h: Update.
7301 * inflow.c: Update.
7302 * infrun.c: Update.
7303 * linux-fork.c: Update.
7304 * linux-nat.c: Update.
7305 * linux-tdep.c: Update.
7306 * linux-thread-db.c: Update.
7307 * m68k-bsd-nat.c: Update.
7308 * mi/mi-interp.c: Update.
7309 * mi/mi-main.c: Update.
7310 * mips-linux-nat.c: Update.
7311 * mips-nbsd-nat.c: Update.
7312 * mips64-obsd-nat.c: Update.
7313 * nat/aarch64-linux-hw-point.c: Update.
7314 * nat/aarch64-linux.c: Update.
7315 * nat/linux-btrace.c: Update.
7316 * nat/linux-osdata.c: Update.
7317 * nat/linux-procfs.c: Update.
7318 * nat/x86-linux-dregs.c: Update.
7319 * nto-procfs.c: Update.
7320 * obsd-nat.c: Update.
7321 * ppc-linux-nat.c: Update.
7322 * ppc-nbsd-nat.c: Update.
7323 * ppc-obsd-nat.c: Update.
7324 * proc-service.c: Update.
7325 * procfs.c: Update.
7326 * python/py-inferior.c: Update.
7327 * python/py-infthread.c: Update.
7328 * ravenscar-thread.c: Update.
7329 * record.c: Update.
7330 * remote-sim.c: Update.
7331 * remote.c: Update.
7332 * rs6000-nat.c: Update.
7333 * s390-linux-nat.c: Update.
7334 * sh-nbsd-nat.c: Update.
7335 * sol-thread.c: Update.
7336 * sparc-nat.c: Update.
7337 * sparc64-tdep.c: Update.
7338 * spu-linux-nat.c: Update.
7339 * spu-tdep.c: Update.
7340 * target-debug.h: Update.
7341 * target.c: Update.
7342 * thread.c: Update.
7343 * tid-parse.c: Update.
7344 * tracefile-tfile.c: Update.
7345 * vax-bsd-nat.c: Update.
7346 * windows-nat.c: Update.
7347 * x86-linux-nat.c: Update.
7348 * x86-nat.c: Update.
7349
7350 2018-07-03 Tom Tromey <tom@tromey.com>
7351
7352 * common/ptid.c (pid_to_ptid): Remove.
7353 * common/ptid.h (pid_to_ptid): Don't declare.
7354 * aix-thread.c: Update.
7355 * arm-linux-nat.c: Update.
7356 * common/ptid.c: Update.
7357 * common/ptid.h: Update.
7358 * corelow.c: Update.
7359 * ctf.c: Update.
7360 * darwin-nat.c: Update.
7361 * fbsd-nat.c: Update.
7362 * fork-child.c: Update.
7363 * gnu-nat.c: Update.
7364 * go32-nat.c: Update.
7365 * inf-ptrace.c: Update.
7366 * infcmd.c: Update.
7367 * inferior.c: Update.
7368 * infrun.c: Update.
7369 * linux-fork.c: Update.
7370 * linux-nat.c: Update.
7371 * nat/aarch64-linux-hw-point.c: Update.
7372 * nat/fork-inferior.c: Update.
7373 * nat/x86-linux-dregs.c: Update.
7374 * nto-procfs.c: Update.
7375 * obsd-nat.c: Update.
7376 * procfs.c: Update.
7377 * progspace.c: Update.
7378 * remote.c: Update.
7379 * rs6000-nat.c: Update.
7380 * s390-linux-nat.c: Update.
7381 * sol-thread.c: Update.
7382 * spu-linux-nat.c: Update.
7383 * target.c: Update.
7384 * top.c: Update.
7385 * tracefile-tfile.c: Update.
7386 * windows-nat.c: Update.
7387
7388 2018-07-03 Tom Tromey <tom@tromey.com>
7389
7390 * common/ptid.h (ptid_build): Don't declare.
7391 * common/ptid.c (ptid_build): Remove.
7392 * aix-thread.c: Update.
7393 * bsd-kvm.c: Update.
7394 * bsd-uthread.c: Update.
7395 * common/agent.c: Update.
7396 * common/ptid.c: Update.
7397 * common/ptid.h: Update.
7398 * corelow.c: Update.
7399 * darwin-nat.c: Update.
7400 * fbsd-nat.c: Update.
7401 * gnu-nat.c: Update.
7402 * linux-fork.c: Update.
7403 * linux-nat.c: Update.
7404 * linux-thread-db.c: Update.
7405 * nat/linux-osdata.c: Update.
7406 * nat/linux-procfs.c: Update.
7407 * nto-procfs.c: Update.
7408 * obsd-nat.c: Update.
7409 * proc-service.c: Update.
7410 * procfs.c: Update.
7411 * ravenscar-thread.c: Update.
7412 * remote-sim.c: Update.
7413 * remote.c: Update.
7414 * sol-thread.c: Update.
7415 * target.c: Update.
7416 * windows-nat.c: Update.
7417
7418 2018-07-03 Tom Tromey <tom@tromey.com>
7419
7420 * infrun.c (follow_exec): Use exit_inferior_silent.
7421 * inferior.c (exit_inferior_num_silent): Remove.
7422 * inferior.h (exit_inferior_num_silent): Don't declare.
7423
7424 2018-07-03 Tom Tromey <tom@tromey.com>
7425
7426 PR cli/23340:
7427 * darwin-nat.c (darwin_attach_pid): Reset inferior and
7428 inferior_ptid on error.
7429
7430 2018-07-02 Maciej W. Rozycki <macro@mips.com>
7431 Simon Marchi <simon.marchi@polymtl.ca>
7432
7433 PR tdep/8282
7434 * disasm.h (gdb_disassembler): Add
7435 `m_disassembler_options_holder'. member
7436 * disasm.c (get_all_disassembler_options): New function.
7437 (gdb_disassembler::gdb_disassembler): Use it.
7438 (gdb_buffered_insn_length_init_dis): Likewise.
7439 (gdb_buffered_insn_length): Adjust accordingly.
7440 (set_disassembler_options): Handle options with arguments.
7441 (show_disassembler_options_sfunc): Likewise. Add a leading new
7442 line if showing options with descriptions.
7443 (disassembler_options_completer): Adapt to using the
7444 `disasm_options_and_args_t' structure.
7445 * mips-tdep.c (mips_disassembler_options): New variable.
7446 (mips_disassembler_options_o32): Likewise.
7447 (mips_disassembler_options_n32): Likewise.
7448 (mips_disassembler_options_n64): Likewise.
7449 (gdb_print_insn_mips): Don't set `disassembler_options'.
7450 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7451 functions.
7452 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7453 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
7454 `gdbarch_disassembler_options_implicit' and
7455 `gdbarch_valid_disassembler_options'.
7456 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7457 `disasm_options_and_args_t' structure.
7458 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7459 method.
7460 (valid_disassembler_options): Switch from `disasm_options_t' to
7461 the `disasm_options_and_args_t' structure.
7462 * NEWS: Document `set disassembler-options' support for the MIPS
7463 target.
7464 * gdbarch.h: Regenerate.
7465 * gdbarch.c: Regenerate.
7466
7467 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
7468
7469 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7470
7471 2018-06-29 Joel Brobecker <brobecker@adacore.com>
7472
7473 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7474 parameter in call to amd64_target_description.
7475 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7476 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7477 (amd64fbsd_init_abi): Likewise.
7478 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7479 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7480 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7481 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7482
7483 2018-06-29 Pedro Alves <palves@redhat.com>
7484
7485 * gdb/amd64-tdep.h (amd64_create_target_description): Add
7486 "segments" parameter.
7487 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7488 (_initialize_amd64_tdep): Update call to
7489 amd64_create_target_description.
7490 (amd64_target_description): Add "segments" parameter. Adjust
7491 the implementation to use it.
7492 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7493 call to amd64_create_target_description.
7494 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7495 * gdb/arch/amd64.h (amd64_create_target_description): Add
7496 "segments" register.
7497 * gdb/arch/amd64.c (amd64_create_target_description): Add
7498 "segments" parameter. Call create_feature_i386_64bit_segments
7499 only if SEGMENTS is true.
7500 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7501 call to amd64_create_target_description.
7502
7503 2018-06-29 Pedro Alves <palves@redhat.com>
7504
7505 * thread.c (thread_target_id_str): New, factored out from ...
7506 (print_thread_info_1): ... here. Use it to compute the max
7507 "Target Id" column width.
7508
7509 2018-06-29 Pedro Alves <palves@redhat.com>
7510
7511 * remote.c (remote_target::extra_thread_info): Delete
7512 'display_buf' and 'n' locals. from the cache, regardless of
7513 packet mechanims is in use. Use cache for qThreadExtra and qP
7514 methods too.
7515
7516 2018-06-29 Pedro Alves <palves@redhat.com>
7517
7518 * blockframe.c (find_pc_sect_containing_function): New function.
7519 * breakpoint.c (print_breakpoint_location): Don't call
7520 find_pc_sect_function.
7521 * linespec.c (create_sals_line_offset): Record the location's
7522 symbol in the sal.
7523 * linespec.c (convert_address_location_to_sals): Fill in sal's
7524 symbol with find_pc_sect_containing_function.
7525 * symtab.c (find_function_start_sal): Rename to ...
7526 (find_function_start_sal_1): ... this.
7527 (find_function_start_sal): Reimplement as wrapper around
7528 find_function_start_sal_1, and use
7529 find_pc_sect_containing_function to fill in the sal's symbol.
7530 (find_function_start_sal(symbol*, bool)): Adjust.
7531 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7532 comments.
7533 (find_pc_sect_containing_function): Declare.
7534
7535 2018-06-29 Pedro Alves <palves@redhat.com>
7536
7537 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7538 true if the the location has no symbol.
7539
7540 2018-06-28 Tom Tromey <tom@tromey.com>
7541
7542 * NEWS: Mention --enable-codesign.
7543 * silent-rules.mk (ECHO_SIGN): New variable.
7544 * configure.ac: Add --enable-codesign.
7545 * configure: Rebuild.
7546 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7547 (gdb$(EXEEXT)): Optionally invoke codesign.
7548
7549 2018-06-28 Pedro Alves <palves@redhat.com>
7550
7551 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7552 comments.
7553 (switch_to_thread_no_regs): Adjust comment.
7554 * infcmd.c (stop_pc): Delete.
7555 (post_create_inferior, info_program_command): Replace references
7556 to stop_pc with references to thread_info->suspend.stop_pc.
7557 * inferior.h (stop_pc): Delete declaration.
7558 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7559 (handle_inferior_event_1, handle_signal_stop)
7560 (process_event_stop_test, keep_going_stepped_thread)
7561 (handle_step_into_function, handle_step_into_function_backward)
7562 (print_stop_location): Replace references to stop_pc with
7563 references to thread_info->suspend.stop_pc.
7564 (struct infcall_suspend_state) <stop_pc>: Delete field.
7565 (save_infcall_suspend_state, restore_infcall_suspend_state):
7566 Remove references to inf_stat->stop_pc.
7567 * linux-fork.c (fork_load_infrun_state): Likewise.
7568 * record-btrace.c (record_btrace_set_replay): Likewise.
7569 * record-full.c (record_full_goto_entry): Likewise.
7570 * remote.c (print_one_stopped_thread): Likewise.
7571 * target.c (target_resume): Extend comment.
7572 * thread.c (set_executing_thread): New.
7573 (set_executing): Use it.
7574 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7575 Remove references to stop_pc.
7576
7577 2018-06-28 Pedro Alves <palves@redhat.com>
7578
7579 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7580 Moving fetching stop_pc until after ecs->event_thread is refreshed.
7581
7582 2018-06-28 Tom Tromey <tom@tromey.com>
7583
7584 * coffread.c (coff_symfile_finish): Update.
7585 * xcoffread.c (xcoff_symfile_finish): Update.
7586 * elfread.c (elf_symfile_finish): Update.
7587 * symfile.h (dwarf2_free_objfile): Don't declare.
7588 * dwarf2read.c (_initialize_dwarf2_read): Use
7589 register_objfile_data_with_cleanup.
7590 (dwarf2_free_objfile): Now static. Change signature.
7591
7592 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7593
7594 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7595 option "-o" to add-symbol-file-load to add an offset to each
7596 section's load address.
7597 * symfile.c (set_objfile_default_section_offset): New function.
7598
7599 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7600
7601 * symfile.c (add_symbol_file_command): Make sure that sections
7602 with the same name are sorted in the same order.
7603
7604 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7605
7606 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7607 require the second argument. If omitted, load sections at the
7608 addresses specified in the file.
7609
7610 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7611
7612 * symfile.c (symbol_file_command, symbol_file_add_main_1)
7613 (_initialize_symfile): Add option "-o" to symbol-file to add an
7614 offset to each section of the symbol file.
7615
7616 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7617
7618 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7619
7620 2018-06-27 Tom Tromey <tom@tromey.com>
7621
7622 * stack.c (_initialize_stack): Update "func" help text.
7623
7624 2018-06-27 Tom Tromey <tom@tromey.com>
7625
7626 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7627 std::vector.
7628 (unwind_infopy_str, pyuw_create_unwind_info)
7629 (unwind_infopy_add_saved_register, pyuw_sniffer)
7630 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7631 Update.
7632 (struct saved_reg): Add constructor.
7633 <value>: Now a gdbpy_ref<>.
7634
7635 2018-06-27 Tom Tromey <tom@tromey.com>
7636
7637 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7638
7639 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7640
7641 * gdb-gdb.py.in: Format using autopep8.
7642
7643 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7644
7645 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7646 (type_lookup_function): Recognize CORE_ADDR values.
7647
7648 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7649
7650 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7651 print tag_name.
7652
7653 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7654
7655 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7656 <__lt__>: Add.
7657
7658 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7659
7660 * gdb-gdb.py: Move to...
7661 * gdb-gdb.py.in: ... here.
7662 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7663 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7664 dependencies.
7665 (distclean): Remove gdb-gdb.py when cleaning.
7666 (gdb-gdb.py, gdb-gdb.gdb): New rules.
7667 * configure: Re-generate.
7668
7669 2018-06-27 Pedro Alves <palves@redhat.com>
7670
7671 * proc-service.c (get_ps_regcache): New.
7672 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7673 (ps_lsetfpregs): Use it.
7674
7675 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
7676
7677 PR gdb/21695
7678 * dwarf2read.c (lnp_state_machine::check_line_address): Update
7679 declaration.
7680 (dwarf_decode_lines_1): Adjust.
7681
7682 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7683
7684 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7685 override.
7686 <info_proc>: Likewise.
7687
7688 2018-06-26 Joel Brobecker <brobecker@adacore.com>
7689
7690 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7691 to windows_fetch_one_register, and only handle the case of
7692 fetching one register. Move the code that reloads the context
7693 and iterates over all registers if R is negative to...
7694 (windows_nat_target::fetch_registers): ... here.
7695 (do_windows_store_inferior_registers): Rename to
7696 windows_store_one_register, and only handle the case of storing
7697 one register. Move the code that handles the case where r is
7698 negative to...
7699 (windows_nat_target::store_registers) ... here.
7700
7701 2018-06-26 Tom Tromey <tom@tromey.com>
7702
7703 PR rust/22574:
7704 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7705 * rust-lang.c (rust_print_struct_def): Add podata parameter.
7706 Update.
7707 (rust_internal_print_type): Add podata parameter.
7708 (rust_print_type): Update.
7709
7710 2018-06-26 Tom Tromey <tom@tromey.com>
7711
7712 * typeprint.h (struct print_offset_data) <update, finish,
7713 maybe_print_hole>: New methods.
7714 <indentation>: New constant.
7715 * typeprint.c (print_offset_data::indentation): Define.
7716 (print_offset_data::maybe_print_hole, print_offset_data::update)
7717 (print_offset_data::finish): Move from c-typeprint.c and rename.
7718 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7719 (print_spaces_filtered_with_print_options): Update.
7720 (c_print_type_union_field_offset, maybe_print_hole)
7721 (c_print_type_struct_field_offset): Move to typeprint.c and
7722 rename.
7723 (c_type_print_base_struct_union): Update.
7724
7725 2018-06-25 Pedro Alves <palves@redhat.com>
7726
7727 * gdbthread.h (thread_info_ref, delete_thread)
7728 (delete_thread_silent, first_thread_of_inferior)
7729 (any_thread_of_inferior, switch_to_thread)
7730 (enable_thread_stack_temporaries)
7731 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7732 (get_last_thread_stack_temporary)
7733 (value_in_thread_stack_temporaries, can_access_registers_thread):
7734 Spell out "struct thread_info" instead of just "thread_info".
7735 * inferior.h (notice_new_inferior): Likewise.
7736
7737 2018-06-25 Pedro Alves <palves@redhat.com>
7738
7739 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7740 pass thread_info pointer to delete_thread.
7741 (windows_nat_target::detach): Pass inferior pointer to
7742 detach_inferior.
7743 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7744 delete_thread.
7745 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7746 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7747 and pass a thread_info pointer to delete_thread.
7748 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7749 pass thread_info pointer to delete_thread.
7750 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7751 delete_thread_silent call.
7752 * procfs.c (procfs_target::detach): Pass inferior pointer to
7753 detach_inferior.
7754 (procfs_target::wait): Pass thread_info pointer to delete_thread.
7755 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7756 delete_thread_silent call.
7757 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7758 pass thread_info pointer to delete_thread.
7759 (windows_nat_target::detach): Pass inferior pointer to
7760 delete_inferior.
7761
7762 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7763
7764 * regcache.c (readable_regcache::read_part): Fix asserts.
7765 (reg_buffer::raw_collect_part): New function.
7766 (regcache::write_part): Fix asserts.
7767 (reg_buffer::raw_supply_part): New function.
7768 (regcache::transfer_regset_register): New helper function.
7769 (regcache::transfer_regset): Call new functions.
7770 (regcache_supply_regset): Use gdb_byte*.
7771 (regcache::supply_regset): Likewise.
7772 (regcache_collect_regset): Likewise.
7773 (regcache::collect_regset): Likewise.
7774 * regcache.h (reg_buffer::raw_collect_part): New declaration.
7775 (reg_buffer::raw_supply_part): Likewise.
7776 (regcache::transfer_regset_register): Likewise.
7777 (regcache::transfer_regset): Use gdb_byte*.
7778
7779 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7780
7781 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7782
7783 2018-06-21 Pedro Alves <palves@redhat.com>
7784
7785 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7786 instead of a ptid_t. All callers adjusted.
7787 * ada-tasks.c (ada_get_task_number): Likewise. All callers
7788 adjusted.
7789 (print_ada_task_info, display_current_task_id, task_command_1):
7790 Adjust.
7791 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7792 inferior_thread.
7793 (breakpoint_kind): Adjust.
7794 (remove_breakpoints_pid): Rename to ...
7795 (remove_breakpoints_inf): ... this. Adjust to take an inferior
7796 pointer. All callers adjusted.
7797 (bpstat_clear_actions): Use inferior_thread.
7798 (get_bpstat_thread): New.
7799 (bpstat_do_actions): Use it.
7800 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7801 to take a thread_info pointer. All callers adjusted.
7802 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7803 (breakpoint_re_set_thread): Use inferior_thread.
7804 * breakpoint.h (struct inferior): Forward declare.
7805 (bpstat_stop_status): Update.
7806 (remove_breakpoints_pid): Delete.
7807 (remove_breakpoints_inf): New.
7808 * bsd-uthread.c (bsd_uthread_target::wait)
7809 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7810 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7811 (maint_btrace_packet_history_cmd)
7812 (maint_btrace_clear_packet_history_cmd): Adjust.
7813 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7814 inferior_thread.
7815 * cli/cli-interp.c: Include "inferior.h".
7816 * common/refcounted-object.h (struct
7817 refcounted_object_ref_policy): New.
7818 * compile/compile-object-load.c: Include gdbthread.h.
7819 (store_regs): Use inferior_thread.
7820 * corelow.c (core_target::close): Use current_inferior.
7821 (core_target_open): Adjust to use first_thread_of_inferior and use
7822 the current inferior.
7823 * ctf.c (ctf_target::close): Adjust to use current_inferior.
7824 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7825 <thread>: ... this new field. All references adjusted.
7826 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7827 Take a thread_info pointer instead of a ptid_t.
7828 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7829 (dummy_frame_discard, register_dummy_frame_dtor): Take a
7830 thread_info pointer instead of a ptid_t.
7831 * elfread.c: Include "inferior.h".
7832 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7833 Use inferior_thread.
7834 * eval.c (evaluate_subexp): Likewise.
7835 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7836 inferior_thread.
7837 * gdb_proc_service.h (struct thread_info): Forward declare.
7838 (struct ps_prochandle) <ptid>: Delete, replaced by ...
7839 <thread>: ... this new field. All references adjusted.
7840 * gdbarch.h, gdbarch.c: Regenerate.
7841 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7842 'thread' parameter. All implementations and callers adjusted.
7843 * gdbthread.h (thread_info) <set_running>: New method.
7844 (delete_thread, delete_thread_silent): Take a thread_info pointer
7845 instead of a ptid.
7846 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7847 (first_thread_of_process): Delete, replaced by ...
7848 (first_thread_of_inferior): ... this new function. All callers
7849 adjusted.
7850 (any_live_thread_of_process): Delete, replaced by ...
7851 (any_live_thread_of_inferior): ... this new function. All callers
7852 adjusted.
7853 (switch_to_thread, switch_to_no_thread): Declare.
7854 (is_executing): Delete.
7855 (enable_thread_stack_temporaries): Update comment.
7856 <enable_thread_stack_temporaries>: Take a thread_info pointer
7857 instead of a ptid_t. Incref the thread.
7858 <~enable_thread_stack_temporaries>: Decref the thread.
7859 <m_ptid>: Delete
7860 <m_thr>: New.
7861 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7862 (get_last_thread_stack_temporary)
7863 (value_in_thread_stack_temporaries, can_access_registers_thread):
7864 Take a thread_info pointer instead of a ptid_t. All callers
7865 adjusted.
7866 * infcall.c (get_call_return_value): Use inferior_thread.
7867 (run_inferior_call): Work with thread pointers instead of ptid_t.
7868 (call_function_by_hand_dummy): Work with thread pointers instead
7869 of ptid_t. Use thread_info_ref.
7870 * infcmd.c (proceed_thread_callback): Access thread's state
7871 directly.
7872 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7873 access thread's state directly.
7874 (continue_command): Use inferior_thread.
7875 (info_program_command): Use find_thread_ptid and access thread
7876 state directly.
7877 (proceed_after_attach_callback): Use thread state directly.
7878 (notice_new_inferior): Take a thread_info pointer instead of a
7879 ptid_t. All callers adjusted.
7880 (exit_inferior): Take an inferior pointer instead of a pid. All
7881 callers adjusted.
7882 (exit_inferior_silent): New.
7883 (detach_inferior): Delete.
7884 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7885 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7886 (detach_inferior_command, kill_inferior_command): Use
7887 find_inferior_id instead of valid_gdb_inferior_id and
7888 gdb_inferior_id_to_pid.
7889 (inferior_command): Use inferior and thread pointers.
7890 * inferior.h (struct thread_info): Forward declare.
7891 (notice_new_inferior): Take a thread_info pointer instead of a
7892 ptid_t. All callers adjusted.
7893 (detach_inferior): Delete declaration.
7894 (exit_inferior, exit_inferior_silent): Take an inferior pointer
7895 instead of a pid. All callers adjusted.
7896 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7897 (valid_gdb_inferior_id): Delete.
7898 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7899 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7900 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7901 ...
7902 <inf>: ... this new field.
7903 <step_ptid>: Delete, replaced by ...
7904 <step_thread>: ... this new field.
7905 (get_displaced_stepping_state): Take an inferior pointer instead
7906 of a pid. All callers adjusted.
7907 (displaced_step_in_progress_any_inferior): Adjust.
7908 (displaced_step_in_progress_thread): Take a thread pointer instead
7909 of a ptid_t. All callers adjusted.
7910 (displaced_step_in_progress, add_displaced_stepping_state): Take
7911 an inferior pointer instead of a pid. All callers adjusted.
7912 (get_displaced_step_closure_by_addr): Adjust.
7913 (remove_displaced_stepping_state): Take an inferior pointer
7914 instead of a pid. All callers adjusted.
7915 (displaced_step_prepare_throw, displaced_step_prepare)
7916 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7917 All callers adjusted.
7918 (start_step_over): Adjust.
7919 (infrun_thread_ptid_changed): Remove bit updating ptids in the
7920 displaced step queue.
7921 (do_target_resume): Adjust.
7922 (fetch_inferior_event): Use inferior_thread.
7923 (context_switch, get_inferior_stop_soon): Take an
7924 execution_control_state pointer instead of a ptid_t. All callers
7925 adjusted.
7926 (switch_to_thread_cleanup): Delete.
7927 (stop_all_threads): Use scoped_restore_current_thread.
7928 * inline-frame.c: Include "gdbthread.h".
7929 (inline_state) <inline_state>: Take a thread pointer instead of a
7930 ptid_t. All callers adjusted.
7931 <ptid>: Delete, replaced by ...
7932 <thread>: ... this new field.
7933 (find_inline_frame_state): Take a thread pointer instead of a
7934 ptid_t. All callers adjusted.
7935 (skip_inline_frames, step_into_inline_frame)
7936 (inline_skipped_frames, inline_skipped_symbol): Take a thread
7937 pointer instead of a ptid_t. All callers adjusted.
7938 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7939 (inline_skipped_frames, inline_skipped_symbol): Likewise.
7940 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7941 pointers directly.
7942 * linux-nat.c (get_detach_signal): Likewise.
7943 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7944 (thread_db_notice_clone): Adjust.
7945 (thread_db_find_new_threads_silently)
7946 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7947 a thread pointer instead of a ptid_t. All callers adjusted.
7948 * mi/mi-cmd-var.c: Include "inferior.h".
7949 (mi_cmd_var_update_iter): Update to use thread pointers.
7950 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7951 inferior directly.
7952 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7953 out to ...
7954 (mi_output_running): ... this new function.
7955 (mi_on_resume_1): Adjust to use it.
7956 (mi_user_selected_context_changed): Adjust to use inferior_thread.
7957 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7958 directly.
7959 (interrupt_thread_callback): : Adjust to use thread and inferior
7960 pointers.
7961 * proc-service.c: Include "gdbthread.h".
7962 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7963 * progspace-and-thread.c: Include "inferior.h".
7964 * progspace.c: Include "inferior.h".
7965 * python/py-exitedevent.c (create_exited_event_object): Adjust to
7966 hold a reference to an inferior_object.
7967 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7968 inferior_thread.
7969 * python/py-inferior.c (struct inferior_object): Give the type a
7970 tag name instead of a typedef.
7971 (python_on_normal_stop): No need to check if the current thread is
7972 listed.
7973 (inferior_to_inferior_object): Change return type to
7974 inferior_object. All callers adjusted.
7975 (find_thread_object): Delete, bits factored out to ...
7976 (thread_to_thread_object): ... this new function.
7977 * python/py-infthread.c (create_thread_object): Use
7978 inferior_to_inferior_object.
7979 (thpy_is_stopped): Use thread pointer directly.
7980 (gdbpy_selected_thread): Use inferior_thread.
7981 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7982 field, replaced with ...
7983 <thread>: ... this new field. All users adjusted.
7984 (btpy_insn_or_gap_new): Drop const.
7985 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
7986 callers adjusted.
7987 * python/py-record.c: Include "gdbthread.h".
7988 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7989 a ptid_t. All callers adjusted.
7990 (gdbpy_current_recording): Use inferior_thread.
7991 * python/py-record.h (recpy_record_object) <ptid>: Delete
7992 field, replaced with ...
7993 <thread>: ... this new field. All users adjusted.
7994 (recpy_element_object) <ptid>: Delete
7995 field, replaced with ...
7996 <thread>: ... this new field. All users adjusted.
7997 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7998 a ptid_t. All callers adjusted.
7999 * python/py-threadevent.c: Include "gdbthread.h".
8000 (get_event_thread): Use thread_to_thread_object.
8001 * python/python-internal.h (struct inferior_object): Forward
8002 declare.
8003 (find_thread_object, find_inferior_object): Delete declarations.
8004 (thread_to_thread_object, inferior_to_inferior_object): New
8005 declarations.
8006 * record-btrace.c: Include "inferior.h".
8007 (require_btrace_thread): Use inferior_thread.
8008 (record_btrace_frame_sniffer)
8009 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
8010 (get_thread_current_frame): Use scoped_restore_current_thread and
8011 switch_to_thread.
8012 (get_thread_current_frame): Use thread pointer directly.
8013 (record_btrace_replay_at_breakpoint): Use thread's inferior
8014 pointer directly.
8015 * record-full.c: Include "inferior.h".
8016 * regcache.c: Include "gdbthread.h".
8017 (get_thread_arch_regcache): Use the inferior's address space
8018 directly.
8019 (get_thread_regcache, registers_changed_thread): New.
8020 * regcache.h (get_thread_regcache(thread_info *thread)): New
8021 overload.
8022 (registers_changed_thread): New.
8023 (remote_target) <remote_detach_1>: Swap order of parameters.
8024 (remote_add_thread): <remote_add_thread>: Return the new thread.
8025 (get_remote_thread_info(ptid_t)): New overload.
8026 (remote_target::remote_notice_new_inferior): Use thread pointers
8027 directly.
8028 (remote_target::process_initial_stop_replies): Use
8029 thread_info::set_running.
8030 (remote_target::remote_detach_1, remote_target::detach)
8031 (extended_remote_target::detach): Adjust.
8032 * stack.c (frame_show_address): Use inferior_thread.
8033 * target-debug.h (target_debug_print_thread_info_pp): New.
8034 * target-delegates.c: Regenerate.
8035 * target.c (default_thread_address_space): Delete.
8036 (memory_xfer_partial_1): Use current_inferior.
8037 (target_detach): Use current_inferior.
8038 (target_thread_address_space): Delete.
8039 (generic_mourn_inferior): Use current_inferior.
8040 * target.h (struct target_ops) <thread_address_space>: Delete.
8041 (target_thread_address_space): Delete.
8042 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
8043 pointers directly.
8044 (delete_thread_1, delete_thread, delete_thread_silent): Take a
8045 thread pointer instead of a ptid_t. Adjust all callers.
8046 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8047 (first_thread_of_process): Delete, replaced by ...
8048 (first_thread_of_inferior): ... this new function. All callers
8049 adjusted.
8050 (any_thread_of_process): Rename to ...
8051 (any_thread_of_inferior): ... this, and take an inferior pointer.
8052 (any_live_thread_of_process): Rename to ...
8053 (any_live_thread_of_inferior): ... this, and take an inferior
8054 pointer.
8055 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8056 (value_in_thread_stack_temporaries)
8057 (get_last_thread_stack_temporary): Take a thread pointer instead
8058 of a ptid_t. Adjust all callers.
8059 (thread_info::set_running): New.
8060 (validate_registers_access): Use inferior_thread.
8061 (can_access_registers_ptid): Rename to ...
8062 (can_access_registers_thread): ... this, and take a thread
8063 pointer.
8064 (print_thread_info_1): Adjust to compare thread pointers instead
8065 of ptids.
8066 (switch_to_no_thread, switch_to_thread): Make extern.
8067 (scoped_restore_current_thread::~scoped_restore_current_thread):
8068 Use m_thread pointer directly.
8069 (scoped_restore_current_thread::scoped_restore_current_thread):
8070 Use inferior_thread.
8071 (thread_command): Use thread pointer directly.
8072 (thread_num_make_value_helper): Use inferior_thread.
8073 * top.c (execute_command): Use inferior_thread.
8074 * tui/tui-interp.c: Include "inferior.h".
8075 * varobj.c (varobj_create): Use inferior_thread.
8076 (value_of_root_1): Use find_thread_global_id instead of
8077 global_thread_id_to_ptid.
8078
8079 2018-06-21 Alan Hayward <alan.hayward@arm.com>
8080
8081 * regcache.c (readable_regcache::read_part): Avoid memcpy when
8082 possible.
8083 (regcache::write_part): Likewise.
8084 (readable_regcache::cooked_read_part): Update comment.
8085 (readable_regcache::cooked_write_part): Likewise.
8086 * regcache.h: (readable_regcache::read_part): Likewise.
8087 (regcache::write_part): Likewise.
8088
8089 2018-06-21 Richard Bunt <richard.bunt@arm.com>
8090 Dirk Schubert <dirk.schubert@arm.com>
8091
8092 * aarch64-linux-nat.c (post_attach): New.
8093 (aarch64_linux_nat_target::post_attach): Override post_attach to
8094 record the number of hardware debug registers.
8095
8096 2018-06-20 Tom Tromey <tom@tromey.com>
8097
8098 * python/py-param.c (add_setshow_generic): Make parameters const.
8099 (parmpy_init): Update.
8100
8101 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8102
8103 * regcache.h (regcache_cooked_read_ftype): Rename to...
8104 (register_read_ftype): ...this, change type to function_view.
8105 (class reg_buffer) <save>: Remove src parameter.
8106 (readonly_detached_regcache) <readonly_detached_regcache>: Make
8107 parameter non-const in first overload. Remove src parameter in
8108 second overload.
8109 * regcache.c (do_cooked_read): Remove.
8110 (readonly_detached_regcache::readonly_detached_regcache): Make
8111 parameter non-const, adjust call to other constructor.
8112 (reg_buffer::save): Remove src parameter.
8113 * frame.c (do_frame_register_read): Remove.
8114 (frame_save_as_regcache): Use lambda function.
8115 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8116 parameter to ppu2spu_data *.
8117 (ppu2spu_sniffer): Use lambda function.
8118
8119 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
8120
8121 * record-full.c (record_full_target::insert_breakpoint): Remove
8122 "struct" keyword, add const.
8123
8124 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
8125
8126 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8127 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8128 * configure.ac: Remove AC_PREREQ, add missing quoting.
8129 * gnulib/configure.ac: Modernize usage of
8130 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
8131 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8132 (AUTOMAKE_VERSION): Bump to 1.15.1.
8133 * configure: Re-generate.
8134 * config.in: Re-generate.
8135 * aclocal.m4: Re-generate.
8136 * gnulib/aclocal.m4: Re-generate.
8137 * gnulib/config.in: Re-generate.
8138 * gnulib/configure: Re-generate.
8139 * gnulib/import/Makefile.in: Re-generate.
8140
8141 2018-06-19 Pedro Alves <palves@redhat.com>
8142
8143 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8144 (lookup_minimal_symbol_by_pc_section): ... here with
8145 gdb_assert_not_reached added.
8146
8147 2018-06-19 Pedro Alves <palves@redhat.com>
8148
8149 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8150 parameter with a block parameter. Compare location's block symbol
8151 with the frame's block instead of addresses.
8152 (skip_inline_frames): Pass the current block instead of the
8153 frame's address. Break out as soon as we determine the frame
8154 should not be skipped.
8155
8156 2018-06-18 Tom Tromey <tom@tromey.com>
8157
8158 * solib-aix.c (solib_aix_get_section_offsets): Return
8159 unique_xmalloc_ptr.
8160 (solib_aix_solib_create_inferior_hook): Update.
8161
8162 2018-06-18 Tom Tromey <tom@tromey.com>
8163
8164 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8165
8166 2018-06-18 Tom Tromey <tom@tromey.com>
8167
8168 * solib-frv.c (frv_relocate_main_executable): Use
8169 unique_xmalloc_ptr.
8170 * solib-dsbt.c (dsbt_relocate_main_executable): Use
8171 unique_xmalloc_ptr.
8172
8173 2018-06-18 Tom Tromey <tom@tromey.com>
8174
8175 * objfiles.h (inhibit_section_map_updates): Update.
8176 (resume_section_map_updates, resume_section_map_updates_cleanup):
8177 Remove.
8178 * solib-svr4.c (svr4_handle_solib_event): Update.
8179 * objfiles.c (inhibit_section_map_updates): Return
8180 scoped_restore_tmpl<int>.
8181 (resume_section_map_updates, resume_section_map_updates_cleanup):
8182 Remove.
8183
8184 2018-06-18 Tom Tromey <tom@tromey.com>
8185
8186 * valprint.h (read_string): Update.
8187 * valprint.c (read_string): Change type of "buffer".
8188 (val_print_string): Update.
8189 * python/py-value.c (valpy_string): Update.
8190 * language.h (struct language_defn) <la_get_string>: Change
8191 type of "buffer".
8192 (default_get_string, c_get_string): Update.
8193 * language.c (default_get_string): Change type of "buffer".
8194 * guile/scm-value.c (gdbscm_value_to_string): Update.
8195 * c-lang.c (c_get_string): Change type of "buffer".
8196
8197 2018-06-18 Tom Tromey <tom@tromey.com>
8198
8199 * ser-mingw.c (struct pipe_state_destroyer): New.
8200 (pipe_state_up): New typedef.
8201 (cleanup_pipe_state): Remove.
8202 (pipe_windows_open): Use pipe_state_up. Don't release argv.
8203
8204 2018-06-18 Tom Tromey <tom@tromey.com>
8205
8206 * rust-lang.h (rust_yyerror): Don't declare.
8207 * rust-lang.c (rust_language_defn): Update.
8208 * rust-exp.y (yyerror): Now static.
8209 * parse.c (parse_exp_in_context_1): Update.
8210 * p-lang.h (p_yyerror): Don't declare.
8211 * p-lang.c (p_language_defn): Update.
8212 * p-exp.y (yyerror): Now static.
8213 * opencl-lang.c (opencl_language_defn): Update.
8214 * objc-lang.c (objc_language_defn): Update.
8215 * m2-lang.h (m2_yyerror): Don't declare.
8216 * m2-lang.c (m2_language_defn): Update.
8217 * m2-exp.y (yyerror): Now static.
8218 * language.h (struct language_defn) <la_error>: Remove.
8219 * language.c (unk_lang_error): Remove.
8220 (unknown_language_defn, auto_language_defn): Remove.
8221 * go-lang.h (go_yyerror): Don't declare.
8222 * go-lang.c (go_language_defn): Update.
8223 * go-exp.y (yyerror): Now static.
8224 * f-lang.h (f_yyerror): Don't declare.
8225 * f-lang.c (f_language_defn): Update.
8226 * f-exp.y (yyerror): Now static.
8227 * d-lang.h (d_yyerror): Don't declare.
8228 * d-lang.c (d_language_defn): Update.
8229 * d-exp.y (yyerror): Now static.
8230 * c-lang.h (c_yyerror): Don't declare.
8231 * c-lang.c (c_language_defn, cplus_language_defn)
8232 (asm_language_defn, minimal_language_defn): Update.
8233 * c-exp.y (yyerror): Now static.
8234 * ada-lang.h (ada_yyerror): Don't declare.
8235 * ada-lang.c (ada_language_defn): Update.
8236 * ada-exp.y (yyerror): Now static.
8237
8238 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8239
8240 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8241 (store_sveregs_to_thread): Likewise.
8242 (aarch64_linux_fetch_inferior_registers): Check for SVE.
8243 (aarch64_linux_store_inferior_registers): Likewise.
8244 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8245 function.
8246 (aarch64_sve_regs_copy_to_regcache): Likewise.
8247 (aarch64_sve_regs_copy_from_regcache): Likewise.
8248 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8249 declaration.
8250 (aarch64_sve_regs_copy_to_regcache): Likewise.
8251 (aarch64_sve_regs_copy_from_regcache): Likewise.
8252 (sve_context): Structure from Linux headers.
8253 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8254 (SVE_SIG_ZREG_SIZE): Likewise.
8255 (SVE_SIG_PREG_SIZE): Likewise.
8256 (SVE_SIG_FFR_SIZE): Likewise.
8257 (SVE_SIG_REGS_OFFSET): Likewise.
8258 (SVE_SIG_ZREGS_OFFSET): Likewise.
8259 (SVE_SIG_ZREG_OFFSET): Likewise.
8260 (SVE_SIG_ZREGS_SIZE): Likewise.
8261 (SVE_SIG_PREGS_OFFSET): Likewise.
8262 (SVE_SIG_PREG_OFFSET): Likewise.
8263 (SVE_SIG_PREGS_SIZE): Likewise.
8264 (SVE_SIG_FFR_OFFSET): Likewise.
8265 (SVE_SIG_REGS_SIZE): Likewise.
8266 (SVE_SIG_CONTEXT_SIZE): Likewise.
8267 (SVE_PT_REGS_MASK): Likewise.
8268 (SVE_PT_REGS_FPSIMD): Likewise.
8269 (SVE_PT_REGS_SVE): Likewise.
8270 (SVE_PT_VL_INHERIT): Likewise.
8271 (SVE_PT_VL_ONEXEC): Likewise.
8272 (SVE_PT_REGS_OFFSET): Likewise.
8273 (SVE_PT_FPSIMD_OFFSET): Likewise.
8274 (SVE_PT_FPSIMD_SIZE): Likewise.
8275 (SVE_PT_SVE_ZREG_SIZE): Likewise.
8276 (SVE_PT_SVE_PREG_SIZE): Likewise.
8277 (SVE_PT_SVE_FFR_SIZE): Likewise.
8278 (SVE_PT_SVE_FPSR_SIZE): Likewise.
8279 (SVE_PT_SVE_FPCR_SIZE): Likewise.
8280 (__SVE_SIG_TO_PT): Likewise.
8281 (SVE_PT_SVE_OFFSET): Likewise.
8282 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8283 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8284 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8285 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8286 (SVE_PT_SVE_PREG_OFFSET): Likewise.
8287 (SVE_PT_SVE_PREGS_SIZE): Likewise.
8288 (SVE_PT_SVE_FFR_OFFSET): Likewise.
8289 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8290 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8291 (SVE_PT_SVE_SIZE): Likewise.
8292 (SVE_PT_SIZE): Likewise.
8293 (HAS_SVE_STATE): New define.
8294
8295 2018-06-18 Alan Hayward <alan.hayward@arm.com>
8296
8297 * nat/aarch64-sve-linux-sigcontext.h: New file.
8298 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8299 new files.
8300 (SVE_VQ_MIN): Likewise.
8301 (SVE_VQ_MAX): Likewise.
8302 (SVE_VL_MIN): Likewise.
8303 (SVE_VL_MAX): Likewise.
8304 (SVE_NUM_ZREGS): Likewise.
8305 (SVE_NUM_PREGS): Likewise.
8306 (sve_vl_valid): Likewise.
8307 (struct user_sve_header): Likewise.
8308
8309 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
8310 Richard Bunt <Richard.Bunt@arm.com>
8311
8312 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8313 was requested by GDB.
8314
8315 2018-06-15 Tom de Vries <tdevries@suse.de>
8316
8317 * MAINTAINERS (Write After Approval): Add Tom de Vries.
8318
8319 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
8320
8321 * gnulib/update-gnulib.sh: Print expected versions of
8322 autoconf/aclocal.
8323
8324 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
8325
8326 * arch-utils.c (default_type_align): Use type_length_units.
8327 * gdbtypes.c (type_align): Use type_length_units.
8328
8329 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8330
8331 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8332 of 'define' command.
8333
8334 2018-06-14 Tom de Vries <tdevries@suse.de>
8335
8336 PR cli/22573
8337 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8338 get_no_prettyformat_print_options.
8339
8340 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
8341
8342 * sparc-nat.h: Include target.h.
8343 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8344 <fetch_registers>: Remove this argument in function call.
8345 <store_registers>: Remove this argument in function call, remove
8346 extra semicolon.
8347 <low_forget_process>: Call sparc64_forget_process instead of
8348 sparc_forget_process.
8349
8350 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8351
8352 * procfs.c (_initialize_procfs): Use add_inf_child_target.
8353 (procfs_target::make_corefile_notes): Adjust to new
8354 target_read_alloc return type.
8355
8356 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8357 Stephen Roberts <stephen.roberts@arm.com>
8358
8359 PR gdb/22882
8360 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8361 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8362 Move should_notify_stop local into more inner scope.
8363
8364 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8365 Stephen Roberts <stephen.roberts@arm.com>
8366
8367 PR gdb/22882
8368 * infrun.c (resume_1): Add call to mark_async_event_handler.
8369
8370 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
8371
8372 * infrun.c (do_target_wait): Change old version of $pc printed.
8373
8374 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
8375
8376 * dwarf2read.c (read_index_from_section): Rename to...
8377 (read_gdb_index_from_section): ... this, update all callers.
8378 (dwarf2_read_index): Rename to...
8379 (dwarf2_read_gdb_index): ... this, update all callers.
8380
8381 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
8382
8383 * hppa-linux-nat.c
8384 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8385 hppa_linux_nat_target::fetch_registers.
8386
8387 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8388
8389 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8390 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8391 (AARCH64_DWARF_SVE_FFR): Likewise.
8392 (AARCH64_DWARF_SVE_P0): Likewise.
8393 (AARCH64_DWARF_SVE_Z0): Likewise.
8394
8395 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8396
8397 * common/common-regcache.h (raw_compare): New function.
8398 * regcache.c (regcache::raw_compare): Likewise.
8399 * regcache.h (regcache::raw_compare): New declaration.
8400
8401 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8402
8403 * common/common-regcache.h (reg_buffer_common): New structure.
8404 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8405 (reg_buffer::raw_supply): Likewise.
8406 (reg_buffer::raw_supply_integer): Likewise.
8407 (reg_buffer::raw_supply_zeroed): Likewise.
8408 (reg_buffer::raw_collect): Likewise.
8409 (reg_buffer::raw_collect_integer): Likewise.
8410 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8411 (reg_buffer::raw_supply): Likewise.
8412 (reg_buffer::raw_supply_integer): Likewise.
8413 (reg_buffer::raw_supply_zeroed): Likewise.
8414 (reg_buffer::raw_collect): Likewise.
8415 (reg_buffer::raw_collect_integer): Likewise.
8416
8417 2018-06-10 Tom Tromey <tom@tromey.com>
8418
8419 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
8420 (class remote_state) <stop_reply_queue>: Now std::vector.
8421 (remote_state::~remote_state)
8422 (remote_target::stop_reply_queue_length): Update.
8423 (struct queue_iter_param, remove_child_of_pending_fork)
8424 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8425 (check_pending_event_prevents_wildcard_vcont_callback)
8426 (remove_stop_reply_for_inferior)
8427 (remove_stop_reply_of_remote_state)
8428 (remote_notif_remove_once_on_match)
8429 (stop_reply_match_ptid_and_ws)
8430 (remote_kill_child_of_pending_fork): Remove.
8431 (remote_target::remove_new_fork_children)
8432 (remote_target::check_pending_events_prevent_wildcard_vcont)
8433 (remote_target::discard_pending_stop_replies)
8434 (remote_target::discard_pending_stop_replies_in_queue)
8435 (remote_target::remote_notif_remove_queued_reply)
8436 (remote_target::queued_stop_reply)
8437 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8438 (remote_target::wait, remote_target::kill_new_fork_children)
8439 (remote_target::async): Update.
8440
8441 2018-06-10 Tom Tromey <tom@tromey.com>
8442
8443 * record-full.c (record_full_arch_list_cleanups): Remove.
8444 (record_full_message): Use try/catch.
8445 (record_full_wait_cleanups): Remove.
8446 (record_full_wait_1): Use try/catch.
8447 (record_full_restore): Likewise.
8448
8449 2018-06-10 Tom Tromey <tom@tromey.com>
8450
8451 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
8452 declare VEC. Add constructor.
8453 <in_target_beneath>: Now bool.
8454 (record_full_breakpoints): Now a std::vector, static.
8455 (record_full_sync_record_breakpoints)
8456 (record_full_init_record_breakpoints)
8457 (record_full_target::insert_breakpoint)
8458 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
8459
8460 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8461
8462 * dwarf2read.c (process_cu_includes): Remove struct keyword.
8463 * serial.c (serial_interface_lookup): Remove struct keyword.
8464
8465 2018-06-10 Tom Tromey <tom@tromey.com>
8466
8467 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8468 method.
8469 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8470 a method.
8471 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8472 method.
8473 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8474 "beneath" as a method.
8475 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8476 Use "beneath" as a method.
8477
8478 2018-06-10 Tom Tromey <tom@tromey.com>
8479
8480 * tracefile.c (struct trace_file_writer_deleter): New.
8481 <operator()>: Rename from trace_file_writer_xfree.
8482 (trace_file_writer_up): New typedef.
8483 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8484
8485 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8486
8487 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8488 <m_registers, m_register_status>: Change type to
8489 std::unique_ptr.
8490 * regcache.c (reg_buffer::reg_buffer): Use new instead of
8491 XCNEWVEC.
8492
8493 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8494
8495 * common/common-regcache.h (enum register_status): Add
8496 underlying type "signed char".
8497 * regcache.h (reg_buffer) <m_register_status>: Change type to
8498 register_status *.
8499 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8500 register_status instead of signed char.
8501 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8502 (reg_buffer::get_register_status): Remove cast.
8503 (readable_regcache::raw_read): Remove cast.
8504 (readable_regcache::cooked_read): Remove cast.
8505
8506 2018-06-09 Tom Tromey <tom@tromey.com>
8507
8508 * source.c (reverse_search_command, forward_search_command): Use
8509 scoped_fd.
8510
8511 2018-06-09 Tom Tromey <tom@tromey.com>
8512
8513 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
8514 (serial_ops_list): Now static, std::vector.
8515 (serial_interface_lookup, serial_add_interface): Update.
8516
8517 2018-06-09 Tom Tromey <tom@tromey.com>
8518
8519 * dwarf2read.c (process_cu_includes): Update.
8520 (process_full_comp_unit): Update.
8521 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8522 std::vector.
8523
8524 2018-06-08 Paul Koning <paul_koning@dell.com>
8525
8526 PR gdb/23252
8527
8528 * python/python.c (do_start_initialization):
8529 Avoid call to internal Python API.
8530 (init__gdb_module): New function.
8531
8532 2018-06-08 Gary Benson <gbenson@redhat.com>
8533
8534 * linux-thread-db.c (valprint.h): New include.
8535 (struct check_thread_db_info): New structure.
8536 (check_thread_db_on_load, tdb_testinfo): New static globals.
8537 (check_thread_db, check_thread_db_callback): New functions.
8538 (try_thread_db_load_1): Run integrity checks if requested.
8539 (maintenance_check_libthread_db): New function.
8540 (_initialize_thread_db): Register "maint check libthread-db"
8541 and "maint set/show check-libthread-db".
8542 * NEWS: Mention the above new commands.
8543
8544 2018-06-08 Tom Tromey <tom@tromey.com>
8545
8546 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8547 now a method.
8548
8549 2018-06-08 Tom Tromey <tom@tromey.com>
8550
8551 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8552
8553 2018-06-08 Tom Tromey <tom@tromey.com>
8554
8555 * common/btrace-common.h (struct btrace_data): Add constructor,
8556 destructor, move assignment operator.
8557 <empty, clear, fini>: New methods.
8558 <format>: Initialize.
8559 (btrace_data_init, btrace_data_fini, btrace_data_clear)
8560 (btrace_data_empty): Don't declare.
8561 * common/btrace-common.c (btrace_data_init): Remove.
8562 (btrace_data::fini): Rename from btrace_data_fini.
8563 (btrace_data::empty): Rename from btrace_data_empty.
8564 (btrace_data::clear): Rename from btrace_data_clear. Return
8565 bool.
8566 * btrace.h (make_cleanup_btrace_data): Don't declare.
8567 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8568 (parse_xml_btrace): Update.
8569 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8570 (maint_btrace_clear_packet_history_cmd): Update.
8571
8572 2018-06-07 Pedro Alves <palves@redhat.com>
8573
8574 * target.h (target_ops) <beneath>: Now a method. All references
8575 updated.
8576 (class target_stack): New.
8577 * target.c (g_target_stack): New.
8578 (g_current_top_target): Delete.
8579 (current_top_target): Get the top target out of g_target_stack.
8580 (target_stack::push, target_stack::unpush): New.
8581 (push_target, unpush_target): Reimplement.
8582 (target_is_pushed): Reimplement in terms of g_target_stack.
8583 (target_ops::beneath, target_stack::find_beneath): New.
8584
8585 2018-06-07 Pedro Alves <palves@redhat.com>
8586
8587 * target.h (find_target_beneath): Delete declaration.
8588 * target.c (find_target_beneath): Delete definition.
8589 * aix-thread.c: All callers of find_target_beneath adjusted to
8590 call target_ops::beneath instead.
8591 * bsd-uthread.c: Likewise.
8592 * linux-thread-db.c: Likewise.
8593 * ravenscar-thread.c: Likewise.
8594 * sol-thread.c: Likewise.
8595 * spu-multiarch.c: Likewise.
8596
8597 2018-06-07 Pedro Alves <palves@redhat.com>
8598
8599 * target.h (target_ops) <beneath>: Now a method. All references
8600 updated.
8601 (target_ops) <m_beneath>: New.
8602 * target.c (target_ops::beneath): New.
8603 * corelow.c: Adjust all references to target_ops::beneath.
8604 * linux-thread-db.c: Likewise.
8605 * make-target-delegates: Likewise.
8606 * record-btrace.c: Likewise.
8607 * record-full.c: Likewise.
8608 * remote.c: Likewise.
8609 * target.c: Likewise.
8610 * target-delegates.c: Regenerate.
8611
8612 2018-06-07 Pedro Alves <palves@redhat.com>
8613
8614 * target.h (target_stack): Delete.
8615 (current_top_target): Declare function.
8616 * target.c (target_stack): Delete.
8617 (g_current_top_target): New.
8618 (current_top_target): New function.
8619 * auxv.c: Use current_top_target instead of target_stack
8620 throughout.
8621 * avr-tdep.c: Likewise.
8622 * breakpoint.c: Likewise.
8623 * corefile.c: Likewise.
8624 * elfread.c: Likewise.
8625 * eval.c: Likewise.
8626 * exceptions.c: Likewise.
8627 * frame.c: Likewise.
8628 * gdbarch-selftests.c: Likewise.
8629 * gnu-v3-abi.c: Likewise.
8630 * ia64-tdep.c: Likewise.
8631 * ia64-vms-tdep.c: Likewise.
8632 * infcall.c: Likewise.
8633 * infcmd.c: Likewise.
8634 * infrun.c: Likewise.
8635 * linespec.c: Likewise.
8636 * linux-tdep.c: Likewise.
8637 * minsyms.c: Likewise.
8638 * ppc-linux-nat.c: Likewise.
8639 * ppc-linux-tdep.c: Likewise.
8640 * procfs.c: Likewise.
8641 * regcache.c: Likewise.
8642 * remote.c: Likewise.
8643 * rs6000-tdep.c: Likewise.
8644 * s390-linux-nat.c: Likewise.
8645 * s390-tdep.c: Likewise.
8646 * solib-aix.c: Likewise.
8647 * solib-darwin.c: Likewise.
8648 * solib-dsbt.c: Likewise.
8649 * solib-spu.c: Likewise.
8650 * solib-svr4.c: Likewise.
8651 * solib-target.c: Likewise.
8652 * sparc-tdep.c: Likewise.
8653 * sparc64-tdep.c: Likewise.
8654 * spu-tdep.c: Likewise.
8655 * symfile.c: Likewise.
8656 * symtab.c: Likewise.
8657 * target-descriptions.c: Likewise.
8658 * target-memory.c: Likewise.
8659 * target.c: Likewise.
8660 * target.h: Likewise.
8661 * tracefile-tfile.c: Likewise.
8662 * tracepoint.c: Likewise.
8663 * valops.c: Likewise.
8664 * valprint.c: Likewise.
8665 * value.c: Likewise.
8666 * windows-tdep.c: Likewise.
8667 * mi/mi-main.c: Likewise.
8668
8669 2018-06-07 Tom Tromey <tom@tromey.com>
8670
8671 * valprint.h (build_address_symbolic): Declare.
8672 * printcmd.c (print_address_symbolic): Update.
8673 (build_address_symbolic): Change "name" and "filename" to
8674 std::string.
8675 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8676 Update.
8677 * defs.h (build_address_symbolic): Remove declaration.
8678
8679 2018-06-07 Alan Hayward <alan.hayward@arm.com>
8680
8681 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8682 (aarch64_vnv_type): Add function.
8683 (aarch64_pseudo_register_name): Add V regs for SVE.
8684 (aarch64_pseudo_register_type): Likewise.
8685 (aarch64_pseudo_register_reggroup_p): Likewise.
8686 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8687 (aarch64_pseudo_read_value): Add V regs for SVE.
8688 (aarch64_pseudo_write_2): Use V0 offset for SVE
8689 (aarch64_pseudo_write): Add V regs for SVE.
8690 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8691
8692 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
8693
8694 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8695 (sve_vl_from_vq): Likewise.
8696
8697 2018-06-05 Tom Tromey <tom@tromey.com>
8698
8699 * cli/cli-cmds.c (show_version): Update.
8700 * top.c (print_gdb_version): Add "interactive" parameter.
8701 Update.
8702 * main.c (captured_main_1): Update.
8703 * top.h (print_gdb_version): Add "interactive" parameter and a
8704 comment.
8705
8706 2018-06-05 David Malcolm <dmalcolm@redhat.com>
8707
8708 * common/enum-flags.h: Add trailing semicolon to example in
8709 comment.
8710
8711 2018-06-05 Tom Tromey <tom@tromey.com>
8712
8713 PR cli/12326:
8714 * NEWS: Add entry about pager.
8715 * utils.c (pagination_disabled_for_command): New global.
8716 (prompt_for_continue): Allow "c" response to prompt.
8717 (reinitialize_more_filter): Clear
8718 pagination_disabled_for_command.
8719 (fputs_maybe_filtered): Check pagination_disabled_for_command.
8720
8721 2018-06-04 Tom Tromey <tom@tromey.com>
8722
8723 * ada-lang.h (ada_lookup_symbol_list): Update.
8724 * ada-lang.c (resolve_subexp): Update.
8725 (symbols_are_identical_enums): Change type of syms. Remove nsyms
8726 parameter.
8727 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8728 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8729 results parameter to std::vector.
8730 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8731 Update.
8732 * ada-exp.y (block_lookup): Update.
8733 (select_possible_type_sym): Change type of syms. Remove nsyms
8734 parameter.
8735 (write_var_or_type, write_name_assoc): Update.
8736
8737 2018-06-04 Joel Brobecker <brobecker@adacore.com>
8738
8739 * windows-nat.c (windows_nat_target::xfer_partial): Return
8740 TARGET_XFER_E_IO if we need to delegate to the target beneath
8741 but BENEATH is NULL.
8742
8743 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
8744
8745 * Makefile.in (config.status): Add configure.nat as a
8746 dependency.
8747
8748 2018-06-04 Tom Tromey <tom@tromey.com>
8749
8750 * cp-name-parser.y (cpname_state): Add method declarations.
8751 (HANDLE_QUAL): Update.
8752 (cpname_state::d_grab, cpname_state::fill_comp)
8753 (cpname_state::make_operator, cpname_state::make_dtor)
8754 (cpname_state::make_builtin_type, cpname_state::make_name)
8755 (cpname_state::d_qualify, cpname_state::d_int_type)
8756 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8757 (%union): Move earlier.
8758
8759 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8760
8761 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8762
8763 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8764
8765 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8766 (aarch64_pseudo_write_1): Likewise.
8767 (aarch64_pseudo_read_value): Use helper.
8768 (aarch64_pseudo_write): Likewise.
8769
8770 2018-06-04 Pedro Alves <palves@redhat.com>
8771
8772 * darwin-nat.c (darwin_ops): Delete.
8773 (darwin_attach_pid): Use get_native_target.
8774
8775 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8776
8777 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8778 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8779
8780 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8781
8782 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8783 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8784 (aarch64_gdbarch_init): Check for SVE.
8785 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8786
8787 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8788
8789 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8790 * aarch64-tdep.h (aarch64_read_description): Likewise.
8791 * arch/aarch64.c (aarch64_create_target_description): Likewise.
8792 * arch/aarch64.h (aarch64_create_target_description): Likewise.
8793 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8794 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8795 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8796
8797 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
8798
8799 * value.c (value_fetch_lazy_bitfield): New.
8800 (value_fetch_lazy_memory): New.
8801 (value_fetch_lazy_register): New.
8802 (value_fetch_lazy): Factor out to smaller functions.
8803
8804 2018-06-01 Tom Tromey <tom@tromey.com>
8805
8806 * cp-name-parser.y (backslashable, represented): Now const.
8807
8808 2018-06-01 Tom Tromey <tom@tromey.com>
8809
8810 * cp-name-parser.y: Include parser-defs.h.
8811 (parser_fprintf): Remove declaration.
8812
8813 2018-06-01 Tom Tromey <tom@tromey.com>
8814
8815 * cp-name-parser.y: Use %pure-parser, %lex-param, and
8816 %parse-param.
8817 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8818 (global_result): Remove globals.
8819 (struct cpname_state): New.
8820 (yyparse): Don't declare.
8821 (yylex, yyerror): Move declarations after %union.
8822 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8823 (make_name): Add state parameter.
8824 Update all callers.
8825 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8826 parameter.
8827 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8828 Update.
8829 (yylex): Add lvalp, state parameters.
8830 (yyerror): Add state parameter.
8831 (cp_demangled_name_to_comp): Update.
8832
8833 2018-06-01 Tom Tromey <tom@tromey.com>
8834
8835 * cp-name-parser.y (parser_fprintf): Declare.
8836 (GDB_YY_REMAP_PREFIX): Define.
8837 Include yy-remap.h. Don't redefine yy* identifiers.
8838
8839 2018-06-01 Tom Tromey <tom@tromey.com>
8840
8841 * python/py-type.c (typy_legacy_template_argument): Update.
8842 * cp-support.h (cp_demangled_name_to_comp): Update.
8843 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8844 parameter to be a "std::string *".
8845 (main): Update.
8846
8847 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
8848
8849 * ada-lex.l: Include "diagnostics.h" instead of
8850 "common/diagnostics.h".
8851 * unittests/environ-selftests.c: Likewise.
8852 * common/diagnostics.h: Moved to ../include.
8853
8854 2018-06-01 Joel Brobecker <brobecker@adacore.com>
8855
8856 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8857 to language_mode_manual while calling breakpoint_re_set_one.
8858
8859 2018-06-01 Tom Tromey <tom@tromey.com>
8860
8861 * valops.c (value_cast_structs, destructor_name_p): Update.
8862 * symtab.c (gdb_mangle_name): Update.
8863 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8864 Update.
8865 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8866 (pascal_object_print_value_fields, pascal_object_print_value):
8867 Update.
8868 * p-typeprint.c (pascal_type_print_derivation_info): Update.
8869 * linespec.c (find_methods): Update.
8870 * gdbtypes.h (type_name_no_tag): Remove.
8871 (type_name_or_error): Rename from type_name_no_tag_or_error.
8872 * gdbtypes.c (type_name_no_tag): Remove.
8873 (type_name_or_error): Rename from type_name_no_tag_or_error.
8874 (lookup_struct_elt_type, check_typedef): Update.
8875 * expprint.c (print_subexp_standard): Update.
8876 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8877 * d-namespace.c (d_lookup_nested_symbol): Update.
8878 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8879 (cp_print_class_member): Update.
8880 * cp-namespace.c (cp_lookup_nested_symbol): Update.
8881 * completer.c (add_struct_fields): Update.
8882 * c-typeprint.c (cp_type_print_derivation_info)
8883 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8884 Update.
8885 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8886 (ada_prefer_type, ada_is_exception_sym): Update.
8887
8888 2018-06-01 Tom Tromey <tom@tromey.com>
8889
8890 * valops.c (enum_constant_from_type, value_namespace_elt)
8891 (value_maybe_namespace_elt): Update.
8892 * valarith.c (find_size_for_pointer_math): Update.
8893 * target-descriptions.c (make_gdb_type): Update.
8894 * symmisc.c (print_symbol): Update.
8895 * stabsread.c (define_symbol, read_type)
8896 (complain_about_struct_wipeout, add_undefined_type)
8897 (cleanup_undefined_types_1): Update.
8898 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8899 (rust_range_type_p, val_print_struct, rust_print_struct_def)
8900 (rust_internal_print_type, rust_composite_type)
8901 (rust_evaluate_funcall, rust_evaluate_subexp)
8902 (rust_inclusive_range_type_p): Update.
8903 * python/py-type.c (typy_get_tag): Update.
8904 * p-typeprint.c (pascal_type_print_base): Update.
8905 * mdebugread.c (parse_symbol, parse_type): Update.
8906 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8907 Update.
8908 * guile/scm-type.c (gdbscm_type_tag): Update.
8909 * go-lang.c (sixg_string_p): Update.
8910 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8911 Update.
8912 * gdbtypes.h (struct main_type) <tag_name>: Remove.
8913 (TYPE_TAG_NAME): Remove.
8914 * gdbtypes.c (type_name_no_tag): Simplify.
8915 (check_typedef, check_types_equal, recursive_dump_type)
8916 (copy_type_recursive, arch_composite_type): Update.
8917 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
8918 in summary mode when needed.
8919 * eval.c (evaluate_funcall): Update.
8920 * dwarf2read.c (fixup_go_packaging, read_structure_type)
8921 (process_structure_scope, read_enumeration_type)
8922 (read_namespace_type, read_module_type, determine_prefix): Update.
8923 * cp-support.c (inspect_type): Update.
8924 * coffread.c (process_coff_symbol, decode_base_type): Update.
8925 * c-varobj.c (c_is_path_expr_parent): Update.
8926 * c-typeprint.c (c_type_print_base_struct_union): Update.
8927 (c_type_print_base_1): Update. Print struct/class/union/enum in
8928 summary when using C language.
8929 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8930 (gen_maybe_namespace_elt): Update.
8931 * ada-lang.c (ada_type_name): Simplify.
8932 (empty_record, ada_template_to_fixed_record_type_1)
8933 (template_to_static_fixed_type)
8934 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8935
8936 2018-06-01 Tom Tromey <tom@tromey.com>
8937
8938 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8939 c_print_type.
8940 * c-typeprint.c (c_print_type_1): Add "language" parameter.
8941 (c_print_type): Update.
8942 (c_print_type): New overload.
8943 (c_type_print_varspec_prefix, c_type_print_args)
8944 (c_type_print_varspec_suffix, c_print_type_no_offsets)
8945 (c_type_print_base_struct_union, c_type_print_base_1)
8946 (cp_type_print_method_args): Add "language" parameter.
8947 (c_type_print_base): Update.
8948 * c-lang.h (c_print_type): Add new overload.
8949
8950 2018-06-01 Tom Tromey <tom@tromey.com>
8951
8952 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8953 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8954
8955 2018-06-01 Alan Hayward <alan.hayward@arm.com>
8956
8957 * aarch64-tdep.c (aarch64_sve_register_names): New const
8958 var.
8959 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8960 (AARCH64_SVE_Z_REGS_NUM): New define.
8961 (AARCH64_SVE_P_REGS_NUM): Likewise.
8962 (AARCH64_SVE_NUM_REGS): Likewise.
8963
8964 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
8965
8966 * nat/linux-ptrace.h [__alpha__]
8967 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8968 definitions.
8969
8970 2018-05-31 Maciej W. Rozycki <macro@mips.com>
8971
8972 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8973 the endianness selected.
8974 * NEWS: Document `set endian auto' mode operation update.
8975
8976 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8977
8978 * Makefile.in: Add new header.
8979 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8980 (sve_vl_from_vg): Likewise.
8981 (sve_vq_from_vl): Likewise.
8982 (sve_vl_from_vq): Likewise.
8983 (sve_vq_from_vg): Likewise.
8984 (sve_vg_from_vq): Likewise.
8985 * configure.nat: Add new c file.
8986 * nat/aarch64-sve-linux-ptrace.c: New file.
8987 * nat/aarch64-sve-linux-ptrace.h: New file.
8988
8989 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8990
8991 * aarch64-linux-nat.c (aarch64_linux_read_description):
8992 Add parmeter zero.
8993 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8994 Likewise.
8995 * aarch64-tdep.c (tdesc_aarch64_list): Add.
8996 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8997 (aarch64_gdbarch_init): Add parmeter zero.
8998 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8999 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
9000 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
9001 parmeter.
9002 * doc/gdb.texinfo: Describe SVE feature
9003 * features/aarch64-sve.c: New file.
9004
9005 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
9006
9007 PR gdb/23210
9008 * gdbarch.sh (significant_addr_bit): Default to zero when
9009 not set by target architecture.
9010 * gdbarch.c: Re-generated.
9011 * utils.c (address_significant): Update.
9012
9013 2018-05-30 Joel Brobecker <brobecker@adacore.com>
9014
9015 * stack.c (func_command): Remove trailing newline in call to error.
9016
9017 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9018
9019 * regcache.h (regcache_raw_collect): Remove, update callers to
9020 use regcache::raw_collect.
9021 * regcache.c (regcache_raw_collect): Remove.
9022
9023 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9024
9025 * regcache.h (regcache_raw_supply): Remove, update callers to
9026 use detached_regcache::raw_supply.
9027 * regcache.c (regcache_raw_supply): Remove.
9028
9029 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9030
9031 * regcache.h (regcache_cooked_write_part): Remove, update
9032 callers to use regcache::cooked_write_part.
9033 * regcache.c (regcache_cooked_write_part): Remove.
9034
9035 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9036
9037 * regcache.h (regcache_cooked_read_part): Remove, update callers
9038 to use readable_regcache::cooked_read_part.
9039 * regcache.c (regcache_cooked_read_part): Remove.
9040
9041 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9042
9043 * regcache.h (regcache_cooked_read_value): Remove, update
9044 callers to use readable_regcache::cooked_read_value.
9045 * regcache.c (regcache_cooked_read_value): Remove.
9046
9047 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9048
9049 * regcache.h (regcache_cooked_write): Remove, update callers to
9050 use regcache::cooked_write.
9051 * regcache.c (regcache_cooked_write): Remove.
9052
9053 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9054
9055 * regcache.h (regcache_invalidate): Remove, update callers to
9056 use detached_regcache::invalidate instead.
9057 * regcache.c (regcache_invalidate): Remove.
9058
9059 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9060
9061 * regcache.h (regcache_raw_write_part): Remove, update callers
9062 to use regcache::raw_write_part instead.
9063 * regcache.c (regcache_raw_write_part): Remove.
9064
9065 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9066
9067 * regcache.h (regcache_raw_read_part): Remove, update callers to
9068 use readable_regcache::raw_read_part instead.
9069 * regcache.c (regcache_raw_read_part): Remove.
9070
9071 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9072
9073 * regcache.h (regcache_cooked_read): Remove, update callers to
9074 use readable_regcache::cooked_read instead.
9075 * regcache.c (regcache_cooked_read): Remove.
9076
9077 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9078
9079 * regcache.h (regcache_raw_write): Remove, update callers to use
9080 regcache::raw_write instead.
9081 * regcache.c (regcache_raw_write): Remove.
9082
9083 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9084
9085 * regcache.h (regcache_raw_read): Remove, update callers to use
9086 readable_regcache::raw_read instead.
9087 * regcache.c (regcache_raw_read): Remove.
9088
9089 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9090
9091 * regcache.h (regcache_raw_update): Remove, update callers to
9092 use readable_regcache::raw_update instead.
9093 * regcache.c (regcache_raw_update): Remove.
9094
9095 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9096
9097 * regcache.h (regcache_register_status): Remove, update callers
9098 to use reg_buffer::get_register_status directly instead.
9099 * regcache.c (regcache_register_status): Remove.
9100
9101 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9102
9103 * regcache.h (regcache_get_ptid): Remove, update all callers to
9104 call regcache::ptid instead.
9105 * regcache.c (regcache_get_ptid): Remove.
9106
9107 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
9108
9109 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9110
9111 2018-05-30 Pedro Alves <palves@redhat.com>
9112
9113 * common/common-exceptions.h (exception_rethrow): Use
9114 ATTRIBUTE_NORETURN.
9115
9116 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
9117
9118 * breakpoint.c (print_solib_event, check_status_catch_solib):
9119 Remove struct keyword in range-based for loops.
9120 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9121 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9122 Likewise.
9123 * linespec.c (find_superclass_methods, search_minsyms_for_name):
9124 Likewise.
9125 * symfile.c (addr_info_make_relative): Likewise.
9126 * thread.c (value_in_thread_stack_temporaries): Likewise.
9127
9128 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
9129
9130 PR gdb/16841
9131 * valops.c (value_struct_elt_for_reference): Call check_typedef on
9132 aggregate type to get its real type before accessing it.
9133
9134 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
9135
9136 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9137 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9138 * coff-pe-read.c (add_pe_forwarded_sym): Replace
9139 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9140 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9141 * jit.c (jit_breakpoint_re_set_internal): Likewise.
9142 * printcmd.c (info_address_command): Likewise.
9143
9144 2018-05-29 Tom Tromey <tom@tromey.com>
9145
9146 * windows-nat.c (handle_exception): Update fall-through comment.
9147
9148 2018-05-29 Tom Tromey <tom@tromey.com>
9149
9150 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
9151 (struct program_space) <added_solibs>: Now a std::vector.
9152 * breakpoint.c (print_solib_event): Update.
9153 (check_status_catch_solib): Update.
9154 * progspace.c (clear_program_space_solib_cache): Update.
9155 * solib.c (update_solib_list): Update.
9156
9157 2018-05-29 Tom Tromey <tom@tromey.com>
9158
9159 * python/py-type.c (typy_richcompare): Update.
9160 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9161 * gdbtypes.h (types_deeply_equal): Return bool.
9162 (types_equal): Likewise.
9163 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
9164 declare VEC.
9165 (check_types_equal): Change worklist to std::vector. Return
9166 bool.
9167 (struct type_equality_entry): Add constructor.
9168 (compare_maybe_null_strings): Return bool.
9169 (check_types_worklist): Return bool. Change worklist to
9170 std::vector.
9171 (types_deeply_equal): Use std::vector.
9172 (types_equal): Return bool.
9173 (compare_maybe_null_strings): Simplify.
9174
9175 2018-05-29 Tom Tromey <tom@tromey.com>
9176
9177 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
9178
9179 2018-05-29 Tom Tromey <tom@tromey.com>
9180
9181 * objc-lang.h: Don't include cp-support.h.
9182 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
9183 declare VEC.
9184
9185 2018-05-27 Tom Tromey <tom@tromey.com>
9186
9187 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9188
9189 2018-05-25 Tom Tromey <tom@tromey.com>
9190
9191 * value.c (value::location): Initialize.
9192
9193 2018-05-25 Tom Tromey <tom@tromey.com>
9194
9195 * dbxread.c (init_bincl_list): Remove.
9196 (bincl_list): Now a std::vector.
9197 (bincls_allocated, next_bincl): Remove.
9198 (free_bincl_list, do_free_bincl_list_cleanup)
9199 (make_cleanup_free_bincl_list): Remove.
9200 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9201 unique_xmalloc_ptr.
9202 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9203 (struct header_file_location): Add constructor.
9204 (add_bincl_to_list): Remove.
9205
9206 2018-05-25 Tom Tromey <tom@tromey.com>
9207
9208 * tui/tui.c (tui_enable): Update.
9209 * mi/mi-interp.c (mi_interp::init): Update.
9210 * interps.h (class interp) <name>: New method.
9211 <m_name>: Rename from name.
9212 (~scoped_restore_interp): Update.
9213 * interps.c (interp::interp): Update.
9214 (interp_add, interp_set, interp_lookup_existing)
9215 (current_interp_named_p): Update.
9216
9217 2018-05-25 Tom Tromey <tom@tromey.com>
9218
9219 * interps.c (interp_name): Remove.
9220 * mi/mi-interp.c (mi_interp::init): Update.
9221 * interps.h (interp_name): Remove.
9222 (~scoped_restore_interp): Update.
9223 * tui/tui.c (tui_enable): Update.
9224
9225 2018-05-25 Tom Tromey <tom@tromey.com>
9226
9227 * utils.c (fputs_maybe_filtered): Update.
9228 * linespec.c (decode_line_full): Update.
9229 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9230 (mi_print_breakpoint_for_event, mi_solib_loaded)
9231 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9232 (mi_user_selected_context_changed): Update.
9233 * mi/mi-main.c (mi_execute_command): Update.
9234 * cli/cli-script.c (execute_control_command): Update.
9235 * python/python.c (execute_gdb_command): Update.
9236 * solib.c (info_sharedlibrary_command): Update.
9237 * interps.c (interp_ui_out): Remove.
9238 * interps.h (interp_ui_out): Remove.
9239
9240 2018-05-25 Tom Tromey <tom@tromey.com>
9241
9242 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9243 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9244 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9245
9246 2018-05-25 Tom Tromey <tom@tromey.com>
9247
9248 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9249 * interps.c (interp_exec): Use scoped_restore.
9250
9251 2018-05-25 Tom Tromey <tom@tromey.com>
9252
9253 * remote.c (remote_target::remote_file_get): Use
9254 gdb::byte_vector.
9255 (remote_target::remote_file_put): Likewise.
9256
9257 2018-05-25 Tom Tromey <tom@tromey.com>
9258
9259 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9260 a std::string.
9261 (get_pe_section_index, add_pe_exported_sym): Update.
9262 (read_pe_exported_syms): Use gdb::def_vector.
9263
9264 2018-05-25 Tom Tromey <tom@tromey.com>
9265
9266 * frame.c (remove_prev_frame): Remove.
9267 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9268
9269 2018-05-25 Maciej W. Rozycki <macro@mips.com>
9270
9271 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9272 Remove prototypes.
9273 * mips-linux-nat.c (supply_fpregset): Always call
9274 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9275 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9276 `mips_fill_fpregset'.
9277 * mips-linux-tdep.c (mips_supply_fpregset)
9278 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9279 (mips_fill_fpregset_wrapper): Remove functions.
9280 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9281 (mips_linux_fpregset): Remove variable.
9282 (mips_linux_iterate_over_regset_sections): Use
9283 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9284 (mips_linux_o32_sigframe_init): Remove comment.
9285
9286 2018-05-25 Pedro Alves <palves@redhat.com>
9287
9288 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9289 (struct readahead_cache, struct packet_reg, struct
9290 remote_arch_state, class remote_state): Move higher up in the
9291 file.
9292 (remote_target::m_remote_state): Now an object instead of a pointer.
9293 (remote_target::get_remote_state): Adjust.
9294
9295 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9296
9297 * stack.c (select_and_print_frame): Delete.
9298 (struct function_bounds): Move struct within function.
9299 (func_command): Most content moved into new function
9300 find_frame_for_function, use new function, print result, add
9301 function comment.
9302 (find_frame_for_function): New function, now returns a result.
9303
9304 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9305
9306 * stack.c (iterate_over_block_arg_vars): Fix comment.
9307 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9308
9309 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
9310
9311 PR gdb/23203
9312 * frame.c
9313 (scoped_restore_selected_frame::scoped_restore_selected_frame):
9314 Define.
9315 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9316 Define.
9317 * frame.h (class scoped_restore_selected_frame): New class.
9318 * stack.c (print_frame_local_vars): Remove catching and rethrowing
9319 of any exception, use scoped_restore_selected_frame to restore the
9320 frame instead.
9321
9322 2018-05-24 Pedro Alves <palves@redhat.com>
9323
9324 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9325 override.
9326
9327 2018-05-23 Tom Tromey <tom@tromey.com>
9328
9329 * complaints.c (struct complaints): Remove.
9330 (symfile_complaint_book): Remove.
9331 (series): New global.
9332 (complaint_internal): Update.
9333 (clear_complaints): Update.
9334
9335 2018-05-23 Tom Tromey <tom@tromey.com>
9336
9337 * complaints.c (counters): New global.
9338 (struct complain): Remove.
9339 (struct complaints) <root>: Remove.
9340 (complaint_sentinel): Remove.
9341 (symfile_complaint_book): Update.
9342 (find_complaint) Remove.
9343 (complaint_internal, clear_complaints): Update.
9344
9345 2018-05-23 Tom Tromey <tom@tromey.com>
9346
9347 * complaints.c (struct complain) <file, line>: Remove.
9348 (find_complaint): Remove file, line parameters.
9349 (complaint_internal): Update.
9350
9351 2018-05-23 Tom Tromey <tom@tromey.com>
9352
9353 * complaints.c (vcomplaint): Remove.
9354 (complaint_internal) Merge in contents of vcomplaint.
9355
9356 2018-05-23 Tom Tromey <tom@tromey.com>
9357
9358 * complaints.c (struct complaints) <explanation>: Remove.
9359 (symfile_explanations): Remove.
9360 (symfile_complaint_book): Update.
9361 (vcomplaint): Update.
9362 (struct explanation): Remove.
9363
9364 2018-05-23 Tom Tromey <tom@tromey.com>
9365
9366 * complaints.c (symfile_complaints): Remove.
9367 (complaint_internal): Remove "complaints" parameter.
9368 (clear_complaints, vcomplaint): Remove "c" parameter.
9369 (get_complaints): Remove.
9370 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9371 (dwarf2_debug_line_missing_file_complaint)
9372 (dwarf2_debug_line_missing_end_sequence_complaint)
9373 (dwarf2_complex_location_expr_complaint)
9374 (dwarf2_const_value_length_mismatch_complaint)
9375 (dwarf2_section_buffer_overflow_complaint)
9376 (dwarf2_macro_malformed_definition_complaint)
9377 (dwarf2_invalid_attrib_class_complaint)
9378 (create_addrmap_from_index, dw2_symtab_iter_next)
9379 (dw2_expand_marked_cus)
9380 (dw2_debug_names_iterator::find_vec_in_debug_names)
9381 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9382 (create_debug_type_hash_table, init_cutu_and_read_dies)
9383 (partial_die_parent_scope, add_partial_enumeration)
9384 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9385 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9386 (read_import_statement, read_file_scope, create_dwo_cu_reader)
9387 (create_cus_hash_table, create_dwp_hash_table)
9388 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9389 (dwarf2_rnglists_process, dwarf2_ranges_process)
9390 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9391 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9392 (handle_struct_member_die, process_structure_scope)
9393 (read_array_type, read_common_block, read_module_type)
9394 (read_tag_pointer_type, read_typedef, read_base_type)
9395 (read_subrange_type, load_partial_dies, partial_die_info::read)
9396 (partial_die_info::read, partial_die_info::read)
9397 (partial_die_info::read, read_checked_initial_length_and_offset)
9398 (dwarf2_string_attr, read_formatted_entries)
9399 (dwarf_decode_line_header)
9400 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9401 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9402 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9403 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9404 (get_signatured_type, get_DW_AT_signature_type)
9405 (decode_locdesc, file_file_name, consume_improper_spaces)
9406 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9407 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9408 (dwarf2_symbol_mark_computed, set_die_type)
9409 (read_attribute_value): Update.
9410 * stap-probe.c (handle_stap_probe, get_stap_base_address):
9411 Update.
9412 * dbxread.c (unknown_symtype_complaint)
9413 (lbrac_mismatch_complaint, repeated_header_complaint)
9414 (set_namestring, function_outside_compilation_unit_complaint)
9415 (read_dbx_symtab, process_one_symbol): Update.
9416 * gdbtypes.c (stub_noname_complaint): Update.
9417 * windows-nat.c (handle_unload_dll): Update.
9418 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9419 (decode_base_type): Update.
9420 * xcoffread.c (bf_notfound_complaint, ef_complaint)
9421 (eb_complaint, record_include_begin, record_include_end)
9422 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9423 (process_xcoff_symbol, read_symbol)
9424 (function_outside_compilation_unit_complaint)
9425 (scan_xcoff_symtab): Update.
9426 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9427 * buildsym.c (finish_block_internal, make_blockvector)
9428 (end_symtab_get_static_block, augment_type_symtab): Update.
9429 * dtrace-probe.c (dtrace_process_dof)
9430 (dtrace_static_probe_ops::get_probes): Update.
9431 * complaints.h (struct complaint): Don't declare.
9432 (symfile_complaints): Remove.
9433 (complaint_internal): Remove "complaints" parameter.
9434 (complaint): Likewise.
9435 (clear_complaints): Likewise.
9436 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9437 (reread_symbols): Update.
9438 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9439 (dwarf2_frame_cache, decode_frame_entry): Update.
9440 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9441 * objc-lang.c (lookup_objc_class, lookup_child_selector)
9442 (info_selectors_command): Update.
9443 * macrotab.c (macro_include, check_for_redefinition)
9444 (macro_undef): Update.
9445 * objfiles.c (filter_overlapping_sections): Update.
9446 * stabsread.c (invalid_cpp_abbrev_complaint)
9447 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9448 (define_symbol, error_type, read_type, rs6000_builtin_type)
9449 (stabs_method_name_from_physname, read_member_functions)
9450 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9451 (attach_fields_to_type, complain_about_struct_wipeout)
9452 (read_range_type, read_args, common_block_start)
9453 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9454 Update.
9455 * mdebugread.c (index_complaint, unknown_ext_complaint)
9456 (basic_type_complaint, bad_tag_guess_complaint)
9457 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9458 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9459 (parse_procedure, parse_lines)
9460 (function_outside_compilation_unit_complaint)
9461 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9462 (bad_tag_guess_complaint, reg_value_complaint): Update.
9463 * cp-support.c (demangled_name_complaint): Update.
9464 * macroscope.c (sal_macro_scope): Update.
9465 * dwarf-index-write.c (class debug_names): Update.
9466
9467 2018-05-23 Tom Tromey <tom@tromey.com>
9468
9469 * complaints.c (clear_complaints): Remove "noisy" parameter.
9470 * complaints.h (clear_complaints): Update.
9471 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9472 (reread_symbols): Update.
9473
9474 2018-05-23 Tom Tromey <tom@tromey.com>
9475
9476 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9477 SUBSEQUENT_MESSAGE.
9478 (vcomplaint, clear_complaints): Update.
9479 (symfile_explanations): Remove some messages.
9480
9481 2018-05-23 Tom Tromey <tom@tromey.com>
9482
9483 * complaints.c (internal_complaint): Remove.
9484 * complaints.h (internal_complaint): Remove.
9485
9486 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9487
9488 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9489
9490 2018-05-22 Pedro Alves <palves@redhat.com>
9491
9492 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9493 (remote_fileio_badfd, remote_fileio_return_errno)
9494 (remote_fileio_return_success, remote_fileio_func_open)
9495 (remote_fileio_func_open, remote_fileio_func_close)
9496 (remote_fileio_func_read, remote_fileio_func_write)
9497 (remote_fileio_func_lseek, remote_fileio_func_rename)
9498 (remote_fileio_func_unlink, remote_fileio_func_stat)
9499 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9500 (remote_fileio_func_isatty, remote_fileio_func_system): Add
9501 remote_target parameter.
9502 (remote_fio_func_map) <func>: Add remote_target parameter.
9503 (do_remote_fileio_request, remote_fileio_request):
9504 * remote-fileio.h (remote_fileio_request):
9505 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9506 remote_target parameter.
9507 (remote_notif_process, handle_notification): Adjust to pass down
9508 the remote.
9509 (remote_notif_state_allocate): Add remote_target parameter. Save
9510 it.
9511 * remote-notif.h (struct remote_target): Forward declare.
9512 (struct notif_client) <parse, ack, can_get_pending_events>: Add
9513 remote_target parameter.
9514 (struct remote_notif_state) <remote>: New field.
9515 (remote_notif_ack, remote_notif_parse): Add remote_target
9516 parameter.
9517 (remote_notif_state_allocate, remote_notif_state_allocate): Add
9518 remote_target parameter.
9519 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9520 (threads_listing_context, rmt_thread_action, protocol_feature)
9521 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9522 (packet_result, struct threads_listing_context, remote_state):
9523 Move definitions and declarations higher up.
9524 (remote_target) <~remote_target>: Declare.
9525 (remote_download_command_source, remote_file_put, remote_file_get)
9526 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9527 (remote_hostio_pread_vFile, remote_hostio_send_command)
9528 (remote_hostio_set_filesystem, remote_hostio_open)
9529 (remote_hostio_close, remote_hostio_unlink, remote_state)
9530 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9531 (get_memory_write_packet_size, get_memory_read_packet_size)
9532 (append_pending_thread_resumptions, remote_detach_1)
9533 (append_resumption, remote_resume_with_vcont)
9534 (add_current_inferior_and_thread, wait_ns, wait_as)
9535 (process_stop_reply, remote_notice_new_inferior)
9536 (process_initial_stop_replies, remote_add_thread)
9537 (btrace_sync_conf, remote_btrace_maybe_reopen)
9538 (remove_new_fork_children, kill_new_fork_children)
9539 (discard_pending_stop_replies, stop_reply_queue_length)
9540 (check_pending_events_prevent_wildcard_vcont)
9541 (discard_pending_stop_replies_in_queue, stop_reply)
9542 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9543 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9544 (remote_interrupt_as, remote_interrupt_ns)
9545 (remote_get_noisy_reply, remote_query_attached)
9546 (remote_add_inferior, remote_current_thread, get_current_thread)
9547 (set_thread, set_general_thread, set_continue_thread)
9548 (set_general_process, write_ptid)
9549 (remote_unpack_thread_info_response, remote_get_threadinfo)
9550 (parse_threadlist_response, remote_get_threadlist)
9551 (remote_threadlist_iterator, remote_get_threads_with_ql)
9552 (remote_get_threads_with_qxfer)
9553 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9554 (get_offsets, remote_check_symbols, remote_supported_packet)
9555 (remote_query_supported, remote_packet_size)
9556 (remote_serial_quit_handler, remote_detach_pid)
9557 (remote_vcont_probe, remote_resume_with_hc)
9558 (send_interrupt_sequence, interrupt_query)
9559 (remote_notif_get_pending_events, fetch_register_using_p)
9560 (send_g_packet, process_g_packet, fetch_registers_using_g)
9561 (store_register_using_P, store_registers_using_G)
9562 (set_remote_traceframe, check_binary_download)
9563 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9564 (remote_xfer_live_readonly_partial, remote_read_bytes)
9565 (remote_send_printf, remote_flash_write, readchar)
9566 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9567 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9568 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9569 (extended_remote_disable_randomization, extended_remote_run)
9570 (send_environment_packet, extended_remote_environment_support)
9571 (extended_remote_set_inferior_cwd, remote_write_qxfer)
9572 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9573 (packet_command): Now methods of ...
9574 (remote_target): ... this class.
9575 (m_remote_state) <remote_target>: New field.
9576 (struct remote_state) <stop_reply_queue,
9577 remote_async_inferior_event_token, wait_forever_enabled_p>: New
9578 fields.
9579 (remote_state::remote_state): Allocate stop_reply_queue.
9580 (remote_state): Delete global.
9581 (get_remote_state_raw): Delete.
9582 (remote_target::get_remote_state): Allocate m_remote_state on
9583 demand.
9584 (get_current_remote_target): New.
9585 (remote_ops, extended_remote_ops): Delete.
9586 (wait_forever_enabled_p, remote_async_inferior_event_token):
9587 Delete, moved to struct remote_state.
9588 (remote_target::close): Delete self. Destruction bits split to
9589 ...
9590 (remote_target::~remote_target): ... this.
9591 (show_memory_packet_size): Adjust to use
9592 get_current_remote_target.
9593 (struct protocol_feature) <func>: Add remote_target parameter.
9594 All callers adjusted.
9595 (curr_quit_handler_target): New.
9596 (remote_serial_quit_handler): Reimplement.
9597 (remote_target::open_1): Adjust to use get_current_remote_target.
9598 Heap-allocate remote_target/extended_remote_target instances.
9599 (vcont_builder::vcont_builder): Add remote_target parameter, and
9600 save it in m_remote. All callers adjusted.
9601 (vcont_builder::m_remote): New field.
9602 (vcont_builder::restart, vcont_builder::flush)
9603 (vcont_builder::push_action): Use it.
9604 (remote_target::commit_resume): Use it.
9605 (struct queue_iter_param) <remote>: New field.
9606 (remote_target::remove_new_fork_children): Fill in 'remote' field.
9607 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9608 (check_pending_event_prevents_wildcard_vcont_callback)
9609 (remote_target::check_pending_events_prevent_wildcard_vcont)
9610 (remote_target::discard_pending_stop_replies)
9611 (remote_target::discard_pending_stop_replies_in_queue)
9612 (remote_target::remote_notif_remove_queued_reply): Fill in
9613 'remote' field.
9614 (remote_notif_get_pending_events): New.
9615 (remote_target::readchar, remote_target::remote_serial_write):
9616 Save/restore curr_quit_handler_target.
9617 (putpkt): New.
9618 (kill_new_fork_children): Fill in 'remote' field.
9619 (packet_command): Use get_current_remote_target, defer to
9620 remote_target method of same name.
9621 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9622 parameter, and save it in m_remote. All callers adjusted.
9623 (scoped_remote_fd::release): Use m_remote.
9624 (scoped_remote_fd::m_remote): New field.
9625 (remote_file_put, remote_file_get, remote_file_delete): Use
9626 get_current_remote_target, defer to remote_target method of same
9627 name.
9628 (remote_btrace_reset): Add remote_state paremeter. Update all
9629 callers.
9630 (remote_async_inferior_event_handler). Pass down 'data'.
9631 (remote_new_objfile): Use get_current_remote_target.
9632 (remote_target::vcont_r_supported): New.
9633 (set_range_stepping): Use get_current_remote_target and
9634 remote_target::vcont_r_supported.
9635 (_initialize_remote): Don't allocate 'remote_state' and
9636 'stop_reply_queue' globals.
9637 * remote.h (struct remote_target): Forward declare.
9638 (getpkt, putpkt, remote_notif_get_pending_events): Add
9639 'remote_target' parameter.
9640
9641 2018-05-22 Pedro Alves <palves@redhat.com>
9642
9643 * remote.c (vcont_builder): Now a class. Make all data members
9644 private.
9645 (vcont_builder) <vcont_builder, restart, flush, push_action>:
9646 Declare methods.
9647 (vcont_builder_restart): Rename to ...
9648 (vcont_builder::restart): ... this.
9649 (vcont_builder_flush): Rename to ...
9650 (vcont_builder::flush): ... this.
9651 (vcont_builder_push_action): Rename to ...
9652 (vcont_builder::push_action): ... this.
9653 (remote_target::commit_resume): Adjust.
9654
9655 2018-05-22 Pedro Alves <palves@redhat.com>
9656
9657 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9658 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9659 (get_fixed_memory_packet_size): New.
9660 (get_memory_packet_size): Use it.
9661 (set_memory_packet_size): Don't override the config size with
9662 DEFAULT_MAX_MEMORY_PACKET_SIZE.
9663 (show_memory_packet_size): Use get_fixed_memory_packet_size.
9664 Don't refer to get_memory_packet_size if not connected to a remote
9665 target. Show "(default)" if configured size is 0.
9666
9667 2018-05-22 Pedro Alves <palves@redhat.com>
9668
9669 * remote.c (remote_target::mourn_inferior): Move
9670 discard_pending_stop_replies call here from ...
9671 (_initialize_remote): ... here.
9672
9673 2018-05-22 Pedro Alves <palves@redhat.com>
9674
9675 * remote.c (compare_section_command): Remove set_general_process
9676 call.
9677
9678 2018-05-22 Pedro Alves <palves@redhat.com>
9679
9680 * remote.c (struct packet_reg, struct remote_arch_state):
9681 Move higher up in the file.
9682 (remote_state) <m_arch_states>: Store remote_arch_state values
9683 instead of remote_arch_state pointers.
9684 (remote_state::get_remote_arch_state): Adjust.
9685
9686 2018-05-22 Pedro Alves <palves@redhat.com>
9687
9688 * remote.c: Include <unordered_map>.
9689 (remote_state): Now a class.
9690 (remote_state) <get_remote_arch_state>: Declare method.
9691 <get_remote_arch_state>: New field.
9692 (remote_arch_state) <remote_arch_state>: Declare ctor.
9693 <regs>: Now a unique_ptr.
9694 (remote_gdbarch_data_handle): Delete.
9695 (get_remote_arch_state): Delete.
9696 (remote_state::get_remote_arch_state): New.
9697 (get_remote_state): Adjust to call remote_state's
9698 get_remote_arch_state method.
9699 (init_remote_state): Delete, bits factored out to ...
9700 (remote_arch_state::remote_arch_state): ... this new method.
9701 (get_remote_packet_size, get_memory_packet_size)
9702 (process_g_packet, remote_target::fetch_registers)
9703 (remote_target::prepare_to_store, store_registers_using_G)
9704 (remote_target::store_registers, remote_target::get_trace_status):
9705 Adjust to call remote_state's method.
9706 (_initialize_remote): Remove reference to
9707 remote_gdbarch_data_handle.
9708
9709 2018-05-22 Pedro Alves <palves@redhat.com>
9710
9711 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9712 pread>: New method declarations.
9713 (remote_target::open_1): Adjust.
9714 (readahead_cache_invalidate): Rename to ...
9715 (readahead_cache::invalidate): ... this, and adjust to be a class
9716 method.
9717 (readahead_cache_invalidate_fd): Rename to ...
9718 (readahead_cache::invalidate_fd): ... this, and adjust to be a
9719 class method.
9720 (remote_hostio_pwrite): Adjust.
9721 (remote_hostio_pread_from_cache): Rename to ...
9722 (readahead_cache::pread): ... this, and adjust to be a class
9723 method.
9724 (remote_hostio_close): Adjust.
9725
9726 2018-05-22 Pedro Alves <palves@redhat.com>
9727
9728 * remote.c (remote_hostio_close_cleanup): Delete.
9729 (class scoped_remote_fd): New.
9730 (remote_file_put, remote_file_get): Use it.
9731
9732 2018-05-22 Pedro Alves <palves@redhat.com>
9733
9734 (struct vCont_action_support): Use bool and initialize all fields.
9735 (struct readahead_cache): Initialize all fields.
9736 (remote_state): Use bool and initialize all fields.
9737 (remote_state::remote_state, remote_state::~remote_state): New.
9738 (new_remote_state): Delete.
9739 (_initialize_remote): Use new to allocate remote_state.
9740
9741 2018-05-22 Pedro Alves <palves@redhat.com>
9742 張俊芝 <zjz@zjz.name>
9743
9744 PR gdb/22973
9745 * c-exp.y: Include "c-support.h".
9746 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9747 of tolower. Use c_ident_is_alpha to scan names.
9748 * c-lang.c: Include "c-support.h".
9749 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9750 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9751 * c-support.h: New file, with bits factored out from ...
9752 * cp-name-parser.y: ... this file.
9753 Include "c-support.h".
9754 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9755 c-support.h and renamed.
9756 (symbol_end, yylex): Adjust.
9757
9758 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9759
9760 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9761 parameter type to CORE_ADDR.
9762 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9763 parameter type in declaration to CORE_ADDR.
9764 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9765 target_auxv_search to get AT_HWCAP and use the result to get the
9766 target description.
9767 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9768 to CORE_ADDR. Remove the cast of the return value to unsigned
9769 long. Fix error predicate of target_auxv_search.
9770 (ppc_linux_nat_target::read_description): Change the type of the
9771 hwcap variable to CORE_ADDR.
9772
9773 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9774
9775 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9776 if the size of fpscr is larger than 32 bits.
9777
9778 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9779
9780 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9781 (ppc32_linux_vsxregmap): New global.
9782 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9783 regcache_supply_regset, and regcache_collect_regset.
9784 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9785 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9786 (fetch_vsx_register, store_vsx_register): Remove.
9787 (fetch_vsx_registers): Add regno parameter. Get regset using
9788 ppc_linux_vsxregset. Use regset to supply registers.
9789 (store_vsx_registers): Add regno parameter. Get regset using
9790 ppc_linux_vsxregset. Use regset to collect registers.
9791 (fetch_register): Call fetch_vsx_registers instead of
9792 fetch_vsx_register.
9793 (store_register): Call store_vsx_registers instead of
9794 store_vsx_register.
9795 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9796 new regno parameter.
9797 (store_ppc_registers): Call store_vsx_registers with -1 for the
9798 new regno parameter.
9799 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9800 (ppc_collect_vsxregset): Remove.
9801
9802 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9803
9804 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9805 offset fields.
9806 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9807 for vector register offset fields.
9808 (ppc64_fbsd_reg_offsets): Likewise.
9809 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9810 to vector register offset fields.
9811 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9812 to vector register offset fields.
9813 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9814 vector register offset fields.
9815 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9816 initializers for vector register offset fields.
9817 (rs6000_aix64_reg_offsets): Likewise.
9818 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9819 (ppc_supply_vrregset): Remove.
9820 (ppc_collect_vrregset): Remove.
9821 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9822 (ppc_linux_vrregset) : New function.
9823 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9824 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9825 (ppc32_linux_vrregset): Remove.
9826 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9827 and use result instead of ppc32_linux_vrregset.
9828 (ppc32_linux_reg_offsets): Remove initializers for vector register
9829 offset fields.
9830 (ppc64_linux_reg_offsets): Likewise.
9831 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9832 * ppc-linux-nat.c: Include regset.h.
9833 (gdb_vrregset_t): Adjust comment to account for little-endian
9834 mode.
9835 (supply_vrregset, fill_vrregset): Remove.
9836 (fetch_altivec_register, store_altivec_register): Remove.
9837 (fetch_altivec_registers): Add regno parameter. Get regset using
9838 ppc_linux_vrregset. Use regset to supply registers.
9839 (store_altivec_registers): Add regno parameter. Get regset using
9840 ppc_linux_vrregset. Use regset to collect registers.
9841 (fetch_register): Call fetch_altivec_registers instead of
9842 fetch_altivec_register.
9843 (store_register): Call store_altivec_registers instead of
9844 store_altivec_register.
9845 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9846 the new regno parameter.
9847 (store_ppc_registers): Call store_altivec_registers with -1 for
9848 the new regno parameter.
9849
9850 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9851
9852 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9853 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9854 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9855 (gdb_vrregset_t): Change array type size to
9856 PPC_LINUX_SIZEOF_VRREGSET.
9857 (gdb_vsxregset_t): Change array type size to
9858 PPC_LINUX_SIZEOF_VSXREGSET.
9859 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9860 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9861 PPC_LINUX_SIZEOF_VSXREGSET.
9862
9863 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9864
9865 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9866 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9867 nat/ppc-linux.c.
9868 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9869 ppc_linux_target_wordsize with tid.
9870 (ppc_linux_nat_target::read_description): Call ppc_linux_target
9871 wordsize with tid.
9872 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9873 (ppc64_64bit_inferior_p): Add static and inline specifiers.
9874 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9875 tid parameter. Remove static specifier.
9876 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9877 (ppc_linux_target_wordsize): New declaration.
9878
9879 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9880
9881 * arch/ppc-linux-common.c: New file.
9882 * arch/ppc-linux-common.h: New file.
9883 * arch/ppc-linux-tdesc.h: New file.
9884 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9885 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9886 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9887 arch/ppc-linux-tdesc.h.
9888 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9889 arch/ppc-linux-tdesc.h.
9890 (ppc_linux_nat_target::read_description): Remove target
9891 description matching code. Fill a ppc_linux_features struct and
9892 call ppc_linux_match_description with it. Move comment about ISA
9893 2.05 to ppc-linux-common.c.
9894 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9895 arch/ppc-linux-tdesc.h.
9896 (ppc_linux_core_read_description): Remove target description
9897 matching code. Fill a ppc_linux_features struct and call
9898 ppc_linux_match_description with it.
9899 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9900 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9901 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9902 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9903 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9904 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9905 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9906 (tdesc_powerpc_e500l): Remove.
9907
9908 2018-05-22 Joel Brobecker <brobecker@adacore.com>
9909
9910 * ada-lang.c (catch_assert_command): Pass empty string instead
9911 of NULL for excep_string argument.
9912
9913 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9914
9915 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9916 the width of the requested register exceeds the width of the
9917 `ptrace' data type.
9918
9919 2018-05-21 Tom Tromey <tom@tromey.com>
9920
9921 * printcmd.c (output_command): Remove.
9922 (output_command_const): Rename to output_command.
9923 * valprint.h (output_command): Rename from output_command_const.
9924 * tracepoint.c (trace_dump_actions): Call output_command.
9925
9926 2018-05-21 Tom Tromey <tom@tromey.com>
9927
9928 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9929 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9930 * ada-lang.h (create_ada_exception_catchpoint): Update.
9931 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9932 std::string.
9933 (create_excep_cond_exprs, ~ada_catchpoint)
9934 (should_stop_exception, print_one_exception)
9935 (print_mention_exception, print_recreate_exception): Update.
9936 (ada_get_next_arg): Remove.
9937 (catch_ada_exception_command_split): Use std::string. Change type
9938 of "excep_string", "cond_string".
9939 (catch_ada_exception_command): Update.
9940 (create_ada_exception_catchpoint): Change type of excep_string.
9941 (ada_exception_sal): Remove excep_string parameter.
9942 (~ada_catchpoint): Remove.
9943
9944 2018-05-21 Tom Tromey <tom@tromey.com>
9945
9946 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9947 cleanup.
9948
9949 2018-05-21 Tom Tromey <tom@tromey.com>
9950
9951 * ada-lang.c (ada_exception_message_1, ada_exception_message):
9952 Return unique_xmalloc_ptr.
9953 (print_it_exception): Update.
9954
9955 2018-05-21 Tom Tromey <tom@tromey.com>
9956
9957 * tracepoint.c (trace_dump_actions): Use std::string.
9958
9959 2018-05-21 Tom Tromey <tom@tromey.com>
9960
9961 * symfile.c (reread_symbols): Use std::string for original_name.
9962
9963 2018-05-21 Tom Tromey <tom@tromey.com>
9964
9965 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9966 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
9967 constructor.
9968
9969 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
9970
9971 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9972 instance to...
9973 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9974 * objfiles.c (get_objfile_bfd_data): Allocate
9975 objfile_per_bfd_storage with obstack_new when allocating on
9976 obstack.
9977
9978 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9979
9980 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9981 OBSTACK_ZALLOC.
9982 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9983 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9984 * mdebugread.c (mdebug_build_psymtabs): Likewise.
9985 (add_pending): Likewise.
9986 (parse_symbol): Likewise.
9987 (parse_partial_symbols): Likewise.
9988 (psymtab_to_symtab_1): Likewise.
9989 (new_psymtab): Likewise.
9990 (elfmdebug_build_psymtabs): Likewise.
9991 * minsyms.c (terminate_minimal_symbol_table): Likewise.
9992 * objfiles.c (get_objfile_bfd_data): Likewise.
9993 (objfile_register_static_link): Likewise.
9994 * psymtab.c (allocate_psymtab): Likewise.
9995 * stabsread.c (read_member_functions): Likewise.
9996 * xcoffread.c (xcoff_end_psymtab): Likewise.
9997
9998 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9999
10000 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
10001 compiler supports std::is_trivially_constructible.
10002 * common/poison.h: Include obstack.h.
10003 (IsMallocable): Define to is_trivially_constructible if the
10004 compiler supports it, define to true_type otherwise.
10005 (xobnew): New.
10006 (XOBNEW): Redefine.
10007 (xobnewvec): New.
10008 (XOBNEWVEC): Redefine.
10009 * gdb_obstack.h (obstack_zalloc): New.
10010 (OBSTACK_ZALLOC): Redefine.
10011 (obstack_calloc): New.
10012 (OBSTACK_CALLOC): Redefine.
10013 (obstack_new): New.
10014 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
10015 (gdbarch_obstack): New declaration in gdbarch.h, definition in
10016 gdbarch.c.
10017 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
10018 obstack_calloc/obstack_zalloc.
10019 (gdbarch_obstack_zalloc): Remove.
10020 * target-descriptions.c (tdesc_data_init): Use obstack_new.
10021
10022 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10023
10024 * stack.c (backtrace_command_1): Remove useless variable int i.
10025
10026 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10027
10028 * stack.c (print_frame_info): Fix comment.
10029
10030 2018-05-18 Tom Tromey <tom@tromey.com>
10031
10032 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10033 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10034 (~dwarf2_per_objfile): Update
10035 (dwarf2_get_dwz_file): Use new.
10036 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10037 unique_ptr.
10038
10039 2018-05-18 Tom Tromey <tom@tromey.com>
10040
10041 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10042 unique_ptr.
10043 * dwarf2read.c (struct dwp_file): Add constructor and
10044 initializers.
10045 (open_and_init_dwp_file): Return a unique_ptr.
10046 (dwarf2_per_objfile, create_dwp_hash_table)
10047 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10048 (lookup_dwo_unit_in_dwp): Update.
10049 (open_and_init_dwp_file, get_dwp_file): Update.
10050
10051 2018-05-18 Tom Tromey <tom@tromey.com>
10052
10053 * dwarf2read.c (dwarf2_per_objfile): Update.
10054 (struct mapped_index): Add initializers.
10055 (dwarf2_read_index): Use new.
10056 (dw2_symtab_iter_init): Update.
10057 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10058 unique_ptr.
10059
10060 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10061
10062 * dwarf2read.c (mapped_index) <total_size>: Remove.
10063
10064 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
10065
10066 * unittests/format_pieces-selftests.c (test_format_specifier):
10067 Add ARI comments.
10068
10069 2018-05-18 Tom Tromey <tom@tromey.com>
10070
10071 * c-typeprint.c (maybe_print_hole): New function.
10072 (c_print_type_struct_field_offset): Update.
10073 (c_type_print_base_struct_union): Call maybe_print_hole.
10074
10075 2018-05-17 Keith Seitz <keiths@redhat.com>
10076
10077 * breakpoint.c (build_bpstat_chain): New function, moved from
10078 bpstat_stop_status.
10079 (bpstat_stop_status): Add optional parameter, `stop_chain'.
10080 If no stop chain is passed, call build_bpstat_chain to build it.
10081 * breakpoint.h (build_bpstat_chain): Declare.
10082 (bpstat_stop_status): Move documentation here from breakpoint.c.
10083 * infrun.c (handle_signal_stop): Before eliding inlined frames,
10084 build the stop chain and pass it to skip_inline_frames.
10085 Pass this stop chain to bpstat_stop_status.
10086 * inline-frame.c: Include breakpoint.h.
10087 (stopped_by_user_bp_inline_frame): New function.
10088 (skip_inline_frames): Add parameter `stop_chain'.
10089 Move documention to inline-frame.h.
10090 If non-NULL, use stopped_by_user_bp_inline_frame to determine
10091 whether the frame should be elided.
10092 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10093 Add moved documentation and update for new parameter.
10094
10095 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10096
10097 PR cli/14975
10098 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10099 unittests/format_pieces-selftests.c.
10100 * common/format.h (format_piece) <operator==>: New.
10101 (format_pieces) <operator[]>: Remove.
10102 * common/format.c (format_pieces::format_pieces): Handle \e.
10103 * unittests/format_pieces-selftests.c: New.
10104
10105 2018-05-17 Tom Tromey <tom@tromey.com>
10106
10107 PR symtab/23010:
10108 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10109 (dw2_instantiate_symtab): Add skip_partial parameter.
10110 (dw2_find_last_source_symtab, dw2_map_expand_apply)
10111 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10112 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10113 (dw2_expand_symtabs_matching_one)
10114 (dw2_find_pc_sect_compunit_symtab)
10115 (dw2_debug_names_lookup_symbol)
10116 (dw2_debug_names_expand_symtabs_for_function): Update.
10117 (init_cutu_and_read_dies): Add skip_partial parameter.
10118 (process_psymtab_comp_unit, build_type_psymtabs_1)
10119 (process_skeletonless_type_unit, load_partial_comp_unit)
10120 (psymtab_to_symtab_1): Update.
10121 (load_full_comp_unit): Add skip_partial parameter.
10122 (process_imported_unit_die, dwarf2_read_addr_index)
10123 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10124 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10125 (read_signatured_type): Update.
10126
10127 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
10128
10129 * value.c (release_value): Remove unused variable.
10130 (record_latest_value): Likewise.
10131 (access_value_history): Likewise.
10132 (preserve_values): Likewise.
10133
10134 2018-05-17 Tom Tromey <tom@tromey.com>
10135
10136 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10137 Initialize.
10138
10139 2018-05-16 Maciej W. Rozycki <macro@mips.com>
10140
10141 PR gdb/22286
10142 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10143 Also handle registers whose width is not a multiple of
10144 PTRACE_TYPE_RET.
10145 (linux_nat_trad_target::store_register): Likewise.
10146
10147 2018-05-16 Tom Tromey <tom@tromey.com>
10148
10149 * gdbcore.h (core_bfd): Redefine.
10150 * corelow.c (core_target::close): Update.
10151 (core_target_open): Update.
10152 * progspace.h (struct program_space) <cbfd>: Now a
10153 gdb_bfd_ref_ptr.
10154
10155 2018-05-16 Tom Tromey <tom@tromey.com>
10156
10157 PR cli/19551:
10158 * symfile-add-flags.h (enum symfile_add_flags)
10159 <SYMFILE_NOT_FILENAME>: New constant.
10160 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
10161 objfile name from BFD.
10162 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10163 * minidebug.c (find_separate_debug_file_in_section): Put
10164 ".gnu_debugdata" into BFD's file name.
10165
10166 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
10167
10168 * regcache.c (regcache_read_ftype, regcache_write_ftype):
10169 Remove.
10170
10171 2018-05-15 Tamar Christina <tamar.christina@arm.com>
10172
10173 PR binutils/21446
10174 * aarch64-tdep.c (aarch64_analyze_prologue,
10175 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10176 Indicate not interested in errors.
10177
10178 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10179
10180 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10181 Supply the MIPS_ZERO_REGNUM register.
10182
10183 2018-05-15 Maciej W. Rozycki <macro@mips.com>
10184
10185 * mips-tdep.c (mask_address_var): Make variable static.
10186
10187 2018-05-14 Tom Tromey <tom@tromey.com>
10188
10189 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10190
10191 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
10192
10193 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10194 FXSAVE_ADDR for the mxcsr register.
10195
10196 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
10197
10198 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10199
10200 2018-05-11 Pedro Alves <palves@redhat.com>
10201
10202 * corelow.c (core_target) <core_target>: No longer inline.
10203 Initialize m_core_gdbarch, m_core_vec and build the section table
10204 here.
10205 <~core_target>: New.
10206 <core_gdbarch, get_core_register_section>: New methods.
10207 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10208 factored out from ...
10209 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10210 (core_ops): Delete.
10211 (sniff_core_bfd): Add gdbarch parameter.
10212 (core_close): Delete, merged into ...
10213 (core_target::close): ... here. Delete self.
10214 (core_close_cleanup): Delete.
10215 (core_target_open): Allocate a core_target on the heap. Use a
10216 unique_ptr instead of a cleanup. Bits moved into the core_target
10217 ctor. Adjust to use core_target methods instead of globals.
10218 (get_core_register_section): Rename to ...
10219 (core_target::get_core_register_section): ... this and adjust.
10220 (struct get_core_registers_cb_data): New.
10221 (get_core_registers_cb): Use it. Use bool.
10222 (core_target::fetch_registers, core_target::files_info)
10223 (core_target::xfer_partial, core_target::read_description)
10224 (core_target::pid_to, core_target::thread_name): Adjust to
10225 reference class fields instead of globals.
10226 * target.h (struct target_ops_deleter, target_ops_up): New.
10227
10228 2018-05-11 Pedro Alves <palves@redhat.com>
10229
10230 * corefile.c (core_file_command): Move to corelow.c.
10231 * corelow.c (the_core_target): Delete.
10232 (core_file_command): Moved from corefile.c. Check exec_bfd
10233 instead of the_core_target. Use target_detach instead of calling
10234 into the_core_target directly.
10235 (maybe_say_no_core_file_now): New.
10236 (core_target::detach): Use it.
10237 (_initialize_corelow): Remove references to the_core_target.
10238 * gdbcore.h (the_core_target): Delete.
10239
10240 2018-05-11 Tom Tromey <tromey@redhat.com>
10241 Pedro Alves <palves@redhat.com>
10242
10243 * corefile.c (core_bfd): Remove.
10244 * gdbcore.h (core_bfd): Now a macro.
10245 * progspace.h (struct program_space) <cbfd>: New field.
10246
10247 2018-05-11 Tom Tromey <tom@tromey.com>
10248
10249 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10250 gdb::def_vector.
10251
10252 2018-05-10 Tom Tromey <tom@tromey.com>
10253
10254 * configure: Rebuild.
10255 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10256
10257 2018-05-10 Joel Brobecker <brobecker@adacore.com>
10258
10259 PR server/23158:
10260 * regformats/regdat.sh: Adjust script, following the addition
10261 of the new expedite_regs parameter to init_target_desc.
10262
10263 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
10264
10265 PR gdb/23127
10266 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10267 set_gdbarch_significant_addr_bit.
10268 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10269 set_gdbarch_significant_addr_bit.
10270 * utils.c (address_significant): Update to sign extend addr.
10271
10272 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
10273
10274 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10275 (xtensa_linux_init_abi): Limit tdep->num_regs by
10276 tdep->num_nopriv_regs.
10277 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10278 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10279 not initialized.
10280
10281 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
10282
10283 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10284
10285 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
10286
10287 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10288 (I387_MXCSR_INIT_VAL): New constant.
10289 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10290 buffer if it was supplied by the inferior.
10291 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10292 (i387_xsave_get_clear_bv): New function.
10293 (i387_supply_xsave): Only read x87 control registers from the
10294 xsave buffer if the feature is enabled, and the state will have
10295 been written, otherwise, provide a suitable default.
10296 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10297 including x87 control registers. Update control registers if they
10298 have changed from the default value, and mark features as enabled
10299 as required.
10300 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10301
10302 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10303
10304 * spu-tdep.c (info_spu_event_command): Fix output formatting.
10305
10306 2018-05-07 Tom Tromey <tom@tromey.com>
10307
10308 * configure: Rebuild.
10309 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10310
10311 2018-05-07 Tom Tromey <tom@tromey.com>
10312
10313 PR tdep/20362:
10314 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10315 bit. Use correct value for VDIV.
10316
10317 2018-05-04 Tom Tromey <tom@tromey.com>
10318
10319 * configure: Rebuild.
10320 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10321
10322 2018-05-04 Tom Tromey <tom@tromey.com>
10323
10324 * linux-record.c (record_linux_system_call) <case
10325 RECORD_SYS_RECVFROM>: Add "break".
10326
10327 2018-05-04 Tom Tromey <tom@tromey.com>
10328
10329 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10330 Add missing "break".
10331 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10332 Add missing "break".
10333
10334 2018-05-04 Tom Tromey <tom@tromey.com>
10335
10336 * rs6000-tdep.c (ppc_process_record_op4)
10337 (ppc_process_record_op63): Add fall-through comment.
10338
10339 2018-05-04 Tom Tromey <tom@tromey.com>
10340
10341 * i386-tdep.c (i386_process_record): Add fall-through comment.
10342
10343 2018-05-04 Tom Tromey <tom@tromey.com>
10344
10345 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10346 comment.
10347
10348 2018-05-04 Tom Tromey <tom@tromey.com>
10349
10350 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10351 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10352 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10353 comment.
10354 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10355 comment.
10356 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10357 comment.
10358
10359 2018-05-04 Tom Tromey <tom@tromey.com>
10360
10361 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10362
10363 2018-05-04 Tom Tromey <tom@tromey.com>
10364
10365 * s390-tdep.c (s390_process_record): Fix fall-through comments.
10366 * xcoffread.c (scan_xcoff_symtab): Move comment later.
10367 * symfile.c (section_is_mapped): Fix fall-through comment.
10368 * stabsread.c (define_symbol, read_member_functions): Fix
10369 fall-through comment.
10370 * s390-linux-tdep.c (s390_process_record): Fix fall-through
10371 comment.
10372 * remote.c (remote_wait_as): Fix fall-through comment.
10373 * p-exp.y (yylex): Fix fall-through comment.
10374 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10375 comment.
10376 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10377 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10378 * jv-exp.y (yylex): Fix fall-through comment.
10379 * go-exp.y (lex_one_token): Fix fall-through comment.
10380 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10381 fall-through comment.
10382 * f-exp.y (yylex): Fix fall-through comment.
10383 * dwarf2read.c (process_die): Fix fall-through comments.
10384 * dbxread.c (process_one_symbol): Fix fall-through comment.
10385 * d-exp.y (lex_one_token): Fix fall-through comment.
10386 * cp-name-parser.y (yylex): Fix fall-through comment.
10387 * coffread.c (coff_symtab_read): Fix fall-through comment.
10388 * c-exp.y (lex_one_token): Fix fall-through comment.
10389 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10390 comment.
10391 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10392 comment.
10393
10394 2018-05-04 Tom Tromey <tom@tromey.com>
10395
10396 PR python/22730:
10397 * NEWS: Mention gdb.execute change.
10398 * gdbcmd.h (execute_control_command): Don't declare.
10399 * python/python.c (execute_gdb_command): Use read_command_lines_1,
10400 execute_control_commands, execute_control_commands_to_string.
10401 * cli/cli-script.h (execute_control_commands)
10402 (execute_control_commands_to_string): Declare.
10403 (execute_control_command): Add from_tty parameter.
10404 * cli/cli-script.c (execute_control_commands)
10405 (execute_control_commands_to_string): New functions.
10406 (execute_user_command): Use execute_control_commands.
10407 (execute_control_command_1): Add "from_tty" parameter. Update.
10408 (execute_control_command): Likewise.
10409
10410 2018-05-04 Tom Tromey <tom@tromey.com>
10411
10412 PR python/22731:
10413 * NEWS: Mention that breakpoint commands are writable.
10414 * python/py-breakpoint.c (bppy_set_commands): New function.
10415 (breakpoint_object_getset) <"commands">: Use it.
10416
10417 2018-05-04 Tom Tromey <tom@tromey.com>
10418
10419 * tracepoint.c (actions_command): Update.
10420 * mi/mi-cmd-break.c (mi_command_line_array)
10421 (mi_command_line_array_cnt, mi_command_line_array_ptr)
10422 (mi_read_next_line): Remove.
10423 (mi_cmd_break_commands): Update.
10424 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10425 function_view.
10426 * cli/cli-script.c (get_command_line): Update.
10427 (process_next_line): Use function_view. Constify.
10428 (recurse_read_control_structure, read_command_lines)
10429 (read_command_lines_1): Change argument types to function_view.
10430 (do_define_command, document_command): Update.
10431 * breakpoint.h (check_tracepoint_command): Don't declare.
10432 * breakpoint.c (check_tracepoint_command): Remove.
10433 (commands_command_1, create_tracepoint_from_upload): Update.
10434
10435 2018-05-04 Tom Tromey <tom@tromey.com>
10436
10437 PR gdb/11750:
10438 * cli/cli-script.h (enum command_control_type) <define_control>:
10439 New constant.
10440 * cli/cli-script.c (multi_line_command_p): Handle define_control.
10441 (build_command_line, execute_control_command_1)
10442 (process_next_line): Likewise.
10443 (do_define_command): New function, extracted from define_command.
10444 (define_command): Use it.
10445
10446 2018-05-04 Tom Tromey <tom@tromey.com>
10447
10448 * tracepoint.c (actions_command): Update.
10449 * cli/cli-script.h (read_command_lines): Update.
10450 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10451 (MAX_TMPBUF): Remove define.
10452 (define_command): Use string_printf.
10453 (document_command): Likewise.
10454 * breakpoint.c (commands_command_1): Update.
10455
10456 2018-05-04 Tom Tromey <tom@tromey.com>
10457
10458 * top.c (execute_command): Update.
10459 * cli/cli-script.h (print_command_lines): Now varargs.
10460 * cli/cli-script.c (print_command_lines): Now varargs.
10461 (execute_control_command_1) <case while_control, case if_control>:
10462 Update.
10463
10464 2018-05-04 Tom Tromey <tom@tromey.com>
10465
10466 * tracepoint.c (all_tracepoint_actions): Rename from
10467 all_tracepoint_actions_and_cleanup. Change return type.
10468 (actions_command, encode_actions_1, encode_actions)
10469 (trace_dump_actions, tdump_command): Update.
10470 * remote.c (remote_download_command_source): Update.
10471 * python/python.c (gdbpy_eval_from_control_command)
10472 (python_command, python_interactive_command): Update.
10473 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10474 * guile/guile.c (guile_command)
10475 (gdbscm_eval_from_control_command, guile_command): Update.
10476 * compile/compile.c (compile_code_command)
10477 (compile_print_command, compile_to_object): Update.
10478 * cli/cli-script.h (struct command_lines_deleter): New.
10479 (counted_command_line): New typedef.
10480 (struct command_line): Add constructor, destructor.
10481 <body_list>: Remove.
10482 <body_list_0, body_list_1>: New members.
10483 (command_line_up): Remove typedef.
10484 (read_command_lines, read_command_lines_1, get_command_line):
10485 Update.
10486 (copy_command_lines): Don't declare.
10487 * cli/cli-script.c (build_command_line): Use "new".
10488 (get_command_line): Return counted_command_line.
10489 (print_command_lines, execute_user_command)
10490 (execute_control_command_1, while_command, if_command): Update.
10491 (realloc_body_list): Remove.
10492 (process_next_line, recurse_read_control_structure): Update.
10493 (read_command_lines, read_command_lines_1): Return counted_command_line.
10494 (free_command_lines): Use "delete".
10495 (copy_command_lines): Remove.
10496 (define_command, document_command, show_user_1): Update.
10497 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10498 a counted_command_line.
10499 * breakpoint.h (counted_command_line): Remove typedef.
10500 (breakpoint_set_commands): Update.
10501 * breakpoint.c (check_no_tracepoint_commands)
10502 (validate_commands_for_breakpoint): Update.
10503 (breakpoint_set_commands): Change commands to be a
10504 counted_command_line.
10505 (commands_command_1, update_dprintf_command_list)
10506 (create_tracepoint_from_upload): Update.
10507
10508 2018-05-04 Tom Tromey <tom@tromey.com>
10509
10510 * cli/cli-decode.h (cmd_list_element): New constructor.
10511 (~cmd_list_element): New destructor.
10512 (struct cmd_list_element): Add initializers.
10513 * cli/cli-decode.c (do_add_cmd): Use "new".
10514 (delete_cmd): Use "delete".
10515
10516 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
10517 Pedro Alves <palves@redhat.com>
10518
10519 PR breakpoints/19806 and support for PR external/20207.
10520 * NEWS: Mention Aarch64 watchpoint improvements.
10521 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10522 watchpoints and PR external/20207 watchpoints.
10523 * nat/aarch64-linux-hw-point.c
10524 (kernel_supports_any_contiguous_range): New.
10525 (aarch64_watchpoint_offset): New.
10526 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10527 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10528 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10529 (aarch64_align_watchpoint): New parameters aligned_offset_p and
10530 next_addr_orig_p. Support PR external/20207 watchpoints.
10531 (aarch64_downgrade_regs): New.
10532 (aarch64_dr_state_insert_one_point): New parameters offset and
10533 addr_orig.
10534 (aarch64_dr_state_remove_one_point): Likewise.
10535 (aarch64_handle_breakpoint): Update caller.
10536 (aarch64_handle_aligned_watchpoint): Likewise.
10537 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10538 aligned_offset.
10539 (aarch64_linux_set_debug_regs): Remove const from state. Call
10540 aarch64_downgrade_regs.
10541 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10542 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10543 (DR_CONTROL_MASK): ... this.
10544 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10545 (unsigned int aarch64_watchpoint_offset): New prototype.
10546 (aarch64_linux_set_debug_regs): Remove const from state.
10547 * utils.c (align_up, align_down): Move to ...
10548 * common/common-utils.c (align_up, align_down): ... here.
10549 * utils.h (align_up, align_down): Move to ...
10550 * common/common-utils.h (align_up, align_down): ... here.
10551
10552 2018-05-04 Joel Brobecker <brobecker@adacore.com>
10553
10554 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10555 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10556 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10557 Re-implement to match the ABI as summarized in GCC's
10558 gcc/config/sparc/sparc.c. All callers updated.
10559 (sparc32_store_arguments): Remove assertion.
10560
10561 2018-05-04 Tom Tromey <tom@tromey.com>
10562
10563 * printcmd.c: Don't include tui.h.
10564 (decode_format): Use skip_spaces.
10565
10566 2018-05-04 Tom Tromey <tom@tromey.com>
10567
10568 PR gdb/22619:
10569 * printcmd.c (last_count): New global.
10570 (x_command): Use saved count when repeating.
10571
10572 2018-05-04 Tom Tromey <tom@tromey.com>
10573
10574 * nto-procfs.c (do_closedir_cleanup): Remove.
10575 (procfs_pidlist): Use gdb_dir_up.
10576 * procfs.c (do_closedir_cleanup): Remove.
10577 (proc_update_threads): Use gdb_dir_up.
10578 * common/filestuff.h (struct gdb_dir_deleter): New.
10579 (gdb_dir_up): New typedef.
10580
10581 2018-05-04 Tom Tromey <tom@tromey.com>
10582
10583 * ada-lang.c (print_mention_exception): Use std::string.
10584
10585 2018-05-04 Tom Tromey <tom@tromey.com>
10586
10587 * ada-lang.c (create_excep_cond_exprs): Update.
10588 (ada_exception_catchpoint_cond_string): Use std::string.
10589
10590 2018-05-04 Tom Tromey <tom@tromey.com>
10591
10592 * ada-lang.c (xget_renaming_scope): Return std::string.
10593 (old_renaming_is_invisible): Update.
10594
10595 2018-05-04 Tom Tromey <tom@tromey.com>
10596
10597 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10598 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10599
10600 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
10601
10602 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10603
10604 2018-05-04 Tom Tromey <tom@tromey.com>
10605
10606 * remote.c (remote_query_supported_append): Change type.
10607 (remote_check_symbols): Update.
10608
10609 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
10610
10611 PR gdb/11420
10612 * configure.ac: Prepend libpython.
10613 * python/python-config.py: Likewise.
10614 * configure: Regenerate.
10615
10616 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
10617
10618 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10619
10620 2018-05-03 Pedro Alves <palves@redhat.com>
10621
10622 * s390-linux-nat.c
10623 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10624 override. Write 'true' instead of '1'.
10625 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10626 declaration.
10627
10628 2018-05-02 Pedro Alves <palves@redhat.com>
10629
10630 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10631 add_inf_child_target.
10632 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10633 add_inf_child_target.
10634 * aix-thread.c (aix_thread_target_info): New.
10635 (aix_thread_target) <shortname, longname, doc>: Delete.
10636 <info>: New.
10637 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10638 add_inf_child_target.
10639 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10640 add_inf_child_target.
10641 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10642 add_inf_child_target.
10643 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10644 add_inf_child_target.
10645 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10646 add_inf_child_target.
10647 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10648 add_inf_child_target.
10649 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10650 add_inf_child_target.
10651 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10652 add_inf_child_target.
10653 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10654 add_inf_child_target.
10655 * bfd-target.c (target_bfd_target_info): New.
10656 (target_bfd) <shortname, longname, doc>: Delete.
10657 <info>: New.
10658 * bsd-kvm.c (bsd_kvm_target_info): New.
10659 (bsd_kvm_target) <shortname, longname, doc>: Delete.
10660 <info>: New.
10661 (bsd_kvm_target::open): Rename to ...
10662 (bsd_kvm_target_open): ... this. Adjust.
10663 * bsd-uthread.c (bsd_uthread_target_info): New.
10664 (bsd_uthread_target) <shortname, longname, doc>: Delete.
10665 <info>: New.
10666 * corefile.c (core_file_command): Adjust.
10667 * corelow.c (core_target_info): New.
10668 (core_target) <shortname, longname, doc>: Delete.
10669 <info>: New.
10670 (core_target::open): Rename to ...
10671 (core_target_open): ... this. Adjust.
10672 * ctf.c (ctf_target_info): New.
10673 (ctf_target) <shortname, longname, doc>: Delete.
10674 <info>: New.
10675 (ctf_target::open): Rename to ...
10676 (ctf_target_open): ... this.
10677 (_initialize_ctf): Adjust.
10678 * exec.c (exec_target_info): New.
10679 (exec_target) <shortname, longname, doc>: Delete.
10680 <info>: New.
10681 (exec_target::open): Rename to ...
10682 (exec_target_open): ... this.
10683 * gdbcore.h (core_target_open): Declare.
10684 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10685 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10686 add_inf_child_target.
10687 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10688 add_inf_child_target.
10689 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10690 add_inf_child_target.
10691 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10692 add_inf_child_target.
10693 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10694 add_inf_child_target.
10695 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10696 add_inf_child_target.
10697 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10698 add_inf_child_target.
10699 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10700 add_inf_child_target.
10701 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10702 add_inf_child_target.
10703 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10704 add_inf_child_target.
10705 * inf-child.c (inf_child_target_info): New.
10706 (inf_child_target::info): New.
10707 (inf_child_open_target): Remove 'target' parameter. Use
10708 get_native_target instead.
10709 (inf_child_target::open): Delete.
10710 (add_inf_child_target): New.
10711 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10712 Delete.
10713 <info>: New.
10714 (add_inf_child_target): Declare.
10715 (inf_child_open_target): Declare.
10716 * linux-thread-db.c (thread_db_target_info): New.
10717 (thread_db_target) <shortname, longname, doc>: Delete.
10718 <info>: New.
10719 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10720 add_inf_child_target.
10721 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10722 add_inf_child_target.
10723 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10724 add_inf_child_target.
10725 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10726 add_inf_child_target.
10727 * make-target-delegates (print_class): Adjust.
10728 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10729 add_inf_child_target.
10730 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10731 add_inf_child_target.
10732 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10733 add_inf_child_target.
10734 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10735 add_inf_child_target.
10736 * nto-procfs.c (nto_native_target_info): New.
10737 (nto_procfs_target_native) <shortname, longname, doc>:
10738 Delete.
10739 <info>: New.
10740 (nto_procfs_target_info): New.
10741 (nto_procfs_target_procfs) <shortname, longname, doc>:
10742 Delete.
10743 <info>: New.
10744 (init_procfs_targets): Adjust.
10745 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10746 add_inf_child_target.
10747 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10748 add_inf_child_target.
10749 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10750 add_inf_child_target.
10751 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10752 add_inf_child_target.
10753 * ravenscar-thread.c (ravenscar_target_info): New.
10754 (ravenscar_thread_target) <shortname, longname, doc>:
10755 Delete.
10756 <info>: New.
10757 * record-btrace.c (record_btrace_target_info):
10758 (record_btrace_target) <shortname, longname, doc>: Delete.
10759 <info>: New.
10760 (record_btrace_target::open): Rename to ...
10761 (record_btrace_target_open): ... this. Adjust.
10762 * record-full.c (record_longname, record_doc): New.
10763 (record_full_base_target) <shortname, longname, doc>: Delete.
10764 <info>: New.
10765 (record_full_target_info): New.
10766 (record_full_target): <shortname>: Delete.
10767 <info>: New.
10768 (record_full_core_open_1, record_full_open_1): Update comments.
10769 (record_full_base_target::open): Rename to ...
10770 (record_full_open): ... this.
10771 (cmd_record_full_restore): Update.
10772 (_initialize_record_full): Update.
10773 * remote-sim.c (remote_sim_target_info): New.
10774 (gdbsim_target) <shortname, longname, doc>: Delete.
10775 <info>: New.
10776 (gdbsim_target::open): Rename to ...
10777 (gdbsim_target_open): ... this.
10778 (_initialize_remote_sim): Adjust.
10779 * remote.c (remote_doc): New.
10780 (remote_target_info): New.
10781 (remote_target) <shortname, longname, doc>: Delete.
10782 <info>: New.
10783 (extended_remote_target_info): New.
10784 (extended_remote_target) <shortname, longname, doc>: Delete.
10785 <info>: New.
10786 (remote_target::open_1): Make static. Adjust.
10787 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10788 * s390-linux-nat.c (_initialize_s390_nat): Use
10789 add_inf_child_target.
10790 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10791 add_inf_child_target.
10792 * sol-thread.c (thread_db_target_info): New.
10793 (sol_thread_target) <shortname, longname, doc>: Delete.
10794 <info>: New.
10795 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10796 add_inf_child_target.
10797 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10798 add_inf_child_target.
10799 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10800 add_inf_child_target.
10801 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10802 add_inf_child_target.
10803 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10804 add_inf_child_target.
10805 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10806 add_inf_child_target.
10807 * spu-linux-nat.c (_initialize_spu_nat): Use
10808 add_inf_child_target.
10809 * spu-multiarch.c (spu_multiarch_target_info): New.
10810 (spu_multiarch_target) <shortname, longname, doc>: Delete.
10811 <info>: New.
10812 * target-delegates.c: Regenerate.
10813 * target.c: Include <unordered_map>.
10814 (target_ops_p): Delete.
10815 (DEF_VEC_P(target_ops_p)): Delete.
10816 (target_factories): New.
10817 (test_target_info): New.
10818 (test_target_ops::info): New.
10819 (open_target): Adjust to use target_factories.
10820 (add_target_with_completer): Rename to ...
10821 (add_target): ... this. Change prototype. Register target_info
10822 and open callback in target_factories. Register target_info in
10823 command context instead of target_ops.
10824 (add_target): Delete old implementation.
10825 (add_deprecated_target_alias): Change prototype. Adjust.
10826 (the_native_target): New.
10827 (set_native_target, get_native_target): New.
10828 (find_default_run_target): Use the_native_target.
10829 (find_attach_target, find_run_target): Simplify.
10830 (target_ops::open): Delete.
10831 (dummy_target_info): New.
10832 (dummy_target::shortname, dummy_target::longname)
10833 (dummy_target::doc): Delete.
10834 (dummy_target::info): New.
10835 (debug_target::shortname, debug_target::longname)
10836 (debug_target::doc): Delete.
10837 (debug_target::info): New.
10838 * target.h (struct target_info): New.
10839 (target_ops::~target_ops): Add comment.
10840 (target_ops::info): New.
10841 (target_ops::shortname, target_ops::longname, target_ops::doc): No
10842 longer virtual. Implement in terms of target_info.
10843 (set_native_target, get_native_target): Declare.
10844 (target_open_ftype): New.
10845 (add_target, add_target_with_completer)
10846 (add_deprecated_target_alias): Change prototype.
10847 (test_target) <shortname, longname, doc>: Delete.
10848 <info>: New.
10849 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10850 add_inf_child_target.
10851 * tracefile-tfile.c (tfile_target_info): New.
10852 (tfile_target) <shortname, longname, doc>: Delete.
10853 <info>: New.
10854 (tfile_target::open): Rename to ...
10855 (tfile_target_open): ... this.
10856 (_initialize_tracefile_tfile): Adjust.
10857 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10858 add_inf_child_target.
10859 * windows-nat.c (_initialize_windows_nat): Use
10860 add_inf_child_target.
10861 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10862 add_inf_child_target.
10863
10864 2018-05-02 Pedro Alves <palves@redhat.com>
10865
10866 * linux-nat.h (linux_nat_target) <low_new_thread,
10867 low_delete_thread, low_new_fork, low_forget_process,
10868 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10869 New virtual methods.
10870 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10871 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10872 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10873 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10874 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10875 Delete.
10876 * linux-fork.c (delete_fork): Adjust to call low method.
10877 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10878 (linux_nat_new_fork, linux_nat_forget_process_hook)
10879 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10880 (linux_nat_status_is_event):
10881 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10882 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10883 to call low method.
10884 (sigtrap_is_event): Rename to ...
10885 (linux_nat_target::low_status_is_event): ... this.
10886 (linux_nat_set_status_is_event): Delete.
10887 (save_stop_reason, linux_nat_wait_1)
10888 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10889 low methods.
10890 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10891 (linux_nat_set_new_fork, linux_nat_set_forget_process)
10892 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10893 (linux_nat_set_prepare_to_resume): Delete.
10894 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10895 low virtual methods.
10896 * amd64-linux-nat.c: Likewise.
10897 * arm-linux-nat.c: Likewise.
10898 * i386-linux-nat.c: Likewise.
10899 * ia64-linux-nat.c: Likewise.
10900 * mips-linux-nat.c: Likewise.
10901 * ppc-linux-nat.c: Likewise.
10902 * s390-linux-nat.c: Likewise.
10903 * sparc64-linux-nat.c: Likewise.
10904 * x86-linux-nat.c: Likewise.
10905 * x86-linux-nat.h: Include "nat/x86-linux.h".
10906 (x86_linux_nat_target) <low_new_fork, low_forget_process,
10907 low_prepare_to_resume, low_new_thread, low_delete_thread>:
10908 Override methods.
10909
10910 2018-05-02 Pedro Alves <palves@redhat.com>
10911
10912 * target.h (target_ops)
10913 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10914 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10915 stopped_by_watchpoint, have_continuable_watchpoint,
10916 stopped_data_address, watchpoint_addr_within_range,
10917 can_accel_watchpoint_condition, can_run, thread_alive,
10918 has_all_memory, has_memory, has_stack, has_registers,
10919 has_execution, can_async_p, is_async_p, supports_non_stop,
10920 always_non_stop_p, can_execute_reverse, supports_multi_process,
10921 supports_enable_disable_tracepoint,
10922 supports_disable_randomization, supports_string_tracing,
10923 supports_evaluation_of_breakpoint_conditions,
10924 can_run_breakpoint_commands, filesystem_is_local,
10925 can_download_tracepoint, get_trace_state_variable_value,
10926 set_trace_notes, get_tib_address, use_agent, can_use_agent,
10927 record_is_replaying, record_will_replay,
10928 augmented_libraries_svr4_read>: Adjust to return bool.
10929 * aarch64-linux-nat.c: All implementations adjusted.
10930 * aix-thread.c: All implementations adjusted.
10931 * arm-linux-nat.c: All implementations adjusted.
10932 * breakpoint.c: All implementations adjusted.
10933 * bsd-kvm.c: All implementations adjusted.
10934 * bsd-uthread.c: All implementations adjusted.
10935 * corelow.c: All implementations adjusted.
10936 * ctf.c: All implementations adjusted.
10937 * darwin-nat.c: All implementations adjusted.
10938 * darwin-nat.h: All implementations adjusted.
10939 * exec.c: All implementations adjusted.
10940 * fbsd-nat.c: All implementations adjusted.
10941 * fbsd-nat.h: All implementations adjusted.
10942 * gnu-nat.c: All implementations adjusted.
10943 * gnu-nat.h: All implementations adjusted.
10944 * go32-nat.c: All implementations adjusted.
10945 * ia64-linux-nat.c: All implementations adjusted.
10946 * inf-child.c: All implementations adjusted.
10947 * inf-child.h: All implementations adjusted.
10948 * inf-ptrace.c: All implementations adjusted.
10949 * inf-ptrace.h: All implementations adjusted.
10950 * linux-nat.c: All implementations adjusted.
10951 * linux-nat.h: All implementations adjusted.
10952 * mips-linux-nat.c: All implementations adjusted.
10953 * nto-procfs.c: All implementations adjusted.
10954 * ppc-linux-nat.c: All implementations adjusted.
10955 * procfs.c: All implementations adjusted.
10956 * ravenscar-thread.c: All implementations adjusted.
10957 * record-btrace.c: All implementations adjusted.
10958 * record-full.c: All implementations adjusted.
10959 * remote-sim.c: All implementations adjusted.
10960 * remote.c: All implementations adjusted.
10961 * s390-linux-nat.c: All implementations adjusted.
10962 * sol-thread.c: All implementations adjusted.
10963 * spu-multiarch.c: All implementations adjusted.
10964 * target-delegates.c: All implementations adjusted.
10965 * target.c: All implementations adjusted.
10966 * target.h: All implementations adjusted.
10967 * tracefile-tfile.c: All implementations adjusted.
10968 * tracefile.c: All implementations adjusted.
10969 * tracefile.h: All implementations adjusted.
10970 * windows-nat.c: All implementations adjusted.
10971 * x86-linux-nat.h: All implementations adjusted.
10972 * x86-nat.h: All implementations adjusted.
10973
10974 2018-05-02 Pedro Alves <palves@redhat.com>
10975
10976 * make-target-delegates (scan_target_h): Don't trim lines here.
10977 Replace sequences of tabs and/or whitespace with a single
10978 whitespace.
10979 (top level, parsing methods): Trim each line before processing it
10980 here.
10981
10982 2018-05-02 Pedro Alves <palves@redhat.com>
10983 John Baldwin <jhb@freebsd.org>
10984
10985 * target.h (enum strata) <debug_stratum>: New.
10986 (struct target_ops) <all delegation methods>: Replace by C++
10987 virtual methods, and drop "to_" prefix. All references updated
10988 throughout.
10989 <to_shortname, to_longname, to_doc, to_data,
10990 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10991 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10992 virtual methods. All references updated throughout.
10993 <can_attach, supports_terminal_ours, can_create_inferior,
10994 get_thread_control_capabilities, attach_no_wait>: New
10995 virtual methods.
10996 <insert_breakpoint, remove_breakpoint>: Now
10997 TARGET_DEFAULT_NORETURN methods.
10998 <info_proc>: Now returns bool.
10999 <to_magic>: Delete.
11000 (OPS_MAGIC): Delete.
11001 (current_target): Delete. All references replaced by references
11002 to ...
11003 (target_stack): ... this. New.
11004 (target_shortname, target_longname): Adjust.
11005 (target_can_run): Now a function declaration.
11006 (default_child_has_all_memory, default_child_has_memory)
11007 (default_child_has_stack, default_child_has_registers)
11008 (default_child_has_execution): Remove target_ops parameter.
11009 (complete_target_initialization): Delete.
11010 (memory_breakpoint_target): New template class.
11011 (test_target_ops): Refactor as a C++ class with virtual methods.
11012 * make-target-delegates (NAME_PART): Tighten.
11013 (POINTER_PART, CP_SYMBOL): New.
11014 (SIMPLE_RETURN_PART): Reimplement.
11015 (VEC_RETURN_PART): Expect less.
11016 (RETURN_PART, VIRTUAL_PART): New.
11017 (METHOD): Adjust to C++ virtual methods.
11018 (scan_target_h): Remove reference to C99.
11019 (dname): Output "target_ops::" prefix.
11020 (write_function_header): Adjust to output a C++ class method.
11021 (write_declaration): New.
11022 (write_delegator): Adjust to output a C++ class method.
11023 (tdname): Output "dummy_target::" prefix.
11024 (write_tdefault, write_debugmethod): Adjust to output a C++ class
11025 method.
11026 (tdefault_names, debug_names): Delete.
11027 (return_types, tdefaults, styles, argtypes_array): New.
11028 (top level): All methods are delegators.
11029 (print_class): New.
11030 (top level): Print dummy_target and debug_target classes.
11031 * target-delegates.c: Regenerate.
11032 * target-debug.h (target_debug_print_enum_info_proc_what)
11033 (target_debug_print_thread_control_capabilities)
11034 (target_debug_print_thread_info_p): New.
11035 * target.c (dummy_target): Delete.
11036 (the_dummy_target, the_debug_target): New.
11037 (target_stack): Now extern.
11038 (set_targetdebug): Push/unpush debug target.
11039 (default_child_has_all_memory, default_child_has_memory)
11040 (default_child_has_stack, default_child_has_registers)
11041 (default_child_has_execution): Remove target_ops parameter.
11042 (complete_target_initialization): Delete.
11043 (add_target_with_completer): No longer call
11044 complete_target_initialization.
11045 (target_supports_terminal_ours): Use regular delegation.
11046 (update_current_target): Delete.
11047 (push_target): No longer check magic number. Don't call
11048 update_current_target.
11049 (unpush_target): Don't call update_current_target.
11050 (target_is_pushed): No longer check magic number.
11051 (target_require_runnable): Skip for all stratums over
11052 process_stratum.
11053 (target_ops::info_proc): New.
11054 (target_info_proc): Use find_target_at and
11055 find_default_run_target.
11056 (target_supports_disable_randomization): Use regular delegation.
11057 (target_get_osdata): Use find_target_at.
11058 (target_ops::open, target_ops::close, target_ops::can_attach)
11059 (target_ops::attach, target_ops::can_create_inferior)
11060 (target_ops::create_inferior, target_ops::can_run)
11061 (target_can_run): New.
11062 (default_fileio_target): Use regular delegation.
11063 (target_ops::fileio_open, target_ops::fileio_pwrite)
11064 (target_ops::fileio_pread, target_ops::fileio_fstat)
11065 (target_ops::fileio_close, target_ops::fileio_unlink)
11066 (target_ops::fileio_readlink): New.
11067 (target_fileio_open_1, target_fileio_unlink)
11068 (target_fileio_readlink): Always call the target method. Handle
11069 FILEIO_ENOSYS.
11070 (return_zero, return_zero_has_execution): Delete.
11071 (init_dummy_target): Delete.
11072 (dummy_target::dummy_target, dummy_target::shortname)
11073 (dummy_target::longname, dummy_target::doc)
11074 (debug_target::debug_target, debug_target::shortname)
11075 (debug_target::longname, debug_target::doc): New.
11076 (target_supports_delete_record): Use regular delegation.
11077 (setup_target_debug): Delete.
11078 (maintenance_print_target_stack): Skip debug_stratum.
11079 (initialize_targets): Instantiate the_dummy_target and
11080 the_debug_target.
11081 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
11082 use target_stack.
11083 (target_auxv_search, fprint_target_auxv): Adjust.
11084 (info_auxv_command): Adjust to use target_stack.
11085 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11086 * exceptions.c (print_flush): Handle a NULL target_stack.
11087 * regcache.c (target_ops_no_register): Refactor as class with
11088 virtual methods.
11089
11090 * exec.c (exec_target): New class.
11091 (exec_ops): Now an exec_target.
11092 (exec_open, exec_close_1, exec_get_section_table)
11093 (exec_xfer_partial, exec_files_info, exec_has_memory)
11094 (exec_make_note_section): Refactor as exec_target methods.
11095 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11096 Delete.
11097 (exec_target::find_memory_regions): New.
11098 (_initialize_exec): Don't call init_exec_ops.
11099 * gdbcore.h (exec_file_clear): Delete.
11100
11101 * corefile.c (core_target): Delete.
11102 (core_file_command): Adjust.
11103 * corelow.c (core_target): New class.
11104 (the_core_target): New.
11105 (core_close): Remove target_ops parameter.
11106 (core_close_cleanup): Adjust.
11107 (core_target::close): New.
11108 (core_open, core_detach, get_core_registers, core_files_info)
11109 (core_xfer_partial, core_thread_alive, core_read_description)
11110 (core_pid_to_str, core_thread_name, core_has_memory)
11111 (core_has_stack, core_has_registers, core_info_proc): Rework as
11112 core_target methods.
11113 (ignore, core_remove_breakpoint, init_core_ops): Delete.
11114 (_initialize_corelow): Initialize the_core_target.
11115 * gdbcore.h (core_target): Delete.
11116 (the_core_target): New.
11117
11118 * ctf.c: (ctf_target): New class.
11119 (ctf_ops): Now a ctf_target.
11120 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11121 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11122 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11123 methods.
11124 (init_ctf_ops): Delete.
11125 (_initialize_ctf): Don't call it.
11126 * tracefile-tfile.c (tfile_target): New class.
11127 (tfile_ops): Now a tfile_target.
11128 (tfile_open, tfile_close, tfile_files_info)
11129 (tfile_get_tracepoint_status, tfile_trace_find)
11130 (tfile_fetch_registers, tfile_xfer_partial)
11131 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11132 Refactor as tfile_target methods.
11133 (tfile_xfer_partial_features): Remove target_ops parameter.
11134 (init_tfile_ops): Delete.
11135 (_initialize_tracefile_tfile): Don't call it.
11136 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11137 (tracefile_has_stack, tracefile_has_registers)
11138 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11139 tracefile_target methods.
11140 (init_tracefile_ops): Delete.
11141 (tracefile_target::tracefile_target): New.
11142 * tracefile.h: Include "target.h".
11143 (tracefile_target): New class.
11144 (init_tracefile_ops): Delete.
11145
11146 * spu-multiarch.c (spu_multiarch_target): New class.
11147 (spu_ops): Now a spu_multiarch_target.
11148 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11149 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11150 (spu_search_memory, spu_mourn_inferior): Refactor as
11151 spu_multiarch_target methods.
11152 (init_spu_ops): Delete.
11153 (_initialize_spu_multiarch): Remove references to init_spu_ops,
11154 complete_target_initialization.
11155
11156 * ravenscar-thread.c (ravenscar_thread_target): New class.
11157 (ravenscar_ops): Now a ravenscar_thread_target.
11158 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11159 (ravenscar_thread_alive, ravenscar_pid_to_str)
11160 (ravenscar_fetch_registers, ravenscar_store_registers)
11161 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11162 (ravenscar_stopped_by_hw_breakpoint)
11163 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11164 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11165 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11166 methods.
11167 (init_ravenscar_thread_ops): Delete.
11168 (_initialize_ravenscar): Remove references to
11169 init_ravenscar_thread_ops and complete_target_initialization.
11170
11171 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11172 (bsd_uthread_target): New class.
11173 (bsd_uthread_ops): Now a bsd_uthread_target.
11174 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11175 (bsd_uthread_close, bsd_uthread_mourn_inferior)
11176 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11177 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11178 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11179 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11180 (bsd_uthread_target): Delete function.
11181 (_initialize_bsd_uthread): Remove reference to
11182 complete_target_initialization.
11183
11184 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
11185 (target_bfd): ... this new class.
11186 (target_bfd_xfer_partial, target_bfd_get_section_table)
11187 (target_bfd_close): Refactor as target_bfd methods.
11188 (target_bfd::~target_bfd): New.
11189 (target_bfd_reopen): Adjust.
11190 (target_bfd::close): New.
11191
11192 * record-btrace.c (record_btrace_target): New class.
11193 (record_btrace_ops): Now a record_btrace_target.
11194 (record_btrace_open, record_btrace_stop_recording)
11195 (record_btrace_disconnect, record_btrace_close)
11196 (record_btrace_async, record_btrace_info)
11197 (record_btrace_insn_history, record_btrace_insn_history_range)
11198 (record_btrace_insn_history_from, record_btrace_call_history)
11199 (record_btrace_call_history_range)
11200 (record_btrace_call_history_from, record_btrace_record_method)
11201 (record_btrace_is_replaying, record_btrace_will_replay)
11202 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11203 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11204 (record_btrace_store_registers, record_btrace_prepare_to_store)
11205 (record_btrace_to_get_unwinder)
11206 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11207 (record_btrace_commit_resume, record_btrace_wait)
11208 (record_btrace_stop, record_btrace_can_execute_reverse)
11209 (record_btrace_stopped_by_sw_breakpoint)
11210 (record_btrace_supports_stopped_by_sw_breakpoint)
11211 (record_btrace_stopped_by_hw_breakpoint)
11212 (record_btrace_supports_stopped_by_hw_breakpoint)
11213 (record_btrace_update_thread_list, record_btrace_thread_alive)
11214 (record_btrace_goto_begin, record_btrace_goto_end)
11215 (record_btrace_goto, record_btrace_stop_replaying_all)
11216 (record_btrace_execution_direction)
11217 (record_btrace_prepare_to_generate_core)
11218 (record_btrace_done_generating_core): Refactor as
11219 record_btrace_target methods.
11220 (init_record_btrace_ops): Delete.
11221 (_initialize_record_btrace): Remove reference to
11222 init_record_btrace_ops.
11223 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11224 the execution_direction global.
11225 (record_full_base_target, record_full_target)
11226 (record_full_core_target): New classes.
11227 (record_full_ops): Now a record_full_target.
11228 (record_full_core_ops): Now a record_full_core_target.
11229 (record_full_target::detach, record_full_target::disconnect)
11230 (record_full_core_target::disconnect)
11231 (record_full_target::mourn_inferior, record_full_target::kill):
11232 New.
11233 (record_full_open, record_full_close, record_full_async): Refactor
11234 as methods of the record_full_base_target class.
11235 (record_full_resume, record_full_commit_resume): Refactor
11236 as methods of the record_full_target class.
11237 (record_full_wait, record_full_stopped_by_watchpoint)
11238 (record_full_stopped_data_address)
11239 (record_full_stopped_by_sw_breakpoint)
11240 (record_full_supports_stopped_by_sw_breakpoint)
11241 (record_full_stopped_by_hw_breakpoint)
11242 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11243 methods of the record_full_base_target class.
11244 (record_full_store_registers, record_full_xfer_partial)
11245 (record_full_insert_breakpoint, record_full_remove_breakpoint):
11246 Refactor as methods of the record_full_target class.
11247 (record_full_can_execute_reverse, record_full_get_bookmark)
11248 (record_full_goto_bookmark, record_full_execution_direction)
11249 (record_full_record_method, record_full_info, record_full_delete)
11250 (record_full_is_replaying, record_full_will_replay)
11251 (record_full_goto_begin, record_full_goto_end, record_full_goto)
11252 (record_full_stop_replaying): Refactor as methods of the
11253 record_full_base_target class.
11254 (record_full_core_resume, record_full_core_kill)
11255 (record_full_core_fetch_registers)
11256 (record_full_core_prepare_to_store)
11257 (record_full_core_store_registers, record_full_core_xfer_partial)
11258 (record_full_core_insert_breakpoint)
11259 (record_full_core_remove_breakpoint)
11260 (record_full_core_has_execution): Refactor
11261 as methods of the record_full_core_target class.
11262 (record_full_base_target::supports_delete_record): New.
11263 (init_record_full_ops): Delete.
11264 (init_record_full_core_ops): Delete.
11265 (record_full_save): Refactor as method of the
11266 record_full_base_target class.
11267 (_initialize_record_full): Remove references to
11268 init_record_full_ops and init_record_full_core_ops.
11269
11270 * remote.c (remote_target, extended_remote_target): New classes.
11271 (remote_ops): Now a remote_target.
11272 (extended_remote_ops): Now an extended_remote_target.
11273 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11274 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11275 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11276 (remote_pass_signals, remote_set_syscall_catchpoint)
11277 (remote_program_signals, )
11278 (remote_thread_always_alive): Remove target_ops parameter.
11279 (remote_thread_alive, remote_thread_name)
11280 (remote_update_thread_list, remote_threads_extra_info)
11281 (remote_static_tracepoint_marker_at)
11282 (remote_static_tracepoint_markers_by_strid)
11283 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11284 (remote_open): Refactor as methods of remote_target.
11285 (extended_remote_open, extended_remote_detach)
11286 (extended_remote_attach, extended_remote_post_attach):
11287 (extended_remote_supports_disable_randomization)
11288 (extended_remote_create_inferior): : Refactor as method of
11289 extended_remote_target.
11290 (remote_set_permissions, remote_open_1, remote_detach)
11291 (remote_follow_fork, remote_follow_exec, remote_disconnect)
11292 (remote_resume, remote_commit_resume, remote_stop)
11293 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11294 (remote_terminal_ours, remote_wait, remote_fetch_registers)
11295 (remote_prepare_to_store, remote_store_registers)
11296 (remote_flash_erase, remote_flash_done, remote_files_info)
11297 (remote_kill, remote_mourn, remote_insert_breakpoint)
11298 (remote_remove_breakpoint, remote_insert_watchpoint)
11299 (remote_watchpoint_addr_within_range)
11300 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11301 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11302 (remote_supports_stopped_by_sw_breakpoint)
11303 (remote_stopped_by_hw_breakpoint)
11304 (remote_supports_stopped_by_hw_breakpoint)
11305 (remote_stopped_by_watchpoint, remote_stopped_data_address)
11306 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11307 (remote_verify_memory): Refactor as methods of remote_target.
11308 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11309 parameter.
11310 (remote_xfer_partial, remote_get_memory_xfer_limit)
11311 (remote_search_memory, remote_rcmd, remote_memory_map)
11312 (remote_pid_to_str, remote_get_thread_local_address)
11313 (remote_get_tib_address, remote_read_description): Refactor as
11314 methods of remote_target.
11315 (remote_target::fileio_open, remote_target::fileio_pwrite)
11316 (remote_target::fileio_pread, remote_target::fileio_close): New.
11317 (remote_hostio_readlink, remote_hostio_fstat)
11318 (remote_filesystem_is_local, remote_can_execute_reverse)
11319 (remote_supports_non_stop, remote_supports_disable_randomization)
11320 (remote_supports_multi_process, remote_supports_cond_breakpoints)
11321 (remote_supports_enable_disable_tracepoint)
11322 (remote_supports_string_tracing)
11323 (remote_can_run_breakpoint_commands, remote_trace_init)
11324 (remote_download_tracepoint, remote_can_download_tracepoint)
11325 (remote_download_trace_state_variable, remote_enable_tracepoint)
11326 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11327 (remote_trace_start, remote_get_trace_status)
11328 (remote_get_tracepoint_status, remote_trace_stop)
11329 (remote_trace_find, remote_get_trace_state_variable_value)
11330 (remote_save_trace_data, remote_get_raw_trace_data)
11331 (remote_set_disconnected_tracing, remote_core_of_thread)
11332 (remote_set_circular_trace_buffer, remote_traceframe_info)
11333 (remote_get_min_fast_tracepoint_insn_len)
11334 (remote_set_trace_buffer_size, remote_set_trace_notes)
11335 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11336 (remote_disable_btrace, remote_teardown_btrace)
11337 (remote_read_btrace, remote_btrace_conf)
11338 (remote_augmented_libraries_svr4_read, remote_load)
11339 (remote_pid_to_exec_file, remote_can_do_single_step)
11340 (remote_execution_direction, remote_thread_handle_to_thread_info):
11341 Refactor as methods of remote_target.
11342 (init_remote_ops, init_extended_remote_ops): Delete.
11343 (remote_can_async_p, remote_is_async_p, remote_async)
11344 (remote_thread_events, remote_upload_tracepoints)
11345 (remote_upload_trace_state_variables): Refactor as methods of
11346 remote_target.
11347 (_initialize_remote): Remove references to init_remote_ops and
11348 init_extended_remote_ops.
11349
11350 * remote-sim.c (gdbsim_target): New class.
11351 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11352 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11353 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11354 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11355 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11356 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11357 Refactor as methods of gdbsim_target.
11358 (gdbsim_ops): Now a gdbsim_target.
11359 (init_gdbsim_ops): Delete.
11360 (gdbsim_cntrl_c): Adjust.
11361 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11362
11363 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11364 (the_amd64_linux_nat_target): New.
11365 (amd64_linux_fetch_inferior_registers)
11366 (amd64_linux_store_inferior_registers): Refactor as methods of
11367 amd64_linux_nat_target.
11368 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
11369 * i386-linux-nat.c: Don't include "linux-nat.h".
11370 (i386_linux_nat_target): New class.
11371 (the_i386_linux_nat_target): New.
11372 (i386_linux_fetch_inferior_registers)
11373 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11374 as methods of i386_linux_nat_target.
11375 (_initialize_i386_linux_nat): Adjust. Set linux_target.
11376 * inf-child.c (inf_child_ops): Delete.
11377 (inf_child_fetch_inferior_registers)
11378 (inf_child_store_inferior_registers): Delete.
11379 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11380 methods of inf_child_target.
11381 (inf_child_target::supports_terminal_ours)
11382 (inf_child_target::terminal_init)
11383 (inf_child_target::terminal_inferior)
11384 (inf_child_target::terminal_ours_for_output)
11385 (inf_child_target::terminal_ours, inf_child_target::interrupt)
11386 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11387 New.
11388 (inf_child_open, inf_child_disconnect, inf_child_close)
11389 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11390 (inf_child_post_startup_inferior, inf_child_can_run)
11391 (inf_child_pid_to_exec_file): Refactor as methods of
11392 inf_child_target.
11393 (inf_child_follow_fork): Delete.
11394 (inf_child_target::can_create_inferior)
11395 (inf_child_target::can_attach): New.
11396 (inf_child_target::has_all_memory, inf_child_target::has_memory)
11397 (inf_child_target::has_stack, inf_child_target::has_registers)
11398 (inf_child_target::has_execution): New.
11399 (inf_child_fileio_open, inf_child_fileio_pwrite)
11400 (inf_child_fileio_pread, inf_child_fileio_fstat)
11401 (inf_child_fileio_close, inf_child_fileio_unlink)
11402 (inf_child_fileio_readlink, inf_child_use_agent)
11403 (inf_child_can_use_agent): Refactor as methods of
11404 inf_child_target.
11405 (return_zero, inf_child_target): Delete.
11406 (inf_child_target::inf_child_target): New.
11407 * inf-child.h: Include "target.h".
11408 (inf_child_target): Delete function prototype.
11409 (inf_child_target): New class.
11410 (inf_child_open_target, inf_child_mourn_inferior)
11411 (inf_child_maybe_unpush_target): Delete.
11412 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11413 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11414 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11415 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11416 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11417 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11418 (inf_ptrace_wait, inf_ptrace_xfer_partial)
11419 (inf_ptrace_thread_alive, inf_ptrace_files_info)
11420 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11421 methods of inf_ptrace_target.
11422 (inf_ptrace_target): Delete function.
11423 * inf-ptrace.h: Include "inf-child.h".
11424 (inf_ptrace_target): Delete function declaration.
11425 (inf_ptrace_target): New class.
11426 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11427 * linux-nat.c (linux_target): New.
11428 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11429 (linux_nat_target::~linux_nat_target): New.
11430 (linux_child_post_attach, linux_child_post_startup_inferior)
11431 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11432 (linux_child_remove_fork_catchpoint)
11433 (linux_child_insert_vfork_catchpoint)
11434 (linux_child_remove_vfork_catchpoint)
11435 (linux_child_insert_exec_catchpoint)
11436 (linux_child_remove_exec_catchpoint)
11437 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11438 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11439 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11440 (linux_nat_stopped_data_address)
11441 (linux_nat_stopped_by_sw_breakpoint)
11442 (linux_nat_supports_stopped_by_sw_breakpoint)
11443 (linux_nat_stopped_by_hw_breakpoint)
11444 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11445 (linux_nat_kill, linux_nat_mourn_inferior)
11446 (linux_nat_xfer_partial, linux_nat_thread_alive)
11447 (linux_nat_update_thread_list, linux_nat_pid_to_str)
11448 (linux_nat_thread_name, linux_child_pid_to_exec_file)
11449 (linux_child_static_tracepoint_markers_by_strid)
11450 (linux_nat_is_async_p, linux_nat_can_async_p)
11451 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11452 (linux_nat_supports_multi_process)
11453 (linux_nat_supports_disable_randomization, linux_nat_async)
11454 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11455 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11456 (linux_nat_fileio_open, linux_nat_fileio_readlink)
11457 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11458 methods of linux_nat_target.
11459 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11460 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11461 parameter.
11462 (check_stopped_by_watchpoint): Adjust.
11463 (linux_xfer_partial): Delete.
11464 (linux_target_install_ops, linux_target, linux_nat_add_target):
11465 Delete.
11466 (linux_nat_target::linux_nat_target): New.
11467 * linux-nat.h: Include "inf-ptrace.h".
11468 (linux_nat_target): New.
11469 (linux_target, linux_target_install_ops, linux_nat_add_target):
11470 Delete function declarations.
11471 (linux_target): Declare global.
11472 * linux-thread-db.c (thread_db_target): New.
11473 (thread_db_target::thread_db_target): New.
11474 (thread_db_ops): Delete.
11475 (the_thread_db_target): New.
11476 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11477 (thread_db_update_thread_list, thread_db_pid_to_str)
11478 (thread_db_extra_thread_info)
11479 (thread_db_thread_handle_to_thread_info)
11480 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11481 (thread_db_resume): Refactor as methods of thread_db_target.
11482 (init_thread_db_ops): Delete.
11483 (_initialize_thread_db): Remove reference to init_thread_db_ops.
11484 * x86-linux-nat.c: Don't include "linux-nat.h".
11485 (super_post_startup_inferior): Delete.
11486 (x86_linux_nat_target::~x86_linux_nat_target): New.
11487 (x86_linux_child_post_startup_inferior)
11488 (x86_linux_read_description, x86_linux_enable_btrace)
11489 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11490 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11491 methods of x86_linux_nat_target.
11492 (x86_linux_create_target): Delete. Bits folded ...
11493 (x86_linux_add_target): ... here. Now takes a linux_nat_target
11494 pointer.
11495 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11496 (x86_linux_nat_target): New class.
11497 (x86_linux_create_target): Delete.
11498 (x86_linux_add_target): Now takes a linux_nat_target pointer.
11499 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11500 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11501 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11502 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11503 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11504 make extern.
11505 (x86_use_watchpoints): Delete.
11506 * x86-nat.h: Include "breakpoint.h" and "target.h".
11507 (x86_use_watchpoints): Delete.
11508 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11509 (x86_stopped_by_watchpoint, x86_stopped_data_address)
11510 (x86_insert_watchpoint, x86_remove_watchpoint)
11511 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11512 (x86_stopped_by_hw_breakpoint): New declarations.
11513 (x86_nat_target): New template class.
11514
11515 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11516 (the_ppc_linux_nat_target): New.
11517 (ppc_linux_fetch_inferior_registers)
11518 (ppc_linux_can_use_hw_breakpoint)
11519 (ppc_linux_region_ok_for_hw_watchpoint)
11520 (ppc_linux_ranged_break_num_registers)
11521 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11522 (ppc_linux_insert_mask_watchpoint)
11523 (ppc_linux_remove_mask_watchpoint)
11524 (ppc_linux_can_accel_watchpoint_condition)
11525 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11526 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11527 (ppc_linux_watchpoint_addr_within_range)
11528 (ppc_linux_masked_watch_num_registers)
11529 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11530 (ppc_linux_read_description): Refactor as methods of
11531 ppc_linux_nat_target.
11532 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
11533
11534 * procfs.c (procfs_xfer_partial): Delete forward declaration.
11535 (procfs_target): New class.
11536 (the_procfs_target): New.
11537 (procfs_target): Delete function.
11538 (procfs_auxv_parse, procfs_attach, procfs_detach)
11539 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11540 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11541 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11542 (procfs_create_inferior, procfs_update_thread_list)
11543 (procfs_thread_alive, procfs_pid_to_str)
11544 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11545 (procfs_stopped_data_address, procfs_insert_watchpoint)
11546 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11547 (proc_find_memory_regions, procfs_info_proc)
11548 (procfs_make_note_section): Refactor as methods of procfs_target.
11549 (_initialize_procfs): Adjust.
11550 * sol-thread.c (sol_thread_target): New class.
11551 (sol_thread_ops): Now a sol_thread_target.
11552 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11553 (sol_thread_fetch_registers, sol_thread_store_registers)
11554 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11555 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11556 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11557 (init_sol_thread_ops): Delete.
11558 (_initialize_sol_thread): Adjust. Remove references to
11559 init_sol_thread_ops and complete_target_initialization.
11560
11561 * windows-nat.c (windows_nat_target): New class.
11562 (windows_fetch_inferior_registers)
11563 (windows_store_inferior_registers, windows_resume, windows_wait)
11564 (windows_attach, windows_detach, windows_pid_to_exec_file)
11565 (windows_files_info, windows_create_inferior)
11566 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11567 (windows_close, windows_pid_to_str, windows_xfer_partial)
11568 (windows_get_tib_address, windows_get_ada_task_ptid)
11569 (windows_thread_name, windows_thread_alive): Refactor as
11570 windows_nat_target methods.
11571 (do_initial_windows_stuff): Adjust.
11572 (windows_target): Delete function.
11573 (_initialize_windows_nat): Adjust.
11574
11575 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11576 (darwin_mourn_inferior, darwin_kill_inferior)
11577 (darwin_create_inferior, darwin_attach, darwin_detach)
11578 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11579 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11580 (darwin_supports_multi_process): Refactor as darwin_nat_target
11581 methods.
11582 (darwin_resume_to, darwin_files_info): Delete.
11583 (_initialize_darwin_inferior): Rename to ...
11584 (_initialize_darwin_nat): ... this. Adjust to C++ification.
11585 * darwin-nat.h: Include "inf-child.h".
11586 (darwin_nat_target): New class.
11587 (darwin_complete_target): Delete.
11588 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11589 (darwin_target): New.
11590 (i386_darwin_fetch_inferior_registers)
11591 (i386_darwin_store_inferior_registers): Refactor as methods of
11592 darwin_nat_target.
11593 (darwin_complete_target): Delete, with ...
11594 (_initialize_i386_darwin_nat): ... bits factored out here.
11595
11596 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11597 (the_alpha_linux_nat_target): New.
11598 (alpha_linux_register_u_offset): Refactor as
11599 alpha_linux_nat_target method.
11600 (_initialize_alpha_linux_nat): Adjust.
11601 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11602 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11603 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11604 methods of linux_nat_trad_target.
11605 (linux_trad_target): Delete.
11606 * linux-nat-trad.h (linux_trad_target): Delete function.
11607 (linux_nat_trad_target): New class.
11608 * mips-linux-nat.c (mips_linux_nat_target): New class.
11609 (super_fetch_registers, super_store_registers, super_close):
11610 Delete.
11611 (the_mips_linux_nat_target): New.
11612 (mips64_linux_regsets_fetch_registers)
11613 (mips64_linux_regsets_store_registers)
11614 (mips64_linux_fetch_registers, mips64_linux_store_registers)
11615 (mips_linux_register_u_offset, mips_linux_read_description)
11616 (mips_linux_can_use_hw_breakpoint)
11617 (mips_linux_stopped_by_watchpoint)
11618 (mips_linux_stopped_data_address)
11619 (mips_linux_region_ok_for_hw_watchpoint)
11620 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11621 (mips_linux_close): Refactor as methods of mips_linux_nat.
11622 (_initialize_mips_linux_nat): Adjust to C++ification.
11623
11624 * aix-thread.c (aix_thread_target): New class.
11625 (aix_thread_ops): Now an aix_thread_target.
11626 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11627 (aix_thread_fetch_registers, aix_thread_store_registers)
11628 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11629 (aix_thread_thread_alive, aix_thread_pid_to_str)
11630 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11631 Refactor as methods of aix_thread_target.
11632 (init_aix_thread_ops): Delete.
11633 (_initialize_aix_thread): Remove references to init_aix_thread_ops
11634 and complete_target_initialization.
11635 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11636 (rs6000_nat_target): New class.
11637 (the_rs6000_nat_target): New.
11638 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11639 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11640 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11641 (super_create_inferior): Delete.
11642 (_initialize_rs6000_nat): Adjust to C++ification.
11643
11644 * arm-linux-nat.c (arm_linux_nat_target): New class.
11645 (the_arm_linux_nat_target): New.
11646 (arm_linux_fetch_inferior_registers)
11647 (arm_linux_store_inferior_registers, arm_linux_read_description)
11648 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11649 (arm_linux_remove_hw_breakpoint)
11650 (arm_linux_region_ok_for_hw_watchpoint)
11651 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11652 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11653 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11654 arm_linux_nat_target.
11655 (_initialize_arm_linux_nat): Adjust to C++ification.
11656
11657 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11658 (the_aarch64_linux_nat_target): New.
11659 (aarch64_linux_fetch_inferior_registers)
11660 (aarch64_linux_store_inferior_registers)
11661 (aarch64_linux_child_post_startup_inferior)
11662 (aarch64_linux_read_description)
11663 (aarch64_linux_can_use_hw_breakpoint)
11664 (aarch64_linux_insert_hw_breakpoint)
11665 (aarch64_linux_remove_hw_breakpoint)
11666 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11667 (aarch64_linux_region_ok_for_hw_watchpoint)
11668 (aarch64_linux_stopped_data_address)
11669 (aarch64_linux_stopped_by_watchpoint)
11670 (aarch64_linux_watchpoint_addr_within_range)
11671 (aarch64_linux_can_do_single_step): Refactor as methods of
11672 aarch64_linux_nat_target.
11673 (super_post_startup_inferior): Delete.
11674 (_initialize_aarch64_linux_nat): Adjust to C++ification.
11675
11676 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11677 (the_hppa_linux_nat_target): New.
11678 (hppa_linux_fetch_inferior_registers)
11679 (hppa_linux_store_inferior_registers): Refactor as methods of
11680 hppa_linux_nat_target.
11681 (_initialize_hppa_linux_nat): Adjust to C++ification.
11682
11683 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11684 (the_ia64_linux_nat_target): New.
11685 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11686 (ia64_linux_stopped_data_address)
11687 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11688 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11689 ia64_linux_nat_target methods.
11690 (super_xfer_partial): Delete.
11691 (_initialize_ia64_linux_nat): Adjust to C++ification.
11692
11693 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11694 (the_m32r_linux_nat_target): New.
11695 (m32r_linux_fetch_inferior_registers)
11696 (m32r_linux_store_inferior_registers): Refactor as
11697 m32r_linux_nat_target methods.
11698 (_initialize_m32r_linux_nat): Adjust to C++ification.
11699
11700 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11701 (the_m68k_linux_nat_target): New.
11702 (m68k_linux_fetch_inferior_registers)
11703 (m68k_linux_store_inferior_registers): Refactor as
11704 m68k_linux_nat_target methods.
11705 (_initialize_m68k_linux_nat): Adjust to C++ification.
11706
11707 * s390-linux-nat.c (s390_linux_nat_target): New class.
11708 (the_s390_linux_nat_target): New.
11709 (s390_linux_fetch_inferior_registers)
11710 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11711 (s390_insert_watchpoint, s390_remove_watchpoint)
11712 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11713 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11714 (s390_auxv_parse, s390_read_description): Refactor as methods of
11715 s390_linux_nat_target.
11716 (_initialize_s390_nat): Adjust to C++ification.
11717
11718 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11719 (the_sparc_linux_nat_target): New.
11720 (_initialize_sparc_linux_nat): Adjust to C++ification.
11721 * sparc-nat.c (sparc_fetch_inferior_registers)
11722 (sparc_store_inferior_registers): Remove target_ops parameter.
11723 * sparc-nat.h (sparc_fetch_inferior_registers)
11724 (sparc_store_inferior_registers): Remove target_ops parameter.
11725 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11726 (the_sparc64_linux_nat_target): New.
11727 (_initialize_sparc64_linux_nat): Adjust to C++ification.
11728
11729 * spu-linux-nat.c (spu_linux_nat_target): New class.
11730 (the_spu_linux_nat_target): New.
11731 (spu_child_post_startup_inferior, spu_child_post_attach)
11732 (spu_child_wait, spu_fetch_inferior_registers)
11733 (spu_store_inferior_registers, spu_xfer_partial)
11734 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11735 methods.
11736 (_initialize_spu_nat): Adjust to C++ification.
11737
11738 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11739 (the_tilegx_linux_nat_target): New.
11740 (fetch_inferior_registers, store_inferior_registers):
11741 Refactor as methods.
11742 (_initialize_tile_linux_nat): Adjust to C++ification.
11743
11744 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11745 (the_xtensa_linux_nat_target): New.
11746 (xtensa_linux_fetch_inferior_registers)
11747 (xtensa_linux_store_inferior_registers): Refactor as
11748 xtensa_linux_nat_target methods.
11749 (_initialize_xtensa_linux_nat): Adjust to C++ification.
11750
11751 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11752 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11753 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11754 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11755 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11756 (fbsd_stopped_by_sw_breakpoint)
11757 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11758 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11759 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11760 (fbsd_post_startup_inferior, fbsd_post_attach)
11761 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11762 (fbsd_set_syscall_catchpoint)
11763 (super_xfer_partial, super_resume, super_wait)
11764 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11765 (fbsd_handle_debug_trap): Remove target_ops parameter.
11766 (fbsd_nat_add_target): Delete.
11767 * fbsd-nat.h: Include "inf-ptrace.h".
11768 (fbsd_nat_add_target): Delete.
11769 (USE_SIGTRAP_SIGINFO): Define.
11770 (fbsd_nat_target): New class.
11771
11772 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11773 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11774 (amd64bsd_target): Delete.
11775 * amd64-bsd-nat.h: New file.
11776 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11777 "x86-bsd-nat.h".
11778 (amd64_fbsd_nat_target): New class.
11779 (the_amd64_fbsd_nat_target): New.
11780 (amd64fbsd_read_description): Refactor as method of
11781 amd64_fbsd_nat_target.
11782 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11783 (_initialize_amd64fbsd_nat): Adjust to C++ification.
11784 * amd64-nat.h (amd64bsd_target): Delete function declaration.
11785 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11786 (i386bsd_store_inferior_registers): Remove target_ops parameter.
11787 (i386bsd_target): Delete.
11788 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11789 (i386bsd_fetch_inferior_registers)
11790 (i386bsd_store_inferior_registers): Declare.
11791 (i386_bsd_nat_target): New class.
11792 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11793 (the_i386_fbsd_nat_target): New.
11794 (i386fbsd_resume, i386fbsd_read_description): Refactor as
11795 i386_fbsd_nat_target methods.
11796 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11797 (_initialize_i386fbsd_nat): Adjust to C++ification.
11798 * x86-bsd-nat.c (super_mourn_inferior): Delete.
11799 (x86bsd_mourn_inferior, x86bsd_target): Delete.
11800 (_initialize_x86_bsd_nat): Adjust to C++ification.
11801 * x86-bsd-nat.h: Include "x86-nat.h".
11802 (x86bsd_target): Delete declaration.
11803 (x86bsd_nat_target): New class.
11804
11805 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11806 (the_aarch64_fbsd_nat_target): New.
11807 (aarch64_fbsd_fetch_inferior_registers)
11808 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11809 aarch64_fbsd_nat_target.
11810 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11811 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11812 (the_alpha_bsd_nat_target): New.
11813 (alphabsd_fetch_inferior_registers)
11814 (alphabsd_store_inferior_registers): Refactor as
11815 alpha_bsd_nat_target methods.
11816 (_initialize_alphabsd_nat): Refactor as methods of
11817 alpha_bsd_nat_target.
11818 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11819 (the_amd64_nbsd_nat_target): New.
11820 (_initialize_amd64nbsd_nat): Adjust to C++ification.
11821 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11822 (the_amd64_obsd_nat_target): New.
11823 (_initialize_amd64obsd_nat): Adjust to C++ification.
11824 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11825 (the_arm_fbsd_nat_target): New.
11826 (arm_fbsd_fetch_inferior_registers)
11827 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11828 (_initialize_arm_fbsd_nat): Refactor as methods of
11829 arm_fbsd_nat_target.
11830 (_initialize_arm_fbsd_nat): Adjust to C++ification.
11831 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11832 (the_arm_netbsd_nat_target): New.
11833 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11834 arm_netbsd_nat_target.
11835 (_initialize_arm_netbsd_nat): Adjust to C++ification.
11836 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11837 (the_hppa_nbsd_nat_target): New.
11838 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11839 hppa_nbsd_nat_target methods.
11840 (_initialize_hppanbsd_nat): Adjust to C++ification.
11841 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11842 (the_hppa_obsd_nat_target): New.
11843 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11844 methods of hppa_obsd_nat_target.
11845 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
11846 add_target.
11847 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11848 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
11849 add_target.
11850 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11851 (_initialize_i386obsd_nat): Use add_target.
11852 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11853 (the_m68k_bsd_nat_target): New.
11854 (m68kbsd_fetch_inferior_registers)
11855 (m68kbsd_store_inferior_registers): Refactor as methods of
11856 m68k_bsd_nat_target.
11857 (_initialize_m68kbsd_nat): Adjust to C++ification.
11858 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11859 (the_mips_fbsd_nat_target): New.
11860 (mips_fbsd_fetch_inferior_registers)
11861 (mips_fbsd_store_inferior_registers): Refactor as methods of
11862 mips_fbsd_nat_target.
11863 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
11864 add_target.
11865 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11866 (the_mips_nbsd_nat_target): New.
11867 (mipsnbsd_fetch_inferior_registers)
11868 (mipsnbsd_store_inferior_registers): Refactor as methods of
11869 mips_nbsd_nat_target.
11870 (_initialize_mipsnbsd_nat): Adjust to C++ification.
11871 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11872 (the_mips64_obsd_nat_target): New.
11873 (mips64obsd_fetch_inferior_registers)
11874 (mips64obsd_store_inferior_registers): Refactor as methods of
11875 mips64_obsd_nat_target.
11876 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
11877 add_target.
11878 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11879 nbsd_nat_target.
11880 * nbsd-nat.h: Include "inf-ptrace.h".
11881 (nbsd_nat_target): New class.
11882 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11883 (obsd_wait): Refactor as methods of obsd_nat_target.
11884 (obsd_add_target): Delete.
11885 * obsd-nat.h: Include "inf-ptrace.h".
11886 (obsd_nat_target): New class.
11887 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11888 (the_ppc_fbsd_nat_target): New.
11889 (ppcfbsd_fetch_inferior_registers)
11890 (ppcfbsd_store_inferior_registers): Refactor as methods of
11891 ppc_fbsd_nat_target.
11892 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
11893 add_target.
11894 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11895 (the_ppc_nbsd_nat_target): New.
11896 (ppcnbsd_fetch_inferior_registers)
11897 (ppcnbsd_store_inferior_registers): Refactor as methods of
11898 ppc_nbsd_nat_target.
11899 (_initialize_ppcnbsd_nat): Adjust to C++ification.
11900 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11901 (the_ppc_obsd_nat_target): New.
11902 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11903 methods of ppc_obsd_nat_target.
11904 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
11905 add_target.
11906 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11907 (the_sh_nbsd_nat_target): New.
11908 (shnbsd_fetch_inferior_registers)
11909 (shnbsd_store_inferior_registers): Refactor as methods of
11910 sh_nbsd_nat_target.
11911 (_initialize_shnbsd_nat): Adjust to C++ification.
11912 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11913 (inf_ptrace_xfer_partial): Delete.
11914 (sparc_xfer_partial, sparc_target): Delete.
11915 * sparc-nat.h (sparc_fetch_inferior_registers)
11916 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11917 (sparc_target): Delete function declaration.
11918 (sparc_target): New template class.
11919 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11920 (_initialize_sparcnbsd_nat): Adjust to C++ification.
11921 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11922 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
11923 add_target.
11924 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11925 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11926 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11927 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
11928 add_target.
11929 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11930 (the_vax_bsd_nat_target): New.
11931 (vaxbsd_fetch_inferior_registers)
11932 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11933 methods.
11934 (_initialize_vaxbsd_nat): Adjust to C++ification.
11935
11936 * bsd-kvm.c (bsd_kvm_target): New class.
11937 (bsd_kvm_ops): Now a bsd_kvm_target.
11938 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11939 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11940 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11941 bsd_kvm_target.
11942 (bsd_kvm_return_one): Delete.
11943 (bsd_kvm_add_target): Adjust to C++ification.
11944
11945 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11946 (nto_procfs_target_procfs): New classes.
11947 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11948 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11949 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11950 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11951 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11952 (procfs_remove_hw_breakpoint, procfs_resume)
11953 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11954 (procfs_kill_inferior, procfs_store_registers)
11955 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11956 as methods of nto_procfs_target.
11957 (nto_procfs_ops): Now an nto_procfs_target_procfs.
11958 (nto_native_ops): Delete.
11959 (procfs_open, procfs_native_open): Delete.
11960 (nto_native_ops): Now an nto_procfs_target_native.
11961 (init_procfs_targets): Adjust to C++ification.
11962 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11963 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11964 Refactor as methods of nto_procfs_target.
11965
11966 * go32-nat.c (go32_nat_target): New class.
11967 (the_go32_nat_target): New.
11968 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11969 (go32_store_registers, go32_xfer_partial, go32_files_info)
11970 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11971 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11972 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11973 (go32_pid_to_str): Refactor as methods of go32_nat_target.
11974 (go32_target): Delete.
11975 (_initialize_go32_nat): Adjust to C++ification.
11976
11977 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11978 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11979 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11980 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11981 gnu_nat_target.
11982 (gnu_target): Delete.
11983 * gnu-nat.h (gnu_target): Delete.
11984 (gnu_nat_target): New class.
11985 * i386-gnu-nat.c (gnu_base_target): New.
11986 (i386_gnu_nat_target): New class.
11987 (the_i386_gnu_nat_target): New.
11988 (_initialize_i386gnu_nat): Adjust to C++ification.
11989
11990 2018-05-02 Pedro Alves <palves@redhat.com>
11991
11992 * bfd-target.c (target_bfd_xclose): Rename to ...
11993 (target_bfd_close): ... this.
11994 (target_bfd_reopen): Adjust.
11995 * target.c (target_close): Remove references to to_xclose.
11996 * target.h (target_ops::to_xclose): Delete.
11997 (target_ops::to_close): Update comments.
11998
11999 2018-05-02 Pedro Alves <palves@redhat.com>
12000
12001 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
12002 "linux-nat.h".
12003 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
12004 * inf-ptrace.c (inf_ptrace_register_u_offset)
12005 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
12006 (inf_ptrace_store_register, inf_ptrace_store_registers)
12007 (inf_ptrace_trad_target): Move to ...
12008 * linux-nat-trad.c: ... this new file.
12009 * linux-nat-trad.h: New file.
12010 * linux-nat.c (linux_target_install_ops): Make extern.
12011 (linux_trad_target): Delete.
12012 * linux-nat.h (linux_trad_target): Delete declaration.
12013 (linux_target_install_ops): Declare.
12014 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
12015 "linux-nat.h".
12016
12017 2018-05-02 Pedro Alves <palves@redhat.com>
12018
12019 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12020 procfs_target/add_target here.
12021 * procfs.c (procfs_target): Make static.
12022 (_initialize_procfs): Call add_target here.
12023 * procfs.h (struct target_ops): Remove forward declaration.
12024 (procfs_target): Remove declaration.
12025 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12026
12027 2018-05-02 Pedro Alves <palves@redhat.com>
12028
12029 * procfs.c (procfs_stopped_by_watchpoint)
12030 (procfs_insert_watchpoint, procfs_remove_watchpoint)
12031 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12032 Forward declare.
12033 (procfs_use_watchpoints): Delete, move contents...
12034 (procfs_target): ... here.
12035 * procfs.h (procfs_use_watchpoints): Delete declaration.
12036 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12037 procfs_use_watchpoints.
12038 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12039 procfs_use_watchpoints.
12040
12041 2018-05-02 Tom Tromey <tom@tromey.com>
12042
12043 PR python/20084:
12044 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12045 and var_zuinteger_unlimited.
12046 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12047 and PARAM_ZUINTEGER_UNLIMITED.
12048 (set_parameter_value): Handle var_zuinteger and
12049 var_zuinteger_unlimited.
12050 (add_setshow_generic): Likewise.
12051 (parmpy_init): Likewise.
12052
12053 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
12054
12055 PR rust/23124
12056 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12057 pointer is not null before dereferencing it.
12058
12059 2018-04-30 Tom Tromey <tom@tromey.com>
12060
12061 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12062 is_mi_like_p.
12063
12064 2018-04-30 Tom Tromey <tom@tromey.com>
12065
12066 * breakpoint.c (mention): Remove use of is_mi_like_p.
12067 (print_mention_ranged_breakpoint): Likewise.
12068 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12069 of is_mi_like_p.
12070
12071 2018-04-30 Tom Tromey <tom@tromey.com>
12072
12073 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12074
12075 2018-04-30 Tom Tromey <tom@tromey.com>
12076
12077 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12078 (info_spu_event_command): Remove some uses of is_mi_like_p.
12079
12080 2018-04-30 Tom Tromey <tom@tromey.com>
12081
12082 * python/py-framefilter.c (py_print_single_arg)
12083 (enumerate_locals, py_print_args, py_print_frame): Remove some
12084 uses of is_mi_like_p.
12085
12086 2018-04-30 Tom Tromey <tom@tromey.com>
12087
12088 * ui-out.c: Update.
12089 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12090 * ui-out.h (ui_out::is_mi_like_p): Now const.
12091 (ui_out::do_is_mi_like_p): Now const.
12092 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12093
12094 2018-04-30 Tom Tromey <tom@tromey.com>
12095
12096 * varobj.c (varobj_set_visualizer): Use new_reference.
12097 * python/python.c (gdbpy_decode_line): Use new_reference.
12098 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12099 new_reference.
12100
12101 2018-04-30 Tom Tromey <tom@tromey.com>
12102
12103 * varobj.c (install_new_value): Use new_reference.
12104 * value.h (value_incref): Return void. Swap intro comment with
12105 value_decref.
12106 * value.c (set_value_parent): Use new_reference.
12107 (value_incref): Return void. Update intro comment.
12108 (release_value): Use new_reference.
12109 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12110
12111 2018-04-30 Tom Tromey <tom@tromey.com>
12112
12113 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12114 * gdb_bfd.h (new_bfd_ref): Remove.
12115 (gdb_bfd_open): Update comment.
12116 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12117 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12118 (gdb_bfd_fdopenr): Use new_reference.
12119 * exec.c (exec_file_attach): Use new_reference.
12120
12121 2018-04-30 Tom Tromey <tom@tromey.com>
12122
12123 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12124 method.
12125
12126 2018-04-30 Tom Tromey <tom@tromey.com>
12127
12128 * jit.c (jit_read_code_entry): Use type_align.
12129 * i386-tdep.c (i386_gdbarch_init): Don't call
12130 set_gdbarch_long_long_align_bit.
12131 * gdbarch.sh: Remove long_long_align_bit.
12132 * gdbarch.c, gdbarch.h: Rebuild.
12133 * arc-tdep.c (arc_type_align): New function.
12134 (arc_gdbarch_init): Use arc_type_align. Don't call
12135 set_gdbarch_long_long_align_bit.
12136
12137 2018-04-30 Tom Tromey <tom@tromey.com>
12138
12139 * rust-lang.c (rust_type_alignment): Remove.
12140 (rust_composite_type): Use type_align.
12141
12142 2018-04-30 Tom Tromey <tom@tromey.com>
12143
12144 * NEWS: Mention Type.align.
12145 * python/py-type.c (typy_get_alignof): New function.
12146 (type_object_getset): Add "alignof".
12147
12148 2018-04-30 Tom Tromey <tom@tromey.com>
12149
12150 PR exp/17095:
12151 * NEWS: Update.
12152 * std-operator.def (UNOP_ALIGNOF): New operator.
12153 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12154 New.
12155 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12156 * c-lang.c (c_op_print_tab): Add alignof.
12157 * c-exp.y (ALIGNOF): New token.
12158 (exp): Add "ALIGNOF" production.
12159 (ident_tokens): Add _Alignof and alignof.
12160
12161 2018-04-30 Tom Tromey <tom@tromey.com>
12162
12163 * i386-tdep.c (i386_type_align): New function.
12164 (i386_gdbarch_init): Update.
12165 * gdbarch.sh (type_align): New method.
12166 * gdbarch.c, gdbarch.h: Rebuild.
12167 * arch-utils.h (default_type_align): Declare.
12168 * arch-utils.c (default_type_align): New function.
12169 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12170 (struct type) <align_log2>: New field.
12171 <instance_flags>: Now a bitfield.
12172 (TYPE_RAW_ALIGN): New macro.
12173 (type_align, type_raw_align, set_type_align): Declare.
12174 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12175 functions.
12176 * dwarf2read.c (quirk_rust_enum): Set type alignment.
12177 (get_alignment, maybe_set_alignment): New functions.
12178 (read_structure_type, read_enumeration_type, read_array_type)
12179 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12180 (read_subrange_type, read_base_type): Set type alignment.
12181
12182 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
12183
12184 * dwarf2read.c (read_index_from_section): Use bool.
12185
12186 2018-04-29 Fabian Groffen <grobian@gentoo.org>
12187
12188 PR gdb/22950
12189 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12190 with #ifdef.
12191
12192 2018-04-29 John Reiser <jreiser@BitWagon.com>
12193
12194 PR build/22873
12195 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12196 last step, and do it atomically.
12197
12198 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
12199
12200 * compile/compile-c-types.c (convert_int, convert_float):
12201 Update for C FE v1.
12202
12203 2018-04-27 Tom Tromey <tom@tromey.com>
12204
12205 PR rust/22545:
12206 * rust-lang.c (rust_inclusive_range_type_p): New function.
12207 (rust_range): Handle inclusive ranges.
12208 (rust_compute_range): Likewise.
12209 * rust-exp.y (struct rust_op) <inclusive>: New field.
12210 (DOTDOTEQ): New constant.
12211 (range_expr): Add "..=" productions.
12212 (operator_tokens): Add "..=" token.
12213 (ast_range): Add "inclusive" parameter.
12214 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12215 ranges.
12216 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12217 bounds values.
12218 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12219 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12220 Update comments.
12221 * expprint.c (print_subexp_standard): Handle new bounds values.
12222 (dump_subexp_body_standard): Likewise.
12223
12224 2018-04-27 Tom Tromey <tom@tromey.com>
12225
12226 * configure: Rebuild.
12227 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12228 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12229 "OVERRIDE".
12230 (class symbol_needs_eval_context): Likewise.
12231 * dwarf2read.c (mock_mapped_index::symbol_name_count)
12232 (mock_mapped_index::symbol_name_at): Use "override". Remove
12233 "virtual".
12234 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12235 "override".
12236 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12237 * aarch64-tdep.c (instruction_reader::read): Use "override".
12238 (instruction_reader_test::read): Likewise.
12239 * arm-tdep.c (instruction_reader::read): Use "override".
12240 (instruction_reader_thumb::read): Likewise.
12241
12242 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
12243
12244 PR remote/9665
12245 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12246 instead of remote_send.
12247 (remote_send): Remove.
12248
12249 2018-04-26 Pedro Alves <palves@redhat.com>
12250
12251 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12252 find_function_start_sal instead of find_pc_line.
12253
12254 2018-04-26 Pedro Alves <palves@redhat.com>
12255
12256 * breakpoint.c (set_breakpoint_location_function): Handle
12257 mst_data_gnu_ifunc.
12258 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12259 * elfread.c (elf_symtab_read): Give data symbols with
12260 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12261 (elf_rel_plt_read): Update comment.
12262 * linespec.c (convert_linespec_to_sals): Handle
12263 mst_data_gnu_ifunc.
12264 (minsym_found): Handle mst_data_gnu_ifunc.
12265 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12266 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12267 * parse.c (find_minsym_type_and_address): Handle
12268 mst_data_gnu_ifunc.
12269 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12270 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12271 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12272 comment.
12273 <mst_data_gnu_ifunc>: New enumerator.
12274
12275 2018-04-26 Pedro Alves <palves@redhat.com>
12276
12277 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12278 (lookup_minimal_symbol_by_pc_section): ... this. Replace
12279 'want_trampoline' parameter by a lookup_msym_prefer parameter.
12280 Handle it.
12281 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12282 (lookup_minimal_symbol_by_pc): Adjust.
12283 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12284 (lookup_solib_trampoline_symbol_by_pc): Adjust.
12285 * minsyms.h (lookup_msym_prefer): New enum.
12286 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12287 parameter by a lookup_msym_prefer parameter.
12288
12289 2018-04-26 Pedro Alves <palves@redhat.com>
12290
12291 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12292 ends in "@plt" instead of looking at the symbol's section.
12293
12294 2018-04-26 Pedro Alves <palves@redhat.com>
12295
12296 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
12297 all references.
12298 (find_pc_partial_function_gnu_ifunc): Rename to ...
12299 (find_pc_partial_function): ... this, and remove references to
12300 'is_gnu_ifunc_p'.
12301 (find_pc_partial_function): Delete old implementation.
12302 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12303
12304 2018-04-26 Pedro Alves <palves@redhat.com>
12305
12306 * linespec.c (struct bound_minimal_symbol_search_key): New.
12307 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
12308 skip first line if we found a GNU ifunc minimal symbol by name.
12309 (compare_msymbols): Change parameters to work with a destructured
12310 lhs minsym.
12311 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12312 functions.
12313
12314 2018-04-26 Pedro Alves <palves@redhat.com>
12315
12316 * breakpoint.c (set_breakpoint_location_function): Don't resolve
12317 ifunc targets here. Instead, if we have an ifunc minsym, use its
12318 address/name.
12319 (add_location_to_breakpoint): Store the minsym and the objfile in
12320 the breakpoint location.
12321 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12322 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12323 Record the minsym in the sal.
12324 * symtab.h (symtab_and_line) <msymbol>: New field.
12325
12326 2018-04-26 Pedro Alves <palves@redhat.com>
12327
12328 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12329 unless we actually resolved the ifunc.
12330
12331 2018-04-26 Pedro Alves <palves@redhat.com>
12332
12333 * c-exp.y (variable production): Prefer ifunc minsyms over
12334 regular function symbols.
12335 * symtab.c (find_gnu_ifunc): New function.
12336 * minsyms.h (lookup_msym_prefer): New enum.
12337 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12338 parameter by a lookup_msym_prefer parameter.
12339 * symtab.h (find_gnu_ifunc): New declaration.
12340
12341 2018-04-26 Pedro Alves <palves@redhat.com>
12342
12343 * blockframe.c (find_gnu_ifunc_target_type): New function.
12344 (find_function_type): New.
12345 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12346 return a value with a memory address.
12347 (eval_call): For calls to GNU ifunc functions, try to find the
12348 type of the target function from the type that the resolver
12349 returns.
12350 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12351 symbols.
12352 * infcall.c (find_function_return_type): Delete.
12353 (find_function_addr): Add 'function_type' parameter. For calls to
12354 GNU ifunc functions, try to find the type of the target function
12355 from the type that the resolver returns, and return it via
12356 FUNCTION_TYPE.
12357 (call_function_by_hand_dummy): Adjust to use the function type
12358 returned by find_function_addr.
12359 (find_function_addr): Add 'function_type' parameter and move
12360 description here.
12361 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12362 declarations.
12363
12364 2018-04-26 Pedro Alves <palves@redhat.com>
12365
12366 * c-exp.y (variable production): Skip finding an alias for ifunc
12367 symbols.
12368
12369 2018-04-26 Pedro Alves <palves@redhat.com>
12370
12371 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12372
12373 2018-04-25 Pedro Alves <palves@redhat.com>
12374
12375 * infcmd.c (kill_command): Print the pid as string, not the whole
12376 thread's ptid. Add comment. s/has been killed/killed/ in output
12377 message.
12378 * remote.c (remote_detach_1): Print the pid as string, not the
12379 whole thread's ptid.
12380
12381 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12382 Sergio Durigan Junior <sergiodj@redhat.com>
12383 Pedro Alves <palves@redhat.com>
12384
12385 * infcmd.c (kill_command): Print message when inferior has
12386 been killed.
12387 * inferior.c (print_inferior_events): Remove 'static'. Set as
12388 '1'.
12389 (add_inferior): Improve message printed when
12390 'print_inferior_events' is on.
12391 (exit_inferior): Remove message printed when
12392 'print_inferior_events' is on.
12393 (detach_inferior): Improve message printed when
12394 'print_inferior_events' is on.
12395 (initialize_inferiors): Use 'add_inferior_silent' to set
12396 'current_inferior_'.
12397 * inferior.h (print_inferior_events): Declare here as
12398 'extern'.
12399 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12400 '[Detaching...]' messages when 'print_inferior_events' is on.
12401 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
12402 as prefix/suffix for messages. Remove periods. Fix erroneous
12403 'Detaching after fork from child...', replace it by '... from
12404 parent...'.
12405 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12406 prefix/suffix when printing 'Detaching...' messages. Print
12407 them when 'print_inferior_events' is on.
12408 * remote.c (remote_detach_1): Print message when detaching
12409 from inferior and '!is_fork_parent'.
12410
12411 2018-04-24 Tom Tromey <tom@tromey.com>
12412
12413 * cli-out.h: Reindent.
12414
12415 2018-04-24 Tom Tromey <tom@tromey.com>
12416
12417 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12418 (cli_ui_out::do_field_string): Use fputs_filtered.
12419 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12420
12421 2018-04-23 Tom Tromey <tom@tromey.com>
12422
12423 * guile/scm-frame.c (gdbscm_frame_read_var): Use
12424 gdb::unique_xmalloc_ptr.
12425
12426 2018-04-23 Tom Tromey <tom@tromey.com>
12427
12428 * configure: Rebuild.
12429
12430 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
12431
12432 PR gdb/23095
12433 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12434 prepare_for_testing. Set normal_bp to r_debug_state if target
12435 is bsd.
12436
12437 2018-04-21 Pedro Alves <palves@redhat.com>
12438 Rajendra SY <rajendra.sy@gmail.com>
12439
12440 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12441 * remote.c (extended_remote_attach): In all-stop mode, mark the
12442 thread as executing.
12443
12444 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
12445
12446 * thread.c (thread_apply_all_command): Fix comment.
12447 (thread_command): Fix comment.
12448
12449 2018-04-10 Alan Hayward <alan.hayward@arm.com>
12450
12451 * common/tdesc.h (tdesc_create_feature): Remove xml filename
12452 parameter.
12453 * features/aarch64-core.c (create_feature_aarch64_core):
12454 Regenerate.
12455 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12456 Likewise.
12457 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12458 Likewise.
12459 * features/i386/32bit-avx512.c
12460 (create_feature_i386_32bit_avx512): Likewise.
12461 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12462 Likewise.
12463 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12464 Likewise.
12465 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12466 Likewise.
12467 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12468 Likewise.
12469 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12470 Likewise.
12471 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12472 Likewise.
12473 * features/i386/64bit-avx512.c
12474 (create_feature_i386_64bit_avx512): Likewise.
12475 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12476 Likewise.
12477 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12478 Likewise.
12479 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12480 Likewise.
12481 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12482 Likewise.
12483 * features/i386/64bit-segments.c
12484 (create_feature_i386_64bit_segments): Likewise.
12485 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12486 Likewise.
12487 * features/i386/x32-core.c
12488 (create_feature_i386_x32_core): Likewise.
12489 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12490 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12491 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12492 * target-descriptions.c: In generated code, don't pass xml
12493 filename.
12494
12495 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12496
12497 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12498 (print_xml_feature::visit_post): Likewise.
12499 (print_xml_feature::visit): Likewise.
12500 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12501 (print_xml_feature): Add new class.
12502 * regformats/regdat.sh: Null xmltarget on feature targets.
12503 * target-descriptions.c (struct target_desc): Add xmltarget.
12504 (maintenance_check_tdesc_xml_convert): Add unittest function.
12505 (tdesc_get_features_xml): Add function to get xml.
12506 (maintenance_check_xml_descriptions): Test xml generation.
12507 * xml-tdesc.c (string_read_description_xml): Add function.
12508 * xml-tdesc.h (string_read_description_xml): Add declaration.
12509
12510 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12511
12512 * features/Makefile: Add feature marker to targets with new style
12513 target descriptions.
12514 * regformats/aarch64.dat: Regenerate.
12515 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12516 * regformats/i386/amd64-avx-linux.dat: Likewise.
12517 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12518 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12519 * regformats/i386/amd64-linux.dat: Likewise.
12520 * regformats/i386/amd64-mpx-linux.dat: Likewise.
12521 * regformats/i386/amd64.dat: Likewise.
12522 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12523 * regformats/i386/i386-avx-linux.dat: Likewise.
12524 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12525 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12526 * regformats/i386/i386-linux.dat: Likewise.
12527 * regformats/i386/i386-mmx-linux.dat: Likewise.
12528 * regformats/i386/i386-mpx-linux.dat: Likewise.
12529 * regformats/i386/i386.dat: Likewise.
12530 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12531 * regformats/i386/x32-avx-linux.dat: Likewise.
12532 * regformats/i386/x32-linux.dat: Likewise.
12533 * regformats/tic6x-c62x-linux.dat: Likewise.
12534 * regformats/tic6x-c64x-linux.dat: Likewise.
12535 * regformats/tic6x-c64xp-linux.dat: Likewise.
12536 * regformats/regdat.sh: Parse feature marker.
12537
12538 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12539
12540 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12541 (tdesc_osabi_name): Likewise.
12542 * target-descriptions.c (tdesc_architecture_name): Add new
12543 function.
12544 (tdesc_osabi_name): Likewise.
12545
12546 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12547
12548 * common/tdesc.c (tdesc_predefined_type): Move to here.
12549 (tdesc_named_type): Likewise.
12550 (tdesc_create_vector): Likewise.
12551 (tdesc_create_struct): Likewise.
12552 (tdesc_set_struct_size): Likewise.
12553 (tdesc_create_union): Likewise.
12554 (tdesc_create_flags): Likewise.
12555 (tdesc_create_enum): Likewise.
12556 (tdesc_add_field): Likewise.
12557 (tdesc_add_typed_bitfield): Likewise.
12558 (tdesc_add_bitfield): Likewise.
12559 (tdesc_add_flag): Likewise.
12560 (tdesc_add_enum_value): Likewise.
12561 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12562 (struct tdesc_type_vector): Likewise.
12563 (struct tdesc_type_field): Likewise.
12564 (struct tdesc_type_with_fields): Likewise.
12565 (tdesc_create_enum): Add declaration.
12566 (tdesc_add_typed_bitfield): Likewise.
12567 (tdesc_add_enum_value): Likewise.
12568 * target-descriptions.c (tdesc_type_field): Move from here.
12569 (tdesc_type_builtin): Likewise.
12570 (tdesc_type_vector): Likewise.
12571 (tdesc_type_with_fields): Likewise.
12572 (tdesc_predefined_types): Likewise.
12573 (tdesc_named_type): Likewise.
12574 (tdesc_create_vector): Likewise.
12575 (tdesc_create_struct): Likewise.
12576 (tdesc_set_struct_size): Likewise.
12577 (tdesc_create_union): Likewise.
12578 (tdesc_create_flags): Likewise.
12579 (tdesc_create_enum): Likewise.
12580 (tdesc_add_field): Likewise.
12581 (tdesc_add_typed_bitfield): Likewise.
12582 (tdesc_add_bitfield): Likewise.
12583 (tdesc_add_flag): Likewise.
12584 (tdesc_add_enum_value): Likewise.
12585 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12586 (tdesc_add_typed_bitfield): Likewise.
12587 (tdesc_add_enum_value): Likewise.
12588
12589 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12590
12591 * common/tdesc.c (tdesc_feature::accept): Move to here.
12592 (tdesc_feature::operator==): Likewise.
12593 (tdesc_create_reg): Likewise.
12594 * common/tdesc.h (tdesc_type_kind): Likewise.
12595 (struct tdesc_type): Likewise.
12596 (struct tdesc_feature): Likewise.
12597 * regformats/regdat.sh: Create a feature.
12598 * target-descriptions.c (tdesc_type_kind): Move from here.
12599 (tdesc_type): Likewise.
12600 (tdesc_type_up): Likewise.
12601 (tdesc_feature): Likewise.
12602 (tdesc_create_reg): Likewise.
12603
12604 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12605
12606 * Makefile.in: Add arch/tdesc.c
12607 * common/tdesc.c: New file.
12608 * common/tdesc.h (tdesc_element_visitor): Move to here.
12609 (tdesc_element): Likewise.
12610 (tdesc_reg): Likewise.
12611 (tdesc_reg_up): Likewise.
12612 * regformats/regdef.h (reg): Add offset to constructors.
12613 * target-descriptions.c (tdesc_element_visitor): Move from here.
12614 (tdesc_element): Likewise.
12615 (tdesc_reg): Likewise.
12616 (tdesc_reg_up): Likewise.
12617
12618 2018-04-17 Tom Tromey <tom@tromey.com>
12619
12620 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12621 discriminant field.
12622
12623 2018-04-17 Tom Tromey <tom@tromey.com>
12624
12625 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12626
12627 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
12628
12629 * symtab.c (print_symbol_info): Skip printing filename and line
12630 number when `last' is NULL.
12631 (symtab_symbol_info): Use empty string instead of NULL for first
12632 invocation of print_symbol_info.
12633 (rbreak_command): Pass NULL to `last' parameter of
12634 print_symbol_info.
12635
12636 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
12637
12638 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12639 instead of nullptr.
12640
12641 2018-04-16 Pedro Alves <palves@redhat.com>
12642
12643 * MAINTAINERS (sh): Remove.
12644 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12645 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12646 (ALLDEPFILES): Remove sh64-tdep.c.
12647 * NEWS: Mentions that support for SH-5/SH64 is removed.
12648 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12649 (sh*-*-openbsd*): Ditto.
12650 (sh64-*-elf*): Remove.
12651 (sh*): Remove.
12652 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12653 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12654 * sh-tdep.c: No longer include "sh64-tdep.h".
12655 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12656 * sh64-tdep.c, sh64-tdep.h: Remove files.
12657
12658 2018-04-16 Pedro Alves <palves@redhat.com>
12659
12660 * MAINTAINERS: Remove m88k.
12661 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12662 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12663 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12664 * NEWS: Mention that support for m88k was removed.
12665 * configure.host (m88*-*-*): Remove support.
12666 * configure.nat (m88k-*-*): Remove support.
12667 * configure.tgt (m88*-*-openbsd*): Remove.
12668 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12669
12670 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
12671
12672 * configure.tgt (x86_tobjs): New variable.
12673 (amd64_tobjs, i386_tobjs): Use it.
12674
12675 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12676
12677 * symtab.c (print_symbol_info): Precede the symbol definition by
12678 the line number when available.
12679 * NEWS: Advertise this enhancement.
12680
12681 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12682
12683 * NEWS (New options): announce set/show record btrace cpu.
12684 * btrace.c: Include record-btrace.h.
12685 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12686 the vendor is unknown.
12687 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
12688 Maybe overwrite the btrace configuration's cpu.
12689 (btrace_compute_ftrace): Add cpu parameter. Update callers.
12690 (btrace_fetch): Add cpu parameter. Update callers.
12691 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12692 Maybe overwrite the btrace configuration's cpu. Skip enabling
12693 errata workarounds if the vendor is unknown.
12694 * python/py-record-btrace.c: Include record-btrace.h.
12695 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12696 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12697 * record-btrace.c (record_btrace_cpu_state_kind): New.
12698 (record_btrace_cpu): New.
12699 (set_record_btrace_cpu_cmdlist): New.
12700 (record_btrace_get_cpu): New.
12701 (require_btrace_thread, record_btrace_info)
12702 (record_btrace_resume_thread): Call record_btrace_get_cpu.
12703 (cmd_set_record_btrace_cpu_none): New.
12704 (cmd_set_record_btrace_cpu_auto): New.
12705 (cmd_set_record_btrace_cpu): New.
12706 (cmd_show_record_btrace_cpu): New.
12707 (_initialize_record_btrace): Initialize set/show record btrace cpu
12708 commands.
12709 * record-btrace.h (record_btrace_get_cpu): New.
12710
12711 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12712
12713 * record.c (set_record_command): Fix typo in message.
12714
12715 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12716
12717 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12718
12719 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12720
12721 * infrun.c (process_event_stop_test): Call
12722 gdbarch_in_indirect_branch_thunk.
12723 * gdbarch.sh (in_indirect_branch_thunk): New.
12724 * gdbarch.c: Regenerated.
12725 * gdbarch.h: Regenerated.
12726 * x86-tdep.h: New.
12727 * x86-tdep.c: New.
12728 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12729 (HFILES_NO_SRCDIR): Add x86-tdep.h.
12730 (ALLDEPFILES): Add x86-tdep.c.
12731 * arch-utils.h (default_in_indirect_branch_thunk): New.
12732 * arch-utils.c (default_in_indirect_branch_thunk): New.
12733 * i386-tdep: Include x86-tdep.h.
12734 (i386_in_indirect_branch_thunk): New.
12735 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12736 function.
12737 * amd64-tdep: Include x86-tdep.h.
12738 (amd64_in_indirect_branch_thunk): New.
12739 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12740
12741 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12742
12743 PR gdb/23053
12744 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12745 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12746 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12747 regression.
12748
12749 2018-04-12 Tom Tromey <tom@tromey.com>
12750
12751 * rust-lang.c (rust_print_struct_def): Remove univariant code.
12752 (rust_evaluate_subexp): Likewise.
12753
12754 2018-04-12 Pedro Alves <palves@redhat.com>
12755
12756 * procfs.c (procfs_detach): Make forward declaration's prototype
12757 match definition's protototype.
12758 (proc_get_LDT_entry): Remove stale do_cleanups call.
12759
12760 2018-04-12 Pedro Alves <palves@redhat.com>
12761
12762 * target.h (target_ops::to_has_exited): Delete.
12763 (target_has_exited): Delete.
12764 * target-delegates.c: Regenerate.
12765
12766 2018-04-11 Pedro Alves <palves@redhat.com>
12767
12768 * target.c (fileio_fh_t::t): Add comment.
12769 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12770 (target_fileio_close): Handle a NULL target.
12771 (invalidate_fileio_fh): New.
12772 (target_close): Call it.
12773 * remote.c (remote_hostio_send_command): No longer check whether
12774 remote_desc is open.
12775
12776 2018-04-11 Pedro Alves <palves@redhat.com>
12777
12778 * target.c (fileio_fh_t): Make it a named struct instead of a
12779 typedef.
12780 (fileio_fh_t::is_closed): New method.
12781 (DEF_VEC_O (fileio_fh_t)): Remove.
12782 (fileio_fhandles): Now a std::vector.
12783 (is_closed_fileio_fh): Delete.
12784 (acquire_fileio_fd): Adjust. Rename parameters.
12785 (release_fileio_fd): Adjust.
12786 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12787 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12788 (target_fileio_close): Adjust.
12789
12790 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
12791
12792 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12793 index.
12794
12795 2018-04-10 Pedro Alves <palves@redhat.com>
12796
12797 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12798 (scoped_finish_thread_state): New class.
12799 * infcmd.c (run_command_1): Use it instead of finish_thread_state
12800 cleanup.
12801 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12802 (fetch_inferior_event, normal_stop): Likewise.
12803 * thread.c (finish_thread_state_cleanup): Delete.
12804
12805 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12806 Pedro Alves <palves@redhat.com>
12807
12808 * value.c: Include "selftest.h" and "common/array-view.h".
12809 (struct range) <operator ==>: New.
12810 (test_ranges_contain): New.
12811 (check_ranges_vector): New.
12812 (test_insert_into_bit_range_vector): New.
12813 (_initialize_values): Register selftests.
12814 * common/array-view.h (operator==, operator!=): New.
12815
12816 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12817
12818 * common/gdb_vecs.h (unordered_remove): Add overload that takes
12819 an iterator.
12820 * inline-frame.c: Include <algorithm>.
12821 (struct inline_state): Add constructor.
12822 (inline_state_s): Remove.
12823 (DEF_VEC_O(inline_state_s)): Remove.
12824 (inline_states): Change type to std::vector.
12825 (find_inline_frame_state): Adjust to std::vector.
12826 (allocate_inline_frame_state): Remove.
12827 (clear_inline_frame_state): Adjust to std::vector.
12828 (skip_inline_frames): Adjust to std::vector.
12829
12830 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12831
12832 * tracepoint.h (struct trace_state_variable): Add constructor.
12833 <name>: Change type to std::string.
12834 * tracepoint.c (tsv_s): Remove.
12835 (DEF_VEC_O(tsv_s)): Remove.
12836 (tvariables): Change to std::vector.
12837 (create_trace_state_variable): Adjust to std::vector.
12838 (find_trace_state_variable): Likewise.
12839 (find_trace_state_variable_by_number): Likewise.
12840 (delete_trace_state_variable): Likewise.
12841 (trace_variable_command): Adjust to std::string.
12842 (delete_trace_variable_command): Likewise.
12843 (tvariables_info_1): Adjust to std::vector.
12844 (save_trace_state_variables): Likewise.
12845 (start_tracing): Likewise.
12846 (merge_uploaded_trace_state_variables): Adjust to std::vector
12847 and std::string.
12848 * target.h (struct target_ops)
12849 <to_download_trace_state_variable>: Pass reference to
12850 trace_state_variable.
12851 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12852 * target-delegates.c: Re-generate.
12853 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12854 (mi_tsv_deleted): Likewise.
12855 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12856 * remote.c (remote_download_trace_state_variable): Change
12857 pointer to reference and adjust.
12858 * make-target-delegates (parse_argtypes): Handle references.
12859 (write_function_header): Likewise.
12860 (munge_type): Likewise.
12861
12862 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12863
12864 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12865 string_view-selftests.c.
12866 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12867 testsuite.
12868 * unittests/basic_string_view/cons/char/1.cc: Likewise.
12869 * unittests/basic_string_view/cons/char/2.cc: Likewise.
12870 * unittests/basic_string_view/cons/char/3.cc: Likewise.
12871 * unittests/basic_string_view/element_access/char/1.cc:
12872 Likewise.
12873 * unittests/basic_string_view/element_access/char/empty.cc:
12874 Likewise.
12875 * unittests/basic_string_view/element_access/char/front_back.cc:
12876 Likewise.
12877 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12878 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12879 Likewise.
12880 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12881 Likewise.
12882 * unittests/basic_string_view/modifiers/swap/char/1.cc:
12883 Likewise.
12884 * unittests/basic_string_view/operations/compare/char/1.cc:
12885 Likewise.
12886 * unittests/basic_string_view/operations/compare/char/13650.cc:
12887 Likewise.
12888 * unittests/basic_string_view/operations/copy/char/1.cc:
12889 Likewise.
12890 * unittests/basic_string_view/operations/data/char/1.cc:
12891 Likewise.
12892 * unittests/basic_string_view/operations/find/char/1.cc:
12893 Likewise.
12894 * unittests/basic_string_view/operations/find/char/2.cc:
12895 Likewise.
12896 * unittests/basic_string_view/operations/find/char/3.cc:
12897 Likewise.
12898 * unittests/basic_string_view/operations/find/char/4.cc:
12899 Likewise.
12900 * unittests/basic_string_view/operations/rfind/char/1.cc:
12901 Likewise.
12902 * unittests/basic_string_view/operations/rfind/char/2.cc:
12903 Likewise.
12904 * unittests/basic_string_view/operations/rfind/char/3.cc:
12905 Likewise.
12906 * unittests/basic_string_view/operations/substr/char/1.cc:
12907 Likewise.
12908 * unittests/basic_string_view/operators/char/2.cc: Likewise.
12909 * unittests/string_view-selftests.c: New file.
12910
12911 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12912
12913 * unittests/basic_string_view/capacity/1.cc: New file.
12914 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12915 * unittests/basic_string_view/cons/char/1.cc: New file.
12916 * unittests/basic_string_view/cons/char/2.cc: New file.
12917 * unittests/basic_string_view/cons/char/3.cc: New file.
12918 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12919 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12920 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12921 * unittests/basic_string_view/element_access/char/1.cc: New file.
12922 * unittests/basic_string_view/element_access/char/2.cc: New file.
12923 * unittests/basic_string_view/element_access/char/empty.cc: New file.
12924 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12925 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12926 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12927 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12928 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12929 * unittests/basic_string_view/include.cc: New file.
12930 * unittests/basic_string_view/inserters/char/1.cc: New file.
12931 * unittests/basic_string_view/inserters/char/2.cc: New file.
12932 * unittests/basic_string_view/inserters/char/3.cc: New file.
12933 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12934 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12935 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12936 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12937 * unittests/basic_string_view/literals/types.cc: New file.
12938 * unittests/basic_string_view/literals/values.cc: New file.
12939 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12940 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12941 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12942 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12943 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12944 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12945 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12946 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12947 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12948 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12949 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12950 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12951 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12952 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12953 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12954 * unittests/basic_string_view/operations/data/char/1.cc: New file.
12955 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12956 * unittests/basic_string_view/operations/find/char/1.cc: New file.
12957 * unittests/basic_string_view/operations/find/char/2.cc: New file.
12958 * unittests/basic_string_view/operations/find/char/3.cc: New file.
12959 * unittests/basic_string_view/operations/find/char/4.cc: New file.
12960 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12961 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12962 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12963 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12964 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12965 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12966 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12967 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12968 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12969 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12970 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12971 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12972 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12973 * unittests/basic_string_view/operators/char/2.cc: New file.
12974 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12975 * unittests/basic_string_view/range_access/char/1.cc: New file.
12976 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12977 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12978 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12979 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12980 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12981 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12982 * unittests/basic_string_view/requirements/typedefs.cc: New file.
12983 * unittests/basic_string_view/typedefs.cc: New file.
12984 * unittests/basic_string_view/types/1.cc: New file.
12985
12986 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12987
12988 * common/gdb_string_view.h: Remove libstdc++ implementation
12989 details, adjust to gdb reality.
12990 * common/gdb_string_view.tcc: Likewise.
12991 * cli/cli-script.c (struct string_view): Remove.
12992 (user_args) <m_args>: Change element type to gdb::string_view.
12993 (user_args::insert_args): Adjust.
12994
12995 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12996
12997 * common/gdb_string_view.h: New file.
12998 * common/gdb_string_view.tcc: New file.
12999
13000 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13001
13002 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
13003 * configure: Re-generate.
13004
13005 2018-04-09 Pedro Alves <palves@redhat.com>
13006
13007 * gdbarch.sh: Include "observable.h" instead of "observer.h".
13008 (set_target_gdbarch): Call
13009 gdb::observers::architecture_changed.notify instead of
13010 observer_notify_architecture_changed.
13011
13012 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13013
13014 * tracepoint.c (struct current_traceframe_cleanup): Remove.
13015 (do_restore_current_traceframe_cleanup): Remove.
13016 (restore_current_traceframe_cleanup_dtor): Remove.
13017 (make_cleanup_restore_current_traceframe): Remove.
13018 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
13019 New.
13020 * tracepoint.h (struct scoped_restore_current_traceframe): New.
13021 * infrun.c (fetch_inferior_event): Use
13022 scoped_restore_current_traceframe.
13023
13024 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13025
13026 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13027 Remove.
13028 <n_allocated_type_units>: Remove.
13029 <all_type_units>: Change to std::vector.
13030 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13031 to std::vector change.
13032 (dwarf2_per_objfile::get_cutu): Likewise.
13033 (dwarf2_per_objfile::get_tu): Likewise.
13034 (create_signatured_type_table_from_index): Likewise.
13035 (create_signatured_type_table_from_debug_names): Likewise.
13036 (dw2_symtab_iter_next): Likewise.
13037 (dw2_print_stats): Likewise.
13038 (dw2_expand_all_symtabs): Likewise.
13039 (dw2_expand_marked_cus): Likewise.
13040 (dw2_debug_names_iterator::next): Likewise.
13041 (dwarf2_initialize_objfile): Likewise.
13042 (add_signatured_type_cu_to_table): Likewise.
13043 (create_all_type_units): Likewise.
13044 (add_type_unit): Likewise.
13045 (struct tu_abbrev_offset): Add constructor.
13046 (build_type_psymtabs_1): Adjust to std::vector change.
13047 (print_tu_stats): Likewise.
13048 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13049 (write_debug_names): Likewise.
13050
13051 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13052
13053 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13054 Make an std::vector.
13055 <n_comp_units>: Remove.
13056 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13057 to std::vector change.
13058 (dwarf2_per_objfile::get_cutu): Likewise.
13059 (dwarf2_per_objfile::get_cu): Likewise.
13060 (create_cus_from_index): Likewise.
13061 (create_addrmap_from_index): Likewise.
13062 (create_addrmap_from_aranges): Likewise.
13063 (dwarf2_read_index): Likewise.
13064 (dw2_find_last_source_symtab): Likewise.
13065 (dw2_map_symtabs_matching_filename): Likewise.
13066 (dw2_symtab_iter_next): Likewise.
13067 (dw2_print_stats): Likewise.
13068 (dw2_expand_all_symtabs): Likewise.
13069 (dw2_expand_symtabs_with_fullname): Likewise.
13070 (dw2_expand_marked_cus): Likewise.
13071 (dw2_map_symbol_filenames): Likewise.
13072 (create_cus_from_debug_names): Likewise.
13073 (dwarf2_read_debug_names): Likewise.
13074 (dw2_debug_names_iterator::next): Likewise.
13075 (dwarf2_initialize_objfile): Likewise.
13076 (set_partial_user): Likewise.
13077 (dwarf2_build_psymtabs_hard): Likewise.
13078 (read_comp_units_from_section): Remove arguments, adjust to
13079 std::vector change.
13080 (create_all_comp_units): Adjust to std::vector and
13081 read_comp_units_from_section changes.
13082 (dwarf2_find_containing_comp_unit): Adjust to std::vector
13083 change.
13084 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13085 (psyms_seen_size): Likewise.
13086 (write_gdbindex): Likewise.
13087 (write_debug_names): Likewise.
13088
13089 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13090
13091 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13092 with dwarf2_per_objfile.
13093 (create_cus_from_index): Likewise.
13094 (create_signatured_type_table_from_index): Likewise.
13095 (dwarf2_read_index): Likewise.
13096 (dwarf2_initialize_objfile): Likewise.
13097 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
13098 per_cu rather than get_dwarf2_per_objfile.
13099
13100 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13101
13102 * dwarf2read.h (struct signatured_type): Forward declare.
13103 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13104 New methods.
13105 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13106 (dw2_get_cutu): ...this.
13107 (dwarf2_per_objfile::get_cu): Rename from...
13108 (dw2_get_cu): ...this.
13109 (dwarf2_per_objfile::get_tu): New.
13110 (create_addrmap_from_index): Adjust.
13111 (create_addrmap_from_aranges): Adjust.
13112 (dw2_find_last_source_symtab): Adjust.
13113 (dw2_map_symtabs_matching_filename): Adjust.
13114 (dw2_symtab_iter_next): Adjust.
13115 (dw2_print_stats): Adjust.
13116 (dw2_expand_all_symtabs): Adjust.
13117 (dw2_expand_symtabs_with_fullname): Adjust.
13118 (dw2_expand_marked_cus): Adjust.
13119 (dw_expand_symtabs_matching_file_matcher): Adjust.
13120 (dw2_map_symbol_filenames): Adjust.
13121 (dw2_debug_names_iterator::next): Adjust.
13122 (dwarf2_initialize_objfile): Adjust.
13123 (set_partial_user): Adjust.
13124 (dwarf2_build_psymtabs_hard): Adjust.
13125
13126 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13127
13128 * dwarf2read.c (create_signatured_type_table_from_debug_names):
13129 Remove unused variables.
13130 (dw2_map_symtabs_matching_filename): Likewise.
13131 (dwarf2_record_block_ranges): Likewise.
13132 (dwarf2_read_addr_index): Likewise.
13133 (follow_die_offset): Likewise.
13134
13135 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13136
13137 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13138 to symbol_file_add_main.
13139
13140 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13141
13142 PR mi/22299
13143 * mi/mi-console.c (do_fputc_async_safe): New.
13144 (mi_console_file::write_async_safe): New.
13145 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13146 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13147 New.
13148 * ui-file.c (ui_file::putstrn): Adjust call to
13149 fputstrn_unfiltered.
13150 * utils.c (printchar): Replace do_fputs and do_fprintf
13151 parameters by do_fputc.
13152 (fputstr_filtered): Adjust call to printchar.
13153 (fputstr_unfiltered): Likewise.
13154 (fputstrn_filtered): Likewise.
13155 (fputstrn_unfiltered): Add do_fputc parameter, pass to
13156 printchar.
13157 * utils.h (do_fputc_ftype): New typedef.
13158 (fputstrn_unfiltered): Add do_fputc parameter.
13159
13160 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
13161
13162 * regformats/i386/i386-avx.dat: Remove.
13163
13164 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13165
13166 PR gdb/22979
13167 * amd64-tdep.c (amd64_none_init_abi): New function.
13168 (amd64_x32_none_init_abi): New function.
13169 (_initialize_amd64_tdep): Register handlers for x86-64 and
13170 x64_32 with GDB_OSABI_NONE.
13171 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13172 GDB_OSABI_NONE osabi.
13173
13174 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13175
13176 PR gdb/22980
13177 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13178 GDB_OSABI_NONE.
13179 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13180 * osabi.c (gdb_osabi_names): Add "unknown" entry.
13181
13182 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
13183
13184 * common/byte-vector.h (char_vector): New type.
13185 * target.h (target_read_alloc): Return
13186 gdb::optional<byte_vector>.
13187 (target_read_stralloc): Return gdb::optional<char_vector>.
13188 (target_get_osdata): Return gdb::optional<char_vector>.
13189 * target.c (target_read_alloc_1): Templatize. Replacement
13190 manual memory management with vector.
13191 (target_read_alloc): Change return type, adjust.
13192 (target_read_stralloc): Change return type, adjust.
13193 (target_get_osdata): Change return type, adjust.
13194 * auxv.c (struct auxv_info) <length>: Remove.
13195 <data>: Change type to gdb::optional<byte_vector>.
13196 (auxv_inferior_data_cleanup): Free auxv_info with delete.
13197 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13198 (target_auxv_search): Adjust.
13199 (fprint_target_auxv): Adjust.
13200 * avr-tdep.c (avr_io_reg_read_command): Adjust.
13201 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13202 (linux_make_corefile_notes): Adjust.
13203 * osdata.c (get_osdata): Adjust.
13204 * remote.c (remote_get_threads_with_qxfer): Adjust.
13205 (remote_memory_map): Adjust.
13206 (remote_traceframe_info): Adjust.
13207 (btrace_read_config): Adjust.
13208 (remote_read_btrace): Adjust.
13209 (remote_pid_to_exec_file): Adjust.
13210 * solib-aix.c (solib_aix_get_library_list): Adjust.
13211 * solib-dsbt.c (decode_loadmap): Don't free buf.
13212 (dsbt_get_initial_loadmaps): Adjust.
13213 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13214 * solib-target.c (solib_target_current_sos): Adjust.
13215 * tracepoint.c (sdata_make_value): Adjust.
13216 * xml-support.c (xinclude_start_include): Adjust.
13217 (xml_fetch_content_from_file): Adjust.
13218 * xml-support.h (xml_fetch_another): Change return type.
13219 (xml_fetch_content_from_file): Change return type.
13220 * xml-syscall.c (xml_init_syscalls_info): Adjust.
13221 * xml-tdesc.c (file_read_description_xml): Adjust.
13222 (fetch_available_features_from_target): Change return type.
13223 (target_fetch_description_xml): Adjust.
13224 (target_read_description_xml): Adjust.
13225
13226 2018-04-06 Tom Tromey <tom@tromey.com>
13227
13228 * value.c (~value): Update.
13229 (struct value) <contents>: Now unique_xmalloc_ptr.
13230 (value_contents_bits_eq, allocate_value_contents)
13231 (value_contents_raw, value_contents_all_raw)
13232 (value_contents_for_printing, value_contents_for_printing_const)
13233 (set_value_enclosing_type): Update.
13234
13235 2018-04-06 Tom Tromey <tom@tromey.com>
13236
13237 * value.c (range_s): Remove typedef, VEC.
13238 (struct range): Add operator<.
13239 (range_lessthan): Remove.
13240 (ranges_contain): Change type.
13241 (~value): Update.
13242 (struct value) <unavailable, optimized_out>: Now std::vector.
13243 (value_entirely_available)
13244 (value_entirely_covered_by_range_vector)
13245 (value_entirely_unavailable, value_entirely_optimized_out):
13246 Update.
13247 (insert_into_bit_range_vector): Change argument type.
13248 (find_first_range_overlap): Likewise.
13249 (struct ranges_and_idx, value_contents_bits_eq)
13250 (require_not_optimized_out, require_available): Update.
13251 (ranges_copy_adjusted): Change argument types.
13252 (value_optimized_out, value_copy, value_fetch_lazy): Update.
13253
13254 2018-04-06 Tom Tromey <tom@tromey.com>
13255
13256 * value.c (~value): Update.
13257 (struct value) <parent>: Now a value_ref_ptr.
13258 (value_parent, set_value_parent, value_address, value_copy):
13259 Update.
13260
13261 2018-04-06 Tom Tromey <tom@tromey.com>
13262
13263 * value.c (struct value): Add constructor, destructor, and member
13264 initializers.
13265 (allocate_value_lazy, value_decref): Update.
13266
13267 2018-04-06 Tom Tromey <tom@tromey.com>
13268
13269 * value.c (struct value) <released, next>: Remove.
13270 (all_values): Now a std::vector.
13271 (allocate_value_lazy): Update.
13272 (value_next): Remove.
13273 (value_mark, value_free_to_mark, release_value)
13274 (value_release_to_mark): Update.
13275
13276 2018-04-06 Tom Tromey <tom@tromey.com>
13277
13278 * value.h (fetch_subexp_value, value_release_to_mark): Update.
13279 (free_value_chain): Remove.
13280 * value.c (free_value_chain): Remove.
13281 (value_release_to_mark): Return a std::vector.
13282 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13283 std::vector.
13284 (check_condition): Update.
13285 * eval.c (fetch_subexp_value): Change "val_chain" to a
13286 std::vector.
13287 * breakpoint.c (update_watchpoint): Update.
13288 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13289
13290 2018-04-06 Tom Tromey <tom@tromey.com>
13291
13292 * value.h (free_all_values): Remove.
13293 * value.c (free_all_values): Remove.
13294
13295 2018-04-06 Tom Tromey <tom@tromey.com>
13296
13297 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13298 (value_history_chain, value_history_count): Remove.
13299 (value_history): New global.
13300 (record_latest_value, access_value_history, show_values)
13301 (preserve_values): Update.
13302
13303 2018-04-06 Tom Tromey <tom@tromey.com>
13304
13305 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13306 * varobj.c (varobj_set_display_format, varobj_set_value)
13307 (install_default_visualizer, construct_visualizer)
13308 (install_new_value, ~varobj, varobj_get_value_type)
13309 (my_value_of_variable, varobj_editable_p): Update.
13310 * c-varobj.c (c_describe_child, c_value_of_variable)
13311 (cplus_number_of_children, cplus_describe_child): Update.
13312 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13313 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13314 (ada_value_of_variable, ada_value_is_changeable_p): Update.
13315
13316 2018-04-06 Tom Tromey <tom@tromey.com>
13317
13318 * printcmd.c (last_examine_address): Change type to
13319 value_ref_ptr.
13320 (do_examine, x_command): Update.
13321
13322 2018-04-06 Tom Tromey <tom@tromey.com>
13323
13324 * value.c (release_value): Update.
13325 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13326 (struct bpstats) <val>: Now a value_ref_ptr.
13327 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13328 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13329 (~watchpoint, print_it_watchpoint, watch_command_1)
13330 (invalidate_bp_value_on_memory_change): Update.
13331
13332 2018-04-06 Tom Tromey <tom@tromey.com>
13333
13334 * varobj.c (varobj_clear_saved_item)
13335 (update_dynamic_varobj_children, install_new_value, ~varobj):
13336 Update.
13337 * value.h (value_incref): Move declaration earlier.
13338 (value_decref): Rename from value_free.
13339 (struct value_ref_policy): New.
13340 (value_ref_ptr): New typedef.
13341 (struct value_deleter): Remove.
13342 (gdb_value_up): Remove typedef.
13343 (release_value): Change return type.
13344 (release_value_or_incref): Remove.
13345 * value.c (set_value_parent): Update.
13346 (value_incref): Change return type.
13347 (value_decref): Rename from value_free.
13348 (value_free_to_mark, free_all_values, free_value_chain): Update.
13349 (release_value): Return value_ref_ptr.
13350 (release_value_or_incref): Remove.
13351 (record_latest_value, set_internalvar, clear_internalvar):
13352 Update.
13353 * stack.c (info_frame_command): Don't call value_free.
13354 * python/py-value.c (valpy_dealloc, valpy_new)
13355 (value_to_value_object): Update.
13356 * printcmd.c (do_examine): Update.
13357 * opencl-lang.c (lval_func_free_closure): Update.
13358 * mi/mi-main.c (register_changed_p): Don't call value_free.
13359 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13360 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13361 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13362 value_free.
13363 * guile/scm-value.c (vlscm_free_value_smob)
13364 (vlscm_scm_from_value): Update.
13365 * frame.c (frame_register_unwind, frame_unwind_register_signed)
13366 (frame_unwind_register_unsigned, get_frame_register_bytes)
13367 (put_frame_register_bytes): Don't call value_free.
13368 * findvar.c (address_from_register): Don't call value_free.
13369 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13370 * dwarf2loc.c (entry_data_value_free_closure)
13371 (value_of_dwarf_reg_entry, free_pieced_value_closure)
13372 (dwarf2_evaluate_loc_desc_full): Update.
13373 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13374 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13375 (~watchpoint, watch_command_1)
13376 (invalidate_bp_value_on_memory_change): Update.
13377 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13378
13379 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
13380
13381 PR gdb/23022
13382 * warning.m4: Add -Wno-error=deprecated-register.
13383 * configure: Re-generate.
13384
13385 2018-04-05 Tom Tromey <tom@tromey.com>
13386
13387 * linespec.h: Remove include of "vec.h".
13388
13389 2018-04-05 Tom Tromey <tom@tromey.com>
13390
13391 * linespec.c (typep): Remove typedef.
13392 (find_methods, find_superclass_methods): Take a std::vector.
13393 (find_method): Use std::vector.
13394
13395 2018-04-05 Tom Tromey <tom@tromey.com>
13396
13397 * utils.c (compare_strings): Remove.
13398 * utils.h (compare_strings): Remove.
13399 * objc-lang.h (find_imps): Update.
13400 * objc-lang.c (find_methods): Take a std::vector.
13401 (uniquify_strings, find_imps): Likewise.
13402 * linespec.c (find_methods): Take a std::vector.
13403 (decode_objc): Use std::vector.
13404 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13405 a std::vector.
13406 (find_method, find_function_symbols): Use std::vector.
13407
13408 2018-04-05 Tom Tromey <tom@tromey.com>
13409
13410 * completer.c (completion_tracker::completion_tracker): Remove
13411 cast.
13412 (completion_tracker::discard_completions): Likewise.
13413 * breakpoint.c (ambiguous_names_p): Remove cast.
13414 * ada-lang.c (_initialize_ada_language): Remove cast.
13415 * utils.h (streq): Update.
13416 (streq_hash): Add new declaration.
13417 * utils.c (streq): Return bool.
13418 (streq_hash): New function.
13419
13420 2018-04-05 Tom Tromey <tom@tromey.com>
13421
13422 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13423 Remove a string copy.
13424
13425 2018-04-05 Tom Tromey <tom@tromey.com>
13426
13427 * linespec.c (filter_results): Use std::vector.
13428 (decode_line_2, decode_line_full): Update.
13429
13430 2018-04-05 Tom Tromey <tom@tromey.com>
13431
13432 * linespec.c (canonical_to_fullform): Return std::string.
13433 (filter_results): Update.
13434 (struct decode_line_2_item): Add constructor.
13435 <fullform, displayform>: Now std::string.
13436 (decode_line_2_compare_items): Now a std::sort comparator.
13437 (decode_line_2): Update.
13438
13439 2018-04-05 Tom Tromey <tom@tromey.com>
13440
13441 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13442 (unexpected_linespec_error): Update.
13443 (linespec_parse_basic, parse_linespec): Update.
13444
13445 2018-04-05 Tom Tromey <tom@tromey.com>
13446
13447 * linespec.c (linespec_parse_basic): Reindent.
13448
13449 2018-04-05 Tom Tromey <tom@tromey.com>
13450
13451 * minsyms.h (iterate_over_minimal_symbols): Update.
13452 * minsyms.c (iterate_over_minimal_symbols): Take a
13453 gdb::function_view.
13454 * linespec.c (struct collect_minsyms): Remove.
13455 (compare_msyms): Now a std::sort comparator.
13456 (add_minsym): Add parameters.
13457 (search_minsyms_for_name): Update. Use std::vector.
13458
13459 2018-04-03 Tom Tromey <tom@tromey.com>
13460
13461 * mipsread.c (read_alphacoff_dynamic_symtab): Use
13462 gdb::byte_vector.
13463
13464 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13465
13466 * MAINTAINERS (Write After Approval): Add Weimin Pan.
13467
13468 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13469
13470 PR gdb/16959
13471 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
13472 printing static type.
13473
13474 2018-04-01 Tom Tromey <tom@tromey.com>
13475
13476 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13477 (rs6000_xfer_shared_libraries): Update.
13478
13479 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
13480
13481 * common/gdb_vecs.h (char_ptr): Remove.
13482 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13483
13484 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13485
13486 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13487 with std::vector.
13488 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13489
13490 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13491
13492 * tracepoint.h (struct uploaded_tp): Initialize fields.
13493 <actions, step_actions, cmd_strings>: Change type to
13494 std::vector<char *>.
13495 * tracepoint.c (get_uploaded_tp): Allocate with new.
13496 (free_uploaded_tps): Free with delete.
13497 (parse_tracepoint_definition): Adjust to std::vector change.
13498 * breakpoint.c (read_uploaded_action): Likewise.
13499 (create_tracepoint_from_upload): Likewise.
13500 * ctf.c (ctf_write_uploaded_tp): Likewise.
13501 (SET_ARRAY_FIELD): Likewise.
13502 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13503
13504 2018-03-30 Tom Tromey <tom@tromey.com>
13505
13506 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
13507 std::unique_ptr.
13508 (svr4_keep_data_in_core): Update.
13509 (svr4_read_so_list): Update.
13510
13511 2018-03-30 Tom Tromey <tom@tromey.com>
13512
13513 * windows-nat.c (handle_output_debug_string, handle_exception):
13514 Update.
13515 * target.h (target_read_string): Update.
13516 * target.c (target_read_string): Change "string" to
13517 unique_xmalloc_ptr.
13518 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13519 Update.
13520 * solib-frv.c (frv_current_sos): Update.
13521 * solib-dsbt.c (dsbt_current_sos): Update.
13522 * solib-darwin.c (darwin_current_sos): Update.
13523 * linux-thread-db.c (inferior_has_bug): Update.
13524 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13525 Update. Remove alloca.
13526 * ada-lang.c (ada_main_name): Update.
13527
13528 2018-03-30 Tom Tromey <tom@tromey.com>
13529
13530 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13531 (struct dwo_file_deleter): New.
13532 (dwo_file_up): New typedef.
13533 (open_and_init_dwo_file): Use dwo_file_up.
13534 (free_dwo_file_cleanup): Remove.
13535
13536 2018-03-30 Tom Tromey <tom@tromey.com>
13537
13538 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13539 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13540
13541 2018-03-30 Tom Tromey <tom@tromey.com>
13542
13543 * dwarf2read.c (class free_cached_comp_units): New class.
13544 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13545 (free_cached_comp_units): Remove function.
13546
13547 2018-03-30 Tom Tromey <tom@tromey.com>
13548
13549 * utils.h (make_cleanup_unpush_target): Remove.
13550 * inf-ptrace.c (struct target_unpusher): New.
13551 (target_unpush_up) New typedef.
13552 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13553 target_unpush_up.
13554 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13555
13556 2018-03-27 Tom Tromey <tom@tromey.com>
13557
13558 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13559
13560 2018-03-27 Pedro Alves <palves@redhat.com>
13561 Tom Tromey <tom@tromey.com>
13562
13563 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13564 destructor. Now a class.
13565 (gdb_readline_wrapper_cleanup): Remove function.
13566 (gdb_readline_wrapper): Remove cleanups.
13567
13568 2018-03-27 Tom Tromey <tom@tromey.com>
13569
13570 * typeprint.h (struct type_print_options) <local_typedefs,
13571 global_typedefs>: Remove "struct" keyword.
13572 (class typedef_hash_table): New class.
13573 (recursively_update_typedef_hash, add_template_parameters)
13574 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13575 (find_typedef_in_hash): Don't declare.
13576 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13577 (typedef_hash_table::recursively_update): Rename from
13578 recursively_update_typedef_hash. Now a member.
13579 (typedef_hash_table::add_template_parameters): Rename from
13580 add_template_parameters. Now a member.
13581 (typedef_hash_table::typedef_hash_table): Now a constructor;
13582 rename from create_typedef_hash.
13583 (typedef_hash_table::~typedef_hash_table): Now a destructor;
13584 rename from free_typedef_hash.
13585 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13586 (do_free_global_table): Remove.
13587 (typedef_hash_table::typedef_hash_table): New constructor; renamed
13588 from copy_type_recursive.
13589 (create_global_typedef_table): Remove.
13590 (typedef_hash_table::find_global_typedef): Now a member of
13591 typedef_hash_table.
13592 (typedef_hash_table::find_typedef): Rename from
13593 find_typedef_in_hash; now a member.
13594 (whatis_exp): Update.
13595 * extension.h (struct ext_lang_type_printers): Add constructor and
13596 destructor.
13597 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13598 declare.
13599 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13600 Now a constructor; rename from start_ext_lang_type_printers.
13601 (ext_lang_type_printers): Now a destructor; rename from
13602 free_ext_lang_type_printers.
13603 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13604 Update.
13605 (c_type_print_base_struct_union): Update. Remove cleanups.
13606
13607 2018-03-27 Tom Tromey <tom@tromey.com>
13608
13609 * dwarf-index-write.c: Include <cmath>.
13610
13611 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13612
13613 * NEWS: Add entry describing new "set|show varsize-limit" command.
13614 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13615 command.
13616 * printcmd.c (_initialize_printcmd): Add "set var" alias of
13617 "set variable".
13618
13619 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
13620
13621 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13622 dwarf-index-write.c
13623 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13624 * dwarf-index-common.c: New file.
13625 * dwarf-index-common.h: New file.
13626 * dwarf-index-write.c: New file.
13627 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13628 (struct dwarf2_section_info): Move from here.
13629 (dwarf2_section_info_def): Likewise.
13630 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13631 (offset_type): Likewise.
13632 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13633 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13634 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13635 (byte_swap): Likewise.
13636 (MAYBE_SWAP): Likewise.
13637 (dwarf2_per_cu_ptr): Likewise.
13638 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13639 (struct tu_stats): Likewise.
13640 (struct dwarf2_per_objfile): Likewise.
13641 (struct dwarf2_per_cu_data): Likewise.
13642 (struct signatured_type): Likewise.
13643 (sig_type_ptr): Likewise.
13644 (DEF_VEC_P (sig_type_ptr)): Likewise.
13645 (INDEX4_SUFFIX): Likewise.
13646 (INDEX5_SUFFIX): Likewise.
13647 (DEBUG_STR_SUFFIX): Likewise.
13648 (dwarf2_read_section): Make non-static.
13649 (mapped_index_string_hash): Move from here.
13650 (dwarf5_djb_hash): Likewise.
13651 (file_write): Likewise.
13652 (class data_buf): Likewise.
13653 (struct symtab_index_entry): Likewise.
13654 (struct mapped_symtab): Likewise.
13655 (find_slot): Likewise.
13656 (hash_expand): Likewise.
13657 (add_index_entry): Likewise.
13658 (uniquify_cu_indices): Likewise.
13659 (class c_str_view): Likewise.
13660 (class c_str_view_hasher): Likewise.
13661 (class vector_hasher): Likewise.
13662 (write_hash_table): Likewise.
13663 (psym_index_map): Likewise.
13664 (struct addrmap_index_data): Likewise.
13665 (add_address_entry): Likewise.
13666 (add_address_entry_worker): Likewise.
13667 (write_address_map): Likewise.
13668 (symbol_kind): Likewise.
13669 (write_psymbols): Likewise.
13670 (struct signatured_type_index_data): Likewise.
13671 (write_one_signatured_type): Likewise.
13672 (recursively_count_psymbols): Likewise.
13673 (recursively_write_psymbols): Likewise.
13674 (class debug_names): Likewise.
13675 (check_dwarf64_offsets): Likewise.
13676 (psyms_seen_size): Likewise.
13677 (write_gdbindex): Likewise.
13678 (write_debug_names): Likewise.
13679 (assert_file_size): Likewise.
13680 (write_psymtabs_to_index): Likewise.
13681 (save_gdb_index_command): Likewise.
13682 (_initialize_dwarf2_read): Don't register the "save gdb-index"
13683 command.
13684 * dwarf2read.h: New file.
13685
13686 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13687
13688 PR gdb/22670
13689 * dwarf2read.c (dwarf2_physname): Do not return the demangled
13690 symbol name if the CU's language stores symbol names in linkage
13691 format.
13692 * language.h (struct language_defn)
13693 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
13694 all instances of this struct.
13695
13696 2018-03-26 Tom Tromey <tom@tromey.com>
13697
13698 * stack.c (backtrace_command_1): Remove verbose code.
13699
13700 2018-03-26 Tom Tromey <tom@tromey.com>
13701
13702 * python/py-framefilter.c (py_print_type): Don't catch
13703 exceptions. Return void.
13704 (py_print_value): Likewise.
13705 (py_print_single_arg): Likewise.
13706 (enumerate_args): Don't catch exceptions.
13707 (py_print_args): Likewise.
13708 (py_print_frame): Likewise.
13709 (gdbpy_apply_frame_filter): Catch exceptions here.
13710
13711 2018-03-26 Tom Tromey <tom@tromey.com>
13712
13713 * stack.c (_initialize_stack): Remove trailing newlines from help
13714 text. Add "Usage" line to "backtrace" help.
13715
13716 2018-03-26 Tom Tromey <tom@tromey.com>
13717
13718 PR python/16486:
13719 * python/py-framefilter.c (py_print_args): Call wrap_hint.
13720
13721 2018-03-26 Tom Tromey <tom@tromey.com>
13722
13723 * python/py-framefilter.c (py_print_single_arg): Return
13724 EXT_LANG_BT_ERROR from catch.
13725
13726 2018-03-26 Tom Tromey <tom@tromey.com>
13727
13728 PR backtrace/15584:
13729 * stack.c (backtrace_command_1): Move some code into no-filters
13730 "if".
13731
13732 2018-03-26 Tom Tromey <tom@tromey.com>
13733
13734 * python/py-framefilter.c (throw_quit_or_print_exception): New
13735 function.
13736 (gdbpy_apply_frame_filter): Use it.
13737
13738 2018-03-26 Tom Tromey <tom@tromey.com>
13739
13740 PR cli/17716:
13741 * python/py-framefilter.c (py_print_type, py_print_value)
13742 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13743 RETURN_MASK_ERROR.
13744
13745 2018-03-26 Tom Tromey <tom@tromey.com>
13746
13747 * python/py-framefilter.c (enumerate_args): Use
13748 gdb::unique_xmalloc_ptr.
13749
13750 2018-03-26 Tom Tromey <tom@tromey.com>
13751
13752 * python/py-framefilter.c (py_print_frame): Return
13753 EXT_LANG_BT_OK.
13754 (gdbpy_apply_frame_filter): Update comment.
13755 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13756 Remove.
13757 <EXT_LANG_BT_NO_FILTERS>: Change value.
13758
13759 2018-03-26 Tom Tromey <tom@tromey.com>
13760
13761 PR backtrace/15582:
13762 * stack.c (backtrace_command): Parse "hide" argument.
13763 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13764 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13765 constant.
13766
13767 2018-03-26 Tom Tromey <tom@tromey.com>
13768
13769 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13770 add "flags".
13771 (backtrace_command): Remove "fulltrace", add "flags".
13772
13773 2018-03-26 Tom Tromey <tom@tromey.com>
13774
13775 * stack.c (backtrace_command): Rewrite command line parsing.
13776
13777 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13778
13779 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13780
13781 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13782
13783 * filename-seen-cache.h: Add include guard.
13784
13785 2018-03-26 Keith Seitz <keiths@redhat.com>
13786
13787 * symfile.c (place_section): Remove "struct" from section_addr_info
13788 in comment.
13789 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13790 "struct" keyword from section_addr_info.
13791
13792 2018-03-26 Alan Hayward <alan.hayward@arm.com>
13793
13794 * regformats/regdef.h (reg): Add constructors.
13795
13796 2018-03-25 Pedro Alves <palves@redhat.com>
13797
13798 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13799 if then/else bodies in var_func_name extraction.
13800
13801 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
13802
13803 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13804 lookup_minimal_symbol() to find symbol entry.
13805 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13806
13807 2018-03-23 Keith Seitz <keiths@redhat.com>
13808
13809 PR c++/22968
13810 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13811 nested type definitions for C++, too.
13812
13813 2018-03-23 Tom Tromey <tom@tromey.com>
13814
13815 * machoread.c (struct oso_el): Add a constructor. Don't define as
13816 a typedef.
13817 (macho_register_oso): Remove.
13818 (macho_symtab_read): Take a std::vector.
13819 (oso_el_compare_name): Now a std::sort comparator.
13820 (macho_symfile_read_all_oso): Take a std::vector.
13821 (macho_symfile_read): Use std::vector. Remove cleanups.
13822
13823 2018-03-22 Tom Tromey <tom@tromey.com>
13824
13825 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13826 (record_full_goto_bookmark): Use std::string.
13827
13828 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13829
13830 PR tdep/18295
13831 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13832 a single mask.
13833
13834 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13835
13836 * rs6000-tdep.c (store_insn_p): New function.
13837 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13838 and cr_reg to their unshifted values. Use store_insn_p to
13839 match LR saves using either R1 or fdata->alloca_reg. Use
13840 store_insn_p to match CR saves. Set alloca_reg_offset
13841 when alloca_reg and framep are set. Remove lr_reg shift
13842 when assigning to fdata->lr_register.
13843
13844 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
13845
13846 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13847 command line args instead of emitting a warning.
13848
13849 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13850
13851 * tracepoint.h (struct static_tracepoint_marker): Initialize
13852 fields, define default constructor, move constructor and move
13853 assignment, disable the rest.
13854 <str_id, extra>: Make std::string.
13855 (release_static_tracepoint_marker): Remove.
13856 (free_current_marker): Remove.
13857 * tracepoint.c (free_current_marker): Remove.
13858 (parse_static_tracepoint_marker_definition): Adjust to
13859 std::string, use new hex2str overload.
13860 (release_static_tracepoint_marker): Remove.
13861 (print_one_static_tracepoint_marker): Get marker by reference
13862 and adjust to std::string.
13863 (info_static_tracepoint_markers_command): Adjust to std::vector
13864 changes
13865 * target.h (static_tracepoint_marker_p): Remove typedef.
13866 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13867 (struct target_ops) <to_static_tracepoint_marker_at>: Return
13868 bool.
13869 <to_static_tracepoint_markers_by_strid>: Return std::vector.
13870 * target-debug.h
13871 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13872 (target_debug_print_std_vector_static_tracepoint_marker): New.
13873 (target_debug_print_struct_static_tracepoint_marker_p): Rename
13874 to...
13875 (target_debug_print_static_tracepoint_marker_p): ... this.
13876 * target-delegates.c: Re-generate.
13877 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13878 Make std::string.
13879 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13880 (decode_static_tracepoint_spec): Adjust to std::vector.
13881 (tracepoint_print_one_detail): Adjust to std::string.
13882 (strace_marker_decode_location): Adjust to std::string.
13883 (update_static_tracepoint): Adjust to std::string, remove call
13884 to release_static_tracepoint_marker.
13885 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13886 Adjust to std::vector.
13887 * remote.c (remote_static_tracepoint_marker_at): Return bool.
13888 (remote_static_tracepoint_markers_by_strid): Adjust to
13889 std::vector.
13890 * common/rsp-low.h (hex2str): New overload with explicit count
13891 of bytes.
13892 * common/rsp-low.c (hex2str): New overload with explicit count
13893 of bytes.
13894 * unittests/rsp-low-selftests.c (test_hex2str): New function.
13895 (_initialize_rsp_low_selftests): Add test_hex2str test.
13896 * unittests/tracepoint-selftests.c
13897 (test_parse_static_tracepoint_marker_definition): Adjust to
13898 std::string.
13899
13900 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13901
13902 * tracepoint.c (parse_static_tracepoint_marker_definition):
13903 Consider case where the definition is followed by more
13904 definitions.
13905 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13906 tracepoint-selftests.c.
13907 * unittests/tracepoint-selftests.c: New.
13908
13909 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13910
13911 * MAINTAINERS (Write After Approval): Add Pedro Franco de
13912 Carvalho.
13913
13914 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13915
13916 * symtab.c (find_pc_sect_line): fixed indentation.
13917
13918 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13919
13920 * symtab.c (find_pc_sect_line): now uses binary search.
13921
13922 2018-03-19 Tom Tromey <tom@tromey.com>
13923
13924 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13925 "IDENT" production.
13926
13927 2018-03-19 Pedro Alves <palves@redhat.com>
13928 Tom Tromey <tom@tromey.com>
13929
13930 * unittests/observable-selftests.c: New file.
13931 * common/observable.h: New file.
13932 * observable.h: New file.
13933 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13934 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13935 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13936 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13937 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13938 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13939 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13940 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13941 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13942 python/py-breakpoint.c, python/py-finishbreakpoint.c,
13943 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13944 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13945 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13946 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13947 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13948 tui/tui-interp.c, valops.c: Update all users.
13949 * tui/tui-hooks.c (tui_bp_created_observer)
13950 (tui_bp_deleted_observer, tui_bp_modified_observer)
13951 (tui_inferior_exit_observer, tui_before_prompt_observer)
13952 (tui_normal_stop_observer, tui_register_changed_observer):
13953 Remove.
13954 (tui_observers_token): New global.
13955 (attach_or_detach, tui_attach_detach_observers): New functions.
13956 (tui_install_hooks, tui_remove_hooks): Use
13957 tui_attach_detach_observers.
13958 * record-btrace.c (record_btrace_thread_observer): Remove.
13959 (record_btrace_thread_observer_token): New global.
13960 * observer.sh: Remove.
13961 * observer.c: Rename to observable.c.
13962 * observable.c (namespace gdb_observers): Define new objects.
13963 (observer_debug): Move into gdb_observers namespace.
13964 (struct observer, struct observer_list, xalloc_observer_list_node)
13965 (xfree_observer_list_node, generic_observer_attach)
13966 (generic_observer_detach, generic_observer_notify): Remove.
13967 (_initialize_observer): Update.
13968 Don't include observer.inc.
13969 * Makefile.in (generated_files): Remove observer.h, observer.inc.
13970 (clean mostlyclean): Likewise.
13971 (observer.h, observer.inc): Remove targets.
13972 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13973 (COMMON_SFILES): Use observable.c, not observer.c.
13974 * .gitignore: Remove observer.h.
13975
13976 2018-03-18 Tom Tromey <tom@tromey.com>
13977
13978 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13979 gdb::def_vector.
13980 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13981
13982 2018-03-17 Tom Tromey <tom@tromey.com>
13983
13984 * auto-load.c (auto_load_objfile_script_1): Use std::string.
13985
13986 2018-03-17 Tom Tromey <tom@tromey.com>
13987
13988 * target.c (class scoped_target_fd): New.
13989 (target_fileio_close_cleanup): Remove.
13990 (target_fileio_read_alloc_1): Use scoped_target_fd.
13991
13992 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
13993
13994 * silent-rules.mk: New.
13995 * Makefile.in: Include silent-rules.mk
13996 (srcdir, VPATH, top_srcdir): Move up.
13997 (COMPILE): Add ECHO_CXX.
13998 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13999 (init.c): Add ECHO_INIT_C.
14000 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
14001 (version.c): Add ECHO_GEN.
14002 (printcmd.o): Add ECHO_CXX.
14003 (target-float.o): Add ECHO_CXX.
14004 (ada-exp.o): Add ECHO_CXX.
14005 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
14006 (insight$(EXEEXT)): Add ECHO_CXXLD.
14007 * gnulib/configure.ac: Add AM_SILENT_RULES.
14008 * gnulib/aclocal.m4: Re-generate.
14009 * gnulib/configure: Re-generate.
14010 * gnulib/import/Makefile.in: Re-generate.
14011
14012 2018-03-16 Tom Tromey <tom@tromey.com>
14013
14014 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
14015 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
14016 * utils.c (do_free_section_addr_info)
14017 (make_cleanup_free_section_addr_info): Remove.
14018 * symfile.h (struct other_sections): Add constructor.
14019 (struct section_addr_info): Remove.
14020 (section_addr_info): New typedef.
14021 (struct sym_fns) <sym_offsets>: Change type of parameter.
14022 (build_section_addr_info_from_objfile)
14023 (relative_addr_info_to_section_offsets, addr_info_make_relative)
14024 (default_symfile_offsets, symbol_file_add)
14025 (symbol_file_add_from_bfd)
14026 (build_section_addr_info_from_section_table): Update.
14027 (alloc_section_addr_info, free_section_addr_info): Don't declare.
14028 * symfile.c (alloc_section_addr_info): Remove.
14029 (build_section_addr_info_from_section_table): Change return type.
14030 Update.
14031 (build_section_addr_info_from_bfd)
14032 (build_section_addr_info_from_objfile): Likewise.
14033 (free_section_addr_info): Remove.
14034 (relative_addr_info_to_section_offsets): Change type of "addrs".
14035 (addrs_section_compar): Now a std::sort comparator.
14036 (addrs_section_sort): Change return type.
14037 (addr_info_make_relative): Change type of "addrs". Update.
14038 (default_symfile_offsets, syms_from_objfile_1)
14039 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14040 (symbol_file_add_separate): Update.
14041 (symbol_file_add): Change type of "addrs". Update.
14042 (add_symbol_file_command): Update. Remove cleanups.
14043 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
14044 cleanups.
14045 * symfile-debug.c (debug_sym_offsets): Change type of "info".
14046 * solib.c (solib_read_symbols): Update.
14047 * objfiles.c (objfile_relocate): Update. Remove cleanups.
14048 * machoread.c (macho_symfile_offsets): Update.
14049 * jit.c (jit_bfd_try_read_symtab): Update.
14050
14051 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
14052
14053 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14054 unittests/utils-selftests.c.
14055 * unittests/utils-selftests.c: New file.
14056
14057 2018-03-14 Tom Tromey <tom@tromey.com>
14058
14059 PR cli/14977:
14060 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14061 for NULL.
14062
14063 2018-03-14 Tom Tromey <tom@tromey.com>
14064
14065 PR cli/19918:
14066 * printcmd.c (printf_pointer): Allow "-" in format.
14067
14068 2018-03-14 Tom Tromey <tom@tromey.com>
14069
14070 * printcmd.c (_initialize_printcmd): Add usage to printf.
14071
14072 2018-03-14 Yao Qi <qiyao@sourceware.org>
14073
14074 * MAINTAINERS: Update my email address.
14075
14076 2018-03-13 Tom Tromey <tom@tromey.com>
14077
14078 * machoread.c (macho_check_dsym): Change filenamep to a
14079 std::string*.
14080 (macho_symfile_read): Update.
14081 * symfile.c (load_command): Use std::string.
14082
14083 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
14084
14085 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14086 to error message string.
14087 (riscv_register_name): Use xsnprintf instead of sprintf.
14088 (riscv_insn::fetch_instruction): Use gdb_assert instead of
14089 internal_error.
14090 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14091 error.
14092 (riscv_push_dummy_call): Likewise.
14093
14094 2018-03-12 Tom Tromey <tom@tromey.com>
14095
14096 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14097 Use gdb::byte_vector.
14098 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14099
14100 2018-03-12 Yao Qi <yao.qi@linaro.org>
14101
14102 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14103 parameter type to readable_regcache.
14104 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14105 the declaration.
14106
14107 2018-03-11 Tom Tromey <tom@tromey.com>
14108
14109 * dwarf2read.c (struct nextfield): Add initializers.
14110 (struct nextfnfield): Remove.
14111 (struct fnfieldlist): Add initializers. Remove "length" and
14112 "head", use std::vector.
14113 (struct decl_field_list): Remove.
14114 (struct field_info): Add initializers.
14115 <fields, baseclasses>: Now std::vector.
14116 <nbaseclasses, nfnfields, typedef_field_list_count,
14117 nested_types_list_count>: Remove.
14118 (dwarf2_add_field, dwarf2_add_type_defn)
14119 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14120 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14121 (process_structure_scope): Update.
14122
14123 2018-03-11 Tom Tromey <tom@tromey.com>
14124
14125 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14126 for use by std::sort.
14127 (build_type_psymtabs_1): Use std::vector.
14128
14129 2018-03-09 Eli Zaretskii <eliz@gnu.org>
14130
14131 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14132 and LIBMPFR in the printed configuration.
14133
14134 2018-03-08 Tom Tromey <tom@tromey.com>
14135
14136 * source.c (get_filename_and_charpos): Use scoped_fd.
14137 * nto-procfs.c (procfs_open_1): Use scoped_fd.
14138 (procfs_pidlist): Likewise.
14139 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14140 (iterate_over_mappings): Likewise.
14141
14142 2018-03-08 Tom Tromey <tom@tromey.com>
14143
14144 * infcall.c (struct call_return_meta_info)
14145 <stack_temporaries_enabled>: Remove.
14146 (get_call_return_value, call_function_by_hand_dummy): Update.
14147 * thread.c (disable_thread_stack_temporaries): Remove.
14148 (enable_thread_stack_temporaries): Remove.
14149 (thread_stack_temporaries_enabled_p): Return bool.
14150 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14151 (get_last_thread_stack_temporary): Update.
14152 * eval.c (evaluate_subexp): Update.
14153 * gdbthread.h (class enable_thread_stack_temporaries): Now a
14154 class, not a function.
14155 (value_ptr, value_vec): Remove typedefs.
14156 (class thread_info) <stack_temporaries_enabled>: Now bool.
14157 <stack_temporaries>: Now a std::vector.
14158 (thread_stack_temporaries_enabled_p)
14159 (value_in_thread_stack_temporaries): Return bool.
14160
14161 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
14162
14163 * remote.c (putpkt_binary): Fix omitted bytes reporting.
14164 (getpkt_or_notif_sane_1): Likewise.
14165
14166 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14167
14168 * build-id.c (build_id_to_debug_bfd): Use std::string.
14169
14170 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14171
14172 * build-id.c (find_separate_debug_file_by_buildid): Return
14173 std::string.
14174 * build-id.h (find_separate_debug_file_by_buildid): Return
14175 std::string.
14176 * coffread.c (coff_symfile_read): Adjust to std::string.
14177 * elfread.c (elf_symfile_read): Adjust to std::string.
14178 * symfile.c (separate_debug_file_exists): Change parameter to
14179 std::string.
14180 (find_separate_debug_file): Return std::string.
14181 (find_separate_debug_file_by_debuglink): Return std::string.
14182 * symfile.h (find_separate_debug_file_by_debuglink): Return
14183 std::string.
14184
14185 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
14186
14187 * common/xml-utils.c (xml_escape_text): Move code to...
14188 (xml_escape_text_append): ... this new function.
14189 * common/xml-utils.h (xml_escape_text_append): New declaration.
14190 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14191 New function.
14192 (_initialize_xml_utils): register test_xml_escape_text_append as
14193 a selftest.
14194
14195 2018-03-07 Alan Hayward <alan.hayward@arm.com>
14196
14197 * defs.h: Remove MAX_REGISTER_SIZE.
14198 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14199 asserts.
14200 * python/py-unwind.c (pyuw_sniffer): Likewise.
14201
14202 2018-03-07 Tom Tromey <tom@tromey.com>
14203
14204 * linux-tdep.c (linux_info_proc): Update.
14205 * target.h (struct target_ops) <to_fileio_readlink>: Return
14206 optional<string>.
14207 (target_fileio_readlink): Return optional<string>.
14208 * remote.c (remote_hostio_readlink): Return optional<string>.
14209 * inf-child.c (inf_child_fileio_readlink): Return
14210 optional<string>.
14211 * target.c (target_fileio_readlink): Return optional<string>.
14212
14213 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
14214
14215 * regcache.c (cooked_read_test): Add riscv to the list of
14216 architectures that have a save_reggroup.
14217
14218 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
14219
14220 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14221 value is not a dynamic class object.
14222
14223 2018-03-06 Tom Tromey <tom@tromey.com>
14224
14225 * rust-exp.y: Formatting fixes.
14226
14227 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14228
14229 * riscv-tdep.c (riscv_register_name): Remove target description
14230 support.
14231 (riscv_gdbarch_init): Remove target description check.
14232
14233 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14234
14235 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14236 comment.
14237 * riscv-tdep.h: Likewise.
14238
14239 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14240
14241 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14242 (riscv_pseudo_register_write): Delete.
14243 (riscv_gdbarch_init): Remove all use of pseudo registers.
14244
14245 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14246
14247 * record-btrace.c (btrace_print_lines): Replace cleanup
14248 parameter with RAII equivalents.
14249 (btrace_insn_history): Replace cleanup with RAII equivalents.
14250 * ui-out.h (make_cleanup_ui_out_list_begin_end,
14251 make_cleanup_ui_out_tuple_begin_end): Remove.
14252 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14253 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14254 make_cleanup_ui_out_list_begin_end): Remove.
14255
14256 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14257
14258 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14259 parameter types to std::vector. Use bool.
14260 (record_btrace_wait): Replace VEC(tp_t) with
14261 std::vector<thread_info *>.
14262 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14263
14264 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
14265
14266 * record-btrace.c (record_btrace_disable_callback): Remove.
14267 (struct scoped_btrace_disable): New.
14268 (record_btrace_open): Use scoped_btrace_disable.
14269
14270 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14271
14272 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14273 reading values from registers.
14274
14275 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14276
14277 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14278 where appropriate.
14279
14280 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14281
14282 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14283 change parameter type. Use GDB's print functions, and use
14284 core_addr_to_string where appropriate.
14285 (riscv_push_dummy_call): Use core_addr_to_string where
14286 appropriate, update call to riscv_print_arg_location, and reindent
14287 a few lines.
14288 (riscv_return_value): Update call to riscv_print_arg_location.
14289
14290 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14291 Tim Newsome <tim@sifive.com>
14292 Albert Ou <a0u@eecs.berkeley.edu>
14293 Darius Rad <darius@bluespec.com>
14294
14295 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14296 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14297 (ALLDEPFILES): Add riscv-tdep.c
14298 * configure.tgt: Add riscv support.
14299 * riscv-tdep.c: New file.
14300 * riscv-tdep.h: New file.
14301 * NEWS: Mention new target.
14302 * MAINTAINERS: Add entry for riscv.
14303
14304 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
14305
14306 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14307 fields within aggregates.
14308
14309 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
14310
14311 * record-btrace.c (btrace_print_lines): Change type of flags to
14312 gdb_disassembly_flags.
14313
14314 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14315
14316 * fbsd-nat.c: Include "inf-ptrace.h".
14317 (USE_SIGTRAP_SIGINFO): Conditionally define.
14318 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14319 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14320 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14321 function.
14322 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14323 Likewise.
14324 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14325 Likewise.
14326 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14327 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14328 "supports_stopped_by_hw_breakpoint" target methods.
14329
14330 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14331
14332 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14333 * fbsd-nat.c (debug_fbsd_nat): New variable.
14334 (show_fbsd_nat_debug): New function.
14335 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14336 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14337
14338 2018-03-04 John Baldwin <jhb@FreeBSD.org>
14339
14340 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14341 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14342 prototype.
14343 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14344 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14345 method.
14346
14347 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14348
14349 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14350 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14351
14352 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14353
14354 * charset.c (struct charset_vector): New.
14355 (charsets): Change type to charset_vector.
14356 (find_charset_names): Adjust.
14357 (add_one): Adjust.
14358 (_initialize_charset): Adjust.
14359
14360 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14361
14362 * progspace.h (struct program_space) <deleted_solibs>: Change
14363 type to std::vector<std::string>.
14364 * progspace.c (clear_program_space_solib_cache): Adjust.
14365 * breakpoint.c (print_solib_event): Adjust.
14366 (check_status_catch_solib): Adjust.
14367 * solib.c (update_solib_list): Adjust.
14368 * ui-out.h (class ui_out) <field_string>: New overload.
14369 * ui-out.c (ui_out::field_string): New overload.
14370
14371 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14372
14373 * progspace.h (struct program_space): Add constructor and
14374 destructor, initialize fields.
14375 (add_program_space): Remove.
14376 * progspace.c (add_program_space): Rename to...
14377 (program_space::program_space): ... this.
14378 (release_program_space): Rename to...
14379 (program_space::~program_space): ... this.
14380 (delete_program_space): Use delete to delete program_space.
14381 (initialize_progspace): Use new to allocate program_space.
14382 * inferior.c (add_inferior_with_spaces): Likewise.
14383 (clone_inferior_command): Likewise.
14384 * infrun.c (follow_fork_inferior): Likewise.
14385 (handle_vfork_child_exec_or_exit): Likewise.
14386
14387 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
14388
14389 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14390 (delim_string_to_char_ptr_vec): Return std::vector of
14391 gdb::unique_xmalloc_ptr.
14392 (dirnames_to_char_ptr_vec_append): Take std::vector of
14393 gdb::unique_xmalloc_ptr.
14394 (dirnames_to_char_ptr_vec): Return std::vector of
14395 gdb::unique_xmalloc_ptr.
14396 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14397 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14398 (delim_string_to_char_ptr_vec): Return an std::vector of
14399 gdb::unique_xmalloc_ptr, adjust the code.
14400 (dirnames_to_char_ptr_vec_append): Take an std::vector of
14401 gdb::unique_xmalloc_ptr, adjust the code.
14402 (dirnames_to_char_ptr_vec): Return an std::vector of
14403 gdb::unique_xmalloc_ptr, adjust the code.
14404 * auto-load.c (auto_load_safe_path_vec): Change type to
14405 std::vector of gdb::unique_xmalloc_ptr.
14406 (auto_load_expand_dir_vars): Return an std::vector of
14407 gdb::unique_xmalloc_ptr, adjust the code.
14408 (auto_load_safe_path_vec_update): Adjust.
14409 (filename_is_in_auto_load_safe_path_vec): Adjust.
14410 (auto_load_objfile_script_1): Adjust.
14411 * build-id.c (build_id_to_debug_bfd): Adjust.
14412 * linux-thread-db.c (thread_db_load_search): Adjust.
14413 * source.c (add_path): Adjust.
14414 (openp): Adjust.
14415 * symfile.c (find_separate_debug_file): Adjust.
14416 * utils.c (do_free_char_ptr_vec): Remove.
14417 (make_cleanup_free_char_ptr_vec): Remove.
14418
14419 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
14420
14421 PR gdb/22907
14422 * common/pathstuff.c: Conditionally include "<windows.h>".
14423
14424 2018-03-01 Georg Sauthoff <mail@georg.so>
14425
14426 PR gdb/22888
14427 * gcore.in: Quote variables and switch interpreter to bash.
14428
14429 2018-03-01 Tom Tromey <tom@tromey.com>
14430
14431 * dwarf2read.c (alloc_discriminant_info): Fix default_index
14432 assertion. Add assertion for discriminant_index.
14433 (quirk_rust_enum): Use correct base type name in univariant case.
14434
14435 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
14436
14437 * record.c (get_call_history_modifiers): Return a
14438 record_print_flags.
14439 (cmd_record_call_history): Adjust.
14440 * record-btrace.c (record_btrace_call_history): Adjust.
14441 (record_btrace_call_history_range): Adjust.
14442 (record_btrace_call_history_from): Adjust.
14443 * target-debug.h (target_debug_print_record_print_flags): New.
14444 * target-delegates.c: Re-generate.
14445 * target.c (target_call_history): Change flags type.
14446 (target_call_history_from): Likewise.
14447 (target_call_history_range): Likewise.
14448 * target.h (struct target_ops) <target_call_history>: Likewise.
14449 (target_call_history_from): Likewise.
14450 (target_call_history_range): Likewise.
14451
14452 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14453 Simon Marchi <simon.marchi@polymtl.ca>
14454
14455 * common/common-utils.c: Include "sys/stat.h".
14456 (is_regular_file): Move here from "source.c"; change return
14457 type to "bool".
14458 * common/common-utils.h (is_regular_file): New prototype.
14459 * common/pathstuff.c (contains_dir_separator): New function.
14460 * common/pathstuff.h (contains_dir_separator): New prototype.
14461 * source.c: Don't include "sys/stat.h".
14462 (is_regular_file): Move to "common/common-utils.c".
14463
14464 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14465
14466 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14467 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14468 * auto-load.c: Include "common/pathstuff.h".
14469 * common/common-def.h (current_directory): Move here.
14470 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14471 function.
14472 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14473 prototype.
14474 * common/pathstuff.c: New file.
14475 * common/pathstuff.h: New file.
14476 * compile/compile.c: Include "common/pathstuff.h".
14477 * defs.h (current_directory): Move to "common/common-defs.h".
14478 * dwarf2read.c: Include "common/pathstuff.h".
14479 * exec.c: Likewise.
14480 * guile/scm-safe-call.c: Likewise.
14481 * linux-thread-db.c: Likewise.
14482 * main.c: Likewise.
14483 * nto-tdep.c: Likewise.
14484 * objfiles.c: Likewise.
14485 * source.c: Likewise.
14486 * symtab.c: Likewise.
14487 * utils.c: Include "common/pathstuff.h".
14488 (gdb_realpath): Move to "common/pathstuff.c".
14489 (gdb_realpath_keepfile): Likewise.
14490 (gdb_abspath): Likewise.
14491 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14492 (gdb_realpath_keepfile): Likewise.
14493 (gdb_abspath): Likewise.
14494
14495 2018-02-28 John Baldwin <jhb@FreeBSD.org>
14496
14497 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14498 wildcard process pid for super_resume for kernels with a
14499 specific bug.
14500
14501 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
14502
14503 * compile/compile.c (get_args): Add additional comments
14504 explaining function.
14505
14506 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
14507 Tom Tromey <tom@tromey.com>
14508
14509 * target.h (memory_write_request_s): Remove typedef. Don't define
14510 VEC.
14511 (target_write_memory_blocks): Change argument to std::vector.
14512 (struct memory_write_request): Add constructor.
14513 * target-memory.c (compare_block_starting_address): Return bool.
14514 Change argument types.
14515 (claim_memory): Change arguments to use std::vector.
14516 (split_regular_and_flash_blocks, blocks_to_erase)
14517 (compute_garbled_blocks): Likewise.
14518 (cleanup_request_data, cleanup_write_requests_vector): Remove.
14519 (target_write_memory_blocks): Change argument to std::vector.
14520 * symfile.c (struct load_section_data): Add constructor and
14521 destructor. Use std::vector for "requests".
14522 (struct load_progress_data): Add initializers.
14523 (load_section_callback): Update. Use "new".
14524 (clear_memory_write_data): Remove.
14525 (generic_load): Update.
14526
14527 2018-02-27 Alan Hayward <alan.hayward@arm.com>
14528
14529 * arch/aarch64.h: Use common/tdesc.h.
14530
14531 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14532
14533 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14534 architecture with a 64-bit ABI.
14535
14536 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14537
14538 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14539 ahead of target description loading.
14540
14541 2018-02-26 Tom Tromey <tom@tromey.com>
14542
14543 * stack.c (backtrace_command_1): Update.
14544 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14545 of "flags".
14546 * python/py-framefilter.c (py_print_frame)
14547 (gdbpy_apply_frame_filter): Change type of "flags".
14548 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14549 of "flags".
14550 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14551 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14552 * extension.h (enum frame_filter_flag): Rename from
14553 frame_filter_flags.
14554 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14555 (apply_ext_lang_frame_filter): Change type of "flags".
14556 * extension.c (apply_ext_lang_frame_filter): Change type of
14557 "flags".
14558 * extension-priv.h (struct extension_language_ops)
14559 <apply_frame_filter>: Change type of "flags".
14560
14561 2018-02-26 Tom Tromey <tom@tromey.com>
14562
14563 PR python/16497:
14564 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
14565 off-by-one in py_end computation.
14566 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14567 PRINT_MORE_FRAMES.
14568 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14569 constant.
14570
14571 2018-02-26 Tom Tromey <tom@tromey.com>
14572
14573 * dwarf2read.c (struct variant_field): New.
14574 (struct nextfield) <variant>: New field.
14575 (dwarf2_add_field): Handle DW_TAG_variant_part.
14576 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14577 discriminated union.
14578 (read_structure_type): Handle DW_TAG_variant_part.
14579 (handle_struct_member_die): New function, extracted from
14580 process_structure_scope. Handle DW_TAG_variant.
14581 (process_structure_scope): Handle discriminated unions. Call
14582 handle_struct_member_die.
14583
14584 2018-02-26 Tom Tromey <tom@tromey.com>
14585
14586 * rust-lang.h (rust_last_path_segment): Declare.
14587 * rust-lang.c (rust_last_path_segment): Now public. Change
14588 contract.
14589 (struct disr_info): Remove.
14590 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14591 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14592 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14593 (rust_enum_p, rust_enum_variant): New function.
14594 (rust_underscore_fields): Remove "offset" parameter.
14595 (rust_print_enum): New function.
14596 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14597 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14598 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
14599 enums.
14600 (rust_internal_print_type): New function, from rust_print_type.
14601 Remove enum code.
14602 (rust_print_type): Call rust_internal_print_type.
14603 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14604 Update enum handling.
14605 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14606 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14607 (rust_union_quirks): New functions.
14608 (process_full_comp_unit, process_full_type_unit): Call
14609 rust_union_quirks.
14610 (process_structure_scope): Update rust_unions if necessary.
14611
14612 2018-02-26 Tom Tromey <tom@tromey.com>
14613
14614 * value.h (value_union_variant): Declare.
14615 * valops.c (value_union_variant): New function.
14616 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14617 (struct discriminant_info): New.
14618 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14619 enumerator.
14620 (struct main_type) <flag_discriminated_union>: New field.
14621
14622 2018-02-26 Tom Tromey <tom@tromey.com>
14623
14624 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14625 unittests/unpack-selftests.c.
14626 * unittests/unpack-selftests.c: New file.
14627 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14628
14629 2018-02-26 Yao Qi <yao.qi@linaro.org>
14630
14631 * dwarf2read.c (struct partial_die_info) <read>: New method.
14632 (read_partial_die): Remove the declaration.
14633 (load_partial_dies): Update.
14634 (partial_die_info::partial_die_info):
14635 (read_partial_die): Change it to partial_die_info::read.
14636
14637 2018-02-26 Yao Qi <yao.qi@linaro.org>
14638
14639 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14640 (fixup_partial_die): Remove declaration.
14641 (scan_partial_symbols): Update.
14642 (partial_die_parent_scope): Likewise.
14643 (partial_die_full_name): Likewise.
14644 (fixup_partial_die): Change it to partial_die_info::fixup.
14645
14646 2018-02-26 Yao Qi <yao.qi@linaro.org>
14647
14648 * dwarf2read.c (read_partial_die): Update the declaration.
14649 (load_partial_dies): Caller update.
14650 (read_partial_die): Remove one argument abbrev_len.
14651
14652 2018-02-26 Yao Qi <yao.qi@linaro.org>
14653
14654 * dwarf2read.c (struct partial_die_info): Add ctor, delete
14655 assignment operator.
14656 (load_partial_dies): Use ctor and copy ctor.
14657 (read_partial_die): Update.
14658 (dwarf2_cu::find_partial_die): Use ctor.
14659
14660 2018-02-26 Yao Qi <yao.qi@linaro.org>
14661
14662 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14663 (find_partial_die_in_comp_unit): Change it to
14664 dwarf2_cu::find_partial_die.
14665 (find_partial_die): Update.
14666
14667 2018-02-26 Yao Qi <yao.qi@linaro.org>
14668
14669 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14670 is NULL.
14671
14672 2018-02-26 Yao Qi <yao.qi@linaro.org>
14673
14674 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14675
14676 2018-02-26 Alan Hayward <alan.hayward@arm.com>
14677
14678 * arch/amd64.h: Use common/tdesc.h.
14679 * arch/i386.c: Likewise.
14680 * arch/i386.h: Likewise.
14681 * arch/tic6x.c: Likewise.
14682 * arch/tdesc.h: Move file from here...
14683 * common/tdesc.h: ...to here.
14684 * features/aarch64-core.c: Regenerate.
14685 * features/aarch64-fpu.c: Regenerate.
14686 * features/i386/32bit-avx.c: Regenerate.
14687 * features/i386/32bit-avx512.c: Regenerate.
14688 * features/i386/32bit-core.c: Regenerate.
14689 * features/i386/32bit-linux.c: Regenerate.
14690 * features/i386/32bit-mpx.c: Regenerate.
14691 * features/i386/32bit-pkeys.c: Regenerate.
14692 * features/i386/32bit-sse.c: Regenerate.
14693 * features/i386/64bit-avx.c: Regenerate.
14694 * features/i386/64bit-avx512.c: Regenerate.
14695 * features/i386/64bit-core.c: Regenerate.
14696 * features/i386/64bit-linux.c: Regenerate.
14697 * features/i386/64bit-mpx.c: Regenerate.
14698 * features/i386/64bit-pkeys.c: Regenerate.
14699 * features/i386/64bit-segments.c: Regenerate.
14700 * features/i386/64bit-sse.c: Regenerate.
14701 * features/i386/x32-core.c: Regenerate.
14702 * features/tic6x-c6xp.c: Regenerate.
14703 * features/tic6x-core.c: Regenerate.
14704 * features/tic6x-gp.c: Regenerate.
14705 * target-descriptions.c: Use common/tdesc.h.
14706 * target-descriptions.h: Likewise.
14707
14708 2018-02-24 Tom Tromey <tom@tromey.com>
14709
14710 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14711 (try_thread_db_load_from_dir, thread_db_load_search): Use
14712 std::string.
14713 (info_auto_load_libthread_db_compare): Return bool. Change
14714 argument types.
14715 (info_auto_load_libthread_db): Use std::vector, std::string.
14716 Remove cleanups.
14717
14718 2018-02-24 Tom Tromey <tom@tromey.com>
14719
14720 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14721 std::string.
14722 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14723 std::string*.
14724 * gdbarch.c: Rebuild.
14725 * gdbarch.h: Rebuild.
14726 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14727 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14728 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14729 std::string*.
14730
14731 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
14732
14733 * gdbtypes.h (sect_offset): Change type to uint64_t.
14734 (sect_offset_str): New function.
14735 * dwarf2read.c (create_addrmap_from_aranges): Use
14736 sect_offset_str.
14737 (error_check_comp_unit_head): Likewise.
14738 (create_debug_type_hash_table): Likewise.
14739 (read_cutu_die_from_dwo): Likewise.
14740 (init_cutu_and_read_dies): Likewise.
14741 (init_cutu_and_read_dies_no_follow): Likewise.
14742 (process_psymtab_comp_unit_reader): Likewise.
14743 (partial_die_parent_scope): Likewise.
14744 (peek_die_abbrev): Likewise.
14745 (process_queue): Likewise.
14746 (dwarf2_physname): Likewise.
14747 (read_namespace_alias): Likewise.
14748 (read_import_statement): Likewise.
14749 (create_dwo_cu_reader): Likewise.
14750 (create_cus_hash_table): Likewise.
14751 (lookup_dwo_cutu): Likewise.
14752 (inherit_abstract_dies): Likewise.
14753 (read_func_scope): Likewise.
14754 (read_call_site_scope): Likewise.
14755 (dwarf2_add_member_fn): Likewise.
14756 (read_common_block): Likewise.
14757 (read_module_type): Likewise.
14758 (read_typedef): Likewise.
14759 (read_subrange_type): Likewise.
14760 (load_partial_dies): Likewise.
14761 (read_partial_die): Likewise.
14762 (find_partial_die): Likewise.
14763 (read_str_index): Likewise.
14764 (dwarf2_string_attr): Likewise.
14765 (build_error_marker_type): Likewise.
14766 (lookup_die_type): Likewise.
14767 (dump_die_shallow): Likewise.
14768 (follow_die_ref): Likewise.
14769 (dwarf2_fetch_die_loc_sect_off): Likewise.
14770 (dwarf2_fetch_constant_bytes): Likewise.
14771 (follow_die_sig): Likewise.
14772 (get_signatured_type): Likewise.
14773 (get_DW_AT_signature_type): Likewise.
14774 (dwarf2_find_containing_comp_unit): Likewise.
14775 (set_die_type): Likewise.
14776
14777 2018-02-21 John Baldwin <jhb@FreeBSD.org>
14778
14779 * arch/aarch64.c: Include "common-defs.h".
14780 * arch/amd64.c: Likewise.
14781 * arch/i386.c: Likewise.
14782
14783 2018-02-21 Tom Tromey <tom@tromey.com>
14784
14785 * value.h: (extract_field_op): Update.
14786 * eval.c (extract_field_op): Return a const char *.
14787 * expression.h (parse_expression_for_completion): Update.
14788 * completer.c (complete_expression): Update.
14789 (add_struct_fields): Make fieldname const.
14790 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14791 (mark_completion_tag, parse_exp_in_context_1): Update.
14792 (parse_expression_for_completion): Change "name" to
14793 unique_xmalloc_ptr*.
14794
14795 2018-02-21 Tom Tromey <tom@tromey.com>
14796
14797 * infcall.c (call_function_by_hand_dummy): Use std::vector.
14798
14799 2018-02-21 Yao Qi <yao.qi@linaro.org>
14800
14801 * avr-tdep.c (avr_read_pc): Change parameter type to
14802 readable_regcache.
14803 * gdbarch.sh (read_pc): Likewise.
14804 * gdbarch.c: Re-generated.
14805 * gdbarch.h: Re-generated.
14806 * hppa-tdep.c (hppa_read_pc): Change parameter type to
14807 readable_regcache.
14808 * ia64-tdep.c (ia64_read_pc): Likewise.
14809 * mips-tdep.c (mips_read_pc): Likewise.
14810 * spu-tdep.c (spu_read_pc): Likewise.
14811
14812 2018-02-21 Yao Qi <yao.qi@linaro.org>
14813
14814 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14815 * regcache-dump.c: New file.
14816 * regcache.c: Move register_dump to regcache-dump.c.
14817 (maintenance_print_registers): Likewise.
14818 (maintenance_print_raw_registers): Likewise.
14819 (maintenance_print_cooked_registers): Likewise.
14820 (maintenance_print_register_groups): Likewise.
14821 (maintenance_print_remote_registers): Likewise.
14822 (_initialize_regcache): Likewise.
14823 * regcache.h (register_dump): Moved from regcache.c.
14824
14825 2018-02-21 Yao Qi <yao.qi@linaro.org>
14826
14827 * regcache.c (regcache::regcache): Update.
14828 (regcache::invalidate): Move it to detached_regcache::invalidate.
14829 (get_thread_arch_aspace_regcache): Update.
14830 (regcache::raw_update): Update.
14831 (regcache::cooked_read): Remove some code.
14832 (regcache::cooked_read_value): Likewise.
14833 (regcache::raw_write): Remove assert on m_readonly_p.
14834 (regcache::raw_supply_integer): Move it to
14835 detached_regcache::raw_supply_integer.
14836 (regcache::raw_supply_zeroed): Likewise.
14837 * regcache.h (detached_regcache) <raw_supply_integer>: New
14838 declaration.
14839 <raw_supply_zeroed, invalidate>: Likewise.
14840 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14841 <invalidate>: Likewise.
14842 <m_readonly_p>: Removed.
14843
14844 2018-02-21 Yao Qi <yao.qi@linaro.org>
14845
14846 * infcmd.c (get_return_value): Let stop_regs point to
14847 get_current_regcache.
14848 * regcache.c (regcache::regcache): Remove.
14849 (register_dump_reg_buffer): New class.
14850 (regcache_print): Adjust.
14851 * regcache.h (regcache): Remove constructors.
14852
14853 2018-02-21 Yao Qi <yao.qi@linaro.org>
14854
14855 * regcache.c (class register_dump): New class.
14856 (register_dump_regcache, register_dump_none): New class.
14857 (register_dump_remote, register_dump_groups): New class.
14858 (regcache_print): Update.
14859 * regcache.h (regcache_dump_what): Move it to regcache.c.
14860 (regcache) <dump>: Remove.
14861
14862 2018-02-21 Yao Qi <yao.qi@linaro.org>
14863
14864 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14865 reg_buffer_rw *.
14866 (jit_unwind_reg_set_impl): Call raw_supply.
14867 (jit_frame_sniffer): Use reg_buffer_rw.
14868 * record-full.c (record_full_core_regbuf): Change its type.
14869 (record_full_core_open_1): Use reg_buffer_rw.
14870 (record_full_close): Likewise.
14871 (record_full_core_fetch_registers): Use regcache->raw_supply.
14872 (record_full_core_store_registers): Likewise.
14873 * regcache.c (regcache::get_register_status): Move it to
14874 reg_buffer.
14875 (regcache_raw_set_cached_value): Remove.
14876 (regcache::raw_set_cached_value): Remove.
14877 (regcache::raw_write): Call raw_supply.
14878 (regcache::raw_supply): Move it to reg_buffer_rw.
14879 * regcache.h (regcache_raw_set_cached_value): Remove.
14880 (reg_buffer_rw): New class.
14881
14882 2018-02-21 Yao Qi <yao.qi@linaro.org>
14883
14884 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14885 readonly_detached_regcache.
14886 (dummy_frame_prev_register): Use regcache->cooked_read.
14887 * frame.c (frame_save_as_regcache): Change return type.
14888 (frame_pop): Update.
14889 * frame.h (frame_save_as_regcache): Update declaration.
14890 * inferior.h (get_infcall_suspend_state_regcache): Update
14891 declaration.
14892 * infrun.c (infcall_suspend_state) <registers>: use
14893 readonly_detached_regcache.
14894 (save_infcall_suspend_state): Don't use regcache_dup.
14895 (get_infcall_suspend_state_regcache): Change return type.
14896 * linux-fork.c (struct fork_info) <savedregs>: Change to
14897 readonly_detached_regcache.
14898 <pc>: New field.
14899 (fork_save_infrun_state): Don't use regcache_dup.
14900 (info_checkpoints_command): Adjust.
14901 * mi/mi-main.c (register_changed_p): Update declaration.
14902 (mi_cmd_data_list_changed_registers): Use
14903 readonly_detached_regcache.
14904 (register_changed_p): Change parameter type to
14905 readonly_detached_regcache.
14906 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14907 readonly_detached_regcache.
14908 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14909 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14910 New.
14911 (regcache::save): Move it to reg_buffer.
14912 (regcache::restore): Change parameter type.
14913 (regcache_dup): Remove.
14914 * regcache.h (reg_buffer) <save>: New method.
14915 (readonly_detached_regcache): New class.
14916 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14917 readonly_detached_regcache.
14918 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14919
14920 2018-02-21 Yao Qi <yao.qi@linaro.org>
14921
14922 * frame.c (frame_save_as_regcache): Use regcache method save.
14923 (frame_pop): Use regcache method restore.
14924 * infrun.c (restore_infcall_suspend_state): Likewise.
14925 * linux-fork.c (fork_load_infrun_state): Likewise.
14926 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14927 save.
14928 * regcache.c (regcache_save): Remove.
14929 (regcache::restore): More asserts.
14930 (regcache_cpy): Remove.
14931 * regcache.h (regcache_save): Remove the declaration.
14932 (regcache::restore): Move from private to public.
14933 Remove the friend declaration of regcache_cpy.
14934 (regcache_cpy): Remove declaration.
14935
14936 2018-02-21 Yao Qi <yao.qi@linaro.org>
14937
14938 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14939 parameter type to 'readable_regcache *'.
14940 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14941 * arm-tdep.c (arm_neon_quad_read): Likewise.
14942 (arm_pseudo_read): Likewise.
14943 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14944 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14945 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14946 * gdbarch.c: Re-generated.
14947 * gdbarch.h: Re-generated.
14948 * gdbarch.sh (pseudo_register_read): Change parameter type to
14949 'readable_regcache *'.
14950 (pseudo_register_read_value): Likewise.
14951 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14952 (h8300_pseudo_register_read): Likewise.
14953 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14954 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14955 (i386_pseudo_register_read_into_value): Likewise.
14956 (i386_pseudo_register_read_value): Likewise.
14957 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14958 declaration.
14959 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14960 * m32c-tdep.c (m32c_raw_read): Likewise.
14961 (m32c_read_flg): Likewise.
14962 (m32c_banked_register): Likewise.
14963 (m32c_banked_read): Likewise.
14964 (m32c_sb_read): Likewise.
14965 (m32c_part_read): Likewise.
14966 (m32c_cat_read): Likewise.
14967 (m32c_r3r2r1r0_read): Likewise.
14968 (m32c_pseudo_register_read): Likewise.
14969 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14970 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14971 (mep_pseudo_cr64_read): Likewise.
14972 (mep_pseudo_register_read): Likewise.
14973 * mips-tdep.c (mips_pseudo_register_read): Likewise.
14974 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14975 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14976 * regcache.c (regcache::raw_read): Move it to readable_regcache.
14977 (regcache::cooked_read): Likewise.
14978 (regcache::cooked_read_value): Likewise.
14979 (regcache_cooked_read_signed):
14980 (regcache::cooked_read): Likewise.
14981 * regcache.h (readable_regcache): New class.
14982 (regcache): Inherit readable_regcache. Move some methods to
14983 readable_regcache.
14984 * rl78-tdep.c (rl78_pseudo_register_read): Change
14985 parameter type to 'readable_regcache *'.
14986 * rs6000-tdep.c (do_regcache_raw_read): Remove.
14987 (e500_pseudo_register_read): Change parameter type to
14988 'readable_regcache *'.
14989 (dfp_pseudo_register_read): Likewise.
14990 (vsx_pseudo_register_read): Likewise.
14991 (efpr_pseudo_register_read): Likewise.
14992 * s390-tdep.c (s390_pseudo_register_read): Likewise.
14993 * sh-tdep.c (sh_pseudo_register_read): Likewise.
14994 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14995 (sh64_pseudo_register_read): Likewise.
14996 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14997 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14998 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14999 (spu_pseudo_register_read): Likewise.
15000 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15001 (xtensa_pseudo_register_read): Likewise.
15002
15003 2018-02-21 Yao Qi <yao.qi@linaro.org>
15004
15005 * regcache.c (regcache::regcache): Call reg_buffer ctor.
15006 (regcache::arch): Move it to reg_buffer::arch.
15007 (regcache::register_buffer): Likewise.
15008 (regcache::assert_regnum): Likewise.
15009 (regcache::num_raw_registers): Likewise.
15010 * regcache.h (reg_buffer): New class.
15011 (regcache): Inherit reg_buffer.
15012
15013 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
15014
15015 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
15016 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
15017
15018 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
15019
15020 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
15021
15022 2018-02-19 Alan Hayward <alan.hayward@arm.com>
15023
15024 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15025 (SFILES): Remove common/*.c files.
15026 (COMMON_OBS): Remove some *.o files built from common/*.c files.
15027 * common/common.host: Add common reference.
15028 * configure.ac: Likewise.
15029 * configure: Regenerate.
15030
15031 2018-02-16 Yao Qi <yao.qi@linaro.org>
15032
15033 * block.c (block_namespace_info): Inherit allocate_on_obstack.
15034 (block_initialize_namespace): Use new.
15035 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15036 (dwarf2_free_objfile): Use delete.
15037 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15038 (copy_type_recursive): Use new.
15039 * gdb_obstack.h (allocate_on_obstack): New.
15040
15041 2018-02-15 Yao Qi <yao.qi@linaro.org>
15042
15043 PR gdb/22849
15044 * inferior.c (exit_inferior_1): Reset inf->control.
15045
15046 2018-02-15 Joel Brobecker <brobecker@adacore.com>
15047
15048 * ada-lang.c (ada_to_fixed_value_create): Delete advance
15049 declaration.
15050
15051 2018-02-14 Pedro Alves <palves@redhat.com>
15052
15053 * frame-unwind.c (frame_unwind_try_unwinder): Always call
15054 frame_cleanup_after_sniffer on exception.
15055
15056 2018-02-14 Tom Tromey <tom@tromey.com>
15057
15058 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15059 const.
15060 (solib_bfd_open): Make pathname const.
15061 * solib.c (solib_bfd_open): Make pathname const.
15062 * solib-spu.c (spu_bfd_fopen): Make name const.
15063 (spu_bfd_open): Make pathname const.
15064 * solib-darwin.c (darwin_bfd_open): Make pathname const.
15065 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15066
15067 2018-02-14 Tom Tromey <tom@tromey.com>
15068
15069 * symfile.c (symfile_bfd_open): Update.
15070 * source.h (openp, source_full_path_of, find_and_open_source):
15071 Change argument type to unique_xmalloc_ptr.
15072 * source.c (openp): Take a unique_xmalloc_ptr.
15073 (source_full_path_of, find_and_open_source): Likewise.
15074 (open_source_file, symtab_to_fullname): Update.
15075 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15076 unique_xmalloc_ptr.
15077 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15078 (exec_file_find): Update.
15079 * psymtab.c (psymtab_to_fullname): Update.
15080 * nto-tdep.h (nto_find_and_open_solib): Update.
15081 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15082 unique_xmalloc_ptr.
15083 * exec.c (exec_file_attach): Update.
15084 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15085 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15086
15087 2018-02-14 Tom Tromey <tom@tromey.com>
15088
15089 * solib.c: Include source.h.
15090 * nto-tdep.c: Include source.h.
15091 * mi/mi-cmd-env.c: Include source.h.
15092 * infcmd.c: Include source.h.
15093 * exec.c: Include source.h.
15094 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15095 (add_path, directory_switch, source_path, init_source_path): Move
15096 declarations...
15097 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15098 (add_path, directory_switch, source_path, init_source_path):
15099 ...here.
15100
15101 2018-02-14 Tom Tromey <tom@tromey.com>
15102
15103 * solist.h (exec_file_find, solib_find): Return
15104 unique_xmalloc_ptr.
15105 (solib_bfd_fopen): Take a const char *.
15106 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15107 (exec_file_find, solib_find): Likewise.
15108 (solib_bfd_fopen): Do not take ownership of "pathname".
15109 (solib_bfd_open): Use unique_xmalloc_ptr.
15110 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15111 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15112 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15113 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15114
15115 2018-02-14 Joel Brobecker <brobecker@adacore.com>
15116
15117 * ada-lang.c (name_match_type_from_name): Remove reference to
15118 ada_name_for_lookup in function's documentation.
15119 * ada-lang.h (ada_name_for_lookup): Delete declaration.
15120
15121 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15122
15123 * defs.h (enum openp_flags): New enum.
15124 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15125 Move to enum openp_flags.
15126 (openp_flags): New enum flags.
15127 (openp): Change parameter type to openp_flags.
15128 * source.c (openp): Change parameter type to openp_flags.
15129 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15130 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15131
15132 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
15133
15134 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15135 per-command.
15136
15137 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
15138
15139 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15140 into...
15141 (class dwarf2_queue_guard): ...the destructor of this new class.
15142 (dw2_do_instantiate_symtab): Create instance of the new class
15143 dwarf2_queue_guard, remove cleanup.
15144
15145 2018-02-09 Tom Tromey <tom@tromey.com>
15146
15147 * source.c (find_source_lines): Don't reference past the end of
15148 the vector.
15149
15150 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15151
15152 * remote.c (remote_btrace_maybe_reopen): Change error message.
15153 * btrace.c (btrace_enable): Likewise.
15154 (parse_xml_btrace): Likewise.
15155 (parse_xml_btrace_conf): Likewise.
15156
15157 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15158
15159 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15160 (linux_enable_pt, linux_enable_bts): Call
15161 diagnose_perf_event_open_fail.
15162
15163 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15164
15165 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15166 Remove parameter and change return type. Update callers. Move it.
15167 (linux_enable_bts, linux_enable_pt): Improve error message.
15168 (linux_enable_pt): Remove zero buffer size check.
15169 (linux_enable_btrace): Improve error messages. Remove NULL return
15170 check.
15171
15172 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15173
15174 * btrace.c (btrace_enable): Remove target_supports_btrace call.
15175 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15176 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15177 (linux_supports_pt, linux_supports_btrace): Remove.
15178 (linux_enable_bts): Call cpu_supports_bts.
15179 * nat/linux-btrace.h (linux_supports_btrace): Remove.
15180 * remote.c (remote_supports_btrace): Remove.
15181 (init_remote_ops): Remove remote_supports_btrace.
15182 * target-delegates.c: Regenerated.
15183 * target.c (target_supports_btrace): Remove.
15184 * target.h (target_ops) <to_supports_btrace>: Remove
15185 (target_supports_btrace): Remove.
15186 * x86-linux-nat.c (x86_linux_create_target): Remove
15187 linux_supports_btrace.
15188
15189 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15190
15191 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15192 btrace failed.
15193 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15194 exception and use message in own exception.
15195
15196 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15197
15198 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15199 (perf_event_pt_event_type): Use gdb_file_up.
15200 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15201 scoped_fd, and scoped_mmap.
15202
15203 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15204
15205 * common/scoped_mmap.h: New.
15206 * unittests/scoped_mmap-selftest.c: New.
15207 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15208 unittests/scoped_mmap-selftest.c.
15209
15210 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
15211
15212 * common/scoped_fd.h: New.
15213 * unittests/scoped_fd-selftest.c: New.
15214 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15215 unittests/scoped_fd-selftest.c.
15216
15217 2018-02-09 Tom Tromey <tom@tromey.com>
15218
15219 * auto-load.c (auto_load_section_scripts): Use
15220 gdb::unique_xmalloc_ptr.
15221
15222 2018-02-09 Tom Tromey <tom@tromey.com>
15223
15224 * auto-load.c (execute_script_contents): Use std::string.
15225
15226 2018-02-09 Joel Brobecker <brobecker@adacore.com>
15227
15228 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15229 Python function, rather than a new command.
15230
15231 2018-02-08 Tom Tromey <tom@tromey.com>
15232
15233 * solib.c (solib_find_1): Use std::string.
15234 (solib_bfd_fopen): Use unique_xmalloc_ptr.
15235
15236 2018-02-08 Tom Tromey <tom@tromey.com>
15237
15238 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15239
15240 2018-02-08 Tom Tromey <tom@tromey.com>
15241
15242 * source.c (find_source_lines): Use gdb::def_vector.
15243
15244 2018-02-08 Tom Tromey <tom@tromey.com>
15245
15246 * macrocmd.c (struct temporary_macro_definition): New.
15247 (macro_define_command): Use temporary_macro_definition. Remove
15248 cleanups.
15249 (free_macro_definition_ptr): Remove.
15250
15251 2018-02-08 Tom Tromey <tom@tromey.com>
15252
15253 * macroexp.c (maybe_expand): Use std::string.
15254
15255 2018-02-08 Tom Tromey <tom@tromey.com>
15256
15257 * macroexp.c (struct macro_buffer): Add initializers for some
15258 members.
15259 (init_buffer, init_shared_buffer, free_buffer)
15260 (free_buffer_return_text): Remove.
15261 (macro_buffer): New constructors.
15262 (~macro_buffer): New destructor.
15263 (macro_buffer::set_shared): New method.
15264 (macro_buffer::resize_buffer, macro_buffer::appendc)
15265 (macro_buffer::appendmem): Now methods, not free functions.
15266 (set_token, append_tokens_without_splicing, stringify)
15267 (macro_stringify): Update.
15268 (gather_arguments): Change return type. Remove argc_p argument,
15269 add args_ptr argument. Use std::vector.
15270 (substitute_args): Remove argc argument. Accept std::vector.
15271 (expand): Update. Use std::vector.
15272 (scan, macro_expand, macro_expand_next): Update.
15273
15274 2018-02-08 Tom Tromey <tom@tromey.com>
15275
15276 * symtab.c (default_collect_symbol_completion_matches_break_on):
15277 Use unique_xmalloc_ptr.
15278 * macroscope.h: (sal_macro_scope, user_macro_scope)
15279 (default_macro_scope): Return unique_xmalloc_ptr.
15280 * macroscope.c (sal_macro_scope, user_macro_scope)
15281 (default_macro_scope): Return unique_xmalloc_ptr.
15282 * macroexp.h (macro_expand, macro_expand_once): Return
15283 unique_xmalloc_ptr.
15284 * macroexp.c (macro_expand, macro_expand_once): Return
15285 unique_xmalloc_ptr.
15286 * macrocmd.c (macro_expand_command, macro_expand_once_command)
15287 (info_macro_command, info_macros_command): Use
15288 unique_xmalloc_ptr.
15289 * compile/compile-c-support.c (write_macro_definitions): Use
15290 unique_xmalloc_ptr.
15291 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15292
15293 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
15294
15295 * value.c (value_static_field): Assign field type instead of
15296 containing type when returning an optimized out value.
15297
15298 2018-02-06 Yao Qi <yao.qi@linaro.org>
15299
15300 * ft32-tdep.c (ft32_read_pc): Remove.
15301 (ft32_write_pc): Remove.
15302 (ft32_gdbarch_init): Update.
15303 * m32r-tdep.c (m32r_read_pc): Remove.
15304 (m32r_gdbarch_init): Update.
15305 * mep-tdep.c (mep_read_pc): Remove.
15306 (mep_gdbarch_init): Update.
15307 * microblaze-tdep.c (microblaze_write_pc): Remove.
15308 (microblaze_gdbarch_init): Update.
15309 * mn10300-tdep.c (mn10300_read_pc): Remove.
15310 (mn10300_write_pc): Remove.
15311 (mn10300_gdbarch_init): Update.
15312 * moxie-tdep.c (moxie_read_pc): Remove.
15313 (moxie_write_pc): Remove.
15314 (moxie_gdbarch_init): Update.
15315
15316 2018-02-06 Yao Qi <yao.qi@linaro.org>
15317
15318 * expprint.c (print_subexp_standard): Handle
15319 OP_F77_UNDETERMINED_ARGLIST.
15320 (dump_subexp_body_standard): Likewise.
15321
15322 2018-02-05 Alan Hayward <alan.hayward@arm.com>
15323
15324 * target-descriptions.c (tdesc_element_visitor) Add empty
15325 implementations.
15326 (tdesc_type): Move make_gdb_type from here.
15327 (tdesc_type_builtin): Likewise.
15328 (tdesc_type_vector): Likewise.
15329 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15330 (make_gdb_type_struct): Move from tdesc_type_with_fields.
15331 (make_gdb_type_union): Likewise.
15332 (make_gdb_type_flags): Likewise.
15333 (make_gdb_type_enum): Likewise.
15334 (make_gdb_type): New function.
15335 (tdesc_register_type): Use static make_gdb_type.
15336
15337 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
15338
15339 * infcmd.c (default_print_one_register_info): Align natural-format
15340 column values consistently one under another.
15341 (pad_to_column): New function.
15342
15343 2018-02-05 Joel Brobecker <brobecker@adacore.com>
15344
15345 * dwarf2read.c (dwarf2_physname): Move commment.
15346
15347 2018-02-01 Leszek Swirski <leszeks@google.com>
15348
15349 * varobj.c (varobj_formatted_print_options): Allow recursive
15350 pretty printing if pretty printing is enabled.
15351
15352 2018-02-01 Leszek Swirski <leszeks@google.com>
15353
15354 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15355 names after a structop as a filename.
15356
15357 2018-02-01 Yao Qi <yao.qi@linaro.org>
15358
15359 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15360 (arm_record_coproc_data_proc): Likewise.
15361
15362 2018-02-01 Yao Qi <yao.qi@linaro.org>
15363
15364 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15365
15366 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
15367
15368 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15369 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15370
15371 2018-01-31 Pedro Alves <palves@redhat.com>
15372
15373 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15374 * inflow.c (child_terminal_save_inferior): Wrap reference to
15375 tcgetpgrp in HAVE_TERMIOS_H.
15376 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15377 _WIN32.
15378 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15379 always iterate over all inferiors.
15380 (gdbsim_cntrl_c): Adjust.
15381 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15382
15383 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15384
15385 * gdbtypes.c (lookup_array_range_type): Make sure the array's
15386 index type is objfile-owned if the element type is as well.
15387
15388 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15389
15390 GDB 8.1 released.
15391
15392 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
15393
15394 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15395 "features/s390x-linux64.c".
15396 (_initialize_s390_linux_tdep): Remove initialization of tdescs
15397 s390_linux32 and s390x_linux64.
15398 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15399 default tdesc.
15400 * s390-tdep.c: Include "features/s390-linux32.c" and
15401 "features/s390x-linux64.c".
15402 (s390_tdesc_valid): Add check for tdesc_has_registers.
15403 (s390_gdbarch_init): Make sure there is always a valid tdesc.
15404 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15405 tdesc_s390x_linux64.
15406 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15407 tdesc_s390x_linux64 to...
15408 * s390-tdep.h: ...here.
15409
15410 2018-01-30 Pedro Alves <palves@redhat.com>
15411
15412 PR gdb/13211
15413 * config.in, configure: Regenerate.
15414 * configure.ac: Check for getpgid.
15415 * go32-nat.c (go32_pass_ctrlc): New.
15416 (go32_target): Install it.
15417 * inf-child.c (inf_child_target): Install
15418 child_terminal_save_inferior, child_pass_ctrlc and
15419 child_interrupt.
15420 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15421 (inf_ptrace_target): No longer install it.
15422 * infcmd.c (interrupt_target_1): Adjust.
15423 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15424 (child_interrupt): Declare.
15425 (inferior::terminal_state): New.
15426 * inflow.c (struct terminal_info): Update comments.
15427 (inferior_process_group): Delete.
15428 (terminal_is_ours): Delete.
15429 (gdb_tty_state): New.
15430 (child_terminal_init): Adjust.
15431 (is_gdb_terminal, sharing_input_terminal_1)
15432 (sharing_input_terminal): New functions.
15433 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
15434 Set the process's actual process group in the foreground if
15435 possible. Handle is_ours_for_output/is_ours distinction. Don't
15436 mark terminal as the inferior's if not sharing GDB's terminal.
15437 Don't check attach_flag.
15438 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15439 pass down a target_terminal_state.
15440 (child_terminal_save_inferior): New, factored out from ...
15441 (child_terminal_ours_1): ... this. Handle
15442 target_terminal_state::is_ours_for_output.
15443 (child_interrupt, child_pass_ctrlc): New.
15444 (inflow_inferior_exit): Clear the inferior's terminal_state.
15445 (copy_terminal_info): Copy the inferior's terminal state.
15446 (_initialize_inflow): Remove reference to terminal_is_ours.
15447 * inflow.h (inferior_process_group): Delete.
15448 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15449 * procfs.c (procfs_target): Don't install procfs_interrupt.
15450 (procfs_interrupt): Delete.
15451 * remote.c (remote_serial_quit_handler): Adjust.
15452 (remote_interrupt): Remove ptid parameter. Adjust.
15453 * target-delegates.c: Regenerate.
15454 * target.c: Include "terminal.h".
15455 (target_terminal::terminal_state): Rename to ...
15456 (target_terminal::m_terminal_state): ... this.
15457 (target_terminal::init): Adjust.
15458 (target_terminal::inferior): Adjust to per-inferior
15459 terminal_state.
15460 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15461 (target_terminal::ours, target_terminal::ours_for_output): Use
15462 target_terminal_is_ours_kind.
15463 (target_interrupt): Remove ptid parameter. Adjust.
15464 (default_target_pass_ctrlc): Adjust.
15465 * target.h (target_ops::to_terminal_save_inferior): New field.
15466 (target_ops::to_interrupt): Remove ptid_t parameter.
15467 (target_interrupt): Remove ptid_t parameter. Update comment.
15468 (target_pass_ctrlc): Update comment.
15469 * target/target.h (target_terminal_state): New scoped enum,
15470 factored out of ...
15471 (target_terminal::terminal_state): ... here.
15472 (target_terminal::inferior): Update comments.
15473 (target_terminal::restore_inferior): New.
15474 (target_terminal::is_inferior, target_terminal::is_ours)
15475 (target_terminal::is_ours_for_output): Adjust.
15476 (target_terminal::scoped_restore_terminal_state): Adjust to
15477 rename, and call restore_inferior() instead of inferior().
15478 (target_terminal::scoped_restore_terminal_state::m_state): Change
15479 type.
15480 (target_terminal::terminal_state): Rename to ...
15481 (target_terminal::m_terminal_state): ... this and change type.
15482
15483 2018-01-30 Pedro Alves <palves@redhat.com>
15484
15485 * linux-nat.c (wait_for_signal): New function.
15486 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15487 directly.
15488 (async_terminal_is_ours)
15489 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15490 (linux_nat_add_target): Don't override
15491 to_terminal_inferior/to_terminal_ours.
15492
15493 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
15494
15495 * remote.c (remote_follow_fork): Don't call "detach_inferior".
15496
15497 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
15498
15499 * dwarf2read.c (free_dwo_files): Add forward-declaration.
15500 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15501 dwarf2_per_objfile_free here.
15502 (dwarf2_per_objfile_free): Remove.
15503 (_initialize_dwarf2_read): Don't register
15504 dwarf2_per_objfile_free as a registry cleanup.
15505
15506 2018-01-27 Eli Zaretskii <eliz@gnu.org>
15507
15508 Avoid compilation errors in MinGW native builds
15509
15510 The error is triggered by including python-internal.h, and the
15511 error message is:
15512
15513 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15514 from build-gnulib/import/math.h:27,
15515 from d:/usr/Python26/include/pyport.h:235,
15516 from d:/usr/Python26/include/Python.h:58,
15517 from python/python-internal.h:94,
15518 from python/py-arch.c:24:
15519 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15520 using ::hypot;
15521 ^~~~~
15522
15523 This happens because Python headers define 'hypot' to expand t
15524 '_hypot' in the Windows builds.
15525 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15526 'hypoth'. This avoids a compilation error.
15527
15528 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15529
15530 * MAINTAINERS (Write After Approval): Fix ordering.
15531
15532 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15533
15534 * MAINTAINERS (Write After Approval): Add Alan Hayward.
15535
15536 2018-01-26 Alan Modra <amodra@gmail.com>
15537
15538 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15539 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15540 Remove nop. Make const. Comment.
15541 (powerpc32_plt_stub_so_2): New.
15542 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15543 Correct count. Update uses.
15544 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15545 Move common code reading PLT entry word. Correct
15546 powerpc32_plt_stub PLT address calculation.
15547 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15548 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15549 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15550 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15551 (ppc64_standard_linkage8): Likewise.
15552 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15553 Correct insns description.
15554 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15555
15556 2018-01-24 Pedro Alves <palves@redhat.com>
15557
15558 GCC PR libstdc++/83906
15559 * gdbtypes.c (operator==(const dynamic_prop &,
15560 const dynamic_prop &)): New.
15561 (operator==(const range_bounds &, const range_bounds &)): New.
15562 (check_types_equal): Use them instead of memcmp.
15563 * gdbtypes.h (operator==(const dynamic_prop &,
15564 const dynamic_prop &)): Declare.
15565 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15566 (operator==(const range_bounds &, const range_bounds &)): Declare.
15567 (operator!=(const range_bounds &, const range_bounds &)): Declare.
15568
15569 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15570
15571 * s390-linux-tdep.c (s390_record_address_mask)
15572 (s390_record_calc_disp_common, s390_record_calc_disp)
15573 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15574 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15575 (s390_process_record): Move to s390-tdep.c.
15576 (s390_linux_init_abi_any): Adjust.
15577 * s390-tdep.c (s390_record_address_mask)
15578 (s390_record_calc_disp_common, s390_record_calc_disp)
15579 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15580 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15581 (s390_process_record): Moved from s390-linux-tdep.c
15582 (s390_gdbarch_init): Adjust.
15583
15584 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15585
15586 * s390-linux-nat.c (s390-tdep.h): New include.
15587 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15588 (HFILES_NO_SRCDIR): Add s390-tdep.h.
15589 (ALLDEPFILES): Add s390-tdep.c.
15590 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15591 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15592 * s390-tdep.h: ...this. New file.
15593 * s390-linux-tdep.c (s390-tdep.h): New include.
15594 (_initialize_s390_tdep): Rename to...
15595 (_initialize_s390_linux_tdep): ...this and adjust.
15596 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15597 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15598 s390-tdep.h.
15599 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15600 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15601 (s390_is_partial_instruction, s390_software_single_step)
15602 (is_non_branch_ril, s390_displaced_step_copy_insn)
15603 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15604 (s390_prologue_data, s390_addr, s390_store, s390_load)
15605 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15606 (s390_register_call_saved, s390_guess_tracepoint_registers)
15607 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15608 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15609 (s390_pseudo_register_name, s390_pseudo_register_type)
15610 (s390_pseudo_register_read, s390_pseudo_register_write)
15611 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15612 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15613 (s390_addr_bits_remove, s390_address_class_type_flags)
15614 (s390_address_class_type_flags_to_name)
15615 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15616 (s390_function_arg_float, s390_function_arg_vector)
15617 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15618 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15619 (s390_frame_align, s390_register_return_value, s390_return_value)
15620 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15621 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15622 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15623 (s390_trad_frame_prev_register, s390_unwind_cache)
15624 (s390_prologue_frame_unwind_cache)
15625 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15626 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15627 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15628 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15629 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15630 (s390_frame_base_address, s390_local_base_address)
15631 (s390_frame_base, s390_gcc_target_options)
15632 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15633 (s390_validate_reg_range, s390_tdesc_valid)
15634 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15635 * s390-tdep.c: ...this. New file.
15636
15637 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15638
15639 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15640 (s390_process_record, s390_gdbarch_tdep_alloc)
15641 (s390_linux_init_abi_any): Use/set new hook.
15642
15643 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15644
15645 * s390-linux-tdep.c (osabi.h): New include.
15646 (s390_linux_init_abi_31, s390_linux_init_abi_64)
15647 (s390_linux_init_abi_any): New functions.
15648 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15649
15650 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15651
15652 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15653 tdesc_has_registers check
15654
15655 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15656
15657 * s390-linux-tdep.c (s390_tdesc_valid): New function.
15658 (s390_validate_reg_range): New macro.
15659 (s390_gdbarch_init): Adjust.
15660
15661 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15662
15663 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15664 (s390_gdbarch_tdep_alloc): Adjust.
15665 (s390_gdbarch_init): Adjust.
15666
15667 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15668
15669 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15670 <have_tdb>: Change type to bool.
15671 (s390_gdbarch_tdep_alloc): Adjust.
15672 (s390_gdbarch_init): Adjust.
15673
15674 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15675
15676 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15677 (gdbarch_tdep) <have_upper, have_vx>: New fields.
15678 (s390_gdbarch_tdep_alloc): New function.
15679 (s390_gdbarch_init): Allocate tdep at start and use its fields
15680 instead of separate variables.
15681
15682 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15683
15684 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15685 when looking for cached gdbarch and add comment for remaining.
15686
15687 2018-01-22 Pedro Alves <palves@redhat.com>
15688 Sergio Durigan Junior <sergiodj@redhat.com>
15689
15690 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15691 case.
15692
15693 2018-01-22 Maciej W. Rozycki <macro@mips.com>
15694
15695 * MAINTAINERS: Update my company e-mail address.
15696
15697 2018-01-22 Yao Qi <yao.qi@linaro.org>
15698
15699 * regcache.c (cooked_write_test): New function.
15700 (_initialize_regcache): Register the test.
15701
15702 2018-01-22 Yao Qi <yao.qi@linaro.org>
15703
15704 * ia64-tdep.c (ia64_pseudo_register_read): Call
15705 regcache->cooked_read instead of regcache_cooked_read_unsigned.
15706 * m32c-tdep.c (m32c_cat_read): Likewise.
15707 (m32c_r3r2r1r0_read): Likewise.
15708 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15709 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15710
15711 2018-01-22 Yao Qi <yao.qi@linaro.org>
15712
15713 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15714 method raw_read instead of regcache_raw_read.
15715 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15716 * arm-tdep.c (arm_neon_quad_read): Likewise.
15717 * avr-tdep.c (avr_pseudo_register_read): Likewise.
15718 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15719 * frv-tdep.c (frv_pseudo_register_read): Likewise.
15720 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15721 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15722 (i386_pseudo_register_read_into_value): Likewise.
15723 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15724 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15725 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15726 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15727 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15728 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15729 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15730 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15731 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15732
15733 2018-01-22 Yao Qi <yao.qi@linaro.org>
15734
15735 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15736 * configure.tgt: Remove target mt.
15737 * mt-tdep.c: Remove.
15738 * regcache.c (cooked_read_test): Remove the check for mt.
15739
15740 2018-01-22 Yao Qi <yao.qi@linaro.org>
15741
15742 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15743 instead of gdbarch_pseudo_register_read_value.
15744
15745 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15746
15747 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15748 language is Ada.
15749
15750 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15751
15752 * linespec.c (create_sals_line_offset): Remove code that preserved
15753 the symtab_and_line's line number.
15754
15755 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15756
15757 * varobj.c (varobj_create): Don't set valid_block when creating a
15758 floating varobj.
15759
15760 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15761
15762 * varobj.c (varobj_create): Remove out of date comment.
15763
15764 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15765
15766 PR mi/20395
15767 * ada-exp.y (write_var_from_sym): Pass extra parameter when
15768 updating innermost block.
15769 * parse.c (innermost_block_tracker::update): Take extra type
15770 parameter, and check types match before updating innermost block.
15771 (write_dollar_variable): Update innermost block for registers.
15772 * parser-defs.h (enum innermost_block_tracker_type): New enum.
15773 (innermost_block_tracker::innermost_block_tracker): Initialise
15774 m_types member.
15775 (innermost_block_tracker::reset): Take type parameter.
15776 (innermost_block_tracker::update): Take type parameter, and pass
15777 type through as needed.
15778 (innermost_block_tracker::m_types): New member.
15779 * varobj.c (varobj_create): Pass type when reseting innermost
15780 block.
15781
15782 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15783
15784 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15785 * ada-lang.c (resolve_subexp): Likewise.
15786 * breakpoint.c (set_breakpoint_condition) Likewise.
15787 (watch_command_1) Likewise.
15788 * c-exp.y (variable): Likewise.
15789 * d-exp.y (PrimaryExpression): Likewise.
15790 * f-exp.y (variable): Likewise.
15791 * go-exp.y (variable): Likewise.
15792 * m2-exp.y (variable): Likewise.
15793 * objfiles.c (objfile::~objfile): Likewise.
15794 * p-exp.y (variable): Likewise.
15795 * parse.c (innermost_block): Change type.
15796 * parser-defs.h (class innermost_block_tracker): New.
15797 (innermost_block): Change to innermost_block_tracker.
15798 * printcmd.c (display_command): Switch to innermost_block API.
15799 (do_one_display): Likewise.
15800 * rust-exp.y (do_one_display): Likewise.
15801 * symfile.c (clear_symtab_users): Likewise.
15802 * varobj.c (varobj_create): Switch to innermost_block API, replace
15803 use of innermost_block with block stored on varobj object.
15804
15805 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15806
15807 * expression.h (innermost_block): Remove declaration.
15808 * varobj.c: Add 'parser-defs.h' include.
15809
15810 2018-01-19 Tom Tromey <tom@tromey.com>
15811
15812 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15813 symbols in the static and global blocks.
15814
15815 2018-01-19 James Clarke <jrtc27@jrtc27.com>
15816
15817 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15818 gdb_ptrace.h, and move including gdb_wait.h ...
15819 * nat/linux-ptrace.h: ... to here.
15820
15821 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15822
15823 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15824 inf_ptrace_detach_success.
15825 (inf_ptrace_detach_success): Add inferior parameter, use it
15826 instead of inferior_ptid, pass it to detach_inferior.
15827 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15828 parameter.
15829 * inferior.c (detach_inferior): Add overload that takes an
15830 inferior object.
15831 * inferior.h (detach_inferior): Likewise.
15832 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15833 use inferior_ptid, adjust call to inf_ptrace_detach_success.
15834 * linux-thread-db.c (thread_db_detach): Use inf parameter.
15835
15836 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15837
15838 * target.h (struct target_ops) <to_detach>: Add inferior
15839 parameter.
15840 (target_detach): Likewise.
15841 * target.c (dispose_inferior): Pass inferior down.
15842 (target_detach): Pass inferior down. Assert that it is equal to
15843 the current inferior.
15844 * aix-thread.c (aix_thread_detach): Pass inferior down.
15845 * corefile.c (core_file_command): Pass current_inferior() down.
15846 * corelow.c (core_detach): Add inferior parameter.
15847 * darwin-nat.c (darwin_detach): Likewise.
15848 * gnu-nat.c (gnu_detach): Likewise.
15849 * inf-ptrace.c (inf_ptrace_detach): Likewise.
15850 * infcmd.c (detach_command): Pass current_inferior() down to
15851 target_detach.
15852 * infrun.c (follow_fork_inferior): Pass parent_inf to
15853 target_detach.
15854 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15855 target_detach.
15856 * linux-nat.c (linux_nat_detach): Add inferior parameter.
15857 * linux-thread-db.c (thread_db_detach): Likewise.
15858 * nto-procfs.c (procfs_detach): Likewise.
15859 * procfs.c (procfs_detach): Likewise.
15860 * record.c (record_detach): Likewise.
15861 * record.h (struct inferior): Forward-declare.
15862 (record_detach): Add inferior parameter.
15863 * remote-sim.c (gdbsim_detach): Likewise.
15864 * remote.c (remote_detach_1): Likewise.
15865 (remote_detach): Likewise.
15866 (extended_remote_detach): Likewise.
15867 * sol-thread.c (sol_thread_detach): Likewise.
15868 * target-debug.h (target_debug_print_inferior_p): New macro.
15869 * target-delegates.c: Re-generate.
15870 * top.c (kill_or_detach): Pass inferior down to target_detach.
15871 * windows-nat.c (windows_detach): Add inferior parameter.
15872
15873 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15874
15875 * target.h (struct target_ops) <to_detach>: Remove args
15876 parameter.
15877 (target_detach): Likewise.
15878 * target.c (dispose_inferior): Adjust.
15879 (target_detach): Remove args parameter, adjust.
15880 * aix-thread.c (aix_thread_detach): Adjust.
15881 * corefile.c (core_file_command): Adjust.
15882 * corelow.c (core_detach): Adjust.
15883 * darwin-nat.c (darwin_detach): Adjust.
15884 * gnu-nat.c (gnu_detach): Adjust.
15885 * inf-ptrace.c (inf_ptrace_detach): Adjust.
15886 * infcmd.c (detach_command): Adjust
15887 * infrun.c (follow_fork_inferior): Adjust.
15888 (handle_vfork_child_exec_or_exit): Adjust.
15889 * linux-fork.c (linux_fork_detach): Remove args parameter.
15890 * linux-fork.h (linux_fork_detach): Likewise.
15891 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15892 * linux-thread-db.c (thread_db_detach): Likewise.
15893 * nto-procfs.c (procfs_detach): Likewise.
15894 * procfs.c (procfs_detach): Likewise.
15895 (do_detach): Remove signo parameter.
15896 * record.c (record_detach): Remove args parameter.
15897 * record.h (record_detach): Likewise.
15898 * remote-sim.c (gdbsim_detach): Likewise.
15899 * remote.c (remote_detach_1): Likewise.
15900 (remote_detach): Likewise.
15901 (extended_remote_detach): Likewise.
15902 * sol-thread.c (sol_thread_detach): Likewise.
15903 * target-delegates.c: Re-generate.
15904 * top.c (struct qt_args) <args>: Remove field.
15905 (kill_or_detach): Don't pass args.
15906 (quit_force): Don't set args.
15907 * windows-nat.c (windows_detach): Remove args parameter.
15908
15909 2018-01-19 Yao Qi <yao.qi@linaro.org>
15910
15911 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15912 (arm_linux_init_abi): Install it.
15913
15914 2018-01-19 Yao Qi <yao.qi@linaro.org>
15915
15916 * osabi.c (gdb_osabi_names): Extend the regexp for
15917 arm-linux-gnueabihf.
15918
15919 2018-01-18 Yao Qi <yao.qi@linaro.org>
15920
15921 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15922 m_abbrevs.
15923 (abbrev_table::add_abbrev): Update.
15924 (abbrev_table::lookup_abbrev): Update.
15925
15926 2018-01-18 Yao Qi <yao.qi@linaro.org>
15927
15928 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15929
15930 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
15931
15932 * compile/compile.c (compile_to_object): Convert "triplet_rx"
15933 to "std::string".
15934
15935 2018-01-17 Tom Tromey <tom@tromey.com>
15936
15937 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
15938
15939 2018-01-17 Tom Tromey <tom@tromey.com>
15940
15941 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15942 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15943 (create_array_type_with_stride): Update.
15944 * dwarf2read.c (set_die_type): Update.
15945
15946 2018-01-17 Tom Tromey <tom@tromey.com>
15947
15948 * dwarf2read.c (delayed_method_info): Remove typedef.
15949 (dwarf2_cu::method_info): Now a std::vector.
15950 (add_to_method_list): Update.
15951 (free_delayed_list): Remove.
15952 (compute_delayed_physnames): Update.
15953 (process_full_comp_unit, process_full_type_unit): Clear the method
15954 list. Remove cleanups.
15955 (psymtab_include_file_name): Add name_holder parameter. Use
15956 unique_xmalloc_ptr.
15957 (dwarf_decode_lines): Update.
15958
15959 2018-01-17 Tom Tromey <tom@tromey.com>
15960 Simon Marchi <simon.marchi@ericsson.com>
15961
15962 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15963 (dwarf2_per_objfile::free_cached_comp_units)
15964 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15965 (init_cutu_and_read_dies_no_follow): Update.
15966 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15967 (dwarf2_cu::~dwarf2_cu): New.
15968 (free_heap_comp_unit, free_stack_comp_unit): Remove.
15969 (age_cached_comp_units, free_one_cached_comp_unit): Update.
15970
15971 2018-01-17 Tom Tromey <tom@tromey.com>
15972 Simon Marchi <simon.marchi@ericsson.com>
15973
15974 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15975 (struct die_reader_specs) <abbrev_table>: New member.
15976 (struct abbrev_table): Add constructor.
15977 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15978 <abbrev_obstack>: Now an auto_obstack.
15979 (abbrev_table_up): New typedef.
15980 (init_cu_die_reader): Add abbrev_table parameter.
15981 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15982 Add result_dwo_abbrev_table.
15983 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15984 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15985 Update.
15986 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15987 parameter.
15988 (skip_children): Update.
15989 (abbrev_table::alloc_abbrev): Rename from
15990 abbrev_table_alloc_abbrev.
15991 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15992 (abbrev_table::lookup_abbrev): Rename from
15993 abbrev_table_lookup_abbrev.
15994 (abbrev_table_read_table): Return abbrev_table_up.
15995 (abbrev_table_free, abbrev_table_free_cleanup)
15996 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15997 (load_partial_dies): Update.
15998
15999 2018-01-17 Tom Tromey <tom@tromey.com>
16000
16001 * dwarf2read.c (dwarf2_compute_name): Update comment.
16002 (read_func_scope, read_variable): Update.
16003 (new_symbol): Remove.
16004 (new_symbol_full): Rename to new_symbol.
16005
16006 2018-01-17 Mike Gulick <mgulick@mathworks.com>
16007
16008 PR gdb/16577
16009 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
16010 a warning instead of throwing an error, set section size to 0 and return
16011 NULL.
16012 * gdb_bfd.h (gdb_bfd_map_section): Update description.
16013
16014 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
16015
16016 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
16017 std::string.
16018 (linux_ptrace_attach_fail_reason_string): Likewise.
16019 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
16020 Likewise.
16021 (linux_ptrace_attach_fail_reason_string): Likewise.
16022 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16023
16024 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
16025
16026 * linux-nat.c (linux_nat_attach): Remove xstrdup.
16027
16028 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
16029
16030 PR gdb/21559
16031 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16032 checking for fs_base/gs_base fields in struct user_regs_struct.
16033 * configure: Regenerate.
16034
16035 2018-01-17 Yao Qi <yao.qi@linaro.org>
16036
16037 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16038 function.
16039 (aarch64_linux_init_abi): Install it to gdbarch hook
16040 gcc_target_options.
16041
16042 2018-01-15 Pedro Alves <palves@redhat.com>
16043
16044 * common/signals-state-save-restore.c
16045 (save_original_signals_state): Fix typos.
16046
16047 2017-01-12 Tom Tromey <tom@tromey.com>
16048 Sergio Durigan Junior <sergiodj@redhat.com>
16049
16050 * Makefile.in (install-only): Install gdb-add-index.
16051
16052 2018-01-12 John Baldwin <jhb@FreeBSD.org>
16053
16054 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16055
16056 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
16057
16058 * infrun.c (keep_going_pass_signal): Clear step-over info when
16059 insert_breakpoints fails.
16060
16061 2018-01-11 Pedro Alves <palves@redhat.com>
16062
16063 PR gdb/22583
16064 * infrun.c (resume): Rename to ...
16065 (resume_1): ... this.
16066 (resume): Reimplement as wrapper around resume_1.
16067
16068 2018-01-11 Pedro Alves <palves@redhat.com>
16069
16070 PR remote/22597
16071 * remote.c (remote_parse_stop_reply): Default to the last-set
16072 general thread instead of to 'magic_null_ptid'.
16073
16074 2018-01-10 Pedro Alves <palves@redhat.com>
16075
16076 * language.h (language_get_symbol_name_matcher): Rename ...
16077 (get_symbol_name_matcher): ... this.
16078 * language.c (language_get_symbol_name_matcher): Ditto.
16079 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16080 callers adjusted.
16081
16082 2018-01-10 Pedro Alves <palves@redhat.com>
16083
16084 PR gdb/22670
16085 * dwarf2read.c
16086 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16087 Adjust to use language_get_symbol_name_matcher instead of
16088 language_defn::la_get_symbol_name_matcher.
16089 * language.c (language_get_symbol_name_matcher): If in Ada mode
16090 and the lookup name is a verbatim match, return Ada's matcher.
16091 * language.h (language_get_symbol_name_matcher): Adjust comment.
16092 (ada_lookup_name_info::verbatim_p):: New method.
16093
16094 2018-01-10 Pedro Alves <palves@redhat.com>
16095
16096 PR gdb/22670
16097 * ada-lang.c (ada_collect_symbol_completion_matches): If the
16098 minsym's language is language_auto or language_cplus, pass down
16099 language_ada instead.
16100 * symtab.c (compare_symbol_name): Don't frob symbol language here.
16101
16102 2018-01-10 Pedro Alves <palves@redhat.com>
16103
16104 PR gdb/22670
16105 * minsyms.c (linkage_name_str): New function.
16106 (iterate_over_minimal_symbols): Use it.
16107
16108 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16109
16110 * NEWS: Document that 'info proc' now works on FreeBSD.
16111
16112 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16113
16114 * configure.ac: Check for kinfo_getfile in libutil.
16115 * configure: Regenerate.
16116 * config.in: Regenerate.
16117 * fbsd-nat.c: Include "fbsd-tdep.h".
16118 (fbsd_fetch_cmdline): New.
16119 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16120 rather than calling error.
16121 (fbsd_info_proc): New.
16122 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16123 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16124 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16125
16126 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16127
16128 * fbsd-nat.c (struct free_deleter): Remove.
16129 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16130
16131 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16132
16133 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16134 NULL for an empty pathname.
16135
16136 2018-01-09 John Baldwin <jhb@FreeBSD.org>
16137
16138 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16139 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16140 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16141 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16142 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16143 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16144 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16145 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16146 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16147 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16148 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16149 (fbsd_core_fetch_timeval, fbsd_print_sigset)
16150 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16151 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
16152 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16153
16154 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
16155
16156 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16157 (gnu_xfer_auxv): New function.
16158 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16159 TARGET_OBJECT_AUXV.
16160
16161 2018-01-08 Yao Qi <yao.qi@linaro.org>
16162 Simon Marchi <simon.marchi@ericsson.com>
16163
16164 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16165 common/selftest.c.
16166 (COMMON_OBS): Remove selftest.o.
16167 * configure.ac: Append selftest-arch.c and common/selftest.c to
16168 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
16169 * configure: Re-generated.
16170 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16171 GDB_SELF_TEST.
16172 (maintenance_info_selftests): Likewise.
16173
16174 2018-01-08 Xavier Roirand <roirand@adacore.com>
16175
16176 * ada-valprint.c (val_print_packed_array_elements): Use
16177 proper number of elements when printing an array indexed
16178 by an enumeration type.
16179
16180 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16181
16182 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16183 (dw2_get_file_names_reader): Adjust.
16184 (lookup_dwo_signatured_type): Adjust.
16185 (lookup_dwp_signatured_type): Adjust.
16186 (lookup_signatured_type): Adjust.
16187 (create_type_unit_group): Adjust.
16188 (get_type_unit_group): Adjust.
16189 (process_psymtab_comp_unit_reader): Adjust.
16190 (build_type_psymtabs_reader): Adjust.
16191 (scan_partial_symbols): Adjust.
16192 (add_partial_symbol): Adjust.
16193 (add_partial_subprogram): Adjust.
16194 (peek_die_abbrev): Adjust.
16195 (fixup_go_packaging): Adjust.
16196 (process_imported_unit_die): Adjust.
16197 (dwarf2_compute_name): Adjust.
16198 (dwarf2_physname): Adjust.
16199 (read_import_statement): Adjust.
16200 (handle_DW_AT_stmt_list): Adjust.
16201 (read_file_scope): Adjust.
16202 (read_func_scope): Adjust.
16203 (read_lexical_block_scope): Adjust.
16204 (read_call_site_scope): Adjust.
16205 (read_variable): Adjust.
16206 (dwarf2_rnglists_process): Adjust.
16207 (dwarf2_ranges_process): Adjust.
16208 (dwarf2_ranges_read): Adjust.
16209 (dwarf2_get_pc_bounds): Adjust.
16210 (dwarf2_record_block_ranges): Adjust.
16211 (dwarf2_add_field): Adjust.
16212 (dwarf2_add_member_fn): Adjust.
16213 (read_structure_type): Adjust.
16214 (process_structure_scope): Adjust.
16215 (read_enumeration_type): Adjust.
16216 (read_array_type): Adjust.
16217 (mark_common_block_symbol_computed): Adjust.
16218 (read_common_block): Adjust.
16219 (read_namespace_type): Adjust.
16220 (read_namespace): Adjust.
16221 (read_module_type): Adjust.
16222 (read_tag_pointer_type): Adjust.
16223 (read_tag_ptr_to_member_type): Adjust.
16224 (read_tag_string_type): Adjust.
16225 (read_subroutine_type): Adjust.
16226 (read_typedef): Adjust.
16227 (read_base_type): Adjust.
16228 (attr_to_dynamic_prop): Adjust.
16229 (read_subrange_type): Adjust.
16230 (read_unspecified_type): Adjust.
16231 (dwarf2_read_abbrevs): Adjust.
16232 (load_partial_dies): Adjust.
16233 (read_partial_die): Adjust.
16234 (find_partial_die): Adjust.
16235 (guess_partial_die_structure_name): Adjust.
16236 (fixup_partial_die): Adjust.
16237 (read_attribute_value): Adjust.
16238 (read_addr_index): Adjust.
16239 (read_addr_index_from_leb128): Adjust.
16240 (read_str_index): Adjust.
16241 (dwarf2_string_attr): Adjust.
16242 (get_debug_line_section): Adjust.
16243 (dwarf_decode_line_header): Adjust.
16244 (lnp_state_machine::check_line_address): Adjust.
16245 (dwarf_decode_lines_1): Adjust.
16246 (dwarf_decode_lines): Adjust.
16247 (dwarf2_start_symtab): Adjust.
16248 (var_decode_location): Adjust.
16249 (new_symbol_full): Adjust.
16250 (dwarf2_const_value_data): Adjust.
16251 (dwarf2_const_value_attr): Adjust.
16252 (dwarf2_const_value): Adjust.
16253 (die_type): Adjust.
16254 (die_containing_type): Adjust.
16255 (build_error_marker_type): Adjust.
16256 (lookup_die_type): Adjust.
16257 (guess_full_die_structure_name): Adjust.
16258 (anonymous_struct_prefix): Adjust.
16259 (determine_prefix): Adjust.
16260 (dwarf2_name): Adjust.
16261 (follow_die_ref_or_sig): Adjust.
16262 (follow_die_offset): Adjust.
16263 (follow_die_ref): Adjust.
16264 (follow_die_sig_1): Adjust.
16265 (follow_die_sig): Adjust.
16266 (get_signatured_type): Adjust.
16267 (get_DW_AT_signature_type): Adjust.
16268 (decode_locdesc): Adjust.
16269 (dwarf_decode_macros): Adjust.
16270 (cu_debug_loc_section): Adjust.
16271 (fill_in_loclist_baton): Adjust.
16272 (dwarf2_symbol_mark_computed): Adjust.
16273 (init_one_comp_unit): Don't assign
16274 dwarf2_cu::dwarf2_per_objfile.
16275 (set_die_type): Adjust.
16276
16277 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16278
16279 * dwarf2read.c (struct mapped_debug_names): Add constructor.
16280 <dwarf2_per_objfile>: New field.
16281 (dwarf2_per_objfile): Remove global.
16282 (get_dwarf2_per_objfile): New function.
16283 (set_dwarf2_per_objfile): New function.
16284 (dwarf2_build_psymtabs_hard): Change objfile parameter to
16285 dwarf2_per_objfile.
16286 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16287 (read_abbrev_offset): Likewise.
16288 (read_indirect_string): Likewise.
16289 (read_indirect_line_string): Likewise.
16290 (read_indirect_string_at_offset): Likewise.
16291 (read_indirect_string_from_dwz): Likewise.
16292 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16293 dwarf2_per_objfile.
16294 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16295 (create_all_comp_units): Change objfile parameter to
16296 dwarf2_per_objfile.
16297 (create_all_type_units): Likewise.
16298 (process_queue): Add dwarf2_per_objfile parameter.
16299 (read_and_check_comp_unit_head): Likewise.
16300 (lookup_dwo_unit_in_dwp): Likewise.
16301 (get_dwp_file): Likewise.
16302 (process_cu_includes): Likewise.
16303 (struct free_dwo_file_cleanup_data): New struct.
16304 (dwarf2_has_info): Use get_dwarf2_per_objfile and
16305 set_dwarf2_per_objfile.
16306 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16307 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16308 context, adjust calls.
16309 (dw2_instantiate_symtab): Likewise.
16310 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16311 (dw2_get_cu): Likewise.
16312 (create_cu_from_index_list): Change objfile parameter to
16313 dwarf2_per_objfile.
16314 (create_cus_from_index_list): Get dwarf2_per_objfile from
16315 context, adjust calls.
16316 (create_cus_from_index): Likewise.
16317 (create_signatured_type_table_from_index): Change objfile
16318 parameter to dwarf2_per_objfile.
16319 (create_signatured_type_table_from_debug_names): Change objfile
16320 parameter to dwarf2_per_objfile.
16321 (create_addrmap_from_index): Likewise.
16322 (create_addrmap_from_aranges): Likewise.
16323 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16324 (dw2_setup): Remove.
16325 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16326 context.
16327 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16328 get_dwarf2_per_objfile.
16329 (dw2_forget_cached_source_info): Likewise.
16330 (dw2_map_symtabs_matching_filename): Likewise.
16331 (struct dw2_symtab_iterator) <index>: Remove.
16332 <dwarf2_per_objfile>: New field.
16333 (dw2_symtab_iter_init): Replace index parameter with
16334 dwarf2_per_objfile.
16335 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16336 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16337 (dw2_print_stats): Likewise.
16338 (dw2_dump): Likewise.
16339 (dw2_expand_symtabs_for_function): Likewise.
16340 (dw2_expand_all_symtabs): Likewise.
16341 (dw2_expand_symtabs_with_fullname): Likewise.
16342 (dw2_expand_marked_cus): Replace index and objfile parameters
16343 with dwarf2_per_objfile.
16344 (dw_expand_symtabs_matching_file_matcher): Add
16345 dwarf2_per_objfile parameter and adjust calls.
16346 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16347 adjust calls.
16348 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16349 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16350 adjust calls.
16351 (create_cus_from_debug_names_list): Replace objfile parameter
16352 with dwarf2_per_objfile and adjust calls.
16353 (create_cus_from_debug_names): Likewise.
16354 (dwarf2_read_debug_names): Likewise.
16355 (mapped_debug_names::namei_to_name): Adjust call.
16356 (dw2_debug_names_iterator::next): Likewise.
16357 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16358 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16359 (dw2_debug_names_dump): Likewise.
16360 (dw2_debug_names_expand_symtabs_for_function): Likewise.
16361 (dw2_debug_names_expand_symtabs_matching): Likewise.
16362 (dwarf2_initialize_objfile): Likewise.
16363 (dwarf2_build_psymtabs): Likewise.
16364 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16365 this_cu.
16366 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16367 (read_and_check_comp_unit_head): Likewise.
16368 (read_abbrev_offset): Likewise.
16369 (create_debug_type_hash_table): Likewise.
16370 (create_debug_types_hash_table): Likewise.
16371 (create_all_type_units): Replace objfile parameter with
16372 dwarf2_per_objfile.
16373 (add_type_unit): Add dwarf2_per_objfile parameter.
16374 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16375 with dwarf2_per_objfile.
16376 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16377 (lookup_dwp_signatured_type): Likewise.
16378 (lookup_signatured_type): Likewise.
16379 (read_cutu_die_from_dwo): Likewise.
16380 (init_tu_and_read_dwo_dies): Likewise.
16381 (init_cutu_and_read_dies): Likewise.
16382 (init_cutu_and_read_dies_no_follow): Likewise.
16383 (allocate_type_unit_groups_table): Add objfile parameter.
16384 (create_type_unit_group): Use dwarf2_per_objfile from cu.
16385 (get_type_unit_group): Likewise.
16386 (process_psymtab_comp_unit): Update call.
16387 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16388 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16389 (print_tu_stats): Likewise.
16390 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16391 in void* parameter.
16392 (build_type_psymtabs): Change objfile parameter to
16393 dwarf2_per_objfile.
16394 (process_skeletonless_type_unit): Use dwarf2_per_objfile
16395 passed in void* parameter.
16396 (process_skeletonless_type_units): Change objfile parameter to
16397 dwarf2_per_objfile.
16398 (set_partial_user): Likewise.
16399 (dwarf2_build_psymtabs_hard): Likewise.
16400 (read_comp_units_from_section): Likewise.
16401 (create_all_comp_units): Likewise.
16402 (scan_partial_symbols): Update calls.
16403 (add_partial_symbol): Likewise.
16404 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16405 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16406 (process_queue): Add dwarf2_per_objfile parameter.
16407 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16408 (compute_compunit_symtab_includes): Likewise.
16409 (process_cu_includes): Add dwarf2_per_objfile parameter.
16410 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16411 (process_full_type_unit): Likewise.
16412 (process_imported_unit_die): Update call.
16413 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16414 (read_file_scope): Likewise.
16415 (allocate_dwo_file_hash_table): Add objfile parameter.
16416 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16417 (create_cus_hash_table): Likewise.
16418 (create_dwp_hash_table): Likewise.
16419 (create_dwo_unit_in_dwp_v1): Likewise.
16420 (create_dwp_v2_section): Likewise.
16421 (create_dwo_unit_in_dwp_v2): Likewise.
16422 (lookup_dwo_unit_in_dwp): Likewise.
16423 (try_open_dwop_file): Likewise.
16424 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16425 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16426 cleanup to include a reference to dwarf2_per_objfile.
16427 (open_dwp_file): Add dwarf2_per_objfile parameter.
16428 (open_and_init_dwp_file): Likewise.
16429 (get_dwp_file): Likewise.
16430 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16431 (queue_and_load_all_dwo_tus): Update call.
16432 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16433 data.
16434 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16435 (dwarf2_ranges_process): Likewise.
16436 (dwarf2_get_pc_bounds): Likewise.
16437 (mark_common_block_symbol_computed): Likewise.
16438 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16439 (dwarf2_read_abbrevs): Update call.
16440 (read_partial_die): Use dwarf2_per_objfile from cu.
16441 (find_partial_die): Likewise.
16442 (fixup_partial_die): Likewise.
16443 (read_attribute_value): Likewise.
16444 (read_indirect_string_at_offset_from): Add objfile parameter.
16445 (read_indirect_string_at_offset): Add dwarf2_per_objfile
16446 parameter.
16447 (read_indirect_string_from_dwz): Add objfile parameter.
16448 (read_indirect_string): Add objfile parameter.
16449 (read_addr_index_1): Add dwarf2_per_objfile parameter.
16450 (read_addr_index): Use dwarf2_per_objfile from cu.
16451 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16452 call dw2_setup.
16453 (read_str_index): Use dwarf2_per_objfile from cu.
16454 (get_debug_line_section): Likewise.
16455 (read_formatted_entries): Add dwarf2_per_objfile parameter.
16456 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16457 (new_symbol_full): Use dwarf2_per_objfile from cu.
16458 (build_error_marker_type): Likewise.
16459 (lookup_die_type): Likewise.
16460 (determine_prefix): Likewise.
16461 (follow_die_offset): Likewise.
16462 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16463 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16464 (dwarf2_fetch_die_type_sect_off): Likewise.
16465 (dwarf2_get_die_type): Likewise.
16466 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16467 (get_signatured_type): Likewise.
16468 (get_DW_AT_signature_type): Likewise.
16469 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16470 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16471 (cu_debug_loc_section): Likewise.
16472 (fill_in_loclist_baton): Likewise.
16473 (dwarf2_symbol_mark_computed): Likewise.
16474 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16475 dwarf2_per_objfile.
16476 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16477 parameter.
16478 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16479 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16480 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16481 (set_die_type): Use dwarf2_free_objfile from cu.
16482 (get_die_type_at_offset): Likewise.
16483 (dwarf2_per_objfile_free): Don't assign global variable.
16484 (debug_names) <constructor>: Add dwarf2_per_objfile
16485 parameter, update m_debugstrlookup construction.
16486 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16487 parameter.
16488 <m_dwarf2_per_objfile>: New field.
16489 <lookup>: Use m_dwarf2_per_objfile.
16490 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16491 (psyms_seen_size): Likewise.
16492 (write_gdbindex): Replace objfile parameter with
16493 dwarf2_per_objfile.
16494 (write_debug_names): Likewise.
16495 (write_psymtabs_to_index): Likewise.
16496 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16497 calls.
16498
16499 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16500
16501 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16502 <dwarf2_per_objfile>: New field.
16503 (struct dwarf2_per_cu_data) <objfile>: Remove.
16504 <dwarf2_per_objfile>: New field.
16505 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16506 of objfile.
16507 (create_signatured_type_table_from_index): Likewise.
16508 (create_debug_type_hash_table): Likewise.
16509 (fill_in_sig_entry_from_dwo_entry): Likewise.
16510 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16511 (create_type_unit_group): Assign dwarf2_per_objfile instead of
16512 objfile.
16513 (create_partial_symtab): Access objfile through
16514 dwarf2_per_objfile.
16515 (process_psymtab_comp_unit_reader): Likewise.
16516 (read_comp_units_from_section): Likewise.
16517 (scan_partial_symbols): Likewise.
16518 (add_partial_symbol): Likewise.
16519 (add_partial_subprogram): Likewise.
16520 (peek_die_abbrev): Likewise.
16521 (fixup_go_packaging): Likewise.
16522 (process_full_comp_unit): Likewise.
16523 (process_full_type_unit): Likewise.
16524 (process_imported_unit_die): Likewise.
16525 (dwarf2_compute_name): Likewise.
16526 (dwarf2_physname): Likewise.
16527 (read_import_statement): Likewise.
16528 (create_cus_hash_table): Assign dwarf2_physname instead of
16529 objfile.
16530 (read_func_scope): Access objfile through dwarf2_per_objfile.
16531 (read_lexical_block_scope): Likewise.
16532 (read_call_site_scope): Likewise.
16533 (read_variable): Likewise.
16534 (dwarf2_rnglists_process): Likewise.
16535 (dwarf2_ranges_process): Likewise.
16536 (dwarf2_ranges_read): Likewise.
16537 (dwarf2_record_block_ranges): Likewise.
16538 (dwarf2_add_field): Likewise.
16539 (dwarf2_add_member_fn): Likewise.
16540 (read_structure_type): Likewise.
16541 (process_structure_scope): Likewise.
16542 (read_enumeration_type): Likewise.
16543 (read_array_type): Likewise.
16544 (read_common_block): Likewise.
16545 (read_namespace_type): Likewise.
16546 (read_namespace): Likewise.
16547 (read_module_type): Likewise.
16548 (read_tag_pointer_type): Likewise.
16549 (read_tag_ptr_to_member_type): Likewise.
16550 (read_tag_string_type): Likewise.
16551 (read_subroutine_type): Likewise.
16552 (read_typedef): Likewise.
16553 (read_base_type): Likewise.
16554 (attr_to_dynamic_prop): Likewise.
16555 (read_subrange_type): Likewise.
16556 (read_unspecified_type): Likewise.
16557 (load_partial_dies): Likewise.
16558 (read_partial_die): Likewise.
16559 (find_partial_die): Likewise.
16560 (guess_partial_die_structure_name): Likewise.
16561 (fixup_partial_die): Likewise.
16562 (read_attribute_value): Likewise.
16563 (read_addr_index_from_leb128): Likewise.
16564 (dwarf2_read_addr_index): Likewise.
16565 (dwarf2_string_attr): Likewise.
16566 (lnp_state_machine::check_line_address): Likewise.
16567 (dwarf_decode_lines_1): Likewise.
16568 (dwarf_decode_lines): Likewise.
16569 (dwarf2_start_symtab): Likewise.
16570 (var_decode_location): Likewise.
16571 (new_symbol_full): Likewise.
16572 (dwarf2_const_value_data): Likewise.
16573 (dwarf2_const_value_attr): Likewise.
16574 (dwarf2_const_value): Likewise.
16575 (die_type): Likewise.
16576 (die_containing_type): Likewise.
16577 (lookup_die_type): Likewise.
16578 (guess_full_die_structure_name): Likewise.
16579 (anonymous_struct_prefix): Likewise.
16580 (dwarf2_name): Likewise.
16581 (follow_die_ref_or_sig): Likewise.
16582 (follow_die_offset): Likewise.
16583 (follow_die_ref): Likewise.
16584 (dwarf2_fetch_die_loc_sect_off): Likewise.
16585 (dwarf2_fetch_constant_bytes): Likewise.
16586 (dwarf2_fetch_die_type_sect_off): Likewise.
16587 (dwarf2_get_die_type): Likewise.
16588 (follow_die_sig): Likewise.
16589 (decode_locdesc): Likewise.
16590 (dwarf2_per_cu_objfile): Likewise.
16591 (dwarf2_per_cu_text_offset): Likewise.
16592 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16593 objfile.
16594 (set_die_type): Access objfile through
16595 dwarf2_per_objfile.
16596
16597 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16598
16599 * valprint.c (converted_character_d): Remove typedef.
16600 (DEF_VEC_O (converted_character_d)): Remove.
16601 (count_next_character): Use std::vector.
16602 (print_converted_chars_to_obstack): Likewise.
16603 (generic_printstr): Likewise.
16604
16605 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16606
16607 * xml-support.h (struct gdb_xml_value): Add constructor.
16608 <value>: Change type to unique_xmalloc_ptr.
16609 (gdb_xml_value_s): Remove typedef.
16610 (DEF_VEC_O (gdb_xml_value_s)): Remove.
16611 (gdb_xml_element_start_handler): Change parameter type to
16612 std::vector.
16613 (xml_find_attribute): Likewise.
16614 * xml-support.c (xml_find_attribute): Change parameter type to
16615 std::vector and adjust.
16616 (gdb_xml_values_cleanup): Remove.
16617 (gdb_xml_parser::start_element): Adjust to std::vector.
16618 (xinclude_start_include): Change paraeter type to std::vector
16619 and adjust.
16620 * btrace.c (check_xml_btrace_version): Likewise.
16621 (parse_xml_btrace_block): Likewise.
16622 (parse_xml_btrace_pt_config_cpu): Likewise.
16623 (parse_xml_btrace_pt): Likewise.
16624 (parse_xml_btrace_conf_bts): Likewise.
16625 (parse_xml_btrace_conf_pt): Likewise.
16626 * memory-map.c (memory_map_start_memory): Likewise.
16627 (memory_map_start_property): Likewise.
16628 * osdata.c (osdata_start_osdata): Likewise.
16629 (osdata_start_item): Likewise.
16630 (osdata_start_column): Likewise.
16631 * remote.c (start_thread): Likewise.
16632 * solib-aix.c (library_list_start_library): Likewise.
16633 (library_list_start_list): Likewise.
16634 * solib-svr4.c (library_list_start_library): Likewise.
16635 (svr4_library_list_start_list): Likewise.
16636 * solib-target.c (library_list_start_segment): Likewise.
16637 (library_list_start_section): Likewise.
16638 (library_list_start_library): Likewise.
16639 (library_list_start_list): Likewise.
16640 * tracepoint.c (traceframe_info_start_memory): Likewise.
16641 (traceframe_info_start_tvar): Likewise.
16642 * xml-syscall.c (syscall_start_syscall): Likewise.
16643 * xml-tdesc.c (tdesc_start_target): Likewise.
16644 (tdesc_start_feature): Likewise.
16645 (tdesc_start_reg): Likewise.
16646 (tdesc_start_union): Likewise.
16647 (tdesc_start_struct): Likewise.
16648 (tdesc_start_flags): Likewise.
16649 (tdesc_start_enum): Likewise.
16650 (tdesc_start_field): Likewise.
16651 (tdesc_start_enum_value): Likewise.
16652 (tdesc_start_vector): Likewise.
16653
16654 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16655
16656 * extension.h (struct xmethod_worker) <clone>: Remove.
16657 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16658 Remove.
16659 (python_xmethod_worker::clone): Remove.
16660 * valops.c (find_overload_match): Use std::move instead of
16661 clone.
16662
16663 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16664
16665 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16666 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16667 <free_xmethod_worker_data>: Remove.
16668 <get_matching_xmethod_workers>: Chance VEC to std::vector.
16669 <get_xmethod_arg_types>: Remove.
16670 <get_xmethod_result_type>: Remove.
16671 <invoke_xmethod>: Remove.
16672 * extension.c (new_xmethod_worker): Remove.
16673 (clone_xmethod_worker): Remove.
16674 (get_matching_xmethod_workers): Return void, pass std::vector by
16675 pointer.
16676 (get_xmethod_arg_types): Rename to...
16677 (xmethod_worker::get_arg_types): ... this, and adjust.
16678 (get_xmethod_result_type): Rename to...
16679 (xmethod_worker::get_result_type): ... this, and adjust.
16680 (invoke_xmethod): Remove.
16681 (free_xmethod_worker): Remove.
16682 (free_xmethod_worker_vec): Remove.
16683 * extension.h (enum ext_lang_rc): Move here from
16684 extension-priv.h.
16685 (struct xmethod_worker): Add constructor and destructor.
16686 <data>: Remove.
16687 <value>: Remove.
16688 <invoke, clone, do_get_result_type, do_get_arg_types>: New
16689 virtual pure methods.
16690 <get_arg_types, get_result_type>: New methods.
16691 (xmethod_worker_ptr): Remove typedef.
16692 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16693 (xmethod_worker_vec): Remove typedef.
16694 (xmethod_worker_up): New typedef.
16695 (invoke_xmethod): Remove.
16696 (clone_xmethod_worker): Remove.
16697 (free_xmethod_worker): Remove.
16698 (free_xmethod_worker_vec): Remove.
16699 (get_xmethod_arg_types): Remove.
16700 (get_xmethod_result_type): Remove.
16701 * valops.c (find_method_list): Use std::vector, don't use
16702 intermediate vector.
16703 (value_find_oload_method_list): Use std::vector.
16704 (find_overload_match): Use std::vector.
16705 (find_oload_champ): Use std::vector.
16706 * value.c (value_free): Use operator delete.
16707 (value_of_xmethod): Rename to...
16708 (value_from_xmethod): ... this. Don't assign
16709 xmethod_worker::value, take rvalue-reference.
16710 (result_type_of_xmethod): Adjust.
16711 (call_xmethod): Adjust.
16712 * value.h: Include extension.h.
16713 (struct xmethod_worker): Don't forward-declare.
16714 (value_of_xmethod): Rename to...
16715 (value_from_xmethod): ... this, take rvalue-reference.
16716 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16717 (struct python_xmethod_worker): ... this, add constructor and
16718 destructor.
16719 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16720 (gdbpy_free_xmethod_worker_data): Rename to...
16721 (python_xmethod_worker::~python_xmethod_worker): ... this and
16722 adjust.
16723 (gdbpy_clone_xmethod_worker_data): Rename to...
16724 (python_xmethod_worker::clone): ... this and adjust.
16725 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16726 temporary vector.
16727 (gdbpy_get_xmethod_arg_types): Rename to...
16728 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16729 (gdbpy_get_xmethod_result_type): Rename to...
16730 (python_xmethod_worker::do_get_result_type): ... this and
16731 adjust.
16732 (gdbpy_invoke_xmethod): Rename to...
16733 (python_xmethod_worker::invoke): ... this and adjust.
16734 (new_python_xmethod_worker): Rename to...
16735 (python_xmethod_worker::python_xmethod_worker): ... this and
16736 adjust.
16737 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16738 Remove.
16739 (gdbpy_free_xmethod_worker_data): Remove.
16740 (gdbpy_get_matching_xmethod_workers): Use std::vector.
16741 (gdbpy_get_xmethod_arg_types): Remove.
16742 (gdbpy_get_xmethod_result_type): Remove.
16743 (gdbpy_invoke_xmethod): Remove.
16744 * python/python.c (python_extension_ops): Remove obsolete
16745 callbacks.
16746
16747 2018-01-05 Pedro Alves <palves@redhat.com>
16748
16749 PR gdb/18653
16750 * common/signals-state-save-restore.c
16751 (save_original_signals_state): New parameter 'quiet'. Warn if we
16752 find a custom handler preinstalled, instead of internal erroring.
16753 But only warn if !quiet.
16754 * common/signals-state-save-restore.h
16755 (save_original_signals_state): New parameter 'quiet'.
16756 * main.c (captured_main_1): Move save_original_signals_state call
16757 after option handling, and pass QUIET.
16758
16759 2018-01-05 Pedro Alves <palves@redhat.com>
16760
16761 * spu-tdep.c (spu_catch_start): Pass
16762 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16763
16764 2018-01-05 Pedro Alves <palves@redhat.com>
16765
16766 PR gdb/22670
16767 * ada-lang.c (literal_symbol_name_matcher): New function.
16768 (ada_get_symbol_name_matcher): Use it for
16769 symbol_name_match_type::SEARCH_NAME.
16770 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
16771 it down instead of assuming symbol_name_match_type::FULL.
16772 * block.h (block_lookup_symbol): New parameter 'match_type'.
16773 * c-valprint.c (print_unpacked_pointer): Use
16774 lookup_symbol_search_name instead of lookup_symbol.
16775 * compile/compile-object-load.c (get_out_value_type): Pass down
16776 symbol_name_match_type::SEARCH_NAME.
16777 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16778 symbol_name_match_type::FULL.
16779 * cp-support.c (cp_get_symbol_name_matcher): Handle
16780 symbol_name_match_type::SEARCH_NAME.
16781 * infrun.c (insert_exception_resume_breakpoint): Use
16782 lookup_symbol_search_name.
16783 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16784 * psymtab.c (maintenance_check_psymtabs): Use
16785 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16786 * stack.c (print_frame_args): Use lookup_symbol_search_name and
16787 SYMBOL_SEARCH_NAME.
16788 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16789 if symbol_name_match_type::SEARCH_NAME.
16790 (lookup_symbol_in_language): Pass down
16791 symbol_name_match_type::FULL.
16792 (lookup_symbol_search_name): New.
16793 (lookup_language_this): Pass down
16794 symbol_name_match_type::SEARCH_NAME.
16795 (lookup_symbol_aux, lookup_local_symbol): New parameter
16796 'match_type'. Pass it down.
16797 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16798 (lookup_symbol_search_name): New declaration.
16799 (lookup_symbol_in_block): New 'match_type' parameter.
16800
16801 2018-01-05 Pedro Alves <palves@redhat.com>
16802
16803 PR gdb/22670
16804 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16805 ada_lookup_symbol.
16806 (ada_lookup_symbol): Reimplement in terms of
16807 ada_lookup_symbol_list, bits factored out from
16808 ada_lookup_encoded_symbol.
16809
16810 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16811
16812 * ada-exp.y (write_object_renaming): When subscripting an array
16813 using a symbol as the index, pass the block in call to
16814 ada_lookup_encoded_symbol when looking that symbol up.
16815
16816 2018-01-05 Jerome Guitton <guitton@adacore.com>
16817
16818 * ada-lang.c (ada_array_length): Use ada_index_type instead of
16819 TYPE_INDEX_TYPE.
16820
16821 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16822
16823 * ada-lang.c (ada_to_fixed_value_create): Add handling of
16824 the case where VALUE_LVAL (val0) is not lval_memory.
16825
16826 2018-01-05 Xavier Roirand <roirand@adacore.com>
16827
16828 * ada-valprint.c (print_optional_low_bound): Handle
16829 character-indexed array printing like boolean-indexed array
16830 printing.
16831
16832 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16833
16834 * NEWS: Create a new section for the next release branch.
16835 Rename the section of the current branch, now that it has
16836 been cut.
16837
16838 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16839
16840 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16841 * version.in: Bump version to 8.1.50.DATE-git.
16842
16843 2018-01-03 Xavier Roirand <roirand@adacore.com>
16844
16845 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16846 Add field.
16847 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16848 Add field.
16849 (default_exception_support_info) <catch_handlers_sym>: Add field.
16850 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16851 (ada_exception_name_addr_1): Add "catch handlers" handling.
16852 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16853 Update all callers.
16854 (create_excep_cond_exprs) <ex>: Add parameter.
16855 (re_set_exception): Update create_excep_cond_exprs call.
16856 (print_it_exception, print_one_exception, print_mention_exception)
16857 (print_recreate_exception): Add "catch handler" handling.
16858 (allocate_location_catch_handlers, re_set_catch_handlers)
16859 (check_status_catch_handlers, print_it_catch_handlers)
16860 (print_one_catch_handlers, print_mention_catch_handlers)
16861 (print_recreate_catch_handlers): New function.
16862 (catch_handlers_breakpoint_ops): New variable.
16863 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16864 Add parameter. Add "catch handler" handling.
16865 (ada_exception_sym_name, ada_exception_breakpoint_ops):
16866 Add "catch handler" handling.
16867 (ada_exception_catchpoint_cond_string): Add "catch handler"
16868 handling.
16869 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16870 call.
16871 (catch_ada_handlers_command): New function.
16872 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16873 operations structure.
16874 (_initialize_ada_language): Add "catch handlers" command entry.
16875 * NEWS: Document "catch handlers" feature.
16876
16877 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16878
16879 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16880 account when creating the array type of the slice.
16881 (ada_value_slice): Likewise.
16882
16883 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16884
16885 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16886 New enum value.
16887 (create_array_type_with_stride): Add byte_stride_prop parameter.
16888 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16889 New parameter. Update all callers in this file.
16890 (array_type_has_dynamic_stride): New function.
16891 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16892 of arrays with dynamic byte strides.
16893 * dwarf2read.c (read_array_type): Add support for dynamic
16894 DW_AT_byte_stride attributes.
16895
16896 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16897
16898 * dwarf2read.c (read_unspecified_type): Treat
16899 DW_TAG_enumeration_type DIEs from Ada units as stubs.
16900
16901 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16902
16903 Update copyright year range in all GDB files.
16904
16905 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
16906
16907 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16908 and gdb/testsuite/gdb.base/step-line.c.
16909
16910 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16911
16912 * copyright.py (main): Dump the contents of
16913 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16914 even if BY_HAND is empty.
16915
16916 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16917
16918 * top.c (print_gdb_version): Update Copyright year in version
16919 message.
16920
16921 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16922
16923 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16924
16925 For older changes see ChangeLog-2017.
16926 \f
16927 Local Variables:
16928 mode: change-log
16929 left-margin: 8
16930 fill-column: 74
16931 version-control: never
16932 coding: utf-8
16933 End:
This page took 0.346985 seconds and 3 git commands to generate.